content
stringlengths 40
137k
|
---|
"protected void saveRemovedElements() {\n HashSet<ModelElement> removedElements = this.getTreeViewer().getRemovedElements();\n for (ModelElement mod : removedElements) {\n if (mod.eIsProxy()) {\n mod = (ModelElement) EObjectHelper.resolveObject(mod);\n }\n if (mod.eResource() == null) {\n log.error(\"String_Node_Str\" + mod.getName() + \"String_Node_Str\" + this.getAnalysis().getName());\n } else {\n EMFUtil.saveSingleResource(mod.eResource());\n }\n }\n this.getTreeViewer().getRemovedElements().clear();\n}\n"
|
"public long getTerm(long index) {\n if (index == 0) {\n return 0;\n }\n if (index == stateMachine.getPrevIndex()) {\n return stateMachine.getPrevTerm();\n }\n if (index == stateMachine.getIndex()) {\n return stateMachine.getTerm();\n }\n final Entry<T> e = getEntry(index);\n if (e == null) {\n logger.error(\"String_Node_Str\", index);\n }\n return e.term;\n}\n"
|
"private static void generateNodeInfo(JobInfo jobInfo, String selectedContextName, boolean statistics, boolean properties, int option, IProgressMonitor progressMonitor, IProcess currentProcess) throws ProcessorException {\n if (option != GENERATE_MAIN_ONLY) {\n List<? extends INode> graphicalNodes = currentProcess.getGeneratingNodes();\n for (INode node : graphicalNodes) {\n String componentName = node.getComponent().getName();\n if ((node != null) && (componentName.equals(\"String_Node_Str\") || componentName.equals(\"String_Node_Str\"))) {\n if (\"String_Node_Str\".equals(componentName)) {\n IElementParameter fromExternal = node.getElementParameter(\"String_Node_Str\");\n Object value = fromExternal.getValue();\n if (value != null && \"String_Node_Str\".equals(value.toString())) {\n continue;\n }\n }\n IElementParameter processIdparam = node.getElementParameter(\"String_Node_Str\");\n String jobIds = (String) processIdparam.getValue();\n String[] jobsArr = jobIds.split(ProcessorUtilities.COMMA);\n for (String jobId : jobsArr) {\n if (StringUtils.isNotEmpty(jobId)) {\n ProcessItem processItem = null;\n String context = (String) node.getElementParameter(\"String_Node_Str\").getValue();\n String version = (String) node.getElementParameter(\"String_Node_Str\").getValue();\n JobInfo subJobInfo = null;\n subJobInfo = new JobInfo(jobId, context, version);\n processItem = ItemCacheManager.getProcessItem(jobId, version);\n if (processItem == null) {\n throw new ProcessorException(\"String_Node_Str\" + currentProcess.getName());\n }\n subJobInfo.setJobVersion(processItem.getProperty().getVersion());\n if (jobInfo.isApplyContextToChildren()) {\n subJobInfo.setApplyContextToChildren(jobInfo.isApplyContextToChildren());\n if (checkIfContextExisted(processItem, selectedContextName)) {\n subJobInfo.setContextName(selectedContextName);\n } else {\n String defaultContext = processItem.getProcess().getDefaultContext();\n node.getElementParameter(\"String_Node_Str\").setValue(defaultContext);\n subJobInfo.setContextName(defaultContext);\n }\n }\n subJobInfo.setFatherJobInfo(jobInfo);\n if (!jobList.contains(subJobInfo)) {\n if (option == GENERATE_WITH_FIRST_CHILD) {\n generateCode(subJobInfo, selectedContextName, statistics, false, properties, GENERATE_MAIN_ONLY, progressMonitor);\n } else {\n generateCode(subJobInfo, selectedContextName, statistics, false, properties, GENERATE_ALL_CHILDS, progressMonitor);\n currentProcess.setNeedRegenerateCode(true);\n }\n }\n LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId(), jobInfo.getJobVersion()).addAll(LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(subJobInfo.getJobId(), subJobInfo.getJobVersion()));\n if (exportAsOSGI) {\n LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(jobInfo.getJobId() + \"String_Node_Str\", jobInfo.getJobVersion()).addAll(LastGenerationInfo.getInstance().getModulesNeededWithSubjobPerJob(subJobInfo.getJobId() + \"String_Node_Str\", subJobInfo.getJobVersion()));\n }\n LastGenerationInfo.getInstance().getRoutinesNeededWithSubjobPerJob(jobInfo.getJobId(), jobInfo.getJobVersion()).addAll(LastGenerationInfo.getInstance().getRoutinesNeededWithSubjobPerJob(subJobInfo.getJobId(), subJobInfo.getJobVersion()));\n if (!LastGenerationInfo.getInstance().isUseDynamic(jobInfo.getJobId(), jobInfo.getJobVersion())) {\n LastGenerationInfo.getInstance().setUseDynamic(jobInfo.getJobId(), jobInfo.getJobVersion(), LastGenerationInfo.getInstance().isUseDynamic(subJobInfo.getJobId(), subJobInfo.getJobVersion()));\n }\n }\n }\n }\n }\n }\n}\n"
|
"public Object childReturnValueFor(Object child) {\n Iterator itr = _childList.iterator();\n int index = 0;\n while (itr.hasNext()) {\n if (child == itr.next()) {\n return childReturnValueAt(index);\n }\n index++;\n }\n ApplicationUtility.error(\"String_Node_Str\");\n return null;\n}\n"
|
"public static Date fromIso(String str) {\n return Utils.getDateTime(str);\n}\n"
|
"private void compileSimpleColumnRefExpr(Node refNode, Node rowName, List columnExprList) {\n String str = rowName.getString();\n assert (str != null);\n if (!str.equals(ROW_INDICATOR))\n return;\n Node rowColumn = rowName.getNext();\n assert (rowColumn != null);\n if (!str.equals(ROW_INDICATOR)) {\n if (rowColumn != null && rowColumn.getNext() != null)\n processChild(rowColumn.getNext(), tree, columnExprList);\n return;\n }\n if ((refNode.getType() == Token.GETPROP || refNode.getType() == Token.SETPROP) && rowColumn.getType() == Token.STRING) {\n int outer_count = 0;\n if (\"String_Node_Str\".equals(rowColumn.getString()) || \"String_Node_Str\".equals(rowColumn.getString()))\n return;\n if (\"String_Node_Str\".equals(rowColumn.getString())) {\n outer_count++;\n Node outer_Node = refNode.getNext();\n Node before_Node = outer_Node;\n while (outer_Node != null && outer_Node.getString() != null && \"String_Node_Str\".equals(outer_Node.getString())) {\n outer_count++;\n before_Node = outer_Node;\n outer_Node = outer_Node.getNext();\n }\n ColumnBinding info = new ColumnBinding(before_Node.getString(), \"String_Node_Str\", outer_count);\n columnExprList.add(info);\n return;\n }\n ColumnBinding binding = new ColumnBinding(rowColumn.getString(), DATASETROW_INDICATOR + \"String_Node_Str\" + rowColumn.getString() + \"String_Node_Str\");\n columnExprList.add(binding);\n }\n if (refNode.getType() == Token.GETELEM) {\n if (rowColumn.getType() == Token.NUMBER) {\n if (0 == rowColumn.getDouble())\n return;\n } else if (rowColumn.getType() == Token.STRING) {\n if (\"String_Node_Str\".equals(rowColumn.getString()))\n return;\n ColumnBinding binding = new ColumnBinding(rowColumn.getString(), DATASETROW_INDICATOR + \"String_Node_Str\" + rowColumn.getString() + \"String_Node_Str\");\n columnExprList.add(binding);\n }\n }\n}\n"
|
"private void syncValues() {\n Set<String> tmp = nativeGetOrigins();\n mOrigins = new HashMap<String, Origin>();\n for (String origin : tmp) {\n Origin website = new Origin(origin, nativeGetQuotaForOrigin(origin), nativeGetUsageForOrigin(origin));\n mOrigins.put(origin, website);\n }\n}\n"
|
"public boolean containsValue(final Object value) {\n final NodeEngine nodeEngine = getNodeEngine();\n Data v = getService().toData(value);\n return containsValueInternal(v);\n}\n"
|
"public VM_Address getNextReferenceAddress() {\n if (mapId < 0)\n mapOffset = maps.getNextJSRRef(mapOffset);\n else\n mapOffset = maps.getNextRef(mapOffset, mapId);\n if (VM.TraceStkMaps) {\n VM.sysWrite(\"String_Node_Str\");\n VM.sysWrite(mapOffset);\n VM.sysWrite(\"String_Node_Str\");\n if (mapId < 0)\n VM.sysWrite(\"String_Node_Str\");\n }\n if (mapOffset != 0) {\n return (framePtr.add(mapOffset));\n } else if (bridgeParameterMappingRequired) {\n if (VM.TraceStkMaps) {\n VM.sysWrite(\"String_Node_Str\");\n VM.sysWrite(bridgeTarget);\n VM.sysWrite(\"String_Node_Str\");\n }\n if (!bridgeRegistersLocationUpdated) {\n VM_Address location = framePtr.add(VM_Compiler.getFrameSize(currentMethod));\n location = location.sub((LAST_NONVOLATILE_FPR - FIRST_VOLATILE_FPR + 1) * BYTES_IN_DOUBLE);\n for (int i = LAST_NONVOLATILE_GPR; i >= FIRST_VOLATILE_GPR; --i) {\n location = location.sub(BYTES_IN_ADDRESS);\n registerLocations.set(i, location);\n }\n bridgeRegistersLocationUpdated = true;\n }\n if (bridgeParameterIndex == -1) {\n bridgeParameterIndex += 1;\n bridgeRegisterIndex += 1;\n bridgeRegisterLocation = bridgeRegisterLocation.add(BYTES_IN_ADDRESS);\n return bridgeRegisterLocation.sub(BYTES_IN_ADDRESS);\n }\n while (true) {\n if (bridgeParameterIndex == bridgeParameterTypes.length || bridgeRegisterIndex > LAST_VOLATILE_GPR) {\n bridgeParameterMappingRequired = false;\n break;\n }\n VM_TypeReference bridgeParameterType = bridgeParameterTypes[bridgeParameterIndex++];\n if (bridgeParameterType.isReferenceType()) {\n bridgeRegisterIndex += 1;\n bridgeRegisterLocation = bridgeRegisterLocation.add(4);\n return bridgeRegisterLocation.sub(4);\n } else if (bridgeParameterType.isLongType()) {\n bridgeRegisterIndex += 2;\n bridgeRegisterLocation = bridgeRegisterLocation.add(8);\n } else if (bridgeParameterType.isDoubleType() || bridgeParameterType.isFloatType()) {\n } else {\n bridgeRegisterIndex += 1;\n bridgeRegisterLocation = bridgeRegisterLocation.add(4);\n }\n }\n }\n return VM_Address.zero();\n}\n"
|
"public void transformClass(SootClass sc) {\n SootMethod smInit = null;\n Set<SootField> alreadyInitialized = new HashSet<SootField>();\n for (SootField sf : sc.getFields()) {\n if (!sf.isStatic() || !sf.isFinal())\n continue;\n if (alreadyInitialized.contains(sf))\n continue;\n for (Tag t : sf.getTags()) {\n Stmt initStmt = null;\n if (t instanceof DoubleConstantValueTag) {\n double value = ((DoubleConstantValueTag) t).getDoubleValue();\n initStmt = Jimple.v().newAssignStmt(Jimple.v().newStaticFieldRef(sf.makeRef()), DoubleConstant.v(value));\n } else if (t instanceof FloatConstantValueTag) {\n float value = ((FloatConstantValueTag) t).getFloatValue();\n initStmt = Jimple.v().newAssignStmt(Jimple.v().newStaticFieldRef(sf.makeRef()), FloatConstant.v(value));\n } else if (t instanceof IntegerConstantValueTag) {\n int value = ((IntegerConstantValueTag) t).getIntValue();\n initStmt = Jimple.v().newAssignStmt(Jimple.v().newStaticFieldRef(sf.makeRef()), IntConstant.v(value));\n } else if (t instanceof LongConstantValueTag) {\n long value = ((LongConstantValueTag) t).getLongValue();\n initStmt = Jimple.v().newAssignStmt(Jimple.v().newStaticFieldRef(sf.makeRef()), LongConstant.v(value));\n } else if (t instanceof StringConstantValueTag) {\n String value = ((StringConstantValueTag) t).getStringValue();\n initStmt = Jimple.v().newAssignStmt(Jimple.v().newStaticFieldRef(sf.makeRef()), StringConstant.v(value));\n }\n if (initStmt != null) {\n if (smInit == null)\n smInit = getOrCreateInitializer(sc, alreadyInitialized);\n if (smInit != null)\n smInit.getActiveBody().getUnits().addFirst(initStmt);\n }\n }\n }\n if (smInit != null) {\n Chain<Unit> units = smInit.getActiveBody().getUnits();\n if (units.isEmpty() || !(units.getLast() instanceof ReturnVoidStmt))\n units.add(Jimple.v().newReturnVoidStmt());\n }\n}\n"
|
"private final ProofNode generateProof(TreeNode stn, ModuleNode cm) throws AbortException {\n int numberOfPops = 0;\n if (stn.getKind() == N_TerminalProof) {\n return generateLeafProof(stn, cm);\n }\n ;\n Context pfCtxt = new Context(moduleTable, errors);\n symbolTable.pushContext(pfCtxt);\n TreeNode[] heirs = stn.heirs();\n int offset = 0;\n if (heirs[0].getKind() == TLAplusParserConstants.PROOF) {\n offset = 1;\n }\n ;\n LevelNode[] steps = new LevelNode[heirs.length - offset];\n Vector iVec = new Vector();\n boolean prevIsInfix = false;\n ExprNode prevRHS = null;\n for (int i = offset; i < heirs.length; i++) {\n boolean isAssumeProve = false;\n boolean isSuffices = false;\n Context assumeContext = null;\n boolean isPick = false;\n Context pickContext = null;\n TreeNode pfStepSTN = heirs[i];\n TreeNode stepNumSTN = pfStepSTN.heirs()[0];\n TreeNode stepBodySTN = pfStepSTN.heirs()[1];\n TreeNode stepPfSTN = null;\n if (pfStepSTN.heirs().length > 2) {\n stepPfSTN = pfStepSTN.heirs()[2];\n }\n ;\n LevelNode pfNumNode = null;\n boolean makePfNumNode = true;\n UniqueString stepNum = null;\n switch(stepNumSTN.getKind()) {\n case TLAplusParserConstants.ProofImplicitStepLexeme:\n case TLAplusParserConstants.ProofStepLexeme:\n stepNum = stepNumSTN.getUS();\n break;\n case TLAplusParserConstants.ProofStepDotLexeme:\n String stNum = stepNumSTN.getUS().toString();\n stepNum = UniqueString.uniqueStringOf(stNum.substring(0, stNum.indexOf(\"String_Node_Str\")));\n break;\n default:\n makePfNumNode = false;\n break;\n }\n ;\n if (stepNum != null) {\n pushLS();\n }\n ;\n ThmOrAssumpDefNode tadn = null;\n if (stepNum != null) {\n tadn = new ThmOrAssumpDefNode(stepNum, stepNumSTN);\n }\n ;\n int stepKind = stepBodySTN.getKind();\n if (stepKind != N_AssertStep) {\n prevIsInfix = false;\n }\n ;\n switch(stepKind) {\n case N_DefStep:\n TreeNode[] defSTNs = stepBodySTN.heirs();\n int defOffSet = 0;\n if (defSTNs[0].getKind() == DEFINE) {\n defOffSet = 1;\n }\n ;\n OpDefNode[] defs = new OpDefNode[defSTNs.length - defOffSet];\n for (int j = defOffSet; j < defSTNs.length; j++) {\n TreeNode defSTN = defSTNs[j];\n ;\n Vector vec = new Vector();\n switch(defSTN.getKind()) {\n case N_FunctionDefinition:\n processFunction(defSTN, vec, cm);\n break;\n case N_ModuleDefinition:\n Vector defsVec = new Vector();\n vec.addElement(processModuleDefinition(defSTN, defsVec, iVec, cm));\n break;\n case N_OperatorDefinition:\n processOperator(defSTN, vec, cm);\n break;\n }\n ;\n defs[j - defOffSet] = (OpDefNode) vec.elementAt(0);\n }\n ;\n pfNumNode = new DefStepNode(stepBodySTN, stepNum, defs);\n steps[i - offset] = pfNumNode;\n break;\n case N_UseOrHide:\n UseOrHideNode uohn = generateUseOrHide(stepBodySTN, cm);\n if (uohn.facts.length + uohn.defs.length == 0) {\n errors.addError(stepBodySTN.getLocation(), \"String_Node_Str\");\n }\n ;\n uohn.factCheck();\n pfNumNode = uohn;\n steps[i - offset] = pfNumNode;\n break;\n case N_NonLocalInstance:\n pfNumNode = generateInstance(stepBodySTN, cm, false);\n steps[i - offset] = pfNumNode;\n break;\n default:\n makePfNumNode = false;\n TreeNode[] bodyHeirs = stepBodySTN.heirs();\n LevelNode body = null;\n UniqueString op = null;\n ExprNode[] args;\n switch(stepBodySTN.getKind()) {\n case N_AssertStep:\n int bodyNext = 0;\n if (bodyHeirs[0].getKind() == TLAplusParserConstants.SUFFICES) {\n bodyNext = 1;\n isSuffices = true;\n }\n ;\n if (bodyHeirs[bodyNext].getKind() == N_AssumeProve) {\n isAssumeProve = true;\n symbolTable.pushContext(new Context(moduleTable, errors));\n currentGoal = tadn;\n body = generateAssumeProve(bodyHeirs[bodyNext], cm);\n if (isSuffices) {\n ((AssumeProveNode) body).setSuffices();\n }\n ;\n currentGoal = null;\n assumeContext = symbolTable.getContext();\n symbolTable.popContext();\n prevIsInfix = false;\n } else {\n TreeNode curExpr = bodyHeirs[bodyNext];\n if (isSuffices) {\n args = new ExprNode[1];\n args[0] = generateExpression(curExpr, cm);\n body = new OpApplNode(OP_suffices, args, stepBodySTN, cm);\n } else {\n SyntaxTreeNode curLHS = null;\n if (curExpr.getKind() == N_InfixExpr) {\n curLHS = (SyntaxTreeNode) curExpr.heirs()[0];\n }\n ;\n if (prevIsInfix && (curLHS != null) && (curLHS.heirs().length > 0) && (((SyntaxTreeNode) curLHS.heirs()[0]).heirs().length == 0) && (curLHS.heirs()).length > 1 && (curLHS.heirs()[1].getKind() == IDENTIFIER) && (curLHS.heirs()[1].getUS() == AtUS)) {\n TreeNode[] children = curExpr.heirs();\n GenID genID = generateGenID(children[1], cm);\n ExprNode[] sns = new ExprNode[2];\n SymbolNode opn = symbolTable.resolveSymbol(Operators.resolveSynonym(genID.getCompoundIDUS()));\n if (opn == null) {\n errors.addError(curExpr.getLocation(), \"String_Node_Str\" + genID.getCompoundIDUS() + \"String_Node_Str\");\n return null;\n }\n ;\n sns[1] = generateExpression(children[2], cm);\n ExprNode[] nopArgs = new ExprNode[1];\n nopArgs[0] = prevRHS;\n sns[0] = new OpApplNode(OP_nop, nopArgs, curLHS, cm);\n body = new OpApplNode(opn, sns, curExpr, cm);\n } else {\n body = generateExpression(curExpr, cm);\n }\n ;\n prevIsInfix = false;\n if ((curLHS != null) && (body != null) && (body.getKind() == OpApplKind) && (((OpApplNode) body).getArgs().length > 1)) {\n prevIsInfix = true;\n prevRHS = (ExprNode) ((OpApplNode) body).getArgs()[1];\n }\n }\n }\n ;\n break;\n case N_HaveStep:\n case N_CaseStep:\n if (stepBodySTN.getKind() == N_HaveStep) {\n op = OP_have;\n } else {\n op = OP_pfcase;\n }\n ;\n args = new ExprNode[1];\n args[0] = generateExpression(bodyHeirs[1], cm);\n body = new OpApplNode(op, args, stepBodySTN, cm);\n break;\n case N_TakeStep:\n case N_PickStep:\n if (stepBodySTN.getKind() == N_TakeStep) {\n op = OP_take;\n } else {\n op = OP_pick;\n isPick = true;\n symbolTable.pushContext(new Context(moduleTable, errors));\n }\n ;\n if (bodyHeirs[1].getKind() == N_QuantBound) {\n int quants = 1;\n int nextTok = 2;\n while ((nextTok < bodyHeirs.length) && (bodyHeirs[nextTok].getKind() == TLAplusParserConstants.COMMA)) {\n quants++;\n nextTok = nextTok + 2;\n }\n ;\n FormalParamNode[][] params = new FormalParamNode[quants][0];\n boolean[] bt = new boolean[quants];\n ExprNode[] paramBounds = new ExprNode[quants];\n processQuantBoundArgs(bodyHeirs, 1, params, bt, paramBounds, cm);\n if (isPick) {\n pickContext = symbolTable.getContext();\n nextTok++;\n args = new ExprNode[1];\n pushFormalParams(flattenParams(params));\n args[0] = generateExpression(bodyHeirs[nextTok], cm);\n popFormalParams();\n symbolTable.popContext();\n } else {\n args = new ExprNode[0];\n }\n ;\n body = new OpApplNode(op, null, args, params, bt, paramBounds, stepBodySTN, cm);\n } else {\n int ids = 1;\n while ((2 * ids < bodyHeirs.length) && (bodyHeirs[2 * ids].getKind() == TLAplusParserConstants.COMMA)) {\n ids++;\n }\n ;\n FormalParamNode[] params = new FormalParamNode[ids];\n for (int j = 0; j < ids; j++) {\n params[j] = new FormalParamNode(bodyHeirs[2 * j + 1].getUS(), 0, bodyHeirs[2 * j + 1], symbolTable, cm);\n }\n ;\n if (isPick) {\n pickContext = symbolTable.getContext();\n pushFormalParams(params);\n args = new ExprNode[1];\n args[0] = generateExpression(bodyHeirs[2 * ids + 1], cm);\n popFormalParams();\n symbolTable.popContext();\n } else {\n args = new ExprNode[0];\n }\n ;\n body = new OpApplNode(op, args, params, stepBodySTN, cm);\n }\n ;\n break;\n case N_WitnessStep:\n int ids = 1;\n while ((2 * ids < bodyHeirs.length) && (bodyHeirs[2 * ids].getKind() == TLAplusParserConstants.COMMA)) {\n ids++;\n }\n ;\n args = new ExprNode[ids];\n for (int j = 0; j < ids; j++) {\n args[j] = generateExpression(bodyHeirs[2 * j + 1], cm);\n }\n ;\n body = new OpApplNode(OP_witness, args, stepBodySTN, cm);\n break;\n case N_QEDStep:\n args = new ExprNode[0];\n body = new OpApplNode(OP_qed, args, stepBodySTN, cm);\n break;\n default:\n errors.addAbort(stn.getLocation(), \"String_Node_Str\" + heirs[i].getKind());\n break;\n }\n ;\n if (stepNum != null) {\n tadn.construct(true, body, cm, symbolTable, null);\n tadn.setLabels(popLabelNodeSet());\n if (isSuffices) {\n tadn.setSuffices();\n }\n ;\n }\n ;\n ProofNode proof = null;\n if (stepPfSTN != null) {\n if (isAssumeProve && !isSuffices) {\n symbolTable.pushContext(assumeContext);\n }\n ;\n proof = generateProof(stepPfSTN, cm);\n if (isAssumeProve && !isSuffices) {\n symbolTable.popContext();\n }\n ;\n }\n ;\n if (isAssumeProve && isSuffices) {\n numberOfPops++;\n symbolTable.pushContext(assumeContext);\n }\n ;\n if (isAssumeProve) {\n ((AssumeProveNode) body).inProof = false;\n }\n ;\n TheoremNode thm = new TheoremNode(stepBodySTN, body, cm, proof, tadn);\n thm.suffices = isSuffices;\n steps[i - offset] = thm;\n }\n ;\n if (makePfNumNode) {\n OpDefNode nodeMadeOnlyToBePutInSymbolTable = new OpDefNode(stepNum, pfNumNode, cm, symbolTable, pfStepSTN);\n nodeMadeOnlyToBePutInSymbolTable.setLabels(popLabelNodeSet());\n }\n if (isPick) {\n Enumeration e = pickContext.content();\n while (e.hasMoreElements()) {\n SymbolNode sym = ((Context.Pair) (e.nextElement())).getSymbol();\n symbolTable.addSymbol(sym.getName(), sym);\n }\n }\n }\n ;\n InstanceNode[] insts = new InstanceNode[iVec.size()];\n for (int i = 0; i < insts.length; i++) {\n insts[i] = (InstanceNode) iVec.elementAt(i);\n }\n ;\n for (int i = 0; i < numberOfPops; i++) {\n symbolTable.popContext();\n }\n ;\n symbolTable.popContext();\n return new NonLeafProofNode(stn, steps, insts, pfCtxt);\n}\n"
|
"public void test5Nodes() {\n List<ClusterEvent> clusterEvents = new ArrayList<>();\n clusterEvents.add(new ClusterEvent(\"String_Node_Str\" + steps[0] + \"String_Node_Str\", steps[0]));\n clusterEvents.add(new ClusterEvent(\"String_Node_Str\" + steps[1] + \"String_Node_Str\", steps[1]));\n clusterEvents.add(new ClusterEvent(\"String_Node_Str\" + steps[2] + \"String_Node_Str\", steps[2]));\n clusterEvents.add(new ClusterEvent(\"String_Node_Str\" + steps[3] + \"String_Node_Str\", steps[3]));\n clusterEvents.add(new ClusterEvent(\"String_Node_Str\" + steps[4] + \"String_Node_Str\", steps[4]));\n SpokeRings spokeRings = new SpokeRings();\n spokeRings.process(strings);\n assertTrue(spokeRings.getNodes(\"String_Node_Str\").containsAll(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\")));\n assertTrue(spokeRings.getNodes(\"String_Node_Str\").containsAll(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\")));\n assertTrue(spokeRings.getNodes(\"String_Node_Str\").containsAll(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\")));\n assertTrue(spokeRings.getNodes(\"String_Node_Str\").containsAll(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\")));\n assertTrue(spokeRings.getNodes(\"String_Node_Str\", getTime(steps[0])).containsAll(Arrays.asList(\"String_Node_Str\")));\n assertTrue(spokeRings.getNodes(\"String_Node_Str\", getTime(steps[1])).containsAll(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\")));\n assertTrue(spokeRings.getNodes(\"String_Node_Str\", getTime(steps[2])).containsAll(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\")));\n assertTrue(spokeRings.getNodes(\"String_Node_Str\", getTime(steps[3])).containsAll(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\")));\n assertTrue(spokeRings.getNodes(\"String_Node_Str\", getTime(steps[0]), getTime(steps[4])).containsAll(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\")));\n assertTrue(spokeRings.getNodes(\"String_Node_Str\", getTime(steps[0]), getTime(steps[4])).containsAll(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\")));\n assertTrue(spokeRings.getNodes(\"String_Node_Str\", getTime(steps[5]), getTime(steps[6])).containsAll(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\")));\n assertTrue(spokeRings.getNodes(\"String_Node_Str\", getTime(steps[4]), getTime(steps[6])).containsAll(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\")));\n}\n"
|
"public void loadAll_ExceptionPropagation() throws Exception {\n final RuntimeException expectedException = new RuntimeException(\"String_Node_Str\");\n CacheLoader<Integer, Integer> loader = new MockCacheLoader<Integer, Integer>() {\n public Map<Integer, Integer> loadAll(Iterable<? extends Integer> keys) {\n throw expectedException;\n }\n };\n Cache<Integer, Integer> cache = getCacheManager().configureCache(getTestCacheName(), new MutableConfiguration<Integer, Integer>().setCacheLoaderFactory(Factories.of(loader)));\n HashSet<Integer> keys = new HashSet<Integer>();\n keys.add(1);\n CompletionListenerFuture future = new CompletionListenerFuture();\n cache.loadAll(keys, true, future);\n try {\n future.get(FUTURE_WAIT_MILLIS, TimeUnit.MILLISECONDS);\n fail(\"String_Node_Str\");\n } catch (ExecutionException e) {\n assertTrue(future.isDone());\n assertEquals(expectedException, e.getCause());\n }\n}\n"
|
"public static void main(String[] args) throws IOException {\n BayesianNetworkGenerator.setNumberOfContinuousVars(0);\n BayesianNetworkGenerator.setNumberOfDiscreteVars(5);\n BayesianNetworkGenerator.setNumberOfStates(3);\n BayesianNetwork bn = BayesianNetworkGenerator.generateNaiveBayes(new Random(0));\n int sampleSize = 10000;\n BayesianNetworkSampler sampler = new BayesianNetworkSampler(bn);\n sampler.setParallelMode(false);\n String file = \"String_Node_Str\";\n sampler.sampleToAnARFFFile(file, sampleSize);\n DataBase data = new DynamicDataOnDiskFromFile(new ARFFDataReader(file));\n for (int i = 1; i <= 5; i++) {\n DynamicNaiveBayesClassifier model = new DynamicNaiveBayesClassifier();\n model.setClassVarID(data.getAttributes().getNumberOfAttributes() - 1);\n model.setParallelMode(true);\n model.learn(data);\n DynamicBayesianNetwork nbClassifier = model.getDynamicBNModel();\n }\n}\n"
|
"private void adjustCropToStackBounds(WindowState w, Rect clipRect, Rect finalClipRect, boolean isFreeformResizing) {\n final Task task = w.getTask();\n if (task == null || !task.cropWindowsToStackBounds()) {\n return;\n }\n final int stackClip = resolveStackClip();\n if (isAnimating() && stackClip == STACK_CLIP_NONE) {\n return;\n }\n final WindowState winShowWhenLocked = (WindowState) mPolicy.getWinShowWhenLockedLw();\n if (w == winShowWhenLocked) {\n return;\n }\n final TaskStack stack = task.mStack;\n stack.getDimBounds(mTmpStackBounds);\n final Rect surfaceInsets = w.getAttrs().surfaceInsets;\n final int frameX = isFreeformResizing ? (int) mSurfaceController.getX() : w.mFrame.left + mWin.mXOffset - surfaceInsets.left;\n final int frameY = isFreeformResizing ? (int) mSurfaceController.getY() : w.mFrame.top + mWin.mYOffset - surfaceInsets.top;\n final boolean useFinalClipRect = isAnimating() && stackClip == STACK_CLIP_AFTER_ANIM;\n if (useFinalClipRect) {\n finalClipRect.set(mTmpStackBounds);\n } else {\n clipRect.left = Math.max(0, Math.max(mTmpStackBounds.left, frameX + clipRect.left) - frameX);\n clipRect.top = Math.max(0, Math.max(mTmpStackBounds.top, frameY + clipRect.top) - frameY);\n clipRect.right = Math.max(0, Math.min(mTmpStackBounds.right, frameX + clipRect.right) - frameX);\n clipRect.bottom = Math.max(0, Math.min(mTmpStackBounds.bottom, frameY + clipRect.bottom) - frameY);\n }\n}\n"
|
"private Chunk loadOrCreateChunk(int x, int z) {\n Chunk c = getChunk(x, 0, z);\n if (c != null) {\n if (c.getPosition().x != x || c.getPosition().y != 0 || c.getPosition().z != z) {\n c = _chunkCache.get(Helper.getInstance().cantorize(x, z));\n }\n }\n if (c != null) {\n return c;\n } else {\n }\n synchronized (_chunkCache) {\n if (_chunkCache.size() >= 1024) {\n ArrayList<Chunk> sortedChunks = new ArrayList<Chunk>(_chunkCache.values());\n Collections.sort(sortedChunks);\n Logger.getLogger(this.getClass().getName()).log(Level.INFO, \"String_Node_Str\");\n for (int i = 0; i < 256; i++) {\n int indexToDelete = sortedChunks.size() - i;\n if (indexToDelete >= 0 && indexToDelete < sortedChunks.size()) {\n Chunk cc = sortedChunks.get(indexToDelete);\n _chunkCache.remove(Helper.getInstance().cantorize((int) cc.getPosition().x, (int) cc.getPosition().z));\n }\n }\n Logger.getLogger(this.getClass().getName()).log(Level.INFO, \"String_Node_Str\");\n }\n }\n ArrayList<Generator> gs = new ArrayList<Generator>();\n gs.add(_generatorTerrain);\n gs.add(_generatorForest);\n c = new Chunk(this, new Vector3f(x, 0, z), gs);\n synchronized (_chunkCache) {\n _chunkCache.put(Helper.getInstance().cantorize(x, z), c);\n }\n return c;\n}\n"
|
"public LocalMapStatsImpl getLocalMapStats(String name) {\n final CMap cmap = getMap(name);\n if (cmap == null) {\n return new LocalMapStatsImpl();\n }\n return cmap.getLocalMapStats();\n}\n"
|
"public void testReferencingFields_JreferingToG() {\n runConformTest(new String[] { \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" }, \"String_Node_Str\");\n}\n"
|
"public Object runCommand() throws PlatformLayerClientException, JSONException, IOException {\n PlatformLayerClient client = getPlatformLayerClient();\n if (stdin) {\n if (value != null) {\n throw new CliException(\"String_Node_Str\");\n }\n InputStream stream = new NoCloseInputStream(System.in);\n byte[] data = IoUtils.readAllBinary(stream);\n if (\"String_Node_Str\".equals(format)) {\n value = CryptoUtils.toBase64(data);\n } else {\n throw new CliException(\"String_Node_Str\" + format);\n }\n } else {\n throw new CliException(\"String_Node_Str\");\n }\n PlatformLayerKey resolved = path.resolve(getContext());\n UntypedItem item = client.getItemUntyped(resolved);\n Element element = item.getRoot();\n List<String> tokens = Lists.newArrayList(Splitter.on(\"String_Node_Str\").split(key));\n for (int i = 0; i < tokens.size(); i++) {\n String token = tokens.get(i);\n Node child = XmlHelper.getChildElement(element, token);\n if (child == null) {\n if (i == tokens.size() - 1) {\n child = element.getOwnerDocument().createElement(token);\n element.appendChild(child);\n } else {\n throw new CliException(\"String_Node_Str\" + token);\n }\n }\n element = (Element) child;\n }\n element.setTextContent(value);\n String xml = item.serialize();\n UntypedItem updated = client.putItem(resolved, xml, Format.XML);\n return updated;\n}\n"
|
"public Void call() throws Exception {\n LOG.debug(\"String_Node_Str\", hostPort, destination);\n try {\n while (true) {\n ByteBuffer buf = requests.take();\n channel.writeAndFlush(Unpooled.wrappedBuffer(buf));\n }\n } catch (InterruptedException ex) {\n LOG.debug(\"String_Node_Str\", destination);\n return null;\n } catch (Exception ex) {\n LOG.warn(\"String_Node_Str\", ex);\n throw ex;\n } finally {\n channel.close().syncUninterruptibly();\n }\n}\n"
|
"public void update(float deltaTime) {\n int len;\n List<TouchEvent> touchEvents = game.getInput().getTouchEvents();\n List<KeyEvent> keyEvents = game.getInput().getKeyEvents();\n len = keyEvents.size();\n for (int i = 0; i < len; i++) {\n KeyEvent kevent = keyEvents.get(i);\n if (kevent.keyCode == android.view.KeyEvent.KEYCODE_BACK && kevent.type == KeyEvent.KEY_UP)\n game.setScreen(new MainMenuScreen(game));\n }\n Graphics g = game.getGraphics();\n len = touchEvents.size();\n for (int i = 0; i < len; i++) {\n TouchEvent event = touchEvents.get(i);\n if (event.type == TouchEvent.TOUCH_UP) {\n if (event.x > g.getWidth() - Assets.BUTTON_WIDTH && event.y > g.getHeight() - Assets.BUTTON_HEIGHT) {\n screenNumber++;\n if (screenNumber > 3) {\n game.setScreen(new MainMenuScreen(game));\n }\n if (Settings.soundEnabled)\n Assets.click.play(1);\n return;\n }\n if (event.x < Assets.BUTTON_WIDTH && event.y > g.getHeight() - Assets.BUTTON_HEIGHT) {\n screenNumber--;\n if (screenNumber < 1) {\n game.setScreen(new MainMenuScreen(game));\n }\n if (Settings.soundEnabled)\n Assets.click.play(1);\n return;\n }\n }\n }\n}\n"
|
"public void doInput() {\n if (activePlayer == null) {\n return;\n }\n if (Mouse.isGrabbed()) {\n Transform ts = activePlayer.getTransform().getTransform();\n float pitch = ts.getRotation().getPitch();\n float yaw = ts.getRotation().getYaw();\n float mouseDX = -Mouse.getDX() * 0.16f;\n float mouseDY = Mouse.getDY() * 0.16f;\n if (yaw + mouseDX >= 360)\n yaw += mouseDX - 360;\n else if (yaw + mouseDX < 0)\n yaw += mouseDX + 360;\n else\n yaw += mouseDX;\n if (pitch + mouseDY >= -80 && pitch + mouseDY <= 80)\n pitch += mouseDY;\n else if (pitch + mouseDY < -80)\n pitch = -80;\n else if (pitch + mouseDY > 80)\n pitch = 80;\n ts.setRotation(MathHelper.rotation(pitch, yaw, ts.getRotation().getRoll()));\n activePlayer.getTransform().setTransform(ts);\n }\n boolean keyUp = Keyboard.isKeyDown(Keyboard.KEY_UP) || Keyboard.isKeyDown(Keyboard.KEY_Z);\n boolean keyDown = Keyboard.isKeyDown(Keyboard.KEY_DOWN) || Keyboard.isKeyDown(Keyboard.KEY_S);\n boolean keyLeft = Keyboard.isKeyDown(Keyboard.KEY_LEFT) || Keyboard.isKeyDown(Keyboard.KEY_Q);\n boolean keyRight = Keyboard.isKeyDown(Keyboard.KEY_RIGHT) || Keyboard.isKeyDown(Keyboard.KEY_D);\n boolean flyUp = Keyboard.isKeyDown(Keyboard.KEY_SPACE);\n boolean flyDown = Keyboard.isKeyDown(Keyboard.KEY_LSHIFT);\n Point point = new Point(Point.ONE, activePlayer.getWorld());\n if (keyUp) {\n point = point.multiply(activePlayer.getTransform().getTransform().forwardVector());\n }\n if (keyDown && !keyUp && !keyLeft && !keyRight) {\n activePlayer.getTransform().setPosition(activePlayer.getTransform().getPosition().subtract(activePlayer.getTransform().getTransform().forwardVector()));\n }\n if (keyLeft && !keyRight && !keyUp && !keyDown) {\n activePlayer.getTransform().setPosition(activePlayer.getTransform().getPosition().add(activePlayer.getTransform().getTransform().rightVector()));\n }\n if (keyRight && !keyLeft && !keyUp && !keyDown) {\n activePlayer.getTransform().setPosition(activePlayer.getTransform().getPosition().subtract(activePlayer.getTransform().getTransform().rightVector()));\n }\n}\n"
|
"public Object toMongoObject(final Object javaObj) {\n if (javaObj == null) {\n return null;\n }\n Class origClass = javaObj.getClass();\n Object newObj = converters.encode(origClass, javaObj);\n if (newObj == null) {\n logger.warning(\"String_Node_Str\" + javaObj + \"String_Node_Str\");\n return newObj;\n }\n Class type = newObj.getClass();\n boolean bSameType = origClass.equals(type);\n if (!bSameType)\n return newObj;\n else {\n boolean isSingleValue = true;\n boolean isMap = false;\n Class subType = null;\n if (type.isArray() || ReflectionUtils.implementsAnyInterface(type, Iterable.class, Map.class)) {\n isSingleValue = false;\n isMap = ReflectionUtils.implementsInterface(type, Map.class);\n subType = (type.isArray()) ? type.getComponentType() : ReflectionUtils.getParameterizedClass(type, (isMap) ? 1 : 0);\n }\n if (isSingleValue && !ReflectionUtils.isPropertyType(type)) {\n DBObject dbObj = toDBObject(newObj);\n if (!includeClassName)\n dbObj.removeField(CLASS_NAME_FIELDNAME);\n return dbObj;\n } else if (newObj instanceof DBObject) {\n return newObj;\n } else if (isMap) {\n if (ReflectionUtils.isPropertyType(subType))\n return toDBObject(newObj);\n else {\n HashMap m = new HashMap();\n for (Map.Entry e : (Iterable<Map.Entry>) ((Map) newObj).entrySet()) m.put(e.getKey(), toMongoObject(e.getValue()));\n return toDBObject(m);\n }\n } else if (!isSingleValue && !ReflectionUtils.isPropertyType(subType)) {\n ArrayList<Object> vals = new ArrayList<Object>();\n if (type.isArray())\n for (Object obj : (Object[]) newObj) vals.add(toMongoObject(obj));\n else\n for (Object obj : (Iterable) newObj) vals.add(toMongoObject(obj));\n return vals;\n } else {\n return newObj;\n }\n }\n}\n"
|
"boolean isTerminalMatched(Character charToMatch) {\n if (terminalChar == null && charToMatch == null) {\n return true;\n }\n return terminalChar != null && charToMatch != null && terminalChar.equals(charToMatch);\n}\n"
|
"private Map<InetSocketAddress, StatsResult> getStats0(InetSocketAddress target, String item) throws InterruptedException {\n Set<String> groups = this.remotingClient.getGroupSet();\n if (groups == null || groups.size() <= 1) {\n return Collections.emptyMap();\n }\n Map<InetSocketAddress, StatsResult> rt = new HashMap<InetSocketAddress, StatsResult>();\n try {\n for (String group : groups) {\n if (!group.equals(Constants.DEFAULT_GROUP)) {\n URI uri = new URI(group);\n InetSocketAddress sockAddr = new InetSocketAddress(uri.getHost(), uri.getPort());\n if (target == null || target.equals(sockAddr)) {\n BooleanCommand resp = (BooleanCommand) remotingClient.invokeToGroup(group, new StatsCommand(OpaqueGenerator.getNextOpaque(), item), STATS_OPTIMEOUT, TimeUnit.MILLISECONDS);\n if (resp.getResponseStatus() == ResponseStatus.NO_ERROR) {\n String body = resp.getErrorMsg();\n if (body != null) {\n parseStatsValues(sockAddr, rt, group, body);\n }\n }\n }\n }\n }\n return rt;\n } catch (InterruptedException e) {\n throw e;\n } catch (Exception e) {\n throw new IllegalStateException(\"String_Node_Str\", e);\n }\n}\n"
|
"public final Or_expressionContext or_expression() throws RecognitionException {\n Or_expressionContext _localctx = new Or_expressionContext(_ctx, getState());\n enterRule(_localctx, 54, RULE_or_expression);\n int _la;\n try {\n enterOuterAlt(_localctx, 1);\n {\n setState(269);\n and_expression();\n setState(272);\n _la = _input.LA(1);\n if (_la == 48) {\n {\n setState(270);\n match(47);\n setState(271);\n or_expression();\n }\n }\n }\n } catch (RecognitionException re) {\n _localctx.exception = re;\n _errHandler.reportError(this, re);\n _errHandler.recover(this, re);\n } finally {\n exitRule();\n }\n return _localctx;\n}\n"
|
"protected String[][] walkTokens() throws IOException {\n List<String> wordList = new ArrayList<>();\n List<String> posList = new ArrayList<>();\n while (input.incrementToken()) {\n CharTermAttribute textAtt = input.getAttribute(CharTermAttribute.class);\n OffsetAttribute offsetAtt = input.getAttribute(OffsetAttribute.class);\n char[] buffer = textAtt.buffer();\n String word = null;\n try {\n word = new String(buffer, 0, offsetAtt.endOffset() - offsetAtt.startOffset());\n } catch (StringIndexOutOfBoundsException ioe) {\n LOG.error(ioe.toString());\n word = ((PackedTokenAttributeImpl) offsetAtt).toString();\n }\n wordList.add(word);\n PayloadAttribute posAtt = input.getAttribute(PayloadAttribute.class);\n if (posAtt != null) {\n posList.add(new SentenceContext(posAtt.getPayload().utf8ToString()).getPosTag());\n }\n AttributeSource attrs = input.cloneAttributes();\n tokenAttrs.add(attrs);\n }\n if (wordList.size() != posList.size()) {\n StringBuilder sb = new StringBuilder(this.getClass().getName());\n sb.append(\"String_Node_Str\").append(wordList.size()).append(\"String_Node_Str\").append(posList.size()).append(\"String_Node_Str\").append(\"String_Node_Str\");\n throw new IOException(sb.toString());\n }\n String[] words = new String[wordList.size()];\n String[] pos = new String[posList.size()];\n for (int i = 0; i < words.length; i++) {\n words[i] = wordList.get(i);\n pos[i] = posList.get(i);\n }\n clearAttributes();\n return new String[][] { words, pos };\n}\n"
|
"private boolean isInitFailureHandler(InstructionHandle ih) {\n InstructionHandle twoInstructionsAway = ih.getNext().getNext();\n if (twoInstructionsAway.getInstruction() instanceof PUTSTATIC) {\n String name = ((PUTSTATIC) twoInstructionsAway.getInstruction()).getFieldName(cpg);\n if (name.equals(NameMangler.INITFAILURECAUSE_FIELD_NAME))\n return true;\n }\n return false;\n}\n"
|
"public static void displayStatus(CommandContext args, Player player, HumanNPC npc) {\n player.sendMessage(ChatColor.AQUA + StringUtils.listify(ChatColor.GREEN + npc.getStrippedName() + \"String_Node_Str\" + ChatColor.AQUA));\n WizardNPC wizard = npc.getToggleable(\"String_Node_Str\");\n player.sendMessage(ChatColor.AQUA + \"String_Node_Str\" + ChatColor.GOLD + wizard.getMode());\n player.sendMessage(ChatColor.AQUA + \"String_Node_Str\" + ChatColor.GOLD + wizard.getMana());\n}\n"
|
"public void buildTableStyle(ITableContent table, StringBuffer styleBuffer) {\n addDefaultTableStyles(styleBuffer);\n IStyle style = table.getStyle();\n CSSValue display = style.getProperty(IStyle.STYLE_DISPLAY);\n if (IStyle.NONE_VALUE == display) {\n styleBuffer.append(\"String_Node_Str\");\n } else if (IStyle.INLINE_VALUE == display || IStyle.INLINE_BLOCK_VALUE == display) {\n styleBuffer.append(\"String_Node_Str\");\n }\n DimensionType height = table.getHeight();\n if (null != height) {\n buildSize(styleBuffer, HTMLTags.ATTR_HEIGHT, height);\n }\n DimensionType width = table.getWidth();\n if (null != width) {\n buildSize(styleBuffer, HTMLTags.ATTR_WIDTH, width);\n } else {\n if (!\"String_Node_Str\".equalsIgnoreCase(style.getCanShrink())) {\n styleBuffer.append(\"String_Node_Str\");\n }\n }\n if (HTMLRenderOption.LAYOUT_PREFERENCE_FIXED.equals(layoutPreference)) {\n if (!\"String_Node_Str\".equalsIgnoreCase(style.getCanShrink())) {\n styleBuffer.append(\"String_Node_Str\");\n }\n }\n style = getElementStyle(table);\n if (style == null) {\n return;\n }\n AttributeBuilder.buildFont(styleBuffer, style);\n AttributeBuilder.buildBox(styleBuffer, style);\n AttributeBuilder.buildBackground(styleBuffer, style, reportEmitter);\n AttributeBuilder.buildText(styleBuffer, style);\n AttributeBuilder.buildVisual(styleBuffer, style);\n}\n"
|
"protected void deleteTable(TableNode tableItem) {\n Collection<MetadataTable> tables = new ArrayList<MetadataTable>();\n Iterator<MetadataTable> iterate = ConnectionHelper.getTables(getConnection()).iterator();\n while (iterate.hasNext()) {\n MetadataTable metadata = iterate.next();\n if (metadata != null && metadata.getLabel().equals(tableItem.getValue())) {\n tables.add(metadata);\n }\n }\n TableNode parent = tableItem.getParent();\n String catalog = \"String_Node_Str\";\n String schema = \"String_Node_Str\";\n if (parent != null) {\n if (parent.getType() == TableNode.CATALOG) {\n catalog = parent.getValue();\n } else if (parent.getType() == TableNode.SCHEMA) {\n schema = parent.getValue();\n TableNode catalogNode = parent.getParent();\n if (catalogNode != null) {\n catalog = catalogNode.getValue();\n }\n }\n }\n boolean isAccess = EDatabaseTypeName.ACCESS.getDisplayName().equals(metadataconnection.getDbType());\n if (isAccess) {\n ProjectNodeHelper.removeTablesFromCurrentCatalogOrSchema(catalog, getConnection().getName(), getConnection(), tables);\n } else {\n ProjectNodeHelper.removeTablesFromCurrentCatalogOrSchema(catalog, schema, getConnection(), tables);\n }\n}\n"
|
"public void onRender(IOnRenderEvent event) throws BirtException {\n DesignElementHandle modelHandle = event.getHandle();\n if (!(modelHandle instanceof ExtendedItemHandle)) {\n return;\n }\n CrosstabReportItemHandle crosstab = (CrosstabReportItemHandle) ((ExtendedItemHandle) modelHandle).getReportItem();\n IReportEventContext context = event.getContext();\n CrosstabRenderingHandler handler = new CrosstabRenderingHandler((ExtendedItemHandle) modelHandle, context.getApplicationClassLoader());\n handler.handleCrosstab(crosstab, (ITableContent) event.getContent(), context, RunningState.RENDER);\n}\n"
|
"public void testBasic() throws Exception {\n ICubeQueryDefinition cqd = new CubeQueryDefinition(cubeName);\n IEdgeDefinition columnEdge = cqd.createEdge(ICubeQueryDefinition.COLUMN_EDGE);\n IEdgeDefinition rowEdge = cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);\n IDimensionDefinition dim1 = columnEdge.createDimension(\"String_Node_Str\");\n IHierarchyDefinition hier1 = dim1.createHierarchy(\"String_Node_Str\");\n hier1.createLevel(\"String_Node_Str\");\n hier1.createLevel(\"String_Node_Str\");\n hier1.createLevel(\"String_Node_Str\");\n IDimensionDefinition dim2 = rowEdge.createDimension(\"String_Node_Str\");\n IHierarchyDefinition hier2 = dim2.createHierarchy(\"String_Node_Str\");\n hier2.createLevel(\"String_Node_Str\");\n cqd.createMeasure(\"String_Node_Str\");\n IBinding binding1 = new Binding(\"String_Node_Str\");\n binding1.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding1);\n IBinding binding2 = new Binding(\"String_Node_Str\");\n binding2.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding2);\n IBinding binding3 = new Binding(\"String_Node_Str\");\n binding3.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding3);\n IBinding binding4 = new Binding(\"String_Node_Str\");\n binding4.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding4);\n IBinding binding5 = new Binding(\"String_Node_Str\");\n binding5.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding5);\n DataEngineImpl engine = (DataEngineImpl) DataEngine.newDataEngine(DataEngineContext.newInstance(DataEngineContext.DIRECT_PRESENTATION, null, null, null));\n this.createCube(engine);\n IPreparedCubeQuery pcq = engine.prepare(cqd, null);\n ICubeQueryResults queryResults = pcq.execute(null);\n CubeCursor cursor = queryResults.getCubeCursor();\n List columnEdgeBindingNames = new ArrayList();\n columnEdgeBindingNames.add(\"String_Node_Str\");\n columnEdgeBindingNames.add(\"String_Node_Str\");\n columnEdgeBindingNames.add(\"String_Node_Str\");\n this.printCube(cursor, columnEdgeBindingNames, \"String_Node_Str\", \"String_Node_Str\");\n}\n"
|
"public String getPlainText() {\n return OSISUtil.getPlainText(getOsis());\n}\n"
|
"public Set<Integer> getAllPickingIDs() {\n Set<Integer> set = new HashSet<Integer>();\n for (EPickingType type : hashTypeToPickingIDToExternalID.keySet()) {\n set.addAll(hashTypeToPickingIDToExternalID.get(type).keySet());\n }\n return set;\n}\n"
|
"private void createInstanceAndStartDependency(Application application) throws TopologyInConsistentException, PolicyValidationException {\n List<String> instanceIds = new ArrayList<String>();\n DeploymentPolicy deploymentPolicy = getDeploymentPolicy(application);\n String instanceId;\n for (PartitionGroup partitionGroup : deploymentPolicy.getPartitionGroups()) {\n instanceId = createApplicationInstance(application, partitionGroup.getId());\n ParentComponentLevelNetworkPartitionContext context = new ParentComponentLevelNetworkPartitionContext(partitionGroup.getId(), partitionGroup.getPartitionAlgo(), partitionGroup.getPartitions());\n context.addInstanceContext(application.getInstanceContexts(instanceId));\n this.addNetworkPartitionContext(context);\n instanceIds.add(instanceId);\n }\n startDependency(application, instanceIds);\n}\n"
|
"public void generatin_level_two_sets_from_one_level_sets() {\n Integer support = 0;\n String dataString = \"String_Node_Str\";\n char vector = 49152;\n BinaryItemSet set1 = new BinaryItemSet(new char[] { vector });\n vector = 40960;\n BinaryItemSet set2 = new BinaryItemSet(new char[] { vector });\n vector = 24576;\n BinaryItemSet set3 = new BinaryItemSet(new char[] { vector });\n expecetCandidates.add(set1);\n expecetCandidates.add(set2);\n expecetCandidates.add(set3);\n DataRepresentationBase data = getDataFromString(dataString);\n frequentSupportMap = engine.getSingleCandidateSets(data, support);\n Set<BinaryItemSet> result = engine.getCandidateSets(frequentSupportMap.keySet(), 1);\n Assert.assertTrue(expecetCandidates.equals(result));\n}\n"
|
"public void testByteBufferDirectByteBufferMap() throws ExecutionException, InterruptedException, IOException {\n if (typeOfMap == TypeOfMap.STATELESS)\n return;\n ChronicleMapBuilder<ByteBuffer, ByteBuffer> builder = ChronicleMapBuilder.of(ByteBuffer.class, ByteBuffer.class).averageKeySize(5).averageValueSize(5).entries(1000);\n try (ChronicleMap<ByteBuffer, ByteBuffer> map = newInstance(builder)) {\n ByteBuffer key1 = ByteBuffer.wrap(new byte[] { 1, 1, 1, 1 });\n ByteBuffer key2 = ByteBuffer.wrap(new byte[] { 2, 2, 2, 2 });\n ByteBuffer value1 = ByteBuffer.allocateDirect(4);\n value1.put(new byte[] { 11, 11, 11, 11 });\n value1.flip();\n ByteBuffer value2 = ByteBuffer.allocateDirect(4);\n value2.put(new byte[] { 22, 22, 22, 22 });\n value2.flip();\n assertNull(map.put(key1, value1));\n assertBBEquals(value1, map.put(key1, value2));\n assertBBEquals(value2, map.get(key1));\n assertNull(map.get(key2));\n map.put(key1, value1);\n mapChecks();\n final SerializableFunction<ByteBuffer, ByteBuffer> function = s -> {\n ByteBuffer slice = s.slice();\n slice.limit(2);\n return slice;\n };\n assertBBEquals(ByteBuffer.wrap(new byte[] { 11, 11 }), map.getMapped(key1, function));\n assertEquals(null, map.getMapped(key2, function));\n mapChecks();\n assertBBEquals(ByteBuffer.wrap(new byte[] { 12, 10 }), map.putMapped(key1, new UnaryOperator<ByteBuffer>() {\n public ByteBuffer update(ByteBuffer s) {\n s.put(0, (byte) (s.get(0) + 1));\n s.put(1, (byte) (s.get(1) - 1));\n return function.apply(s);\n }\n }));\n assertBBEquals(ByteBuffer.wrap(new byte[] { 12, 10 }), map.get(key1));\n mapChecks();\n }\n}\n"
|
"public static String generateTAPTestResultDescription(ITestResult testResult) {\n StringBuilder description = new StringBuilder();\n description.append(\"String_Node_Str\");\n description.append(testResult.getTestClass().getName());\n description.append(':');\n description.append(testResult.getMethod().getMethodName());\n return description.toString();\n}\n"
|
"public void run() {\n refreshSummary(stats);\n}\n"
|
"public void execute(AdminCommandContext context) {\n report = context.getActionReport();\n report.setActionExitCode(ActionReport.ExitCode.SUCCESS);\n boolean isCluster = tgt.isCluster(target);\n if (logger.isLoggable(Level.FINE)) {\n logger.fine(\"String_Node_Str\" + target);\n }\n if (config != null && lbname != null) {\n String msg = localStrings.getLocalString(\"String_Node_Str\", \"String_Node_Str\");\n report.setActionExitCode(ActionReport.ExitCode.FAILURE);\n report.setMessage(msg);\n return;\n }\n if (config == null && lbname == null) {\n String msg = localStrings.getLocalString(\"String_Node_Str\", \"String_Node_Str\");\n report.setActionExitCode(ActionReport.ExitCode.FAILURE);\n report.setMessage(msg);\n return;\n }\n LbConfigs lbconfigs = domain.getExtensionByType(LbConfigs.class);\n if (lbconfigs == null) {\n String msg = localStrings.getLocalString(\"String_Node_Str\", \"String_Node_Str\");\n report.setActionExitCode(ActionReport.ExitCode.FAILURE);\n report.setMessage(msg);\n return;\n }\n if (config != null) {\n if (lbconfigs.getLbConfig(config) == null) {\n String msg = localStrings.getLocalString(\"String_Node_Str\", \"String_Node_Str\", config);\n report.setActionExitCode(ActionReport.ExitCode.FAILURE);\n report.setMessage(msg);\n return;\n }\n } else if (lbname != null) {\n LoadBalancers lbs = domain.getExtensionByType(LoadBalancers.class);\n if (lbs == null) {\n String msg = localStrings.getLocalString(\"String_Node_Str\", \"String_Node_Str\");\n report.setActionExitCode(ActionReport.ExitCode.FAILURE);\n report.setMessage(msg);\n return;\n }\n LoadBalancer lb = lbs.getLoadBalancer(lbname);\n if (lb == null) {\n String msg = localStrings.getLocalString(\"String_Node_Str\", \"String_Node_Str\", lbname);\n report.setActionExitCode(ActionReport.ExitCode.FAILURE);\n report.setMessage(msg);\n return;\n }\n config = lb.getLbConfigName();\n }\n if (isCluster) {\n deleteClusterFromLBConfig(lbconfigs, config, target);\n String msg = localStrings.getLocalString(\"String_Node_Str\", \"String_Node_Str\", target, config);\n logger.info(msg);\n } else if (domain.isServer(target)) {\n deleteServerFromLBConfig(lbconfigs, config, target);\n String msg = localStrings.getLocalString(\"String_Node_Str\", \"String_Node_Str\", target, config);\n logger.info(msg);\n } else {\n String msg = localStrings.getLocalString(\"String_Node_Str\", \"String_Node_Str\", target);\n report.setActionExitCode(ActionReport.ExitCode.FAILURE);\n report.setMessage(msg);\n return;\n }\n}\n"
|
"protected void addResourceCombo(XMLComponentDefinition componentDefintion, FormLayout formLayout, final Component component) {\n if (componentDefintion == null) {\n log.error(\"String_Node_Str\" + component.getName() + \"String_Node_Str\" + component.getType());\n } else {\n IConfigurationService configurationService = context.getConfigurationService();\n FlowStep step = getSingleFlowStep();\n if (componentDefintion.getResourceCategory() != null && componentDefintion.getResourceCategory() != ResourceCategory.NONE && step != null) {\n final AbstractSelect resourcesCombo = new ComboBox(\"String_Node_Str\");\n resourcesCombo.setImmediate(true);\n String projectVersionId = step.getComponent().getProjectVersionId();\n Set<XMLResourceDefinition> types = context.getDefinitionFactory().getResourceDefinitions(projectVersionId, componentDefintion.getResourceCategory());\n if (types != null) {\n String[] typeStrings = new String[types.size()];\n int i = 0;\n for (XMLResourceDefinition type : types) {\n typeStrings[i++] = type.getId();\n }\n List<Resource> resources = new ArrayList<>(configurationService.findResourcesByTypes(projectVersionId, typeStrings));\n List<ProjectVersionDependency> dependencies = configurationService.findProjectDependencies(projectVersionId);\n for (ProjectVersionDependency projectVersionDependency : dependencies) {\n resources.addAll(configurationService.findResourcesByTypes(projectVersionDependency.getTargetProjectVersionId(), typeStrings));\n }\n if (resources != null) {\n for (Resource resource : resources) {\n resourcesCombo.addItem(resource);\n }\n resourcesCombo.setValue(component.getResource());\n }\n }\n resourcesCombo.addValueChangeListener(new ValueChangeListener() {\n private static final long serialVersionUID = 1L;\n public void valueChange(ValueChangeEvent event) {\n component.setResource((Resource) resourcesCombo.getValue());\n context.getConfigurationService().save(component);\n }\n });\n formLayout.addComponent(resourcesCombo);\n }\n }\n}\n"
|
"public void messageReceived(SQLMapperResultRequest request, TransportChannel channel) throws Exception {\n SQLReduceJobStatus status = request.status;\n long now = 0;\n if (logger.isTraceEnabled()) {\n logger.trace(\"String_Node_Str\", clusterService.localNode().getId(), request.contextId);\n now = new Date().getTime();\n }\n status.merge(request.groupByResult);\n if (logger.isTraceEnabled()) {\n logger.trace(\"String_Node_Str\", clusterService.localNode().getId(), request.contextId, (new Date().getTime() - now), status.groupByResult != null ? status.groupByResult.size() : 0);\n }\n status.shardsToProcess.countDown();\n if (logger.isTraceEnabled()) {\n logger.trace(\"String_Node_Str\", clusterService.localNode().getId(), request.contextId, status.shardsToProcess.getCount());\n }\n channel.sendResponse(TransportResponse.Empty.INSTANCE);\n}\n"
|
"public void startRequest(MRCRequest rq) throws Throwable {\n final closeRequest rqArgs = (closeRequest) rq.getRequestArgs();\n Capability cap = new Capability(rqArgs.getWrite_xcap(), master.getConfig().getCapabilitySecret());\n if (!cap.hasValidSignature())\n throw new UserException(ErrNo.EPERM, cap + \"String_Node_Str\");\n if (cap.hasExpired())\n throw new UserException(ErrNo.EPERM, cap + \"String_Node_Str\");\n if (cap.getXCap().getReplicateOnClose()) {\n GlobalFileIdResolver idRes = new GlobalFileIdResolver(cap.getFileId());\n StorageManager sMan = master.getVolumeManager().getStorageManager(idRes.getVolumeId());\n VolumeInfo vol = sMan.getVolumeInfo();\n AtomicDBUpdate update = sMan.createAtomicDBUpdate(master, rq);\n FileMetadata file = sMan.getMetadata(idRes.getLocalFileId());\n if (file == null)\n throw new UserException(ErrNo.ENOENT, \"String_Node_Str\" + cap.getFileId() + \"String_Node_Str\");\n file.setReadOnly(true);\n Logging.logMessage(Logging.LEVEL_DEBUG, Category.proc, this, \"String_Node_Str\");\n Logging.logMessage(Logging.LEVEL_DEBUG, Category.replication, this, \"String_Node_Str\");\n XLocList xLocList = file.getXLocList();\n int replFactor = vol.getAutoReplFactor();\n if (replFactor > xLocList.getReplicaCount()) {\n List<XLoc> repls = new ArrayList<XLoc>();\n for (int i = 0; i < xLocList.getReplicaCount(); i++) repls.add(xLocList.getReplica(i));\n int newVer = xLocList.getVersion() + 1;\n XLoc firstRepl = repls.get(0);\n firstRepl.setReplicationFlags(ReplicationFlags.setReplicaIsComplete(firstRepl.getReplicationFlags()));\n try {\n for (int i = 0; i < replFactor - initialReplCount; i++) {\n int replFlags = ReplicationFlags.setRandomStrategy(0);\n if (vol.getAutoReplFull())\n replFlags = ReplicationFlags.setFullReplica(replFlags);\n Replica newRepl = MRCHelper.createReplica(firstRepl.getStripingPolicy(), sMan, master.getOSDStatusManager(), vol, -1, cap.getFileId(), ((InetSocketAddress) rq.getRPCRequest().getClientIdentity()).getAddress(), xLocList, replFlags);\n String[] osds = newRepl.getOsd_uuids().toArray(new String[newRepl.getOsd_uuids().size()]);\n repls.add(sMan.createXLoc(firstRepl.getStripingPolicy(), osds, newRepl.getReplication_flags()));\n xLocList = sMan.createXLocList(repls.toArray(new XLoc[repls.size()]), Constants.REPL_UPDATE_PC_RONLY, newVer);\n }\n } catch (Exception exc) {\n Logging.logMessage(Logging.LEVEL_WARN, Category.replication, this, \"String_Node_Str\", file.getId());\n Logging.logMessage(Logging.LEVEL_WARN, Category.replication, this, OutputUtils.stackTraceToString(exc));\n }\n file.setXLocList(xLocList);\n }\n sMan.setMetadata(file, FileMetadata.RC_METADATA, update);\n Logging.logMessage(Logging.LEVEL_DEBUG, Category.replication, this, \"String_Node_Str\", vol.getAutoReplFactor() - 1);\n XLocSet xLocSet = Converter.xLocListToXLocSet(xLocList);\n xLocSet.setRead_only_file_size(file.getSize());\n rq.getDetails().context = new HashMap<String, Object>();\n rq.getDetails().context.put(\"String_Node_Str\", xLocSet);\n master.getOnCloseReplicationThread().enqueueRequest(rq);\n rq.setResponse(new closeResponse());\n update.execute();\n } else {\n rq.setResponse(new closeResponse());\n Logging.logMessage(Logging.LEVEL_WARN, this, \"String_Node_Str\", cap.toString());\n finishRequest(rq);\n }\n}\n"
|
"private void processLevel(final int currentLevel) {\n final int fromLayerIndex = this.layerIndex[currentLevel + 1];\n final int toLayerIndex = this.layerIndex[currentLevel];\n final int fromLayerSize = this.layerCounts[currentLevel + 1];\n final int toLayerSize = this.layerFeedCounts[currentLevel];\n double dropoutRate = 0;\n if (this.layerDropoutRates.length > currentLevel && this.layerDropoutRates[currentLevel] != 0) {\n dropoutRate = this.layerDropoutRates[currentLevel];\n }\n final int index = this.weightIndex[currentLevel];\n final ActivationFunction activation = this.getNetwork().getActivationFunctions()[currentLevel + 1];\n final double currentFlatSpot = this.flatSpot[currentLevel + 1];\n int yi = fromLayerIndex;\n for (int y = 0; y < fromLayerSize; y++) {\n final double output = this.layerOutput[yi];\n double sum = 0;\n int xi = toLayerIndex;\n int wi = index + y;\n if (this.owner.isELM() || dropoutRate == 0d || dropoutRandomSource.nextDouble() > dropoutRate) {\n int xi = toLayerIndex;\n for (int x = 0; x < toLayerSize; x++) {\n if (this.owner.isELM() && currentLevel == 0) {\n this.gradients[wi] = 0d;\n } else {\n this.gradients[wi] += output * this.getLayerDelta()[xi];\n }\n sum += this.weights[wi] * this.getLayerDelta()[xi];\n wi += fromLayerSize;\n xi++;\n }\n sum += this.weights[wi] * this.getLayerDelta()[xi];\n wi += fromLayerSize;\n xi++;\n }\n if (dropoutRate == 0d || dropoutRandomSource.nextDouble() > dropoutRate) {\n this.getLayerDelta()[yi] = sum * (activation.derivativeFunction(this.layerSums[yi], this.layerOutput[yi]) + currentFlatSpot);\n } else {\n this.getLayerDelta()[yi] = 0;\n }\n yi++;\n }\n}\n"
|
"public synchronized TmfEvent getNextEvent(TmfContext context) {\n if (!(context instanceof TmfExperimentContext)) {\n return null;\n }\n if (!context.equals(fExperimentContext)) {\n fExperimentContext = seekLocation(context.getLocation());\n }\n TmfExperimentContext expContext = (TmfExperimentContext) context;\n int lastTrace = expContext.getLastTrace();\n if (lastTrace != TmfExperimentContext.NO_TRACE) {\n TmfContext traceContext = expContext.getContexts()[lastTrace];\n expContext.getEvents()[lastTrace] = expContext.getTraces()[lastTrace].getNextEvent(traceContext);\n expContext.setLastTrace(TmfExperimentContext.NO_TRACE);\n }\n TmfEvent[] eventArray = expContext.getEvents();\n if (eventArray == null) {\n return null;\n }\n int trace = TmfExperimentContext.NO_TRACE;\n TmfTimestamp timestamp = TmfTimestamp.BigCrunch;\n if (eventArray.length == 1) {\n if (eventArray[0] != null) {\n timestamp = eventArray[0].getTimestamp();\n trace = 0;\n }\n } else {\n for (int i = 0; i < eventArray.length; i++) {\n TmfEvent event = eventArray[i];\n if (event != null && event.getTimestamp() != null) {\n TmfTimestamp otherTS = event.getTimestamp();\n if (otherTS.compareTo(timestamp, true) < 0) {\n trace = i;\n timestamp = otherTS;\n }\n }\n }\n }\n TmfEvent event = null;\n if (trace != TmfExperimentContext.NO_TRACE) {\n updateIndex(expContext, timestamp);\n TmfContext traceContext = expContext.getContexts()[trace];\n TmfExperimentLocation expLocation = (TmfExperimentLocation) expContext.getLocation();\n expLocation.getLocation().locations[trace] = traceContext.getLocation().clone();\n expLocation.getRanks()[trace] = traceContext.getRank();\n expContext.setLastTrace(trace);\n expContext.updateRank(1);\n event = expContext.getEvents()[trace];\n fExperimentContext = expContext;\n }\n return event;\n}\n"
|
"public IMessage onMessage(MessagePresentConnect message, MessageContext ctx) {\n TileEntity te = message.getTileEntity(ctx);\n if (te instanceof TileEntityPresent) {\n if (message.connect) {\n ((TileEntityPresent) te).connectTo(message.dir);\n } else {\n ((TileEntityPresent) te).disconnect(message.preserveDir);\n }\n }\n return null;\n}\n"
|
"public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) {\n if (TileEntityFurnace.isItemFuel(stack) || stack.getItem() instanceof IItemEmc)\n return super.insertItem(slot, stack, simulate);\n else\n return stack;\n}\n"
|
"public PluginBundle loadPluginsFromEclipseProject(Path projectRoot) throws PluginException {\n try {\n if (!Files.isDirectory(projectRoot)) {\n throw new PluginException(\"String_Node_Str\" + projectRoot.toString());\n }\n final Path pluginFolder = projectRoot.resolve(\"String_Node_Str\");\n if (!Files.isDirectory(pluginFolder)) {\n throw new PluginException(\"String_Node_Str\" + projectRoot.toString());\n }\n Path pluginFile = pluginFolder.resolve(\"String_Node_Str\");\n if (!Files.exists(pluginFile)) {\n throw new PluginException(\"String_Node_Str\" + pluginFolder.toString());\n }\n PluginDescriptor pluginDescriptor = getPluginDescriptor(Files.newInputStream(pluginFile));\n Path pomFile = projectRoot.resolve(\"String_Node_Str\");\n PluginBundle pluginBundle = loadJavaProject(projectRoot, pomFile, pluginFolder, pluginDescriptor);\n List<SPluginInformation> plugins = new ArrayList<>();\n processPluginDescriptor(pluginDescriptor, plugins);\n for (SPluginInformation sPluginInformation : plugins) {\n if (sPluginInformation.isEnabled()) {\n sPluginInformation.setInstallForAllUsers(true);\n sPluginInformation.setInstallForNewUsers(true);\n PluginContext pluginContext = pluginBundle.getPluginContext(sPluginInformation.getIdentifier());\n if (pluginContext == null) {\n throw new PluginException(\"String_Node_Str\" + sPluginInformation.getIdentifier());\n }\n pluginContext.getPlugin().init(this);\n }\n }\n try {\n long pluginBundleVersionId = pluginChangeListener.pluginBundleInstalled(pluginBundle);\n for (SPluginInformation sPluginInformation : plugins) {\n if (sPluginInformation.isEnabled()) {\n PluginContext pluginContext = pluginBundle.getPluginContext(sPluginInformation.getIdentifier());\n pluginChangeListener.pluginInstalled(pluginBundleVersionId, pluginContext, sPluginInformation);\n }\n }\n } catch (Exception e) {\n LOGGER.error(\"String_Node_Str\", e);\n throw new PluginException(e);\n }\n return pluginBundle;\n } catch (JAXBException e) {\n throw new PluginException(e);\n } catch (FileNotFoundException e) {\n throw new PluginException(e);\n } catch (IOException e) {\n throw new PluginException(e);\n } catch (XmlPullParserException e) {\n throw new PluginException(e);\n }\n}\n"
|
"public String getAttribute(Attribute attribute) {\n if (attribute == null)\n return null;\n if (entity == null) {\n dB.echoDebug(\"String_Node_Str\");\n return \"String_Node_Str\";\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n if (getBukkitEntity().isInsideVehicle())\n return new dEntity(getBukkitEntity().getVehicle()).getAttribute(attribute.fulfill(1));\n else\n return \"String_Node_Str\";\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n if (getLivingEntity().getCustomName() == null)\n return \"String_Node_Str\";\n return new Element(getLivingEntity().getCustomName()).getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n if (isNPC())\n return new Element(getNPC().getName()).getAttribute(attribute.fulfill(1));\n if (entity instanceof Player)\n return new Element(((Player) entity).getName()).getAttribute(attribute.fulfill(1));\n return new Element(entity.getType().getName()).getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n return new Element(entity_type.toString()).getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n if (CustomNBT.hasCustomNBT(getLivingEntity(), \"String_Node_Str\"))\n return new dScript(CustomNBT.getCustomNBT(getLivingEntity(), \"String_Node_Str\")).getAttribute(attribute.fulfill(1));\n else\n return new Element(getBukkitEntity().getType().name()).getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n int range = attribute.getIntContext(2);\n if (range < 1)\n range = 50;\n return new dLocation(getLivingEntity().getTargetBlock(null, range).getLocation()).getAttribute(attribute.fulfill(2));\n }\n if (attribute.startsWith(\"String_Node_Str\"))\n return new dLocation(entity.getLocation().add(0, -1, 0)).getAttribute(attribute.fulfill(2));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new dLocation(getEyeLocation()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\")) {\n if (entity instanceof Player) {\n dLocation location = new dLocation(entity.getLocation());\n location.setYaw(location.getYaw() - 90);\n return location.getAttribute(attribute.fulfill(1));\n } else {\n return new dLocation(entity.getLocation()).getAttribute(attribute.fulfill(1));\n }\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n double maxHealth = getLivingEntity().getMaxHealth();\n if (attribute.hasContext(2))\n maxHealth = attribute.getIntContext(2);\n if ((float) getLivingEntity().getHealth() / maxHealth < .10)\n return new Element(\"String_Node_Str\").getAttribute(attribute.fulfill(2));\n else if ((float) getLivingEntity().getHealth() / maxHealth < .40)\n return new Element(\"String_Node_Str\").getAttribute(attribute.fulfill(2));\n else if ((float) getLivingEntity().getHealth() / maxHealth < .75)\n return new Element(\"String_Node_Str\").getAttribute(attribute.fulfill(2));\n else if ((float) getLivingEntity().getHealth() / maxHealth < 1)\n return new Element(\"String_Node_Str\").getAttribute(attribute.fulfill(2));\n else\n return new Element(\"String_Node_Str\").getAttribute(attribute.fulfill(2));\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n double maxHealth = getLivingEntity().getMaxHealth();\n if (attribute.hasContext(2))\n maxHealth = attribute.getIntContext(2);\n return new Element((getLivingEntity().getHealth() / maxHealth) * 100).getAttribute(attribute.fulfill(2));\n }\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getLivingEntity().getMaxHealth()).getAttribute(attribute.fulfill(2));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getLivingEntity().getHealth()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(entity instanceof Tameable).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\")) {\n if (entity instanceof Tameable)\n return new Element(((Tameable) entity).isTamed()).getAttribute(attribute.fulfill(1));\n else\n return Element.FALSE.getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n if (entity instanceof Tameable && ((Tameable) entity).isTamed())\n return new dPlayer((Player) ((Tameable) entity).getOwner()).getAttribute(attribute.fulfill(1));\n else\n return new Element(\"String_Node_Str\").getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(entity.isInsideVehicle()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new dPlayer(getLivingEntity().getKiller()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(entity.getLastDamageCause().getCause().name()).getAttribute(attribute.fulfill(2));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getLivingEntity().getLastDamage()).getAttribute(attribute.fulfill(2));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Duration((long) getLivingEntity().getNoDamageTicks()).getAttribute(attribute.fulfill(2));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Duration(entity.getTicksLived() / 20).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\")) {\n if (attribute.hasContext(1) && dEntity.matches(attribute.getContext(1))) {\n dEntity toEntity = dEntity.valueOf(attribute.getContext(1));\n return new Element(getLivingEntity().hasLineOfSight(toEntity.getBukkitEntity())).getAttribute(attribute.fulfill(1));\n }\n }\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(getLivingEntity().getCanPickupItems()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(entity.getEntityId()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(entity.getFallDistance()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(entity.getUniqueId().toString()).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\")) {\n Boolean returnElement = false;\n if (attribute.hasContext(1))\n for (org.bukkit.potion.PotionEffect effect : getLivingEntity().getActivePotionEffects()) if (effect.getType().equals(org.bukkit.potion.PotionType.valueOf(attribute.getContext(1))))\n returnElement = true;\n else if (!getLivingEntity().getActivePotionEffects().isEmpty())\n returnElement = true;\n return new Element(returnElement).getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n return new dInventory(getLivingEntity()).getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n return new dWorld(entity.getWorld()).getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n return new Element(CitizensAPI.getNPCRegistry().isNPC(getBukkitEntity())).getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n if (!(getBukkitEntity() instanceof Player) && !CitizensAPI.getNPCRegistry().isNPC(getBukkitEntity()))\n return Element.TRUE.getAttribute(attribute.fulfill(1));\n else\n return Element.FALSE.getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\"))\n return new Element(prefix).getAttribute(attribute.fulfill(1));\n if (attribute.startsWith(\"String_Node_Str\")) {\n dB.log(debug());\n return new Element(Boolean.TRUE.toString()).getAttribute(attribute.fulfill(2));\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n return new Element(ChatColor.stripColor(debug())).getAttribute(attribute.fulfill(2));\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n return new Element(debug()).getAttribute(attribute.fulfill(1));\n }\n if (attribute.startsWith(\"String_Node_Str\")) {\n return new Element(getObjectType()).getAttribute(attribute.fulfill(1));\n }\n return new Element(identify()).getAttribute(attribute.fulfill(0));\n}\n"
|
"public Object getChild(Object parent, int index) {\n if (parent == projectDirectory.getParent()) {\n return this.files.get(index);\n } else {\n return null;\n }\n}\n"
|
"public int[] sqlTypes() {\n return Arrays.copyOf(sqlTypes, sqlTypes.length);\n}\n"
|
"public JSONArray getMilestonesList(String containerId, String caseID) throws ApsSystemException {\n super.setConfig(super.getConfig());\n JSONArray milestonesList = null;\n Map<String, String> headersMap = new HashMap<>();\n Map<String, String> param = new HashMap<>();\n String result;\n JSONObject json;\n if (!this.getKieBpmConfig().getActive() || StringUtils.isBlank(containerId) || StringUtils.isBlank(caseID)) {\n return milestonesList;\n }\n try {\n Endpoint ep = KieEndpointDictionary.create().get(API_GET_MILESTONES_LIST).resolveParams(containerId, caseID);\n headersMap.put(HEADER_KEY_ACCEPT, HEADER_VALUE_JSON);\n param.put(HEADER_MILESTONES_ACHIEVEDONLY_PARM, HEADER_MILESTONES_ACHIEVEDONLY_FALSE);\n KieClient client = super.getCurrentClient();\n result = (String) new KieRequestBuilder(client).setEndpoint(ep).setHeaders(headersMap).setRequestParams(param).setDebug(this.getKieBpmConfig().getDebug()).doRequest();\n if (!result.isEmpty()) {\n json = new JSONObject(result);\n milestonesList = (JSONArray) json.get(\"String_Node_Str\");\n logger.debug(\"String_Node_Str\", result);\n } else {\n logger.debug(\"String_Node_Str\");\n }\n } catch (Throwable t) {\n throw new ApsSystemException(\"String_Node_Str\", t);\n }\n return milestonesList;\n}\n"
|
"protected void __handleCommonListBox(Collection selectionList) throws Exception {\n JspWriter writer = pageContext.getOut();\n String encParamId = ParameterAccessor.htmlEncode(param.getId());\n String encParamName = ParameterAccessor.htmlEncode(param.getName());\n String displayTextId = encParamId + \"String_Node_Str\";\n String displayTextName = ParameterAccessor.PREFIX_DISPLAY_TEXT + encParamName;\n boolean isSelected = false;\n boolean isNullValue = param.getValue() == null;\n String valueId = encParamId + \"String_Node_Str\";\n String nullValueId = encParamId + \"String_Node_Str\";\n String radioSelectId = encParamId + \"String_Node_Str\";\n String radioTextId = encParamId + \"String_Node_Str\";\n String inputTextId = encParamId + \"String_Node_Str\";\n String isLocaleId = encParamId + \"String_Node_Str\";\n String patternId = encParamId + \"String_Node_Str\";\n String patternName = encParamName + \"String_Node_Str\";\n if (!paramDef.mustMatch()) {\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + encParamId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + radioSelectId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + radioTextId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + encParamId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + inputTextId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + isLocaleId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + ParameterAccessor.PARAM_ISLOCALE + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + encParamId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + nullValueId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + ParameterAccessor.PARAM_ISNULL + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + valueId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + displayTextId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + encParamId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + encParamId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + inputTextId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + valueId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + encParamName + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + displayTextId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + displayTextName + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + nullValueId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + isLocaleId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + ParameterAccessor.PARAM_ISLOCALE + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + encParamId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + patternId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + patternName + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + encParamId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n }\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + encParamId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + valueId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + displayTextId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + nullValueId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + IBirtConstants.NULL_VALUE + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + ParameterAccessor.PARAM_ISNULL + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + encParamName + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + displayTextName + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n String onChange = \"String_Node_Str\" + encParamId + \"String_Node_Str\";\n if (!paramDef.mustMatch()) {\n String onClick = \"String_Node_Str\" + encParamId + \"String_Node_Str\";\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + radioSelectId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + onClick + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n }\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + encParamId + \"String_Node_Str\");\n __handleGeneralDefinition();\n writer.write(\"String_Node_Str\" + onChange + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n if (paramDef.mustMatch() && !paramDef.isRequired()) {\n writer.write(\"String_Node_Str\");\n if (param.getValue() != null && DataUtil.getString(param.getValue()).length() <= 0) {\n writer.write(\"String_Node_Str\");\n isSelected = true;\n }\n writer.write(\"String_Node_Str\");\n }\n for (Iterator iter = selectionList.iterator(); iter.hasNext(); ) {\n ParameterSelectionChoice selectionItem = (ParameterSelectionChoice) iter.next();\n Object value = selectionItem.getValue();\n try {\n value = DataUtil.convert(value, paramDef.getDataType());\n } catch (Exception e) {\n value = null;\n }\n String displayValue = DataUtil.getDisplayValue(value);\n if (displayValue == null)\n continue;\n String label = selectionItem.getLabel();\n if (label == null || label.length() <= 0)\n label = ParameterValidationUtil.getDisplayValue(null, this.pattern, value, this.locale);\n label = label != null ? label : \"String_Node_Str\";\n writer.write(\"String_Node_Str\" + ParameterAccessor.htmlEncode(displayValue) + \"String_Node_Str\");\n if (displayValue.equals(DataUtil.getDisplayValue(param.getValue()))) {\n isSelected = true;\n writer.write(\"String_Node_Str\");\n if (param.getDisplayText() == null) {\n this.displayTextString = label;\n } else {\n label = param.getDisplayText();\n }\n }\n writer.write(\"String_Node_Str\");\n writer.write(ParameterAccessor.htmlEncode(label));\n writer.write(\"String_Node_Str\");\n }\n String defaultValueText = null;\n if (!isSelected && paramDef.mustMatch()) {\n Object defaultValue = BirtReportServiceFactory.getReportService().getParameterDefaultValue(viewer.getReportDesignHandle(), param.getName(), options);\n if (defaultValue == null) {\n isNullValue = true;\n } else {\n isNullValue = false;\n defaultValueText = DataUtil.getDisplayValue(defaultValue);\n if (defaultValueText != null)\n this.valueString = defaultValueText;\n String defaultDisplayText = ParameterValidationUtil.getDisplayValue(null, this.pattern, defaultValue, locale);\n if (defaultDisplayText != null)\n this.displayTextString = defaultDisplayText;\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + ParameterAccessor.htmlEncode(this.valueString) + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(ParameterAccessor.htmlEncode(this.displayTextString) + \"String_Node_Str\");\n }\n }\n if (!paramDef.isRequired()) {\n writer.write(\"String_Node_Str\");\n if (isNullValue)\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(ITagConstants.NULL_VALUE + \"String_Node_Str\");\n }\n writer.write(\"String_Node_Str\");\n if (!paramDef.mustMatch()) {\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + isLocaleId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + encParamName + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n if (param.getPattern() != null) {\n writer.write(\"String_Node_Str\" + patternId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + ParameterAccessor.htmlEncode(param.getPattern()) + \"String_Node_Str\");\n }\n String onClick = \"String_Node_Str\" + encParamId + \"String_Node_Str\";\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + radioTextId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + onClick + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + inputTextId + \"String_Node_Str\");\n if (!isSelected) {\n writer.write(\"String_Node_Str\" + ParameterAccessor.htmlEncode(this.displayTextString) + \"String_Node_Str\");\n }\n writer.write(\"String_Node_Str\" + encParamId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + encParamId + \"String_Node_Str\" + (isNullValue || isSelected) + \"String_Node_Str\");\n }\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + displayTextId + \"String_Node_Str\");\n if (!isNullValue) {\n writer.write(\"String_Node_Str\" + displayTextName + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + ParameterAccessor.htmlEncode(this.displayTextString) + \"String_Node_Str\");\n }\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + valueId + \"String_Node_Str\");\n if (!isNullValue) {\n writer.write(\"String_Node_Str\" + encParamName + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + ParameterAccessor.htmlEncode(this.valueString) + \"String_Node_Str\");\n }\n writer.write(\"String_Node_Str\");\n if (!paramDef.isRequired()) {\n writer.write(\"String_Node_Str\" + encParamName + \"String_Node_Str\" + nullValueId + \"String_Node_Str\");\n if (isNullValue)\n writer.write(\"String_Node_Str\" + ParameterAccessor.PARAM_ISNULL + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n }\n if (!isSelected && paramDef.mustMatch()) {\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\" + encParamId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n if (defaultValueText != null) {\n writer.write(\"String_Node_Str\" + defaultValueText + \"String_Node_Str\");\n }\n writer.write(\"String_Node_Str\" + encParamId + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n }\n}\n"
|
"protected Map getParsedParameters(IViewerReportDesignHandle design, Collection parameterList, HttpServletRequest request, InputOptions options) throws ReportServiceException {\n Map params = new HashMap();\n if (parameterList == null || this.parametersAsString == null)\n return params;\n for (Iterator iter = parameterList.iterator(); iter.hasNext(); ) {\n ScalarParameterHandle parameter = null;\n Object parameterObj = iter.next();\n if (parameterObj instanceof ScalarParameterHandle) {\n parameter = (ScalarParameterHandle) parameterObj;\n }\n if (parameter == null)\n continue;\n String paramName = parameter.getName();\n Object paramValueObj = this.parametersAsString.get(paramName);\n if (paramValueObj != null) {\n try {\n String format = ParameterAccessor.getFormat(request, paramName);\n if (format == null || format.length() <= 0) {\n format = parameter.getPattern();\n }\n params.put(paramName, paramValueObj);\n } catch (ValidationValueException e) {\n if (ParameterAccessor.SERVLET_PATH_RUN.equalsIgnoreCase(request.getServletPath())) {\n this.exception = e;\n break;\n }\n }\n } else {\n params.put(paramName, null);\n }\n }\n return params;\n}\n"
|
"public Object[] doInTransaction(TransactionStatus status) {\n List<VmWorkJobVO> pendingWorkJobs = _workJobDao.listPendingWorkJobs(VirtualMachine.Type.Instance, vm.getId(), VmWorkRemoveNicFromVm.class.getName());\n VmWorkJobVO workJob = null;\n if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) {\n assert (pendingWorkJobs.size() == 1);\n workJob = pendingWorkJobs.get(0);\n } else {\n workJob = new VmWorkJobVO(context.getContextId());\n workJob.setDispatcher(VmWorkConstants.VM_WORK_JOB_DISPATCHER);\n workJob.setCmd(VmWorkRemoveNicFromVm.class.getName());\n workJob.setAccountId(account.getId());\n workJob.setUserId(user.getId());\n workJob.setVmType(vm.getType());\n workJob.setVmInstanceId(vm.getId());\n workJob.setRelated(AsyncJobExecutionContext.getOriginJobContextId());\n VmWorkRemoveNicFromVm workInfo = new VmWorkRemoveNicFromVm(user.getId(), account.getId(), vm.getId(), VirtualMachineManagerImpl.VM_WORK_JOB_HANDLER, nic.getId());\n workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo));\n _jobMgr.submitAsyncJob(workJob, VmWorkConstants.VM_WORK_QUEUE, vm.getId());\n }\n return new Object[] { workJob, new Long(workJob.getId()) };\n}\n"
|
"public ShowcaseItem getItemByBlock(Block b) {\n return itemsByBlock.get(b);\n}\n"
|
"JClassType getSubstitutedType(JParameterizedType parameterizedType) {\n return getOracle().getWildcardType(boundType, getFirstBound().getSubstitutedType(parameterizedType));\n}\n"
|
"public static AlignedSub cleanupDocument(String document) {\n AlignedSub ret = new AlignedSub(document);\n ret = ret.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n ret = ret.replaceAll(leadingWhitespace, \"String_Node_Str\");\n return ret;\n}\n"
|
"synchronized void _check_mtime() {\n try {\n if ((dboptions & GEOIP_CHECK_CACHE) != 0) {\n long t = databaseFile.lastModified();\n if (t != mtime) {\n System.out.println(\"String_Node_Str\");\n file.close();\n file = new RandomAccessFile(databaseFile, \"String_Node_Str\");\n init();\n }\n }\n } catch (IOException e) {\n System.out.println(\"String_Node_Str\");\n }\n}\n"
|
"public void DownloadFinished(int AsynkTaskId, Long feedId, Bitmap bitmap) {\n if (bitmap != null) {\n DatabaseConnectionOrm dbConn = new DatabaseConnectionOrm(context);\n Feed feed = dbConn.getFeedById(AsynkTaskId);\n String avg = ColourCalculator.ColourHexFromBitmap(bitmap);\n feed.setAvgColour(avg);\n dbConn.updateFeed(feed);\n }\n}\n"
|
"public Object getValue() throws PodamMockeryException {\n if (null != findTypeFromList(annotations, AssertTrue.class)) {\n return Boolean.TRUE;\n }\n if (null != findTypeFromList(annotations, AssertFalse.class)) {\n return Boolean.FALSE;\n }\n if (null != findTypeFromList(annotations, Past.class)) {\n int days = RANDOM.nextInt(365) + 1;\n long timestamp = System.currentTimeMillis() - TimeUnit.DAYS.toSeconds(days);\n return timestampToReturnType(timestamp);\n }\n if (null != findTypeFromList(annotations, Future.class)) {\n int days = RANDOM.nextInt(365) + 1;\n long timestamp = System.currentTimeMillis() + TimeUnit.DAYS.toSeconds(days);\n return timestampToReturnType(timestamp);\n }\n Size size = findTypeFromList(annotations, Size.class);\n if (null != size) {\n int minValue = size.min();\n int maxValue = size.max();\n if (maxValue == Integer.MAX_VALUE) {\n maxValue = PodamConstants.STR_DEFAULT_LENGTH;\n }\n long length = PodamUtils.getLongInRange(minValue, maxValue);\n StringBuilder sb = new StringBuilder();\n while (sb.length() < length) {\n sb.append(PodamUtils.getNiceCharacter());\n }\n return sb.toString();\n }\n Pattern pattern = findTypeFromList(annotations, Pattern.class);\n if (null != pattern) {\n LOG.warn(\"String_Node_Str\" + \"String_Node_Str\", pattern.regexp());\n return null;\n }\n boolean isRound = false;\n boolean isFloat = false;\n BigDecimal min = new BigDecimal(-Double.MAX_VALUE);\n BigDecimal max = new BigDecimal(Double.MAX_VALUE);\n DecimalMin decimalMin = findTypeFromList(annotations, DecimalMin.class);\n if (null != decimalMin) {\n isFloat = true;\n min = new BigDecimal(decimalMin.value());\n }\n DecimalMax decimalMax = findTypeFromList(annotations, DecimalMax.class);\n if (null != decimalMax) {\n isFloat = true;\n max = new BigDecimal(decimalMax.value());\n }\n Min minAnno = findTypeFromList(annotations, Min.class);\n if (null != minAnno) {\n isRound = true;\n min = new BigDecimal(minAnno.value()).max(min);\n }\n Max maxAnno = findTypeFromList(annotations, Max.class);\n if (null != maxAnno) {\n isRound = true;\n max = new BigDecimal(maxAnno.value()).min(max);\n }\n Digits digits = findTypeFromList(annotations, Digits.class);\n BigDecimal divisor = null;\n if (null != digits) {\n isRound = true;\n divisor = BigDecimal.TEN.pow(digits.fraction());\n max = BigDecimal.TEN.pow(digits.integer()).min(max).multiply(divisor);\n min = max.negate().max(min);\n }\n if (isRound || isFloat) {\n BigDecimal value = getValueInRange(min, max);\n if (isRound) {\n BigInteger intValue = value.toBigInteger();\n value = new BigDecimal(intValue);\n }\n if (null != divisor) {\n value = value.divide(divisor);\n }\n return decimalToReturnType(value);\n }\n return null;\n}\n"
|
"public IDataQueryDefinition[] createReportQueries(IDataQueryDefinition parent) throws BirtException {\n if (crosstabItem == null) {\n throw new CrosstabException(Messages.getString(\"String_Node_Str\"));\n }\n IDataQueryDefinition cubeQuery = CrosstabQueryUtil.createCubeQuery(crosstabItem, parent, true, true, true, true, true, true);\n String emptyValue = crosstabItem.getEmptyCellValue();\n if (context != null) {\n processChildQuery(cubeQuery, crosstabItem.getHeader(), emptyValue);\n for (int i = 0; i < crosstabItem.getMeasureCount(); i++) {\n MeasureViewHandle mv = crosstabItem.getMeasure(i);\n processChildQuery(cubeQuery, mv.getCell(), emptyValue);\n processChildQuery(cubeQuery, mv.getHeader(), emptyValue);\n for (int j = 0; j < mv.getAggregationCount(); j++) {\n processChildQuery(cubeQuery, mv.getAggregationCell(j), emptyValue);\n }\n }\n if (crosstabItem.getDimensionCount(ROW_AXIS_TYPE) > 0) {\n for (int i = 0; i < crosstabItem.getDimensionCount(ROW_AXIS_TYPE); i++) {\n DimensionViewHandle dv = crosstabItem.getDimension(ROW_AXIS_TYPE, i);\n for (int j = 0; j < dv.getLevelCount(); j++) {\n LevelViewHandle lv = dv.getLevel(j);\n processChildQuery(cubeQuery, lv.getCell(), emptyValue);\n processChildQuery(cubeQuery, lv.getAggregationHeader(), emptyValue);\n }\n }\n }\n if (crosstabItem.getDimensionCount(COLUMN_AXIS_TYPE) > 0) {\n for (int i = 0; i < crosstabItem.getDimensionCount(COLUMN_AXIS_TYPE); i++) {\n DimensionViewHandle dv = crosstabItem.getDimension(COLUMN_AXIS_TYPE, i);\n for (int j = 0; j < dv.getLevelCount(); j++) {\n LevelViewHandle lv = dv.getLevel(j);\n processChildQuery(cubeQuery, lv.getCell(), emptyValue);\n processChildQuery(cubeQuery, lv.getAggregationHeader(), emptyValue);\n }\n }\n }\n processChildQuery(cubeQuery, crosstabItem.getGrandTotal(ROW_AXIS_TYPE), emptyValue);\n processChildQuery(cubeQuery, crosstabItem.getGrandTotal(COLUMN_AXIS_TYPE), emptyValue);\n }\n return new IDataQueryDefinition[] { cubeQuery };\n}\n"
|
"protected void runOneIteration() throws Exception {\n logger.info(\"String_Node_Str\");\n Tweet tweet = null;\n try {\n logger.info(\"String_Node_Str\");\n if (tweet != null) {\n this.endpointUriBuilder = this.endpointUriBuilder.replaceQueryParam(\"String_Node_Str\", tweet.getId());\n }\n } catch (IllegalArgumentException iae) {\n logger.error(iae, \"String_Node_Str\");\n throw iae;\n } finally {\n logger.info(\"String_Node_Str\");\n }\n Tweet[] tweets;\n try {\n logger.info(\"String_Node_Str\");\n final URI uri = this.endpointUriBuilder.build();\n logger.info(\"String_Node_Str\");\n tweets = this.httpClient.get(uri, MediaType.APPLICATION_JSON_TYPE, Tweet[].class);\n } catch (RuntimeException re) {\n logger.error(re, \"String_Node_Str\");\n throw re;\n } finally {\n logger.info(\"String_Node_Str\");\n }\n if (tweets == null)\n tweets = new Tweet[0];\n logger.info(\"String_Node_Str\", tweets.length);\n if (tweets.length > 0)\n eventBus.post(tweets);\n if (tweets.length > 0) {\n if (tweet == null)\n tweet = tweets[0];\n for (Tweet t : tweets) {\n if (tweet.getCreatedAt().isBefore(t.getCreatedAt()))\n tweet = t;\n }\n }\n this.recentTweet = Optional.fromNullable(tweet);\n}\n"
|
"private void processMessage(final Message message) throws InterruptedException {\n MessageType messageType = message.getMessageType();\n if (messageType == null) {\n processUnknownMessageType(message.getMessageId(), \"String_Node_Str\");\n return;\n }\n switch(messageType) {\n case RESPONSE:\n {\n processServerResponse(message.getMessageId(), message.getResponse());\n break;\n }\n case REQUEST:\n {\n processClientRequest(message.getMessageId(), message.getRequest());\n break;\n }\n case FAILURE:\n {\n processFailure(message.getMessageId(), message.getFailure());\n break;\n }\n default:\n {\n processUnknownMessageType(message.getMessageId(), message.getMessageType().name());\n break;\n }\n }\n}\n"
|
"public boolean equals(Object obj) {\n if (this == obj)\n return true;\n }\n if (obj == null) {\n return false;\n if (getClass() != obj.getClass())\n return false;\n Property other = (Property) obj;\n if (name == null) {\n if (other.name != null)\n return false;\n } else if (!name.equals(other.name))\n return false;\n if (value == null) {\n if (other.value != null)\n return false;\n } else if (!value.equals(other.value))\n return false;\n return true;\n}\n"
|
"private void writeResultLog(final Path logPath, final FileSystem fs, final StepResult result) throws IOException {\n final Writer writer = new OutputStreamWriter(fs.create(logPath), Globals.DEFAULT_FILE_ENCODING);\n final String data = result.getLogMessage();\n if (data != null)\n writer.write(data);\n writer.close();\n}\n"
|
"public void refreshParameters() {\n parameters.clear();\n paramsRollCall.clear();\n if (parameterListener != null)\n parameterListener.onBeginReceivingParameters();\n MavLinkParameters.requestParametersList(myDrone);\n resetWatchdog();\n}\n"
|
"private static void setRuleMatcher(Map<String, String> columnMap, RecordMatchingIndicator recordMatchingIndicator, AnalysisMatchRecordGrouping analysisMatchRecordGrouping) throws BusinessException {\n List<MatchRule> matchRules = recordMatchingIndicator.getBuiltInMatchRuleDefinition().getMatchRules();\n for (MatchRule matcher : matchRules) {\n List<Map<String, String>> ruleMatcherConvertResult = new ArrayList<Map<String, String>>();\n if (matcher == null) {\n continue;\n }\n for (MatchKeyDefinition matchDef : matcher.getMatchKeys()) {\n if (matchDef.getColumn() == null || StringUtils.EMPTY.equals(matchDef.getColumn())) {\n BusinessException businessException = new BusinessException();\n businessException.setAdditonalMessage(Messages.getString(\"String_Node_Str\", matchDef.getName()));\n throw businessException;\n }\n Map<String, String> matchKeyMap = AnalysisRecordGroupingUtils.getMatchKeyMap(matchDef.getColumn(), matchDef.getAlgorithm().getAlgorithmType(), matchDef.getAlgorithm().getAlgorithmParameters(), matchDef.getConfidenceWeight(), columnMap, matcher.getMatchInterval(), matchDef.getColumn(), matchDef.getHandleNull());\n ruleMatcherConvertResult.add(matchKeyMap);\n }\n analysisMatchRecordGrouping.addRuleMatcher(ruleMatcherConvertResult);\n }\n}\n"
|
"private static void extractJar(File jarFile, String destDir) throws IOException {\n java.util.jar.JarFile jar = new java.util.jar.JarFile(jarFile);\n java.util.Enumeration enum1 = jar.entries();\n try {\n while (enum1.hasMoreElements()) {\n java.util.jar.JarEntry file = (java.util.jar.JarEntry) enum1.nextElement();\n java.io.File f = new java.io.File(destDir + java.io.File.separator + file.getName());\n if (file.isDirectory()) {\n f.mkdir();\n continue;\n }\n } finally {\n try {\n if (fos != null) {\n fos.close();\n }\n } catch (Exception e) {\n if (_logger.isLoggable(Level.FINEST)) {\n _logger.log(Level.FINEST, \"String_Node_Str\" + f.getName() + \"String_Node_Str\", e);\n }\n }\n try {\n if (is != null) {\n is.close();\n }\n } catch (Exception e) {\n if (_logger.isLoggable(Level.FINEST)) {\n _logger.log(Level.FINEST, \"String_Node_Str\" + file.getName() + \"String_Node_Str\", e);\n }\n }\n }\n }\n}\n"
|
"public static int prefix(Player player, String[] args) {\n if (player.canUseCommand(\"String_Node_Str\") && vConfig.getInstance().prefix()) {\n if (args.length < 2) {\n vChat.sendMessage(player, player, Colors.Rose + \"String_Node_Str\");\n player.sendMessage(Colors.DarkPurple + \"String_Node_Str\" + player.getName() + \"String_Node_Str\");\n vChat.sendMessage(player, player, Colors.DarkPurple + \"String_Node_Str\" + Colors.Black + \"String_Node_Str\" + Colors.LightGreen + \"String_Node_Str\" + Colors.Black + \"String_Node_Str\" + Colors.Yellow + player.getName());\n return EXIT_SUCCESS;\n }\n Player other = etc.getServer().matchPlayer(args[0]);\n if (other == null) {\n vChat.sendMessage(player, player, Colors.Rose + \"String_Node_Str\");\n return EXIT_SUCCESS;\n }\n if (player != other && other.hasControlOver(player)) {\n vChat.sendMessage(player, player, Colors.Rose + \"String_Node_Str\");\n return EXIT_SUCCESS;\n }\n if (vChat.msgLength(args[1]) > 60) {\n vChat.sendMessage(player, player, Colors.Rose + \"String_Node_Str\");\n return EXIT_SUCCESS;\n }\n if (args.length >= 2 && args[0] != null) {\n other.setPrefix(args[1]);\n player.sendMessage(Colors.Rose + \"String_Node_Str\");\n FlatFileSource ffs = new FlatFileSource();\n ffs.modifyPlayer(other);\n }\n if (args.length >= 3 && args[1] != null) {\n String tagbag = etc.combineSplit(2, args, \"String_Node_Str\");\n vUsers.players.findProfile(other).setTag(tagbag);\n player.sendMessage(Colors.LightGreen + \"String_Node_Str\");\n }\n return EXIT_SUCCESS;\n }\n if (!player.canUseCommand(\"String_Node_Str\") && vConfig.getInstance().prefix()) {\n return EXIT_FAIL;\n }\n if (args.length < 1) {\n vChat.sendMessage(player, player, Colors.Rose + \"String_Node_Str\");\n player.sendMessage(Colors.DarkPurple + \"String_Node_Str\");\n vChat.sendMessage(player, player, Colors.DarkPurple + \"String_Node_Str\" + Colors.Black + \"String_Node_Str\" + Colors.LightGreen + \"String_Node_Str\" + Colors.Black + \"String_Node_Str\" + Colors.Yellow + player.getName());\n return EXIT_SUCCESS;\n }\n if (args.length >= 1 && args[0] != null) {\n player.setPrefix(args[0]);\n player.sendMessage(Colors.Rose + \"String_Node_Str\");\n }\n if (args.length >= 2 && args[1] != null) {\n if (vChat.msgLength(args[1]) > 60) {\n vChat.sendMessage(player, player, Colors.Rose + \"String_Node_Str\");\n return EXIT_SUCCESS;\n }\n vUsers.players.findProfile(player).setTag(args[1]);\n player.sendMessage(Colors.LightGreen + \"String_Node_Str\");\n }\n return EXIT_SUCCESS;\n}\n"
|
"public DeployDestination plan(VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeploymentPlan plan, ExcludeList avoid) throws InsufficientServerCapacityException {\n String _allocationAlgorithm = _configDao.getValue(Config.VmAllocationAlgorithm.key());\n VirtualMachine vm = vmProfile.getVirtualMachine();\n ServiceOffering offering = vmProfile.getServiceOffering();\n DataCenter dc = _dcDao.findById(vm.getDataCenterId());\n int cpu_requested = offering.getCpu() * offering.getSpeed();\n long ram_requested = offering.getRamSize() * 1024L * 1024L;\n String opFactor = _configDao.getValue(Config.CPUOverprovisioningFactor.key());\n float cpuOverprovisioningFactor = NumbersUtil.parseFloat(opFactor, 1);\n s_logger.debug(\"String_Node_Str\");\n s_logger.debug(\"String_Node_Str\" + plan.getDataCenterId() + \"String_Node_Str\" + plan.getPodId() + \"String_Node_Str\" + plan.getClusterId() + \"String_Node_Str\" + cpu_requested + \"String_Node_Str\" + ram_requested);\n s_logger.debug(\"String_Node_Str\" + (plan.getPoolId() != null ? \"String_Node_Str\" : \"String_Node_Str\"));\n if (plan.getHostId() != null) {\n Long hostIdSpecified = plan.getHostId();\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + hostIdSpecified);\n }\n HostVO host = _hostDao.findById(hostIdSpecified);\n if (host == null) {\n s_logger.debug(\"String_Node_Str\");\n } else {\n s_logger.debug(\"String_Node_Str\" + host.getDataCenterId() + \"String_Node_Str\" + host.getPodId() + \"String_Node_Str\" + host.getClusterId());\n }\n DataCenterDeployment lastPlan = new DataCenterDeployment(host.getDataCenterId(), host.getPodId(), host.getClusterId(), hostIdSpecified, plan.getPoolId());\n Pair<Map<Volume, List<StoragePool>>, List<Volume>> result = findSuitablePoolsForVolumes(vmProfile, lastPlan, avoid, RETURN_UPTO_ALL);\n Map<Volume, List<StoragePool>> suitableVolumeStoragePools = result.first();\n List<Volume> readyAndReusedVolumes = result.second();\n if (!suitableVolumeStoragePools.isEmpty()) {\n List<Host> suitableHosts = new ArrayList<Host>();\n suitableHosts.add(host);\n Pair<Host, Map<Volume, StoragePool>> potentialResources = findPotentialDeploymentResources(suitableHosts, suitableVolumeStoragePools);\n if (potentialResources != null) {\n Pod pod = _podDao.findById(vm.getPodId());\n Cluster cluster = _clusterDao.findById(host.getClusterId());\n Map<Volume, StoragePool> storageVolMap = potentialResources.second();\n for (Volume vol : readyAndReusedVolumes) {\n storageVolMap.remove(vol);\n }\n DeployDestination dest = new DeployDestination(dc, pod, cluster, host, storageVolMap);\n s_logger.debug(\"String_Node_Str\" + dest);\n return dest;\n }\n }\n s_logger.debug(\"String_Node_Str\");\n return null;\n }\n if (vm.getLastHostId() != null) {\n s_logger.debug(\"String_Node_Str\" + vm.getLastHostId());\n HostVO host = _hostDao.findById(vm.getLastHostId());\n if (host == null) {\n s_logger.debug(\"String_Node_Str\");\n } else {\n if (host.getStatus() == Status.Up && host.getHostAllocationState() == Host.HostAllocationState.Enabled) {\n if (isEnabledForAllocation(host.getDataCenterId(), host.getPodId(), host.getClusterId())) {\n if (_capacityMgr.checkIfHostHasCapacity(host.getId(), cpu_requested, ram_requested, true, cpuOverprovisioningFactor)) {\n s_logger.debug(\"String_Node_Str\");\n s_logger.debug(\"String_Node_Str\" + host.getDataCenterId() + \"String_Node_Str\" + host.getPodId() + \"String_Node_Str\" + host.getClusterId());\n DataCenterDeployment lastPlan = new DataCenterDeployment(host.getDataCenterId(), host.getPodId(), host.getClusterId(), host.getId(), plan.getPoolId());\n Pair<Map<Volume, List<StoragePool>>, List<Volume>> result = findSuitablePoolsForVolumes(vmProfile, lastPlan, avoid, RETURN_UPTO_ALL);\n Map<Volume, List<StoragePool>> suitableVolumeStoragePools = result.first();\n List<Volume> readyAndReusedVolumes = result.second();\n if (!suitableVolumeStoragePools.isEmpty()) {\n List<Host> suitableHosts = new ArrayList<Host>();\n suitableHosts.add(host);\n Pair<Host, Map<Volume, StoragePool>> potentialResources = findPotentialDeploymentResources(suitableHosts, suitableVolumeStoragePools);\n if (potentialResources != null) {\n Pod pod = _podDao.findById(host.getPodId());\n Cluster cluster = _clusterDao.findById(host.getClusterId());\n Map<Volume, StoragePool> storageVolMap = potentialResources.second();\n for (Volume vol : readyAndReusedVolumes) {\n storageVolMap.remove(vol);\n }\n DeployDestination dest = new DeployDestination(dc, pod, cluster, host, storageVolMap);\n s_logger.debug(\"String_Node_Str\" + dest);\n return dest;\n }\n }\n } else {\n s_logger.debug(\"String_Node_Str\");\n }\n }\n } else {\n s_logger.debug(\"String_Node_Str\" + host.getStatus().name() + \"String_Node_Str\" + host.getHostAllocationState().name());\n }\n }\n s_logger.debug(\"String_Node_Str\");\n }\n if (!isEnabledForAllocation(plan.getDataCenterId(), plan.getPodId(), plan.getClusterId())) {\n s_logger.debug(\"String_Node_Str\");\n return null;\n }\n List<Long> clusterList = new ArrayList<Long>();\n if (plan.getClusterId() != null) {\n Long clusterIdSpecified = plan.getClusterId();\n s_logger.debug(\"String_Node_Str\" + clusterIdSpecified);\n ClusterVO cluster = _clusterDao.findById(plan.getClusterId());\n if (cluster != null) {\n clusterList.add(clusterIdSpecified);\n return checkClustersforDestination(clusterList, vmProfile, plan, avoid, dc, _allocationAlgorithm);\n } else {\n s_logger.debug(\"String_Node_Str\");\n avoid.addPod(plan.getClusterId());\n return null;\n }\n } else if (plan.getPodId() != null) {\n Long podIdSpecified = plan.getPodId();\n s_logger.debug(\"String_Node_Str\" + podIdSpecified);\n HostPodVO pod = _podDao.findById(podIdSpecified);\n if (pod != null) {\n clusterList = listClustersByCapacity(podIdSpecified, cpu_requested, ram_requested, avoid, false, cpuOverprovisioningFactor);\n if (!clusterList.isEmpty()) {\n if (avoid.getClustersToAvoid() != null) {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + avoid.getClustersToAvoid());\n }\n clusterList.removeAll(avoid.getClustersToAvoid());\n }\n List<Long> disabledClusters = listDisabledClusters(plan.getDataCenterId(), podIdSpecified);\n if (!disabledClusters.isEmpty()) {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + disabledClusters);\n }\n clusterList.removeAll(disabledClusters);\n }\n DeployDestination dest = checkClustersforDestination(clusterList, vmProfile, plan, avoid, dc, _allocationAlgorithm);\n if (dest == null) {\n avoid.addPod(plan.getPodId());\n }\n return dest;\n } else {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\");\n }\n avoid.addPod(plan.getPodId());\n return null;\n }\n } else {\n s_logger.debug(\"String_Node_Str\");\n avoid.addPod(plan.getPodId());\n return null;\n }\n } else {\n s_logger.debug(\"String_Node_Str\" + plan.getDataCenterId());\n List<Long> prioritizedClusterIds = listClustersByCapacity(plan.getDataCenterId(), cpu_requested, ram_requested, avoid, true, cpuOverprovisioningFactor);\n if (!prioritizedClusterIds.isEmpty()) {\n if (avoid.getClustersToAvoid() != null) {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + avoid.getClustersToAvoid());\n }\n prioritizedClusterIds.removeAll(avoid.getClustersToAvoid());\n }\n List<Long> disabledClusters = listDisabledClusters(plan.getDataCenterId(), null);\n if (!disabledClusters.isEmpty()) {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + disabledClusters);\n }\n prioritizedClusterIds.removeAll(disabledClusters);\n }\n } else {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\");\n }\n return null;\n }\n if (!prioritizedClusterIds.isEmpty()) {\n boolean applyUserConcentrationPodHeuristic = Boolean.parseBoolean(_configDao.getValue(Config.UseUserConcentratedPodAllocation.key()));\n if (applyUserConcentrationPodHeuristic && vmProfile.getOwner() != null) {\n long accountId = vmProfile.getOwner().getAccountId();\n List<Long> podIds = listPodsByUserConcentration(plan.getDataCenterId(), accountId);\n if (!podIds.isEmpty()) {\n if (avoid.getPodsToAvoid() != null) {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + avoid.getPodsToAvoid());\n }\n podIds.removeAll(avoid.getPodsToAvoid());\n }\n clusterList = reorderClustersByPods(prioritizedClusterIds, podIds);\n } else {\n clusterList = prioritizedClusterIds;\n }\n } else {\n clusterList = prioritizedClusterIds;\n }\n return checkClustersforDestination(clusterList, vmProfile, plan, avoid, dc, _allocationAlgorithm);\n } else {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\");\n }\n return null;\n }\n }\n}\n"
|
"public static void stopSparkProgram() {\n if (scalaProgramFlag) {\n ((org.apache.spark.SparkContext) getSparkContext().getOriginalSparkContext()).stop();\n } else {\n ((org.apache.spark.api.java.JavaSparkContext) getSparkContext().getOriginalSparkContext()).stop();\n }\n}\n"
|
"public java.sql.Timestamp convertStringToTimestamp(String sourceString, QName schemaType) {\n XMLGregorianCalendar xmlGregorianCalender = null;\n try {\n xmlGregorianCalender = convertStringToXMLGregorianCalendar(sourceString);\n } catch (Exception ex) {\n if (Constants.DATE_QNAME.equals(schemaType)) {\n throw ConversionException.incorrectDateFormat(sourceString);\n } else if (Constants.TIME_QNAME.equals(schemaType)) {\n throw XMLConversionException.incorrectTimestampTimeFormat(sourceString);\n } else if (Constants.G_DAY_QNAME.equals(schemaType)) {\n throw XMLConversionException.incorrectGDayFormat(sourceString);\n } else if (Constants.G_MONTH_QNAME.equals(schemaType)) {\n throw XMLConversionException.incorrectGMonthFormat(sourceString);\n } else if (Constants.G_MONTH_DAY_QNAME.equals(schemaType)) {\n throw XMLConversionException.incorrectGMonthDayFormat(sourceString);\n } else if (Constants.G_YEAR_QNAME.equals(schemaType)) {\n throw XMLConversionException.incorrectGYearFormat(sourceString);\n } else if (Constants.G_YEAR_MONTH_QNAME.equals(schemaType)) {\n throw XMLConversionException.incorrectGYearMonthFormat(sourceString);\n } else if (Constants.DURATION_QNAME.equals(schemaType)) {\n throw new IllegalArgumentException();\n } else {\n throw XMLConversionException.incorrectTimestampDateTimeFormat(sourceString);\n }\n }\n if (xmlGregorianCalender == null) {\n return null;\n }\n Calendar cal = this.toCalendar(xmlGregorianCalender);\n if (xmlGregorianCalender.getTimezone() == DatatypeConstants.FIELD_UNDEFINED) {\n cal.setTimeZone(getTimeZone());\n }\n QName calendarQName = xmlGregorianCalender.getXMLSchemaType();\n if (!calendarQName.equals(schemaType)) {\n if (Constants.DATE_QNAME.equals(schemaType)) {\n if (calendarQName.equals(Constants.DATE_TIME_QNAME)) {\n cal.clear(Calendar.HOUR_OF_DAY);\n cal.clear(Calendar.MINUTE);\n cal.clear(Calendar.SECOND);\n cal.clear(Calendar.MILLISECOND);\n return Helper.timestampFromCalendar(cal);\n } else {\n throw ConversionException.incorrectDateFormat(sourceString);\n }\n } else if (Constants.TIME_QNAME.equals(schemaType)) {\n throw XMLConversionException.incorrectTimestampTimeFormat(sourceString);\n } else if (Constants.G_DAY_QNAME.equals(schemaType)) {\n throw XMLConversionException.incorrectGDayFormat(sourceString);\n } else if (Constants.G_MONTH_QNAME.equals(schemaType)) {\n throw XMLConversionException.incorrectGMonthFormat(sourceString);\n } else if (Constants.G_MONTH_DAY_QNAME.equals(schemaType)) {\n throw XMLConversionException.incorrectGMonthDayFormat(sourceString);\n } else if (Constants.G_YEAR_QNAME.equals(schemaType)) {\n throw XMLConversionException.incorrectGYearFormat(sourceString);\n } else if (Constants.G_YEAR_MONTH_QNAME.equals(schemaType)) {\n throw XMLConversionException.incorrectGYearMonthFormat(sourceString);\n } else if (Constants.DURATION_QNAME.equals(schemaType)) {\n throw new IllegalArgumentException();\n } else if (Constants.DATE_TIME_QNAME.equals(schemaType)) {\n throw XMLConversionException.incorrectTimestampDateTimeFormat(sourceString);\n }\n }\n Timestamp timestamp = Helper.timestampFromCalendar(cal);\n String trimmedSourceString = sourceString.trim();\n int decimalIndex = trimmedSourceString.lastIndexOf('.');\n if (-1 == decimalIndex) {\n return timestamp;\n } else {\n int timeZoneIndex = trimmedSourceString.lastIndexOf(GMT_SUFFIX);\n if (-1 == timeZoneIndex) {\n timeZoneIndex = trimmedSourceString.lastIndexOf('-');\n if (timeZoneIndex < decimalIndex) {\n timeZoneIndex = -1;\n }\n if (-1 == timeZoneIndex) {\n timeZoneIndex = trimmedSourceString.lastIndexOf('+');\n }\n }\n String nsString;\n if (-1 == timeZoneIndex) {\n nsString = trimmedSourceString.substring(decimalIndex + 1);\n } else {\n nsString = trimmedSourceString.substring((decimalIndex + 1), timeZoneIndex);\n }\n double ns = Long.valueOf(nsString).doubleValue();\n ns = ns * Math.pow(10, 9 - nsString.length());\n timestamp.setNanos((int) ns);\n return timestamp;\n }\n}\n"
|
"public org.hl7.fhir.dstu2.model.DateTimeType convertDateTime(org.hl7.fhir.dstu3.model.DateTimeType src) throws FHIRException {\n org.hl7.fhir.dstu2.model.DateTimeType tgt = new org.hl7.fhir.dstu2.model.DateTimeType(src.getValueAsString());\n copyElement(src, tgt);\n return tgt;\n}\n"
|
"private Post makePostFromJson(PostJson pj) throws ContentParseException {\n if (pj.getNo() == 0) {\n throw new ContentParseException(\"String_Node_Str\");\n }\n if (pj.getTime() == 0) {\n throw new ContentParseException(\"String_Node_Str\");\n }\n Post p = new Post();\n if (pj.getFilename() != null) {\n p.setMediaFilename(pj.getFilename() + pj.getExt());\n p.setMediaOrig(pj.getTim() + pj.getExt());\n p.setPreviewOrig(pj.getTim() + \"String_Node_Str\");\n }\n String capcode = pj.getCapcode();\n if (capcode != null)\n capcode = capcode.substring(0, 1).toUpperCase();\n String posterCountry = pj.getCountry();\n if (posterCountry != null && (posterCountry.equals(\"String_Node_Str\") || posterCountry.equals(\"String_Node_Str\")))\n posterCountry = null;\n p.setType(pj.getExt());\n p.setMediaHash(pj.getMd5());\n p.setMediaSize(pj.getFsize());\n p.setMediaW(pj.getW());\n p.setMediaH(pj.getH());\n p.setPreviewW(pj.getTnW());\n p.setPreviewH(pj.getTnH());\n p.setNum(pj.getNo());\n p.setThreadNum(pj.getResto() == 0 ? pj.getNo() : pj.getResto());\n p.setOp(pj.getResto() == 0);\n p.setTitle(this.cleanSimple(pj.getSub()));\n p.setEmail(this.cleanLink(pj.getEmail()));\n p.setName(this.cleanSimple(pj.getName()));\n p.setTrip(pj.getTrip());\n p.setDate(this.parseDate(pj.getTime()));\n p.setComment(this.doClean(pj.getCom()));\n p.setSpoiler(pj.isSpoiler());\n p.setDeleted(false);\n p.setSticky(pj.isSticky());\n p.setCapcode(capcode);\n p.setPosterHash(posterHash);\n p.setPosterCountry(posterCountry);\n p.setDateExpired(0);\n p.setExif(null);\n return p;\n}\n"
|
"public boolean canModify(Object bean, String idColumn) {\n TableViewerCreatorColumn column = tableViewerCreator.getModifiableColumn(idColumn);\n if (column != null && column.getColumnCellModifier() != null) {\n return column.getColumnCellModifier().canModify(bean);\n }\n return tableViewerCreator.getColumn(idColumn).isModifiable();\n}\n"
|
"public void testEquals() throws JSlateException, IOException, ParserError, TemplateLoadingError {\n Map<String, Object> vars = new HashMap<>();\n IrepBuilder builder = new IrepBuilder();\n builder.addPool(OP.LOAD_CONST, \"String_Node_Str\");\n builder.addPool(OP.LOAD_CONST, \"String_Node_Str\");\n builder.add(OP.EQUALS);\n builder.add(OP.APPEND);\n builder.addPool(OP.LOAD_CONST, \"String_Node_Str\");\n builder.addPool(OP.LOAD_CONST, \"String_Node_Str\");\n builder.add(OP.EQAULS);\n builder.add(OP.APPEND);\n builder.add(OP.RETURN);\n Irep irep = builder.build();\n String got = vm.run(irep, vars);\n assertEquals(\"String_Node_Str\", got);\n}\n"
|
"private void _initializeZeroInDegree(Set receivers) {\n _zeroInDegree = new HashSet();\n Iterator iterator = _receivers.iterator();\n while (iterator.hasNext()) {\n RendezvousReceiver receiver = (RendezvousReceiver) iterator.next();\n if (receiver._symmetricGetReceivers == null) {\n _zeroInDegree.add(receiver);\n }\n }\n if (_zeroInDegree.isEmpty()) {\n throw new InternalErrorException(\"String_Node_Str\");\n }\n}\n"
|
"public Response getEarliest(String tag, boolean stable, boolean trace, String location, String epoch, UriInfo uriInfo) {\n Collection<ChannelContentKey> contentKeys = tagService.getEarliest(getQuery(tag, 1, stable, location, epoch));\n if (!contentKeys.isEmpty()) {\n URI uri = uriInfo.getBaseUriBuilder().path(contentKeys.iterator().next().toUrl()).queryParam(\"String_Node_Str\", tag).build();\n return Response.status(SEE_OTHER).location(uri).build();\n }\n return Response.status(NOT_FOUND).build();\n}\n"
|
"private void constructContext(String ip) throws SWORDException {\n try {\n Context context = new Context();\n context.setExtraLogInfo(\"String_Node_Str\" + ip);\n return context;\n } catch (SQLException e) {\n log.error(\"String_Node_Str\", e);\n throw new SWORDException(\"String_Node_Str\", e);\n }\n this.context.setExtraLogInfo(\"String_Node_Str\" + ip);\n}\n"
|
"public String preProcess(final HtmlPage htmlPage, final String sourceCode, final String sourceName, final int lineNumber, final HtmlElement htmlElement) {\n final String normalizedSourceName = INLINE_SCRIPT_RE.matcher(sourceName).replaceAll(\"String_Node_Str\");\n if (cacheInstrumentedCode && instrumentedScriptCache.containsKey(normalizedSourceName)) {\n final ScriptData data = instrumentedScriptCache.get(normalizedSourceName);\n scriptDataList.add(data);\n return data.getInstrumentedSourceCode();\n }\n if (shouldIgnore(normalizedSourceName)) {\n return sourceCode;\n }\n final ScriptData data;\n data = new ScriptData(normalizedSourceName, sourceCode);\n scriptDataList.add(data);\n final CompilerEnvirons environs = new CompilerEnvirons();\n environs.initFromContext(contextFactory.enterContext());\n final AstRoot root = new Parser(environs).parse(sourceCode, normalizedSourceName, lineNumber);\n root.visit(new InstrumentingVisitor(data, lineNumber - 1));\n final String treeSource = root.toSource();\n final StringBuilder buf = new StringBuilder(initializingCode.length() + data.getNumberOfStatements() * arrayInitializer.length() + treeSource.length());\n buf.append(initializingCode);\n buf.append(String.format(\"String_Node_Str\", coverageVariableName, normalizedSourceName));\n for (final Integer i : data.getLineNumbersOfAllStatements()) {\n buf.append(String.format(arrayInitializer, data.getSourceName(), i));\n }\n buf.append(treeSource);\n final String instrumentedCode = buf.toString();\n data.setInstrumentedSourceCode(instrumentedCode);\n if (cacheInstrumentedCode) {\n instrumentedScriptCache.putIfAbsent(normalizedSourceName, data);\n }\n if (outputInstrumentedFiles) {\n synchronized (writtenToDisk) {\n try {\n if (!writtenToDisk.contains(normalizedSourceName)) {\n final File file = new File(normalizedSourceName);\n final File fileOutputDir = new File(outputDir, DigestUtils.md5Hex(file.getParent()));\n FileUtils.mkdir(fileOutputDir.getAbsolutePath());\n final File outputFile = new File(fileOutputDir, file.getName());\n logger.info(\"String_Node_Str\", outputFile.getAbsolutePath());\n IOUtils.write(instrumentedCode, new FileOutputStream(outputFile));\n writtenToDisk.add(normalizedSourceName);\n }\n } catch (final IOException e) {\n throw new RuntimeException(e);\n }\n }\n }\n return instrumentedCode;\n}\n"
|
"public void updateBoardWithNewMove(String move) {\n Log.d(TAG, \"String_Node_Str\" + move + \"String_Node_Str\");\n int row1 = move.charAt(1) - '0';\n int col1 = move.charAt(0) - '0';\n int row2 = move.charAt(3) - '0';\n int col2 = move.charAt(2) - '0';\n Log.i(TAG, \"String_Node_Str\" + row1 + \"String_Node_Str\" + col1 + \"String_Node_Str\" + row2 + \"String_Node_Str\" + col2 + \"String_Node_Str\");\n boardView_.onNetworkMoveMade(new Position(row1, col1), new Position(row2, col2));\n boardView_.invalidate();\n}\n"
|
"private boolean forever() {\n return numberOfRuns == -1;\n}\n"
|
"private void collectResult(MultiResult collector, Object parentObject) throws IllegalAccessException, InvocationTargetException {\n if (parentObject == null) {\n collector.add(null);\n } else {\n Object currentObject = extractFrom(parentObject);\n if (shouldReduce()) {\n reduceInto(collector, currentObject);\n } else {\n collector.add(currentObject);\n }\n }\n}\n"
|
"public static Vector3 subtract(Vector3 a, Vector3 b) {\n return new Vector3(a.x - b.x, a.y - b.y, a.z - b.z);\n}\n"
|
"public void testTextForms() {\n FormEntryController fec = fpi.getFormEntryController();\n fec.jumpToIndex(FormIndex.createBeginningOfFormIndex());\n boolean foundFlag = false;\n Localizer l = fpi.getFormDef().getLocalizer();\n l.setDefaultLocale(l.getAvailableLocales()[0]);\n l.setLocale(l.getAvailableLocales()[0]);\n int state = fec.getModel().getEvent();\n while (state != FormEntryController.EVENT_QUESTION) {\n state = fec.stepToNextEvent();\n }\n if (!fep.getLongText().equals(\"String_Node_Str\"))\n fail(\"String_Node_Str\");\n if (!fep.getShortText().equals(\"String_Node_Str\"))\n fail(\"String_Node_Str\");\n if (!fep.getAudioText().equals(\"String_Node_Str\"))\n fail(\"String_Node_Str\");\n state = -99;\n while (state != FormEntryController.EVENT_QUESTION) {\n state = fec.stepToNextEvent();\n }\n if (!fep.getLongText().equals(\"String_Node_Str\"))\n fail(\"String_Node_Str\");\n if (!fep.getSpecialFormQuestionText(\"String_Node_Str\").equals(null))\n fail(\"String_Node_Str\");\n}\n"
|
"public void deletePersistentSnapshot(String dbName, String snapshotName, boolean createLogEntry) throws BabuDBException {\n final Map<String, Snapshot> snapMap = snapshotDBs.get(dbName);\n final Snapshot snap = snapMap.get(snapshotName);\n if (snap == null) {\n if (!createLogEntry)\n return;\n throw new BabuDBException(ErrorCode.NO_SUCH_SNAPSHOT, \"String_Node_Str\" + snapshotName + \"String_Node_Str\");\n snap.getView().shutdown();\n snapMap.remove(snapshotName);\n ((CheckpointerImpl) dbs.getCheckpointer()).removeSnapshotMaterializationRequest(dbName, snapshotName);\n FSUtils.delTree(new File(getSnapshotDir(dbName, snapshotName)));\n if (createLogEntry) {\n byte[] data = new byte[1 + dbName.length() + snapshotName.length()];\n byte[] dbNameBytes = dbName.getBytes();\n byte[] snapNameBytes = snapshotName.getBytes();\n assert (dbName.length() <= Byte.MAX_VALUE);\n data[0] = (byte) dbName.length();\n System.arraycopy(dbNameBytes, 0, data, 1, dbNameBytes.length);\n System.arraycopy(snapNameBytes, 0, data, 1 + dbNameBytes.length, snapNameBytes.length);\n ReusableBuffer buf = ReusableBuffer.wrap(data);\n DatabaseManagerImpl.metaInsert(LogEntry.PAYLOAD_TYPE_SNAP_DELETE, buf, dbs.getLogger());\n }\n}\n"
|
"public EditPart createEditPart(EditPart context, Object model) {\n if (context instanceof CrosstabCellEditPart) {\n if (model instanceof DataItemHandle) {\n CrosstabCellAdapter adapter = ((CrosstabCellEditPart) context).getCrosstabCellAdapter();\n String position = adapter.getPositionType();\n if ((ICrosstabCellAdapterFactory.CELL_FIRST_LEVEL_HANDLE.equals(position) || ICrosstabCellAdapterFactory.CELL_MEASURE.equals(position)) && adapter.getFirstDataItem() == model) {\n FirstLevelHandleDataItemEditPart first = new FirstLevelHandleDataItemEditPart(model);\n first.setManager(createMenuManager(position, context.getViewer()));\n return first;\n } else if (ICrosstabCellAdapterFactory.CELL_LEVEL_HANDLE.equals(position)) {\n return new LevelHandleDataItemEditPart(model);\n } else if (ICrosstabCellAdapterFactory.CELL_MEASURE_HEADER.equals(position)) {\n return new MeasureHandleDataItemEditPart(model);\n }\n }\n }\n if (model instanceof VirtualCrosstabCellAdapter) {\n return new VirtualCellEditPart(model);\n }\n if (model instanceof CrosstabCellAdapter) {\n return new CrosstabCellEditPart(model);\n }\n return null;\n}\n"
|
"public void testService() throws Exception {\n ServiceId service = fakeAppId.service(PrefixedEchoHandler.NAME);\n ServiceId serviceV1 = fakeAppIdV1.service(PrefixedEchoHandler.NAME);\n String serviceName = String.format(\"String_Node_Str\", FakeApp.NAME, PrefixedEchoHandler.NAME);\n String serviceArgument = String.format(\"String_Node_Str\", serviceName, ApplicationId.DEFAULT_VERSION);\n String serviceV1Argument = String.format(\"String_Node_Str\", serviceName, V1_SNAPSHOT);\n try {\n testCommandOutputContains(cli, \"String_Node_Str\" + serviceName, \"String_Node_Str\");\n testCommandOutputContains(cli, \"String_Node_Str\" + serviceName, \"String_Node_Str\");\n testCommandOutputContains(cli, \"String_Node_Str\" + serviceName, \"String_Node_Str\");\n testCommandOutputContains(cli, \"String_Node_Str\" + serviceName, \"String_Node_Str\");\n testCommandOutputContains(cli, \"String_Node_Str\" + serviceName + \"String_Node_Str\", \"String_Node_Str\");\n testCommandOutputContains(cli, \"String_Node_Str\" + serviceName, \"String_Node_Str\");\n assertProgramStatus(programClient, service, \"String_Node_Str\");\n testCommandOutputContains(cli, \"String_Node_Str\" + serviceArgument, \"String_Node_Str\");\n testCommandOutputContains(cli, \"String_Node_Str\" + serviceV1Argument, \"String_Node_Str\");\n assertProgramStatus(programClient, service, \"String_Node_Str\");\n assertProgramStatus(programClient, serviceV1, \"String_Node_Str\");\n testCommandOutputContains(cli, \"String_Node_Str\" + serviceArgument, \"String_Node_Str\");\n testCommandOutputContains(cli, \"String_Node_Str\" + serviceV1Argument, \"String_Node_Str\");\n testCommandOutputContains(cli, \"String_Node_Str\" + serviceArgument, \"String_Node_Str\");\n testCommandOutputContains(cli, \"String_Node_Str\" + serviceV1Argument, \"String_Node_Str\");\n testCommandOutputContains(cli, \"String_Node_Str\" + serviceArgument, \"String_Node_Str\");\n testCommandOutputContains(cli, \"String_Node_Str\" + serviceV1Argument, \"String_Node_Str\");\n testCommandOutputContains(cli, \"String_Node_Str\" + serviceArgument + \"String_Node_Str\", \"String_Node_Str\");\n testCommandOutputContains(cli, \"String_Node_Str\" + serviceV1Argument + \"String_Node_Str\", \"String_Node_Str\");\n } finally {\n programClient.stopAll(NamespaceId.DEFAULT);\n }\n}\n"
|
"public PaymentVoucher loadSelectedLines(PaymentVoucher paymentVoucher, PaymentVoucher paymentVoucherContext) throws AxelorException {\n LOG.debug(\"String_Node_Str\");\n List<PaymentInvoice> newPiList = Lists.newArrayList();\n if (paymentVoucherContext.getPaymentInvoiceList() != null) {\n List<PaymentInvoiceToPay> piToPayLine = new ArrayList<PaymentInvoiceToPay>();\n BigDecimal paidAmount = BigDecimal.ZERO;\n if (paymentVoucherContext.getPaidAmount() == null) {\n throw new AxelorException(String.format(\"String_Node_Str\", GeneralService.getExceptionAccountingMsg()), IException.MISSING_FIELD);\n } else {\n paidAmount = paymentVoucherContext.getPaidAmount();\n BigDecimal amountToPay = BigDecimal.ZERO;\n int lineSeq = 1;\n List<PaymentInvoice> pilSelected = new ArrayList<PaymentInvoice>();\n for (PaymentInvoice pilContext : paymentVoucherContext.getPaymentInvoiceList()) {\n PaymentInvoice paymentInvoiceFromContext = PaymentInvoice.find(pilContext.getId());\n LOG.debug(\"String_Node_Str\", paymentInvoiceFromContext);\n LOG.debug(\"String_Node_Str\", pilContext.isSelected());\n if (pilContext.isSelected()) {\n pilSelected.add(paymentInvoiceFromContext);\n } else {\n PaymentInvoice paymentInvoice = new PaymentInvoice();\n if (paymentInvoiceFromContext.getMoveLine() != null) {\n paymentInvoice.setMoveLine(paymentInvoiceFromContext.getMoveLine());\n }\n paymentInvoice.setInvoiceAmount(paymentInvoiceFromContext.getInvoiceAmount());\n paymentInvoice.setPaidAmount(paymentInvoiceFromContext.getPaidAmount());\n paymentInvoice.setPaymentVoucher(paymentInvoiceFromContext.getPaymentVoucher());\n newPiList.add(paymentInvoice);\n }\n }\n paymentVoucher.getPaymentInvoiceList().clear();\n paymentVoucher.getPaymentInvoiceToPayList().clear();\n if (pilSelected != null && !pilSelected.isEmpty()) {\n if (paymentVoucherContext.getPaymentInvoiceToPayList() != null) {\n for (PaymentInvoiceToPay pToPay : paymentVoucherContext.getPaymentInvoiceToPayList()) {\n PaymentInvoiceToPay piToPayFromContext = PaymentInvoiceToPay.find(pToPay.getId());\n PaymentInvoiceToPay piToPayOld = new PaymentInvoiceToPay();\n piToPayOld.setSequence(piToPayFromContext.getSequence());\n piToPayOld.setMoveLine(piToPayFromContext.getMoveLine());\n if (piToPayFromContext.getMoveLine() != null && piToPayFromContext.getMoveLine().getId() != null) {\n piToPayOld.setMoveLine(piToPayFromContext.getMoveLine());\n }\n piToPayOld.setTotalAmount(piToPayFromContext.getTotalAmount());\n piToPayOld.setRemainingAmount(piToPayFromContext.getRemainingAmount());\n piToPayOld.setAmountToPay(piToPayFromContext.getAmountToPay());\n piToPayOld.setPaymentVoucher(piToPayFromContext.getPaymentVoucher());\n piToPayLine.add(piToPayOld);\n if (paidAmount.compareTo(BigDecimal.ZERO) > 0) {\n paidAmount = paidAmount.subtract(piToPayFromContext.getAmountToPay());\n }\n lineSeq += 1;\n }\n }\n LOG.debug(\"String_Node_Str\", piToPayLine);\n LOG.debug(\"String_Node_Str\", pilSelected.size());\n for (PaymentInvoice pil : pilSelected) {\n PaymentInvoiceToPay piToPay = new PaymentInvoiceToPay();\n MoveLine moveLine = pil.getMoveLine();\n Move move = moveLine.getMove();\n BigDecimal amountRemainingConverted = null;\n if (move.getInvoice() != null) {\n amountRemainingConverted = currencyService.getAmountCurrencyConverted(move.getInvoice().getCurrency(), paymentVoucher.getCurrency(), pil.getInvoiceAmount().subtract(pil.getPaidAmount()), paymentVoucher.getPaymentDateTime().toLocalDate());\n piToPay.setCurrency(move.getInvoice().getCurrency());\n } else {\n amountRemainingConverted = currencyService.getAmountCurrencyConverted(move.getCurrency(), paymentVoucher.getCurrency(), pil.getInvoiceAmount().subtract(pil.getPaidAmount()), paymentVoucher.getPaymentDateTime().toLocalDate());\n piToPay.setCurrency(move.getCurrency());\n }\n amountToPay = paidAmount.min(amountRemainingConverted);\n piToPay.setSequence(lineSeq);\n piToPay.setMoveLine(moveLine);\n piToPay.setTotalAmount(pil.getInvoiceAmount());\n piToPay.setRemainingAmount(pil.getInvoiceAmount().subtract(pil.getPaidAmount()));\n piToPay.setAmountToPay(amountToPay);\n piToPay.setPaymentVoucher(paymentVoucher);\n piToPayLine.add(piToPay);\n paidAmount = paidAmount.subtract(amountToPay);\n lineSeq += 1;\n }\n }\n if (piToPayLine != null && !piToPayLine.isEmpty()) {\n paymentVoucher.getPaymentInvoiceToPayList().addAll(piToPayLine);\n }\n paymentVoucher.getPaymentInvoiceList().addAll(newPiList);\n }\n }\n paymentVoucher.save();\n LOG.debug(\"String_Node_Str\");\n return paymentVoucher;\n}\n"
|
"protected void updateColorImage() {\n Display display = fButton.getDisplay();\n GC gc = new GC(fImage);\n if (fColor != null) {\n fColor.dispose();\n }\n if (fColorValue == null) {\n gc.setBackground(fButton.getBackground());\n gc.fillRectangle(1, 3, fExtent.x - 2, fExtent.y - 5);\n } else {\n gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));\n gc.drawRectangle(0, 2, fExtent.x - 1, fExtent.y - 4);\n fColor = new Color(display, fColorValue);\n gc.setBackground(fColor);\n gc.fillRectangle(1, 3, fExtent.x - 2, fExtent.y - 5);\n }\n gc.dispose();\n fButton.setImage(fImage);\n}\n"
|
"public IResultObject[] readData(InputStream bis, int length, StopSign stopSign) throws IOException {\n ResultObject[] rowDatas = new ResultObject[length];\n int rowLen;\n byte[] rowDataBytes;\n ByteArrayInputStream bais;\n DataInputStream dis;\n for (int i = 0; i < length; i++) {\n if (stopSign != null && stopSign.isStopped())\n break;\n rowLen = IOUtil.readInt(bis);\n rowDataBytes = new byte[rowLen];\n bis.read(rowDataBytes);\n bais = new ByteArrayInputStream(rowDataBytes);\n dis = new DataInputStream(bais);\n Object[] obs = new Object[columnCount];\n for (int j = 0; j < columnCount; j++) {\n Class fieldType = typeArray[j];\n if (dis.readByte() == 0) {\n obs[j] = null;\n continue;\n }\n if (fieldType.equals(Integer.class))\n obs[j] = new Integer(dis.readInt());\n else if (fieldType.equals(Double.class))\n obs[j] = new Double(dis.readDouble());\n else if (fieldType.equals(BigDecimal.class))\n obs[j] = new BigDecimal(dis.readUTF());\n else if (fieldType.equals(Time.class))\n obs[j] = new Time(dis.readLong());\n else if (fieldType.equals(Timestamp.class))\n obs[j] = new Timestamp(dis.readLong());\n else if (fieldType.equals(java.sql.Date.class))\n obs[j] = new java.sql.Date(dis.readLong());\n else if (fieldType.isAssignableFrom(Date.class))\n obs[j] = new Date(dis.readLong());\n else if (fieldType.equals(Boolean.class))\n obs[j] = new Boolean(dis.readBoolean());\n else if (fieldType.equals(String.class))\n obs[j] = IOUtil.readString(dis);\n else if (fieldType.equals(IClob.class))\n obs[j] = IOUtil.readString(dis);\n else if (fieldType.equals(Blob.class)) {\n int len = IOUtil.readInt(dis);\n if (len == 0) {\n obs[j] = null;\n } else {\n byte[] bytes = new byte[len];\n dis.read(bytes);\n obs[j] = bytes;\n }\n } else if (fieldType.equals(DataType.getClass(DataType.ANY_TYPE))) {\n ObjectInputStream ois = new ObjectInputStream(dis);\n try {\n obs[j] = ois.readObject();\n } catch (Exception e) {\n }\n ois.close();\n }\n }\n rowDatas[i] = newResultObject(obs);\n rowDataBytes = null;\n dis = null;\n bais = null;\n }\n return rowDatas;\n}\n"
|
"protected void registerIdFromUpdateRecord(long id) {\n highestUpdateRecordId = Math.max(highestUpdateRecordId, id + 1);\n}\n"
|
"public JsonResult<String> getInputType() {\n JsonObject listObject = new JsonObject();\n JsonArray jsonArray = new JsonArray();\n for (FieldInputType fieldInputType : FieldInputType.values()) {\n JsonObject jsonObject = new JsonObject();\n jsonObject.addProperty(\"String_Node_Str\", fieldInputType.name());\n jsonObject.addProperty(\"String_Node_Str\", fieldInputType.getDesc());\n jsonArray.add(jsonObject);\n }\n listObject.add(\"String_Node_Str\", jsonArray);\n return JsonResult.success(listObject.toString());\n}\n"
|
"public CompletionTask createTask(int queryType, JTextComponent component) {\n return createCompletionTask(component);\n}\n"
|
"public boolean onCreate() {\n super.onCreate();\n final Context context = getContext();\n mOpenHelper = (OpenHelper) getOpenHelper();\n mGlobalSearchSupport = new GlobalSearchSupport(this);\n mLegacyApiSupport = new LegacyApiSupport(context, mOpenHelper, this, mGlobalSearchSupport);\n mContactAggregator = new ContactAggregator(this, mOpenHelper, mAggregationScheduler);\n final SQLiteDatabase db = mOpenHelper.getReadableDatabase();\n mSetPrimaryStatement = db.compileStatement(\"String_Node_Str\" + Tables.DATA + \"String_Node_Str\" + Data.IS_PRIMARY + \"String_Node_Str\" + \"String_Node_Str\" + DataColumns.MIMETYPE_ID + \"String_Node_Str\" + \"String_Node_Str\" + Data.RAW_CONTACT_ID + \"String_Node_Str\");\n mSetSuperPrimaryStatement = db.compileStatement(\"String_Node_Str\" + Tables.DATA + \"String_Node_Str\" + Data.IS_SUPER_PRIMARY + \"String_Node_Str\" + Data._ID + \"String_Node_Str\" + \"String_Node_Str\" + DataColumns.MIMETYPE_ID + \"String_Node_Str\" + \"String_Node_Str\" + Data.RAW_CONTACT_ID + \"String_Node_Str\" + \"String_Node_Str\" + RawContacts._ID + \"String_Node_Str\" + Tables.RAW_CONTACTS + \"String_Node_Str\" + RawContacts.CONTACT_ID + \"String_Node_Str\" + \"String_Node_Str\" + RawContacts.CONTACT_ID + \"String_Node_Str\" + Tables.RAW_CONTACTS + \"String_Node_Str\" + RawContacts._ID + \"String_Node_Str\");\n mLastTimeContactedUpdate = db.compileStatement(\"String_Node_Str\" + Tables.RAW_CONTACTS + \"String_Node_Str\" + RawContacts.TIMES_CONTACTED + \"String_Node_Str\" + RawContacts.TIMES_CONTACTED + \"String_Node_Str\" + RawContacts.LAST_TIME_CONTACTED + \"String_Node_Str\" + RawContacts.CONTACT_ID + \"String_Node_Str\");\n mRawContactDisplayNameUpdate = db.compileStatement(\"String_Node_Str\" + Tables.RAW_CONTACTS + \"String_Node_Str\" + RawContactsColumns.DISPLAY_NAME + \"String_Node_Str\" + RawContactsColumns.DISPLAY_NAME_SOURCE + \"String_Node_Str\" + \"String_Node_Str\" + RawContacts._ID + \"String_Node_Str\");\n mRawContactDirtyUpdate = db.compileStatement(\"String_Node_Str\" + Tables.RAW_CONTACTS + \"String_Node_Str\" + RawContacts.DIRTY + \"String_Node_Str\" + RawContacts._ID + \"String_Node_Str\");\n mAggregatedPresenceReplace = db.compileStatement(\"String_Node_Str\" + Tables.AGGREGATED_PRESENCE + \"String_Node_Str\" + AggregatedPresenceColumns.CONTACT_ID + \"String_Node_Str\" + Presence.PRESENCE_STATUS + \"String_Node_Str\" + Presence.PRESENCE_STATUS + \"String_Node_Str\" + \"String_Node_Str\" + Tables.PRESENCE + \"String_Node_Str\" + Tables.RAW_CONTACTS + \"String_Node_Str\" + PresenceColumns.RAW_CONTACT_ID + \"String_Node_Str\" + RawContactsColumns.CONCRETE_ID + \"String_Node_Str\" + RawContacts.CONTACT_ID + \"String_Node_Str\");\n mAggregatedPresenceStatusUpdate = db.compileStatement(\"String_Node_Str\" + Tables.AGGREGATED_PRESENCE + \"String_Node_Str\" + Presence.PRESENCE_CUSTOM_STATUS + \"String_Node_Str\" + \"String_Node_Str\" + AggregatedPresenceColumns.CONTACT_ID + \"String_Node_Str\");\n final Locale locale = Locale.getDefault();\n mNameSplitter = new NameSplitter(context.getString(com.android.internal.R.string.common_name_prefixes), context.getString(com.android.internal.R.string.common_last_name_prefixes), context.getString(com.android.internal.R.string.common_name_suffixes), context.getString(com.android.internal.R.string.common_name_conjunctions), locale);\n mPostalSplitter = new PostalSplitter(locale);\n mDataRowHandlers = new HashMap<String, DataRowHandler>();\n mDataRowHandlers.put(Email.CONTENT_ITEM_TYPE, new EmailDataRowHandler());\n mDataRowHandlers.put(Im.CONTENT_ITEM_TYPE, new CommonDataRowHandler(Im.CONTENT_ITEM_TYPE, Im.TYPE, Im.LABEL));\n mDataRowHandlers.put(Nickname.CONTENT_ITEM_TYPE, new CommonDataRowHandler(StructuredPostal.CONTENT_ITEM_TYPE, StructuredPostal.TYPE, StructuredPostal.LABEL));\n mDataRowHandlers.put(Organization.CONTENT_ITEM_TYPE, new OrganizationDataRowHandler());\n mDataRowHandlers.put(Phone.CONTENT_ITEM_TYPE, new PhoneDataRowHandler());\n mDataRowHandlers.put(Nickname.CONTENT_ITEM_TYPE, new NicknameDataRowHandler());\n mDataRowHandlers.put(StructuredName.CONTENT_ITEM_TYPE, new StructuredNameRowHandler(mNameSplitter));\n mDataRowHandlers.put(StructuredPostal.CONTENT_ITEM_TYPE, new StructuredPostalRowHandler(mPostalSplitter));\n mDataRowHandlers.put(GroupMembership.CONTENT_ITEM_TYPE, new GroupMembershipRowHandler());\n mDataRowHandlers.put(Photo.CONTENT_ITEM_TYPE, new PhotoDataRowHandler());\n if (isLegacyContactImportNeeded()) {\n importLegacyContactsAsync();\n }\n verifyAccounts();\n return (db != null);\n}\n"
|
"private void initCalculationTypeCombo(String dimensionName) {\n DimensionHandle handle = getCrosstabReportItemHandle().getCube().getDimension(dimensionName);\n String cal = calculationType.getText();\n isStatic = true;\n if (recentButton.getSelection()) {\n isStatic = false;\n }\n times = TimeFunctionManager.getCalculationTypes(handle, getUseLevels(dimensionName), true);\n String[] items = new String[times.size()];\n String[] names = new String[times.size()];\n for (int i = 0; i < times.size(); i++) {\n items[i] = times.get(i).getDisplayName();\n names[i] = times.get(i).getName();\n }\n calculationType.setItems(items);\n if (getBinding() == null) {\n calculationType.select(0);\n handleCalculationSelectEvent();\n } else {\n ITimeFunction function = getTimeFunctionByDisplaName(getBinding().getCalculationType());\n String name = function.getName();\n int itemIndex = getItemIndex(names, name);\n if (itemIndex >= 0) {\n calculationType.select(itemIndex);\n } else {\n calculationType.select(0);\n }\n handleCalculationSelectEvent();\n List<IArgumentInfo> infos = function.getArguments();\n for (int i = 0; i < infos.size(); i++) {\n String argName = infos.get(i).getName();\n if (calculationParamsMap.containsKey(argName)) {\n if (getArgumentValue(getBinding(), argName) != null) {\n Control control = calculationParamsMap.get(argName);\n ExpressionHandle obj = (ExpressionHandle) getArgumentValue(getBinding(), argName);\n if (infos.get(i).getPeriodChoices() == null || infos.get(i).getPeriodChoices().isEmpty()) {\n initExpressionButtonControl(control, obj);\n } else {\n Combo combo = (Combo) control;\n String str = obj.getStringExpression();\n if (str == null || str.length() == 0) {\n combo.select(0);\n } else {\n int comboIndex = getItemIndex(combo.getItems(), str);\n if (comboIndex >= 0) {\n combo.select(comboIndex);\n } else {\n combo.select(0);\n }\n }\n }\n }\n }\n }\n }\n}\n"
|
"private void registerEvents() {\n Bukkit.getPluginManager().registerEvents(new ecoBlockListener(this), this);\n Bukkit.getPluginManager().registerEvents(new ecoEntityListener(this), this);\n Bukkit.getPluginManager().registerEvents(new ecoDeathListener(this), this);\n if (deathTpPlusPlugin != null) {\n Bukkit.getPluginManager().registerEvents(new ecoStreakListener(), this);\n }\n}\n"
|
"public static void index() {\n if (Security.isConnected()) {\n Cities.index();\n }\n render();\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.