content
stringlengths
40
137k
"public UmaProviderSettings get(HttpServletRequest request, String realm) throws NotFoundException {\n synchronized (providerSettingsMap) {\n UmaProviderSettingsImpl providerSettings = providerSettingsMap.get(realm);\n if (providerSettings == null) {\n OAuth2ProviderSettings oAuth2ProviderSettings = oAuth2ProviderSettingsFactory.get(realm, context);\n String baseUrlPattern = baseURLProviderFactory.get(realm).getURL(context.asContext(HttpContext.class));\n providerSettings = getUmaProviderSettings(realm, oAuth2ProviderSettings, baseUrlPattern);\n }\n return providerSettings;\n }\n}\n"
"public boolean remove(Data key, Object value, String source, int completionId, String origin) {\n final long now = Clock.currentTimeMillis();\n final long start = System.nanoTime();\n R record = records.get(key);\n int hitCount = 0;\n boolean removed = false;\n try {\n if (recordNotExistOrExpired(record, now)) {\n if (isStatisticsEnabled()) {\n statistics.increaseCacheMisses(1);\n }\n } else {\n hitCount++;\n if (compare(toStorageValue(record), toStorageValue(value))) {\n deleteCacheEntry(key);\n removed = deleteRecord(key, completionId, source, origin);\n } else {\n long expiryTime = onRecordAccess(key, record, defaultExpiryPolicy, now);\n processExpiredEntry(key, record, expiryTime, now, source, origin);\n }\n }\n if (!removed) {\n if (isEventsEnabled()) {\n publishEvent(createCacheCompleteEvent(toEventData(key), CacheRecord.TIME_NOT_AVAILABLE, origin, completionId));\n }\n }\n onRemove(key, value, source, false, record, removed);\n updateRemoveStatistics(removed, hitCount, start);\n return removed;\n } catch (Throwable error) {\n onRemoveError(key, null, source, false, record, removed, error);\n throw ExceptionUtil.rethrow(error);\n }\n}\n"
"public int insert(String table, String key, HashMap<String, ByteIterator> values) {\n try {\n getHTable(_table);\n } catch (IOException e) {\n System.err.println(\"String_Node_Str\" + e);\n return ServerError;\n }\n if (_debug) {\n System.out.println(\"String_Node_Str\" + key);\n }\n Put p = new Put(Bytes.toBytes(key));\n for (Map.Entry<String, ByteIterator> entry : values.entrySet()) {\n if (_debug) {\n System.out.println(\"String_Node_Str\" + entry.getKey() + \"String_Node_Str\" + entry.getValue() + \"String_Node_Str\");\n }\n p.add(_columnFamilyBytes, Bytes.toBytes(entry.getKey()), entry.getValue().toArray());\n }\n try {\n _hTable.put(p);\n } catch (IOException e) {\n if (_debug) {\n System.err.println(\"String_Node_Str\" + e);\n }\n return ServerError;\n } catch (ConcurrentModificationException e) {\n return ServerError;\n }\n return Ok;\n}\n"
"public static int getDataType(Class objClass) {\n for (int i = 0; i < classes.length; i++) {\n if (classes[i].equals(objClass)) {\n return typeCodes[i];\n }\n }\n return UNKNOWN_TYPE;\n}\n"
"public boolean tryInvPush(Block invBlock, Block startBlock, BlockFace forward, Material[] materials, int amount) {\n Inventory inventory;\n BlockState state = invBlock.getState();\n if (state instanceof ContainerBlock)\n inventory = ((ContainerBlock) state).getInventory();\n else\n return debugFail(\"String_Node_Str\" + invBlock.getType().toString());\n Material putMaterial = null;\n ItemStack[] items = inventory.getContents();\n for (Material material : materials) {\n int count = 0;\n for (ItemStack itemStack : items) {\n if (itemStack == null || !itemStack.getType().equals(material))\n continue;\n count += itemStack.getAmount();\n }\n if (count >= amount) {\n putMaterial = material;\n break;\n }\n }\n if (putMaterial == null)\n return debugFail(\"String_Node_Str\");\n BlockLineIterator line = blocksInLine(startBlock, forward);\n for (int x = amount; x > 0; x--) {\n if (isEmpty(line.next()))\n continue;\n if (!tryPushBlocks(line.currentBlock, forward, materials, x))\n return debugFail(\"String_Node_Str\");\n break;\n }\n line = blocksInLine(startBlock, forward);\n for (int i = 0; i < items.length; i++) {\n ItemStack itemStack = items[i];\n if (!itemStack.getType().equals(putMaterial))\n continue;\n int iAmount = itemStack.getAmount();\n int howMany;\n if (amount <= iAmount)\n howMany = amount;\n else\n howMany = iAmount;\n amount -= howMany;\n if (iAmount == howMany) {\n inventory.setItem(i, null);\n } else {\n itemStack.setAmount(iAmount - howMany);\n inventory.setItem(i, itemStack);\n }\n for (int j = 0; j < howMany; j++) line.next().setTypeIdAndData(itemStack.getTypeId(), (byte) itemStack.getDurability(), true);\n }\n return true;\n}\n"
"public boolean isStandard() {\n return ordinal < MAX_ORDINAL;\n}\n"
"private void testNestAggregation(IDocumentManager documentManager) throws IOException, BirtException, DataException {\n Dimension[] dimensions = new Dimension[3];\n String[] levelNames = new String[3];\n levelNames[0] = \"String_Node_Str\";\n levelNames[1] = \"String_Node_Str\";\n levelNames[2] = \"String_Node_Str\";\n DimensionForTest iterator = new DimensionForTest(levelNames);\n iterator.setLevelMember(0, FactTable2.L1Col);\n iterator.setLevelMember(1, FactTable2.L2Col);\n iterator.setLevelMember(2, FactTable2.L3Col);\n ILevelDefn[] levelDefs = new ILevelDefn[3];\n levelDefs[0] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n levelDefs[1] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n levelDefs[2] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n dimensions[0] = (Dimension) DimensionFactory.createDimension(\"String_Node_Str\", documentManager, iterator, levelDefs, false, new StopSign());\n IHierarchy hierarchy = dimensions[0].getHierarchy();\n assertEquals(hierarchy.getName(), \"String_Node_Str\");\n assertEquals(dimensions[0].length(), FactTable2.L3Col.length);\n levelNames = new String[1];\n levelNames[0] = \"String_Node_Str\";\n iterator = new DimensionForTest(levelNames);\n iterator.setLevelMember(0, distinct(FactTable2.L1Col));\n levelDefs = new ILevelDefn[1];\n levelDefs[0] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n dimensions[1] = (Dimension) DimensionFactory.createDimension(\"String_Node_Str\", documentManager, iterator, levelDefs, false, new StopSign());\n hierarchy = dimensions[1].getHierarchy();\n assertEquals(hierarchy.getName(), \"String_Node_Str\");\n assertEquals(dimensions[1].length(), 3);\n levelNames = new String[1];\n levelNames[0] = \"String_Node_Str\";\n iterator = new DimensionForTest(levelNames);\n iterator.setLevelMember(0, FactTable2.L3Col);\n levelDefs = new ILevelDefn[1];\n levelDefs[0] = new LevelDefinition(\"String_Node_Str\", new String[] { \"String_Node_Str\" }, null);\n dimensions[2] = (Dimension) DimensionFactory.createDimension(\"String_Node_Str\", documentManager, iterator, levelDefs, false, new StopSign());\n hierarchy = dimensions[2].getHierarchy();\n assertEquals(hierarchy.getName(), \"String_Node_Str\");\n assertEquals(dimensions[2].length(), 12);\n FactTable2 factTable2 = new FactTable2();\n String[] measureColumnName = new String[2];\n measureColumnName[0] = \"String_Node_Str\";\n measureColumnName[1] = \"String_Node_Str\";\n FactTableAccessor factTableConstructor = new FactTableAccessor(documentManager);\n FactTable factTable = factTableConstructor.saveFactTable(NamingUtil.getFactTableName(\"String_Node_Str\"), CubeUtility.getKeyColNames(dimensions), CubeUtility.getKeyColNames(dimensions), factTable2, dimensions, measureColumnName, new StopSign(), false);\n factTable = factTableConstructor.load(NamingUtil.getFactTableName(\"String_Node_Str\"), new StopSign());\n String[] dimensionNames = new String[3];\n dimensionNames[0] = \"String_Node_Str\";\n dimensionNames[1] = \"String_Node_Str\";\n dimensionNames[2] = \"String_Node_Str\";\n DimensionResultIterator[] dimesionResultSets = new DimensionResultIterator[1];\n IDiskArray positionArray = dimensions[0].findAll();\n dimesionResultSets[0] = new DimensionResultIterator(dimensions[0], positionArray, new StopSign());\n String[] dimensionNamesForFilter = new String[1];\n dimensionNamesForFilter[0] = \"String_Node_Str\";\n IDiskArray[] positionsForFilter = new IDiskArray[1];\n positionsForFilter[0] = positionArray;\n FactTableRowIterator facttableRowIterator = new FactTableRowIterator(factTable, dimensionNamesForFilter, positionsForFilter, new StopSign());\n assertTrue(facttableRowIterator != null);\n AggregationDefinition[] aggregations = new AggregationDefinition[1];\n int[] sortType = new int[2];\n sortType[0] = IDimensionSortDefn.SORT_ASC;\n sortType[1] = IDimensionSortDefn.SORT_ASC;\n DimLevel[] levelsForFilter = new DimLevel[] { dimLevel11, dimLevel12 };\n AggregationFunctionDefinition[] funcitons = new AggregationFunctionDefinition[1];\n funcitons[0] = new AggregationFunctionDefinition(\"String_Node_Str\", \"String_Node_Str\", IBuildInAggregation.TOTAL_SUM_FUNC);\n aggregations[0] = new AggregationDefinition(levelsForFilter, sortType, funcitons);\n IDataSet4Aggregation dataSet4Aggregation = new DataSetFromOriginalCube(facttableRowIterator, dimesionResultSets, null);\n AggregationExecutor aggregationCalculatorExecutor = new AggregationExecutor(null, dataSet4Aggregation, aggregations);\n IAggregationResultSet[] resultSet = aggregationCalculatorExecutor.execute(new StopSign());\n assertEquals(resultSet[0].length(), 6);\n assertEquals(resultSet[0].getAggregationDataType(0), DataType.DOUBLE_TYPE);\n assertEquals(resultSet[0].getLevelIndex(dimLevel11), 0);\n assertEquals(resultSet[0].getLevelIndex(dimLevel12), 1);\n resultSet[0].seek(0);\n assertEquals(resultSet[0].getLevelKeyValue(0)[0], new Integer(1));\n assertEquals(resultSet[0].getAggregationValue(0), new Double(1));\n resultSet[0].seek(1);\n assertEquals(resultSet[0].getLevelKeyValue(0)[0], new Integer(1));\n assertEquals(resultSet[0].getAggregationValue(0), new Double(5));\n resultSet[0].seek(2);\n assertEquals(resultSet[0].getLevelKeyValue(0)[0], new Integer(2));\n assertEquals(resultSet[0].getAggregationValue(0), new Double(9));\n resultSet[0].seek(3);\n assertEquals(resultSet[0].getLevelKeyValue(0)[0], new Integer(2));\n assertEquals(resultSet[0].getAggregationValue(0), new Double(13));\n resultSet[0].seek(4);\n assertEquals(resultSet[0].getLevelKeyValue(0)[0], new Integer(3));\n assertEquals(resultSet[0].getAggregationValue(0), new Double(17));\n resultSet[0].seek(5);\n assertEquals(resultSet[0].getLevelKeyValue(0)[0], new Integer(3));\n assertEquals(resultSet[0].getAggregationValue(0), new Double(21));\n IAggregationResultSet sourceAggrResultSet = resultSet[0];\n aggregations = new AggregationDefinition[1];\n funcitons = new AggregationFunctionDefinition[1];\n funcitons[0] = new AggregationFunctionDefinition(\"String_Node_Str\", \"String_Node_Str\", IBuildInAggregation.TOTAL_MAX_FUNC);\n aggregations[0] = new AggregationDefinition(null, null, funcitons);\n Context context = Context.enter();\n ScriptableObject scope = context.initStandardObjects();\n ScriptContext cx = new ScriptContext();\n IAggregationResultSet ars = new AggregationResultSetWithOneMoreDummyAggr(sourceAggrResultSet, \"String_Node_Str\", new ScriptExpression(\"String_Node_Str\"), scope, cx);\n resultSet = AggregationHelper.execute(ars, aggregations, new StopSign());\n assertEquals(resultSet[0].length(), 1);\n resultSet[0].seek(0);\n assertEquals(resultSet[0].getAggregationValue(0), new Double(21));\n aggregations = new AggregationDefinition[1];\n sortType = new int[1];\n sortType[0] = IDimensionSortDefn.SORT_ASC;\n levelsForFilter = new DimLevel[] { dimLevel11 };\n funcitons = new AggregationFunctionDefinition[1];\n funcitons[0] = new AggregationFunctionDefinition(\"String_Node_Str\", \"String_Node_Str\", IBuildInAggregation.TOTAL_SUM_FUNC);\n aggregations[0] = new AggregationDefinition(levelsForFilter, sortType, funcitons);\n ars = new AggregationResultSetWithOneMoreDummyAggr(sourceAggrResultSet, \"String_Node_Str\", new ScriptExpression(\"String_Node_Str\"), scope, cx);\n resultSet = AggregationHelper.execute(ars, aggregations, new StopSign());\n assertEquals(resultSet[0].length(), 3);\n assertEquals(resultSet[0].getAggregationDataType(0), DataType.DOUBLE_TYPE);\n assertEquals(resultSet[0].getLevelIndex(dimLevel11), 0);\n resultSet[0].seek(0);\n assertEquals(resultSet[0].getLevelKeyValue(0)[0], new Integer(1));\n assertEquals(resultSet[0].getAggregationValue(0), new Double(6));\n resultSet[0].seek(1);\n assertEquals(resultSet[0].getLevelKeyValue(0)[0], new Integer(2));\n assertEquals(resultSet[0].getAggregationValue(0), new Double(22));\n resultSet[0].seek(2);\n assertEquals(resultSet[0].getLevelKeyValue(0)[0], new Integer(3));\n assertEquals(resultSet[0].getAggregationValue(0), new Double(38));\n closeResultSets(resultSet);\n Context.exit();\n cx.close();\n}\n"
"private void removeUnusedSymbols(Collection<NameInfo> allNameInfo) {\n boolean changed = false;\n for (NameInfo nameInfo : allNameInfo) {\n if (!nameInfo.isReferenced()) {\n for (Symbol declaration : nameInfo.getDeclarations()) {\n boolean canRemove = false;\n if (specializationState == null) {\n canRemove = true;\n } else {\n Node specializableFunction = getSpecializableFunctionFromSymbol(declaration);\n if (specializableFunction != null) {\n specializationState.reportRemovedFunction(specializableFunction, null);\n canRemove = true;\n }\n }\n if (canRemove) {\n declaration.remove(compiler);\n }\n }\n logger.fine(\"String_Node_Str\" + nameInfo.name);\n }\n }\n if (changed) {\n compiler.reportCodeChange();\n }\n}\n"
"public BigDecimal getSplitFactor() {\n return numerator.divide(denominator, 10, RoundingMode.HALF_UP);\n}\n"
"public static String EREPLACE(String oldStr, String newStr, String replacement) {\n return CHANGE(oldStr, newStr, replacement);\n}\n"
"private int findBranchIndex(Label jumpSource, Label jumpTarget) {\n for (int i = branches.size() - 2; i >= 0; i -= 2) {\n if (jumpSource == branches.get(i).label && jumpTarget == branches.get(i + 1).label) {\n return i;\n }\n }\n return -1;\n}\n"
"public static void beforeClass() throws IOException {\n zkServer = InMemoryZKServer.builder().setDataDir(TEMP_FOLDER.newFolder()).build();\n zkServer.startAndWait();\n CConfiguration conf = CConfiguration.create();\n conf.set(Constants.Zookeeper.QUORUM, zkServer.getConnectionStr());\n conf.setInt(Constants.Stream.CONTAINER_INSTANCE_ID, 0);\n conf.set(Constants.CFG_LOCAL_DATA_DIR, TEMP_FOLDER.newFolder().getAbsolutePath());\n injector = Guice.createInjector(Modules.override(new ZKClientModule(), new DataFabricModules().getInMemoryModules(), new ConfigModule(conf, new Configuration()), new AuthModule(), new DiscoveryRuntimeModule().getInMemoryModules(), new LocationRuntimeModule().getInMemoryModules(), new ExploreClientModule(), new DataSetServiceModules().getInMemoryModules(), new DataSetsModules().getStandaloneModules(), new NotificationFeedServiceRuntimeModule().getInMemoryModules(), new NotificationServiceRuntimeModule().getInMemoryModules(), new MetricsClientRuntimeModule().getInMemoryModules(), new StreamServiceRuntimeModule().getDistributedModules(), new StreamAdminModules().getInMemoryModules()).with(new AbstractModule() {\n protected void configure() {\n bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class);\n bind(StreamConsumerStateStoreFactory.class).to(LevelDBStreamConsumerStateStoreFactory.class).in(Singleton.class);\n bind(StreamAdmin.class).to(FileStreamAdmin.class).in(Singleton.class);\n bind(StreamConsumerFactory.class).to(LevelDBStreamFileConsumerFactory.class).in(Singleton.class);\n bind(StreamFileWriterFactory.class).to(LocationStreamFileWriterFactory.class).in(Singleton.class);\n bind(StreamFileJanitorService.class).to(LocalStreamFileJanitorService.class).in(Scopes.SINGLETON);\n bind(StreamMetaStore.class).to(InMemoryStreamMetaStore.class).in(Scopes.SINGLETON);\n bind(HeartbeatPublisher.class).to(MockHeartbeatPublisher.class).in(Scopes.SINGLETON);\n }\n }));\n zkClient = injector.getInstance(ZKClientService.class);\n zkClient.startAndWait();\n streamHttpService = injector.getInstance(StreamHttpService.class);\n streamHttpService.startAndWait();\n streamService = injector.getInstance(StreamService.class);\n streamService.startAndWait();\n heartbeatPublisher = (MockHeartbeatPublisher) injector.getInstance(HeartbeatPublisher.class);\n hostname = streamHttpService.getBindAddress().getHostName();\n port = streamHttpService.getBindAddress().getPort();\n}\n"
"static private String parsePoints(String geometryStr, String geometryType) {\n StringBuilder geometry = new StringBuilder();\n String regex = \"String_Node_Str\";\n String[] pointsArray = geometryStr.split(regex);\n if (geometryStr.contains(\"String_Node_Str\") || geometryStr.contains(\"String_Node_Str\")) {\n geometry = new StringBuilder();\n for (String pa : pointsArray) {\n if (geometry.length() > 0) {\n geometry.append(\"String_Node_Str\");\n }\n geometry.append(pa);\n }\n }\n if (geometryType.toLowerCase().contains(\"String_Node_Str\")) {\n if (!pointsArray[0].trim().equalsIgnoreCase(pointsArray[pointsArray.length - 1].trim())) {\n geometry.append(\"String_Node_Str\").append(pointsArray[0]);\n }\n }\n return geometry.toString();\n}\n"
"public Pair<Integer, String> execute(String command) throws IOException {\n Pair<Integer, String> r;\n if (remoteHost == null) {\n r = runNativeCommand(command, logAppender);\n } else {\n r = runRemoteCommand(command);\n }\n if (r.getFirst() != 0) {\n throw new IOException(\"String_Node_Str\" + r.getFirst() + \"String_Node_Str\" + command + \"String_Node_Str\" + r.getSecond());\n }\n return r;\n}\n"
"public boolean equals(Object compared) {\n if (compared instanceof CallForwardingRule) {\n return toString().equals(((CallForwardingRule) compared).toString());\n }\n return false;\n}\n"
"public static String ECGeneralMsg(String cause, Throwable throwable) {\n String msg = \"String_Node_Str\";\n msg = msg + \"String_Node_Str\";\n if (cause.equals(\"String_Node_Str\")) {\n msg = msg + \"String_Node_Str\";\n } else {\n msg = msg + \"String_Node_Str\" + cause + \"String_Node_Str\";\n }\n return msg;\n}\n"
"public static void main(String[] args) {\n PistachiosClient client;\n try {\n client = new PistachiosClient();\n } catch (Exception e) {\n logger.info(\"String_Node_Str\", e);\n return;\n }\n Random rand = new Random();\n while (true) {\n try {\n long id = rand.nextLong();\n String value = NativeUtils.getHostname() + rand.nextInt();\n client.store(com.google.common.primitives.Longs.toByteArray(id), value.getBytes());\n for (int i = 0; i < 30; i++) {\n byte[] clientValue = client.lookup(com.google.common.primitives.Longs.toByteArray(id), true);\n String remoteValue = new String(clientValue);\n if (Arrays.equals(value.getBytes(), clientValue) || !remoteValue.contains(InetAddress.getLocalHost().getHostName())) {\n logger.debug(\"String_Node_Str\", id, value);\n } else {\n logger.error(\"String_Node_Str\", id, value, new String(clientValue));\n System.exit(0);\n }\n Thread.sleep(100);\n }\n } catch (Exception e) {\n System.out.println(\"String_Node_Str\" + e);\n System.exit(0);\n }\n }\n}\n"
"private static void executeSqlScript(JdbcTemplate jdbcTemplate, EncodedResource resource, String databaseName, boolean continueOnError) throws DataAccessException {\n long startTime = System.currentTimeMillis();\n List<String> statements = new LinkedList<String>();\n LineNumberReader reader = null;\n try {\n reader = new LineNumberReader(resource.getReader());\n String script = readScript(reader);\n char delimiter = DEFAULT_STATEMENT_SEPARATOR;\n if (!containsSqlScriptDelimiters(script, delimiter)) {\n delimiter = '\\n';\n }\n splitSqlScript(script, delimiter, statements);\n int lineNumber = 0;\n for (String statement : statements) {\n lineNumber++;\n try {\n jdbcTemplate.update(\"String_Node_Str\" + databaseName + \"String_Node_Str\");\n } catch (DataAccessException ex) {\n LOGGER.error(\"String_Node_Str\", databaseName, ex.getMessage());\n }\n try {\n int rowsAffected = jdbcTemplate.update(statement);\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(rowsAffected + \"String_Node_Str\" + statement);\n }\n } catch (DataAccessException ex) {\n if (continueOnError) {\n if (LOGGER.isWarnEnabled()) {\n LOGGER.warn(\"String_Node_Str\" + lineNumber + \"String_Node_Str\" + resource + \"String_Node_Str\" + statement, ex);\n }\n } else {\n throw ex;\n }\n }\n }\n long elapsedTime = System.currentTimeMillis() - startTime;\n if (LOGGER.isInfoEnabled()) {\n LOGGER.info(String.format(\"String_Node_Str\", resource, elapsedTime));\n }\n } catch (IOException ex) {\n throw new DataAccessResourceFailureException(\"String_Node_Str\" + resource, ex);\n } finally {\n try {\n if (reader != null) {\n reader.close();\n }\n } catch (IOException ex) {\n }\n }\n}\n"
"private String extractDirectColumn(IBaseExpression dataExpr, ScriptContext cx, boolean isRow) throws BirtException {\n if (dataExpr instanceof IScriptExpression && !BaseExpression.constantId.equals(dataExpr.getScriptId())) {\n String exprText = ((IScriptExpression) dataExpr).getText();\n if (isRow) {\n return exprHelper.getColumnBindingName(exprText);\n } else {\n return exprHelper.getColumnName(exprText);\n }\n }\n return null;\n}\n"
"public void printContent() {\n StringBuilder row;\n boolean isFirstCol = true;\n row = new StringBuilder();\n for (String col : columnNames) {\n if (isFirstCol) {\n row.append(col);\n isFirstCol = false;\n } else {\n row.append(\"String_Node_Str\" + col);\n }\n }\n System.out.println(row.toString());\n int colCount = getColumnCount();\n while (next()) {\n row = new StringBuilder();\n for (int i = 0; i < colCount; i++) {\n if (i == 0) {\n row.append(getValue(i).toString());\n } else {\n row.append(\"String_Node_Str\");\n row.append(getValue(i).toString());\n }\n }\n System.out.println(row.toString());\n }\n}\n"
"public boolean next() throws IOException {\n while (true) {\n if (first)\n first = false;\n else {\n if (!super.next()) {\n curTerm = null;\n return false;\n }\n }\n curTerm = super.term();\n if (stopWords == null)\n break;\n if (stopWords.contains(curTerm.text()))\n continue;\n if (NgramQueryRewriter.isNgram(stopWords, curTerm.text()))\n continue;\n }\n nTerms++;\n if (nTerms > termLimit) {\n throw new TermLimitException(\"String_Node_Str\" + getTerm().field() + \"String_Node_Str\" + termLimit + \"String_Node_Str\");\n }\n termMap.put(curTerm);\n return true;\n}\n"
"public String canCraft(IFusionCraftingInventory inventory, World world, BlockPos pos) {\n if (!isRecipeCatalyst(inventory.getStackInCore(0))) {\n return \"String_Node_Str\";\n }\n if (!inventory.getStackInCore(1).isEmpty()) {\n return \"String_Node_Str\";\n }\n IUpgradableItem item = (IUpgradableItem) inventory.getStackInCore(0).getItem();\n if (item.getMaxUpgradeLevel(inventory.getStackInCore(0), upgrade) < upgradeLevel) {\n return \"String_Node_Str\";\n }\n if (UpgradeHelper.getUpgradeLevel(inventory.getStackInCore(0), upgrade) >= upgradeLevel) {\n return \"String_Node_Str\";\n }\n if (UpgradeHelper.getUpgradeLevel(inventory.getStackInCore(0), upgrade) < upgradeLevel - 1) {\n return \"String_Node_Str\";\n }\n List<ICraftingInjector> pedestals = new ArrayList<ICraftingInjector>();\n pedestals.addAll(inventory.getInjectors());\n for (ICraftingInjector pedestal : pedestals) {\n if (!pedestal.getStackInPedestal().isEmpty() && pedestal.getPedestalTier() < craftingTier) {\n return \"String_Node_Str\";\n }\n }\n return \"String_Node_Str\";\n}\n"
"public void run() throws IOException {\n if (s_logger.isLoggable(Level.FINE))\n s_logger.fine(\"String_Node_Str\");\n for (; ; ) {\n m_selector.select();\n Set<SelectionKey> selectedKeys = m_selector.selectedKeys();\n for (SelectionKey key : selectedKeys) {\n ChannelHandler channelHandler = (ChannelHandler) key.attachment();\n channelHandler.handleReadyOps(m_executor);\n }\n selectedKeys.clear();\n while (m_strHead != null) {\n m_strHead.runInSelectorThread();\n SelectorThreadRunnable head = m_strHead;\n SelectorThreadRunnable next = m_strHead.nextSelectorThreadRunnable;\n if (next == null) {\n m_strHead = null;\n if (m_strTail.compareAndSet(head, null))\n break;\n while (head.nextSelectorThreadRunnable == null) ;\n next = head.nextSelectorThreadRunnable;\n }\n m_strHead = next;\n head.nextSelectorThreadRunnable = null;\n }\n if (m_state == ST_STOPPING) {\n if (m_selector.keys().size() == 0)\n break;\n m_selector.wakeup();\n }\n }\n m_executor.shutdown();\n try {\n if (!m_executor.awaitTermination(m_config.shutdownTimeout, TimeUnit.SECONDS))\n m_executor.shutdownNow();\n m_executor.awaitTermination(m_config.shutdownTimeout, TimeUnit.SECONDS);\n } catch (InterruptedException ex) {\n if (s_logger.isLoggable(Level.WARNING))\n s_logger.warning(ex.toString());\n }\n if (s_logger.isLoggable(Level.FINE))\n s_logger.fine(\"String_Node_Str\");\n}\n"
"public void updatePoolSubProvidedProductsChanged() {\n Pool p = TestUtil.createPool(owner, TestUtil.createProduct(owner));\n Product subProd = TestUtil.createProduct(owner);\n p.setDerivedProduct(subProd);\n Product product1 = TestUtil.createProduct(owner);\n Product product2 = TestUtil.createProduct(owner);\n Product product3 = TestUtil.createProduct(owner);\n p.getDerivedProvidedProducts().add(product1);\n p.getDerivedProvidedProducts().add(product2);\n Pool p1 = TestUtil.clone(p);\n p1.getProvidedProducts().clear();\n p1.getProvidedProducts().add(product3);\n List<Pool> existingPools = Arrays.asList(p1);\n List<PoolUpdate> updates = this.poolRules.updatePools(p, existingPools, p.getQuantity(), new HashSet<Product>());\n assertEquals(1, updates.size());\n assertEquals(2, updates.get(0).getPool().getDerivedProvidedProducts().size());\n}\n"
"private ResponseData readRequest() throws IOException {\n int lastSearchPos = inputBufferPosition;\n String headers = null;\n while (true) {\n for (int i = lastSearchPos; i < inputBufferAvail - 3; ++i) {\n if (inputBuffer[i + 0] == '\\r' && inputBuffer[i + 1] == '\\n' && inputBuffer[i + 2] == '\\r' && inputBuffer[i + 3] == '\\n') {\n headers = makeString(inputBuffer, 0, i);\n inputBufferPosition = i + 4;\n break;\n }\n if (inputBuffer[i + 0] == '\\n' && inputBuffer[i + 1] == '\\n') {\n headers = makeString(inputBuffer, 0, i);\n inputBufferPosition = i + 2;\n break;\n }\n }\n if (inputBufferPosition != 0)\n break;\n lastSearchPos = inputBufferAvail > 3 ? inputBufferAvail - 3 : 0;\n if (!readDataIntoBuffer())\n throw new IOException(\"String_Node_Str\" + inputBuffer.length + \"String_Node_Str\");\n }\n ResponseData response = new ResponseData();\n parseResponseHeaders(headers, response);\n int contentLength = -1;\n try {\n String value = response.getResponseHeader(\"String_Node_Str\");\n if (value.length() > 0)\n contentLength = Integer.parseInt(value);\n } catch (NumberFormatException e) {\n throw new IOException(\"String_Node_Str\");\n }\n if (contentLength != -1) {\n response.data = new byte[contentLength];\n readDataBlocking(response.data, contentLength, false);\n } else if (response.getResponseHeader(\"String_Node_Str\").equals(\"String_Node_Str\")) {\n response.data = readChunkedBlocking();\n } else {\n response.majorVersion = 1;\n response.minorVersion = 0;\n response.data = readUntilEOF();\n }\n return response;\n}\n"
"protected void createQueryForShowIfBlank() {\n IBaseResultSet[] blankRsets = new IBaseResultSet[1];\n blankRsets[0] = new BlankResultSet();\n rsets = blankRsets;\n context.setResultSets(rsets);\n rsetEmpty = false;\n}\n"
"public QueueDto get(RouterObject routerObject) throws NotFoundException {\n return getItem(new RouterObjectId(routerObject.getId(), routerObject.getRouterId()));\n}\n"
"public void onError(final int error) {\n if (error == SpeechRecognizer.ERROR_NO_MATCH && affectedWithGoogleSearchProblem() && !wasReadyForSpeech) {\n return;\n }\n if (recognitionActive) {\n recognitionActive = false;\n final AIError aiError;\n if (errorMessages.containsKey(error)) {\n final String description = errorMessages.get(error);\n aiError = new AIError(\"String_Node_Str\" + description);\n } else {\n aiError = new AIError(\"String_Node_Str\" + error);\n }\n GoogleRecognitionServiceImpl.this.onError(aiError);\n }\n}\n"
"protected void createRoot() {\n if (!isFirst) {\n int startColumn = cellContent.getColumn();\n int endColumn = startColumn + cellContent.getColSpan();\n columnWidth = tableLM.getCellWidth(startColumn, endColumn);\n }\n if (root == null) {\n CellArea cell = AreaFactory.createCellArea(cellContent);\n cell.setRowSpan(tableLM.getRowSpan(cellContent));\n root = cell;\n if (!isFirst) {\n IStyle areaStyle = root.getStyle();\n areaStyle.setProperty(IStyle.STYLE_PADDING_TOP, IStyle.NUMBER_0);\n areaStyle.setProperty(IStyle.STYLE_MARGIN_TOP, IStyle.NUMBER_0);\n }\n }\n tableLM.resolveBorderConflict((CellArea) root, isFirst);\n root.setWidth(columnWidth);\n}\n"
"public void endContainer(IContent content, boolean finished, IContentEmitter emitter, boolean visible) {\n switch(content.getContentType()) {\n case IContent.TABLE_CONTENT:\n INode[] nodeList = currentBuffer.getNodeStack();\n nestCount--;\n if (currentTableIndex == nestCount + 1 && currentTableIndex > 0) {\n assert (buffers != null);\n for (int i = 0; i < buffers.length - 1; i++) {\n buffers[i].closePage(nodeList);\n }\n buffers[buffers.length - 1].endContainer(content, finished, emitter, visible);\n context.getBufferFactory().refresh();\n currentBuffer = buffers[buffers.length - 1];\n buffers = null;\n currentTableIndex = -1;\n } else {\n currentBuffer.endContainer(content, finished, emitter, visible);\n }\n break;\n case IContent.TABLE_GROUP_CONTENT:\n case IContent.TABLE_BAND_CONTENT:\n case IContent.ROW_CONTENT:\n if (currentTableIndex == nestCount && currentTableIndex > 0) {\n if (pageBreakIndexs.length - 1 != currentIndex) {\n for (int i = currentIndex; i < pageBreakIndexs.length; i++) {\n currentIndex = i;\n currentBuffer = buffers[currentIndex];\n repeatCells(emitter);\n }\n }\n endContainerInPages(content, finished, emitter, visible);\n } else {\n currentBuffer.endContainer(content, finished, emitter, visible);\n }\n break;\n case IContent.CELL_CONTENT:\n if (currentTableIndex == nestCount && currentTableIndex > 0) {\n int pageIndex = needPageBreak((ICellContent) content);\n if (pageIndex >= 0) {\n currentBuffer.endContainer(content, false, emitter, visible);\n for (int i = currentIndex + 1; i < pageIndex; i++) {\n currentBuffer = buffers[i];\n repeatCells(emitter);\n currentBuffer.startContainer(content, false, emitter, visible);\n currentBuffer.endContainer(content, finished, emitter, visible);\n }\n pageIndex = (pageIndex == pageBreakIndexs.length ? pageIndex - 1 : pageIndex);\n currentBuffer = buffers[pageIndex];\n } else {\n currentBuffer.endContainer(content, finished, emitter, visible);\n }\n if (isRepeatStatus) {\n repeatEvent.add(new ContentEvent(content, visible, ContentEvent.END_CONTAINER_EVENT));\n isRepeatStatus = false;\n }\n } else {\n currentBuffer.endContainer(content, finished, emitter, visible);\n }\n break;\n case IContent.PAGE_CONTENT:\n currentBuffer.endContainer(content, finished, emitter, visible);\n context.getBufferFactory().refresh();\n break;\n default:\n currentBuffer.endContainer(content, finished, emitter, visible);\n break;\n }\n if (isRepeatStatus) {\n repeatEvent.add(new ContentEvent(content, visible, ContentEvent.END_CONTAINER_EVENT));\n }\n}\n"
"public void show() {\n frame = new JFrame(\"String_Node_Str\" + version);\n frame.setResizable(true);\n frame.setLocation(300, 300);\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n JPanel pane = (JPanel) frame.getContentPane();\n pane.setBackground(BG_COLOR);\n GridLayout layout = new GridLayout(9, 0);\n pane.setLayout(layout);\n pane.add(getInfoPanel());\n JLabel dirLabel = new JLabel(\"String_Node_Str\");\n pane.add(dirLabel);\n pane.setBorder(new EmptyBorder(10, 10, 10, 10));\n JPanel dirPanel = getDirectoryPanel();\n pane.add(dirPanel);\n JLabel fileLabel = new JLabel(\"String_Node_Str\");\n pane.add(fileLabel);\n JPanel filePanel = getFilePanel();\n pane.add(filePanel);\n JPanel originalsPanel = getUnknownsPanel();\n pane.add(originalsPanel);\n pane.add(getRunPanel());\n pane.add(getLinkButton(\"String_Node_Str\", \"String_Node_Str\"));\n pane.add(getCreditPanel());\n directoryDialog = getDirectoryChooser();\n fileDialog = getFileChooser();\n frame.pack();\n frame.setVisible(true);\n scanFrame = getScanningFrame();\n}\n"
"public void untoggle(boolean toggle) {\n this.ignoreInput = toggle;\n}\n"
"void maybeFinishPendingAttribute(SourceLocation.Point currentPoint) {\n if (hasUnquotedAttributeValueParts()) {\n createUnquotedAttributeValue(currentPoint);\n } else if (hasQuotedAttributeValueParts()) {\n errorReporter.report(currentPoint.asLocation(filePath), FOUND_END_OF_ATTRIBUTE_STARTED_IN_ANOTHER_BLOCK);\n throw new AbortParsingBlockError();\n }\n if (attributeName != null) {\n SourceLocation location = attributeName.getSourceLocation();\n HtmlAttributeNode attribute;\n if (attributeValue != null) {\n attribute = new HtmlAttributeNode(nodeIdGen.genId(), location, checkNotNull(equalsSignLocation));\n location = location.extend(attributeValue.getSourceLocation());\n edits.addChild(attribute, attributeName);\n edits.addChild(attribute, attributeValue);\n } else {\n attribute = new HtmlAttributeNode(nodeIdGen.genId(), location, null);\n edits.addChild(attribute, attributeName);\n }\n attributeName = null;\n equalsSignLocation = null;\n attributeValue = null;\n directTagChildren.add(attribute);\n edits.remove(attribute);\n }\n}\n"
"public Object[] getChildren(Object parentElement) {\n if (parentElement instanceof IContainer) {\n IContainer container = (IContainer) parentElement;\n IResource[] members = null;\n try {\n members = container.members();\n } catch (CoreException e) {\n log.error(\"String_Node_Str\" + container.getLocation());\n }\n if (ResourceManager.getConnectionFolder().equals(container)) {\n return ProxyRepositoryViewObject.fetchAllDBRepositoryViewObjects(true).toArray();\n } else if (ResourceManager.getMDMConnectionFolder().equals(container)) {\n return ProxyRepositoryViewObject.fetchAllMDMRepositoryViewObjects(false).toArray();\n }\n return members;\n } else if (parentElement instanceof NamedColumnSet) {\n return null;\n } else if (parentElement instanceof NamedColumnSetFolderNode) {\n NamedColumnSetFolderNode folerNode = (NamedColumnSetFolderNode) parentElement;\n folerNode.loadChildren();\n Object[] children = folerNode.getChildren();\n if (children != null && children.length > 0) {\n if (!(children[0] instanceof ColumnSet)) {\n return children;\n }\n for (int i = 0; i < children.length; i++) {\n ColumnSet columnSet = (ColumnSet) children[i];\n ModelElementKey key = new ModelElementKeyImpl(columnSet);\n if (modelElementCheckedMap.containsKey(key)) {\n currentCheckedModelElement.add(columnSet);\n }\n }\n }\n return ComparatorsFactory.sort(children, ComparatorsFactory.MODELELEMENT_COMPARATOR_ID);\n } else if (parentElement instanceof TdXmlSchema || parentElement instanceof TdXmlElementType) {\n boolean isXmlDocument = parentElement instanceof TdXmlSchema;\n List<? extends ModelElement> modelElements = isXmlDocument ? DqRepositoryViewService.getXMLElements((TdXmlSchema) parentElement) : DqRepositoryViewService.getXMLElements((TdXmlElementType) parentElement);\n Object[] children = XmlElementHelper.clearLeafNode(modelElements).toArray();\n if (children != null && children.length > 0) {\n if (!(children[0] instanceof TdXmlElementType)) {\n return children;\n }\n for (int i = 0; i < children.length; i++) {\n TdXmlElementType xmlElement = (TdXmlElementType) children[i];\n ModelElementKey key = new ModelElementKeyImpl(xmlElement);\n if (modelElementCheckedMap.containsKey(key)) {\n currentCheckedModelElement.add(xmlElement);\n }\n }\n }\n return children.length == 0 ? null : children;\n }\n return super.getChildren(parentElement);\n}\n"
"public void testGetFreeToPlayChampions() throws Exception {\n try {\n Future<List<BasicChampData>> ftpChamps = handler.getFreeToPlayChampions();\n assertNotNull(ftpChamps.get(1, MINUTES));\n assertEquals((ftpChamps.get()).size(), 10);\n } catch (RequestException ex) {\n if (isNotServerside(ex))\n throw ex;\n }\n}\n"
"public void registerEntitys() {\n int id = 0;\n EntityRegistry.registerModEntity(EntityVampireHunter.class, \"String_Node_Str\", id, VampirismMod.instance, 80, 1, true);\n EntityRegistry.addSpawn(EntityVampireHunter.class, 2, 0, 1, EnumCreatureType.monster, allBiomes);\n id++;\n EntityRegistry.registerModEntity(EntityVampire.class, \"String_Node_Str\", id, VampirismMod.instance, 80, 1, true);\n EntityRegistry.addSpawn(EntityVampire.class, 2, 0, 1, EnumCreatureType.monster, BiomeGenBase.stoneBeach, BiomeGenBase.desert);\n id++;\n}\n"
"public void run() {\n List<ServiceConfiguration> checkServicesList = ServiceConfigurations.collect(new Predicate<ServiceConfiguration>() {\n public boolean apply(ServiceConfiguration arg0) {\n if (Bootstrap.isCloudController()) {\n return true;\n } else {\n return arg0.isVmLocal();\n }\n }\n });\n LOG.debug(\"String_Node_Str\" + Joiner.on(\"String_Node_Str\").join(Topology.this.services.keySet()));\n LOG.debug(\"String_Node_Str\" + Joiner.on(\"String_Node_Str\").join(Topology.this.services.values()));\n LOG.debug(\"String_Node_Str\" + Joiner.on(\"String_Node_Str\").join(checkServicesList));\n Predicate<Future<?>> futureIsDone = new Predicate<Future<?>>() {\n public boolean apply(Future<?> arg0) {\n return arg0.isDone();\n }\n };\n Map<ServiceConfiguration, Future<ServiceConfiguration>> futures = Maps.newHashMap();\n for (ServiceConfiguration config : checkServicesList) {\n LOG.debug(\"String_Node_Str\" + config);\n futures.put(config, Topology.getInstance().submitExternal(config, TopologyChanges.checkFunction()));\n }\n for (int i = 0; i < 100 && !Iterables.all(futures.values(), futureIsDone); i++) {\n try {\n TimeUnit.MILLISECONDS.sleep(100);\n } catch (InterruptedException ex) {\n LOG.error(ex, ex);\n Thread.currentThread().interrupt();\n }\n }\n List<ServiceConfiguration> disabledServices = Lists.newArrayList();\n for (Map.Entry<ServiceConfiguration, Future<ServiceConfiguration>> result : futures.entrySet()) {\n try {\n ServiceConfiguration resultConfig = result.getValue().get();\n LOG.debug(\"String_Node_Str\" + result.getKey());\n } catch (InterruptedException ex) {\n LOG.debug(\"String_Node_Str\" + result.getKey());\n LOG.error(ex, ex);\n Thread.currentThread().interrupt();\n } catch (Exception ex) {\n Throwable e = ex;\n if (ex instanceof ExecutionException) {\n LOG.debug(\"String_Node_Str\" + result.getKey() + \"String_Node_Str\" + ex.getCause().getMessage());\n e = ex.getCause();\n } else {\n LOG.debug(\"String_Node_Str\" + result.getKey() + \"String_Node_Str\" + ex.getMessage());\n }\n try {\n disabledServices.add(result.getKey());\n Topology.this.getGuard().tryDisable(ServiceKey.create(result.getKey()), result.getKey());\n } catch (ServiceRegistrationException ex1) {\n LOG.error(ex1, ex1);\n }\n LOG.error(ex, ex);\n }\n }\n if (Bootstrap.isCloudController()) {\n List<ServiceConfiguration> failoverServicesList = ServiceConfigurations.collect(new Predicate<ServiceConfiguration>() {\n public boolean apply(ServiceConfiguration arg0) {\n try {\n ServiceKey key = ServiceKey.create(arg0);\n return Bootstrap.isCloudController() && Component.State.DISABLED.isIn(arg0) && !Topology.this.services.containsKey(key);\n } catch (ServiceRegistrationException ex) {\n LOG.error(ex, ex);\n return false;\n }\n }\n });\n failoverServicesList.removeAll(disabledServices);\n for (ServiceConfiguration config : failoverServicesList) {\n try {\n Topology.getInstance().submitExternal(config, CloudTopologyCallables.ENABLE).get();\n } catch (InterruptedException ex) {\n LOG.error(ex, ex);\n Thread.currentThread().interrupt();\n } catch (ExecutionException ex) {\n LOG.error(ex, ex);\n } catch (Exception ex) {\n LOG.error(ex, ex);\n }\n }\n }\n}\n"
"private void putItemsFromGround(EnumFacing currentSide) {\n int radius = 3;\n BlockPos offset = new BlockPos(currentSide.getDirectionVec());\n offset = new BlockPos(offset.getX() * radius, offset.getY() * radius, offset.getZ() * radius);\n AxisAlignedBB aabb = new AxisAlignedBB(this.pos, this.pos).expandXyz(radius).offset(offset);\n List<EntityItem> entityItems = world.getEntitiesWithinAABB(EntityItem.class, aabb);\n int index = 0, max = 3;\n for (EntityItem entityItem : entityItems) {\n ItemStack stack = entityItem.getEntityItem();\n stack = inv.insert(stack, false, false);\n if (stack == null) {\n entityItem.setDead();\n } else {\n entityItem.setEntityItemStack(stack);\n }\n if (index++ >= max) {\n break;\n }\n }\n}\n"
"private void dumpParameters(PortletRequest req) {\n if (logger.isLoggable(Level.FINEST)) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"String_Node_Str\").append(type).append(\"String_Node_Str\");\n for (String name : parms.getNames()) {\n sb.append(\"String_Node_Str\").append(name);\n sb.append(\"String_Node_Str\").append(Arrays.toString(parms.get(name)));\n }\n logger.finest(sb.toString());\n }\n}\n"
"protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {\n if (fileToLargeError != null) {\n VelocityContainer vc = (VelocityContainer) formLayout.getComponent();\n vc.contextPut(\"String_Node_Str\", fileToLargeError);\n } else {\n htmlElement = uifactory.addRichTextElementForFileData(\"String_Node_Str\", null, body, -1, -1, false, baseContainer, fileName, customLinkTreeModel, formLayout, ureq.getUserSession(), getWindowControl());\n RichTextConfiguration editorConfiguration = htmlElement.getEditorConfiguration();\n editorConfiguration.addOnInitCallbackFunction(\"String_Node_Str\");\n editorConfiguration.setNonQuotedConfigValue(RichTextConfiguration.HEIGHT, \"String_Node_Str\");\n save = uifactory.addFormLink(\"String_Node_Str\", formLayout, Link.BUTTON);\n save.addActionListener(this, FormEvent.ONCLICK);\n cancel = uifactory.addFormLink(\"String_Node_Str\", formLayout, Link.BUTTON);\n cancel.addActionListener(this, FormEvent.ONCLICK);\n saveClose = uifactory.addFormLink(\"String_Node_Str\", formLayout, Link.BUTTON);\n saveClose.addActionListener(this, FormEvent.ONCLICK);\n VelocityContainer vc = (VelocityContainer) formLayout.getComponent();\n metadataVC = createVelocityContainer(\"String_Node_Str\");\n vc.put(\"String_Node_Str\", metadataVC);\n long lm = fileLeaf.getLastModified();\n metadataVC.contextPut(\"String_Node_Str\", Formatter.getInstance(ureq.getLocale()).formatDateAndTime(new Date(lm)));\n metadataVC.contextPut(\"String_Node_Str\", charSet);\n metadataVC.contextPut(\"String_Node_Str\", fileName);\n }\n}\n"
"public void startData(IDataContent data) {\n super.startData(data);\n HyperlinkDef url = parseHyperLink(data);\n if (((StyledElementDesign) data.getGenerateBy()).getMap() != null && ((StyledElementDesign) data.getGenerateBy()).getMap().getRuleCount() > 0) {\n engine.addData(data.getText().trim(), data.getComputedStyle(), url, bookmark);\n } else if (!ExcelUtil.getType(data.getValue()).equals(Data.NUMBER) && !ExcelUtil.getType(data.getValue()).equals(Data.DATE)) {\n engine.addData(data.getText(), data.getComputedStyle(), url);\n } else {\n engine.addData(data.getValue(), data.getComputedStyle(), url);\n }\n}\n"
"public void create() throws ResourceAllocationException {\n try {\n IpAddress ip = _networkService.allocateIP(getNetworkId(), _accountService.getAccount(getEntityOwnerId()));\n if (ip != null) {\n this.setEntityId(ip.getId());\n } else {\n throw new ServerApiException(BaseCmd.INTERNAL_ERROR, \"String_Node_Str\");\n }\n } catch (ConcurrentOperationException ex) {\n s_logger.warn(\"String_Node_Str\", ex);\n throw new ServerApiException(BaseCmd.INTERNAL_ERROR, ex.getMessage());\n } catch (InsufficientAddressCapacityException ex) {\n s_logger.info(ex);\n s_logger.trace(ex);\n throw new ServerApiException(BaseCmd.INSUFFICIENT_CAPACITY_ERROR, ex.getMessage());\n }\n}\n"
"protected boolean is_connected() {\n GoogleAuthentication googleAuthentication = GoogleAuthentication.getInstance(activity);\n boolean isConnected = googleAuthentication.isConnected();\n if (!isConnected) {\n mAchievementsClient = null;\n }\n return isConnected;\n}\n"
"public Map getRowValue() throws DataException {\n if (lastRowIndex == currRowIndex)\n return this.exprValueMap;\n lastRowIndex = currRowIndex;\n try {\n if (this.rowCount == 0) {\n if (this.exprValueMap == null)\n this.exprValueMap = this.getValueMap();\n } else {\n if (lastRowIndex == currRowIndex)\n return this.exprValueMap;\n lastRowIndex = currRowIndex;\n this.skipTo(nextDestIndex);\n this.exprValueMap = this.getValueMap();\n }\n } catch (IOException e) {\n throw new DataException(ResourceConstants.RD_LOAD_ERROR, e, \"String_Node_Str\");\n }\n return exprValueMap;\n}\n"
"public boolean visit(IResource resource) throws CoreException {\n if (!resource.exists() || !new File(resource.getLocation().toOSString()).exists()) {\n return false;\n }\n if (IResource.PROJECT == resource.getType()) {\n return true;\n } else if (IResource.FILE == resource.getType() && ResourceHelper.isModule(resource)) {\n final IPath fullPath = resource.getFullPath();\n final IDocument document = getDocument(fullPath, LocationKind.NORMALIZE);\n final FindReplaceDocumentAdapter searchAdapter = new FindReplaceDocumentAdapter(document);\n try {\n IRegion matchRegion = searchAdapter.find(0, PCAL_ALGORITHM_DEFINITION, true, true, false, false);\n if (matchRegion == null) {\n matchRegion = searchAdapter.find(0, PCAL_FAIR_ALGORITHM_DEFINITION, true, true, false, false);\n }\n final QualifiedName key = new QualifiedName(Activator.PLUGIN_ID, IPreferenceConstants.CONTAINS_PCAL_ALGORITHM);\n if (matchRegion != null) {\n resource.setSessionProperty(key, Boolean.TRUE);\n } else {\n resource.setSessionProperty(key, null);\n }\n } catch (BadLocationException e) {\n throw new CoreException(new Status(Status.ERROR, Activator.PLUGIN_ID, \"String_Node_Str\", e));\n }\n }\n return false;\n}\n"
"static public Project getProject(File dir) {\n File projectFile = new File(dir, \"String_Node_Str\");\n Project ret = null;\n if (projectFile.exists()) {\n Digester d = new Digester();\n d.push(\"String_Node_Str\", dir);\n d.addRuleSet(new ProjectRuleSet(\"String_Node_Str\"));\n try {\n ret = (Project) d.parse(projectFile);\n } catch (IOException e) {\n log.severe(\"String_Node_Str\" + projectFile.getPath() + \"String_Node_Str\" + e.getMessage());\n } catch (SAXException e) {\n log.error(\"String_Node_Str\" + projectFile.getPath() + \"String_Node_Str\" + e.getMessage());\n }\n } else {\n try {\n dir.mkdirs();\n ret = new Project(dir);\n ret.save();\n } catch (IOException ex) {\n return null;\n }\n }\n return ret;\n}\n"
"private void defineDefaultSettingFile(IvyVariableContainer variableContainer) {\n String settingsFileName = variableContainer.getVariable(\"String_Node_Str\");\n if (settingsFileName != null && !settingsFileName.equals(variableContainer.getVariable(\"String_Node_Str\"))) {\n info(\"String_Node_Str\");\n } else {\n settingsFileName = variableContainer.getVariable(\"String_Node_Str\");\n }\n File[] settingsLocations = new File[] { new File(getProject().getBaseDir(), settingsFileName), new File(getProject().getBaseDir(), \"String_Node_Str\"), new File(settingsFileName), new File(\"String_Node_Str\") };\n for (int i = 0; i < settingsLocations.length; i++) {\n file = settingsLocations[i];\n Message.verbose(\"String_Node_Str\" + file);\n if (file.exists()) {\n break;\n }\n }\n if (!file.exists()) {\n if (Boolean.valueOf(getProject().getProperty(\"String_Node_Str\")).booleanValue()) {\n Message.info(\"String_Node_Str\");\n file = null;\n url = IvySettings.getDefault14SettingsURL();\n } else {\n Message.info(\"String_Node_Str\");\n file = null;\n url = IvySettings.getDefaultSettingsURL();\n }\n }\n}\n"
"protected void cycleProxy(SdlDisconnectedReason disconnectedReason) {\n if (_cycling)\n return;\n synchronized (CYCLE_LOCK) {\n try {\n _cycling = true;\n cleanProxy(disconnectedReason);\n initializeProxy();\n if (!SdlDisconnectedReason.LEGACY_BLUETOOTH_MODE_ENABLED.equals(disconnectedReason) && !_transportConfig.getTransportType().equals(TransportType.MULTIPLEX)) {\n notifyProxyClosed(\"String_Node_Str\", new SdlException(\"String_Node_Str\", SdlExceptionCause.SDL_PROXY_CYCLED), disconnectedReason);\n }\n } catch (SdlException e) {\n Intent sendIntent = createBroadcastIntent();\n updateBroadcastIntent(sendIntent, \"String_Node_Str\", \"String_Node_Str\");\n updateBroadcastIntent(sendIntent, \"String_Node_Str\", \"String_Node_Str\" + e.getSdlExceptionCause());\n sendBroadcastIntent(sendIntent);\n switch(e.getSdlExceptionCause()) {\n case BLUETOOTH_DISABLED:\n notifyProxyClosed(\"String_Node_Str\", new SdlException(\"String_Node_Str\", SdlExceptionCause.BLUETOOTH_DISABLED), SdlDisconnectedReason.BLUETOOTH_DISABLED);\n break;\n case BLUETOOTH_ADAPTER_NULL:\n notifyProxyClosed(\"String_Node_Str\", new SdlException(\"String_Node_Str\", SdlExceptionCause.BLUETOOTH_ADAPTER_NULL), SdlDisconnectedReason.BLUETOOTH_ADAPTER_ERROR);\n break;\n default:\n notifyProxyClosed(\"String_Node_Str\", e, SdlDisconnectedReason.GENERIC_ERROR);\n break;\n }\n } catch (Exception e) {\n notifyProxyClosed(\"String_Node_Str\", e, SdlDisconnectedReason.GENERIC_ERROR);\n }\n _cycling = false;\n }\n}\n"
"public Control createControl(Composite subComposite, IElementParameter param, int numInRow, int nbInRow, int top, Control lastControl) {\n FormData data;\n CLabel labelLabel = getWidgetFactory().createCLabel(subComposite, param.getDisplayName());\n data = new FormData();\n if (lastControl != null) {\n data.left = new FormAttachment(lastControl, 0);\n } else {\n data.left = new FormAttachment((((numInRow - 1) * MAX_PERCENT) / nbInRow), 0);\n }\n data.top = new FormAttachment(0, top);\n labelLabel.setLayoutData(data);\n if (numInRow != 1) {\n labelLabel.setAlignment(SWT.RIGHT);\n }\n Button btnEdit = getWidgetFactory().createButton(subComposite, \"String_Node_Str\", SWT.PUSH);\n btnEdit.setImage(ImageProvider.getImage(CoreUIPlugin.getImageDescriptor(DOTS_BUTTON)));\n btnEdit.setData(NAME, DATE);\n btnEdit.setData(PARAMETER_NAME, param.getName());\n btnEdit.setEnabled(!param.isReadOnly());\n btnEdit.addSelectionListener(listenerSelection);\n DecoratedField dField = new DecoratedField(subComposite, SWT.BORDER, new SelectAllTextControlCreator());\n if (param.isRequired()) {\n FieldDecoration decoration = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_REQUIRED);\n dField.addFieldDecoration(decoration, SWT.RIGHT | SWT.TOP, false);\n }\n if (param.isRepositoryValueUsed()) {\n FieldDecoration decoration = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);\n decoration.setDescription(Messages.getString(\"String_Node_Str\"));\n dField.addFieldDecoration(decoration, SWT.RIGHT | SWT.BOTTOM, false);\n }\n Control cLayout = dField.getLayoutControl();\n dateText = (Text) dField.getControl();\n dateText.setData(PARAMETER_NAME, param.getName());\n cLayout.setBackground(subComposite.getBackground());\n dateText.setEditable(!param.isReadOnly());\n editionControlHelper.register(param.getName(), dateText);\n addDragAndDropTarget(dateText);\n if (elem instanceof Node) {\n dateText.setToolTipText(VARIABLE_TOOLTIP + param.getVariableName());\n }\n hashCurControls.put(param.getName(), dateText);\n data = new FormData();\n int currentLabelWidth = STANDARD_LABEL_WIDTH;\n GC gc = new GC(labelLabel);\n Point labelSize = gc.stringExtent(param.getDisplayName());\n gc.dispose();\n gc = new GC(dateText);\n Point defaultDateDateSize = gc.stringExtent(\"String_Node_Str\");\n Object paramValue = param.getValue() != null ? param.getValue() : \"String_Node_Str\";\n Point currentDateSize = gc.stringExtent((String) paramValue);\n gc.dispose();\n int currentDateWidth = defaultDateDateSize.x + ITabbedPropertyConstants.HSPACE + STANDARD_TEXT_WIDTH_ADDITION;\n if ((currentDateSize.x + ITabbedPropertyConstants.HSPACE + STANDARD_TEXT_WIDTH_ADDITION) > currentDateWidth) {\n currentDateWidth = currentDateSize.x + ITabbedPropertyConstants.HSPACE + STANDARD_TEXT_WIDTH_ADDITION;\n }\n dateText.computeSize(SWT.DEFAULT, SWT.DEFAULT);\n if ((labelSize.x + ITabbedPropertyConstants.HSPACE) > currentLabelWidth) {\n currentLabelWidth = labelSize.x + ITabbedPropertyConstants.HSPACE;\n }\n data.left = new FormAttachment(labelLabel, 0, SWT.RIGHT);\n data.right = new FormAttachment(labelLabel, currentDateWidth, SWT.RIGHT);\n data.top = new FormAttachment(labelLabel, 0, SWT.CENTER);\n cLayout.setLayoutData(data);\n data = new FormData();\n data.left = new FormAttachment(cLayout, 0, SWT.RIGHT);\n data.right = new FormAttachment(cLayout, STANDARD_BUTTON_WIDTH, SWT.RIGHT);\n data.top = new FormAttachment(labelLabel, 0, SWT.CENTER);\n data.height = STANDARD_HEIGHT - 2;\n btnEdit.setLayoutData(data);\n Point initialSize = dField.getLayoutControl().computeSize(SWT.DEFAULT, SWT.DEFAULT);\n dynamicProperty.setCurRowSize(initialSize.y + ITabbedPropertyConstants.VSPACE);\n return btnEdit;\n}\n"
"private void collectAndSendDataLocked(final HBBaseDataCollector collector, final HBDataSenderService hbDataSenderService) throws JobExecutionException {\n try {\n List<HBData> data = collector.collectData();\n hbDataSenderService.sendData(data);\n } catch (final Exception e) {\n logger.error(\"String_Node_Str\" + collector.getCollectorId(), e);\n }\n}\n"
"public void testIsString_ownDefs() {\n boolean result = stringArrayFixture.isString();\n assertFalse(result);\n}\n"
"public static List<SupportedMetadataTypeBundle> retrieveSupportedMetadata(User user, IndexedAIP aip, IndexedRepresentation representation, Locale locale) throws GenericException {\n Messages messages = RodaCoreFactory.getI18NMessages(locale);\n List<String> types = RodaUtils.copyList(RodaCoreFactory.getRodaConfiguration().getList(RodaConstants.UI_BROWSER_METADATA_DESCRIPTIVE_TYPES));\n List<SupportedMetadataTypeBundle> supportedMetadata = new ArrayList<>();\n if (types != null) {\n for (String id : types) {\n String type = id;\n String version = null;\n if (id.contains(RodaConstants.METADATA_VERSION_SEPARATOR)) {\n version = id.substring(id.lastIndexOf(RodaConstants.METADATA_VERSION_SEPARATOR) + 1, id.length());\n type = id.substring(0, id.lastIndexOf(RodaConstants.METADATA_VERSION_SEPARATOR));\n }\n String key = RodaConstants.I18N_UI_BROWSE_METADATA_DESCRIPTIVE_TYPE_PREFIX + type;\n if (version != null) {\n key += RodaConstants.METADATA_VERSION_SEPARATOR + version.toLowerCase();\n }\n String label = messages.getTranslation(key, type);\n InputStream templateStream = RodaCoreFactory.getConfigurationFileAsStream(RodaConstants.METADATA_TEMPLATE_FOLDER + \"String_Node_Str\" + ((version != null) ? type + RodaConstants.METADATA_VERSION_SEPARATOR + version : type) + RodaConstants.METADATA_TEMPLATE_EXTENSION);\n String template = null;\n Set<MetadataValue> values = null;\n if (templateStream != null) {\n try {\n template = IOUtils.toString(templateStream, RodaConstants.DEFAULT_ENCODING);\n values = ServerTools.transform(template);\n for (MetadataValue mv : values) {\n String generator = mv.get(\"String_Node_Str\");\n if (generator != null && generator.length() > 0) {\n String value = null;\n if (representation != null) {\n value = ServerTools.autoGenerateRepresentationValue(representation, user, generator);\n } else {\n value = ServerTools.autoGenerateAIPValue(aip, user, generator);\n }\n if (value != null) {\n mv.set(\"String_Node_Str\", value);\n }\n }\n String labels = mv.get(\"String_Node_Str\");\n String labelI18N = mv.get(\"String_Node_Str\");\n if (labels != null && labelI18N != null) {\n Map<String, String> labelsMaps = JsonUtils.getMapFromJson(labels);\n try {\n labelsMaps.put(locale.toString(), RodaCoreFactory.getI18NMessages(locale).getTranslation(labelI18N));\n } catch (MissingResourceException e) {\n LOGGER.debug(\"String_Node_Str\", labelI18N);\n }\n labels = JsonUtils.getJsonFromObject(labelsMaps);\n mv.set(\"String_Node_Str\", labels);\n }\n String i18nPrefix = mv.get(\"String_Node_Str\");\n if (i18nPrefix != null) {\n Map<String, String> terms = messages.getTranslations(i18nPrefix, String.class, false);\n if (terms.size() > 0) {\n try {\n String options = mv.get(\"String_Node_Str\");\n List<String> optionsList = JsonUtils.getListFromJson(options, String.class);\n if (optionsList != null) {\n Map<String, Map<String, String>> i18nMap = new HashMap<String, Map<String, String>>();\n for (int i = 0; i < optionsList.size(); i++) {\n String value = optionsList.get(i);\n String translation = terms.get(i18nPrefix + \"String_Node_Str\" + value);\n if (translation == null) {\n translation = value;\n }\n Map<String, String> term = new HashMap<String, String>();\n term.put(locale.toString(), translation);\n i18nMap.put(value, term);\n }\n mv.set(\"String_Node_Str\", JsonUtils.getJsonFromObject(i18nMap));\n }\n } catch (MissingResourceException e) {\n LOGGER.error(e.getMessage(), e);\n }\n }\n }\n }\n } catch (IOException e) {\n LOGGER.error(\"String_Node_Str\", e);\n }\n }\n supportedMetadata.add(new SupportedMetadataTypeBundle(id, type, version, label, template, values));\n }\n }\n return supportedMetadata;\n}\n"
"public String getUsageInfo() {\n List<String> hostInfoList = zooKeeperDriver.getConf(zooConfig.getZookeeperUrlPrefix());\n return StringUtils.join(hostInfoList, '\\n');\n}\n"
"private static List<Text> getRightTextNodesInSameP(Range range) {\n Range rightRange = range.cloneRange();\n Node parentPNode = getAncestorParagraph(range.getEndContainer());\n rightRange.setEnd(parentPNode, parentPNode.getChildCount());\n return getTextNodes(rightRange);\n}\n"
"private void setButtons() throws ServiceException {\n Shooting activeShooting = shootingService.searchIsActive();\n if (activeShooting != null && activeShooting.getActive()) {\n startButton.setVisible(false);\n stopButton.setVisible(true);\n storage.setVisible(false);\n canclebutton.setText(\"String_Node_Str\");\n storageDirLabel.setVisible(false);\n gridSave.setVisible(false);\n finallsavingplace.setText(shootingService.searchIsActive().getStorageDir());\n finallsavingplace.setVisible(true);\n save1.setVisible(true);\n saveing.setVisible(false);\n String bgPathAcitveShooting = shootingService.searchIsActive().getBgPictureFolder();\n if (bgPathAcitveShooting != null && !bgPathAcitveShooting.isEmpty()) {\n bgStorageDirLabel.setText(bgPathAcitveShooting);\n }\n } else {\n stopButton.setVisible(false);\n startButton.setVisible(true);\n storage.setVisible(true);\n storageDirLabel.setVisible(true);\n gridSave.setVisible(true);\n canclebutton.setText(\"String_Node_Str\");\n finallsavingplace.setVisible(false);\n save1.setVisible(false);\n saveing.setVisible(true);\n }\n}\n"
"public void refreshUI() {\n resizeTableColumns();\n canUpdate = false;\n CloudFoundryApplicationModule appModule = getApplication();\n int state = appModule.getState();\n refreshPublishState();\n setCurrentStartDebugApplicationAction();\n instanceSpinner.setSelection(appModule.getInstanceCount());\n updateServerNameDisplay(appModule);\n refreshApplicationDeploymentButtons();\n mappedURIsLink.setEnabled(state == IServer.STATE_STARTED);\n CloudApplication cloudApplication = appModule.getApplication();\n List<CloudService> services = new ArrayList<CloudService>();\n instanceSpinner.setEnabled(cloudApplication != null);\n instancesViewer.getTable().setEnabled(cloudApplication != null);\n instancesViewer.setInput(null);\n if (provideServices) {\n List<String> serviceNames = null;\n DeploymentInfo deploymentInfo = appModule.getLastDeploymentInfo();\n if (deploymentInfo == null) {\n deploymentInfo = new DeploymentInfo();\n appModule.setLastDeploymentInfo(deploymentInfo);\n if (cloudApplication != null) {\n List<String> existingServices = cloudApplication.getServices();\n serviceNames = new ArrayList<String>();\n if (existingServices != null) {\n for (String existingService : existingServices) {\n if (existingService != null) {\n serviceNames.add(existingService);\n }\n }\n }\n deploymentInfo.setServices(serviceNames);\n }\n } else {\n serviceNames = deploymentInfo.getServices();\n }\n if (serviceNames == null) {\n serviceNames = Collections.emptyList();\n }\n List<CloudService> allServices = editorPage.getServices();\n if (allServices != null) {\n for (CloudService service : allServices) {\n if (serviceNames.contains(service.getName())) {\n services.add(service);\n }\n }\n }\n servicesViewer.setInput(services.toArray(new CloudService[services.size()]));\n }\n memoryCombo.setEnabled(cloudApplication != null);\n if (cloudApplication != null) {\n int appMemory = appModule.getApplication().getMemory();\n memoryCombo.removeAll();\n boolean found = false;\n int[] applicationMemoryChoices = editorPage.getApplicationMemoryChoices();\n if (applicationMemoryChoices != null) {\n for (int option : applicationMemoryChoices) {\n memoryCombo.add(option + \"String_Node_Str\");\n if (option == appMemory) {\n int index = memoryCombo.getItemCount() - 1;\n memoryCombo.select(index);\n found = true;\n }\n }\n if (!found && appMemory != 0) {\n memoryCombo.add(appMemory + \"String_Node_Str\", 0);\n memoryCombo.select(0);\n }\n memoryCombo.setEnabled(true);\n }\n }\n List<String> currentURIs = null;\n if (cloudApplication != null) {\n currentURIs = cloudApplication.getUris();\n ApplicationStats applicationStats = appModule.getApplicationStats();\n InstancesInfo instancesInfo = appModule.getInstancesInfo();\n if (applicationStats != null) {\n List<InstanceStats> statss = applicationStats.getRecords();\n List<InstanceInfo> infos = instancesInfo != null ? instancesInfo.getInstances() : null;\n InstanceStatsAndInfo[] statsAndInfos = new InstanceStatsAndInfo[statss.size()];\n for (int i = 0; i < statss.size(); i++) {\n InstanceStats stats = statss.get(i);\n InstanceInfo info = null;\n if (infos != null && infos.size() > i) {\n info = infos.get(i);\n }\n statsAndInfos[i] = new InstanceStatsAndInfo(stats, info);\n }\n instancesViewer.setInput(statsAndInfos);\n }\n }\n if (currentURIs == null && !isPublished) {\n currentURIs = appModule.getLastDeploymentInfo() != null ? appModule.getLastDeploymentInfo().getUris() : null;\n }\n if (currentURIs == null) {\n currentURIs = Collections.emptyList();\n }\n if (!currentURIs.equals(URIs)) {\n URIs = currentURIs;\n mappedURIsLink.setText(getURIsAsLinkText(URIs));\n generalSection.getParent().layout(true, true);\n editorPage.reflow();\n }\n if (provideServices) {\n servicesDropListener.setModule(appModule);\n servicesViewer.refresh(true);\n }\n instancesViewer.refresh(true);\n canUpdate = true;\n if (appModule.getErrorMessage() != null) {\n editorPage.setMessage(appModule.getErrorMessage(), IMessageProvider.ERROR);\n } else {\n editorPage.setMessage(null, IMessageProvider.ERROR);\n }\n}\n"
"public synchronized void create(final NamespaceMeta metadata) throws Exception {\n Preconditions.checkArgument(metadata != null, \"String_Node_Str\");\n NamespaceId namespace = new NamespaceId(metadata.getName());\n if (exists(namespace.toId())) {\n throw new NamespaceAlreadyExistsException(namespace.toId());\n }\n if (hasCustomMapping(metadata)) {\n validateCustomMapping(metadata);\n }\n Principal principal = authenticationContext.getPrincipal();\n authorizationEnforcer.enforce(instanceId, principal, Action.ADMIN);\n privilegesManager.grant(namespace, principal, EnumSet.allOf(Action.class));\n if (SecurityUtil.isKerberosEnabled(cConf)) {\n ImpersonationInfo impersonationInfo = new ImpersonationInfo(metadata, cConf);\n String namespacePrincipal = impersonationInfo.getPrincipal();\n executionUserName = new KerberosName(namespacePrincipal).getShortName();\n } else {\n executionUserName = UserGroupInformation.getCurrentUser().getShortUserName();\n }\n nsStore.create(metadata);\n try {\n impersonator.doAs(metadata, new Callable<Void>() {\n public Void call() throws Exception {\n storageProviderNamespaceAdmin.create(metadata);\n return null;\n }\n });\n } catch (IOException | ExploreException | SQLException e) {\n nsStore.delete(metadata.getNamespaceId().toId());\n privilegesManager.revoke(namespace);\n throw new NamespaceCannotBeCreatedException(namespace.toId(), e);\n }\n}\n"
"public void registerCallback(String name, Callback callback) {\n updatesHandler.registerCallback(name, callback);\n}\n"
"public Set<Parameter> getParameters() {\n return parameters = nonNullSet(parameters, Parameter.class);\n}\n"
"private void process() {\n android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_DISPLAY);\n KeyEvent lastKey = null;\n long lastKeyTime = SystemClock.uptimeMillis();\n long nextKeyTime = lastKeyTime + LONG_WAIT;\n long downTime = 0;\n int keyRepeatCount = 0;\n boolean configChanged = false;\n while (true) {\n long curTime = SystemClock.uptimeMillis();\n if (DEBUG_INPUT)\n Log.v(TAG, \"String_Node_Str\" + curTime + \"String_Node_Str\" + nextKeyTime);\n QueuedEvent ev = mQueue.getEvent((int) ((!configChanged && curTime < nextKeyTime) ? (nextKeyTime - curTime) : 0));\n if (DEBUG_INPUT && ev != null)\n Log.v(TAG, \"String_Node_Str\" + ev.classType + \"String_Node_Str\" + ev.event);\n if (MEASURE_LATENCY) {\n lt.sample(\"String_Node_Str\", System.nanoTime() - ev.whenNano);\n }\n if (lastKey != null && !mPolicy.allowKeyRepeat()) {\n lastKey = null;\n downTime = 0;\n lastKeyTime = curTime;\n nextKeyTime = curTime + LONG_WAIT;\n }\n try {\n if (ev != null) {\n curTime = SystemClock.uptimeMillis();\n int eventType;\n if (ev.classType == RawInputEvent.CLASS_TOUCHSCREEN) {\n eventType = eventType((MotionEvent) ev.event);\n } else if (ev.classType == RawInputEvent.CLASS_KEYBOARD || ev.classType == RawInputEvent.CLASS_TRACKBALL) {\n eventType = LocalPowerManager.BUTTON_EVENT;\n } else {\n eventType = LocalPowerManager.OTHER_EVENT;\n }\n try {\n if ((curTime - mLastBatteryStatsCallTime) >= MIN_TIME_BETWEEN_USERACTIVITIES) {\n mLastBatteryStatsCallTime = curTime;\n mBatteryStats.noteInputEvent();\n }\n } catch (RemoteException e) {\n }\n if (ev.classType == RawInputEvent.CLASS_CONFIGURATION_CHANGED) {\n } else if (eventType != TOUCH_EVENT && eventType != LONG_TOUCH_EVENT && eventType != CHEEK_EVENT) {\n mPowerManager.userActivity(curTime, false, eventType, false);\n } else if (mLastTouchEventType != eventType || (curTime - mLastUserActivityCallTime) >= MIN_TIME_BETWEEN_USERACTIVITIES) {\n mLastUserActivityCallTime = curTime;\n mLastTouchEventType = eventType;\n mPowerManager.userActivity(curTime, false, eventType, false);\n }\n switch(ev.classType) {\n case RawInputEvent.CLASS_KEYBOARD:\n KeyEvent ke = (KeyEvent) ev.event;\n if (ke.isDown()) {\n lastKey = ke;\n downTime = curTime;\n keyRepeatCount = 0;\n lastKeyTime = curTime;\n nextKeyTime = lastKeyTime + ViewConfiguration.getLongPressTimeout();\n if (DEBUG_INPUT)\n Log.v(TAG, \"String_Node_Str\" + nextKeyTime);\n } else {\n lastKey = null;\n downTime = 0;\n lastKeyTime = curTime;\n nextKeyTime = curTime + LONG_WAIT;\n if (DEBUG_INPUT)\n Log.v(TAG, \"String_Node_Str\" + nextKeyTime);\n }\n dispatchKey((KeyEvent) ev.event, 0, 0);\n mQueue.recycleEvent(ev);\n break;\n case RawInputEvent.CLASS_TOUCHSCREEN:\n dispatchPointer(ev, (MotionEvent) ev.event, 0, 0);\n break;\n case RawInputEvent.CLASS_TRACKBALL:\n dispatchTrackball(ev, (MotionEvent) ev.event, 0, 0);\n break;\n case RawInputEvent.CLASS_CONFIGURATION_CHANGED:\n configChanged = true;\n break;\n default:\n mQueue.recycleEvent(ev);\n break;\n }\n } else if (configChanged) {\n configChanged = false;\n sendNewConfiguration();\n } else if (lastKey != null) {\n curTime = SystemClock.uptimeMillis();\n if (DEBUG_INPUT)\n Log.v(TAG, \"String_Node_Str\" + nextKeyTime + \"String_Node_Str\" + curTime);\n if (curTime < nextKeyTime) {\n continue;\n }\n lastKeyTime = nextKeyTime;\n nextKeyTime = nextKeyTime + KEY_REPEAT_DELAY;\n keyRepeatCount++;\n if (DEBUG_INPUT)\n Log.v(TAG, \"String_Node_Str\" + keyRepeatCount + \"String_Node_Str\" + nextKeyTime);\n KeyEvent newEvent;\n if (downTime != 0 && (downTime + ViewConfiguration.getLongPressTimeout()) <= curTime) {\n newEvent = KeyEvent.changeTimeRepeat(lastKey, curTime, keyRepeatCount, lastKey.getFlags() | KeyEvent.FLAG_LONG_PRESS);\n downTime = 0;\n } else {\n newEvent = KeyEvent.changeTimeRepeat(lastKey, curTime, keyRepeatCount);\n }\n dispatchKey(newEvent, 0, 0);\n } else {\n curTime = SystemClock.uptimeMillis();\n lastKeyTime = curTime;\n nextKeyTime = curTime + LONG_WAIT;\n }\n } catch (Exception e) {\n Log.e(TAG, \"String_Node_Str\" + e, e);\n }\n }\n}\n"
"protected Object unwrapIfNeeded(Object value) {\n return value;\n}\n"
"static ObjectType join(ObjectType obj1, ObjectType obj2) {\n if (obj1.isTopObject() || obj2.isTopObject()) {\n return obj1.commonTypes.getTopObjectType();\n }\n if (obj1.equals(obj2)) {\n return obj1;\n }\n if (obj1.isPrototypeObject() && obj2.isPrototypeObject()) {\n return join(obj1.getNominalType().getInstanceAsObjectType(), obj2.getNominalType().getInstanceAsObjectType());\n }\n NominalType nt1 = obj1.nominalType;\n NominalType nt2 = obj2.nominalType;\n Preconditions.checkState(nt1.isRawSubtypeOf(nt2) || nt2.isRawSubtypeOf(nt1));\n JSTypes commonTypes = obj1.commonTypes;\n boolean isLoose = obj1.isLoose || obj2.isLoose;\n FunctionType fn = FunctionType.join(obj1.fn, obj2.fn);\n PersistentMap<String, Property> props;\n if (isLoose) {\n fn = fn == null ? null : fn.withLoose();\n props = joinPropsLoosely(commonTypes, obj1.props, obj2.props);\n } else {\n props = joinProps(obj1.props, obj2.props, nt1, nt2);\n }\n NominalType nominal = NominalType.join(nt1, nt2);\n if (nominal.isBuiltinObject() && fn != null) {\n if (isLoose) {\n nominal = obj1.commonTypes.getFunctionType();\n } else {\n fn = null;\n }\n }\n Namespace ns = Objects.equals(obj1.ns, obj2.ns) ? obj1.ns : null;\n return makeObjectType(commonTypes, nominal, props, fn, ns, isLoose, ObjectKind.join(obj1.objectKind, obj2.objectKind));\n}\n"
"private static void applyUserRestrictionLR(Context context, int userId, String key, boolean newValue) {\n if (UserManagerService.DBG) {\n Log.d(TAG, \"String_Node_Str\" + userId + \"String_Node_Str\" + key + \"String_Node_Str\" + newValue);\n }\n final ContentResolver cr = context.getContentResolver();\n final long id = Binder.clearCallingIdentity();\n try {\n switch(key) {\n case UserManager.DISALLOW_CONFIG_WIFI:\n if (newValue) {\n android.provider.Settings.Secure.putIntForUser(cr, android.provider.Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, 0, userId);\n }\n break;\n case UserManager.DISALLOW_SHARE_LOCATION:\n if (newValue) {\n android.provider.Settings.Secure.putIntForUser(cr, android.provider.Settings.Secure.LOCATION_MODE, android.provider.Settings.Secure.LOCATION_MODE_OFF, userId);\n android.provider.Settings.Secure.putStringForUser(cr, android.provider.Settings.Secure.LOCATION_PROVIDERS_ALLOWED, \"String_Node_Str\", userId);\n }\n final String property = android.provider.Settings.Secure.SYS_PROP_SETTING_VERSION;\n long version = SystemProperties.getLong(property, 0) + 1;\n SystemProperties.set(property, Long.toString(version));\n final String name = android.provider.Settings.Secure.LOCATION_PROVIDERS_ALLOWED;\n final Uri url = Uri.withAppendedPath(android.provider.Settings.Secure.CONTENT_URI, name);\n context.getContentResolver().notifyChange(url, null, true, userId);\n break;\n case UserManager.DISALLOW_DEBUGGING_FEATURES:\n if (newValue) {\n if (userId == UserHandle.USER_SYSTEM) {\n android.provider.Settings.Global.putStringForUser(cr, android.provider.Settings.Global.ADB_ENABLED, \"String_Node_Str\", userId);\n }\n }\n break;\n case UserManager.ENSURE_VERIFY_APPS:\n if (newValue) {\n android.provider.Settings.Global.putStringForUser(context.getContentResolver(), android.provider.Settings.Global.PACKAGE_VERIFIER_ENABLE, \"String_Node_Str\", userId);\n android.provider.Settings.Global.putStringForUser(context.getContentResolver(), android.provider.Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB, \"String_Node_Str\", userId);\n }\n break;\n case UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES:\n if (newValue) {\n android.provider.Settings.Secure.putIntForUser(cr, android.provider.Settings.Secure.INSTALL_NON_MARKET_APPS, 0, userId);\n }\n break;\n }\n } finally {\n Binder.restoreCallingIdentity(id);\n }\n}\n"
"public void commitGraph() {\n logger.debug(\"String_Node_Str\");\n try {\n full_graph.close();\n FileInputStream sourceFIS = null;\n FileOutputStream destFOS = null;\n FileChannel sourceChannel = null;\n FileChannel destChannel = null;\n try {\n sourceFIS = new FileInputStream(COMPLETE_GRAPH_TMP_FILE);\n destFOS = new FileOutputStream(COMPLETE_GRAPH_FILE);\n sourceChannel = sourceFIS.getChannel();\n destChannel = destFOS.getChannel();\n destChannel.transferFrom(sourceChannel, 0, sourceChannel.size());\n }\n full_graph = new BufferedWriter(new FileWriter(COMPLETE_GRAPH_TMP_FILE, true));\n BufferedWriter finalGraph = new BufferedWriter(new FileWriter(COMPLETE_GRAPH_FILE, true));\n closeDependenceGraph(finalGraph);\n openLegend(finalGraph);\n legend.close();\n try (FileInputStream sourceStream = new FileInputStream(COMPLETE_LEGEND_TMP_FILE);\n FileOutputStream destStream = new FileOutputStream(COMPLETE_GRAPH_FILE);\n FileChannel sourceChannel = sourceStream.getChannel();\n FileChannel destChannel = destStream.getChannel()) {\n destChannel.position(destChannel.size());\n sourceChannel.transferTo(0, sourceChannel.size(), destChannel);\n }\n legend = new BufferedWriter(new FileWriter(COMPLETE_LEGEND_TMP_FILE, true));\n closeLegend(finalGraph);\n closeGraphFile(finalGraph);\n finalGraph.close();\n } catch (Exception e) {\n logger.error(ERROR_COMMIT_FINAL_GRAPH, e);\n }\n}\n"
"private boolean compareVectorForComp(Vector myVector, String jndiName) {\n if (!compareVectorForModule(myVector, jndiName)) {\n return false;\n }\n for (int j = 0; j < myVector.size(); j++) {\n String firstElement = (String) myVector.firstElement();\n if (firstElement.contains(\"String_Node_Str\")) {\n firstElement = firstElement.substring(firstElement.lastIndexOf(\"String_Node_Str\") + 1, firstElement.length());\n }\n if (firstElement.contains(\"String_Node_Str\")) {\n firstElement = firstElement.substring(firstElement.lastIndexOf(\"String_Node_Str\") + 1, firstElement.length());\n }\n for (int i = j + 1; i < myVector.size(); i++) {\n String otherElements = (String) myVector.get(i);\n if (otherElements.contains(\"String_Node_Str\")) {\n otherElements = otherElements.substring(otherElements.lastIndexOf(\"String_Node_Str\") + 1, otherElements.length());\n }\n if (otherElements.contains(\"String_Node_Str\")) {\n otherElements = otherElements.substring(otherElements.lastIndexOf(\"String_Node_Str\") + 1, otherElements.length());\n }\n if (!firstElement.equals(otherElements)) {\n inValidJndiName = jndiName;\n DOLUtils.getDefaultLogger().log(Level.SEVERE, \"String_Node_Str\", new Object[] { jndiName, application.getAppName() });\n return false;\n }\n }\n }\n return true;\n}\n"
"private void buildServiceInstance(ModelController controller, String serviceUuid) {\n ContrailManager manager = controller.getManager();\n ApiConnector api = controller.getApiAccessor();\n _serviceUuid = serviceUuid;\n ServiceInstanceModel siModel = manager.getDatabase().lookupServiceInstance(serviceUuid);\n if (siModel == null) {\n ServiceInstance siObj;\n try {\n siObj = (ServiceInstance) api.findById(ServiceInstance.class, serviceUuid);\n } catch (IOException ex) {\n s_logger.warn(\"String_Node_Str\", ex);\n throw new CloudRuntimeException(\"String_Node_Str\", ex);\n }\n if (siObj == null) {\n siModel = new ServiceInstanceModel(serviceUuid);\n siModel.update(controller);\n siObj = siModel.getServiceInstance();\n }\n }\n _serviceModel = siModel;\n}\n"
"private void createChildrenNode(Tree tree, TreeItemContainer parentItem, TreeColumn[] treeColumns, IIndicatorNode[] branchNodes) {\n for (int i = 0; i < branchNodes.length; i++) {\n IIndicatorNode indicatorNode = branchNodes[i];\n if (!indicatorNode.getLabel().equals(\"String_Node_Str\")) {\n final TreeItemContainer treeItem;\n if (parentItem == null) {\n treeItem = new TreeItemContainer(tree, SWT.NONE, treeColumns.length);\n } else {\n treeItem = new TreeItemContainer(parentItem, SWT.NONE, treeColumns.length);\n }\n TreeEditor editor;\n Button checkButton;\n Button rowCheckButton = null;\n Button commonCheckButton;\n List<Button> rowButtonList = new ArrayList<Button>();\n for (int j = 0; j < treeColumns.length; j++) {\n IndicatorEnum indicatorEnum = indicatorNode.getIndicatorEnum();\n if (j == 0) {\n treeItem.setText(0, indicatorNode.getLabel());\n if (indicatorEnum != null) {\n treeItem.setData(INDICATORITEM, indicatorNode);\n }\n continue;\n } else if (j == 1 && treeColumns.length > 2) {\n editor = new TreeEditor(tree);\n rowCheckButton = new Button(tree, SWT.CHECK);\n rowCheckButton.addSelectionListener(new RowSelectButtonListener(j, treeItem, indicatorEnum, null));\n checkButtons.add(rowCheckButton);\n Color systemColor = tree.getDisplay().getSystemColor(SWT.COLOR_YELLOW);\n treeItem.setBackground(j, systemColor);\n rowCheckButton.setBackground(systemColor);\n commonCheckButton = rowCheckButton;\n } else {\n editor = new TreeEditor(tree);\n checkButton = new Button(tree, SWT.CHECK);\n checkButton.setData(indicatorNode);\n if (((ModelElementIndicator) treeColumns[j].getData()).contains(indicatorEnum)) {\n checkButton.setSelection(true);\n }\n final ModelElementIndicator currentIndicator = (ModelElementIndicator) treeColumns[j].getData();\n checkButton.setEnabled(ModelElementIndicatorRule.match(indicatorNode, currentIndicator, this.language));\n if (null != indicatorNode.getIndicatorInstance() && !(indicatorNode.getIndicatorInstance() instanceof DatePatternFreqIndicator) && null != indicatorNode.getIndicatorInstance().getIndicatorDefinition() && dbms.getSqlExpression(indicatorNode.getIndicatorInstance().getIndicatorDefinition()) == null) {\n checkButton.setEnabled(false);\n }\n checkButton.addSelectionListener(new ButtonSelectionListener(j, treeItem, indicatorEnum, currentIndicator));\n if (indicatorEnum != null) {\n checkButton.setToolTipText(DefaultMessagesImpl.getString(\"String_Node_Str\", indicatorEnum.getLabel(), currentIndicator.getElementName()));\n }\n checkButton.setData(MODELELEMENTINDICATORFLAG, currentIndicator);\n commonCheckButton = checkButton;\n rowButtonList.add(checkButton);\n checkButtons.add(checkButton);\n }\n commonCheckButton.pack();\n editor.minimumWidth = commonCheckButton.getSize().x;\n editor.horizontalAlignment = SWT.CENTER;\n editor.setEditor(commonCheckButton, treeItem, j);\n treeItem.setButton(j, commonCheckButton);\n }\n if (rowCheckButton != null) {\n boolean allChecked = true;\n rowCheckButton.setData(ROWINDICATORFLAG, rowButtonList);\n for (Button btn : rowButtonList) {\n if (!btn.getSelection()) {\n allChecked = false;\n }\n }\n rowCheckButton.setSelection(allChecked);\n }\n if (indicatorNode.hasChildren()) {\n createChildrenNode(tree, treeItem, treeColumns, indicatorNode.getChildren());\n }\n if (expanded) {\n TreeItem item = treeItem.getParentItem();\n while (null != item) {\n item.setExpanded(true);\n item = item.getParentItem();\n }\n }\n }\n }\n}\n"
"private void openCreateJigsawDialog() {\n CharSequence[] levels = new CharSequence[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n MaterialDialog.Builder builder = new MaterialDialog.Builder(this).title(R.string.level_difficulty).items(levels).itemsCallback(getMDListCallback());\n builder.show();\n}\n"
"private void renderScreen(int mouseX, int mouseY, float partialTickTime) {\n GL11.glEnable(GL12.GL_RESCALE_NORMAL);\n GL11.glColor4f(1F, 1F, 1F, 1F);\n GL11.glEnable(GL11.GL_BLEND);\n GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);\n renderBackgroundGUI();\n float offY = ptt(offsetY.value(), prevOffsetY, partialTickTime);\n int yLowerBound = -(int) offY - 32, yUpperBound = -(int) offY + height;\n GL11.glPushMatrix();\n GL11.glTranslatef(0F, offY, 0F);\n for (CategoryDisplayElement element : categoryElements) element.render(this, yLowerBound, yUpperBound);\n for (ObjectDisplayElement element : objectElements) {\n if (!element.object.isHidden()) {\n element.render(this, compendiumFile, yLowerBound, yUpperBound);\n element.object.connectToChildren(width / 2, 48, ObjectDisplayElement.lineRenderer);\n }\n }\n RenderHelper.disableStandardItemLighting();\n GL11.glPopMatrix();\n if (!(mouseX < 24 || mouseX > width - 24 || mouseY < 24 || mouseY > height - 24)) {\n for (CategoryDisplayElement element : categoryElements) {\n if (element.isMouseOver(mouseX, mouseY, (int) offY)) {\n GuiItemRenderHelper.setupTooltip(mouseX, mouseY, element.category.getTranslatedTooltip());\n }\n }\n for (ObjectDisplayElement element : objectElements) {\n if (element.isMouseOver(mouseX, mouseY, (int) offY)) {\n GuiItemRenderHelper.setupTooltip(mouseX, mouseY, element.object.getTranslatedTooltip());\n }\n }\n }\n GL11.glEnable(GL11.GL_BLEND);\n GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);\n renderFragmentCount(width - 90, 24);\n for (int a = 0; a < 2; a++) pageArrows[a].visible = false;\n GL11.glEnable(GL11.GL_BLEND);\n GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);\n if (currentObject != null)\n renderPaper(width / 2, height / 2, mouseX, mouseY);\n prevMouseX = mouseX;\n}\n"
"public static String checkAndMkdirs(String dir) {\n File file = new File(dir);\n if (!file.exists()) {\n file.mkdirs();\n }\n return file;\n}\n"
"public static void executeMainClass() throws Exception {\n try {\n WebServiceLocator.getInstance().setClientSideEnabled(true);\n ServiceLocator.getInstance().setConfigurator(getConfigurator());\n ParametersHandler parametersHandler = ServiceLocator.getInstance().getParametersHandler();\n String className = parametersHandler.getParameter(\"String_Node_Str\");\n if (className == null || className.trim().length() == 0) {\n String requestURL = parametersHandler.getRequestURL();\n List<AnnotationEntry> annotationEntries = AnnotationsHelper.getAnnotationsByType(PageAlias.class).getEntries();\n for (AnnotationEntry annotationEntry : annotationEntries) {\n if (annotationEntry.getAnnotationKey().equals(\"String_Node_Str\") && requestURL.contains(annotationEntry.getAnnotationValue()))\n className = annotationEntry.getType().getName();\n }\n }\n launch(className);\n } catch (Exception e) {\n alert(\"String_Node_Str\" + e.getMessage());\n throw e;\n }\n}\n"
"private boolean unoptimizableChooseStep(List<Step> steps, int index) {\n List<Step> toCome = steps.subList(index, steps.size());\n Step step = toCome.get(0);\n Preconditions.checkState(step instanceof ChooseStep, \"String_Node_Str\" + step.getClass().getSimpleName() + \"String_Node_Str\");\n ChooseStep chooseStep = (ChooseStep) step;\n List<Traversal.Admin<?, ?>> traversalAdmins = chooseStep.getGlobalChildren();\n if (traversalAdmins.size() != 2) {\n return true;\n }\n Traversal.Admin<?, ?> predicate = (Traversal.Admin<?, ?>) chooseStep.getLocalChildren().get(0);\n List<Step> predicateSteps = new ArrayList<>(predicate.getSteps());\n predicateSteps.remove(predicate.getSteps().size() - 1);\n Traversal.Admin<?, ?> globalChildOne = (Traversal.Admin<?, ?>) chooseStep.getGlobalChildren().get(0);\n List<Step> globalChildOneSteps = new ArrayList<>(globalChildOne.getSteps());\n globalChildOneSteps.remove(globalChildOneSteps.size() - 1);\n Traversal.Admin<?, ?> globalChildTwo = (Traversal.Admin<?, ?>) chooseStep.getGlobalChildren().get(1);\n List<Step> globalChildTwoSteps = new ArrayList<>(globalChildTwo.getSteps());\n globalChildTwoSteps.remove(globalChildTwoSteps.size() - 1);\n boolean hasIdentity = globalChildOne.getSteps().stream().anyMatch(s -> s instanceof IdentityStep);\n if (!hasIdentity) {\n hasIdentity = globalChildTwo.getSteps().stream().anyMatch(s -> s instanceof IdentityStep);\n if (hasIdentity) {\n if (!predicateSteps.equals(globalChildOneSteps)) {\n return true;\n }\n } else {\n return true;\n }\n } else {\n if (!predicateSteps.equals(globalChildTwoSteps)) {\n return true;\n }\n }\n return false;\n}\n"
"public void postUser() {\n userID = new SyncUser().getUserID(email, personName);\n}\n"
"public IFD getImageIFD() {\n if (imageIFD != null) {\n return imageIFD;\n } else {\n if (reader != null) {\n if (!reader.isDataLoaded()) {\n try {\n reader.read();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n imageIFD = reader.getImageIFD();\n }\n return imageIFD;\n }\n}\n"
"private static SAPFunctionUnit createFunctionUnit(String tableName, SAPConnection connection, JCoFunction function) {\n SAPFunctionUnit functionUnit;\n OutputSAPFunctionParameterTable outputParameterTable;\n InputSAPFunctionParameterTable inputParameterTable;\n MetadataTable metadataTable;\n SAPTestInputParameterTable testInputParameterTable;\n ProxyRepositoryFactory proxyRepositoryFactory = ProxyRepositoryFactory.getInstance();\n functionUnit = ConnectionFactory.eINSTANCE.createSAPFunctionUnit();\n functionUnit.setName(function.getName());\n functionUnit.setLabel(tableName);\n functionUnit.setOutputType(SapParameterTypeEnum.OUTPUT_SINGLE.getDisplayLabel());\n functionUnit.setConnection(connection);\n functionUnit.setId(proxyRepositoryFactory.getNextId());\n inputParameterTable = ConnectionFactory.eINSTANCE.createInputSAPFunctionParameterTable();\n inputParameterTable.setFunctionUnit(functionUnit);\n inputParameterTable.setId(proxyRepositoryFactory.getNextId());\n inputParameterTable.setLabel(functionUnit.getName());\n outputParameterTable = ConnectionFactory.eINSTANCE.createOutputSAPFunctionParameterTable();\n outputParameterTable.setFunctionUnit(functionUnit);\n outputParameterTable.setId(proxyRepositoryFactory.getNextId());\n outputParameterTable.setLabel(functionUnit.getName());\n testInputParameterTable = ConnectionFactory.eINSTANCE.createSAPTestInputParameterTable();\n testInputParameterTable.setFunctionUnit(functionUnit);\n testInputParameterTable.setId(proxyRepositoryFactory.getNextId());\n testInputParameterTable.setLabel(function.getName());\n metadataTable = ConnectionFactory.eINSTANCE.createMetadataTable();\n metadataTable.setId(proxyRepositoryFactory.getNextId());\n metadataTable.setLabel(tableName);\n metadataTable.getColumns().addAll(getColumns(function));\n functionUnit.setInputParameterTable(inputParameterTable);\n functionUnit.setOutputParameterTable(outputParameterTable);\n functionUnit.setMetadataTable(metadataTable);\n functionUnit.setTestInputParameterTable(testInputParameterTable);\n connection.getFuntions().add(functionUnit);\n return functionUnit;\n}\n"
"private void populateRegistrationDomain() {\n NSURL settingsBundleURL = NSBundle.getMainBundle().findResourceURL(\"String_Node_Str\", \"String_Node_Str\");\n NSDictionary<NSString, ?> appDefaults = loadDefaults(\"String_Node_Str\", settingsBundleURL);\n NSUserDefaults.getStandardUserDefaults().registerDefaults(appDefaults);\n NSUserDefaults.getStandardUserDefaults().synchronize();\n}\n"
"public void verify_A$String$OAuthConsumer$OAuthAccessToken$HttpMethod$SignatureMethod_AdditionalParameters() throws Exception {\n String authorizationHeader = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n OAuthConsumer consumer = new OAuthConsumer(\"String_Node_Str\", \"String_Node_Str\");\n OAuthAccessToken accessToken = new OAuthAccessToken(\"String_Node_Str\", \"String_Node_Str\");\n boolean actual = SignedRequestVerifier.verify(\"String_Node_Str\", \"String_Node_Str\", authorizationHeader, consumer, accessToken, HttpMethod.GET, SignatureMethod.HMAC_SHA1);\n boolean expected = true;\n assertEquals(expected, actual);\n}\n"
"private void buildDocHits(int group, ResultGroup resultGroup) {\n PriorityQueue queue = hitQueue[group];\n int nFound = queue.size();\n DocHitImpl[] hitArray = new DocHitImpl[nFound];\n float maxDocScore = 0.0f;\n for (int i = 0; i < nFound; i++) {\n int index = nFound - i - 1;\n hitArray[index] = (DocHitImpl) queue.pop();\n }\n int start = startDoc[group];\n int max = maxDocs[group];\n int nHits = Math.max(0, Math.min(nFound - start, max));\n resultGroup.docHits = new DocHit[nHits];\n resultGroup.totalDocs = count[group];\n resultGroup.startDoc = start;\n resultGroup.endDoc = start + nHits;\n for (int i = startDoc[group]; i < nFound; i++) resultGroup.docHits[i - start] = hitArray[i];\n}\n"
"protected String getElementText(RepositoryNode node) {\n if (node.getType() == ENodeType.REPOSITORY_ELEMENT || node.getType() == ENodeType.SIMPLE_FOLDER) {\n boolean isDeleted = false;\n boolean isModified = false;\n boolean inRef = false;\n boolean isFolder = false;\n IRepositoryViewObject object = node.getObject();\n isModified = object.isModified();\n isDeleted = object.isDeleted();\n org.talend.core.model.properties.Project mainProject = ProjectManager.getInstance().getCurrentProject().getEmfProject();\n inRef = !mainProject.getLabel().equals(object.getProjectLabel());\n if (node.getType() == ENodeType.SIMPLE_FOLDER) {\n addVersion = false;\n }\n return getText(object.getLabel(), object.getVersion(), object.getPath(), object.getProjectLabel(), isDeleted, isModified, addVersion, inRef);\n } else {\n return getText(node.getLabel(), null, null, null, false, false, false, false);\n }\n}\n"
"public static boolean hasNature(IResource resource, String natureId) {\n if (resource != null && resource.isAccessible()) {\n IProject project = resource.getProject();\n if (project != null) {\n try {\n return project.hasNature(natureId);\n } catch (CoreException e) {\n CloudFoundryPlugin.log(e);\n }\n }\n }\n return false;\n}\n"
"public void addTabsChromeListener(TabsChromeListener listener) {\n if (!this.tabsChromeListeners.contains(listener)) {\n this.tabsChromeListeners.add(listener);\n }\n}\n"
"public Object getValue() {\n if (!column.getOrigin().isDelegate()) {\n System.out.println(\"String_Node_Str\" + column.getOrigin());\n System.out.println(\"String_Node_Str\" + column.getOrigin().isDelegate());\n System.out.println();\n return value;\n else {\n Object delegateIdValue = row.getDelegateIdValue();\n PropertiesColumn propertiesColumn = column.getOrigin().getPropertiesColumn();\n AttributeValueDelegateProvider attributeValueDelegateProvider = PropertyColumnToAttributeValueDelegateProviderMapper.getInstance().get(propertiesColumn);\n if (row.attributeTable.isEdgeTable())\n return attributeValueDelegateProvider.getEdgeValue(column, delegateIdValue);\n else if (row.attributeTable.isNodeTable())\n return attributeValueDelegateProvider.getNodeValue(column, delegateIdValue);\n else\n throw new AssertionError();\n }\n}\n"
"public void suppressedLog(boolean remoteLog) {\n boolean firstSuppressed = (suppressedLocalLogCount.get() + suppressedRemoteLogCount.get() == 0);\n if (remoteLog) {\n suppressedRemoteLogCount.incrementAndGet();\n } else {\n suppressedLocalLogCount.incrementAndGet();\n }\n if (firstSuppressed) {\n if (logAlarmHandler != null && processName != null) {\n throttleAlarmFM = processName;\n try {\n logAlarmHandler.raiseAlarm(throttleAlarmFF, throttleAlarmFM, throttleAlarmFC);\n m_internalLogger.fine(\"String_Node_Str\");\n } catch (AcsJCouldntPerformActionEx ex) {\n m_internalLogger.severe(\"String_Node_Str\");\n }\n } else {\n m_internalLogger.warning(\"String_Node_Str\");\n }\n }\n}\n"
"public Type getResultType(Validator validator, Exp[] args) {\n if (args.length == 0) {\n Dimension defaultTimeDimension = validator.getQuery().getCube().getTimeDimension();\n if (defaultTimeDimension == null) {\n throw MondrianResource.instance().NoTimeDimensionInCube.ex(getName());\n }\n Hierarchy hierarchy = defaultTimeDimension.getHierarchy();\n return new SetType(MemberType.forHierarchy(hierarchy));\n }\n final Type type = args[0].getType();\n if (type.getDimension() == null || type.getDimension().getDimensionType() != mondrian.olap.DimensionType.TimeDimension) {\n throw MondrianResource.instance().TimeArgNeeded.ex(getName());\n }\n return super.getResultType(validator, args);\n}\n"
"private void testDimensionIterator(IDocumentManager documentManager) throws IOException, BirtException, DataException {\n Dimension dimension = createDimension(documentManager);\n ILevel[] level = dimension.getHierarchy().getLevels();\n ISelection[][] filter = new ISelection[1][1];\n filter[0][0] = SelectionFactory.createRangeSelection(new Object[] { new Integer(1) }, new Object[] { new Integer(2) }, true, false);\n Level[] findLevel = new Level[1];\n findLevel[0] = (Level) level[1];\n IDiskArray positionArray = dimension.find(findLevel, filter);\n assertEquals(positionArray.size(), 4);\n DimensionResultIterator dimesionResultSet = new DimensionResultIterator(dimension, positionArray, new StopSign());\n dimLevel11 = new DimLevel(dimension.getName(), \"String_Node_Str\");\n dimLevel12 = new DimLevel(dimension.getName(), \"String_Node_Str\");\n assertEquals(dimesionResultSet.getLevelIndex(dimLevel12.getLevelName()), 1);\n assertEquals(dimesionResultSet.getLevelIndex(dimLevel11.getLevelName()), 0);\n assertEquals(dimesionResultSet.getLevelKeyDataType(dimLevel12.getLevelName())[0], DataType.INTEGER_TYPE);\n assertEquals(dimesionResultSet.getLevelKeyDataType(dimLevel11.getLevelName())[0], DataType.INTEGER_TYPE);\n assertEquals(dimesionResultSet.length(), 4);\n dimesionResultSet.seek(0);\n assertEquals(dimesionResultSet.getLevelKeyValue(0)[0], new Integer(1));\n assertEquals(dimesionResultSet.getLevelKeyValue(1)[0], new Integer(1));\n assertEquals(dimesionResultSet.getLevelKeyValue(2)[0], new Integer(1));\n dimesionResultSet.seek(1);\n assertEquals(dimesionResultSet.getLevelKeyValue(0)[0], new Integer(1));\n assertEquals(dimesionResultSet.getLevelKeyValue(1)[0], new Integer(1));\n assertEquals(dimesionResultSet.getLevelKeyValue(2)[0], new Integer(2));\n dimesionResultSet.seek(2);\n assertEquals(dimesionResultSet.getLevelKeyValue(0)[0], new Integer(2));\n assertEquals(dimesionResultSet.getLevelKeyValue(1)[0], new Integer(1));\n assertEquals(dimesionResultSet.getLevelKeyValue(2)[0], new Integer(5));\n dimesionResultSet.seek(3);\n assertEquals(dimesionResultSet.getLevelKeyValue(0)[0], new Integer(2));\n assertEquals(dimesionResultSet.getLevelKeyValue(1)[0], new Integer(1));\n assertEquals(dimesionResultSet.getLevelKeyValue(2)[0], new Integer(6));\n}\n"
"public boolean execute() {\n try {\n DQStructureManager manager = DQStructureManager.getInstance();\n IFolder createNewFoler = manager.createNewReadOnlyFolder(ResourceManager.getLibrariesFolder(), DQStructureManager.EXCHANGE);\n TdqPropertieManager.getInstance().addFolderProperties(createNewFoler, DQStructureManager.FOLDER_CLASSIFY_KEY, DQStructureManager.EXCHANGE_FOLDER_PROPERTY);\n } catch (Exception e) {\n ExceptionHandler.process(e);\n return false;\n }\n return true;\n}\n"
"public void onBrowserEvent(Event event) {\n super.onBrowserEvent(event);\n if (DOM.eventGetType(event) == Event.ONCLICK && impl.handleAsClick(event)) {\n History.newItem(getTargetHistoryToken());\n DOM.eventPreventDefault(event);\n }\n}\n"
"public <T extends Comparable<T>> int binarySearch(T[] ts, int start, int end, T t) {\n return Collections.binarySearch(Arrays.asList(ts).subList(start, end), t, RolapUtil.ROLAP_COMPARATOR);\n}\n"
"public Set<ItemReferenceBean> checkItemReferenceBeans(IProxyRepositoryFactory factory, DeleteActionCache deleteActionCache, IRepositoryViewObject object) {\n Item nodeItem = object.getProperty().getItem();\n boolean needCheckJobIfUsedInProcess = false;\n if (nodeItem instanceof ProcessItem) {\n needCheckJobIfUsedInProcess = true;\n }\n Set<ItemReferenceBean> list = new HashSet<ItemReferenceBean>();\n if (needCheckJobIfUsedInProcess) {\n Property property = object.getProperty();\n if (property != null) {\n String label = property.getLabel();\n String version = property.getVersion();\n ERepositoryObjectType type = object.getRepositoryObjectType();\n boolean isItemDeleted = factory.getStatus(object) == ERepositoryStatus.DELETED;\n Item item = property.getItem();\n if (!(item instanceof ProcessItem)) {\n return list;\n }\n EList<?> nodesList = null;\n Set<Project> refParentProjects = new HashSet<Project>();\n try {\n refParentProjects.add(ProjectManager.getInstance().getCurrentProject());\n refParentProjects.addAll(ProjectManager.getInstance().getReferencedProjects());\n for (Project refP : refParentProjects) {\n List<IRepositoryViewObject> processes = factory.getAll(refP, ERepositoryObjectType.PROCESS, true);\n deleteActionCache.setProcessList(processes);\n for (IRepositoryViewObject process : deleteActionCache.getProcessList()) {\n Property property2 = process.getProperty();\n boolean isDelete = factory.getStatus(process) == ERepositoryStatus.DELETED;\n Item item2 = property2.getItem();\n if (item == item2) {\n continue;\n }\n if (!isOpenedItem(item2, deleteActionCache.getOpenProcessMap())) {\n if (item2 instanceof ProcessItem) {\n nodesList = ((ProcessItem) item2).getProcess().getNode();\n }\n }\n if (nodesList != null) {\n for (Object object2 : nodesList) {\n if (object2 instanceof NodeType) {\n NodeType nodeType = (NodeType) object2;\n boolean equals = false;\n if (\"String_Node_Str\".equals(nodeType.getComponentName())) {\n for (Object obj : nodeType.getElementParameter()) {\n if (obj != null && obj instanceof ElementParameterType) {\n ElementParameterType param = (ElementParameterType) obj;\n if (\"String_Node_Str\".equals(param.getName())) {\n if (isUseDynamicJob) {\n String[] jobIDs = param.getValue().split(\"String_Node_Str\");\n for (String jobID : jobIDs) {\n if (property.getId().equals(jobID)) {\n equals = true;\n break;\n }\n }\n } else if (property.getId().equals(param.getValue())) {\n equals = true;\n }\n }\n }\n }\n }\n if (equals) {\n String path = item2.getState().getPath();\n boolean found = false;\n ItemReferenceBean bean = new ItemReferenceBean();\n bean.setItemName(label);\n bean.setItemVersion(version);\n bean.setItemType(type);\n bean.setItemDeleted(isItemDeleted);\n bean.setReferenceItemName(property2.getLabel());\n bean.setReferenceItemVersion(property2.getVersion());\n bean.setReferenceItemType(process.getRepositoryObjectType());\n bean.setReferenceItemPath(path);\n bean.setReferenceProjectName(refP.getLabel());\n bean.setReferenceItemDeleted(isDelete);\n for (ItemReferenceBean b : list) {\n if (b.equals(bean)) {\n found = true;\n b.addNodeNum();\n break;\n }\n }\n if (!found) {\n list.add(bean);\n }\n }\n }\n }\n }\n }\n for (IProcess2 openedProcess : deleteActionCache.getOpenedProcessList()) {\n for (INode node : openedProcess.getGraphicalNodes()) {\n boolean equals = false;\n IElementParameter processTypeParam = node.getElementParameter(PROCESS_TYPE_PROCESS);\n if (processTypeParam != null && property.getId().equals(processTypeParam.getValue())) {\n equals = true;\n }\n boolean isDelete = factory.getStatus(openedProcess) == ERepositoryStatus.DELETED;\n Property property2 = openedProcess.getProperty();\n Item item2 = property2.getItem();\n String path = item2.getState().getPath();\n if (equals) {\n boolean found = false;\n ItemReferenceBean bean = new ItemReferenceBean();\n bean.setItemName(label);\n bean.setItemVersion(version);\n bean.setItemType(type);\n bean.setItemDeleted(isItemDeleted);\n bean.setReferenceItemName(property2.getLabel());\n bean.setReferenceItemVersion(property2.getVersion());\n bean.setReferenceItemType(ERepositoryObjectType.getItemType(item2));\n bean.setReferenceItemPath(path);\n bean.setReferenceProjectName(refP.getLabel());\n bean.setReferenceItemDeleted(isDelete);\n for (ItemReferenceBean b : list) {\n if (b.equals(bean)) {\n found = true;\n b.addNodeNum();\n break;\n }\n }\n if (!found) {\n list.add(bean);\n }\n }\n }\n }\n }\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n }\n }\n }\n Iterator<ItemReferenceBean> it = list.iterator();\n while (it.hasNext()) {\n ItemReferenceBean bean = it.next();\n if ((!bean.isItemDeleted() && bean.isReferenceItemDeleted()) || (bean.isItemDeleted() && bean.isReferenceItemDeleted() && isItemInDeleteList(bean, true)) || (!bean.isItemDeleted() && !bean.isReferenceItemDeleted() && isItemInDeleteList(bean, true))) {\n it.remove();\n }\n }\n return list;\n}\n"
"public JsonNode apply(final JsonNode tree) {\n if (tree == null) {\n return null;\n }\n final JsonNode temp = tree.get(\"String_Node_Str\");\n if (temp == null) {\n return null;\n }\n for (final JsonNode mastery : temp) {\n final JsonNode idNode = mastery.get(\"String_Node_Str\");\n final String masteryName = mastery.get(\"String_Node_Str\").asText();\n if (id != null && idNode != null && id.intValue() == idNode.asInt() || name != null && name.equals(masteryName)) {\n INCLUDED_DATA_PROCESSOR.apply(mastery);\n return mastery;\n }\n }\n return null;\n}\n"
"public void prepareRun(BatchSinkContext context) throws Exception {\n Map<String, String> arguments = new HashMap<>();\n FileSetArguments.setOutputPath(arguments, Constants.Connector.DATA_DIR + \"String_Node_Str\" + phaseName);\n context.addOutput(Output.ofDataset(datasetName, arguments));\n}\n"
"private CSSExpressionMemberMathProduct _createExpressionMathProduct(final CSSNode aNode) {\n _expectNodeType(aNode, ECSSNodeType.MATHPRODUCT);\n final CSSExpressionMemberMathProduct ret = new CSSExpressionMemberMathProduct();\n ret.setSourceLocation(aNode.getSourceLocation());\n for (final CSSNode aChildNode : aNode) {\n if (ECSSNodeType.MATHUNIT.isNode(aChildNode, m_eVersion)) {\n final int nChildCount = aChildNode.jjtGetNumChildren();\n if (nChildCount == 0) {\n final CSSExpressionMemberMathUnitSimple aMember = new CSSExpressionMemberMathUnitSimple(aChildNode.getText());\n aMember.setSourceLocation(aChildNode.getSourceLocation());\n ret.addMember(aMember);\n } else if (nChildCount == 1 && ECSSNodeType.FUNCTION.isNode(aChildNode.jjtGetChild(0), m_eVersion)) {\n ret.addMember(_createExpressionFunction(aChildNode.jjtGetChild(0)));\n } else {\n if ((nChildCount % 2) == 0)\n _throwUnexpectedChildrenCount(aChildNode, \"String_Node_Str\" + nChildCount);\n final CSSExpressionMemberMathProduct aNestedProduct = new CSSExpressionMemberMathProduct();\n for (int i = 0; i < nChildCount; ++i) {\n final CSSNode aChildChildNode = aChildNode.jjtGetChild(i);\n if (ECSSNodeType.MATHPRODUCT.isNode(aChildChildNode, m_eVersion)) {\n aNestedProduct.addMember(_createExpressionMathProduct(aChildChildNode));\n } else if (ECSSNodeType.MATHSUMOPERATOR.isNode(aChildChildNode, m_eVersion)) {\n final String sText = aChildChildNode.getText();\n final ECSSMathOperator eMathOp = ECSSMathOperator.getFromNameOrNull(sText);\n if (eMathOp == null)\n s_aLogger.error(\"String_Node_Str\" + sText + \"String_Node_Str\");\n else\n aNestedProduct.addMember(eMathOp);\n } else\n s_aLogger.error(\"String_Node_Str\" + ECSSNodeType.getNodeName(aChildNode, m_eVersion) + \"String_Node_Str\" + ECSSNodeType.getNodeName(aChildChildNode, m_eVersion));\n }\n ret.addMember(new CSSExpressionMemberMathUnitProduct(aNestedProduct));\n }\n } else if (ECSSNodeType.MATHPRODUCTOPERATOR.isNode(aChildNode, m_eVersion)) {\n final String sText = aChildNode.getText();\n final ECSSMathOperator eMathOp = ECSSMathOperator.getFromNameOrNull(sText);\n if (eMathOp == null)\n s_aLogger.error(\"String_Node_Str\" + sText + \"String_Node_Str\");\n else\n ret.addMember(eMathOp);\n } else\n s_aLogger.error(\"String_Node_Str\" + ECSSNodeType.getNodeName(aNode, m_eVersion) + \"String_Node_Str\" + ECSSNodeType.getNodeName(aChildNode, m_eVersion));\n }\n return ret;\n}\n"
"public void onVisitorGetDamage(EntityDamageEvent e) {\n if (!Settings.invincibleVisitors || !(e.getEntity() instanceof Player) || !e.getCause().equals(DamageCause.ENTITY_ATTACK)) {\n return;\n }\n if (Settings.visitorDamagePrevention.contains(e.getCause()))\n e.setCancelled(true);\n if (e.getCause().equals(DamageCause.VOID)) {\n if (plugin.getPlayers().hasIsland(p.getUniqueId()) || plugin.getPlayers().inTeam(p.getUniqueId())) {\n Location safePlace = plugin.getGrid().getSafeHomeLocation(p.getUniqueId(), 1);\n if (safePlace != null) {\n unsetFalling(p.getUniqueId());\n p.teleport(safePlace);\n p.setFallDistance(0);\n e.setCancelled(true);\n return;\n }\n }\n if (plugin.getGrid().getSpawn() != null) {\n p.teleport(plugin.getGrid().getSpawnPoint());\n p.setFallDistance(0);\n e.setCancelled(true);\n return;\n } else if (!p.performCommand(\"String_Node_Str\")) {\n return;\n } else {\n p.setFallDistance(0);\n e.setCancelled(true);\n }\n }\n}\n"
"public void computeData(Graph g, Network n, Hashtable<String, Metric> m) {\n this.timer = new Timer();\n boolean onlyOut = GraphProperties.bidirectional(g) || Config.getBoolean(\"String_Node_Str\");\n this.lcc = this.computeLCC(g.nodes, onlyOut);\n Arrays.sort(this.lcc);\n this.lccShort = this.computeLCCShort(this.lcc);\n this.cc = this.computeCC(this.lcc);\n this.ccw = this.computeCCW(this.lcc, g.nodes);\n this.timer.end();\n}\n"
"public void hookCommandStack(WrapperCommandStack stack) {\n if (stack != null) {\n stack.addCommandStackListener(commandStackListener);\n }\n}\n"
"public boolean saveModifiedResources() {\n EMFUtil util = EMFUtil.getInstance();\n boolean saveFlag = true;\n Iterator<Resource> iterator = modifiedResources.iterator();\n while (iterator.hasNext()) {\n saveFlag = util.saveSingleResource(iterator.next());\n if (!saveFlag) {\n break;\n }\n }\n return saveFlag;\n}\n"
"public void testTcpSource3() throws InterruptedException {\n log.info(\"String_Node_Str\");\n SiddhiManager siddhiManager = new SiddhiManager();\n String inStreamDefinition = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n String query = (\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(inStreamDefinition + query);\n executionPlanRuntime.addCallback(\"String_Node_Str\", new QueryCallback() {\n public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {\n EventPrinter.print(timeStamp, inEvents, removeEvents);\n eventArrived = true;\n }\n });\n executionPlanRuntime.start();\n TCPNettyClient TCPNettyClient = new TCPNettyClient();\n TCPNettyClient.connect(\"String_Node_Str\", 9892);\n ArrayList<Event> arrayList = new ArrayList<Event>(3);\n arrayList.add(new Event(System.currentTimeMillis(), new Object[] { \"String_Node_Str\", 36, 3.0f, 380l, 23.0, true }));\n arrayList.add(new Event(System.currentTimeMillis(), new Object[] { \"String_Node_Str\", 361, 31.0f, 3801l, 231.0, false }));\n arrayList.add(new Event(System.currentTimeMillis(), new Object[] { \"String_Node_Str\", 362, 32.0f, 3802l, 232.0, true }));\n TCPNettyClient.send(\"String_Node_Str\", arrayList.toArray(new Event[3]));\n TCPNettyClient.disconnect();\n TCPNettyClient.shutdown();\n Thread.sleep(300);\n Assert.assertFalse(eventArrived);\n executionPlanRuntime.shutdown();\n}\n"
"public void setValues(PreparedStatement preparedStatement, int i) throws SQLException {\n preparedStatement.setObject(1, payload.getId());\n preparedStatement.setObject(2, payload.getClients().get(i));\n preparedStatement.setObject(3, payload.getProductId());\n preparedStatement.setObject(4, 0);\n preparedStatement.setObject(5, System.currentTimeMillis() / 1000);\n}\n"
"public User getUser(HttpServletRequest request, HttpServletResponse response) {\n HttpSession session = request.getSession(true);\n User user = (User) session.getAttribute(ATT_USER);\n if (null == user) {\n Cookie cookie = getCookie(request, COOKIE_NAME);\n if (cookie != null) {\n String auth = cookie.getValue();\n if (!authHash.containsKey(auth)) {\n updateAuthHash();\n }\n user = (User) authHash.get(auth);\n if (user != null) {\n user = authenticate(user.getLogin(), user.getPasswd());\n setCookie(request, response, user);\n } else {\n System.err.println(\"String_Node_Str\" + auth);\n }\n }\n if (null == user) {\n String agent = request.getHeader(\"String_Node_Str\");\n System.err.println(\"String_Node_Str\" + agent + \"String_Node_Str\");\n Iterator it = robotIds.keySet().iterator();\n while (agent != null && user == null && it.hasNext()) {\n String key = (String) it.next();\n if (agent.toLowerCase().indexOf(key.toLowerCase()) != -1) {\n user = (User) robots.get(key);\n if (null == user) {\n user = new User(key, key, (String) robotIds.get(key));\n user.setNonUser(true);\n robots.put(key, user);\n }\n }\n }\n if (null == user) {\n user = new User(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n user.setGuest(true);\n }\n removeCookie(request, response);\n }\n session.setAttribute(ATT_USER, user);\n }\n return user;\n}\n"
"private boolean recursiveMove(EntityCoupleableRollingStock parent, int tickOffset) {\n if (this.positions.size() < tickOffset) {\n System.out.println(\"String_Node_Str\" + tickOffset);\n return true;\n }\n TickPos currentPos = this.positions.get(tickOffset - 1);\n TickPos parentPos = parent.positions.get(tickOffset);\n boolean onTrack = !currentPos.isOffTrack;\n if (tickOffset == 1) {\n this.positions = new ArrayList<TickPos>();\n this.positions.add(currentPos);\n }\n CouplerType coupler = this.getCouplerFor(parent);\n CouplerType otherCoupler = parent.getCouplerFor(this);\n if (coupler == null) {\n parent.decouple(this);\n this.decouple(parent);\n this.triggerResimulate();\n System.out.println(\"String_Node_Str\");\n return true;\n }\n if ((!this.isCouplerEngaged(coupler) || !parent.isCouplerEngaged(otherCoupler)) && tickOffset < parent.positions.size() - 1) {\n double prevDist = currentPos.position.distanceTo(parentPos.position);\n double dist = currentPos.position.distanceTo(parent.positions.get(tickOffset + 1).position);\n if (prevDist <= dist) {\n System.out.println(\"String_Node_Str\");\n return true;\n }\n System.out.println(\"String_Node_Str\");\n }\n Vec3d myOffset = this.getCouplerPositionTo(coupler, currentPos, parentPos);\n Vec3d otherOffset = parent.getCouplerPositionTo(otherCoupler, parentPos, currentPos);\n if (otherOffset == null) {\n if (!world.isRemote) {\n ImmersiveRailroading.logger.warn(String.format(\"String_Node_Str\", this.getPersistentID(), parent.getPersistentID()));\n }\n return true;\n }\n double distance = myOffset.distanceTo(otherOffset);\n Vec3d nextPosForward = myOffset.add(VecUtil.fromYaw(distance, currentPos.rotationYaw));\n Vec3d nextPosReverse = myOffset.add(VecUtil.fromYaw(-distance, currentPos.rotationYaw));\n if (otherOffset.distanceTo(nextPosForward) > otherOffset.distanceTo(nextPosReverse)) {\n distance = -distance;\n }\n TickPos nextPos = this.moveRollingStock(distance, currentPos.tickID);\n this.positions.add(nextPos);\n if (nextPos.isOffTrack) {\n onTrack = false;\n }\n if (nextPos.speed.metric() != 0) {\n ChunkManager.flagEntityPos(this.world, new BlockPos(nextPos.position));\n for (CouplerType toChunk : CouplerType.values()) {\n ChunkManager.flagEntityPos(this.world, new BlockPos(this.getCouplerPosition(toChunk, nextPos)));\n }\n }\n for (CouplerType nextCoupler : CouplerType.values()) {\n EntityCoupleableRollingStock coupled = this.getCoupled(nextCoupler);\n if (coupled == null || coupled == parent) {\n continue;\n }\n onTrack = coupled.recursiveMove(this, tickOffset) ? onTrack : false;\n }\n return onTrack;\n}\n"