content
stringlengths
40
137k
"public DTWorkerParams doCompute(WorkerContext<DTMasterParams, DTWorkerParams> context) {\n if (context.isFirstIteration()) {\n return new DTWorkerParams();\n }\n DTMasterParams lastMasterResult = context.getLastMasterResult();\n final List<TreeNode> trees = lastMasterResult.getTrees();\n final Map<Integer, TreeNode> todoNodes = lastMasterResult.getTodoNodes();\n if (todoNodes == null) {\n return new DTWorkerParams();\n }\n Map<Integer, NodeStats> statistics = initTodoNodeStats(todoNodes);\n double trainError = 0d, validationError = 0d;\n if (this.isGBDT && !this.gbdtSampleWithReplacement && lastMasterResult.isSwitchToNextTree()) {\n this.random = new Random();\n }\n for (Data data : this.trainingData) {\n if (this.isRF) {\n for (TreeNode treeNode : trees) {\n Node predictNode = predictNodeIndex(treeNode.getNode(), data);\n if (predictNode.getPredict() != null) {\n trainError += data.significance * loss.computeError((float) (predictNode.getPredict().getPredict()), data.label);\n weightedTrainCount += data.significance;\n }\n }\n }\n if (this.isGBDT) {\n if (this.isContinuousEnabled && lastMasterResult.isContinuousRunningStart()) {\n recoverGBTData(context, data.output, data.predict, data);\n trainError += loss.computeError(data.predict, data.label);\n } else {\n int currTreeIndex = trees.size() - 1;\n if (lastMasterResult.isSwitchToNextTree()) {\n if (currTreeIndex >= 1) {\n Node node = trees.get(currTreeIndex - 1).getNode();\n Node predictNode = predictNodeIndex(node, data);\n if (predictNode.getPredict() != null) {\n double predict = predictNode.getPredict().getPredict();\n if (currTreeIndex == 1) {\n data.predict = (float) predict;\n } else {\n data.predict += (float) (this.learningRate * predict);\n }\n data.output = -1f * loss.computeGradient(data.predict, data.label);\n }\n if (!this.gbdtSampleWithReplacement) {\n if (random.nextDouble() <= modelConfig.getTrain().getBaggingSampleRate()) {\n data.subsampleWeights[currTreeIndex % data.subsampleWeights.length] = 1f;\n } else {\n data.subsampleWeights[currTreeIndex % data.subsampleWeights.length] = 0f;\n }\n }\n }\n }\n Node predictNode = predictNodeIndex(trees.get(currTreeIndex).getNode(), data);\n if (currTreeIndex >= 1) {\n trainError += loss.computeError(data.predict, data.label);\n } else {\n if (predictNode.getPredict() != null) {\n trainError += loss.computeError(((float) predictNode.getPredict().getPredict()), data.label);\n }\n }\n }\n }\n }\n if (validationData != null) {\n for (Data data : this.validationData) {\n if (this.isRF) {\n for (TreeNode treeNode : trees) {\n Node predictNode = predictNodeIndex(treeNode.getNode(), data);\n if (predictNode.getPredict() != null) {\n validationError += loss.computeError((float) (predictNode.getPredict().getPredict()), data.label);\n }\n }\n }\n if (this.isGBDT) {\n if (this.isContinuousEnabled && lastMasterResult.isContinuousRunningStart()) {\n recoverGBTData(context, data.output, data.predict, data);\n validationError += loss.computeError(data.predict, data.label);\n } else {\n int currTreeIndex = trees.size() - 1;\n if (lastMasterResult.isSwitchToNextTree()) {\n if (currTreeIndex >= 1) {\n Node node = trees.get(currTreeIndex - 1).getNode();\n Node predictNode = predictNodeIndex(node, data);\n if (predictNode.getPredict() != null) {\n double predict = predictNode.getPredict().getPredict();\n if (currTreeIndex == 1) {\n data.predict = (float) predict;\n } else {\n data.predict += (float) (this.learningRate * predict);\n }\n data.output = -1f * loss.computeGradient(data.predict, data.label);\n }\n if (!this.gbdtSampleWithReplacement) {\n if (random.nextDouble() <= modelConfig.getTrain().getBaggingSampleRate()) {\n data.subsampleWeights[currTreeIndex % data.subsampleWeights.length] = 1f;\n } else {\n data.subsampleWeights[currTreeIndex % data.subsampleWeights.length] = 0f;\n }\n }\n }\n }\n Node predictNode = predictNodeIndex(trees.get(currTreeIndex).getNode(), data);\n if (currTreeIndex >= 1) {\n validationError += loss.computeError(data.predict, data.label);\n } else {\n if (predictNode.getPredict() != null) {\n validationError += loss.computeError(((float) predictNode.getPredict().getPredict()), data.label);\n }\n }\n }\n }\n }\n }\n CompletionService<Map<Integer, NodeStats>> completionService = new ExecutorCompletionService<Map<Integer, NodeStats>>(this.threadPool);\n Set<Entry<Integer, TreeNode>> treeNodeEntrySet = todoNodes.entrySet();\n Iterator<Entry<Integer, TreeNode>> treeNodeIterator = treeNodeEntrySet.iterator();\n int roundNodeNumer = treeNodeEntrySet.size() / this.workerThreadCount;\n int modeNodeNumber = treeNodeEntrySet.size() % this.workerThreadCount;\n int realThreadCount = 0;\n LOG.info(\"String_Node_Str\", todoNodes.size());\n for (int i = 0; i < this.workerThreadCount; i++) {\n final Map<Integer, TreeNode> localTodoNodes = new HashMap<Integer, TreeNode>();\n final Map<Integer, NodeStats> localStatistics = new HashMap<Integer, DTWorkerParams.NodeStats>();\n for (int j = 0; j < roundNodeNumer; j++) {\n Entry<Integer, TreeNode> tmpTreeNode = treeNodeIterator.next();\n localTodoNodes.put(tmpTreeNode.getKey(), tmpTreeNode.getValue());\n localStatistics.put(tmpTreeNode.getKey(), statistics.get(tmpTreeNode.getKey()));\n }\n if (modeNodeNumber > 0) {\n Entry<Integer, TreeNode> tmpTreeNode = treeNodeIterator.next();\n localTodoNodes.put(tmpTreeNode.getKey(), tmpTreeNode.getValue());\n localStatistics.put(tmpTreeNode.getKey(), statistics.get(tmpTreeNode.getKey()));\n modeNodeNumber -= 1;\n }\n LOG.info(\"String_Node_Str\", i, localTodoNodes.size(), localStatistics.size());\n if (localTodoNodes.size() == 0) {\n continue;\n }\n realThreadCount += 1;\n completionService.submit(new Callable<Map<Integer, NodeStats>>() {\n public Map<Integer, NodeStats> call() throws Exception {\n List<Integer> nodeIndexes = new ArrayList<Integer>(trees.size());\n for (Data data : DTWorker.this.trainingData) {\n nodeIndexes.clear();\n if (DTWorker.this.isRF) {\n for (TreeNode treeNode : trees) {\n Node predictNode = predictNodeIndex(treeNode.getNode(), data);\n nodeIndexes.add(predictNode.getId());\n }\n }\n if (DTWorker.this.isGBDT) {\n int currTreeIndex = trees.size() - 1;\n Node predictNode = predictNodeIndex(trees.get(currTreeIndex).getNode(), data);\n nodeIndexes.add(predictNode.getId());\n }\n for (Map.Entry<Integer, TreeNode> entry : localTodoNodes.entrySet()) {\n Node todoNode = entry.getValue().getNode();\n int treeId = entry.getValue().getTreeId();\n int currPredictIndex = 0;\n if (DTWorker.this.isRF) {\n currPredictIndex = nodeIndexes.get(entry.getValue().getTreeId());\n }\n if (DTWorker.this.isGBDT) {\n currPredictIndex = nodeIndexes.get(0);\n }\n if (todoNode.getId() == currPredictIndex) {\n List<Integer> features = entry.getValue().getFeatures();\n if (features.isEmpty()) {\n features = getAllValidFeatures();\n }\n for (Integer columnNum : features) {\n ColumnConfig config = DTWorker.this.columnConfigList.get(columnNum);\n double[] featuerStatistic = localStatistics.get(entry.getKey()).getFeatureStatistics().get(columnNum);\n float weight = data.subsampleWeights[treeId % data.subsampleWeights.length];\n if (config.isNumerical()) {\n float value = data.numericInputs[DTWorker.this.numericInputIndexMap.get(columnNum)];\n int binIndex = getBinIndex(value, config.getBinBoundary());\n DTWorker.this.impurity.featureUpdate(featuerStatistic, binIndex, data.output, data.significance, weight);\n } else if (config.isCategorical()) {\n String category = data.categoricalInputs[DTWorker.this.categoricalInputIndexMap.get(columnNum)];\n Integer binIndex = DTWorker.this.categoryIndexMap.get(columnNum).get(category);\n if (binIndex == null) {\n binIndex = config.getBinCategory().size();\n }\n DTWorker.this.impurity.featureUpdate(featuerStatistic, binIndex, data.output, data.significance, weight);\n } else {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n }\n }\n }\n }\n return localStatistics;\n }\n });\n }\n int rCnt = 0;\n while (rCnt < realThreadCount) {\n try {\n statistics.putAll(completionService.take().get());\n } catch (ExecutionException e) {\n throw new RuntimeException(e);\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n rCnt += 1;\n }\n LOG.info(\"String_Node_Str\", count, trainError, statistics.size());\n return new DTWorkerParams(trainingData.size(), (this.validationData == null ? 0L : this.validationData.size()), trainError, validationError, statistics);\n}\n"
"public String getGeneologicalRelation() {\n if (pidx == aidx) {\n return \"String_Node_Str\";\n } else if (hasParent(aidx) && pidx == parents[aidx]) {\n return \"String_Node_Str\";\n } else if (pidx == -1) {\n return \"String_Node_Str\";\n } else if (aidx == -1) {\n return \"String_Node_Str\";\n } else if (parents[pidx] == aidx) {\n return \"String_Node_Str\";\n } else if (parents[pidx] == parents[aidx]) {\n return \"String_Node_Str\";\n } else if (DepTree.isAncestor(pidx, aidx, parents)) {\n return \"String_Node_Str\";\n } else if (DepTree.isAncestor(aidx, pidx, parents)) {\n return \"String_Node_Str\";\n } else {\n return \"String_Node_Str\";\n }\n}\n"
"static HdmiCecMessage buildReportPhysicalAddressCommand(int src, int address, int deviceType) {\n byte[] params = new byte[] { (byte) ((address >> 8) & 0xFF), (byte) (address & 0xFF), (byte) (deviceType & 0xFF) };\n return buildCommand(src, Constants.ADDR_BROADCAST, Constants.MESSAGE_REPORT_PHYSICAL_ADDRESS, params);\n}\n"
"public static List connect(String dbType, String url, String username, String pwd, final String driverClassNameArg, final String driverJarPathArg, String dbVersion, String additionalParams) throws Exception {\n Connection connection = null;\n DriverShim wapperDriver = null;\n List conList = new ArrayList();\n String driverClassName = driverClassNameArg;\n List<String> jarPathList = new ArrayList<String>();\n if (PluginChecker.isOnlyTopLoaded()) {\n if (StringUtils.isBlank(driverClassName)) {\n driverClassName = ExtractMetaDataUtils.getDriverClassByDbType(dbType);\n }\n IMetadataConnection mconn = new MetadataConnection();\n mconn.setUrl(url);\n mconn.setUsername(username);\n mconn.setPassword(pwd);\n mconn.setDbType(dbType);\n mconn.setDriverClass(driverClassName);\n mconn.setDriverJarPath(driverJarPathArg);\n mconn.setDbVersionString(dbVersion);\n mconn.setAdditionalParams(additionalParams);\n TypedReturnCode<Connection> checkConnection = MetadataConnectionUtils.checkConnection(mconn);\n if (checkConnection.isOk()) {\n conList.add(checkConnection.getObject());\n } else {\n throw new Exception(checkConnection.getMessage());\n }\n } else {\n ILibraryManagerService librairesManagerService = (ILibraryManagerService) GlobalServiceRegister.getDefault().getService(ILibraryManagerService.class);\n if ((driverJarPathArg == null || driverJarPathArg.equals(\"String_Node_Str\"))) {\n List<String> driverNames = EDatabaseVersion4Drivers.getDrivers(dbType, dbVersion);\n if (driverNames != null) {\n for (String jar : driverNames) {\n if (!new File(getJavaLibPath() + jar).exists()) {\n librairesManagerService.retrieve(jar, getJavaLibPath(), new NullProgressMonitor());\n }\n jarPathList.add(getJavaLibPath() + jar);\n }\n driverClassName = ExtractMetaDataUtils.getDriverClassByDbType(dbType);\n }\n } else {\n Set<String> jarsAvailable = librairesManagerService.list(new NullProgressMonitor());\n if (driverJarPathArg.contains(\"String_Node_Str\") || driverJarPathArg.startsWith(\"String_Node_Str\")) {\n if (driverJarPathArg.contains(\"String_Node_Str\")) {\n String[] jars = driverJarPathArg.split(\"String_Node_Str\");\n for (String jar : jars) {\n Path path = new Path(jar);\n if (jarsAvailable.contains(path.lastSegment())) {\n if (!new File(getJavaLibPath() + path.lastSegment()).exists()) {\n librairesManagerService.retrieve(path.lastSegment(), getJavaLibPath(), new NullProgressMonitor());\n }\n jarPathList.add(getJavaLibPath() + path.lastSegment());\n } else {\n jarPathList.add(jar);\n }\n }\n } else {\n Path path = new Path(driverJarPathArg);\n if (jarsAvailable.contains(path.lastSegment())) {\n String jarUnderLib = getJavaLibPath() + path.lastSegment();\n File file = new File(jarUnderLib);\n if (!file.exists()) {\n librairesManagerService.retrieve(path.lastSegment(), getJavaLibPath(), new NullProgressMonitor());\n }\n jarPathList.add(jarUnderLib);\n } else {\n jarPathList.add(driverJarPathArg);\n }\n }\n } else {\n if (driverJarPathArg.contains(\"String_Node_Str\")) {\n String[] jars = driverJarPathArg.split(\"String_Node_Str\");\n for (int i = 0; i < jars.length; i++) {\n if (!new File(getJavaLibPath() + jars[i]).exists()) {\n librairesManagerService.retrieve(jars[i], getJavaLibPath(), new NullProgressMonitor());\n }\n jarPathList.add(getJavaLibPath() + jars[i]);\n }\n } else {\n if (!new File(getJavaLibPath() + driverJarPathArg).exists()) {\n librairesManagerService.retrieve(driverJarPathArg, getJavaLibPath(), new NullProgressMonitor());\n }\n jarPathList.add(getJavaLibPath() + driverJarPathArg);\n }\n }\n }\n final String[] driverJarPath = jarPathList.toArray(new String[0]);\n if (driverClassName == null || driverClassName.equals(\"String_Node_Str\")) {\n driverClassName = ExtractMetaDataUtils.getDriverClassByDbType(dbType);\n if (dbType.equals(EDatabaseTypeName.ACCESS.getXmlName())) {\n ExtractMetaDataUtils.checkAccessDbq(url);\n }\n }\n List list = new ArrayList();\n ExtractMetaDataUtils.checkDBConnectionTimeout();\n if (dbType != null && dbType.equalsIgnoreCase(EDatabaseTypeName.GENERAL_JDBC.getXmlName())) {\n JDBCDriverLoader loader = new JDBCDriverLoader();\n list = loader.getConnection(driverJarPath, driverClassName, url, username, pwd, dbType, dbVersion, additionalParams);\n if (list != null && list.size() > 0) {\n for (int i = 0; i < list.size(); i++) {\n if (list.get(i) instanceof Connection) {\n connection = (Connection) list.get(i);\n }\n if (list.get(i) instanceof DriverShim) {\n wapperDriver = (DriverShim) list.get(i);\n }\n }\n }\n } else if (dbType != null && dbType.equalsIgnoreCase(EDatabaseTypeName.MSSQL.getDisplayName()) && \"String_Node_Str\".equals(username)) {\n String wapperDriverKey = EDatabase4DriverClassName.MSSQL.getDriverClass() + \"String_Node_Str\";\n String connectionKey = EDatabase4DriverClassName.MSSQL.getDriverClass() + \"String_Node_Str\";\n if (DRIVER_CACHE.containsKey(wapperDriverKey) && DRIVER_CACHE.containsKey(connectionKey)) {\n Object object1 = DRIVER_CACHE.get(wapperDriverKey);\n if (object1 != null && object1 instanceof DriverShim) {\n wapperDriver = (DriverShim) object1;\n }\n Object object2 = DRIVER_CACHE.get(connectionKey);\n if (object2 != null && object2 instanceof Connection) {\n connection = (Connection) object2;\n }\n } else {\n JDBCDriverLoader loader = new JDBCDriverLoader();\n list = loader.getConnection(driverJarPath, driverClassName, url, username, pwd, dbType, dbVersion, additionalParams);\n if (list != null && list.size() > 0) {\n for (int i = 0; i < list.size(); i++) {\n if (list.get(i) instanceof Connection) {\n connection = (Connection) list.get(i);\n }\n if (list.get(i) instanceof DriverShim) {\n wapperDriver = (DriverShim) list.get(i);\n }\n }\n DRIVER_CACHE.put(EDatabase4DriverClassName.MSSQL.getDriverClass(), wapperDriver);\n }\n }\n } else if (dbType != null && (isValidJarFile(driverJarPath) || dbType.equalsIgnoreCase(EDatabaseTypeName.GODBC.getXmlName()))) {\n JDBCDriverLoader loader = new JDBCDriverLoader();\n list = loader.getConnection(driverJarPath, driverClassName, url, username, pwd, dbType, dbVersion, additionalParams);\n if (list != null && list.size() > 0) {\n for (int i = 0; i < list.size(); i++) {\n if (list.get(i) instanceof Connection) {\n connection = (Connection) list.get(i);\n }\n if (list.get(i) instanceof DriverShim) {\n wapperDriver = (DriverShim) list.get(i);\n }\n }\n }\n } else {\n Class<?> klazz = Class.forName(driverClassName);\n Properties info = new Properties();\n info.put(\"String_Node_Str\", username);\n info.put(\"String_Node_Str\", pwd);\n if (dbType.equals(EDatabaseTypeName.ACCESS.getXmlName()) || dbType.equals(EDatabaseTypeName.GODBC.getXmlName())) {\n Charset systemCharset = CharsetToolkit.getInternalSystemCharset();\n if (systemCharset != null && systemCharset.displayName() != null) {\n info.put(\"String_Node_Str\", systemCharset.displayName());\n }\n }\n connection = ((Driver) klazz.newInstance()).connect(url, info);\n }\n if (connection == null) {\n throw new Exception(Messages.getString(\"String_Node_Str\"));\n }\n conList.add(connection);\n if (wapperDriver != null) {\n conList.add(wapperDriver);\n }\n }\n return conList;\n}\n"
"public void __process() throws Exception {\n outputFormat = BirtTagUtil.getFormat(viewer.getFormat());\n if (!outputFormat.equalsIgnoreCase(ParameterAccessor.PARAM_FORMAT_HTML) || BirtTagUtil.convertToBoolean(viewer.getForceParameterPrompting()) || viewer.isForceIFrame() || isContextChanged(viewer.getContextRoot())) {\n __processWithIFrame();\n return;\n }\n this.options = new InputOptions();\n options.setOption(InputOptions.OPT_REQUEST, (HttpServletRequest) pageContext.getRequest());\n options.setOption(InputOptions.OPT_LOCALE, this.locale);\n options.setOption(InputOptions.OPT_RTL, Boolean.valueOf(viewer.getRtl()));\n options.setOption(InputOptions.OPT_IS_MASTER_PAGE_CONTENT, Boolean.valueOf(viewer.getAllowMasterPage()));\n options.setOption(InputOptions.OPT_SVG_FLAG, Boolean.valueOf(viewer.getSvg()));\n options.setOption(InputOptions.OPT_FORMAT, outputFormat);\n options.setOption(InputOptions.OPT_IS_DESIGNER, new Boolean(false));\n options.setOption(InputOptions.OPT_SERVLET_PATH, IBirtConstants.SERVLET_PATH_PREVIEW);\n BirtReportServiceFactory.getReportService().setContext(pageContext.getServletContext(), this.options);\n reportDesignHandle = getDesignHandle();\n Collection parameterDefList = getReportService().getParameterDefinitions(this.reportDesignHandle, options, false);\n if (BirtUtility.validateParameters(parameterDefList, getParameterMap())) {\n __handleIFrame(viewer.createURI(IBirtConstants.VIEWER_PREVIEW), viewer.getId());\n } else {\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n __handleOutputReport(out);\n String content = out.toString();\n JspWriter writer = pageContext.getOut();\n if (viewer.isHostPage()) {\n writer.write(content);\n } else {\n writer.write(__handleStyle(content));\n writer.write(__handleScript(content));\n writer.write(\"String_Node_Str\" + viewer.getId() + \"String_Node_Str\" + __handleDivAppearance() + \"String_Node_Str\");\n writer.write(\"String_Node_Str\" + __handleBodyStyle(content) + \"String_Node_Str\");\n writer.write(__handleBody(content) + \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n }\n }\n}\n"
"protected DataBinding processStandardBindAttributes(Vector usedAtts, Element e) {\n usedAtts.addElement(ID_ATTR);\n usedAtts.addElement(NODESET_ATTR);\n usedAtts.addElement(\"String_Node_Str\");\n usedAtts.addElement(\"String_Node_Str\");\n usedAtts.addElement(\"String_Node_Str\");\n usedAtts.addElement(\"String_Node_Str\");\n usedAtts.addElement(\"String_Node_Str\");\n usedAtts.addElement(\"String_Node_Str\");\n usedAtts.addElement(\"String_Node_Str\");\n usedAtts.addElement(\"String_Node_Str\");\n usedAtts.addElement(\"String_Node_Str\");\n DataBinding binding = new DataBinding();\n binding.setId(e.getAttributeValue(\"String_Node_Str\", ID_ATTR));\n String nodeset = e.getAttributeValue(null, NODESET_ATTR);\n if (nodeset == null) {\n throw new XFormParseException(\"String_Node_Str\", e);\n }\n IDataReference ref;\n try {\n ref = new XPathReference(nodeset);\n } catch (XPathException xpe) {\n throw new XFormParseException(xpe.getMessage());\n }\n ref = getAbsRef(ref, _f);\n binding.setReference(ref);\n binding.setDataType(getDataType(e.getAttributeValue(null, \"String_Node_Str\")));\n String xpathRel = e.getAttributeValue(null, \"String_Node_Str\");\n if (xpathRel != null) {\n if (\"String_Node_Str\".equals(xpathRel)) {\n binding.relevantAbsolute = true;\n } else if (\"String_Node_Str\".equals(xpathRel)) {\n binding.relevantAbsolute = false;\n } else {\n Condition c = buildCondition(xpathRel, \"String_Node_Str\", ref);\n c = (Condition) _f.addTriggerable(c);\n binding.relevancyCondition = c;\n }\n }\n String xpathReq = e.getAttributeValue(null, \"String_Node_Str\");\n if (xpathReq != null) {\n if (\"String_Node_Str\".equals(xpathReq)) {\n binding.requiredAbsolute = true;\n } else if (\"String_Node_Str\".equals(xpathReq)) {\n binding.requiredAbsolute = false;\n } else {\n Condition c = buildCondition(xpathReq, \"String_Node_Str\", ref);\n c = (Condition) _f.addTriggerable(c);\n binding.requiredCondition = c;\n }\n }\n String xpathRO = e.getAttributeValue(null, \"String_Node_Str\");\n if (xpathRO != null) {\n if (\"String_Node_Str\".equals(xpathRO)) {\n binding.readonlyAbsolute = true;\n } else if (\"String_Node_Str\".equals(xpathRO)) {\n binding.readonlyAbsolute = false;\n } else {\n Condition c = buildCondition(xpathRO, \"String_Node_Str\", ref);\n c = (Condition) _f.addTriggerable(c);\n binding.readonlyCondition = c;\n }\n }\n String xpathConstr = e.getAttributeValue(null, \"String_Node_Str\");\n if (xpathConstr != null) {\n try {\n binding.constraint = new XPathConditional(xpathConstr);\n } catch (XPathSyntaxException xse) {\n throw new XFormParseException(\"String_Node_Str\" + nodeset + \"String_Node_Str\" + xpathConstr + \"String_Node_Str\" + xse.getMessage());\n }\n binding.constraintMessage = e.getAttributeValue(NAMESPACE_JAVAROSA, \"String_Node_Str\");\n }\n String xpathCalc = e.getAttributeValue(null, \"String_Node_Str\");\n if (xpathCalc != null) {\n Recalculate r;\n try {\n r = buildCalculate(xpathCalc, ref);\n } catch (XPathSyntaxException xpse) {\n throw new XFormParseException(\"String_Node_Str\" + nodeset + \"String_Node_Str\" + xpse.getMessage() + \"String_Node_Str\" + xpathCalc);\n }\n r = (Recalculate) _f.addTriggerable(r);\n binding.calculate = r;\n }\n binding.setPreload(e.getAttributeValue(NAMESPACE_JAVAROSA, \"String_Node_Str\"));\n binding.setPreloadParams(e.getAttributeValue(NAMESPACE_JAVAROSA, \"String_Node_Str\"));\n return binding;\n}\n"
"public static StackedRankColumnModel addYear(RankTableModel table, String title, Function<IRow, WorldUniversityYear> year, boolean addStars) {\n final StackedRankColumnModel stacked = new StackedRankColumnModel();\n stacked.setTitle(title);\n table.add(stacked);\n Color[] light = StephenFewColorPalette.getAsAWT(EBrightness.LIGHT);\n Color[] dark = StephenFewColorPalette.getAsAWT(EBrightness.MEDIUM);\n stacked.add(col(year, COL_academic, \"String_Node_Str\", dark[1], light[1]));\n stacked.add(col(year, COL_employer, \"String_Node_Str\", dark[2], light[2]));\n stacked.add(col(year, COL_faculty, \"String_Node_Str\", dark[3], light[3]));\n stacked.add(col(year, COL_citations, \"String_Node_Str\", dark[4], light[4]));\n stacked.add(col(year, COL_international, \"String_Node_Str\", dark[5], light[5]));\n stacked.add(col(year, COL_internationalstudents, \"String_Node_Str\", dark[6], light[6]));\n stacked.setDistributions(new float[] { 40, 10, 20, 20, 5, 5 });\n stacked.setWidth(300);\n if (addStars) {\n StarsRankColumnModel s = new StarsRankColumnModel(new ValueGetter(year, COL_QSSTARS), GLRenderers.drawText(\"String_Node_Str\", VAlign.CENTER), Color.decode(\"String_Node_Str\"), Color.decode(\"String_Node_Str\"), 6);\n table.add(s);\n }\n return stacked;\n}\n"
"public boolean removeCombinatorialDerivation(CombinatorialDerivation combinatorialDerivation) throws SBOLValidationException {\n if (complete) {\n for (CombinatorialDerivation cd : combinatorialDerivations.values()) {\n for (VariableComponent vc : cd.getVariableComponents()) {\n for (URI variantURI : vc.getVariantURIs()) if (variantURI.equals(combinatorialDerivation.getIdentity())) {\n throw new SBOLValidationException(\"String_Node_Str\", vc);\n }\n }\n }\n }\n return removeTopLevel(combinatorialDerivation, combinatorialDerivations);\n}\n"
"private void setData(int count, float range) {\n ArrayList<String> xVals = new ArrayList<String>();\n for (int i = 0; i < count; i++) {\n xVals.add((i) + \"String_Node_Str\");\n }\n ArrayList<Entry> yVals = new ArrayList<Entry>();\n for (int i = 10; i < count - 10; i++) {\n float mult = (range + 1);\n float val = (float) (Math.random() * mult) + 3;\n yVals.add(new Entry(val, i));\n }\n LineDataSet set1 = new LineDataSet(yVals, \"String_Node_Str\");\n set1.enableDashedLine(10f, 5f, 0f);\n set1.setColor(Color.BLACK);\n set1.setCircleColor(Color.BLACK);\n set1.setLineWidth(1f);\n set1.setCircleSize(3f);\n set1.setDrawCircleHole(false);\n set1.setValueTextSize(9f);\n set1.setFillAlpha(65);\n set1.setFillColor(Color.BLACK);\n ArrayList<LineDataSet> dataSets = new ArrayList<LineDataSet>();\n dataSets.add(set1);\n LineData data = new LineData(xVals, dataSets);\n LimitLine ll1 = new LimitLine(130f, \"String_Node_Str\");\n ll1.setLineWidth(4f);\n ll1.enableDashedLine(10f, 10f, 0f);\n ll1.setLabelPosition(LimitLabelPosition.POS_RIGHT);\n ll1.setTextSize(10f);\n LimitLine ll2 = new LimitLine(-30f, \"String_Node_Str\");\n ll2.setLineWidth(4f);\n ll2.enableDashedLine(10f, 10f, 0f);\n ll2.setLabelPosition(LimitLabelPosition.POS_RIGHT);\n ll2.setTextSize(10f);\n YAxis leftAxis = mChart.getAxisLeft();\n leftAxis.addLimitLine(ll1);\n leftAxis.addLimitLine(ll2);\n leftAxis.setAxisMaxValue(220f);\n leftAxis.setAxisMinValue(-50f);\n leftAxis.setStartAtZero(false);\n mChart.getAxisRight().setEnabled(false);\n mChart.setData(data);\n}\n"
"public static List<TermCountMessage> marshal(final List<TermCount> termCountList) {\n final List<TermCountMessage> ret = Lists.newArrayListWithCapacity(termCountList.size());\n for (final TermCount termCount : termCountList) {\n ret.add(TermCountMessage.newBuilder().setTerm(ImhotepClientMarshaller.marshal(termCount.getTerm())).setCount(termCount.getCount()).build());\n }\n return new GroupMultiRemapRule(protoRule.getTargetGroup(), protoRule.getNegativeGroup(), positiveGroups, conditions);\n}\n"
"private static PCollection<Read> getReadsFromBAMFile() throws IOException {\n LOG.info(\"String_Node_Str\");\n final Iterable<Contig> contigs = Contig.parseContigsFromCommandLine(options.getReferences());\n if (options.isShardBAMReading()) {\n LOG.info(\"String_Node_Str\" + options.getBAMFilePath());\n return ReadBAMTransform.getReadsFromBAMFilesSharded(p, auth, contigs, Collections.singletonList(options.getBAMFilePath()));\n } else {\n LOG.info(\"String_Node_Str\" + options.getBAMFilePath());\n return p.apply(Create.of(Reader.readSequentiallyForTesting(GCSOptions.Methods.createStorageClient(options, auth), options.getBAMFilePath(), contigs.iterator().next())));\n }\n}\n"
"public boolean equals(Object o) {\n if (!this.equalsIgnoringAttributes(o)) {\n return false;\n AbstractGenericSolution<?, ?> that = (AbstractGenericSolution<?, ?>) o;\n if (!attributes.equals(that.attributes))\n return false;\n if (!Arrays.equals(objectives, that.objectives))\n return false;\n if (!variables.equals(that.variables))\n return false;\n return true;\n}\n"
"public void nestedAggregateWithGroupbyTest() throws VerdictDBException {\n String sql = \"String_Node_Str\";\n NonValidatingSQLParser sqlToRelation = new NonValidatingSQLParser();\n SelectQuery selectQuery = (SelectQuery) sqlToRelation.toRelation(sql);\n QueryExecutionPlan queryExecutionPlan = new QueryExecutionPlan(newSchema, null, selectQuery);\n queryExecutionPlan.getRoot().print();\n ResultStandardOutputPrinter.run(ExecutablePlanRunner.getResultReader(conn, queryExecutionPlan));\n}\n"
"protected void defaultConfig() throws LifecycleException {\n long t1 = System.currentTimeMillis();\n if (defaultWebXml == null && context instanceof StandardContext) {\n defaultWebXml = ((StandardContext) context).getDefaultWebXml();\n }\n if (defaultWebXml == null)\n getDefaultWebXml();\n File file = new File(this.defaultWebXml);\n if (!file.isAbsolute()) {\n file = new File(getBaseDir(), this.defaultWebXml);\n }\n InputStream stream = null;\n InputSource source = null;\n try {\n if (!file.exists()) {\n stream = getClass().getClassLoader().getResourceAsStream(defaultWebXml);\n if (stream != null) {\n source = new InputSource(getClass().getClassLoader().getResource(defaultWebXml).toString());\n }\n if (stream == null) {\n stream = getClass().getClassLoader().getResourceAsStream(\"String_Node_Str\");\n if (stream != null) {\n source = new InputSource(getClass().getClassLoader().getResource(\"String_Node_Str\").toString());\n }\n }\n if (stream == null) {\n if (log.isLoggable(Level.INFO)) {\n log.info(\"String_Node_Str\");\n }\n return;\n }\n } else {\n source = new InputSource(\"String_Node_Str\" + file.getAbsolutePath());\n stream = new FileInputStream(file);\n }\n } catch (Exception e) {\n throw new LifecycleException(sm.getString(\"String_Node_Str\") + \"String_Node_Str\" + defaultWebXml + \"String_Node_Str\" + file, e);\n }\n synchronized (webDigester) {\n try {\n source.setByteStream(stream);\n webDigester.setDebug(getDebug());\n if (context instanceof StandardContext)\n ((StandardContext) context).setReplaceWelcomeFiles(true);\n webDigester.clear();\n webDigester.setClassLoader(this.getClass().getClassLoader());\n webDigester.setUseContextClassLoader(false);\n webDigester.push(context);\n webDigester.parse(source);\n } catch (SAXParseException e) {\n throw new LifecycleException(sm.getString(\"String_Node_Str\", e.getLineNumber(), e.getColumnNumber()), e);\n } catch (Exception e) {\n throw new LifecycleException(sm.getString(\"String_Node_Str\"), e);\n } finally {\n try {\n if (stream != null) {\n stream.close();\n }\n } catch (IOException e) {\n log.log(Level.SEVERE, sm.getString(\"String_Node_Str\"), e);\n }\n }\n }\n webRuleSet.recycle();\n long t2 = System.currentTimeMillis();\n if ((t2 - t1) > 200 && log.isLoggable(Level.FINE))\n log.fine(\"String_Node_Str\" + file + \"String_Node_Str\" + (t2 - t1));\n}\n"
"public void load(Element element) throws NCLParsingException {\n String att_name, att_var;\n try {\n att_name = NCLElementAttributes.ALIAS.toString();\n if (!(att_var = element.getAttribute(att_name)).isEmpty())\n setAlias(att_var);\n else\n throw new NCLParsingException(\"String_Node_Str\" + att_name + \"String_Node_Str\");\n att_name = NCLElementAttributes.DOCUMENTURI.toString();\n if (!(att_var = element.getAttribute(att_name)).isEmpty())\n setDocumentURI(new SrcType(att_var));\n else\n throw new NCLParsingException(\"String_Node_Str\" + att_name + \"String_Node_Str\");\n att_name = NCLElementAttributes.REGION.toString();\n if (!(att_var = element.getAttribute(att_name)).isEmpty()) {\n setRegion((Er) NCLReferenceManager.getInstance().findRegionReference(impl.getDoc(), att_var));\n }\n try {\n Ed aux = createDoc();\n URI base = new URI(impl.getDoc().getLocation() + File.separator);\n URI path = base.resolve(getDocumentURI().parse());\n aux.loadXML(new File(path.getPath()));\n setImportedDoc(aux);\n } catch (Exception e) {\n throw new NCLParsingException(\"String_Node_Str\" + getDocumentURI().parse());\n }\n } catch (XMLException ex) {\n String aux = getAlias();\n if (aux != null)\n aux = \"String_Node_Str\" + aux + \"String_Node_Str\";\n else\n aux = \"String_Node_Str\";\n throw new NCLParsingException(type.toString() + aux + \"String_Node_Str\" + ex.getMessage());\n }\n}\n"
"public Double getUpperDouble() {\n return (Double) upperNumber;\n}\n"
"private void parseValue() {\n if (ignoreTrailingWhitespace) {\n while (ch != delimiter && ch != newLine) {\n output.appender.appendIgnoringWhitespace(ch);\n ch = input.nextChar();\n }\n } else {\n while (ch != delimiter && ch != newLine && ch != '\\0') {\n output.appender.append(ch);\n ch = input.nextChar();\n }\n }\n}\n"
"public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {\n moduleName = in.readUTF();\n wm = WorkManagerFactoryImpl.retrieveWorkManager(moduleName);\n _logger = LogDomains.getLogger(WorkManagerProxy.class, LogDomains.RSR_LOGGER);\n}\n"
"private void initAirlineSpecs() {\n if (packageType == PackageType.COMMAND_LINE) {\n airlineSpec = new DeployableServiceSpec(serviceType, packageType, null, null, AIRLINE_JAR, AIRLINE_PORT, AIRLINE, 1);\n } else {\n airlineSpec = new DeployableServiceSpec(serviceType, packageType, null, null, AIRLINE_WAR, AIRLINE, 1);\n }\n List<String> roles = new ArrayList<String>();\n roles.add(AIRLINE);\n airlineChoreographyServiceSpec = new ChoreographyServiceSpec(airlineSpec, null, null, roles, AIRLINE);\n}\n"
"public Semaphore getSemaphore() {\n return mSemaphore;\n}\n"
"public void visit(Node node) {\n logger.log(Level.FINEST, \"String_Node_Str\", node);\n this.nameNodeSet.add(node.getNodeName());\n NodeList children = node.getChildNodes();\n if (children != null) {\n int noOfNodes = children.getLength();\n for (int i = 0; i < noOfNodes; i++) {\n Node tmpNode = children.item(i);\n this.nameNodeSet.add(tmpNode.getNodeName());\n visit(tmpNode);\n }\n }\n}\n"
"public void testGetArtifactListFromType() throws OseeCoreException {\n Set<Artifact> searchedArtifacts = new LinkedHashSet<Artifact>();\n List<Branch> branches = BranchManager.getBranches(new BranchFilter(BranchType.BASELINE));\n for (IOseeBranch branch : branches) {\n List<Artifact> results = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.SoftwareRequirement, branch, DeletionFlag.INCLUDE_DELETED);\n searchedArtifacts.addAll(results);\n }\n Assert.assertTrue(\"String_Node_Str\", searchedArtifacts.size() > 0);\n String firstGuid = \"String_Node_Str\";\n Boolean pass = false;\n for (Artifact a : searchedArtifacts) {\n if (\"String_Node_Str\" == firstGuid) {\n firstGuid = a.getBranchGuid();\n } else {\n if (firstGuid != a.getBranchGuid()) {\n pass = true;\n break;\n }\n }\n }\n Assert.assertTrue(\"String_Node_Str\", pass);\n}\n"
"public static void setupTests() {\n ModelManager mManager = Factory.getModelManager();\n fSet = mManager.buildFeatureSet().setReference(mManager.buildReference().setName(\"String_Node_Str\").build()).build();\n Set<Feature> testFeatures = new HashSet<Feature>();\n f1 = mManager.buildFeature().setStart(1000000).setStop(1000100).build();\n f2 = mManager.buildFeature().setStart(1000200).setStop(1000300).build();\n f3 = mManager.buildFeature().setStart(1000400).setStop(1000500).build();\n testFeatures.add(f1);\n testFeatures.add(f2);\n testFeatures.add(f3);\n fSet.add(testFeatures);\n tSet1 = mManager.buildTagSet().setName(\"String_Node_Str\").build();\n tSet2 = mManager.buildTagSet().setName(\"String_Node_Str\").build();\n rSet = mManager.buildReferenceSet().setName(\"String_Node_Str\").setOrganism(\"String_Node_Str\").build();\n aSet = mManager.buildAnalysisSet().setName(\"String_Node_Str\").setDescription(\"String_Node_Str\").build();\n a = mManager.buildAnalysis().setParameters(new ArrayList<Object>()).setPlugin(new InMemoryFeaturesAllPlugin()).build();\n r1 = mManager.buildReference().setName(\"String_Node_Str\").build();\n rSet.add(r1);\n group = mManager.buildGroup().setName(\"String_Node_Str\").setDescription(\"String_Node_Str\").build();\n u1 = mManager.buildUser().setFirstName(\"String_Node_Str\").setLastName(\"String_Node_Str\").setEmailAddress(\"String_Node_Str\").setPassword(\"String_Node_Str\").build();\n group.add(u1);\n t1a = mManager.buildTag().setKey(\"String_Node_Str\").build();\n t1b = mManager.buildTag().setKey(\"String_Node_Str\").setPredicate(\"String_Node_Str\").build();\n t1c = mManager.buildTag().setKey(\"String_Node_Str\").setPredicate(\"String_Node_Str\").setValue(\"String_Node_Str\").build();\n t2a = mManager.buildTag().setKey(\"String_Node_Str\").build();\n t2b = mManager.buildTag().setKey(\"String_Node_Str\").setPredicate(\"String_Node_Str\").build();\n t2c = mManager.buildTag().setKey(\"String_Node_Str\").setPredicate(\"String_Node_Str\").setValue(\"String_Node_Str\").build();\n t3a = mManager.buildTag().setKey(\"String_Node_Str\").build();\n fSet.associateTag(t2a);\n fSet.associateTag(t2b);\n fSet.associateTag(t2c);\n a.associateTag(t3a);\n f1.associateTag(t1a);\n f2.associateTag(t1b);\n f3.associateTag(t1c);\n tSet1.associateTag(t3a);\n aSet.associateTag(t2a);\n rSet.associateTag(t2a);\n r1.associateTag(t2a);\n group.associateTag(t2b);\n u1.associateTag(t2b);\n mManager.flush();\n}\n"
"public void setFieldBinary(byte[] fieldBinary) {\n realmSetter$fieldBinary(fieldBinary);\n}\n"
"public synchronized TooltipPainter setUnlimitedWidth() {\n this.isFixedWidth = false;\n this.resetTextLayout();\n return this;\n}\n"
"public void testFindWithOutClusterName() {\n final Specification<Job> spec = JobSpecs.find(ID, JOB_NAME, USER_NAME, JobStatus.INIT, TAGS, null, CLUSTER_ID);\n spec.toPredicate(this.root, this.cq, this.cb);\n Mockito.verify(this.cb, Mockito.times(1)).like(this.root.get(Job_.id), ID);\n Mockito.verify(this.cb, Mockito.times(1)).like(this.root.get(Job_.name), JOB_NAME);\n Mockito.verify(this.cb, Mockito.times(1)).equal(this.root.get(Job_.user), USER_NAME);\n Mockito.verify(this.cb, Mockito.times(1)).equal(this.root.get(Job_.status), JobStatus.INIT);\n Mockito.verify(this.cb, Mockito.never()).equal(this.root.get(Job_.executionClusterName), CLUSTER_NAME);\n Mockito.verify(this.cb, Mockito.times(1)).equal(this.root.get(Job_.executionClusterId), CLUSTER_ID);\n}\n"
"public void testGetPublishingEvent() throws Exception {\n ContentReader reader = mock(ContentReader.class);\n InputStream inputStream = mock(InputStream.class);\n when(reader.getContentInputStream()).thenReturn(inputStream);\n when(contentService.getReader(any(NodeRef.class), any(QName.class))).thenReturn(reader);\n PublishingPackageSerializer serializer = mock(PublishingPackageSerializer.class);\n helper.setSerializer(serializer);\n PublishingEvent result = helper.getPublishingEvent((NodeRef) null);\n assertNull(result);\n String comment = \"String_Node_Str\";\n Status status = Status.COMPLETED;\n Date modified = new Date();\n Date created = new Date(modified.getTime() - 3600000);\n String creatorName = \"String_Node_Str\";\n String modifierName = \"String_Node_Str\";\n Calendar schedule = Calendar.getInstance();\n schedule.add(Calendar.MONTH, 6);\n Date scheduledTime = schedule.getTime();\n String scheduledTimeZone = schedule.getTimeZone().getID();\n Map<QName, Serializable> props = new HashMap<QName, Serializable>();\n props.put(PROP_PUBLISHING_EVENT_COMMENT, comment);\n props.put(PROP_PUBLISHING_EVENT_STATUS, status.name());\n props.put(PROP_PUBLISHING_EVENT_TIME, scheduledTime);\n props.put(PROP_PUBLISHING_EVENT_TIME_ZONE, scheduledTimeZone);\n props.put(ContentModel.PROP_CREATED, created);\n props.put(ContentModel.PROP_CREATOR, creatorName);\n props.put(ContentModel.PROP_MODIFIED, modified);\n props.put(ContentModel.PROP_MODIFIER, modifierName);\n NodeRef eventNode = new NodeRef(\"String_Node_Str\");\n when(nodeService.getProperties(eventNode)).thenReturn(props);\n result = helper.getPublishingEvent(eventNode);\n assertEquals(eventNode.toString(), result.getId());\n assertEquals(comment, result.getComment());\n assertEquals(status, result.getStatus());\n assertEquals(schedule, result.getScheduledTime());\n assertEquals(created, result.getCreatedTime());\n assertEquals(creatorName, result.getCreator());\n assertEquals(modified, result.getModifiedTime());\n assertEquals(modifierName, result.getModifier());\n}\n"
"private void handleRequestError(int responseCode) {\n System.out.println(responseCode);\n repeatRequestOrShowResults(true);\n}\n"
"public static String readFile(File file, boolean useSystemLineSeparator) {\n StringBuffer stringBuffer = new StringBuffer();\n try {\n BufferedReader in = new BufferedReader(new FileReader(file));\n String str = null;\n try {\n while ((str = in.readLine()) != null) {\n stringBuffer.append(str).append(nl);\n }\n } finally {\n if (in != null) {\n in.close();\n }\n }\n } catch (IOException exception) {\n throw new RuntimeException(exception);\n }\n int length = stringBuffer.length();\n if (length > 0) {\n stringBuffer.deleteCharAt(length - 1);\n }\n return stringBuffer.toString();\n}\n"
"Map<String, PropertyType> getTableFor(SchemaTable schemaTable) {\n Preconditions.checkArgument(schemaTable.getTable().startsWith(VERTEX_PREFIX) || schemaTable.getTable().startsWith(EDGE_PREFIX), \"String_Node_Str\", SchemaManager.VERTEX_PREFIX, SchemaManager.EDGE_PREFIX);\n if (schemaTable.isVertexTable()) {\n Optional<VertexLabel> vertexLabelOptional = getVertexLabel(schemaTable.withOutPrefix().getTable());\n if (vertexLabelOptional.isPresent()) {\n return vertexLabelOptional.get().getPropertyTypeMap();\n }\n } else {\n Optional<EdgeLabel> edgeLabelOptional = getEdgeLabel(schemaTable.getTable());\n if (edgeLabelOptional.isPresent()) {\n return edgeLabelOptional.get().getPropertyTypeMap();\n }\n }\n return Collections.emptyMap();\n}\n"
"protected DataType<?>[][] getDataTypeArray() {\n DataType<?>[][] dataTypes = new DataType[5][];\n dataTypes[AttributeTypeInternal.INSENSITIVE] = new DataType[inputStatic.getHeader().length];\n dataTypes[AttributeTypeInternal.SENSITIVE] = new DataType[inputAnalyzed.getHeader().length];\n dataTypes[AttributeTypeInternal.QUASI_IDENTIFYING_GENERALIZED] = new DataType[outputGeneralized.getHeader().length];\n dataTypes[AttributeTypeInternal.QUASI_IDENTIFYING_MICROAGGREGATED] = new DataType[outputMicroaggregated.getHeader().length];\n dataTypes[AttributeTypeInternal.IDENTIFYING] = null;\n for (int i = 0; i < dataTypes.length; i++) {\n final DataType<?>[] type = dataTypes[i];\n String[] header = null;\n switch(i) {\n case AttributeTypeInternal.INSENSITIVE:\n header = dataIS.getHeader();\n break;\n case AttributeTypeInternal.QUASI_IDENTIFYING_GENERALIZED:\n header = dataGH.getHeader();\n break;\n case AttributeTypeInternal.SENSITIVE:\n header = dataDI.getHeader();\n break;\n case AttributeTypeInternal.QUASI_IDENTIFYING_MICROAGGREGATED:\n header = dataOT.getHeader();\n break;\n }\n if (type != null) {\n for (int j = 0; j < type.length; j++) {\n dataTypes[i][j] = definition.getDataType(header[j]);\n if ((i == AttributeTypeInternal.QUASI_IDENTIFYING_GENERALIZED && node.getTransformation()[j] > 0) || (i == AttributeTypeInternal.QUASI_IDENTIFYING_MICROAGGREGATED && !definition.getMicroAggregationFunction(header[j]).isTypePreserving())) {\n dataTypes[i][j] = DataType.STRING;\n }\n }\n }\n }\n return dataTypes;\n}\n"
"public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) {\n if (!(sender instanceof Player)) {\n sender.sendMessage(MessageUtils.mustBeIngameMessage);\n return true;\n }\n Player player = (Player) sender;\n HumanNPC npc = null;\n boolean returnval = false;\n if (NPCManager.validateSelected((Player) sender)) {\n npc = NPCManager.get(NPCManager.selectedNPCs.get(player.getName()));\n } else {\n player.sendMessage(ChatColor.RED + MessageUtils.mustHaveNPCSelectedMessage);\n return true;\n }\n if (!npc.isTrader()) {\n player.sendMessage(ChatColor.RED + \"String_Node_Str\");\n return true;\n }\n if (args.length == 1 && args[0].equalsIgnoreCase(\"String_Node_Str\")) {\n if (Permission.canUse(player, npc, \"String_Node_Str\")) {\n HelpUtils.sendTraderHelp(sender);\n } else {\n player.sendMessage(MessageUtils.noPermissionsMessage);\n }\n returnval = true;\n } else if (args.length >= 2 && args[0].contains(\"String_Node_Str\") && (args[1].contains(\"String_Node_Str\") || args[1].contains(\"String_Node_Str\"))) {\n if (Permission.canUse(player, npc, \"String_Node_Str\")) {\n displayList(player, npc, args, args[1].contains(\"String_Node_Str\"));\n } else {\n player.sendMessage(MessageUtils.noPermissionsMessage);\n }\n returnval = true;\n } else if (args.length == 1 && args[0].contains(\"String_Node_Str\")) {\n if (Permission.canUse(player, npc, \"String_Node_Str\")) {\n if (!EconomyHandler.useIconomy())\n player.sendMessage(MessageUtils.noEconomyMessage);\n else\n displayMoney(player, npc);\n } else\n player.sendMessage(MessageUtils.noPermissionsMessage);\n returnval = true;\n }\n if (!NPCManager.validateOwnership(player, npc.getUID())) {\n if (!returnval) {\n player.sendMessage(MessageUtils.notOwnerMessage);\n }\n return true;\n } else {\n if (args.length == 3 && args[0].equalsIgnoreCase(\"String_Node_Str\")) {\n if (Permission.canModify(player, npc, \"String_Node_Str\")) {\n if (!EconomyHandler.useIconomy()) {\n player.sendMessage(ChatColor.GRAY + \"String_Node_Str\");\n } else {\n changeBalance(player, npc, args);\n }\n } else {\n player.sendMessage(MessageUtils.noPermissionsMessage);\n }\n returnval = true;\n } else if (args.length == 3 && (args[0].contains(\"String_Node_Str\") || args[0].contains(\"String_Node_Str\"))) {\n if (Permission.canModify(player, npc, \"String_Node_Str\")) {\n changeTraderStock(player, npc, args[1], args[2], args[0].contains(\"String_Node_Str\"));\n } else {\n player.sendMessage(MessageUtils.noPermissionsMessage);\n }\n returnval = true;\n } else if (args.length == 2 && (args[0].contains(\"String_Node_Str\"))) {\n if (Permission.canModify(player, npc, \"String_Node_Str\")) {\n changeUnlimited(npc, sender, args[1]);\n } else {\n player.sendMessage(MessageUtils.noPermissionsMessage);\n }\n returnval = true;\n }\n PropertyManager.save(npc);\n }\n return returnval;\n}\n"
"public void shouldPresent_AnotherError_IntoView() throws Exception {\n Flowable<FactAboutNumber> broken = Flowable.error(new IllegalAccessError(\"String_Node_Str\"));\n when(usecase.fetchTrivia()).thenReturn(broken);\n presenter.fetchRandomFacts();\n BehavioursVerifier.with(view).showLoadingFirstHideLoadingAfter().shouldShowErrorState().shouldNotShowEmptyState();\n DataFlowWatcher.with(onNext, onError, onCompleted).shouldFinishWithError();\n verify(strategist, atLeastOnce()).applyStrategy(any());\n}\n"
"public SortedMap<ArtifactDescriptor, PluginClass> apply(DatasetContext<Table> context) throws Exception {\n Table table = context.get();\n SortedMap<ArtifactDescriptor, PluginClass> result = new TreeMap<>();\n ArtifactCell parentCell = new ArtifactCell(parentArtifactId);\n byte[] parentDataBytes = table.get(parentCell.rowkey, parentCell.column);\n if (parentDataBytes == null) {\n return null;\n }\n ArtifactData parentData = gson.fromJson(Bytes.toString(parentDataBytes), ArtifactData.class);\n Set<PluginClass> parentPlugins = parentData.meta.getClasses().getPlugins();\n for (PluginClass pluginClass : parentPlugins) {\n if (pluginClass.getName().equals(name) && pluginClass.getType().equals(type)) {\n ArtifactDescriptor parentDescriptor = new ArtifactDescriptor(parentArtifactId.toArtifactId(), locationFactory.create(parentData.locationURI));\n result.put(parentDescriptor, pluginClass);\n break;\n }\n }\n PluginKey pluginKey = new PluginKey(parentArtifactId.getNamespace(), parentArtifactId.getName(), type, name);\n Row row = context.get().get(pluginKey.getRowKey());\n if (!row.isEmpty()) {\n for (Map.Entry<byte[], byte[]> column : row.getColumns().entrySet()) {\n ArtifactColumn artifactColumn = ArtifactColumn.parse(column.getKey());\n PluginData pluginData = gson.fromJson(Bytes.toString(column.getValue()), PluginData.class);\n if (pluginData.usableBy.versionIsInRange(parentArtifactId.getVersion())) {\n ArtifactDescriptor artifactInfo = new ArtifactDescriptor(artifactColumn.artifactId.toArtifactId(), locationFactory.create(pluginData.artifactLocationURI));\n result.put(artifactInfo, pluginData.pluginClass);\n }\n }\n }\n return result;\n}\n"
"protected AbstractVariable processFieldInstruction(SimpleName fieldInstructionName, VariableDeclaration parameterDeclaration, AbstractVariable previousVariable) {\n VariableDeclaration variableDeclaration = null;\n IBinding binding = fieldInstructionName.resolveBinding();\n if (binding.getKind() == IBinding.VARIABLE) {\n IVariableBinding variableBinding = (IVariableBinding) binding;\n if (variableBinding.isField()) {\n ITypeBinding declaringClassBinding = variableBinding.getDeclaringClass();\n SystemObject systemObject = ASTReader.getSystemObject();\n ClassObject classObject = systemObject.getClassObject(declaringClassBinding.getQualifiedName());\n if (classObject != null) {\n ListIterator<FieldObject> fieldIterator = classObject.getFieldIterator();\n while (fieldIterator.hasNext()) {\n FieldObject fieldObject = fieldIterator.next();\n VariableDeclarationFragment fragment = fieldObject.getVariableDeclarationFragment();\n if (fragment.resolveBinding().isEqualTo(variableBinding)) {\n variableDeclaration = fragment;\n break;\n }\n }\n }\n } else if (variableBinding.isParameter() && parameterDeclaration != null) {\n if (parameterDeclaration.resolveBinding().isEqualTo(variableBinding))\n variableDeclaration = parameterDeclaration;\n } else {\n for (VariableDeclaration declaration : variableDeclarationsInMethod) {\n if (declaration.resolveBinding().isEqualTo(variableBinding)) {\n variableDeclaration = declaration;\n break;\n }\n }\n }\n }\n if (variableDeclaration != null) {\n AbstractVariable currentVariable = null;\n if (previousVariable == null)\n currentVariable = new PlainVariable(variableDeclaration);\n else\n currentVariable = new CompositeVariable(variableDeclaration, previousVariable);\n if (fieldInstructionName.getParent() instanceof QualifiedName) {\n QualifiedName qualifiedName = (QualifiedName) fieldInstructionName.getParent();\n Name qualifier = qualifiedName.getQualifier();\n if (qualifier instanceof SimpleName) {\n SimpleName qualifierSimpleName = (SimpleName) qualifier;\n if (!qualifierSimpleName.equals(fieldInstructionName))\n return processFieldInstruction(qualifierSimpleName, parameterDeclaration, currentVariable);\n else\n return currentVariable;\n } else if (qualifier instanceof QualifiedName) {\n QualifiedName qualifiedName2 = (QualifiedName) qualifier;\n return processFieldInstruction(qualifiedName2.getName(), parameterDeclaration, currentVariable);\n }\n } else if (fieldInstructionName.getParent() instanceof FieldAccess) {\n FieldAccess fieldAccess = (FieldAccess) fieldInstructionName.getParent();\n Expression fieldAccessExpression = fieldAccess.getExpression();\n if (fieldAccessExpression instanceof FieldAccess) {\n FieldAccess fieldAccess2 = (FieldAccess) fieldAccessExpression;\n return processFieldInstruction(fieldAccess2.getName(), parameterDeclaration, currentVariable);\n } else if (fieldAccessExpression instanceof ThisExpression) {\n return currentVariable;\n }\n } else {\n return currentVariable;\n }\n }\n return null;\n}\n"
"public ImagePlus applyClassifierToTestImage(final ImagePlus testImage, final int numThreads) {\n IJ.log(\"String_Node_Str\" + testImage.getTitle() + \"String_Node_Str\" + numThreads + \"String_Node_Str\");\n ArrayList<String> classNames = new ArrayList<String>();\n if (null == loadedClassNames) {\n for (int i = 0; i < numOfClasses; i++) if (examples[i].size() > 0)\n classNames.add(classLabels[i]);\n } else\n classNames = loadedClassNames;\n final ImagePlus[] classifiedSlices = new ImagePlus[testImage.getStackSize()];\n class ApplyClassifierThread extends Thread {\n final int startSlice;\n final int numSlices;\n final int numFurtherThreads;\n final ArrayList<String> classNames;\n public ApplyClassifierThread(int startSlice, int numSlices, int numFurtherThreads, ArrayList<String> classNames) {\n this.startSlice = startSlice;\n this.numSlices = numSlices;\n this.numFurtherThreads = numFurtherThreads;\n this.classNames = classNames;\n }\n public void run() {\n for (int i = startSlice; i < startSlice + numSlices; i++) {\n final ImagePlus testSlice = new ImagePlus(testImage.getImageStack().getSliceLabel(i), testImage.getImageStack().getProcessor(i).convertToByte(true));\n IJ.showStatus(\"String_Node_Str\");\n IJ.log(\"String_Node_Str\" + i + \"String_Node_Str\");\n final FeatureStack testImageFeatures = new FeatureStack(testSlice);\n testImageFeatures.setEnableFeatures(featureStack.getEnableFeatures());\n testImageFeatures.updateFeatures();\n final Instances testData = testImageFeatures.createInstances(classNames);\n testData.setClassIndex(testData.numAttributes() - 1);\n final ImagePlus testClassImage = applyClassifier(testData, testSlice.getWidth(), testSlice.getHeight(), numFurtherThreads);\n testClassImage.setTitle(\"String_Node_Str\" + testSlice.getTitle());\n testClassImage.setProcessor(testClassImage.getProcessor().convertToByte(true).duplicate());\n classifiedSlices[i - 1] = testClassImage;\n }\n }\n }\n final int numFurtherThreads = Math.max(1, (numThreads - testImage.getStackSize()) / testImage.getStackSize() + 1);\n final ApplyClassifierThread[] threads = new ApplyClassifierThread[numThreads];\n for (int i = 0; i < numThreads; i++) {\n int startSlice = i * numSlices + 1;\n if (i == numThreads - 1)\n numSlices = testImage.getStackSize() - (numThreads - 1) * (testImage.getStackSize() / numThreads);\n threads[i] = new ApplyClassifierThread(startSlice, numSlices, numFurtherThreads, classNames);\n threads[i].start();\n }\n final ImageStack classified = new ImageStack(testImage.getWidth(), testImage.getHeight());\n for (Thread thread : threads) try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n for (int i = 0; i < testImage.getStackSize(); i++) classified.addSlice(classifiedSlices[i].getTitle(), classifiedSlices[i].getProcessor());\n return new ImagePlus(\"String_Node_Str\", classified);\n}\n"
"public void attributeChanged(Attribute attribute) throws IllegalActionException {\n if (attribute == observationProbabilities) {\n int nStates = ((MatrixToken) observationProbabilities.getToken()).getRowCount();\n int nCat = ((MatrixToken) observationProbabilities.getToken()).getColumnCount();\n _B0 = new double[_nStates][nCat];\n for (int i = 0; i < _nStates; i++) {\n for (int j = 0; j < nCat; j++) {\n _B0[i][j] = ((DoubleToken) ((MatrixToken) observationProbabilities.getToken()).getElementAsToken(i, j)).doubleValue();\n }\n }\n } else if (attribute == nCategories) {\n int cat = ((IntToken) nCategories.getToken()).intValue();\n if (cat <= 0) {\n throw new IllegalActionException(this, \"String_Node_Str\");\n } else {\n _nCategories = cat;\n }\n } else {\n super.attributeChanged(attribute);\n }\n}\n"
"public void formLinkRecordBond(LinkRecord linkRecord) {\n if (linkRecord.getAltLoc1().equals(\"String_Node_Str\") || linkRecord.getAltLoc2().equals(\"String_Node_Str\"))\n return;\n try {\n Map<Integer, Atom> a = getAtomFromRecord(linkRecord.getName1(), linkRecord.getAltLoc1(), linkRecord.getResName1(), linkRecord.getChainID1(), linkRecord.getResSeq1(), linkRecord.getiCode1());\n Map<Integer, Atom> b = getAtomFromRecord(linkRecord.getName2(), linkRecord.getAltLoc2(), linkRecord.getResName2(), linkRecord.getChainID2(), linkRecord.getResSeq2(), linkRecord.getiCode2());\n for (int i = 0; i < structure.nrModels(); i++) {\n if (a.containsKey(i) && b.containsKey(i)) {\n new BondImpl(a.get(i), b.get(i), 1);\n }\n }\n } catch (StructureException e) {\n if (!params.isParseCAOnly()) {\n logger.warn(\"String_Node_Str\", linkRecord.toString());\n } else {\n logger.debug(\"String_Node_Str\");\n }\n }\n}\n"
"private void sendMessageImmediate(String msgName, GeneratedMessage msg) {\n try {\n sendMessage(msgName, msg, false);\n } catch (IOException e) {\n log.error(this + \"String_Node_Str\", e);\n close();\n }\n}\n"
"public ITmfEventType getType() {\n CtfTmfEventType ctfTmfEventType = CtfTmfEventType.get(eventName);\n if (ctfTmfEventType == null) {\n ctfTmfEventType = new CtfTmfEventType(this.getEventName(), this.getContent());\n }\n return ctfTmfEventType;\n}\n"
"public String load(String key) {\n if (msPerLoad > 0) {\n try {\n Thread.sleep(msPerLoad);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n Thread thread = Thread.currentThread();\n ClassLoader contextClassLoader = thread.getContextClassLoader();\n contextClassLoaders.putIfAbsent(thread.getName(), contextClassLoader != null);\n return store.get(key);\n}\n"
"public static void main(String[] args) {\n CConfiguration cConf = CConfiguration.create();\n Configuration hConf = new Configuration();\n cConf.copyTxProperties(hConf);\n TransactionManagerDebuggerMain instance = new TransactionManagerDebuggerMain(hConf);\n boolean success = instance.execute(args);\n if (!success) {\n System.exit(1);\n }\n}\n"
"public void write(ClassWriter writer) {\n int modifiers = this.modifiers & 0xFFFF;\n if (this.value == null) {\n modifiers |= Modifiers.ABSTRACT;\n }\n MethodWriter mw = new MethodWriterImpl(writer, writer.visitMethod(modifiers, this.name.qualified, this.getDescriptor(), this.getSignature(), this.getExceptions()));\n if ((this.modifiers & Modifiers.STATIC) == 0) {\n mw.setInstanceMethod();\n }\n for (int i = 0; i < this.annotationCount; i++) {\n this.annotations[i].write(mw);\n }\n if ((this.modifiers & Modifiers.INLINE) == Modifiers.INLINE) {\n mw.addAnnotation(\"String_Node_Str\", false);\n }\n if ((this.modifiers & Modifiers.INFIX) == Modifiers.INFIX) {\n mw.addAnnotation(\"String_Node_Str\", false);\n }\n if ((this.modifiers & Modifiers.PREFIX) == Modifiers.PREFIX) {\n mw.addAnnotation(\"String_Node_Str\", false);\n }\n if ((this.modifiers & Modifiers.DEPRECATED) == Modifiers.DEPRECATED) {\n mw.addAnnotation(\"String_Node_Str\", true);\n }\n if ((this.modifiers & Modifiers.SEALED) == Modifiers.SEALED) {\n mw.addAnnotation(\"String_Node_Str\", false);\n }\n for (int i = 0; i < this.parameterCount; i++) {\n this.parameters[i].write(mw);\n }\n Label start = new Label();\n Label end = new Label();\n if (this.value != null) {\n if (this.value instanceof StatementList) {\n ((StatementList) this.value).topLevel = true;\n }\n mw.begin();\n mw.writeLabel(start);\n this.value.writeExpression(mw);\n mw.writeLabel(end);\n mw.end(this.type);\n }\n if ((this.modifiers & Modifiers.STATIC) == 0) {\n mw.writeLocal(\"String_Node_Str\", this.theClass.getType(), start, end, 0);\n }\n for (int i = 0; i < this.parameterCount; i++) {\n IParameter param = this.parameters[i];\n mw.writeLocal(param.getName().qualified, param.getType(), start, end, param.getIndex());\n }\n}\n"
"public void testMetaCRUD() throws Exception {\n final int sleepTime = 400;\n final MetadataManager metadataManager = MetadataManager.getInstance(configA);\n final MetadataManager metadataManagerB = MetadataManager.getInstance(configB);\n final Broadcaster broadcaster = Broadcaster.getInstance();\n broadcaster.getCounterAndClear();\n TableDesc tableDesc = createTestTableDesc();\n assertTrue(metadataManager.getTableDesc(tableDesc.getIdentity()) == null);\n assertTrue(metadataManagerB.getTableDesc(tableDesc.getIdentity()) == null);\n metadataManager.saveSourceTable(tableDesc);\n assertEquals(1, broadcaster.getCounterAndClear());\n waitForCounterAndClear(1);\n assertNotNull(metadataManager.getTableDesc(tableDesc.getIdentity()));\n assertNotNull(metadataManagerB.getTableDesc(tableDesc.getIdentity()));\n final String dataModelName = \"String_Node_Str\";\n DataModelDesc dataModelDesc = metadataManager.getDataModelDesc(\"String_Node_Str\");\n dataModelDesc.setName(dataModelName);\n dataModelDesc.setLastModified(0);\n assertTrue(metadataManager.getDataModelDesc(dataModelName) == null);\n assertTrue(metadataManagerB.getDataModelDesc(dataModelName) == null);\n dataModelDesc.setName(dataModelName);\n metadataManager.createDataModelDesc(dataModelDesc);\n assertEquals(1, broadcaster.getCounterAndClear());\n Thread.sleep(sleepTime);\n assertEquals(dataModelDesc.getName(), metadataManagerB.getDataModelDesc(dataModelName).getName());\n final LookupDesc[] lookups = dataModelDesc.getLookups();\n assertTrue(lookups.length > 0);\n dataModelDesc.setLookups(new LookupDesc[] { lookups[0] });\n metadataManager.updateDataModelDesc(dataModelDesc);\n assertEquals(1, broadcaster.getCounterAndClear());\n Thread.sleep(sleepTime);\n assertEquals(dataModelDesc.getLookups().length, metadataManagerB.getDataModelDesc(dataModelName).getLookups().length);\n}\n"
"public TreeElement deepCopy(boolean includeTemplates) {\n TreeElement newNode = shallowCopy();\n if (children != null) {\n newNode.children = new Vector<TreeElement>();\n for (int i = 0; i < children.size(); i++) {\n TreeElement child = children.elementAt(i);\n if (includeTemplates || child.getMult() != TreeReference.INDEX_TEMPLATE) {\n newNode.addChild(child.deepCopy(includeTemplates));\n }\n }\n }\n if (attributes != null) {\n newNode.attributes = new Vector<TreeElement>();\n for (TreeElement attr : attributes) {\n if (includeTemplates || attr.getMult() != TreeReference.INDEX_TEMPLATE) {\n newNode.addAttribute(attr.deepCopy(includeTemplates));\n }\n }\n }\n return newNode;\n}\n"
"public void readPortableData(EntityPlayer player, NBTTagCompound tag) {\n if (!canPlayerAccess(player)) {\n return;\n }\n distance = tag.getByte(\"String_Node_Str\");\n intensity = tag.getByte(\"String_Node_Str\");\n duration = tag.getByte(\"String_Node_Str\");\n markDirty();\n sendUpdatePacket(Side.CLIENT);\n}\n"
"public IValue withType(IType type, ITypeContext typeContext, MarkerList markers, IContext context) {\n if (type == Types.VOID) {\n this.requiredType = Types.VOID;\n return this;\n }\n if (this.valueCount > 0) {\n IValue v = this.values[this.valueCount - 1].withType(type, typeContext, markers, context);\n if (v != null) {\n this.values[this.valueCount - 1] = v;\n this.requiredType = type;\n return this;\n }\n }\n return null;\n}\n"
"public Status status() {\n StatusCache statusCache = candlepinCache.getStatusCache();\n Status cached = statusCache.getStatus();\n if (cached != null) {\n return cached;\n }\n boolean good = true;\n try {\n rulesCurator.getUpdatedFromDB();\n } catch (Exception e) {\n log.error(\"String_Node_Str\", e);\n good = false;\n }\n CandlepinModeChange modeChange = modeManager.getLastCandlepinModeChange();\n if (modeChange.getMode() != Mode.NORMAL) {\n good = false;\n }\n Status status = new Status(good, version, release, standalone, jsProvider.getRulesVersion(), jsProvider.getRulesSource(), modeChange.getMode(), modeChange.getReason(), modeChange.getChangeTime());\n statusCache.put(CandlepinCache.STATUS_KEY, status);\n return status;\n}\n"
"protected LineItem[] getResults(boolean showResultInfo) {\n Cursor waitCursor = null;\n try {\n Display display = getEditor().getSite().getPage().getWorkbenchWindow().getWorkbench().getDisplay();\n waitCursor = new Cursor(display, SWT.CURSOR_WAIT);\n this.getSite().getShell().setCursor(waitCursor);\n XtentisPort port = Util.getPort(getXObject());\n long from = -1;\n long to = -1;\n SimpleDateFormat sdf = new SimpleDateFormat(\"String_Node_Str\");\n Pattern pattern = Pattern.compile(\"String_Node_Str\");\n if (!\"String_Node_Str\".equals(fromText.getText())) {\n String dateTimeText = fromText.getText().trim();\n Matcher matcher = pattern.matcher(dateTimeText);\n if (!matcher.matches()) {\n MessageDialog.openWarning(this.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\");\n return new LineItem[0];\n }\n try {\n Date d = sdf.parse(fromText.getText());\n from = d.getTime();\n } catch (ParseException pe) {\n }\n }\n if (!\"String_Node_Str\".equals(toText.getText())) {\n String dateTimeText = toText.getText().trim();\n Matcher matcher = pattern.matcher(dateTimeText);\n if (!matcher.matches()) {\n MessageDialog.openWarning(this.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\");\n return new LineItem[0];\n }\n try {\n Date d = sdf.parse(toText.getText());\n to = d.getTime();\n } catch (ParseException pe) {\n }\n }\n String concept = conceptCombo.getText();\n if (\"String_Node_Str\".equals(concept) | \"String_Node_Str\".equals(concept))\n concept = null;\n if (concept != null) {\n concept = concept.replaceAll(\"String_Node_Str\", \"String_Node_Str\").trim();\n }\n String keys = keyText.getText();\n if (\"String_Node_Str\".equals(keys) | \"String_Node_Str\".equals(keys))\n keys = null;\n boolean useFTSearch = checkFTSearchButton.getSelection();\n String search = searchText.getText();\n if (\"String_Node_Str\".equals(search) | \"String_Node_Str\".equals(search))\n search = null;\n int start = pageToolBar.getStart();\n int limit = pageToolBar.getLimit();\n String clusterName = URLEncoder.encode(((WSDataClusterPK) getXObject().getWsKey()).getPk(), \"String_Node_Str\");\n WSDataClusterPK clusterPk = new WSDataClusterPK(clusterName);\n WSItemPKsByCriteriaResponseResults[] results = port.getItemPKsByFullCriteria(new WSGetItemPKsByFullCriteria(new WSGetItemPKsByCriteria(clusterPk, concept, search, keys, from, to, start, limit), useFTSearch)).getResults();\n if (showResultInfo && (results.length == 1)) {\n MessageDialog.openInformation(this.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\");\n return new LineItem[0];\n }\n if (results.length == 1)\n return new LineItem[0];\n int totalSize = 0;\n List<LineItem> ress = new ArrayList<LineItem>();\n for (int i = 0; i < results.length; i++) {\n if (i == 0) {\n totalSize = Integer.parseInt(Util.parse(results[i].getWsItemPK().getConceptName()).getDocumentElement().getTextContent());\n continue;\n }\n ress.add(new LineItem(results[i].getDate(), results[i].getWsItemPK().getConceptName(), results[i].getWsItemPK().getIds(), results[i].getTaskId()));\n }\n pageToolBar.setTotalsize(totalSize);\n pageToolBar.refreshUI();\n return (LineItem[]) ress.toArray(new LineItem[ress.size()]);\n } catch (Exception e) {\n e.printStackTrace();\n if ((e.getLocalizedMessage() != null) && e.getLocalizedMessage().contains(\"String_Node_Str\"))\n MessageDialog.openError(this.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\");\n else\n MessageDialog.openError(this.getSite().getShell(), \"String_Node_Str\", e.getLocalizedMessage());\n return null;\n } finally {\n try {\n this.getSite().getShell().setCursor(null);\n waitCursor.dispose();\n } catch (Exception e) {\n }\n }\n}\n"
"private void setOptimizedCheckNodes(TreeParent obj) {\n for (TreeObject treeObj : obj.getChildren()) {\n if (treeObj.getName().equals(\"String_Node_Str\")) {\n if (treeObj instanceof TreeParent) {\n for (TreeObject child : ((TreeParent) treeObj).getChildren()) {\n if (!(child instanceof TreeParent)) {\n optimizedCheckNodes.add(child);\n } else {\n if (child.getName().equals(\"String_Node_Str\")) {\n for (TreeObject chld : ((TreeParent) child).getChildren()) {\n if (chld.getName().equals(\"String_Node_Str\"))\n optimizedCheckNodes.add(chld);\n if (chld.getName().equals(\"String_Node_Str\"))\n optimizedCheckNodes.add(chld);\n }\n }\n }\n }\n }\n }\n if (treeObj.getName().equals(\"String_Node_Str\")) {\n if (treeObj instanceof TreeParent) {\n optimizedCheckNodes.add(treeObj);\n }\n }\n if (treeObj.getName().equals(\"String_Node_Str\") || treeObj.getName().equals(\"String_Node_Str\") || treeObj.getName().equals(\"String_Node_Str\")) {\n if (treeObj instanceof TreeParent) {\n for (TreeObject child : ((TreeParent) treeObj).getChildren()) {\n if (!(child instanceof TreeParent)) {\n optimizedCheckNodes.add(child);\n }\n }\n }\n }\n if (treeObj.getName().equals(\"String_Node_Str\")) {\n if (treeObj instanceof TreeParent) {\n for (TreeObject child : ((TreeParent) treeObj).getChildren()) {\n if (child.getName().equals(\"String_Node_Str\"))\n optimizedCheckNodes.add(child);\n }\n }\n }\n }\n for (TreeObject treeObj : obj.getChildren()) {\n if (treeObj.getName().equals(\"String_Node_Str\")) {\n if (treeObj instanceof TreeParent) {\n for (TreeObject child : ((TreeParent) treeObj).getChildren()) {\n if (!(child instanceof TreeParent)) {\n optimizedCheckNodes.add(child);\n } else {\n optimizedCheckNodes.remove(child);\n }\n }\n }\n }\n }\n ((CheckboxTreeViewer) viewer).setCheckedElements(optimizedCheckNodes.toArray());\n}\n"
"void start(int position, int boundPosition) {\n if (boundPosition == INVALID_POSITION) {\n start(position);\n return;\n }\n final int firstPos = mFirstPosition;\n final int lastPos = firstPos + getChildCount() - 1;\n int viewTravelCount = 0;\n if (position <= firstPos) {\n final int boundPosFromLast = lastPos - boundPosition;\n if (boundPosFromLast < 1) {\n return;\n }\n final int posTravel = firstPos - position + 1;\n final int boundTravel = boundPosFromLast - 1;\n if (boundTravel < posTravel) {\n viewTravelCount = boundTravel;\n mMode = MOVE_UP_BOUND;\n } else {\n viewTravelCount = posTravel;\n mMode = MOVE_UP_POS;\n }\n } else if (position > lastPos) {\n final int boundPosFromFirst = boundPosition - firstPos;\n if (boundPosFromFirst < 1) {\n return;\n }\n final int posTravel = position - lastPos + 1;\n final int boundTravel = boundPosFromFirst - 1;\n if (boundTravel < posTravel) {\n viewTravelCount = boundTravel;\n mMode = MOVE_DOWN_BOUND;\n } else {\n viewTravelCount = posTravel;\n mMode = MOVE_DOWN_POS;\n }\n } else {\n return;\n }\n if (viewTravelCount > 0) {\n mScrollDuration = SCROLL_DURATION / viewTravelCount;\n } else {\n mScrollDuration = SCROLL_DURATION;\n }\n mTargetPos = position;\n mBoundPos = boundPosition;\n mLastSeenPos = INVALID_POSITION;\n post(this);\n}\n"
"public static DepTreebank getParses(Model model, SentenceCollection sentences, IlpFormulation formulation, DeltaGenerator deltaGen, double expectedParseWeight) {\n IlpSolverFactory factory = new IlpSolverFactory(IlpSolverId.GUROBI_CL, 2, 128);\n IlpViterbiParserWithDeltas parser = new MockIlpViterbiParserWithDeltas(formulation, factory, deltaGen);\n DepTreebank trees = parser.getViterbiParse(sentences, model);\n for (DepTree depTree : trees) {\n System.out.println(depTree);\n }\n Assert.assertEquals(expectedParseWeight, parser.getLastParseWeight(), 1E-13);\n return trees;\n}\n"
"private void setSteps(final CoordinateOperation[] steps) throws FactoryException {\n final List<CoordinateOperation> flattened = new ArrayList<CoordinateOperation>(steps.length);\n initialize(null, steps, flattened, DefaultFactories.forBuildin(MathTransformFactory.class), (coordinateOperationAccuracy == null), (domainOfValidity == null));\n operations = UnmodifiableArrayList.wrap(flattened.toArray(new CoordinateOperation[flattened.size()]));\n}\n"
"private void createDynamicComposite(final Composite parent, Element element, EComponentCategory category) {\n getParentMap().put(ComponentSettingsView.PARENT, parent);\n getCategoryMap().put(ComponentSettingsView.CATEGORY, category);\n if (element instanceof Node) {\n IComponent component = ((Node) element).getComponent();\n IGenericWizardService wizardService = null;\n boolean generic = false;\n if (EComponentType.GENERIC.equals(component.getComponentType())) {\n generic = true;\n if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericWizardService.class)) {\n wizardService = (IGenericWizardService) GlobalServiceRegister.getDefault().getService(IGenericWizardService.class);\n }\n }\n tabFactory.getTabbedPropertyComposite().setCompactViewVisible(false);\n if (category == EComponentCategory.BASIC) {\n createButtonListener();\n boolean isCompactView = true;\n if (ComponentSettingsView.TABLEVIEW.equals(getPreference().getString(TalendDesignerPrefConstants.VIEW_OPTIONS))) {\n isCompactView = false;\n }\n tabFactory.getTabbedPropertyComposite().setCompactViewVisible(true);\n tabFactory.getTabbedPropertyComposite().setCompactView(isCompactView);\n if (generic && wizardService != null) {\n Composite composite = wizardService.creatDynamicComposite(parent, element, EComponentCategory.BASIC, true);\n if (composite instanceof MultipleThreadDynamicComposite) {\n dc = (MultipleThreadDynamicComposite) composite;\n }\n } else {\n dc = new MissingSettingsMultiThreadDynamicComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS, category, element, isCompactView);\n }\n } else if (category == EComponentCategory.DYNAMICS_SETTINGS) {\n dc = new AdvancedContextComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS, element);\n } else if (category == EComponentCategory.SQL_PATTERN) {\n dc = new SQLPatternComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS, element);\n } else if (category == EComponentCategory.ADVANCED) {\n dc = new MissingSettingsMultiThreadDynamicComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS, category, element, true);\n if (generic && wizardService != null) {\n Composite composite = wizardService.creatDynamicComposite(parent, element, EComponentCategory.ADVANCED, true);\n if (composite instanceof MultipleThreadDynamicComposite) {\n dc = (MultipleThreadDynamicComposite) composite;\n }\n }\n } else {\n dc = new MultipleThreadDynamicComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS, category, element, true);\n }\n } else if (element instanceof Connection) {\n dc = new MainConnectionComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS, category, element);\n } else if (element instanceof Note) {\n if (category == EComponentCategory.BASIC) {\n if (parent.getLayout() instanceof FillLayout) {\n FillLayout layout = (FillLayout) parent.getLayout();\n layout.type = SWT.VERTICAL;\n layout.marginHeight = 0;\n layout.marginWidth = 0;\n layout.spacing = 0;\n }\n ScrolledComposite scrolled = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);\n scrolled.setExpandHorizontal(true);\n scrolled.setExpandVertical(true);\n scrolled.setMinWidth(600);\n scrolled.setMinHeight(400);\n Composite composite = tabFactory.getWidgetFactory().createComposite(scrolled);\n scrolled.setContent(composite);\n composite.setLayout(new FormLayout());\n FormData d = new FormData();\n d.left = new FormAttachment(0, 0);\n d.right = new FormAttachment(100, 0);\n d.top = new FormAttachment(0, 0);\n d.bottom = new FormAttachment(100, 0);\n composite.setLayoutData(d);\n AbstractNotePropertyComposite c1 = new BasicNotePropertyComposite(composite, (Note) element, tabFactory);\n parent.layout();\n }\n } else if (element instanceof SubjobContainer) {\n if (category == EComponentCategory.BASIC) {\n dc = new SubjobBasicComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS, element);\n }\n } else {\n tabFactory.getTabbedPropertyComposite().setCompactViewVisible(false);\n dc = new MultipleThreadDynamicComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS, category, element, true);\n }\n if (parent.getChildren().length == 0) {\n if (parent.getLayout() instanceof FillLayout) {\n FillLayout layout = (FillLayout) parent.getLayout();\n layout.type = SWT.VERTICAL;\n layout.marginHeight = 0;\n layout.marginWidth = 0;\n layout.spacing = 0;\n }\n Composite composite = tabFactory.getWidgetFactory().createComposite(parent);\n composite.setLayout(new FormLayout());\n FormData d = new FormData();\n d.left = new FormAttachment(2, 0);\n d.right = new FormAttachment(100, 0);\n d.top = new FormAttachment(5, 0);\n d.bottom = new FormAttachment(100, 0);\n composite.setLayoutData(d);\n Label alertText = new Label(composite, SWT.NONE);\n alertText.setText(Messages.getString(\"String_Node_Str\"));\n alertText.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));\n parent.layout();\n }\n if (dc != null) {\n dc.refresh();\n }\n}\n"
"void setDataSet(String datasetName) {\n try {\n boolean isPreviousDataBindingReference = false;\n if (itemHandle.getDataBindingType() == ReportItemHandle.DATABINDING_TYPE_REPORT_ITEM_REF) {\n isPreviousDataBindingReference = true;\n itemHandle.setDataBindingReference(null);\n }\n itemHandle.setCube(null);\n if (datasetName == null) {\n if (getBoundDataSet() != null) {\n clearBindings();\n }\n itemHandle.setDataSet(null);\n } else {\n DataSetHandle dataset = getReportDesignHandle().findDataSet(datasetName);\n if (isPreviousDataBindingReference || itemHandle.getDataSet() != dataset) {\n itemHandle.setDataSet(dataset);\n clearBindings();\n generateBindings(generateComputedColumns(dataset));\n }\n }\n } catch (SemanticException e) {\n WizardBase.showException(e.getLocalizedMessage());\n }\n}\n"
"public void addData(int col, SheetData data) {\n if (col < getColumnCount()) {\n int rowIndex = data.getRowIndex();\n columns.get(col).add(data);\n maxRowIndex = maxRowIndex > rowIndex ? maxRowIndex : rowIndex;\n BookmarkDef bookmark = data.getBookmark();\n if (bookmark != null) {\n bookmark.setStartColumn(data.getStartX());\n bookmark.setStartRow(rowIndex);\n }\n bookmark.setColumnNo(col + 1);\n bookmark.setRowNo(rowIndex);\n }\n}\n"
"public Image getImage(Object element) {\n Image image = null;\n if (element instanceof ItemRecord) {\n ItemRecord record = (ItemRecord) element;\n File file = record.getFile();\n String fileName = file.getName();\n if (file.isDirectory()) {\n image = ImageLib.getImage(ImageLib.FOLDERNODE_IMAGE);\n EResourceConstant constant = resolveResourceConstant(fileName);\n if (constant != null) {\n switch(constant) {\n case DATA_PROFILING:\n image = ImageLib.getImage(ImageLib.DATA_PROFILING);\n break;\n case METADATA:\n image = ImageLib.getImage(ImageLib.METADATA);\n break;\n case LIBRARIES:\n image = ImageLib.getImage(ImageLib.LIBRARIES);\n break;\n case ANALYSIS:\n break;\n case REPORTS:\n break;\n case EXCHANGE:\n image = ImageLib.getImage(ImageLib.EXCHANGE);\n break;\n case DB_CONNECTIONS:\n image = ImageLib.getImage(ImageLib.CONNECTION);\n break;\n case FILEDELIMITED:\n image = ImageLib.getImage(ImageLib.FILE_DELIMITED);\n break;\n case HADOOP_CLUSTER:\n image = ImageLib.getImage(ImageLib.HADOOP_CLUSTER);\n break;\n default:\n break;\n }\n }\n } else {\n if (fileName.endsWith(FactoriesUtil.ANA)) {\n image = ImageLib.getImage(ImageLib.ANALYSIS_OBJECT);\n } else if (fileName.endsWith(FactoriesUtil.REP)) {\n image = ImageLib.getImage(ImageLib.REPORT_OBJECT);\n } else if (fileName.endsWith(FactoriesUtil.PATTERN)) {\n image = ImageLib.getImage(ImageLib.PATTERN_REG);\n } else if (fileName.endsWith(FactoriesUtil.DQRULE)) {\n if (record.getElement() instanceof MatchRuleDefinition) {\n image = ImageLib.getImage(ImageLib.MATCH_RULE_ICON);\n } else {\n image = ImageLib.getImage(ImageLib.DQ_RULE);\n }\n } else if (fileName.endsWith(FactoriesUtil.ITEM_EXTENSION)) {\n if (record.getElement() instanceof DelimitedFileConnection) {\n image = ImageLib.getImage(ImageLib.FILE_DELIMITED);\n } else {\n image = ImageLib.getImage(ImageLib.TD_DATAPROVIDER);\n }\n } else if (fileName.endsWith(FactoriesUtil.DEFINITION)) {\n image = ImageLib.getImage(ImageLib.IND_DEFINITION);\n } else if (fileName.endsWith(FactoriesUtil.SQL)) {\n image = ImageLib.getImage(ImageLib.SOURCE_FILE);\n } else if (fileName.endsWith(FactoriesUtil.JAR)) {\n image = ImageLib.getImage(ImageLib.JAR_FILE);\n } else if (fileName.endsWith(FactoriesUtil.JRXML)) {\n image = ImageLib.getImage(ImageLib.JRXML_ICON);\n }\n }\n }\n return image != null ? image : super.getImage(element);\n}\n"
"public static void init() {\n injector = Guice.createInjector(new ConfigModule(), new DiscoveryRuntimeModule().getInMemoryModules(), new DataFabricModules().getInMemoryModules(), new LocationRuntimeModule().getInMemoryModules(), new AbstractModule() {\n\n protected void configure() {\n bind(StreamCoordinator.class).to(InMemoryStreamCoordinator.class).in(Scopes.SINGLETON);\n }\n });\n}\n"
"protected long proxyPlainTextRequest(final URL url, String pathInContext, String pathParams, HttpRequest request, final HttpResponse response) throws IOException {\n try {\n String urlStr = url.toString();\n if (urlStr.toLowerCase().startsWith(Constants.ODO_INTERNAL_WEBAPP_URL)) {\n urlStr = \"String_Node_Str\" + com.groupon.odo.proxylib.Utils.getSystemPort(Constants.SYS_HTTP_PORT) + \"String_Node_Str\";\n }\n OkHttpClient okHttpClient = getUnsafeOkHttpClient();\n okHttpClient.setFollowRedirects(false);\n okHttpClient.setFollowSslRedirects(false);\n Request.Builder okRequestBuilder = new Request.Builder();\n if (urlStr.startsWith(\"String_Node_Str\") && urlStr.indexOf(\"String_Node_Str\") == urlStr.lastIndexOf(\"String_Node_Str\")) {\n int httpPort = com.groupon.odo.proxylib.Utils.getSystemPort(Constants.SYS_HTTP_PORT);\n urlStr = urlStr.replace(getHostNameFromURL(urlStr), localIP + \"String_Node_Str\" + httpPort);\n }\n okRequestBuilder = okRequestBuilder.url(urlStr);\n Enumeration<?> enm = request.getFieldNames();\n boolean isGet = \"String_Node_Str\".equals(request.getMethod());\n boolean hasContent = false;\n boolean usedContentLength = false;\n long contentLength = 0;\n while (enm.hasMoreElements()) {\n String hdr = (String) enm.nextElement();\n if (!isGet && HttpFields.__ContentType.equals(hdr)) {\n hasContent = true;\n }\n if (!isGet && HttpFields.__ContentLength.equals(hdr)) {\n contentLength = Long.parseLong(request.getField(hdr));\n usedContentLength = true;\n }\n Enumeration<?> vals = request.getFieldValues(hdr);\n while (vals.hasMoreElements()) {\n String val = (String) vals.nextElement();\n if (val != null) {\n if (!isGet && HttpFields.__ContentLength.equals(hdr) && Integer.parseInt(val) > 0) {\n hasContent = true;\n }\n if (!_DontProxyHeaders.containsKey(hdr)) {\n okRequestBuilder = okRequestBuilder.addHeader(hdr, val);\n }\n }\n }\n }\n if (\"String_Node_Str\".equals(request.getMethod())) {\n } else if (\"String_Node_Str\".equals(request.getMethod()) || \"String_Node_Str\".equals(request.getMethod()) || \"String_Node_Str\".equals(request.getMethod())) {\n RequestBody okRequestBody = null;\n if (hasContent) {\n final String contentType = request.getContentType();\n final byte[] bytes = IOUtils.toByteArray(request.getInputStream());\n okRequestBody = new RequestBody() {\n public MediaType contentType() {\n MediaType.parse(contentType);\n return null;\n }\n public void writeTo(BufferedSink bufferedSink) throws IOException {\n bufferedSink.write(bytes);\n }\n };\n if (usedContentLength) {\n okRequestBuilder = okRequestBuilder.addHeader(\"String_Node_Str\", \"String_Node_Str\" + contentLength);\n }\n } else {\n okRequestBody = RequestBody.create(null, new byte[0]);\n }\n if (\"String_Node_Str\".equals(request.getMethod())) {\n okRequestBuilder = okRequestBuilder.post(okRequestBody);\n } else if (\"String_Node_Str\".equals(request.getMethod())) {\n okRequestBuilder = okRequestBuilder.put(okRequestBody);\n } else if (\"String_Node_Str\".equals(request.getMethod())) {\n okRequestBuilder = okRequestBuilder.delete(okRequestBody);\n }\n } else if (\"String_Node_Str\".equals(request.getMethod())) {\n } else if (\"String_Node_Str\".equals(request.getMethod())) {\n okRequestBuilder = okRequestBuilder.head();\n } else {\n LOG.warn(\"String_Node_Str\", request.getMethod());\n request.setHandled(true);\n return -1;\n }\n Request okRequest = okRequestBuilder.build();\n Response okResponse = okHttpClient.newCall(okRequest).execute();\n response.setStatus(okResponse.code());\n response.setReason(okResponse.message());\n for (int headerNum = 0; headerNum < okResponse.headers().size(); headerNum++) {\n String headerName = okResponse.headers().name(headerNum);\n if (!_DontProxyHeaders.containsKey(headerName) && !_ProxyAuthHeaders.containsKey(headerName)) {\n response.addField(headerName, okResponse.headers().value(headerNum));\n }\n }\n try {\n IOUtils.copy(okResponse.body().byteStream(), response.getOutputStream());\n } catch (Exception e) {\n }\n request.setHandled(true);\n return okResponse.body().contentLength();\n } catch (Exception e) {\n LOG.warn(\"String_Node_Str\", e);\n reportError(e, url, response);\n request.setHandled(true);\n return -1;\n }\n}\n"
"private BookData getBookData(String bookInitials, String reference, int maxKeyCount) throws NoSuchKeyException {\n Book book = BookInstaller.getInstalledBook(bookInitials);\n if (book == null || reference == null || maxKeyCount < 1) {\n return null;\n }\n Key key = null;\n if (BookCategory.BIBLE.equals(book.getBookCategory())) {\n key = book.getKey(reference);\n ((Passage) key).trimVerses(maxKeyCount);\n } else if (BookCategory.GENERAL_BOOK.equals(book.getBookCategory())) {\n key = book.getKey(reference);\n } else {\n key = book.getKey(reference);\n if (key.getCardinality() > maxKeyCount) {\n Iterator iter = key.iterator();\n key = book.createEmptyKeyList();\n int count = 0;\n while (iter.hasNext()) {\n if (++count >= maxKeyCount) {\n break;\n }\n key.addAll((Key) iter.next());\n }\n key.addAll((Key) iter.next());\n }\n }\n return new BookData(book, key);\n}\n"
"public Object importDataSource(Map<String, Object> map) {\n String sid = (String) map.get(\"String_Node_Str\");\n Subscription subs = getSubscriptionByID(sid);\n if (subs == null) {\n Map sd = (Map) map.get(\"String_Node_Str\");\n if (sd != null) {\n String key = (String) sd.get(\"String_Node_Str\");\n sd.put(\"String_Node_Str\", Base32.decode(key));\n try {\n subs = createSingletonSubscription(sd, SubscriptionImpl.ADD_TYPE_IMPORT, true);\n } catch (Throwable e) {\n }\n }\n if (subs == null) {\n int version = ((Number) map.get(\"String_Node_Str\")).intValue();\n boolean anon = ((Number) map.get(\"String_Node_Str\")).intValue() != 0;\n Subscription[] result = new Subscription[1];\n boolean[] returned = { false };\n synchronized (result) {\n lookupSubscription(\"String_Node_Str\" + sid + \"String_Node_Str\", new byte[20], Base32.decode(sid), version, anon, new subsLookupListener() {\n public void found(byte[] hash, Subscription subscription) {\n boolean enable_callback;\n synchronized (imported_sids) {\n enable_callback = !imported_sids.contains(sid);\n imported_sids.add(sid);\n }\n synchronized (result) {\n result[0] = subscription;\n if (returned[0] && enable_callback) {\n Runnable callback = (Runnable) map.get(\"String_Node_Str\");\n if (callback != null) {\n callback.run();\n }\n }\n }\n }\n public void failed(byte[] hash, SubscriptionException error) {\n }\n public void complete(byte[] hash, Subscription[] subscriptions) {\n }\n public boolean isCancelled() {\n return false;\n }\n });\n subs = result[0];\n returned[0] = true;\n }\n }\n }\n return (subs);\n}\n"
"protected Instagram addResource(Type type, String value, float longitude, float lattitude, int distance, boolean exactMatch, String fourSquareLocation) {\n ResourceParams parameterSet = newResourceParams();\n switch(type) {\n case USER:\n if (value == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n parameterSet.set(\"String_Node_Str\", \"String_Node_Str\");\n parameterSet.set(\"String_Node_Str\", value);\n break;\n case TAG:\n if (value == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n parameterSet.set(\"String_Node_Str\", \"String_Node_Str\");\n parameterSet.set(\"String_Node_Str\", value);\n parameterSet.set(\"String_Node_Str\", exactMatch);\n break;\n case AREA:\n case LOCATION:\n if (distance > 5000) {\n throw new IllegalArgumentException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n if (type == Type.LOCATION) {\n parameterSet.set(\"String_Node_Str\", \"String_Node_Str\");\n if (fourSquareLocation != null) {\n parameterSet.set(\"String_Node_Str\", fourSquareLocation);\n }\n } else {\n parameterSet.set(\"String_Node_Str\", \"String_Node_Str\");\n }\n if (fourSquareLocation == null) {\n parameterSet.set(\"String_Node_Str\", lattitude);\n parameterSet.set(\"String_Node_Str\", longitude);\n if (distance > 0) {\n parameterSet.set(\"String_Node_Str\", lattitude);\n }\n }\n break;\n case POPULAR:\n parameterSet.set(\"String_Node_Str\", \"String_Node_Str\");\n break;\n }\n return this;\n}\n"
"private boolean checkPermissions() {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n FragmentCompat.requestPermissions(this, new String[] { Manifest.permission.WRITE_EXTERNAL_STORAGE }, WRITE_EXTERNAL_PERMISSION);\n return true;\n }\n return false;\n}\n"
"public void handleReceived(ClientConnection connection) {\n PacketStatusOutResponse packet = new PacketStatusOutResponse();\n PacketStatusOutResponse.Response response = packet.getResponse();\n response.description.text = TridentServer.getInstance().getConfig().getString(\"String_Node_Str\", \"String_Node_Str\");\n response.players.max = TridentServer.getInstance().getConfig().getInt(\"String_Node_Str\", 10);\n packet.response = response;\n connection.sendPacket(packet);\n}\n"
"public static IconType getIcon(RosterItem item) {\n Show show = item.getShow();\n if (show == Show.dnd) {\n return IconType.buddyDnd;\n } else if (show == Show.xa) {\n return IconType.buddyWait;\n } else if (show == Show.away) {\n return IconType.buddyWait;\n } else if (item.isAvailable()) {\n return IconType.buddyOn;\n } else {\n return IconType.buddyOff;\n }\n}\n"
"public static boolean isValidString(String string) {\n return (string != null && string != \"String_Node_Str\" && string.length() != 0);\n}\n"
"private void buildQueryField(int row, Cell cell) throws WingException {\n Request request = ObjectModelHelper.getRequest(objectModel);\n String current = URLDecode(request.getParameter(\"String_Node_Str\" + row));\n Text text = cell.addText(\"String_Node_Str\" + row);\n if (current != null)\n text.setValue(current);\n}\n"
"public String execute() throws IOException, InterruptedException {\n Debug.log(\"String_Node_Str\" + outfileName);\n File profileFilesDir = new File(infile1).getParentFile();\n Debug.log(\"String_Node_Str\" + profileFilesDir.getAbsolutePath());\n File workingDir = new File(\"String_Node_Str\" + infile1.replaceAll(\"String_Node_Str\", \"String_Node_Str\"));\n File resultsDir = new File(workingDir.getAbsolutePath() + \"String_Node_Str\");\n File ratioWrapper = new File(\"String_Node_Str\");\n String output;\n try {\n output = executeCommand(new String[] { \"String_Node_Str\", ratioWrapper.getAbsolutePath(), workingDir.getAbsolutePath() + \"String_Node_Str\", infile1, infile2, outfileName, mean.meanParam, \"String_Node_Str\" + readsCutOff, chromosomes });\n } catch (RuntimeException rte) {\n rte.printStackTrace();\n throw rte;\n }\n for (File outFile : resultsDir.listFiles()) {\n if (outFile.getName().contains(\"String_Node_Str\")) {\n File movedFile = new File(outfileName);\n Debug.log(\"String_Node_Str\" + outFile.getAbsolutePath() + \"String_Node_Str\" + movedFile.getAbsolutePath());\n FileUtils.moveFile(outFile, movedFile);\n }\n }\n Debug.log(\"String_Node_Str\" + workingDir.getAbsolutePath());\n FileUtils.deleteDirectory(workingDir);\n return output;\n}\n"
"public Map<String, Object> convertHistoricDetails(List<HistoricDetail> details) {\n Collections.sort(details, new Comparator<HistoricDetail>() {\n public int compare(HistoricDetail o1, HistoricDetail o2) {\n Long id1 = Long.valueOf(o1.getId());\n Long id2 = Long.valueOf(o2.getId());\n return -id1.compareTo(id2);\n }\n });\n Map<String, Object> variables = new HashMap<String, Object>();\n for (HistoricDetail detail : details) {\n HistoricVariableUpdate varUpdate = (HistoricVariableUpdate) detail;\n if (!variables.containsKey(varUpdate.getVariableName())) {\n variables.put(varUpdate.getVariableName(), varUpdate.getValue());\n }\n }\n return variables;\n}\n"
"public void startImage(IImageContent image) {\n IStyle style = image.getComputedStyle();\n InlineFlag inlineFlag = getInlineFlag(style);\n String uri = image.getURI();\n String mimeType = image.getMIMEType();\n String extension = image.getExtension();\n String altText = image.getAltText();\n if (FlashFile.isFlash(mimeType, uri, extension)) {\n if (altText == null) {\n altText = messageFlashObjectNotSupported;\n }\n wordWriter.drawImage(null, 0.0, 0.0, null, style, inlineFlag, altText, uri);\n return;\n }\n Image imageInfo = EmitterUtil.parseImage(image, image.getImageSource(), uri, mimeType, extension);\n byte[] data = imageInfo.getData();\n if (data == null || data.length == 0) {\n wordWriter.drawImage(null, 0.0, 0.0, null, style, inlineFlag, altText, uri);\n return;\n }\n double height = WordUtil.convertImageSize(image.getHeight(), imageInfo.getHeight());\n double width = WordUtil.convertImageSize(image.getWidth(), imageInfo.getWidth());\n writeBookmark(image);\n writeToc(image);\n HyperlinkInfo hyper = getHyperlink(image);\n wordWriter.drawImage(data, height, width, hyper, style, inlineFlag, altText, uri);\n}\n"
"public static Instruction retrieveRef(Var dst, Var src, long acquireRead, long acquireWrite) {\n assert (Types.isRef(src.type()));\n assert (acquireRead >= 0);\n assert (acquireWrite >= 0);\n if (acquireWrite > 0) {\n assert (Types.isAssignableRefTo(src.type(), dst.type(), true));\n } else {\n assert (Types.isAssignableRefTo(src.type(), dst.type()));\n }\n assert (dst.storage() == Alloc.ALIAS);\n return new TurbineOp(Opcode.LOAD_REF, dst, src.asArg(), Arg.createIntLit(acquireRead), Arg.createIntLit(acquireWrite));\n}\n"
"public void unlinkToPublishedPort(Pattern pattern, TypedIOPort subscriberPort, boolean global) throws IllegalActionException {\n NamedObj container = getContainer();\n if (!isOpaque() && container instanceof CompositeActor && !((CompositeActor) container).isClassDefinition()) {\n ((CompositeActor) container).unlinkToPublishedPort(pattern, subscriberPort, global);\n } else {\n if (_publishedPorts != null) {\n for (String name : _publishedPorts.keySet()) {\n Matcher matcher = pattern.matcher(name);\n if (matcher.matches()) {\n unlinkToPublishedPort(name, subscriberPort);\n }\n }\n }\n for (Object relationObj : subscriberPort.linkedRelationList()) {\n try {\n for (Object port : ((IORelation) relationObj).linkedPortList(subscriberPort)) {\n IOPort subscribedPort = (IOPort) port;\n if (subscribedPort.isInput()) {\n Set connectedInsidePort = new HashSet(subscribedPort.insidePortList());\n connectedInsidePort.remove(subscriberPort);\n if (connectedInsidePort.size() == 0) {\n ((CompositeActor) container).unlinkToPublishedPort(pattern, (TypedIOPort) subscribedPort, global);\n subscribedPort.setContainer(null);\n }\n }\n }\n ((IORelation) relationObj).setContainer(null);\n } catch (NameDuplicationException ex) {\n throw new InternalErrorException(subscriberPort.getContainer(), ex, \"String_Node_Str\");\n }\n }\n }\n}\n"
"public void onEvent(MediaSessionTerminatedEvent event) {\n events.add(event);\n}\n"
"public static HttpServletRequest getRealRequest(HttpServletRequest request) {\n HttpSession session = request.getSession();\n if (session.getAttribute(\"String_Node_Str\") != null) {\n log.info(\"String_Node_Str\");\n RequestInfo requestInfo = (RequestInfo) session.getAttribute(\"String_Node_Str\");\n HttpServletRequest actualRequest = requestInfo.wrapRequest(request);\n session.removeAttribute(\"String_Node_Str\");\n session.removeAttribute(\"String_Node_Str\");\n session.removeAttribute(\"String_Node_Str\");\n return actualRequest;\n } else {\n return request;\n }\n}\n"
"public static boolean isUpdated() {\n for (Check c : checks) {\n threadPool.submit(c);\n }\n System.out.println(\"String_Node_Str\");\n threadWait.arriveAndAwaitAdvance();\n System.out.println(\"String_Node_Str\");\n for (Check c : checks) {\n c.updateGUI(status);\n if (c.ticketsFound() && !hasOpenedLink(c.getLink())) {\n System.out.println(\"String_Node_Str\" + c.getLink());\n setLinkFound(c.getLink());\n c.reset();\n return true;\n } else {\n System.out.println(\"String_Node_Str\" + c.getLink());\n }\n }\n return false;\n}\n"
"private void maybeCheckForMultisize(Product product) {\n final Product resampledProduct = MultiSizeIssue.maybeResample(product);\n if (resampledProduct != null) {\n productListModel.setSelectedItem(resampledProduct);\n } else {\n productListModel.setSelectedItem(null);\n for (int i = 0; i < getProductCount(); i++) {\n final Object element = productListModel.getElementAt(i);\n if (element != null && element instanceof Product) {\n final Product someProduct = (Product) element;\n if (!someProduct.isMultiSize()) {\n productListModel.setSelectedItem(someProduct);\n break;\n }\n }\n }\n }\n}\n"
"public void run() {\n String provider = location.getProvider();\n switch(provider) {\n case LocationManager.GPS_PROVIDER:\n provider = getString(R.string.provider_gps);\n break;\n case LocationManager.NETWORK_PROVIDER:\n provider = getString(R.string.provider_network);\n break;\n default:\n provider = getString(R.string.provider_passive);\n break;\n }\n ((TextView) findViewById(R.id.text_view_provider)).setText(provider);\n ((TextView) findViewById(R.id.text_view_latitude)).setText(UtilsFormat.formatLatitude(location.getLatitude()));\n ((TextView) findViewById(R.id.text_view_longitude)).setText(UtilsFormat.formatLongitude(location.getLongitude()));\n ((TextView) findViewById(R.id.text_view_altitude)).setText(UtilsFormat.formatAltitude(location.getAltitude(), true));\n ((TextView) findViewById(R.id.text_view_accuracy)).setText(UtilsFormat.formatDistance(location.getAccuracy(), false));\n ((TextView) findViewById(R.id.text_view_speed)).setText(UtilsFormat.formatSpeed(location.getSpeed(), false));\n ((TextView) findViewById(R.id.text_view_declination)).setText(UtilsFormat.formatAngle(Orientation.getDeclination()));\n long lastFix = LocationState.getLastFixTime();\n if (lastFix > 0) {\n ((TextView) findViewById(R.id.text_view_time_gps)).setText(UtilsFormat.formatTime(lastFix));\n } else {\n ((TextView) findViewById(R.id.text_view_time_gps)).setText(\"String_Node_Str\");\n }\n}\n"
"private void startTurn() {\n HashMap<String, Object> deviceParameters = device.getParameters();\n String url;\n boolean turnEnabled = false;\n if (deviceParameters.containsKey(RCDevice.ParameterKeys.MEDIA_TURN_ENABLED) && (Boolean) deviceParameters.get(RCDevice.ParameterKeys.MEDIA_TURN_ENABLED)) {\n turnEnabled = true;\n }\n RCDevice.MediaIceServersDiscoveryType iceServerDiscoveryType;\n if (deviceParameters.get(RCDevice.ParameterKeys.MEDIA_ICE_SERVERS_DISCOVERY_TYPE) instanceof Enum) {\n iceServerDiscoveryType = (RCDevice.MediaIceServersDiscoveryType) deviceParameters.get(RCDevice.ParameterKeys.MEDIA_ICE_SERVERS_DISCOVERY_TYPE);\n } else {\n iceServerDiscoveryType = RCDevice.MediaIceServersDiscoveryType.values()[(int) deviceParameters.get(RCDevice.ParameterKeys.MEDIA_ICE_SERVERS_DISCOVERY_TYPE)];\n }\n if (iceServerDiscoveryType == RCDevice.MediaIceServersDiscoveryType.ICE_SERVERS_CONFIGURATION_URL_XIRSYS_V2) {\n url = deviceParameters.get(RCDevice.ParameterKeys.MEDIA_ICE_URL) + \"String_Node_Str\" + deviceParameters.get(RCDevice.ParameterKeys.MEDIA_ICE_USERNAME) + \"String_Node_Str\" + deviceParameters.get(RCDevice.ParameterKeys.MEDIA_ICE_PASSWORD) + \"String_Node_Str\" + deviceParameters.get(RCDevice.ParameterKeys.MEDIA_ICE_DOMAIN) + \"String_Node_Str\";\n } else if (iceServerDiscoveryType == RCDevice.MediaIceServersDiscoveryType.ICE_SERVERS_CONFIGURATION_URL_XIRSYS_V3) {\n url = deviceParameters.get(RCDevice.ParameterKeys.MEDIA_ICE_URL) + \"String_Node_Str\" + deviceParameters.get(RCDevice.ParameterKeys.MEDIA_ICE_DOMAIN);\n } else {\n onIceServersReady(external2InternalIceServers((List<Map<String, String>>) deviceParameters.get(RCDevice.ParameterKeys.MEDIA_ICE_SERVERS)));\n return;\n }\n new IceServerFetcher(url, turnEnabled, iceServerDiscoveryType, (String) deviceParameters.get(RCDevice.ParameterKeys.MEDIA_ICE_USERNAME), (String) deviceParameters.get(RCDevice.ParameterKeys.MEDIA_ICE_PASSWORD), this).makeRequest();\n}\n"
"public List<FileInfo> list(String path) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\");\n }\n try {\n String s = executeCommand(\"String_Node_Str\" + path);\n String[] entries = s.split(\"String_Node_Str\");\n List<FileInfo> fileInfos = new ArrayList<>();\n for (String entry : entries) {\n String[] data = entry.split(\"String_Node_Str\");\n if (data.length < 4)\n continue;\n String attributes = data[0];\n boolean directory = attributes.startsWith(\"String_Node_Str\");\n String name = data[data.length - 1];\n FileInfo fi = new FileInfo();\n fi.attribs = attributes;\n fi.directory = directory;\n fi.name = name;\n fi.path = path;\n fi.device = this;\n liste.add(fi);\n }\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\");\n }\n return liste;\n } catch (Exception ex) {\n logger.error(\"String_Node_Str\", ex);\n throw new RuntimeException(ex);\n }\n}\n"
"public void windowClosing(WindowEvent e) {\n super.windowClosing(e);\n guiSignUp.getGuiLogin().setEnabled(true);\n}\n"
"private static void loadCubeOperations(DataInputStream dis, ICubeQueryDefinition qd) throws DataException, IOException {\n int size = IOUtil.readInt(dis);\n for (int i = 0; i < size; i++) {\n ICubeOperation co = loadCubeOperation(dis, version);\n qd.addCubeOperation(co);\n }\n}\n"
"public static void saveUserToStorage(Syncano syncano, AbstractUser user) {\n if (syncano.getAndroidContext() == null || !(PlatformType.get() instanceof PlatformType.AndroidPlatform)) {\n return;\n }\n SharedPreferences prefs = syncano.getAndroidContext().getSharedPreferences(Syncano.class.getSimpleName(), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n if (user == null) {\n editor.remove(dataKey(syncano));\n editor.remove(typeKey(syncano));\n } else {\n GsonParser.GsonParseConfig config = new GsonParser.GsonParseConfig();\n config.serializeReadOnlyFields = true;\n Gson gson = GsonParser.createGson(user.getClass(), config);\n editor.putString(dataKey(syncano), gson.toJson(user));\n editor.putString(typeKey(syncano), user.getClass().getName());\n }\n editor.apply();\n}\n"
"public Widget getWidget() {\n return rosterItemDisplay.asWidget();\n}\n"
"public String url() {\n return join(new Object[] { \"String_Node_Str\", \"String_Node_Str\", FakerIDN.toASCII(faker.name().firstName().toLowerCase().replaceAll(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\" + domainWord()), \"String_Node_Str\", domainSuffix() });\n}\n"
"public V get() throws ONCRPCException, IOException, InterruptedException {\n waitForResult();\n if ((ioError == null) && (remoteEx == null)) {\n V responseObject = decoder.getResult(request.getResponseFragments().get(0));\n return responseObject;\n } else {\n if (ioError != null) {\n ioError.fillInStackTrace();\n throw ioError;\n throw remoteEx;\n }\n}\n"
"public static boolean isKnownOption(String name) {\n return name != null && Option.valueOf(name) != null;\n}\n"
"private static StringManager getLocalStrings() {\n if (localStrings == null) {\n synchronized (ConnectionManagerImpl.class) {\n if (localStrings == null) {\n localStrings = StringManager.getManager(ConnectionManagerImpl.class);\n }\n }\n }\n return localStrings;\n}\n"
"public void update(final ModelEvent event) {\n if (event.part == ModelPart.RESULT) {\n result = (ARXResult) event.data;\n reset();\n } else if (event.part == ModelPart.SELECTED_NODE) {\n if (event.data == null) {\n reset();\n } else {\n update((ARXNode) event.data);\n SWTUtil.enable(root);\n }\n }\n}\n"
"public Method getMethod(String methodName, int parameterCount) {\n java.lang.reflect.Method[] declaredMethods = existing.getDeclaredMethods();\n for (java.lang.reflect.Method method : declaredMethods) {\n Class<?>[] parameterTypes = method.getParameterTypes();\n if (method.getName().equals(methodName) && parameterTypes.length == parameterCount) {\n ArrayList<Parameter> parameters = convertParameters(parameterTypes);\n return new Method(this.getClassIdentifier(), MemberFlags.fromReflection(method), existing(method.getReturnType()), methodName, parameters, new ArrayList<Statement>(), existing.isInterface());\n }\n }\n return null;\n}\n"
"private String decodeUtf8String(int length) throws IOException {\n try {\n final ByteBuffer buffer = mByteBuffer;\n final StringBuilder builder = new StringBuilder(length);\n for (int i = 0; i < length; ++i) {\n final int b1 = buffer.get();\n if ((b1 & 0x80) == 0) {\n builder.append((char) b1);\n } else if ((b1 & 0xE0) == 0xC0) {\n final int b2 = buffer.get();\n builder.append((char) (((b1 << 6) ^ b2) ^ 0x0f80));\n } else if ((b1 & 0xF0) == 0xE0) {\n final int b2 = buffer.get();\n final int b3 = buffer.get();\n builder.append((char) (((b1 << 12) ^ (b2 << 6) ^ b3) ^ 0x1f80));\n } else if ((b1 & 0xF8) == 0xF0) {\n final int b2 = buffer.get();\n final int b3 = buffer.get();\n final int b4 = buffer.get();\n final int code = ((b1 & 0x07) << 18) | ((b2 & 0x3f) << 12) | ((b3 & 0x3f) << 6) | (b4 & 0x3f);\n builder.append(Surrogate.highSurrogate(code));\n builder.append(Surrogate.lowSurrogate(code));\n ++i;\n } else {\n throw new SerializationException(\"String_Node_Str\");\n }\n }\n return builder.toString();\n } catch (BufferUnderflowException ignore) {\n throw new EOFException();\n }\n}\n"
"public static void main(String[] args) throws Exception {\n int degreeOfParallelism = 2;\n int numSubTasksPerInstance = degreeOfParallelism;\n String pageWithRankInputPath = \"String_Node_Str\" + PlayConstants.PLAY_DIR + \"String_Node_Str\";\n String transitionMatrixInputPath = \"String_Node_Str\" + PlayConstants.PLAY_DIR + \"String_Node_Str\";\n String outputPath = \"String_Node_Str\";\n String confPath = PlayConstants.PLAY_DIR + \"String_Node_Str\";\n int memoryPerTask = 25;\n int memoryForMatch = memoryPerTask;\n int numIterations = 5;\n if (args.length == 9) {\n degreeOfParallelism = Integer.parseInt(args[0]);\n numSubTasksPerInstance = Integer.parseInt(args[1]);\n pageWithRankInputPath = args[2];\n transitionMatrixInputPath = args[3];\n outputPath = args[4];\n confPath = args[5];\n memoryPerTask = Integer.parseInt(args[6]);\n memoryForMatch = Integer.parseInt(args[7]);\n numIterations = Integer.parseInt(args[8]);\n }\n JobGraph jobGraph = new JobGraph(\"String_Node_Str\");\n JobInputVertex pageWithRankInput = JobGraphUtils.createInput(PageWithRankInputFormat.class, pageWithRankInputPath, \"String_Node_Str\", jobGraph, degreeOfParallelism, numSubTasksPerInstance);\n TaskConfig pageWithRankInputConfig = new TaskConfig(pageWithRankInput.getConfiguration());\n pageWithRankInputConfig.setComparatorFactoryForOutput(PactRecordComparatorFactory.class, 0);\n PactRecordComparatorFactory.writeComparatorSetupToConfig(pageWithRankInputConfig.getConfigForOutputParameters(0), new int[] { 0 }, new Class[] { PactLong.class }, new boolean[] { true });\n JobInputVertex transitionMatrixInput = JobGraphUtils.createInput(RowPartitionedTransitionMatrixInputFormat.class, transitionMatrixInputPath, \"String_Node_Str\", jobGraph, degreeOfParallelism, numSubTasksPerInstance);\n TaskConfig transitionMatrixInputConfig = new TaskConfig(transitionMatrixInput.getConfiguration());\n transitionMatrixInputConfig.setComparatorFactoryForOutput(PactRecordComparatorFactory.class, 0);\n PactRecordComparatorFactory.writeComparatorSetupToConfig(transitionMatrixInputConfig.getConfigForOutputParameters(0), new int[] { 0 }, new Class[] { PactLong.class }, new boolean[] { true });\n JobTaskVertex head = JobGraphUtils.createTask(IterationHeadPactTask.class, \"String_Node_Str\", jobGraph, degreeOfParallelism, numSubTasksPerInstance);\n TaskConfig headConfig = new TaskConfig(head.getConfiguration());\n headConfig.setDriver(MapDriver.class);\n headConfig.setStubClass(IdentityMap.class);\n headConfig.setMemorySize(memoryPerTask * JobGraphUtils.MEGABYTE);\n headConfig.setBackChannelMemoryFraction(0.8f);\n JobTaskVertex intermediate = JobGraphUtils.createTask(IterationIntermediatePactTask.class, \"String_Node_Str\", jobGraph, degreeOfParallelism, numSubTasksPerInstance);\n TaskConfig intermediateConfig = new TaskConfig(intermediate.getConfiguration());\n intermediateConfig.setDriver(RepeatableHashjoinMatchDriverWithCachedBuildside.class);\n intermediateConfig.setStubClass(DotProductRowMatch.class);\n PactRecordComparatorFactory.writeComparatorSetupToConfig(intermediateConfig.getConfigForInputParameters(0), new int[] { 0 }, new Class[] { PactLong.class }, new boolean[] { true });\n PactRecordComparatorFactory.writeComparatorSetupToConfig(intermediateConfig.getConfigForInputParameters(1), new int[] { 0 }, new Class[] { PactLong.class }, new boolean[] { true });\n intermediateConfig.setMemorySize(memoryForMatch * JobGraphUtils.MEGABYTE);\n intermediateConfig.setComparatorFactoryForOutput(PactRecordComparatorFactory.class, 0);\n PactRecordComparatorFactory.writeComparatorSetupToConfig(intermediateConfig.getConfigForOutputParameters(0), new int[] { 0 }, new Class[] { PactLong.class }, new boolean[] { true });\n JobTaskVertex tail = JobGraphUtils.createTask(IterationTailPactTask.class, \"String_Node_Str\", jobGraph, degreeOfParallelism, numSubTasksPerInstance);\n TaskConfig tailConfig = new TaskConfig(tail.getConfiguration());\n tailConfig.setLocalStrategy(TaskConfig.LocalStrategy.COMBININGSORT);\n tailConfig.setDriver(ReduceDriver.class);\n tailConfig.setStubClass(DotProductReducer.class);\n PactRecordComparatorFactory.writeComparatorSetupToConfig(tailConfig.getConfigForInputParameters(0), new int[] { 0 }, new Class[] { PactLong.class }, new boolean[] { true });\n tailConfig.setMemorySize(memoryPerTask * JobGraphUtils.MEGABYTE);\n tailConfig.setNumFilehandles(10);\n JobOutputVertex sync = JobGraphUtils.createSync(jobGraph, degreeOfParallelism);\n TaskConfig syncConfig = new TaskConfig(sync.getConfiguration());\n syncConfig.setNumberOfIterations(numIterations);\n JobOutputVertex output = JobGraphUtils.createFileOutput(jobGraph, \"String_Node_Str\", degreeOfParallelism, numSubTasksPerInstance);\n TaskConfig outputConfig = new TaskConfig(output.getConfiguration());\n outputConfig.setStubClass(PageWithRankOutFormat.class);\n outputConfig.setStubParameter(FileOutputFormat.FILE_PARAMETER_KEY, outputPath);\n JobOutputVertex fakeTailOutput = JobGraphUtils.createFakeOutput(jobGraph, \"String_Node_Str\", degreeOfParallelism, numSubTasksPerInstance);\n JobGraphUtils.connect(pageWithRankInput, head, ChannelType.NETWORK, DistributionPattern.BIPARTITE, ShipStrategyType.PARTITION_HASH);\n JobGraphUtils.connect(head, intermediate, ChannelType.NETWORK, DistributionPattern.POINTWISE, ShipStrategyType.FORWARD);\n JobGraphUtils.connect(transitionMatrixInput, intermediate, ChannelType.NETWORK, DistributionPattern.BIPARTITE, ShipStrategyType.PARTITION_HASH);\n intermediateConfig.setGateIterativeWithNumberOfEventsUntilInterrupt(0, degreeOfParallelism);\n JobGraphUtils.connect(head, sync, ChannelType.NETWORK, DistributionPattern.POINTWISE, ShipStrategyType.FORWARD);\n JobGraphUtils.connect(head, output, ChannelType.INMEMORY, DistributionPattern.POINTWISE, ShipStrategyType.FORWARD);\n JobGraphUtils.connect(tail, fakeTailOutput, ChannelType.INMEMORY, DistributionPattern.POINTWISE, ShipStrategyType.FORWARD);\n JobGraphUtils.connect(intermediate, tail, ChannelType.NETWORK, DistributionPattern.BIPARTITE, ShipStrategyType.PARTITION_HASH);\n tailConfig.setGateIterativeWithNumberOfEventsUntilInterrupt(0, degreeOfParallelism);\n fakeTailOutput.setVertexToShareInstancesWith(tail);\n tail.setVertexToShareInstancesWith(head);\n pageWithRankInput.setVertexToShareInstancesWith(head);\n transitionMatrixInput.setVertexToShareInstancesWith(head);\n intermediate.setVertexToShareInstancesWith(head);\n output.setVertexToShareInstancesWith(head);\n sync.setVertexToShareInstancesWith(head);\n GlobalConfiguration.loadConfiguration(confPath);\n Configuration conf = GlobalConfiguration.getConfiguration();\n JobGraphUtils.submit(jobGraph, conf);\n}\n"
"public static BigDecimal findChasePrice(BigDecimal price, int ticks, BettingAspect aspect) {\n return aspect == BettingAspect.BACK ? PRICE_TICKS.get(PRICE_TICKS.indexOf(price.stripTrailingZeros()) + ticks) : PRICE_TICKS.get(PRICE_TICKS.indexOf(price.stripTrailingZeros()) - ticks);\n}\n"
"public void output(ReportOutputter[] outputters, File cache) {\n for (int i = 0; i < outputters.length; i++) {\n outputters[i].output(this, cacheMgr);\n }\n}\n"
"public boolean removeKubernetesCluster(String kubernetesClusterId) throws NonExistingKubernetesClusterException {\n if (StringUtils.isEmpty(kubernetesClusterId)) {\n throw new NonExistingKubernetesClusterException(\"String_Node_Str\");\n }\n Collection<NetworkPartition> networkPartitions = CloudControllerContext.getInstance().getNetworkPartitions();\n for (NetworkPartition networkPartition : networkPartitions) {\n if (networkPartition.getProvider().equals(KUBERNETES_PROVIDER)) {\n for (Partition partition : networkPartition.getPartitions()) {\n for (Property property : partition.getProperties().getProperties()) {\n if (property.getName().equals(KUBERNETES_CLUSTER) && property.getValue().equals(kubernetesClusterId)) {\n throw new KubernetesClusterAlreadyUsedException(\"String_Node_Str\");\n }\n }\n }\n }\n }\n Lock lock = null;\n try {\n lock = CloudControllerContext.getInstance().acquireKubernetesClusterWriteLock();\n if (log.isInfoEnabled()) {\n log.info(\"String_Node_Str\" + kubernetesClusterId);\n }\n CloudControllerContext.getInstance().removeKubernetesCluster(kubernetesClusterId);\n CloudControllerContext.getInstance().removeKubernetesClusterContext(kubernetesClusterId);\n if (log.isInfoEnabled()) {\n log.info(String.format(\"String_Node_Str\", kubernetesClusterId));\n }\n CloudControllerContext.getInstance().persist();\n } catch (RegistryException e) {\n log.error(\"String_Node_Str\", e);\n return false;\n } finally {\n if (lock != null) {\n CloudControllerContext.getInstance().releaseWriteLock(lock);\n }\n }\n return true;\n}\n"
"SelectQuery composeQuery(Map<String, Object> metaData) {\n List<UnnamedColumn> tierPredicates = method.getTierExpressions(metaData);\n int tierCount = tierPredicates.size() + 1;\n String tierColumnName = options.get(\"String_Node_Str\");\n String blockColumnName = options.get(\"String_Node_Str\");\n List<SelectItem> selectItems = new ArrayList<>();\n List<Pair<String, String>> columnNamesAndTypes = (List<Pair<String, String>>) metaData.get(ScramblingPlan.COLUMN_METADATA_KEY);\n final String mainTableAlias = method.getMainTableAlias();\n for (Pair<String, String> nameAndType : columnNamesAndTypes) {\n String name = nameAndType.getLeft();\n selectItems.add(new BaseColumn(mainTableAlias, name));\n }\n List<UnnamedColumn> tierOperands = new ArrayList<>();\n UnnamedColumn tierExpr = null;\n if (tierPredicates.size() == 0) {\n tierExpr = ConstantColumn.valueOf(0);\n } else if (tierPredicates.size() > 0) {\n for (int i = 0; i < tierPredicates.size(); i++) {\n UnnamedColumn pred = tierPredicates.get(i);\n tierOperands.add(pred);\n tierOperands.add(ConstantColumn.valueOf(i));\n }\n tierOperands.add(ConstantColumn.valueOf(tierPredicates.size()));\n tierExpr = ColumnOp.whenthenelse(tierOperands);\n }\n selectItems.add(new AliasedColumn(tierExpr, tierColumnName));\n UnnamedColumn blockExpr = null;\n List<UnnamedColumn> blockOperands = new ArrayList<>();\n for (int i = 0; i < tierCount; i++) {\n List<Double> cumulProb = method.getCumulativeProbabilityDistributionForTier(metaData, i);\n List<Double> condProb = computeConditionalProbabilityDistribution(cumulProb);\n int blockCount = cumulProb.size();\n List<UnnamedColumn> blockForTierOperands = new ArrayList<>();\n for (int j = 0; j < blockCount; j++) {\n blockForTierOperands.add(ColumnOp.lessequal(ColumnOp.rand(), ConstantColumn.valueOf(condProb.get(j))));\n blockForTierOperands.add(ConstantColumn.valueOf(j));\n }\n UnnamedColumn blockForTierExpr;\n ;\n if (blockForTierOperands.size() <= 1) {\n blockForTierExpr = ConstantColumn.valueOf(0);\n } else {\n blockForTierExpr = ColumnOp.whenthenelse(blockForTierOperands);\n }\n if (i < tierCount - 1) {\n blockOperands.add(ColumnOp.equal(tierExpr, ConstantColumn.valueOf(i)));\n }\n blockOperands.add(blockForTierExpr);\n }\n if (tierCount == 1) {\n blockExpr = blockOperands.get(0);\n } else {\n blockExpr = ColumnOp.whenthenelse(blockOperands);\n }\n selectItems.add(new AliasedColumn(blockExpr, blockColumnName));\n AbstractRelation tableSource = method.getScramblingSource(originalSchemaName, originalTableName, metaData);\n SelectQuery scramblingQuery = SelectQuery.create(selectItems, tableSource);\n return scramblingQuery;\n}\n"
"public EntityBean findAnotherBySameLabel(String label, int studyId, int studySubjectId) {\n StudySubjectBean eb = new StudySubjectBean();\n this.setTypesExpected();\n HashMap variables = new HashMap();\n variables.put(new Integer(1), ESAPI.encoder().encodeForHTML(label));\n variables.put(new Integer(2), new Integer(studyId));\n variables.put(new Integer(3), new Integer(studySubjectId));\n String sql = digester.getQuery(\"String_Node_Str\");\n ArrayList alist = this.select(sql, variables);\n Iterator it = alist.iterator();\n if (it.hasNext()) {\n eb = (StudySubjectBean) this.getEntityFromHashMap((HashMap) it.next());\n }\n return eb;\n}\n"
"public void setDisplayZoomControls(boolean enabled) {\n mContentSettings.setDisplayZoomControls(enabled);\n}\n"
"private String odlLogFormat(LogRecord record) {\n try {\n LogEventImpl logEvent = new LogEventImpl();\n String message = getLogMessage(record);\n boolean multiLine = isMultiLine(message);\n StringBuilder recordBuffer = new StringBuilder();\n Date date = new Date();\n SimpleDateFormat dateFormatter = new SimpleDateFormat(getRecordDateFormat() != null ? getRecordDateFormat() : RFC_3339_DATE_FORMAT);\n date.setTime(record.getMillis());\n recordBuffer.append(FIELD_BEGIN_MARKER);\n String timestamp = dateFormatter.format(date);\n logEvent.setTimestamp(timestamp);\n recordBuffer.append(timestamp);\n recordBuffer.append(FIELD_END_MARKER);\n recordBuffer.append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n recordBuffer.append(FIELD_BEGIN_MARKER);\n logEvent.setComponentId(AS_COMPONENT_NAME);\n recordBuffer.append(AS_COMPONENT_NAME);\n recordBuffer.append(FIELD_END_MARKER);\n recordBuffer.append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n Level logLevel = record.getLevel();\n recordBuffer.append(FIELD_BEGIN_MARKER);\n String odlLevel = getMapplingLogRecord(logLevel);\n logEvent.setLevel(odlLevel);\n recordBuffer.append(odlLevel);\n recordBuffer.append(FIELD_END_MARKER);\n recordBuffer.append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n recordBuffer.append(FIELD_BEGIN_MARKER);\n String msgId = UniformLogFormatter.getMessageId(record);\n recordBuffer.append((msgId == null) ? \"String_Node_Str\" : msgId);\n logEvent.setMessageId(msgId);\n recordBuffer.append(FIELD_END_MARKER);\n recordBuffer.append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n recordBuffer.append(FIELD_BEGIN_MARKER);\n recordBuffer.append(record.getLoggerName());\n logEvent.setLogger(record.getLoggerName());\n recordBuffer.append(FIELD_END_MARKER);\n recordBuffer.append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n if (includeSuppAttrsBits.get(SupplementalAttribute.TID.ordinal())) {\n recordBuffer.append(FIELD_BEGIN_MARKER);\n recordBuffer.append(\"String_Node_Str\");\n recordBuffer.append(record.getThreadID());\n logEvent.setThreadId(record.getThreadID());\n String threadName;\n if (record instanceof GFLogRecord) {\n threadName = ((GFLogRecord) record).getThreadName();\n } else {\n threadName = Thread.currentThread().getName();\n }\n recordBuffer.append(\"String_Node_Str\");\n logEvent.setThreadName(threadName);\n recordBuffer.append(threadName);\n recordBuffer.append(FIELD_END_MARKER);\n recordBuffer.append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n }\n if (includeSuppAttrsBits.get(SupplementalAttribute.USERID.ordinal()) && userID != null && !(\"String_Node_Str\").equals(userID.trim())) {\n recordBuffer.append(FIELD_BEGIN_MARKER);\n recordBuffer.append(\"String_Node_Str\");\n logEvent.setUser(userID);\n recordBuffer.append(userID);\n recordBuffer.append(FIELD_END_MARKER);\n recordBuffer.append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n }\n if (includeSuppAttrsBits.get(SupplementalAttribute.ECID.ordinal()) && ecID != null && !(\"String_Node_Str\").equals(ecID.trim())) {\n recordBuffer.append(FIELD_BEGIN_MARKER);\n recordBuffer.append(\"String_Node_Str\");\n logEvent.setECId(ecID);\n recordBuffer.append(ecID);\n recordBuffer.append(FIELD_END_MARKER);\n recordBuffer.append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n }\n if (includeSuppAttrsBits.get(SupplementalAttribute.TIME_MILLIS.ordinal())) {\n recordBuffer.append(FIELD_BEGIN_MARKER);\n recordBuffer.append(\"String_Node_Str\");\n logEvent.setTimeMillis(record.getMillis());\n recordBuffer.append(record.getMillis());\n recordBuffer.append(FIELD_END_MARKER);\n recordBuffer.append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n }\n if (includeSuppAttrsBits.get(SupplementalAttribute.LEVEL_VALUE.ordinal())) {\n recordBuffer.append(FIELD_BEGIN_MARKER);\n recordBuffer.append(\"String_Node_Str\");\n logEvent.setLevelValue(logLevel.intValue());\n recordBuffer.append(logLevel.intValue());\n recordBuffer.append(FIELD_END_MARKER);\n recordBuffer.append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n }\n if (RECORD_NUMBER_IN_KEY_VALUE) {\n recordBuffer.append(FIELD_BEGIN_MARKER);\n recordNumber++;\n recordBuffer.append(\"String_Node_Str\");\n logEvent.getSupplementalAttributes().put(\"String_Node_Str\", recordNumber);\n recordBuffer.append(recordNumber);\n recordBuffer.append(FIELD_END_MARKER);\n recordBuffer.append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n }\n Level level = record.getLevel();\n if (LOG_SOURCE_IN_KEY_VALUE || (level.intValue() <= Level.FINE.intValue())) {\n String sourceClassName = record.getSourceClassName();\n if (sourceClassName != null && !sourceClassName.isEmpty()) {\n recordBuffer.append(FIELD_BEGIN_MARKER);\n recordBuffer.append(\"String_Node_Str\");\n logEvent.getSupplementalAttributes().put(\"String_Node_Str\", sourceClassName);\n recordBuffer.append(sourceClassName);\n recordBuffer.append(FIELD_END_MARKER);\n recordBuffer.append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n }\n String sourceMethodName = record.getSourceMethodName();\n if (sourceMethodName != null && !sourceMethodName.isEmpty()) {\n recordBuffer.append(FIELD_BEGIN_MARKER);\n recordBuffer.append(\"String_Node_Str\");\n logEvent.getSupplementalAttributes().put(\"String_Node_Str\", sourceMethodName);\n recordBuffer.append(sourceMethodName);\n recordBuffer.append(FIELD_END_MARKER);\n recordBuffer.append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n }\n }\n if (_delegate != null) {\n _delegate.format(recordBuffer, level);\n }\n if (multiLine) {\n recordBuffer.append(FIELD_BEGIN_MARKER).append(FIELD_BEGIN_MARKER);\n recordBuffer.append(LINE_SEPARATOR);\n }\n recordBuffer.append(message);\n logEvent.setMessage(message);\n if (multiLine) {\n recordBuffer.append(FIELD_END_MARKER).append(FIELD_END_MARKER);\n }\n recordBuffer.append(LINE_SEPARATOR);\n informLogEventListeners(logEvent);\n return recordBuffer.toString();\n } catch (Exception ex) {\n new ErrorManager().error(\"String_Node_Str\", ex, ErrorManager.FORMAT_FAILURE);\n return \"String_Node_Str\";\n }\n}\n"
"public static double absVal(double x) {\n return halfLinear(Math.abs(x));\n}\n"
"private static String createAbsolutePath(String filePath) {\n if (isWorkingFolderAccessOnly || isRelativePath(filePath)) {\n return workingFolder + File.separator + filePath;\n }\n return filePath;\n}\n"