content
stringlengths 40
137k
|
---|
"protected String getBorderWidth(String[] values, CSSEngine engine) {\n for (int i = 0; i < values.length; i++) {\n LexicalUnit u = getUnit(values[i], engine);\n if (u != null) {\n int type = u.getLexicalUnitType();\n if (type >= LexicalUnit.SAC_EM && type <= LexicalUnit.SAC_PERCENTAGE) {\n return values[i];\n } else if (type == LexicalUnit.SAC_IDENT) {\n if (CSSConstants.CSS_MEDIUM_VALUE.equals(values[i]) || CSSConstants.CSS_THICK_VALUE.equals(values[i]) || CSSConstants.CSS_THIN_VALUE.equals(values[i])) {\n return values[i];\n }\n }\n }\n }\n return CSSConstants.CSS_MEDIUM_VALUE;\n}\n"
|
"public boolean hasInStream(String streamID, String subStreamID, int streamType) {\n String relativePath = getPath(streamID, subStreamID, streamType);\n if (reader != null && reader.exists(relativePath))\n return true;\n else if (writer != null && writer.exists(relativePath))\n return true;\n return false;\n}\n"
|
"public static void setUp() throws WSDLException {\n if (conn == null) {\n try {\n conn = buildConnection();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n String ddlCreateProp = System.getProperty(DATABASE_DDL_CREATE_KEY, DEFAULT_DATABASE_DDL_CREATE);\n if (\"String_Node_Str\".equalsIgnoreCase(ddlCreateProp)) {\n ddlCreate = true;\n }\n String ddlDropProp = System.getProperty(DATABASE_DDL_DROP_KEY, DEFAULT_DATABASE_DDL_DROP);\n if (\"String_Node_Str\".equalsIgnoreCase(ddlDropProp)) {\n ddlDrop = true;\n }\n String ddlDebugProp = System.getProperty(DATABASE_DDL_DEBUG_KEY, DEFAULT_DATABASE_DDL_DEBUG);\n if (\"String_Node_Str\".equalsIgnoreCase(ddlDebugProp)) {\n ddlDebug = true;\n }\n if (ddlCreate) {\n runDdl(conn, CREATE_PACKAGE1_MTAB1_TYPE, ddlDebug);\n runDdl(conn, CREATE_PACKAGE1_NRECORD_TYPE, ddlDebug);\n runDdl(conn, CREATE_PACKAGE1_MRECORD_TYPE, ddlDebug);\n runDdl(conn, CREATE_PACKAGE1_PACKAGE, ddlDebug);\n runDdl(conn, CREATE_PACKAGE1_BODY, ddlDebug);\n }\n DBWS_BUILDER_XML_USERNAME = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n DBWS_BUILDER_XML_PASSWORD = \"String_Node_Str\";\n DBWS_BUILDER_XML_URL = \"String_Node_Str\";\n DBWS_BUILDER_XML_DRIVER = \"String_Node_Str\";\n DBWS_BUILDER_XML_PLATFORM = \"String_Node_Str\";\n DBWS_BUILDER_XML_MAIN = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n builder = null;\n DBWSTestSuite.setUp(\"String_Node_Str\");\n}\n"
|
"private boolean buildCondition(DbMapComponent component, StringBuilder sbWhere, ExternalDbMapTable table, boolean isFirstClause, ExternalDbMapEntry dbMapEntry, boolean writeCr) {\n String expression = dbMapEntry.getExpression();\n expression = initExpression(component, dbMapEntry);\n IDbOperator dbOperator = getOperatorsManager().getOperatorFromValue(dbMapEntry.getOperator());\n boolean operatorIsSet = dbOperator != null;\n boolean expressionIsSet = expression != null && expression.trim().length() > 0;\n boolean conditionWritten = false;\n if (operatorIsSet) {\n if (writeCr) {\n sbWhere.append(DbMapSqlConstants.NEW_LINE);\n sbWhere.append(DbMapSqlConstants.SPACE);\n }\n if (!isFirstClause) {\n sbWhere.append(DbMapSqlConstants.SPACE);\n sbWhere.append(DbMapSqlConstants.AND);\n sbWhere.append(DbMapSqlConstants.SPACE);\n }\n String entryName = dbMapEntry.getName();\n entryName = getOriginalColumnName(entryName, component, table);\n String tableName = table.getName();\n if (table.getAlias() == null) {\n tableName = getHandledTableName(component, table.getName());\n } else {\n tableName = getHandledField(table.getName());\n }\n String locationInputEntry = language.getLocation(tableName, getHandledField(entryName));\n sbWhere.append(DbMapSqlConstants.SPACE);\n sbWhere.append(locationInputEntry);\n sbWhere.append(getSpecialRightJoin(table));\n sbWhere.append(DbMapSqlConstants.SPACE);\n if (operatorIsSet) {\n sbWhere.append(dbOperator.getOperator()).append(DbMapSqlConstants.SPACE);\n } else if (!operatorIsSet && expressionIsSet) {\n sbWhere.append(DbMapSqlConstants.LEFT_COMMENT);\n sbWhere.append(DbMapSqlConstants.SPACE);\n sbWhere.append(Messages.getString(\"String_Node_Str\", entryName));\n sbWhere.append(DbMapSqlConstants.SPACE);\n sbWhere.append(DbMapSqlConstants.RIGHT_COMMENT);\n }\n if (operatorIsSet && !expressionIsSet && !dbOperator.isMonoOperand()) {\n String str = table.getName() + DbMapSqlConstants.DOT + entryName;\n sbWhere.append(DbMapSqlConstants.LEFT_COMMENT);\n sbWhere.append(DbMapSqlConstants.SPACE);\n sbWhere.append(Messages.getString(\"String_Node_Str\", str));\n sbWhere.append(DbMapSqlConstants.SPACE);\n sbWhere.append(DbMapSqlConstants.RIGHT_COMMENT);\n } else if (expressionIsSet) {\n sbWhere.append(expression);\n sbWhere.append(getSpecialLeftJoin(table));\n }\n conditionWritten = true;\n }\n return conditionWritten;\n}\n"
|
"public static void saveStockables(int UID, ConcurrentHashMap<Check, Stockable> stockables) {\n String string = \"String_Node_Str\";\n setStockables(UID, string);\n int count = 0;\n for (Stockable entry : stockables.values()) {\n string += addToStockableString(string, entry);\n count += 1;\n }\n setStockables(UID, string);\n}\n"
|
"public List<IComponent> filterComponents(List<IComponent> allComponents) {\n List<IComponent> camelComponents = new ArrayList<IComponent>();\n if (allComponents == null || allComponents.isEmpty()) {\n return camelComponents;\n }\n String categoryName = extractComponentsCategory().getName();\n for (IComponent component : allComponents) {\n String compType = component.getPaletteType();\n if (compType != null && categoryName.equals(compType)) {\n camelComponents.add(component);\n }\n }\n return camelComponents;\n}\n"
|
"protected String _description(int detail, int indent, int bracket) {\n try {\n workspace().getReadAccess();\n String result;\n if (bracket == 1 || bracket == 2) {\n result = super._description(detail, indent, 1);\n } else {\n result = super._description(detail, indent, 0);\n }\n if ((detail & CONFIGURATION) != 0) {\n if (result.trim().length() > 0) {\n result += \"String_Node_Str\";\n }\n result += \"String_Node_Str\";\n boolean space = false;\n if (isInput()) {\n space = true;\n result += \"String_Node_Str\";\n }\n if (isOutput()) {\n if (space)\n result += \"String_Node_Str\";\n space = true;\n result += \"String_Node_Str\";\n }\n if (isMultiport()) {\n if (space)\n result += \"String_Node_Str\";\n space = true;\n result += \"String_Node_Str\";\n }\n if (isOpaque()) {\n if (space)\n result += \"String_Node_Str\";\n space = true;\n result += \"String_Node_Str\";\n }\n if (space)\n result += \"String_Node_Str\";\n result += \"String_Node_Str\" + getWidth() + \"String_Node_Str\";\n }\n if ((detail & RECEIVERS) != 0) {\n if (result.trim().length() > 0) {\n result += \"String_Node_Str\";\n }\n result += \"String_Node_Str\";\n Receiver[][] recvrs = null;\n try {\n recvrs = getReceivers();\n if (recvrs != null) {\n for (int i = 0; i < recvrs.length; i++) {\n result += _getIndentPrefix(indent + 1) + \"String_Node_Str\";\n if (recvrs[i] != null) {\n for (int j = 0; j < recvrs[i].length; j++) {\n result += _getIndentPrefix(indent + 2);\n result += \"String_Node_Str\";\n if (recvrs[i][j] != null) {\n result += recvrs[i][j].getClass().getName();\n }\n result += \"String_Node_Str\";\n }\n result += \"String_Node_Str\";\n }\n }\n result += _getIndentPrefix(indent + 1) + \"String_Node_Str\";\n }\n }\n result += _getIndentPrefix(indent) + \"String_Node_Str\";\n }\n if ((detail & REMOTERECEIVERS) != 0) {\n if (result.trim().length() > 0) {\n result += \"String_Node_Str\";\n }\n result += \"String_Node_Str\";\n Receiver[][] recvrs = null;\n try {\n recvrs = getRemoteReceivers();\n ;\n } catch (Exception e) {\n result += \"String_Node_Str\";\n }\n if (recvrs != null) {\n for (int i = 0; i < recvrs.length; i++) {\n result += _getIndentPrefix(indent + 1) + \"String_Node_Str\";\n if (recvrs[i] != null) {\n for (int j = 0; j < recvrs[i].length; j++) {\n result += _getIndentPrefix(indent + 2);\n result += \"String_Node_Str\";\n if (recvrs[i][j] != null) {\n result += recvrs[i][j].getClass().getName();\n result += \"String_Node_Str\";\n result += recvrs[i][j].getContainer().getFullName();\n }\n result += \"String_Node_Str\";\n }\n }\n result += _getIndentPrefix(indent + 1) + \"String_Node_Str\";\n }\n }\n result += _getIndentPrefix(indent) + \"String_Node_Str\";\n }\n if (bracket == 2)\n result += \"String_Node_Str\";\n return result;\n } finally {\n workspace().doneReading();\n }\n}\n"
|
"private String getState() throws IOException {\n Client client = new Client(endpointUrl, username, password);\n JSONObject instance = (JSONObject) client.doGet(instanceUrl, false);\n return instance.getString(\"String_Node_Str\");\n}\n"
|
"protected void createActions(Consumer<AnAction> actionConsumer) {\n for (final Status status : STATUSES) {\n actionConsumer.consume(new DumbAwareAction(status.label) {\n public void actionPerformed(AnActionEvent e) {\n value = Optional.of(status);\n updateFilterValueLabel(status.label);\n setChanged();\n notifyObservers(project);\n }\n });\n }\n}\n"
|
"private void changeWeapons() {\n if (!destroyedArmour && !MyEquipment.contains(\"String_Node_Str\", true)) {\n weapon = MyEquipment.getItem(MyEquipment.WEAPON).getName();\n MyInventory.getItem(\"String_Node_Str\").interact(\"String_Node_Str\");\n Game.openTab(Game.TAB_EQUIPMENT);\n sleep(Random.nextInt(500, 600));\n Game.openTab(Game.TAB_INVENTORY);\n } else if (MyInventory.getItem(weapon) != null) {\n util.clickItem(MyInventory.getItem(weapon));\n Game.openTab(Game.TAB_EQUIPMENT);\n sleep(Random.nextInt(500, 600));\n Game.openTab(Game.TAB_INVENTORY);\n } else\n killBoss();\n}\n"
|
"private void writePackageTree(WSDLDocInterface wsdlDoc) throws OutputFormatterException {\n Node root = getTypesInTree(wsdlDoc);\n StringBuffer html = new StringBuffer();\n html.append(Constants.HTML_H3_START + \"String_Node_Str\" + currentPackageName + Constants.HTML_H3_END);\n html.append(Constants.HTML_HR);\n html.append(Constants.HTML_H3_START + \"String_Node_Str\" + Constants.HTML_H3_END);\n html.append(\"String_Node_Str\");\n writeTree(root, html);\n html.append(\"String_Node_Str\");\n writeFile(html, getCurrentOutputDir(), \"String_Node_Str\" + Constants.DOT_HTML);\n System.out.println(root);\n}\n"
|
"public void testEnums2() {\n try {\n JDTResolver.recordInstances = true;\n runConformTest(new String[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" });\n JDTClassNode classnode = JDTResolver.getCachedNode(\"String_Node_Str\");\n assertNotNull(classnode);\n List<MethodNode> methods = classnode.getMethods();\n assertEquals(1, methods.size());\n assertEquals(\"String_Node_Str\", methods.get(0).getTypeDescriptor());\n classnode.lazyClassInit();\n } finally {\n JDTResolver.instances.clear();\n JDTResolver.recordInstances = false;\n }\n this.runConformTest(new String[] { \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" });\n}\n"
|
"public Serializable generate(SessionImplementor session, Object object) throws HibernateException {\n SearchResultEntity result = (SearchResultEntity) object;\n return SearchResultIdCalculator.calculateSearchResultId(result);\n}\n"
|
"public void preInitialize(AbstractSession session) throws DescriptorException {\n if (isChildDescriptor()) {\n updateTables();\n setClassIndicatorMapping(getParentDescriptor().getInheritancePolicy().getClassIndicatorMapping());\n setShouldUseClassNameAsIndicator(getParentDescriptor().getInheritancePolicy().shouldUseClassNameAsIndicator());\n getDescriptor().setPrimaryKeyFields(getParentDescriptor().getPrimaryKeyFields());\n getDescriptor().setAdditionalTablePrimaryKeyFields(Helper.concatenateMaps(getParentDescriptor().getAdditionalTablePrimaryKeyFields(), getDescriptor().getAdditionalTablePrimaryKeyFields()));\n Expression localExpression = getDescriptor().getQueryManager().getMultipleTableJoinExpression();\n Expression parentExpression = getParentDescriptor().getQueryManager().getMultipleTableJoinExpression();\n if (localExpression != null) {\n getDescriptor().getQueryManager().setInternalMultipleTableJoinExpression(localExpression.and(parentExpression));\n } else if (parentExpression != null) {\n getDescriptor().getQueryManager().setInternalMultipleTableJoinExpression(parentExpression);\n }\n Expression localAdditionalExpression = getDescriptor().getQueryManager().getAdditionalJoinExpression();\n Expression parentAdditionalExpression = getParentDescriptor().getQueryManager().getAdditionalJoinExpression();\n if (localAdditionalExpression != null) {\n getDescriptor().getQueryManager().setAdditionalJoinExpression(localAdditionalExpression.and(parentAdditionalExpression));\n } else if (parentAdditionalExpression != null) {\n getDescriptor().getQueryManager().setAdditionalJoinExpression(parentAdditionalExpression);\n }\n setClassIndicatorField(getParentDescriptor().getInheritancePolicy().getClassIndicatorField());\n if (!getDescriptor().usesSequenceNumbers()) {\n getDescriptor().setSequenceNumberField(getParentDescriptor().getSequenceNumberField());\n getDescriptor().setSequenceNumberName(getParentDescriptor().getSequenceNumberName());\n }\n } else {\n getDescriptor().setInternalDefaultTable();\n }\n initializeClassExtractor(session);\n if (!isChildDescriptor()) {\n if ((getClassIndicatorField() == null) && (!hasClassExtractor())) {\n session.getIntegrityChecker().handleError(DescriptorException.classIndicatorFieldNotFound(getDescriptor(), getDescriptor()));\n }\n if (getClassIndicatorField() != null) {\n setClassIndicatorField(getDescriptor().buildField(getClassIndicatorField()));\n if (shouldUseClassNameAsIndicator()) {\n getClassIndicatorField().setType(ClassConstants.STRING);\n } else if (!getClassIndicatorMapping().isEmpty()) {\n Class type = null;\n Iterator fieldValuesEnum = getClassIndicatorMapping().values().iterator();\n while (fieldValuesEnum.hasNext() && (type == null)) {\n Object value = fieldValuesEnum.next();\n if (value.getClass() != getClass().getClass()) {\n type = value.getClass();\n }\n }\n getClassIndicatorField().setType(type);\n }\n getDescriptor().getFields().addElement(getClassIndicatorField());\n }\n }\n}\n"
|
"private static DocumentTextComparisonResult determineOperation(DocumentTextComparisonResult[][] matrix, int i, int j) {\n DocumentTextEdits editType;\n DocumentTextComparisonResult formerResult;\n if (currentLine[j - 1].editDistance < oldLine[j - 1].editDistance) {\n if (currentLine[j - 1].editDistance < oldLine[j].editDistance) {\n formerResult = currentLine[j - 1];\n editType = DocumentTextEdits.INSERT;\n } else {\n formerResult = matrix[i - 1][j];\n editType = DocumentTextEdits.DELETE;\n }\n } else {\n if (matrix[i - 1][j - 1].editDistance < matrix[i - 1][j].editDistance) {\n formerResult = matrix[i - 1][j - 1];\n editType = DocumentTextEdits.SUBSTITUTE;\n } else {\n formerResult = matrix[i - 1][j];\n editType = DocumentTextEdits.DELETE;\n }\n }\n return DocumentTextComparisonResult.create(formerResult, editType);\n}\n"
|
"public List<Path> calcPaths(GHRequest request, GHResponse ghRsp, ByteArrayBuffer byteBuffer) {\n if (ghStorage == null || !fullyLoaded)\n throw new IllegalStateException(\"String_Node_Str\");\n if (ghStorage.isClosed())\n throw new IllegalStateException(\"String_Node_Str\");\n String vehicle = request.getVehicle();\n if (vehicle.isEmpty()) {\n vehicle = getDefaultVehicle().toString();\n request.setVehicle(vehicle);\n }\n Lock readLock = readWriteLock.readLock();\n readLock.lock();\n try {\n if (!encodingManager.supports(vehicle))\n throw new IllegalArgumentException(\"String_Node_Str\" + vehicle + \"String_Node_Str\" + \"String_Node_Str\" + getEncodingManager());\n HintsMap hints = request.getHints();\n String tModeStr = hints.get(\"String_Node_Str\", traversalMode.toString());\n TraversalMode tMode = TraversalMode.fromString(tModeStr);\n if (hints.has(Routing.EDGE_BASED))\n tMode = hints.getBool(Routing.EDGE_BASED, false) ? TraversalMode.EDGE_BASED_2DIR : TraversalMode.NODE_BASED;\n FlagEncoder encoder = encodingManager.getEncoder(vehicle);\n boolean disableCH = hints.getBool(CH.DISABLE, false);\n if (!chFactoryDecorator.isDisablingAllowed() && disableCH)\n throw new IllegalArgumentException(\"String_Node_Str\");\n boolean disableLM = hints.getBool(Landmark.DISABLE, false);\n if (!lmFactoryDecorator.isDisablingAllowed() && disableLM)\n throw new IllegalArgumentException(\"String_Node_Str\");\n String algoStr = request.getAlgorithm();\n if (algoStr.isEmpty())\n algoStr = chFactoryDecorator.isEnabled() && !disableCH && !(lmFactoryDecorator.isEnabled() && !disableLM) ? DIJKSTRA_BI : ASTAR_BI;\n List<GHPoint> points = request.getPoints();\n checkIfPointsAreInBounds(points);\n RoutingTemplate routingTemplate;\n if (ROUND_TRIP.equalsIgnoreCase(algoStr))\n routingTemplate = new RoundTripRoutingTemplate(request, ghRsp, locationIndex, maxRoundTripRetries);\n else if (ALT_ROUTE.equalsIgnoreCase(algoStr))\n routingTemplate = new AlternativeRoutingTemplate(request, ghRsp, locationIndex);\n else\n routingTemplate = new ViaRoutingTemplate(request, ghRsp, locationIndex);\n List<Path> altPaths = null;\n int maxRetries = routingTemplate.getMaxRetries();\n Locale locale = request.getLocale();\n Translation tr = trMap.getWithFallBack(locale);\n for (int i = 0; i < maxRetries; i++) {\n StopWatch sw = new StopWatch().start();\n List<QueryResult> qResults = routingTemplate.lookup(points, encoder, byteBuffer);\n ghRsp.addDebugInfo(\"String_Node_Str\" + sw.stop().getSeconds() + \"String_Node_Str\");\n if (ghRsp.hasErrors())\n return Collections.emptyList();\n RoutingAlgorithmFactory tmpAlgoFactory = getAlgorithmFactory(hints);\n Weighting weighting;\n QueryGraph queryGraph;\n if (chFactoryDecorator.isEnabled() && !disableCH) {\n boolean forceCHHeading = hints.getBool(CH.FORCE_HEADING, false);\n if (!forceCHHeading && request.hasFavoredHeading(0))\n throw new IllegalArgumentException(\"String_Node_Str\");\n RoutingAlgorithmFactory chAlgoFactory = tmpAlgoFactory;\n if (tmpAlgoFactory instanceof LMAlgoFactoryDecorator.LMRAFactory)\n chAlgoFactory = ((LMAlgoFactoryDecorator.LMRAFactory) tmpAlgoFactory).getDefaultAlgoFactory();\n if (chAlgoFactory instanceof PrepareContractionHierarchies)\n weighting = ((PrepareContractionHierarchies) chAlgoFactory).getWeighting();\n else\n throw new IllegalStateException(\"String_Node_Str\" + tmpAlgoFactory);\n tMode = getCHFactoryDecorator().getNodeBase();\n queryGraph = new QueryGraph(ghStorage.getGraph(CHGraph.class, weighting));\n queryGraph.lookup(qResults, byteBuffer);\n } else {\n checkNonChMaxWaypointDistance(points);\n queryGraph = new QueryGraph(ghStorage);\n queryGraph.lookup(qResults, byteBuffer);\n weighting = createWeighting(hints, tMode, encoder, queryGraph, ghStorage);\n ghRsp.addDebugInfo(\"String_Node_Str\" + tMode.toString());\n }\n int maxVisitedNodesForRequest = hints.getInt(Routing.MAX_VISITED_NODES, maxVisitedNodes);\n if (maxVisitedNodesForRequest > maxVisitedNodes)\n throw new IllegalArgumentException(\"String_Node_Str\" + maxVisitedNodes);\n weighting = createTurnWeighting(queryGraph, weighting, tMode);\n AlgorithmOptions algoOpts = AlgorithmOptions.start().algorithm(algoStr).traversalMode(tMode).weighting(weighting).maxVisitedNodes(maxVisitedNodesForRequest).hints(hints).build();\n if (request.getEdgeFilter() != null)\n algoOpts.setEdgeFilter(request.getEdgeFilter());\n PathProcessingContext pathProcCntx = new PathProcessingContext(encoder, weighting, tr, request.getEdgeAnnotator(), request.getPathProcessor(), byteBuffer);\n altPaths = routingTemplate.calcPaths(queryGraph, tmpAlgoFactory, algoOpts, pathProcCntx);\n boolean tmpEnableInstructions = hints.getBool(Routing.INSTRUCTIONS, enableInstructions);\n boolean tmpCalcPoints = hints.getBool(Routing.CALC_POINTS, calcPoints);\n double wayPointMaxDistance = hints.getDouble(Routing.WAY_POINT_MAX_DISTANCE, 1d);\n DouglasPeucker peucker = new DouglasPeucker().setMaxDistance(wayPointMaxDistance);\n PathMerger pathMerger = new PathMerger().setCalcPoints(tmpCalcPoints).setDouglasPeucker(peucker).setEnableInstructions(tmpEnableInstructions).setSimplifyResponse(simplifyResponse && wayPointMaxDistance > 0);\n if (routingTemplate.isReady(pathMerger, pathProcCntx))\n break;\n }\n return altPaths;\n } catch (IllegalArgumentException ex) {\n ghRsp.addError(ex);\n return Collections.emptyList();\n } finally {\n readLock.unlock();\n }\n}\n"
|
"private void restoreSnapshot(TransactionSnapshot snapshot) {\n LOG.info(\"String_Node_Str\" + snapshot.getTimestamp());\n Preconditions.checkState(lastSnapshotTime == 0, \"String_Node_Str\");\n Preconditions.checkState(readPointer == 0, \"String_Node_Str\");\n Preconditions.checkState(lastWritePointer == 0, \"String_Node_Str\");\n Preconditions.checkState(invalid.isEmpty(), \"String_Node_Str\");\n Preconditions.checkState(inProgress.isEmpty(), \"String_Node_Str\");\n Preconditions.checkState(committingChangeSets.isEmpty(), \"String_Node_Str\");\n Preconditions.checkState(committedChangeSets.isEmpty(), \"String_Node_Str\");\n LOG.info(\"String_Node_Str\" + snapshot);\n lastSnapshotTime = snapshot.getTimestamp();\n readPointer = snapshot.getReadPointer();\n lastWritePointer = snapshot.getWritePointer();\n invalid.addAll(snapshot.getInvalid());\n inProgress.putAll(txnBackwardsCompatCheck(defaultLongTimeout, longTimeoutTolerance, snapshot.getInProgress()));\n committingChangeSets.putAll(snapshot.getCommittingChangeSets());\n committedChangeSets.putAll(snapshot.getCommittedChangeSets());\n}\n"
|
"private void configureLoggerForLaunch() {\n FileHandler fileHandler;\n try {\n fileHandler = new FileHandler(System.getProperty(\"String_Node_Str\") + \"String_Node_Str\", 50000, 1, true);\n } catch (IOException ex) {\n throw new RuntimeException(ex);\n }\n String version = System.getProperty(\"String_Node_Str\");\n if (version.startsWith(\"String_Node_Str\")) {\n FileHandlerCleanup.register(fileHandler);\n }\n fileHandler.setFormatter(new SimpleFormatter());\n this.logger.addHandler(fileHandler);\n}\n"
|
"public VersionedSegmentsList getVersionedList() {\n synchronized (pipeline) {\n List<ImmutableSegment> segmentList = new ArrayList<>(pipeline);\n return new VersionedSegmentsList(segmentList, version);\n }\n}\n"
|
"public void setup() {\n dor = (DomainObjectReader) getBean(\"String_Node_Str\");\n timeslotRepo = (TimeslotRepo) getBean(\"String_Node_Str\");\n timeService = (TimeService) getBean(\"String_Node_Str\");\n registerNewObjectListener(new TimeslotUpdateHandler(), TimeslotUpdate.class);\n registerNewObjectListener(new ClearedTradeHandler(), ClearedTrade.class);\n ignoreCount = ignoreInitial;\n data = new TreeMap<Integer, ClearedTrade[]>();\n try {\n output = new PrintWriter(new File(dataFilename));\n } catch (FileNotFoundException e) {\n log.error(\"String_Node_Str\" + dataFilename);\n }\n}\n"
|
"private void dispatchIncomingMessage(ProtocolMessage message) {\n try {\n if (message.getSessionType().equals(SessionType.RPC) || message.getSessionType().equals(SessionType.BULK_DATA)) {\n try {\n if (_wiproVersion == 1) {\n if (message.getVersion() > 1)\n setWiProVersion(message.getVersion());\n }\n Hashtable<String, Object> hash = new Hashtable<String, Object>();\n if (_wiproVersion > 1) {\n Hashtable<String, Object> hashTemp = new Hashtable<String, Object>();\n hashTemp.put(RPCMessage.KEY_CORRELATION_ID, message.getCorrID());\n if (message.getJsonSize() > 0) {\n final Hashtable<String, Object> mhash = JsonRPCMarshaller.unmarshall(message.getData());\n if (mhash != null) {\n hashTemp.put(RPCMessage.KEY_PARAMETERS, mhash);\n }\n }\n String functionName = FunctionID.getFunctionName(message.getFunctionID());\n if (functionName != null) {\n hashTemp.put(RPCMessage.KEY_FUNCTION_NAME, functionName);\n } else {\n DebugTool.logWarning(\"String_Node_Str\" + message.getFunctionID());\n return;\n }\n if (message.getRPCType() == 0x00) {\n hash.put(RPCMessage.KEY_REQUEST, hashTemp);\n } else if (message.getRPCType() == 0x01) {\n hash.put(RPCMessage.KEY_RESPONSE, hashTemp);\n } else if (message.getRPCType() == 0x02) {\n hash.put(RPCMessage.KEY_NOTIFICATION, hashTemp);\n }\n if (message.getBulkData() != null)\n hash.put(RPCStruct.KEY_BULK_DATA, message.getBulkData());\n if (message.getPayloadProtected())\n hash.put(RPCStruct.KEY_PROTECTED, true);\n } else {\n hash = JsonRPCMarshaller.unmarshall(message.getData());\n }\n handleRPCMessage(hash);\n } catch (final Exception excp) {\n DebugTool.logError(\"String_Node_Str\" + excp.toString(), excp);\n passErrorToProxyListener(\"String_Node_Str\", excp);\n }\n }\n } catch (final Exception e) {\n DebugTool.logError(\"String_Node_Str\", e);\n passErrorToProxyListener(\"String_Node_Str\", e);\n }\n}\n"
|
"public void onReceive(Context context, Intent intent) {\n String blurb = intent.getExtras().getString(EXTRA_STRING_BLURB);\n if (ACTION_FIRE_SETTING.equals(intent.getAction())) {\n TaskerAction action = TaskerAction.byBlurb(blurb);\n if (action != null) {\n ServersRunningBean runningBean = ServicesStartStopUtil.checkServicesRunning(context);\n boolean running = runningBean.atLeastOneRunning();\n switch(action) {\n case START:\n if (!running) {\n startServer(context);\n }\n break;\n case STOP:\n if (running) {\n stopServer(context);\n }\n break;\n case TOGGLE:\n if (running) {\n stopServer(context);\n } else {\n startServer(context);\n }\n break;\n }\n }\n } else if (ACTION_QUERY_CONDITION.equals(intent.getAction())) {\n TaskerCondition condition = TaskerCondition.byBlurb(blurb);\n if (condition != null) {\n ServersRunningBean runningBean = ServicesStartStopUtil.checkServicesRunning(context);\n boolean running = runningBean.atLeastOneRunning();\n switch(condition) {\n case IS_SERVER_RUNNING:\n int conditionResult = running ? RESULT_CONDITION_SATISFIED : RESULT_CONDITION_UNSATISFIED;\n logger.debug(\"String_Node_Str\", blurb, Boolean.valueOf(running));\n setResultCode(conditionResult);\n break;\n }\n }\n }\n}\n"
|
"public void interact() {\n interact = true;\n if (cmdCompleter == null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n if (this.client == null) {\n printLine(\"String_Node_Str\" + \"String_Node_Str\");\n }\n console.setPrompt(getPrompt());\n while (!isTerminated() && console.running()) {\n try {\n Thread.sleep(10);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n}\n"
|
"public String getAsText() throws OseeCoreException {\n IOseeBranch branch = TokenFactory.createBranch(branchUuid, \"String_Node_Str\");\n QueryFactory factory = OrcsApplication.getOrcsApi().getQueryFactory();\n QueryBuilder queryBuilder = factory.fromBranch(branch).andUuid(artifactUuid);\n if (transactionId > 0) {\n queryBuilder.fromTransaction(transactionId);\n }\n ArtifactReadable exactlyOne = queryBuilder.getResults().getExactlyOne();\n Optional<? extends AttributeReadable<Object>> item = Iterables.tryFind(exactlyOne.getAttributes(), new Predicate<AttributeReadable<Object>>() {\n public boolean apply(AttributeReadable<Object> attribute) {\n return attribute.getLocalId() == attrId;\n }\n });\n String toReturn = \"String_Node_Str\";\n if (item.isPresent()) {\n Object value = item.get().getValue();\n if (value != null) {\n toReturn = value.toString();\n }\n }\n return toReturn;\n}\n"
|
"public String call() {\n int sumCD = Integer.parseInt(subtitles.get(index).getSubSumCD());\n targetFolder = subtitles.get(0).getTargetFolder();\n if (targetFolder == null) {\n for (int i = 0; i < sumCD; i++) try {\n downloadSubtitle(subtitles.get(index + i), true);\n }\n else {\n downloadSubtitle(subtitles.get(index), false);\n }\n return \"String_Node_Str\";\n}\n"
|
"protected R processExpiredEntry(Data key, R record, long expiryTime, long now, String source, String origin) {\n final boolean isExpired = isExpiredAt(expiryTime, now);\n if (!isExpired) {\n return record;\n }\n if (isStatisticsEnabled()) {\n statistics.increaseCacheExpiries(1);\n }\n R removedRecord = doRemoveRecord(key, source);\n Data keyEventData = toEventData(key);\n Data recordEventData = toEventData(removedRecord);\n onProcessExpiredEntry(key, removedRecord, expiryTime, now, source, origin);\n if (isEventsEnabled()) {\n publishEvent(createCacheExpiredEvent(keyEventData, recordEventData, CacheRecord.TIME_NOT_AVAILABLE, origin, IGNORE_COMPLETION));\n }\n return null;\n}\n"
|
"public void closeAll() {\n if (countInstances() > 0) {\n String message = \"String_Node_Str\";\n int answer = JOptionPane.showConfirmDialog(monFrame, message);\n if (answer == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n } else {\n System.exit(0);\n }\n}\n"
|
"private void processInit(Properties props) {\n m_storageService = new HawtDBStorageService();\n m_storageService.initStore();\n subscriptions.init(m_storageService);\n String passwdPath = props.getProperty(\"String_Node_Str\");\n String configPath = System.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n IAuthenticator authenticator = new FileAuthenticator(configPath + passwdPath);\n m_processor.init(subscriptions, m_storageService, authenticator);\n}\n"
|
"private BasicDialog createDialog() {\n final BasicDialog newDialog = new BasicDialog((possibleParent != null) ? possibleParent : new Shell(SWT.SHELL_TRIM), true) {\n\n public void handleEvent(Event event) {\n if (ignoreDisposeEvent == false) {\n hide();\n } else {\n ignoreDisposeEvent = false;\n }\n }\n });\n setAppicon(this.appIcon);\n return newDialog;\n}\n"
|
"private static JOGLTarget createJOGLTarget(GL gl, Results results, Configuration config) {\n JOGLTarget target;\n if (\"String_Node_Str\".equals(config.getString(\"String_Node_Str\"))) {\n boolean shadowVolumes = \"String_Node_Str\".equals(config.getString(\"String_Node_Str\")) || \"String_Node_Str\".equals(config.getString(\"String_Node_Str\"));\n boolean shadowMaps = \"String_Node_Str\".equals(config.getString(\"String_Node_Str\")) || \"String_Node_Str\".equals(config.getString(\"String_Node_Str\"));\n target = new JOGLTargetShader(gl.getGL3(), new JOGLRenderingParameters(CCW, false, true, shadowVolumes, shadowMaps), GlobalLightingParameters.DEFAULT);\n } else {\n target = new JOGLTargetFixedFunction(gl.getGL2(), new JOGLRenderingParameters(CCW, false, true, false, false), GlobalLightingParameters.DEFAULT);\n }\n target.setConfiguration(config);\n boolean underground = config.getBoolean(\"String_Node_Str\", true);\n TargetUtil.renderWorldObjects(target, results.getMapData(), underground);\n target.finish();\n return target;\n}\n"
|
"void updateProperty(String path, String propertyName, String value) {\n UpdateOp op = getUpdateOperationForNode(path);\n String key = Utils.escapePropertyName(propertyName);\n op.addMapEntry(key + \"String_Node_Str\" + revision.toString(), value);\n long increment = mk.getWriteCountIncrement(path);\n op.increment(UpdateOp.WRITE_COUNT, 1 + increment);\n}\n"
|
"public void handle(ChangeEvent e) {\n InstanceStatistics event = (InstanceStatistics) e;\n if (super.name == null || !super.name.equals(event.getName())) {\n return;\n }\n VerticalPanel vPanel = (VerticalPanel) disclosurePanel.getContent();\n Label label = (Label) vPanel.getWidget(0);\n label.setText(\"String_Node_Str\" + event.getSize() + \"String_Node_Str\" + event.getTotalOPS());\n if (vPanel.getWidgetCount() < 2) {\n HorizontalPanel horizontalPanel = new HorizontalPanel();\n horizontalPanel.add(createAbsPanelWithImage());\n horizontalPanel.add(createAbsPanelWithImage());\n horizontalPanel.setBorderWidth(0);\n vPanel.add(horizontalPanel);\n }\n HorizontalPanel horizontalPanel = (HorizontalPanel) vPanel.getWidget(1);\n Image sizeChart = (Image) ((AbsolutePanel) horizontalPanel.getWidget(0)).getWidget(0);\n String encodeName = URL.encodeComponent(name);\n sizeChart.setUrl(getServletName() + \"String_Node_Str\" + encodeName + \"String_Node_Str\" + Math.random() * 10);\n Image opsChart = (Image) ((AbsolutePanel) horizontalPanel.getWidget(1)).getWidget(0);\n opsChart.setUrl(getServletName() + \"String_Node_Str\" + name + \"String_Node_Str\" + Math.random() * 10);\n}\n"
|
"public static Controller defineModulesWithManyLoaders(Configuration cf, List<Layer> parentLayers, ClassLoader parentLoader) {\n List<Layer> parents = new ArrayList<>(parentLayers);\n checkConfiguration(cf, parents);\n checkCreateClassLoaderPermission();\n checkGetClassLoaderPermission();\n LoaderPool pool = new LoaderPool(cf, parents, parentLoader);\n try {\n Layer layer = new Layer(cf, parents, pool::loaderFor);\n return new Controller(layer);\n } catch (IllegalArgumentException | IllegalStateException e) {\n throw new LayerInstantiationException(e.getMessage());\n }\n}\n"
|
"public ITextMetrics getTextMetrics(Label la) {\n return new SwingTextMetrics(this, la, getGraphicsContext());\n}\n"
|
"public byte[] request(final String cluster, byte[] request, long timeoutMillis) throws IOException, InterruptedException, RemoteException, TimeoutException {\n final Long id = nextId.addAndGet(1);\n final Result result = new Result();\n pending.put(id, result);\n try {\n protocol.send(OpCode.REQUEST, () -> {\n protocol.sendVarint(id);\n protocol.sendString(cluster);\n protocol.sendBinary(request);\n protocol.sendVarint(timeoutMillis);\n });\n synchronized (result) {\n result.wait();\n }\n if (result.timeout) {\n throw new TimeoutException(\"String_Node_Str\");\n } else if (result.error != null) {\n throw new RemoteException(result.error);\n } else {\n return result.reply;\n }\n } finally {\n pending.remove(id);\n }\n}\n"
|
"public static void main(String[] args) {\n try {\n Kademlia kad1 = new Kademlia(\"String_Node_Str\", new NodeId(\"String_Node_Str\"), 7574);\n Kademlia kad2 = new Kademlia(\"String_Node_Str\", new NodeId(\"String_Node_Str\"), 7572);\n DHTContentImpl c1 = new DHTContentImpl(kad2.getOwnerId(), \"String_Node_Str\");\n DHTContentImpl c2 = new DHTContentImpl(kad2.getOwnerId(), \"String_Node_Str\");\n kad2.bootstrap(kad1.getNode());\n kad1.put(c1);\n kad1.put(c2);\n for (long i = 0; i < 9999990000L; i++) {\n }\n System.out.println(\"String_Node_Str\");\n long c2OldTs = c2.getLastUpdatedTimestamp();\n c2.setData(\"String_Node_Str\");\n kad1.putLocally(c2);\n try {\n System.out.println(\"String_Node_Str\");\n GetParameterFUC gp = new GetParameterFUC(c1.getKey(), DHTContentImpl.TYPE, c1.getOwnerId(), c1.getLastUpdatedTimestamp());\n StorageEntry conte = kad2.getUpdated(gp, 4);\n System.out.println(\"String_Node_Str\" + new DHTContentImpl().fromBytes(conte.getContent().getBytes()));\n System.out.println(\"String_Node_Str\" + conte.getContentMetadata());\n } catch (IOException | UpToDateContentException ex) {\n System.err.println(ex.getMessage());\n }\n try {\n System.out.println(\"String_Node_Str\");\n GetParameterFUC gp = new GetParameterFUC(c2.getKey(), DHTContentImpl.TYPE, c2.getOwnerId(), c2OldTs);\n List<StorageEntry> conte = kad2.getUpdated(gp, 4);\n for (StorageEntry cc : conte) {\n System.out.println(\"String_Node_Str\" + new DHTContentImpl().fromBytes(cc.getContent().getBytes()));\n System.out.println(\"String_Node_Str\" + cc.getContentMetadata());\n }\n } catch (IOException | UpToDateContentException ex) {\n System.err.println(ex.getMessage());\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n}\n"
|
"String mangleNameForGlobal(JMethod x) {\n String s = JjsUtils.getNameString(x.getEnclosingType()) + '_' + JjsUtils.getNameString(x) + \"String_Node_Str\";\n for (int i = 0; i < x.getOriginalParamTypes().size(); ++i) {\n JType type = x.getOriginalParamTypes().get(i);\n s += type.getJavahSignatureName();\n }\n s += x.getOriginalReturnType().getJavahSignatureName();\n return StringInterner.get().intern(s);\n}\n"
|
"public void remove(RepositoryItem item) {\n httpManager.disposeHttpRepoItemElemByItemId(item, \"String_Node_Str\");\n gridFS.remove(item.getId());\n}\n"
|
"public void close() throws IOException {\n if (this.stream != null) {\n this.stream.write(this.buffer, 0, this.pos);\n }\n super.close();\n}\n"
|
"private void removeReadOutdated(String volumeName, String fileName) throws Exception {\n AdminVolume volume = client.openVolume(volumeName, null, options);\n AdminFileHandle fileHandle = volume.openFile(userCredentials, fileName, Helper.flagsToInt(SYSTEM_V_FCNTL_H_O_CREAT, SYSTEM_V_FCNTL_H_O_RDWR), 0777);\n int count = 256 * 1024;\n ReusableBuffer data = SetupUtils.generateData(count, (byte) 1);\n System.out.println(\"String_Node_Str\");\n fileHandle.write(userCredentials, data.createViewBuffer().getData(), count, 0);\n fileHandle.close();\n Thread.sleep(20 * 1000);\n System.out.println(\"String_Node_Str\");\n fileHandle = volume.openFile(userCredentials, fileName, Helper.flagsToInt(SYSTEM_V_FCNTL_H_O_RDONLY));\n List<Replica> replicas = fileHandle.getReplicasList();\n System.out.println(replicas);\n Replica replica = replicas.get(0);\n int prevReplicaCount = fileHandle.getReplicasList().size();\n System.out.println(\"String_Node_Str\" + replica.getOsdUuids(0));\n assertEquals(1, replica.getOsdUuidsCount());\n AdminVolume controlVolume = client.openVolume(volumeName, null, options);\n controlVolume.removeReplica(userCredentials, fileName, replica.getOsdUuids(0));\n AdminFileHandle controlFile = controlVolume.openFile(userCredentials, fileName, Helper.flagsToInt(SYSTEM_V_FCNTL_H_O_RDONLY));\n assertEquals(controlFile.getReplicasList().size(), prevReplicaCount - 1);\n System.out.println(controlFile.getReplicasList());\n controlFile.close();\n controlVolume.close();\n System.out.println(\"String_Node_Str\");\n Thread.sleep(70 * 1000);\n System.out.println(\"String_Node_Str\");\n readInvalidView(fileHandle);\n fileHandle.close();\n assertEquals(data2[0], (byte) 1);\n volume.close();\n}\n"
|
"public void run() {\n if (rootDisposed)\n return;\n if (rootChannelTab != null) {\n appendText(rootChannelTab, getRootTextOutput(), new ChatLine(messageBody, new ChatRoomParticipant(fromID)));\n rootChannelTab.makeTabItemBold();\n}\n"
|
"public void run() {\n GooglePlayServicesUtil.getErrorDialog(resultCode, ChatRoomsActivity.this, PLAY_SERVICES_RESOLUTION_REQUEST).show();\n}\n"
|
"public GetSFDescriptionOutput getSFDescriptionInfoFromNetconf(String nodeName) {\n GetSFDescriptionOutput ret = null;\n printTraceStart(LOG);\n ServiceFunctionDescriptionMonitorReportService service = getSfDescriptionMonitorService(nodeName);\n if (service != null) {\n Future<RpcResult<GetSFDescriptionOutput>> result = service.getSFDescription();\n RpcResult<GetSFDescriptionOutput> output;\n try {\n output = result.get();\n if (output.isSuccessful()) {\n ret = output.getResult();\n LOG.info(\"String_Node_Str\");\n } else {\n LOG.error(\"String_Node_Str\");\n }\n } catch (InterruptedException | ExecutionException e) {\n LOG.error(\"String_Node_Str\", e);\n }\n }\n printTraceStop(LOG);\n return ret;\n}\n"
|
"public String getText(Object element) {\n if (element instanceof IParameterInterfacePO) {\n IParameterInterfacePO tdc = (IParameterInterfacePO) element;\n StringBuilder info = new StringBuilder(tdc.getName());\n Iterator iter = tdc.getParameterList().iterator();\n boolean parameterExist = false;\n if (iter.hasNext()) {\n parameterExist = true;\n info.append(OPEN_BRACKED);\n }\n if (iter.hasNext()) {\n while (iter.hasNext()) {\n IParamDescriptionPO descr = (IParamDescriptionPO) iter.next();\n info.append(CompSystemI18n.getString(descr.getType(), true));\n info.append(StringConstants.COLON);\n info.append(descr.getName());\n if (iter.hasNext()) {\n info.append(SEPARATOR);\n }\n }\n }\n if (parameterExist) {\n info.append(CLOSE_BRACKED);\n }\n return info.toString();\n }\n if (element instanceof ITestDataCategoryPO) {\n return ((ITestDataCategoryPO) element).getName();\n }\n return super.getText(element);\n}\n"
|
"private static void responseFileContent(HttpExchange t, File f) throws Exception {\n try (OutputStream os = t.getResponseBody();\n FileInputStream fis = new FileInputStream(f)) {\n while (true) {\n byte[] b = new byte[8192];\n int n = fis.read(b);\n if (n < 0) {\n break;\n }\n os.write(b, 0, n);\n }\n os.write(b, 0, n);\n }\n fis.close();\n os.close();\n}\n"
|
"private void limitChildren(String webhook) {\n String errorRoot = getErrorRoot(webhook);\n try {\n for (String child : curator.getChildren().forPath(errorRoot)) {\n Stat stat = new Stat();\n byte[] bytes = curator.getData().storingStatIn(stat).forPath(getChildPath(errorRoot, child));\n errors.put(child, new Error(child, new DateTime(stat.getCtime()), new String(bytes)));\n }\n while (errors.size() > MAX_SIZE) {\n String firstKey = errors.firstKey();\n errors.remove(firstKey);\n curator.delete().inBackground().forPath(getChildPath(errorRoot, firstKey));\n }\n DateTime cutoffTime = TimeUtil.now().minusDays(1);\n for (Error error : errors.values()) {\n if (error.getCreationTime().isBefore(cutoffTime)) {\n curator.delete().inBackground().forPath(getChildPath(errorRoot, error.getName()));\n } else {\n results.add(error.getData());\n }\n }\n } catch (Exception e) {\n logger.warn(\"String_Node_Str\" + errorRoot, e);\n }\n}\n"
|
"private int getCurrentPage() {\n StaplerRequest req = Stapler.getCurrentRequest();\n int page = req == null ? 1 : req.getParameter(\"String_Node_Str\") == null ? 1 : Integer.parseInt(req.getParameter(\"String_Node_Str\").toString());\n page = Math.max(page, 1);\n int component = req.getParameter(\"String_Node_Str\") == null ? 1 : Integer.parseInt(req.getParameter(\"String_Node_Str\").toString());\n if (component != componentNumber) {\n page = 1;\n }\n return page;\n}\n"
|
"private soot.jimple.FieldRef getFieldRef(polyglot.ast.Field field) {\n soot.SootClass receiverClass = ((soot.RefType) Util.getSootType(field.target().type())).getSootClass();\n soot.SootFieldRef receiverField = soot.Scene.v().makeFieldRef(receiverClass, field.name(), Util.getSootType(field.type()), field.flags().isStatic());\n soot.jimple.FieldRef fieldRef;\n if (field.fieldInstance().flags().isStatic()) {\n fieldRef = soot.jimple.Jimple.v().newStaticFieldRef(receiverField);\n } else {\n soot.Local base;\n base = (soot.Local) getBaseLocal(field.target());\n fieldRef = soot.jimple.Jimple.v().newInstanceFieldRef(base, receiverField);\n }\n if (field.target() instanceof polyglot.ast.Local && fieldRef instanceof soot.jimple.InstanceFieldRef) {\n Util.addLnPosTags(((soot.jimple.InstanceFieldRef) fieldRef).getBaseBox(), field.target().position());\n }\n return fieldRef;\n}\n"
|
"protected void assertEquals(ReusableBuffer expected, ReusableBuffer val) {\n if (expected == null)\n return;\n String e = new String(expected);\n String v = new String(val);\n assertEquals(e, v);\n}\n"
|
"public void testAllMethods() throws Exception {\n String accountName = ESAPI.randomizer().getRandomString(8, EncoderConstants.CHAR_ALPHANUMERICS);\n Authenticator instance = ESAPI.authenticator();\n String password = instance.generateStrongPassword();\n User user = instance.createUser(accountName, password, password);\n try {\n User.ANONYMOUS.addRole(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.addRoles(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.changePassword(null, null, null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.disable();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.enable();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.getAccountId();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.getAccountName();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.getName();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.getCSRFToken();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.getExpirationTime();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.getFailedLoginCount();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.getLastFailedLoginTime();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.getLastLoginTime();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.getLastPasswordChangeTime();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.getRoles();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.getScreenName();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.addSession(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.removeSession(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.incrementFailedLoginCount();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.isAnonymous();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.isEnabled();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.isExpired();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.isInRole(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.isLocked();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.isLoggedIn();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.isSessionAbsoluteTimeout();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.isSessionTimeout();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.lock();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.loginWithPassword(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.logout();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.removeRole(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.resetCSRFToken();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.setAccountName(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.setExpirationTime(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.setRoles(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.setScreenName(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.unlock();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.verifyPassword(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.setLastFailedLoginTime(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.setLastLoginTime(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.setLastHostAddress(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.setLastPasswordChangeTime(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.getEventMap();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.getLocale();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.setLocale(null);\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.getAccountName();\n } catch (RuntimeException e) {\n }\n try {\n User.ANONYMOUS.getAccountName();\n } catch (RuntimeException e) {\n }\n}\n"
|
"private static String sqlMessage(DataAccessException cause) {\n Throwable causeThroawle = cause.getCause();\n if (causeThroawle instanceof SQLException) {\n return sqlMessage((SQLException) causeThroawle);\n }\n return cause.getMessage();\n}\n"
|
"public List<Integer> updateFriendList() throws QBResponseException {\n Collection<QBRosterEntry> rosterEntryCollection;\n List<Integer> userIdsList = new ArrayList<Integer>();\n if (roster != null) {\n rosterEntryCollection = roster.getEntries();\n if (!rosterEntryCollection.isEmpty()) {\n userIdsList = FriendUtils.getUserIdsFromRoster(rosterEntryCollection);\n updateFriends(userIdsList, rosterEntryCollection);\n }\n try {\n makeAutoSubscription(rosterEntryCollection);\n } catch (QBResponseException e) {\n ErrorUtils.logError(e);\n }\n } else {\n ErrorUtils.logError(TAG, ROSTER_INIT_ERROR);\n }\n return userIdsList;\n}\n"
|
"public static DataEngineContext newInstance(int mode, Scriptable scope, IDocArchiveReader reader, IDocArchiveWriter writer) throws BirtException {\n return new DataEngineContext(mode, scope, reader, writer, null);\n}\n"
|
"private synchronized void startDelayed() {\n handler.removeCallbacks(callback);\n int buckOffTime = interval * retryCount;\n handler.postDelayed(callback, interval + buckOffTime);\n hasAlreadySet = true;\n}\n"
|
"public static DatabaseConnection cloneOriginalValueConnection(DatabaseConnection dbConn, boolean defaultContext, String selectedContext) {\n if (dbConn == null) {\n return null;\n }\n ContextType contextType = ConnectionContextHelper.getContextTypeForContextMode(null, dbConn, selectedContext, defaultContext);\n DatabaseConnection cloneConn = ConnectionFactory.eINSTANCE.createDatabaseConnection();\n String server = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getServerName());\n String username = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getUsername());\n String password = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getRawPassword());\n String port = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getPort());\n String sidOrDatabase = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getSID());\n String datasource = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getDatasourceName());\n String filePath = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getFileFieldName());\n String schemaOracle = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getUiSchema());\n String dbRootPath = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getDBRootPath());\n String additionParam = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getAdditionalParams());\n String url = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getURL());\n String className = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getDriverClass());\n String jarPath = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getDriverJarPath());\n String dbmsID = ConnectionContextHelper.getOriginalValue(contextType, dbConn.getDbmsId());\n filePath = TalendQuoteUtils.removeQuotes(filePath);\n dbRootPath = TalendQuoteUtils.removeQuotes(dbRootPath);\n cloneConn.setAdditionalParams(additionParam);\n cloneConn.setDatasourceName(datasource);\n cloneConn.setDBRootPath(dbRootPath);\n cloneConn.setFileFieldName(filePath);\n cloneConn.setRawPassword(password);\n cloneConn.setPort(port);\n cloneConn.setUiSchema(schemaOracle);\n cloneConn.setServerName(server);\n cloneConn.setSID(sidOrDatabase);\n cloneConn.setUsername(username);\n cloneConn.setDriverJarPath(jarPath);\n cloneConn.setComment(dbConn.getComment());\n cloneConn.setDatabaseType(dbConn.getDatabaseType());\n cloneConn.setDbmsId(dbmsID);\n cloneConn.setDivergency(dbConn.isDivergency());\n cloneConn.setDbVersionString(dbConn.getDbVersionString());\n cloneConn.setId(dbConn.getId());\n cloneConn.setLabel(dbConn.getLabel());\n cloneConn.setNullChar(dbConn.getNullChar());\n cloneConn.setProductId(dbConn.getProductId());\n cloneConn.setSqlSynthax(dbConn.getSqlSynthax());\n cloneConn.setStandardSQL(dbConn.isStandardSQL());\n cloneConn.setStringQuote(dbConn.getStringQuote());\n cloneConn.setSynchronised(dbConn.isSynchronised());\n cloneConn.setSystemSQL(dbConn.isSystemSQL());\n cloneConn.setVersion(dbConn.getVersion());\n cloneConn.setReadOnly(dbConn.isReadOnly());\n cloneConn.setDriverClass(className);\n cloneConn.setName(dbConn.getName());\n cloneOtherParameters(dbConn, cloneConn);\n if (dbConn.isSetSQLMode()) {\n cloneConn.setSQLMode(dbConn.isSQLMode());\n } else {\n cloneConn.setSQLMode(true);\n }\n if (EDatabaseTypeName.HIVE.equals(EDatabaseTypeName.getTypeFromDbType(dbConn.getDatabaseType()))) {\n String template = null;\n String hiveServerVersion = HiveServerVersionInfo.HIVE_SERVER_1.getKey();\n EMap<String, String> parameterMap = dbConn.getParameters();\n if (parameterMap != null) {\n hiveServerVersion = parameterMap.get(ConnParameterKeys.HIVE_SERVER_VERSION);\n }\n if (HiveServerVersionInfo.HIVE_SERVER_2.getKey().equals(hiveServerVersion)) {\n template = DbConnStrForHive.URL_HIVE_2_TEMPLATE;\n } else {\n template = DbConnStrForHive.URL_HIVE_1_TEMPLATE;\n }\n String newURl = DatabaseConnStrUtil.getHiveURLString(dbConn, server, port, sidOrDatabase, template);\n cloneConn.setURL(newURl);\n return cloneConn;\n }\n if (EDatabaseTypeName.IBMDB2.equals(EDatabaseTypeName.getTypeFromDbType(dbConn.getDatabaseType()))) {\n String cursorForDb2 = \"String_Node_Str\";\n String database = sidOrDatabase + cursorForDb2;\n String newURL = DatabaseConnStrUtil.getURLString(cloneConn.getDatabaseType(), dbConn.getDbVersionString(), server, username, password, port, database, filePath.toLowerCase(), datasource, dbRootPath, additionParam);\n cloneConn.setURL(newURL);\n return cloneConn;\n }\n if (contextType != null && !EDatabaseTypeName.GENERAL_JDBC.equals(EDatabaseTypeName.getTypeFromDbType(dbConn.getDatabaseType()))) {\n String newURL = DatabaseConnStrUtil.getURLString(cloneConn.getDatabaseType(), dbConn.getDbVersionString(), server, username, password, port, sidOrDatabase, filePath.toLowerCase(), datasource, dbRootPath, additionParam);\n cloneConn.setURL(newURL);\n return cloneConn;\n }\n if (dbConn.getURL() != null && !dbConn.getURL().equals(\"String_Node_Str\")) {\n cloneConn.setURL(url);\n } else {\n String newURL = DatabaseConnStrUtil.getURLString(cloneConn.getDatabaseType(), dbConn.getDbVersionString(), server, username, password, port, sidOrDatabase, filePath.toLowerCase(), datasource, dbRootPath, additionParam);\n cloneConn.setURL(newURL);\n }\n return cloneConn;\n}\n"
|
"public boolean clear(Object value) throws FieldTypeMismatchException {\n Data data = tryCast(value);\n Value v = new Value(data);\n if (values != null) {\n values.remove(v);\n } catch (UnsupportedOperationException e) {\n throw new FieldTypeMismatchException(e);\n }\n return true;\n}\n"
|
"public Object createValue() throws BasicException {\n boolean dateRange = false;\n Object[] afilter = new Object[12];\n if (jtxtTicketID.getText() == null || jtxtTicketID.getText().equals(\"String_Node_Str\")) {\n afilter[0] = QBFCompareEnum.COMP_NONE;\n afilter[1] = null;\n } else {\n afilter[0] = QBFCompareEnum.COMP_EQUALS;\n afilter[1] = jtxtTicketID.getValueInteger();\n }\n if (jCheckBoxSales.isSelected() && jCheckBoxRefunds.isSelected() || !jCheckBoxSales.isSelected() && !jCheckBoxRefunds.isSelected()) {\n afilter[2] = QBFCompareEnum.COMP_NONE;\n afilter[3] = null;\n } else if (jCheckBoxSales.isSelected()) {\n afilter[2] = QBFCompareEnum.COMP_EQUALS;\n afilter[3] = 0;\n } else if (jCheckBoxRefunds.isSelected()) {\n afilter[2] = QBFCompareEnum.COMP_EQUALS;\n afilter[3] = 1;\n }\n afilter[5] = jtxtMoney.getDoubleValue();\n afilter[4] = afilter[5] == null ? QBFCompareEnum.COMP_NONE : jcboMoney.getSelectedItem();\n if (jcboTimeFrame.getSelectedItem() == null) {\n dateRange = true;\n afilter[6] = QBFCompareEnum.COMP_NONE;\n afilter[7] = null;\n afilter[8] = QBFCompareEnum.COMP_NONE;\n afilter[9] = null;\n } else {\n int year = cal.get(Calendar.YEAR);\n String month = (cal.get(Calendar.MONTH) + 1 < 10) ? \"String_Node_Str\" + (cal.get(Calendar.MONTH) + 1) : Integer.toString(cal.get(Calendar.MONTH) + 1);\n String day = (cal.get(Calendar.DAY_OF_MONTH) < 10) ? \"String_Node_Str\" + cal.get(Calendar.DAY_OF_MONTH) : Integer.toString(cal.get(Calendar.DAY_OF_MONTH));\n if (jcboTimeFrame.getSelectedItem() == LocalRes.getIntString(\"String_Node_Str\")) {\n afilter[6] = QBFCompareEnum.COMP_RE;\n afilter[7] = \"String_Node_Str\" + year + \"String_Node_Str\" + month + \"String_Node_Str\" + day + \"String_Node_Str\";\n afilter[8] = QBFCompareEnum.COMP_NONE;\n afilter[9] = null;\n } else if (jcboTimeFrame.getSelectedItem() == LocalRes.getIntString(\"String_Node_Str\")) {\n afilter[6] = QBFCompareEnum.COMP_RE;\n afilter[7] = \"String_Node_Str\" + year + \"String_Node_Str\" + month + \"String_Node_Str\";\n afilter[8] = QBFCompareEnum.COMP_NONE;\n afilter[9] = null;\n } else if (jcboTimeFrame.getSelectedItem() == LocalRes.getIntString(\"String_Node_Str\")) {\n afilter[6] = QBFCompareEnum.COMP_RE;\n afilter[7] = \"String_Node_Str\" + Integer.toString(year) + \"String_Node_Str\";\n afilter[8] = QBFCompareEnum.COMP_NONE;\n afilter[9] = null;\n }\n }\n if (dateRange) {\n String dayF = (jcboDayFrom.getSelectedItem() == null) ? \"String_Node_Str\" : (String) jcboDayFrom.getSelectedItem();\n String monthF = (jcboMonthFrom.getSelectedItem() == null) ? \"String_Node_Str\" : (String) jcboMonthFrom.getSelectedItem();\n String dayT = (jcboDayTo.getSelectedItem() == null) ? \"String_Node_Str\" : String.valueOf(Integer.parseInt((String) jcboDayTo.getSelectedItem()) + 1);\n String monthT = (jcboMonthTo.getSelectedItem() == null) ? \"String_Node_Str\" : (String) jcboMonthTo.getSelectedItem();\n if (jcboYearFrom.getSelectedItem() == null && jcboYearTo.getSelectedItem() == null) {\n afilter[6] = QBFCompareEnum.COMP_NONE;\n afilter[7] = null;\n afilter[8] = QBFCompareEnum.COMP_NONE;\n afilter[9] = null;\n } else if (jcboYearFrom.getSelectedItem() == null && jcboYearTo.getSelectedItem() != null) {\n afilter[6] = QBFCompareEnum.COMP_NONE;\n afilter[7] = null;\n afilter[8] = QBFCompareEnum.COMP_LESSOREQUALS;\n afilter[9] = jcboYearTo.getSelectedItem() + \"String_Node_Str\" + monthT + \"String_Node_Str\" + dayT;\n } else if (jcboYearFrom.getSelectedItem() != null && jcboYearTo.getSelectedItem() == null) {\n afilter[6] = QBFCompareEnum.COMP_GREATEROREQUALS;\n afilter[7] = jcboYearFrom.getSelectedItem() + \"String_Node_Str\" + monthF + \"String_Node_Str\" + dayF;\n afilter[8] = QBFCompareEnum.COMP_NONE;\n afilter[9] = null;\n } else {\n afilter[6] = QBFCompareEnum.COMP_GREATEROREQUALS;\n afilter[7] = jcboYearFrom.getSelectedItem() + \"String_Node_Str\" + monthF + \"String_Node_Str\" + dayF;\n afilter[8] = QBFCompareEnum.COMP_LESSOREQUALS;\n afilter[9] = jcboYearTo.getSelectedItem() + \"String_Node_Str\" + monthT + \"String_Node_Str\" + dayT;\n }\n }\n if (jcboUser.getSelectedItem() == null) {\n afilter[10] = QBFCompareEnum.COMP_NONE;\n afilter[11] = null;\n } else {\n afilter[10] = QBFCompareEnum.COMP_EQUALS;\n afilter[11] = ((TaxCategoryInfo) jcboUser.getSelectedItem()).getName();\n }\n return afilter;\n}\n"
|
"public static int receiveBufferCount(Config cfg) {\n return cfg.getIntegerValue(RECEIVE_BUFFERS_COUNT, 128);\n}\n"
|
"protected void onPersist(EntityMetadata entityMetadata, Object entity, Object id, List<RelationHolder> rlHolders) {\n Cassandra.Client conn = PelopsUtils.getCassandraConnection(pool);\n try {\n Map<ByteBuffer, Map<String, List<Mutation>>> mutationMap = new HashMap<ByteBuffer, Map<String, List<Mutation>>>();\n MetamodelImpl metaModel = (MetamodelImpl) KunderaMetadata.INSTANCE.getApplicationMetadata().getMetamodel(entityMetadata.getPersistenceUnit());\n if (metaModel.isEmbeddable(entityMetadata.getIdAttribute().getBindableJavaType())) {\n onpersistOverCompositeKey(entityMetadata, entity, conn, rlHolders);\n } else {\n prepareMutation(entityMetadata, entity, id, rlHolders, mutationMap);\n conn.batch_mutate(mutationMap, getConsistencyLevel());\n }\n mutationMap.clear();\n mutationMap = null;\n } catch (InvalidRequestException e) {\n log.error(\"String_Node_Str\", e);\n throw new KunderaException(e);\n } catch (TException e) {\n log.error(\"String_Node_Str\", e);\n throw new KunderaException(e);\n } catch (UnavailableException e) {\n log.error(\"String_Node_Str\", e);\n throw new KunderaException(e);\n } catch (TimedOutException e) {\n log.error(\"String_Node_Str\", e);\n throw new KunderaException(e);\n } catch (SchemaDisagreementException e) {\n log.error(\"String_Node_Str\", e);\n throw new KunderaException(e);\n } catch (UnsupportedEncodingException e) {\n log.error(\"String_Node_Str\", e);\n throw new KunderaException(e);\n } finally {\n PelopsUtils.releaseConnection(pool, conn);\n }\n}\n"
|
"public void readFile(String _fileName) throws Exception {\n curLoading = true;\n String loadLog = \"String_Node_Str\";\n try {\n SAXParserFactory factory = SAXParserFactory.newInstance();\n SAXParser saxParser = factory.newSAXParser();\n CustHandler handler;\n if (IOHandler.isFileZipArchive(_fileName)) {\n try (ZipFile zipFile = new ZipFile(_fileName)) {\n ZipEntry xmlEntry = zipFile.getEntry(PGTUtil.dictFileName);\n try (InputStream ioStream = zipFile.getInputStream(xmlEntry)) {\n handler = CustHandlerFactory.getCustHandler(ioStream, this);\n }\n }\n } else {\n try (InputStream ioStream = new FileInputStream(_fileName)) {\n handler = CustHandlerFactory.getCustHandler(ioStream, this);\n }\n }\n handler.setWordCollection(wordCollection);\n handler.setTypeCollection(typeCollection);\n saxParser.parse(IOHandler.getDictFile(_fileName), handler);\n } catch (ParserConfigurationException | SAXException | IOException e) {\n throw new Exception(e.getMessage());\n }\n try {\n IOHandler.setFontFrom(_fileName, this);\n } catch (IOException | FontFormatException e) {\n loadLog += e.getLocalizedMessage() + \"String_Node_Str\";\n }\n try {\n IOHandler.loadGrammarSounds(_fileName, grammarManager);\n } catch (Exception e) {\n loadLog += e.getLocalizedMessage() + \"String_Node_Str\";\n }\n try {\n logoCollection.loadRadicalRelations();\n } catch (Exception e) {\n loadLog += e.getLocalizedMessage() + \"String_Node_Str\";\n }\n try {\n IOHandler.loadImages(logoCollection, _fileName);\n } catch (Exception e) {\n loadLog += e.getLocalizedMessage() + \"String_Node_Str\";\n }\n curLoading = false;\n if (!loadLog.equals(\"String_Node_Str\")) {\n throw new Exception(\"String_Node_Str\");\n }\n}\n"
|
"public void setupTests() {\n TestUtils.initializeStaticTestStorage();\n}\n"
|
"private String findClusterId(String applicationId, String alias) {\n try {\n AutoscalerServiceClient autoscalerServiceClient = AutoscalerServiceClient.getInstance();\n return autoscalerServiceClient.findClusterId(applicationId, alias);\n } catch (Exception e) {\n String message = String.format(\"String_Node_Str\", applicationId, alias);\n log.error(message, e);\n throw new RuntimeException(message, e);\n }\n Application application = applications.getApplication(applicationId);\n if (application == null) {\n throw new RuntimeException(String.format(\"String_Node_Str\", applicationId));\n }\n ClusterDataHolder clusterData = application.getClusterData(alias);\n if (clusterData == null) {\n for (Group group : application.getGroups()) {\n clusterData = group.getClusterData(alias);\n if (clusterData != null) {\n break;\n }\n }\n if (clusterData == null) {\n throw new RuntimeException(String.format(\"String_Node_Str\", applicationId, alias));\n }\n }\n return clusterData.getClusterId();\n}\n"
|
"protected IngestionResult addNewBlockEntity(EntityType entityInfo, Connection connection) throws IngestException, SQLException {\n BlockType block = entityInfo.getBlock();\n IngestionResult ingestionResult = null;\n if (KomaduUtils.manageDBLock(DBLockConstants.LOCK_ACQUIRE, block.getBlockURI(), connection)) {\n Long baseEntityId = addNewBaseEntity(EntityTypeEnum.BLOCK, entityInfo.getAttributes(), entityInfo.getRole(), entityInfo.getLocation(), connection);\n TupleData tuple = new TupleData();\n tuple.addAttribute(\"String_Node_Str\", baseEntityId, TableAttributeData.DataType.LONG);\n tuple.addAttribute(\"String_Node_Str\", block.getBlockURI(), TableAttributeData.DataType.STRING);\n String content = block.getBlockContent();\n String md5 = KomaduUtils.calculateMD5(content);\n if (md5 != null)\n tuple.addAttribute(\"String_Node_Str\", md5, TableAttributeData.DataType.STRING);\n tuple.addAttribute(\"String_Node_Str\", content.length(), TableAttributeData.DataType.LONG);\n tuple.addAttribute(\"String_Node_Str\", content, TableAttributeData.DataType.STRING);\n insertTuple(\"String_Node_Str\", tuple, \"String_Node_Str\", connection);\n ingestionResult = new IngestionResult(block.getBlockURI(), baseEntityId);\n KomaduUtils.manageDBLock(DBLockConstants.LOCK_RELEASE, block.getBlockURI(), connection);\n }\n return ingestionResult;\n}\n"
|
"public void turnLeft() {\n if (timesteps >= maxTimesteps) {\n return;\n }\n if (orientation == EAST) {\n orientation = NORTH;\n } else if (orientation == NORTH) {\n orientation = WEST;\n } else if (orientation == WEST) {\n orientation = SOUTH;\n } else if (orientation == SOUTH) {\n orientation = EAST;\n }\n moves++;\n}\n"
|
"private void reuseSpace() throws SQLException {\n if (SysProperties.REUSE_SPACE_QUICKLY) {\n synchronized (potentiallyFreePages) {\n if (potentiallyFreePages.size() >= SysProperties.REUSE_SPACE_AFTER) {\n Session[] sessions = database.getSessions(true);\n int oldest = 0;\n for (int i = 0; i < sessions.length; i++) {\n int deleteId = sessions[i].getLastUncommittedDelete();\n if (oldest == 0 || (deleteId != 0 && deleteId < oldest)) {\n oldest = deleteId;\n }\n }\n }\n for (Iterator<Integer> it = potentiallyFreePages.iterator(); it.hasNext(); ) {\n int p = it.next();\n if (oldest == 0) {\n if (isPageFree(p)) {\n setPageOwner(p, FREE_PAGE);\n }\n it.remove();\n }\n }\n }\n }\n}\n"
|
"public static WebArchive getDeployment() {\n return getCapedwarfDeployment().addClass(AbstractTest.class);\n}\n"
|
"public void testGetAllowedUnits() throws MetaDataParserException {\n loadMetaData(this.getClass().getResourceAsStream(\"String_Node_Str\"));\n IElementDefn styleDefn = MetaDataDictionary.getInstance().getElement(ReportDesignConstants.STYLE_ELEMENT);\n PropertyDefn propDefn = (ElementPropertyDefn) styleDefn.getProperty(Style.FONT_STYLE_PROP);\n IChoiceSet choices = propDefn.getAllowedChoices();\n assertEquals(2, choices.getChoices().length);\n assertEquals(\"String_Node_Str\", choices.getChoices()[0].getName());\n assertEquals(\"String_Node_Str\", choices.getChoices()[1].getName());\n propDefn = (ElementPropertyDefn) styleDefn.getProperty(Style.FONT_SIZE_PROP);\n choices = propDefn.getAllowedUnits();\n assertEquals(2, choices.getChoices().length);\n assertEquals(\"String_Node_Str\", choices.getChoices()[0].getName());\n assertEquals(\"String_Node_Str\", choices.getChoices()[1].getName());\n propDefn = (ElementPropertyDefn) styleDefn.getProperty(Style.BACKGROUND_POSITION_X_PROP);\n choices = propDefn.getAllowedChoices();\n assertEquals(9, choices.getChoices().length);\n}\n"
|
"private void updateSrtpControlsForDtls(MediaType mediaType, MediaDescription localMd, MediaDescription remoteMd) {\n SrtpControls srtpControls = getSrtpControls();\n DtlsControl dtlsControl = (DtlsControl) srtpControls.get(mediaType, SrtpControlType.DTLS_SRTP);\n if (dtlsControl == null)\n return;\n boolean dtls = isDtlsMediaDescription(remoteMd);\n if (dtls) {\n if (localMd == null) {\n String setup;\n try {\n setup = remoteMd.getAttribute(DTLS_SRTP_SETUP_ATTR);\n } catch (SdpParseException spe) {\n setup = null;\n }\n if (DTLS_SRTP_SETUP_PASSIVE.equals(setup)) {\n dtlsControl.setDtlsProtocol(DtlsControl.DTLS_CLIENT_PROTOCOL);\n }\n }\n Vector<Attribute> attrs = remoteMd.getAttributes(false);\n Map<String, String> remoteFingerprints = new LinkedHashMap<String, String>();\n if (attrs != null) {\n for (Attribute attr : attrs) {\n String fingerprint;\n try {\n if (DTLS_SRTP_FINGERPRINT_ATTR.equals(attr.getName())) {\n fingerprint = attr.getValue();\n if (fingerprint == null)\n continue;\n else\n fingerprint = fingerprint.trim();\n } else {\n continue;\n }\n } catch (SdpParseException spe) {\n continue;\n }\n int spIndex = fingerprint.indexOf(' ');\n if ((spIndex > 0) && (spIndex < fingerprint.length() - 1)) {\n String hashFunction = fingerprint.substring(0, spIndex);\n fingerprint = fingerprint.substring(spIndex + 1);\n remoteFingerprints.put(hashFunction, fingerprint);\n }\n }\n }\n dtlsControl.setRemoteFingerprints(remoteFingerprints);\n removeAndCleanupOtherSrtpControls(mediaType, SrtpControlType.DTLS_SRTP);\n } else {\n srtpControls.remove(mediaType, SrtpControlType.DTLS_SRTP);\n dtlsControl.cleanup();\n }\n}\n"
|
"public String toString() {\n return provider.toString();\n}\n"
|
"protected void writeText(int type, String txt, IContent content, InlineFlag inlineFlag, IStyle computedStyle, IStyle inlineStyle) {\n HyperlinkInfo hyper = getHyperlink(content);\n int paragraphWidth = (int) WordUtil.twipToPt(context.getCurrentWidth());\n if (content instanceof TextContent) {\n TextFlag textFlag = TextFlag.START;\n String fontFamily = null;\n if (\"String_Node_Str\".equals(txt) || txt == null || WordUtil.isField(content)) {\n wordWriter.writeContent(type, txt, computedStyle, inlineStyle, fontFamily, hyper, inlineFlag, textFlag, paragraphWidth, rtl);\n } else {\n FontSplitter fontSplitter = getFontSplitter(content);\n while (fontSplitter.hasMore()) {\n Chunk ch = fontSplitter.getNext();\n int offset = ch.getOffset();\n int length = ch.getLength();\n fontFamily = getFontFamily(computedStyle, ch);\n String string = null;\n if (ch == Chunk.HARD_LINE_BREAK) {\n string = ch.getText();\n } else {\n string = txt.substring(offset, offset + length);\n }\n wordWriter.writeContent(type, string, computedStyle, inlineStyle, fontFamily, hyper, inlineFlag, textFlag, paragraphWidth);\n textFlag = fontSplitter.hasMore() ? TextFlag.MIDDLE : TextFlag.END;\n }\n }\n if (inlineFlag == InlineFlag.BLOCK) {\n wordWriter.writeContent(type, null, computedStyle, inlineStyle, fontFamily, hyper, inlineFlag, TextFlag.END, paragraphWidth);\n }\n } else {\n wordWriter.writeContent(type, txt, computedStyle, inlineStyle, computedStyle.getFontFamily(), hyper, inlineFlag, TextFlag.WHOLE, paragraphWidth);\n }\n}\n"
|
"protected final <T> void writeRequest(final Channel channel, final AsyncHttpClientConfig config, final NettyResponseFuture<T> future, final HttpRequest nettyRequest) {\n try {\n if (!channel.isOpen() || !channel.isConnected()) {\n if (!remotelyClosed(channel, future)) {\n abort(future, new ConnectException());\n return;\n }\n }\n Body body = null;\n if (!future.getNettyRequest().getMethod().equals(HttpMethod.CONNECT)) {\n if (future.getRequest().getBodyGenerator() != null) {\n try {\n body = future.getRequest().getBodyGenerator().createBody();\n } catch (IOException ex) {\n throw new IllegalStateException(ex);\n }\n long length = body.getContentLength();\n if (length >= 0) {\n nettyRequest.setHeader(HttpHeaders.Names.CONTENT_LENGTH, length);\n }\n } else {\n body = null;\n }\n }\n try {\n channel.write(nettyRequest).addListener(new ProgressListener(true, future.getAsyncHandler(), future));\n } catch (Throwable cause) {\n if (log.isDebugEnabled()) {\n log.debug(cause);\n }\n if (future.provider().remotelyClosed(channel, future)) {\n return;\n } else {\n future.abort(cause);\n }\n }\n if (!future.getNettyRequest().getMethod().equals(HttpMethod.CONNECT)) {\n RandomAccessFile raf = null;\n if (future.getRequest().getFile() != null) {\n final File file = future.getRequest().getFile();\n long fileLength = 0;\n try {\n raf = new RandomAccessFile(file, \"String_Node_Str\");\n fileLength = raf.length();\n ChannelFuture writeFuture;\n if (channel.getPipeline().get(SslHandler.class) != null) {\n writeFuture = channel.write(new ChunkedFile(raf, 0, fileLength, 8192));\n writeFuture.addListener(new ProgressListener(false, future.getAsyncHandler(), future));\n } else {\n final FileRegion region = new DefaultFileRegion(raf.getChannel(), 0, fileLength);\n writeFuture = channel.write(region);\n writeFuture.addListener(new ProgressListener(false, future.getAsyncHandler(), future) {\n public void operationComplete(ChannelFuture cf) {\n region.releaseExternalResources();\n super.operationComplete(cf);\n }\n });\n }\n } finally {\n if (raf != null)\n try {\n raf.close();\n } catch (IOException e) {\n }\n }\n } else if (body != null) {\n ChannelFuture writeFuture;\n if (channel.getPipeline().get(SslHandler.class) == null && (body instanceof RandomAccessBody)) {\n writeFuture = channel.write(new BodyFileRegion((RandomAccessBody) body));\n } else {\n writeFuture = channel.write(new BodyChunkedInput(body));\n }\n final Body b = body;\n writeFuture.addListener(new ProgressListener(false, future.getAsyncHandler(), future) {\n public void operationComplete(ChannelFuture cf) {\n try {\n b.close();\n } catch (IOException e) {\n log.warn(e, \"String_Node_Str\", e.getMessage());\n }\n super.operationComplete(cf);\n }\n });\n }\n }\n } catch (Throwable ioe) {\n if (future.provider().remotelyClosed(channel, future)) {\n return;\n }\n abort(future, ioe);\n }\n try {\n future.touch();\n int delay = requestTimeout(config, future.getRequest().getPerRequestConfig());\n if (delay != -1) {\n ReaperFuture reaperFuture = new ReaperFuture(channel, future);\n Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, delay, delay, TimeUnit.MILLISECONDS);\n reaperFuture.setScheduledFuture(scheduledFuture);\n future.setReaperFuture(reaperFuture);\n }\n } catch (RejectedExecutionException ex) {\n abort(future, ex);\n }\n}\n"
|
"public void channelRead(final ChannelHandlerContext ctx, Object msg) throws Exception {\n if (!(msg instanceof HttpObject) || !(((HttpObject) msg).getDecoderResult().isSuccess())) {\n sendError(ctx, HttpResponseStatus.BAD_REQUEST, null);\n }\n HttpObject httpObject = (HttpObject) msg;\n messageQueue.add(httpObject);\n if (tunnelEstablished) {\n processQueuedMessages(ctx);\n return;\n }\n if (msg instanceof HttpRequest) {\n HttpRequest request = (HttpRequest) msg;\n try {\n requestUri = new URI(request.getUri());\n } catch (URISyntaxException e) {\n sendError(ctx, HttpResponseStatus.BAD_REQUEST, null);\n return;\n }\n String hostHeaderValue = request.headers().get(HOST);\n requestedHost = getRequestedHost(requestUri, hostHeaderValue);\n if (requestedHost == null) {\n sendError(ctx, HttpResponseStatus.BAD_REQUEST, null);\n return;\n }\n VirtualHostConfig vhost = virtualHosts.get(requestedHost.getName());\n if (vhost == null) {\n sendError(ctx, HttpResponseStatus.SERVICE_UNAVAILABLE, null);\n return;\n }\n destinationHost = parseHost(vhost.getBalance().getMembers().iterator().next());\n connectToDestination(ctx, destinationHost);\n }\n}\n"
|
"public void dumpEnergyValueRegistryToLog(EnergyValueRegistryProxy.Phase phase) {\n LogHelper.info(String.format(\"String_Node_Str\", phase));\n if (phase == EnergyValueRegistryProxy.Phase.PRE_ASSIGNMENT) {\n for (WrappedStack wrappedStack : this.preAssignedMappings.keySet()) {\n LogHelper.info(String.format(\"String_Node_Str\", wrappedStack, EnergyValueRegistry.getInstance().getStackValueMap().get(wrappedStack)));\n }\n } else if (phase == EnergyValueRegistryProxy.Phase.POST_ASSIGNMENT) {\n if (this.postAssignedMappings != null) {\n for (WrappedStack wrappedStack : this.postAssignedMappings.keySet()) {\n LogHelper.info(String.format(\"String_Node_Str\", wrappedStack, EnergyValueRegistry.getInstance().getStackValueMap().get(wrappedStack)));\n }\n }\n } else if (phase == EnergyValueRegistryProxy.Phase.ALL) {\n for (WrappedStack wrappedStack : EnergyValueRegistry.getInstance().getStackValueMap().keySet()) {\n LogHelper.info(String.format(\"String_Node_Str\", wrappedStack, EnergyValueRegistry.getInstance().getStackValueMap().get(wrappedStack)));\n }\n }\n LogHelper.info(String.format(\"String_Node_Str\", phase));\n}\n"
|
"public void finish(OperationOrder operationOrder) throws AxelorException {\n operationOrderStockMoveService.finish(operationOrder);\n operationOrder.setRealEndDateT(today);\n operationOrder.setStatusSelect(IOperationOrder.STATUS_FINISHED);\n return operationOrder;\n}\n"
|
"public void resolveActions() {\n int oldRedstoneOutput = redstoneOutput;\n redstoneOutput = 0;\n BitSet temp = prevBroadcastSignal;\n temp.clear();\n prevBroadcastSignal = broadcastSignal;\n broadcastSignal = temp;\n startResolution();\n Map<IAction, Boolean> activeActions = new HashMap<IAction, Boolean>();\n Multiset<IAction> actionCount = HashMultiset.create();\n for (int it = 0; it < 8; ++it) {\n ITrigger trigger = triggers[it];\n IAction action = actions[it];\n ITriggerParameter parameter = triggerParameters[it];\n if (trigger != null && action != null) {\n actionCount.add(action);\n if (!activeActions.containsKey(action)) {\n activeActions.put(action, active);\n } else if (logic == GateLogic.AND) {\n activeActions.put(action, activeActions.get(action) && isNearbyTriggerActive(trigger, parameter));\n } else {\n activeActions.put(action, activeActions.get(action) || isNearbyTriggerActive(trigger, parameter));\n }\n }\n }\n for (Map.Entry<IAction, Boolean> entry : activeActions.entrySet()) {\n if (entry.getValue()) {\n IAction action = entry.getKey();\n if (resolveAction(action, actionCount.count(action))) {\n continue;\n }\n if (action instanceof ActionRedstoneOutput) {\n redstoneOutput = 15;\n } else if (action instanceof ActionRedstoneFaderOutput) {\n redstoneOutput = ((ActionRedstoneFaderOutput) action).level;\n } else if (action instanceof ActionSignalOutput) {\n broadcastSignal.set(((ActionSignalOutput) action).color.ordinal());\n } else {\n for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {\n TileEntity tile = pipe.container.getTile(side);\n if (tile instanceof IActionReceptor) {\n IActionReceptor recept = (IActionReceptor) tile;\n recept.actionActivated(action);\n }\n }\n }\n }\n }\n pipe.actionsActivated(activeActions);\n if (oldRedstoneOutput != redstoneOutput) {\n if (redstoneOutput == 0 ^ oldRedstoneOutput == 0) {\n pipe.container.scheduleRenderUpdate();\n }\n pipe.updateNeighbors(true);\n }\n if (!prevBroadcastSignal.equals(broadcastSignal)) {\n pipe.container.scheduleRenderUpdate();\n pipe.updateSignalState();\n }\n}\n"
|
"public static synchronized void delInstatnceTask(Integer taskId, Date taskDate) {\n TaskRunInfo taskRunInfo = taskRunInfoMap.get(taskId);\n if (taskRunInfo == null) {\n logger.error(\"String_Node_Str\", taskId, DateUtils2.dateStr(taskDate));\n return;\n }\n if (taskRunInfo.removeRunning(taskDate)) {\n InstanceTaskExecutor instanceTaskExecutor = taskRunInfo.getWaitingTaskQueue().poll();\n while (instanceTaskExecutor != null && instanceTaskExecutor.getInstanceTask() != null && (instanceTaskExecutor.getInstanceTask().getIsValid() == null || instanceTaskExecutor.getInstanceTask().getIsValid() == 0)) {\n instanceTaskExecutor = taskRunInfo.getWaitingTaskQueue().poll();\n }\n }\n if (taskRunInfo.isEmpty()) {\n taskRunInfoMap.remove(taskId);\n }\n}\n"
|
"protected DbMaintainTask createDbMaintainTask() {\n return new MarkDatabaseAsUpToDateTask(getDbMaintainDatabases(), scriptLocations, autoCreateDbMaintainScriptsTable, qualifiers, includedQualifiers, excludedQualifiers, scriptFileExtensions);\n}\n"
|
"private void parseMessages(Peer peer, IOBuffer buffer, Protocol protocol) {\n byte numberOfMessages = protocol.getNumberOfMessages();\n while (numberOfMessages > 0 && buffer.position() < buffer.limit()) {\n numberOfMessages--;\n Message message = MessageHeader.readMessageHeader(buffer, messageFactory);\n if (message == null) {\n if (log.enabled()) {\n log.error(\"String_Node_Str\" + receivedAddress);\n }\n } else if (message.isReliable()) {\n if (!peer.isDuplicateMessage(message)) {\n peer.receive(message);\n }\n } else {\n if (message instanceof PingMessage) {\n peer.send(PongMessage.INSTANCE);\n } else if (message instanceof PongMessage) {\n peer.pongMessageReceived();\n } else {\n peer.receive(message);\n }\n }\n }\n}\n"
|
"public boolean check(RequirementsContext context, List<String> args) throws RequirementCheckException {\n for (String arg : args) {\n if (aH.matchesQuantity(arg) || aH.matchesInteger(arg) || aH.matchesDouble(arg)) {\n quantity = aH.getDoubleFrom(arg);\n dB.echoDebug(\"String_Node_Str\" + quantity);\n } else\n throw new RequirementCheckException(Messages.ERROR_UNKNOWN_ARGUMENT, arg);\n }\n try {\n RegisteredServiceProvider<Economy> provider = Bukkit.getServicesManager().getRegistration(Economy.class);\n if (provider != null && provider.getProvider() != null) {\n Economy economy = provider.getProvider();\n balance = economy.getBalance(context.getPlayer().getName());\n dB.echoDebug(\"String_Node_Str\" + balance);\n }\n } catch (NoClassDefFoundError e) {\n dB.echoError(\"String_Node_Str\");\n }\n if (balance >= quantity)\n outcome = true;\n else\n outcome = false;\n return outcome;\n}\n"
|
"private void readIndexes() throws JDBCException, SQLException {\n updateListeners(\"String_Node_Str\" + database.toString() + \"String_Node_Str\");\n for (Table table : tablesMap.values()) {\n ResultSet rs;\n try {\n rs = databaseMetaData.getIndexInfo(database.getCatalogName(), database.getSchemaName(), table.getName(), true, true);\n } catch (SQLException e) {\n throw e;\n }\n Map<String, Index> indexMap = new HashMap<String, Index>();\n while (rs.next()) {\n String indexName = rs.getString(\"String_Node_Str\");\n short type = rs.getShort(\"String_Node_Str\");\n String tableName = rs.getString(\"String_Node_Str\");\n String columnName = rs.getString(\"String_Node_Str\");\n if (type == DatabaseMetaData.tableIndexStatistic) {\n continue;\n }\n if (columnName == null) {\n continue;\n }\n Index indexInformation;\n if (indexMap.containsKey(indexName)) {\n indexInformation = indexMap.get(indexName);\n } else {\n indexInformation = new Index();\n indexInformation.setTableName(tableName);\n indexInformation.setName(indexName);\n indexMap.put(indexName, indexInformation);\n }\n indexInformation.getColumns().add(columnName);\n }\n for (String key : indexMap.keySet()) {\n indexes.add(indexMap.get(key));\n }\n rs.close();\n }\n}\n"
|
"public void onPlayerTeleport(PlayerTeleportEvent event) {\n PortalPlayerSession ps = this.plugin.getPortalSession(event.getPlayer());\n ps.playerDidTeleport(event.getTo());\n super.onPlayerTeleport(event);\n}\n"
|
"public void start() throws IOException {\n String kmsLogin = getProperty(KURENTO_KMS_LOGIN_PROP);\n String kmsPasswd = getProperty(KURENTO_KMS_PASSWD_PROP);\n String kmsPem = getProperty(KURENTO_KMS_PEM_PROP);\n isKmsRemote = !wsUri.contains(\"String_Node_Str\") && !wsUri.contains(\"String_Node_Str\");\n if (isKmsRemote && kmsLogin == null && (kmsPem == null || kmsPasswd == null)) {\n String kmsAutoStart = getProperty(KMS_AUTOSTART_PROP, KMS_AUTOSTART_DEFAULT);\n throw new RuntimeException(\"String_Node_Str\" + KMS_AUTOSTART_PROP + \"String_Node_Str\" + kmsAutoStart + \"String_Node_Str\" + KMS_WS_URI_PROP + \"String_Node_Str\" + wsUri + \"String_Node_Str\" + KURENTO_KMS_LOGIN_PROP + \"String_Node_Str\" + kmsLogin + \"String_Node_Str\" + KURENTO_KMS_PASSWD_PROP + \"String_Node_Str\" + kmsPasswd + \"String_Node_Str\" + KURENTO_KMS_PEM_PROP + \"String_Node_Str\" + kmsPem);\n }\n serverCommand = PropertiesManager.getProperty(KURENTO_SERVER_COMMAND_PROP, KURENTO_SERVER_COMMAND_DEFAULT);\n gstPlugins = PropertiesManager.getProperty(KURENTO_GST_PLUGINS_PROP, KURENTO_GST_PLUGINS_DEFAULT);\n try {\n workspace = Files.createTempDirectory(\"String_Node_Str\").toString();\n lastWorkspace = workspace;\n } catch (IOException e) {\n workspace = PropertiesManager.getProperty(KURENTO_WORKSPACE_PROP, KURENTO_WORKSPACE_DEFAULT);\n log.error(\"String_Node_Str\", workspace, e);\n }\n debugOptions = PropertiesManager.getProperty(KURENTO_SERVER_DEBUG_PROP, KURENTO_SERVER_DEBUG_DEFAULT);\n if (!workspace.endsWith(\"String_Node_Str\")) {\n workspace += \"String_Node_Str\";\n }\n log.debug(\"String_Node_Str\", workspace);\n if (rabbitMqAddress != null) {\n log.info(\"String_Node_Str\" + \"String_Node_Str\", rabbitMqAddress, serverCommand, gstPlugins, workspace);\n } else {\n log.info(\"String_Node_Str\" + \"String_Node_Str\", wsUri, serverCommand, gstPlugins, workspace);\n if (!isFreePort(wsUri)) {\n throw new RuntimeException(\"String_Node_Str\" + wsUri + \"String_Node_Str\");\n }\n }\n if (isKmsRemote) {\n String remoteKmsStr = wsUri.substring(wsUri.indexOf(\"String_Node_Str\") + 2, wsUri.lastIndexOf(\"String_Node_Str\"));\n log.info(\"String_Node_Str\", remoteKmsStr);\n remoteKms = new SshConnection(remoteKmsStr, kmsLogin, kmsPasswd, kmsPem);\n if (kmsPem != null) {\n remoteKms.setPem(kmsPem);\n }\n remoteKms.start();\n remoteKms.createTmpFolder();\n }\n createKurentoConf(isKmsRemote);\n if (isKmsRemote) {\n String[] filesToBeCopied = { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n for (String s : filesToBeCopied) {\n remoteKms.scp(workspace + s, remoteKms.getTmpFolder() + \"String_Node_Str\" + s);\n }\n remoteKms.runAndWaitCommand(\"String_Node_Str\", \"String_Node_Str\", remoteKms.getTmpFolder() + \"String_Node_Str\");\n }\n if (testDir != null) {\n File logFile = new File(testDir + testClassName, testMethodName + \"String_Node_Str\");\n KurentoServicesTestHelper.setServerLogFilePath(logFile);\n log.debug(\"String_Node_Str\", logFile.getAbsolutePath());\n if (isKmsRemote) {\n remoteKms.runAndWaitCommand(\"String_Node_Str\", \"String_Node_Str\", remoteKms.getTmpFolder() + \"String_Node_Str\" + \"String_Node_Str\" + remoteKms.getTmpFolder() + \"String_Node_Str\");\n } else {\n Shell.runAndWait(\"String_Node_Str\", \"String_Node_Str\", workspace + \"String_Node_Str\" + logFile.getAbsolutePath() + \"String_Node_Str\");\n }\n } else {\n if (isKmsRemote) {\n remoteKms.runAndWaitCommand(\"String_Node_Str\", \"String_Node_Str\", remoteKms.getTmpFolder() + \"String_Node_Str\" + \"String_Node_Str\");\n } else {\n Shell.run(\"String_Node_Str\", \"String_Node_Str\", workspace + \"String_Node_Str\");\n }\n }\n waitForKurentoMediaServer(wsUri);\n}\n"
|
"private void drawBuilding(int x, int y, IBuilding building, float color) {\n EBuildingType type = building.getBuildingType();\n float state = building.getStateProgress();\n float maskState;\n if (state < 0.5f) {\n maskState = state * 2;\n for (ImageLink link : type.getBuildImages()) {\n Image image = imageProvider.getImage(link);\n drawWithConstructionMask(x, y, maskState, image, color);\n }\n } else if (state < 0.99) {\n maskState = state * 2 - 1;\n for (ImageLink link : type.getBuildImages()) {\n Image image = imageProvider.getImage(link);\n draw(image, x, y, color);\n }\n for (ImageLink link : type.getImages()) {\n Image image = imageProvider.getImage(link);\n drawWithConstructionMask(x, y, maskState, image, color);\n }\n } else {\n if (type == EBuildingType.MILL && ((IBuilding.IMill) building).isWorking()) {\n Sequence<? extends Image> seq = this.imageProvider.getSettlerSequence(MILL_FILE, MILL_SEQ);\n if (seq.length() > 0) {\n int i = getAnimationStep(x, y);\n int step = i % seq.length();\n draw(seq.getImageSafe(step), x, y, color);\n }\n playSound(building, 42);\n } else {\n ImageLink[] images = type.getImages();\n if (images.length > 0) {\n Image image = imageProvider.getImage(images[0]);\n draw(image, x, y, color);\n }\n if (building instanceof IBuilding.IOccupyed) {\n drawOccupiers(x, y, (IBuilding.IOccupyed) building, color);\n }\n for (int i = 1; i < images.length; i++) {\n Image image = imageProvider.getImage(images[i]);\n draw(image, x, y, color);\n }\n }\n }\n if (building.isSelected()) {\n drawBuildingSelectMarker(x, y);\n }\n}\n"
|
"private int getIndexForWeek(int week) {\n Preconditions.checkState(mViewPager.getAdapter() instanceof EventsByWeekFragmentPagerAdapter, \"String_Node_Str\");\n List<EventWeekTab> tabs = ((EventsByWeekFragmentPagerAdapter) mViewPager.getAdapter()).getTabs();\n for (int i = 0; i < tabs.size(); i++) {\n if (tabs.get(i).getWeek() > week) {\n return i - 1;\n }\n }\n return -1;\n}\n"
|
"public static void main(String[] args) throws Exception {\n BufferedReader reader;\n if (args.length == 0)\n reader = new BufferedReader(new InputStreamReader(System.in, \"String_Node_Str\"));\n else\n reader = FileManager.getReader(args[0]);\n String line;\n String[][] tokens;\n boolean full = JerboaProperties.getBoolean(\"String_Node_Str\", false);\n while ((line = reader.readLine()) != null) {\n tokens = tokenize(line);\n if (tokens[0].length > 0) {\n if (full)\n out.println(line);\n out.print(tokens[0][0]);\n for (int i = 1; i < tokens[0].length; i++) out.print(\"String_Node_Str\" + tokens[0][i]);\n out.println();\n if (full) {\n System.out.print(tokens[1][0]);\n for (int i = 1; i < tokens[1].length; i++) System.out.print(\"String_Node_Str\" + tokens[1][i]);\n System.out.println();\n }\n if (full) {\n System.out.print(tokens[2][0]);\n for (int i = 1; i < tokens[2].length; i++) System.out.print(\"String_Node_Str\" + tokens[2][i]);\n System.out.println();\n }\n } else {\n if (full) {\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n } else {\n System.out.println(\"String_Node_Str\");\n }\n }\n }\n reader.close();\n}\n"
|
"public void testClosure7() throws Exception {\n testClosureTypes(CLOSURE_DEFS + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n}\n"
|
"public void openStartElement(XPathFragment xPathFragment, NamespaceResolver namespaceResolver) {\n try {\n if (level.isFirst()) {\n level.setFirst(false);\n } else {\n position = level;\n level = new Level(true, true, level);\n if (position.isFirst()) {\n position.setFirst(false);\n } else {\n writer.write(',');\n }\n }\n if (xPathFragment.nameIsText()) {\n if (position != null && position.isCollection() && position.isEmptyCollection()) {\n writer.write('[');\n writer.write(' ');\n position.setEmptyCollection(false);\n position.setNeedToOpenComplex(false);\n numberOfTabs++;\n return;\n }\n }\n this.addPositionalNodes(xPathFragment, namespaceResolver);\n if (position.isNeedToOpenComplex()) {\n writer.write('{');\n position.setNeedToOpenComplex(false);\n position.setNeedToCloseComplex(true);\n }\n if (!isLastEventText) {\n if (position.isCollection() && !position.isEmptyCollection()) {\n writer.write(' ');\n } else {\n writer.writeCR();\n for (int x = 0; x < numberOfTabs; x++) {\n writeValue(tab(), false);\n }\n }\n }\n if (!(position.isCollection() && !position.isEmptyCollection())) {\n super.writeKey(xPathFragment);\n if (position.isCollection() && position.isEmptyCollection()) {\n writer.write('[');\n writer.write(' ');\n position.setEmptyCollection(false);\n }\n }\n numberOfTabs++;\n isLastEventText = false;\n charactersAllowed = true;\n } catch (IOException e) {\n throw XMLMarshalException.marshalException(e);\n }\n}\n"
|
"public void getDebugInfo(List<String> left, List<String> right, EnumFacing side) {\n left.add(\"String_Node_Str\" + tankHeatableOut.getDebugString());\n left.add(\"String_Node_Str\" + tankCoolableIn.getDebugString());\n}\n"
|
"protected void customReceiveSms(String new_name, String phone, String body, long date) {\n userPref = PreferenceManager.getDefaultSharedPreferences(mContext);\n activ_notif = userPref.getBoolean(LheidoUtils.receiver_notification_key, true);\n Toast.makeText(mContext, \"String_Node_Str\" + new_name, Toast.LENGTH_LONG).show();\n if (activ_notif) {\n if (!notificationsId.containsKey(phone))\n notificationsId.put(phone, notificationsId.size());\n Intent notificationIntent = new Intent(mContext, MainLheidoSMS.class);\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n PendingIntent pIntent = PendingIntent.getActivity(mContext, 0, notificationIntent, 0);\n Intent openAction = new Intent(mContext, MainLheidoSMS.class);\n openAction.putExtra(\"String_Node_Str\", new_name);\n openAction.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n PendingIntent openPending = PendingIntent.getActivity(mContext, 0, openAction, PendingIntent.FLAG_CANCEL_CURRENT);\n showNotification(body, new_name, phone, pIntent, openPending);\n }\n playNotificationSound();\n moveConversationOnTop(phone, true);\n LheidoUtils.Send.receiveNewMessage(mContext);\n Time d = new Time();\n d.set(date);\n LheidoUtils.Send.notifyReceiveSms(mContext, new Message(-1, body, phone, 1, d));\n}\n"
|
"public void put(HttpExchange exchange, String data, boolean internalCall, JSONObject internalResp) {\n try {\n String tailResources = null;\n if (uri_link != null) {\n tailResources = getTailResourceUri(exchange, true);\n String thisUri = uri_link + tailResources;\n Resource resource = RESTServer.getResource(thisUri);\n resource.exchangeJSON.putAll(this.exchangeJSON);\n resource.put(exchange, data, internalCall, internalResp);\n } else if (url_link != null) {\n tailResources = getTailResourceUri(exchange, false);\n String thisUrl = url_link.toString() + tailResources;\n StringBuffer serverRespBuffer = new StringBuffer();\n HttpURLConnection is4Conn = is4ServerPut(thisUrl, data, serverRespBuffer);\n if (is4Conn != null) {\n String requestUri = exchangeJSON.getString(\"String_Node_Str\");\n if (requestUri.contains(\"String_Node_Str\"))\n requestUri = requestUri.substring(0, requestUri.indexOf(\"String_Node_Str\"));\n if (requestUri.contains(\"String_Node_Str\") && !requestUri.endsWith(\"String_Node_Str\")) {\n JSONObject fixedServerResp = new JSONObject();\n String localUri = URI + tailResources;\n fixedServerResp.put(localUri, serverRespBuffer.toString());\n sendResponse(exchange, is4Conn.getResponseCode(), fixedServerResp.toString(), internalCall, internalResp);\n } else {\n sendResponse(exchange, is4Conn.getResponseCode(), serverRespBuffer.toString(), internalCall, internalResp);\n }\n is4Conn.disconnect();\n } else {\n sendResponse(exchange, 504, null, internalCall, internalResp);\n }\n }\n } catch (Exception e) {\n logger.log(Level.WARNING, \"String_Node_Str\", e);\n sendResponse(exchange, 504, null, internalCall, internalResp);\n }\n}\n"
|
"private double getMaxLatitude(DataTilePos pos) {\n return (pos.getTileX() + 1) * this.tileSize.getX();\n}\n"
|
"public void attemptLogin() {\n if (loginTask != null) {\n return;\n }\n usernameEdit.setError(null);\n passwordEdit.setError(null);\n username = usernameEdit.getText().toString().replace(\"String_Node_Str\", \"String_Node_Str\");\n password = passwordEdit.getText().toString();\n boolean cancel = false;\n View focusView = null;\n if (TextUtils.isEmpty(username)) {\n CustomToast.showInCenter(getApplicationContext(), R.string.error_username_required);\n focusView = usernameEdit;\n cancel = true;\n } else if (!username.contains(\"String_Node_Str\") && !username.matches(Constants.REGULAR_EXPRESSION_USERNAME)) {\n CustomToast.showInCenter(getApplicationContext(), R.string.error_invalid_username);\n focusView = usernameEdit;\n cancel = true;\n } else if (TextUtils.isEmpty(password)) {\n CustomToast.showInCenter(getApplicationContext(), R.string.error_password_required);\n focusView = passwordEdit;\n cancel = true;\n } else if (password.contains(\"String_Node_Str\")) {\n CustomToast.showInCenter(getApplicationContext(), R.string.error_invalid_password);\n focusView = passwordEdit;\n cancel = true;\n }\n if (cancel) {\n focusView.requestFocus();\n } else {\n customProgressDialog.show(getString(R.string.login_progress_signing_in));\n InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n if (getCurrentFocus() != null) {\n inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\n }\n loginTask = new LoginTask();\n loginTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }\n}\n"
|
"private void updateSelection(StatusBarNotification n) {\n String oldNotif = NotificationHelper.getContentDescription((StatusBarNotification) mNotificationView.getTag());\n String newNotif = NotificationHelper.getContentDescription(n);\n boolean sameNotification = newNotif.equals(oldNotif);\n if (!mAnimating || sameNotification) {\n Bitmap b = n.getNotification().largeIcon;\n if (b != null) {\n mNotificationIcon.setImageBitmap(NotificationPeekViewUtils.getRoundedShape(b));\n } else {\n mNotificationIcon.setImageDrawable(NotificationPeekViewUtils.getIconFromResource(mContext, n));\n }\n final PendingIntent contentIntent = n.getNotification().contentIntent;\n if (contentIntent != null) {\n final View.OnClickListener listener = new NotificationClicker(n, this);\n mNotificationIcon.setOnClickListener(listener);\n } else {\n mNotificationIcon.setOnClickListener(null);\n }\n mNotificationText.setText(NotificationPeekViewUtils.getNotificationDisplayText(mContext, n));\n mNotificationText.setVisibility(isKeyguardSecureShowing() ? View.GONE : View.VISIBLE);\n mNotificationView.setTag(n);\n if (!sameNotification || mNotificationView.getX() != 0) {\n mNotificationView.setAlpha(1f);\n mNotificationView.setX(0);\n }\n }\n for (int i = 0; i < mNotificationsContainer.getChildCount(); i++) {\n ImageView view = (ImageView) mNotificationsContainer.getChildAt(i);\n if ((mAnimating ? oldNotif : newNotif).equals(NotificationHelper.getContentDescription((StatusBarNotification) view.getTag()))) {\n view.setAlpha(1f);\n } else {\n view.setAlpha(ICON_LOW_OPACITY);\n }\n }\n}\n"
|
"private void validate(final String aDatasourceName, final List<Change> aLog, Consumer<Void> onSuccess, Consumer<Exception> onFailure, Scripts.Space aSpace) {\n List<CallPoint> toBeCalled = new ArrayList<>();\n validators.keySet().stream().forEach((validatorName) -> {\n Collection<String> datasourcesUnderControl = validators.get(validatorName);\n if (((datasourcesUnderControl == null || datasourcesUnderControl.isEmpty()) && aDatasourceName == null) || (datasourcesUnderControl != null && datasourcesUnderControl.contains(aDatasourceName))) {\n try {\n JSObject module = createModule(validatorName, aSpace);\n if (module != null) {\n Object oValidate = module.getMember(\"String_Node_Str\");\n if (oValidate instanceof JSObject) {\n JSObject validateFunction = (JSObject) oValidate;\n toBeCalled.add(new CallPoint(module, validateFunction));\n } else {\n Logger.getLogger(ScriptedDatabasesClient.class.getName()).log(Level.WARNING, \"String_Node_Str\", validatorName);\n }\n } else {\n Logger.getLogger(ScriptedDatabasesClient.class.getName()).log(Level.WARNING, \"String_Node_Str\", validatorName);\n }\n } catch (Exception ex) {\n Logger.getLogger(ScriptedDatabasesClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n });\n if (onSuccess != null) {\n if (toBeCalled.isEmpty()) {\n onSuccess.accept(null);\n } else {\n ValidateProcess process = new ValidateProcess(toBeCalled.size(), onSuccess, onFailure);\n toBeCalled.stream().forEach((v) -> {\n v.function.call(v.module, new Object[] { aSpace.toJs(aLog.toArray()), aDatasourceName, new AbstractJSObject() {\n public Object call(final Object thiz, final Object... args) {\n process.complete(null);\n return null;\n }\n }, new AbstractJSObject() {\n\n public Object call(final Object thiz, final Object... args) {\n if (args.length > 0) {\n if (args[0] instanceof Exception) {\n process.complete((Exception) args[0]);\n } else {\n process.complete(new Exception(String.valueOf(aSpace.toJava(args[0]))));\n }\n } else {\n process.complete(new Exception(\"String_Node_Str\"));\n }\n return null;\n }\n } });\n });\n }\n } else {\n toBeCalled.stream().forEach((v) -> {\n v.function.call(v.module, new Object[] { aSpace.toJs(aLog.toArray()), aDatasourceName });\n });\n }\n}\n"
|
"private void setError(ILayerNode node, Exception error) {\n node.setError(error);\n if (tree != null) {\n tree.relayoutOnEDT();\n }\n}\n"
|
"public void dispatchEvent(MembershipEvent event, MembershipListener listener) {\n switch(event.getEventType()) {\n case MembershipEvent.MEMBER_ADDED:\n listener.memberAdded(event);\n break;\n case MembershipEvent.MEMBER_REMOVED:\n listener.memberRemoved(event);\n break;\n case MembershipEvent.MEMBER_ATTRIBUTE_CHANGED:\n listener.memberAttributeChanged((MemberAttributeEvent) event);\n break;\n default:\n throw new IllegalArgumentException(\"String_Node_Str\" + event);\n }\n}\n"
|
"private static boolean isEqualExpression2(IScriptExpression se, IScriptExpression se2) {\n if (se == se2)\n return true;\n else if (se == null || se2 == null)\n return false;\n return (se.getDataType() == se2.getDataType() || (se.getDataType() == DataType.ANY_TYPE && se2.getDataType() == DataType.UNKNOWN_TYPE) || (se.getDataType() == DataType.UNKNOWN_TYPE && se2.getDataType() == DataType.ANY_TYPE)) && isEqualObject(se.getText(), se2.getText());\n}\n"
|
"public List<Resource<?>> resolve() {\n Resource<?> r = res;\n String tk;\n char slashChar = File.separatorChar;\n String slashString = File.separator;\n if (\"String_Node_Str\".equals(path)) {\n return singleResult(r);\n } else if (path.startsWith(\"String_Node_Str\")) {\n File homeDir = OperatingSystemUtils.getUserHomeDir();\n if (path.length() == 1) {\n return singleResult(factory.create(DirectoryResource.class, homeDir));\n } else {\n cursor++;\n r = factory.create(DirectoryResource.class, homeDir);\n }\n } else if (isWindows && path.matches(\"String_Node_Str\")) {\n int idx = path.lastIndexOf(slashChar) + 1;\n r = factory.create(DirectoryResource.class, new File(path.substring(0, idx)).getAbsoluteFile());\n cursor = idx;\n } else if (path.matches(\"String_Node_Str\")) {\n int idx = path.indexOf(\"String_Node_Str\");\n if (idx == -1) {\n idx = length;\n }\n try {\n r = factory.create(URLResource.class, new URL(path.substring(0, idx)));\n } catch (MalformedURLException e) {\n throw new RuntimeException(e);\n }\n cursor = idx + 1;\n }\n while (cursor < length) {\n SW: switch(path.charAt(cursor++)) {\n case '\\\\':\n case '/':\n if (cursor - 1 == 0) {\n r = factory.create(new File(slashString).getAbsoluteFile());\n }\n continue;\n case '.':\n switch(read()) {\n case '.':\n cursor++;\n Resource<?> parent = r.getParent();\n if (parent != null) {\n r = parent;\n }\n break SW;\n default:\n if (cursor < length && path.charAt(cursor) == slashChar) {\n cursor++;\n break SW;\n }\n }\n default:\n boolean first = --cursor == 0;\n tk = capture();\n if (tk.matches(\"String_Node_Str\")) {\n boolean startDot = tk.startsWith(\"String_Node_Str\");\n String regex = pathspecToRegEx(tk.startsWith(slashString) ? tk.substring(1) : tk);\n Pattern p;\n try {\n p = Pattern.compile(regex);\n } catch (PatternSyntaxException pe) {\n p = Pattern.compile(Pattern.quote(regex));\n }\n List<Resource<?>> res = new LinkedList<>();\n for (Resource<?> child : r.listResources()) {\n if (p.matcher(child.getName()).matches()) {\n if (child.getName().startsWith(\"String_Node_Str\")) {\n if (startDot) {\n res.add(child);\n }\n } else {\n res.add(child);\n }\n }\n }\n if (cursor != length) {\n for (Resource<?> child : res) {\n results.addAll(new ResourcePathResolver(factory, child, path, cursor).resolve());\n }\n } else {\n results.addAll(res);\n }\n return results;\n }\n if (tk.startsWith(slashString)) {\n if (first) {\n r = factory.create(new File(tk));\n cursor++;\n continue;\n } else {\n tk = tk.substring(1);\n }\n }\n Resource<?> child = r.getChild(tk);\n if (child == null) {\n throw new RuntimeException(\"String_Node_Str\" + tk);\n }\n r = child;\n break;\n }\n }\n return singleResult(r);\n}\n"
|
"private void recordNumAlignedReads(String[] inputFilenames) {\n numMatchedReads = new int[samples.length];\n String[] sampleIds = AlignmentReaderImpl.getBasenames(inputFilenames);\n for (int i = 0; i < sampleIds.length; i++) {\n sampleIds[i] = FilenameUtils.getName(sampleIds[i]);\n if (sampleIds[i].equals(samples[i])) {\n numMatchedReads[i] = Math.max(1, getNumMatchedReads(inputFilenames[i]));\n }\n }\n}\n"
|
"private static Map<Class<? extends DiffElement>, Class<? extends IMerger>> getMergerTypes(String fileExtension) {\n if (!fileExtension.equals(lastExtension)) {\n lastExtension = fileExtension;\n MERGER_TYPES.clear();\n for (final int priority : MERGER_PRIORITIES) {\n final Map<Class<? extends DiffElement>, Class<? extends IMerger>> mergers = new EMFCompareMap<Class<? extends DiffElement>, Class<? extends IMerger>>();\n if (PARSED_PROVIDERS.containsKey(ALL_EXTENSIONS)) {\n final List<MergerProviderDescriptor> list = PARSED_PROVIDERS.get(ALL_EXTENSIONS);\n Collections.sort(list);\n for (MergerProviderDescriptor descriptor : list) {\n if (descriptor.getPriorityValue(descriptor.priority) == priority) {\n mergers.putAll(descriptor.getMergerProviderInstance().getMergers());\n }\n }\n }\n if (PARSED_PROVIDERS.containsKey(fileExtension)) {\n final List<MergerProviderDescriptor> list = PARSED_PROVIDERS.get(fileExtension);\n Collections.sort(list);\n for (MergerProviderDescriptor descriptor : list) {\n if (descriptor.getPriorityValue(descriptor.priority) == priority) {\n mergers.putAll(descriptor.getMergerProviderInstance().getMergers());\n }\n }\n }\n MERGER_TYPES.putAll(mergers);\n }\n }\n return MERGER_TYPES;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.