content
stringlengths
40
137k
"public void endElement(String uri, String localName, String qName) throws SAXException {\n String loopPath = this.loopPath;\n if (loopPath.indexOf(\"String_Node_Str\") != -1) {\n loopPath = this.loopPath.replace(\"String_Node_Str\", qName);\n }\n if (isLooping && outputText) {\n for (int indexOfColumn : indexOfColumns) {\n if (indexOfColumn >= 0) {\n if (currentRow[indexOfColumn] == null) {\n currentRow[indexOfColumn] = \"String_Node_Str\";\n }\n if (currentRow[indexOfColumn].trim().startsWith(\"String_Node_Str\")) {\n currentRow[indexOfColumn] = currentRow[indexOfColumn] + \"String_Node_Str\" + qName + \"String_Node_Str\";\n } else {\n currentRowHaveValue[indexOfColumn] = true;\n }\n }\n }\n }\n outputText = false;\n if (currentPath.equals(loopPath)) {\n isLooping = false;\n if (this.entry.hasFunctions()) {\n entry.execFunctions(listArgs);\n List<Map<String, String>> results = entry.getFunctionResults();\n for (int i = 0; i < results.size(); i++) {\n Map<String, String> map = results.get(i);\n String strKey = map.get(\"String_Node_Str\");\n int index = this.loopCols.indexOf(strKey);\n if (index >= 0 && currentRowHaveValue[index] == false) {\n currentRow[index] = map.get(\"String_Node_Str\");\n currentRowHaveValue[index] = true;\n }\n }\n }\n currentRow[currentRow.length - 1] = Integer.toString(subLoopCount);\n entry.getRows().add(currentRow);\n if (this.entry.getOriginalLoopPath() != null) {\n this.saxLooper.addLoopOrder(this.entry.getOriginalLoopPath());\n }\n }\n currentPath = currentPath.substring(0, currentPath.lastIndexOf(\"String_Node_Str\"));\n}\n"
"public static TableViewer createTableViewer(Composite container, int style) {\n TableViewer viewer = new TableViewer(container, style);\n fixOSXTableBug(viewer.getTable());\n return viewer;\n}\n"
"private String invokeAntiSamy(String context, String input) throws ValidationException {\n if (StringUtilities.isEmpty(input)) {\n if (allowNull) {\n return null;\n }\n throw new ValidationException(context + \"String_Node_Str\", \"String_Node_Str\" + context + \"String_Node_Str\" + input, context);\n }\n String canonical = super.getValid(context, input);\n try {\n AntiSamy as = new AntiSamy();\n CleanResults test = as.scan(canonical, antiSamyPolicy);\n List<String> errors = test.getErrorMessages();\n if (!errors.isEmpty()) {\n LOGGER.info(Logger.SECURITY_FAILURE, \"String_Node_Str\" + errors);\n }\n return test.getCleanHTML().trim();\n } catch (ScanException e) {\n throw new ValidationException(context + \"String_Node_Str\", \"String_Node_Str\" + context + \"String_Node_Str\" + e.getMessage(), e, context);\n } catch (PolicyException e) {\n throw new ValidationException(context + \"String_Node_Str\", \"String_Node_Str\" + context + \"String_Node_Str\" + e.getMessage(), e, context);\n }\n}\n"
"private void onEditorAction_nearestConfigurableBeaconUrlEditTextDoneKeyPressed() {\n hideSoftKeyboard();\n String url = mEditCardUrl.getText().toString();\n try {\n byte[] scanRecord = BeaconHelper.createAdvertisingPacket(url);\n mBeaconConfig.writeUriBeacon(scanRecord);\n } catch (URISyntaxException e) {\n }\n}\n"
"public static void setHistoryAndPersonality(GameCharacter character) {\n double prostituteChance = 0.15f;\n if (character.isFeminine()) {\n prostituteChance += 0.10f;\n }\n prostituteChance += Math.min((character.body.getBreast().getRawSizeValue() - 7) * 0.02f, 0.35f);\n if (character.hasPenis()) {\n prostituteChance += Math.min((character.body.getPenis().getRawSizeValue() - 5) * 0.01f, 0.10f);\n }\n if (character.hasVagina()) {\n prostituteChance += 0.15f;\n }\n if (character.body.getBreast().getNipples().getOrificeNipples().getRawCapacityValue() >= 4) {\n prostituteChance += 0.05f;\n }\n if (character.hasFetish(Fetish.FETISH_PURE_VIRGIN)) {\n prostituteChance = 0;\n }\n prostituteChance = Math.min(prostituteChance, 0.5f);\n if (Math.random() <= prostituteChance) {\n character.setHistory(History.PROSTITUTE);\n character.setAssVirgin(false);\n character.setAssCapacity(character.getAssRawCapacityValue() * 1.2f, true);\n character.setAssStretchedCapacity(character.getAssRawCapacityValue());\n if (character.hasVagina()) {\n character.setVaginaVirgin(false);\n character.setVaginaCapacity(character.getVaginaRawCapacityValue() * 1.2f, true);\n character.setVaginaStretchedCapacity(character.getVaginaRawCapacityValue());\n }\n character.setSexualOrientation(SexualOrientation.AMBIPHILIC);\n character.setName(Name.getRandomProstituteTriplet());\n character.useItem(AbstractItemType.generateItem(ItemType.PROMISCUITY_PILL), character, false);\n } else {\n character.setHistory(History.MUGGER);\n }\n}\n"
"public void onClick(DialogInterface dialogI, int which) {\n eAssert(mCancelable);\n mUserCancelled = true;\n mDialog.setMessage(mContext.getResources().getText(R.string.msg_wait_cancel));\n if (null != mWorker)\n mWorker.onCancel(this);\n super.cancel(mInterruptOnCancel);\n}\n"
"public void updateObjectForWriteWithChangeSet() {\n WriteObjectQuery writeQuery = getWriteObjectQuery();\n ObjectChangeSet changeSet = writeQuery.getObjectChangeSet();\n Object object = writeQuery.getObject();\n ClassDescriptor descriptor = getDescriptor();\n DescriptorQueryManager queryManager = descriptor.getQueryManager();\n AbstractSession session = getSession();\n CommitManager commitManager = session.getCommitManager();\n if ((!writeQuery.isUserDefined()) && queryManager.hasUpdateQuery() && isExpressionQueryMechanism()) {\n commitManager.markPreModifyCommitInProgress(object);\n performUserDefinedUpdate();\n return;\n }\n commitManager.markPreModifyCommitInProgress(object);\n DescriptorEventManager eventManager = descriptor.getEventManager();\n if (changeSet.hasChanges()) {\n if (eventManager.hasAnyEventListeners()) {\n DescriptorEvent event = new DescriptorEvent(DescriptorEventManager.PreUpdateWithChangesEvent, writeQuery);\n eventManager.executeEvent(event);\n UnitOfWorkChangeSet uowChangeSet = (UnitOfWorkChangeSet) ((UnitOfWorkImpl) session).getUnitOfWorkChangeSet();\n if (!uowChangeSet.isChangeSetFromOutsideUOW() && writeQuery.getObjectChangeSet().shouldRecalculateAfterUpdateEvent()) {\n if (!descriptor.getObjectChangePolicy().isAttributeChangeTrackingPolicy()) {\n writeQuery.getObjectChangeSet().clear(false);\n }\n if (descriptor.getObjectChangePolicy().calculateChangesForExistingObject(object, uowChangeSet, ((UnitOfWorkImpl) session), descriptor, false) == null) {\n uowChangeSet.getAllChangeSets().remove(writeQuery.getObjectChangeSet());\n }\n }\n }\n }\n if (writeQuery.shouldCascadeParts()) {\n queryManager.preUpdate(writeQuery);\n }\n writeQuery.setModifyRow(descriptor.getObjectBuilder().buildRowForUpdateWithChangeSet(writeQuery));\n Boolean shouldModifyVersionField = changeSet.shouldModifyVersionField();\n if (!getModifyRow().isEmpty() || shouldModifyVersionField != null || changeSet.hasCmpPolicyForcedUpdate()) {\n if (writeQuery.isUserDefined() || writeQuery.isCallQuery()) {\n writeQuery.setModifyRow(descriptor.getObjectBuilder().buildRow(object, session, WriteType.UNDEFINED));\n }\n OptimisticLockingPolicy lockingPolicy = descriptor.getOptimisticLockingPolicy();\n if (lockingPolicy != null) {\n lockingPolicy.addLockValuesToTranslationRow(writeQuery);\n if (!getModifyRow().isEmpty() || shouldModifyVersionField.booleanValue()) {\n lockingPolicy.updateRowAndObjectForUpdate(writeQuery, object);\n } else if (!shouldModifyVersionField.booleanValue() && (lockingPolicy instanceof VersionLockingPolicy)) {\n ((VersionLockingPolicy) lockingPolicy).writeLockValueIntoRow(writeQuery, object);\n }\n }\n if (eventManager.hasAnyEventListeners()) {\n DescriptorEvent event = new DescriptorEvent(DescriptorEventManager.AboutToUpdateEvent, writeQuery);\n event.setRecord(getModifyRow());\n eventManager.executeEvent(event);\n }\n if (QueryMonitor.shouldMonitor()) {\n QueryMonitor.incrementUpdate(getWriteObjectQuery());\n }\n int rowCount = updateObject().intValue();\n if (rowCount < 1) {\n if (session.hasEventManager()) {\n session.getEventManager().noRowsModified(writeQuery, object);\n }\n }\n if (lockingPolicy != null) {\n lockingPolicy.validateUpdate(rowCount, object, writeQuery);\n }\n }\n commitManager.markPostModifyCommitInProgress(object);\n if (writeQuery.shouldCascadeParts()) {\n queryManager.postUpdate(writeQuery);\n }\n if ((descriptor.getHistoryPolicy() != null) && descriptor.getHistoryPolicy().shouldHandleWrites()) {\n descriptor.getHistoryPolicy().postUpdate(writeQuery);\n }\n if (eventManager.hasAnyEventListeners()) {\n eventManager.executeEvent(new DescriptorEvent(DescriptorEventManager.PostUpdateEvent, writeQuery));\n }\n}\n"
"protected List<Polygon2D_F64> getFoundPolygons() {\n return alg.getDetectorSquare().getPolygons(null, null);\n}\n"
"public void createTestTable() throws Exception {\n if (m_admin == null) {\n throw new IOException(\"String_Node_Str\");\n }\n if (m_admin.tableExists(\"String_Node_Str\")) {\n m_admin.disableTable(\"String_Node_Str\");\n m_admin.deleteTable(\"String_Node_Str\");\n }\n List<String> colFamilies = new ArrayList<String>();\n colFamilies.add(\"String_Node_Str\");\n colFamilies.add(\"String_Node_Str\");\n m_admin.createTable(\"String_Node_Str\", colFamilies, null);\n Properties props = new Properties();\n props.setProperty(HBaseConnection.HTABLE_WRITE_BUFFER_SIZE_KEY, \"String_Node_Str\" + (1024 * 1024 * 12));\n m_admin.newTargetTable(\"String_Node_Str\", props);\n Random r = new Random();\n String[] nomVals = { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n Date date = new Date();\n Calendar c = new GregorianCalendar();\n c.setTime(date);\n Calendar c2 = new GregorianCalendar();\n c2.set(1970, 2, 1);\n for (long key = -500; key < 20000; key++) {\n m_admin.newTargetTablePut(HBaseValueMeta.encodeKeyValue(new Long(key), Mapping.KeyType.LONG, m_bytesUtil), false);\n m_admin.addColumnToTargetPut(\"String_Node_Str\", \"String_Node_Str\", false, m_bytesUtil.toBytes((key < 0 ? (int) -key : key) / 10));\n m_admin.addColumnToTargetPut(\"String_Node_Str\", \"String_Node_Str\", false, m_bytesUtil.toBytes(\"String_Node_Str\" + key));\n if (key % 10L > 0) {\n int index = r.nextInt(3);\n String nomVal = nomVals[index];\n m_admin.addColumnToTargetPut(\"String_Node_Str\", \"String_Node_Str\", false, m_bytesUtil.toBytes(nomVal));\n }\n double d = r.nextDouble();\n int signedInt = r.nextInt(100);\n if (d < 0.5) {\n signedInt = -signedInt;\n }\n m_admin.addColumnToTargetPut(\"String_Node_Str\", \"String_Node_Str\", false, m_bytesUtil.toBytes(signedInt));\n float f = r.nextFloat() * 1000.0f;\n m_admin.addColumnToTargetPut(\"String_Node_Str\", \"String_Node_Str\", false, m_bytesUtil.toBytes(f));\n if (d > 0.5) {\n f = -f;\n }\n m_admin.addColumnToTargetPut(\"String_Node_Str\", \"String_Node_Str\", false, m_bytesUtil.toBytes(f));\n double dd = d * 10000 * r.nextDouble();\n m_admin.addColumnToTargetPut(\"String_Node_Str\", \"String_Node_Str\", false, m_bytesUtil.toBytes(dd));\n if (d > 0.5) {\n dd = -dd;\n }\n m_admin.addColumnToTargetPut(\"String_Node_Str\", \"String_Node_Str\", false, m_bytesUtil.toBytes(dd));\n long l = r.nextInt(300);\n m_admin.addColumnToTargetPut(\"String_Node_Str\", \"String_Node_Str\", false, m_bytesUtil.toBytes(l));\n if (d < 0.5) {\n l = -l;\n }\n m_admin.addColumnToTargetPut(\"String_Node_Str\", \"String_Node_Str\", false, m_bytesUtil.toBytes(l));\n c.add(Calendar.DAY_OF_YEAR, 1);\n long longd = c.getTimeInMillis();\n m_admin.addColumnToTargetPut(\"String_Node_Str\", \"String_Node_Str\", false, m_bytesUtil.toBytes(longd));\n c2.add(Calendar.DAY_OF_YEAR, -1);\n longd = c2.getTimeInMillis();\n m_admin.addColumnToTargetPut(\"String_Node_Str\", \"String_Node_Str\", false, m_bytesUtil.toBytes(longd));\n String bVal = \"String_Node_Str\";\n if (d < 0.5) {\n bVal = \"String_Node_Str\";\n } else {\n bVal = \"String_Node_Str\";\n }\n m_admin.addColumnToTargetPut(\"String_Node_Str\", \"String_Node_Str\", false, m_bytesUtil.toBytes(bVal));\n byte[] serialized = HBaseValueMeta.encodeObject(new Double(d));\n m_admin.addColumnToTargetPut(\"String_Node_Str\", \"String_Node_Str\", false, serialized);\n byte[] rawStuff = m_bytesUtil.toBytes(5034555);\n m_admin.addColumnToTargetPut(\"String_Node_Str\", \"String_Node_Str\", false, rawStuff);\n m_admin.executeTargetTablePut();\n }\n m_admin.flushCommitsTargetTable();\n m_admin.closeTargetTable();\n}\n"
"private ObjectLiteral objectLiteral() throws IOException {\n int pos = ts.tokenBeg, lineno = ts.lineno;\n int afterComma = -1;\n List<ObjectProperty> elems = new ArrayList<ObjectProperty>();\n Set<String> getterNames = null;\n Set<String> setterNames = null;\n if (this.inUseStrictDirective) {\n getterNames = new HashSet<String>();\n setterNames = new HashSet<String>();\n }\n Comment objJsdocNode = getAndResetJsDoc();\n commaLoop: for (; ; ) {\n String propertyName = null;\n int entryKind = PROP_ENTRY;\n int tt = peekToken();\n Comment jsdocNode = getAndResetJsDoc();\n switch(tt) {\n case Token.NAME:\n afterComma = -1;\n Name name = createNameNode();\n propertyName = ts.getString();\n int ppos = ts.tokenBeg;\n consumeToken();\n int peeked = peekToken();\n boolean maybeGetterOrSetter = \"String_Node_Str\".equals(propertyName) || \"String_Node_Str\".equals(propertyName);\n if (maybeGetterOrSetter && peeked != Token.COMMA && peeked != Token.COLON && peeked != Token.RC) {\n boolean isGet = \"String_Node_Str\".equals(propertyName);\n entryKind = isGet ? GET_ENTRY : SET_ENTRY;\n AstNode pname = objliteralProperty();\n if (pname == null) {\n propertyName = null;\n } else {\n propertyName = ts.getString();\n ObjectProperty objectProp = getterSetterProperty(ppos, pname, isGet);\n pname.setJsDocNode(jsdocNode);\n elems.add(objectProp);\n }\n } else {\n AstNode pname = name;\n pname.setJsDocNode(jsdocNode);\n elems.add(plainProperty(pname, tt));\n }\n break;\n case Token.RC:\n if (afterComma != -1)\n warnTrailingComma(pos, elems, afterComma);\n break commaLoop;\n default:\n AstNode pname = objliteralProperty();\n if (pname == null) {\n propertyName = null;\n } else {\n afterComma = -1;\n propertyName = ts.getString();\n pname.setJsDocNode(jsdocNode);\n elems.add(plainProperty(pname, tt));\n }\n break;\n }\n if (this.inUseStrictDirective && propertyName != null) {\n switch(entryKind) {\n case PROP_ENTRY:\n if (getterNames.contains(propertyName) || setterNames.contains(propertyName)) {\n addError(\"String_Node_Str\", propertyName);\n }\n getterNames.add(propertyName);\n setterNames.add(propertyName);\n break;\n case GET_ENTRY:\n if (getterNames.contains(propertyName)) {\n addError(\"String_Node_Str\", propertyName);\n }\n getterNames.add(propertyName);\n break;\n case SET_ENTRY:\n if (setterNames.contains(propertyName)) {\n addError(\"String_Node_Str\", propertyName);\n }\n setterNames.add(propertyName);\n break;\n }\n }\n getAndResetJsDoc();\n jsdocNode = null;\n if (matchToken(Token.COMMA)) {\n afterComma = ts.tokenEnd;\n } else {\n break commaLoop;\n }\n }\n mustMatchToken(Token.RC, \"String_Node_Str\");\n ObjectLiteral pn = new ObjectLiteral(pos, ts.tokenEnd - pos);\n if (objJsdocNode != null) {\n pn.setJsDocNode(objJsdocNode);\n }\n pn.setElements(elems);\n pn.setLineno(lineno);\n return pn;\n}\n"
"public boolean attachISOToVM(long vmId, long isoId, boolean attach) {\n UserVmVO vm = _vmDao.findById(vmId);\n if (vm == null) {\n return false;\n } else if (vm.getState() != State.Running) {\n return true;\n }\n Pair<String, String> isoPathPair = _storageMgr.getAbsoluteIsoPath(isoId, vm.getDataCenterId());\n String isoPath;\n String isoName = _templateDao.findById(isoId).getName();\n if (isoPathPair == null) {\n if (isoName.startsWith(\"String_Node_Str\"))\n isoPath = isoName;\n else {\n s_logger.warn(\"String_Node_Str\");\n return false;\n } else {\n isoPath = isoPathPair.first();\n }\n String vmName = vm.getInstanceName();\n HostVO host = _hostDao.findById(vm.getHostId());\n if (host == null)\n return false;\n AttachIsoCommand cmd = new AttachIsoCommand(vmName, isoPath, attach);\n if (isoPathPair != null)\n cmd.setStoreUrl(isoPathPair.second());\n Answer a = _agentMgr.easySend(vm.getHostId(), cmd);\n return (a != null);\n}\n"
"private void track(String eventName, HashMap<String, Object> attributes, Date date) {\n if ((eventName == null) || (eventName.length() == 0)) {\n eventName = \"String_Node_Str\";\n }\n LQLog.infoVerbose(\"String_Node_Str\" + eventName);\n LQEvent event = new LQEvent(eventName, LQModel.sanitizeAttributes(attributes, isDevelopmentMode), date);\n final String datapoint = new LQDataPoint(mCurrentUser, mDevice, mCurrentSession, event, mLoadedLiquidPackage.getValues(), date).toJSON().toString();\n LQLog.data(datapoint);\n mQueue.execute(new Runnable() {\n public void run() {\n LQEvent event = new LQEvent(finalEventName, finalAttributes, finalDate);\n LQDataPoint dataPoint = new LQDataPoint(finalUser, finalDevice, finalSession, event, mLoadedLiquidPackage.getValues(), finalDate);\n LQLog.data(dataPoint.toJSON().toString());\n mHttpQueuer.addToHttpQueue(LQRequestFactory.createDataPointRequest(dataPoint));\n }\n });\n}\n"
"public Conditional<Entry> apply(final FeatureExpr f, final Stack s) {\n Stack clone = s.copy();\n boolean ref = copyRef ? clone.isRef(0) : false;\n int res = clone.pop();\n if (stackCTX.equivalentTo(f)) {\n stack = new One<>(clone);\n } else {\n stack = ChoiceFactory.create(f, new One<>(clone), stack);\n }\n return new One<>(new Entry(res, ref));\n}\n"
"public static String format(final String messagePattern, final Object[] arguments) {\n final StringBuilder result = getThreadLocalStringBuilder();\n final int argCount = arguments == null ? 0 : arguments.length;\n formatMessage(result, messagePattern, arguments, argCount);\n return result.toString();\n}\n"
"public void setDirectChatRoomsDict(Map<String, List<String>> directChatRoomsDict) {\n if (null != mMetadata) {\n mMetadata.mDirectChatRoomsMap = directChatRoomsDict;\n Log.d(LOG_TAG, \"String_Node_Str\");\n commit();\n }\n}\n"
"public String toString() {\n return matchesReference ? String.format(\"String_Node_Str\", from, readerIndex) : String.format(\"String_Node_Str\", from, to, qualityScore, readerIndex);\n}\n"
"public void errorf(String fmt, Object... args) {\n if (isErrorEnabled())\n log(LEVEL_ERROR, String.format(fmt, args), null);\n}\n"
"private void pullVoteStoryFromNetwork() {\n if (mGetVoteStorySubscription != null) {\n mGetVoteStorySubscription.unsubscribe();\n mGetVoteStorySubscription = null;\n }\n mGetVoteStoryObservable = mGMHService.getVoteStory(ApiModule.VOTE_URL).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).cache();\n mGetVoteStorySubscription = mGetVoteStoryObservable.subscribe(mGetVoteStoryObserver);\n}\n"
"public Result<Record> executeStatementWithResult(DSLContext dsl, String statement, Context context) {\n Connection c = dsl.configuration().connectionProvider().acquire();\n try (PreparedStatement ps = c.prepareStatement(statement)) {\n try (ResultSet resultSet = ps.executeQuery()) {\n return dsl.fetch(resultSet);\n }\n } catch (SQLException ex) {\n throw errorHandler.handleException(context, ex);\n } finally {\n dsl.configuration().connectionProvider().release(c);\n }\n}\n"
"private void checkExtendedColumnTypes(SqlNodeList extendList) {\n final List<RelDataTypeField> extendedFields = SqlValidatorUtil.getExtendedColumns(validator.getTypeFactory(), table, extendList);\n final List<RelDataTypeField> baseFields = getBaseRowType().getFieldList();\n final Map<String, Integer> nameToIndex = SqlValidatorUtil.mapNameToIndex(baseFields);\n for (final RelDataTypeField extendedField : extendedFields) {\n final String extFieldName = extendedField.getName();\n if (nameToIndex.containsKey(extFieldName)) {\n final Integer baseIndex = nameToIndex.get(extFieldName);\n final RelDataType baseType = baseFields.get(baseIndex).getType();\n final RelDataType extType = extendedField.getType();\n if (!extType.equals(baseType)) {\n final Predicate<SqlNode> nameMatches = new PredicateImpl<SqlNode>() {\n\n public boolean apply(SqlNode sqlNode) {\n if (sqlNode instanceof SqlIdentifier) {\n final SqlIdentifier identifier = (SqlIdentifier) sqlNode;\n return Util.last(identifier.names).equals(extendedField.getName());\n }\n return false;\n }\n };\n final SqlNode extColNode = Iterables.find(extendList.getList(), nameMatches);\n throw validator.getValidationErrorFunction().apply(extColNode, RESOURCE.typeNotAssignable(baseFields.get(baseIndex).getName(), baseType.getFullTypeString(), extendedField.getName(), extType.getFullTypeString()));\n }\n }\n }\n}\n"
"private final void _triggerRateEvent(final Time currentTime, final boolean force) throws IllegalActionException {\n if (_debugging) {\n _debugToStdOut(String.format(\"String_Node_Str\", System.identityHashCode(this), currentTime.toString()));\n }\n int currIdx = 0;\n boolean updatedInputVarMdl = false;\n for (Input input : _inputs) {\n assert (input.port.isKnown(0));\n if (input.port.hasToken(0)) {\n final Token token = input.port.get(0);\n final ModelPolynomial ivMdl = _inputVariableModels[currIdx];\n _getModelFromToken(ivMdl, token);\n ivMdl.tMdl = currentTime;\n updatedInputVarMdl = true;\n _inputs.get(currIdx).hasChanged = true;\n if (_debugging) {\n _debugToStdOut(String.format(\"String_Node_Str\", System.identityHashCode(this), currIdx, ivMdl.toString()));\n }\n }\n currIdx++;\n }\n assert (_qssSolver.getInputVariableCount() == currIdx);\n if (force || updatedInputVarMdl || _qssSolver.needRateEvent()) {\n if (_debugging) {\n _debugToStdOut(String.format(\"String_Node_Str\", System.identityHashCode(this), force, updatedInputVarMdl, _qssSolver.needRateEvent()));\n }\n try {\n _qssSolver.triggerRateEvent();\n } catch (Exception ee) {\n throw new IllegalActionException(this, ee, \"String_Node_Str\");\n }\n }\n}\n"
"public Object getValue(BindELContext ctx) {\n return tabbox.getModel().getElementAt(BindTabboxRenderer.this.getRenderedIndex(tabpanels, ntabpanel.getIndex()));\n}\n"
"protected boolean preprocess(AbstractQApiTypeDescriptor root) {\n if (fields != null)\n return false;\n innerTypes = new ArrayList<QApiTypeDescriptor>();\n fields = new ArrayList<Field>();\n if (data != null) {\n for (Map.Entry<String, Object> e : data.entrySet()) {\n Field field = new Field();\n field.name = e.getKey();\n if (field.name.startsWith(\"String_Node_Str\")) {\n field.optional = true;\n field.name = field.name.substring(1);\n field.annotations = \"String_Node_Str\";\n } else if (this instanceof AbstractQApiUnionDescriptor) {\n field.optional = true;\n field.annotations = \"String_Node_Str\";\n } else {\n field.optional = false;\n field.annotations = \"String_Node_Str\";\n }\n field.serializedName = field.name;\n field.name = toJavaName(field.name);\n if (e.getValue() instanceof Map) {\n QApiTypeDescriptor type = new QApiTypeDescriptor();\n type.name = \"String_Node_Str\" + e.getKey();\n type.data = (Map<String, Object>) e.getValue();\n type.preprocess(root);\n root.innerTypes.add(type);\n field.typeName = type.name;\n } else {\n field.typeName = toNestedJavaType(e.getValue());\n }\n if (field.optional)\n field.typeName = toWrappedJavaType(field.typeName);\n fields.add(field);\n }\n }\n return true;\n}\n"
"public boolean containsValueInternal(Data dataValue) {\n final NodeEngine nodeEngine = getNodeEngine();\n try {\n ContainsValueOperation containsValueOperation = new ContainsValueOperation(name, dataValue);\n Map<Integer, Object> results = nodeEngine.getOperationService().invokeOnAllPartitions(SERVICE_NAME, containsValueOperation);\n for (Object result : results.values()) {\n Boolean contains = (Boolean) getService().toObject(result);\n if (contains)\n return true;\n }\n return false;\n } catch (Throwable t) {\n throw ExceptionUtil.rethrow(t);\n }\n}\n"
"public void filterQuerySucceeded(FilterQuery query) {\n if (currentFilterQuery.equals(query))\n filterQueryFinished(query, true);\n}\n"
"public void testErmaGradient2WordGlobalFactor() {\n double[] root = new double[] { 1.0, 1.0 };\n double[][] child = new double[][] { { 0.0, 1.0 }, { 1.0, 0.0 } };\n FgAndLinks fgl = ProjDepTreeFactorTest.getFgl(root, child, logDomain);\n FactorGraph fg = fgl.fg;\n LinkVar[] rootVars = fgl.rootVars;\n LinkVar[][] childVars = fgl.childVars;\n VarConfig goldConfig = new VarConfig();\n goldConfig.put(rootVars[0], 0);\n goldConfig.put(rootVars[1], 1);\n goldConfig.put(childVars[0][1], 0);\n goldConfig.put(childVars[1][0], 1);\n ErmaErFn fn = new ErmaErFn(fg, goldConfig);\n testGradientByFiniteDifferences(fn);\n}\n"
"public void init(WorkerContext<DTMasterParams, DTWorkerParams> context) {\n Properties props = context.getProps();\n try {\n SourceType sourceType = SourceType.valueOf(props.getProperty(CommonConstants.MODELSET_SOURCE_TYPE, SourceType.HDFS.toString()));\n this.modelConfig = CommonUtils.loadModelConfig(props.getProperty(CommonConstants.SHIFU_MODEL_CONFIG), sourceType);\n this.columnConfigList = CommonUtils.loadColumnConfigList(props.getProperty(CommonConstants.SHIFU_COLUMN_CONFIG), sourceType);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n this.columnCategoryIndexMapping = new HashMap<Integer, Map<String, Integer>>();\n for (ColumnConfig config : this.columnConfigList) {\n if (config.isCategorical()) {\n if (config.getBinCategory() != null) {\n Map<String, Integer> tmpMap = new HashMap<String, Integer>();\n for (int i = 0; i < config.getBinCategory().size(); i++) {\n tmpMap.put(config.getBinCategory().get(i), i);\n }\n this.columnCategoryIndexMapping.put(config.getColumnNum(), tmpMap);\n }\n }\n }\n Integer kCrossValidation = this.modelConfig.getTrain().getNumKFold();\n if (kCrossValidation != null && kCrossValidation > 0) {\n isKFoldCV = true;\n }\n Double upSampleWeight = modelConfig.getTrain().getUpSampleWeight();\n if (Double.compare(upSampleWeight, 1d) != 0 && (modelConfig.isRegression() || (modelConfig.isClassification() && modelConfig.getTrain().isOneVsAll()))) {\n LOG.info(\"String_Node_Str\", upSampleWeight);\n this.upSampleRng = new PoissonDistribution(upSampleWeight - 1);\n }\n this.isContinuousEnabled = Boolean.TRUE.toString().equalsIgnoreCase(context.getProps().getProperty(CommonConstants.CONTINUOUS_TRAINING));\n this.workerThreadCount = modelConfig.getTrain().getWorkerThreadCount();\n this.threadPool = Executors.newFixedThreadPool(this.workerThreadCount);\n context.addCompletionCallBack(new WorkerCompletionCallBack<DTMasterParams, DTWorkerParams>() {\n public void callback(WorkerContext<DTMasterParams, DTWorkerParams> context) {\n DTWorker.this.threadPool.shutdownNow();\n try {\n DTWorker.this.threadPool.awaitTermination(2, TimeUnit.SECONDS);\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n }\n });\n this.trainerId = Integer.valueOf(context.getProps().getProperty(CommonConstants.SHIFU_TRAINER_ID, \"String_Node_Str\"));\n this.isOneVsAll = modelConfig.isClassification() && modelConfig.getTrain().isOneVsAll();\n GridSearch gs = new GridSearch(modelConfig.getTrain().getParams());\n Map<String, Object> validParams = this.modelConfig.getTrain().getParams();\n if (gs.hasHyperParam()) {\n validParams = gs.getParams(this.trainerId);\n LOG.info(\"String_Node_Str\", validParams);\n }\n this.treeNum = Integer.valueOf(validParams.get(\"String_Node_Str\").toString());\n double memoryFraction = Double.valueOf(context.getProps().getProperty(\"String_Node_Str\", \"String_Node_Str\"));\n LOG.info(\"String_Node_Str\", Runtime.getRuntime().maxMemory(), memoryFraction);\n double validationRate = this.modelConfig.getValidSetRate();\n if (StringUtils.isNotBlank(modelConfig.getValidationDataSetRawPath())) {\n this.trainingData = new MemoryLimitedList<Data>((long) (Runtime.getRuntime().maxMemory() * memoryFraction * 0.6), new ArrayList<Data>());\n this.validationData = new MemoryLimitedList<Data>((long) (Runtime.getRuntime().maxMemory() * memoryFraction * 0.4), new ArrayList<Data>());\n } else {\n if (Double.compare(validationRate, 0d) != 0) {\n this.trainingData = new MemoryLimitedList<Data>((long) (Runtime.getRuntime().maxMemory() * memoryFraction * (1 - validationRate)), new ArrayList<Data>());\n this.validationData = new MemoryLimitedList<Data>((long) (Runtime.getRuntime().maxMemory() * memoryFraction * validationRate), new ArrayList<Data>());\n } else {\n this.trainingData = new MemoryLimitedList<Data>((long) (Runtime.getRuntime().maxMemory() * memoryFraction), new ArrayList<Data>());\n }\n }\n int[] inputOutputIndex = DTrainUtils.getNumericAndCategoricalInputAndOutputCounts(this.columnConfigList);\n this.inputCount = inputOutputIndex[0] + inputOutputIndex[1];\n this.isAfterVarSelect = (inputOutputIndex[3] == 1);\n this.isManualValidation = (modelConfig.getValidationDataSetRawPath() != null && !\"String_Node_Str\".equals(modelConfig.getValidationDataSetRawPath()));\n int numClasses = this.modelConfig.isClassification() ? this.modelConfig.getTags().size() : 2;\n String imStr = validParams.get(\"String_Node_Str\").toString();\n int minInstancesPerNode = Integer.valueOf(validParams.get(\"String_Node_Str\").toString());\n double minInfoGain = Double.valueOf(validParams.get(\"String_Node_Str\").toString());\n if (imStr.equalsIgnoreCase(\"String_Node_Str\")) {\n impurity = new Entropy(numClasses, minInstancesPerNode, minInfoGain);\n } else if (imStr.equalsIgnoreCase(\"String_Node_Str\")) {\n impurity = new Gini(numClasses, minInstancesPerNode, minInfoGain);\n } else if (imStr.equalsIgnoreCase(\"String_Node_Str\")) {\n impurity = new FriedmanMSE(minInstancesPerNode, minInfoGain);\n } else {\n impurity = new Variance(minInstancesPerNode, minInfoGain);\n }\n this.isRF = ALGORITHM.RF.toString().equalsIgnoreCase(modelConfig.getAlgorithm());\n this.isGBDT = ALGORITHM.GBT.toString().equalsIgnoreCase(modelConfig.getAlgorithm());\n String lossStr = validParams.get(\"String_Node_Str\").toString();\n if (lossStr.equalsIgnoreCase(\"String_Node_Str\")) {\n this.loss = new LogLoss();\n } else if (lossStr.equalsIgnoreCase(\"String_Node_Str\")) {\n this.loss = new AbsoluteLoss();\n } else if (lossStr.equalsIgnoreCase(\"String_Node_Str\")) {\n this.loss = new HalfGradSquaredLoss();\n } else if (lossStr.equalsIgnoreCase(\"String_Node_Str\")) {\n this.loss = new SquaredLoss();\n } else {\n try {\n this.loss = (Loss) ClassUtils.newInstance(Class.forName(lossStr));\n } catch (ClassNotFoundException e) {\n LOG.warn(\"String_Node_Str\", lossStr);\n this.loss = new SquaredLoss();\n }\n }\n if (this.isGBDT) {\n this.learningRate = Double.valueOf(validParams.get(CommonConstants.LEARNING_RATE).toString());\n Object swrObj = validParams.get(\"String_Node_Str\");\n if (swrObj != null) {\n this.gbdtSampleWithReplacement = Boolean.TRUE.toString().equalsIgnoreCase(swrObj.toString());\n }\n Object dropoutObj = validParams.get(CommonConstants.DROPOUT_RATE);\n if (dropoutObj != null) {\n this.dropOutRate = Double.valueOf(dropoutObj.toString());\n }\n }\n this.isStratifiedSampling = this.modelConfig.getTrain().getStratifiedSample();\n this.checkpointOutput = new Path(context.getProps().getProperty(CommonConstants.SHIFU_DT_MASTER_CHECKPOINT_FOLDER, \"String_Node_Str\" + context.getAppId()));\n LOG.info(\"String_Node_Str\", isAfterVarSelect, treeNum, impurity.getClass().getName(), loss.getClass().getName(), this.learningRate, this.gbdtSampleWithReplacement, this.isRF, this.isGBDT, this.isStratifiedSampling, this.isKFoldCV, kCrossValidation, this.dropOutRate);\n if (!context.isFirstIteration()) {\n if (this.isGBDT) {\n isNeedRecoverGBDTPredict = true;\n } else {\n recoverTrees = context.getLastMasterResult().getTrees();\n }\n }\n if (context.isFirstIteration() && this.isContinuousEnabled && this.isGBDT) {\n Path modelPath = new Path(context.getProps().getProperty(CommonConstants.GUAGUA_OUTPUT));\n TreeModel existingModel = null;\n try {\n existingModel = (TreeModel) CommonUtils.loadModel(modelConfig, modelPath, ShifuFileUtils.getFileSystemBySourceType(this.modelConfig.getDataSet().getSource()));\n } catch (IOException e) {\n LOG.error(\"String_Node_Str\", e);\n }\n if (existingModel == null) {\n LOG.warn(\"String_Node_Str\");\n return;\n } else {\n recoverTrees = existingModel.getTrees();\n LOG.info(\"String_Node_Str\", recoverTrees.size());\n }\n }\n}\n"
"private boolean nextMinKey() {\n return Arrays.stream(nextList).filter(opt -> opt.isPresent()).map(opt -> opt.get().getSecond()).min((k, k2) -> k.compareTo(k2)).map(k -> {\n minKeyVal = k;\n return k;\n }).isPresent();\n}\n"
"public void handleSelectionUpdate(ISelectionDelta selectionDelta, boolean scrollToSelection, String info) {\n if (pathway == null)\n return;\n if (selectionDelta.getIDType() == mappingDataDomain.getDimensionIDType()) {\n for (SelectionDeltaItem item : selectionDelta.getAllItems()) {\n if (item.getSelectionType() == SelectionType.MOUSE_OVER && !item.isRemove()) {\n iCurrentDimensionIndex = item.getPrimaryID();\n break;\n }\n }\n setDisplayListDirty();\n } else if (selectionDelta.getIDType().getIDCategory() == mappingDataDomain.getRecordIDCategory()) {\n ISelectionDelta resolvedDelta = resolveExternalSelectionDelta(selectionDelta);\n selectionManager.setDelta(resolvedDelta);\n setDisplayListDirty();\n int iPathwayHeight = pathway.getHeight();\n for (SelectionDeltaItem item : resolvedDelta) {\n if (item.getSelectionType() != SelectionType.MOUSE_OVER && item.getSelectionType() != SelectionType.SELECTION) {\n continue;\n }\n PathwayVertexGraphItemRep vertexRep = (PathwayVertexGraphItemRep) pathwayItemManager.getItem(item.getPrimaryID());\n int viewID = uniqueID;\n SelectedElementRep elementRep = new SelectedElementRep(mappingDataDomain.getRecordIDType(), viewID, vertexRep.getXOrigin() * PathwayRenderStyle.SCALING_FACTOR_X * vecScaling.x() + vecTranslation.x(), (iPathwayHeight - vertexRep.getYOrigin()) * PathwayRenderStyle.SCALING_FACTOR_Y * vecScaling.y() + vecTranslation.y(), 0);\n for (Integer iConnectionID : item.getConnectionIDs()) {\n connectedElementRepresentationManager.addSelection(iConnectionID, elementRep, item.getSelectionType());\n }\n }\n }\n}\n"
"public boolean isVisible(ICellContent cell) {\n IElement parent = cell.getParent();\n if (parent instanceof IContent) {\n if (LayoutUtil.isHidden(((IContent) parent), format, context.getOutputDisplayNone(), hiddenMask)) {\n return false;\n }\n }\n IColumn column = cell.getColumnInstance();\n if (column == null) {\n return false;\n }\n if (isColumnHidden(column)) {\n return false;\n }\n return true;\n}\n"
"public Result rollbackTx(Transaction tx) {\n if (tx == null) {\n return Result.getFailed(LedgerErrorCode.NULL_PARAMETER);\n }\n try {\n Result result = rollbackCoinData(tx);\n if (result.isFailed()) {\n return result;\n }\n result = utxoLedgerTransactionStorageService.deleteTx(tx);\n return result;\n } catch (Exception e) {\n Log.error(e);\n return Result.getFailed(e.getMessage());\n }\n}\n"
"public boolean onTouchEvent(MotionEvent event) {\n boolean retVal = mScaleGestureDetector.onTouchEvent(event);\n retVal = mGestureDetector.onTouchEvent(event) || retVal;\n final int action = MotionEventCompat.getActionMasked(event);\n if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL || action == MotionEvent.ACTION_POINTER_UP) {\n mGestureListener.finish();\n }\n return retVal || super.onTouchEvent(event);\n}\n"
"public TestErrorEvent execute() throws JBException {\n IParamDescriptionPO desc = m_currentCap.getParameterForUniqueId(\"String_Node_Str\");\n try {\n ITDManager tdManager = m_externalTestDataBP.getExternalCheckedTDManager(m_currentCap);\n ITestDataPO date = tdManager.getCell(0, desc);\n String runLocal = this.getValueForParam(date, m_currentCap, desc);\n if (Boolean.valueOf(runLocal)) {\n desc = m_currentCap.getParameterForUniqueId(\"String_Node_Str\");\n date = tdManager.getCell(0, desc);\n String cmd = this.getValueForParam(date, m_currentCap, desc);\n desc = m_currentCap.getParameterForUniqueId(COMP_SYSTEM_TIMEOUT);\n date = tdManager.getCell(0, desc);\n int timeout = Integer.parseInt(this.getValueForParam(date, m_currentCap, desc));\n desc = m_currentCap.getParameterForUniqueId(\"String_Node_Str\");\n date = tdManager.getCell(0, desc);\n int expectedExitCode = Integer.parseInt(this.getValueForParam(date, m_currentCap, desc));\n File dataDir = ExternalTestDataBP.getDataDir();\n MonitorTask mt = new ExternalCommandExecutor().executeCommand(dataDir, cmd, timeout);\n if (!mt.wasCmdValid()) {\n return EventFactory.createActionError(TestErrorEvent.NO_SUCH_COMMAND);\n }\n if (mt.hasTimeoutOccurred()) {\n return EventFactory.createActionError(TestErrorEvent.CONFIRMATION_TIMEOUT);\n }\n int actualExitValue = mt.getExitCode();\n if (actualExitValue != expectedExitCode) {\n return EventFactory.createVerifyFailed(String.valueOf(expectedExitCode), String.valueOf(actualExitValue));\n }\n }\n } catch (IllegalArgumentException e) {\n throw new JBException(\"String_Node_Str\", e, MessageIDs.E_STEP_EXEC);\n } catch (InvalidDataException e) {\n throw new JBException(\"String_Node_Str\", e, MessageIDs.E_STEP_EXEC);\n }\n return null;\n}\n"
"public static void main(String[] args) {\n String configFile = null;\n String subscriptionFolderPath = null;\n try {\n configFile = args[0];\n subscriptionFolderPath = args[1];\n } catch (Exception e) {\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n System.exit(-1);\n }\n Subscriber subscriber = new Subscriber(new File(configFile));\n subscriber.setNotificationListener(new NotificationListener() {\n public void notify(UUID subscriberId, String subscriberName, Publication publication) {\n HashtablePublication notification = (HashtablePublication) publication;\n HashMap<String, Object> receivedData = notification.getProperties();\n System.out.println(\"String_Node_Str\");\n System.out.println(publication);\n System.out.println();\n }\n public void notify(UUID subscriberId, String subscriberName, Subscription subscription) {\n }\n });\n subscriber.connect();\n File subscriptionFolder = new File(\"String_Node_Str\" + File.separator + \"String_Node_Str\");\n for (File content : subscriptionFolder.listFiles()) {\n if (content.getName().startsWith(\"String_Node_Str\")) {\n subscriber.subscribeFromXMLFile(content.getName());\n }\n }\n}\n"
"public void testRemoteServiceAdapters() throws Exception {\n final IRemoteServiceContainerAdapter[] adapters = getRemoteServiceAdapters();\n assertNotNull(adapters);\n for (int i = 0; i < adapters.length; i++) assertNotNull(adapters[i]);\n}\n"
"public boolean offer(ResultFile resultFile) {\n if (resultFile != null) {\n if (maxFiles > 0 && fileQueue.size() >= maxFiles) {\n poll();\n }\n return fileQueue.offer(resultFile);\n } else\n return false;\n}\n"
"public static Kernel1D_F64 wrap(double[] data, int width) {\n Kernel1D_F64 ret = new Kernel1D_F64();\n ret.data = data;\n ret.width = width;\n ret.offset = offset;\n return ret;\n}\n"
"public IType resolveType(ITypeVariable typeVar, IType concrete) {\n return concrete.isArrayType() ? this.type.resolveType(typeVar, concrete.getElementType()) : Types.ANY;\n}\n"
"private void writeGwtFields(IndentedWriter niceWriter) throws UnableToCompleteException {\n Collection<OwnerField> ownerFields = getOwnerClass().getUiFields();\n for (OwnerField ownerField : ownerFields) {\n if (ownerField.isProvided()) {\n String fieldName = ownerField.getName();\n FieldWriter fieldWriter = fieldManager.lookup(fieldName);\n if (fieldWriter != null) {\n fieldManager.lookup(fieldName).setInitializerMaybe(formatCode(\"String_Node_Str\", fieldName));\n }\n }\n }\n fieldManager.writeGwtFieldsDeclaration(niceWriter, uiOwnerType.getName());\n}\n"
"public Object executeMethod(String methodName, JSONObject args) throws Exception {\n if (\"String_Node_Str\".equals(methodName)) {\n IFoundSetInternal foundset = FoundsetReferencePropertyType.INSTANCE.fromJSON(args, null, null, null, null);\n String sort = args.optString(\"String_Node_Str\");\n if (!\"String_Node_Str\".equals(sort)) {\n foundset.setSort(sort);\n }\n FoundsetTypeSabloValue value = getFoundsetTypeSabloValue(foundset, args.optJSONObject(\"String_Node_Str\"));\n PropertyDescription foundsetProperty = new PropertyDescription(\"String_Node_Str\", FoundsetPropertyType.INSTANCE);\n return new TypedData<FoundsetTypeSabloValue>(value, foundsetProperty);\n } else if (\"String_Node_Str\".equals(methodName)) {\n IFoundSetInternal foundset = FoundsetReferencePropertyType.INSTANCE.fromJSON(args, null, null, null);\n String rowid = args.optString(\"String_Node_Str\");\n String relation = args.optString(\"String_Node_Str\");\n Pair<String, Integer> splitHashAndIndex = FoundsetTypeSabloValue.splitPKHashAndIndex(rowid);\n int recordIndex = foundset.getRecordIndex(splitHashAndIndex.getLeft(), splitHashAndIndex.getRight().intValue());\n if (recordIndex != -1) {\n IRecordInternal record = foundset.getRecord(recordIndex);\n Object o = record.getValue(relation);\n if (o instanceof IFoundSetInternal) {\n IFoundSetInternal relatedFoundset = (IFoundSetInternal) o;\n PropertyDescription foundsetRefProperty = new PropertyDescription(\"String_Node_Str\", FoundsetReferencePropertyType.INSTANCE);\n return new TypedData<IFoundSetInternal>(relatedFoundset, foundsetRefProperty);\n }\n }\n } else if (\"String_Node_Str\".equals(methodName)) {\n IFoundSetInternal foundset = FoundsetReferencePropertyType.INSTANCE.fromJSON(args, null, null, null);\n String rowid = args.optString(\"String_Node_Str\");\n String dataproviderid = args.optString(\"String_Node_Str\");\n Object value = args.get(\"String_Node_Str\");\n Pair<String, Integer> splitHashAndIndex = FoundsetTypeSabloValue.splitPKHashAndIndex(rowid);\n int recordIndex = foundset.getRecordIndex(splitHashAndIndex.getLeft(), splitHashAndIndex.getRight().intValue());\n if (recordIndex != -1) {\n IRecordInternal record = foundset.getRecord(recordIndex);\n if (record.startEditing()) {\n record.setValue(dataproviderid, value);\n return Boolean.TRUE;\n }\n }\n }\n return null;\n}\n"
"public void testValidity() throws Exception {\n DefaultJAXWSValidator validator = new DefaultJAXWSValidator();\n TypeDeclaration declaration = getDeclaration(\"String_Node_Str\");\n assertFalse(validator.isEndpointInterface(declaration));\n try {\n new EndpointInterface(declaration, validator);\n fail(\"String_Node_Str\");\n } catch (ValidationException e) {\n }\n declaration = getDeclaration(\"String_Node_Str\");\n assertTrue(validator.isEndpointInterface(declaration));\n try {\n new EndpointInterface(declaration, validator);\n fail(\"String_Node_Str\");\n } catch (IllegalArgumentException e) {\n }\n declaration = getDeclaration(\"String_Node_Str\");\n assertTrue(validator.isEndpointInterface(declaration));\n try {\n new EndpointInterface(declaration, validator);\n fail(\"String_Node_Str\");\n } catch (IllegalArgumentException e) {\n }\n declaration = getDeclaration(\"String_Node_Str\");\n assertTrue(validator.isEndpointInterface(declaration));\n try {\n new EndpointInterface(declaration, validator);\n fail(\"String_Node_Str\");\n } catch (IllegalArgumentException e) {\n }\n}\n"
"public void map(Chunk chk, NewChunk nc) {\n int chunkSize = chk.len();\n long chunkStart = chk.start();\n ValueString vstr = new ValueString();\n if (chunkStart > R.end() || (chunkStart + chunkSize) < R.start()) {\n return;\n }\n for (int r = 0; r < chunkSize; r++) {\n if (!R.contains(chunkStart + r)) {\n continue;\n }\n nc.addStr(chk.atStr(vstr, r));\n }\n}\n"
"public void writeGet(MethodWriter writer, IValue instance, int lineNumber) throws BytecodeException {\n if (instance != null) {\n instance.writeExpression(writer, this.theClass.getType());\n }\n if (this.theClass.hasModifier(Modifiers.ANNOTATION)) {\n StringBuilder desc = new StringBuilder(\"String_Node_Str\");\n this.type.appendExtendedName(desc);\n writer.writeInvokeInsn(Opcodes.INVOKEINTERFACE, this.theClass.getInternalName(), this.name.qualified, desc.toString(), true);\n } else {\n writer.writeFieldInsn(Opcodes.GETFIELD, this.theClass.getInternalName(), this.name.qualified, this.getDescription());\n }\n}\n"
"public void start(Stage stage) {\n this.testButton = new Button();\n final AnchorPane testPane = new AnchorPane(this.testButton);\n stage.setScene(new Scene(testPane, WIDTH_PANE, HEIGHT_PANE));\n stage.show();\n}\n"
"public void forceTTLExpire() throws Exception {\n healthService.register(\"String_Node_Str\", 1, TimeUnit.SECONDS);\n healthService.checkIn(\"String_Node_Str\", HealthStatus.PASS);\n countDownLatch = new CountDownLatch(1);\n result = new AtomicBoolean();\n healthService.findAllNodes(names -> {\n result.set(names.stream().anyMatch(s -> s.equals(\"String_Node_Str\")));\n countDownLatch.countDown();\n });\n countDownLatch.await(10, TimeUnit.SECONDS);\n assertTrue(\"String_Node_Str\", result.get());\n timer.setTime();\n timer.minutes(1);\n Sys.sleep(1000);\n healthService.clientProxyFlush();\n final CountDownLatch countDownLatch2 = new CountDownLatch(1);\n result.set(false);\n healthService.findHealthyNodes(names -> {\n result.set(!names.stream().anyMatch(s -> s.equals(\"String_Node_Str\")));\n countDownLatch.countDown();\n });\n countDownLatch.await(10, TimeUnit.SECONDS);\n assertTrue(\"String_Node_Str\", result.get());\n}\n"
"public void stop() {\n try {\n this.context.unregisterReceiver(broadcastReceiver);\n } catch (IllegalArgumentException e) {\n Timber.w(e, \"String_Node_Str\");\n }\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n resetNetworkBindings((ConnectivityManager.NetworkCallback) netReqCb);\n }\n}\n"
"public void attributeTypeChanged(Attribute attribute) throws IllegalActionException {\n if (attribute == values) {\n Director director = getDirector();\n if (director != null) {\n director.invalidateResolvedTypes();\n }\n try {\n ArrayToken valuesArray = (ArrayToken) values.getToken();\n Token prototype = valuesArray.getElement(0);\n _zero = prototype.zero();\n } catch (ArrayIndexOutOfBoundsException ex) {\n throw new IllegalActionException(this, \"String_Node_Str\");\n } catch (ClassCastException ex) {\n throw new IllegalActionException(this, \"String_Node_Str\" + values.getToken());\n }\n } else {\n super.attributeTypeChanged(attribute);\n }\n}\n"
"public void removeAllLimitLines() {\n mLimitLines.clear();\n}\n"
"private void renderArch(GL2 gl) {\n gl.glColor3f(1, 0, 0);\n gl.glColor4f(0.5f, 0.5f, 0.5f, 1f);\n gl.glBegin(GL2.GL_POLYGON);\n gl.glVertex3f(0, 0, 0f);\n gl.glVertex3f(0, archBottomY, 0f);\n gl.glVertex3f(sideArchThickness, archBottomY, 0f);\n gl.glVertex3f(sideArchThickness, 0, 0f);\n gl.glEnd();\n ArrayList<Vec3f> inputPoints = new ArrayList<Vec3f>();\n inputPoints.add(new Vec3f(0, archBottomY, 0));\n inputPoints.add(new Vec3f(0, archTopY, 0));\n inputPoints.add(new Vec3f(archInnerWidth * 0.9f, archTopY, 0));\n NURBSCurve curve = new NURBSCurve(inputPoints, 10);\n ArrayList<Vec3f> outputPoints = curve.getCurvePoints();\n outputPoints.add(new Vec3f(archInnerWidth, archTopY, 0));\n outputPoints.add(new Vec3f(archInnerWidth, archBottomY, 0));\n inputPoints.clear();\n inputPoints.add(new Vec3f(archInnerWidth, archBottomY, 0));\n inputPoints.add(new Vec3f(archWidth, archBottomY, 0));\n inputPoints.add(new Vec3f(archWidth, archBottomY * 0.8f, 0));\n curve = new NURBSCurve(inputPoints, 10);\n outputPoints.addAll(curve.getCurvePoints());\n connectionRenderer.render(gl, outputPoints);\n gl.glBegin(GL2.GL_POLYGON);\n gl.glVertex3f(viewFrustum.getWidth(), 0, 0f);\n gl.glVertex3f(viewFrustum.getWidth(), archBottomY, 0f);\n gl.glVertex3f(viewFrustum.getWidth() - archWidth, archBottomY, 0f);\n gl.glVertex3f(viewFrustum.getWidth() - archWidth, 0, 0f);\n gl.glEnd();\n inputPoints.clear();\n inputPoints.add(new Vec3f(viewFrustum.getWidth(), archBottomY, 0));\n inputPoints.add(new Vec3f(viewFrustum.getWidth(), archTopY, 0));\n inputPoints.add(new Vec3f(viewFrustum.getWidth() - archInnerWidth * 0.9f, archTopY, 0));\n curve = new NURBSCurve(inputPoints, 10);\n outputPoints.clear();\n outputPoints.addAll(curve.getCurvePoints());\n outputPoints.add(new Vec3f(viewFrustum.getWidth() - archInnerWidth, archTopY, 0));\n outputPoints.add(new Vec3f(viewFrustum.getWidth() - archInnerWidth, archBottomY, 0));\n inputPoints.clear();\n inputPoints.add(new Vec3f(viewFrustum.getWidth() - archInnerWidth, archBottomY, 0));\n inputPoints.add(new Vec3f(viewFrustum.getWidth() - archWidth, archBottomY, 0));\n inputPoints.add(new Vec3f(viewFrustum.getWidth() - archWidth, archBottomY * 0.8f, 0));\n curve = new NURBSCurve(inputPoints, 10);\n outputPoints.addAll(curve.getCurvePoints());\n connectionRenderer.render(gl, outputPoints);\n gl.glBegin(GL2.GL_POLYGON);\n gl.glVertex3f(archInnerWidth, archTopY, 0f);\n gl.glVertex3f(archInnerWidth, archBottomY, 0f);\n gl.glVertex3f(viewFrustum.getWidth() - archInnerWidth, archBottomY, 0f);\n gl.glVertex3f(viewFrustum.getWidth() - archInnerWidth, archTopY, 0f);\n gl.glEnd();\n}\n"
"protected boolean resolveEnvironmentVariables(Map<String, String> envVariables) {\n List<EnvironmentVariable> vars = serviceCommand.getEnvironmentVariables();\n boolean shouldPrompt = false;\n if (vars != null) {\n for (EnvironmentVariable var : vars) {\n String valueVar = EnvironmentVariable.getValueVariable(var);\n String value = var.getValue();\n if (valueVar != null) {\n value = resolveTunnelVariable(valueVar);\n if (value == null) {\n shouldPrompt = true;\n }\n }\n envVariables.put(var.getVariable(), value);\n }\n }\n return shouldPrompt;\n}\n"
"public boolean isCompleted() {\n return totalRecordsCount == totalProcessedRecordsCount.get();\n}\n"
"private void updateNamedRanges(XSSFWorkbook wb, PtgShifter shifter) {\n XSSFEvaluationWorkbook fpb = XSSFEvaluationWorkbook.create(wb);\n for (int i = 0; i < wb.getNumberOfNames(); i++) {\n XSSFName name = wb.getNameAt(i);\n String formula = name.getRefersToFormula();\n int sheetIndex = name.getSheetIndex();\n if (formula != null) {\n Ptg[] ptgs = FormulaParser.parse(formula, fpb, FormulaType.NAMEDRANGE, sheetIndex);\n if (shifter.adjustFormula(ptgs, sheetIndex)) {\n String shiftedFmla = FormulaRenderer.toFormulaString(fpb, ptgs);\n name.setRefersToFormula(shiftedFmla);\n }\n }\n }\n}\n"
"private void addDevice(String deviceId) throws IoTFCReSTException {\n try {\n String deviceToBeAdded = \"String_Node_Str\" + deviceId + \"String_Node_Str\";\n JsonParser parser = new JsonParser();\n JsonElement input = parser.parse(deviceToBeAdded);\n JsonObject response = this.gwClient.api().registerDeviceUnderGateway(deviceType, this.gwDeviceId, this.gwDeviceType, input);\n System.out.println(response);\n } catch (IoTFCReSTException e) {\n System.out.println(\"String_Node_Str\" + e.getHttpCode() + \"String_Node_Str\" + e.getMessage());\n System.out.println(e.getResponse());\n }\n}\n"
"private AnnotationSet findLinkGroupIntervals(List<FabricLink> linkSet, BTProgressMonitor monitor) throws AsynchExitRequestException {\n LoopReporter lr = new LoopReporter(linkSet.size(), 20, monitor, 0, .25, \"String_Node_Str\");\n AnnotationSet annots = new AnnotationSet();\n int startIdx = 0;\n String currentRel = linkSet.get(startIdx).getRelation();\n for (int index = 0; index <= linkSet.size(); index++) {\n lr.report();\n if (index == linkSet.size()) {\n int endIdx = linkSet.size() - 1;\n AnnotationSet.Annot annot = new AnnotationSet.Annot(currentRel, startIdx, endIdx, 0, null);\n annots.addAnnot(annot);\n } else if (!linkSet.get(index).getRelation().equals(currentRel)) {\n int endIdx = index - 1;\n AnnotationSet.Annot annot = new AnnotationSet.Annot(currentRel, startIdx, endIdx, 0);\n annots.addAnnot(annot);\n startIdx = index;\n currentRel = linkSet.get(index).getRelation();\n }\n }\n return (annots);\n}\n"
"public void testArrayLiteralUsedGenericallyDoesntCrash() {\n checkNoWarnings(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n}\n"
"public int run() throws Exception {\n log.info(\"String_Node_Str\");\n long start = System.currentTimeMillis();\n try {\n setUp(ModelStep.VARSELECT);\n if (isToReset) {\n resetAllFinalSelect();\n } else {\n String alg = super.getModelConfig().getTrain().getAlgorithm();\n if (!CommonUtils.isDesicionTreeAlgorithm(alg)) {\n validateNormalize();\n }\n syncDataToHdfs(super.modelConfig.getDataSet().getSource());\n VariableSelector selector = new VariableSelector(this.modelConfig, this.columnConfigList);\n if (!modelConfig.getVarSelectWrapperEnabled()) {\n if (modelConfig.isRegression()) {\n CommonUtils.updateColumnConfigFlags(modelConfig, columnConfigList);\n this.columnConfigList = selector.selectByFilter();\n } else {\n for (ColumnConfig config : this.columnConfigList) {\n if (CommonUtils.isGoodCandidate(modelConfig.isRegression(), config)) {\n config.setFinalSelect(true);\n }\n }\n }\n } else {\n if (super.getModelConfig().getDataSet().getSource() == SourceType.HDFS && super.getModelConfig().isMapReduceRunMode()) {\n if (Constants.WRAPPER_BY_SE.equalsIgnoreCase(modelConfig.getVarSelect().getWrapperBy()) || Constants.WRAPPER_BY_REMOVE.equalsIgnoreCase(modelConfig.getVarSelect().getWrapperBy())) {\n validateDistributedWrapperVarSelect();\n syncDataToHdfs(super.modelConfig.getDataSet().getSource());\n distributedSEWrapper();\n } else if (Constants.WRAPPER_BY_VOTED.equalsIgnoreCase(modelConfig.getVarSelect().getWrapperBy())) {\n votedVariablesSelection();\n } else if (Constants.WRAPPER_BY_FI.equalsIgnoreCase(modelConfig.getVarSelect().getWrapperBy())) {\n List<BasicML> models = CommonUtils.loadBasicModels(this.modelConfig, this.columnConfigList, null);\n if (models == null || models.size() < 1) {\n TrainModelProcessor trainModelProcessor = new TrainModelProcessor();\n trainModelProcessor.setForVarSelect(true);\n trainModelProcessor.run();\n }\n List<Map<Integer, MutablePair<String, Double>>> importanceList = new ArrayList<Map<Integer, MutablePair<String, Double>>>();\n Map<Integer, MutablePair<String, Double>> mergedResult = null;\n log.info(\"String_Node_Str\" + models.size());\n for (BasicML basicModel : models) {\n if (basicModel instanceof TreeModel) {\n TreeModel model = (TreeModel) basicModel;\n Map<Integer, MutablePair<String, Double>> importances = model.getFeatureImportances();\n importanceList.add(importances);\n }\n }\n if (importanceList.size() < 1) {\n log.error(\"String_Node_Str\");\n return -1;\n }\n mergedResult = this.mergeImportanceList(importanceList);\n this.writeFeatureImportance(mergedResult);\n if (super.modelConfig.getVarSelect().getFilterBySE()) {\n this.postProcessFIVarSelect(mergedResult);\n }\n }\n } else {\n wrapper(selector);\n }\n }\n }\n clearUp(ModelStep.VARSELECT);\n } catch (Exception e) {\n log.error(\"String_Node_Str\", e);\n return -1;\n }\n log.info(\"String_Node_Str\", (System.currentTimeMillis() - start));\n return 0;\n}\n"
"private void update(PlayerTablistHandler tablistHandler) {\n if (tablistHandler.getPlayer().getServer() != null) {\n if (BungeeTabListPlus.getInstance().getConfigManager().getMainConfig().excludeServers.contains(tablistHandler.getPlayer().getServer().getInfo().getName()) || tablistHandler.isExcluded()) {\n tablistHandler.unload();\n return;\n }\n }\n ITabListProvider tlp = BungeeTabListPlus.getInstance().getTabListManager().getTabListForPlayer(tablistHandler.getPlayer());\n if (tlp == null) {\n tablistHandler.exclude();\n tablistHandler.unload();\n return;\n }\n ITabList tabList = new TabList();\n try {\n tlp.fillTabList(tablistHandler.getPlayer(), tabList, context);\n } catch (LayoutException ex) {\n BungeeTabListPlus.getInstance().getLogger().log(Level.WARNING, \"String_Node_Str\", ex);\n } catch (Throwable th) {\n BungeeTabListPlus.getInstance().getLogger().log(Level.SEVERE, \"String_Node_Str\", th);\n }\n tablistHandler.sendTablist(tabList);\n}\n"
"public void setBaby(boolean flag) {\n if (flag) {\n this.datawatcher.watch(12, new Integer(-24000));\n } else {\n this.datawatcher.watch(12, 0);\n }\n ((MyMooshroom) myPet).isBaby = flag;\n}\n"
"public void append(int pointerId, ResizableIntArray times, ResizableIntArray xCoordinates, ResizableIntArray yCoordinates, int startPos, int length) {\n if (length == 0) {\n return;\n }\n mXCoordinates.append(xCoordinates, startPos, length);\n mYCoordinates.append(yCoordinates, startPos, length);\n mPointerIds.fill(pointerId, mPointerIds.getLength(), length);\n mTimes.append(times, startPos, length);\n}\n"
"public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception {\n try {\n progress.getBroadcaster().addListener(this);\n } catch (Throwable e) {\n }\n ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>();\n String parameter = param.toString();\n br.getPage(parameter);\n if (br.containsHTML(\"String_Node_Str\") || parameter.matches(\"String_Node_Str\")) {\n if (parameter.matches(\"String_Node_Str\")) {\n getfpName();\n if (fpName != null) {\n DownloadLink dl = createDownloadlink(parameter.replace(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\");\n dl.setName(fpName);\n br.getPage(parameter);\n String dllink = br.getRegex(\"String_Node_Str\").getMatch(0);\n if (dllink != null) {\n dllink = dllink.replace(\"String_Node_Str\", \"String_Node_Str\");\n URLConnectionAdapter con = br.openGetConnection(dllink);\n if (!con.getContentType().contains(\"String_Node_Str\")) {\n String ending = LoadImage.getFileType(dllink, con.getContentType());\n if (ending != null)\n dl.setFinalFileName(dl.getName() + ending);\n long size = con.getLongContentLength();\n if (size != 0) {\n dl.setDownloadSize(con.getLongContentLength());\n dl.setAvailable(true);\n }\n }\n }\n decryptedLinks.add(dl);\n } else {\n decryptedLinks.add(createDownloadlink(parameter.replace(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\"));\n }\n } else {\n getfpName();\n String[] links = br.getRegex(\"String_Node_Str\").getColumn(0);\n if (links == null || links.length == 0)\n return null;\n progress.setRange(links.length);\n if (fpName != null) {\n int counter = 1;\n for (String photolink : links) {\n if (abort) {\n progress.setColor(Color.RED);\n progress.setStatusText(progress.getStatusText() + \"String_Node_Str\" + JDL.L(\"String_Node_Str\", \"String_Node_Str\"));\n progress.doFinalize(5000l);\n return new ArrayList<DownloadLink>();\n }\n DownloadLink dl = createDownloadlink(photolink.replace(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\");\n dl.setName(fpName + \"String_Node_Str\" + counter);\n br.getPage(photolink);\n String dllink = br.getRegex(\"String_Node_Str\").getMatch(0);\n if (dllink != null) {\n dllink = dllink.replace(\"String_Node_Str\", \"String_Node_Str\");\n URLConnectionAdapter con = br.openGetConnection(dllink);\n if (!con.getContentType().contains(\"String_Node_Str\")) {\n String ending = LoadImage.getFileType(dllink, con.getContentType());\n if (ending != null)\n dl.setFinalFileName(dl.getName() + ending);\n long size = con.getLongContentLength();\n if (size != 0) {\n dl.setDownloadSize(con.getLongContentLength());\n dl.setAvailable(true);\n }\n }\n }\n decryptedLinks.add(dl);\n counter = counter + 1;\n progress.increase(1);\n }\n } else {\n for (String photolink : links) {\n decryptedLinks.add(createDownloadlink(photolink.replace(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\"));\n }\n }\n if (fpName != null) {\n FilePackage fp = FilePackage.getInstance();\n fp.setName(fpName.trim());\n fp.addLinks(decryptedLinks);\n }\n }\n } else {\n getfpName();\n if (fpName != null) {\n String dllink = br.getRegex(\"String_Node_Str\").getMatch(0);\n if (dllink == null)\n dllink = new Regex(Encoding.htmlDecode(br.toString()), \"String_Node_Str\").getMatch(0);\n DownloadLink dl = createDownloadlink(parameter.replace(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\");\n dl.setFinalFileName(fpName + \"String_Node_Str\");\n if (dllink != null) {\n dllink = Encoding.htmlDecode(dllink.replace(\"String_Node_Str\", \"String_Node_Str\"));\n URLConnectionAdapter con = br.openGetConnection(dllink);\n if (!con.getContentType().contains(\"String_Node_Str\")) {\n long size = con.getLongContentLength();\n if (size != 0) {\n dl.setDownloadSize(con.getLongContentLength());\n dl.setAvailable(true);\n }\n }\n }\n decryptedLinks.add(dl);\n } else {\n decryptedLinks.add(createDownloadlink(parameter.replace(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\"));\n }\n }\n return decryptedLinks;\n}\n"
"public int getFeatureIndex(int mouseX, int mouseY) {\n Feature[] features = tile.features();\n for (int ii = features.length - 1; ii >= 0; ii--) {\n if (features[ii].contains(mouseX, mouseY, orient)) {\n return ii;\n }\n }\n Log.warning(\"String_Node_Str\", \"String_Node_Str\", this, \"String_Node_Str\", mouseX, \"String_Node_Str\", mouseY);\n return 0;\n}\n"
"private void lsAsync() {\n try {\n final AbstractFile[] children = file.ls(cache.getFilter());\n Arrays.sort(children, cache.getSort());\n if (getCachedIcon() == null) {\n setCachedIcon(FileIcons.getFileIcon(getProxiedFile()));\n }\n Icon[] icons = new Icon[children.length];\n for (int i = 0; i < children.length; i++) {\n icons[i] = FileIcons.getFileIcon(children[i]);\n }\n synchronized (cache) {\n for (int i = 0; i < children.length; i++) {\n CachedDirectory cachedChild = cache.getOrAdd(children[i]);\n cachedChild.setCachedIcon(icons[i]);\n }\n }\n }\n final AbstractFile[] children2 = children;\n try {\n SwingUtilities.invokeAndWait(new Runnable() {\n\n public void run() {\n setLsCache(children, file.getDate());\n }\n });\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n}\n"
"public void onNavDrawerOpened() {\n if (mShowAppNameWhenDrawerOpened) {\n getSupportActionBar().setTitle(R.string.app_name);\n }\n}\n"
"public void testResumeCreateClusterFailure() throws Exception {\n CookieCache.put(\"String_Node_Str\", \"String_Node_Str\");\n BddErrorMessage errorMsg = new BddErrorMessage();\n errorMsg.setMessage(\"String_Node_Str\");\n ObjectMapper mapper = new ObjectMapper();\n buildReqRespWithoutReqBody(\"String_Node_Str\", HttpMethod.PUT, HttpStatus.NOT_FOUND, mapper.writeValueAsString(errorMsg));\n clusterCommands.createCluster(\"String_Node_Str\", \"String_Node_Str\", null, null, null, null, null, null, true, false, false);\n CookieCache.clear();\n}\n"
"public void onBrowserEvent(Event event) {\n if (DOM.eventGetType(event) == Event.ONCLICK) {\n Element target = DOM.eventGetTarget(event);\n int index = findDividerIndex(target);\n if (index != -1) {\n showStack(index);\n }\n }\n}\n"
"public void run() {\n int readWriteDataSizeInFrames = 750;\n int jsBufferSizeOverReadWriteSize = 8;\n TargetDataLine targetLine;\n int sampleSizeInBitsInt = 16;\n int channels = 1;\n int frameSizeInBits = sampleSizeInBitsInt;\n double frameRate = sampleRate;\n boolean signed = true;\n boolean bigEndian = true;\n AudioFormat format = new AudioFormat((float) sampleRate, sampleSizeInBitsInt, channels, signed, bigEndian);\n int frameSizeInBytes = format.getFrameSize();\n DataLine.Info targetInfo = new DataLine.Info(TargetDataLine.class, null, null, new Class[0], format, readWriteDataSizeInFrames * 4);\n if (!AudioSystem.isSupportedLine(targetInfo)) {\n shutDown(\"String_Node_Str\" + targetInfo + \"String_Node_Str\");\n return;\n }\n try {\n targetLine = (TargetDataLine) AudioSystem.getLine(targetInfo);\n targetLine.open(format, targetLine.getBufferSize());\n } catch (LineUnavailableException ex) {\n shutDown(\"String_Node_Str\" + ex);\n return;\n }\n System.out.println(\"String_Node_Str\" + \"String_Node_Str\" + targetLine.getBufferSize());\n int targetBufferLengthInBytes = readWriteDataSizeInFrames * frameSizeInBytes;\n byte[] targetData = new byte[targetBufferLengthInBytes];\n int numFramesRead;\n DataLine.Info sourceInfo = new DataLine.Info(SourceDataLine.class, null, null, new Class[0], format, readWriteDataSizeInFrames * 4);\n if (!AudioSystem.isSupportedLine(sourceInfo)) {\n shutDown(\"String_Node_Str\" + sourceInfo + \"String_Node_Str\");\n return;\n }\n SourceDataLine sourceLine;\n try {\n sourceLine = (SourceDataLine) AudioSystem.getLine(sourceInfo);\n sourceLine.open(format, sourceLine.getBufferSize());\n } catch (LineUnavailableException ex) {\n shutDown(\"String_Node_Str\" + ex);\n return;\n }\n System.out.println(\"String_Node_Str\" + \"String_Node_Str\" + sourceLine.getBufferSize());\n double[] audioInDoubleArray;\n byte[] audioOutByteArray;\n int numBytesRead = 0;\n targetLine.start();\n sourceLine.start();\n if (thread == null) {\n System.out.println(\"String_Node_Str\");\n }\n PitchDetector pd = new PitchDetector(readWriteDataSizeInFrames);\n PitchShift ps = new PitchShift();\n PitchShift ps2 = new PitchShift();\n PitchShift ps3 = new PitchShift();\n double[] psArray1 = new double[readWriteDataSizeInFrames];\n double[] psArray2 = new double[readWriteDataSizeInFrames];\n double[] psArray3 = new double[readWriteDataSizeInFrames];\n double[] currPitchArray;\n while (thread != null) {\n try {\n if ((numFramesRead = targetLine.read(targetData, 0, readWriteDataSizeInFrames)) == -1) {\n break;\n }\n audioInDoubleArray = _byteArrayToDoubleArray(targetData, frameSizeInBytes);\n currPitchArray = pd.performPitchDetect(audioInDoubleArray, (int) sampleRate);\n psArray1 = ps.performPitchShift(audioInDoubleArray, (float) sampleRate, currPitchArray, pitchScaleIn1);\n psArray2 = ps2.performPitchShift(audioInDoubleArray, (float) sampleRate, currPitchArray, pitchScaleIn2);\n psArray3 = ps3.performPitchShift(audioInDoubleArray, (float) sampleRate, currPitchArray, pitchScaleIn3);\n for (int ind3 = 0; ind3 < audioInDoubleArray.length; ind3++) {\n audioInDoubleArray[ind3] = (psArray1[ind3] + psArray2[ind3] + psArray3[ind3]) * 0.35;\n }\n audioOutByteArray = _doubleArrayToByteArray(audioInDoubleArray, frameSizeInBytes);\n int numFramesRemaining = numFramesRead;\n while (numFramesRemaining > 0) {\n numFramesRemaining -= sourceLine.write(audioOutByteArray, 0, numFramesRemaining);\n }\n } catch (Exception e) {\n shutDown(\"String_Node_Str\" + e);\n break;\n }\n }\n if (thread != null) {\n sourceLine.drain();\n }\n sourceLine.stop();\n sourceLine.close();\n sourceLine = null;\n shutDown(null);\n}\n"
"public boolean execute(ExecutionContext executionContext) throws ProcessExecutionException, InterruptedException {\n log.info(\"String_Node_Str\");\n Args args = this.getArgs();\n if (!args.getOutputDir().exists()) {\n args.getOutputDir().mkdirs();\n }\n Set<AssemblyAnalyser> requestedServices = new HashSet<>();\n for (String requestedService : this.getArgs().getAsmAnalyses()) {\n requestedServices.add(this.assemblyAnalyserFactory.create(requestedService, this.getConanProcessService()));\n }\n List<Integer> jobIds = new ArrayList<>();\n try {\n for (AssemblyAnalyser analyser : requestedServices) {\n List<File> assemblies = this.findAssemblies(analyser);\n File outputDir = new File(args.getOutputDir(), analyser.getName().toLowerCase());\n String jobPrefix = this.getArgs().getJobPrefix() + \"String_Node_Str\" + analyser.getName().toLowerCase();\n jobIds.addAll(analyser.execute(assemblies, outputDir, jobPrefix, args, this.conanExecutorService));\n }\n if (this.conanExecutorService.usingScheduler() && args.isRunParallel() && !jobIds.isEmpty()) {\n log.debug(\"String_Node_Str\");\n this.conanExecutorService.executeScheduledWait(jobIds, args.getJobPrefix() + \"String_Node_Str\", ExitStatus.Type.COMPLETED_ANY, args.getJobPrefix() + \"String_Node_Str\", args.getOutputDir());\n }\n } catch (ConanParameterException | IOException e) {\n throw new ProcessExecutionException(4, e);\n }\n try {\n AssemblyStatsTable table = this.createTable();\n for (AssemblyAnalyser analyser : requestedServices) {\n List<File> assemblies = this.findAssemblies(analyser);\n File outputDir = new File(args.getOutputDir(), analyser.getName().toLowerCase());\n analyser.updateTable(table, assemblies, outputDir, \"String_Node_Str\");\n }\n File finalFile = new File(args.getOutputDir(), \"String_Node_Str\");\n table.save(finalFile);\n log.debug(\"String_Node_Str\" + finalFile.getAbsolutePath());\n } catch (IOException ioe) {\n throw new ProcessExecutionException(5, ioe);\n }\n return true;\n}\n"
"private Bundle getJerseyServerBundle(BundleContext bc) {\n for (Bundle b : bc.getBundles()) {\n final String symbolicName = b.getSymbolicName();\n if ((symbolicName != null) && symbolicName.endsWith(\"String_Node_Str\")) {\n return b;\n }\n }\n return null;\n}\n"
"private boolean isDefaultChoice(SelectionChoice choice) {\n String choiceValue = choice.getValue();\n String defaultValue = convertToStandardFormat(this.defaultValue);\n if (canBeNull() && choiceValue == null && defaultValue == null) {\n return true;\n }\n}\n"
"public static <T> List<T> sortPageAll(int pageNo, int numPerPage, Comparator<T> comparator, Collection<T>... colls) {\n final List<T> result = new ArrayList<>();\n for (Collection<T> coll : colls) {\n result.addAll(coll);\n }\n Collections.sort(result, comparator);\n int resultSize = result.size();\n if (resultSize <= numPerPage) {\n return result;\n }\n final int[] startEnd = PageUtil.transToStartEnd(pageNo, numPerPage);\n if (startEnd[1] > resultSize) {\n return new ArrayList<>();\n }\n return result.subList(startEnd[0], startEnd[1]);\n}\n"
"private final List<ProviderInfo> generateApplicationProvidersLocked(ProcessRecord app) {\n List<ProviderInfo> providers = null;\n try {\n providers = AppGlobals.getPackageManager().queryContentProviders(app.processName, app.uid, STOCK_PM_FLAGS | PackageManager.GET_URI_PERMISSION_PATTERNS);\n } catch (RemoteException ex) {\n }\n if (DEBUG_MU)\n Slog.v(TAG_MU, \"String_Node_Str\" + app.uid);\n int userId = app.userId;\n if (providers != null) {\n int N = providers.size();\n app.pubProviders.ensureCapacity(N + app.pubProviders.size());\n for (int i = 0; i < N; i++) {\n ProviderInfo cpi = (ProviderInfo) providers.get(i);\n boolean singleton = isSingleton(cpi.processName, cpi.applicationInfo, cpi.name, cpi.flags);\n if (singleton && UserHandle.getUserId(app.uid) != 0) {\n providers.remove(i);\n N--;\n i--;\n continue;\n }\n ComponentName comp = new ComponentName(cpi.packageName, cpi.name);\n ContentProviderRecord cpr = mProviderMap.getProviderByClass(comp, userId);\n if (cpr == null) {\n cpr = new ContentProviderRecord(this, cpi, app.info, comp, singleton);\n mProviderMap.putProviderByClass(comp, cpr);\n }\n if (DEBUG_MU)\n Slog.v(TAG_MU, \"String_Node_Str\" + cpr.uid);\n app.pubProviders.put(cpi.name, cpr);\n if (!cpi.multiprocess || !\"String_Node_Str\".equals(cpi.packageName)) {\n app.addPackage(cpi.applicationInfo.packageName, mProcessStats);\n }\n ensurePackageDexOpt(cpi.applicationInfo.packageName);\n }\n }\n return providers;\n}\n"
"public void onSendComplete(SocketChannel channel, TCPWriteRequest writeRequest) {\n LOG.log(Level.INFO, \"String_Node_Str\");\n writeRequest.setComplete(true);\n if (writeRequest.getEdge() == -1) {\n ByteBuffer buffer = writeRequest.getByteBuffer();\n buffer.clear();\n helloSendByteBuffers.add(buffer);\n clientsCompleted++;\n }\n}\n"
"public void start(BundleContext context) throws Exception {\n super.start(context);\n configureLogs(loadPreferences());\n}\n"
"public void toString(StringBuffer buffer, int tabCount) {\n buffer.append(getType() + \"String_Node_Str\" + this.clazz.getTypeName() + \"String_Node_Str\");\n signature.toString(buffer, 0);\n buffer.append(\"String_Node_Str\" + Cpp.newline);\n appendBody(buffer, body, tabCount + 1);\n buffer.append(Cpp.newline);\n}\n"
"public boolean shouldUpdate(long traktId, String lastUpdated) {\n if (lastUpdated == null)\n return true;\n Cursor movie = null;\n try {\n movie = resolver.query(Movies.MOVIES, new String[] { MovieColumns.WATCHED, MovieColumns.IN_COLLECTION, MovieColumns.IN_WATCHLIST }, MovieColumns.TRAKT_ID + \"String_Node_Str\", new String[] { String.valueOf(traktId) }, null);\n if (movie.moveToFirst()) {\n final boolean watched = Cursors.getBoolean(movie, MovieColumns.WATCHED);\n final boolean collected = Cursors.getBoolean(movie, MovieColumns.IN_COLLECTION);\n final boolean inWatchlist = Cursors.getBoolean(movie, MovieColumns.IN_WATCHLIST);\n final boolean isUpdated = TimeUtils.getMillis(lastUpdated) > Cursors.getLong(movie, MovieColumns.LAST_UPDATED);\n if (isUpdated) {\n if (watched || collected || inWatchlist) {\n return true;\n }\n }\n }\n return false;\n } finally {\n if (movie != null)\n movie.close();\n }\n}\n"
"protected void doRead(Buffer buffer) throws IOException {\n long millis = 0;\n VideoFormat format;\n format = (VideoFormat) buffer.getFormat();\n if (format == null) {\n format = (VideoFormat) getFormat();\n if (format != null)\n buffer.setFormat(format);\n }\n Dimension size = format.getSize();\n int frameSizeInBytes = (int) (size.getHeight() * size.getWidth() * 4);\n byte[] data = AbstractCodec2.validateByteArraySize(buffer, frameSizeInBytes, false);\n Arrays.fill(data, 0, frameSizeInBytes, (byte) color);\n if (increment)\n color += 3;\n else\n color -= 3;\n if (color >= 255) {\n increment = false;\n color = 255;\n } else if (color <= 0) {\n increment = true;\n color = 0;\n }\n buffer.setData(data);\n buffer.setOffset(0);\n buffer.setLength(data.length);\n buffer.setTimeStamp(System.nanoTime());\n millis = System.currentTimeMillis() - timeLastRead;\n millis = (long) (1000.0 / format.getFrameRate()) - millis;\n if (millis > 0) {\n try {\n Thread.sleep(millis);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n timeLastRead = System.currentTimeMillis();\n}\n"
"private String generatePropertyValueFromConcatQuery(String targetPropertyRef, List<NodeInstance> nodeInstance) {\n String testQuery = targetPropertyRef.trim();\n if (!testQuery.endsWith(\"String_Node_Str\")) {\n return null;\n }\n int functionOpeningBracket = testQuery.indexOf(\"String_Node_Str\");\n String functionString = testQuery.substring(0, functionOpeningBracket);\n if (!functionString.equals(\"String_Node_Str\")) {\n return null;\n }\n String functionContent = testQuery.substring(functionOpeningBracket + 1, testQuery.lastIndexOf(\"String_Node_Str\")).trim();\n String[] functionParts = functionContent.split(\"String_Node_Str\");\n List<String> augmentedFunctionParts = new ArrayList<String>();\n for (String functionPart : functionParts) {\n if (functionPart.trim().startsWith(\"String_Node_Str\")) {\n augmentedFunctionParts.add(functionPart.trim());\n } else if (functionPart.trim().split(\"String_Node_Str\").length == 3) {\n String[] queryParts = functionPart.trim().split(\"String_Node_Str\");\n if (!queryParts[1].equals(\"String_Node_Str\")) {\n return null;\n }\n String nodeTemplateName = queryParts[0];\n String propertyName = queryParts[2];\n if (getNodeInstanceWithName(nodeInstance, nodeTemplateName) != null) {\n String propValue = fetchPropertyValueFromNodeInstance(getNodeInstanceWithName(nodeInstance, nodeTemplateName), propertyName);\n augmentedFunctionParts.add(\"String_Node_Str\" + propValue + \"String_Node_Str\");\n }\n }\n }\n String resultString = \"String_Node_Str\";\n for (String functionPart : augmentedFunctionParts) {\n resultString += functionPart.replace(\"String_Node_Str\", \"String_Node_Str\");\n }\n return resultString;\n}\n"
"private ASTNode wrapAggregate(CubeQueryContext cubeql, ASTNode node) throws LensException {\n String tabname = null;\n String colname;\n if (node.getToken().getType() == HiveParser.TOK_TABLE_OR_COL) {\n colname = node.getChild(0).getText();\n } else {\n ASTNode tabident = HQLParser.findNodeByPath(node, TOK_TABLE_OR_COL, Identifier);\n ASTNode colIdent = (ASTNode) node.getChild(1);\n colname = colIdent.getText().toLowerCase();\n tabname = tabident.getText().toLowerCase();\n }\n String msrname = StringUtils.isBlank(tabname) ? colname : tabname + \"String_Node_Str\" + colname;\n if (cubeql.isCubeMeasure(msrname)) {\n if (cubeql.getQueriedExprs().contains(colname)) {\n String alias = cubeql.getAliasForTableName(cubeql.getCube().getName());\n for (ASTNode exprNode : cubeql.getExprCtx().getExpressionContext(colname, alias).getAllASTNodes()) {\n transform(cubeql, null, exprNode, 0);\n }\n return node;\n } else {\n CubeMeasure measure = cubeql.getCube().getMeasureByName(colname);\n String aggregateFn = measure.getAggregate();\n if (StringUtils.isBlank(aggregateFn)) {\n throw new LensException(LensCubeErrorCode.NO_DEFAULT_AGGREGATE.getLensErrorInfo(), colname);\n }\n ASTNode fnroot = new ASTNode(new CommonToken(HiveParser.TOK_FUNCTION));\n ASTNode fnIdentNode = new ASTNode(new CommonToken(HiveParser.Identifier, aggregateFn));\n fnroot.addChild(fnIdentNode);\n fnroot.addChild(node);\n return fnroot;\n }\n } else {\n return node;\n }\n}\n"
"public CollectionResult<Set<URI>> findCycleContainingComponents() throws OpenRDFException {\n if (hierarchyGraph == null) {\n TupleQueryResult broaderResult = findTriples(HierarchyStyle.BROADER);\n TupleQueryResult narrowerResult = findTriples(HierarchyStyle.NARROWER);\n createGraph(broaderResult, narrowerResult);\n }\n Set<Resource> nodesInCycles = new CycleDetector<Resource, NamedEdge>(hierarchyGraph).findCycles();\n cycleContainingComponents = trackNodesInCycles(nodesInCycles);\n return new CollectionResult<Set<URI>>(cycleContainingComponents);\n}\n"
"public double predict(double[] data) throws MLModelBuilderException {\n Predictor predictor = new Predictor(modelId, mlModel, Arrays.asList(data));\n List<?> predictions = predictor.predict();\n return predictions.get(0).toString();\n}\n"
"protected final void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n String command = req.getPathInfo();\n try {\n if (!handle(command, req, resp)) {\n resp.sendError(HttpServletResponse.SC_BAD_REQUEST);\n }\n } catch (Exception error) {\n sendResponse(resp.getWriter(), error);\n }\n}\n"
"protected static MessageNode parseMessage(ScribbleParser parser, CommonTree ct) {\n AntlrNodeType type = ScribParserUtil.getAntlrNodeType(ct);\n if (type == AntlrNodeType.MESSAGESIGNATURE) {\n return (MessageSigNode) parser.parse(ct);\n } else {\n return (ct.getChildCount() == 1) ? AntlrAmbigName.toAmbigNameNode(ct) : AntlrQualifiedName.toMessageSigNameNode(ct);\n }\n}\n"
"public boolean validateDeploymentPolicy(String cartridgeType, Partition[] partitions) throws InvalidPartitionException, InvalidCartridgeTypeException {\n Map<String, IaasProvider> partitionToIaasProviders = new ConcurrentHashMap<String, IaasProvider>();\n Cartridge cartridge = dataHolder.getCartridge(cartridgeType);\n if (cartridge == null) {\n String msg = \"String_Node_Str\" + cartridgeType;\n log.error(msg);\n throw new InvalidCartridgeTypeException(msg);\n }\n for (Partition partition : partitions) {\n String provider = partition.getProvider();\n IaasProvider iaasProvider = cartridge.getIaasProvider(provider);\n if (iaasProvider == null) {\n String msg = \"String_Node_Str\" + partition.toString() + \"String_Node_Str\" + provider;\n log.error(msg);\n throw new InvalidPartitionException(msg);\n }\n Iaas iaas = iaasProvider.getIaas();\n if (iaas == null) {\n try {\n iaas = setIaas(iaasProvider);\n } catch (InvalidIaasProviderException e) {\n String msg = \"String_Node_Str\" + partition.toString() + \"String_Node_Str\" + provider;\n log.error(msg, e);\n throw new InvalidPartitionException(msg, e);\n }\n }\n PartitionValidator validator = iaas.getPartitionValidator();\n validator.setIaasProvider(iaasProvider);\n IaasProvider updatedIaasProvider = validator.validate(partition.getId(), CloudControllerUtil.toJavaUtilProperties(partition.getProperties()));\n partitionToIaasProviders.put(partition.getId(), updatedIaasProvider);\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + partition.toString() + \"String_Node_Str\" + \"String_Node_Str\" + cartridgeType);\n }\n }\n cartridge.addIaasProviders(partitionToIaasProviders);\n log.info(\"String_Node_Str\" + CloudControllerUtil.getPartitionIds(partitions) + \"String_Node_Str\" + cartridgeType);\n return true;\n}\n"
"public void check_Query_SQL() {\n SqlManager sqls = new FileSqlManager(PATH);\n Sql sql = sqls.create(\"String_Node_Str\");\n assertTrue(sql.toString().toUpperCase().startsWith(\"String_Node_Str\"));\n}\n"
"private void mapTreeRootNodes(List<Tree> trees) {\n for (Tree tree : trees) {\n Transaction tx = gdb.beginTx();\n TreeNode root = tree.getRoot();\n TLongBipartition rootBipart = getGraphBipartForTreeNode(root, tree);\n HashSet<Node> graphNodes = new HashSet<Node>();\n for (TLongBipartition b : nodeForBipart.keySet()) {\n if (b.containsAll(rootBipart)) {\n graphNodes.add(nodeForBipart.get(b));\n }\n }\n if (USING_TAXONOMY) {\n for (Node b : taxonomyGraphNodesMap.keySet()) {\n if (taxonomyGraphNodesMap.get(b).containsAll(rootBipart)) {\n graphNodes.add(b);\n }\n }\n if (VERBOSE) {\n System.out.println(root.getNewick(false) + \"String_Node_Str\" + graphNodes);\n }\n }\n if (graphNodes.size() < 1) {\n if (VERBOSE) {\n System.out.println(\"String_Node_Str\" + rootBipart);\n }\n Node rootNode = createNode(rootBipart);\n graphNodes.add(rootNode);\n for (TLongBipartition b : nodeForBipart.keySet()) {\n if (rootBipart.isNestedPartitionOf(b)) {\n rootNode.createRelationshipTo(nodeForBipart.get(b), RelType.MRCACHILDOF);\n }\n if (b.isNestedPartitionOf(rootBipart)) {\n nodeForBipart.get(b).createRelationshipTo(rootNode, RelType.MRCACHILDOF);\n }\n }\n }\n tx.success();\n tx.finish();\n graphNodesForTreeNode.put(root, graphNodes);\n }\n}\n"
"protected void setupLayoutOptions() {\n if (options != null) {\n Object fitToPage = options.get(IPDFRenderOption.FIT_TO_PAGE);\n if (fitToPage != null && fitToPage instanceof Boolean) {\n if (((Boolean) fitToPage).booleanValue()) {\n context.setFitToPage(true);\n }\n }\n Object pageBreakOnly = options.get(IPDFRenderOption.PAGEBREAK_PAGINATION_ONLY);\n if (pageBreakOnly != null && pageBreakOnly instanceof Boolean) {\n if (((Boolean) pageBreakOnly).booleanValue()) {\n context.setPagebreakPaginationOnly(true);\n }\n }\n Object pageOverflow = options.get(IPDFRenderOption.PAGE_OVERFLOW);\n if (pageOverflow != null && pageOverflow instanceof Integer) {\n int pageOverflowType = ((Integer) pageOverflow).intValue();\n context.setPageOverflow(pageOverflowType);\n } else {\n if (context.fitToPage()) {\n context.setPageOverflow(IPDFRenderOption.FIT_TO_PAGE_SIZE);\n }\n }\n Object textWrapping = options.get(IPDFRenderOption.PDF_TEXT_WRAPPING);\n if (textWrapping != null && textWrapping instanceof Boolean) {\n if (!((Boolean) textWrapping).booleanValue()) {\n context.setTextWrapping(false);\n }\n }\n Object fontSubstitution = options.get(IPDFRenderOption.PDF_FONT_SUBSTITUTION);\n if (fontSubstitution != null && fontSubstitution instanceof Boolean) {\n if (!((Boolean) fontSubstitution).booleanValue()) {\n context.setFontSubstitution(false);\n }\n }\n Object bidiProcessing = options.get(IPDFRenderOption.PDF_BIDI_PROCESSING);\n if (bidiProcessing != null && bidiProcessing instanceof Boolean) {\n if (!((Boolean) bidiProcessing).booleanValue()) {\n context.setBidiProcessing(false);\n }\n }\n Object hyhenation = options.get(IPDFRenderOption.PDF_HYPHENATION);\n if (hyhenation != null && hyhenation instanceof Boolean) {\n if (((Boolean) hyhenation).booleanValue()) {\n context.setEnableHyphenation(true);\n }\n }\n }\n}\n"
"public BaseFont createFont(String familyName, int fontStyle) {\n String key = familyName + fontStyle;\n synchronized (baseFonts) {\n BaseFont font = (BaseFont) baseFonts.get(key);\n if (font == null) {\n try {\n String fontEncoding = (String) fontEncodings.get(familyName);\n if (fontEncoding == null) {\n fontEncoding = BaseFont.IDENTITY_H;\n }\n font = FontFactory.getFont(familyName, fontEncoding, BaseFont.EMBEDDED, 14, fontStyle).getBaseFont();\n baseFonts.put(key, font);\n } catch (Throwable de) {\n return null;\n }\n }\n return font;\n }\n}\n"
"public synchronized void clear() {\n mAddIndex = 0;\n mGetIndex = 0;\n}\n"
"public void closeSession(String transportId) {\n ServerSession serverSession = sessionsManager.getByTransportId(transportId);\n if (serverSession != null) {\n serverSession.closeNativeSession(\"String_Node_Str\");\n } else {\n log.warn(\"String_Node_Str\");\n }\n}\n"
"public void run() {\n Context context;\n ItemIterator iitems = null;\n try {\n context = new Context();\n context.setIgnoreAuthorization(true);\n iitems = new ItemIterator(context, items);\n String fileName = assembleFileName(\"String_Node_Str\", eperson, new Date());\n String workDir = getExportWorkDirectory() + System.getProperty(\"String_Node_Str\") + fileName;\n String downloadDir = getExportDownloadDirectory(eperson.getID());\n File wkDir = new File(workDir);\n if (!wkDir.exists()) {\n wkDir.mkdirs();\n }\n File dnDir = new File(downloadDir);\n if (!dnDir.exists()) {\n dnDir.mkdirs();\n }\n exportItem(context, iitems, workDir, 1);\n zip(workDir, downloadDir + System.getProperty(\"String_Node_Str\") + fileName + \"String_Node_Str\");\n emailSuccessMessage(context, eperson, fileName + \"String_Node_Str\");\n context.setIgnoreAuthorization(false);\n } catch (Exception e1) {\n try {\n emailErrorMessage(eperson.getEmail(), ConfigurationManager.getProperty(\"String_Node_Str\"), additionalEmail, e1.getMessage());\n } catch (Exception e) {\n }\n throw new RuntimeException(e1);\n } finally {\n if (iitems != null)\n iitems.close();\n }\n}\n"
"static private boolean contains(String formats, String format) {\n int index = formats.indexOf(format);\n if (index != -1) {\n if (index > 0) {\n if (formats.charAt(index - 1) != ',') {\n return false;\n }\n }\n int lastIndex = index + format.length();\n if (lastIndex < formats.length()) {\n if (formats.charAt(lastIndex) != ';') {\n return false;\n }\n }\n return true;\n }\n return false;\n}\n"
"protected void drawText() {\n drawString(StringHelper.localize(\"String_Node_Str\"), 5, GRAY);\n drawString(StringHelper.localize(\"String_Node_Str\") + \"String_Node_Str\" + StringHelper.getScaledNumber(chopper.getRange()), infoScreenX, infoScreenW, infroScreenY3, (chopper.hasUpgrade(UpgradeType.WITHER)) ? GREEN : WHITE);\n if (chopper.isInvalidTool()) {\n drawString(getTextLine(1, \"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY1, ORANGE);\n drawString(getTextLine(2, \"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY2, ORANGE);\n } else if (chopper.isLooked()) {\n boolean readyToChop = false;\n if (chopper.isFull()) {\n drawString(StringHelper.localize(\"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY2, RED);\n } else if ((!chopper.hasFuel()) && (!chopper.isBurning())) {\n String fuelString = \"String_Node_Str\";\n if (chopper.hasEngine())\n fuelString = \"String_Node_Str\";\n drawString(StringHelper.localize(fuelString), infoScreenX, infoScreenW, infroScreenY2, RED);\n } else if ((chopper.getStackInSlot(chopper.SLOT_SAPLINGS) == null) && (!chopper.isBurning())) {\n drawString(StringHelper.localize(\"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY2, RED);\n } else if (chopper.getStackInSlot(chopper.SLOT_AXE) == null) {\n drawString(StringHelper.localize(\"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY2, RED);\n } else {\n readyToChop = true;\n String status = \"String_Node_Str\";\n if (chopper.isChopping()) {\n status = \"String_Node_Str\";\n } else if (chopper.isPlanting()) {\n status = \"String_Node_Str\";\n }\n drawString(StringHelper.localize(status), infoScreenX, infoScreenW, infroScreenY2, BLUE);\n }\n if (!readyToChop) {\n drawString(StringHelper.localize(\"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY1, RED);\n } else if (chopper.isBurning()) {\n drawString(StringHelper.localize(\"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY1, BLUE);\n } else {\n drawString(StringHelper.localize(\"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY1, GREEN);\n }\n } else {\n drawString(getTextLine(1, \"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY1, GREEN);\n drawString(getTextLine(2, \"String_Node_Str\"), infoScreenX, infoScreenW, infroScreenY2, GREEN);\n }\n}\n"
"public boolean startElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts) {\n try {\n Descriptor xmlDescriptor = (Descriptor) xmlCompositeCollectionMapping.getReferenceDescriptor();\n if (xmlDescriptor == null) {\n xmlDescriptor = findReferenceDescriptor(xPathFragment, unmarshalRecord, atts, xmlCompositeCollectionMapping, xmlCompositeCollectionMapping.getKeepAsElementPolicy());\n if (xmlDescriptor == null) {\n if (unmarshalRecord.getXMLReader().isNullRepresentedByXsiNil(xmlCompositeCollectionMapping.getNullPolicy())) {\n if (unmarshalRecord.isNil()) {\n return true;\n }\n } else if (xmlCompositeCollectionMapping.getNullPolicy().valueIsNull(atts)) {\n getContainerPolicy().addInto(null, unmarshalRecord.getContainerInstance(this), unmarshalRecord.getSession());\n return true;\n }\n if (xmlCompositeCollectionMapping.getField() != null) {\n QName leafType = ((Field) xmlCompositeCollectionMapping.getField()).getLastXPathFragment().getLeafElementType();\n if (leafType != null) {\n XPathFragment frag = new XPathFragment();\n frag.setNamespaceAware(unmarshalRecord.isNamespaceAware());\n String xpath = leafType.getLocalPart();\n String uri = leafType.getNamespaceURI();\n if (uri != null && uri.length() > 0) {\n frag.setNamespaceURI(uri);\n String prefix = ((Descriptor) xmlCompositeCollectionMapping.getDescriptor()).getNonNullNamespaceResolver().resolveNamespaceURI(uri);\n if (prefix != null && prefix.length() > 0) {\n xpath = prefix + Constants.COLON + xpath;\n }\n }\n frag.setXPath(xpath);\n Context xmlContext = unmarshalRecord.getUnmarshaller().getContext();\n xmlDescriptor = xmlContext.getDescriptorByGlobalType(frag);\n }\n }\n }\n UnmarshalKeepAsElementPolicy policy = xmlCompositeCollectionMapping.getKeepAsElementPolicy();\n if (policy != null && ((xmlDescriptor == null && policy.isKeepUnknownAsElement()) || policy.isKeepAllAsElement())) {\n if (unmarshalRecord.getTypeQName() != null) {\n Class theClass = unmarshalRecord.getConversionManager().javaType(unmarshalRecord.getTypeQName());\n if (theClass == null) {\n setupHandlerForKeepAsElementPolicy(unmarshalRecord, xPathFragment, atts);\n return true;\n }\n } else {\n setupHandlerForKeepAsElementPolicy(unmarshalRecord, xPathFragment, atts);\n return true;\n }\n }\n }\n AbstractNullPolicy nullPolicy = xmlCompositeCollectionMapping.getNullPolicy();\n if (nullPolicy.isNullRepresentedByEmptyNode()) {\n String qnameString = xPathFragment.getLocalName();\n if (xPathFragment.getPrefix() != null) {\n qnameString = xPathFragment.getPrefix() + Constants.COLON + qnameString;\n }\n if (null != xmlDescriptor) {\n CompositeCollectionMappingContentHandler aHandler = new CompositeCollectionMappingContentHandler(unmarshalRecord, this, xmlCompositeCollectionMapping, atts, xPathFragment, xmlDescriptor);\n aHandler.startElement(xPathFragment.getNamespaceURI(), xPathFragment.getLocalName(), qnameString, atts);\n XMLReader xmlReader = unmarshalRecord.getXMLReader();\n xmlReader.setContentHandler(aHandler);\n xmlReader.setLexicalHandler(aHandler);\n }\n } else if (!(unmarshalRecord.getXMLReader().isNullRepresentedByXsiNil(nullPolicy) && unmarshalRecord.isNil())) {\n Field xmlFld = (Field) this.xmlCompositeCollectionMapping.getField();\n if (xmlFld.hasLastXPathFragment()) {\n unmarshalRecord.setLeafElementType(xmlFld.getLastXPathFragment().getLeafElementType());\n }\n processChild(xPathFragment, unmarshalRecord, atts, xmlDescriptor, xmlCompositeCollectionMapping);\n }\n } catch (SAXException e) {\n throw XMLMarshalException.unmarshalException(e);\n }\n return true;\n}\n"
"private Set<Long> addPredicateQuantity(String theParamName, Set<Long> thePids, List<? extends IQueryParameterType> theList) {\n if (theList == null || theList.isEmpty()) {\n return thePids;\n }\n if (Boolean.TRUE.equals(theList.get(0).getMissing())) {\n return addPredicateParamMissing(thePids, \"String_Node_Str\", theParamName, ResourceIndexedSearchParamQuantity.class);\n }\n CriteriaBuilder builder = myEntityManager.getCriteriaBuilder();\n CriteriaQuery<Long> cq = builder.createQuery(Long.class);\n Root<ResourceIndexedSearchParamQuantity> from = cq.from(ResourceIndexedSearchParamQuantity.class);\n cq.select(from.get(\"String_Node_Str\").as(Long.class));\n List<Predicate> codePredicates = new ArrayList<Predicate>();\n for (IQueryParameterType nextOr : theList) {\n IQueryParameterType params = nextOr;\n if (addPredicateMissingFalseIfPresent(theParamName, from, codePredicates, nextOr)) {\n continue;\n }\n String systemValue;\n String unitsValue;\n QuantityCompararatorEnum cmpValue;\n BigDecimal valueValue;\n boolean approx = false;\n if (params instanceof BaseQuantityDt) {\n BaseQuantityDt param = (BaseQuantityDt) params;\n systemValue = param.getSystemElement().getValueAsString();\n unitsValue = param.getUnitsElement().getValueAsString();\n cmpValue = QuantityCompararatorEnum.VALUESET_BINDER.fromCodeString(param.getComparatorElement().getValueAsString());\n valueValue = param.getValueElement().getValue();\n } else if (params instanceof QuantityParam) {\n QuantityParam param = (QuantityParam) params;\n systemValue = param.getSystem().getValueAsString();\n unitsValue = param.getUnits();\n cmpValue = param.getComparator();\n valueValue = param.getValue().getValue();\n approx = param.isApproximate();\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\" + params.getClass());\n }\n Predicate system = null;\n if (!isBlank(systemValue)) {\n system = builder.equal(from.get(\"String_Node_Str\"), systemValue);\n }\n Predicate code = null;\n if (!isBlank(unitsValue)) {\n code = builder.equal(from.get(\"String_Node_Str\"), unitsValue);\n }\n Predicate num;\n if (cmpValue == null) {\n BigDecimal mul = approx ? new BigDecimal(0.1) : new BigDecimal(0.01);\n BigDecimal low = valueValue.subtract(valueValue.multiply(mul));\n BigDecimal high = valueValue.add(valueValue.multiply(mul));\n Predicate lowPred = builder.gt(from.get(\"String_Node_Str\").as(BigDecimal.class), low);\n Predicate highPred = builder.lt(from.get(\"String_Node_Str\").as(BigDecimal.class), high);\n num = builder.and(lowPred, highPred);\n } else {\n switch(cmpValue) {\n case GREATERTHAN:\n Expression<Number> path = from.get(\"String_Node_Str\");\n num = builder.gt(path, valueValue);\n break;\n case GREATERTHAN_OR_EQUALS:\n path = from.get(\"String_Node_Str\");\n num = builder.ge(path, valueValue);\n break;\n case LESSTHAN:\n path = from.get(\"String_Node_Str\");\n num = builder.lt(path, valueValue);\n break;\n case LESSTHAN_OR_EQUALS:\n path = from.get(\"String_Node_Str\");\n num = builder.le(path, valueValue);\n break;\n default:\n throw new IllegalStateException(cmpValue.getCode());\n }\n }\n if (system == null && code == null) {\n codePredicates.add(num);\n } else if (system == null) {\n Predicate singleCode = builder.and(code, num);\n codePredicates.add(singleCode);\n } else if (code == null) {\n Predicate singleCode = builder.and(system, num);\n codePredicates.add(singleCode);\n } else {\n Predicate singleCode = builder.and(system, code, num);\n codePredicates.add(singleCode);\n }\n }\n Predicate masterCodePredicate = builder.or(codePredicates.toArray(new Predicate[0]));\n Predicate type = builder.equal(from.get(\"String_Node_Str\"), myResourceName);\n Predicate name = builder.equal(from.get(\"String_Node_Str\"), theParamName);\n if (thePids.size() > 0) {\n Predicate inPids = (from.get(\"String_Node_Str\").in(thePids));\n cq.where(builder.and(type, name, masterCodePredicate, inPids));\n } else {\n cq.where(builder.and(type, name, masterCodePredicate));\n }\n TypedQuery<Long> q = myEntityManager.createQuery(cq);\n return new HashSet<Long>(q.getResultList());\n}\n"
"public void onBlockBreak(BlockBreakEvent event) {\n if (event.isCancelled()) {\n return;\n }\n for (DropEvent dropEvent : plugin.getDropEventFactory().createEvents(event)) {\n Bukkit.getPluginManager().callEvent(dropEvent);\n }\n}\n"
"public static void launchCamera(Activity activity, LaunchCameraCallback callback) {\n String state = android.os.Environment.getExternalStorageState();\n if (!state.equals(android.os.Environment.MEDIA_MOUNTED)) {\n showSDCardRequiredDialog(activity);\n } else {\n Intent intent = prepareLaunchCameraIntent(callback);\n activity.startActivityForResult(intent, RequestCode.ACTIVITY_REQUEST_CODE_TAKE_PHOTO);\n }\n}\n"
"private boolean lesser(Object a, Object b, boolean allowEq) {\n if (a == null || b == null) {\n return false;\n }\n if (a instanceof Long) {\n if (allowEq) {\n return (Long.valueOf(a.toString())).longValue() <= (Long.valueOf(b.toString())).longValue();\n }\n return (Long.valueOf(a.toString())).longValue() < (Long.valueOf(b.toString())).longValue();\n }\n if (a instanceof Float || b instanceof Float) {\n if (allowEq) {\n return (Float.valueOf(a.toString())).floatValue() <= (Float.valueOf(b.toString())).floatValue();\n }\n return (Float.valueOf(a.toString())).floatValue() < (Float.valueOf(b.toString())).floatValue();\n }\n if (a instanceof Integer || b instanceof Integer) {\n if (allowEq) {\n return (Integer.valueOf(a.toString())).intValue() <= (Integer.valueOf(b.toString())).intValue();\n }\n return (Integer.valueOf(a.toString())).intValue() < (Integer.valueOf(b.toString())).intValue();\n }\n if (a instanceof Double || b instanceof Double) {\n if (allowEq) {\n return (Double.valueOf(a.toString())).doubleValue() <= (Double.valueOf(b.toString())).doubleValue();\n }\n return (Double.valueOf(a.toString())).doubleValue() < (Double.valueOf(b.toString())).doubleValue();\n }\n throw new UnsupportedOperationException(\"String_Node_Str\");\n}\n"
"private void load() {\n scripts.clear();\n if (connected) {\n final List<ScriptDefinition> net = SRC_NETWORK.list();\n if (net != null) {\n scripts.addAll(net);\n }\n }\n scripts.addAll(SRC_PRECOMPILED.list());\n scripts.addAll(SRC_SOURCES.list());\n Collections.sort(scripts);\n if (firstRun) {\n ArrayList<String> keywords = new ArrayList<String>(Category.values().length);\n for (Category c : Category.values()) {\n String id = c.description().trim();\n if (id.length() > 0 && !keywords.contains(id)) {\n keywords.add(id);\n }\n }\n }\n categories.populate(keywords, false);\n filter();\n table.revalidate();\n}\n"
"public static void extractJar(String jarEntryName, JarFile earFile, File jarFile) throws ZipFileException {\n try {\n File parent = jarFile.getParentFile();\n if (!parent.exists()) {\n if (!parent.mkdirs()) {\n throw new ZipFileException(\"String_Node_Str\" + parent);\n }\n }\n ZipEntry jarEntry = earFile.getEntry(jarEntryName);\n if (jarEntryName == null) {\n throw new ZipFileException(jarEntryName + \"String_Node_Str\" + earFile.getName());\n }\n InputStream is = earFile.getInputStream(jarEntry);\n FileOutputStream fos = new FileOutputStream(jarFile);\n FileUtils.copy(is, fos, jarEntry.getSize());\n } catch (IOException e) {\n throw new ZipFileException(e);\n }\n}\n"
"public Expr tupleProbabilityColumn() {\n return new ConstantExpr(vc, 1.0);\n}\n"