content
stringlengths
40
137k
"public void testParseLargeFile() throws Exception {\n Path p = new Path(JsonLexerTest.class.getResource(\"String_Node_Str\").getPath());\n long l = Files.length(p);\n long fd = Files.openRO(p);\n JsonListener listener = new NoOpListener();\n try {\n long buf = Unsafe.malloc(l);\n try {\n Assert.assertEquals(l, Files.read(fd, buf, (int) l, 0));\n JsonLexer lexer = new JsonLexer(1024);\n long t = System.nanoTime();\n for (int i = 0; i < l; i++) {\n try {\n lexer.clear();\n lexer.parse(buf, i, listener);\n lexer.parse(buf + i, l - i, listener);\n lexer.parseLast();\n } catch (JsonException e) {\n System.out.println(i);\n throw e;\n }\n }\n System.out.println((System.nanoTime() - t) / l);\n } finally {\n Unsafe.free(buf, l);\n }\n } finally {\n Files.close(fd);\n }\n}\n"
"public AbstractPipelineOutput execute(final AbstractPipelineInput input) throws DITAOTException {\n if (logger == null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n final File maplinksFile = new File(input.getAttribute(ANT_INVOKER_PARAM_MAPLINKS));\n final MapLinksReader indexReader = new MapLinksReader();\n indexReader.setLogger(logger);\n indexReader.setMatch(new StringBuffer(ELEMENT_NAME_MAPLINKS).append(SLASH).append(TOPIC_LINKPOOL.localName).append(SLASH).append(TOPIC_LINKLIST.localName).toString());\n indexReader.read(maplinksFile.getAbsolutePath());\n final Map<String, Map<String, String>> mapSet = indexReader.getMapping();\n final DitaLinksWriter indexInserter = new DitaLinksWriter();\n indexInserter.setLogger(logger);\n for (final Map.Entry<String, Map<String, String>> entry : mapSet.entrySet()) {\n logger.logInfo(\"String_Node_Str\" + entry.getKey());\n final ContentImpl content = new ContentImpl();\n content.setValue(entry.getValue());\n indexInserter.setContent(content);\n indexInserter.write(entry.getKey());\n }\n return null;\n}\n"
"protected void initializeConversions(Class enumClass) {\n if (getFieldToAttributeValues().isEmpty()) {\n EnumSet theEnums = EnumSet.allOf(enumClass);\n Iterator<Enum> i = theEnums.iterator();\n while (i.hasNext()) {\n Enum theEnum = i.next();\n if (m_useOrdinalValues) {\n addConversionValue(theEnum.ordinal(), theEnum.name());\n } else {\n addConversionValue(theEnum.name(), theEnum.name());\n }\n }\n }\n}\n"
"public void onConnect() {\n System.out.println(\"String_Node_Str\");\n mMeteor.registerAndLogin(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", new ResultListener() {\n public void onSuccess(String result) {\n System.out.println(\"String_Node_Str\" + result);\n }\n public void onError(String error, String reason, String details) {\n System.out.println(\"String_Node_Str\" + error + \"String_Node_Str\" + reason + \"String_Node_Str\" + details);\n }\n });\n mMeteor.loginWithUsername(\"String_Node_Str\", \"String_Node_Str\", new ResultListener() {\n public void onSuccess(String result) {\n System.out.println(\"String_Node_Str\" + result);\n }\n public void onError(String error, String reason, String details) {\n System.out.println(\"String_Node_Str\" + error + \"String_Node_Str\" + reason + \"String_Node_Str\" + details);\n }\n });\n String subscriptionId = mMeteor.subscribe(\"String_Node_Str\");\n mMeteor.unsubscribe(subscriptionId);\n Map<String, Object> insertValues = new HashMap<String, Object>();\n insertValues.put(\"String_Node_Str\", \"String_Node_Str\");\n insertValues.put(\"String_Node_Str\", 3);\n mMeteor.insert(\"String_Node_Str\", insertValues);\n Map<String, Object> updateQuery = new HashMap<String, Object>();\n updateQuery.put(\"String_Node_Str\", \"String_Node_Str\");\n Map<String, Object> updateValues = new HashMap<String, Object>();\n updateValues.put(\"String_Node_Str\", \"String_Node_Str\");\n updateValues.put(\"String_Node_Str\", 5);\n mMeteor.update(\"String_Node_Str\", updateQuery, updateValues);\n mMeteor.remove(\"String_Node_Str\", \"String_Node_Str\");\n mMeteor.call(\"String_Node_Str\");\n}\n"
"public static <K, V extends Comparable<? super V>> SortedSet<Entry<K, V>> sortMapByValueAscending(Map<K, V> map) {\n SortedSet<Entry<K, V>> sorted = new TreeSet<>(new Comparator<Entry<K, V>>() {\n public int compare(Entry<K, V> e1, Entry<K, V> e2) {\n int r = e1.getValue().compareTo(e2.getValue());\n return r == 0 ? 1 : r;\n }\n });\n for (Entry<K, V> entry : map.entrySet()) sorted.add(new SimpleEntry(entry));\n return sorted;\n}\n"
"public void execute() {\n setParallelization(this.node);\n if (!isExistParalInSubjob(existParallelMap, node.getProcessStartNode(false))) {\n MessageDialog.openInformation(new Shell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"));\n }\n}\n"
"private CoordinateOperation search(final CoordinateReferenceSystem sourceCRS, final CoordinateReferenceSystem targetCRS) throws IllegalArgumentException, IncommensurableException, FactoryException {\n final List<String> sources = findCode(sourceCRS);\n if (sources.isEmpty())\n return null;\n }\n final String targetID = findCode(targetCRS);\n if (targetID == null) {\n return null;\n }\n if (sourceID.equals(targetID)) {\n return null;\n }\n final boolean inverse;\n Collection<CoordinateOperation> operations;\n boolean mdOnly = Semaphores.queryAndSet(Semaphores.METADATA_ONLY);\n try {\n try {\n operations = registry.createFromCoordinateReferenceSystemCodes(sourceID, targetID);\n inverse = Containers.isNullOrEmpty(operations);\n if (inverse) {\n operations = registry.createFromCoordinateReferenceSystemCodes(targetID, sourceID);\n if (Containers.isNullOrEmpty(operations)) {\n return null;\n }\n }\n } finally {\n if (!mdOnly) {\n Semaphores.clear(Semaphores.METADATA_ONLY);\n }\n }\n } catch (NoSuchAuthorityCodeException | MissingFactoryResourceException e) {\n log(null, e);\n return null;\n }\n CoordinateOperation bestChoice;\n while (true) {\n bestChoice = null;\n double largestArea = 0;\n double finestAccuracy = Double.POSITIVE_INFINITY;\n boolean stopAtFirstDeprecated = false;\n for (final Iterator<CoordinateOperation> it = operations.iterator(); ; ) {\n CoordinateOperation candidate;\n mdOnly = Semaphores.queryAndSet(Semaphores.METADATA_ONLY);\n try {\n try {\n if (!it.hasNext())\n break;\n candidate = it.next();\n } finally {\n if (!mdOnly) {\n Semaphores.clear(Semaphores.METADATA_ONLY);\n }\n }\n } catch (BackingStoreException exception) {\n throw exception.unwrapOrRethrow(FactoryException.class);\n }\n if (candidate != null) {\n final boolean isDeprecated = (candidate instanceof Deprecable) && ((Deprecable) candidate).isDeprecated();\n if (isDeprecated && stopAtFirstDeprecated) {\n break;\n }\n final double area = Extents.area(Extents.intersection(Extents.getGeographicBoundingBox(areaOfInterest), Extents.getGeographicBoundingBox(candidate.getDomainOfValidity())));\n if (bestChoice == null || area >= largestArea) {\n final double accuracy = CRS.getLinearAccuracy(candidate);\n if (bestChoice == null || area != largestArea || accuracy < finestAccuracy) {\n bestChoice = candidate;\n if (!Double.isNaN(area)) {\n largestArea = area;\n }\n finestAccuracy = Double.isNaN(accuracy) ? Double.POSITIVE_INFINITY : accuracy;\n stopAtFirstDeprecated = !isDeprecated;\n }\n }\n }\n }\n if (bestChoice == null)\n break;\n final CoordinateOperation deferred = bestChoice;\n try {\n if (bestChoice instanceof DeferredCoordinateOperation) {\n bestChoice = ((DeferredCoordinateOperation) bestChoice).create();\n }\n if (bestChoice instanceof SingleOperation && bestChoice.getMathTransform() == null) {\n bestChoice = fromDefiningConversion((SingleOperation) bestChoice, inverse ? targetCRS : sourceCRS, inverse ? sourceCRS : targetCRS);\n if (bestChoice == null) {\n return null;\n }\n }\n if (inverse) {\n bestChoice = inverse(bestChoice);\n }\n } catch (NoninvertibleTransformException | MissingFactoryResourceException e) {\n boolean removed;\n try {\n removed = operations.remove(deferred);\n } catch (UnsupportedOperationException ignored) {\n operations = new ArrayList<>(operations);\n removed = operations.remove(deferred);\n }\n if (removed) {\n log(null, e);\n continue;\n }\n throw (e instanceof FactoryException) ? (FactoryException) e : new FactoryException(e);\n }\n bestChoice = complete(bestChoice, sourceCRS, targetCRS);\n if (filter(bestChoice))\n break;\n }\n return bestChoice;\n}\n"
"public SparseVector addInPlace(Vector vector) {\n checkVectorSize(vector);\n if (vector.type() != VectorType.SPARSE) {\n for (int i = 0; i < size; i++) {\n this.set(i, this.get(i) + vector.get(i));\n }\n } else {\n List<Integer> keysUnion = new ArrayList<>(hashMap.keySet());\n keysUnion.addAll(((SparseVector) vector).hashMap.keySet());\n for (int key : keysUnion) {\n this.set(key, this.get(key) + vector.get(key));\n }\n }\n return this;\n}\n"
"public void generate() {\n final Rule startRule = rules.getStartRule();\n Object generatedStartRuleType = new Object() {\n public String toString() {\n return \"String_Node_Str\";\n }\n };\n Rule newStartRule = new Rule(generatedStartRuleType, new Object[] { startRule.getType() }) {\n public Object match(Object[] types, Object[] args) {\n if (types.length == 1 && types[0] == startRule.getType()) {\n return args[0];\n }\n throw badTypeList();\n }\n };\n rules.addStartRule(newStartRule);\n LALRItemSet initialSet = new LALRItemSet();\n int productionCount = startRule.getProductions().length;\n for (int i = 0; i < productionCount; i++) {\n LALRItem startItem = new LALRItem(startRule, i, 0);\n startItem.addLookahead(null);\n initialSet.addKernelItem(startItem);\n }\n initialSet.calculateClosureItems(rules);\n Map<LALRItemSet, LALRItemSet> itemSets = new HashMap<LALRItemSet, LALRItemSet>();\n itemSets.put(initialSet, initialSet);\n Deque<LALRItemSet> stack = new LinkedList<LALRItemSet>();\n stack.add(initialSet);\n Map<LALRItemSet, Map<Object, LALRItemSet>> transitions = new HashMap<LALRItemSet, Map<Object, LALRItemSet>>();\n while (!stack.isEmpty()) {\n LALRItemSet set = stack.pop();\n Map<Object, LALRItemSet> setTransitions = findTransitions(set);\n for (Entry<Object, LALRItemSet> transition : setTransitions.entrySet()) {\n LALRItemSet transitionSet = transition.getValue();\n transitionSet.calculateClosureItems(rules);\n LALRItemSet existingSet = itemSets.get(transitionSet);\n if (existingSet == null) {\n itemSets.put(transitionSet, transitionSet);\n stack.add(transitionSet);\n continue;\n }\n if (existingSet.containsLookaheads(transitionSet)) {\n continue;\n }\n existingSet.combineLookaheads(transitionSet);\n existingSet.calculateClosureItems(rules);\n transition.setValue(existingSet);\n stack.add(existingSet);\n }\n transitions.put(set, setTransitions);\n }\n startState = generateStates(initialSet, transitions, itemSets.keySet());\n}\n"
"public SQLEditor openInSqlEditor(TdDataProvider tdDataProvider, String query, String editorName) {\n if (editorName == null) {\n editorName = String.valueOf(SQLExplorerPlugin.getDefault().getEditorSerialNo());\n }\n SQLExplorerPlugin sqlPlugin = SQLExplorerPlugin.getDefault();\n AliasManager aliasManager = sqlPlugin.getAliasManager();\n Alias alias = aliasManager.getAlias(tdDataProvider.getName());\n if (alias == null) {\n List<TdDataProvider> allDataProviders = PrvResourceFileHelper.getInstance().getAllDataProviders(ResourceManager.getMetadataFolder());\n for (TdDataProvider dataProvider : allDataProviders) {\n if (dataProvider == tdDataProvider) {\n addConnetionAliasToSQLPlugin(dataProvider);\n openInSqlEditor(tdDataProvider, query, editorName);\n }\n }\n } else {\n try {\n TdProviderConnection connection = DataProviderHelper.getTdProviderConnection(tdDataProvider).getObject();\n if (connection != null) {\n String userName = DataProviderHelper.getUser(connection);\n SQLEditorInput input = new SQLEditorInput(\"String_Node_Str\" + alias.getName() + \"String_Node_Str\" + editorName + \"String_Node_Str\");\n input.setUser(alias.getUser(userName));\n IWorkbenchPage page = SQLExplorerPlugin.getDefault().getActivePage();\n SQLEditor editorPart = (SQLEditor) page.openEditor((IEditorInput) input, SQLEditor.class.getName());\n editorPart.setText(query);\n return editorPart;\n }\n } catch (PartInitException e) {\n log.error(e, e);\n }\n }\n return null;\n}\n"
"public void onNext(Object o) {\n if (operationCode != 99) {\n showResultImage(true, false);\n } else {\n CallOverall callOverall = (CallOverall) o;\n callSession = callOverall.getOcs().getData().getSessionId();\n initiateCall(false);\n }\n}\n"
"private void applyZoomAndAbsolutePan(float newZoom, float deltaX, float deltaY, boolean allowOverScroll, boolean allowOverPinch) {\n mMatrix.preTranslate(deltaX, deltaY);\n mMatrix.mapRect(mContentRect, mContentBaseRect);\n newZoom = ensureScaleBounds(newZoom, allowOverPinch);\n float scaleFactor = newZoom / mZoom;\n mMatrix.postScale(scaleFactor, scaleFactor, mContentRect.left, mContentRect.top);\n mMatrix.mapRect(mContentRect, mContentBaseRect);\n mZoom = newZoom;\n ensureCurrentTranslationBounds(allowOverScroll);\n dispatchOnMatrix();\n}\n"
"protected ClientRequest doWork(ClientRequest clientRequest) {\n Optional<String> requestId = Optional.fromNullable(MDC.get(RequestTrackerConstants.DEFAULT_MDC_KEY));\n clientRequest.getHeaders().add(header, requestId.or(ID_SUPPLIER));\n return clientRequest;\n}\n"
"protected void readColumns(DatabaseSnapshot snapshot, String schema, DatabaseMetaData databaseMetaData) throws SQLException, DatabaseException {\n Database database = snapshot.getDatabase();\n updateListeners(\"String_Node_Str\" + database.toString() + \"String_Node_Str\");\n Statement selectStatement = null;\n ResultSet rs = null;\n try {\n selectStatement = ((JdbcConnection) database.getConnection()).getUnderlyingConnection().createStatement();\n rs = databaseMetaData.getColumns(database.convertRequestedSchemaToCatalog(schema), database.convertRequestedSchemaToSchema(schema), null, null);\n while (rs.next()) {\n Column column = readColumn(rs, database);\n if (column == null) {\n continue;\n }\n Table tempTable = column.getTable();\n column.setTable(null);\n Table table;\n if (database.isLiquibaseTable(tempTable.getName())) {\n if (tempTable.getName().equalsIgnoreCase(database.getDatabaseChangeLogTableName())) {\n table = snapshot.getDatabaseChangeLogTable();\n } else if (tempTable.getName().equalsIgnoreCase(database.getDatabaseChangeLogLockTableName())) {\n table = snapshot.getDatabaseChangeLogLockTable();\n } else {\n throw new UnexpectedLiquibaseException(\"String_Node_Str\" + tempTable.getName());\n }\n } else {\n throw new UnexpectedLiquibaseException(\"String_Node_Str\" + tempTable.getName());\n }\n } else {\n table = snapshot.getTable(tempTable.getName());\n }\n if (table == null) {\n View view = snapshot.getView(tempTable.getName());\n if (view == null) {\n LogFactory.getLogger().debug(\"String_Node_Str\" + tempTable.getName() + \"String_Node_Str\" + column.getName());\n continue;\n } else {\n column.setView(view);\n column.setAutoIncrement(false);\n view.getColumns().add(column);\n }\n } else {\n column.setTable(table);\n column.setAutoIncrement(isColumnAutoIncrement(database, table.getSchema(), table.getName(), column.getName()));\n table.getColumns().add(column);\n }\n column.setPrimaryKey(snapshot.isPrimaryKey(column));\n }\n rs.close();\n selectStatement.close();\n}\n"
"private static boolean inBetweenDates(String ddy, String ddm, String ddd, String stDate, String endDate) {\n if (ddd.length() == 1)\n ddd = \"String_Node_Str\" + ddd;\n if (ddm.length() == 1)\n ddm = \"String_Node_Str\" + ddm;\n String dirDate = ddy + ddm + ddd;\n int dDate = Integer.parseInt(dirDate);\n int sDate = Integer.parseInt(stDate);\n int eDate = Integer.parseInt(endDate);\n return (sDate <= dDate) && (dDate <= eDate);\n}\n"
"private void validateMethod(final VjoValidationCtx ctx, final JstMethod jstMethod) {\n final List<JstArg> parameters = jstMethod.getArgs();\n if (parameters != null && parameters.size() > 0) {\n for (int it = 0, len = parameters.size(); it < len; it++) {\n final JstArg argument = parameters.get(it);\n if (it < len - 1 && argument.isVariable()) {\n }\n for (IJstType argType : argument.getTypes()) {\n if (TypeCheckUtil.isVoid(argType)) {\n final BaseVjoSemanticRuleCtx ruleCtx = new BaseVjoSemanticRuleCtx(argument, ctx.getGroupId(), new String[] { argument.getName(), jstMethod.getName().getName() });\n satisfyRule(ctx, VjoSemanticRuleRepo.getInstance().METHOD_ARGS_TYPE_SHOULD_NOT_BE_VOID, ruleCtx);\n }\n if (argType instanceof JstMixedType) {\n JstMixedType mixedType = (JstMixedType) argType;\n for (IJstType type : mixedType.getMixedTypes()) {\n if (getKnownType(ctx, jstMethod.getOwnerType(), type) == null) {\n if (!ctx.getMissingImportTypes().contains(type)) {\n ctx.addMissingImportType(type);\n }\n final BaseVjoSemanticRuleCtx ruleCtx = new BaseVjoSemanticRuleCtx(argument, ctx.getGroupId(), new String[] { type.getName() });\n satisfyRule(ctx, VjoSemanticRuleRepo.getInstance().UNKNOWN_TYPE_MISSING_IMPORT, ruleCtx);\n }\n }\n } else if (getKnownType(ctx, jstMethod.getOwnerType(), argType) == null) {\n if (!ctx.getMissingImportTypes().contains(argType)) {\n ctx.addMissingImportType(argType);\n }\n final BaseVjoSemanticRuleCtx ruleCtx = new BaseVjoSemanticRuleCtx(argument, ctx.getGroupId(), new String[] { argType.getName() });\n satisfyRule(ctx, VjoSemanticRuleRepo.getInstance().UNKNOWN_TYPE_MISSING_IMPORT, ruleCtx);\n } else if (argType != null && argType instanceof JstTypeWithArgs) {\n validateJstWithArgs(jstMethod.getOwnerType(), argument, argument.getName(), ctx, (JstTypeWithArgs) argType);\n }\n }\n final List<IJstNode> scopedVars = ctx.getMethodControlFlowTable().lookUpScopedVars(jstMethod);\n final String lhsName = argument.getName();\n if (lhsName != null) {\n boolean addScopedVar = true;\n for (IJstNode scopedVar : scopedVars) {\n if (scopedVar != null) {\n String scopedVarName = null;\n if (scopedVar instanceof JstIdentifier) {\n scopedVarName = ((JstIdentifier) scopedVar).getName();\n } else if (scopedVar instanceof JstVar) {\n scopedVarName = ((JstVar) scopedVar).getName();\n } else if (scopedVar instanceof JstArg) {\n scopedVarName = ((JstArg) scopedVar).getName();\n } else if (scopedVar instanceof JstName) {\n scopedVarName = ((JstName) scopedVar).getName();\n }\n if (lhsName.equals(scopedVarName)) {\n final BaseVjoSemanticRuleCtx ruleCtx = new BaseVjoSemanticRuleCtx(argument, ctx.getGroupId(), new String[] { argument.getName() });\n satisfyRule(ctx, VjoSemanticRuleRepo.getInstance().VARIABLE_ALREADY_DEFINED, ruleCtx);\n addScopedVar = false;\n break;\n }\n }\n }\n if (addScopedVar) {\n ctx.getMethodControlFlowTable().addScopedVar(jstMethod, argument);\n }\n }\n }\n }\n final IJstType rtnType = jstMethod.getRtnType();\n if (rtnType instanceof JstVariantType) {\n validateReturnType(ctx, jstMethod, (JstVariantType) rtnType);\n } else if (rtnType instanceof JstMixedType) {\n validateReturnType(ctx, jstMethod, (JstMixedType) rtnType);\n } else {\n validateReturnType(ctx, jstMethod, rtnType);\n }\n}\n"
"public static void stopServer() {\n org.dragonet.DragonetServer.instance().getServer().savePlayers();\n for (Player plr : org.dragonet.DragonetServer.instance().getServer().getOnlinePlayers()) {\n plr.kickPlayer(msg);\n }\n org.dragonet.DragonetServer.instance().getServer().shutdown();\n}\n"
"void init(RangerServiceDef serviceDef, List<RangerPolicy> policies) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\" + serviceDef + \"String_Node_Str\" + policies.size() + \"String_Node_Str\");\n }\n this.serviceDef = serviceDef;\n contextEnrichers = new ArrayList<RangerContextEnricher>();\n if (!CollectionUtils.isEmpty(serviceDef.getContextEnrichers())) {\n for (RangerServiceDef.RangerContextEnricherDef enricherDef : serviceDef.getContextEnrichers()) {\n if (enricherDef == null) {\n continue;\n }\n RangerContextEnricher contextEnricher = buildContextEnricher(enricherDef);\n contextEnrichers.add(contextEnricher);\n }\n }\n policyEvaluators = new ArrayList<RangerPolicyEvaluatorFacade>();\n for (RangerPolicy policy : policies) {\n if (!policy.getIsEnabled()) {\n continue;\n }\n RangerPolicyEvaluatorFacade evaluator = buildPolicyEvaluator(policy, serviceDef);\n if (evaluator != null) {\n policyEvaluators.add(evaluator);\n }\n }\n Collections.sort(policyEvaluators);\n String propertyName = \"String_Node_Str\" + serviceName + \"String_Node_Str\";\n int auditResultCacheSize = RangerConfiguration.getInstance().getInt(propertyName, RANGER_POLICYENGINE_AUDITRESULT_CACHE_SIZE);\n accessAuditCache = new CacheMap<String, Boolean>(auditResultCacheSize);\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\" + serviceDef + \"String_Node_Str\" + (policies == null ? 0 : policies.size()) + \"String_Node_Str\");\n }\n}\n"
"public int compareTo(final Version version) {\n if (version == null) {\n return 1;\n }\n final int compMajor = Integer.compare(getMajor(), version.getMajor());\n if (compMajor != 0) {\n return compMajor;\n }\n final int compMinor = Integer.compare(getMinor(), version.getMinor());\n if (compMinor != 0) {\n return compMinor;\n }\n final int compRevision = Integer.valueOf(getRevision()).compareTo(version.getRevision());\n if (compRevision != 0) {\n return compRevision;\n }\n return getType().compareTo(version.getType());\n}\n"
"public void listChanged(ListEvent listChanges) {\n sourceSize = source.size();\n updates.beginEvent();\n while (listChanges.next()) {\n int sortedIndex = listChanges.getIndex();\n int type = listChanges.getType();\n int value = Integer.MIN_VALUE;\n if (type != ListEvent.DELETE && sourceSize > 0) {\n value = evaluator.evaluate(source.get(sortedIndex));\n }\n if (sortedIndex < lowerThresholdIndex - 1) {\n if (type == ListEvent.INSERT) {\n lowerThresholdIndex++;\n upperThresholdIndex++;\n } else if (type == ListEvent.DELETE) {\n lowerThresholdIndex--;\n upperThresholdIndex--;\n } else if (type == ListEvent.UPDATE) {\n }\n } else if (sortedIndex == lowerThresholdIndex - 1) {\n int transformedIndex = sortedIndex - Math.max(lowerThresholdIndex, 0);\n if (type == ListEvent.INSERT) {\n if (value < lowerThreshold) {\n lowerThresholdIndex++;\n upperThresholdIndex++;\n } else {\n upperThresholdIndex++;\n updates.addInsert(transformedIndex);\n }\n } else if (type == ListEvent.DELETE) {\n lowerThresholdIndex--;\n upperThresholdIndex--;\n } else if (type == ListEvent.UPDATE) {\n if (value >= lowerThreshold) {\n lowerThresholdIndex--;\n updates.addInsert(0);\n }\n }\n } else if (sortedIndex >= lowerThresholdIndex && sortedIndex <= upperThresholdIndex) {\n int transformedIndex = sortedIndex - Math.max(lowerThresholdIndex, 0);\n if (type == ListEvent.INSERT) {\n upperThresholdIndex++;\n if (value < lowerThreshold) {\n lowerThresholdIndex++;\n } else if (value > upperThreshold) {\n throw new IllegalStateException();\n } else {\n updates.addInsert(transformedIndex);\n }\n } else if (type == ListEvent.DELETE) {\n upperThresholdIndex--;\n updates.addDelete(transformedIndex);\n } else if (type == ListEvent.UPDATE) {\n if (value < lowerThreshold) {\n lowerThresholdIndex++;\n updates.addDelete(transformedIndex);\n } else if (value > upperThreshold) {\n upperThresholdIndex--;\n updates.addDelete(transformedIndex);\n } else {\n updates.addUpdate(transformedIndex);\n }\n }\n } else if (sortedIndex == upperThresholdIndex + 1) {\n int transformedIndex = sortedIndex - Math.max(lowerThresholdIndex, 0);\n if (type == ListEvent.INSERT) {\n if (value >= lowerThreshold && value <= upperThreshold) {\n upperThresholdIndex++;\n updates.addInsert(transformedIndex);\n }\n } else if (type == ListEvent.DELETE) {\n } else if (type == ListEvent.UPDATE) {\n if (value <= upperThreshold) {\n upperThresholdIndex++;\n updates.addInsert(transformedIndex);\n }\n }\n } else if (sortedIndex > upperThresholdIndex + 1) {\n } else {\n throw new IllegalStateException();\n }\n }\n updates.commitEvent();\n}\n"
"public boolean get(int feature) {\n if (!BOOLEAN_FEATURES.contains(feature)) {\n throw new IllegalArgumentException(feature + \"String_Node_Str\");\n }\n try {\n if (checkService()) {\n return sService.get(feature);\n }\n } catch (RemoteException e) {\n }\n return false;\n}\n"
"public Classifier createSpecialClassifier(Namespace container, List<RedefinableElement> traveled, List<Classifier> visited) {\n for (final Class<? extends Classifier> c : UNSPECIALIZABLE_CLASSIFIERS) {\n if (c.isAssignableFrom(classifier.getClass())) {\n return null;\n }\n }\n Classifier specific = (Classifier) CopyPasting.copyPasteElement(classifier, container);\n visited.add(specific);\n visited.add(classifier);\n specific.getGeneralization().clear();\n ArrayList<RedefinableElement> redefinedElements = new ArrayList<RedefinableElement>();\n for (NamedElement namedElement : specific.getOwnedMember()) {\n if (namedElement instanceof RedefinableElement && !((RedefinableElement) namedElement).isLeaf() && !(namedElement instanceof Classifier)) {\n redefinedElements.add((RedefinableElement) namedElement);\n }\n }\n Utils.createGeneralization(classifier, specific);\n for (final NamedElement ne : specific.getInheritedMember()) {\n if (ne instanceof RedefinableElement && !((RedefinableElement) ne).isLeaf() && !(ne instanceof Classifier)) {\n final RedefinableElement elementToBeRedefined = (RedefinableElement) ne;\n SetOrCreateRedefinableElementAction.redefineRedefinableElement(specific, elementToBeRedefined, traveled, visited, individualMode, isRecursive);\n }\n }\n for (RedefinableElement redefinedElement : redefinedElements) {\n redefinedElement.dispose();\n }\n return specific;\n}\n"
"public void configure(Context context) {\n String table = context.getString(CONF_TABLE, DEFAULT_TABLE);\n String host = context.getString(CONF_HOST, DEFAULT_HOST);\n String keyspace = context.getString(CONF_KEYSPACE, DEFAULT_KEYSPACE);\n int port = context.getInteger(CONF_PORT, DEFAULT_PORT);\n String username = context.getString(CONF_USERNAME);\n String password = context.getString(CONF_PASSWORD);\n String clusterName = context.getString(CONF_CLUSTER, DEFAULT_CLUSTER);\n String consistency = context.getString(CONF_CONSISTENCY_LEVEL, DEFAULT_CONSISTENCY_LEVEL);\n String columnDefinitionFile = context.getString(CONF_COLUMN_DEFINITION_FILE);\n if (!Strings.isNullOrEmpty(columnDefinitionFile)) {\n this.parser = new EventParser(readJsonFromFile(new File(columnDefinitionFile)));\n }\n ColumnDefinition definition = this.parser == null ? null : this.parser.getDefinition();\n if (Strings.isNullOrEmpty(username) || Strings.isNullOrEmpty(password)) {\n this.repository = new CassandraRepository(host, table, keyspace, port, clusterName, consistency, definition);\n } else {\n this.repository = new CassandraRepository(username, password, host, table, keyspace, port, clusterName, consistency, definition);\n }\n setOptionalRepoConfiguration(context);\n this.batchsize = context.getInteger(CONF_BATCH_SIZE, DEFAULT_BATCH_SIZE);\n this.sinkCounter = new SinkCounter(this.getName());\n this.dateFormat = context.getString(CONF_DATE_FORMAT, DEFAULT_DATE_FORMAT);\n this.itemSeparator = context.getString(CONF_ITEM_SEPARATOR, DEFAULT_ITEM_SEPARATOR);\n this.mapValueSeparator = context.getString(CONF_MAP_VALUE_SEPARATOR, DEFAULT_MAP_VALUE_SEPARATOR);\n this.mapKeyType = context.getString(CONF_MAP_KEY_TYPE, DEFAULT_MAP_KEY_TYPE);\n this.mapValueType = context.getString(CONF_MAP_VALUE_TYPE, DEFAULT_MAP_VALUE_TYPE);\n this.listValueType = context.getString(CONF_LIST_VALUE_TYPE, DEFAULT_LIST_VALUE_TYPE);\n}\n"
"public void deleteVolume(String volumeId) {\n IaasProvider iaasInfo = getIaasProvider();\n ComputeServiceContext context = iaasInfo.getComputeService().getContext();\n String region = ComputeServiceBuilderUtil.extractRegion(iaasInfo);\n if (region == null) {\n log.fatal(String.format(\"String_Node_Str\", volumeId, iaasInfo));\n return;\n }\n NovaApi novaApi = context.unwrapApi(NovaApi.class);\n VolumeApi api = novaApi.getVolumeExtensionForZone(region).get();\n if (api.delete(volumeId)) {\n log.info(String.format(\"String_Node_Str\", volumeId, region, iaasInfo));\n }\n}\n"
"public static void tearDown() {\n if (ddlDrop) {\n runDdl(conn, DROP_PACKAGE1_PACKAGE_BODY, ddlDebug);\n runDdl(conn, DROP_PACKAGE1_PACKAGE, ddlDebug);\n runDdl(conn, DROP_PACKAGE1_MRECORD_TYPE, ddlDebug);\n runDdl(conn, DROP_PACKAGE1_NRECORD_TYPE, ddlDebug);\n runDdl(conn, DROP_PACKAGE1_MTAB1_TYPE, ddlDebug);\n runDdl(conn, DROP_EMP_RECORD_PACKAGE_BODY, ddlDebug);\n runDdl(conn, DROP_EMP_RECORD_PACKAGE, ddlDebug);\n runDdl(conn, DROP_EMPREC_TYPE, ddlDebug);\n runDdl(conn, DROP_EMPTYPE_TABLE, ddlDebug);\n }\n}\n"
"public void onClick(View v) {\n Intent intent = new Intent(WelcomeActivity.this, AddDeviceToAccountActivity.class);\n startActivityForResult(intent, ADD_THIS_DEVICE);\n}\n"
"public ToroTransaction createTransaction() throws ImplementationDbException {\n SessionTransaction sessionTransaction = executor.createTransaction();\n return new DefaultToroTransaction(session, sessionTransaction, d2r, executor, documentBuilderFactory, cursorManager);\n}\n"
"public void onCreate() {\n versionName = getVersionName();\n wpDB = new WordPressDB(this);\n requestQueue = Volley.newRequestQueue(this);\n int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);\n int cacheSize = maxMemory / 32;\n imageLoader = new ImageLoader(requestQueue, new BitmapLruCache(cacheSize));\n Log.d(\"String_Node_Str\", \"String_Node_Str\" + cacheSize + \"String_Node_Str\" + maxMemory);\n localImageCache = new BitmapLruCache(cacheSize / 2);\n SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);\n if (settings.getInt(\"String_Node_Str\", -1) >= 0)\n shouldRestoreSelectedActivity = true;\n restClient = new WPRestClient(requestQueue, new OauthAuthenticator(), settings.getString(ACCESS_TOKEN_PREFERENCE, null));\n registerForCloudMessaging(this);\n loadNotifications(this);\n super.onCreate();\n}\n"
"public void testViews() {\n Collection<ViewInfo> views = evaluatorProvider.getViews(EvaluatorComponent.class.getName());\n Assert.assertEquals(views.size(), 3);\n Assert.assertTrue(views.contains(new ViewInfo(ExpressionsViewManifestation.class, \"String_Node_Str\", ViewType.CENTER)));\n Iterator<ViewInfo> it = evaluatorProvider.getViews(EvaluatorComponent.class.getName()).iterator();\n Assert.assertEquals(it.next(), new ViewInfo(InfoViewManifestation.class, \"String_Node_Str\", ViewType.CENTER));\n Assert.assertEquals(it.next(), new ViewInfo(ExpressionsViewManifestation.class, \"String_Node_Str\", ViewType.CENTER));\n views = multiProvider.getViews(MultiComponent.class.getName());\n Assert.assertEquals(views.size(), 3);\n Assert.assertTrue(views.contains(new ViewInfo(MultiViewManifestation.class, \"String_Node_Str\", ViewType.CENTER)));\n it = multiProvider.getViews(MultiComponent.class.getName()).iterator();\n Assert.assertEquals(it.next(), new ViewInfo(InfoViewManifestation.class, InfoViewManifestation.VIEW_NAME, InfoViewManifestation.class.getName(), ViewType.OBJECT));\n Assert.assertEquals(it.next(), new ViewInfo(MultiViewManifestation.class, MultiViewManifestation.VIEW_NAME, ViewType.OBJECT));\n Assert.assertEquals(it.next(), new ViewInfo(MultiViewManifestation.class, MultiViewManifestation.VIEW_NAME, InfoViewManifestation.class.getName(), ViewType.CENTER, null, null, true, MultiComponent.class));\n}\n"
"protected void sendSharedObjectMsgToSelf(SharedObjectMsg msg) {\n if (msg == null)\n throw new NullPointerException(\"String_Node_Str\");\n ISharedObjectContext context = getContext();\n if (context == null)\n return;\n IQueueEnqueue queue = context.getQueue();\n try {\n queue.enqueue(new SharedObjectMsgEvent(getID(), getContext().getLocalContainerID(), msg));\n } catch (QueueException e) {\n traceCatching(\"String_Node_Str\", e);\n logError(DESTROYREMOTE_CODE, \"String_Node_Str\", e);\n }\n}\n"
"public void test() throws Exception {\n String dataJsonText = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n JsonNode dataJson = BridgeObjectMapper.get().readTree(dataJsonText);\n HealthDataRecord intermediateRecord = createValidRecordBuilder(dataJson).withId(TEST_RECORD_ID).build();\n HealthDataService mockHealthDataService = mock(HealthDataService.class);\n ArgumentCaptor<HealthDataRecord> createRecordArgCaptor = ArgumentCaptor.forClass(HealthDataRecord.class);\n when(mockHealthDataService.createOrUpdateRecord(createRecordArgCaptor.capture())).thenReturn(TEST_RECORD_ID);\n ArgumentCaptor<HealthDataAttachment> createAttachmentArgCaptor = ArgumentCaptor.forClass(HealthDataAttachment.class);\n when(mockHealthDataService.createOrUpdateAttachment(createAttachmentArgCaptor.capture())).thenReturn(ATTACHMENT_ID_BAR, ATTACHMENT_ID_FOO);\n when(mockHealthDataService.getRecordById(TEST_RECORD_ID)).thenReturn(intermediateRecord);\n when(mockHealthDataService.getAttachmentBuilder()).thenAnswer(invocation -> new DynamoHealthDataAttachment.Builder());\n when(mockHealthDataService.getRecordBuilder()).thenAnswer(invocation -> new DynamoHealthDataRecord.Builder());\n S3Helper mockS3Helper = mock(S3Helper.class);\n UploadArtifactsHandler handler = new UploadArtifactsHandler();\n handler.setHealthDataService(mockHealthDataService);\n handler.setS3Helper(mockS3Helper);\n Map<String, byte[]> attachmentMap = new TreeMap<>();\n attachmentMap.put(\"String_Node_Str\", \"String_Node_Str\".getBytes(Charsets.UTF_8));\n attachmentMap.put(\"String_Node_Str\", \"String_Node_Str\".getBytes(Charsets.UTF_8));\n HealthDataRecordBuilder recordBuilder = createValidRecordBuilder(dataJson);\n DynamoUpload2 upload = new DynamoUpload2();\n upload.setUploadId(TEST_UPLOAD_ID);\n UploadValidationContext context = new UploadValidationContext();\n context.setAttachmentsByFieldName(attachmentMap);\n context.setHealthDataRecordBuilder(recordBuilder);\n context.setUpload(upload);\n handler.handle(context);\n List<HealthDataRecord> createRecordArgList = createRecordArgCaptor.getAllValues();\n assertEquals(2, createRecordArgList.size());\n HealthDataRecord createIntermediateRecordArg = createRecordArgList.get(0);\n JsonNode createIntermediateRecordDataJson = createIntermediateRecordArg.getData();\n assertEquals(2, createIntermediateRecordDataJson.size());\n assertEquals(\"String_Node_Str\", createIntermediateRecordDataJson.get(\"String_Node_Str\").textValue());\n assertEquals(42, createIntermediateRecordDataJson.get(\"String_Node_Str\").intValue());\n HealthDataRecord createFinalRecordArg = createRecordArgList.get(1);\n assertEquals(TEST_RECORD_ID, createFinalRecordArg.getId());\n JsonNode createFinalRecordDataJson = createFinalRecordArg.getData();\n assertEquals(4, createFinalRecordDataJson.size());\n assertEquals(\"String_Node_Str\", createFinalRecordDataJson.get(\"String_Node_Str\").textValue());\n assertEquals(42, createFinalRecordDataJson.get(\"String_Node_Str\").intValue());\n assertEquals(ATTACHMENT_ID_BAR, createFinalRecordDataJson.get(\"String_Node_Str\").textValue());\n assertEquals(ATTACHMENT_ID_FOO, createFinalRecordDataJson.get(\"String_Node_Str\").textValue());\n List<HealthDataAttachment> createAttachmentArgList = createAttachmentArgCaptor.getAllValues();\n assertEquals(2, createAttachmentArgList.size());\n for (HealthDataAttachment oneAttachment : createAttachmentArgList) {\n assertEquals(TEST_RECORD_ID, oneAttachment.getRecordId());\n }\n verify(mockS3Helper).writeBytesToS3(TestConstants.ATTACHMENT_BUCKET, ATTACHMENT_ID_BAR, BYTES_BAR);\n verify(mockS3Helper).writeBytesToS3(TestConstants.ATTACHMENT_BUCKET, ATTACHMENT_ID_FOO, BYTES_FOO);\n assertEquals(TEST_RECORD_ID, context.getRecordId());\n assertTrue(context.getMessageList().isEmpty());\n}\n"
"protected int doProcess(Buffer inputBuffer, Buffer outputBuffer) {\n byte[] input = (byte[]) inputBuffer.getData();\n int inputLength = inputBuffer.getLength();\n if (offsets.size() == 0 && ((inputLength > ilbc_constants.NO_OF_BYTES_20MS && inputLength != ilbc_constants.NO_OF_BYTES_30MS) || inputLength > ilbc_constants.NO_OF_BYTES_30MS)) {\n int nb = 0;\n int len = 0;\n if ((inputLength % ilbc_constants.NO_OF_BYTES_20MS) == 0) {\n nb = (inputLength % ilbc_constants.NO_OF_BYTES_20MS);\n len = ilbc_constants.NO_OF_BYTES_20MS;\n } else if ((inputLength % ilbc_constants.NO_OF_BYTES_30MS) == 0) {\n nb = (inputLength % ilbc_constants.NO_OF_BYTES_30MS);\n len = ilbc_constants.NO_OF_BYTES_30MS;\n }\n if (this.inputLength != len)\n initDec(len);\n for (int i = 0; i < nb; i++) {\n offsets.add(new Integer(inputLength + (i * len)));\n }\n } else if (this.inputLength != inputLength)\n initDec(inputLength);\n int outputLength = dec.ULP_inst.blockl * 2;\n byte[] output = validateByteArraySize(outputBuffer, outputLength);\n int outputOffset = 0;\n dec.decode(output, outputOffset, input, inputBuffer.getOffset(), (short) 1);\n updateOutput(outputBuffer, getOutputFormat(), outputLength, outputOffset);\n return BUFFER_PROCESSED_OK;\n}\n"
"public Object getFinalValue() throws Exception, IllegalAccessException, InvocationTargetException {\n if (value != null && \"String_Node_Str\".equals(value.trim())) {\n if (formatter == null) {\n return typeClass.getConstructor(new Class[] { String.class }).newInstance(new Object[] { value });\n } else {\n return formatter.parseObject(value);\n }\n } else {\n return null;\n }\n}\n"
"public List<String> getChainIds() {\n List<String> chains = new ArrayList<String>(getSubunitCount());\n for (int c = 0; c < clusters.size(); c++) {\n for (int s = 0; s < clusters.get(c).size(); s++) chains.add(clusters.get(c).getSubunits().get(s).getName());\n }\n return chains;\n}\n"
"public static Object evalConditionalExpr(Object obj, int operator, Object[] ops) throws DataException {\n ExprTextAndValue[] opTextAndValue = new ExprTextAndValue[ops.length];\n for (int i = 0; i < ops.length; i++) {\n opTextAndValue[i] = createExprTextAndValueInstance(ops[i]);\n }\n Object resultObject = obj;\n Object[] resultOp = new Object[ops.length];\n for (int i = 0; i < ops.length; i++) {\n resultOp[i] = opTextAndValue[i].value;\n }\n Object[] obArray = MiscUtil.isComparable(obj, operator, opTextAndValue);\n if (obArray != null) {\n resultObject = obArray[0];\n for (int i = 1; i < obArray.length; i++) {\n resultOp[i - 1] = obArray[i];\n }\n }\n if (logger.isLoggable(Level.FINER)) {\n String logStr = \"String_Node_Str\";\n for (int i = 0; i < ops.length; i++) {\n logStr += resultOp[i] == null ? null : (\"String_Node_Str\" + i + \"String_Node_Str\" + LogUtil.toString(resultOp[i]));\n }\n logger.entering(ScriptEvalUtil.class.getName(), \"String_Node_Str\", \"String_Node_Str\" + LogUtil.toString(resultObject) + \"String_Node_Str\" + operator + logStr);\n }\n boolean result = false;\n switch(operator) {\n case IConditionalExpression.OP_EQ:\n result = compare(resultObject, resultOp[0]) == 0;\n break;\n case IConditionalExpression.OP_NE:\n result = compare(resultObject, resultOp[0]) != 0;\n break;\n case IConditionalExpression.OP_LT:\n result = compare(resultObject, resultOp[0]) < 0;\n break;\n case IConditionalExpression.OP_LE:\n result = compare(resultObject, resultOp[0]) <= 0;\n break;\n case IConditionalExpression.OP_GE:\n result = compare(resultObject, resultOp[0]) >= 0;\n break;\n case IConditionalExpression.OP_GT:\n result = compare(resultObject, resultOp[0]) > 0;\n break;\n case IConditionalExpression.OP_BETWEEN:\n result = between(resultObject, resultOp[0], resultOp[1]);\n break;\n case IConditionalExpression.OP_NOT_BETWEEN:\n result = !(between(resultObject, resultOp[0], resultOp[1]));\n break;\n case IConditionalExpression.OP_NULL:\n result = resultObject == null;\n break;\n case IConditionalExpression.OP_NOT_NULL:\n result = resultObject != null;\n break;\n case IConditionalExpression.OP_TRUE:\n result = isTrueOrFalse(resultObject, Boolean.TRUE);\n break;\n case IConditionalExpression.OP_FALSE:\n result = isTrueOrFalse(resultObject, Boolean.FALSE);\n break;\n case IConditionalExpression.OP_LIKE:\n result = like(resultObject, resultOp[0]);\n break;\n case IConditionalExpression.OP_NOT_LIKE:\n result = !like(resultObject, resultOp[0]);\n break;\n case IConditionalExpression.OP_TOP_N:\n case IConditionalExpression.OP_BOTTOM_N:\n case IConditionalExpression.OP_TOP_PERCENT:\n case IConditionalExpression.OP_BOTTOM_PERCENT:\n throw new DataException(ResourceConstants.UNSUPPORTTED_COND_OPERATOR, \"String_Node_Str\");\n case IConditionalExpression.OP_MATCH:\n result = match(resultObject, resultOp[0]);\n break;\n case IConditionalExpression.OP_NOT_MATCH:\n result = !match(resultObject, resultOp[0]);\n break;\n case IConditionalExpression.OP_IN:\n result = in(resultObject, resultOp);\n break;\n case IConditionalExpression.OP_NOT_IN:\n result = !in(obArray);\n break;\n default:\n throw new DataException(ResourceConstants.UNSUPPORTTED_COND_OPERATOR, new Integer(operator));\n }\n logger.exiting(ScriptEvalUtil.class.getName(), \"String_Node_Str\", new Boolean(result));\n return new Boolean(result);\n}\n"
"public void testTruncateAndAppend() throws IOException {\n SimpleLog log = initLog();\n log.truncate(new Zxid(0, 0));\n log.append(new Transaction(new Zxid(1, 2), ByteBuffer.wrap(\"String_Node_Str\".getBytes())));\n Log.LogIterator iter = log.getIterator(new Zxid(0, 0));\n Assert.assertEquals(iter.next().getZxid(), new Zxid(0, 0));\n Assert.assertEquals(iter.next().getZxid(), new Zxid(1, 2));\n}\n"
"protected void drawLabels(Canvas c, float pos) {\n float[] position = new float[] { 0f, 0f };\n int maxx = mMaxX;\n int minx = mMinX;\n if (maxx >= mXAxis.getValues().size())\n maxx = mXAxis.getValues().size() - 1;\n if (minx < 0)\n minx = 0;\n for (int i = minx; i <= maxx; i += mXAxis.mAxisLabelModulus) {\n position[0] = i;\n mTrans.pointValuesToPixel(position);\n if (mViewPortHandler.isInBoundsX(position[0])) {\n String label = mXAxis.getValues().get(i);\n if (mXAxis.isAvoidFirstLastClippingEnabled()) {\n if (i == mXAxis.getValues().size() - 1 && mXAxis.getValues().size() > 1) {\n float width = Utils.calcTextWidth(mAxisPaint, label);\n if (width > mViewPortHandler.offsetRight() * 2 && position[0] + width > mViewPortHandler.getChartWidth())\n position[0] -= width / 2;\n } else if (i == 0) {\n float width = Utils.calcTextWidth(mAxisPaint, label);\n position[0] += width / 2;\n }\n }\n c.drawText(label, position[0], pos, mAxisPaint);\n }\n }\n}\n"
"public Object getEntity(String serviceEndpoint, Type responseType, String identifierPlaceHolder, String identifier, String entityName) {\n try {\n return executeGet(serviceEndpoint.replace(identifierPlaceHolder, identifier), responseType);\n } catch (Exception e) {\n String message = String.format(\"String_Node_Str\", entityName, identifier);\n System.out.println(message);\n logger.error(message, e);\n return null;\n }\n}\n"
"public void testLargeSortAcrossMultipleWindows() throws Exception {\n try {\n final int NUM_RECORDS = 1000000;\n final TestData.Generator generator = new TestData.Generator(SEED, KEY_MAX, VALUE_LENGTH, KeyMode.RANDOM, ValueMode.CONSTANT, VAL);\n final MutableObjectIterator<PactRecord> source = new TestData.GeneratorIterator(generator, NUM_RECORDS);\n LOG.debug(\"String_Node_Str\");\n Sorter<PactRecord> sorter = new AsynchronousPartialSorter<PactRecord>(this.memoryManager, source, this.parentTask, this.serializer, this.comparator, 10 * 1024 * 1024);\n runPartialSorter(sorter, NUM_RECORDS, 25);\n } catch (Exception t) {\n t.printStackTrace();\n Assert.fail(\"String_Node_Str\" + t.getMessage());\n }\n}\n"
"public static Vector2 toVector2(Vector3 o) {\n return new Vector2(o.x, o.z);\n}\n"
"public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer) {\n ItemStack current = entityplayer.inventory.getCurrentItem();\n if (current != null) {\n LiquidStack liquid = LiquidManager.getLiquidForFilledItem(current);\n TileTank tank = (TileTank) world.getBlockTileEntity(i, j, k);\n if (liquid != null) {\n int qty = tank.fill(Orientations.Unknown, liquid, true);\n if (qty != 0 && !BuildCraftCore.debugMode) {\n entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, Utils.consumeItem(current));\n }\n return true;\n } else {\n LiquidStack available = tank.getTanks()[0].getLiquid();\n ItemStack filled = LiquidManager.fillLiquidContainer(available, current);\n liquid = LiquidManager.getLiquidForFilledItem(filled);\n if (liquid != null) {\n if (current.stackSize > 1) {\n if (!entityplayer.inventory.addItemStackToInventory(filled))\n return false;\n else\n entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, Utils.consumeItem(current));\n } else {\n entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, Utils.consumeItem(current));\n entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, filled);\n }\n tank.drain(Orientations.Unknown, liquid.amount, true);\n return true;\n }\n }\n }\n return false;\n}\n"
"protected void processInstalledExtensions() {\n allInstalledLibs = new HashMap<String, List<LibDependencyDeclaration>>();\n allInstalledExtensions = new HashMap<String, DependencyMetadata>();\n if (installedExtensions == null)\n installedExtensions = new DependencyMetadata[0];\n for (DependencyMetadata extension : installedExtensions) {\n allInstalledExtensions.put(extension.id, extension.version);\n if (extension.libDependencies != null) {\n addToLibsMap(extension.libDependencies, allInstalledLibs);\n }\n }\n}\n"
"public static Application addApplication(String name) throws SkypeException {\n Application application = new Application(name);\n application.initalize();\n return application;\n}\n"
"private boolean authorizeCORBA(byte[] object_id, String method) throws Exception {\n ProtocolManager protocolMgr = orbHelper.getProtocolManager();\n if (protocolMgr == null) {\n return true;\n }\n if (protocolMgr.getEjbDescriptor(object_id) != null) {\n return true;\n }\n CORBAObjectPermission perm = new CORBAObjectPermission(\"String_Node_Str\", method);\n com.sun.enterprise.security.SecurityContext sc = com.sun.enterprise.security.SecurityContext.getCurrent();\n Set principalSet = sc.getPrincipalSet();\n Principal[] principals = (principalSet == null ? null : (Principal[]) principalSet.toArray(new Principal[principalSet.size()]));\n CodeSource cs = new CodeSource(new java.net.URL(\"String_Node_Str\"), (java.security.cert.Certificate[]) null);\n ProtectionDomain prdm = new ProtectionDomain(cs, null, null, principals);\n boolean result = policy.implies(prdm, perm);\n if (_logger.isLoggable(Level.FINE)) {\n _logger.log(Level.FINE, \"String_Node_Str\" + result + \"String_Node_Str\" + method);\n }\n return result;\n}\n"
"private void doIntegrationTest(int bitWidth) throws Exception {\n long modValue = 1L << bitWidth;\n RunLengthBitPackingHybridEncoder encoder = new RunLengthBitPackingHybridEncoder(bitWidth, 1000);\n for (int i = 0; i < 100; i++) {\n encoder.writeInt((int) (i % modValue));\n }\n for (int i = 0; i < 100; i++) {\n encoder.writeInt((int) (77 % modValue));\n }\n for (int i = 0; i < 100; i++) {\n encoder.writeInt((int) (88 % modValue));\n }\n for (int i = 0; i < 1000; i++) {\n encoder.writeInt((int) (i % modValue));\n encoder.writeInt((int) (i % modValue));\n encoder.writeInt((int) (i % modValue));\n }\n for (int i = 0; i < 1000; i++) {\n encoder.writeInt((int) (17 % modValue));\n }\n InputStream in = new ByteArrayInputStream(encoder.toBytes().toByteArray());\n RunLengthBitPackingHybridDecoder decoder = new RunLengthBitPackingHybridDecoder(numValues, bitWidth, in);\n for (int i = 0; i < 100; i++) {\n assertEquals(i % modValue, decoder.readInt());\n }\n for (int i = 0; i < 100; i++) {\n assertEquals(77 % modValue, decoder.readInt());\n }\n for (int i = 0; i < 100; i++) {\n assertEquals(88 % modValue, decoder.readInt());\n }\n for (int i = 0; i < 1000; i++) {\n assertEquals(i % modValue, decoder.readInt());\n assertEquals(i % modValue, decoder.readInt());\n assertEquals(i % modValue, decoder.readInt());\n }\n for (int i = 0; i < 1000; i++) {\n assertEquals(17 % modValue, decoder.readInt());\n }\n}\n"
"public static ChangeBlockEvent.Place callBlockPlaceEvent(Event event) {\n if (!(event instanceof ChangeBlockEvent.Place)) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n ChangeBlockEvent.Place spongeEvent = (ChangeBlockEvent.Place) event;\n if (spongeEvent.getCause().first(Player.class).isPresent()) {\n EntityPlayer player = (EntityPlayer) spongeEvent.getCause().first(Player.class).get();\n net.minecraft.world.World world = (net.minecraft.world.World) spongeEvent.getTargetWorld();\n if (spongeEvent.getTransactions().size() == 1) {\n BlockPos pos = VecHelper.toBlockPos(spongeEvent.getTransactions().get(0).getOriginal().getPosition());\n IBlockState state = (IBlockState) spongeEvent.getTransactions().get(0).getOriginal().getState();\n net.minecraftforge.common.util.BlockSnapshot blockSnapshot = new net.minecraftforge.common.util.BlockSnapshot(world, pos, state);\n IBlockState placedAgainst = Blocks.air.getDefaultState();\n if (causeTracker.getCurrentPlayerPacket() instanceof C08PacketPlayerBlockPlacement) {\n C08PacketPlayerBlockPlacement packet = (C08PacketPlayerBlockPlacement) causeTracker.getCurrentPlayerPacket();\n EnumFacing facing = EnumFacing.getFront(packet.getPlacedBlockDirection());\n placedAgainst = blockSnapshot.world.getBlockState(blockSnapshot.pos.offset(facing.getOpposite()));\n }\n BlockEvent.PlaceEvent forgeEvent = new BlockEvent.PlaceEvent(blockSnapshot, placedAgainst, player);\n ((IMixinEventBus) MinecraftForge.EVENT_BUS).post(forgeEvent, true);\n if (forgeEvent.isCanceled()) {\n spongeEvent.getTransactions().get(0).setValid(false);\n }\n } else {\n Iterator<Transaction<BlockSnapshot>> iterator = spongeEvent.getTransactions().iterator();\n List<net.minecraftforge.common.util.BlockSnapshot> blockSnapshots = new ArrayList<>();\n while (iterator.hasNext()) {\n Transaction<BlockSnapshot> transaction = iterator.next();\n Location<World> location = transaction.getOriginal().getLocation().get();\n IBlockState state = (IBlockState) transaction.getOriginal().getState();\n BlockPos pos = new BlockPos(location.getBlockX(), location.getBlockY(), location.getBlockZ());\n net.minecraftforge.common.util.BlockSnapshot blockSnapshot = new net.minecraftforge.common.util.BlockSnapshot(world, pos, state);\n blockSnapshots.add(blockSnapshot);\n }\n IBlockState placedAgainst = Blocks.air.getDefaultState();\n if (StaticMixinHelper.packetPlayer != null && StaticMixinHelper.processingPacket instanceof C08PacketPlayerBlockPlacement) {\n C08PacketPlayerBlockPlacement packet = (C08PacketPlayerBlockPlacement) StaticMixinHelper.processingPacket;\n EnumFacing facing = EnumFacing.getFront(packet.getPlacedBlockDirection());\n placedAgainst = blockSnapshots.get(0).world.getBlockState(blockSnapshots.get(0).pos.offset(facing.getOpposite()));\n }\n BlockEvent.MultiPlaceEvent forgeEvent = new BlockEvent.MultiPlaceEvent(blockSnapshots, placedAgainst, player);\n ((IMixinEventBus) MinecraftForge.EVENT_BUS).post(forgeEvent, true);\n if (forgeEvent.isCanceled()) {\n while (iterator.hasNext()) {\n iterator.next().setValid(false);\n }\n }\n }\n }\n return spongeEvent;\n}\n"
"public void update() {\n if (lastSteam != getSteamShare() >= STEAM_CONSUMPTION) {\n markForResync();\n }\n lastSteam = getSteamShare() > STEAM_CONSUMPTION;\n if (!isInitialized) {\n powered = worldObj.isBlockIndirectlyGettingPowered(pos) > 0;\n setDistributionDirections(new EnumFacing[] { EnumFacing.getFront(getBlockMetadata()).getOpposite() });\n isInitialized = true;\n }\n super.update();\n if (active && worldObj.isRemote) {\n rotateTicks++;\n }\n if (active && worldObj.isRemote || (getSteamShare() >= STEAM_CONSUMPTION && !powered)) {\n if (!worldObj.isRemote) {\n decrSteam(STEAM_CONSUMPTION);\n }\n EnumFacing dir = worldObj.getBlockState(pos).getValue(BlockFan.FACING);\n double[] positions = getSmokePositions(dir);\n double[] speeds = getSmokeSpeeds(dir);\n worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, positions[0], positions[1], positions[2], speeds[0], speeds[1], speeds[2]);\n int blocksInFront = 0;\n boolean blocked = false;\n for (int i = 1; i < range; i++) {\n int x = pos.getX() + dir.getFrontOffsetX() * i;\n int y = pos.getY() + dir.getFrontOffsetY() * i;\n int z = pos.getZ() + dir.getFrontOffsetZ() * i;\n BlockPos offsetPos = new BlockPos(x, y, z);\n IBlockState offsetState = worldObj.getBlockState(offsetPos);\n Block offsetBlock = offsetState.getBlock();\n if (!worldObj.isRemote && worldObj.rand.nextInt(20) == 0 && !blocked && offsetBlock != Blocks.AIR && offsetBlock.isReplaceable(worldObj, offsetPos) || offsetBlock instanceof BlockCrops) {\n if (offsetBlock instanceof BlockFluidBase) {\n for (int v = 0; v < 5; v++) {\n Steamcraft.proxy.spawnBreakParticles(worldObj, x + 0.5F, y + 0.5F, z + 0.5F, offsetBlock, 0F, 0F, 0F);\n }\n }\n worldObj.setBlockToAir(offsetPos);\n }\n if (!blocked && (offsetBlock.isReplaceable(worldObj, offsetPos) || worldObj.isAirBlock(offsetPos) || offsetBlock instanceof BlockTrapDoor || offsetState.getCollisionBoundingBox(worldObj, offsetPos) == null)) {\n blocksInFront = i;\n if (i != range - 1) {\n worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, x + getRandomOrSlight(dir.getFrontOffsetX()), y + getRandomOrSlight(dir.getFrontOffsetY()), z + getRandomOrSlight(dir.getFrontOffsetZ()), speeds[0], speeds[1], speeds[2]);\n }\n } else {\n blocked = true;\n }\n }\n List<Entity> entities = worldObj.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(pos.getX() + (dir.getFrontOffsetX() < 0 ? dir.getFrontOffsetX() * blocksInFront : 0), pos.getY() + (dir.getFrontOffsetY() < 0 ? dir.getFrontOffsetY() * blocksInFront : 0), pos.getZ() + (dir.getFrontOffsetZ() < 0 ? dir.getFrontOffsetZ() * blocksInFront : 0), pos.getX() + 1 + (dir.getFrontOffsetX() > 0 ? dir.getFrontOffsetX() * blocksInFront : 0), pos.getY() + 1 + (dir.getFrontOffsetY() > 0 ? dir.getFrontOffsetY() * blocksInFront : 0), pos.getZ() + 1 + (dir.getFrontOffsetZ() > 0 ? dir.getFrontOffsetZ() * blocksInFront : 0)));\n for (Object obj : entities) {\n Entity entity = (Entity) obj;\n if (!(entity instanceof EntityPlayer) || !(((EntityPlayer) entity).capabilities.isFlying && ((EntityPlayer) entity).capabilities.isCreativeMode)) {\n if (entity instanceof EntityPlayer && entity.isSneaking()) {\n entity.motionX += dir.getFrontOffsetX() * 0.025F;\n entity.motionY += dir.getFrontOffsetY() * 0.05F;\n entity.motionZ += dir.getFrontOffsetZ() * 0.025F;\n } else {\n entity.motionX += dir.getFrontOffsetX() * 0.075F;\n entity.motionY += dir.getFrontOffsetY() * 0.1F;\n entity.motionZ += dir.getFrontOffsetZ() * 0.075F;\n }\n entity.fallDistance = 0.0F;\n }\n }\n }\n}\n"
"public boolean isValid() {\n fIsTracepoints = fTracepointsActivateButton.getSelection();\n fIsWildcard = fWildcardActivateButton.getSelection();\n fIsLogLevel = fLogLevelActivateButton.getSelection();\n fIsAllTracepoints = false;\n fSelectedEvents = new ArrayList<String>();\n if (fIsTracepoints) {\n fIsAllTracepoints = fTracepointsViewer.getChecked(fProviderGroup);\n Set<String> set = new HashSet<String>();\n Object[] checkedElements = fTracepointsViewer.getCheckedElements();\n for (int i = 0; i < checkedElements.length; i++) {\n ITraceControlComponent component = (ITraceControlComponent) checkedElements[i];\n if (!set.contains(component.getName()) && (component instanceof BaseEventComponent)) {\n set.add(component.getName());\n fSelectedEvents.add(component.getName());\n }\n }\n }\n fLogLevelType = LogLevelType.LOGLEVEL_NONE;\n fLogLevelEventName = null;\n if (fIsLogLevel) {\n if (fLogLevelButton.getSelection()) {\n fLogLevelType = LogLevelType.LOGLEVEL;\n } else if (fLogLevelOnlyButton.getSelection()) {\n fLogLevelType = LogLevelType.LOGLEVEL_ONLY;\n }\n String temp = fLogLevelEventNameText.getText();\n if (temp.isEmpty() || temp.matches(\"String_Node_Str\") || (!temp.matches(\"String_Node_Str\") && !temp.matches(\"String_Node_Str\"))) {\n MessageDialog.openError(getShell(), Messages.TraceControl_EnableEventsDialogTitle, Messages.TraceControl_InvalidLogLevelEventNameError + \"String_Node_Str\" + temp + \"String_Node_Str\");\n return false;\n }\n if (!temp.matches(\"String_Node_Str\")) {\n fLogLevelEventName = temp;\n }\n TraceLogLevel[] levels = TraceLogLevel.values();\n int id = fLogLevelCombo.getSelectionIndex();\n if (id < 0) {\n MessageDialog.openError(getShell(), Messages.TraceControl_EnableEventsDialogTitle, Messages.TraceControl_InvalidLogLevel + \"String_Node_Str\" + temp + \"String_Node_Str\");\n return false;\n }\n fLogLevel = levels[id];\n }\n fWildcard = null;\n if (fIsWildcard) {\n String tempWildcard = fWildcardText.getText();\n if (!tempWildcard.matches(\"String_Node_Str\") && !tempWildcard.matches(\"String_Node_Str\")) {\n MessageDialog.openError(getShell(), Messages.TraceControl_EnableEventsDialogTitle, Messages.TraceControl_InvalidWildcardError + \"String_Node_Str\" + tempWildcard + \"String_Node_Str\");\n return false;\n }\n if (!tempWildcard.matches(\"String_Node_Str\")) {\n fWildcard = tempWildcard;\n }\n }\n fFilterExpression = null;\n if (fProviderGroup.isEventFilteringSupported()) {\n String tempFilter = fFilterText.getText();\n if (!tempFilter.matches(\"String_Node_Str\")) {\n fFilterExpression = tempFilter;\n }\n }\n return true;\n}\n"
"public ResourceApk packWithDataAndResources(Artifact resourceApk, RuleContext ruleContext, boolean isLibrary, ResourceDependencies resourceDeps, Artifact rTxt, Artifact symbols, ResourceConfigurationFilter configurationFilters, List<String> uncompressedExtensions, boolean crunchPng, List<String> densities, boolean incremental, Artifact proguardCfg, Artifact mainDexProguardCfg, Artifact manifestOut, Artifact mergedResources, Artifact dataBindingInfoZip, Artifact featureOf, Artifact featureAfter) throws InterruptedException {\n LocalResourceContainer data = new LocalResourceContainer.Builder(ruleContext).withAssets(AndroidCommon.getAssetDir(ruleContext), ruleContext.getPrerequisitesIf(ResourceType.ASSETS.getAttribute(), Mode.TARGET, FileProvider.class)).withResources(ruleContext.getPrerequisites(\"String_Node_Str\", Mode.TARGET, FileProvider.class)).build();\n if (ruleContext.hasErrors()) {\n return null;\n }\n return createApk(ruleContext, isLibrary, resourceDeps, resourceFilter, uncompressedExtensions, crunchPng, incremental, ResourceContainer.builderFromRule(ruleContext).setAssetsAndResourcesFrom(data).setManifest(getManifest()).setRTxt(rTxt).setSymbols(symbols).setApk(resourceApk).build(), data, proguardCfg, mainDexProguardCfg, manifestOut, mergedResources, dataBindingInfoZip, featureOf, featureAfter);\n}\n"
"private void createRemoteReferencesUpdate(DiffGroup root, EReference reference, Match3Elements mapping, List<EObject> remotelyAdded, List<EObject> remotelyDeleted) {\n if (!reference.isMany() && remotelyAdded.size() > 0 && remotelyDeleted.size() > 0) {\n final UpdateReference operation = DiffFactory.eINSTANCE.createUpdateReference();\n operation.setRemote(true);\n operation.setLeftElement(mapping.getLeftElement());\n operation.setRightElement(mapping.getRightElement());\n operation.setReference(reference);\n EObject rightTarget = getMatchedEObject(remotelyAdded.get(0));\n EObject leftTarget = getMatchedEObject(remotelyDeleted.get(0));\n if (leftTarget == null) {\n leftTarget = remotelyAdded.get(0);\n }\n if (rightTarget == null) {\n rightTarget = remotelyDeleted.get(0);\n }\n operation.setLeftTarget(leftTarget);\n operation.setRightTarget(rightTarget);\n root.getSubDiffElements().add(operation);\n } else if (reference.isMany()) {\n final Iterator<EObject> addedReferenceIterator = remotelyAdded.iterator();\n while (addedReferenceIterator.hasNext()) {\n final EObject eobj = addedReferenceIterator.next();\n final ReferenceChangeRightTarget addOperation = DiffFactory.eINSTANCE.createReferenceChangeRightTarget();\n addOperation.setRemote(true);\n addOperation.setRightElement(mapping.getRightElement());\n addOperation.setLeftElement(mapping.getLeftElement());\n addOperation.setReference(reference);\n addOperation.setRightTarget(eobj);\n if (getMatchedEObject(eobj) != null) {\n addOperation.setLeftTarget(getMatchedEObject(eobj));\n }\n root.getSubDiffElements().add(addOperation);\n }\n final Iterator<EObject> deletedReferenceIterator = remotelyDeleted.iterator();\n while (deletedReferenceIterator.hasNext()) {\n final EObject eobj = deletedReferenceIterator.next();\n final ReferenceChangeLeftTarget delOperation = DiffFactory.eINSTANCE.createReferenceChangeLeftTarget();\n delOperation.setRemote(true);\n delOperation.setRightElement(mapping.getRightElement());\n delOperation.setLeftElement(mapping.getLeftElement());\n delOperation.setReference(reference);\n delOperation.setLeftTarget(eobj);\n if (getMatchedEObject(eobj) != null) {\n delOperation.setRightTarget(getMatchedEObject(eobj));\n }\n root.getSubDiffElements().add(delOperation);\n }\n }\n}\n"
"public void focusTo(int row, int column, boolean fireFocusEvent) {\n spreadsheet.focusTo(row, column);\n if (fireFocusEvent) {\n org.zkoss.zk.ui.event.Events.sendEvent(new CellEvent(Events.ON_CELL_FOUCSED, spreadsheet, spreadsheet.getSelectedSheet(), row, column, null));\n }\n}\n"
"public static Graph extract(Iterable<Triple> triples, String namedGraph) {\n final Graph aGraph = new GraphImpl();\n for (Triple triple : triples) {\n Statement aStatement = extractAsSesameStatement(triple, namedGraph, valueFactory);\n if (aStatement != null) {\n aGraph.add(aStatement);\n }\n }\n return aGraph;\n}\n"
"protected void createFormElements(Composite editArea) {\n bindings().createLabel(editArea, type.name());\n if (!allowSelectionOfSecurity) {\n bindings.createLabel(editArea, ((Model) getModel()).getSecurity().getName());\n } else {\n bindings.bindComboViewer(editArea, Messages.ColumnSecurity, \"String_Node_Str\", new LabelProvider() {\n public String getText(Object element) {\n return ((Security) element).getName();\n }\n }, getModel().getClient().getSecurities().toArray());\n }\n bindings.bindComboViewer(editArea, Messages.ColumnPortfolio, \"String_Node_Str\", new LabelProvider() {\n public String getText(Object element) {\n return ((Portfolio) element).getName();\n }\n }, getModel().getClient().getPortfolios().toArray());\n bindings.bindMandatorySharesInput(editArea, Messages.ColumnShares, \"String_Node_Str\").setFocus();\n Label label = new Label(editArea, SWT.NONE);\n label.setText(Messages.ColumnPrice);\n Label lblPrice = new Label(editArea, SWT.BORDER | SWT.READ_ONLY | SWT.NO_FOCUS);\n GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, false).applyTo(lblPrice);\n getBindingContext().bindValue(SWTObservables.observeText(lblPrice), BeansObservables.observeValue(getModel(), \"String_Node_Str\"), new UpdateValueStrategy(false, UpdateValueStrategy.POLICY_UPDATE).setConverter(new StringToCurrencyConverter(Values.Amount)), new UpdateValueStrategy(false, UpdateValueStrategy.POLICY_UPDATE).setConverter(new CurrencyToStringConverter(Values.Amount)));\n bindings.bindAmountInput(editArea, Messages.ColumnFees, \"String_Node_Str\");\n bindings.bindMandatoryAmountInput(editArea, Messages.ColumnTotal, \"String_Node_Str\");\n bindings.bindDatePicker(editArea, Messages.ColumnDate, \"String_Node_Str\");\n}\n"
"private static void notNullStringPut(MultivaluedHashMap<String, Object> map, String key, Object val) {\n if (val != null) {\n map.put(key, val.toString());\n }\n}\n"
"public void updateStructure(SparseBlockMatrix M, SparseBlockMatrix GT) {\n if (mySolver == null) {\n mySolver = new KKTSolver();\n }\n if (myStructureVersion != mySys.getStructureVersion() || myBilateralVersion != GTversion) {\n doUpdateStructure(M, GT);\n myStructureVersion = mySys.getStructureVersion();\n }\n}\n"
"public void adjustBeforeOptimize(Polygon2D_F64 polygon) {\n center.x = 0;\n center.y = 0;\n for (int j = 0; j < 4; j++) {\n Point2D_F64 p = polygon.get(j);\n center.x += p.x;\n center.y += p.y;\n }\n center.x /= 4.0;\n center.y /= 4.0;\n for (int j = 0; j < 4; j++) {\n Point2D_F64 p = polygon.get(j);\n double dx = p.x - center.x;\n double dy = p.y - center.y;\n double r = Math.sqrt(dx * dx + dy * dy);\n if (r > 0) {\n p.x += 1.4 * dx / r;\n p.y += 1.4 * dy / r;\n }\n }\n}\n"
"protected List<Snippet> results(State state) {\n ProtoSnippet[] protos = state.results.contents();\n Arrays.sort(protos, ProtoSnippetComparators.OFFSETS);\n int lastSnippetEnd = 0;\n for (ProtoSnippet proto : protos) {\n proto.pickedBounds = proto.memo.pickBounds(lastSnippetEnd, Integer.MAX_VALUE);\n lastSnippetEnd = proto.pickedBounds.endOffset();\n }\n if (scoreOrdered) {\n Arrays.sort(protos, ProtoSnippetComparators.WEIGHT);\n }\n List<Snippet> results = new ArrayList<Snippet>(protos.length);\n for (ProtoSnippet proto : protos) {\n results.add(new Snippet(proto.pickedBounds.startOffset(), proto.pickedBounds.endOffset(), proto.hits));\n }\n return results;\n}\n"
"private void sendFIN() {\n System.out.println(\"String_Node_Str\");\n TCPPacket packet = createPacket();\n packet.flags |= TCPPacket.FIN;\n try {\n send(packet);\n } catch (IOException e) {\n e.printStackTrace();\n }\n}\n"
"public String toString() {\n return \"String_Node_Str\" + \"String_Node_Str\" + name + '\\'' + \"String_Node_Str\" + className + '\\'' + \"String_Node_Str\" + jarLocation + \"String_Node_Str\" + jarLocationPath + \"String_Node_Str\" + types + \"String_Node_Str\" + usesModules + \"String_Node_Str\" + usedByModules + '}';\n}\n"
"public TrainerBuilder lowerCaseFirstLetterFrequency(int count) {\n this.lowerCaseFirstLetterFrequency = count;\n return this;\n}\n"
"public void run() {\n try {\n mVideoCodec = MediaCodec.createDecoderByType(mVideoFormat.getString(MediaFormat.KEY_MIME));\n mVideoCodec.configure(mVideoFormat, mSurface, null, 0);\n mVideoCodec.start();\n mVideoCodecInputBuffers = mVideoCodec.getInputBuffers();\n mVideoCodecOutputBuffers = mVideoCodec.getOutputBuffers();\n mVideoInfo = new MediaCodec.BufferInfo();\n mVideoInputEos = false;\n mVideoOutputEos = false;\n if (mAudioFormat != null) {\n mAudioCodec = MediaCodec.createDecoderByType(mAudioFormat.getString(MediaFormat.KEY_MIME));\n mAudioCodec.configure(mAudioFormat, null, null, 0);\n mAudioCodec.start();\n mAudioCodecInputBuffers = mAudioCodec.getInputBuffers();\n mAudioCodecOutputBuffers = mAudioCodec.getOutputBuffers();\n mAudioInfo = new MediaCodec.BufferInfo();\n mAudioInputEos = false;\n mAudioOutputEos = false;\n mAudioPlayback = new AudioPlayback();\n mAudioPlayback.setAudioSessionId(mAudioSessionId);\n mAudioPlayback.init(mAudioFormat);\n mAudioSessionId = mAudioPlayback.getAudioSessionId();\n }\n mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_SET_VIDEO_SIZE, getVideoWidth(), getVideoHeight()));\n mBuffering = false;\n boolean preparing = true;\n int frameSkipCount = 0;\n long lastPTS = 0;\n mTimeBase.startAt(mVideoMinPTS);\n while (!mVideoOutputEos) {\n if (mPaused && !mSeekPrepare && !mSeeking && !preparing) {\n if (mAudioPlayback != null)\n mAudioPlayback.pause();\n synchronized (this) {\n while (mPaused && !mSeekPrepare && !mSeeking) {\n this.wait();\n }\n }\n if (mAudioPlayback != null)\n mAudioPlayback.play();\n mTimeBase.startAt(mVideoInfo.presentationTimeUs);\n }\n while (mSeekPrepare) {\n mSeekPrepare = false;\n mSeeking = true;\n Log.d(TAG, \"String_Node_Str\" + mSeekTargetTime);\n Log.d(TAG, \"String_Node_Str\" + mCurrentPosition);\n Log.d(TAG, \"String_Node_Str\" + mVideoExtractor.getSampleTime());\n mVideoExtractor.seekTo(mSeekTargetTime, MediaExtractor.SEEK_TO_PREVIOUS_SYNC);\n mCurrentPosition = mSeekTargetTime;\n Log.d(TAG, \"String_Node_Str\" + mVideoExtractor.getSampleTime());\n mVideoCodec.flush();\n if (mAudioFormat != null)\n mAudioCodec.flush();\n if (mVideoExtractor.hasTrackFormatChanged()) {\n reinitCodecs();\n mRepresentationChanged = true;\n }\n mSeekPrepare = false;\n mSeeking = true;\n if (mSeekMode == SeekMode.FAST_EXACT) {\n long in;\n long out;\n do {\n in = mSeekTargetTime;\n out = fastSeek(in);\n } while (in != mSeekTargetTime);\n mSeekTargetTime = out;\n mSeekPrepare = false;\n }\n }\n if (!mVideoInputEos && !mRepresentationChanging) {\n queueMediaSampleToCodec(mSeeking);\n }\n lastPTS = mVideoInfo.presentationTimeUs;\n int res = mVideoCodec.dequeueOutputBuffer(mVideoInfo, mTimeOutUs);\n mVideoOutputEos = res >= 0 && (mVideoInfo.flags & MediaCodec.BUFFER_FLAG_END_OF_STREAM) != 0;\n if (mVideoOutputEos && mRepresentationChanging) {\n reinitCodecs();\n mVideoOutputEos = false;\n mRepresentationChanging = false;\n mRepresentationChanged = true;\n } else if (res >= 0) {\n int outputBufIndex = res;\n boolean render = true;\n if (mSeeking) {\n if (mVideoOutputEos) {\n mSeekTargetTime = mVideoInfo.presentationTimeUs;\n }\n long presentationTimeMs = mVideoInfo.presentationTimeUs / 1000;\n long seekTargetTimeMs = mSeekTargetTime / 1000;\n if ((mSeekMode == SeekMode.PRECISE || mSeekMode == SeekMode.EXACT) && presentationTimeMs < seekTargetTimeMs) {\n render = false;\n if (frameSkipCount == 0) {\n Log.d(TAG, \"String_Node_Str\");\n }\n frameSkipCount++;\n } else {\n Log.d(TAG, \"String_Node_Str\" + mVideoInfo.presentationTimeUs);\n Log.d(TAG, \"String_Node_Str\" + frameSkipCount + \"String_Node_Str\");\n frameSkipCount = 0;\n if (mSeekMode == SeekMode.EXACT && presentationTimeMs > seekTargetTimeMs) {\n Log.d(TAG, \"String_Node_Str\" + lastPTS);\n render = false;\n seekTo(lastPTS);\n } else {\n if (presentationTimeMs == seekTargetTimeMs) {\n Log.d(TAG, \"String_Node_Str\");\n }\n if (mSeekMode == SeekMode.FAST_EXACT && mVideoInfo.presentationTimeUs < mSeekTargetTime) {\n Log.d(TAG, \"String_Node_Str\");\n } else {\n mTimeBase.startAt(mVideoInfo.presentationTimeUs);\n mCurrentPosition = mVideoInfo.presentationTimeUs;\n mSeeking = false;\n if (mAudioExtractor != null) {\n mAudioExtractor.seekTo(mVideoInfo.presentationTimeUs, MediaExtractor.SEEK_TO_CLOSEST_SYNC);\n mAudioPlayback.flush();\n }\n mEventHandler.sendEmptyMessage(MEDIA_SEEK_COMPLETE);\n }\n }\n }\n } else {\n mCurrentPosition = mVideoInfo.presentationTimeUs;\n long waitingTime = mTimeBase.getOffsetFrom(mVideoInfo.presentationTimeUs);\n if (mAudioFormat != null) {\n long audioOffsetUs = mAudioPlayback.getLastPresentationTimeUs() - mCurrentPosition;\n long audioOffsetCorrectionUs = 10000;\n if (audioOffsetUs > audioOffsetCorrectionUs) {\n waitingTime -= audioOffsetCorrectionUs;\n } else if (audioOffsetUs < -audioOffsetCorrectionUs) {\n waitingTime += audioOffsetCorrectionUs;\n }\n mAudioPlayback.setPlaybackSpeed((float) mTimeBase.getSpeed());\n }\n long cachedDuration = mVideoExtractor.getCachedDuration();\n if (cachedDuration != -1) {\n mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_BUFFERING_UPDATE, (int) (100d / mVideoFormat.getLong(MediaFormat.KEY_DURATION) * (mCurrentPosition + cachedDuration)), 0));\n }\n if (waitingTime > 5000) {\n Thread.sleep(waitingTime / 1000);\n } else if (!preparing && waitingTime < 0) {\n mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_INFO, MEDIA_INFO_VIDEO_TRACK_LAGGING, 0));\n mTimeBase.startAt(mVideoInfo.presentationTimeUs);\n }\n }\n if (mBuffering) {\n mBuffering = false;\n mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_INFO, MEDIA_INFO_BUFFERING_END, 0));\n }\n if (mRepresentationChanged && render) {\n mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_SET_VIDEO_SIZE, getVideoWidth(), getVideoHeight()));\n mRepresentationChanged = false;\n }\n mVideoCodec.releaseOutputBuffer(outputBufIndex, render);\n if (mAudioFormat != null & mAudioExtractor != null && !mSeeking && !mPaused) {\n long start = SystemClock.elapsedRealtime();\n while (mAudioPlayback.getBufferTimeUs() < 100000) {\n if (queueAudioSampleToCodec(mAudioExtractor)) {\n decodeAudioSample();\n } else {\n break;\n }\n }\n }\n if (preparing) {\n mEventHandler.sendEmptyMessage(MEDIA_PREPARED);\n preparing = false;\n mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_INFO, MEDIA_INFO_VIDEO_RENDERING_START, 0));\n }\n if (mVideoOutputEos) {\n Log.d(TAG, \"String_Node_Str\");\n mEventHandler.sendEmptyMessage(MEDIA_PLAYBACK_COMPLETE);\n mPaused = true;\n synchronized (this) {\n if (mAudioPlayback != null)\n mAudioPlayback.pause();\n while (mPaused && !mSeeking && !mSeekPrepare) {\n this.wait();\n }\n if (mAudioPlayback != null)\n mAudioPlayback.play();\n mVideoInputEos = false;\n mVideoOutputEos = false;\n mAudioInputEos = false;\n mAudioOutputEos = false;\n if (!mSeeking && !mSeekPrepare) {\n seekTo(0);\n }\n }\n }\n } else if (res == MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED) {\n mVideoCodecOutputBuffers = mVideoCodec.getOutputBuffers();\n Log.d(TAG, \"String_Node_Str\");\n } else if (res == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) {\n MediaFormat oformat = mVideoCodec.getOutputFormat();\n Log.d(TAG, \"String_Node_Str\" + oformat);\n } else if (res == MediaCodec.INFO_TRY_AGAIN_LATER) {\n Log.d(TAG, \"String_Node_Str\");\n }\n }\n } catch (InterruptedException e) {\n Log.d(TAG, \"String_Node_Str\");\n interrupt();\n if (mIsStopping) {\n mIsStopping = false;\n } else {\n mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, 0));\n }\n } catch (IllegalStateException e) {\n Log.e(TAG, \"String_Node_Str\", e);\n mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, 0));\n } catch (IOException e) {\n Log.e(TAG, \"String_Node_Str\", e);\n mEventHandler.sendMessage(mEventHandler.obtainMessage(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, MEDIA_ERROR_IO));\n }\n if (mAudioPlayback != null)\n mAudioPlayback.stopAndRelease();\n mVideoCodec.stop();\n mVideoCodec.release();\n if (mAudioFormat != null) {\n mAudioCodec.stop();\n mAudioCodec.release();\n }\n mVideoExtractor.release();\n Log.d(TAG, \"String_Node_Str\");\n}\n"
"public static int[] deserializeInteger(List<MPIBuffer> buffers, int byteLength) {\n int noOfDoubles = byteLength / 4;\n int[] returnDoubles = new int[noOfDoubles];\n int bufferIndex = 0;\n for (int i = 0; i < noOfDoubles; i++) {\n ByteBuffer byteBuffer = buffers.get(bufferIndex).getByteBuffer();\n int remaining = byteBuffer.remaining();\n if (remaining >= 4) {\n returnDoubles[i] = byteBuffer.getInt();\n } else {\n bufferIndex = getReadBuffer(buffers, 4, bufferIndex);\n if (bufferIndex < 0) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n }\n }\n return returnDoubles;\n}\n"
"private void inline(Var v, Reference decl, Reference init, Reference ref) {\n Node value = init.getAssignedValue();\n Preconditions.checkState(value != null);\n boolean isFunctionDeclaration = NodeUtil.isFunctionDeclaration(value);\n compiler.reportChangeToEnclosingScope(decl.getNode());\n compiler.reportChangeToEnclosingScope(ref.getNode());\n inlineValue(v, ref, value.detachFromParent());\n if (decl != init) {\n Node expressRoot = init.getGrandparent();\n Preconditions.checkState(expressRoot.isExprResult());\n NodeUtil.removeChild(expressRoot.getParent(), expressRoot);\n }\n if (!isFunctionDeclaration) {\n removeDeclaration(decl);\n }\n}\n"
"public void run() {\n final ConcurrentMap<K, ScheduledEntry<K, V>> entries = scheduledEntries.remove(second);\n if (entries == null || entries.isEmpty())\n return;\n for (K key : entries.keySet()) {\n Integer removed = secondsOfKeys.remove(key);\n if (removed != null) {\n values.add(entries.get(key));\n }\n }\n entryProcessor.process(SecondsBasedEntryTaskScheduler.this, entries.values());\n}\n"
"public void test_by_buffer() throws IOException {\n RemountBytes boundary = RemountBytes.create(\"String_Node_Str\");\n String str = \"String_Node_Str\";\n str += \"String_Node_Str\";\n str += \"String_Node_Str\";\n str += \"String_Node_Str\";\n str += \"String_Node_Str\";\n str += \"String_Node_Str\";\n InputStream ins = Lang.ins(str);\n BufferRing br = new BufferRing(ins, 3, 5);\n String s;\n MarkMode mode;\n br.load();\n mode = br.mark(boundary);\n assertEquals(MarkMode.FOUND, mode);\n br.skipMark();\n br.load();\n mode = br.mark(boundary);\n assertEquals(MarkMode.FOUND, mode);\n s = br.dumpAsString();\n assertEquals(\"String_Node_Str\", s);\n br.load();\n mode = br.mark(boundary);\n assertEquals(MarkMode.FOUND, mode);\n s = br.dumpAsString();\n assertEquals(\"String_Node_Str\", s);\n br.load();\n mode = br.mark(boundary);\n assertEquals(MarkMode.STREAM_END, mode);\n s = br.dumpAsString();\n assertEquals(\"String_Node_Str\", s);\n assertEquals(27, br.readed);\n}\n"
"public String getFunctionSignature() {\n String retval = getIdentifier().getEscapedCodeStr();\n if (getParameterList() != null)\n retval += \"String_Node_Str\" + getParameterList().getEscapedCodeStr() + \"String_Node_Str\";\n else\n retval += \"String_Node_Str\";\n return retval;\n}\n"
"public Vector getPointOnEdge(Coordinate obsPoint) {\n if (this == InferredEdge.emptyEdge)\n return null;\n final Coordinate revObsPoint = new Coordinate(obsPoint.y, obsPoint.x);\n final LinearLocation here = locationIndexedLine.project(revObsPoint);\n final Coordinate pointOnLine = locationIndexedLine.extractPoint(here);\n final Coordinate revOnLine = new Coordinate(pointOnLine.y, pointOnLine.x);\n final Coordinate projPointOnLine = GeoUtils.convertToEuclidean(revOnLine);\n return VectorFactory.getDefault().createVector2D(projPointOnLine.x, projPointOnLine.y);\n}\n"
"private void smooth(ArrayList<Point2D> pixels) {\n for (Point2D p : pixels) {\n int x = (int) Math.round(p.x);\n int y = (int) Math.round(p.y);\n double attenuatedInc = Math.round(increment * pencil.strength * pencil.getApplicationRatio(new Point2D(x, y).getMult(ModelManager.getBattlefield().getMap().width, ModelManager.getBattlefield().getMap().height).getDivision(ModelManager.getBattlefield().getMap().atlas.getWidth(), ModelManager.getBattlefield().getMap().atlas.getHeight())));\n int activeLayerCount = 0;\n for (AtlasLayer l : ModelManager.getBattlefield().getMap().atlas.getLayers()) {\n if (l.get(x, y) != 0) {\n activeLayerCount++;\n }\n }\n double targetVal = 255 / activeLayerCount;\n for (AtlasLayer l : ModelManager.getBattlefield().getMap().atlas.getLayers()) {\n if (l.get(x, y) != 0) {\n double diff = targetVal - l.get(x, y);\n if (diff < 0) {\n l.set(x, y, l.get(x, y) + Math.max(diff, -attenuatedInc));\n } else if (diff > 0) {\n l.set(x, y, l.get(x, y) + Math.min(diff, attenuatedInc));\n }\n }\n }\n ModelManager.getBattlefield().getMap().atlas.updatePixel(x, y);\n }\n}\n"
"public void execute(ExecutionContext executionContext) throws Exception {\n NodeRef pkg = ((JBPMNode) executionContext.getContextInstance().getVariable(\"String_Node_Str\")).getNodeRef();\n Pair<Integer, String> pkgPath = AVMNodeConverter.ToAVMVersionPath(pkg);\n String description = (String) executionContext.getContextInstance().getVariable(\"String_Node_Str\");\n String tag = (String) executionContext.getContextInstance().getVariable(\"String_Node_Str\");\n AVMNodeDescriptor pkgDesc = fAVMService.lookup(pkgPath.getFirst(), pkgPath.getSecond());\n String targetPath = pkgDesc.getIndirection();\n List<AVMDifference> stagingDiffs = fAVMSyncService.compare(pkgPath.getFirst(), pkgPath.getSecond(), -1, targetPath, null);\n for (AVMDifference diff : stagingDiffs) {\n fAVMSubmittedAspect.clearSubmitted(diff.getSourceVersion(), diff.getSourcePath());\n }\n fAVMSyncService.update(stagingDiffs, null, false, false, true, true, tag, description);\n String from = (String) executionContext.getContextInstance().getVariable(\"String_Node_Str\");\n if (from != null && from.length() > 0) {\n List<AVMDifference> sandboxDiffs = fAVMSyncService.compare(pkgPath.getFirst(), pkgPath.getSecond(), -1, from, null);\n fAVMSyncService.update(sandboxDiffs, null, true, true, false, false, tag, description);\n AVMDAOs.Instance().fAVMNodeDAO.flush();\n fAVMSyncService.flatten(from, targetPath);\n }\n}\n"
"public void on_saveTimeIntervalButton_clicked() {\n ArrayList<String> timeIntervallData = getTimeFromTID();\n WorkshopController.newTimeIntervall(timeIntervallData);\n sImpl.ui.treeWidget.clear();\n sImpl.init();\n int hours = WorkshopController.getDuration(sImpl.mDImpl.workShopID);\n sImpl.mDImpl.setDuration(hours);\n}\n"
"public static ProgramInfo getProgramInfo(byte[] program) throws IOException {\n ProgramInfo info = new ProgramInfo();\n if (program.length <= 2) {\n }\n byte end = program[program.length - 1];\n byte[] temp = new byte[program.length - 1];\n System.arraycopy(program, 0, temp, 0, program.length - 1);\n ByteArrayInputStream bais = new ByteArrayInputStream(temp);\n BinaryReader reader = new BinaryReader(bais);\n if (end == ScriptOp.OP_CHECKSIG.getByte()) {\n try {\n byte[] publicKey = readBytes(reader);\n info.setPublicKey(new byte[][] { publicKey });\n info.setM((short) 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else if (end == ScriptOp.OP_CHECKMULTISIG.getByte()) {\n short m = 0;\n try {\n m = reader.readByte();\n } catch (Exception e) {\n e.printStackTrace();\n }\n byte[][] pub = new byte[m][];\n for (int i = 0; i < (int) m; i++) {\n pub[i] = readBytes(reader);\n }\n info.setPublicKey(pub);\n List<byte[]> buffer = new ArrayList();\n while (true) {\n ScriptOp code = readOpCode(reader);\n if (code == ScriptOp.OP_CHECKMULTISIG) {\n readOpCode(reader);\n break;\n } else if (code == ScriptOp.OP_0) {\n readOpCode(reader);\n BigInteger bint = BigInteger.valueOf(0);\n buffer.add(Helper.BigInt2Bytes(bint));\n } else {\n int num = (int) code.getByte() - (int) ScriptOp.OP_1.getByte() + 1;\n if (num >= 1 && num <= 16) {\n readOpCode(reader);\n BigInteger bint = BigInteger.valueOf(num);\n buffer.add(Helper.BigInt2Bytes(bint));\n } else {\n buffer.add(readBytes(reader));\n }\n }\n }\n byte[][] buffers = new byte[buffer.size()][];\n for (int i = 0; i < buffer.size(); i++) {\n buffers[i] = buffer.get(i);\n }\n BigInteger bint = new BigInteger(buffers[buffers.length - 1]);\n long n = bint.longValue();\n if (1 <= m && m <= n && n <= 1024) {\n }\n info.setPublicKey(buffers);\n }\n return info;\n}\n"
"private void recuperaIntent() {\n Intent intent = getIntent();\n this.configuracao = (ConfiguracaoParatida) intent.getSerializableExtra(ConfiguracaoParatida.CONFIGURACAO);\n this.jogador = (Jogador) intent.getSerializableExtra(Jogador.JOGADOR);\n}\n"
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n switch(requestCode) {\n case ChooseFile.FILE_TRANSFER_CODE:\n if (data == null)\n return;\n ArrayList<Uri> uris = new ArrayList<>();\n ArrayList<Long> filesLength = new ArrayList<>();\n ArrayList<String> fileNames = new ArrayList<>();\n try {\n ClipData clipData = data.getClipData();\n if (clipData != null) {\n for (int i = 0; i < clipData.getItemCount(); i++) {\n uris.add(clipData.getItemAt(i).getUri());\n String fileName = PathUtil.getPath(getApplicationContext(), clipData.getItemAt(i).getUri());\n filesLength.add(new File(fileName).length());\n fileName = FilesUtil.getFileName(fileName);\n fileNames.add(fileName);\n Log.d(\"String_Node_Str\", clipData.getItemAt(i).getUri().toString());\n Log.d(\"String_Node_Str\", fileName);\n }\n } else {\n Uri uri = data.getData();\n uris.add(uri);\n String fileName = PathUtil.getPath(getApplicationContext(), uri);\n filesLength.add(new File(fileName).length());\n fileName = FilesUtil.getFileName(fileName);\n fileNames.add(fileName);\n }\n sendFilesAdapter.notifyAdapter(uris, filesLength, fileNames);\n TransferData transferData = new TransferData(SendFileActivity.this, uris, filesLength, fileNames, (sendFilesAdapter), serverAddress, p2pManager, channel);\n transferData.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n}\n"
"public void onAvatarClick(String roomId, String userId) {\n Intent startRoomInfoIntent = new Intent(mContext, MemberDetailsActivity.class);\n startRoomInfoIntent.putExtra(MemberDetailsActivity.EXTRA_ROOM_ID, roomId);\n startRoomInfoIntent.putExtra(MemberDetailsActivity.EXTRA_MEMBER_ID, userId);\n startRoomInfoIntent.putExtra(MemberDetailsActivity.EXTRA_ACCOUNT_ID, mSession.getCredentials().userId);\n mContext.startActivity(startRoomInfoIntent);\n}\n"
"public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {\n this.viewer = viewer;\n try {\n if (fileProvider != null) {\n fileProvider.dispose();\n }\n if (newInput instanceof IFileProvider) {\n AlertUtils.showStatusErrorMessage(null, viewpart);\n AlertUtils.showStatusMessage(\"String_Node_Str\", viewpart);\n fileProvider = (IFileProvider) newInput;\n fileProvider.setViewPart(this.viewpart);\n fileProvider.connect();\n } else {\n fileProvider = null;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n}\n"
"protected final void prepare(ExecuteContext ctx) throws SQLException {\n if (resultSetConcurrency != 0 || resultSetType != 0 || resultSetHoldability != 0) {\n int type = resultSetType != 0 ? resultSetType : ResultSet.TYPE_FORWARD_ONLY;\n int concurrency = resultSetConcurrency != 0 ? resultSetConcurrency : ResultSet.CONCUR_READ_ONLY;\n if (resultSetHoldability == 0) {\n ctx.statement(ctx.connection().prepareStatement(ctx.sql(), type, concurrency));\n } else {\n ctx.statement(ctx.connection().prepareStatement(ctx.sql(), type, concurrency, resultSetHoldability));\n }\n } else if (isForUpdate() && asList(CUBRID, SQLSERVER).contains(ctx.configuration().dialect())) {\n ctx.data(DATA_LOCK_ROWS_FOR_UPDATE, true);\n ctx.statement(ctx.connection().prepareStatement(ctx.sql(), TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE));\n } else {\n ctx.statement(ctx.connection().prepareStatement(ctx.sql()));\n }\n if (size != 0) {\n if (log.isDebugEnabled())\n log.debug(\"String_Node_Str\", size);\n ctx.statement().setFetchSize(size);\n }\n if (maxRows != 0) {\n ctx.statement().setMaxRows(maxRows);\n }\n}\n"
"protected String serializeValue(final String type, final Object value) {\n throw new MediaTypeNotSupportedException(Response.Status.NOT_ACCEPTABLE, supported, requested);\n}\n"
"public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(NetworkMonitorService.NEW_ENDPOINT)) {\n String address = (String) intent.getExtras().get(NetworkMonitorService.ENDPOINT_ADDRESS), hardware = (String) intent.getExtras().get(NetworkMonitorService.ENDPOINT_HARDWARE);\n Target target = Target.getFromString(address);\n target.getEndpoint().setHardware(Endpoint.parseMacAddress(hardware));\n if (System.addOrderedTarget(target) == true) {\n MainActivity.this.runOnUiThread(new Runnable() {\n public void run() {\n mTargetAdapter.notifyDataSetChanged();\n }\n });\n }\n } else if (intent.getAction().equals(UpdateService.UPDATE_AVAILABLE)) {\n final String remoteVersion = (String) intent.getExtras().get(UpdateService.AVAILABLE_VERSION);\n MainActivity.this.runOnUiThread(new Runnable() {\n public void run() {\n new ConfirmDialog(\"String_Node_Str\", \"String_Node_Str\" + remoteVersion + \"String_Node_Str\", MainActivity.this, new ConfirmDialogListener() {\n public void onConfirm() {\n final ProgressDialog dialog = ProgressDialog.show(MainActivity.this, \"String_Node_Str\", \"String_Node_Str\", true, false);\n new Thread(new Runnable() {\n public void run() {\n if (System.getUpdateManager().downloadUpdate() == false) {\n MainActivity.this.runOnUiThread(new Runnable() {\n public void run() {\n new ErrorDialog(\"String_Node_Str\", \"String_Node_Str\", MainActivity.this).show();\n }\n });\n }\n dialog.dismiss();\n }\n }).start();\n }\n }\n };\n mIntentFilter = new IntentFilter();\n mIntentFilter.addAction(NetworkMonitorService.NEW_ENDPOINT);\n mIntentFilter.addAction(UpdateService.UPDATE_AVAILABLE);\n registerReceiver(mMessageReceiver, mIntentFilter);\n if (System.getSettings().getBoolean(\"String_Node_Str\", true))\n startService(new Intent(MainActivity.this, UpdateService.class));\n } catch (Exception e) {\n new FatalDialog(\"String_Node_Str\", e.getMessage(), MainActivity.this).show();\n }\n }\n}\n"
"public void beginSpan(MarkPos pos, Span span) {\n copyUpTo(pos);\n buf.append(\"String_Node_Str\");\n if (!inContext) {\n buf.append(\"String_Node_Str\");\n buf.append(Integer.toString(span.rank + 1));\n buf.append(\"String_Node_Str\");\n buf.append(Integer.toString((int) (span.score * 100)));\n buf.append(\"String_Node_Str\");\n }\n buf.append(\"String_Node_Str\");\n inSpan = true;\n}\n"
"protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {\n int cmpcount = 0;\n if (formLayout instanceof FormLayoutContainer) {\n FormLayoutContainer layoutCont = (FormLayoutContainer) formLayout;\n layoutCont.contextPut(\"String_Node_Str\", entry);\n layoutCont.contextPut(\"String_Node_Str\", new Boolean(guestOnly));\n String cssClass = RepositoyUIFactory.getIconCssClass(entry);\n layoutCont.contextPut(\"String_Node_Str\", cssClass);\n RepositoryHandler handler = RepositoryHandlerFactory.getInstance().getRepositoryHandler(entry);\n VFSContainer mediaContainer = handler.getMediaContainer(entry);\n if (mediaContainer != null) {\n baseUrl = registerMapper(ureq, new VFSContainerMapper(mediaContainer.getParentContainer()));\n }\n setText(entry.getDescription(), \"String_Node_Str\", layoutCont);\n setText(entry.getRequirements(), \"String_Node_Str\", layoutCont);\n setText(entry.getObjectives(), \"String_Node_Str\", layoutCont);\n setText(entry.getCredits(), \"String_Node_Str\", layoutCont);\n VFSLeaf movie = repositoryService.getIntroductionMovie(entry);\n VFSLeaf image = repositoryService.getIntroductionImage(entry);\n if (image != null || movie != null) {\n ImageComponent ic = new ImageComponent(ureq.getUserSession(), \"String_Node_Str\");\n if (movie != null) {\n ic.setMedia(movie);\n ic.setMaxWithAndHeightToFitWithin(500, 300);\n if (image != null) {\n ic.setPoster(image);\n }\n } else {\n ic.setMedia(image);\n ic.setMaxWithAndHeightToFitWithin(500, 300);\n }\n layoutCont.put(\"String_Node_Str\", ic);\n }\n if (repositoryModule.isCatalogEnabled()) {\n List<CatalogEntry> categories = catalogManager.getCatalogEntriesReferencing(entry);\n List<String> categoriesLink = new ArrayList<>(categories.size());\n for (CatalogEntry category : categories) {\n String id = \"String_Node_Str\" + ++cmpcount;\n String title = category.getParent().getName();\n FormLink catLink = uifactory.addFormLink(id, \"String_Node_Str\", title, null, layoutCont, Link.LINK | Link.NONTRANSLATED);\n catLink.setUserObject(category.getKey());\n categoriesLink.add(id);\n }\n layoutCont.contextPut(\"String_Node_Str\", categoriesLink);\n }\n if (!guestOnly) {\n boolean marked;\n if (row == null) {\n marked = markManager.isMarked(entry, getIdentity(), null);\n } else {\n marked = row.isMarked();\n }\n markLink = uifactory.addFormLink(\"String_Node_Str\", \"String_Node_Str\", marked ? \"String_Node_Str\" : \"String_Node_Str\", null, layoutCont, Link.LINK);\n markLink.setElementCssClass(\"String_Node_Str\");\n markLink.setIconLeftCSS(marked ? Mark.MARK_CSS_LARGE : Mark.MARK_ADD_CSS_LARGE);\n }\n Integer myRating;\n if (row == null) {\n myRating = userRatingsDao.getRatingValue(getIdentity(), entry, null);\n } else {\n myRating = row.getMyRating();\n }\n RepositoryEntryStatistics statistics = entry.getStatistics();\n Double averageRating = statistics.getRating();\n long numOfRatings = statistics.getNumOfRatings();\n float ratingValue = myRating == null ? 0f : myRating.floatValue();\n float averageRatingValue = averageRating == null ? 0f : averageRating.floatValue();\n ratingEl = new RatingWithAverageFormItem(\"String_Node_Str\", ratingValue, averageRatingValue, 5, numOfRatings);\n ratingEl.setEnabled(!guestOnly);\n layoutCont.add(\"String_Node_Str\", ratingEl);\n long numOfComments = statistics.getNumOfComments();\n String title = \"String_Node_Str\" + numOfComments + \"String_Node_Str\";\n commentsLink = uifactory.addFormLink(\"String_Node_Str\", \"String_Node_Str\", title, null, layoutCont, Link.NONTRANSLATED);\n commentsLink.setCustomEnabledLinkCSS(\"String_Node_Str\");\n String css = numOfComments > 0 ? \"String_Node_Str\" : \"String_Node_Str\";\n commentsLink.setIconLeftCSS(css);\n List<String> roles = repositoryService.getRoles(getIdentity(), entry);\n boolean isMember = roles.contains(GroupRoles.owner.name()) || roles.contains(GroupRoles.coach.name()) || roles.contains(GroupRoles.participant.name());\n if (isMember) {\n Boolean isAuthor = Boolean.valueOf(roles.contains(GroupRoles.owner.name()));\n layoutCont.contextPut(\"String_Node_Str\", isAuthor);\n }\n layoutCont.contextPut(\"String_Node_Str\", ureq.getUserSession().getRoles());\n String accessI18n = null;\n List<PriceMethod> types = new ArrayList<PriceMethod>();\n if (entry.isMembersOnly()) {\n types.add(new PriceMethod(\"String_Node_Str\", \"String_Node_Str\", translate(\"String_Node_Str\")));\n if (isMember) {\n String linkText = translate(\"String_Node_Str\", translate(entry.getOlatResource().getResourceableTypeName()));\n startLink = uifactory.addFormLink(\"String_Node_Str\", \"String_Node_Str\", linkText, null, layoutCont, Link.BUTTON + Link.NONTRANSLATED);\n startLink.setElementCssClass(\"String_Node_Str\");\n startLink.setIconRightCSS(\"String_Node_Str\");\n startLink.setPrimary(true);\n }\n accessI18n = translate(\"String_Node_Str\");\n } else {\n AccessResult acResult = acService.isAccessible(entry, getIdentity(), false);\n if (acResult.isAccessible()) {\n String linkText = translate(\"String_Node_Str\", translate(entry.getOlatResource().getResourceableTypeName()));\n startLink = uifactory.addFormLink(\"String_Node_Str\", \"String_Node_Str\", linkText, null, layoutCont, Link.BUTTON + Link.NONTRANSLATED);\n startLink.setElementCssClass(\"String_Node_Str\");\n } else if (acResult.getAvailableMethods().size() > 0) {\n for (OfferAccess access : acResult.getAvailableMethods()) {\n AccessMethod method = access.getMethod();\n String type = (method.getMethodCssClass() + \"String_Node_Str\").intern();\n Price p = access.getOffer().getPrice();\n String price = p == null || p.isEmpty() ? \"String_Node_Str\" : PriceFormat.fullFormat(p);\n AccessMethodHandler amh = acModule.getAccessMethodHandler(method.getType());\n String displayName = amh.getMethodName(getLocale());\n types.add(new PriceMethod(price, type, displayName));\n }\n String linkText = translate(\"String_Node_Str\", translate(entry.getOlatResource().getResourceableTypeName()));\n startLink = uifactory.addFormLink(\"String_Node_Str\", \"String_Node_Str\", linkText, null, layoutCont, Link.BUTTON + Link.NONTRANSLATED);\n startLink.setCustomEnabledLinkCSS(\"String_Node_Str\");\n startLink.setElementCssClass(\"String_Node_Str\");\n } else {\n String linkText = translate(\"String_Node_Str\", translate(entry.getOlatResource().getResourceableTypeName()));\n startLink = uifactory.addFormLink(\"String_Node_Str\", \"String_Node_Str\", linkText, null, layoutCont, Link.BUTTON + Link.NONTRANSLATED);\n startLink.setEnabled(false);\n startLink.setElementCssClass(\"String_Node_Str\");\n }\n startLink.setIconRightCSS(\"String_Node_Str\");\n startLink.setPrimary(true);\n switch(entry.getAccess()) {\n case 0:\n accessI18n = \"String_Node_Str\";\n break;\n case 1:\n accessI18n = translate(\"String_Node_Str\");\n break;\n case 2:\n accessI18n = translate(\"String_Node_Str\");\n break;\n case 3:\n accessI18n = translate(\"String_Node_Str\");\n break;\n case 4:\n accessI18n = translate(\"String_Node_Str\");\n break;\n }\n }\n layoutCont.contextPut(\"String_Node_Str\", accessI18n);\n if (!types.isEmpty()) {\n layoutCont.contextPut(\"String_Node_Str\", types);\n }\n if (isMember) {\n SearchBusinessGroupParams params = new SearchBusinessGroupParams(getIdentity(), true, true);\n List<BusinessGroup> groups = businessGroupService.findBusinessGroups(params, entry, 0, -1);\n List<String> groupLinkNames = new ArrayList<>(groups.size());\n for (BusinessGroup group : groups) {\n String groupLinkName = \"String_Node_Str\" + ++cmpcount;\n FormLink link = uifactory.addFormLink(groupLinkName, \"String_Node_Str\", group.getName(), null, layoutCont, Link.LINK | Link.NONTRANSLATED);\n link.setUserObject(group.getKey());\n groupLinkNames.add(groupLinkName);\n }\n layoutCont.contextPut(\"String_Node_Str\", groupLinkNames);\n }\n boolean passed = false;\n boolean failed = false;\n String score = null;\n if (row != null) {\n passed = row.isPassed();\n failed = row.isFailed();\n score = row.getScore();\n } else {\n UserEfficiencyStatement statement = effManager.getUserEfficiencyStatementLight(entry.getKey(), getIdentity());\n if (statement != null) {\n Boolean p = statement.getPassed();\n if (p != null) {\n passed = p.booleanValue();\n failed = !p.booleanValue();\n }\n Float scoreVal = statement.getScore();\n if (scoreVal != null) {\n score = AssessmentHelper.getRoundedScore(scoreVal);\n }\n }\n }\n layoutCont.contextPut(\"String_Node_Str\", passed);\n layoutCont.contextPut(\"String_Node_Str\", failed);\n layoutCont.contextPut(\"String_Node_Str\", score);\n Date recentLaunch = null;\n if (row != null) {\n recentLaunch = row.getRecentLaunch();\n } else {\n Long courseResId = entry.getOlatResource().getResourceableId();\n UserCourseInformations infos = userCourseInfosManager.getUserCourseInformations(courseResId, getIdentity());\n if (infos != null) {\n recentLaunch = infos.getRecentLaunch();\n }\n }\n layoutCont.contextPut(\"String_Node_Str\", recentLaunch);\n String numUsers;\n OLATResourceable ores = entry.getOlatResource();\n int cnt = 0;\n OLATResourceable courseRunOres = OresHelper.createOLATResourceableInstance(RunMainController.ORES_TYPE_COURSE_RUN, entry.getOlatResource().getResourceableId());\n if (ores != null)\n cnt = coordinatorManager.getCoordinator().getEventBus().getListeningIdentityCntFor(courseRunOres);\n numUsers = String.valueOf(cnt);\n layoutCont.contextPut(\"String_Node_Str\", numUsers);\n String referenceDetails = referenceManager.getReferencesToSummary(entry.getOlatResource(), getLocale());\n if (referenceDetails != null) {\n layoutCont.contextPut(\"String_Node_Str\", referenceDetails);\n }\n String url = Settings.getServerContextPathURI() + \"String_Node_Str\" + entry.getKey();\n layoutCont.contextPut(\"String_Node_Str\", url);\n layoutCont.contextPut(\"String_Node_Str\", (entry.getAccess() >= RepositoryEntry.ACC_USERS_GUESTS ? Boolean.TRUE : Boolean.FALSE));\n List<Identity> authors = repositoryService.getMembers(entry, GroupRoles.owner.name());\n List<String> authorLinkNames = new ArrayList<String>(authors.size());\n int counter = 0;\n for (Identity author : authors) {\n if (!duplicates.contains(author.getKey())) {\n String authorName = userManager.getUserDisplayName(author);\n FormLink authorLink = uifactory.addFormLink(\"String_Node_Str\" + ++counter, \"String_Node_Str\", authorName, null, formLayout, Link.NONTRANSLATED | Link.LINK);\n authorLink.setUserObject(author.getKey());\n authorLinkNames.add(authorLink.getComponent().getComponentName());\n duplicates.add(author.getKey());\n }\n }\n layoutCont.contextPut(\"String_Node_Str\", authorLinkNames);\n }\n}\n"
"public void renameCleanupActions(Map<String, Arg> renames, boolean inputsOnly) {\n for (CleanupAction a : cleanupActions) {\n a.renameVars(renames, inputsOnly);\n }\n}\n"
"private void setCapacities() {\n Constants.DIMENSION = dimension;\n Constants.MAX_CHILDREN = 10;\n Constants.MIN_CHILDREN = 4;\n}\n"
"private void testMap(Map<String, Integer> datasets, TestSuite testSuite, SchemaSource ontologySource) {\n DatasetOverviewResults overviewResults = new DatasetOverviewResults();\n for (Map.Entry<String, Integer> entry : datasets.entrySet()) {\n String resource = resourcePrefix + entry.getKey();\n int errors = entry.getValue();\n long failedTestCases = -1;\n for (TestCaseExecutionType executionType : TestCaseExecutionType.values()) {\n final TestSource modelSource = new TestSourceBuilder().setImMemSingle().setPrefixUri(\"String_Node_Str\", resource).setInMemReader(RdfReaderFactory.createResourceReader(resourcePrefix + resource)).setReferenceSchemata(ontologySource).build();\n RDFUnitStaticValidator.validate(executionType, modelSource, testSuite, overviewResults);\n if (!executionType.equals(TestCaseExecutionType.statusTestCaseResult)) {\n assertEquals(executionType + \"String_Node_Str\" + resource, errors, overviewResults.getIndividualErrors());\n }\n if (failedTestCases == -1) {\n failedTestCases = overviewResults.getFailedTests();\n } else {\n assertEquals(executionType + \"String_Node_Str\" + resource, failedTestCases, overviewResults.getFailedTests());\n }\n assertEquals(executionType + \"String_Node_Str\" + resource, 0, overviewResults.getErrorTests());\n }\n }\n}\n"
"public ArrayList<ItemStack> getNewInventory() {\n ArrayList<ItemStack> ret = new ArrayList<ItemStack>();\n for (int i = 0; i < item_mats.size(); i++) {\n ItemStack item = new ItemStack(item_mats.get(i), item_amounts.get(i), item_data.get(i));\n item.setDurability(item_durability.get(i));\n ItemMeta im = item.getItemMeta();\n im.setDisplayName(item_displaynames.get(i));\n if (item_enchid.get(i) != null) {\n int c = 0;\n for (Integer ench : item_enchid.get(i)) {\n im.addEnchant(Enchantment.getById(ench), item_enchid_lv.get(i).get(c), true);\n c++;\n }\n }\n item.setItemMeta(im);\n if (item.getType() == Material.POTION && item.getDurability() > 0) {\n Potion potion = Potion.fromDamage(item.getDurability() & 0x3F);\n potion.setSplash(item_splash.get(i));\n } else if (item.getType() == Material.ENCHANTED_BOOK) {\n ItemStack neww = new ItemStack(Material.ENCHANTED_BOOK);\n EnchantmentStorageMeta meta = (EnchantmentStorageMeta) neww.getItemMeta();\n int c_ = 0;\n for (Integer ench : enchbook_id.get(i)) {\n meta.addStoredEnchant(Enchantment.getById(ench), enchbook_id_lv.get(i).get(c_), true);\n c_++;\n }\n neww.setItemMeta(meta);\n item = neww;\n }\n ret.add(item);\n }\n return ret;\n}\n"
"private synchronized void init(Context context) {\n try {\n String agencyProviderMetaData = getAgencyProviderMetaData(context);\n String agencyProviderTypeMetaData = context.getString(R.string.agency_provider_type);\n String rtsProviderMetaData = context.getString(R.string.rts_provider);\n String scheduleProviderMetaData = getScheduleProviderMetaData(context);\n String statusProviderMetaData = getStatusProviderMetaData(context);\n String serviceUpdateProviderMetaData = getServiceUpdateProviderMetaData(context);\n String newsProviderMetaData = getNewsProviderMetaData(context);\n String statusProviderTargetMetaData = context.getString(R.string.status_provider_target);\n String scheduleProviderTargetMetaData = context.getString(R.string.schedule_provider_target);\n String serviceUpdateProviderTargetMetaData = context.getString(R.string.service_update_provider_target);\n String newsProviderTargetMetaData = context.getString(R.string.news_provider_target);\n PackageManager pm = context.getPackageManager();\n for (PackageInfo packageInfo : pm.getInstalledPackages(PackageManager.GET_PROVIDERS | PackageManager.GET_META_DATA)) {\n ProviderInfo[] providers = packageInfo.providers;\n if (providers != null) {\n for (ProviderInfo provider : providers) {\n if (provider.metaData != null) {\n if (agencyProviderMetaData.equals(provider.metaData.getString(agencyProviderMetaData))) {\n int agencyTypeId = provider.metaData.getInt(agencyProviderTypeMetaData, -1);\n if (agencyTypeId >= 0) {\n DataSourceType newAgencyType = DataSourceType.parseId(agencyTypeId);\n if (newAgencyType != null) {\n if (!this.allAgencyTypes.contains(newAgencyType)) {\n this.allAgencyTypes.add(newAgencyType);\n }\n }\n }\n this.agenciesAuthorityTypeId.put(provider.authority, agencyTypeId);\n }\n boolean isRTS = rtsProviderMetaData.equals(provider.metaData.getString(rtsProviderMetaData));\n this.agenciesAuthorityIsRts.put(provider.authority, isRTS);\n this.allAgenciesAuthority.add(provider.authority);\n }\n if (statusProviderMetaData.equals(provider.metaData.getString(statusProviderMetaData))) {\n String targetAuthority = provider.metaData.getString(statusProviderTargetMetaData);\n StatusProviderProperties newStatusProvider = new StatusProviderProperties(provider.authority, targetAuthority);\n addNewStatusProvider(newStatusProvider);\n }\n if (scheduleProviderMetaData.equals(provider.metaData.getString(scheduleProviderMetaData))) {\n String targetAuthority = provider.metaData.getString(scheduleProviderTargetMetaData);\n ScheduleProviderProperties newScheduleProvider = new ScheduleProviderProperties(provider.authority, targetAuthority);\n addNewScheduleProvider(newScheduleProvider);\n }\n if (serviceUpdateProviderMetaData.equals(provider.metaData.getString(serviceUpdateProviderMetaData))) {\n String targetAuthority = provider.metaData.getString(serviceUpdateProviderTargetMetaData);\n ServiceUpdateProviderProperties newServiceUpdateProvider = new ServiceUpdateProviderProperties(provider.authority, targetAuthority);\n addNewServiceUpdateProvider(newServiceUpdateProvider);\n }\n if (newsProviderMetaData.equals(provider.metaData.getString(newsProviderMetaData))) {\n String targetAuthority = provider.metaData.getString(newsProviderTargetMetaData);\n NewsProviderProperties newNewsProvider = new NewsProviderProperties(provider.authority, targetAuthority);\n addNewNewsProvider(newNewsProvider);\n }\n }\n }\n }\n }\n CollectionUtils.sort(this.allAgencyTypes, new DataSourceType.DataSourceTypeShortNameComparator(context));\n}\n"
"public CsdlActionImport getActionImport(final FullQualifiedName entityContainer, final String name) throws ODataException {\n if (entityContainer.equals(nameContainer)) {\n if (name.equals(AIRT_STRING)) {\n return new CsdlActionImport().setName(AIRT_STRING).setAction(ActionProvider.nameUARTString).setAnnotations(Arrays.asList(new CsdlAnnotation().setTerm(\"String_Node_Str\").setExpression(new CsdlConstantExpression(CsdlConstantExpression.ConstantExpressionType.String, \"String_Node_Str\")), new CsdlAnnotation().setTerm(TermProvider.TERM_DATA.getFullQualifiedNameAsString()).setExpression(new CsdlConstantExpression(CsdlConstantExpression.ConstantExpressionType.Bool, \"String_Node_Str\"))));\n } else if (name.equals(AIRT_COLL_STRING_TWO_PARAM)) {\n return new CsdlActionImport().setName(AIRT_COLL_STRING_TWO_PARAM).setAction(ActionProvider.nameUARTCollStringTwoParam);\n } else if (name.equals(AIRTCT_TWO_PRIM_PARAM)) {\n return new CsdlActionImport().setName(AIRTCT_TWO_PRIM_PARAM).setAction(ActionProvider.nameUARTCTTwoPrimParam);\n } else if (name.equals(AIRT_COLL_CT_TWO_PRIM_PARAM)) {\n return new CsdlActionImport().setName(AIRT_COLL_CT_TWO_PRIM_PARAM).setAction(ActionProvider.nameUARTCollCTTwoPrimParam);\n } else if (name.equals(AIRTET_TWO_KEY_TWO_PRIM_PARAM)) {\n return new CsdlActionImport().setName(AIRTET_TWO_KEY_TWO_PRIM_PARAM).setAction(ActionProvider.nameUARTETTwoKeyTwoPrimParam);\n } else if (name.equals(AIRT_COLL_ET_KEY_NAV_PARAM)) {\n return new CsdlActionImport().setName(AIRT_COLL_ET_KEY_NAV_PARAM).setAction(ActionProvider.nameUARTCollETKeyNavParam);\n } else if (name.equals(AIRTES_ALL_PRIM_PARAM)) {\n return new CsdlActionImport().setName(AIRTES_ALL_PRIM_PARAM).setEntitySet(\"String_Node_Str\").setAction(ActionProvider.nameUARTETAllPrimParam);\n } else if (name.equals(AIRT_COLL_ES_ALL_PRIM_PARAM)) {\n return new CsdlActionImport().setName(AIRT_COLL_ES_ALL_PRIM_PARAM).setEntitySet(\"String_Node_Str\").setAction(ActionProvider.nameUARTCollETAllPrimParam);\n } else if (name.equals(AIRT)) {\n return new CsdlActionImport().setName(AIRT).setAction(ActionProvider.nameUART);\n } else if (name.equals(AIRT_PARAM)) {\n return new CsdlActionImport().setName(AIRT_PARAM).setAction(ActionProvider.nameUARTParam);\n } else if (name.equals(AIRT_TWO_PARAM)) {\n return new CsdlActionImport().setName(AIRT_TWO_PARAM).setAction(ActionProvider.nameUARTTwoParam);\n } else if (name.equals(AIRT_BYTE_NINE_PARAM)) {\n return new CsdlActionImport().setName(AIRT_BYTE_NINE_PARAM).setAction(ActionProvider.nameUARTByteNineParam);\n }\n }\n return null;\n}\n"
"public static IOseeBranch getTestBranch() {\n return CoverageBranches.COVERAGE_TEST_BRANCH;\n}\n"
"public AccountId channelSignIn(ChannelType channelType, CriteriaContext context, SignIn signIn, Validator validator) {\n Validate.entityThrowingException(validator, signIn);\n CacheKey cacheKey = null;\n if (channelType == EMAIL) {\n cacheKey = CacheKeys.emailSignInRequest(signIn);\n } else if (channelType == PHONE) {\n cacheKey = PHONE_CACHE_KEY_FUNC.apply(signIn);\n } else {\n throw new UnsupportedOperationException(\"String_Node_Str\");\n }\n String storedToken = cacheProvider.getObject(cacheKey, String.class);\n if (storedToken == null || !storedToken.equals(signIn.getToken())) {\n throw new AuthenticationFailedException();\n }\n cacheProvider.removeObject(cacheKey);\n return signIn.getAccountId();\n}\n"
"public Response execute() {\n DatabaseAccessor db = null;\n try {\n db = initDB();\n ArrayList<String> annotations = db.getAllAnnotationLabels();\n if (annotations.contains(name)) {\n db.deleteAnnotation(name);\n return new MinimalResponse(200);\n } else {\n return new ErrorResponse(HttpStatusCode.BAD_REQUEST, \"String_Node_Str\" + name + \"String_Node_Str\" + \"String_Node_Str\");\n }\n } catch (SQLException | IOException e) {\n Debug.log(\"String_Node_Str\" + name + \"String_Node_Str\" + e.getMessage());\n return new ErrorResponse(HttpStatusCode.INTERNAL_SERVER_ERROR, \"String_Node_Str\" + name + \"String_Node_Str\");\n } finally {\n if (db != null) {\n db.close();\n }\n }\n}\n"
"public void registerKeySubscriber(Subscriber<K> subscriber, Filter filter, Set<RequestContext.Operation> contextOperations) {\n final KVSSubscription<K, V> subscription = (KVSSubscription<K, V>) asset.subscription(true);\n final RequestContext rc = RequestContext.requestContext().type(keyClass).type2(valueType);\n contextOperations.forEach(e -> e.apply(rc));\n subscription.registerKeySubscriber(rc, subscriber, filter);\n}\n"
"protected void drawGuiContainerBackgroundLayer(float v, int i, int i2) {\n updateList();\n if (tileEntity != null) {\n viewMode.setCurrentChoice(tileEntity.getViewMode());\n sortMode.setCurrentChoice(tileEntity.getSortMode());\n groupMode.setCurrentChoice(tileEntity.isGroupMode() ? 1 : 0);\n filter.setText(tileEntity.getFilter());\n }\n drawWindow();\n}\n"
"public void ajustWidth(Widget aChild, int aValue) {\n if (aChild != null) {\n if (aChild.getParent() instanceof PlatypusFieldSet)\n aChild.getParent().setPixelSize(aValue, Sizer.getWidgetHeight(aChild));\n else\n aChild.setPixelSize(aValue, Sizer.getWidgetHeight(aChild));\n }\n}\n"
"public <E> List<E> getColumnsById(String joinTableName, String joinColumnName, String inverseJoinColumnName, String parentId) {\n Selector selector = Pelops.createSelector(PelopsUtils.generatePoolName(getPersistenceUnit()));\n List<Column> columns = selector.getColumnsFromRow(joinTableName, Bytes.fromUTF8(parentId), Selector.newColumnsPredicateAll(true, 10), ConsistencyLevel.ONE);\n List<E> foreignKeys = handler.getForeignKeysFromJoinTable(inverseJoinColumnName, columns);\n return foreignKeys;\n}\n"
"public Expr call(Expr expr) {\n if (expr instanceof FuncExpr) {\n FuncExpr f = (FuncExpr) expr;\n FuncExpr s = (FuncExpr) exprWithTableNamesSubstituted(expr, tablesNamesSub);\n List<Expr> samplingProbExprs = source.samplingProbabilityExprsFor(f);\n if (f.getFuncName().equals(FuncExpr.FuncName.COUNT)) {\n Expr est = FuncExpr.sum(scaleForSampling(samplingProbExprs));\n est = scaleWithPartitionSize(est, groupby, partitionCol, forErrorEst);\n return est;\n } else if (f.getFuncName().equals(FuncExpr.FuncName.COUNT_DISTINCT)) {\n String dbname = vc.getDbms().getName();\n Expr scale = scaleForSampling(samplingProbExprs);\n Expr est = null;\n if (dbname.equals(\"String_Node_Str\")) {\n est = new FuncExpr(FuncExpr.FuncName.IMPALA_APPROX_COUNT_DISTINCT, s.getUnaryExpr());\n } else {\n est = new FuncExpr(FuncExpr.FuncName.COUNT_DISTINCT, s.getUnaryExpr());\n }\n est = BinaryOpExpr.from(est, scale, \"String_Node_Str\");\n if (sampleType().equals(\"String_Node_Str\")) {\n est = scaleWithPartitionSize(est, groupbyExpr, partitionCol, forErrorEst);\n }\n return est;\n } else if (f.getFuncName().equals(FuncExpr.FuncName.SUM)) {\n Expr est = scaleForSampling(samplingProbExprs);\n est = FuncExpr.sum(BinaryOpExpr.from(s.getUnaryExpr(), est, \"String_Node_Str\"));\n est = scaleWithPartitionSize(est, groupbyExpr, partitionCol, forErrorEst);\n return est;\n } else if (f.getFuncName().equals(FuncExpr.FuncName.AVG)) {\n Expr scale = scaleForSampling(samplingProbExprs);\n Expr sumEst = FuncExpr.sum(BinaryOpExpr.from(s.getUnaryExpr(), scale, \"String_Node_Str\"));\n Expr countEst = countNotNull(s.getUnaryExpr(), scale);\n return BinaryOpExpr.from(sumEst, countEst, \"String_Node_Str\");\n } else {\n return s;\n }\n } else {\n return expr;\n }\n}\n"
"public final void add(long value) {\n if (size == data.length)\n resize(Math.max(size + 5, size * 3 / 2));\n data[size++] = value;\n}\n"
"public String convertToConLLTypes(String neType) {\n String conllType = null;\n if (neType.equalsIgnoreCase(\"String_Node_Str\") || neType.equalsIgnoreCase(\"String_Node_Str\") || neType.equalsIgnoreCase(\"String_Node_Str\") || neType.length() == 3) {\n conllType = neType.substring(0, 3);\n } else if (neType.equalsIgnoreCase(\"String_Node_Str\") || neType.equalsIgnoreCase(\"String_Node_Str\") || neType.equalsIgnoreCase(\"String_Node_Str\") || neType.equalsIgnoreCase(\"String_Node_Str\") || neType.equalsIgnoreCase(\"String_Node_Str\") || neType.equalsIgnoreCase(\"String_Node_Str\") || neType.equalsIgnoreCase(\"String_Node_Str\") || neType.equalsIgnoreCase(\"String_Node_Str\") || neType.equalsIgnoreCase(\"String_Node_Str\")) {\n conllType = neType;\n }\n return conllType;\n}\n"
"private void initializeJmsSource(String destination, int messageReceive, String initialContextFactory, String providerUrl) {\n jmsSource = new JmsSource(new JmsPluginConfig(destination, messageReceive, initialContextFactory, providerUrl, JmsSource.DEFAULT_CONNECTION_FACTORY));\n}\n"
"public Object addingService(ServiceReference reference) {\n EndpointListener listener = (EndpointListener) machine.getContext().getService(reference);\n Object ofilter = reference.getProperty(ENDPOINT_LISTENER_SCOPE);\n EndpointListerInterrest interrest = getEndpointListenerInterrest(reference);\n try {\n switch(interrest) {\n case ALL:\n exportReg.addEndpointListener(listener, (String) ofilter);\n importReg.addEndpointListener(listener, (String) ofilter);\n break;\n case REMOTE:\n exportReg.addEndpointListener(listener, (String) ofilter);\n break;\n case LOCAL:\n exportReg.addEndpointListener(listener, (String) ofilter);\n }\n } catch (Exception e) {\n importReg.removeEndpointListener(listener);\n exportReg.removeEndpointListener(listener);\n listener = null;\n }\n return new InterestedListener(listener, interrest);\n}\n"
"private void singleResultsProcess(List<TaskTrackerJobResult> results) {\n TaskTrackerJobResult result = results.get(0);\n if (!needRetry(result)) {\n if (result.getJobWrapper().getJob().isNeedFeedback()) {\n clientNotifier.send(results);\n } else {\n jobFinishHandler.onComplete(results);\n }\n } else {\n retryHandler.onComplete(results);\n }\n}\n"
"public void setBaby(boolean flag) {\n if (flag) {\n this.datawatcher.watch(12, new Integer(-24000));\n } else {\n this.datawatcher.watch(12, 0);\n }\n ((MyOcelot) myPet).isBaby = flag;\n}\n"