content stringlengths 40 137k |
|---|
"private boolean isSet(Object object) {\n Boolean isSet;\n try {\n Boolean isSet = (Boolean) PrivilegedAccessHelper.invokeMethod(getIsSetMethod(object.getClass()), object, isSetParameters);\n return isSet.booleanValue();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n return isSet.booleanValue();\n}\n"
|
"public void actionMenuEditAnonymize() {\n if (model == null) {\n main.showInfoDialog(main.getShell(), Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\"));\n return;\n }\n if (model.getInputConfig().getInput() == null) {\n main.showInfoDialog(main.getShell(), Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\"));\n return;\n }\n model.createConfig();\n if (!model.isValidLatticeSize()) {\n final String message = Resources.getMessage(\"String_Node_Str\") + Resources.getMessage(\"String_Node_Str\") + Resources.getMessage(\"String_Node_Str\") + Resources.getMessage(\"String_Node_Str\");\n main.showInfoDialog(main.getShell(), Resources.getMessage(\"String_Node_Str\"), message);\n return;\n }\n if (model.getInputConfig().getResearchSubset().size() == 0) {\n final String message = Resources.getMessage(\"String_Node_Str\");\n main.showInfoDialog(main.getShell(), Resources.getMessage(\"String_Node_Str\"), message);\n return;\n }\n actionResetOutput();\n final WorkerAnonymize worker = new WorkerAnonymize(model);\n main.showProgressDialog(Resources.getMessage(\"String_Node_Str\"), worker);\n if (worker.getError() != null) {\n Throwable t = worker.getError();\n if (worker.getError() instanceof InvocationTargetException) {\n t = worker.getError().getCause();\n }\n if (t instanceof NullPointerException) {\n main.showErrorDialog(main.getShell(), \"String_Node_Str\", t);\n } else {\n main.showInfoDialog(main.getShell(), Resources.getMessage(\"String_Node_Str\"), Resources.getMessage(\"String_Node_Str\") + t.getMessage());\n }\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n worker.getError().printStackTrace(pw);\n getResources().getLogger().info(sw.toString());\n return;\n }\n if (worker.getResult() != null) {\n final ARXResult result = worker.getResult();\n model.createClonedConfig();\n model.setResult(result);\n model.clearClipboard();\n update(new ModelEvent(this, ModelPart.RESULT, result));\n update(new ModelEvent(this, ModelPart.CLIPBOARD, null));\n if (result.isResultAvailable()) {\n model.setOutput(result.getOutput(false), result.getGlobalOptimum());\n model.setSelectedNode(result.getGlobalOptimum());\n update(new ModelEvent(this, ModelPart.OUTPUT, result.getOutput(false)));\n update(new ModelEvent(this, ModelPart.SELECTED_NODE, result.getGlobalOptimum()));\n if (model.getMaximalSizeForComplexOperations() == 0 || model.getInputConfig().getInput().getHandle().getNumRows() <= model.getMaximalSizeForComplexOperations()) {\n this.model.getViewConfig().setSubset(true);\n this.model.getViewConfig().setMode(Mode.GROUPED);\n this.updateViewConfig(true);\n } else {\n this.model.getViewConfig().setSubset(true);\n this.model.getViewConfig().setMode(Mode.UNSORTED);\n }\n this.update(new ModelEvent(this, ModelPart.VIEW_CONFIG, model.getOutput()));\n } else {\n model.setOutput(null, null);\n model.setSelectedNode(null);\n update(new ModelEvent(this, ModelPart.OUTPUT, null));\n update(new ModelEvent(this, ModelPart.SELECTED_NODE, null));\n }\n update(new ModelEvent(this, ModelPart.SELECTED_ATTRIBUTE, model.getSelectedAttribute()));\n }\n}\n"
|
"public void run() {\n new CreateNewAnalysisAction().run(null, null);\n AnalysisEditor editor = (AnalysisEditor) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();\n if (editor != null) {\n ColumnMasterDetailsPage page = (ColumnMasterDetailsPage) editor.getMasterPage();\n if (!this.selection.isEmpty()) {\n TdColumn[] columns = new TdColumn[selection.size()];\n Iterator it = this.selection.iterator();\n int i = 0;\n while (it.hasNext()) {\n columns[i] = (TdColumn) it.next();\n i++;\n }\n page.getTreeViewer().setInput(columns);\n }\n }\n}\n"
|
"protected boolean performInsert(Object model, PropertyHandle propertyHandle, String type, String position, Map extendData) throws Exception {\n if (type == null) {\n if (propertyHandle == null) {\n DesignElementHandle handle = ((CrosstabCellHandle) ((ExtendedItemHandle) model).getReportItem()).getModelHandle();\n propertyHandle = ((ExtendedItemHandle) model).getPropertyHandle(DEUtil.getDefaultContentName(handle));\n }\n List supportList = UIUtil.getUIElementSupportList(propertyHandle);\n if (supportList.size() == 0) {\n ExceptionUtil.openMessage(WARNING_DIALOG_TITLE, WARNING_DIALOG_MESSAGE_EMPTY_LIST, SWT.ICON_WARNING);\n return false;\n } else if (supportList.size() == 1) {\n type = ((IElementDefn) supportList.get(0)).getName();\n } else {\n NewSectionDialog dialog = new NewSectionDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), supportList);\n if (dialog.open() == Dialog.CANCEL) {\n return false;\n }\n type = (String) dialog.getResult()[0];\n }\n }\n PaletteEntryExtension[] entries = EditpartExtensionManager.getPaletteEntries();\n for (int i = 0; i < entries.length; i++) {\n if (entries[i].getItemName().equals(type)) {\n extendData.put(IRequestConstants.REQUEST_KEY_RESULT, entries[i].executeCreate());\n return true;\n }\n }\n DesignElementHandle elementHandle = createElement(type);\n if (extendData != null) {\n extendData.put(IRequestConstants.REQUEST_KEY_RESULT, elementHandle);\n }\n if (elementHandle == null) {\n return false;\n } else {\n int pos = DNDUtil.calculateNextPosition(model, DNDUtil.handleValidateTargetCanContain(model, elementHandle, true));\n if (pos > 0 && position == InsertAction.ABOVE) {\n pos--;\n }\n if (pos == -1) {\n propertyHandle.add(elementHandle);\n } else {\n propertyHandle.add(elementHandle, pos);\n }\n }\n if (elementHandle instanceof ExtendedItemHandle) {\n if (ElementProcessorFactory.createProcessor(elementHandle) != null && !ElementProcessorFactory.createProcessor(elementHandle).editElement(elementHandle)) {\n return false;\n }\n }\n return true;\n}\n"
|
"protected int scan(final ReadSet readIndexFilter, final IndexedIdentifier targetIds, final AlignmentWriter writer, final AlignmentTooManyHitsWriter tmhWriter) throws IOException {\n int numAligns = 0;\n final ProgressLogger progress = new ProgressLogger(LOG);\n SAMFileReader.setDefaultValidationStringency(SAMFileReader.ValidationStringency.SILENT);\n final InputStream stream = \"String_Node_Str\".equals(inputFile) ? System.in : new FileInputStream(inputFile);\n final SAMFileReader parser = new SAMFileReader(stream);\n boolean hasPaired = false;\n progress.start();\n final SAMRecordIterator samIterator = parser.iterator();\n SamHelper samHelper = new SamHelper();\n samHelper.setQualityEncoding(qualityEncoding);\n numberOfReads = 0;\n SAMRecord prevRecord = null;\n final SAMFileHeader fileHeader = parser.getFileHeader();\n if (fileHeader.getSequenceDictionary().isEmpty()) {\n System.err.println(\"String_Node_Str\");\n System.exit(0);\n }\n if (sortedInput) {\n final int numTargets = fileHeader.getSequenceDictionary().size();\n final int[] targetLengths = new int[numTargets];\n for (int i = 0; i < numTargets; i++) {\n final SAMSequenceRecord seq = fileHeader.getSequence(i);\n final int targetIndex = getTargetIndex(targetIds, seq.getSequenceName(), thirdPartyInput);\n targetLengths[targetIndex] = seq.getSequenceLength();\n }\n writer.setTargetLengths(targetLengths);\n writer.setSorted(true);\n }\n while (samIterator.hasNext()) {\n samHelper.reset();\n numberOfReads++;\n final SAMRecord samRecord = samIterator.next();\n if (samRecord.getReadUnmappedFlag()) {\n if (debug && LOG.isDebugEnabled()) {\n LOG.debug(String.format(\"String_Node_Str\", samRecord.getReadName()));\n }\n continue;\n }\n if (sortedInput) {\n if (prevRecord != null) {\n final int compare = prevRecord.getAlignmentStart() - samRecord.getAlignmentStart();\n if (compare > 0) {\n final String message = String.format(\"String_Node_Str\", samRecord.toString(), prevRecord.toString());\n System.err.println(\"String_Node_Str\" + message);\n LOG.warn(message);\n System.exit(0);\n }\n }\n }\n prevRecord = samRecord;\n int readMaxOccurence = 1;\n final boolean readIsPaired = samRecord.getReadPairedFlag();\n final boolean b = readIsPaired && !samRecord.getReadUnmappedFlag();\n if (b) {\n hasPaired = true;\n readMaxOccurence++;\n }\n final Object xoString = samRecord.getAttribute(\"String_Node_Str\");\n final int numTotalHits = xoString == null ? 1 : hasPaired ? 1 : (Integer) xoString;\n if (hasPaired) {\n readMaxOccurence = readIsPaired ? 2 : 1;\n } else {\n readMaxOccurence = numTotalHits;\n }\n final String readName = samRecord.getReadName();\n final int queryIndex = thirdPartyInput ? nameToQueryIndices.getQueryIndex(readName, readMaxOccurence) : Integer.parseInt(readName);\n final int targetIndex = getTargetIndex(targetIds, samRecord.getReferenceName(), thirdPartyInput);\n final int fragmentIndex;\n final int mateFragmentIndex;\n if (readIsPaired) {\n if (samRecord.getFirstOfPairFlag()) {\n fragmentIndex = 0;\n mateFragmentIndex = 1;\n } else {\n fragmentIndex = 1;\n mateFragmentIndex = 0;\n }\n } else {\n fragmentIndex = 0;\n mateFragmentIndex = 1;\n }\n if (bsmap) {\n final String specifiedReference = (String) samRecord.getAttribute(\"String_Node_Str\");\n final String directions = (String) samRecord.getAttribute(\"String_Node_Str\");\n final boolean reverseStrand = directions.equals(\"String_Node_Str\") || directions.equals(\"String_Node_Str\");\n samHelper.setSourceWithReference(queryIndex, samRecord.getReadString(), samRecord.getBaseQualityString(), specifiedReference, samRecord.getAlignmentStart(), reverseStrand);\n } else {\n samHelper.setSource(queryIndex, samRecord.getReadString(), samRecord.getBaseQualityString(), samRecord.getCigarString(), (String) samRecord.getAttribute(\"String_Node_Str\"), samRecord.getAlignmentStart(), samRecord.getReadNegativeStrandFlag());\n }\n int multiplicity = 1;\n if (readIndexFilter != null) {\n multiplicity = readIndexFilter.getMultiplicity(queryIndex);\n }\n largestQueryIndex = Math.max(queryIndex, largestQueryIndex);\n smallestQueryIndex = Math.min(queryIndex, smallestQueryIndex);\n final Alignments.AlignmentEntry.Builder currentEntry = Alignments.AlignmentEntry.newBuilder();\n currentEntry.setMultiplicity(multiplicity);\n currentEntry.setQueryIndex(samHelper.getQueryIndex());\n currentEntry.setTargetIndex(targetIndex);\n currentEntry.setPosition(samHelper.getPosition());\n currentEntry.setQueryPosition(samHelper.getQueryPosition());\n currentEntry.setFragmentIndex(fragmentIndex);\n currentEntry.setQueryLength(samHelper.getQueryLength());\n currentEntry.setScore(samHelper.getScore());\n currentEntry.setNumberOfIndels(samHelper.getNumDeletions() + samHelper.getNumInsertions());\n currentEntry.setNumberOfMismatches(samHelper.getNumMisMatches());\n currentEntry.setMatchingReverseStrand(samHelper.isReverseStrand());\n currentEntry.setQueryAlignedLength(samHelper.getQueryAlignedLength());\n currentEntry.setTargetAlignedLength(samHelper.getTargetAlignedLength());\n currentEntry.setPairFlags(samRecord.getFlags());\n currentEntry.setMappingQuality(samRecord.getMappingQuality());\n if (hasPaired) {\n currentEntry.setInsertSize(samRecord.getInferredInsertSize());\n }\n if (readIsPaired) {\n if (!samRecord.getMateUnmappedFlag()) {\n final Alignments.RelatedAlignmentEntry.Builder relatedBuilder = Alignments.RelatedAlignmentEntry.newBuilder();\n final int mateTargetIndex = getTargetIndex(targetIds, samRecord.getMateReferenceName(), thirdPartyInput);\n final int mateAlignmentStart = samRecord.getMateAlignmentStart() - 1;\n relatedBuilder.setFragmentIndex(mateFragmentIndex);\n relatedBuilder.setPosition(mateAlignmentStart);\n relatedBuilder.setTargetIndex(mateTargetIndex);\n currentEntry.setPairAlignmentLink(relatedBuilder);\n }\n }\n for (final SamSequenceVariation var : samHelper.getSequenceVariations()) {\n appendNewSequenceVariation(currentEntry, var, samHelper.getQueryLength());\n if (debug && LOG.isDebugEnabled()) {\n LOG.debug(String.format(\"String_Node_Str\", var.toString(), queryIndex));\n }\n }\n final Alignments.AlignmentEntry alignmentEntry = currentEntry.build();\n if (qualityFilter.keepEntry(samHelper.getQueryLength(), alignmentEntry)) {\n if (numTotalHits <= mParameter) {\n writer.appendEntry(alignmentEntry);\n numAligns += multiplicity;\n if (debug && LOG.isDebugEnabled()) {\n LOG.debug(String.format(\"String_Node_Str\", queryIndex));\n }\n } else {\n tmhWriter.append(queryIndex, numTotalHits, samHelper.getQueryLength());\n if (debug && LOG.isDebugEnabled()) {\n LOG.debug(String.format(\"String_Node_Str\", queryIndex));\n }\n while (queryIndex == nameToQueryIndices.getQueryIndex(samRecord.getReadName(), 0)) ;\n }\n } else {\n if (debug && LOG.isDebugEnabled()) {\n LOG.debug(String.format(\"String_Node_Str\", queryIndex));\n }\n }\n progress.lightUpdate();\n }\n samIterator.close();\n if (readIndexFilter != null) {\n writer.putStatistic(\"String_Node_Str\", readIndexFilterFile.getName());\n }\n writer.putStatistic(\"String_Node_Str\", numAligns);\n writer.setNumQueries(Math.max(numberOfReads, numberOfReadsFromCommandLine));\n writer.printStats(System.out);\n final SAMFileHeader samHeader = fileHeader;\n final SAMSequenceDictionary samSequenceDictionary = samHeader.getSequenceDictionary();\n final List<SAMSequenceRecord> samSequenceRecords = samSequenceDictionary.getSequences();\n int targetCount = targetIds.size();\n if (targetIds.size() != 0 && (targetIds.size() != samSequenceRecords.size())) {\n LOG.warn(\"String_Node_Str\" + targetIds.size() + \"String_Node_Str\" + samSequenceRecords.size());\n }\n targetCount = Math.max(samSequenceRecords.size(), targetCount);\n final int[] targetLengths = new int[targetCount];\n for (final SAMSequenceRecord samSequenceRecord : samSequenceRecords) {\n final int index = samSequenceRecord.getSequenceIndex();\n if (debug && LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\" + samSequenceRecord.getSequenceName() + \"String_Node_Str\" + index);\n }\n targetLengths[index] = samSequenceRecord.getSequenceLength();\n }\n writer.setTargetLengths(targetLengths);\n progress.stop();\n return numAligns;\n}\n"
|
"private synchronized boolean _hasOutsideToken(Workspace workspace, DDEDirector director, TimeKeeper timeKeeper, boolean _hideNullTokens) {\n timeKeeper.resortRcvrList();\n if (timeKeeper.getNextTime() == INACTIVE) {\n requestFinish();\n }\n if (getRcvrTime() == INACTIVE && !_terminate) {\n return false;\n }\n if (getRcvrTime() == IGNORE && !_terminate) {\n if (actorName.equals(\"String_Node_Str\")) {\n System.out.println(actorName + \"String_Node_Str\");\n }\n IOPort port = (IOPort) getContainer();\n Director insideDir = ((Actor) port.getContainer()).getDirector();\n if (insideDir instanceof DDEDirector) {\n Receiver[][] rcvrs = null;\n try {\n rcvrs = port.deepGetReceivers();\n } catch (IllegalActionException e) {\n }\n for (int i = 0; i < rcvrs.length; i++) {\n for (int j = 0; j < rcvrs[i].length; j++) {\n DDEReceiver rcvr = (DDEReceiver) rcvrs[i][j];\n rcvr.put(new Token(), TimedQueueReceiver.IGNORE);\n }\n }\n _ignoreNotSeen = false;\n return false;\n } else {\n _ignoreNotSeen = true;\n clearIgnoredTokens();\n timeKeeper.setIgnoredTokens(false);\n return false;\n }\n }\n if (getRcvrTime() > timeKeeper.getNextTime() && !_terminate) {\n return false;\n }\n if (super.hasToken() && !_terminate) {\n if (!timeKeeper.hasMinRcvrTime()) {\n if (hasNullToken()) {\n if (timeKeeper.getHighestPriorityReal() != null) {\n return false;\n } else if (this != timeKeeper.getHighestPriorityNull()) {\n return false;\n } else if (!_hideNullTokens) {\n return true;\n } else {\n super.get();\n timeKeeper.sendOutNullTokens(this);\n return _hasToken(workspace, director, timeKeeper, _hideNullTokens);\n }\n } else {\n return true;\n }\n } else {\n if (hasNullToken()) {\n if (!_hideNullTokens) {\n return true;\n }\n super.get();\n timeKeeper.sendOutNullTokens(this);\n return _hasToken(workspace, director, timeKeeper, _hideNullTokens);\n }\n return true;\n }\n }\n if (!super.hasToken() && !_terminate) {\n _readPending = true;\n if (isConnectedToBoundary()) {\n director.addExternalReadBlock();\n } else {\n director.addInternalReadBlock();\n }\n while (_readPending && !_terminate) {\n workspace.wait(this);\n }\n }\n if (_terminate) {\n if (_readPending) {\n _readPending = false;\n if (isConnectedToBoundary()) {\n director.removeExternalReadBlock();\n } else {\n director.removeInternalReadBlock();\n }\n }\n throw new TerminateProcessException(\"String_Node_Str\");\n } else {\n return _hasToken(workspace, director, timeKeeper, _hideNullTokens);\n }\n}\n"
|
"void clearChunkIds() {\n this.chunkIdMap.clear();\n}\n"
|
"public boolean retryExecution() throws KeeperException, InterruptedException {\n int doneWorkers;\n synchronized (LOCK) {\n doneWorkers = (int) NettyMasterCoordinator.this.iterResults.size();\n }\n if (System.nanoTime() % 30 == 0) {\n LOG.info(\"String_Node_Str\", context.getCurrentIteration(), doneWorkers, (context.getWorkers() - doneWorkers));\n }\n long timeOut = 0L;\n if (context.isFirstIteration() || context.getCurrentIteration() == context.getTotalIteration()) {\n isTerminated = isTerminated(doneWorkers, context.getWorkers(), context.getMinWorkersRatio(), GuaguaConstants.GUAGUA_DEFAULT_MIN_WORKERS_TIMEOUT);\n if (isTerminated) {\n synchronized (LOCK) {\n NettyMasterCoordinator.this.canUpdateWorkerResultMap = false;\n }\n LOG.info(\"String_Node_Str\", context.getCurrentIteration(), context.getWorkers(), doneWorkers, context.getMinWorkersRatio(), GuaguaConstants.GUAGUA_DEFAULT_MIN_WORKERS_TIMEOUT);\n }\n } else {\n isTerminated = isTerminated(doneWorkers, context.getWorkers(), context.getMinWorkersRatio(), context.getMinWorkersTimeOut());\n if (isTerminated) {\n synchronized (LOCK) {\n NettyMasterCoordinator.this.canUpdateWorkerResultMap = false;\n }\n LOG.info(\"String_Node_Str\", context.getCurrentIteration(), context.getWorkers(), doneWorkers, context.getMinWorkersRatio(), context.getMinWorkersTimeOut());\n }\n }\n return isTerminated;\n}\n"
|
"protected void finalProcess(List<GraphTargetItem> list, int level, FinalProcessLocalData localData) throws InterruptedException {\n boolean[] toDelete = new boolean[list.size()];\n for (int i = 0; i < list.size(); i++) {\n if (Thread.currentThread().isInterrupted()) {\n throw new InterruptedException();\n }\n GraphTargetItem itemI = list.get(i);\n if (itemI instanceof ForItem) {\n ForItem fori = (ForItem) itemI;\n int exprLine = fori.getLine();\n if (exprLine > 0) {\n List<GraphTargetItem> forFirstCommands = new ArrayList<>();\n for (int j = i - 1; j >= 0; j--) {\n if (list.get(j).getLine() == exprLine && !(list.get(j) instanceof LoopItem)) {\n forFirstCommands.add(0, list.get(j));\n toDelete[j] = true;\n } else {\n break;\n }\n }\n fori.firstCommands.addAll(0, forFirstCommands);\n }\n }\n if (itemI instanceof WhileItem) {\n WhileItem whi = (WhileItem) itemI;\n int whileExprLine = whi.getLine();\n if (whileExprLine > 0) {\n List<GraphTargetItem> forFirstCommands = new ArrayList<>();\n List<GraphTargetItem> forFinalCommands = new ArrayList<>();\n for (int j = i - 1; j >= 0; j--) {\n GraphTargetItem itemJ = list.get(j);\n if (itemJ.getLine() == whileExprLine && !(itemJ instanceof LoopItem)) {\n forFirstCommands.add(0, itemJ);\n toDelete[j] = true;\n } else {\n break;\n }\n }\n for (int j = whi.commands.size() - 1; j >= 0; j--) {\n if (whi.commands.get(j).getLine() == whileExprLine && !(whi.commands.get(j) instanceof LoopItem)) {\n forFinalCommands.add(0, whi.commands.remove(j));\n } else {\n break;\n }\n }\n if (!forFirstCommands.isEmpty() || !forFinalCommands.isEmpty()) {\n if (forFirstCommands.size() > 2 || forFinalCommands.size() > 2) {\n for (int k = 0; k < forFirstCommands.size(); k++) {\n toDelete[i - 1 - k] = false;\n }\n whi.commands.addAll(forFinalCommands);\n } else if (whi.commands.isEmpty() && forFirstCommands.isEmpty()) {\n whi.commands.addAll(forFinalCommands);\n } else {\n GraphTargetItem lastExpr = whi.expression.remove(whi.expression.size() - 1);\n forFirstCommands.addAll(whi.expression);\n list.set(i, new ForItem(whi.getSrc(), whi.loop, forFirstCommands, lastExpr, forFinalCommands, whi.commands));\n }\n }\n }\n }\n }\n for (int i = toDelete.length - 1; i >= 0; i--) {\n if (toDelete[i]) {\n list.remove(i);\n }\n }\n}\n"
|
"public RestfulResponse getNodeList(NodePaginationReq request) {\n RestfulResponse response = new RestfulResponse();\n request.setLimit(10000);\n PaginationRsp<Node> paginationRsp = appContext.getBackendRegistrySrv().getOnlineNodes(request);\n response.setSuccess(true);\n response.setResults(CollectionUtils.sizeOf(nodes));\n response.setRows(nodes);\n return response;\n}\n"
|
"public String sendGetAttributes(String ontid) throws SDKException, ConnectorException, IOException {\n if (contractAddress == null) {\n throw new SDKException(ErrorCode.NullCodeHash);\n }\n byte[] parabytes = buildParams(ontid.getBytes());\n Transaction tx = sdk.vm().makeInvokeCodeTransaction(contractAddress, \"String_Node_Str\", parabytes, VmType.Native.value(), null, 0);\n Object obj = sdk.getConnectMgr().sendRawTransactionPreExec(tx.toHexString());\n if (obj == null || ((String) obj).length() == 0) {\n throw new SDKException(ErrorCode.ResultIsNull);\n }\n ByteArrayInputStream bais = new ByteArrayInputStream(Helper.hexToBytes((String) obj));\n BinaryReader br = new BinaryReader(bais);\n List attrsList = new ArrayList();\n while (true) {\n try {\n attributeMap.put(\"String_Node_Str\", new String(br.readVarBytes()));\n attributeMap.put(\"String_Node_Str\", new String(br.readVarBytes()));\n attributeMap.put(\"String_Node_Str\", new String(br.readVarBytes()));\n } catch (Exception e) {\n break;\n }\n }\n return JSON.toJSONString(attributeMap);\n}\n"
|
"private boolean resolveChanges() {\n if (newSelectedObject == null) {\n return;\n }\n Object key = getKey(newSelectedObject);\n boolean sameKey = curKey == null ? key == null : curKey.equals(key);\n boolean changed = false;\n if (newSelected) {\n changed = !sameKey;\n curSelection = newSelectedObject;\n curKey = key;\n } else if (sameKey) {\n changed = true;\n curSelection = null;\n curKey = null;\n }\n newSelectedObject = null;\n return changed;\n}\n"
|
"public void downloadAndInstall(String url, String mimetype, AppInfo appInfo) {\n if (null == url || null == mimetype || null == appInfo) {\n throw new NullPointerException();\n }\n if (null == appInfo.mAppCode || null == appInfo.mAppVersion || null == appInfo.mAppName) {\n throw new IllegalArgumentException();\n }\n String[] columns = { PackageDbHelper.COLUMN_CODE, PackageDbHelper.COLUMN_STATE };\n String where = PackageDbHelper.COLUMN_CODE + \"String_Node_Str\";\n String[] whereValue = { appInfo.mAppCode };\n Cursor c = mPkgDBHelper.select(columns, where, whereValue, null);\n Assert.assertTrue(c.getCount() >= 0 && c.getCount() <= 1);\n boolean bExists = (c.getCount() == 1);\n String statusStr = null;\n PackageState state = PackageState.unknown;\n if (bExists) {\n int index = c.getColumnIndexOrThrow(PackageDbHelper.COLUMN_STATE);\n statusStr = c.getString(index);\n try {\n state = PackageState.valueOf(statusStr);\n } catch (Throwable tr) {\n }\n }\n c.close();\n if (bExists && isDownloadingOrInstalling(state)) {\n Log.i(TAG, \"String_Node_Str\" + appInfo.mAppCode);\n PackageStateSender.sendPackageStateBroadcast(this, appInfo.mAppCode, state.name());\n } else {\n URI uri = getURI(url);\n ContentValues valuesLocal = new ContentValues();\n valuesLocal.put(PackageDbHelper.COLUMN_VERSION, appInfo.mAppVersion);\n valuesLocal.put(PackageDbHelper.COLUMN_APP_NAME, appInfo.mAppName);\n valuesLocal.put(PackageDbHelper.COLUMN_AUTHOR, appInfo.mAppAuthor);\n valuesLocal.put(PackageDbHelper.COLUMN_DESC, appInfo.mAppDesc);\n valuesLocal.put(PackageDbHelper.COLUMN_SRC_PATH, \"String_Node_Str\");\n valuesLocal.put(PackageDbHelper.COLUMN_PKG_NAME, \"String_Node_Str\");\n valuesLocal.put(PackageDbHelper.COLUMN_STATE, Constants.PackageState.downloading.name());\n valuesLocal.put(PackageDbHelper.COLUMN_IMAGE_URL, appInfo.mAppImageUrl);\n if (bExists) {\n mPkgDBHelper.update(appInfo.mAppCode, valuesLocal);\n } else {\n valuesLocal.put(PackageDbHelper.COLUMN_CODE, appInfo.mAppCode);\n mPkgDBHelper.insert(valuesLocal);\n }\n PackageStateSender.sendPackageStateBroadcast(this, appInfo.mAppCode, Constants.PackageState.downloading.name());\n int delCount = getContentResolver().delete(Downloads.CONTENT_URI, where, whereValue);\n Log.i(TAG, \"String_Node_Str\" + appInfo.mAppCode + \"String_Node_Str\" + Integer.toString(delCount));\n ContentValues values = new ContentValues();\n values.put(Downloads.COLUMN_URI, uri.toString());\n values.put(Downloads.COLUMN_NOTIFICATION_PACKAGE, this.getPackageName());\n values.put(Downloads.COLUMN_NOTIFICATION_CLASS, DownloadReceiver.class.getCanonicalName());\n values.put(Downloads.COLUMN_VISIBILITY, Downloads.VISIBILITY_HIDDEN);\n values.put(Downloads.COLUMN_MIME_TYPE, mimetype);\n values.put(Downloads.COLUMN_DESCRIPTION, BEHOO_APP_MARKET);\n values.put(Downloads.COLUMN_NOTIFICATION_EXTRAS, appInfo.mAppCode);\n values.put(Downloads.COLUMN_DESTINATION, Downloads.DESTINATION_CACHE_PARTITION_PURGEABLE);\n values.put(Downloads.COLUMN_TOTAL_BYTES, -1);\n Uri uriInserted = getContentResolver().insert(Downloads.CONTENT_URI, values);\n Log.i(TAG, \"String_Node_Str\" + uriInserted.toString());\n }\n}\n"
|
"public static soot.Local getThisGivenOuter(soot.Type sootType, HashMap getThisMap, soot.Body body, LocalGenerator lg, soot.Local t2) {\n if (InitialResolver.v().hierarchy() == null) {\n InitialResolver.v().hierarchy(new soot.FastHierarchy());\n }\n soot.FastHierarchy fh = InitialResolver.v().hierarchy();\n while (!fh.canStoreType(t2.getType(), sootType)) {\n soot.SootClass classToInvoke = ((soot.RefType) t2.getType()).getSootClass();\n soot.SootMethod methToInvoke = makeOuterThisAccessMethod(classToInvoke);\n soot.Local t3 = lg.generateLocal(methToInvoke.getReturnType());\n ArrayList methParams = new ArrayList();\n methParams.add(t2);\n soot.Local res = getPrivateAccessFieldInvoke(methToInvoke, methParams, body, lg);\n soot.jimple.AssignStmt assign = soot.jimple.Jimple.v().newAssignStmt(t3, res);\n body.getUnits().add(assign);\n t2 = t3;\n }\n getThisMap.put(sootType, t2);\n return t2;\n}\n"
|
"public static org.hl7.fhir.dstu2016may.model.Narrative convertNarrative(org.hl7.fhir.dstu3.model.Narrative src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2016may.model.Narrative tgt = new org.hl7.fhir.dstu2016may.model.Narrative();\n copyElement(src, tgt);\n tgt.setStatus(convertNarrativeStatus(src.getStatus()));\n tgt.setDiv(src.getDiv());\n return tgt;\n}\n"
|
"public boolean putMulti(Request req) {\n Record record = getRecord(req);\n boolean added = true;\n if (record == null) {\n record = toRecord(req);\n } else {\n if (!record.isActive()) {\n markAsActive(record);\n }\n if (record.containsValue(req.value)) {\n added = false;\n }\n }\n if (added) {\n Data value = req.value;\n updateIndexes(record);\n record.addValue(value);\n record.incrementVersion();\n concurrentMapManager.fireMapEvent(mapListeners, getName(), EntryEvent.TYPE_ADDED, record.getKeyData(), null, value, record.getListeners(), req.caller);\n }\n if (req.txnId != -1) {\n unlock(record, req);\n }\n req.clearForResponse();\n req.version = record.getVersion();\n return added;\n}\n"
|
"public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {\n Messager messager = processingEnv.getMessager();\n Elements elements = processingEnv.getElementUtils();\n ProvidedChecker providedChecker = new ProvidedChecker(messager);\n for (Element element : roundEnv.getElementsAnnotatedWith(Provided.class)) {\n providedChecker.checkProvidedParameter(element);\n }\n FactoryDescriptorGenerator factoryDescriptorGenerator = new FactoryDescriptorGenerator(messager, elements);\n FactoryWriter factoryWriter = new FactoryWriter(processingEnv.getFiler());\n for (Element element : roundEnv.getElementsAnnotatedWith(AutoFactory.class)) {\n ImmutableSet<FactoryMethodDescriptor> descriptors = factoryDescriptorGenerator.generateDescriptor(element);\n indexedMethods.putAll(Multimaps.index(descriptors, new Function<FactoryMethodDescriptor, String>() {\n\n public String apply(FactoryMethodDescriptor descriptor) {\n return descriptor.factoryName();\n }\n });\n for (Entry<String, Collection<FactoryMethodDescriptor>> entry : indexedMethods.asMap().entrySet()) {\n ImmutableSet.Builder<String> extending = ImmutableSet.builder();\n ImmutableSet.Builder<String> implementing = ImmutableSet.builder();\n for (FactoryMethodDescriptor methodDescriptor : entry.getValue()) {\n extending.add(methodDescriptor.declaration().extendingQualifiedName());\n implementing.addAll(methodDescriptor.declaration().implementingQualifiedNames());\n }\n try {\n factoryWriter.writeFactory(new FactoryDescriptor(entry.getKey(), Iterables.getOnlyElement(extending.build()), implementing.build(), ImmutableSet.copyOf(entry.getValue())), element);\n } catch (IOException e) {\n messager.printMessage(Kind.ERROR, \"String_Node_Str\", element);\n }\n }\n }\n return false;\n}\n"
|
"private void atualizaNomeJogador() {\n nomeJogadorTextView = (TextView) findViewById(R.id.text_view_jogador_adedonha);\n nomeJogadorTextView.setText(\"String_Node_Str\" + this.jogador.nome());\n nomeJogadorTextView.setFocusableInTouchMode(true);\n nomeJogadorTextView.requestFocus();\n}\n"
|
"private static String constructOuterOrderByClause(SqlgGraph sqlgGraph, List<LinkedList<SchemaTableTree>> subQueryLinkedLists) {\n String result = \"String_Node_Str\";\n int countOuter = 1;\n MutableBoolean mutableOrderBy = new MutableBoolean(false);\n for (LinkedList<SchemaTableTree> subQueryLinkedList : subQueryLinkedLists) {\n if (!subQueryLinkedList.isEmpty()) {\n SchemaTableTree schemaTableTree = subQueryLinkedList.peekLast();\n if (countOuter == winningOrder) {\n result += schemaTableTree.toOrderByClause(sqlgGraph, mutableOrderBy, countOuter);\n result += schemaTableTree.toRangeClause(sqlgGraph, mutableOrderBy);\n }\n countInner++;\n }\n countOuter++;\n }\n return result;\n}\n"
|
"protected void onPostExecute(Void aVoid) {\n super.onPostExecute(aVoid);\n dbViewerFragment.loadingText.setVisibility(View.GONE);\n stringBuilder.append(\"String_Node_Str\");\n for (String s : schemaList) {\n stringBuilder.append(\"String_Node_Str\").append(s).append(\"String_Node_Str\");\n }\n stringBuilder.append(\"String_Node_Str\");\n for (String[] strings : contentList) {\n stringBuilder.append(\"String_Node_Str\");\n for (int i = 0; i < strings.length; i++) {\n stringBuilder.append(\"String_Node_Str\").append(strings[i]).append(\"String_Node_Str\");\n }\n stringBuilder.append(\"String_Node_Str\");\n }\n stringBuilder.append(\"String_Node_Str\");\n webView.loadData(stringBuilder.toString(), \"String_Node_Str\", \"String_Node_Str\");\n webView.setVisibility(View.VISIBLE);\n}\n"
|
"private Boolean isFloatLimitImpl() {\n Boolean fl = this.isFloatLimit;\n if (fl == null) {\n Object parent = this.getOriginalOrCurrentParent();\n if (!(parent instanceof RBlock)) {\n fl = Boolean.TRUE;\n this.isFloatLimit = Boolean.TRUE;\n }\n RBlock blockParent = (RBlock) parent;\n Object grandParent = blockParent.getOriginalOrCurrentParent();\n if (!(grandParent instanceof RBlockViewport)) {\n fl = Boolean.TRUE;\n this.isFloatLimit = Boolean.TRUE;\n }\n ModelNode node = this.modelNode;\n if (!(node instanceof HTMLElementImpl)) {\n fl = Boolean.TRUE;\n this.isFloatLimit = Boolean.TRUE;\n } else {\n HTMLElementImpl element = (HTMLElementImpl) node;\n int position = getPosition(element);\n if (position == RenderState.POSITION_ABSOLUTE || position == RenderState.POSITION_FIXED) {\n fl = Boolean.TRUE;\n this.isFloatLimit = Boolean.TRUE;\n }\n element.getCurrentStyle();\n RenderState rs = element.getRenderState();\n int floatValue = rs == null ? RenderState.FLOAT_NONE : rs.getFloat();\n if (floatValue != RenderState.FLOAT_NONE) {\n fl = Boolean.TRUE;\n this.isFloatLimit = Boolean.TRUE;\n }\n int overflowX = rs == null ? RenderState.OVERFLOW_NONE : rs.getOverflowX();\n int overflowY = rs == null ? RenderState.OVERFLOW_NONE : rs.getOverflowY();\n if (overflowX == RenderState.OVERFLOW_AUTO || overflowX == RenderState.OVERFLOW_SCROLL || overflowY == RenderState.OVERFLOW_AUTO || overflowY == RenderState.OVERFLOW_SCROLL) {\n fl = Boolean.TRUE;\n this.isFloatLimit = Boolean.TRUE;\n }\n fl = Boolean.TRUE;\n this.isFloatLimit = Boolean.TRUE;\n }\n fl = Boolean.TRUE;\n this.isFloatLimit = Boolean.TRUE;\n }\n return fl.booleanValue();\n}\n"
|
"public void registerLocation(URL url) {\n if (url == null)\n return;\n try {\n if (url.toString().endsWith(\"String_Node_Str\")) {\n locations.add(ResourceLocation.jar(url.toString()));\n } else {\n locations.add(ResourceLocation.file(new File(url.toURI())));\n }\n } catch (Throwable e) {\n if (log.isInfoEnabled())\n log.info(\"String_Node_Str\" + url, e);\n }\n}\n"
|
"public void onClick(View v) {\n int position = (Integer) v.getTag();\n StorjNode selectedNode = mItems.get(position);\n alertDialog.cancel();\n deleteNode(selectedNode);\n if (!AlarmReceiver.mRunning) {\n pullSotrjNodeStats(mContext);\n } else {\n AlarmReceiver.mRetrigger = true;\n }\n}\n"
|
"private boolean checkJavaIndicatorIsEixt() {\n String className = this.getClassNameForSave();\n String jarPath = this.getJarPathForSave();\n if (className != null && jarPath != null && !className.trim().equals(PluginConstant.EMPTY_STRING) && !jarPath.trim().equals(PluginConstant.EMPTY_STRING)) {\n for (IFile file : UDIUtils.getContainJarFile(jarPath)) {\n TalendURLClassLoader cl;\n try {\n cl = new TalendURLClassLoader(new URL[] { file.getLocation().toFile().toURI().toURL() }, IndicatorDefinitionMaterPage.class.getClassLoader());\n Class<?> theClass = cl.findClass(className);\n if (theClass != null) {\n return true;\n }\n } catch (MalformedURLException e1) {\n Log.error(e1.getStackTrace());\n } catch (ClassNotFoundException e1) {\n Log.error(e1.getStackTrace());\n }\n }\n return false;\n } else {\n return false;\n }\n}\n"
|
"private void doNew() {\n doEdit(new ComputedColumn(), true);\n}\n"
|
"public void startExecution() {\n final ReplayThread thread = this.environment.getExecutingThread();\n thread.start();\n}\n"
|
"private void startForeachSplit(String procName, Var arrayVar, String contentsVar, int splitDegree, int leafDegree, boolean haveKeys, List<PassedVar> usedVars, List<RefCount> perIterIncrs) {\n pointStack.peek().add(Turbine.containerSize(TCLTMP_CONTAINER_SIZE, varToExpr(arrayVar)));\n Value containerSize = new Value(TCLTMP_CONTAINER_SIZE);\n Expression lastIndex = Square.arithExpr(containerSize, new Token(\"String_Node_Str\"), new LiteralInt(1));\n handleForeachContainerRefcounts(perIterIncrs, containerSize);\n ArrayList<PassedVar> splitUsedVars = new ArrayList<PassedVar>(usedVars);\n splitUsedVars.add(new PassedVar(arrayVar, false));\n startRangeSplit(procName, splitUsedVars, perIterIncrs, splitDegree, leafDegree, LiteralInt.ZERO, lastIndex, LiteralInt.ONE);\n pointStack.peek().add(new SetVariable(TCLTMP_SPLITLEN, Square.arithExpr(new Token(String.format(\"String_Node_Str\", TCLTMP_RANGE_HI, TCLTMP_RANGE_LO)))));\n pointStack.peek().add(Turbine.containerContents(contentsVar, varToExpr(arrayVar), haveKeys, new Value(TCLTMP_SPLITLEN), TCLTMP_RANGE_LO_V));\n}\n"
|
"public static Pokemon getPokemon(PokemonSpecies species) {\n Pokemon pokemon = new Pokemon(species);\n pokemon.setLevel(1);\n pokemon.setGender(Gender.MALE);\n pokemon.setAbility(Abilities.OVERGROW);\n pokemon.setSlot1(Main.mMoveArray[1]);\n pokemon.setHPStat(setHPStat(pokemon, species));\n for (Stats stat : Stats.values()) {\n pokemon.setStats(setStat(pokemon, species, stat), stat);\n }\n pokemon.setCurrentHP(pokemon.getHPStat());\n return pokemon;\n}\n"
|
"public void testFindRefCells() {\n String formulaValue = \"String_Node_Str\";\n Formula formula = new Formula(formulaValue, null);\n Set refCells = formula.findRefCells();\n assertEquals(\"String_Node_Str\", refCells.size(), 7);\n assertTrue(contains(refCells, \"String_Node_Str\"));\n assertTrue(contains(refCells, \"String_Node_Str\"));\n assertTrue(contains(refCells, \"String_Node_Str\"));\n assertTrue(contains(refCells, \"String_Node_Str\"));\n assertTrue(contains(refCells, \"String_Node_Str\"));\n assertTrue(contains(refCells, \"String_Node_Str\"));\n assertTrue(contains(refCells, \"String_Node_Str\"));\n}\n"
|
"public int process(Buffer input, Buffer output) {\n if (!checkInputBuffer(input))\n return BUFFER_PROCESSED_FAILED;\n }\n outputWidth = (int) voutput.getSize().getWidth();\n outputHeight = (int) voutput.getSize().getHeight();\n if (!checkInputBuffer(input)) {\n return BUFFER_PROCESSED_FAILED;\n }\n if (isEOM(input)) {\n propagateEOM(output);\n return BUFFER_PROCESSED_OK;\n }\n if (voutput instanceof YUVFormat) {\n outputSize = (int) (outputWidth * outputHeight * 1.5);\n outfmt = FFMPEG.PIX_FMT_YUV420P;\n } else {\n RGBFormat rgb = (RGBFormat) voutput;\n outfmt = FFMPEG.PIX_FMT_RGB32;\n outputSize = (outputWidth * outputHeight * 4);\n }\n if (vinput instanceof YUVFormat) {\n infmt = FFMPEG.PIX_FMT_YUV420P;\n } else {\n RGBFormat rgb = (RGBFormat) vinput;\n infmt = getNativeRGBFormat(rgb);\n }\n if (voutput.getDataType() == Format.byteArray) {\n if (dst == null || ((byte[]) dst).length < outputSize) {\n dst = new byte[outputSize];\n }\n } else if (voutput.getDataType() == Format.intArray) {\n outputSize = (outputSize % 4) + outputSize / 4;\n if (dst == null || ((int[]) dst).length < outputSize) {\n dst = new int[outputSize];\n }\n } else if (voutput.getDataType() == Format.shortArray) {\n outputSize = (outputSize % 2) + outputSize / 2;\n if (dst == null || ((short[]) dst).length < outputSize) {\n dst = new short[outputSize];\n }\n } else {\n System.out.println(\"String_Node_Str\");\n return BUFFER_PROCESSED_FAILED;\n }\n synchronized (src) {\n FFMPEG.img_convert(dst, outfmt, src, infmt, inputWidth, inputHeight, outputWidth, outputHeight);\n }\n output.setData(dst);\n output.setLength(outputSize);\n output.setOffset(0);\n return BUFFER_PROCESSED_OK;\n}\n"
|
"public Object unpack() {\n synchronized (evaluated) {\n if (evaluated.booleanValue()) {\n return super.unpack();\n }\n int size = unExpandedRef.size();\n boolean safe = true;\n ;\n for (int i = 0; i < size; ++i) {\n if (unExpandedRef.getPredicate(i) != null) {\n safe = false;\n break;\n }\n int mult = unExpandedRef.getMultiplicity(i);\n if (!(mult >= 0 || mult == TreeReference.INDEX_UNBOUND)) {\n safe = false;\n break;\n }\n }\n if (!safe) {\n performEvaluation();\n return super.unpack();\n }\n try {\n return XPathPathExpr.getRefValue(instance, ec, unExpandedRef);\n } catch (XPathException xpe) {\n performEvaluation();\n return super.unpack();\n }\n }\n}\n"
|
"public int loadTreeAnalysis(String[] args) throws Exception {\n if (args.length < 4) {\n System.out.println(\"String_Node_Str\");\n return 1;\n }\n String filename = args[1];\n String taxaloaded = args[3];\n boolean tloaded = true;\n boolean isSubset = false;\n if (taxaloaded.toLowerCase().equals(\"String_Node_Str\")) {\n tloaded = false;\n }\n if (args.length == 5) {\n isSubset = true;\n }\n String graphname = args[2];\n int treeCounter = 0;\n String ts = \"String_Node_Str\";\n List<Tree> jt = new ArrayList<Tree>();\n MessageLogger messageLogger = new MessageLogger(\"String_Node_Str\");\n Map<TreeNode, String> subsetTipInfo = null;\n Map<Tree, String> sourceForTrees = null;\n try {\n BufferedReader br = new BufferedReader(new FileReader(filename));\n boolean sourceAvail = false;\n String first = br.readLine();\n if (first.split(\"String_Node_Str\").length > 1 && first.split(\"String_Node_Str\")[0].length() > 0) {\n sourceAvail = true;\n sourceForTrees = new HashMap<Tree, String>();\n }\n br.close();\n br = new BufferedReader(new FileReader(filename));\n System.out.println(\"String_Node_Str\" + sourceAvail + \"String_Node_Str\");\n while ((ts = br.readLine()) != null) {\n if (ts.length() > 1) {\n String source = null;\n if (sourceAvail) {\n String[] spls = ts.split(\"String_Node_Str\");\n source = spls[0].replace(\"String_Node_Str\", \"String_Node_Str\");\n ts = spls[1];\n }\n Tree tt = jade.tree.TreeReader.readTree(ts);\n if (tt.internalNodeCount() < 2) {\n System.out.println(\"String_Node_Str\" + tt);\n continue;\n }\n if (((String) tt.getRoot().getLabel()).contains(\"String_Node_Str\")) {\n if (subsetTipInfo == null)\n subsetTipInfo = new HashMap<TreeNode, String>();\n String[] spls = ((String) tt.getRoot().getLabel()).split(\"String_Node_Str\");\n String subset = spls[1];\n ((jade.tree.JadeNode) tt.getRoot()).setName(\"String_Node_Str\");\n subsetTipInfo.put(tt.getRoot(), subset);\n }\n for (TreeNode jn : tt.externalNodes()) {\n if (((String) jn.getLabel()).contains(\"String_Node_Str\")) {\n String[] spls = ((String) jn.getLabel()).split(\"String_Node_Str\");\n String id = spls[1];\n ((jade.tree.JadeNode) jn).setName(id);\n }\n }\n for (TreeNode jn : tt.externalNodes()) {\n if (((String) jn.getLabel()).contains(\"String_Node_Str\")) {\n if (subsetTipInfo == null) {\n subsetTipInfo = new HashMap<TreeNode, String>();\n }\n String[] spls = ((String) jn.getLabel()).split(\"String_Node_Str\");\n String name = spls[0];\n String subset = spls[1];\n ((jade.tree.JadeNode) jn).setName(name);\n subsetTipInfo.put(jn, subset);\n }\n }\n if (sourceAvail) {\n sourceForTrees.put(tt, source);\n }\n jt.add(tt);\n treeCounter++;\n }\n }\n br.close();\n } catch (FileNotFoundException e) {\n System.err.println(\"String_Node_Str\" + args[1] + \"String_Node_Str\");\n return -1;\n } catch (IOException ioe) {\n }\n if (treeCounter == 0) {\n System.err.println(\"String_Node_Str\" + args[1] + \"String_Node_Str\");\n return -1;\n }\n System.out.println(treeCounter + \"String_Node_Str\");\n GraphDatabaseAgent gdb = new GraphDatabaseAgent(graphname);\n System.out.println(\"String_Node_Str\");\n BipartOracle bo = new BipartOracle(jt, gdb, tloaded, sourceForTrees, subsetTipInfo, isSubset, filename);\n gdb.shutdownDb();\n return 0;\n}\n"
|
"private void updateCachedAssets() {\n boolean isViewVisible = isViewLoaded() && getView().getWindow() != null;\n if (!isViewVisible)\n return;\n CGRect preheatRect = getCollectionView().getBounds();\n preheatRect = preheatRect.inset(0.0, -0.5 * preheatRect.getHeight());\n double delta = Math.abs(preheatRect.getMidY() - previousPreheatRect.getMidY());\n if (delta > getCollectionView().getBounds().getHeight() / 3.0) {\n final NSArray<NSIndexPath> addedIndexPaths = new NSMutableArray<>();\n final NSArray<NSIndexPath> removedIndexPaths = new NSMutableArray<>();\n computeDifferenceBetweenRects(previousPreheatRect, preheatRect, (removedRect) -> {\n NSArray<NSIndexPath> indexPaths = getIndexPathsForElementsInRect(removedRect);\n if (indexPaths != null) {\n removedIndexPaths.addAll(indexPaths);\n }\n }, new VoidBlock1<CGRect>() {\n public void invoke(CGRect addedRect) {\n NSArray<NSIndexPath> indexPaths = getIndexPathsForElementsInRect(addedRect);\n if (indexPaths != null) {\n addedIndexPaths.addAll(indexPaths);\n }\n }\n });\n NSArray<PHAsset> assetsToStartCaching = getAssetsAtIndexPaths(addedIndexPaths);\n NSArray<PHAsset> assetsToStopCaching = getAssetsAtIndexPaths(removedIndexPaths);\n imageManager.startCachingImagesForAssets(assetsToStartCaching, assetGridThumbnailSize, PHImageContentMode.AspectFill, null);\n imageManager.stopCachingImagesForAssets(assetsToStopCaching, assetGridThumbnailSize, PHImageContentMode.AspectFill, null);\n previousPreheatRect = preheatRect;\n }\n}\n"
|
"public void checkCreateSubcategory() throws URISyntaxException, IOException {\n RepositoryEntryVO[] wikiVO = new RepositoryEntryVO[COURSES];\n for (int i = 0; i < COURSES; i++) {\n wikiVO[i] = functionalVOUtil.importWiki(deploymentUrl);\n }\n CourseVO[] courseVO = new CourseVO[COURSES];\n for (int i = 0; i < COURSES; i++) {\n courseVO[i] = functionalVOUtil.importEmptyCourse(deploymentUrl);\n }\n for (int i = 0; i < SUBCATEGORY_PATHS.length; i++) {\n String currentPath = SUBCATEGORY_PATHS[i];\n String currentName = currentPath.substring(currentPath.lastIndexOf('/') + 1);\n String currentDescription = SUBCATEGORY_DESCRIPTIONS[i];\n Assert.assertTrue(functionalRepositorySiteUtil.createCatalogSubcategory(browser, currentPath.substring(0, currentPath.lastIndexOf('/')), currentName, currentDescription));\n }\n for (int i = 0; i < COURSES; i++) {\n Assert.assertTrue(functionalRepositorySiteUtil.openCourse(browser, courseVO[i].getRepoEntryKey()));\n Assert.assertTrue(functionalCourseUtil.openCourseEditor(browser));\n String currentPath = SUBCATEGORY_PATHS[i];\n String currentName = currentPath.substring(currentPath.lastIndexOf('/') + 1);\n Assert.assertTrue(functionalCourseUtil.createWiki(browser, currentName + \"String_Node_Str\", \"String_Node_Str\" + currentName + \"String_Node_Str\"));\n Assert.assertTrue(functionalCourseUtil.chooseWiki(browser, wikiVO[i].getKey()));\n Assert.assertTrue(functionalCourseUtil.publishEntireCourse(browser, null, SUBCATEGORY_PATHS[i]));\n Assert.assertTrue(functionalCourseUtil.closeActiveTab(browser));\n }\n Assert.assertTrue(functionalUtil.openSite(browser, FunctionalUtil.OlatSite.LEARNING_RESOURCES));\n Assert.assertTrue(functionalRepositorySiteUtil.openActionByMenuTree(browser, RepositorySiteAction.CATALOG));\n for (int i = 0; i < COURSES; i++) {\n String[] selectors = functionalRepositorySiteUtil.createCatalogSelectors(SUBCATECORY_PATHS_INCLUDING_RESOURCE[i]);\n for (String currentSelector : selectors) {\n StringBuffer selectorBuffer = new StringBuffer();\n selectorBuffer.append(\"String_Node_Str\").append(functionalRepositorySiteUtil.getCourseModuleIconCss()).append(\"String_Node_Str\");\n browser.click(selectorBuffer.toString());\n functionalUtil.waitForPageToLoad(browser);\n String businessPath0 = functionalUtil.currentBusinessPath(browser);\n functionalRepositorySiteUtil.openCourse(browser, courseVO[i].getRepoEntryKey());\n String businessPath1 = functionalUtil.currentBusinessPath(browser);\n Assert.assertEquals(businessPath1, businessPath0);\n }\n }\n}\n"
|
"public void onPictureTaken(final byte[] jpegData, final android.hardware.Camera camera) {\n if (mPausing) {\n return;\n }\n mJpegPictureCallbackTime = System.currentTimeMillis();\n mRawPictureAndJpegPictureCallbackTime = mJpegPictureCallbackTime - mRawPictureCallbackTime;\n Log.v(TAG, \"String_Node_Str\" + mRawPictureAndJpegPictureCallbackTime + \"String_Node_Str\");\n if (jpegData != null) {\n mStoreImageThread = new Thread() {\n public void run() {\n mImageCapture.storeImage(jpegData, camera, mLocation);\n }\n };\n mStoreImageThread.start();\n }\n if (!mIsImageCaptureIntent) {\n long delay = 1500 - (System.currentTimeMillis() - mRawPictureCallbackTime);\n mHandler.sendEmptyMessageDelayed(RESTART_PREVIEW, Math.max(delay, 0));\n }\n}\n"
|
"private void testFactTableSaveAndLoad3(IDocumentManager documentManager) throws IOException, BirtException, DataException {\n Dimension[] dimensions = new Dimension[3];\n String[] levelNames = new String[3];\n levelNames[0] = \"String_Node_Str\";\n levelNames[1] = \"String_Node_Str\";\n levelNames[2] = \"String_Node_Str\";\n DimensionForTest iterator = new DimensionForTest(levelNames);\n iterator.setLevelMember(0, FactTable2.L1Col);\n iterator.setLevelMember(1, FactTable2.L2Col);\n iterator.setLevelMember(2, FactTable2.L3Col);\n ILevelDefn[] levelDefs = new ILevelDefn[3];\n levelDefs[0] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n levelDefs[1] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n levelDefs[2] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n dimensions[0] = (Dimension) DimensionFactory.createDimension(\"String_Node_Str\", documentManager, iterator, levelDefs, false);\n IHierarchy hierarchy = dimensions[0].getHierarchy();\n assertEquals(hierarchy.getName(), \"String_Node_Str\");\n assertEquals(dimensions[0].length(), FactTable2.L1Col.length);\n levelNames = new String[1];\n levelNames[0] = \"String_Node_Str\";\n iterator = new DimensionForTest(levelNames);\n iterator.setLevelMember(0, distinct(FactTable2.L1Col));\n levelDefs = new ILevelDefn[1];\n levelDefs[0] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n dimensions[1] = (Dimension) DimensionFactory.createDimension(\"String_Node_Str\", documentManager, iterator, levelDefs, false);\n hierarchy = dimensions[1].getHierarchy();\n assertEquals(hierarchy.getName(), \"String_Node_Str\");\n assertEquals(dimensions[1].length(), 3);\n levelNames = new String[1];\n levelNames[0] = \"String_Node_Str\";\n iterator = new DimensionForTest(levelNames);\n iterator.setLevelMember(0, FactTable2.L3Col);\n levelDefs = new ILevelDefn[1];\n levelDefs[0] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n dimensions[2] = (Dimension) DimensionFactory.createDimension(\"String_Node_Str\", documentManager, iterator, levelDefs, false);\n hierarchy = dimensions[2].getHierarchy();\n assertEquals(hierarchy.getName(), \"String_Node_Str\");\n assertEquals(dimensions[2].length(), 12);\n FactTable2 factTable2 = new FactTable2();\n String[] measureColumnName = new String[2];\n measureColumnName[0] = \"String_Node_Str\";\n measureColumnName[1] = \"String_Node_Str\";\n FactTableAccessor factTableConstructor = new FactTableAccessor(documentManager);\n FactTable factTable = factTableConstructor.saveFactTable(NamingUtil.getFactTableName(\"String_Node_Str\"), CubeUtility.getKeyColNames(dimensions), factTable2, dimensions, measureColumnName, new StopSign());\n factTable = factTableConstructor.load(NamingUtil.getFactTableName(\"String_Node_Str\"), new StopSign());\n String[] dimensionNames = new String[3];\n dimensionNames[0] = \"String_Node_Str\";\n dimensionNames[1] = \"String_Node_Str\";\n dimensionNames[2] = \"String_Node_Str\";\n ILevel[] level = dimensions[1].getHierarchy().getLevels();\n ISelection[][] filter = new ISelection[1][1];\n filter[0][0] = SelectionFactory.createRangeSelection(new Object[] { new Integer(1) }, new Object[] { new Integer(3) }, true, false);\n Level[] findLevel = new Level[1];\n findLevel[0] = (Level) level[0];\n IDiskArray[] positionForFilter = null;\n positionForFilter = new IDiskArray[2];\n IDiskArray positionArray = dimensions[1].find(findLevel, filter);\n positionForFilter[0] = positionArray;\n assertEquals(positionArray.size(), 2);\n DimensionResultIterator[] dimesionResultSets = new DimensionResultIterator[2];\n dimesionResultSets[0] = new DimensionResultIterator(dimensions[1], positionArray);\n positionArray = dimensions[2].findAll();\n dimesionResultSets[1] = new DimensionResultIterator(dimensions[2], positionArray);\n String[] dimensionNamesForFilter = new String[2];\n dimensionNamesForFilter[0] = \"String_Node_Str\";\n dimensionNamesForFilter[1] = \"String_Node_Str\";\n positionForFilter[1] = positionArray;\n FactTableRowIterator facttableRowIterator = new FactTableRowIterator(factTable, dimensionNamesForFilter, positionForFilter, new StopSign());\n assertTrue(facttableRowIterator != null);\n AggregationDefinition[] aggregations = new AggregationDefinition[2];\n int[] sortType = new int[1];\n sortType[0] = IDimensionSortDefn.SORT_ASC;\n DimLevel[] levelsForFilter = new DimLevel[] { dimLevel21 };\n AggregationFunctionDefinition[] funcitons = new AggregationFunctionDefinition[1];\n funcitons[0] = new AggregationFunctionDefinition(\"String_Node_Str\", IBuildInAggregation.TOTAL_SUM_FUNC);\n aggregations[0] = new AggregationDefinition(levelsForFilter, sortType, funcitons);\n sortType = new int[2];\n sortType[0] = IDimensionSortDefn.SORT_ASC;\n sortType[1] = IDimensionSortDefn.SORT_ASC;\n levelsForFilter = new DimLevel[] { dimLevel31 };\n aggregations[1] = new AggregationDefinition(levelsForFilter, sortType, funcitons);\n AggregationExecutor aggregationCalculatorExecutor = new AggregationExecutor(dimesionResultSets, facttableRowIterator, aggregations);\n IAggregationResultSet[] resultSet = aggregationCalculatorExecutor.execute(new StopSign());\n assertEquals(resultSet[0].length(), 2);\n assertEquals(resultSet[0].getAggregationDataType(0), DataType.DOUBLE_TYPE);\n assertEquals(resultSet[0].getLevelIndex(dimLevel21), 0);\n assertEquals(resultSet[0].getLevelKeyDataType(dimLevel21, \"String_Node_Str\"), DataType.INTEGER_TYPE);\n resultSet[0].seek(0);\n assertEquals(resultSet[0].getLevelKeyValue(0)[0], new Integer(1));\n assertEquals(resultSet[0].getAggregationValue(0), new Double(6));\n resultSet[0].seek(1);\n assertEquals(resultSet[0].getLevelKeyValue(0)[0], new Integer(2));\n assertEquals(resultSet[0].getAggregationValue(0), new Double(22));\n assertEquals(resultSet[1].length(), 8);\n assertEquals(resultSet[1].getAggregationDataType(0), DataType.DOUBLE_TYPE);\n assertEquals(resultSet[1].getLevelIndex(dimLevel31), 0);\n assertEquals(resultSet[1].getLevelKeyDataType(dimLevel31, \"String_Node_Str\"), DataType.INTEGER_TYPE);\n resultSet[1].seek(0);\n assertEquals(resultSet[1].getLevelKeyValue(0)[0], new Integer(1));\n assertEquals(resultSet[1].getAggregationValue(0), new Double(0));\n resultSet[1].seek(1);\n assertEquals(resultSet[1].getLevelKeyValue(0)[0], new Integer(2));\n assertEquals(resultSet[1].getAggregationValue(0), new Double(1));\n resultSet[1].seek(2);\n assertEquals(resultSet[1].getLevelKeyValue(0)[0], new Integer(3));\n assertEquals(resultSet[1].getAggregationValue(0), new Double(2));\n resultSet[1].seek(3);\n assertEquals(resultSet[1].getLevelKeyValue(0)[0], new Integer(4));\n assertEquals(resultSet[1].getAggregationValue(0), new Double(3));\n resultSet[1].seek(4);\n assertEquals(resultSet[1].getLevelKeyValue(0)[0], new Integer(5));\n assertEquals(resultSet[1].getAggregationValue(0), new Double(4));\n resultSet[1].seek(5);\n assertEquals(resultSet[1].getLevelKeyValue(0)[0], new Integer(6));\n assertEquals(resultSet[1].getAggregationValue(0), new Double(5));\n resultSet[1].seek(6);\n assertEquals(resultSet[1].getLevelKeyValue(0)[0], new Integer(7));\n assertEquals(resultSet[1].getAggregationValue(0), new Double(6));\n resultSet[1].seek(7);\n assertEquals(resultSet[1].getLevelKeyValue(0)[0], new Integer(8));\n assertEquals(resultSet[1].getAggregationValue(0), new Double(7));\n}\n"
|
"public ICustomerDataset getCustomerDataset() {\n ComparatorsFactory.sort(units, ComparatorsFactory.TEXT_STATISTICS_COMPARATOR_ID);\n CustomerDefaultCategoryDataset customerdataset = new CustomerDefaultCategoryDataset();\n for (IndicatorUnit unit : units) {\n double value = Double.parseDouble(unit.getValue().toString());\n String label = unit.getIndicatorName();\n String type = \"String_Node_Str\";\n switch(unit.getType()) {\n case MinLengthWithNullIndicatorEnum:\n case MinLengthWithBlankIndicatorEnum:\n case MinLengthWithBlankNullIndicatorEnum:\n type = \"String_Node_Str\";\n break;\n case MaxLengthWithBlankIndicatorEnum:\n case MaxLengthWithBlankNullIndicatorEnum:\n case MaxLengthWithNullIndicatorEnum:\n type = \"String_Node_Str\";\n break;\n case AverageLengthWithNullIndicatorEnum:\n case AverageLengthWithBlankIndicatorEnum:\n case AverageLengthWithNullBlankIndicatorEnum:\n type = \"String_Node_Str\";\n break;\n default:\n type = label;\n break;\n }\n customerdataset.addValue(value, type, label);\n ChartDataEntity entity = new ChartDataEntity();\n entity.setIndicator(unit.getIndicator());\n entity.setLabel(label);\n entity.setValue(String.valueOf(value));\n entity.setPercent(value / unit.getIndicator().getCount());\n customerdataset.addDataEntity(entity);\n }\n return customerdataset;\n}\n"
|
"private CharSequence parseNode(Theme theme, Post post, Node node) {\n if (node instanceof TextNode) {\n String text = ((TextNode) node).text();\n SpannableString spannable = new SpannableString(text);\n detectLinks(theme, post, text, spannable);\n return spannable;\n } else {\n switch(node.nodeName()) {\n case \"String_Node_Str\":\n {\n return \"String_Node_Str\";\n }\n case \"String_Node_Str\":\n {\n Element span = (Element) node;\n SpannableString quote;\n Set<String> classes = span.classNames();\n if (classes.contains(\"String_Node_Str\")) {\n quote = new SpannableString(span.text());\n quote.setSpan(new ForegroundColorSpanHashed(theme.quoteColor), 0, quote.length(), 0);\n quote.setSpan(new StrikethroughSpan(), 0, quote.length(), 0);\n } else if (classes.contains(\"String_Node_Str\")) {\n quote = new SpannableString(\"String_Node_Str\" + span.text());\n String style = span.attr(\"String_Node_Str\");\n if (!TextUtils.isEmpty(style)) {\n style = style.replace(\"String_Node_Str\", \"String_Node_Str\");\n Matcher matcher = colorPattern.matcher(style);\n int hexColor = 0xff0000;\n if (matcher.find()) {\n String group = matcher.group(1);\n if (!TextUtils.isEmpty(group)) {\n try {\n hexColor = Integer.parseInt(group, 16);\n } catch (NumberFormatException ignored) {\n }\n }\n }\n if (hexColor >= 0 && hexColor <= 0xffffff) {\n quote.setSpan(new ForegroundColorSpan(0xff000000 + hexColor), 0, quote.length(), 0);\n quote.setSpan(new StyleSpan(Typeface.BOLD), 0, quote.length(), 0);\n }\n }\n } else if (classes.contains(\"String_Node_Str\")) {\n return null;\n } else {\n quote = new SpannableString(span.text());\n quote.setSpan(new ForegroundColorSpan(theme.inlineQuoteColor), 0, quote.length(), 0);\n detectLinks(theme, post, span.text(), quote);\n }\n return quote;\n }\n case \"String_Node_Str\":\n {\n Element table = (Element) node;\n List<CharSequence> parts = new ArrayList<>();\n Elements tableRows = table.getElementsByTag(\"String_Node_Str\");\n for (int i = 0; i < tableRows.size(); i++) {\n Element tableRow = tableRows.get(i);\n if (tableRow.text().length() > 0) {\n Elements tableDatas = tableRow.getElementsByTag(\"String_Node_Str\");\n for (int j = 0; j < tableDatas.size(); j++) {\n Element tableData = tableDatas.get(j);\n SpannableString tableDataPart = new SpannableString(tableData.text());\n if (tableData.getElementsByTag(\"String_Node_Str\").size() > 0) {\n tableDataPart.setSpan(new StyleSpan(Typeface.BOLD), 0, tableDataPart.length(), 0);\n tableDataPart.setSpan(new UnderlineSpan(), 0, tableDataPart.length(), 0);\n }\n parts.add(tableDataPart);\n if (j < tableDatas.size() - 1) {\n parts.add(\"String_Node_Str\");\n }\n }\n if (i < tableRows.size() - 1) {\n parts.add(\"String_Node_Str\");\n }\n }\n }\n SpannableString tableTotal = new SpannableString(TextUtils.concat(parts.toArray(new CharSequence[parts.size()])));\n tableTotal.setSpan(new ForegroundColorSpan(theme.inlineQuoteColor), 0, tableTotal.length(), 0);\n tableTotal.setSpan(new AbsoluteSizeSpan(sp(12f)), 0, tableTotal.length(), 0);\n return tableTotal;\n }\n case \"String_Node_Str\":\n {\n Element strong = (Element) node;\n SpannableString red = new SpannableString(strong.text());\n red.setSpan(new ForegroundColorSpan(theme.quoteColor), 0, red.length(), 0);\n red.setSpan(new StyleSpan(Typeface.BOLD), 0, red.length(), 0);\n return red;\n }\n case \"String_Node_Str\":\n {\n CharSequence anchor = parseAnchor(theme, post, (Element) node);\n if (anchor != null) {\n return anchor;\n } else {\n return ((Element) node).text();\n }\n }\n case \"String_Node_Str\":\n {\n Element spoiler = (Element) node;\n SpannableString link = new SpannableString(spoiler.text());\n PostLinkable pl = new PostLinkable(theme, post, spoiler.text(), spoiler.text(), PostLinkable.Type.SPOILER);\n link.setSpan(pl, 0, link.length(), 0);\n post.linkables.add(pl);\n return link;\n }\n case \"String_Node_Str\":\n {\n Element pre = (Element) node;\n Set<String> classes = pre.classNames();\n if (classes.contains(\"String_Node_Str\")) {\n String text = getNodeText(pre);\n SpannableString monospace = new SpannableString(text);\n monospace.setSpan(new TypefaceSpan(\"String_Node_Str\"), 0, monospace.length(), 0);\n monospace.setSpan(new AbsoluteSizeSpan(sp(12f)), 0, monospace.length(), 0);\n return monospace;\n } else {\n return pre.text();\n }\n }\n default:\n {\n if (node instanceof Element) {\n return ((Element) node).text();\n } else {\n return null;\n }\n }\n }\n }\n}\n"
|
"public boolean process(LttngEvent trcEvent, LttngTraceState traceSt) {\n int first_cpu;\n int nb_cpus;\n Long pid_in = getAFieldLong(trcEvent, traceSt, Fields.LTT_FIELD_PID);\n if (pid_in != null) {\n if (pid_in == 0L) {\n first_cpu = 0;\n nb_cpus = traceSt.getNumberOfCPUs();\n } else {\n first_cpu = ANY_CPU.intValue();\n nb_cpus = ANY_CPU.intValue() + 1;\n }\n for (int cpu = first_cpu; cpu < nb_cpus; cpu++) {\n LttngProcessState process_in = lttv_state_find_process(traceSt, Long.valueOf(cpu), pid_in);\n if (process_in != null) {\n TimeRangeEventProcess localProcess = procContainer.findProcess(process_in.getPid(), process_in.getCpu(), traceSt.getTraceId(), process_in.getCreation_time());\n if (localProcess == null) {\n if (process_in.getPid().equals(0) || !process_in.getPid().equals(process_in.getPpid())) {\n TmfTimeRange timeRange = traceSt.getContext().getTraceTimeWindow();\n localProcess = addLocalProcess(process_in, timeRange.getStartTime().getValue(), timeRange.getEndTime().getValue(), traceSt.getTraceId());\n } else {\n TraceDebug.debug(\"String_Node_Str\");\n }\n }\n localProcess.setName(process_in.getName());\n localProcess.setPpid(process_in.getPpid());\n localProcess.setTgid(process_in.getTgid());\n } else {\n TraceDebug.debug(\"String_Node_Str\");\n }\n }\n } else {\n TraceDebug.debug(\"String_Node_Str\");\n }\n return false;\n}\n"
|
"public boolean apply(Game game, Ability source) {\n Player controller = game.getPlayer(source.getControllerId());\n MageObject sourceObject = game.getObject(source.getSourceId());\n if (sourceObject != null && controller != null) {\n Permanent targetPermanent = game.getPermanent(getTargetPointer().getFirst(game, source));\n if (targetPermanent != null) {\n Set<Card> cardsToExile = new HashSet<>();\n int nonTokenCount = 0;\n if (targetPermanent.getName().isEmpty()) {\n you.moveCardToExileWithInfo(targetPermanent, exileId, sourceObject.getIdName(), source.getSourceId(), game, Zone.BATTLEFIELD, true);\n exiledCount = 1;\n } else {\n String name = targetPermanent.getName();\n for (Permanent permanent : game.getBattlefield().getAllActivePermanents(controllerPermanentId)) {\n if (permanent != null && permanent.getName().equals(name)) {\n if (creaturesOnly.match(permanent, game)) {\n you.moveCardToExileWithInfo(permanent, null, \"String_Node_Str\", source.getSourceId(), game, Zone.BATTLEFIELD, true);\n }\n if (nonTokenFilter.match(permanent, game)) {\n exiledCount++;\n }\n }\n }\n }\n if (exiledCount > 0) {\n Token token = new ClueArtifactToken();\n token.putOntoBattlefield(exiledCount, game, source.getSourceId(), controllerPermanentId, false, false);\n }\n return true;\n }\n }\n return false;\n}\n"
|
"private Integer getPivotRow(SimplexTableau tableau, final int col) {\n List<Integer> minRatioPositions = new ArrayList<Integer>();\n double minRatio = Double.MAX_VALUE;\n for (int i = tableau.getNumObjectiveFunctions(); i < tableau.getHeight(); i++) {\n final double rhs = tableau.getEntry(i, tableau.getWidth() - 1);\n final double entry = tableau.getEntry(i, col);\n if (Precision.compareTo(entry, 0d, maxUlps) > 0) {\n final double ratio = rhs / entry;\n final int cmp = Double.compare(ratio, minRatio);\n if (cmp == 0) {\n minRatioPositions.add(i);\n } else if (cmp < 0) {\n minRatio = ratio;\n minRatioPositions = new ArrayList<Integer>();\n minRatioPositions.add(i);\n }\n }\n }\n if (minRatioPositions.size() == 0) {\n return null;\n } else if (minRatioPositions.size() > 1) {\n if (tableau.getNumArtificialVariables() > 0) {\n for (Integer row : minRatioPositions) {\n for (int i = 0; i < tableau.getNumArtificialVariables(); i++) {\n int column = i + tableau.getArtificialVariableOffset();\n final double entry = tableau.getEntry(row, column);\n if (Precision.equals(entry, 1d, maxUlps) && row.equals(tableau.getBasicRow(column))) {\n return row;\n }\n }\n }\n }\n if (getIterations() < getMaxIterations() / 2) {\n Integer minRow = null;\n int minIndex = tableau.getWidth();\n for (Integer row : minRatioPositions) {\n int i = tableau.getNumObjectiveFunctions();\n for (; i < tableau.getWidth() - 1 && !row.equals(minRow); i++) {\n Integer basicRow = tableau.getBasicRow(i);\n if (basicRow != null && basicRow.equals(row)) {\n if (i < minIndex) {\n minIndex = i;\n minRow = row;\n }\n }\n }\n }\n return minRow;\n }\n }\n return minRatioPositions.get(0);\n}\n"
|
"public static void determineIconSize() {\n int trayScalingFactor = 0;\n int menuScalingFactor = 0;\n if (SystemTray.AUTO_TRAY_SIZE) {\n if (OS.isWindows()) {\n String windowsVersion = \"String_Node_Str\";\n try {\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(8196);\n PrintStream outputStream = new PrintStream(byteArrayOutputStream);\n final ShellProcessBuilder shellVersion = new ShellProcessBuilder(outputStream);\n shellVersion.setExecutable(\"String_Node_Str\");\n shellVersion.addArgument(\"String_Node_Str\");\n shellVersion.addArgument(\"String_Node_Str\");\n shellVersion.start();\n String output = ShellProcessBuilder.getOutput(byteArrayOutputStream);\n if (!output.isEmpty()) {\n if (SystemTray.DEBUG) {\n SystemTray.logger.debug(\"String_Node_Str\", output);\n }\n if (output.contains(\"String_Node_Str\")) {\n int beginIndex = output.indexOf(\"String_Node_Str\") + 7;\n windowsVersion = output.substring(beginIndex, beginIndex + 6);\n }\n }\n } catch (Throwable e) {\n if (SystemTray.DEBUG) {\n SystemTray.logger.error(\"String_Node_Str\", e);\n }\n }\n if (windowsVersion.startsWith(\"String_Node_Str\")) {\n trayScalingFactor = 1;\n } else if (windowsVersion.startsWith(\"String_Node_Str\")) {\n trayScalingFactor = 1;\n } else if (windowsVersion.startsWith(\"String_Node_Str\")) {\n trayScalingFactor = 1;\n } else if (windowsVersion.startsWith(\"String_Node_Str\")) {\n trayScalingFactor = 2;\n } else if (windowsVersion.startsWith(\"String_Node_Str\")) {\n trayScalingFactor = 2;\n } else if (windowsVersion.startsWith(\"String_Node_Str\")) {\n trayScalingFactor = 4;\n } else if (windowsVersion.startsWith(\"String_Node_Str\")) {\n trayScalingFactor = 4;\n } else if (windowsVersion.startsWith(\"String_Node_Str\")) {\n trayScalingFactor = 4;\n } else {\n trayScalingFactor = 8;\n }\n Pointer screen = User32.GetDC(null);\n int dpiX = GetDeviceCaps(screen, LOGPIXELSX);\n User32.ReleaseDC(null, screen);\n if (dpiX != 96) {\n trayScalingFactor = (int) (((double) dpiX) / ((double) 96)) * 2;\n menuScalingFactor = trayScalingFactor;\n }\n if (SystemTray.DEBUG) {\n SystemTray.logger.debug(\"String_Node_Str\", windowsVersion);\n SystemTray.logger.debug(\"String_Node_Str\", dpiX);\n }\n } else if (OS.isLinux()) {\n if (\"String_Node_Str\".equalsIgnoreCase(System.getenv(\"String_Node_Str\"))) {\n try {\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(8196);\n PrintStream outputStream = new PrintStream(byteArrayOutputStream);\n final ShellProcessBuilder shellVersion = new ShellProcessBuilder(outputStream);\n shellVersion.setExecutable(\"String_Node_Str\");\n shellVersion.addArgument(\"String_Node_Str\");\n shellVersion.start();\n String output = ShellProcessBuilder.getOutput(byteArrayOutputStream);\n if (!output.isEmpty()) {\n if (SystemTray.DEBUG) {\n SystemTray.logger.debug(\"String_Node_Str\", output);\n }\n String s = \"String_Node_Str\";\n if (output.contains(s)) {\n String value = output.substring(output.indexOf(s) + s.length(), output.length() - 1);\n if (value.startsWith(\"String_Node_Str\")) {\n trayScalingFactor = 2;\n } else if (value.startsWith(\"String_Node_Str\")) {\n trayScalingFactor = 8;\n } else {\n trayScalingFactor = 2;\n }\n }\n }\n } catch (Throwable e) {\n if (SystemTray.DEBUG) {\n SystemTray.logger.error(\"String_Node_Str\", e);\n }\n }\n } else {\n try {\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(8196);\n PrintStream outputStream = new PrintStream(byteArrayOutputStream);\n final ShellProcessBuilder shellVersion = new ShellProcessBuilder(outputStream);\n shellVersion.setExecutable(\"String_Node_Str\");\n shellVersion.addArgument(\"String_Node_Str\");\n shellVersion.addArgument(\"String_Node_Str\");\n shellVersion.addArgument(\"String_Node_Str\");\n shellVersion.start();\n String output = ShellProcessBuilder.getOutput(byteArrayOutputStream);\n if (!output.isEmpty()) {\n if (SystemTray.DEBUG) {\n SystemTray.logger.debug(\"String_Node_Str\", output);\n }\n if (output.contains(\"String_Node_Str\")) {\n String value = output.substring(output.indexOf(\"String_Node_Str\") + 7, output.length() - 1);\n trayScalingFactor = Integer.parseInt(value);\n }\n }\n } catch (Throwable e) {\n if (SystemTray.DEBUG) {\n SystemTray.logger.error(\"String_Node_Str\", e);\n }\n }\n }\n } else if (OS.isMacOsX()) {\n int height;\n if (!SwingUtilities.isEventDispatchThread()) {\n final AtomicInteger h = new AtomicInteger(0);\n SwingUtil.invokeAndWaitQuietly(new Runnable() {\n public void run() {\n h.set((int) java.awt.SystemTray.getSystemTray().getTrayIconSize().getHeight());\n }\n });\n height = h.get();\n } else {\n height = (int) java.awt.SystemTray.getSystemTray().getTrayIconSize().getHeight();\n }\n if (height < 32) {\n trayScalingFactor = 2;\n } else if ((height & (height - 1)) == 0) {\n trayScalingFactor = height / SystemTray.DEFAULT_TRAY_SIZE;\n } else {\n trayScalingFactor = 8;\n }\n }\n }\n if (trayScalingFactor > 1) {\n TRAY_SIZE = SystemTray.DEFAULT_TRAY_SIZE * trayScalingFactor;\n } else {\n TRAY_SIZE = SystemTray.DEFAULT_TRAY_SIZE;\n }\n if (menuScalingFactor > 1) {\n ENTRY_SIZE = SystemTray.DEFAULT_MENU_SIZE * menuScalingFactor;\n }\n ENTRY_SIZE = SystemTray.DEFAULT_MENU_SIZE;\n if (SystemTray.DEBUG) {\n SystemTray.logger.debug(\"String_Node_Str\", trayScalingFactor, TRAY_SIZE);\n SystemTray.logger.debug(\"String_Node_Str\", menuScalingFactor, ENTRY_SIZE);\n }\n}\n"
|
"private boolean needsSetCachedMetaData(DataSetHandle dataSetHandle, IResultMetaData rsMeta) throws BirtException {\n if (dataSetHandle.getCachedMetaDataHandle() == null || rsMeta == null || rsMeta.getColumnCount() == 0)\n return true;\n List list = new ArrayList();\n for (Iterator iter = dataSetHandle.getCachedMetaDataHandle().getResultSet().iterator(); iter.hasNext(); ) {\n list.add(iter.next());\n }\n if (list.size() != rsMeta.getColumnCount())\n return true;\n for (int i = 1; i <= rsMeta.getColumnCount(); i++) {\n ResultSetColumnHandle handle = (ResultSetColumnHandle) list.get(i - 1);\n if (handle.getColumnName() == null || !handle.getColumnName().equals(getColumnName(rsMeta, i)) || !handle.getDataType().equals(DataAdapterUtil.adapterToModelDataType(rsMeta.getColumnType(i))))\n return true;\n }\n return false;\n}\n"
|
"public void run() {\n if (!bluetooth.isConnected()) {\n if (bluetooth.checkBluetoothAvailable()) {\n bluetooth.connect();\n }\n } else {\n robotControl.sendCommandString(RobotControl.UPDOWN_AXIS, updownValue);\n robotControl.sendCommandString(RobotControl.SIDEWAYS_AXIS, sidewaysValue);\n }\n bluetoothConnectionStatusToggle.setChecked(bluetooth.checkBluetoothAvailable());\n deviceConnectedStatusToggle.setChecked(bluetooth.isConnected());\n handlerTimer.postDelayed(this, 300);\n}\n"
|
"public Collection<AuditResult> getResults() {\n try {\n ImmutableList.Builder<AuditResult> listBuilder = ImmutableList.<AuditResult>builder();\n for (TaskAssignment a : unusedTaskAssignments()) {\n listBuilder.add(new AuditResult(AuditResultType.warning, String.format(\"String_Node_Str\", a.getTask().getName(), a.getTask().getId(), a.getEmployee().getDisplayName()), a.getURL()));\n }\n for (TaskAssignment a : duplicateTaskAssignments()) {\n listBuilder.add(new AuditResult(AuditResultType.warning, String.format(\"String_Node_Str\", a.getTask().getName(), a.getTask().getId(), a.getEmployee().getDisplayName()), a.getEmployee().getURL()));\n }\n for (TaskAssignment a : oldTaskAssignments()) {\n listBuilder.add(new AuditResult(AuditResultType.warning, String.format(\"String_Node_Str\", a.getTask().getName(), a.getTask().getId(), a.getEmployee().getDisplayName()), a.getEmployee().getURL()));\n }\n return listBuilder.build();\n } catch (SQLException se) {\n throw new RuntimeException(se);\n }\n}\n"
|
"public void testAddStrongCheck() {\n final int MAX = 5000;\n PageAccessFile paf = createPageAccessFile();\n PagedOidIndex ind = new PagedOidIndex(paf);\n for (int i = 1000; i < 1000 + MAX; i++) {\n ind.insertLong(i, 32, 32 + i);\n for (int j = 1000; j <= i; j++) {\n FilePos fp2 = ind.findOid(j);\n if (fp2 == null) {\n ind.print();\n throw new RuntimeException(\"String_Node_Str\" + j + \"String_Node_Str\" + i);\n }\n }\n }\n System.out.println(\"String_Node_Str\" + ind.statsGetInnerN() + \"String_Node_Str\" + ind.statsGetLeavesN());\n assertNull(ind.findOid(-1));\n assertNull(ind.findOid(0));\n assertNull(ind.findOid(999));\n assertNull(ind.findOid(1000 + MAX));\n}\n"
|
"public void onGuildMemberLeave(GuildMemberLeaveEvent event) {\n Guild guild = event.getGuild();\n TextChannel tc = ldm.getServerlogChannel(guild);\n TextChannel channel = FinderUtil.getDefaultChannel(event.getGuild());\n User oldmember = event.getMember().getUser();\n Calendar calendar = GregorianCalendar.getInstance();\n calendar.setTime(new Date());\n String hour = String.format(\"String_Node_Str\", calendar.get(Calendar.HOUR_OF_DAY));\n String min = String.format(\"String_Node_Str\", calendar.get(Calendar.MINUTE));\n String sec = String.format(\"String_Node_Str\", calendar.get(Calendar.SECOND));\n if (!(tc == null)) {\n if (!(tc.getGuild().getSelfMember().hasPermission(tc, Permission.MESSAGE_READ, Permission.MESSAGE_WRITE, Permission.MESSAGE_EMBED_LINKS, Permission.MESSAGE_HISTORY)))\n guild.getOwner().getUser().openPrivateChannel().queue(s -> s.sendMessage(Messages.SRVLOG_NOPERMISSIONS).queue(null, (e) -> channel.sendMessage(Messages.SRVLOG_NOPERMISSIONS).queue()));\n else\n tc.sendMessage(\"String_Node_Str\" + hour + \"String_Node_Str\" + min + \"String_Node_Str\" + sec + \"String_Node_Str\" + oldmember.getName() + \"String_Node_Str\" + oldmember.getDiscriminator() + \"String_Node_Str\" + oldmember.getId() + \"String_Node_Str\" + guild.getMembers().size() + \"String_Node_Str\").queue();\n }\n}\n"
|
"private int compressGraphLabels(List<DirectedMultigraphWithRoot<Vertex<StringBuffer>, Edge<StringBuffer>>> graphs, Map<String, String> labelDict, int currentLabel) {\n String label;\n for (DirectedGraph<Vertex<StringBuffer>, Edge<StringBuffer>> graph : graphs) {\n for (Edge<StringBuffer> edge : graph.getEdges()) {\n label = labelDict.get(edge.getLabel().toString());\n if (label == null) {\n label = Integer.toString(currentLabel);\n currentLabel++;\n labelDict.put(edge.getLabel().toString(), label);\n }\n edge.setLabel(new StringBuffer(label));\n }\n for (Vertex<StringBuffer> vertex : graph.getVertices()) {\n label = labelDict.get(vertex.getLabel());\n if (label == null) {\n label = Integer.toString(currentLabel);\n currentLabel++;\n labelDict.put(vertex.getLabel().toString(), label);\n }\n vertex.setLabel(new StringBuffer(label));\n }\n }\n return currentLabel;\n}\n"
|
"public HttpResponse<NameUsageMatch2> getMatch(ExtendedRecord extendedRecord) {\n HttpResponse<NameUsageMatch2> response = tryNameMatch(extendedRecord.getCoreTerms());\n if (isSuccessfulMatch(response) || !hasIdentifications(extendedRecord)) {\n return response;\n }\n LOG.info(\"String_Node_Str\");\n List<Map<String, String>> identifications = extendedRecord.getExtensions().get(DwcTerm.Identification.qualifiedName());\n identifications.sort(Comparator.comparing((Map<String, String> map) -> {\n if (!map.containsKey(DwcTerm.dateIdentified.qualifiedName()) || Objects.isNull(map.get(DwcTerm.dateIdentified.qualifiedName()))) {\n return LocalDateTime.MIN;\n }\n return LocalDateTime.parse(map.get(DwcTerm.dateIdentified.qualifiedName()));\n }).reversed());\n for (Map<String, String> record : identifications) {\n response = tryNameMatch(record);\n if (isSuccessfulMatch(response)) {\n LOG.info(\"String_Node_Str\", record.get(DwcTerm.identificationID.name()));\n return response;\n }\n }\n return response;\n}\n"
|
"public void start() {\n dB.log(\"String_Node_Str\" + id + \"String_Node_Str\" + ticks + \"String_Node_Str\");\n if (ticks > 0)\n taskId = Bukkit.getScheduler().scheduleSyncRepeatingTask(DenizenAPI.getCurrentInstance(), new Runnable() {\n public void run() {\n revolve();\n }\n }, ticks, ticks);\n else\n revolve();\n}\n"
|
"public void datasetLineage(HttpRequest request, HttpResponder responder, String namespaceId, String datasetId, String startStr, String endStr, int levels) throws Exception {\n checkLevels(levels);\n TimeRange range = parseRange(startStr, endStr);\n Id.DatasetInstance datasetInstance = Id.DatasetInstance.from(namespaceId, datasetId);\n Lineage lineage = lineageAdmin.computeLineage(datasetInstance, range.getStart(), range.getEnd(), levels);\n responder.sendJson(HttpResponseStatus.OK, new LineageRecord(TimeUnit.MILLISECONDS.toSeconds(range.getStart()), TimeUnit.MILLISECONDS.toSeconds(range.getEnd()), lineage.getRelations()), LineageRecord.class, GSON);\n}\n"
|
"public void describeTenant(final String domainName) throws CommandException {\n try {\n Type listType = new TypeToken<ArrayList<TenantInfoBean>>() {\n }.getType();\n List<TenantInfoBean> tenantList = (List<TenantInfoBean>) restClient.listEntity(ENDPOINT_LIST_TENANTS, listType, \"String_Node_Str\");\n TenantInfoBean tenant = null;\n for (TenantInfoBean item : tenantList) {\n if (item.getTenantDomain().equals(domainName)) {\n tenant = item;\n break;\n }\n }\n if (tenant == null) {\n System.out.println(\"String_Node_Str\");\n return;\n }\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\" + tenant.getTenantDomain());\n System.out.println(\"String_Node_Str\" + tenant.getTenantId());\n System.out.println(\"String_Node_Str\" + tenant.getEmail());\n System.out.println(\"String_Node_Str\" + tenant.isActive());\n System.out.println(\"String_Node_Str\" + new Date(tenant.getCreatedDate()));\n } catch (Exception e) {\n String message = \"String_Node_Str\" + domainName;\n printError(message, e);\n }\n}\n"
|
"public void updated(Dictionary<String, ?> props) throws ConfigurationException {\n if (props == null) {\n configs.clear();\n configs.putAll(defaults);\n } else {\n try {\n Enumeration<String> keys = props.keys();\n while (keys.hasMoreElements()) {\n String key = keys.nextElement();\n configs.put(key, (String) props.get(key));\n }\n } catch (Throwable t) {\n throw new ConfigurationException(null, FEDERATION_CONFIG_ERR, t);\n }\n }\n}\n"
|
"private void createEntrance(World world, Random random) {\n int y = getAverageGroundLevel(world, BoundingBoxHelper.getCorrectBox(coordBaseMode, getXWithOffset(42, 0), 0, getZWithOffset(42, 0), 5, 7, 0, xShift));\n if (checkGround(world, 42, 47, y)) {\n this.fillWithRandomizedBlocks(world, boundingBox, 42, y, 0, 42, y + 3, 0, false, random, getCemeteryCatacombsStones());\n this.fillWithRandomizedBlocks(world, boundingBox, 47, y, 0, 47, y + 3, 0, false, random, getCemeteryCatacombsStones());\n this.fillWithRandomizedBlocks(world, boundingBox, 43, y + 4, 0, 43, y + 4, 0, false, random, getCemeteryCatacombsStones());\n this.fillWithRandomizedBlocks(world, boundingBox, 46, y + 4, 0, 46, y + 4, 0, false, random, getCemeteryCatacombsStones());\n this.fillWithBlocks(world, boundingBox, 43, y, 0, 43, y + 3, 0, Block.fenceIron.blockID, 0, false);\n this.fillWithBlocks(world, boundingBox, 46, y, 0, 46, y + 3, 0, Block.fenceIron.blockID, 0, false);\n this.fillWithBlocks(world, boundingBox, 44, y + 3, 0, 45, y + 4, 0, Block.fenceIron.blockID, 0, false);\n this.fillWithMetadataBlocks(world, boundingBox, 44, y + 5, 0, 45, y + 5, 0, Block.stoneSingleSlab.blockID, 5, Block.stoneSingleSlab.blockID, 5, false);\n this.placeBlockAtCurrentPosition(world, Block.stoneSingleSlab.blockID, 5, 42, y + 4, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, Block.stoneSingleSlab.blockID, 5, 47, y + 4, 0, boundingBox);\n }\n}\n"
|
"private ClassBuilder constructClass(EndpointState curr) {\n Set<IOAction> as = curr.getTakeable();\n IOAction a = as.iterator().next();\n if (a instanceof Send) {\n return new SendSocketGenerator(this, curr).generateType();\n } else if (a instanceof Receive) {\n return (as.size() > 1) ? new BranchSocketGenerator(this, curr).generateType() : new ReceiveSocketGenerator(this, curr).generateType();\n } else {\n throw new RuntimeException(\"String_Node_Str\" + curr);\n }\n}\n"
|
"public boolean isPoweringTo(ForgeDirection side) {\n if (this.prevDian <= 0 && this.dian <= 0) {\n return false;\n }\n return this.doScan() && this.detectedMissiles.size() > 0;\n}\n"
|
"public static String hidePassword(final String password) {\n if (password == null) {\n return PASS_COVER + PASS_COVER;\n }\n String testPassword = password.trim();\n if (testPassword.startsWith(ContextParameterUtils.JAVA_NEW_CONTEXT_PREFIX)) {\n String variableName = testPassword.substring(ContextParameterUtils.JAVA_NEW_CONTEXT_PREFIX.length(), testPassword.length());\n if (!ContextUtils.isJavaKeyWords(variableName)) {\n return password;\n }\n }\n int length = password.length() + 2;\n StringBuilder builder = new StringBuilder();\n for (int i = 0; i < length; i++) {\n builder.append(PASS_COVER);\n }\n return builder.toString();\n}\n"
|
"private String applyFont(String fontName, int fontStyle, float fontSize, String text) {\n if (isIntrinsicFont(fontName)) {\n return applyIntrinsicFont(fontName, fontStyle, fontSize, text);\n } else {\n try {\n String fontPath = getFontPath(fontName);\n if (fontPath == null) {\n return applyIntrinsicFont(fontName, fontStyle, fontSize, text);\n }\n ITrueTypeWriter trueTypeWriter = getTrueTypeFontWriter(fontPath, fontName);\n trueTypeWriter.ensureGlyphsAvailable(text);\n String displayName = trueTypeWriter.getDisplayName();\n setFont(displayName, fontSize);\n return trueTypeWriter.toHexString(text);\n } catch (IOException ioe) {\n log.log(Level.WARNING, \"String_Node_Str\" + fontName);\n } catch (DocumentException de) {\n log.log(Level.WARNING, \"String_Node_Str\" + fontName);\n }\n return null;\n }\n}\n"
|
"public String getMessage() {\n return handle.getMessage().toLegacy();\n}\n"
|
"public boolean reloadOutlinePage() {\n if (!getActivePageInstance().getId().equals(XMLSourcePage_ID) || outlinePage == null || !getCurrentPageInstance().getId().equals(XMLSourcePage_ID)) {\n return false;\n }\n if (outlinePage.getCurrentPage() instanceof DesignerOutlinePage || outlinePage.getCurrentPage() == null || outlinePage.getCurrentPage() instanceof EmptyPage) {\n outlinePage.setActivePage((IPageBookViewPage) getActivePageInstance().getAdapter(IContentOutlinePage.class));\n } else {\n outlinePage.setActivePage((IPageBookViewPage) getActivePageInstance().getAdapter(ContentOutlinePage.class));\n }\n if (outlinePage.getSite() != null) {\n outlinePage.getSite().getActionBars().updateActionBars();\n }\n return true;\n}\n"
|
"public String toString() {\n StringBuilder b = new StringBuilder();\n b.append(this.nickname);\n b.append(\"String_Node_Str\").append(guid).append(\"String_Node_Str\");\n b.append(\"String_Node_Str\").append(level);\n b.append(\"String_Node_Str\").append(level);\n b.append(\"String_Node_Str\").append(server);\n return b.toString();\n}\n"
|
"private void generateInlineAccessors(ClassFile classFile, final InlineAccessFieldBinding accessField, final ResolvedMember field) {\n final FieldBinding fieldBinding = factory.makeFieldBinding(field);\n generateMethod(classFile, accessField.reader, makeEffectiveSignatureAttribute(field, Shadow.FieldGet, false), new BodyGenerator() {\n\n public void generate(CodeStream codeStream) {\n if (field.isStatic()) {\n codeStream.getstatic(fieldBinding);\n } else {\n codeStream.aload_0();\n codeStream.getfield(fieldBinding);\n }\n AstUtil.generateReturn(accessField.reader.returnType, codeStream);\n }\n });\n generateMethod(classFile, accessField.writer, new BodyGenerator() {\n public void generate(CodeStream codeStream) {\n if (field.isStatic()) {\n codeStream.load(fieldBinding.type, 0);\n codeStream.putstatic(fieldBinding);\n } else {\n codeStream.aload_0();\n codeStream.load(fieldBinding.type, 1);\n codeStream.putfield(fieldBinding);\n }\n codeStream.return_();\n }\n });\n}\n"
|
"protected void onTypeRef(SourceTypeBinding referencedType, CompilationUnitDeclaration unitOfReferrer) {\n String referencedFn = String.valueOf(referencedType.getFileName());\n if (!unchangedCudsByFileName.containsKey(referencedFn) && !changedCudsByFileName.containsKey(referencedFn)) {\n String referrerFn = String.valueOf(unitOfReferrer.getFileName());\n if (cudsByFileName.containsKey(referrerFn) && !pendingRemovals.contains(referrerFn)) {\n TreeLogger branch = logger.branch(TreeLogger.TRACE, \"String_Node_Str\" + referrerFn + \"String_Node_Str\", null);\n final String badTypeName = CharOperation.toString(referencedType.compoundName);\n branch.branch(TreeLogger.TRACE, \"String_Node_Str\" + badTypeName, null);\n pendingRemovals.add(referrerFn);\n }\n }\n}\n"
|
"public boolean saveResource(Resource resource) {\n try {\n resourceManager.saveResource(resource);\n return true;\n } catch (PersistenceException e) {\n return false;\n }\n}\n"
|
"public void submitCallableToMember_withMultiExecutionCallback() throws Exception {\n final IExecutorService service = client.getExecutorService(randomString());\n final CountDownLatch responseLatch = new CountDownLatch(CLUSTER_SIZE);\n final CountDownLatch completeLatch = new CountDownLatch(CLUSTER_SIZE);\n final String msg = randomString();\n final Callable<String> callable = new AppendCallable(msg);\n final Collection<Member> collection = instance2.getCluster().getMembers();\n service.submitToMembers(callable, collection, new MultiExecutionCallback() {\n public void onResponse(final Member member, final Object value) {\n if (value.equals(msg + AppendCallable.APPENDAGE)) {\n responseLatch.countDown();\n }\n }\n public void onComplete(final Map<Member, Object> values) {\n for (final Member member : values.keySet()) {\n final Object value = values.get(member);\n if (value.equals(msg + AppendCallable.APPENDAGE)) {\n completeLatch.countDown();\n }\n }\n }\n });\n assertOpenEventually(\"String_Node_Str\", responseLatch);\n assertOpenEventually(\"String_Node_Str\", completeLatch);\n}\n"
|
"public double[] getExtrema() {\n try {\n MrsImageDataProvider dp = getDataProvider();\n if (dp != null) {\n MrsPyramidMetadata metadata = dp.getMetadataReader().read();\n ImageStats stats = metadata.getStats(0);\n if (stats != null) {\n return new double[] { stats.min, stats.max };\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n}\n"
|
"public void onGet(Object item) {\n if (checkValidCache(item)) {\n ArrayList<Event> events = (ArrayList<Event>) item;\n mAdapter.addAll(events);\n setIsLoading(false);\n Snackbar.make(getView(), R.string.cached_content, Snackbar.LENGTH_SHORT).show();\n } else {\n modelCache.removeAsync(mCacheKey);\n onNotFound();\n }\n}\n"
|
"public synchronized TooltipPainter setUnlimitedWidth() {\n this.isFixedWidth = false;\n this.textLayout = null;\n return this;\n}\n"
|
"private void marshal(Object object, Writer writer, ABSTRACT_SESSION session, DESCRIPTOR xmlDescriptor) throws XMLMarshalException {\n if ((object == null) || (writer == null)) {\n throw XMLMarshalException.nullArgumentException();\n }\n boolean isXMLRoot = false;\n String version = DEFAULT_XML_VERSION;\n String encoding = getEncoding();\n String callbackName = null;\n if (object instanceof JSONWithPadding) {\n callbackName = ((JSONWithPadding) object).getCallbackName();\n object = ((JSONWithPadding) object).getObject();\n if (object == null) {\n throw XMLMarshalException.nullArgumentException();\n }\n }\n if (object instanceof Root) {\n isXMLRoot = true;\n Root xroot = (Root) object;\n version = xroot.getXMLVersion() != null ? xroot.getXMLVersion() : version;\n encoding = xroot.getEncoding() != null ? xroot.getEncoding() : encoding;\n }\n MarshalRecord marshalRecord;\n writer = wrapWriter(writer);\n if (isFormattedOutput()) {\n if (isApplicationJSON()) {\n writerRecord = new JSONFormattedWriterRecord(writer, callbackName);\n } else {\n writerRecord = new FormattedWriterRecord();\n ((FormattedWriterRecord) writerRecord).setWriter(writer);\n }\n } else {\n if (isApplicationJSON()) {\n writerRecord = new JSONWriterRecord(writer, callbackName);\n } else {\n writerRecord = new WriterRecord();\n ((WriterRecord) writerRecord).setWriter(writer);\n }\n }\n writerRecord.setMarshaller(this);\n String rootName = null;\n String rootNamespace = null;\n if (isXMLRoot) {\n rootName = ((Root) object).getLocalName();\n rootNamespace = ((Root) object).getNamespaceURI();\n if (session == null || xmlDescriptor == null) {\n try {\n session = context.getSession(((Root) object).getObject());\n if (session != null) {\n xmlDescriptor = getDescriptor(((Root) object).getObject(), session);\n }\n } catch (XMLMarshalException marshalException) {\n if (!isSimpleXMLRoot((Root) object)) {\n throw marshalException;\n }\n }\n }\n } else {\n Class objectClass = object.getClass();\n if (object instanceof Collection) {\n try {\n writerRecord.startCollection();\n for (Object o : (Collection) object) {\n marshal(o, writerRecord);\n }\n writerRecord.endCollection();\n writer.flush();\n } catch (IOException e) {\n throw XMLMarshalException.marshalException(e);\n }\n return;\n } else if (objectClass.isArray()) {\n try {\n writerRecord.startCollection();\n int arrayLength = Array.getLength(object);\n for (int x = 0; x < arrayLength; x++) {\n marshal(Array.get(object, x), writerRecord);\n }\n writerRecord.endCollection();\n writer.flush();\n } catch (IOException e) {\n throw XMLMarshalException.marshalException(e);\n }\n return;\n }\n if (session == null || xmlDescriptor == null) {\n session = context.getSession(objectClass);\n xmlDescriptor = getDescriptor(objectClass, session);\n }\n }\n marshal(object, writerRecord, session, xmlDescriptor, isXMLRoot);\n try {\n writer.flush();\n } catch (IOException e) {\n throw XMLMarshalException.marshalException(e);\n }\n}\n"
|
"public void RegisterRecipes() {\n ItemStack var1 = new ItemStack(Block.stone);\n new ItemStack(Block.cobblestone);\n ItemStack var3 = new ItemStack(Block.dirt);\n ItemStack var4 = new ItemStack(Block.sand);\n ItemStack var5 = new ItemStack(Block.gravel);\n ItemStack var6 = new ItemStack(Block.glass);\n ItemStack var7 = new ItemStack(Block.thinGlass);\n ItemStack oreIron = new ItemStack(Block.oreIron);\n ItemStack oreGold = new ItemStack(Block.oreGold);\n ItemStack var10 = new ItemStack(Block.oreDiamond);\n ItemStack var11 = new ItemStack(Block.oreEmerald);\n ItemStack oreCoal = new ItemStack(Block.oreCoal);\n ItemStack var13 = new ItemStack(Block.oreRedstone);\n ItemStack var14 = new ItemStack(Block.oreLapis);\n ItemStack ingotIron = new ItemStack(Item.ingotIron);\n ItemStack blockIron = new ItemStack(Block.blockIron);\n ItemStack var17 = new ItemStack(MinechemItems.atomicManipulator);\n ItemStack var18 = new ItemStack(Item.redstone);\n ItemStack var19 = new ItemStack(MinechemItems.testTube, 16);\n ItemStack paper = new ItemStack(Item.paper);\n ItemStack bdye = new ItemStack(Item.dyePowder, 1, 6);\n GameRegistry.addRecipe(var19, new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('G'), var6 });\n GameRegistry.addRecipe(MinechemItems.concaveLens, new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('G'), var6 });\n GameRegistry.addRecipe(MinechemItems.convexLens, new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('G'), var6 });\n GameRegistry.addRecipe(MinechemItems.microscopeLens, new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('A'), MinechemItems.convexLens, Character.valueOf('B'), MinechemItems.concaveLens });\n GameRegistry.addRecipe(new ItemStack(MinechemBlocks.microscope), new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('L'), MinechemItems.microscopeLens, Character.valueOf('P'), var7, Character.valueOf('I'), ingotIron });\n GameRegistry.addRecipe(new ItemStack(MinechemItems.atomicManipulator), new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('P'), new ItemStack(Block.pistonBase), Character.valueOf('I'), blockIron });\n GameRegistry.addRecipe(new ItemStack(MinechemBlocks.decomposer), new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('A'), var17, Character.valueOf('I'), ingotIron, Character.valueOf('R'), var18 });\n GameRegistry.addRecipe(new ItemStack(MinechemBlocks.synthesis), new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('A'), var17, Character.valueOf('I'), ingotIron, Character.valueOf('R'), var18, Character.valueOf('D'), new ItemStack(Item.diamond) });\n GameRegistry.addRecipe(new ItemStack(MinechemBlocks.fusion, 16, 0), new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('I'), ingotIron, Character.valueOf('L'), ItemElement.createStackOf(EnumElement.Pb, 1) });\n GameRegistry.addRecipe(new ItemStack(MinechemBlocks.fusion, 16, 1), new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('I'), ingotIron, Character.valueOf('W'), ItemElement.createStackOf(EnumElement.W, 1), Character.valueOf('B'), ItemElement.createStackOf(EnumElement.Be, 1) });\n GameRegistry.addRecipe(MinechemItems.projectorLens, new Object[] { \"String_Node_Str\", Character.valueOf('A'), MinechemItems.concaveLens, Character.valueOf('B'), MinechemItems.convexLens });\n GameRegistry.addRecipe(new ItemStack(MinechemBlocks.blueprintProjector), new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('I'), ingotIron, Character.valueOf('P'), var7, Character.valueOf('L'), MinechemItems.projectorLens, Character.valueOf('G'), new ItemStack(Block.redstoneLampIdle) });\n ItemStack var20 = new ItemStack(MinechemItems.molecule, 1, EnumMolecule.polyvinylChloride.ordinal());\n GameRegistry.addRecipe(new ItemStack(MinechemItems.hazmatFeet), new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('P'), var20 });\n GameRegistry.addRecipe(new ItemStack(MinechemItems.hazmatLegs), new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('P'), var20 });\n GameRegistry.addRecipe(new ItemStack(MinechemItems.hazmatTorso), new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('P'), var20 });\n GameRegistry.addRecipe(new ItemStack(MinechemItems.hazmatHead), new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('P'), var20 });\n GameRegistry.addRecipe(new ItemStack(MinechemBlocks.chemicalStorage), new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('L'), new ItemStack(MinechemItems.element, 1, EnumElement.Pb.ordinal()), Character.valueOf('C'), new ItemStack(Block.chest) });\n GameRegistry.addRecipe(new ItemStack(MinechemItems.IAintAvinit), new Object[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", Character.valueOf('Z'), new ItemStack(Item.ingotIron), Character.valueOf('S'), new ItemStack(Item.stick) });\n GameRegistry.addShapelessRecipe(new ItemStack(MinechemItems.journal), new Object[] { new ItemStack(Item.book), new ItemStack(MinechemItems.testTube) });\n GameRegistry.addShapelessRecipe(new ItemStack(MinechemItems.EmptyPillz, 2), new Object[] { new ItemStack(Item.sugar), new ItemStack(Item.slimeBall) });\n for (EnumElement element : EnumElement.values()) {\n GameRegistry.addShapelessRecipe(new ItemStack(MinechemItems.testTube), new Object[] { new ItemStack(MinechemItems.element, element.ordinal()) });\n }\n GameRegistry.addRecipe(new RecipeJournalCloning());\n Element var21 = this.element(EnumElement.C, 64);\n DecomposerRecipe.add(new DecomposerRecipe(oreIron, new Chemical[] { this.element(EnumElement.Fe, 32) }));\n DecomposerRecipe.add(new DecomposerRecipe(oreGold, new Chemical[] { this.element(EnumElement.Au, 32) }));\n DecomposerRecipe.add(new DecomposerRecipe(var10, new Chemical[] { this.molecule(EnumMolecule.fullrene, 6) }));\n DecomposerRecipe.add(new DecomposerRecipe(oreCoal, new Chemical[] { this.element(EnumElement.C, 32) }));\n DecomposerRecipe.add(new DecomposerRecipe(var11, new Chemical[] { this.molecule(EnumMolecule.beryl, 4), this.element(EnumElement.Cr, 4), this.element(EnumElement.V, 4) }));\n DecomposerRecipe.add(new DecomposerRecipe(var14, new Chemical[] { this.molecule(EnumMolecule.lazurite, 4), this.molecule(EnumMolecule.sodalite), this.molecule(EnumMolecule.noselite), this.molecule(EnumMolecule.calcite), this.molecule(EnumMolecule.pyrite) }));\n ItemStack ingotGold = new ItemStack(Item.ingotGold);\n ItemStack var23 = new ItemStack(Item.diamond);\n ItemStack var24 = new ItemStack(Item.emerald);\n ItemStack chunkCoal = new ItemStack(Item.coal);\n ItemStack fusionblue = new ItemStack(MinechemItems.blueprint, 1, MinechemBlueprint.fusion.id);\n ItemStack fusionBlock1 = new ItemStack(MinechemBlocks.fusion, 0);\n ItemStack fusionBlock2 = new ItemStack(MinechemBlocks.fusion, 1);\n DecomposerRecipe.add(new DecomposerRecipe(ingotIron, new Chemical[] { this.element(EnumElement.Fe, 16) }));\n DecomposerRecipe.add(new DecomposerRecipe(ingotGold, new Chemical[] { this.element(EnumElement.Au, 16) }));\n DecomposerRecipe.add(new DecomposerRecipe(var23, new Chemical[] { this.molecule(EnumMolecule.fullrene, 4) }));\n DecomposerRecipe.add(new DecomposerRecipe(var24, new Chemical[] { this.molecule(EnumMolecule.beryl, 2), this.element(EnumElement.Cr, 2), this.element(EnumElement.V, 2) }));\n DecomposerRecipe.add(new DecomposerRecipe(chunkCoal, new Chemical[] { this.element(EnumElement.C, 16) }));\n this.recipeIron = new SynthesisRecipe(ingotIron, false, 1000, new Chemical[] { this.element(EnumElement.Fe, 16) });\n this.recipeGold = new SynthesisRecipe(ingotGold, false, 1000, new Chemical[] { this.element(EnumElement.Au, 16) });\n SynthesisRecipe.add(recipeIron);\n SynthesisRecipe.add(recipeGold);\n SynthesisRecipe.add(new SynthesisRecipe(var23, true, '\\uea60', new Chemical[] { null, this.molecule(EnumMolecule.fullrene), null, this.molecule(EnumMolecule.fullrene), null, this.molecule(EnumMolecule.fullrene), null, this.molecule(EnumMolecule.fullrene), null }));\n SynthesisRecipe.add(new SynthesisRecipe(var24, true, 80000, new Chemical[] { null, this.element(EnumElement.Cr), null, this.element(EnumElement.V), this.molecule(EnumMolecule.beryl, 2), this.element(EnumElement.V), null, this.element(EnumElement.Cr), null }));\n DecomposerRecipe.add(new DecomposerRecipe(new ItemStack(Block.blockIron), new Chemical[] { this.element(EnumElement.Fe, 144) }));\n DecomposerRecipe.add(new DecomposerRecipe(new ItemStack(Block.blockGold), new Chemical[] { this.element(EnumElement.Au, 144) }));\n DecomposerRecipe.add(new DecomposerRecipe(new ItemStack(Block.blockDiamond), new Chemical[] { this.molecule(EnumMolecule.fullrene, 36) }));\n DecomposerRecipe.add(new DecomposerRecipe(new ItemStack(Block.blockEmerald), new Chemical[] { this.molecule(EnumMolecule.beryl, 18), this.element(EnumElement.Cr, 18), this.element(EnumElement.V, 18) }));\n SynthesisRecipe.add(new SynthesisRecipe(new ItemStack(Block.blockDiamond), true, 120000, new Chemical[] { this.molecule(EnumMolecule.fullrene, 4), this.molecule(EnumMolecule.fullrene, 4), this.molecule(EnumMolecule.fullrene, 4), this.molecule(EnumMolecule.fullrene, 4), this.molecule(EnumMolecule.fullrene, 4), this.molecule(EnumMolecule.fullrene, 4), this.molecule(EnumMolecule.fullrene, 4), this.molecule(EnumMolecule.fullrene, 4), this.molecule(EnumMolecule.fullrene, 4) }));\n SynthesisRecipe.add(new SynthesisRecipe(new ItemStack(Block.blockEmerald), true, 150000, new Chemical[] { this.element(EnumElement.Cr, 3), this.element(EnumElement.Cr, 3), this.element(EnumElement.Cr, 3), this.element(EnumElement.V, 9), this.molecule(EnumMolecule.beryl, 18), this.element(EnumElement.V, 9), this.element(EnumElement.Cr, 3), this.element(EnumElement.Cr, 3), this.element(EnumElement.Cr, 3) }));\n ItemStack var26 = new ItemStack(Block.sandStone);\n ItemStack var27 = new ItemStack(Item.flint);\n DecomposerRecipe.add(new DecomposerRecipe(var26, new Chemical[] { this.molecule(EnumMolecule.siliconDioxide, 16) }));\n DecomposerRecipe.add(new DecomposerRecipe(var4, new Chemical[] { this.molecule(EnumMolecule.siliconDioxide, 16) }));\n DecomposerRecipe.add(new DecomposerRecipe(var6, new Chemical[] { this.molecule(EnumMolecule.siliconDioxide, 16) }));\n DecomposerRecipe.add(new DecomposerRecipe(var7, new Chemical[] { this.molecule(EnumMolecule.siliconDioxide, 1) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var5, 0.35F, new Chemical[] { this.molecule(EnumMolecule.siliconDioxide) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var27, 0.5F, new Chemical[] { this.molecule(EnumMolecule.siliconDioxide) }));\n Molecule var28 = this.molecule(EnumMolecule.siliconDioxide, 4);\n Molecule var29 = this.molecule(EnumMolecule.siliconDioxide, 4);\n SynthesisRecipe.add(new SynthesisRecipe(var6, true, 500, new Chemical[] { var28, null, var28, null, null, null, var28, null, var28 }));\n SynthesisRecipe.add(new SynthesisRecipe(var4, true, 200, new Chemical[] { var28, var28, var28, var28 }));\n SynthesisRecipe.add(new SynthesisRecipe(var27, true, 100, new Chemical[] { null, var29, null, var29, var29, var29, null, null, null }));\n SynthesisRecipe.add(new SynthesisRecipe(var7, true, 50, new Chemical[] { null, null, null, this.molecule(EnumMolecule.siliconDioxide), null, null, null, null, null }));\n SynthesisRecipe.add(new SynthesisRecipe(var5, true, 30, new Chemical[] { null, null, null, null, null, null, null, null, this.molecule(EnumMolecule.siliconDioxide) }));\n ItemStack var30 = new ItemStack(Item.feather);\n DecomposerRecipe.add(new DecomposerRecipe(var30, new Chemical[] { this.molecule(EnumMolecule.water, 8), this.element(EnumElement.N, 6) }));\n SynthesisRecipe.add(new SynthesisRecipe(var30, true, 800, new Chemical[] { this.element(EnumElement.N), this.molecule(EnumMolecule.water, 2), this.element(EnumElement.N), this.element(EnumElement.N), this.molecule(EnumMolecule.water, 1), this.element(EnumElement.N), this.element(EnumElement.N), this.molecule(EnumMolecule.water, 5), this.element(EnumElement.N) }));\n ItemStack var31 = new ItemStack(Item.arrow);\n ItemStack var32 = new ItemStack(Item.paper);\n ItemStack var33 = new ItemStack(Item.leather);\n ItemStack var34 = new ItemStack(Item.snowball);\n ItemStack var35 = new ItemStack(Item.brick);\n ItemStack var36 = new ItemStack(Item.clay);\n ItemStack var37 = new ItemStack(Block.mycelium);\n ItemStack var38 = new ItemStack(Block.sapling, 1, -1);\n DecomposerRecipe.add(new DecomposerRecipe(var31, new Chemical[] { this.element(EnumElement.Si), this.element(EnumElement.O, 2), this.element(EnumElement.N, 6) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var36, 0.3F, new Chemical[] { this.molecule(EnumMolecule.kaolinite) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var35, 0.5F, new Chemical[] { this.molecule(EnumMolecule.kaolinite) }));\n DecomposerRecipe.add(new DecomposerRecipe(var34, new Chemical[] { this.molecule(EnumMolecule.water) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var37, 0.09F, new Chemical[] { this.molecule(EnumMolecule.fingolimod) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var33, 0.5F, new Chemical[] { this.molecule(EnumMolecule.arginine), this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.keratin) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var38, 0.25F, new Chemical[] { this.molecule(EnumMolecule.cellulose) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(new ItemStack(Block.sapling, 1, 1), 0.25F, new Chemical[] { this.molecule(EnumMolecule.cellulose) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(new ItemStack(Block.sapling, 1, 2), 0.25F, new Chemical[] { this.molecule(EnumMolecule.cellulose) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(new ItemStack(Block.sapling, 1, 3), 0.25F, new Chemical[] { this.molecule(EnumMolecule.cellulose) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var32, 0.25F, new Chemical[] { this.molecule(EnumMolecule.cellulose) }));\n SynthesisRecipe.add(new SynthesisRecipe(new ItemStack(Item.clay, 12), false, 100, new Chemical[] { this.molecule(EnumMolecule.kaolinite) }));\n SynthesisRecipe.add(new SynthesisRecipe(new ItemStack(Item.brick, 8), true, 400, new Chemical[] { this.molecule(EnumMolecule.kaolinite), this.molecule(EnumMolecule.kaolinite), null, this.molecule(EnumMolecule.kaolinite), this.molecule(EnumMolecule.kaolinite), null }));\n SynthesisRecipe.add(new SynthesisRecipe(new ItemStack(Item.snowball, 5), true, 20, new Chemical[] { this.molecule(EnumMolecule.water), null, this.molecule(EnumMolecule.water), null, this.molecule(EnumMolecule.water), null, this.molecule(EnumMolecule.water), null, this.molecule(EnumMolecule.water) }));\n SynthesisRecipe.add(new SynthesisRecipe(new ItemStack(Block.mycelium, 16), false, 300, new Chemical[] { this.molecule(EnumMolecule.fingolimod) }));\n SynthesisRecipe.add(new SynthesisRecipe(new ItemStack(Item.leather, 5), true, 700, new Chemical[] { this.molecule(EnumMolecule.arginine), null, null, null, this.molecule(EnumMolecule.keratin), null, null, null, this.molecule(EnumMolecule.glycine) }));\n SynthesisRecipe.add(new SynthesisRecipe(new ItemStack(Block.sapling, 1, 0), true, 20, new Chemical[] { null, null, null, null, null, null, null, null, this.molecule(EnumMolecule.cellulose) }));\n SynthesisRecipe.add(new SynthesisRecipe(new ItemStack(Block.sapling, 1, 1), true, 20, new Chemical[] { null, null, null, null, null, null, null, this.molecule(EnumMolecule.cellulose), null }));\n SynthesisRecipe.add(new SynthesisRecipe(new ItemStack(Block.sapling, 1, 2), true, 20, new Chemical[] { null, null, null, null, null, null, this.molecule(EnumMolecule.cellulose), null, null }));\n SynthesisRecipe.add(new SynthesisRecipe(new ItemStack(Block.sapling, 1, 3), true, 20, new Chemical[] { null, null, null, null, null, this.molecule(EnumMolecule.cellulose), null, null, null }));\n SynthesisRecipe.add(new SynthesisRecipe(new ItemStack(Item.paper, 16), true, 150, new Chemical[] { null, this.molecule(EnumMolecule.cellulose), null, null, this.molecule(EnumMolecule.cellulose), null, null, this.molecule(EnumMolecule.cellulose), null }));\n ItemStack var39 = new ItemStack(Item.slimeBall);\n ItemStack var40 = new ItemStack(Item.blazeRod);\n ItemStack var41 = new ItemStack(Item.blazePowder);\n ItemStack var42 = new ItemStack(Item.magmaCream);\n ItemStack var43 = new ItemStack(Item.ghastTear);\n ItemStack var44 = new ItemStack(Item.netherStar);\n ItemStack var45 = new ItemStack(Item.spiderEye);\n ItemStack var46 = new ItemStack(Item.fermentedSpiderEye);\n ItemStack var47 = new ItemStack(Item.netherStalkSeeds);\n ItemStack var48 = new ItemStack(Block.glowStone);\n ItemStack var49 = new ItemStack(Item.lightStoneDust);\n ItemStack var50 = new ItemStack(Item.potion, 1, 0);\n ItemStack var51 = new ItemStack(Item.bucketWater);\n DecomposerRecipe.add(new DecomposerRecipeSelect(var39, 0.9F, new DecomposerRecipe[] { new DecomposerRecipe(new Chemical[] { this.molecule(EnumMolecule.polycyanoacrylate) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Hg) }), new DecomposerRecipe(new Chemical[] { this.molecule(EnumMolecule.water, 10) }) }));\n DecomposerRecipe.add(new DecomposerRecipe(var40, new Chemical[] { this.element(EnumElement.Pu, 3) }));\n DecomposerRecipe.add(new DecomposerRecipe(var41, new Chemical[] { this.element(EnumElement.Pu) }));\n DecomposerRecipe.add(new DecomposerRecipe(var42, new Chemical[] { this.element(EnumElement.Hg), this.element(EnumElement.Pu), this.molecule(EnumMolecule.polycyanoacrylate, 3) }));\n DecomposerRecipe.add(new DecomposerRecipe(var43, new Chemical[] { this.element(EnumElement.Yb, 4), this.element(EnumElement.No, 4) }));\n Element var52 = this.element(EnumElement.H, 64);\n Element var53 = this.element(EnumElement.He, 64);\n DecomposerRecipe.add(new DecomposerRecipe(var44, new Chemical[] { this.element(EnumElement.Cn, 16), var52, var52, var52, var53, var53, var53, var21, var21 }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var45, 0.2F, new Chemical[] { this.molecule(EnumMolecule.ttx) }));\n DecomposerRecipe.add(new DecomposerRecipe(var46, new Chemical[] { this.element(EnumElement.Po), this.molecule(EnumMolecule.ethanol) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var47, 0.5F, new Chemical[] { this.molecule(EnumMolecule.coke) }));\n DecomposerRecipe.add(new DecomposerRecipe(var48, new Chemical[] { this.element(EnumElement.P, 4) }));\n DecomposerRecipe.add(new DecomposerRecipe(var49, new Chemical[] { this.element(EnumElement.P) }));\n DecomposerRecipe.add(new DecomposerRecipe(var50, new Chemical[] { this.molecule(EnumMolecule.water, 8) }));\n DecomposerRecipe.add(new DecomposerRecipe(var51, new Chemical[] { this.molecule(EnumMolecule.water, 16) }));\n SynthesisRecipe.add(new SynthesisRecipe(var40, true, 15000, new Chemical[] { this.element(EnumElement.Pu), null, null, this.element(EnumElement.Pu), null, null, this.element(EnumElement.Pu), null, null }));\n SynthesisRecipe.add(new SynthesisRecipe(var42, true, 5000, new Chemical[] { null, this.element(EnumElement.Pu), null, this.molecule(EnumMolecule.polycyanoacrylate), this.element(EnumElement.Hg), this.molecule(EnumMolecule.polycyanoacrylate), null, this.molecule(EnumMolecule.polycyanoacrylate), null }));\n SynthesisRecipe.add(new SynthesisRecipe(var43, true, 15000, new Chemical[] { this.element(EnumElement.Yb), this.element(EnumElement.Yb), this.element(EnumElement.No), null, this.element(EnumElement.Yb, 2), this.element(EnumElement.No, 2), null, this.element(EnumElement.No), null }));\n SynthesisRecipe.add(new SynthesisRecipe(var44, true, 500000, new Chemical[] { var53, var53, var53, var21, this.element(EnumElement.Cn, 16), var53, var52, var52, var52 }));\n SynthesisRecipe.add(new SynthesisRecipe(var45, true, 2000, new Chemical[] { this.element(EnumElement.C), null, null, null, this.molecule(EnumMolecule.ttx), null, null, null, this.element(EnumElement.C) }));\n SynthesisRecipe.add(new SynthesisRecipe(var48, true, 500, new Chemical[] { this.element(EnumElement.P), null, this.element(EnumElement.P), this.element(EnumElement.P), null, this.element(EnumElement.P), null, null, null }));\n ItemStack var54 = new ItemStack(Item.sugar);\n ItemStack var55 = new ItemStack(Item.reed);\n ItemStack var56 = new ItemStack(Block.pumpkin);\n ItemStack var57 = new ItemStack(Block.melon);\n ItemStack var58 = new ItemStack(Item.speckledMelon);\n ItemStack var59 = new ItemStack(Item.melon);\n ItemStack var60 = new ItemStack(Item.carrot);\n ItemStack var61 = new ItemStack(Item.goldenCarrot);\n ItemStack var62 = new ItemStack(Item.dyePowder, 1, 3);\n ItemStack var63 = new ItemStack(Item.potato);\n ItemStack var64 = new ItemStack(Item.bread);\n ItemStack var65 = new ItemStack(Item.appleRed);\n ItemStack var66 = new ItemStack(Item.appleGold, 1, 0);\n ItemStack var68 = new ItemStack(Item.chickenCooked);\n DecomposerRecipe.add(new DecomposerRecipeChance(var54, 0.75F, new Chemical[] { this.molecule(EnumMolecule.sucrose) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var55, 0.65F, new Chemical[] { this.molecule(EnumMolecule.sucrose), this.element(EnumElement.H, 2), this.element(EnumElement.O) }));\n DecomposerRecipe.add(new DecomposerRecipe(var62, new Chemical[] { this.molecule(EnumMolecule.theobromine) }));\n DecomposerRecipe.add(new DecomposerRecipe(var56, new Chemical[] { this.molecule(EnumMolecule.cucurbitacin) }));\n DecomposerRecipe.add(new DecomposerRecipe(var57, new Chemical[] { this.molecule(EnumMolecule.cucurbitacin), this.molecule(EnumMolecule.asparticAcid), this.molecule(EnumMolecule.water, 16) }));\n DecomposerRecipe.add(new DecomposerRecipe(var58, new Chemical[] { this.molecule(EnumMolecule.water, 4), this.molecule(EnumMolecule.whitePigment), this.element(EnumElement.Au, 1) }));\n DecomposerRecipe.add(new DecomposerRecipe(var59, new Chemical[] { this.molecule(EnumMolecule.water) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var60, 0.05F, new Chemical[] { this.molecule(EnumMolecule.ret) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var61, 0.2F, new Chemical[] { this.molecule(EnumMolecule.ret), this.element(EnumElement.Au, 4) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var63, 0.4F, new Chemical[] { this.molecule(EnumMolecule.water, 8), this.element(EnumElement.K, 2), this.molecule(EnumMolecule.cellulose) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var64, 0.1F, new Chemical[] { this.molecule(EnumMolecule.starch), this.molecule(EnumMolecule.sucrose) }));\n DecomposerRecipe.add(new DecomposerRecipe(var65, new Chemical[] { this.molecule(EnumMolecule.malicAcid) }));\n DecomposerRecipe.add(new DecomposerRecipe(var66, new Chemical[] { this.molecule(EnumMolecule.malicAcid), this.element(EnumElement.Au, 8) }));\n DecomposerRecipe.add(new DecomposerRecipe(var66, new Chemical[] { this.molecule(EnumMolecule.malicAcid), this.element(EnumElement.Au, 64), this.element(EnumElement.Np) }));\n DecomposerRecipe.add(new DecomposerRecipe(var68, new Chemical[] { this.element(EnumElement.K), this.element(EnumElement.Na), this.element(EnumElement.C, 2) }));\n SynthesisRecipe.add(new SynthesisRecipe(var54, false, 400, new Chemical[] { this.molecule(EnumMolecule.sucrose) }));\n SynthesisRecipe.add(new SynthesisRecipe(var65, false, 400, new Chemical[] { this.molecule(EnumMolecule.malicAcid), this.molecule(EnumMolecule.water, 2) }));\n SynthesisRecipe.add(new SynthesisRecipe(var62, false, 400, new Chemical[] { this.molecule(EnumMolecule.theobromine) }));\n SynthesisRecipe.add(new SynthesisRecipe(var56, false, 400, new Chemical[] { this.molecule(EnumMolecule.cucurbitacin) }));\n SynthesisRecipe.add(new SynthesisRecipe(var68, true, 5000, new Chemical[] { this.element(EnumElement.K, 16), this.element(EnumElement.Na, 16), this.element(EnumElement.C, 16) }));\n ItemStack var69 = new ItemStack(Item.gunpowder);\n ItemStack var70 = new ItemStack(Block.tnt);\n DecomposerRecipe.add(new DecomposerRecipe(var69, new Chemical[] { this.molecule(EnumMolecule.potassiumNitrate), this.element(EnumElement.S, 2), this.element(EnumElement.C) }));\n DecomposerRecipe.add(new DecomposerRecipe(var70, new Chemical[] { this.molecule(EnumMolecule.tnt) }));\n SynthesisRecipe.add(new SynthesisRecipe(var70, false, 1000, new Chemical[] { this.molecule(EnumMolecule.tnt) }));\n SynthesisRecipe.add(new SynthesisRecipe(var69, true, 600, new Chemical[] { this.molecule(EnumMolecule.potassiumNitrate), this.element(EnumElement.C), null, this.element(EnumElement.S, 2), null, null, null, null, null }));\n ItemStack var71 = new ItemStack(Block.wood, 1, -1);\n ItemStack var72 = new ItemStack(Block.planks, 1, -1);\n ItemStack var140 = new ItemStack(Block.planks, 1, 0);\n ItemStack var141 = new ItemStack(Block.planks, 1, 1);\n ItemStack var142 = new ItemStack(Block.planks, 1, 2);\n ItemStack var143 = new ItemStack(Block.planks, 1, 3);\n ItemStack var73 = new ItemStack(Item.stick);\n ItemStack var74 = new ItemStack(Block.wood, 1, 0);\n ItemStack var75 = new ItemStack(Block.wood, 1, 1);\n ItemStack var76 = new ItemStack(Block.wood, 1, 2);\n ItemStack var77 = new ItemStack(Block.wood, 1, 3);\n ItemStack var78 = new ItemStack(Item.doorWood);\n ItemStack var79 = new ItemStack(Block.pressurePlatePlanks, 1, -1);\n DecomposerRecipe.add(new DecomposerRecipeChance(var71, 0.5F, new Chemical[] { this.molecule(EnumMolecule.cellulose, 8) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var74, 0.5F, new Chemical[] { this.molecule(EnumMolecule.cellulose, 8) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var75, 0.5F, new Chemical[] { this.molecule(EnumMolecule.cellulose, 8) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var76, 0.5F, new Chemical[] { this.molecule(EnumMolecule.cellulose, 8) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var77, 0.5F, new Chemical[] { this.molecule(EnumMolecule.cellulose, 8) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var72, 0.4F, new Chemical[] { this.molecule(EnumMolecule.cellulose, 2) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var140, 0.4F, new Chemical[] { this.molecule(EnumMolecule.cellulose, 2) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var141, 0.4F, new Chemical[] { this.molecule(EnumMolecule.cellulose, 2) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var142, 0.4F, new Chemical[] { this.molecule(EnumMolecule.cellulose, 2) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var143, 0.4F, new Chemical[] { this.molecule(EnumMolecule.cellulose, 2) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var73, 0.3F, new Chemical[] { this.molecule(EnumMolecule.cellulose) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var78, 0.4F, new Chemical[] { this.molecule(EnumMolecule.cellulose, 12) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var79, 0.4F, new Chemical[] { this.molecule(EnumMolecule.cellulose, 4) }));\n Molecule var81 = this.molecule(EnumMolecule.cellulose, 1);\n SynthesisRecipe.add(new SynthesisRecipe(var74, true, 100, new Chemical[] { var81, var81, var81, null, var81, null, null, null, null }));\n SynthesisRecipe.add(new SynthesisRecipe(var75, true, 100, new Chemical[] { null, null, null, null, var81, null, var81, var81, var81 }));\n SynthesisRecipe.add(new SynthesisRecipe(var76, true, 100, new Chemical[] { var81, null, var81, null, null, null, var81, null, var81 }));\n SynthesisRecipe.add(new SynthesisRecipe(var77, true, 100, new Chemical[] { var81, null, null, var81, var81, null, var81, null, null }));\n ItemStack var82 = new ItemStack(Item.dyePowder, 1, 0);\n ItemStack var83 = new ItemStack(Item.dyePowder, 1, 1);\n ItemStack var84 = new ItemStack(Item.dyePowder, 1, 2);\n ItemStack var85 = new ItemStack(Item.dyePowder, 1, 4);\n ItemStack var86 = new ItemStack(Item.dyePowder, 1, 5);\n ItemStack var87 = new ItemStack(Item.dyePowder, 1, 6);\n ItemStack var88 = new ItemStack(Item.dyePowder, 1, 7);\n ItemStack var89 = new ItemStack(Item.dyePowder, 1, 8);\n ItemStack var90 = new ItemStack(Item.dyePowder, 1, 9);\n ItemStack var91 = new ItemStack(Item.dyePowder, 1, 10);\n ItemStack var92 = new ItemStack(Item.dyePowder, 1, 11);\n ItemStack var93 = new ItemStack(Item.dyePowder, 1, 12);\n ItemStack var94 = new ItemStack(Item.dyePowder, 1, 13);\n ItemStack var95 = new ItemStack(Item.dyePowder, 1, 14);\n ItemStack var96 = new ItemStack(Item.dyePowder, 1, 15);\n DecomposerRecipe.add(new DecomposerRecipe(var82, new Chemical[] { this.molecule(EnumMolecule.blackPigment) }));\n DecomposerRecipe.add(new DecomposerRecipe(var83, new Chemical[] { this.molecule(EnumMolecule.redPigment) }));\n DecomposerRecipe.add(new DecomposerRecipe(var84, new Chemical[] { this.molecule(EnumMolecule.greenPigment) }));\n DecomposerRecipe.add(new DecomposerRecipe(var85, new Chemical[] { this.molecule(EnumMolecule.lazurite) }));\n DecomposerRecipe.add(new DecomposerRecipe(var86, new Chemical[] { this.molecule(EnumMolecule.purplePigment) }));\n DecomposerRecipe.add(new DecomposerRecipe(var87, new Chemical[] { this.molecule(EnumMolecule.lightbluePigment), this.molecule(EnumMolecule.whitePigment) }));\n DecomposerRecipe.add(new DecomposerRecipe(var88, new Chemical[] { this.molecule(EnumMolecule.whitePigment), this.molecule(EnumMolecule.blackPigment) }));\n DecomposerRecipe.add(new DecomposerRecipe(var89, new Chemical[] { this.molecule(EnumMolecule.whitePigment), this.molecule(EnumMolecule.blackPigment, 2) }));\n DecomposerRecipe.add(new DecomposerRecipe(var90, new Chemical[] { this.molecule(EnumMolecule.redPigment), this.molecule(EnumMolecule.whitePigment) }));\n DecomposerRecipe.add(new DecomposerRecipe(var91, new Chemical[] { this.molecule(EnumMolecule.limePigment) }));\n DecomposerRecipe.add(new DecomposerRecipe(var92, new Chemical[] { this.molecule(EnumMolecule.yellowPigment) }));\n DecomposerRecipe.add(new DecomposerRecipe(var93, new Chemical[] { this.molecule(EnumMolecule.lightbluePigment) }));\n DecomposerRecipe.add(new DecomposerRecipe(var94, new Chemical[] { this.molecule(EnumMolecule.lightbluePigment), this.molecule(EnumMolecule.redPigment) }));\n DecomposerRecipe.add(new DecomposerRecipe(var95, new Chemical[] { this.molecule(EnumMolecule.orangePigment) }));\n DecomposerRecipe.add(new DecomposerRecipe(var96, new Chemical[] { this.molecule(EnumMolecule.whitePigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var82, false, 50, new Chemical[] { this.molecule(EnumMolecule.blackPigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var83, false, 50, new Chemical[] { this.molecule(EnumMolecule.redPigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var84, false, 50, new Chemical[] { this.molecule(EnumMolecule.greenPigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var85, false, 50, new Chemical[] { this.molecule(EnumMolecule.lazurite) }));\n SynthesisRecipe.add(new SynthesisRecipe(var86, false, 50, new Chemical[] { this.molecule(EnumMolecule.purplePigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var87, false, 50, new Chemical[] { this.molecule(EnumMolecule.lightbluePigment), this.molecule(EnumMolecule.whitePigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var88, false, 50, new Chemical[] { this.molecule(EnumMolecule.whitePigment), this.molecule(EnumMolecule.blackPigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var89, false, 50, new Chemical[] { this.molecule(EnumMolecule.whitePigment), this.molecule(EnumMolecule.blackPigment, 2) }));\n SynthesisRecipe.add(new SynthesisRecipe(var90, false, 50, new Chemical[] { this.molecule(EnumMolecule.redPigment), this.molecule(EnumMolecule.whitePigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var91, false, 50, new Chemical[] { this.molecule(EnumMolecule.limePigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var92, false, 50, new Chemical[] { this.molecule(EnumMolecule.yellowPigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var93, false, 50, new Chemical[] { this.molecule(EnumMolecule.lightbluePigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var94, false, 50, new Chemical[] { this.molecule(EnumMolecule.lightbluePigment), this.molecule(EnumMolecule.redPigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var95, false, 50, new Chemical[] { this.molecule(EnumMolecule.orangePigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var96, false, 50, new Chemical[] { this.molecule(EnumMolecule.whitePigment) }));\n ItemStack var97 = new ItemStack(Block.cloth, 1, 0);\n ItemStack var98 = new ItemStack(Block.cloth, 1, 1);\n ItemStack var99 = new ItemStack(Block.cloth, 1, 2);\n ItemStack var100 = new ItemStack(Block.cloth, 1, 3);\n ItemStack var101 = new ItemStack(Block.cloth, 1, 4);\n ItemStack var102 = new ItemStack(Block.cloth, 1, 5);\n ItemStack var103 = new ItemStack(Block.cloth, 1, 6);\n ItemStack var104 = new ItemStack(Block.cloth, 1, 7);\n ItemStack var105 = new ItemStack(Block.cloth, 1, 8);\n ItemStack var106 = new ItemStack(Block.cloth, 1, 9);\n ItemStack var107 = new ItemStack(Block.cloth, 1, 10);\n ItemStack var108 = new ItemStack(Block.cloth, 1, 11);\n ItemStack var109 = new ItemStack(Block.cloth, 1, 12);\n ItemStack var110 = new ItemStack(Block.cloth, 1, 13);\n ItemStack var111 = new ItemStack(Block.cloth, 1, 14);\n ItemStack var112 = new ItemStack(Block.cloth, 1, 15);\n DecomposerRecipe.add(new DecomposerRecipeChance(var111, 0.6F, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.redPigment) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var110, 0.6F, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.greenPigment) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var108, 0.6F, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.lazurite) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var107, 0.6F, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.purplePigment) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var106, 0.6F, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.lightbluePigment), this.molecule(EnumMolecule.whitePigment) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var105, 0.6F, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.whitePigment), this.molecule(EnumMolecule.blackPigment) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var104, 0.6F, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.whitePigment), this.molecule(EnumMolecule.blackPigment, 2) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var103, 0.6F, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.redPigment), this.molecule(EnumMolecule.whitePigment) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var102, 0.6F, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.limePigment) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var101, 0.6F, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.yellowPigment) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var100, 0.6F, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.lightbluePigment) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var99, 0.6F, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.lightbluePigment), this.molecule(EnumMolecule.redPigment) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var98, 0.6F, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.orangePigment) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var97, 0.6F, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.whitePigment) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var112, 0.6F, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.blackPigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var111, false, 50, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.redPigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var110, false, 50, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.greenPigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var108, false, 50, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.lazurite) }));\n SynthesisRecipe.add(new SynthesisRecipe(var107, false, 50, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.purplePigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var106, false, 50, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.lightbluePigment), this.molecule(EnumMolecule.whitePigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var105, false, 50, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.whitePigment), this.molecule(EnumMolecule.blackPigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var104, false, 50, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.whitePigment), this.molecule(EnumMolecule.blackPigment, 2) }));\n SynthesisRecipe.add(new SynthesisRecipe(var103, false, 50, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.redPigment), this.molecule(EnumMolecule.whitePigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var102, false, 50, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.limePigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var101, false, 50, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.yellowPigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var100, false, 50, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.lightbluePigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var99, false, 50, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.lightbluePigment), this.molecule(EnumMolecule.redPigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var98, false, 50, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.orangePigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var97, false, 50, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.whitePigment) }));\n SynthesisRecipe.add(new SynthesisRecipe(var112, false, 50, new Chemical[] { this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.blackPigment) }));\n Molecule var113 = this.molecule(EnumMolecule.polyvinylChloride);\n ItemStack var114 = new ItemStack(Item.record13);\n ItemStack var115 = new ItemStack(Item.recordCat);\n ItemStack var116 = new ItemStack(Item.recordFar);\n ItemStack var117 = new ItemStack(Item.recordMall);\n ItemStack var118 = new ItemStack(Item.recordMellohi);\n ItemStack var119 = new ItemStack(Item.recordStal);\n ItemStack var120 = new ItemStack(Item.recordStrad);\n ItemStack var121 = new ItemStack(Item.recordWard);\n ItemStack var122 = new ItemStack(Item.recordChirp);\n DecomposerRecipe.add(new DecomposerRecipe(var114, new Chemical[] { var113 }));\n DecomposerRecipe.add(new DecomposerRecipe(var115, new Chemical[] { var113 }));\n DecomposerRecipe.add(new DecomposerRecipe(var116, new Chemical[] { var113 }));\n DecomposerRecipe.add(new DecomposerRecipe(var117, new Chemical[] { var113 }));\n DecomposerRecipe.add(new DecomposerRecipe(var118, new Chemical[] { var113 }));\n DecomposerRecipe.add(new DecomposerRecipe(var119, new Chemical[] { var113 }));\n DecomposerRecipe.add(new DecomposerRecipe(var120, new Chemical[] { var113 }));\n DecomposerRecipe.add(new DecomposerRecipe(var121, new Chemical[] { var113 }));\n DecomposerRecipe.add(new DecomposerRecipe(var122, new Chemical[] { var113 }));\n SynthesisRecipe.add(new SynthesisRecipe(var114, false, 1000, new Chemical[] { var113 }));\n SynthesisRecipe.add(new SynthesisRecipe(var115, false, 1000, new Chemical[] { null, var113 }));\n SynthesisRecipe.add(new SynthesisRecipe(var116, false, 1000, new Chemical[] { null, null, var113 }));\n SynthesisRecipe.add(new SynthesisRecipe(var117, false, 1000, new Chemical[] { null, null, null, var113 }));\n SynthesisRecipe.add(new SynthesisRecipe(var118, false, 1000, new Chemical[] { null, null, null, null, var113 }));\n SynthesisRecipe.add(new SynthesisRecipe(var119, false, 1000, new Chemical[] { null, null, null, null, null, var113 }));\n SynthesisRecipe.add(new SynthesisRecipe(var120, false, 1000, new Chemical[] { null, null, null, null, null, null, var113 }));\n SynthesisRecipe.add(new SynthesisRecipe(var121, false, 1000, new Chemical[] { null, null, null, null, null, null, null, var113 }));\n SynthesisRecipe.add(new SynthesisRecipe(var122, false, 1000, new Chemical[] { null, null, null, null, null, null, null, null, var113 }));\n ItemStack var123 = new ItemStack(Block.mushroomBrown);\n ItemStack var124 = new ItemStack(Block.mushroomRed);\n ItemStack var125 = new ItemStack(Block.cactus);\n DecomposerRecipe.add(new DecomposerRecipe(var123, new Chemical[] { this.molecule(EnumMolecule.psilocybin), this.molecule(EnumMolecule.water, 2) }));\n DecomposerRecipe.add(new DecomposerRecipe(var124, new Chemical[] { this.molecule(EnumMolecule.pantherine), this.molecule(EnumMolecule.water, 2) }));\n DecomposerRecipe.add(new DecomposerRecipe(var125, new Chemical[] { this.molecule(EnumMolecule.mescaline), this.molecule(EnumMolecule.water, 20) }));\n SynthesisRecipe.add(new SynthesisRecipe(var125, true, 200, new Chemical[] { this.molecule(EnumMolecule.water, 5), null, this.molecule(EnumMolecule.water, 5), null, this.molecule(EnumMolecule.mescaline), null, this.molecule(EnumMolecule.water, 5), null, this.molecule(EnumMolecule.water, 5) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var13, 0.8F, new Chemical[] { this.molecule(EnumMolecule.iron3oxide, 6), this.molecule(EnumMolecule.strontiumNitrate, 6) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var18, 0.42F, new Chemical[] { this.molecule(EnumMolecule.iron3oxide), this.molecule(EnumMolecule.strontiumNitrate) }));\n SynthesisRecipe.add(new SynthesisRecipe(var18, true, 100, new Chemical[] { null, null, this.molecule(EnumMolecule.iron3oxide), null, this.molecule(EnumMolecule.strontiumNitrate), null, null, null, null }));\n ItemStack var126 = new ItemStack(Item.enderPearl);\n DecomposerRecipe.add(new DecomposerRecipe(var126, new Chemical[] { this.element(EnumElement.Es), this.molecule(EnumMolecule.calciumCarbonate, 8) }));\n SynthesisRecipe.add(new SynthesisRecipe(var126, true, 5000, new Chemical[] { this.molecule(EnumMolecule.calciumCarbonate), this.molecule(EnumMolecule.calciumCarbonate), this.molecule(EnumMolecule.calciumCarbonate), this.molecule(EnumMolecule.calciumCarbonate), this.element(EnumElement.Es), this.molecule(EnumMolecule.calciumCarbonate), this.molecule(EnumMolecule.calciumCarbonate), this.molecule(EnumMolecule.calciumCarbonate), this.molecule(EnumMolecule.calciumCarbonate) }));\n ItemStack var127 = new ItemStack(Block.obsidian);\n DecomposerRecipe.add(new DecomposerRecipe(var127, new Chemical[] { this.molecule(EnumMolecule.siliconDioxide, 16), this.molecule(EnumMolecule.magnesiumOxide, 8) }));\n SynthesisRecipe.add(new SynthesisRecipe(var127, true, 1000, new Chemical[] { this.molecule(EnumMolecule.siliconDioxide, 4), this.molecule(EnumMolecule.siliconDioxide, 4), this.molecule(EnumMolecule.siliconDioxide, 4), this.molecule(EnumMolecule.magnesiumOxide, 2), null, this.molecule(EnumMolecule.siliconDioxide, 4), this.molecule(EnumMolecule.magnesiumOxide, 2), this.molecule(EnumMolecule.magnesiumOxide, 2), this.molecule(EnumMolecule.magnesiumOxide, 2) }));\n ItemStack var128 = new ItemStack(Item.bone);\n ItemStack var129 = new ItemStack(Item.silk);\n DecomposerRecipe.add(new DecomposerRecipe(var128, new Chemical[] { this.molecule(EnumMolecule.hydroxylapatite) }));\n DecomposerRecipe.add(new DecomposerRecipeChance(var129, 0.45F, new Chemical[] { this.molecule(EnumMolecule.serine), this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.alinine) }));\n SynthesisRecipe.add(new SynthesisRecipe(var128, false, 100, new Chemical[] { this.molecule(EnumMolecule.hydroxylapatite) }));\n SynthesisRecipe.add(new SynthesisRecipe(var129, true, 150, new Chemical[] { this.molecule(EnumMolecule.serine), this.molecule(EnumMolecule.glycine), this.molecule(EnumMolecule.alinine) }));\n ItemStack var132 = new ItemStack(Block.cobblestone);\n DecomposerRecipe.add(new DecomposerRecipeSelect(var1, 0.2F, new DecomposerRecipe[] { new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Si), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Fe), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Mg), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Ti), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Pb), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Zn), this.element(EnumElement.O) }) }));\n DecomposerRecipe.add(new DecomposerRecipeSelect(var132, 0.1F, new DecomposerRecipe[] { new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Si), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Fe), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Mg), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Ti), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Pb), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Na), this.element(EnumElement.Cl) }) }));\n DecomposerRecipe.add(new DecomposerRecipeSelect(var3, 0.07F, new DecomposerRecipe[] { new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Si), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Fe), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Mg), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Ti), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Pb), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Zn), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Ga), this.element(EnumElement.As) }) }));\n SynthesisRecipe.add(new SynthesisRecipe(new ItemStack(Block.cobblestone, 8), true, 50, new Chemical[] { this.element(EnumElement.Si), null, null, null, this.element(EnumElement.O, 2), null }));\n SynthesisRecipe.add(new SynthesisRecipe(new ItemStack(Block.stone, 7), true, 50, new Chemical[] { this.element(EnumElement.Si), null, null, this.element(EnumElement.O, 2), null, null }));\n SynthesisRecipe.add(new SynthesisRecipe(new ItemStack(Block.dirt, 16), true, 50, new Chemical[] { null, null, null, null, this.element(EnumElement.O, 2), this.element(EnumElement.Si) }));\n ItemStack var133 = new ItemStack(Block.netherrack);\n ItemStack var134 = new ItemStack(Block.slowSand);\n ItemStack var135 = new ItemStack(Block.whiteStone);\n DecomposerRecipe.add(new DecomposerRecipeSelect(var133, 0.1F, new DecomposerRecipe[] { new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Si, 2), this.element(EnumElement.O), this.element(EnumElement.Fe) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Si, 2), this.element(EnumElement.Ni), this.element(EnumElement.Tc) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Si, 3), this.element(EnumElement.Ti), this.element(EnumElement.Fe) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Si, 1), this.element(EnumElement.W, 4), this.element(EnumElement.Cr, 2) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Si, 10), this.element(EnumElement.W, 1), this.element(EnumElement.Zn, 8), this.element(EnumElement.Be, 4) }) }));\n DecomposerRecipe.add(new DecomposerRecipeSelect(var134, 0.2F, new DecomposerRecipe[] { new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Pb, 3), this.element(EnumElement.Be, 1), this.element(EnumElement.Si, 2), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Pb, 1), this.element(EnumElement.Si, 5), this.element(EnumElement.O, 2) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Si, 2), this.element(EnumElement.O) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Si, 6), this.element(EnumElement.O, 2) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Es, 1), this.element(EnumElement.O, 2) }) }));\n DecomposerRecipe.add(new DecomposerRecipeSelect(var135, 0.8F, new DecomposerRecipe[] { new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Si, 2), this.element(EnumElement.O), this.element(EnumElement.H, 4), this.element(EnumElement.Li) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Es) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Pu) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Fr) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Nd) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Si, 2), this.element(EnumElement.O, 4) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.H, 4) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Be, 8) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Li, 2) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Zr) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Na) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Rb) }), new DecomposerRecipe(new Chemical[] { this.element(EnumElement.Ga), this.element(EnumElement.As) }) }));\n ItemStack var136 = new ItemStack(Block.plantYellow);\n DecomposerRecipe.add(new DecomposerRecipeChance(var136, 0.3F, new Chemical[] { new Molecule(EnumMolecule.shikimicAcid, 2) }));\n ItemStack var137 = new ItemStack(Item.rottenFlesh);\n DecomposerRecipe.add(new DecomposerRecipeChance(var137, 0.05F, new Chemical[] { new Molecule(EnumMolecule.nod, 1) }));\n ItemStack var139 = new ItemStack(Block.tallGrass, 1, 1);\n DecomposerRecipe.add(new DecomposerRecipeChance(var139, 0.1F, new Chemical[] { new Molecule(EnumMolecule.afroman, 2) }));\n this.addDecomposerRecipesFromMolecules();\n this.addSynthesisRecipesFromMolecules();\n this.addUnusedSynthesisRecipes();\n this.registerPoisonRecipes(EnumMolecule.poison);\n this.registerPoisonRecipes(EnumMolecule.sucrose);\n this.registerPoisonRecipes(EnumMolecule.psilocybin);\n this.registerPoisonRecipes(EnumMolecule.methamphetamine);\n this.registerPoisonRecipes(EnumMolecule.amphetamine);\n this.registerPoisonRecipes(EnumMolecule.pantherine);\n this.registerPoisonRecipes(EnumMolecule.ethanol);\n this.registerPoisonRecipes(EnumMolecule.penicillin);\n this.registerPoisonRecipes(EnumMolecule.testosterone);\n this.registerPoisonRecipes(EnumMolecule.xanax);\n this.registerPoisonRecipes(EnumMolecule.mescaline);\n this.registerPoisonRecipes(EnumMolecule.asprin);\n this.registerPoisonRecipes(EnumMolecule.sulfuricAcid);\n this.registerPoisonRecipes(EnumMolecule.ttx);\n this.registerPoisonRecipes(EnumMolecule.pal2);\n this.registerPoisonRecipes(EnumMolecule.nod);\n this.registerPoisonRecipes(EnumMolecule.afroman);\n}\n"
|
"public void run() {\n while (!fExecutor.isShutdown()) {\n final TmfExperiment<?> experiment = TmfExperiment.getCurrentExperiment();\n if (experiment != null) {\n final TmfEventRequest request = new TmfEventRequest<TmfEvent>(TmfEvent.class, TmfTimeRange.ETERNITY, 0, ExecutionType.FOREGROUND) {\n public void handleCompleted() {\n updateJniTrace();\n }\n };\n experiment.sendRequest(request);\n try {\n request.waitForCompletion();\n } catch (final InterruptedException e) {\n }\n } else\n updateJniTrace();\n try {\n Thread.sleep(LTTNG_STREAMING_INTERVAL);\n } catch (final InterruptedException e) {\n }\n }\n}\n"
|
"public Long startCluster(String clusterName) throws Exception {\n logger.info(\"String_Node_Str\" + clusterName);\n ClusterEntity cluster = clusterEntityMgr.findByName(clusterName);\n if (cluster == null) {\n logger.error(\"String_Node_Str\" + clusterName + \"String_Node_Str\");\n throw BddException.NOT_FOUND(\"String_Node_Str\", clusterName);\n }\n ValidationUtils.validateVersion(clusterEntityMgr, clusterName);\n if (cluster.getStatus().isActiveServiceStatus()) {\n logger.error(\"String_Node_Str\" + clusterName + \"String_Node_Str\");\n throw ClusterManagerException.ALREADY_STARTED_ERROR(clusterName);\n }\n if (!ClusterStatus.STOPPED.equals(cluster.getStatus()) && !ClusterStatus.ERROR.equals(cluster.getStatus())) {\n logger.error(\"String_Node_Str\" + clusterName + \"String_Node_Str\" + cluster.getStatus() + \"String_Node_Str\");\n throw ClusterManagerException.START_NOT_ALLOWED_ERROR(clusterName, \"String_Node_Str\");\n }\n cluster.setVhmTargetNum(-1);\n clusterEntityMgr.update(cluster);\n clusterEntityMgr.cleanupActionError(clusterName);\n Map<String, JobParameter> param = new TreeMap<String, JobParameter>();\n param.put(JobConstants.CLUSTER_NAME_JOB_PARAM, new JobParameter(clusterName));\n param.put(JobConstants.TIMESTAMP_JOB_PARAM, new JobParameter(new Date()));\n param.put(JobConstants.CLUSTER_SUCCESS_STATUS_JOB_PARAM, new JobParameter(ClusterStatus.RUNNING.name()));\n param.put(JobConstants.CLUSTER_FAILURE_STATUS_JOB_PARAM, new JobParameter(ClusterStatus.ERROR.name()));\n JobParameters jobParameters = new JobParameters(param);\n clusterEntityMgr.updateClusterStatus(clusterName, ClusterStatus.STARTING);\n try {\n return jobManager.runJob(JobConstants.START_CLUSTER_JOB_NAME, jobParameters);\n } catch (Exception e) {\n logger.error(\"String_Node_Str\" + clusterName, e);\n clusterEntityMgr.updateClusterStatus(clusterName, ClusterStatus.ERROR);\n throw e;\n }\n}\n"
|
"public String generateInitializeCode() throws IllegalActionException {\n CodeStream codeStream = _templateParser.getCodeStream();\n codeStream.clear();\n LinkedList args = new LinkedList();\n Parameter stopTime = ((ptolemy.actor.lib.DiscreteClock) getComponent()).stopTime;\n double doubleStopTime = ((DoubleToken) stopTime.getToken()).doubleValue();\n ptolemy.actor.lib.DiscreteClock actor = (ptolemy.actor.lib.DiscreteClock) getComponent();\n ptolemy.actor.CompositeActor container = (ptolemy.actor.CompositeActor) actor.getContainer();\n ptolemy.actor.Director director = container.getDirector();\n double modelStopTime = director.getModelStopTime().getDoubleValue();\n if (doubleStopTime > modelStopTime)\n doubleStopTime = modelStopTime;\n Parameter period = ((ptolemy.actor.lib.DiscreteClock) getComponent()).period;\n double doublePeriod = ((DoubleToken) period.getToken()).doubleValue();\n args.add(Double.toString(doubleStopTime));\n args.add(Double.toString(doublePeriod));\n Parameter offsetPar = ((ptolemy.actor.lib.DiscreteClock) getComponent()).offsets;\n Token offsetToken = offsetPar.getToken();\n Token[] offsets;\n double[] offsetsDouble = null;\n int size = 0;\n if (offsetToken instanceof ArrayToken) {\n offsets = ((ArrayToken) offsetToken).arrayValue();\n size = offsets.length;\n args.add(Integer.toString(size));\n int i = 0;\n if (size > 0) {\n if (offsets[0] instanceof DoubleToken) {\n offsetsDouble = new double[size];\n } else {\n throw new IllegalActionException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n }\n for (Token t : offsets) {\n if (t instanceof DoubleToken) {\n offsetsDouble[i++] = ((DoubleToken) t).doubleValue();\n } else {\n throw new IllegalActionException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n }\n } else {\n throw new IllegalActionException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n StringBuffer offsetsString = new StringBuffer();\n int i = 0;\n for (double offset : offsetsDouble) offsetsString += \"String_Node_Str\" + i++ + \"String_Node_Str\" + Double.toString(offset) + \"String_Node_Str\";\n args.add(offsetsString);\n Parameter valuesPar = ((ptolemy.actor.lib.DiscreteClock) getComponent()).values;\n Token valuesToken = valuesPar.getToken();\n Token[] values;\n double[] valuesDouble = null;\n int[] valuesInt = null;\n boolean[] valuesBool = null;\n size = 0;\n if (valuesToken instanceof ArrayToken) {\n values = ((ArrayToken) valuesToken).arrayValue();\n size = values.length;\n args.add(Integer.toString(size));\n i = 0;\n if (size > 0) {\n if (values[0] instanceof DoubleToken) {\n valuesDouble = new double[size];\n } else if (values[0] instanceof IntToken) {\n valuesInt = new int[size];\n } else if (values[0] instanceof BooleanToken) {\n valuesBool = new boolean[size];\n } else {\n throw new IllegalActionException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n }\n for (Token t : values) {\n if (t instanceof DoubleToken) {\n valuesDouble[i++] = ((DoubleToken) t).doubleValue();\n } else if (t instanceof IntToken) {\n valuesInt[i++] = ((IntToken) t).intValue();\n } else if (t instanceof BooleanToken) {\n valuesBool[i++] = ((BooleanToken) t).booleanValue();\n } else {\n throw new IllegalActionException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n }\n } else {\n throw new IllegalActionException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n String valuesString = \"String_Node_Str\";\n i = 0;\n if (valuesDouble != null)\n for (double value : valuesDouble) valuesString += \"String_Node_Str\" + i++ + \"String_Node_Str\" + Double.toString(value) + \"String_Node_Str\";\n else if (valuesInt != null)\n for (int value : valuesInt) valuesString += \"String_Node_Str\" + i++ + \"String_Node_Str\" + Integer.toString(value) + \"String_Node_Str\";\n else if (valuesBool != null)\n for (boolean value : valuesBool) valuesString += \"String_Node_Str\" + i++ + \"String_Node_Str\" + Boolean.toString(value) + \"String_Node_Str\";\n args.add(valuesString);\n codeStream.appendCodeBlock(\"String_Node_Str\", args);\n if (((ptolemy.actor.lib.DiscreteClock) getComponent()).start.isOutsideConnected()) {\n codeStream.appendCodeBlock(\"String_Node_Str\");\n }\n return processCode(codeStream.toString());\n}\n"
|
"public void deleteFromTableTest3() throws InterruptedException {\n log.info(\"String_Node_Str\");\n SiddhiManager siddhiManager = new SiddhiManager();\n String streams = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n String query = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(streams + query);\n try {\n InputHandler stockStream = executionPlanRuntime.getInputHandler(\"String_Node_Str\");\n InputHandler deleteStockStream = executionPlanRuntime.getInputHandler(\"String_Node_Str\");\n executionPlanRuntime.start();\n stockStream.send(new Object[] { \"String_Node_Str\", 55.6f, 100l });\n stockStream.send(new Object[] { \"String_Node_Str\", 75.6f, 100l });\n stockStream.send(new Object[] { \"String_Node_Str\", 57.6f, 100l });\n deleteStockStream.send(new Object[] { \"String_Node_Str\", 57.6f, 100l });\n Thread.sleep(RESULT_WAIT);\n } finally {\n executionPlanRuntime.shutdown();\n }\n}\n"
|
"public void readXML(Element textModelElement) {\n Element showNodeE = (Element) textModelElement.getElementsByTagName(\"String_Node_Str\").item(0);\n showNodeLabels = Boolean.parseBoolean(showNodeE.getAttribute(\"String_Node_Str\"));\n Element showEdgeE = (Element) textModelElement.getElementsByTagName(\"String_Node_Str\").item(0);\n showEdgeLabels = Boolean.parseBoolean(showEdgeE.getAttribute(\"String_Node_Str\"));\n Element selectedOnlyE = (Element) textModelElement.getElementsByTagName(\"String_Node_Str\").item(0);\n selectedOnly = Boolean.parseBoolean(selectedOnlyE.getAttribute(\"String_Node_Str\"));\n Element nodeFontE = (Element) textModelElement.getElementsByTagName(\"String_Node_Str\").item(0);\n String nodeFontName = nodeFontE.getAttribute(\"String_Node_Str\");\n int nodeFontSize = Integer.parseInt(nodeFontE.getAttribute(\"String_Node_Str\"));\n int nodeFontStyle = Integer.parseInt(nodeFontE.getAttribute(\"String_Node_Str\"));\n nodeFont = new Font(nodeFontName, nodeFontStyle, nodeFontSize);\n Element edgeFontE = (Element) textModelElement.getElementsByTagName(\"String_Node_Str\").item(0);\n String edgeFontName = edgeFontE.getAttribute(\"String_Node_Str\");\n int edgeFontSize = Integer.parseInt(edgeFontE.getAttribute(\"String_Node_Str\"));\n int edgeFontStyle = Integer.parseInt(edgeFontE.getAttribute(\"String_Node_Str\"));\n edgeFont = new Font(edgeFontName, edgeFontStyle, edgeFontSize);\n Element nodeColorE = (Element) textModelElement.getElementsByTagName(\"String_Node_Str\").item(0);\n nodeColor = ColorUtils.decode(nodeColorE.getAttribute(\"String_Node_Str\")).getRGBComponents(null);\n Element edgeColorE = (Element) textModelElement.getElementsByTagName(\"String_Node_Str\").item(0);\n edgeColor = ColorUtils.decode(edgeColorE.getAttribute(\"String_Node_Str\")).getRGBComponents(null);\n Element nodeSizeFactorE = (Element) textModelElement.getElementsByTagName(\"String_Node_Str\").item(0);\n nodeSizeFactor = Float.parseFloat(nodeSizeFactorE.getTextContent());\n Element edgeSizeFactorE = (Element) textModelElement.getElementsByTagName(\"String_Node_Str\").item(0);\n edgeSizeFactor = Float.parseFloat(edgeSizeFactorE.getTextContent());\n Element colorModeE = (Element) textModelElement.getElementsByTagName(\"String_Node_Str\").item(0);\n String colorModeClass = colorModeE.getAttribute(\"String_Node_Str\");\n if (colorModeClass.equals(\"String_Node_Str\")) {\n colorMode = VizController.getInstance().getTextManager().getColorModes()[0];\n } else if (colorModeClass.equals(\"String_Node_Str\")) {\n colorMode = VizController.getInstance().getTextManager().getColorModes()[1];\n }\n Element sizeModeE = (Element) textModelElement.getElementsByTagName(\"String_Node_Str\").item(0);\n String sizeModeClass = sizeModeE.getAttribute(\"String_Node_Str\");\n if (sizeModeClass.equals(\"String_Node_Str\")) {\n sizeMode = VizController.getInstance().getTextManager().getSizeModes()[0];\n } else if (sizeModeClass.equals(\"String_Node_Str\")) {\n sizeMode = VizController.getInstance().getTextManager().getSizeModes()[2];\n } else if (colorModeClass.equals(\"String_Node_Str\")) {\n sizeMode = VizController.getInstance().getTextManager().getSizeModes()[1];\n }\n AttributeController attributeController = Lookup.getDefault().lookup(AttributeController.class);\n if (attributeController != null && attributeController.getModel() != null) {\n AttributeModel attributeModel = attributeController.getModel();\n List<AttributeColumn> nodeCols = new ArrayList<AttributeColumn>();\n List<AttributeColumn> edgeCols = new ArrayList<AttributeColumn>();\n Element nodeColumnsE = (Element) textModelElement.getElementsByTagName(\"String_Node_Str\").item(0);\n NodeList nodeColumnList = nodeColumnsE.getElementsByTagName(\"String_Node_Str\");\n for (int i = 0; i < nodeColumnList.getLength(); i++) {\n if (nodeColumnList.item(i).getNodeType() == Node.ELEMENT_NODE) {\n Element nodeColumnE = (Element) nodeColumnList.item(i);\n String id = nodeColumnE.getAttribute(\"String_Node_Str\");\n AttributeColumn col = attributeModel.getNodeTable().getColumn(id);\n if (col != null) {\n nodeCols.add(col);\n }\n }\n }\n Element edgeColumnsE = (Element) textModelElement.getElementsByTagName(\"String_Node_Str\").item(0);\n NodeList edgeColumnList = edgeColumnsE.getElementsByTagName(\"String_Node_Str\");\n for (int i = 0; i < edgeColumnList.getLength(); i++) {\n if (edgeColumnList.item(i).getNodeType() == Node.ELEMENT_NODE) {\n Element edgeColumnE = (Element) edgeColumnList.item(i);\n String id = edgeColumnE.getAttribute(\"String_Node_Str\");\n AttributeColumn col = attributeModel.getEdgeTable().getColumn(id);\n if (col != null) {\n edgeCols.add(col);\n }\n }\n }\n nodeTextColumns = nodeCols.toArray(new AttributeColumn[0]);\n edgeTextColumns = edgeCols.toArray(new AttributeColumn[0]);\n }\n}\n"
|
"public TCTokenResponse handleActivate(TCTokenRequest request) {\n final DynamicContext dynCtx = DynamicContext.getInstance(TR03112Keys.INSTANCE_KEY);\n boolean performChecks = TCTokenHacks.isPerformTR03112Checks(request);\n if (!performChecks) {\n logger.warn(\"String_Node_Str\");\n }\n boolean isObjectActivation = request.getTCTokenURL() == null;\n if (isObjectActivation) {\n logger.warn(\"String_Node_Str\");\n }\n dynCtx.put(TR03112Keys.TCTOKEN_CHECKS, performChecks);\n dynCtx.put(TR03112Keys.OBJECT_ACTIVATION, isObjectActivation);\n dynCtx.put(TR03112Keys.TCTOKEN_SERVER_CERTIFICATES, request.getCertificates());\n dynCtx.put(TR03112Keys.TCTOKEN_URL, request.getTCTokenURL());\n ConnectionHandleType connectionHandle = null;\n TCTokenResponse response = new TCTokenResponse();\n byte[] requestedContextHandle = request.getContextHandle();\n String ifdName = request.getIFDName();\n BigInteger requestedSlotIndex = request.getSlotIndex();\n if (requestedContextHandle == null || ifdName == null || requestedSlotIndex == null) {\n connectionHandle = getFirstHandle(request.getCardType());\n } else {\n ConnectionHandleType requestedHandle = new ConnectionHandleType();\n requestedHandle.setContextHandle(requestedContextHandle);\n requestedHandle.setIFDName(ifdName);\n requestedHandle.setSlotIndex(requestedSlotIndex);\n Set<CardStateEntry> matchingHandles = cardStates.getMatchingEntries(requestedHandle);\n if (!matchingHandles.isEmpty()) {\n connectionHandle = matchingHandles.toArray(new CardStateEntry[] {})[0].handleCopy();\n }\n }\n if (connectionHandle == null) {\n String msg = lang.translationForKey(\"String_Node_Str\");\n logger.error(msg);\n response.setResult(WSHelper.makeResultError(ECardConstants.Minor.SAL.CANCELLATION_BY_USER, msg));\n return response;\n }\n try {\n response = doPAOS(request, connectionHandle);\n response = determineRefreshURL(request, response);\n waitForTask(response.getPAOSTask());\n return response;\n } catch (IOException w) {\n logger.error(w.getMessage(), w);\n response.setResult(WSHelper.makeResultUnknownError(w.getMessage()));\n return response;\n } catch (DispatcherException w) {\n logger.error(w.getMessage(), w);\n response.setResult(WSHelper.makeResultError(ECardConstants.Minor.App.INCORRECT_PARM, w.getMessage()));\n return response;\n } catch (PAOSException w) {\n logger.error(w.getMessage(), w);\n Throwable innerException = w.getCause();\n if (innerException instanceof WSException) {\n response.setResult(((WSException) innerException).getResult());\n } else {\n response.setResult(WSHelper.makeResultError(ECardConstants.Minor.App.INCORRECT_PARM, w.getMessage()));\n }\n return response;\n }\n}\n"
|
"public ObjectMessages validate(final RpslObject rpslObject) {\n final ObjectMessages objectMessages = new ObjectMessages();\n final ObjectType rpslObjectType = rpslObject.getType();\n final Map<AttributeType, Integer> attributeCount = Maps.newEnumMap(AttributeType.class);\n for (final AttributeTemplate attributeTemplate : attributeTemplates) {\n attributeCount.put(attributeTemplate.getAttributeType(), 0);\n }\n for (final RpslAttribute attribute : rpslObject.getAttributes()) {\n final AttributeType attributeType = attribute.getType();\n if (attributeType == null) {\n objectMessages.addMessage(attribute, ValidationMessages.unknownAttribute(attribute.getKey()));\n } else {\n final AttributeTemplate attributeTemplate = attributeTemplateMap.get(attributeType);\n if (attributeTemplate == null) {\n objectMessages.addMessage(attribute, ValidationMessages.invalidAttributeForObject(attributeType));\n } else {\n attribute.validateSyntax(rpslObjectType, objectMessages);\n attributeCount.put(attributeType, attributeCount.get(attributeType) + 1);\n }\n }\n }\n for (final AttributeTemplate attributeTemplate : attributeTemplates) {\n addValidationMessagesForAttributeTemplate(objectMessages, attributeTemplate, attributeCount);\n }\n return objectMessages;\n}\n"
|
"public static Css parse(final String css) {\n if (css == null) {\n return null;\n }\n List<Entry> colorDefinitions = getColorDefinition(css);\n int endOfColorDefinitions = css.indexOf(\"String_Node_Str\");\n for (int lineStart = endOfColorDefinitions; lineStart > 0; lineStart--) {\n if (css.charAt(lineStart) == '\\n') {\n endOfColorDefinitions = lineStart + 1;\n break;\n }\n }\n List<CssNode> sections = new ArrayList<CssNode>();\n int index = endOfColorDefinitions;\n int length = css.length();\n do {\n int endOfNodeLabels = css.indexOf(\"String_Node_Str\", index);\n if (endOfNodeLabels == -1) {\n break;\n }\n int endOfSection = css.indexOf(\"String_Node_Str\", endOfNodeLabels + 1) + 1;\n int endOfSectionTest = css.indexOf(\"String_Node_Str\", index) + 1;\n if (endOfSection != endOfSectionTest) {\n index = endOfSection;\n continue;\n }\n for (int lineStart = index; lineStart > 0; lineStart--) {\n if (css.charAt(lineStart) == '\\n') {\n index = lineStart + 1;\n break;\n }\n }\n String nodeLabel = css.substring(index, endOfNodeLabels).trim();\n List<Entry> attributes = new ArrayList<Entry>();\n String nodeSection = css.substring(endOfNodeLabels, endOfSection);\n int sectionStart = nodeSection.indexOf('{') + 1;\n int sectionEnd = nodeSection.indexOf('}');\n while (sectionStart != -1) {\n int end = nodeSection.indexOf(';', sectionStart);\n if (end != -1) {\n int separator = nodeSection.indexOf(':', sectionStart);\n if (separator < end) {\n short parenCount = 0;\n int j = separator;\n while (j < end) {\n j++;\n char c = nodeSection.charAt(j);\n if (c == '(') {\n parenCount++;\n } else if (c == ')') {\n parenCount--;\n }\n }\n j--;\n if (parenCount > 0) {\n do {\n if (nodeSection.charAt(j) == ')') {\n parenCount--;\n }\n j++;\n } while (parenCount > 0 && j < sectionEnd);\n }\n end = j + 1;\n String key = nodeSection.substring(sectionStart, separator);\n String value = nodeSection.substring(separator + 1, end);\n attributes.add(new Entry(key, value));\n }\n sectionStart = end + 1;\n } else {\n break;\n }\n }\n int multiIndex = nodeLabel.indexOf(',');\n if (multiIndex != -1) {\n multiIndex = 0;\n while (multiIndex != -1) {\n int multiEndIndex = nodeLabel.indexOf(',', multiIndex);\n if (multiEndIndex != -1) {\n String newLabel = nodeLabel.substring(multiIndex, multiEndIndex);\n sections.add(new CssNode(newLabel, attributes));\n multiIndex = multiEndIndex + 1;\n } else {\n String newLabel = nodeLabel.substring(multiIndex);\n sections.add(new CssNode(newLabel, attributes));\n multiIndex = -1;\n }\n }\n } else {\n sections.add(new CssNode(nodeLabel, attributes));\n }\n index = endOfSection;\n } while (index < length);\n for (Iterator<CssNode> iterator = sections.iterator(); iterator.hasNext(); ) {\n final CssNode section = iterator.next();\n if (section != null) {\n String label = section.label;\n for (int i = 0; i < sections.size(); i++) {\n final CssNode section2 = sections.get(i);\n if (section != section2 && section2 != null && label.equals(section2.label)) {\n sections.set(i, null);\n final List<Entry> attributes = section.attributes;\n for (int i1 = 0; i1 < attributes.size(); i1++) {\n final Entry attribute = attributes.get(i1);\n for (Iterator<Entry> iterator2 = section2.attributes.iterator(); iterator2.hasNext(); ) {\n final Entry attribute2 = iterator2.next();\n if (attribute.equals(attribute2)) {\n iterator2.remove();\n break;\n }\n }\n }\n section.attributes.addAll(section2.attributes);\n }\n }\n } else {\n iterator.remove();\n }\n }\n for (Iterator<CssNode> iterator = sections.iterator(); iterator.hasNext(); ) {\n final CssNode section = iterator.next();\n for (Iterator<Entry> iterator1 = section.attributes.iterator(); iterator1.hasNext(); ) {\n final Entry attribute = iterator1.next();\n if (attribute == null) {\n iterator1.remove();\n }\n }\n if (section.attributes.isEmpty()) {\n iterator.remove();\n }\n }\n return new Css(colorDefinitions, sections);\n}\n"
|
"public String getProviderForServiceInNetwork(long networkId, Service service) {\n SearchCriteria<NetworkServiceMapVO> sc = AllFieldsSearch.create();\n sc.setParameters(\"String_Node_Str\", networkId);\n sc.setParameters(\"String_Node_Str\", service.getName());\n NetworkServiceMapVO ntwkSvc = findOneBy(sc);\n if (ntwkSvc == null) {\n throw new UnsupportedServiceException(\"String_Node_Str\" + service.getName() + \"String_Node_Str\" + networkId);\n }\n return ntwkSvc.getProvider();\n}\n"
|
"public void setConfused(boolean confused) {\n this.isConfused = confused;\n}\n"
|
"public void onBindViewHolder(DocumentHolder holder, int position) {\n final Context context = getContext();\n final State state = getDisplayState(DirectoryFragment.this);\n final DocumentInfo doc = getArguments().getParcelable(EXTRA_DOC);\n final RootsCache roots = DocumentsApplication.getRootsCache(context);\n final ThumbnailCache thumbs = DocumentsApplication.getThumbnailsCache(context, mThumbSize);\n final Cursor cursor = mModel.getItem(position);\n checkNotNull(cursor, \"String_Node_Str\");\n final String docAuthority = getCursorString(cursor, RootCursorWrapper.COLUMN_AUTHORITY);\n final String docRootId = getCursorString(cursor, RootCursorWrapper.COLUMN_ROOT_ID);\n final String docId = getCursorString(cursor, Document.COLUMN_DOCUMENT_ID);\n final String docMimeType = getCursorString(cursor, Document.COLUMN_MIME_TYPE);\n final String docDisplayName = getCursorString(cursor, Document.COLUMN_DISPLAY_NAME);\n final long docLastModified = getCursorLong(cursor, Document.COLUMN_LAST_MODIFIED);\n final int docIcon = getCursorInt(cursor, Document.COLUMN_ICON);\n final int docFlags = getCursorInt(cursor, Document.COLUMN_FLAGS);\n final String docSummary = getCursorString(cursor, Document.COLUMN_SUMMARY);\n final long docSize = getCursorLong(cursor, Document.COLUMN_SIZE);\n holder.docId = docId;\n final View itemView = holder.itemView;\n holder.setSelected(isSelected(position));\n final View line1 = itemView.findViewById(R.id.line1);\n final View line2 = itemView.findViewById(R.id.line2);\n final ImageView iconMime = (ImageView) itemView.findViewById(R.id.icon_mime);\n final ImageView iconThumb = (ImageView) itemView.findViewById(R.id.icon_thumb);\n final TextView title = (TextView) itemView.findViewById(android.R.id.title);\n final ImageView icon1 = (ImageView) itemView.findViewById(android.R.id.icon1);\n final ImageView icon2 = (ImageView) itemView.findViewById(android.R.id.icon2);\n final TextView summary = (TextView) itemView.findViewById(android.R.id.summary);\n final TextView date = (TextView) itemView.findViewById(R.id.date);\n final TextView size = (TextView) itemView.findViewById(R.id.size);\n final ThumbnailAsyncTask oldTask = (ThumbnailAsyncTask) iconThumb.getTag();\n if (oldTask != null) {\n oldTask.preempt();\n iconThumb.setTag(null);\n }\n iconMime.animate().cancel();\n iconThumb.animate().cancel();\n final boolean supportsThumbnail = (docFlags & Document.FLAG_SUPPORTS_THUMBNAIL) != 0;\n final boolean allowThumbnail = (state.derivedMode == MODE_GRID) || MimePredicate.mimeMatches(MimePredicate.VISUAL_MIMES, docMimeType);\n final boolean showThumbnail = supportsThumbnail && allowThumbnail && !mSvelteRecents;\n final boolean enabled = isDocumentEnabled(docMimeType, docFlags);\n final float iconAlpha = (state.derivedMode == MODE_LIST && !enabled) ? 0.5f : 1f;\n boolean cacheHit = false;\n if (showThumbnail) {\n final Uri uri = DocumentsContract.buildDocumentUri(docAuthority, docId);\n final Bitmap cachedResult = thumbs.get(uri);\n if (cachedResult != null) {\n iconThumb.setImageBitmap(cachedResult);\n cacheHit = true;\n } else {\n iconThumb.setImageDrawable(null);\n final ThumbnailAsyncTask task = new ThumbnailAsyncTask(uri, iconMime, iconThumb, mThumbSize, iconAlpha);\n iconThumb.setTag(task);\n ProviderExecutor.forAuthority(docAuthority).execute(task);\n }\n }\n if (cacheHit) {\n iconMime.setAlpha(0f);\n iconMime.setImageDrawable(null);\n iconThumb.setAlpha(1f);\n } else {\n iconMime.setAlpha(1f);\n iconThumb.setAlpha(0f);\n iconThumb.setImageDrawable(null);\n iconMime.setImageDrawable(getDocumentIcon(mContext, docAuthority, docId, docMimeType, docIcon, state));\n }\n boolean hasLine1 = false;\n boolean hasLine2 = false;\n final boolean hideTitle = (state.derivedMode == MODE_GRID) && mHideGridTitles;\n if (!hideTitle) {\n title.setText(docDisplayName);\n hasLine1 = true;\n }\n Drawable iconDrawable = null;\n if (mType == TYPE_RECENT_OPEN) {\n final RootInfo root = roots.getRootBlocking(docAuthority, docRootId);\n if (state.derivedMode == MODE_GRID) {\n iconDrawable = root.loadGridIcon(mContext);\n } else {\n iconDrawable = root.loadIcon(mContext);\n }\n if (summary != null) {\n final boolean alwaysShowSummary = getResources().getBoolean(R.bool.always_show_summary);\n if (alwaysShowSummary) {\n summary.setText(root.getDirectoryString());\n summary.setVisibility(View.VISIBLE);\n hasLine2 = true;\n } else {\n if (iconDrawable != null && roots.isIconUniqueBlocking(root)) {\n summary.setVisibility(View.INVISIBLE);\n } else {\n summary.setText(root.getDirectoryString());\n summary.setVisibility(View.VISIBLE);\n summary.setTextAlignment(TextView.TEXT_ALIGNMENT_TEXT_END);\n hasLine2 = true;\n }\n }\n }\n } else {\n if (Document.MIME_TYPE_DIR.equals(docMimeType) && state.derivedMode == MODE_GRID && showThumbnail) {\n iconDrawable = IconUtils.applyTintAttr(mContext, R.drawable.ic_doc_folder, android.R.attr.textColorPrimaryInverse);\n }\n if (summary != null) {\n if (docSummary != null) {\n summary.setText(docSummary);\n summary.setVisibility(View.VISIBLE);\n hasLine2 = true;\n } else {\n summary.setVisibility(View.INVISIBLE);\n }\n }\n }\n if (icon1 != null)\n icon1.setVisibility(View.GONE);\n if (icon2 != null)\n icon2.setVisibility(View.GONE);\n if (iconDrawable != null) {\n if (hasLine1) {\n icon1.setVisibility(View.VISIBLE);\n icon1.setImageDrawable(iconDrawable);\n } else {\n icon2.setVisibility(View.VISIBLE);\n icon2.setImageDrawable(iconDrawable);\n }\n }\n if (docLastModified == -1) {\n date.setText(null);\n } else {\n date.setText(formatTime(mContext, docLastModified));\n hasLine2 = true;\n }\n if (state.showSize) {\n size.setVisibility(View.VISIBLE);\n if (Document.MIME_TYPE_DIR.equals(docMimeType) || docSize == -1) {\n size.setText(null);\n } else {\n size.setText(Formatter.formatFileSize(mContext, docSize));\n hasLine2 = true;\n }\n } else {\n size.setVisibility(View.GONE);\n }\n if (line1 != null) {\n line1.setVisibility(hasLine1 ? View.VISIBLE : View.GONE);\n }\n if (line2 != null) {\n line2.setVisibility(hasLine2 ? View.VISIBLE : View.GONE);\n }\n setEnabledRecursive(itemView, enabled);\n iconMime.setAlpha(iconAlpha);\n iconThumb.setAlpha(iconAlpha);\n if (icon1 != null)\n icon1.setAlpha(iconAlpha);\n if (icon2 != null)\n icon2.setAlpha(iconAlpha);\n if (DEBUG_ENABLE_DND) {\n setupDragAndDropOnDocumentView(itemView, cursor);\n }\n}\n"
|
"public boolean set(int sequence, String message) throws IOException {\n msgFile.seek(msgFile.length());\n headerFile.seek(headerFile.length());\n long offset = msgFile.getFilePointer();\n if (offset > 0) {\n headerBuffer.append(' ');\n }\n int size = message.length();\n messageIndex.put(new Integer(sequence), new long[] { offset, size });\n headerFile.write((Integer.toString(sequence) + \"String_Node_Str\" + Long.toString(offset) + \"String_Node_Str\" + Integer.toString(size)).getBytes());\n msgFile.write(message.getBytes());\n return true;\n}\n"
|
"public IStatus doRun() {\n try {\n TimeMeasure.display = CommonsPlugin.isDebugMode();\n TimeMeasure.displaySteps = CommonsPlugin.isDebugMode();\n TimeMeasure.measureActive = CommonsPlugin.isDebugMode();\n TimeMeasure.begin(\"String_Node_Str\");\n jetFilesCompileFail.clear();\n IProgressMonitor monitorWrap = null;\n monitorWrap = new NullProgressMonitor();\n ECodeLanguage codeLanguage = LanguageManager.getCurrentLanguage();\n initializeJetEmittersProject(monitorWrap);\n TimeMeasure.step(\"String_Node_Str\", \"String_Node_Str\");\n CodeGeneratorInternalTemplatesFactory templatesFactory = CodeGeneratorInternalTemplatesFactoryProvider.getInstance();\n templatesFactory.setCurrentLanguage(codeLanguage);\n templatesFactory.init();\n IComponentsFactory componentsFactory = ComponentsFactoryProvider.getInstance();\n long startTime = System.currentTimeMillis();\n defaultTemplate = TemplateUtil.RESOURCES_DIRECTORY + TemplateUtil.DIR_SEP + EInternalTemplate.DEFAULT_TEMPLATE + TemplateUtil.EXT_SEP + codeLanguage.getExtension() + TemplateUtil.TEMPLATE_EXT;\n List<JetBean> jetBeans = new ArrayList<JetBean>();\n List<TemplateUtil> templates = templatesFactory.getTemplates();\n Set<IComponent> components = componentsFactory.getComponents();\n TimeMeasure.step(\"String_Node_Str\", \"String_Node_Str\");\n monitorWrap.beginTask(Messages.getString(\"String_Node_Str\"), (2 * templates.size() + 5 * components.size()));\n int monitorBuffer = 0;\n for (TemplateUtil template : templates) {\n JetBean jetBean = initializeUtilTemplate(template, codeLanguage);\n jetBeans.add(jetBean);\n monitorBuffer++;\n if (monitorBuffer % 100 == 0) {\n monitorWrap.worked(100);\n monitorBuffer = 0;\n }\n }\n TimeMeasure.step(\"String_Node_Str\", \"String_Node_Str\");\n if (components != null) {\n ECodePart codePart = ECodePart.MAIN;\n for (IComponent component : new ArrayList<IComponent>(components)) {\n if (component.getAvailableCodeParts().size() > 0) {\n initComponent(codeLanguage, jetBeans, codePart, component);\n }\n monitorBuffer++;\n if (monitorBuffer % 100 == 0) {\n monitorWrap.worked(100);\n monitorBuffer = 0;\n }\n }\n }\n TimeMeasure.step(\"String_Node_Str\", \"String_Node_Str\");\n monitorWrap.worked(monitorBuffer);\n initializeEmittersPool(jetBeans, codeLanguage, monitorWrap);\n monitorWrap.done();\n TimeMeasure.step(\"String_Node_Str\", \"String_Node_Str\");\n if (!CommonUIPlugin.isFullyHeadless()) {\n Job job = new Job(Messages.getString(\"String_Node_Str\")) {\n protected IStatus run(IProgressMonitor monitor) {\n CorePlugin.getDefault().getDesignerCoreService().synchronizeDesignerUI(new PropertyChangeEvent(this, IComponentConstants.NORMAL, null, null));\n return Status.OK_STATUS;\n }\n };\n job.setUser(true);\n job.setPriority(Job.INTERACTIVE);\n job.schedule();\n job.wakeUp();\n firstTime = false;\n }\n }\n log.debug(Messages.getString(\"String_Node_Str\", (System.currentTimeMillis() - startTime)));\n initialized = true;\n ComponentCompilations.addMarkers();\n initializeStart = false;\n } catch (Exception e) {\n log.error(Messages.getString(\"String_Node_Str\"), e);\n TimeMeasure.end(\"String_Node_Str\");\n TimeMeasure.display = false;\n TimeMeasure.displaySteps = false;\n TimeMeasure.measureActive = false;\n return new Status(IStatus.ERROR, CodeGeneratorActivator.PLUGIN_ID, Messages.getString(\"String_Node_Str\"), e);\n }\n TimeMeasure.end(\"String_Node_Str\");\n TimeMeasure.display = false;\n TimeMeasure.displaySteps = false;\n TimeMeasure.measureActive = false;\n if (jetFilesCompileFail.size() > 0) {\n StringBuilder message = new StringBuilder();\n for (JetBean tmpJetBean : jetFilesCompileFail) {\n if (message.length() > 0) {\n message.append(\"String_Node_Str\").append(tmpJetBean.getTemplateRelativeUri());\n } else {\n message.append(tmpJetBean.getTemplateRelativeUri());\n }\n }\n return new Status(IStatus.ERROR, CodeGeneratorActivator.PLUGIN_ID, Messages.getString(\"String_Node_Str\") + message.toString());\n }\n CorePlugin.getDefault().getRcpService().activeSwitchProjectAction();\n return Status.OK_STATUS;\n}\n"
|
"public PurchaseOrderLine createPurchaseOrderLine(PurchaseOrder purchaseOrder, PurchaseOrderLine purchaseOrderLine) throws AxelorException {\n LOG.debug(\"String_Node_Str\", new Object[] { purchaseOrderLine.getProductName() });\n return purchaseOrderLineService.createPurchaseOrderLine(purchaseOrder, purchaseOrderLine.getProduct(), purchaseOrderLine.getProductName(), purchaseOrderLine.getDescription(), purchaseOrderLine.getQty(), purchaseOrderLine.getUnit());\n}\n"
|
"boolean doesMatch(String[] otherFields, double errorMargin) {\n if (!(fields.length == otherFields.length)) {\n if (debug)\n System.err.printf(\"String_Node_Str\", fields.length, otherFields.length);\n return false;\n for (int i = 0; i < fields.length; i++) {\n if (i == doublePlusFieldInd)\n continue;\n if (fields[i].trim().length() == 0)\n continue;\n if (!fieldMatches(fields[i], otherFields[i], errorMargin))\n if (debug)\n System.out.printf(\"String_Node_Str\", i, fields[i], otherFields[i]);\n return false;\n }\n return true;\n}\n"
|
"public static <X> X timeout(Callable<X> c, long timeout) {\n final Ref<X> ret = new Ref<>();\n final Ref<Throwable> thr = new Ref<>();\n Thread t = new Thread(() -> {\n try {\n X x = c.call();\n synchronized (ret) {\n ret.set(x);\n }\n } catch (Exception exn) {\n exn.printStackTrace();\n synchronized (thr) {\n thr.set(exn);\n }\n } catch (ThreadDeath d) {\n synchronized (thr) {\n thr.set(new RuntimeInterruptedException(d));\n }\n }\n });\n t.start();\n try {\n t.join(timeout);\n } catch (InterruptedException e) {\n t.stop();\n throw new RuntimeInterruptedException(e);\n }\n synchronized (thr) {\n synchronized (ret) {\n if (!ret.isSet() && !thr.isSet()) {\n t.stop();\n throw new RuntimeException(\"String_Node_Str\" + (timeout / 1000) + \"String_Node_Str\" + (timeout / 1000) + \"String_Node_Str\");\n } else if (ret.isSet() && !thr.isSet()) {\n return ret.x;\n } else if (!ret.isSet() && thr.isSet()) {\n throw new RuntimeException(thr.x.getMessage());\n } else {\n throw new RuntimeException(\"String_Node_Str\");\n }\n }\n }\n}\n"
|
"public void entryRemoved(EntryEvent<E, V> event) {\n itemListener.itemRemoved(event.getValue());\n}\n"
|
"public final boolean finishActivity(IBinder token, int resultCode, Intent resultData, boolean finishTask) {\n if (resultData != null && resultData.hasFileDescriptors() == true) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n synchronized (this) {\n ActivityRecord r = ActivityRecord.isInStackLocked(token);\n if (r == null) {\n return true;\n }\n TaskRecord tr = r.task;\n ActivityRecord rootR = tr.getRootActivity();\n if (tr == mStackSupervisor.mLockTaskModeTask) {\n if (rootR == r) {\n mStackSupervisor.showLockTaskToast();\n return false;\n }\n }\n if (mController != null) {\n ActivityRecord next = r.task.stack.topRunningActivityLocked(token, 0);\n if (next != null) {\n boolean resumeOK = true;\n try {\n resumeOK = mController.activityResuming(next.packageName);\n } catch (RemoteException e) {\n mController = null;\n Watchdog.getInstance().setActivityController(null);\n }\n if (!resumeOK) {\n return false;\n }\n }\n }\n final long origId = Binder.clearCallingIdentity();\n try {\n boolean res;\n if (finishTask && r == rootR) {\n res = removeTaskByIdLocked(tr.taskId, false);\n } else {\n res = tr.stack.requestFinishActivityLocked(token, resultCode, resultData, \"String_Node_Str\", true);\n }\n return res;\n } finally {\n Binder.restoreCallingIdentity(origId);\n }\n }\n}\n"
|
"private void stopBatch(ConfigurableApplicationContext ctx, String jobName) throws Exception {\n int returnCode = 0;\n try {\n findBeans(ctx);\n Set<Long> runningJobExecutionIDs = operator.getRunningExecutions(jobName);\n if (runningJobExecutionIDs.isEmpty()) {\n throw new JobExecutionNotRunningException(\"String_Node_Str\" + jobName + \"String_Node_Str\");\n }\n LOG.debug(\"String_Node_Str\" + \"String_Node_Str\", runningJobExecutionIDs.size());\n int stoppedCount = 0;\n for (Long id : runningJobExecutionIDs) {\n operator.stop(id);\n }\n } catch (Exception e) {\n returnCode = 1;\n throw e;\n } finally {\n final int returnCodeResult = returnCode;\n SpringApplication.exit(ctx, new ExitCodeGenerator() {\n public int getExitCode() {\n return returnCodeResult;\n }\n });\n }\n}\n"
|
"public float getMediumFontSize() {\n return 9f * 1000.0f;\n}\n"
|
"public static void main(String[] args) {\n Server server = new Server(new CoreModuleLoader(), new JarModuleLoader());\n new EventListener<ModuleEnableEvent, ModuleEnableEvent>() {\n public void onEvent(ModuleEnableEvent event) {\n }\n }.register(ModuleEnableEvent.class, server.getEventManager());\n Runtime.getRuntime().addShutdownHook(new Thread(server::onDisable));\n server.onEnable();\n server.getModule(LoggingModule.class).info(\"String_Node_Str\");\n}\n"
|
"public void registerIcons(IIconRegister iconRegister) {\n ((TextureMap) iconRegister).setTextureEntry(\"String_Node_Str\", (TextureAtlasSprite) (itemIcon = new TextureBiomeCompass(\"String_Node_Str\")));\n locations = new ArrayList<>(IslandBiomeBase.biomeList.size());\n for (int a = 0; a < IslandBiomeBase.biomeList.size(); a++) locations.add(a, new HashSet<ChunkCoordinates>());\n lastSavedX = lastSavedZ = Integer.MAX_VALUE;\n Log.info(\"String_Node_Str\");\n}\n"
|
"public String getStormpathSecret() {\n return getProperty(ENTERPRISE_STORMPATH_SECRET);\n}\n"
|
"public int getTerrainHeightAt(int x, int z) {\n int height = worldObj.getHeight(TCGenUtils.getBlockPos(x, 0, z)).getY() + 1;\n for (int y = height; y > 0; y--) {\n Block block = worldObj.getBlockState(getBlockPos(x, y, z)).getBlock();\n if (block == Blocks.DIRT || block == Blocks.GRASS || block == Blocks.SAND || block == Blocks.STONE) {\n return y + 1;\n }\n }\n return 0;\n}\n"
|
"protected void __handleNonSoapException(HttpServletRequest request, HttpServletResponse response, Exception exception) throws ServletException, IOException {\n exception.printStackTrace();\n BirtUtility.appendErrorMessage(response.getOutputStream(), exception);\n}\n"
|
"public SkyValue compute(SkyKey skyKey, Environment env) throws LoadSkylarkAspectFunctionException, InterruptedException {\n SkylarkAspectLoadingKey aspectLoadingKey = (SkylarkAspectLoadingKey) skyKey.argument();\n String skylarkValueName = aspectLoadingKey.getSkylarkValueName();\n PathFragment extensionFile = aspectLoadingKey.getExtensionFile();\n ImmutableMap<PathFragment, Label> labelLookupMap;\n try {\n labelLookupMap = SkylarkImportLookupFunction.labelsForAbsoluteImports(ImmutableSet.of(extensionFile), env);\n } catch (SkylarkImportFailedException e) {\n env.getListener().handle(Event.error(e.getMessage()));\n throw new LoadSkylarkAspectFunctionException(new AspectCreationException(e.getMessage()));\n }\n if (labelLookupMap == null) {\n return null;\n }\n SkylarkAspect skylarkAspect = null;\n try {\n skylarkAspect = AspectFunction.loadSkylarkAspect(env, labelLookupMap.get(extensionFile), skylarkValueName);\n } catch (AspectCreationException e) {\n throw new LoadSkylarkAspectFunctionException(e, skyKey);\n }\n if (skylarkAspect == null) {\n return null;\n }\n SkyKey aspectKey = AspectValue.key(aspectLoadingKey.getTargetLabel(), aspectLoadingKey.getTargetConfiguration(), skylarkAspect.getAspectClass(), AspectParameters.EMPTY);\n return env.getValue(aspectKey);\n}\n"
|
"public static void dispatch(final Runnable runnable) {\n currentDisplay.syncExec(runnable);\n}\n"
|
"public DatabaseField buildField(DatabaseField field) {\n try {\n Map<DatabaseField, DatabaseField> builtFields = getObjectBuilder().getFieldsMap();\n DatabaseField builtField = builtFields.get(field);\n if (builtField == null) {\n XMLField xmlField = (XMLField) field;\n xmlField.setNamespaceResolver(this.getNamespaceResolver());\n xmlField.initialize();\n builtFields.put(xmlField, xmlField);\n return xmlField;\n }\n return builtField;\n } catch (ClassCastException e) {\n }\n return super.buildField(field);\n}\n"
|
"public void testTypes() {\n builder.recordReturnType(new JSTypeExpression(JsDocInfoParser.parseTypeString(\"String_Node_Str\"), \"String_Node_Str\"));\n JSDocInfo info = builder.build(null);\n assertEquals(\"String_Node_Str\", JSDocInfoPrinter.print(info));\n builder.recordThisType(new JSTypeExpression(IR.string(\"String_Node_Str\"), \"String_Node_Str\"));\n info = builder.build(null);\n assertEquals(\"String_Node_Str\", JSDocInfoPrinter.print(info));\n builder.recordThrowType(new JSTypeExpression(IR.string(\"String_Node_Str\"), \"String_Node_Str\"));\n info = builder.build(null);\n assertEquals(\"String_Node_Str\", JSDocInfoPrinter.print(info));\n builder.recordTypedef(new JSTypeExpression(IR.string(\"String_Node_Str\"), \"String_Node_Str\"));\n info = builder.build(null);\n assertEquals(\"String_Node_Str\", JSDocInfoPrinter.print(info));\n builder.recordEnumParameterType(new JSTypeExpression(IR.string(\"String_Node_Str\"), \"String_Node_Str\"));\n info = builder.build(null);\n assertEquals(\"String_Node_Str\", JSDocInfoPrinter.print(info));\n builder.recordType(new JSTypeExpression(IR.string(\"String_Node_Str\"), \"String_Node_Str\"));\n info = builder.build(null);\n assertEquals(\"String_Node_Str\", JSDocInfoPrinter.print(info));\n}\n"
|
"public void drawVertices(RenderObject robj, DrawMode mode) {\n boolean enableLighting = false;\n if (isLightingEnabled() && !robj.hasNormals()) {\n enableLighting = true;\n setLightingEnabled(false);\n }\n maybeUpdateState(gl);\n boolean selecting = isSelecting();\n boolean hasColors = (robj.hasColors() && hasVertexColoring());\n boolean useColors = hasColors && !selecting;\n boolean useHSV = isHSVColorInterpolationEnabled();\n if (useColors) {\n gl.glColorMaterial(GL2.GL_FRONT_AND_BACK, GL2.GL_AMBIENT_AND_DIFFUSE);\n if (!myHighlightColorActive) {\n gl.glEnable(GL2.GL_COLOR_MATERIAL);\n }\n if (useHSV) {\n useHSV = setupHSVInterpolation(gl);\n }\n }\n boolean useDisplayList = !selecting || !hasColors;\n GL2VersionedObject gvo = null;\n RenderObjectKey key = new RenderObjectKey(robj.getIdentifier(), DrawType.VERTICES, 0);\n VertexFingerPrint fingerprint = new VertexFingerPrint(robj.getVersionInfo(), mode);\n boolean compile = true;\n if (useDisplayList) {\n gvo = myGLResources.getVersionedObject(key);\n if (gvo != null) {\n boolean iv = gvo.disposeInvalid(gl);\n if (iv == true) {\n System.out.println(\"String_Node_Str\" + gvo);\n }\n }\n if (gvo == null || gvo.disposeInvalid(gl)) {\n gvo = myGLResources.allocateVersionedObject(gl, key, fingerprint);\n compile = true;\n } else {\n compile = !(gvo.compareExchangeFingerPrint(fingerprint));\n }\n }\n if (compile) {\n if (gvo != null) {\n gvo.beginCompile(gl);\n }\n switch(mode) {\n case LINES:\n gl.glBegin(GL2.GL_LINES);\n break;\n case LINE_LOOP:\n gl.glBegin(GL2.GL_LINE_LOOP);\n break;\n case LINE_STRIP:\n gl.glBegin(GL2.GL_LINE_STRIP);\n break;\n case POINTS:\n gl.glBegin(GL2.GL_POINTS);\n break;\n case TRIANGLES:\n gl.glBegin(GL2.GL_TRIANGLES);\n break;\n case TRIANGLE_FAN:\n gl.glBegin(GL2.GL_TRIANGLE_FAN);\n break;\n case TRIANGLE_STRIP:\n gl.glBegin(GL2.GL_TRIANGLE_STRIP);\n break;\n default:\n gl.glBegin(GL2.GL_POINTS);\n break;\n }\n robj.readLock();\n int vertexCount = robj.numVertices();\n int positionOffset = robj.getVertexPositionOffset();\n int normalOffset = robj.getVertexNormalOffset();\n int colorOffset = robj.getVertexColorOffset();\n int texcoordOffset = robj.getVertexTextureCoordOffset();\n int vertexStride = robj.getVertexStride();\n int[] verts = robj.getVertexBuffer();\n int baseIdx = 0;\n for (int i = 0; i < vertexCount; ++i) {\n if (!selecting && useColors) {\n setVertexColor(gl, robj.getColor(verts[baseIdx + colorOffset]), useHSV);\n }\n if (robj.hasNormals()) {\n gl.glNormal3fv(robj.getNormal(verts[baseIdx + normalOffset]), 0);\n }\n if (robj.hasTextureCoords()) {\n gl.glTexCoord2fv(robj.getTextureCoord(verts[baseIdx + texcoordOffset]), 0);\n }\n gl.glVertex3fv(robj.getPosition(verts[baseIdx + positionOffset]), 0);\n baseIdx += vertexStride;\n }\n robj.readUnlock();\n gl.glEnd();\n if (gvo != null) {\n gvo.endCompile(gl);\n gvo.draw(gl);\n }\n } else {\n gvo.draw(gl);\n }\n if (useColors) {\n gl.glDisable(GL2.GL_COLOR_MATERIAL);\n if (useHSV) {\n gl.glUseProgramObjectARB(0);\n }\n }\n if (enableLighting) {\n setLightingEnabled(true);\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.