content
stringlengths
40
137k
"public void onViewCreated(View view, Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n view.setBackgroundColor(Color.WHITE);\n}\n"
"public int hashCode() {\n int hash = 7;\n hash = 97 * hash + (this.idTable != null ? this.idTable.hashCode() : 0);\n hash = 97 * hash + (this.documentStr != null ? this.documentStr.hashCode() : 0);\n return hash;\n}\n"
"public void testGetAsyncOperationSuccessfulWhenQuorumSizeMet() throws Exception {\n Future<Object> future = map1.getAsync(\"String_Node_Str\");\n future.get();\n}\n"
"void addInputDataSource(DataSource inputDataSource, AudioMixingPushBufferDataSource outputDataSource) {\n if (inputDataSource == null)\n throw new IllegalArgumentException(\"String_Node_Str\");\n synchronized (inputDataSources) {\n for (InputDataSourceDesc inputDataSourceDesc : inputDataSources) if (inputDataSource.equals(inputDataSourceDesc.inputDataSource))\n throw new IllegalArgumentException(\"String_Node_Str\");\n InputDataSourceDesc inputDataSourceDesc = new InputDataSourceDesc(inputDataSource, outputDataSource);\n boolean added = inputDataSources.add(inputDataSourceDesc);\n if (added) {\n if (logger.isTraceEnabled())\n logger.trace(\"String_Node_Str\" + inputDataSource.hashCode());\n if (connected > 0) {\n try {\n inputDataSourceDesc.connect(this);\n } catch (IOException ioex) {\n throw new UndeclaredThrowableException(ioex);\n }\n if (outputStream != null)\n getOutputStream();\n if (started > 0)\n try {\n inputDataSourceDesc.start();\n } catch (IOException ioe) {\n throw new UndeclaredThrowableException(ioe);\n }\n }\n }\n}\n"
"public void initializeRecord(XMLMapping selfRecordMapping) throws SAXException {\n try {\n XMLDescriptor xmlDescriptor = (XMLDescriptor) treeObjectBuilder.getDescriptor();\n if (xmlDescriptor.isSequencedObject()) {\n unmarshalContext = new SequencedUnmarshalContext();\n } else {\n unmarshalContext = ObjectUnmarshalContext.getInstance();\n }\n Object object = this.xmlReader.getCurrentObject(session, selfRecordMapping);\n if (object == null) {\n object = treeObjectBuilder.buildNewInstance();\n }\n this.setCurrentObject(object);\n XMLUnmarshalListener xmlUnmarshalListener = unmarshaller.getUnmarshalListener();\n if (null != xmlUnmarshalListener) {\n if (null == this.parentRecord) {\n xmlUnmarshalListener.beforeUnmarshal(object, null);\n } else {\n xmlUnmarshalListener.beforeUnmarshal(object, parentRecord.getCurrentObject());\n }\n }\n if (null == parentRecord) {\n this.xmlReader.newObjectEvent(object, null, selfRecordMapping);\n } else {\n this.xmlReader.newObjectEvent(object, parentRecord.getCurrentObject(), selfRecordMapping);\n }\n List containerValues = treeObjectBuilder.getContainerValues();\n if (null != containerValues) {\n containersMap = new HashMap(containerValues.size());\n for (int x = 0, containerValuesSize = containerValues.size(); x < containerValuesSize; x++) {\n ContainerValue containerValue = (ContainerValue) containerValues.get(x);\n Object containerInstance = null;\n if (containerValue.getReuseContainer() && !(containerValue.getMapping().getAttributeAccessor().isReadOnly())) {\n containerInstance = containerValue.getMapping().getAttributeAccessor().getAttributeValueFromObject(object);\n }\n if (null == containerInstance) {\n containerInstance = containerValue.getContainerInstance();\n }\n containersMap.put(containerValue, containerInstance);\n if (containerValue.getMapping() instanceof XMLChoiceCollectionMapping) {\n XMLChoiceCollectionMappingUnmarshalNodeValue nodeValue = (XMLChoiceCollectionMappingUnmarshalNodeValue) containerValue;\n for (NodeValue next : nodeValue.getAllNodeValues()) {\n NodeValue nestedNodeValue = ((XMLChoiceCollectionMappingUnmarshalNodeValue) next).getChoiceElementNodeValue();\n containersMap.put((ContainerValue) nestedNodeValue, containerInstance);\n }\n }\n }\n }\n if (null != xPathNode.getSelfChildren()) {\n int selfChildrenSize = xPathNode.getSelfChildren().size();\n selfRecords = new ArrayList<UnmarshalRecord>(selfChildrenSize);\n for (int x = 0; x < selfChildrenSize; x++) {\n XPathNode selfNode = xPathNode.getSelfChildren().get(x);\n if (null != selfNode.getNodeValue()) {\n selfRecords.add(selfNode.getNodeValue().buildSelfRecord(this, attributes));\n }\n }\n }\n } catch (EclipseLinkException e) {\n if (null == xmlReader.getErrorHandler()) {\n throw e;\n } else {\n SAXParseException saxParseException = new SAXParseException(null, null, null, 0, 0, e);\n xmlReader.getErrorHandler().error(saxParseException);\n }\n }\n}\n"
"private void checkDifficultyTransitions(StoredBlock storedPrev, Block nextBlock) throws BlockStoreException, VerificationException {\n Block prev = storedPrev.getHeader();\n if ((storedPrev.getHeight() + 1) % params.interval != 0) {\n if (params.getId().equals(NetworkParameters.ID_TESTNET) && nextBlock.getTime().after(testnetDiffDate)) {\n checkTestnetDifficulty(storedPrev, prev, nextBlock);\n return;\n }\n if (nextBlock.getDifficultyTarget() != prev.getDifficultyTarget())\n throw new VerificationException(\"String_Node_Str\" + storedPrev.getHeight() + \"String_Node_Str\" + Long.toHexString(nextBlock.getDifficultyTarget()) + \"String_Node_Str\" + Long.toHexString(prev.getDifficultyTarget()));\n return;\n }\n long now = System.currentTimeMillis();\n StoredBlock cursor = blockStore.get(prev.getHash());\n for (int i = 0; i < params.interval - 1; i++) {\n if (cursor == null) {\n throw new VerificationException(\"String_Node_Str\");\n }\n cursor = blockStore.get(cursor.getHeader().getPrevBlockHash());\n }\n log.info(\"String_Node_Str\", System.currentTimeMillis() - now);\n Block blockIntervalAgo = cursor.getHeader();\n int timespan = (int) (prev.getTimeSeconds() - blockIntervalAgo.getTimeSeconds());\n if (timespan < params.targetTimespan / 4)\n timespan = params.targetTimespan / 4;\n if (timespan > params.targetTimespan * 4)\n timespan = params.targetTimespan * 4;\n BigInteger newDifficulty = Utils.decodeCompactBits(prev.getDifficultyTarget());\n newDifficulty = newDifficulty.multiply(BigInteger.valueOf(timespan));\n newDifficulty = newDifficulty.divide(BigInteger.valueOf(params.targetTimespan));\n if (newDifficulty.compareTo(params.proofOfWorkLimit) > 0) {\n log.info(\"String_Node_Str\", newDifficulty.toString(16));\n newDifficulty = params.proofOfWorkLimit;\n }\n int accuracyBytes = (int) (nextBlock.getDifficultyTarget() >>> 24) - 3;\n BigInteger receivedDifficulty = nextBlock.getDifficultyTargetAsInteger();\n BigInteger mask = BigInteger.valueOf(0xFFFFFFL).shiftLeft(accuracyBytes * 8);\n newDifficulty = newDifficulty.and(mask);\n if (newDifficulty.compareTo(receivedDifficulty) != 0)\n throw new VerificationException(\"String_Node_Str\" + receivedDifficulty.toString(16) + \"String_Node_Str\" + newDifficulty.toString(16));\n}\n"
"public int readInteger() {\n readFully(in, tmpBuf.array(), 0, 4);\n return tmpBuf.getInt(0);\n}\n"
"private void addNameDataToPrefPage(Object selectedPage) {\n if (selectedPage == null) {\n return;\n }\n PreferenceManager prefMan = PlatformUI.getWorkbench().getPreferenceManager();\n Iterator iter = prefMan.getElements(PreferenceManager.PRE_ORDER).iterator();\n while (iter.hasNext()) {\n IPreferenceNode prefNode = (IPreferenceNode) iter.next();\n if (selectedPage.equals(prefNode.getPage())) {\n Control pageControl = prefNode.getPage().getControl();\n String prefNodeId = prefNode.getId();\n if (pageControl != null && !pageControl.isDisposed() && pageControl.getData(Startup.TEST_RCP_DATA_KEY) == null && prefNodeId != null && prefNodeId.trim().length() > 0) {\n pageControl.setData(Startup.TEST_RCP_DATA_KEY, prefNodeId);\n Shell prefShell = pageControl.getDisplay().getActiveShell();\n Event activateEvent = new Event();\n activateEvent.time = (int) System.currentTimeMillis();\n activateEvent.type = SWT.Activate;\n activateEvent.widget = prefShell;\n prefShell.notifyListeners(SWT.Activate, activateEvent);\n }\n break;\n }\n }\n}\n"
"public DatabaseMetaData getDatabaseMetaData(IMetadataConnection iMetadataConnection) throws ClassNotFoundException, InstantiationException, IllegalAccessException, SQLException {\n ExtractMetaDataUtils extractMeta = ExtractMetaDataUtils.getInstance();\n extractMeta.getConnection(iMetadataConnection.getDbType(), iMetadataConnection.getUrl(), iMetadataConnection.getUsername(), iMetadataConnection.getPassword(), iMetadataConnection.getDatabase(), iMetadataConnection.getSchema(), iMetadataConnection.getDriverClass(), iMetadataConnection.getDriverJarPath(), iMetadataConnection.getDbVersionString(), iMetadataConnection.getAdditionalParams());\n String dbType = iMetadataConnection.getDbType();\n DatabaseMetaData dbMetaData = null;\n if (EDatabaseTypeName.HIVE.getXmlName().equalsIgnoreCase(dbType)) {\n dbMetaData = HiveConnectionManager.getInstance().extractDatabaseMetaData(iMetadataConnection);\n } else {\n dbMetaData = ExtractMetaDataUtils.getDatabaseMetaData(ExtractMetaDataUtils.conn, dbType, iMetadataConnection.isSqlMode(), iMetadataConnection.getDatabase());\n }\n return dbMetaData;\n}\n"
"private MPIMessage serializeObject(Object object, int source) {\n IntData data1 = new IntData(10);\n MultiObject multiObject = new MultiObject(source, data1);\n IntData data2 = new IntData(100);\n MultiObject multiObject2 = new MultiObject(source, data2);\n List<Object> list = new ArrayList<>();\n list.add(multiObject);\n list.add(multiObject2);\n MPIMessage mpiMessage = new MPIMessage(source, MessageType.OBJECT, MPIMessageDirection.OUT, new MessageListener());\n int di = -1;\n MPISendMessage sendMessage = new MPISendMessage(source, mpiMessage, 0, di, 0, MPIContext.FLAGS_MULTI_MSG, null, null);\n multiMessageSerializer.build(list, sendMessage);\n return mpiMessage;\n}\n"
"private void cleanupWorkers() {\n for (Thread w : workers) {\n try {\n w.join(Math.max(0, maxMillis - System.currentTimeMillis()));\n } catch (InterruptedException e) {\n LOG.log(Level.SEVERE, \"String_Node_Str\", e);\n }\n }\n for (Thread w : workers) {\n w.interrupt();\n }\n}\n"
"public void onReceive(Context context, Intent intent) {\n Log.d(TAG, \"String_Node_Str\" + intent.getAction());\n String action = intent.getAction();\n if (!isConnected()) {\n Log.d(TAG, \"String_Node_Str\");\n if (mBluetoothHeadsetClient == null)\n Log.d(TAG, \"String_Node_Str\");\n if (mBluetoothHeadsetClient.hfpClientInstance == null)\n Log.d(TAG, \"String_Node_Str\");\n if (mDevice == null)\n Log.d(TAG, \"String_Node_Str\");\n try {\n if (mBluetoothHeadsetClient.getConnectionState(mDevice) != BluetoothProfile.STATE_CONNECTED)\n Log.d(TAG, \"String_Node_Str\");\n } catch (NullPointerException npe) {\n Log.d(TAG, \"String_Node_Str\");\n }\n return;\n }\n switch(action) {\n case BluetoothHeadsetClient.ACTION_CONNECTION_STATE_CHANGED:\n int state = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, 0);\n switch(state) {\n case BluetoothProfile.STATE_CONNECTED:\n updateAllCalls(mBluetoothHeadsetClient.getCurrentCalls(mDevice));\n connected = true;\n break;\n case BluetoothProfile.STATE_DISCONNECTED:\n connected = false;\n break;\n }\n break;\n case BluetoothHeadsetClient.ACTION_AG_EVENT:\n Bundle params = intent.getExtras();\n forceUpdateAgEvents(params, false);\n break;\n case BluetoothHeadsetClient.ACTION_CALL_CHANGED:\n updateAllCalls(mBluetoothHeadsetClient.getCurrentCalls(mDevice));\n break;\n case BluetoothHeadsetClient.ACTION_AUDIO_STATE_CHANGED:\n Log.d(TAG, \"String_Node_Str\");\n int astate = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, 0);\n if (astate == BluetoothHeadsetClient.STATE_AUDIO_CONNECTED) {\n Intent i = new Intent();\n i.setAction(\"String_Node_Str\");\n sendBroadcast(i);\n audioConnected = true;\n } else if (astate != BluetoothHeadsetClient.STATE_AUDIO_CONNECTING) {\n Intent i = new Intent();\n i.setAction(\"String_Node_Str\");\n sendBroadcast(i);\n audioConnected = false;\n }\n break;\n default:\n Log.d(TAG, \"String_Node_Str\" + action);\n }\n showNotification();\n ((NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE)).notify(17111, notification);\n}\n"
"public final Object getProperty(final String name) throws PropertyException {\n switch(name) {\n case XML.LOCALE:\n return locale;\n case XML.TIMEZONE:\n return timezone;\n case XML.SCHEMAS:\n return schemas;\n case XML.GML_VERSION:\n return gmlVersion;\n case XML.RESOLVER:\n return resolver;\n case XML.CONVERTER:\n return converter;\n case XML.WARNING_LISTENER:\n return warningListener;\n case XML.STRING_SUBSTITUTES:\n {\n int n = 0;\n final String[] substitutes = new String[4];\n if ((bitMasks & Context.SUBSTITUTE_LANGUAGE) != 0)\n substitutes[n++] = \"String_Node_Str\";\n if ((bitMasks & Context.SUBSTITUTE_COUNTRY) != 0)\n substitutes[n++] = \"String_Node_Str\";\n if ((bitMasks & Context.SUBSTITUTE_FILENAME) != 0)\n substitutes[n++] = \"String_Node_Str\";\n if ((bitMasks & Context.SUBSTITUTE_MIMETYPE) != 0)\n substitutes[n++] = \"String_Node_Str\";\n return (n != 0) ? ArraysExt.resize(substitutes, n) : null;\n }\n case LegacyNamespaces.APPLY_NAMESPACE_REPLACEMENTS:\n {\n switch(xmlnsReplaceCode) {\n case 1:\n return Boolean.TRUE;\n case 2:\n return Boolean.FALSE;\n default:\n return null;\n }\n }\n default:\n {\n return getStandardProperty(convertPropertyKey(name));\n }\n }\n}\n"
"private int getAction(CompositeStatementObject parentComposite, int i, CompositeStatementObject childComposite) {\n int action = PUSH_NEW_LIST;\n List<AbstractStatement> statements = new ArrayList<AbstractStatement>(parentComposite.getStatements());\n CompositeStatementObject parent = (CompositeStatementObject) statements.get(0).getParent();\n boolean isBlockWithoutCompositeParent = isBlockWithoutCompositeParent(parent);\n if (parent.getStatement() instanceof Block)\n parent = (CompositeStatementObject) parent.getParent();\n int position = i;\n while (parent != null && parent instanceof TryStatementObject) {\n CompositeStatementObject tryStatement = parent;\n CompositeStatementObject tryStatementParent = (CompositeStatementObject) tryStatement.getParent();\n List<AbstractStatement> tryParentStatements = new ArrayList<AbstractStatement>(tryStatementParent.getStatements());\n if (tryStatementParent.getStatement() instanceof Block)\n tryStatementParent = (CompositeStatementObject) tryStatementParent.getParent();\n int positionOfTryStatementInParent = 0;\n int j = 0;\n for (AbstractStatement statement : tryParentStatements) {\n if (statement.equals(tryStatement)) {\n positionOfTryStatementInParent = j;\n break;\n }\n j++;\n }\n if (((TryStatementObject) tryStatement).hasResources()) {\n tryParentStatements.addAll(positionOfTryStatementInParent + 1, statements);\n } else {\n tryParentStatements.remove(tryStatement);\n tryParentStatements.addAll(positionOfTryStatementInParent, statements);\n }\n statements = tryParentStatements;\n parent = tryStatementParent;\n if (((TryStatementObject) tryStatement).hasResources())\n position = positionOfTryStatementInParent + position + 1;\n else\n position = positionOfTryStatementInParent + position;\n }\n if (parent != null && parent.getStatement() instanceof SwitchStatement && parentComposite.getStatement() instanceof Block) {\n List<AbstractStatement> switchStatements = new ArrayList<AbstractStatement>(parent.getStatements());\n int positionOfBlockInParentSwitch = 0;\n int j = 0;\n for (AbstractStatement statement : switchStatements) {\n if (statement.equals(parentComposite)) {\n positionOfBlockInParentSwitch = j;\n break;\n }\n j++;\n }\n switchStatements.remove(parentComposite);\n switchStatements.addAll(positionOfBlockInParentSwitch, statements);\n statements = switchStatements;\n position = positionOfBlockInParentSwitch + position;\n }\n if (parent != null && isBlockWithoutCompositeParent) {\n List<AbstractStatement> blockStatements = new ArrayList<AbstractStatement>(parent.getStatements());\n int positionOfBlockInParent = 0;\n int j = 0;\n for (AbstractStatement statement : blockStatements) {\n if (statement.equals(parentComposite)) {\n positionOfBlockInParent = j;\n break;\n }\n j++;\n }\n blockStatements.remove(parentComposite);\n blockStatements.addAll(positionOfBlockInParent, statements);\n statements = blockStatements;\n position = positionOfBlockInParent + position;\n }\n if (statements.size() == 1) {\n action = JOIN_TOP_LIST;\n if (parent != null) {\n if (isLoop(parent) || parent.getStatement() instanceof DoStatement)\n action = PUSH_NEW_LIST;\n }\n } else if (statements.size() > 1) {\n AbstractStatement previousStatement = null;\n if (position >= 1)\n previousStatement = statements.get(position - 1);\n int j = 0;\n while (previousStatement != null && previousStatement instanceof TryStatementObject && !((TryStatementObject) previousStatement).hasResources()) {\n CompositeStatementObject tryStatement = (CompositeStatementObject) previousStatement;\n AbstractStatement firstStatement = tryStatement.getStatements().get(0);\n if (firstStatement instanceof CompositeStatementObject) {\n CompositeStatementObject tryBlock = (CompositeStatementObject) firstStatement;\n List<AbstractStatement> tryBlockStatements = tryBlock.getStatements();\n if (tryBlockStatements.size() > 0) {\n previousStatement = tryBlockStatements.get(tryBlockStatements.size() - 1);\n } else {\n if (position >= 2 + j)\n previousStatement = statements.get(position - 2 - j);\n else\n previousStatement = null;\n }\n }\n j++;\n }\n while (previousStatement != null && isBlockWithoutCompositeParent(previousStatement)) {\n CompositeStatementObject block = (CompositeStatementObject) previousStatement;\n List<AbstractStatement> blockStatements = block.getStatements();\n if (blockStatements.size() > 0) {\n previousStatement = blockStatements.get(blockStatements.size() - 1);\n }\n }\n if (statements.get(statements.size() - 1).equals(childComposite)) {\n if (previousStatement != null && (previousStatement.getStatement() instanceof IfStatement || previousStatement.getStatement() instanceof SwitchStatement)) {\n action = JOIN_SECOND_FROM_TOP_LIST;\n if (parent != null && (isLoop(parent) || parent.getStatement() instanceof DoStatement))\n action = PLACE_NEW_LIST_SECOND_FROM_TOP;\n } else {\n action = JOIN_TOP_LIST;\n if (parent != null && (isLoop(parent) || parent.getStatement() instanceof DoStatement))\n action = PUSH_NEW_LIST;\n }\n } else {\n if (previousStatement != null && previousStatement.getStatement() instanceof IfStatement)\n action = PLACE_NEW_LIST_SECOND_FROM_TOP;\n else {\n action = PUSH_NEW_LIST;\n }\n }\n }\n return action;\n}\n"
"public void postConstruct() {\n LOG.info(\"String_Node_Str\");\n List<ActiveDescriptor<?>> descriptor = habitat.getDescriptors(BuilderHelper.createContractFilter(ConfigInjector.class.getName()));\n Class<?> clz = null;\n for (ActiveDescriptor desc : descriptor) {\n if (desc.getName() == null) {\n continue;\n }\n ConfigInjector injector = habitat.getService(ConfigInjector.class, desc.getName());\n if (injector != null) {\n String clzName = injector.getClass().getName().substring(0, injector.getClass().getName().length() - 8);\n if (clzName == null) {\n continue;\n }\n try {\n clz = injector.getClass().getClassLoader().loadClass(clzName);\n if (clz == null) {\n LOG.log(Level.FINE, \"String_Node_Str\" + clzName);\n continue;\n }\n } catch (Throwable e) {\n LOG.log(Level.FINE, \"String_Node_Str\", e);\n }\n }\n if (clz.isAnnotationPresent(ActivateOnStartup.class)) {\n LOG.info(\"String_Node_Str\" + clz.getName());\n applyConfig(clz);\n }\n }\n LOG.info(\"String_Node_Str\");\n}\n"
"private boolean createOrUpdateKey(String newKey, String referenceValue, String localeValue) {\n boolean operationPerformed = false;\n if (Messages.invalidConnection || Messages.noConnection || referenceValue == null || \"String_Node_Str\".equals(referenceValue))\n return operationPerformed;\n String serverName = application.getSolution().getI18nServerName();\n String tableName = application.getSolution().getI18nTableName();\n if (\"String_Node_Str\".equals(serverName))\n serverName = null;\n if (\"String_Node_Str\".equals(tableName))\n tableName = null;\n if (serverName == null || tableName == null) {\n Properties settings = application.getSettings();\n serverName = settings.getProperty(\"String_Node_Str\");\n tableName = settings.getProperty(\"String_Node_Str\");\n if (\"String_Node_Str\".equals(serverName))\n serverName = null;\n if (\"String_Node_Str\".equals(tableName))\n tableName = null;\n if (serverName == null || tableName == null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n }\n IDataServer dataServer = application.getDataServer();\n try {\n IServer i18nServer = (application.getRepository()).getServer(serverName);\n if (i18nServer == null)\n throw new IllegalArgumentException(\"String_Node_Str\" + serverName + \"String_Node_Str\");\n Table i18nTable = (Table) i18nServer.getTable(tableName);\n if (i18nTable == null)\n throw new IllegalArgumentException(\"String_Node_Str\" + tableName + \"String_Node_Str\");\n List<Column> list = i18nTable.getRowIdentColumns();\n if (list.size() > 1)\n throw new IllegalArgumentException(\"String_Node_Str\");\n if (list.size() == 0)\n throw new IllegalArgumentException(\"String_Node_Str\");\n String language = getSelectedLanguage();\n String filterColumn = null;\n String filterValue = null;\n if (application instanceof IMessagesCallback) {\n filterColumn = ((IMessagesCallback) application).getI18NColumnNameFilter();\n Object v = ((IMessagesCallback) application).getI18NColumnValueFilter();\n if (v instanceof String)\n filterValue = (String) v;\n }\n Column pkColumn = list.get(0);\n QueryTable messagesTable = new QueryTable(i18nTable.getSQLName(), i18nTable.getCatalog(), i18nTable.getSchema());\n QueryColumn pkCol = new QueryColumn(messagesTable, pkColumn.getID(), pkColumn.getSQLName(), pkColumn.getType(), pkColumn.getLength());\n QueryColumn msgKey = new QueryColumn(messagesTable, -1, \"String_Node_Str\", Types.VARCHAR, 150);\n QueryColumn msgLang = new QueryColumn(messagesTable, -1, \"String_Node_Str\", Types.VARCHAR, 5);\n QueryColumn msgVal = new QueryColumn(messagesTable, -1, \"String_Node_Str\", Types.VARCHAR, 2000);\n QueryColumn filterCol = null;\n if (filterColumn != null && filterValue != null && filterColumn.length() > 0 && filterValue.length() > 0) {\n filterCol = new QueryColumn(messagesTable, -1, filterColumn, Types.VARCHAR, 2000);\n }\n TablePlaceholderKey langPlaceholderKey = new TablePlaceholderKey(messagesTable, \"String_Node_Str\");\n TablePlaceholderKey valuePlaceholderKey = new TablePlaceholderKey(messagesTable, \"String_Node_Str\");\n QuerySelect selectSQL = new QuerySelect(messagesTable);\n selectSQL.addColumn(pkCol);\n selectSQL.addCondition(\"String_Node_Str\", new CompareCondition(ISQLCondition.EQUALS_OPERATOR, msgKey, newKey));\n selectSQL.addCondition(\"String_Node_Str\", new CompareCondition(ISQLCondition.EQUALS_OPERATOR, msgLang, new Placeholder(langPlaceholderKey)));\n if (filterCol != null) {\n selectSQL.addCondition(\"String_Node_Str\", new CompareCondition(ISQLCondition.EQUALS_OPERATOR, filterCol, filterValue));\n }\n boolean logIdIsServoyManaged = false;\n ColumnInfo ci = pkColumn.getColumnInfo();\n if (ci != null) {\n int autoEnterType = ci.getAutoEnterType();\n int autoEnterSubType = ci.getAutoEnterSubType();\n logIdIsServoyManaged = (autoEnterType == ColumnInfo.SEQUENCE_AUTO_ENTER) && (autoEnterSubType != ColumnInfo.NO_SEQUENCE_SELECTED) && (autoEnterSubType != ColumnInfo.DATABASE_IDENTITY);\n }\n SQLStatement statement1 = null;\n SQLStatement statement2 = null;\n selectSQL.setPlaceholderValue(langPlaceholderKey, ValueFactory.createNullValue(Types.VARCHAR));\n IDataSet set = dataServer.performQuery(application.getClientID(), serverName, null, selectSQL, null, false, 0, 25, IDataServer.MESSAGES_QUERY);\n if (set.getRowCount() == 0) {\n QueryInsert insert = new QueryInsert(messagesTable);\n Object messageId = null;\n if (logIdIsServoyManaged)\n messageId = dataServer.getNextSequence(serverName, i18nTable.getName(), pkColumn.getName(), -1);\n if (filterCol == null) {\n if (logIdIsServoyManaged) {\n insert.setColumnValues(new QueryColumn[] { pkCol, msgKey, msgLang, msgVal }, new Object[] { messageId, newKey, ValueFactory.createNullValue(Types.VARCHAR), referenceValue });\n } else {\n insert.setColumnValues(new QueryColumn[] { msgKey, msgLang, msgVal }, new Object[] { newKey, ValueFactory.createNullValue(Types.VARCHAR), referenceValue });\n }\n } else {\n if (logIdIsServoyManaged) {\n insert.setColumnValues(new QueryColumn[] { pkCol, msgKey, msgLang, msgVal, filterCol }, new Object[] { messageId, newKey, ValueFactory.createNullValue(Types.VARCHAR), referenceValue, filterValue });\n } else {\n insert.setColumnValues(new QueryColumn[] { msgKey, msgLang, msgVal, filterCol }, new Object[] { newKey, ValueFactory.createNullValue(Types.VARCHAR), referenceValue, filterValue });\n }\n }\n statement1 = new SQLStatement(ISQLActionTypes.INSERT_ACTION, serverName, tableName, null, insert);\n if (localeValue != null && !\"String_Node_Str\".equals(localeValue)) {\n insert = AbstractBaseQuery.deepClone(insert);\n if (logIdIsServoyManaged)\n messageId = dataServer.getNextSequence(serverName, i18nTable.getName(), pkColumn.getName(), -1);\n if (filterCol == null) {\n if (logIdIsServoyManaged) {\n insert.setColumnValues(new QueryColumn[] { pkCol, msgKey, msgLang, msgVal }, new Object[] { messageId, newKey, language, localeValue });\n } else {\n insert.setColumnValues(new QueryColumn[] { msgKey, msgLang, msgVal }, new Object[] { newKey, language, localeValue });\n }\n } else {\n if (logIdIsServoyManaged) {\n insert.setColumnValues(new QueryColumn[] { pkCol, msgKey, msgLang, msgVal, filterCol }, new Object[] { messageId, newKey, language, localeValue, filterValue });\n } else {\n insert.setColumnValues(new QueryColumn[] { msgKey, msgLang, msgVal, filterCol }, new Object[] { newKey, language, localeValue, filterValue });\n }\n }\n statement2 = new SQLStatement(ISQLActionTypes.INSERT_ACTION, serverName, tableName, null, insert);\n }\n } else {\n QueryUpdate update = new QueryUpdate(messagesTable);\n update.addValue(msgVal, new Placeholder(valuePlaceholderKey));\n update.addCondition(new CompareCondition(ISQLCondition.EQUALS_OPERATOR, msgKey, newKey));\n update.addCondition(new CompareCondition(ISQLCondition.EQUALS_OPERATOR, msgLang, new Placeholder(langPlaceholderKey)));\n if (filterCol != null) {\n update.addCondition(new CompareCondition(ISQLCondition.EQUALS_OPERATOR, filterCol, filterValue));\n }\n update.setPlaceholderValue(langPlaceholderKey, ValueFactory.createNullValue(Types.VARCHAR));\n update.setPlaceholderValue(valuePlaceholderKey, referenceValue);\n statement1 = new SQLStatement(ISQLActionTypes.UPDATE_ACTION, serverName, tableName, null, update);\n if (localeValue != null && !\"String_Node_Str\".equals(localeValue)) {\n selectSQL.setPlaceholderValue(langPlaceholderKey, language);\n set = dataServer.performQuery(application.getClientID(), serverName, null, selectSQL, null, false, 0, 25, IDataServer.MESSAGES_QUERY);\n if (set.getRowCount() == 0) {\n QueryInsert insert = new QueryInsert(messagesTable);\n Object messageId = null;\n if (logIdIsServoyManaged)\n messageId = dataServer.getNextSequence(serverName, i18nTable.getName(), pkColumn.getName(), -1);\n if (filterCol == null) {\n if (logIdIsServoyManaged) {\n insert.setColumnValues(new QueryColumn[] { pkCol, msgKey, msgLang, msgVal }, new Object[] { messageId, newKey, language, localeValue });\n } else {\n insert.setColumnValues(new QueryColumn[] { msgKey, msgLang, msgVal }, new Object[] { newKey, language, localeValue });\n }\n } else {\n if (logIdIsServoyManaged) {\n insert.setColumnValues(new QueryColumn[] { pkCol, msgKey, msgLang, msgVal, filterCol }, new Object[] { messageId, newKey, language, localeValue, filterValue });\n } else {\n insert.setColumnValues(new QueryColumn[] { msgKey, msgLang, msgVal, filterCol }, new Object[] { newKey, language, localeValue, filterValue });\n }\n }\n statement2 = new SQLStatement(ISQLActionTypes.INSERT_ACTION, serverName, tableName, null, insert);\n } else {\n update = AbstractBaseQuery.deepClone(update);\n update.setPlaceholderValue(langPlaceholderKey, language);\n update.setPlaceholderValue(valuePlaceholderKey, localeValue);\n statement2 = new SQLStatement(ISQLActionTypes.UPDATE_ACTION, serverName, tableName, null, update);\n }\n } else {\n QueryDelete delete = new QueryDelete(messagesTable);\n delete.addCondition(new CompareCondition(ISQLCondition.EQUALS_OPERATOR, msgKey, newKey));\n delete.addCondition(new CompareCondition(ISQLCondition.EQUALS_OPERATOR, msgLang, language));\n if (filterCol != null) {\n delete.addCondition(new CompareCondition(ISQLCondition.EQUALS_OPERATOR, filterCol, filterValue));\n }\n statement2 = new SQLStatement(ISQLActionTypes.DELETE_ACTION, serverName, tableName, null, delete);\n }\n }\n dataServer.performUpdates(application.getClientID(), statement2 == null ? new ISQLStatement[] { statement1 } : new ISQLStatement[] { statement1, statement2 });\n operationPerformed = true;\n } catch (Exception e) {\n Debug.error(\"String_Node_Str\");\n Debug.error(e);\n }\n return operationPerformed;\n}\n"
"public DResult process(EndpointResult epr) {\n DResult result = new DResult();\n result.setEndpointResult(epr);\n log.debug(\"String_Node_Str\", _epURI);\n result.setDescriptionFiles((List) new ArrayList<DGETInfo>());\n int failures = 0;\n log.debug(\"String_Node_Str\", \"String_Node_Str\", _epURI);\n RobotsTXT rtxt = new RobotsTXT(false, false, false, false, false, false, \"String_Node_Str\");\n List<Robots> r = _dbm.getResults(_ep, Robots.class, Robots.SCHEMA$);\n Robots rob = fetchRobotsTXT();\n if (r.size() == 0) {\n _dbm.insert(rob);\n } else {\n if (rob.getRespCode().toString().startsWith(\"String_Node_Str\")) {\n if (r.size() == 1) {\n rob = r.get(0);\n }\n } else {\n _dbm.update(rob);\n }\n }\n if (rob.getRespCode() == 200)\n rtxt.setHasRobotsTXT(true);\n boolean isRobotsAllowed = checkRobotsTxt(rob);\n rtxt.setAllowedByRobotsTXT(isRobotsAllowed);\n log.debug(\"String_Node_Str\", \"String_Node_Str\", _epURI);\n parseSitemapXML(rob, rtxt, result);\n log.debug(\"String_Node_Str\", \"String_Node_Str\", _epURI);\n try {\n URI epURL = new URI(_ep.getUri().toString());\n DGETInfo info = checkForVoid(epURL.toString(), \"String_Node_Str\");\n result.getDescriptionFiles().add(info);\n } catch (Exception e) {\n log.debug(\"String_Node_Str\" + _epURI, ExceptionHandler.logAndtoString(e, true));\n }\n log.debug(\"String_Node_Str\", \"String_Node_Str\", _epURI);\n try {\n URI epURL = new URI(_ep.getUri().toString());\n URL wellknown = new URI(epURL.getScheme(), epURL.getAuthority(), \"String_Node_Str\", null, null).toURL();\n DGETInfo info = checkForVoid(wellknown.toString(), \"String_Node_Str\");\n result.getDescriptionFiles().add(info);\n } catch (Exception e) {\n log.debug(\"String_Node_Str\" + _epURI, e);\n }\n log.debug(\"String_Node_Str\", \"String_Node_Str\", _epURI);\n QueryInfo qInfo = query(_ep.getUri().toString());\n log.info(\"String_Node_Str\", this);\n return result;\n}\n"
"public long getBufferedSize() {\n return dictionaryTooBig ? plainValuesWriter.getBufferedSize() : encodedValues.size() * 4;\n}\n"
"public String getBorderRightWidth() {\n return style.getBorderRightWidth();\n}\n"
"public List<Account> getRecipients() {\n List<Account> recipients = new ArrayList<>();\n switch(this.type) {\n case Group.GROUP_INVITATION:\n for (String accountId : inviteList) {\n try {\n final Account account = Account.findById(Long.parseLong(accountId));\n GroupAccount groupAccount = GroupAccount.find(account, this);\n if (!Group.isMember(this, account) && Friendship.alreadyFriendly(this.getSender(), account) && groupAccount == null) {\n (new GroupAccount(account, this, LinkType.invite)).create();\n recipients.add(account);\n }\n } catch (Throwable t) {\n t.printStackTrace();\n }\n }\n return recipients;\n case Group.GROUP_NEW_REQUEST:\n return this.getAsAccountList(this.owner);\n case Group.GROUP_NEW_MEDIA:\n final Group currentGroup = this;\n return GroupAccount.findAccountsByGroup(currentGroup, LinkType.establish);\n }\n return this.temporaryRecipients;\n}\n"
"private static int readerIndex(int n, int[] starts, int numSubReaders) {\n int lo = 0;\n int hi = numSubReaders - 1;\n while (hi >= lo) {\n int mid = (lo + hi) >>> 1;\n int midValue = starts[mid];\n if (n < midValue) {\n hi = mid - 1;\n else if (n > midValue)\n lo = mid + 1;\n else {\n while (mid + 1 < numSubReaders && starts[mid + 1] == midValue) {\n mid++;\n }\n return mid;\n }\n }\n return hi;\n}\n"
"private void loadObjectMetaDatas(String moduleNames, Map<UUID, RootObjectReference> referencedModules) throws RepositoryException {\n if (moduleNames == null)\n return;\n StringTokenizer tk = new StringTokenizer(moduleNames, \"String_Node_Str\");\n int count = tk.countTokens();\n if (count > 0) {\n while (tk.hasMoreTokens()) {\n try {\n String moduleDescriptor = tk.nextToken();\n SolutionMetaData metaData;\n int releaseNumber = 0;\n int i = moduleDescriptor.indexOf(':');\n String name;\n UUID uuid;\n if (i != -1) {\n releaseNumber = Integer.parseInt(moduleDescriptor.substring(i + 1));\n moduleDescriptor = moduleDescriptor.substring(0, i);\n }\n if (moduleDescriptor.indexOf('-') != -1) {\n uuid = UUID.fromString(moduleDescriptor);\n metaData = (SolutionMetaData) developerRepository.getRootObjectMetaData(uuid);\n if (metaData == null) {\n continue;\n }\n name = metaData.getName();\n } else {\n name = moduleDescriptor;\n metaData = (SolutionMetaData) developerRepository.getRootObjectMetaData(name, IRepository.SOLUTIONS);\n if (metaData == null) {\n continue;\n }\n uuid = metaData.getRootObjectUuid();\n }\n if (referencedModules.get(uuid) == null && (loadImportHooks || !SolutionMetaData.isImportHook(metaData))) {\n referencedModules.put(uuid, new RootObjectReference(name, uuid, metaData, releaseNumber));\n Solution sol = (Solution) developerRepository.getRootObject(metaData.getRootObjectId(), releaseNumber);\n loadObjectMetaDatas(sol.getModulesNames(), referencedModules, loadImportHooks);\n }\n } catch (RemoteException e) {\n throw new RepositoryException(e);\n }\n }\n }\n}\n"
"public void afterTextChanged(Editable s) {\n if (searchbox.getText() == s) {\n if (adapter != null) {\n adapter.applyFilter(s.toString());\n }\n }\n}\n"
"public static KurentoClient create(String websocketUrl, KurentoConnectionListener listener, Properties properties) {\n log.info(\"String_Node_Str\", websocketUrl);\n JsonRpcClientWebSocket client = new JsonRpcClientWebSocket(websocketUrl, JsonRpcConnectionListenerKurento.create(listener), new SslContextFactory());\n configureJsonRpcClient(client);\n return new KurentoClient(client);\n}\n"
"public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n menu.add(0, MENU_ABOUT, 0, R.string.about).setIcon(R.drawable.about001a).setShortcut('0', 'a');\n Intent intent = new Intent(null, getIntent().getData());\n intent.addCategory(Intent.CATEGORY_ALTERNATIVE);\n menu.addIntentOptions(Menu.CATEGORY_ALTERNATIVE, 0, 0, new ComponentName(this, OpenIntentsView.class), null, intent, 0, null);\n return true;\n}\n"
"private void recordFinish() {\n NetworkVertex v = popStack();\n if (getSeenData(v) == VisitColor.WHITE)\n putSeenData(v, VisitColor.BLACK);\n finishVertex(v);\n}\n"
"public void insert(ServiceObject item) throws ExistingResourceException, PersistentStoreFailureException {\n List<String> lstError = new CopyOnWriteArrayList<String>();\n try {\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\" + item.toDBObject());\n }\n DBObject db = item.toDBObject();\n db.put(ServiceBasicAttributeNames.SERVICE_CREATED_ON.getAttributeName(), new Date());\n serviceCollection.insert(db, WriteConcern.SAFE);\n EventManager.notifyRecievers(new Event(EventTypes.SERVICE_ADD, db));\n } catch (MongoException e) {\n if (e instanceof DuplicateKey) {\n throw new ExistingResourceException(\"String_Node_Str\" + item.getUrl() + \"String_Node_Str\", e);\n } else {\n throw new PersistentStoreFailureException(e);\n }\n }\n}\n"
"public void run() {\n ApplicationMonitor applicationMonitor = null;\n int retries = 5;\n boolean success = false;\n do {\n try {\n Thread.sleep(5000);\n } catch (InterruptedException e1) {\n }\n try {\n long start = System.currentTimeMillis();\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + application.getId());\n }\n applicationMonitor = AutoscalerUtil.getApplicationMonitor(application);\n long end = System.currentTimeMillis();\n log.info(\"String_Node_Str\" + (end - start) / 1000);\n success = true;\n } catch (DependencyBuilderException e) {\n String msg = \"String_Node_Str\";\n log.warn(msg, e);\n retries--;\n } catch (TopologyInConsistentException e) {\n String msg = \"String_Node_Str\";\n log.warn(msg, e);\n retries--;\n }\n } while (!success && retries != 0);\n if (applicationMonitor == null) {\n String msg = \"String_Node_Str\" + \"String_Node_Str\" + application.getId();\n log.error(msg);\n throw new RuntimeException(msg);\n }\n AutoscalerContext.getInstance().addAppMonitor(applicationMonitor);\n if (log.isInfoEnabled()) {\n log.info(String.format(\"String_Node_Str\" + \"String_Node_Str\", applicationMonitor.getId()));\n }\n}\n"
"private List<Double> getDataBin(int toBinningNum) {\n List<Double> binBorders = new ArrayList<Double>();\n binBorders.add(Double.NEGATIVE_INFINITY);\n if (this.currentHistogramUnitCnt <= toBinningNum) {\n convertHistogramUnitIntoBin(binBorders);\n return binBorders;\n }\n int totalCnt = getTotalInHistogram();\n LinkNode<HistogramUnit> currStartPos = null;\n for (int j = 1; j < toBinningNum; j++) {\n double s = (double) (j * totalCnt) / toBinningNum;\n LinkNode<HistogramUnit> pos = locateHistogram(s, currStartPos);\n if (pos == null || pos == currStartPos) {\n continue;\n } else {\n HistogramUnit chu = pos.data();\n HistogramUnit nhu = pos.next().data();\n double d = s - sum(chu.getHval());\n double a = nhu.getHcnt() - chu.getHcnt();\n double b = 2 * chu.getHcnt();\n double c = -2 * d;\n double z = 0.0;\n if (Double.compare(a, 0) == 0) {\n z = -1 * c / b;\n } else {\n z = (-1 * b + Math.sqrt(b * b - 4 * a * c)) / (2 * a);\n }\n double u = chu.getHval() + (nhu.getHval() - chu.getHval()) * z;\n binBorders.add(u);\n currStartPos = pos;\n }\n }\n return binBorders;\n}\n"
"public void registerNetworkEntity(EntityRef entity) {\n if (mode == NetworkMode.NONE) {\n return;\n }\n NetworkComponent netComponent = entity.getComponent(NetworkComponent.class);\n if (mode == NetworkMode.SERVER) {\n netComponent.setNetworkId(nextNetId++);\n entity.saveComponent(netComponent);\n }\n logger.debug(\"String_Node_Str\", entity);\n if (NULL_NET_ID != netIdToEntityId.put(netComponent.getNetworkId(), entity.getId())) {\n logger.error(\"String_Node_Str\");\n }\n if (mode == NetworkMode.SERVER) {\n switch(netComponent.replicateMode) {\n case OWNER:\n NetClient clientPlayer = getNetOwner(entity);\n if (clientPlayer != null) {\n clientPlayer.setNetInitial(netComponent.getNetworkId());\n }\n break;\n default:\n for (NetClient client : netClientList) {\n client.setNetInitial(netComponent.getNetworkId());\n }\n break;\n }\n if (netComponent.owner.exists()) {\n ownerLookup.put(entity, netComponent.owner);\n ownedLookup.put(netComponent.owner, entity);\n }\n }\n}\n"
"protected void populateItem(final ListItem item) {\n String mandatoryCondition = schemaTO.getMandatoryCondition();\n boolean required = false;\n if (mandatoryCondition.equalsIgnoreCase(\"String_Node_Str\")) {\n required = true;\n }\n if (schemaTO.getType().getClassName().equals(\"String_Node_Str\")) {\n panel = new AjaxCheckBoxPanel(\"String_Node_Str\", schemaTO.getName(), new Model() {\n public Serializable getObject() {\n return (String) item.getModelObject();\n }\n public void setObject(Serializable object) {\n Boolean val = (Boolean) object;\n item.setModelObject(val.toString());\n }\n }, required);\n } else if (schemaTO.getType().getClassName().equals(\"String_Node_Str\")) {\n panel = new DateFieldPanel(\"String_Node_Str\", schemaTO.getName(), new Model() {\n public Serializable getObject() {\n DateFormat formatter = new SimpleDateFormat(schemaTO.getConversionPattern());\n Date date = new Date();\n try {\n String dateValue = (String) item.getModelObject();\n formatter = new SimpleDateFormat(schemaTO.getConversionPattern());\n if (!dateValue.equals(\"String_Node_Str\"))\n date = formatter.parse((String) item.getModelObject());\n } catch (ParseException ex) {\n Logger.getLogger(RoleModalPage.class.getName()).log(Level.SEVERE, null, ex);\n }\n return date;\n }\n public void setObject(Serializable object) {\n Date date = (Date) object;\n Format formatter = new SimpleDateFormat(schemaTO.getConversionPattern());\n String val = formatter.format(date);\n item.setModelObject(val);\n }\n }, schemaTO.getConversionPattern(), required);\n } else {\n panel = new AjaxTextFieldPanel(\"String_Node_Str\", schemaTO.getName(), new Model() {\n public Serializable getObject() {\n return (String) item.getModelObject();\n }\n public void setObject(Serializable object) {\n item.setModelObject((String) object);\n }\n }, required);\n }\n item.add(panel);\n}\n"
"public synchronized void pushEvent(String workflowId, Event event) throws IOException {\n eventMap.put(event.getId(), event);\n switch(event.getType()) {\n case WORKFLOW_PROGRESS:\n Event.WorkflowProgressEvent workflowProgressEvent = (Event.WorkflowProgressEvent) event;\n String progressString = workflowProgressEvent.getPayload().get(Event.WorkflowProgressField.workflowProgress);\n int progress = Integer.parseInt(progressString);\n summary.setProgress(progress);\n if (progress == 100) {\n summary.setStatus(jobFailed ? WorkflowSummary.Status.FAILED : WorkflowSummary.Status.SUCCEEDED);\n }\n break;\n case JOB_FAILED:\n jobFailed = true;\n default:\n }\n writeJsonEventToDisk(event);\n}\n"
"protected CqlResult executeCQLQuery(String cqlQuery) throws InvalidRequestException, UnavailableException, TimedOutException, SchemaDisagreementException, TException {\n Cassandra.Client conn = null;\n Object pooledConnection = null;\n pooledConnection = getConection(persistenceUnit);\n conn = getConnection(pooledConnection);\n try {\n if (isCql3Enabled()) {\n return conn.execute_cql3_query(ByteBufferUtil.bytes(cqlQuery), org.apache.cassandra.thrift.Compression.NONE, consistencyLevel);\n }\n return conn.execute_cql_query(ByteBufferUtil.bytes(cqlQuery), org.apache.cassandra.thrift.Compression.NONE);\n } finally {\n releaseConnection(pooledConnection);\n }\n}\n"
"private void handleDragging(final GL gl) {\n Point currentPoint = glMouseListener.getPickedPoint();\n float[] fArTargetWorldCoordinates = new float[3];\n fArTargetWorldCoordinates = GLCoordinateUtils.convertWindowCoordinatesToWorldCoordinates(gl, currentPoint.x, currentPoint.y);\n float fWidth = viewFrustum.getWidth();\n float fHeight = viewFrustum.getHeight();\n if (bRenderGeneTree) {\n if (fArTargetWorldCoordinates[0] > -0.1f && fArTargetWorldCoordinates[0] < fWidth)\n fPosCut = fArTargetWorldCoordinates[0] - fLevelWidth;\n } else {\n if (fArTargetWorldCoordinates[1] > -0.1f && fArTargetWorldCoordinates[1] < fHeight)\n fPosCut = fArTargetWorldCoordinates[1] + fLevelHeight;\n }\n setDisplayListDirty();\n if (glMouseListener.wasMouseReleased()) {\n bIsDraggingActive = false;\n determineSelectedNodes();\n }\n}\n"
"private boolean isComponentNeedRepartion(IConnection con, Node needToPar) {\n String partitioning = needToPar.getComponent().getPartitioning();\n if (partitioning.equals(\"String_Node_Str\")) {\n if (ParallelExecutionUtils.existPreviousPar((Node) con.getSource()) || ParallelExecutionUtils.existPreviousDepar((Node) con.getSource()) || ParallelExecutionUtils.existPreviousRepar((Node) con.getSource()) || ParallelExecutionUtils.existPreviousNone((Node) con.getSource())) {\n return false;\n }\n return true;\n } else {\n boolean needRepar = false;\n IConnection previousParCon = ParallelExecutionUtils.getPreviousParCon((Node) con.getSource());\n if (previousParCon != null) {\n String[] partitionKey = partitioning.split(\"String_Node_Str\");\n IElementParameter parTableCon = previousParCon.getElementParameter(HASH_KEYS);\n IElementParameter parTableNode = needToPar.getElementParameter(partitionKey[0]);\n if (parTableNode != null) {\n String clumnKeyListName = \"String_Node_Str\";\n String clumnNodeListName = partitionKey[1];\n List<String> parKeyValues = new ArrayList<String>();\n List<String> columnKeyValues = new ArrayList<String>();\n ElementParameter nodeElemForList = null;\n for (Map conColumnListMap : (List<Map>) parTableCon.getValue()) {\n if (conColumnListMap.get(clumnKeyListName) instanceof String) {\n parKeyValues.add((String) conColumnListMap.get(clumnKeyListName));\n }\n }\n for (Object nodeItemList : parTableNode.getListItemsValue()) {\n if (((ElementParameter) nodeItemList).getFieldType().equals(EParameterFieldType.PREV_COLUMN_LIST) || ((ElementParameter) nodeItemList).getFieldType().equals(EParameterFieldType.COLUMN_LIST)) {\n nodeElemForList = (ElementParameter) nodeItemList;\n break;\n }\n }\n if (nodeElemForList != null) {\n for (Map nodeColumnListMap : (List<Map>) parTableNode.getValue()) {\n Object value = nodeColumnListMap.get(clumnNodeListName);\n if (nodeColumnListMap.get(clumnNodeListName) instanceof String) {\n columnKeyValues.add((String) value);\n } else if (value instanceof Integer) {\n Integer index = (Integer) value;\n if (nodeElemForList.getListItemsDisplayName().length > index) {\n columnKeyValues.add(nodeElemForList.getListItemsDisplayName()[index]);\n }\n }\n }\n }\n if (columnKeyValues.size() > 0) {\n if (columnKeyValues.equals(parKeyValues)) {\n needRepar = false;\n } else {\n needRepar = true;\n }\n }\n }\n }\n return needRepar;\n }\n}\n"
"private void parseTag(String tagName, Block tagBody, Map beans) {\n Digester digester = new Digester();\n digester.setNamespaceAware(true);\n digester.setRuleNamespaceURI(Configuration.NAMESPACE_URI);\n digester.setValidating(false);\n Set tagKeys = Taglib.getTagMap().keySet();\n for (Iterator iterator = tagKeys.iterator(); iterator.hasNext(); ) {\n String tagKey = (String) iterator.next();\n digester.addObjectCreate(Configuration.JXLS_ROOT_TAG + \"String_Node_Str\" + tagKey, (String) Taglib.getTags().get(tagKey));\n digester.addSetProperties(Configuration.JXLS_ROOT_TAG + \"String_Node_Str\" + tagKey);\n }\n try {\n String xml = Configuration.JXLS_ROOT_START + cell.getHssfCellValue() + \"String_Node_Str\" + configuration.getTagPrefix() + tagName + \"String_Node_Str\" + Configuration.JXLS_ROOT_END;\n String escapedXml = Util.escapeAttributes(xml);\n Tag tag = (Tag) digester.parse(new StringReader(escapedXml));\n cell.setTag(tag);\n TagContext tagContext = new TagContext(cell.getRow().getSheet(), tagBody, beans);\n tag.init(tagContext);\n } catch (IOException e) {\n log.warn(\"String_Node_Str\" + cell.getHssfCellValue(), e);\n } catch (SAXException e) {\n log.warn(\"String_Node_Str\" + cell.getHssfCellValue(), e);\n }\n}\n"
"private void forceStopUserLocked(int userId, String reason) {\n forceStopPackageLocked(null, -1, false, false, true, false, false, userId, reason);\n Intent intent = new Intent(Intent.ACTION_USER_STOPPED);\n intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY | Intent.FLAG_RECEIVER_FOREGROUND);\n intent.putExtra(Intent.EXTRA_USER_HANDLE, userId);\n broadcastIntentLocked(null, null, intent, null, null, 0, null, null, null, AppOpsManager.OP_NONE, false, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);\n}\n"
"public void precompute(DrawContext dc) {\n GL2 gl = dc.getGL().getGL2();\n pushState(gl);\n gl.glMatrixMode(GL2.GL_PROJECTION);\n gl.glViewport(0, 0, dc.getDrawableWidth(), dc.getDrawableHeight());\n URL trUrl = Atmosphere.class.getResource(\"String_Node_Str\");\n URL irUrl = Atmosphere.class.getResource(\"String_Node_Str\");\n URL inUrl = Atmosphere.class.getResource(\"String_Node_Str\");\n if (loadDefaultTextures(gl, trUrl, irUrl, inUrl)) {\n texturesDone = true;\n } else {\n if (!downloader.isDone() && downloader.isReading()) {\n return;\n }\n if (!loadData(gl)) {\n if (hasGeomShader) {\n doPrecompute(dc);\n saveTextures(gl);\n } else if (!downloader.hasError()) {\n downloader.requestTextures();\n }\n } else {\n texturesDone = true;\n }\n }\n popState(gl);\n}\n"
"private String uniformLogFormat(LogRecord record) {\n try {\n LogEventImpl logEvent = new LogEventImpl();\n SimpleDateFormat dateFormatter = new SimpleDateFormat(getRecordDateFormat() != null ? getRecordDateFormat() : RFC_3339_DATE_FORMAT);\n StringBuilder recordBuffer = new StringBuilder(getRecordBeginMarker() != null ? getRecordBeginMarker() : RECORD_BEGIN_MARKER);\n date.setTime(record.getMillis());\n String timestamp = dateFormatter.format(date);\n logEvent.setTimestamp(timestamp);\n recordBuffer.append(timestamp);\n recordBuffer.append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n logEvent.setLevel(record.getLevel().getName());\n recordBuffer.append(record.getLevel()).append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n String compId = getProductId();\n logEvent.setComponentId(compId);\n recordBuffer.append(compId).append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n logEvent.setLogger(record.getLoggerName());\n recordBuffer.append(record.getLoggerName()).append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n recordBuffer.append(\"String_Node_Str\").append(NV_SEPARATOR);\n logEvent.setThreadId(record.getThreadID());\n recordBuffer.append(record.getThreadID()).append(NVPAIR_SEPARATOR);\n recordBuffer.append(\"String_Node_Str\").append(NV_SEPARATOR);\n String threadName;\n if (record instanceof GFLogRecord) {\n threadName = ((GFLogRecord) record).getThreadName();\n } else {\n threadName = Thread.currentThread().getName();\n }\n logEvent.setThreadName(threadName);\n recordBuffer.append(threadName);\n recordBuffer.append(NVPAIR_SEPARATOR);\n recordBuffer.append(\"String_Node_Str\").append(NV_SEPARATOR);\n logEvent.setTimeMillis(record.getMillis());\n recordBuffer.append(record.getMillis()).append(NVPAIR_SEPARATOR);\n recordBuffer.append(\"String_Node_Str\").append(NV_SEPARATOR);\n Level level = record.getLevel();\n int levelValue = level.intValue();\n logEvent.setLevelValue(levelValue);\n recordBuffer.append(levelValue).append(NVPAIR_SEPARATOR);\n String msgId = getMessageId(record);\n if (msgId != null && !msgId.isEmpty()) {\n logEvent.setMessageId(msgId);\n recordBuffer.append(\"String_Node_Str\").append(NV_SEPARATOR);\n recordBuffer.append(msgId).append(NVPAIR_SEPARATOR);\n }\n if (LOG_SOURCE_IN_KEY_VALUE || (level.intValue() <= Level.FINE.intValue())) {\n recordBuffer.append(CLASS_NAME).append(NV_SEPARATOR);\n logEvent.getSupplementalAttributes().put(CLASS_NAME, sourceClassName);\n recordBuffer.append(sourceClassName);\n recordBuffer.append(NVPAIR_SEPARATOR);\n recordBuffer.append(METHOD_NAME).append(NV_SEPARATOR);\n logEvent.getSupplementalAttributes().put(METHOD_NAME, record.getSourceMethodName());\n recordBuffer.append(record.getSourceMethodName());\n recordBuffer.append(NVPAIR_SEPARATOR);\n }\n if (RECORD_NUMBER_IN_KEY_VALUE) {\n recordNumber++;\n recordBuffer.append(RECORD_NUMBER).append(NV_SEPARATOR);\n logEvent.getSupplementalAttributes().put(RECORD_NUMBER, recordNumber);\n recordBuffer.append(recordNumber).append(NVPAIR_SEPARATOR);\n }\n if (_delegate != null) {\n _delegate.format(recordBuffer, level);\n }\n recordBuffer.append(getRecordFieldSeparator() != null ? getRecordFieldSeparator() : FIELD_SEPARATOR);\n String logMessage = record.getMessage();\n if (logMessage == null || logMessage.trim().equals(\"String_Node_Str\")) {\n if (record.getThrown() != null) {\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n record.getThrown().printStackTrace(pw);\n pw.close();\n logMessage = sw.toString();\n sw.close();\n } else {\n logMessage = \"String_Node_Str\";\n }\n logEvent.setMessage(logMessage);\n recordBuffer.append(logMessage);\n } else {\n if (logMessage.indexOf(\"String_Node_Str\") >= 0 && logMessage.contains(\"String_Node_Str\") && record.getParameters() != null) {\n logMessage = java.text.MessageFormat.format(logMessage, record.getParameters());\n } else {\n ResourceBundle rb = getResourceBundle(record.getLoggerName());\n if (rb != null) {\n try {\n logMessage = MessageFormat.format(rb.getString(logMessage), record.getParameters());\n } catch (java.util.MissingResourceException e) {\n }\n }\n }\n StringBuffer logMessageBuffer = new StringBuffer();\n logMessageBuffer.append(logMessage);\n Throwable throwable = getThrowable(record);\n if (throwable != null) {\n logMessageBuffer.append(LINE_SEPARATOR);\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n throwable.printStackTrace(pw);\n pw.close();\n logMessageBuffer.append(sw.toString());\n sw.close();\n }\n logMessage = logMessageBuffer.toString();\n logEvent.setMessage(logMessage);\n recordBuffer.append(logMessage);\n }\n recordBuffer.append(getRecordEndMarker() != null ? getRecordEndMarker() : RECORD_END_MARKER).append(LINE_SEPARATOR).append(LINE_SEPARATOR);\n informLogEventListeners(logEvent);\n return recordBuffer.toString();\n } catch (Exception ex) {\n new ErrorManager().error(\"String_Node_Str\", ex, ErrorManager.FORMAT_FAILURE);\n return \"String_Node_Str\";\n }\n}\n"
"protected void drawCubic(Canvas c, LineDataSet dataSet, List<Entry> entries) {\n Transformer trans = mChart.getTransformer(dataSet.getAxisDependency());\n Entry entryFrom = dataSet.getEntryForXIndex(mMinX);\n Entry entryTo = dataSet.getEntryForXIndex(mMaxX);\n int minx = dataSet.getEntryPosition(entryFrom);\n int maxx = Math.min(dataSet.getEntryPosition(entryTo) + 1, entries.size());\n float phaseX = mAnimator.getPhaseX();\n float phaseY = mAnimator.getPhaseY();\n float intensity = dataSet.getCubicIntensity();\n cubicPath.reset();\n int size = (int) Math.ceil((maxx - minx) * phaseX + minx);\n minx = Math.max(minx - 2, 0);\n size = Math.min(size + 2, entries.size());\n if (size - minx >= 4) {\n float prevDx = 0f;\n float prevDy = 0f;\n float curDx = 0f;\n float curDy = 0f;\n Entry cur = entries.get(minx);\n Entry next = entries.get(minx + 1);\n Entry prev = entries.get(minx);\n Entry prevPrev = entries.get(minx);\n cubicPath.moveTo(cur.getXIndex(), cur.getVal() * phaseY);\n prevDx = (next.getXIndex() - cur.getXIndex()) * intensity;\n prevDy = (next.getVal() - cur.getVal()) * intensity;\n cur = entries.get(1);\n next = entries.get(2);\n curDx = (next.getXIndex() - prev.getXIndex()) * intensity;\n curDy = (next.getVal() - prev.getVal()) * intensity;\n cubicPath.cubicTo(prev.getXIndex() + prevDx, (prev.getVal() + prevDy) * phaseY, cur.getXIndex() - curDx, (cur.getVal() - curDy) * phaseY, cur.getXIndex(), cur.getVal() * phaseY);\n for (int j = minx + 2; j < size - 1; j++) {\n prevPrev = entries.get(j - 2);\n prev = entries.get(j - 1);\n cur = entries.get(j);\n next = entries.get(j + 1);\n prevDx = (cur.getXIndex() - prevPrev.getXIndex()) * intensity;\n prevDy = (cur.getVal() - prevPrev.getVal()) * intensity;\n curDx = (next.getXIndex() - prev.getXIndex()) * intensity;\n curDy = (next.getVal() - prev.getVal()) * intensity;\n cubicPath.cubicTo(prev.getXIndex() + prevDx, (prev.getVal() + prevDy) * phaseY, cur.getXIndex() - curDx, (cur.getVal() - curDy) * phaseY, cur.getXIndex(), cur.getVal() * phaseY);\n }\n if (size > entries.size() - 1) {\n cur = entries.get(entries.size() - 1);\n prev = entries.get(entries.size() - 2);\n prevPrev = entries.get(entries.size() - 3);\n next = cur;\n prevDx = (cur.getXIndex() - prevPrev.getXIndex()) * intensity;\n prevDy = (cur.getVal() - prevPrev.getVal()) * intensity;\n curDx = (next.getXIndex() - prev.getXIndex()) * intensity;\n curDy = (next.getVal() - prev.getVal()) * intensity;\n cubicPath.cubicTo(prev.getXIndex() + prevDx, (prev.getVal() + prevDy) * phaseY, cur.getXIndex() - curDx, (cur.getVal() - curDy) * phaseY, cur.getXIndex(), cur.getVal() * phaseY);\n }\n }\n if (dataSet.isDrawFilledEnabled()) {\n cubicFillPath.reset();\n cubicFillPath.addPath(cubicPath);\n drawCubicFill(mBitmapCanvas, dataSet, cubicFillPath, trans, minx, maxx);\n }\n mRenderPaint.setColor(dataSet.getColor());\n mRenderPaint.setStyle(Paint.Style.STROKE);\n trans.pathValueToPixel(cubicPath);\n mBitmapCanvas.drawPath(cubicPath, mRenderPaint);\n mRenderPaint.setPathEffect(null);\n}\n"
"public void reduce(Text key, Iterator<Text> values, OutputCollector<Text, Text> output, Reporter reporter) throws IOException {\n Cluster cluster = new Cluster(key.toString());\n while (values.hasNext()) {\n cluster.addPoint(AbstractVector.decodeVector(values.next().toString()));\n }\n output.collect(key, new Text(cluster.getNumPoints() + \"String_Node_Str\" + cluster.getPointTotal().asFormatString()));\n}\n"
"private void setMeasureDataTypeForCubeQuery(ICubeQueryDefinition query) {\n List measures = query.getMeasures();\n if (this.cubeMetaDataHandleMap != null && this.cubeMetaDataHandleMap.containsKey(query.getName())) {\n CubeHandle cubeHandle = (CubeHandle) this.cubeMetaDataHandleMap.get(query.getName());\n for (int i = 0; i < measures.size(); i++) {\n IMeasureDefinition measureDef = (IMeasureDefinition) measures.get(i);\n MeasureHandle measureHandle = cubeHandle.getMeasure(measureDef.getName());\n if (measureHandle != null)\n measureDef.setDataType(DataAdapterUtil.adaptModelDataType(measureHandle.getDataType()));\n if (cubeHandle.getBooleanProperty(ITabularCubeModel.AUTO_KEY_PROP)) {\n measureDef.setAggrFunction(null);\n }\n }\n }\n}\n"
"private void marshalNilAttribute(SDOProperty property, DOMRecord row) {\n NamespaceResolver resolver;\n if (this.resolver == null) {\n resolver = typeHelper.getNamespaceResolver();\n } else {\n resolver = this.resolver;\n }\n String xsiPrefix = resolver.resolveNamespaceURI(XMLConstants.SCHEMA_INSTANCE_URL);\n if ((xsiPrefix == null) || xsiPrefix.equals(SDOConstants.EMPTY_STRING)) {\n xsiPrefix = typeHelper.getNamespaceResolver().generatePrefix(XMLConstants.SCHEMA_INSTANCE_PREFIX);\n typeHelper.getNamespaceResolver().put(xsiPrefix, XMLConstants.SCHEMA_INSTANCE_URL);\n }\n String xPath = getXPathForProperty(property, true);\n xPath = xPath + \"String_Node_Str\" + xsiPrefix + XMLConstants.COLON + XMLConstants.SCHEMA_NIL_ATTRIBUTE;\n XMLField field = new XMLField(xPath);\n field.setNamespaceResolver(typeHelper.getNamespaceResolver());\n row.put(field, XMLConstants.BOOLEAN_STRING_TRUE);\n}\n"
"public static boolean doSupportMethod(String hiveDistribution, String hiveVersion, boolean byDisplay, String supportMethodName) {\n IHDistribution distribution = getDistribution(hiveDistribution, byDisplay);\n if (distribution != null) {\n IHDistributionVersion version = distribution.getHDVersion(hiveVersion, byDisplay);\n IHadoopDistributionService hadoopDistributionService = getHadoopDistributionService();\n if (version != null && hadoopDistributionService != null) {\n try {\n return hadoopDistributionService.doSupportMethod(version, supportMethodName);\n } catch (Exception e) {\n }\n }\n }\n return false;\n}\n"
"public static BandedSemiLocalResult semiLocalLeft0(final AffineGapAlignmentScoring<NucleotideSequence> scoring, final NucleotideSequence seq1, final NucleotideSequence seq2, int offset1, int length1, int offset2, int length2, final int width, final MutationsBuilder<NucleotideSequence> mutations, final MatrixCache cache) {\n if (length1 == 0 || length2 == 0)\n return new BandedSemiLocalResult(offset1 + length1, offset2 + length2, 0);\n offset1 += length1;\n offset2 += length2;\n int minLength = Math.min(length1, length2) + width;\n length1 = Math.min(length1, minLength);\n length2 = Math.min(length2, minLength);\n offset1 -= length1;\n offset2 -= length2;\n int size1 = length1 + 1, size2 = length2 + 1;\n cache.prepareMatrices(size1, size2, width, scoring);\n BandedMatrix main = cache.main;\n BandedMatrix gapIn1 = cache.gapIn1;\n BandedMatrix gapIn2 = cache.gapIn2;\n int i, j;\n int match, gap1, gap2, to;\n int maxI = -1, maxJ = -1, maxScore = 0;\n final int gapExtensionPenalty = scoring.getGapExtensionPenalty();\n for (i = 0; i < length1; ++i) {\n to = Math.min(i + main.getRowFactor() - main.getColumnDelta() + 1, length2);\n for (j = Math.max(0, i - main.getColumnDelta()); j < to; ++j) {\n match = main.get(i, j) + scoring.getScore(seq1.codeAt(offset1 + length1 - 1 - i), seq2.codeAt(offset2 + length2 - 1 - j));\n gap1 = Math.max(main.get(i + 1, j) + scoring.getGapOpenPenalty(), gapIn1.get(i + 1, j) + gapExtensionPenalty);\n gap2 = Math.max(main.get(i, j + 1) + scoring.getGapOpenPenalty(), gapIn2.get(i, j + 1) + gapExtensionPenalty);\n gapIn1.set(i + 1, j + 1, gap1);\n gapIn2.set(i + 1, j + 1, gap2);\n int score = Math.max(match, Math.max(gap1, gap2));\n main.set(i + 1, j + 1, score);\n if (score > maxScore) {\n maxScore = score;\n maxI = i;\n maxJ = j;\n }\n }\n }\n i = maxI;\n j = maxJ;\n int pScore = main.get(i + 1, j + 1);\n byte c1, c2;\n while (i >= 0 || j >= 0) {\n if (i >= 0 && pScore == gapIn2.get(i + 1, j + 1)) {\n if (pScore == gapIn2.get(i, j + 1) + gapExtensionPenalty)\n pScore = gapIn2.get(i, j + 1);\n else\n pScore = main.get(i, j + 1);\n mutations.appendDeletion(offset1 + length1 - 1 - i, seq1.codeAt(offset1 + length1 - 1 - i));\n --i;\n } else if (j >= 0 && pScore == gapIn1.get(i + 1, j + 1)) {\n if (pScore == gapIn1.get(i + 1, j) + gapExtensionPenalty)\n pScore = gapIn1.get(i + 1, j);\n else\n pScore = main.get(i + 1, j);\n mutations.appendInsertion(offset1 + length1 - 1 - i, seq2.codeAt(offset2 + length2 - 1 - j));\n --j;\n } else if (i >= 0 && j >= 0 && pScore == main.get(i, j) + scoring.getScore(c1 = seq1.codeAt(offset1 + length1 - 1 - i), c2 = seq2.codeAt(offset2 + length2 - 1 - j))) {\n pScore = main.get(i, j);\n if (c1 != c2)\n mutations.appendSubstitution(offset1 + length1 - 1 - i, c1, c2);\n --i;\n --j;\n } else\n throw new RuntimeException();\n }\n return new BandedSemiLocalResult(offset1 + length1 - 1 - maxI, offset2 + length2 - 1 - maxJ, maxScore);\n}\n"
"public boolean acceptEcmaScript5() {\n switch(options.getLanguageIn()) {\n case ECMASCRIPT5:\n case ECMASCRIPT5_STRICT:\n return true;\n }\n return false;\n}\n"
"public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {\n super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);\n DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) value;\n if (treeNode == dragOverTreeNode) {\n setBorder(BorderFactory.createLineBorder(Color.BLACK));\n } else {\n setBorder(null);\n }\n Object userObject = treeNode.getUserObject();\n if (userObject instanceof Cell) {\n Cell cell = (Cell) treeNode.getUserObject();\n setText(cell.getName() + \"String_Node_Str\" + cell.getCellID().toString() + \"String_Node_Str\");\n }\n return this;\n}\n"
"public Account getAccount(String address) {\n for (Account e : walletInMem.getAccounts()) {\n if (e.address.equals(address)) {\n return e;\n }\n }\n return null;\n}\n"
"public void onRefresh() {\n connected = Utils.isInternetConnected(mContext);\n if (connected)\n if (mType == 1)\n refreshRec();\n else\n getNews(mSource, mPage = 1);\n else {\n if (mListener != null)\n mListener.showSnackBar(R.string.response_fail);\n if (mSwipeRefreshLayout != null && mSwipeRefreshLayout.isRefreshing())\n mSwipeRefreshLayout.setRefreshing(false);\n }\n}\n"
"protected void _execute() throws Exception {\n ComponentEntity entity = _modalModel.getEntity(_name);\n MoMLChangeRequest request = new MoMLChangeRequest(this, entity, _moml);\n request.execute();\n}\n"
"private String resolveTableName(TypeInformation<T> typeInformation) {\n String tableName = null;\n Table annotation = findAnnotation(Table.class);\n if (annotation != null) {\n tableName = hasText(annotation.name()) ? replace(annotation.name(), \"String_Node_Str\", \"String_Node_Str\") : fallback;\n } else {\n tableName = replace(clazz.getName(), \"String_Node_Str\", \"String_Node_Str\");\n }\n return tableName;\n}\n"
"protected ClientConfig createClientConfig() {\n ClientConfig clientConfig = new ClientConfig();\n clientConfig.getNetworkConfig().addAddress(\"String_Node_Str\");\n return clientConfig;\n}\n"
"public void onBlockPlacedBy(net.minecraft.world.World World, int X, int Y, int Z, net.minecraft.entity.EntityLivingBase Entity, net.minecraft.item.ItemStack Item) {\n super.onBlockPlacedBy(World, X, Y, Z, Entity, Item);\n try {\n ((TileEntity) World.getTileEntity(X, Y, Z)).Setup((net.minecraft.entity.player.EntityPlayer) Entity, Item);\n } catch (Throwable Throwable) {\n Throwable.printStackTrace();\n }\n}\n"
"public void execute(RiakAction<OP> action) {\n notNull(action, \"String_Node_Str\");\n ClientBootstrap bootstrap = new ClientBootstrap(this.channelFactory);\n Integer i = this.config.getTimeout();\n if (i != null) {\n bootstrap.setOption(\"String_Node_Str\", i);\n }\n bootstrap.setPipelineFactory(this.pipelineFactory);\n ChannelFuture future = bootstrap.connect(this.config.getRiakAddress());\n future = future.awaitUninterruptibly();\n Channel channel = future.getChannel();\n OP op = newOperations(channel);\n try {\n action.execute(op);\n } finally {\n op.complete();\n }\n}\n"
"protected SshTool connectSsh(Map props) {\n if (!truth(user))\n user = System.getProperty(\"String_Node_Str\");\n Map<?, ?> allprops = MutableMap.builder().putAll(config).putAll(leftoverProperties).putAll(props).build();\n Map<String, Object> args = MutableMap.<String, Object>of(\"String_Node_Str\", user, \"String_Node_Str\", address.getHostName());\n for (Map.Entry<?, ?> entry : allprops.entrySet()) {\n String k = \"String_Node_Str\" + entry.getKey();\n Object v = entry.getValue();\n if (SSH_PROPS.contains(k)) {\n args.put(k, v);\n } else if (k.startsWith(SSHCONFIG_PREFIX + \"String_Node_Str\")) {\n args.put(k.substring(SSHCONFIG_PREFIX.length() + 1), v);\n } else {\n if (!NON_SSH_PROPS.contains(k)) {\n LOG.warn(\"String_Node_Str\" + k + \"String_Node_Str\" + this + \"String_Node_Str\");\n args.put(k, v);\n }\n }\n }\n if (LOG.isTraceEnabled())\n LOG.trace(\"String_Node_Str\" + args);\n SshTool ssh = new SshjTool(args);\n ssh.connect();\n return ssh;\n}\n"
"public void drawText(ModelImpl objectModel) {\n Renderable renderable = objectModel.getObj();\n TextDataImpl textData = (TextDataImpl) renderable.getTextData();\n if (textData != null) {\n model.colorMode.textColor(this, textData, objectModel);\n model.sizeMode.setSizeFactor(textData, objectModel);\n String txt = textData.line.text;\n Rectangle2D r = renderer.getBounds(txt);\n textData.line.setBounds(r);\n float posX = renderable.getModel().getViewportX() + (float) r.getWidth() / -2 * textData.sizeFactor;\n float posY = renderable.getModel().getViewportY() + (float) r.getHeight() / -2 * textData.sizeFactor;\n renderer.draw3D(txt, posX, posY, 0, textData.sizeFactor);\n }\n}\n"
"public Fragment getItem(int position) {\n switch(position) {\n case 0:\n return ScanFragment.newInstance();\n case 1:\n return BeaconDataFragment.newInstance();\n case 2:\n return RegionLogFragment.newInstance();\n case 3:\n return NotificationFragment.newInstance();\n case 4:\n return LocationFragment.newInstance();\n default:\n throw new RuntimeException(\"String_Node_Str\" + position);\n }\n}\n"
"public boolean isSuperTypeOf(IType type) {\n IClass iclass = getTupleClass(this.typeCount);\n if (!iclass.isSubTypeOf(type)) {\n return false;\n }\n for (int i = 0; i < this.typeCount; i++) {\n ITypeVariable typeVar = iclass.getTypeVariable(i);\n IType type1 = type.resolveType(typeVar);\n if (!this.types[i].isSuperTypeOf(type1)) {\n return false;\n }\n }\n return true;\n}\n"
"public LibraryEntry getLibraryEntryIfAnimeExists(String animeId) {\n Map<String, String> params = new HashMap<String, String>();\n if (prefMan.getAuthToken() != null)\n params.put(\"String_Node_Str\", prefMan.getAuthToken());\n for (LibraryEntry entry : getLibrary(prefMan.getUsername(), params)) {\n if (entry.getAnime().getId().equals(animeId))\n libEntry = entry;\n }\n return null;\n}\n"
"protected void doRun() {\n if (repositoryNode == null) {\n repositoryNode = (RepositoryNode) ((IStructuredSelection) getSelection()).getFirstElement();\n }\n BeanItem beanItem = (BeanItem) repositoryNode.getObject().getProperty().getItem();\n try {\n openBeanEditor(beanItem, false);\n refresh(repositoryNode);\n CorePlugin.getDefault().getLibrariesService().resetModulesNeeded();\n CorePlugin.getDefault().getRunProcessService().updateLibraries(new HashSet<ModuleNeeded>(), null);\n } catch (PartInitException e) {\n MessageBoxExceptionHandler.process(e);\n } catch (SystemException e) {\n MessageBoxExceptionHandler.process(e);\n }\n}\n"
"protected Object decode(ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {\n ChannelBuffer buf = (ChannelBuffer) msg;\n buf.skipBytes(2);\n buf.readUnsignedShort();\n int version = buf.readUnsignedByte();\n ChannelBuffer id = buf.readBytes(20);\n int type = ChannelBuffers.swapShort(buf.readShort());\n if (type == MSG_HEARTBEAT) {\n if (channel != null) {\n ChannelBuffer response = ChannelBuffers.directBuffer(ByteOrder.LITTLE_ENDIAN, 31);\n response.writeByte(0x40);\n response.writeByte(0x40);\n response.writeShort(response.capacity());\n response.writeByte(version);\n response.writeBytes(id);\n response.writeShort(ChannelBuffers.swapShort(MSG_HEARTBEAT_RESPONSE));\n response.writeShort(Crc.crc16Ccitt(response.toByteBuffer(0, response.writerIndex())));\n response.writeByte(0x0D);\n response.writeByte(0x0A);\n channel.write(response, remoteAddress);\n }\n } else if (type == MSG_LOGIN || type == MSG_GPS) {\n Position position = new Position();\n position.setProtocol(getProtocolName());\n if (!identify(id.toString(Charset.defaultCharset()).trim(), channel, remoteAddress)) {\n return null;\n } else if (type == MSG_LOGIN) {\n if (channel != null) {\n ChannelBuffer response = ChannelBuffers.directBuffer(ByteOrder.LITTLE_ENDIAN, 41);\n response.writeByte(0x40);\n response.writeByte(0x40);\n response.writeShort(response.capacity());\n response.writeByte(version);\n response.writeBytes(id);\n response.writeShort(ChannelBuffers.swapShort(MSG_LOGIN_RESPONSE));\n response.writeInt(0xFFFFFFFF);\n response.writeShort(0);\n response.writeInt((int) (new Date().getTime() / 1000));\n response.writeShort(Crc.crc16Ccitt(response.toByteBuffer(0, response.writerIndex())));\n response.writeByte(0x0D);\n response.writeByte(0x0A);\n channel.write(response, remoteAddress);\n }\n }\n position.setDeviceId(getDeviceId());\n if (type == MSG_GPS) {\n buf.readUnsignedByte();\n }\n buf.readUnsignedInt();\n buf.readUnsignedInt();\n position.set(Event.KEY_ODOMETER, buf.readUnsignedInt());\n buf.readUnsignedInt();\n buf.readUnsignedInt();\n buf.readUnsignedShort();\n position.set(Event.KEY_STATUS, buf.readUnsignedInt());\n buf.skipBytes(8);\n buf.readUnsignedByte();\n Calendar time = Calendar.getInstance(TimeZone.getTimeZone(\"String_Node_Str\"));\n time.clear();\n time.set(Calendar.DAY_OF_MONTH, buf.readUnsignedByte());\n time.set(Calendar.MONTH, buf.readUnsignedByte() - 1);\n time.set(Calendar.YEAR, 2000 + buf.readUnsignedByte());\n time.set(Calendar.HOUR_OF_DAY, buf.readUnsignedByte());\n time.set(Calendar.MINUTE, buf.readUnsignedByte());\n time.set(Calendar.SECOND, buf.readUnsignedByte());\n position.setTime(time.getTime());\n double lat = buf.readUnsignedInt() / 3600000.0;\n double lon = buf.readUnsignedInt() / 3600000.0;\n position.setSpeed(UnitsConverter.knotsFromKph(buf.readUnsignedShort()));\n position.setCourse(buf.readUnsignedShort() % 360);\n int flags = buf.readUnsignedByte();\n position.setLatitude((flags & 0x02) == 0 ? -lat : lat);\n position.setLongitude((flags & 0x01) == 0 ? -lon : lon);\n position.setValid((flags & 0x0C) > 0);\n position.set(Event.KEY_SATELLITES, flags >> 4);\n return position;\n }\n return null;\n}\n"
"public boolean onActivated(EntityPlayer entityPlayer) {\n if (entityPlayer.inventory.getCurrentItem() != null) {\n if (WrenchUtility.isUsableWrench(entityPlayer, entityPlayer.inventory.getCurrentItem(), this.xCoord, this.yCoord, this.zCoord)) {\n if (!this.worldObj.isRemote) {\n this.emitAll = !this.emitAll;\n entityPlayer.addChatMessage(LanguageUtility.getLocal(\"String_Node_Str\") + \"String_Node_Str\" + this.emitAll);\n }\n return true;\n }\n }\n if (!this.worldObj.isRemote)\n entityPlayer.openGui(ICBMExplosion.instance, 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);\n return true;\n}\n"
"public void startMonitors() {\n try {\n int i = 0;\n for (AutoscalingConfiguration c : this.config) {\n StreamMonitor monitor;\n try {\n LOG.info(String.format(\"String_Node_Str\", c.getStreamName()));\n monitor = new StreamMonitor(c, executor);\n runningMonitors.put(i, monitor);\n monitorFutures.put(i, executor.submit(monitor));\n i++;\n } catch (Exception e) {\n LOG.error(e);\n }\n }\n while (true) {\n for (Integer n : monitorFutures.keySet()) {\n if (monitorFutures.get(n) == null) {\n throw new InterruptedException(\"String_Node_Str\");\n } else {\n if (monitorFutures.get(n).isDone()) {\n if (runningMonitors.get(n).getException() != null) {\n throw new InterruptedException(runningMonitors.get(n).getException().getMessage());\n }\n }\n }\n }\n Thread.sleep(60000);\n }\n } catch (InterruptedException e) {\n try {\n stopAll();\n LOG.debug(e);\n LOG.info(\"String_Node_Str\");\n executor.shutdown();\n } catch (Exception e1) {\n LOG.error(e);\n }\n }\n}\n"
"public void showSoftInput(int flags, ResultReceiver resultReceiver) {\n if (DEBUG)\n Log.v(TAG, \"String_Node_Str\");\n boolean wasVis = isInputViewShown();\n mShowInputFlags = 0;\n if (onShowInputRequested(flags, false)) {\n showWindow(true);\n }\n boolean showing = isInputViewShown();\n mImm.setImeWindowStatus(mToken, IME_ACTIVE | (showing ? IME_VISIBLE : 0), mBackDisposition);\n if (resultReceiver != null) {\n resultReceiver.send(wasVis != isInputViewShown() ? InputMethodManager.RESULT_SHOWN : (wasVis ? InputMethodManager.RESULT_UNCHANGED_SHOWN : InputMethodManager.RESULT_UNCHANGED_HIDDEN), null);\n }\n}\n"
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n requestWindowFeature(Window.FEATURE_PROGRESS);\n requestWindowFeature(Window.FEATURE_LEFT_ICON);\n setContentView(R.layout.compose_message_activity);\n setProgressBarVisibility(false);\n setTitle(\"String_Node_Str\");\n initResourceRefs();\n mContentResolver = getContentResolver();\n mBackgroundQueryHandler = new BackgroundQueryHandler(mContentResolver);\n mWorkingMessage = WorkingMessage.createEmpty(this);\n initActivityState(savedInstanceState, getIntent());\n if (LOCAL_LOGV) {\n Log.v(TAG, \"String_Node_Str\" + savedInstanceState);\n Log.v(TAG, \"String_Node_Str\" + getIntent());\n }\n if (cancelFailedToDeliverNotification(getIntent(), this)) {\n undeliveredMessageDialog(getMessageDate(null));\n }\n initMessageList();\n mConversation.markAsRead();\n if (!handleSendIntent(getIntent()) && !handleForwardedMessage()) {\n loadDraft();\n }\n mWorkingMessage.setConversation(mConversation);\n if (mConversation.getThreadId() <= 0) {\n initRecipientsEditor();\n }\n updateSendButtonState();\n drawTopPanel();\n drawBottomPanel();\n mAttachmentEditor.update(mWorkingMessage);\n Configuration config = getResources().getConfiguration();\n mIsKeyboardOpen = config.keyboardHidden == KEYBOARDHIDDEN_NO;\n mIsLandscape = config.orientation == Configuration.ORIENTATION_LANDSCAPE;\n onKeyboardStateChanged(mIsKeyboardOpen);\n if (TRACE) {\n android.os.Debug.startMethodTracing(\"String_Node_Str\");\n }\n}\n"
"public void createUser(final String user, final String group) throws GenieException {\n final CommandLine idCheckCommandLine = new CommandLine(\"String_Node_Str\");\n idCheckCommandLine.addArgument(\"String_Node_Str\");\n idCheckCommandLine.addArgument(user);\n try {\n this.executor.execute(idCheckCommandLine);\n log.debug(\"String_Node_Str\");\n } catch (IOException ioe) {\n log.info(\"String_Node_Str\");\n final CommandLine userCreateCommandLine = new CommandLine(\"String_Node_Str\");\n userCreateCommandLine.addArgument(\"String_Node_Str\");\n userCreateCommandLine.addArgument(user);\n if (StringUtils.isNotBlank(group)) {\n userCreateCommandLine.addArgument(\"String_Node_Str\");\n userCreateCommandLine.addArgument(group);\n }\n userCreateCommandLine.addArgument(\"String_Node_Str\");\n try {\n this.executor.execute(userCreateCommandLine);\n } catch (IOException ioexception) {\n throw new GenieServerException(\"String_Node_Str\" + user + \"String_Node_Str\" + ioexception);\n }\n }\n}\n"
"protected void generateXMLSchema(ITypeModel t) {\n if (t instanceof ReflectionType) {\n Class<?> element = ((ReflectionType) t).getElement();\n generateXSDForClass(element);\n } else if (t.getFullyQualifiedName() != null && classLoader != null) {\n try {\n Class<?> element = classLoader.loadClass(t.getFullyQualifiedName());\n generateXSDForClass(element);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }\n afterSchemaGen(t, collectionTag);\n}\n"
"public static VM_CodeArray[] buildTable() {\n String[] names = initNames();\n VM_CodeArray[] functions = new VM_CodeArray[VM_JNIFunctions.FUNCTIONCOUNT];\n VM_Class cls = VM_TypeReference.VM_JNIFunctions.peekResolvedType().asClass();\n if (VM.VerifyAssertions)\n VM._assert(cls.isInstantiated());\n for (VM_Method mth : cls.getDeclaredMethods()) {\n String methodName = mth.getName().toString();\n int jniIndex = indexOf(names, methodName);\n if (jniIndex != -1) {\n functions[jniIndex] = mth.getCurrentEntryCodeArray();\n }\n }\n return functions;\n}\n"
"public static void outputInfoMinimum() {\n level = Level.WARNING;\n}\n"
"public ScenarioDefinition read(String pathToFile) {\n LOGGER.debug(\"String_Node_Str\", pathToFile);\n XScenarioDefinition sd = null;\n try {\n JAXBContext jc = JAXBContext.newInstance(Configuration.getSessionUnrelatedSingleton().getPropertyAsStr(IConfiguration.CONF_SCENARIO_DEFINITION_PACKAGE));\n Unmarshaller u = jc.createUnmarshaller();\n sd = ((JAXBElement<XScenarioDefinition>) u.unmarshal(new FileInputStream(pathToFile))).getValue();\n } catch (FileNotFoundException e) {\n throw new RuntimeException(\"String_Node_Str\", e);\n } catch (JAXBException e) {\n throw new RuntimeException(e);\n }\n ScenarioDefinition scenarioDefinition = convertScenarioDefinition(sd);\n scenarioDefinition.setMeasurementEnvironmentDefinition(meDefinition);\n return scenarioDefinition;\n}\n"
"public String toString() {\n final StringBuilder s = new StringBuilder(\"String_Node_Str\");\n s.append(\"String_Node_Str\");\n if (observer != null)\n s.append(\"String_Node_Str\").append(observer.getClass().getName()).append(\"String_Node_Str\").append(Integer.toHexString(observer.hashCode())).append(\"String_Node_Str\");\n else\n s.append(\"String_Node_Str\");\n s.append(\"String_Node_Str\").append(kind).append(\"String_Node_Str\");\n if (kind == Kind.OnNext)\n s.append(\"String_Node_Str\").append(quote(value));\n if (kind == Kind.OnError)\n s.append(\"String_Node_Str\").append(throwable.getMessage() == null ? throwable.getClass().getSimpleName() : throwable.getMessage().replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\")).append(\"String_Node_Str\");\n if (kind == Kind.Request)\n s.append(\"String_Node_Str\").append(n);\n if (source != null)\n s.append(\"String_Node_Str\").append(source.getClass().getName()).append(\"String_Node_Str\").append(Integer.toHexString(source.hashCode())).append(\"String_Node_Str\");\n if (sourceFunc != null)\n s.append(\"String_Node_Str\").append(sourceFunc.getClass().getName()).append(\"String_Node_Str\").append(Integer.toHexString(sourceFunc.hashCode())).append(\"String_Node_Str\");\n if (from != null)\n s.append(\"String_Node_Str\").append(from.getClass().getName()).append(\"String_Node_Str\").append(Integer.toHexString(from.hashCode())).append(\"String_Node_Str\");\n if (to != null)\n s.append(\"String_Node_Str\").append(to.getClass().getName()).append(\"String_Node_Str\").append(Integer.toHexString(to.hashCode())).append(\"String_Node_Str\");\n s.append(\"String_Node_Str\");\n return s.toString();\n}\n"
"private InputParameterAttributes updateInputElementAttrs(InputParameterAttributes inputParamAttrs, ScalarParameterHandle paramDefn, DataSetDesign dataSetDesign) {\n if (inputParamAttrs == null)\n inputParamAttrs = DesignFactory.eINSTANCE.createInputParameterAttributes();\n InputElementAttributes inputAttrs = inputParamAttrs.getElementAttributes();\n if (inputAttrs == null)\n inputAttrs = DesignFactory.eINSTANCE.createInputElementAttributes();\n inputAttrs.setDefaultScalarValue(paramDefn.getDefaultValue());\n inputAttrs.setOptional(paramDefn.allowBlank());\n inputAttrs.setMasksValue(paramDefn.isConcealValue());\n ScalarValueChoices staticChoices = null;\n Iterator selectionList = paramDefn.choiceIterator();\n while (selectionList.hasNext()) {\n if (staticChoices == null)\n staticChoices = DesignFactory.eINSTANCE.createScalarValueChoices();\n SelectionChoiceHandle choice = (SelectionChoiceHandle) selectionList.next();\n ScalarValueDefinition valueDefn = DesignFactory.eINSTANCE.createScalarValueDefinition();\n valueDefn.setValue(choice.getValue());\n valueDefn.setDisplayName(choice.getLabel());\n staticChoices.getScalarValues().add(valueDefn);\n }\n inputAttrs.setStaticValueChoices(staticChoices);\n DataSetHandle setHandle = paramDefn.getDataSet();\n String valueExpr = paramDefn.getValueExpr();\n String labelExpr = paramDefn.getLabelExpr();\n if (setHandle instanceof OdaDataSetHandle && (valueExpr != null || labelExpr != null)) {\n DynamicValuesQuery valueQuery = DesignFactory.eINSTANCE.createDynamicValuesQuery();\n if (dataSetDesign != null) {\n DataSetDesign targetDataSetDesign = (DataSetDesign) EcoreUtil.copy(dataSetDesign);\n if (!setHandle.getName().equals(dataSetDesign.getName()))\n targetDataSetDesign = new ModelOdaAdapter().createDataSetDesign((OdaDataSetHandle) setHandle);\n valueQuery.setDataSetDesign(targetDataSetDesign);\n } else {\n DataSetDesign targetDataSetDesign = new ModelOdaAdapter().createDataSetDesign((OdaDataSetHandle) setHandle);\n valueQuery.setDataSetDesign(targetDataSetDesign);\n }\n valueQuery.setDisplayNameColumn(labelExpr);\n valueQuery.setValueColumn(valueExpr);\n valueQuery.setEnabled(true);\n inputAttrs.setDynamicValueChoices(valueQuery);\n }\n InputElementUIHints uiHints = DesignFactory.eINSTANCE.createInputElementUIHints();\n uiHints.setPromptStyle(newPromptStyle(paramDefn.getControlType(), paramDefn.isMustMatch()));\n inputAttrs.setUiHints(uiHints);\n if (paramDefn.getContainer() instanceof ParameterGroupHandle) {\n ParameterGroupHandle groupHandle = (ParameterGroupHandle) paramDefn.getContainer();\n InputParameterUIHints paramUiHints = DesignFactory.eINSTANCE.createInputParameterUIHints();\n paramUiHints.setGroupPromptDisplayName(groupHandle.getDisplayName());\n inputParamAttrs.setUiHints(paramUiHints);\n }\n inputParamAttrs.setElementAttributes(inputAttrs);\n return inputParamAttrs;\n}\n"
"private JsonNode flatArrayOfElements(SopremoTestPlan testPlan, int[]... ids) {\n ArrayNode array = new ArrayNode();\n for (int sourceIndex = 0; sourceIndex < ids.length; sourceIndex++) {\n EvaluationExpression resultProjection = this.resultProjections[sourceIndex];\n if (resultProjection == null)\n resultProjection = EvaluationExpression.VALUE;\n for (int tupleIndex = 0; tupleIndex < ids[sourceIndex].length; tupleIndex++) array.add(resultProjection.evaluate(this.findTuple(testPlan, sourceIndex, ids[sourceIndex][tupleIndex]), testPlan.getEvaluationContext()));\n }\n return new ArrayNode(array);\n}\n"
"public Figure createBackgroundFigure() {\n NamedObj container = (NamedObj) getContainer();\n SingletonConfigurableAttribute description = (SingletonConfigurableAttribute) container.getAttribute(\"String_Node_Str\");\n if (_description != description) {\n if (_description != null) {\n _description.removeValueListener(this);\n }\n _description = description;\n if (_description != null) {\n _description.addValueListener(this);\n }\n _recreateFigure();\n }\n if (_paintedList == null) {\n return _createDefaultBackgroundFigure();\n } else {\n return new PaintedFigure(_paintedList);\n }\n}\n"
"public boolean set(TypeProvider target) {\n if (owner == null || !owner.isEditable())\n return false;\n if (target instanceof SharedFacetNode) {\n target = (TypeProvider) target.getParent();\n LOGGER.debug(\"String_Node_Str\");\n }\n TypeProvider oldProvider = owner.getAssignedType();\n if (owner.getRequiredType() != null)\n return false;\n if (oldProvider == target) {\n if (!target.getWhereAssigned().contains(owner)) {\n target.addTypeUser(owner);\n }\n if (target != ModelNode.getUnassignedNode())\n return true;\n }\n if (target == null || target == ModelNode.getUnassignedNode()) {\n oldProvider.removeWhereAssigned(owner);\n ModelNode.getUnassignedNode().addTypeUser(owner);\n return false;\n }\n TLModelElement tlTarget = target.getTLModelObject();\n if (target.getLibrary() != null && target.getLibrary().isBuiltIn() && target.getLibrary().getNamespace().equals(XMLConstants.W3C_XML_SCHEMA_NS_URI))\n if (target.getXsdObjectHandler() != null)\n tlTarget = target.getXsdObjectHandler().getTLLibraryMember();\n boolean result = owner.setAssignedTLType(tlTarget);\n if (result) {\n ModelNode.getUnassignedNode().removeWhereAssigned(owner);\n oldProvider.removeWhereAssigned(owner);\n target.addTypeUser(owner);\n } else\n LOGGER.debug(\"String_Node_Str\" + target + \"String_Node_Str\" + owner);\n if (get().getTLModelObject() != tlTarget) {\n TypeProvider actual = get();\n if (actual.getXsdObjectHandler() == null || actual.getXsdObjectHandler().getTLLibraryMember() != tlTarget) {\n LOGGER.debug(\"String_Node_Str\" + ((Node) target).getNameWithPrefix() + \"String_Node_Str\" + owner + \"String_Node_Str\" + ((Node) get()).getNameWithPrefix());\n return false;\n }\n }\n return result;\n}\n"
"protected String getFreqRowsStatement() {\n String clause = \"String_Node_Str\";\n TdColumn column = (TdColumn) indicator.getAnalyzedElement();\n int javaType = column.getJavaType();\n if (Java2SqlType.isTextInSQL(javaType)) {\n clause = getInstantiatedClause();\n } else if (Java2SqlType.isDateInSQL(javaType)) {\n IndicatorParameters parameters = indicator.getParameters();\n DateGrain dateGrain = parameters.getDateParameters().getDateAggregationType();\n switch(dateGrain) {\n case DAY:\n clause = dbmsLanguage.extractDay(this.columnName) + dbmsLanguage.equal() + getDayCharacters(entity.getLabel());\n case WEEK:\n if (clause.length() == 0) {\n clause = concatWhereClause(clause, dbmsLanguage.extractWeek(this.columnName) + dbmsLanguage.equal() + getWeekCharacters(entity.getLabel()));\n }\n case MONTH:\n clause = concatWhereClause(clause, dbmsLanguage.extractMonth(this.columnName) + dbmsLanguage.equal() + getMonthCharacters(dateGrain, entity.getLabel()));\n case QUARTER:\n if (clause.length() == 0) {\n clause = concatWhereClause(clause, dbmsLanguage.extractQuarter(this.columnName) + dbmsLanguage.equal() + getQuarterCharacters(entity.getLabel()));\n }\n case YEAR:\n clause = concatWhereClause(clause, buildWhereClause());\n break;\n case NONE:\n default:\n clause = getDefaultQuotedStatement(\"String_Node_Str\");\n break;\n }\n } else if (Java2SqlType.isNumbericInSQL(javaType)) {\n IndicatorParameters parameters = indicator.getParameters();\n if (parameters != null) {\n Domain bins = parameters.getBins();\n if (bins != null) {\n final EList<RangeRestriction> ranges = bins.getRanges();\n for (RangeRestriction rangeRestriction : ranges) {\n if (entity.getLabel() != null && entity.getLabel().equals(rangeRestriction.getName())) {\n clause = createWhereClause(rangeRestriction);\n break;\n }\n }\n } else {\n clause = getInstantiatedClause();\n }\n } else {\n clause = getInstantiatedClause();\n }\n } else {\n clause = getDefaultQuotedStatement(\"String_Node_Str\");\n }\n return \"String_Node_Str\" + getFullyQualifiedTableName(column) + dbmsLanguage.where() + inBrackets(clause) + andDataFilterClause();\n}\n"
"private void calcReferenceVector() {\n referenceVector = getReferenceAxisCylic();\n if (referenceVector == null) {\n logger.warn(\"String_Node_Str\");\n referenceVector = new Vector3d(Y_AXIS);\n }\n referenceVector = orthogonalize(principalRotationVector, referenceVector);\n}\n"
"protected List<IEObjectDescription> computeExportedObjects() {\n Resource resource = getResource();\n if (resource instanceof XtextResource) {\n if (!resource.isLoaded()) {\n try {\n resource.load(null);\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n return Collections.<IEObjectDescription>emptyList();\n }\n }\n IParseResult parseResult = ((XtextResource) resource).getParseResult();\n if (parseResult != null && parseResult.getRootASTElement() != null) {\n final List<IEObjectDescription> result = newArrayList();\n IAcceptor<IEObjectDescription> acceptor = new IAcceptor<IEObjectDescription>() {\n public void accept(IEObjectDescription description) {\n result.add(description);\n }\n };\n TreeIterator<EObject> allProperContents = EcoreUtil2.eAll(parseResult.getRootASTElement());\n while (allProperContents.hasNext()) {\n EObject content = allProperContents.next();\n if (!strategy.createEObjectDescriptions(content, acceptor)) {\n allProperContents.prune();\n }\n }\n return result;\n }\n }\n return super.computeExportedObjects();\n}\n"
"private void saveToCache(InputStream is, File to) {\n logger.info(\"String_Node_Str\" + to.getAbsolutePath());\n FileOutputStream fs = null;\n int times = 0;\n try {\n if (to.exists()) {\n to.delete();\n }\n fs = new FileOutputStream(to);\n int byteRead = 0;\n byte[] buffer = new byte[1024];\n while ((byteRead = is.read(buffer)) != -1) {\n times += byteRead;\n fs.write(buffer, 0, byteRead);\n if (times >= C.getContentLength()) {\n break;\n }\n }\n if (to.length() > 1) {\n to.setLastModified(C.getLastModified());\n logger.info(\"String_Node_Str\" + to.getAbsolutePath() + \"String_Node_Str\" + to.lastModified() + \"String_Node_Str\" + to.length() + \"String_Node_Str\");\n } else {\n to.delete();\n logger.info(\"String_Node_Str\" + to.getAbsolutePath());\n }\n } catch (Exception e) {\n logger.warning(e.getMessage());\n } finally {\n try {\n if (fs != null)\n fs.close();\n is.reset();\n logger.info(\"String_Node_Str\" + is.available());\n } catch (IOException e) {\n logger.warning(e.getMessage());\n }\n if (to.exists()) {\n to.setLastModified(C.getLastModified());\n }\n }\n}\n"
"public ValidateResult verifyCoinData(Transaction transaction, List<Transaction> txList) {\n if (transaction == null || transaction.getCoinData() == null || txList == null) {\n return ValidateResult.getFailedResult(CLASS_NAME, LedgerErrorCode.NULL_PARAMETER);\n }\n try {\n CoinData coinData = transaction.getCoinData();\n int initialCapacity = 0;\n CoinData validateCoinData;\n List<Coin> validateToList;\n for (Transaction tx : txList) {\n validateCoinData = tx.getCoinData();\n if (validateCoinData == null) {\n continue;\n }\n initialCapacity += validateCoinData.getTo().size();\n }\n Map<String, Coin> validateUtxoMap = new HashMap<>(initialCapacity);\n Transaction tx;\n byte[] txHashBytes;\n Coin toOfValidate;\n for (int i = 0, length = txList.size(); i < length; i++) {\n tx = txList.get(i);\n validateCoinData = tx.getCoinData();\n if (validateCoinData == null) {\n continue;\n }\n txHashBytes = tx.getHash().serialize();\n validateToList = validateCoinData.getTo();\n for (int k = 0, toLength = validateToList.size(); k < toLength; k++) {\n toOfValidate = validateToList.get(k);\n validateUtxoMap.put(asString(Arrays.concatenate(txHashBytes, new VarInt(k).encode())), toOfValidate);\n }\n }\n List<Coin> froms = coinData.getFrom();\n int fromSize = froms.size();\n P2PKHScriptSig p2PKHScriptSig = null;\n byte[] user = null;\n if (fromSize > 0) {\n try {\n p2PKHScriptSig = P2PKHScriptSig.createFromBytes(transaction.getScriptSig());\n user = p2PKHScriptSig.getSignerHash160();\n } catch (NulsException e) {\n return ValidateResult.getFailedResult(CLASS_NAME, LedgerErrorCode.DATA_ERROR);\n }\n }\n HashSet set = new HashSet(fromSize);\n Na fromTotal = Na.ZERO;\n byte[] fromBytes;\n Coin fromInDBorList = null;\n byte[] fromAdressBytes = null;\n for (Coin from : froms) {\n fromBytes = from.getOwner();\n fromInDBorList = utxoLedgerUtxoStorageService.getUtxo(fromBytes);\n if (fromInDBorList == null) {\n fromInDBorList = validateUtxoMap.get(asString(fromBytes));\n }\n if (null == fromInDBorList) {\n if (null != utxoLedgerTransactionStorageService.getTxBytes(LedgerUtil.getTxHashBytes(fromBytes))) {\n return ValidateResult.getFailedResult(CLASS_NAME, LedgerErrorCode.LEDGER_DOUBLE_SPENT, \"String_Node_Str\");\n } else {\n return ValidateResult.getFailedResult(CLASS_NAME, LedgerErrorCode.ORPHAN_TX);\n }\n } else {\n fromAdressBytes = fromInDBorList.getOwner();\n if (!checkPublicKeyHash(fromAdressBytes, user)) {\n Log.warn(\"String_Node_Str\");\n return ValidateResult.getFailedResult(CLASS_NAME, LedgerErrorCode.INVALID_INPUT);\n }\n }\n if (!transaction.isUnlockTx()) {\n if (TimeService.currentTimeMillis() < from.getLockTime()) {\n return ValidateResult.getFailedResult(CLASS_NAME, LedgerErrorCode.UTXO_UNUSABLE);\n }\n } else {\n if (from.getLockTime() != -1) {\n return ValidateResult.getFailedResult(CLASS_NAME, LedgerErrorCode.UTXO_STATUS_CHANGE);\n }\n }\n if (!set.add(asString(fromBytes))) {\n return ValidateResult.getFailedResult(CLASS_NAME, LedgerErrorCode.LEDGER_DOUBLE_SPENT, \"String_Node_Str\");\n }\n fromTotal = fromTotal.add(from.getNa());\n }\n List<Coin> tos = coinData.getTo();\n Na toTotal = Na.ZERO;\n for (Coin to : tos) {\n toTotal = toTotal.add(to.getNa());\n }\n if (fromTotal.compareTo(toTotal) < 0) {\n return ValidateResult.getFailedResult(CLASS_NAME, LedgerErrorCode.INVALID_AMOUNT);\n }\n } catch (Exception e) {\n Log.error(e);\n return ValidateResult.getFailedResult(CLASS_NAME, e.getMessage());\n }\n return ValidateResult.getSuccessResult();\n}\n"
"public SAMFileWriter makeWriter(final SAMFileHeader header, final boolean presorted, final File outputFile, final File referenceFasta) {\n if (outputFile.getName().endsWith(SamReader.Type.CRAM_TYPE.fileExtension())) {\n return makeCRAMWriter(header, presorted, outputFile, referenceFasta);\n } else {\n return makeSAMOrBAMWriter(header, presorted, outputFile);\n }\n}\n"
"public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.records_activity, container, false);\n}\n"
"private boolean isValid() {\n boolean validate = true;\n String newColumnNameOrAlias;\n DataSetViewData[] items = null;\n if (viewer == null || viewer.getViewer() == null) {\n try {\n items = DataSetProvider.getCurrentInstance().getColumns(((DataSetEditor) getContainer()).getHandle(), false, true);\n } catch (Exception e) {\n ExceptionHandler.handle(e, true);\n }\n } else {\n items = (DataSetViewData[]) viewer.getViewer().getInput();\n }\n for (int i = 0; items != null && i < items.length && validate; i++) {\n newColumnNameOrAlias = items[i].getAlias();\n if (newColumnNameOrAlias != null && newColumnNameOrAlias.length() > 0) {\n for (int n = 0; n < items.length; n++) {\n if (i == n)\n continue;\n if ((items[n].getName() != null && items[n].getName().equals(newColumnNameOrAlias)) || (items[n].getAlias() != null && items[n].getAlias().equals(newColumnNameOrAlias))) {\n validate = false;\n getContainer().setMessage(Messages.getFormattedString(\"String_Node_Str\", new Object[] { newColumnNameOrAlias, Integer.valueOf(n + 1) }), IMessageProvider.ERROR);\n break;\n }\n }\n }\n }\n return validate;\n}\n"
"public void createInstanceAndStartDependencyOnScaleup(Group group, String parentInstanceId) throws MonitorNotFoundException {\n Instance parentInstanceContext = getParentInstanceContext(parentInstanceId);\n GroupLevelNetworkPartitionContext groupLevelNetworkPartitionContext = getGroupLevelNetworkPartitionContext(group.getUniqueIdentifier(), this.appId, parentInstanceContext);\n addPartitionContext(parentInstanceContext, groupLevelNetworkPartitionContext);\n String groupInstanceId;\n PartitionContext partitionContext;\n String parentPartitionId = parentInstanceContext.getPartitionId();\n int groupMax = group.getGroupMaxInstances();\n if (group.getInstanceContextCount() < groupMax) {\n if (parentPartitionId == null) {\n AutoscaleAlgorithm algorithm = this.getAutoscaleAlgorithm(groupLevelNetworkPartitionContext.getPartitionAlgorithm());\n partitionContext = algorithm.getNextScaleUpPartitionContext((PartitionContext[]) groupLevelNetworkPartitionContext.getPartitionCtxts().toArray());\n } else {\n partitionContext = groupLevelNetworkPartitionContext.getPartitionContextById(parentPartitionId);\n }\n groupInstanceId = createGroupInstanceAndAddToMonitor(group, parentInstanceContext, partitionContext, groupLevelNetworkPartitionContext, null);\n startDependency(group, groupInstanceId);\n } else {\n log.warn(\"String_Node_Str\" + group.getUniqueIdentifier() + \"String_Node_Str\" + \"String_Node_Str\" + groupMax + \"String_Node_Str\");\n }\n}\n"
"public void testAppInit() {\n Assert.assertFalse(PendingCalcs.isUpdatePending(CommCareApplication.instance().getCurrentApp().getAppPreferences()));\n Profile p = CommCareApplication.instance().getCommCarePlatform().getCurrentProfile();\n Assert.assertTrue(p.getVersion() == 8);\n}\n"
"public void run() {\n if (!running.compareAndSet(false, true)) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n sequenceBarrier.clearAlert();\n notifyStart();\n boolean processedSequence = true;\n long nextSequence = sequence.get();\n T event = null;\n while (true) {\n try {\n if (processedSequence) {\n processedSequence = false;\n nextSequence = workSequence.incrementAndGet();\n sequence.set(nextSequence - 1L);\n }\n if (sequenceBarrier.waitFor(nextSequence) >= nextSequence) {\n event = ringBuffer.get(nextSequence);\n workHandler.onEvent(event);\n processedSequence = true;\n }\n } catch (final AlertException ex) {\n if (!running.get()) {\n break;\n }\n } catch (final Throwable ex) {\n exceptionHandler.handleEventException(ex, nextSequence, event);\n processedSequence = true;\n }\n }\n notifyShutdown();\n running.set(false);\n}\n"
"synchronized void stop() {\n finish = true;\n notifyAll();\n}\n"
"public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {\n boolean success = super.configure(name, params);\n if (!success) {\n return false;\n }\n _storage = new JavaStorageLayer();\n _storage.configure(\"String_Node_Str\", params);\n String domrScriptsDir = (String) params.get(\"String_Node_Str\");\n if (domrScriptsDir == null) {\n domrScriptsDir = getDefaultDomrScriptsDir();\n }\n String kvmScriptsDir = (String) params.get(\"String_Node_Str\");\n if (kvmScriptsDir == null) {\n kvmScriptsDir = getDefaultKvmScriptsDir();\n }\n String networkScriptsDir = (String) params.get(\"String_Node_Str\");\n if (networkScriptsDir == null) {\n networkScriptsDir = getDefaultNetworkScriptsDir();\n }\n String storageScriptsDir = (String) params.get(\"String_Node_Str\");\n if (storageScriptsDir == null) {\n storageScriptsDir = getDefaultStorageScriptsDir();\n }\n String bridgeType = (String) params.get(\"String_Node_Str\");\n if (bridgeType == null) {\n _bridgeType = BridgeType.NATIVE;\n } else {\n _bridgeType = BridgeType.valueOf(bridgeType.toUpperCase());\n }\n params.put(\"String_Node_Str\", domrScriptsDir);\n _virtRouterResource = new VirtualRoutingResource(this);\n success = _virtRouterResource.configure(name, params);\n if (!success) {\n return false;\n }\n _host = (String) params.get(\"String_Node_Str\");\n if (_host == null) {\n _host = \"String_Node_Str\";\n }\n _dcId = (String) params.get(\"String_Node_Str\");\n if (_dcId == null) {\n _dcId = \"String_Node_Str\";\n }\n _pod = (String) params.get(\"String_Node_Str\");\n if (_pod == null) {\n _pod = \"String_Node_Str\";\n }\n _clusterId = (String) params.get(\"String_Node_Str\");\n _modifyVlanPath = Script.findScript(networkScriptsDir, \"String_Node_Str\");\n if (_modifyVlanPath == null) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n _versionstringpath = Script.findScript(kvmScriptsDir, \"String_Node_Str\");\n if (_versionstringpath == null) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n _patchViaSocketPath = Script.findScript(kvmScriptsDir + \"String_Node_Str\", \"String_Node_Str\");\n if (_patchViaSocketPath == null) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n _heartBeatPath = Script.findScript(kvmScriptsDir, \"String_Node_Str\");\n if (_heartBeatPath == null) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n _createvmPath = Script.findScript(storageScriptsDir, \"String_Node_Str\");\n if (_createvmPath == null) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n _manageSnapshotPath = Script.findScript(storageScriptsDir, \"String_Node_Str\");\n if (_manageSnapshotPath == null) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n _resizeVolumePath = Script.findScript(storageScriptsDir, \"String_Node_Str\");\n if (_resizeVolumePath == null) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n _createTmplPath = Script.findScript(storageScriptsDir, \"String_Node_Str\");\n if (_createTmplPath == null) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n _securityGroupPath = Script.findScript(networkScriptsDir, \"String_Node_Str\");\n if (_securityGroupPath == null) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n _ovsTunnelPath = Script.findScript(networkScriptsDir, \"String_Node_Str\");\n if (_ovsTunnelPath == null) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n _routerProxyPath = Script.findScript(\"String_Node_Str\", \"String_Node_Str\");\n if (_routerProxyPath == null) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n _ovsPvlanDhcpHostPath = Script.findScript(networkScriptsDir, \"String_Node_Str\");\n if (_ovsPvlanDhcpHostPath == null) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n _ovsPvlanVmPath = Script.findScript(networkScriptsDir, \"String_Node_Str\");\n if (_ovsPvlanVmPath == null) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n String value = (String) params.get(\"String_Node_Str\");\n boolean isDeveloper = Boolean.parseBoolean(value);\n if (isDeveloper) {\n params.putAll(getDeveloperProperties());\n }\n _pool = (String) params.get(\"String_Node_Str\");\n if (_pool == null) {\n _pool = \"String_Node_Str\";\n }\n String instance = (String) params.get(\"String_Node_Str\");\n _hypervisorType = HypervisorType.getType((String) params.get(\"String_Node_Str\"));\n if (_hypervisorType == HypervisorType.None) {\n _hypervisorType = HypervisorType.KVM;\n }\n if (HypervisorType.LXC.equals(getHypervisorType())) {\n _setupCgroupPath = Script.findScript(kvmScriptsDir, \"String_Node_Str\");\n if (_setupCgroupPath == null) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n if (!checkCgroups()) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n }\n _hypervisorURI = (String) params.get(\"String_Node_Str\");\n if (_hypervisorURI == null) {\n _hypervisorURI = LibvirtConnection.getHypervisorURI(_hypervisorType.toString());\n }\n _networkDirectSourceMode = (String) params.get(\"String_Node_Str\");\n _networkDirectDevice = (String) params.get(\"String_Node_Str\");\n String startMac = (String) params.get(\"String_Node_Str\");\n if (startMac == null) {\n startMac = \"String_Node_Str\";\n }\n String startIp = (String) params.get(\"String_Node_Str\");\n if (startIp == null) {\n startIp = \"String_Node_Str\";\n }\n _pingTestPath = Script.findScript(kvmScriptsDir, \"String_Node_Str\");\n if (_pingTestPath == null) {\n throw new ConfigurationException(\"String_Node_Str\");\n }\n _linkLocalBridgeName = (String) params.get(\"String_Node_Str\");\n if (_linkLocalBridgeName == null) {\n if (isDeveloper) {\n _linkLocalBridgeName = \"String_Node_Str\" + instance + \"String_Node_Str\";\n } else {\n _linkLocalBridgeName = \"String_Node_Str\";\n }\n }\n _publicBridgeName = (String) params.get(\"String_Node_Str\");\n if (_publicBridgeName == null) {\n _publicBridgeName = \"String_Node_Str\";\n }\n _privBridgeName = (String) params.get(\"String_Node_Str\");\n if (_privBridgeName == null) {\n _privBridgeName = \"String_Node_Str\";\n }\n _guestBridgeName = (String) params.get(\"String_Node_Str\");\n if (_guestBridgeName == null) {\n _guestBridgeName = _privBridgeName;\n }\n _privNwName = (String) params.get(\"String_Node_Str\");\n if (_privNwName == null) {\n if (isDeveloper) {\n _privNwName = \"String_Node_Str\" + instance + \"String_Node_Str\";\n } else {\n _privNwName = \"String_Node_Str\";\n }\n }\n _localStoragePath = (String) params.get(\"String_Node_Str\");\n if (_localStoragePath == null) {\n _localStoragePath = \"String_Node_Str\";\n }\n File storagePath = new File(_localStoragePath);\n _localStoragePath = storagePath.getAbsolutePath();\n _localStorageUUID = (String) params.get(\"String_Node_Str\");\n if (_localStorageUUID == null) {\n _localStorageUUID = UUID.nameUUIDFromBytes(_localStoragePath.getBytes()).toString();\n }\n value = (String) params.get(\"String_Node_Str\");\n _timeout = NumbersUtil.parseInt(value, 30 * 60) * 1000;\n value = (String) params.get(\"String_Node_Str\");\n _stopTimeout = NumbersUtil.parseInt(value, 120) * 1000;\n value = (String) params.get(\"String_Node_Str\");\n _cmdsTimeout = NumbersUtil.parseInt(value, 7200) * 1000;\n value = (String) params.get(\"String_Node_Str\");\n if (Boolean.parseBoolean(value)) {\n _noMemBalloon = true;\n }\n _videoHw = (String) params.get(\"String_Node_Str\");\n value = (String) params.get(\"String_Node_Str\");\n _videoRam = NumbersUtil.parseInt(value, 0);\n value = (String) params.get(\"String_Node_Str\");\n _dom0MinMem = NumbersUtil.parseInt(value, 0) * 1024 * 1024;\n value = (String) params.get(\"String_Node_Str\");\n if (Boolean.parseBoolean(value)) {\n _noKvmClock = true;\n } else if (HypervisorType.LXC.equals(_hypervisorType) && (value == null)) {\n _noKvmClock = true;\n }\n LibvirtConnection.initialize(_hypervisorURI);\n Connect conn = null;\n try {\n conn = LibvirtConnection.getConnection();\n if (_bridgeType == BridgeType.OPENVSWITCH) {\n if (conn.getLibVirVersion() < (10 * 1000 + 0)) {\n throw new ConfigurationException(\"String_Node_Str\" + conn.getLibVirVersion() + \"String_Node_Str\");\n }\n }\n } catch (LibvirtException e) {\n throw new CloudRuntimeException(e.getMessage());\n }\n if (HypervisorType.KVM == _hypervisorType) {\n if (!IsHVMEnabled(conn)) {\n throw new ConfigurationException(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n }\n }\n _hypervisorPath = getHypervisorPath(conn);\n try {\n _hvVersion = conn.getVersion();\n _hvVersion = (_hvVersion % 1000000) / 1000;\n _hypervisorLibvirtVersion = conn.getLibVirVersion();\n _hypervisorQemuVersion = conn.getVersion();\n } catch (LibvirtException e) {\n s_logger.trace(\"String_Node_Str\", e);\n }\n _guestCpuMode = (String) params.get(\"String_Node_Str\");\n if (_guestCpuMode != null) {\n _guestCpuModel = (String) params.get(\"String_Node_Str\");\n if (_hypervisorLibvirtVersion < (9 * 1000 + 10)) {\n s_logger.warn(\"String_Node_Str\" + prettyVersion(_hypervisorLibvirtVersion) + \"String_Node_Str\");\n _guestCpuMode = \"String_Node_Str\";\n _guestCpuModel = \"String_Node_Str\";\n }\n params.put(\"String_Node_Str\", _guestCpuMode);\n params.put(\"String_Node_Str\", _guestCpuModel);\n }\n String[] info = NetUtils.getNetworkParams(_privateNic);\n _monitor = new KVMHAMonitor(null, info[0], _heartBeatPath);\n Thread ha = new Thread(_monitor);\n ha.start();\n _storagePoolMgr = new KVMStoragePoolManager(_storage, _monitor);\n _sysvmISOPath = (String) params.get(\"String_Node_Str\");\n if (_sysvmISOPath == null) {\n String[] isoPaths = { \"String_Node_Str\" };\n for (String isoPath : isoPaths) {\n if (_storage.exists(isoPath)) {\n _sysvmISOPath = isoPath;\n break;\n }\n }\n if (_sysvmISOPath == null) {\n s_logger.debug(\"String_Node_Str\");\n }\n }\n switch(_bridgeType) {\n case OPENVSWITCH:\n getOvsPifs();\n break;\n case NATIVE:\n default:\n getPifs();\n break;\n }\n if (_pifs.get(\"String_Node_Str\") == null) {\n s_logger.debug(\"String_Node_Str\");\n throw new ConfigurationException(\"String_Node_Str\");\n }\n if (_pifs.get(\"String_Node_Str\") == null) {\n s_logger.debug(\"String_Node_Str\");\n throw new ConfigurationException(\"String_Node_Str\");\n }\n s_logger.debug(\"String_Node_Str\" + _pifs.get(\"String_Node_Str\") + \"String_Node_Str\" + _privBridgeName + \"String_Node_Str\" + _pifs.get(\"String_Node_Str\") + \"String_Node_Str\" + _publicBridgeName);\n _canBridgeFirewall = can_bridge_firewall(_pifs.get(\"String_Node_Str\"));\n _localGateway = Script.runSimpleBashScript(\"String_Node_Str\");\n if (_localGateway == null) {\n s_logger.debug(\"String_Node_Str\");\n }\n _mountPoint = (String) params.get(\"String_Node_Str\");\n if (_mountPoint == null) {\n _mountPoint = \"String_Node_Str\";\n }\n value = (String) params.get(\"String_Node_Str\");\n _migrateDowntime = NumbersUtil.parseInt(value, -1);\n value = (String) params.get(\"String_Node_Str\");\n _migratePauseAfter = NumbersUtil.parseInt(value, -1);\n value = (String) params.get(\"String_Node_Str\");\n _migrateSpeed = NumbersUtil.parseInt(value, -1);\n if (_migrateSpeed == -1) {\n _migrateSpeed = 0;\n String speed = Script.runSimpleBashScript(\"String_Node_Str\" + _pifs.get(\"String_Node_Str\") + \"String_Node_Str\");\n if (speed != null) {\n String[] tokens = speed.split(\"String_Node_Str\");\n if (tokens.length == 2) {\n try {\n _migrateSpeed = Integer.parseInt(tokens[0]);\n } catch (NumberFormatException e) {\n s_logger.trace(\"String_Node_Str\", e);\n }\n s_logger.debug(\"String_Node_Str\" + _pifs.get(\"String_Node_Str\") + \"String_Node_Str\" + String.valueOf(_migrateSpeed));\n }\n }\n params.put(\"String_Node_Str\", String.valueOf(_migrateSpeed));\n }\n Map<String, String> bridges = new HashMap<String, String>();\n bridges.put(\"String_Node_Str\", _linkLocalBridgeName);\n bridges.put(\"String_Node_Str\", _publicBridgeName);\n bridges.put(\"String_Node_Str\", _privBridgeName);\n bridges.put(\"String_Node_Str\", _guestBridgeName);\n params.put(\"String_Node_Str\", bridges);\n params.put(\"String_Node_Str\", _pifs);\n params.put(\"String_Node_Str\", this);\n params.put(\"String_Node_Str\", _hypervisorLibvirtVersion);\n configureVifDrivers(params);\n KVMStorageProcessor storageProcessor = new KVMStorageProcessor(_storagePoolMgr, this);\n storageProcessor.configure(name, params);\n storageHandler = new StorageSubsystemCommandHandlerBase(storageProcessor);\n String unameKernelVersion = Script.runSimpleBashScript(\"String_Node_Str\");\n String[] kernelVersions = unameKernelVersion.split(\"String_Node_Str\");\n _kernelVersion = Integer.parseInt(kernelVersions[0]) * 1000 * 1000 + (long) Integer.parseInt(kernelVersions[1]) * 1000 + Integer.parseInt(kernelVersions[2]);\n return true;\n}\n"
"public static int getImageDimensionValue(IContent content, DimensionType d, int dpi, int referenceLength) {\n if (d == null) {\n return -1;\n }\n try {\n return _getDimensionValue(content, d, renderOptionDpi, referenceLength);\n } catch (Exception e) {\n logger.log(Level.WARNING, e.getLocalizedMessage());\n return -1;\n }\n}\n"
"public void mouseClicked(MouseEvent m) {\n EvaluatedDescription eDescription = null;\n if (view.getSuggestClassPanel().getSuggestList().getSelectedValue() != null) {\n SuggestListItem item = (SuggestListItem) view.getSuggestClassPanel().getSuggestList().getSelectedValue();\n String desc = item.getValue();\n if (model.getEvaluatedDescriptionList() != null) {\n for (Iterator<EvaluatedDescription> i = model.getEvaluatedDescriptionList().iterator(); i.hasNext(); ) {\n eDescription = i.next();\n if (desc.equals(eDescription.getDescription().toManchesterSyntaxString(editorKit.getModelManager().getActiveOntology().getURI().toString(), null))) {\n evaluatedDescription = eDescription;\n break;\n }\n }\n }\n if (m.getClickCount() == 2) {\n view.getMoreDetailForSuggestedConceptsPanel().renderDetailPanel(evaluatedDescription);\n }\n }\n}\n"
"private void restoreDeleteObjectsTreeView(IRepositoryViewObject[] theInput) {\n for (IRepositoryViewObject viewObj : RemoveFromRepositoryAction.getViewObjectsRemovedList()) {\n Item item = viewObj.getProperty().getItem();\n MDMServerObject serverObj = ((MDMServerObjectItem) item).getMDMServerObject();\n TreeObject treeObj = Bean2EObjUtil.getInstance().wrapEObjWithTreeObject(serverObj);\n switch(treeObj.getType()) {\n case TreeObject.DATA_MODEL:\n getViewObjectByType(theInput, IServerObjectRepositoryType.TYPE_DATAMODEL).getChildren().add(viewObj);\n break;\n case TreeObject.DATA_CLUSTER:\n theInput[0].getChildren().add(viewObj);\n break;\n case TreeObject.MENU:\n theInput[2].getChildren().add(viewObj);\n break;\n case TreeObject.ROUTING_RULE:\n theInput[6].getChildren().get(1).getChildren().add(viewObj);\n break;\n case TreeObject.ROLE:\n theInput[10].getChildren().add(viewObj);\n break;\n case TreeObject.SERVICE_CONFIGURATION:\n theInput[7].getChildren().add(viewObj);\n break;\n case TreeObject.STORED_PROCEDURE:\n theInput[3].getChildren().add(viewObj);\n break;\n case TreeObject.TRANSFORMER:\n theInput[6].getChildren().get(0).getChildren().add(viewObj);\n break;\n case TreeObject.UNIVERSE:\n theInput[12].getChildren().add(viewObj);\n break;\n case TreeObject.VIEW:\n theInput[4].getChildren().add(viewObj);\n break;\n case TreeObject.SYNCHRONIZATIONPLAN:\n theInput[11].getChildren().add(viewObj);\n break;\n default:\n ;\n }\n }\n}\n"
"public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.filtershow_activity_menu, menu);\n MenuItem showHistory = menu.findItem(R.id.operationsButton);\n if (mShowingHistoryPanel) {\n item.setTitle(R.string.hide_history_panel);\n } else {\n item.setTitle(R.string.show_history_panel);\n }\n return true;\n}\n"
"public AjBuildConfig genBuildConfig(String configFile) {\n init();\n File configFile = new File(configFilePath);\n if (!configFile.exists()) {\n signalError(\"String_Node_Str\" + configFile + \"String_Node_Str\");\n return null;\n }\n String[] args = new String[] { \"String_Node_Str\" + config.getAbsolutePath() };\n CountingMessageHandler counter = CountingMessageHandler.makeCountingMessageHandler(messageHandler);\n BuildArgParser parser = new BuildArgParser();\n AjBuildConfig local = parser.genBuildConfig(args, counter, false);\n if (counter.hasErrors()) {\n return null;\n }\n local.setConfigFile(config);\n AjBuildConfig global = new AjBuildConfig();\n BuildOptionsAdapter buildOptions = Ajde.getDefault().getBuildManager().getBuildOptions();\n if (!configureBuildOptions(global, buildOptions, counter)) {\n return null;\n }\n ProjectPropertiesAdapter projectOptions = Ajde.getDefault().getProjectProperties();\n configureProjectOptions(global, projectOptions);\n local.installGlobals(global);\n String errs = local.configErrors();\n if (null != errs) {\n MessageUtil.error(counter, errs);\n return null;\n }\n local.setGenerateModelMode(true);\n return fixupBuildConfig(local, global, buildOptions, projectOptions);\n}\n"
"protected final void processBean(String beanName, Object bean) {\n if (bean == null) {\n return;\n }\n Class<?> clazz = bean.getClass();\n if (!filter.isTarget(beanName, clazz)) {\n return;\n }\n try {\n retransformer.retransform(clazz, modifier);\n if (logger.isInfoEnabled()) {\n logger.info(\"String_Node_Str\" + clazz.getName());\n }\n } catch (ProfilerException e) {\n logger.warn(\"String_Node_Str\" + clazz.getName(), e);\n return;\n }\n filter.addTransformed(clazz);\n}\n"
"public String handleTimeout(long updateMs) {\n if (s_logger.isTraceEnabled()) {\n getDownloadListener().log(\"String_Node_Str\" + updateMs + \"String_Node_Str\" + getName(), Level.TRACE);\n }\n String newState = getName();\n if (updateMs > 5 * DownloadListener.STATUS_POLL_INTERVAL) {\n newState = Status.DOWNLOAD_ERROR.toString();\n getDownloadListener().log(\"String_Node_Str\" + getName(), Level.DEBUG);\n } else if (updateMs > 3 * DownloadListener.STATUS_POLL_INTERVAL) {\n getDownloadListener().cancelStatusTask();\n getDownloadListener().scheduleImmediateStatusCheck(RequestType.GET_STATUS);\n getDownloadListener().scheduleTimeoutTask(3 * DownloadListener.STATUS_POLL_INTERVAL);\n getDownloadListener().log(getName() + \"String_Node_Str\", Level.DEBUG);\n } else {\n getDownloadListener().scheduleTimeoutTask(3 * DownloadListener.STATUS_POLL_INTERVAL);\n }\n return newState;\n}\n"
"public final String readUTF() throws IOException {\n boolean isNull = readBoolean();\n if (isNull)\n return null;\n int length = readInt();\n StringBuilder result = new StringBuilder(length);\n int chunkSize = length / FastByteArrayOutputStream.STRING_CHUNK_SIZE + 1;\n while (chunkSize > 0) {\n result.append(readShortUTF());\n chunkSize--;\n }\n return result.toString();\n}\n"
"public String getValue(IndexedReport job) {\n String value = null;\n if (job != null && job.getPlugin() != null) {\n PluginInfo pluginInfo = pluginsInfo.get(job.getPlugin());\n String pluginName;\n if (pluginInfo != null) {\n pluginName = pluginInfo.getName();\n } else {\n pluginName = job.getPlugin();\n }\n if (StringUtils.isNotBlank(job.getPluginVersion())) {\n value = messages.pluginLabelWithVersion(pluginName, job.getPluginVersion());\n } else {\n value = messages.pluginLabel(pluginName);\n }\n }\n return value;\n}\n"
"private void marshal(Object object, MarshalRecord marshalRecord, AbstractSession session, XMLDescriptor descriptor, boolean isXMLRoot) {\n if (null != schema) {\n marshalRecord = new ValidatingMarshalRecord(marshalRecord, this);\n }\n if (getAttachmentMarshaller() != null) {\n marshalRecord.setXOPPackage(getAttachmentMarshaller().isXOPPackage());\n }\n marshalRecord.setMarshaller(this);\n if (this.mapper == null) {\n addDescriptorNamespacesToXMLRecord(descriptor, marshalRecord);\n } else if (this.mapper != null) {\n if (descriptor == null) {\n marshalRecord.setNamespaceResolver(new PrefixMapperNamespaceResolver(mapper, null));\n } else {\n marshalRecord.setNamespaceResolver(new PrefixMapperNamespaceResolver(mapper, descriptor.getNamespaceResolver()));\n }\n marshalRecord.setCustomNamespaceMapper(true);\n }\n NamespaceResolver nr = marshalRecord.getNamespaceResolver();\n XMLRoot root = null;\n if (isXMLRoot) {\n root = (XMLRoot) object;\n }\n marshalRecord.beforeContainmentMarshal(object);\n if (!isFragment()) {\n String encoding = getEncoding();\n String version = DEFAULT_XML_VERSION;\n if (!isXMLRoot && descriptor != null) {\n marshalRecord.setLeafElementType(descriptor.getDefaultRootElementType());\n } else {\n if (root.getEncoding() != null) {\n encoding = root.getEncoding();\n }\n if (root.getXMLVersion() != null) {\n version = root.getXMLVersion();\n }\n }\n marshalRecord.startDocument(encoding, version);\n }\n if (isXMLRoot) {\n if (root.getObject() instanceof Node) {\n marshalRecord.node((Node) root.getObject(), new NamespaceResolver());\n marshalRecord.endDocument();\n return;\n }\n }\n XPathFragment rootFragment = buildRootFragment(object, descriptor, isXMLRoot, marshalRecord);\n String schemaLocation = getSchemaLocation();\n String noNsSchemaLocation = getNoNamespaceSchemaLocation();\n boolean isNil = false;\n if (isXMLRoot) {\n object = root.getObject();\n if (root.getSchemaLocation() != null) {\n schemaLocation = root.getSchemaLocation();\n }\n if (root.getNoNamespaceSchemaLocation() != null) {\n noNsSchemaLocation = root.getNoNamespaceSchemaLocation();\n }\n marshalRecord.setLeafElementType(root.getSchemaType());\n isNil = root.isNil();\n }\n String xsiPrefix = null;\n if ((null != getSchemaLocation()) || (null != getNoNamespaceSchemaLocation()) || (isNil)) {\n xsiPrefix = nr.resolveNamespaceURI(XMLConstants.SCHEMA_INSTANCE_URL);\n if (null == xsiPrefix) {\n xsiPrefix = XMLConstants.SCHEMA_INSTANCE_PREFIX;\n nr.put(XMLConstants.SCHEMA_INSTANCE_PREFIX, XMLConstants.SCHEMA_INSTANCE_URL);\n }\n }\n TreeObjectBuilder treeObjectBuilder = null;\n if (descriptor != null) {\n treeObjectBuilder = (TreeObjectBuilder) descriptor.getObjectBuilder();\n }\n if (session == null) {\n session = (AbstractSession) xmlContext.getSession(0);\n }\n marshalRecord.setSession(session);\n if (null != rootFragment && !(rootFragment.getLocalName().equals(XMLConstants.EMPTY_STRING))) {\n marshalRecord.startPrefixMappings(nr);\n if (!isXMLRoot && descriptor != null && descriptor.getNamespaceResolver() == null && rootFragment.hasNamespace()) {\n throw XMLMarshalException.namespaceResolverNotSpecified(rootFragment.getShortName());\n }\n if (isIncludeRoot()) {\n marshalRecord.openStartElement(rootFragment, nr);\n }\n if (null != schemaLocation) {\n marshalRecord.attribute(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_LOCATION, xsiPrefix + XMLConstants.COLON + XMLConstants.SCHEMA_LOCATION, schemaLocation);\n }\n if (null != noNsSchemaLocation) {\n marshalRecord.attribute(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.NO_NS_SCHEMA_LOCATION, xsiPrefix + XMLConstants.COLON + XMLConstants.NO_NS_SCHEMA_LOCATION, noNsSchemaLocation);\n }\n if (isNil) {\n marshalRecord.nilSimple(nr);\n }\n marshalRecord.namespaceDeclarations(nr);\n if (descriptor != null && !isNil) {\n treeObjectBuilder.addXsiTypeAndClassIndicatorIfRequired(marshalRecord, descriptor, null, descriptor.getDefaultRootElementField(), root, object, isXMLRoot, true);\n treeObjectBuilder.marshalAttributes(marshalRecord, object, session);\n }\n if (isIncludeRoot()) {\n marshalRecord.closeStartElement();\n }\n } else {\n marshalRecord.marshalWithoutRootElement(treeObjectBuilder, object, descriptor, root, isXMLRoot);\n }\n if (treeObjectBuilder != null && !isNil) {\n treeObjectBuilder.buildRow(marshalRecord, object, session, this, rootFragment, WriteType.UNDEFINED);\n } else if (isXMLRoot) {\n if (object != null && !isNil) {\n if (root.getDeclaredType() != null && root.getObject() != null && root.getDeclaredType() != root.getObject().getClass()) {\n QName type = (QName) XMLConversionManager.getDefaultJavaTypes().get(object.getClass());\n if (type != null) {\n xsiPrefix = nr.resolveNamespaceURI(XMLConstants.SCHEMA_INSTANCE_URL);\n if (null == xsiPrefix) {\n xsiPrefix = XMLConstants.SCHEMA_INSTANCE_PREFIX;\n marshalRecord.namespaceDeclaration(xsiPrefix, XMLConstants.SCHEMA_INSTANCE_URL);\n }\n marshalRecord.namespaceDeclaration(XMLConstants.SCHEMA_PREFIX, XMLConstants.SCHEMA_URL);\n String typeValue = type.getLocalPart();\n if (marshalRecord.isNamespaceAware()) {\n typeValue = XMLConstants.SCHEMA_PREFIX + marshalRecord.getNamespaceSeparator() + typeValue;\n }\n marshalRecord.attribute(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_TYPE_ATTRIBUTE, xsiPrefix + XMLConstants.COLON + XMLConstants.SCHEMA_TYPE_ATTRIBUTE, typeValue);\n }\n }\n marshalRecord.characters(root.getSchemaType(), object, null, false);\n }\n }\n if (null != rootFragment && !(rootFragment.getLocalName().equals(XMLConstants.EMPTY_STRING)) && isIncludeRoot()) {\n marshalRecord.endElement(rootFragment, nr);\n marshalRecord.endPrefixMappings(nr);\n }\n if (!isFragment()) {\n marshalRecord.endDocument();\n }\n marshalRecord.afterContainmentMarshal(null, object);\n}\n"
"public void cleanup() throws Exception {\n executorService.shutdown();\n stopwatch.reset();\n}\n"
"public void copyResults(Map<InstructionHandle, InstructionHandle> newHandles) {\n for (Map.Entry<InstructionHandle, InstructionHandle> entry : newHandles.entrySet()) {\n InstructionHandle oldHandle = entry.getKey();\n InstructionHandle newHandle = entry.getValue();\n if (newHandle == null)\n continue;\n ContextMap<CallString, Pair<ValueMapping, ValueMapping>> value = bounds.get(oldHandle);\n if (value != null)\n bounds.put(newHandle, value.copy(newContainer));\n ContextMap<CallString, Interval> value1 = arrayIndices.get(oldHandle);\n if (value1 != null)\n arrayIndices.put(newHandle, value1);\n ContextMap<CallString, Integer> value2 = scopes.get(oldHandle);\n if (value2 != null)\n scopes.put(newHandle, value2);\n ContextMap<CallString, Interval[]> value3 = sizes.get(oldHandle);\n if (value3 != null)\n sizes.put(newHandle, value3);\n ContextMap<CallString, Set<FlowEdge>> old = infeasibles.get(oldHandle);\n if (old != null) {\n Map<CallString, Set<FlowEdge>> map = new HashMap<CallString, Set<FlowEdge>>(old.size());\n for (CallString cs : old.keySet()) {\n Set<FlowEdge> newSet = new HashSet<FlowEdge>();\n for (FlowEdge edge : old.get(cs)) {\n InstructionHandle newHead = newHandles.get(edge.getHead());\n InstructionHandle newTail = newHandles.get(edge.getTail());\n if (newHead != null && newTail != null) {\n newSet.add(new FlowEdge(newTail, newHead, edge.getType()));\n }\n }\n map.put(cs, newSet);\n }\n ContextMap<CallString, Set<FlowEdge>> edges = new ContextMap<CallString, Set<FlowEdge>>(old.getContext(), map);\n infeasibles.put(newHandle, edges);\n }\n }\n}\n"