content stringlengths 40 137k |
|---|
"public void setSparkContext() {\n if (JavaSparkProgram.class.isAssignableFrom(userJobClass)) {\n sparkContext = new JavaSparkContext();\n } else if (ScalaSparkProgram.class.isAssignableFrom(userJobClass)) {\n sparkContext = new ScalaSparkContext();\n scalaJobFlag = true;\n } else {\n String error = \"String_Node_Str\";\n throw new IllegalArgumentException(error);\n }\n}\n"
|
"private boolean allParentTerminated(List<ApplicationChildContext> parentContexts, String instanceId) {\n boolean parentsTerminated = false;\n for (ApplicationChildContext context1 : parentContexts) {\n if (this.inactiveInstancesMap.containsKey(context1.getId()) && this.inactiveInstancesMap.get(context1.getId()).contains(instanceId) || this.terminatingInstancesMap.containsKey(context1.getId()) && this.terminatingInstancesMap.get(context1.getId()).contains(instanceId)) {\n log.info(\"String_Node_Str\" + context1.getId() + \"String_Node_Str\");\n parentsTerminated = false;\n return parentsTerminated;\n } else if (this.aliasToActiveMonitorsMap.containsKey(context1.getId())) {\n if (parentsTerminated) {\n log.warn(\"String_Node_Str\" + context1.getId() + \"String_Node_Str\");\n }\n } else {\n log.info(\"String_Node_Str\" + context1.getId() + \"String_Node_Str\");\n parentsTerminated = true;\n }\n }\n return parentsTerminated;\n}\n"
|
"public Move getBestMove(MachineState state, Role role, long timeout) throws MoveDefinitionException, GoalDefinitionException, TransitionDefinitionException {\n t = new Timer((int) (timeout - System.currentTimeMillis()), TimeoutHandler);\n t.setRepeats(false);\n t.start();\n List<Move> moves = stateMachine.getLegalMoves(state, role);\n if (moves.size() == 1)\n return moves.get(0);\n else {\n Move bestMove = null;\n int bestValue = Integer.MIN_VALUE;\n for (Move move : moves) {\n int value = minScore(role, move, state, Integer.MIN_VALUE, Integer.MAX_VALUE);\n if (value > bestValue) {\n bestValue = value;\n bestMove = move;\n }\n }\n System.out.println(\"String_Node_Str\" + bestValue);\n return bestMove;\n }\n}\n"
|
"private ModDiscoverer identifyMods() {\n FMLLog.fine(\"String_Node_Str\", injectedContainers);\n mods.add(new InjectedModContainer(mcp, new File(\"String_Node_Str\")));\n File coremod = new File(minecraftDir, \"String_Node_Str\");\n for (String cont : injectedContainers) {\n ModContainer mc;\n try {\n mc = (ModContainer) Class.forName(cont, true, modClassLoader).newInstance();\n } catch (Exception e) {\n FMLLog.log(Level.SEVERE, e, \"String_Node_Str\", cont);\n throw new LoaderException(e);\n }\n mods.add(new InjectedModContainer(mc, coremod));\n }\n ModDiscoverer discoverer = new ModDiscoverer();\n FMLLog.fine(\"String_Node_Str\");\n discoverer.findClasspathMods(modClassLoader);\n FMLLog.fine(\"String_Node_Str\");\n FMLLog.info(\"String_Node_Str\", canonicalModsDir.getAbsolutePath());\n discoverer.findModDirMods(canonicalModsDir);\n mods.addAll(discoverer.identifyMods());\n identifyDuplicates(mods);\n namedMods = Maps.uniqueIndex(mods, new ModIdFunction());\n FMLLog.info(\"String_Node_Str\", mods.size(), mods.size() != 1 ? \"String_Node_Str\" : \"String_Node_Str\");\n return discoverer;\n}\n"
|
"public void generateSnapshot(StructureDefinition base, StructureDefinition derived, String url, String profileName) throws DefinitionException, FHIRException {\n if (base == null)\n throw new DefinitionException(\"String_Node_Str\");\n if (derived == null)\n throw new DefinitionException(\"String_Node_Str\");\n if (snapshotStack.contains(derived.getUrl()))\n throw new DefinitionException(\"String_Node_Str\" + snapshotStack.toString() + \"String_Node_Str\");\n snapshotStack.add(derived.getUrl());\n derived.setSnapshot(new StructureDefinitionSnapshotComponent());\n int baseCursor = 0;\n int diffCursor = 0;\n if (!derived.getDifferential().getElementFirstRep().getType().isEmpty())\n throw new Error(\"String_Node_Str\");\n processPaths(\"String_Node_Str\", derived.getSnapshot(), base.getSnapshot(), derived.getDifferential(), baseCursor, diffCursor, base.getSnapshot().getElement().size() - 1, derived.getDifferential().getElement().size() - 1, url, derived.getId(), null, null, false, base.getUrl(), null, false);\n if (!derived.getSnapshot().getElementFirstRep().getType().isEmpty())\n throw new Error(\"String_Node_Str\" + derived.getSnapshot().getElementFirstRep().getPath() + \"String_Node_Str\" + derived.getUrl() + \"String_Node_Str\" + base.getUrl());\n updateMaps(base, derived);\n setIds(derived, false);\n HashMap<String, ElementDefinition> snapshotElements = new HashMap<String, ElementDefinition>();\n for (ElementDefinition e : derived.getSnapshot().getElement()) {\n snapshotElements.put(e.getId(), e);\n }\n for (ElementDefinition e : derived.getDifferential().getElement()) {\n if (!snapshotElements.containsKey(e.getId()))\n throw new DefinitionException(\"String_Node_Str\" + derived.getUrl() + \"String_Node_Str\" + e.getId());\n }\n}\n"
|
"private void processGlobalSimpleType(String targetNamespace, String defaultNamespace, SimpleType simpleType) {\n QName qname = new QName(targetNamespace, simpleType.getName());\n if (!processedSimpleTypes.containsKey(qname)) {\n processSimpleType(targetNamespace, defaultNamespace, simpleType.getName(), simpleType);\n processedSimpleTypes.put(qname, simpleType);\n }\n}\n"
|
"public void parse(Node node) {\n Element element = (Element) node;\n id = Integer.parseInt(element.getAttribute(\"String_Node_Str\"));\n NodeList nodes = element.getElementsByTagName(\"String_Node_Str\");\n if (nodes.getLength() > 0)\n properties.parse(nodes.item(0));\n nodes = element.getElementsByTagName(\"String_Node_Str\");\n if (nodes.getLength() > 0) {\n animated = true;\n NodeList tiles = ((Element) nodes.item(0)).getElementsByTagName(\"String_Node_Str\");\n for (int i = 0; i < tiles.getLength(); i++) {\n Element frame = (Element) tiles.item(i);\n int tileID = Integer.parseInt(frame.getAttribute(\"String_Node_Str\"));\n int duration = Integer.parseInt(frame.getAttribute(\"String_Node_Str\"));\n TmxAnimationFrame animation = new TmxAnimationFrame(tileID, totalDuration);\n frames.add(animation);\n totalDuration += duration;\n frameNode = frameNode.getNextSibling();\n }\n }\n}\n"
|
"private <T> ExportedInstance<T> getExportedInstance(Class<T> requestedType, Class<T> actualType) {\n Assert.notNull(requestedType, \"String_Node_Str\");\n Assert.notNull(actualType, \"String_Node_Str\");\n Addons.waitUntilStarted(addon);\n final Class<T> requestedLoadedType;\n final Class<? extends T> actualLoadedType;\n try {\n requestedLoadedType = loadAddonClass(requestedType);\n } catch (ClassNotFoundException cnfe) {\n log.fine(\"String_Node_Str\" + requestedType.getName() + \"String_Node_Str\");\n return null;\n }\n try {\n actualLoadedType = loadAddonClass(actualType);\n } catch (ClassNotFoundException cnfe) {\n log.fine(\"String_Node_Str\" + actualType.getName() + \"String_Node_Str\");\n return null;\n }\n try {\n ExportedInstance<T> result = null;\n Set<Bean<?>> beans = manager.getBeans(requestedLoadedType);\n if (!beans.isEmpty()) {\n result = new ExportedInstanceImpl<T>(addon.getClassLoader(), manager, (Bean<T>) manager.resolve(beans), requestedLoadedType, actualLoadedType);\n }\n return result;\n } catch (Exception e) {\n throw new ContainerException(\"String_Node_Str\", e);\n }\n}\n"
|
"public synchronized void create(NamespaceMeta metadata) throws Exception {\n Preconditions.checkArgument(metadata != null, \"String_Node_Str\");\n NamespaceId namespace = new NamespaceId(metadata.getName());\n if (exists(namespace.toId())) {\n throw new NamespaceAlreadyExistsException(namespace.toId());\n }\n Principal principal = SecurityRequestContext.toPrincipal();\n if (!(Principal.SYSTEM.equals(principal) && NamespaceId.DEFAULT.equals(namespace))) {\n authorizerInstantiator.get().enforce(instanceId, principal, Action.ADMIN);\n }\n try {\n dsFramework.createNamespace(namespace.toId());\n } catch (DatasetManagementException e) {\n throw new NamespaceCannotBeCreatedException(namespace.toId(), e);\n }\n nsStore.create(metadata);\n if (!(Principal.SYSTEM.equals(principal) && NamespaceId.DEFAULT.equals(namespace))) {\n authorizerInstantiatorService.get().grant(namespace, principal, ImmutableSet.of(Action.ALL));\n }\n}\n"
|
"public static AddressedBinaryMessage fromEncodedMessage(EncodedAISMessage encodedMessage) {\n if (!encodedMessage.isValid())\n throw new InvalidEncodedMessage(encodedMessage);\n if (!encodedMessage.getMessageType().equals(AISMessageType.AddressedBinaryMessage))\n throw new UnsupportedMessageType(encodedMessage.getMessageType().getCode());\n Integer repeatIndicator = DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(6, 8));\n MMSI sourceMmsi = MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(8, 38)));\n Integer sequenceNumber = DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(38, 40));\n MMSI destinationMmsi = MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(40, 70)));\n Boolean retransmit = DecoderImpl.convertToBoolean(encodedMessage.getBits(70, 71));\n Integer designatedAreaCode = DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(72, 82));\n Integer functionalId = DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(82, 88));\n String binaryData = DecoderImpl.convertToBitString(encodedMessage.getBits(88, encodedMessage.getNumberOfBits()));\n return new AddressedBinaryMessage(repeatIndicator, sourceMmsi, sequenceNumber, destinationMmsi, retransmit, spare, designatedAreaCode, functionalId, binaryData);\n}\n"
|
"protected void reply(Transport<byte[][]> t, byte[] message) {\n t.write(\"String_Node_Str\".getBytes(), false);\n t.write(message, false);\n t.write(\"String_Node_Str\".getBytes(), true);\n}\n"
|
"public void updateKeyPairs() {\n String username = System.getProperty(\"String_Node_Str\");\n Boolean devel = Boolean.valueOf(_configDao.getValue(\"String_Node_Str\"));\n if (!username.equalsIgnoreCase(\"String_Node_Str\") && !devel) {\n s_logger.warn(\"String_Node_Str\");\n return;\n }\n String already = _configDao.getValue(\"String_Node_Str\");\n String homeDir = null;\n homeDir = Script.runSimpleBashScript(\"String_Node_Str\" + username);\n if (homeDir == null) {\n throw new CloudRuntimeException(\"String_Node_Str\" + username);\n }\n if (s_logger.isInfoEnabled()) {\n s_logger.info(\"String_Node_Str\");\n }\n if (homeDir != null && homeDir.startsWith(\"String_Node_Str\")) {\n s_logger.error(\"String_Node_Str\" + username + \"String_Node_Str\");\n throw new CloudRuntimeException(\"String_Node_Str\" + username + \"String_Node_Str\");\n }\n File privkeyfile = new File(homeDir + \"String_Node_Str\");\n File pubkeyfile = new File(homeDir + \"String_Node_Str\");\n if (already == null || already.isEmpty()) {\n if (s_logger.isInfoEnabled()) {\n s_logger.info(\"String_Node_Str\");\n }\n Script.runSimpleBashScript(\"String_Node_Str\" + privkeyfile + \"String_Node_Str\" + privkeyfile + \"String_Node_Str\" + privkeyfile + \"String_Node_Str\");\n byte[] arr1 = new byte[4094];\n try {\n new DataInputStream(new FileInputStream(privkeyfile)).readFully(arr1);\n } catch (EOFException e) {\n } catch (Exception e) {\n s_logger.error(\"String_Node_Str\", e);\n throw new CloudRuntimeException(\"String_Node_Str\");\n }\n String privateKey = new String(arr1).trim();\n byte[] arr2 = new byte[4094];\n try {\n new DataInputStream(new FileInputStream(pubkeyfile)).readFully(arr2);\n } catch (EOFException e) {\n } catch (Exception e) {\n s_logger.warn(\"String_Node_Str\", e);\n throw new CloudRuntimeException(\"String_Node_Str\");\n }\n String publicKey = new String(arr2).trim();\n String insertSql1 = \"String_Node_Str\" + \"String_Node_Str\" + DBEncryptionUtil.encrypt(privateKey) + \"String_Node_Str\";\n String insertSql2 = \"String_Node_Str\" + \"String_Node_Str\" + DBEncryptionUtil.encrypt(publicKey) + \"String_Node_Str\";\n Transaction txn = Transaction.currentTxn();\n try {\n PreparedStatement stmt1 = txn.prepareAutoCloseStatement(insertSql1);\n stmt1.executeUpdate();\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\");\n }\n } catch (SQLException ex) {\n s_logger.error(\"String_Node_Str\", ex);\n throw new CloudRuntimeException(\"String_Node_Str\");\n }\n try {\n PreparedStatement stmt2 = txn.prepareAutoCloseStatement(insertSql2);\n stmt2.executeUpdate();\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\");\n }\n } catch (SQLException ex) {\n s_logger.error(\"String_Node_Str\", ex);\n throw new CloudRuntimeException(\"String_Node_Str\");\n }\n } else {\n s_logger.info(\"String_Node_Str\");\n if (username.equalsIgnoreCase(\"String_Node_Str\")) {\n s_logger.info(\"String_Node_Str\");\n updateKeyPairsOnDisk(homeDir);\n } else {\n s_logger.info(\"String_Node_Str\");\n }\n }\n s_logger.info(\"String_Node_Str\");\n try {\n injectSshKeysIntoSystemVmIsoPatch(pubkeyfile.getAbsolutePath(), privkeyfile.getAbsolutePath());\n } catch (CloudRuntimeException e) {\n if (!devel) {\n throw new CloudRuntimeException(e.getMessage());\n }\n }\n}\n"
|
"public static GroupElementHandle getMultiSelectionHandle(List modelList) {\n ReportDesignHandle designHandle = SessionHandleAdapter.getInstance().getReportDesignHandle();\n GroupElementHandle handle = new GroupElementHandle(designHandle, modelList);\n return handle;\n}\n"
|
"private void createInnerTypeRefProperty(JstType currentType, JstType innerType) {\n if (currentType.isOType())\n return;\n JstModifiers mod = innerType.getModifiers().getCopy();\n JstSynthesizedProperty property = new JstSynthesizedProperty(getTypeRef(innerType), innerType.getSimpleName(), (JstIdentifier) null, mod);\n property.setParent(currentType);\n if (currentType.getProperty(property.getName().getName()) != null) {\n int line = 0;\n int column = 0;\n int start = 0;\n int end = 0;\n JstSource src = innerType.getSource();\n if (src != null) {\n line = src.getRow();\n column = src.getColumn();\n start = src.getStartOffSet();\n end = src.getEndOffSet();\n }\n m_ctx.getErrorReporter().error(\"String_Node_Str\" + innerType.getSimpleName() + \"String_Node_Str\" + m_ctx.getCurrentType().getName(), m_ctx.getCurrentType().getName(), start, end, line, column);\n } else {\n currentType.addProperty(property);\n }\n}\n"
|
"protected static CQLStatementIterator makeCQLforInsert(CDefinition def, Map<String, String> data, UUID uuid, long timestamp, int ttl) throws CQLGenerationException {\n List<String> ret = Lists.newArrayList();\n if (uuid == null) {\n uuid = UUIDs.timeBased();\n }\n if (timestamp == 0) {\n timestamp = UUIDs.unixTimestamp(uuid);\n }\n if (!validateData(def, data)) {\n throw new CQLGenerationException(\"String_Node_Str\");\n }\n Map<String, ArrayList<String>> fieldsAndValues = makeFieldAndValueList(def, data);\n ret.add(makeInsertStatementStatic(makeTableName(def.getName(), null), makeCommaList(fieldsAndValues.get(\"String_Node_Str\")), makeCommaList(fieldsAndValues.get(\"String_Node_Str\")), uuid, timestamp, ttl));\n for (CIndex i : def.getIndexes().values()) {\n if (i.passesAllFilters(data)) {\n long shardId = i.getShardingStrategy().getShardKey(uuid);\n ret.add(makeInsertStatementWide(makeTableName(def.getName(), i.getName()), makeCommaList(fieldsAndValues.get(\"String_Node_Str\")), makeCommaList(fieldsAndValues.get(\"String_Node_Str\")), uuid, shardId, timestamp, ttl));\n if (!(i.getShardingStrategy() instanceof ShardingStrategyNone)) {\n ret.add(makeInsertStatementWideIndex(CObjectShardList.SHARD_INDEX_TABLE_NAME, makeTableName(def.getName(), i.getName()), shardId, i.getIndexValues(data), timestamp));\n }\n }\n }\n return new BoundedCQLStatementIterator(ret);\n}\n"
|
"protected Response createResponse(Map<String, String> reHeaders) throws IOException {\n Response rep = null;\n if (reHeaders != null) {\n rep = new Response(conn, reHeaders);\n if (rep.isOK()) {\n InputStream is1 = conn.getInputStream();\n InputStream is2 = null;\n String encoding = conn.getContentEncoding();\n if (encoding != null && encoding.contains(\"String_Node_Str\")) {\n is2 = new GZIPInputStream(is1);\n } else if (encoding != null && encoding.contains(\"String_Node_Str\")) {\n is2 = new InflaterInputStream(is1, new Inflater(true));\n } else {\n is2 = is1;\n }\n BufferedInputStream is = new BufferedInputStream(is2);\n rep.setStream(is);\n } else {\n try {\n rep.setStream(conn.getInputStream());\n } catch (IOException e) {\n try {\n rep.setStream(conn.getErrorStream());\n } catch (Exception e1) {\n rep.setStream(new NullInputStream());\n }\n }\n }\n }\n return rep;\n}\n"
|
"public static Result deleteUser(long id) {\n createNewEm();\n entityManager.remove(entityManager.find(UserForm.class, id));\n entityManager.getTransaction().commit();\n flash(\"String_Node_Str\", \"String_Node_Str\");\n return redirect(routes.Users.users());\n}\n"
|
"public void modifyText(ModifyEvent e) {\n String lowerStr = lowerText.getText();\n String higherStr = higherText.getText();\n if (lowerStr != \"String_Node_Str\" && !CheckValueUtils.isNumberWithNegativeValue(lowerStr)) {\n updateStatus(IStatus.ERROR, MSG_ONLY_NUMBER);\n } else if (!lowerStr.equals(\"String_Node_Str\") && !higherStr.equals(\"String_Node_Str\") && Double.valueOf(lowerStr) > Double.valueOf(higherStr)) {\n updateStatus(IStatus.ERROR, \"String_Node_Str\");\n } else {\n updateStatus(IStatus.OK, MSG_OK);\n }\n parameter.setMinThreshold(lowerStr);\n}\n"
|
"public void sortLayout() {\n int height = Plugins.getInstance().sortPermanents(ui, permanents.values());\n BattlefieldPanel.this.jPanel.setPreferredSize(new Dimension(width - 30, height));\n this.jScrollPane.repaint();\n this.jScrollPane.revalidate();\n if (battlefield == null) {\n return;\n }\n for (PermanentView permanent : battlefield.values()) {\n if (permanent.getAttachments() != null) {\n groupAttachments(permanent);\n }\n }\n invalidate();\n repaint();\n}\n"
|
"public int skipBytes(int n) throws IOException {\n if (this.position <= this.end - n) {\n this.position += n;\n return n;\n } else {\n n = this.end - position;\n position = this.end;\n return n;\n }\n}\n"
|
"public long createRow(String mode, long time, String status, Float speed, long timestamp, Float accuracy, String provider, String wifiData, Vector<ArrayList<Double>> samples, Double latitude, Double longitude) {\n ContentValues vals = new ContentValues();\n SharedPreferences settings = mCtx.getSharedPreferences(Mobility.MOBILITY, Context.MODE_PRIVATE);\n String username = settings.getString(Mobility.KEY_USERNAME, DEFAULT_USERNAME);\n if (wifiData.equals(\"String_Node_Str\"))\n wifiData = \"String_Node_Str\";\n UUID id = UUID.randomUUID();\n String timezone = DateTimeZone.getDefault().getID();\n vals.put(KEY_ID, id.toString());\n Log.d(TAG, id.toString());\n vals.put(KEY_MODE, mode);\n vals.put(KEY_SPEED, speed.toString());\n vals.put(KEY_STATUS, status);\n vals.put(KEY_LOC_TIMESTAMP, timestamp);\n vals.put(KEY_ACCURACY, accuracy);\n vals.put(KEY_PROVIDER, provider);\n vals.put(KEY_WIFIDATA, wifiData);\n vals.put(KEY_ACCELDATA, formatAccelData(samples));\n vals.put(KEY_TIME, time + \"String_Node_Str\");\n vals.put(KEY_TIMEZONE, timezone);\n vals.put(KEY_LATITUDE, latitude);\n vals.put(KEY_LONGITUDE, longitude);\n vals.put(KEY_USERNAME, username);\n Log.d(TAG, \"String_Node_Str\" + MOBILITY_TABLE + \"String_Node_Str\" + mode);\n long rowid = -1;\n Uri row = mCtx.getContentResolver().insert(MobilityInterface.CONTENT_URI, vals);\n ProbeBuilder probe = new ProbeBuilder();\n probe.withId(id.toString()).withTime(time, timezone).withLocation(time, timezone, latitude, longitude, accuracy, provider);\n Mobility.writeProbe(mCtx, probe, mode, speed, formatAccelData(samples), wifiData);\n if (row != null) {\n rowid = ContentUris.parseId(row);\n ContentResolver r = mCtx.getContentResolver();\n r.notifyChange(MobilityInterface.CONTENT_URI, null);\n }\n return rowid;\n}\n"
|
"public void restoreAll() {\n Path tfpath = cfg.getTfPath();\n Path customBackupPath = tfpath.resolve(\"String_Node_Str\");\n Path customPath = tfpath.resolve(\"String_Node_Str\");\n Path configBackupPath = tfpath.resolve(\"String_Node_Str\");\n Path configPath = tfpath.resolve(\"String_Node_Str\");\n if (Files.exists(configBackupPath)) {\n log.fine(\"String_Node_Str\");\n try {\n delete(configPath);\n } catch (NoSuchFileException e) {\n } catch (IOException e) {\n log.log(Level.INFO, \"String_Node_Str\", e);\n }\n try {\n if (isEmpty(configPath)) {\n Files.move(configBackupPath, configPath, StandardCopyOption.REPLACE_EXISTING);\n } else {\n restoreComplete = false;\n }\n } catch (IOException e) {\n log.log(Level.INFO, \"String_Node_Str\", e);\n showRestoreMessage();\n }\n }\n if (Files.exists(customBackupPath)) {\n log.fine(\"String_Node_Str\");\n try {\n delete(customPath);\n } catch (NoSuchFileException e) {\n } catch (IOException e) {\n log.log(Level.INFO, \"String_Node_Str\", e);\n }\n try {\n if (isEmpty(customPath)) {\n Files.move(customBackupPath, customPath, StandardCopyOption.REPLACE_EXISTING);\n } else {\n showRestoreMessage();\n }\n } catch (IOException e) {\n log.log(Level.INFO, \"String_Node_Str\", e);\n showRestoreMessage();\n }\n }\n}\n"
|
"public void init(ServletConfig config) throws ServletException {\n super.init(config);\n pickUpSharedManagerIfExists(config);\n String urlPrefix = config.getInitParameter(URL_PREFIX_INIT_PARAMETER);\n initRequestProcessor(urlPrefix);\n String pluginClasses = config.getInitParameter(PLUGIN_CLASSES_INIT_PARAMETER);\n initRequestProcessor(urlPrefix, pluginClasses);\n}\n"
|
"public double fitness(Organism<T> individual) {\n TorusAgent[] prey = game.getPrey();\n double numCaught = 0;\n for (TorusAgent p : prey) {\n if (p == null) {\n numCaught++;\n }\n }\n if (numCaught == 0)\n return ALL_PREY_SCORE;\n double fewPreyCaughtScore = (ALL_PREY_SCORE - (ALL_PREY_SCORE * (numCaught / prey.length)));\n if (numCaught == prey.length)\n return (fewPreyCaughtScore * (((double) game.getTime())) / ((double) game.getTimeLimit()));\n return fewPreyCaughtScore;\n}\n"
|
"static LineLatLng findClosestLine(LatLng point, List<LineLatLng> list) {\n LineLatLng answer = list.get(0);\n double shortest = Double.MAX_VALUE;\n for (LineLatLng line : list) {\n double ans1 = getDistance(point, line.p1);\n double ans2 = getDistance(point, line.p2);\n LatLng shorterpnt = ans1 < ans2 ? line.p1 : line.p2;\n if (shortest > getDistance(point, shorterpnt)) {\n answer = line;\n shortest = getDistance(point, shorterpnt);\n }\n }\n return answer;\n}\n"
|
"public HearthTreeNode<BoardState> use_core(int thisCardIndex, int playerIndex, int minionIndex, HearthTreeNode<BoardState> boardState, Deck deck) {\n if (playerIndex == 1 || minionIndex > 0) {\n return null;\n }\n for (int index = 0; index < 2; ++index) {\n Card card = deck.drawCard(boardState.data_.getDeckPos_p0());\n if (card == null) {\n byte fatigueDamage = boardState.data_.getFatigueDamage_p0();\n boardState.data_.setFatigueDamage_p0((byte) (fatigueDamage + 1));\n boardState.data_.getHero_p0().setHealth((byte) (boardState.data_.getHero_p0().getHealth() - fatigueDamage));\n } else {\n boardState.data_.placeCard_hand_p0(card);\n boardState.data_.setDeckPos_p0(boardState.data_.getDeckPos_p0() + 1);\n }\n }\n return super.use_core(thisCardIndex, playerIndex, minionIndex, boardState, deck);\n}\n"
|
"private static int scale(double x, int index) {\n return GraphicsUtil.scale(x, maxes.get(index) - mins.get(index), mins.get(index));\n}\n"
|
"private void onVideoLoaded() {\n runOnUiThread(new Runnable() {\n public void run() {\n Log.d(TAG, \"String_Node_Str\");\n isPlayingJpg = false;\n startTimeCounter();\n }\n });\n}\n"
|
"public String updateBulkStatus() {\n Map sessionAttributes = ActionContext.getContext().getSession();\n try {\n String[] checkedItemsInSession = (String[]) sessionAttributes.get(\"String_Node_Str\");\n for (String checkValue : checkedItemsInSession) {\n Integer bulkId = Integer.parseInt(checkValue);\n OrderItems orderItemEntity = orderStatusLogsService.findOrderItemById(bulkId);\n orderStatusLogsBean.setOrderItemId(orderItemEntity.getOrderItemId());\n OrderStatusLogs orderStatusLogsEntity = transformToOrderStatusLogsEntity(orderStatusLogsBean);\n orderStatusLogsEntity.setCreatedTimestamp(new Date());\n orderStatusLogsEntity.setCreatedBy(commonUtils.getUserNameFromSession());\n orderStatusLogsService.addStatus(orderStatusLogsEntity);\n orderItemEntity.setStatus(orderStatusLogsBean.getStatus());\n orderStatusLogsService.updateStatusOrderItem(orderItemEntity);\n }\n } catch (Exception e) {\n addActionError(\"String_Node_Str\");\n return INPUT;\n }\n return SUCCESS;\n}\n"
|
"public int read(byte[] buffer, int offset, int length) throws IOException {\n int nBytesRead = bufferedStream.read(buffer, offset, length);\n if (nBytesRead > 0) {\n position += nBytesRead;\n }\n return nBytesRead;\n}\n"
|
"public boolean calcDate(SSDate date, boolean strict) {\n if (this.era == 0 && this.year > 0) {\n this.year = -(this.year - 1);\n }\n if (this.year > Integer.MIN_VALUE) {\n date.setYear(this.year - JS_START_YEAR);\n }\n int orgDayOfMonth = date.getDate();\n date.setDate(1);\n if (this.month >= 0) {\n date.setMonth(this.month);\n }\n if (this.dayOfMonth >= 0) {\n date.setDate(this.dayOfMonth);\n } else if (this.month >= 0) {\n SSDate tmp = new SSDate(date.getYear(), date.getMonth(), 35);\n int daysInCurrentMonth = 35 - tmp.getDate();\n date.setDate(Math.min(daysInCurrentMonth, orgDayOfMonth));\n } else {\n date.setDate(orgDayOfMonth);\n }\n if (this.hours < 0) {\n this.hours = date.getHours();\n }\n if (this.ampm > 0) {\n if (this.hours < 12) {\n this.hours += 12;\n }\n }\n date.setHours(this.hours);\n if (this.minutes >= 0) {\n date.setMinutes(this.minutes);\n }\n if (this.seconds >= 0) {\n date.setSeconds(this.seconds);\n }\n if (this.milliseconds >= 0) {\n date.setTime(date.getTime() / 1000 * 1000 + this.milliseconds);\n }\n if (strict) {\n if ((this.year > Integer.MIN_VALUE) && ((this.year - JS_START_YEAR) != date.getYear())) {\n return false;\n }\n if ((this.month >= 0) && (this.month != date.getMonth())) {\n return false;\n }\n if ((this.dayOfMonth >= 0) && (this.dayOfMonth != date.getDate())) {\n return false;\n }\n if (this.hours >= 24) {\n return false;\n }\n if (this.minutes >= 60) {\n return false;\n }\n if (this.seconds >= 60) {\n return false;\n }\n if (this.milliseconds >= 1000) {\n return false;\n }\n }\n if (this.ambiguousYear) {\n SSDate defaultCenturyStart = new SSDate();\n defaultCenturyStart.setYear(defaultCenturyStart.getYear() - 80);\n if (date.before(defaultCenturyStart)) {\n date.setYear(defaultCenturyStart.getYear() + 100);\n }\n }\n if (this.dayOfWeek >= 0) {\n if (this.dayOfMonth == -1) {\n int adjustment = (7 + this.dayOfWeek - date.getDay()) % 7;\n if (adjustment > 3) {\n adjustment -= 7;\n }\n int orgMonth = date.getMonth();\n date.setDate(date.getDate() + adjustment);\n if (date.getMonth() != orgMonth) {\n date.setDate(date.getDate() + (adjustment > 0 ? -7 : 7));\n }\n } else {\n if (date.getDay() != this.dayOfWeek) {\n return false;\n }\n }\n }\n if (this.tzOffset > Integer.MIN_VALUE) {\n date.setTimezoneOffset(this.tzOffset);\n date.setTime(timeStamp);\n }\n return true;\n}\n"
|
"public String getLatest(String channel, String limitPath) {\n logger.trace(\"String_Node_Str\", channel, limitPath);\n String[] split = StringUtils.split(limitPath, \"String_Node_Str\");\n split = new String[] { split[0], split[1], split[2], split[3], split[4], split[5] + split[6] + split[7] };\n String last = recurseLatest(channel, split, 0, channel);\n if (last == null) {\n DateTime ttlTime = TimeUtil.now().minusMinutes(ttlMinutes);\n DateTime limitTime = TimeUtil.millis(StringUtils.substringBeforeLast(limitPath, \"String_Node_Str\") + \"String_Node_Str\");\n DateTime previous = limitTime.minusHours(1).withMinuteOfHour(59).withSecondOfMinute(59).withMillisOfSecond(999);\n if (previous.isBefore(ttlTime)) {\n return null;\n }\n return getLatest(channel, ContentKey.lastKey(previous).toUrl());\n } else {\n String latest = spokeKeyFromPath(last);\n logger.trace(\"String_Node_Str\", latest, limitPath);\n return latest;\n }\n String latest = spokeKeyFromPath(last);\n logger.trace(\"String_Node_Str\", latest, limitPath);\n return latest;\n}\n"
|
"private CaptureSearchResult genericResult(WARCRecord rec) {\n CaptureSearchResult result = new CaptureSearchResult();\n result.setMimeType(DEFAULT_VALUE);\n result.setHttpCode(DEFAULT_VALUE);\n result.setRedirectUrl(DEFAULT_VALUE);\n ArchiveRecordHeader header = rec.getHeader();\n String file = transformWARCFilename(header.getReaderIdentifier());\n long offset = header.getOffset();\n result.setCaptureTimestamp(transformWARCDate(header.getDate()));\n result.setFile(file);\n result.setOffset(offset);\n result.setDigest(transformWARCDigest(header.getHeaderValue(WARCRecord.HEADER_KEY_PAYLOAD_DIGEST)));\n String origUrl = header.getUrl();\n if (origUrl == null) {\n String type = header.getHeaderValue(WARCConstants.HEADER_KEY_TYPE).toString();\n if (type.equals(WARCConstants.WARCRecordType.warcinfo)) {\n String filename = header.getHeaderValue(WARCConstants.HEADER_KEY_FILENAME).toString();\n result.setOriginalUrl(\"String_Node_Str\" + filename);\n result.setUrlKey(\"String_Node_Str\" + filename);\n } else {\n result.setOriginalUrl(DEFAULT_VALUE);\n result.setUrlKey(DEFAULT_VALUE);\n }\n } else {\n result.setOriginalUrl(origUrl);\n try {\n String urlKey = canonicalizer.urlStringToKey(origUrl);\n result.setUrlKey(urlKey);\n } catch (URIException e) {\n String shortUrl = (origUrl.length() < 100) ? origUrl : origUrl.substring(0, 100);\n LOGGER.warning(\"String_Node_Str\" + shortUrl + \"String_Node_Str\" + file + \"String_Node_Str\" + offset);\n result.setUrlKey(origUrl);\n }\n }\n return result;\n}\n"
|
"public LoadBalancer createPublicLoadBalancerRule(String xId, String name, String description, int srcPortStart, int srcPortEnd, int defPortStart, int defPortEnd, Long ipAddrId, String protocol, String algorithm, long networkId, long lbOwnerId, boolean openFirewall, String lbProtocol, Boolean forDisplay) throws NetworkRuleConflictException, InsufficientAddressCapacityException {\n Account lbOwner = _accountMgr.getAccount(lbOwnerId);\n if (srcPortStart != srcPortEnd) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n IPAddressVO ipVO = null;\n if (ipAddrId != null) {\n ipVO = _ipAddressDao.findById(ipAddrId);\n }\n Network network = _networkModel.getNetwork(networkId);\n LoadBalancer result = null;\n if (result == null) {\n IpAddress systemIp = null;\n NetworkOffering off = _entityMgr.findById(NetworkOffering.class, network.getNetworkOfferingId());\n if (off.getElasticLb() && ipVO == null && network.getVpcId() == null) {\n systemIp = _ipAddrMgr.assignSystemIp(networkId, lbOwner, true, false);\n if (systemIp != null) {\n ipVO = _ipAddressDao.findById(systemIp.getId());\n }\n }\n if (ipVO == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n } else if (ipVO.isOneToOneNat()) {\n throw new NetworkRuleConflictException(\"String_Node_Str\" + ipVO.getAddress());\n }\n boolean performedIpAssoc = false;\n try {\n if (ipVO.getAssociatedWithNetworkId() == null) {\n boolean assignToVpcNtwk = network.getVpcId() != null && ipVO.getVpcId() != null && ipVO.getVpcId().longValue() == network.getVpcId();\n if (assignToVpcNtwk) {\n _networkModel.checkIpForService(ipVO, Service.Lb, networkId);\n s_logger.debug(\"String_Node_Str\" + networkId + \"String_Node_Str\");\n ipVO = _ipAddrMgr.associateIPToGuestNetwork(ipAddrId, networkId, false);\n performedIpAssoc = true;\n }\n } else {\n _networkModel.checkIpForService(ipVO, Service.Lb, null);\n }\n if (ipVO.getAssociatedWithNetworkId() == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + ipVO + \"String_Node_Str\" + network);\n }\n result = createPublicLoadBalancer(xId, name, description, srcPortStart, defPortStart, ipVO.getId(), protocol, algorithm, openFirewall, CallContext.current(), lbProtocol, forDisplay);\n } catch (Exception ex) {\n s_logger.warn(\"String_Node_Str\", ex);\n if (ex instanceof NetworkRuleConflictException) {\n throw (NetworkRuleConflictException) ex;\n }\n if (ex instanceof InvalidParameterValueException) {\n throw (InvalidParameterValueException) ex;\n }\n } finally {\n if (result == null && systemIp != null) {\n s_logger.debug(\"String_Node_Str\" + systemIp + \"String_Node_Str\");\n _ipAddrMgr.handleSystemIpRelease(systemIp);\n }\n if (performedIpAssoc) {\n ipVO = _ipAddressDao.findById(ipVO.getId());\n _vpcMgr.unassignIPFromVpcNetwork(ipVO.getId(), networkId);\n }\n }\n }\n if (result == null) {\n throw new CloudRuntimeException(\"String_Node_Str\" + name);\n }\n return result;\n}\n"
|
"protected void addEdgeToOrder(int e, BipartiteGraph<Var, Factor> bg, boolean[] markedGF) {\n if (!bg.isT1T2(e) && bg.t2E(e) instanceof GlobalFactor) {\n if (!markedGF[bg.parentE(e)]) {\n order.add(bg.t2E(e));\n markedGF[bg.parentE(e)] = true;\n if (warnGF) {\n log.warn(\"String_Node_Str\");\n }\n }\n } else {\n order.add(e);\n }\n}\n"
|
"public boolean matches(InventoryCrafting inv, World world) {\n boolean b1 = false, b2 = false;\n for (int i = 0; i < inv.getSizeInventory(); i++) {\n ItemStack s = inv.getStackInSlot(i);\n if (s != null) {\n if (s.getItem() == itemToRepair) {\n if (b1)\n return false;\n if (s.getItemDamage() > 0)\n b1 = true;\n } else if (s.getItem() == repairMat.getItem()) {\n b2 = true;\n }\n }\n }\n return b1 && b2;\n}\n"
|
"public int getWeek() {\n synchronized (this) {\n return _week;\n }\n}\n"
|
"private void writeURI(BufferedWriter writer, String type, String feild, String idType, String dataColumn) throws IOException, XLWrapMapException {\n System.out.println(type + \"String_Node_Str\" + feild + \"String_Node_Str\" + idType + \"String_Node_Str\" + dataColumn);\n if (feild.toLowerCase().equals(\"String_Node_Str\")) {\n writer.write(\"String_Node_Str\" + RDF_BASE_URL + type + \"String_Node_Str\" + doi + \"String_Node_Str\" + sheetInURI + \"String_Node_Str\" + dataColumn + firstData + \"String_Node_Str\");\n return;\n }\n if (feild.toLowerCase().equals(\"String_Node_Str\")) {\n writer.write(\"String_Node_Str\" + RDF_BASE_URL + type + \"String_Node_Str\" + doi + \"String_Node_Str\" + sheetInURI + \"String_Node_Str\" + dataColumn + firstData + \"String_Node_Str\");\n return;\n }\n if ((idType == null) || (idType.isEmpty())) {\n throw new XLWrapMapException(\"String_Node_Str\" + dataColumn + \"String_Node_Str\" + metaSheet.getName() + \"String_Node_Str\");\n }\n if (idType.equalsIgnoreCase(\"String_Node_Str\")) {\n throw new XLWrapMapException(\"String_Node_Str\" + dataColumn + \"String_Node_Str\" + metaSheet.getName() + \"String_Node_Str\");\n }\n if (idType == null) {\n System.out.println(\"String_Node_Str\" + dataColumn + \"String_Node_Str\");\n } else if (idType.equalsIgnoreCase(\"String_Node_Str\")) {\n writer.write(\"String_Node_Str\" + RDF_BASE_URL + type + \"String_Node_Str\" + doi + \"String_Node_Str\" + sheetInURI + \"String_Node_Str\" + dataColumn + firstData + \"String_Node_Str\");\n } else {\n writer.write(\"String_Node_Str\" + RDF_BASE_URL + type + \"String_Node_Str\" + doi + \"String_Node_Str\" + sheetInURI + \"String_Node_Str\" + idType + firstData + \"String_Node_Str\" + dataColumn + firstData + \"String_Node_Str\");\n }\n}\n"
|
"public EnumActionResult onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, EnumHand hand) {\n IBlockState state = world.getBlockState(pos);\n Block block = state.getBlock();\n if (world.isAirBlock(pos)) {\n return EnumActionResult.PASS;\n }\n RayTraceResult traceResult = RayTracer.retrace(player);\n PlayerInteractEvent event = new PlayerInteractEvent.RightClickBlock(player, hand, stack, pos, side, traceResult.hitVec);\n if (MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Result.DENY) {\n return EnumActionResult.PASS;\n }\n if (ServerHelper.isServerWorld(world) && player.isSneaking() && block instanceof IDismantleable && ((IDismantleable) block).canDismantle(world, pos, state, player)) {\n ((IDismantleable) block).dismantleBlock(world, pos, state, player, false);\n return EnumActionResult.SUCCESS;\n }\n if (BlockHelper.canRotate(block)) {\n world.setBlockState(pos, BlockHelper.rotateVanillaBlock(world, state, pos), 3);\n player.swingArm(hand);\n return ServerHelper.isServerWorld(world) ? EnumActionResult.SUCCESS : EnumActionResult.PASS;\n } else if (!player.isSneaking() && block.rotateBlock(world, pos, side)) {\n player.swingArm(hand);\n return ServerHelper.isServerWorld(world) ? EnumActionResult.SUCCESS : EnumActionResult.PASS;\n }\n return EnumActionResult.PASS;\n}\n"
|
"public String getUsername() {\n if (getServerRoot() != null)\n return getServerRoot().getUser().getUsername();\n return null;\n}\n"
|
"private void assertApplicationUndeploy(String applicationUuid) {\n long startTime = System.currentTimeMillis();\n Application application = ApplicationManager.getApplications().getApplicationByTenant(applicationId, tenantId);\n ApplicationContext applicationContext = null;\n try {\n applicationContext = AutoscalerServiceClient.getInstance().getApplication(applicationUuid);\n } catch (RemoteException e) {\n log.error(\"String_Node_Str\" + applicationUuid);\n }\n while (((application != null) && application.getInstanceContextCount() > 0) || (applicationContext == null || applicationContext.getStatus().equals(APPLICATION_STATUS_UNDEPLOYING))) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException ignore) {\n }\n application = ApplicationManager.getApplications().getApplication(applicationUuid);\n try {\n applicationContext = AutoscalerServiceClient.getInstance().getApplication(applicationUuid);\n } catch (RemoteException e) {\n log.error(\"String_Node_Str\" + applicationUuid);\n }\n if ((System.currentTimeMillis() - startTime) > APPLICATION_ACTIVATION_TIMEOUT) {\n break;\n }\n }\n assertNotNull(String.format(\"String_Node_Str\", applicationUuid), application);\n assertNotNull(String.format(\"String_Node_Str\", applicationUuid), applicationContext);\n if (application.getInstanceContextCount() > 0 || applicationContext.getStatus().equals(APPLICATION_STATUS_UNDEPLOYING)) {\n log.info(\"String_Node_Str\" + applicationUuid);\n applicationTest.forceUndeployApplication(applicationUuid, endpoint, restClient);\n while (application.getInstanceContextCount() > 0 || applicationContext.getStatus().equals(APPLICATION_STATUS_UNDEPLOYING)) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException ignore) {\n }\n application = ApplicationManager.getApplications().getApplication(applicationUuid);\n if ((System.currentTimeMillis() - startTime) > APPLICATION_ACTIVATION_TIMEOUT) {\n break;\n }\n }\n }\n assertEquals(String.format(\"String_Node_Str\", applicationUuid), APPLICATION_STATUS_CREATED, applicationContext.getStatus());\n}\n"
|
"public Object invoke(Object theProxy, Method theMethod, Object[] theArgs) throws Throwable {\n Object directRetVal = myMethodToReturnValue.get(theMethod);\n if (directRetVal != null) {\n return directRetVal;\n }\n BaseMethodBinding<?> binding = myBindings.get(theMethod);\n if (binding != null) {\n BaseClientInvocation clientInvocation = binding.invokeClient(theArgs);\n return invokeClient(binding, clientInvocation);\n }\n ILambda lambda = myMethodToLambda.get(theMethod);\n if (lambda != null) {\n return lambda.handle(theArgs);\n }\n throw new UnsupportedOperationException(\"String_Node_Str\" + theMethod.getName() + \"String_Node_Str\" + theMethod.getDeclaringClass().getSimpleName() + \"String_Node_Str\");\n}\n"
|
"private NetworkInfo getNetworkInfo() {\n if (mContext != null) {\n ConnectivityManager connectivityManager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);\n return connectivityManager.getActiveNetworkInfo();\n }\n return null;\n}\n"
|
"public List<UUID> getCardList() {\n return new ArrayList<>(library);\n}\n"
|
"public ActionResult doExecute(HttpServletRequest req, RenderContext renderContext, Resource resource, JCRSessionWrapper session, Map<String, List<String>> parameters, URLResolver urlResolver) throws Exception {\n JCRSessionWrapper jcrSessionWrapper = resource.getNode().getSession();\n JCRNodeWrapper node = resource.getNode();\n if (!node.hasNode(\"String_Node_Str\")) {\n node.checkout();\n node = node.addNode(\"String_Node_Str\", \"String_Node_Str\");\n } else {\n node = node.getNode(\"String_Node_Str\");\n }\n JCRNodeWrapper newNode = createNode(req, parameters, node, \"String_Node_Str\", \"String_Node_Str\", false);\n jcrSessionWrapper.save();\n return new ActionResult(HttpServletResponse.SC_OK, newNode.getPath(), Render.serializeNodeToJSON(newNode));\n}\n"
|
"public static IPath getItemStatePath(Property property) {\n Item item = property.getItem();\n String statePathStr = null;\n if (item.getState() != null) {\n statePathStr = item.getState().getPath();\n } else {\n URI propURI = EObjectHelper.getURI(property);\n if (StringUtils.isBlank(statePathStr) && propURI.isPlatformResource()) {\n IPath propPath = new Path(propURI.toPlatformString(true)).removeLastSegments(1);\n IPath typedPath = ResourceManager.getRootProject().getFullPath().append(getItemTypedPath(property));\n return propPath.makeRelativeTo(typedPath);\n }\n }\n return statePathStr != null ? new Path(statePathStr) : Path.EMPTY;\n}\n"
|
"public void actionPerformed(java.awt.event.ActionEvent e) {\n boolean configured = ConfigurationDialogs.show(view, getDialogMode());\n boolean makeReqs = true;\n boolean completed = false;\n java.util.List<String> nodes = new ArrayList<>();\n if (configured) {\n if (BurpPropertiesManager.getBurpPropertiesManager().getConfigFile() != null)\n callbacks.loadConfigFromJson(getBurpConfigAsString());\n try {\n EndpointDecorator[] endpoints = getEndpoints(view);\n EndpointDecorator[] comparePoints = null;\n if (BurpPropertiesManager.getBurpPropertiesManager().getOldSourceFolder() != null && !BurpPropertiesManager.getBurpPropertiesManager().getOldSourceFolder().trim().isEmpty() && mode == 0)\n comparePoints = getComparePoints(view);\n else if (BurpPropertiesManager.getBurpPropertiesManager().getOldSerializationFile() != null && !BurpPropertiesManager.getBurpPropertiesManager().getOldSerializationFile().trim().isEmpty() && mode == 1)\n comparePoints = getComparePoints(view);\n if (endpoints.length == 0)\n JOptionPane.showMessageDialog(view, getNoEndpointsMessage(), \"String_Node_Str\", JOptionPane.WARNING_MESSAGE);\n else {\n if (comparePoints != null && comparePoints.length != 0)\n endpoints = compareEndpoints(endpoints, comparePoints, view);\n fillEndpointsToTable(endpoints);\n for (EndpointDecorator decorator : endpoints) {\n if (decorator != null) {\n Endpoint.Info endpoint = decorator.getEndpoint();\n String endpointPath = endpoint.getUrlPath();\n if (endpointPath.startsWith(\"String_Node_Str\"))\n endpointPath = endpointPath.substring(1);\n endpointPath = endpointPath.replaceAll(GENERIC_INT_SEGMENT, \"String_Node_Str\");\n nodes.add(endpointPath);\n for (Map.Entry<String, RouteParameter> parameter : endpoint.getParameters().entrySet()) nodes.add(endpointPath + \"String_Node_Str\" + parameter.getKey() + \"String_Node_Str\" + parameter.getValue());\n }\n }\n String url = UrlDialog.show(view);\n if (url != null) {\n try {\n if (!url.substring(url.length() - 1).equals(\"String_Node_Str\"))\n url = url + \"String_Node_Str\";\n for (String node : nodes) {\n URL nodeUrl = new URL(url + node);\n callbacks.includeInScope(nodeUrl);\n if (BurpPropertiesManager.getBurpPropertiesManager().getAutoSpider())\n callbacks.sendToSpider(nodeUrl);\n }\n buildRequests(view, callbacks, endpoints, url);\n completed = true;\n } catch (MalformedURLException e1) {\n JOptionPane.showMessageDialog(view, \"String_Node_Str\", \"String_Node_Str\", JOptionPane.WARNING_MESSAGE);\n }\n if (completed)\n JOptionPane.showMessageDialog(view, getCompletedMessage());\n } else\n makeReqs = false;\n }\n if (makeReqs) {\n if (BurpPropertiesManager.getBurpPropertiesManager().getAutoScan())\n sendToScanner(callbacks, UrlDialog.show(view));\n RequestMakerThread rmt = new RequestMakerThread(callbacks, view);\n new Thread(rmt).start();\n }\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(view, \"String_Node_Str\");\n }\n } else\n JOptionPane.showMessageDialog(view, \"String_Node_Str\", \"String_Node_Str\", JOptionPane.WARNING_MESSAGE);\n}\n"
|
"public String flattenToShortString() {\n StringBuilder sb = new StringBuilder(mPackage.length() + mClass.length());\n appendShortString(sb, mPackage, mClass);\n return sb.toString();\n}\n"
|
"protected Object generateRenderObject(IDataRowExpressionEvaluator rowAdapter, BIRTExternalContext externalContext, boolean bEmpty) throws ChartException {\n prepareDeviceRenderer();\n GeneratedChartState gcs = buildChart(rowAdapter, externalContext, externalProcessor);\n renderToImageFile(gcs);\n if (rtc.getSharedScale() != null && !rtc.getSharedScale().isShared()) {\n rtc.getSharedScale().setShared(true);\n ((ChartReportItemImpl) getReportItem(modelHandle)).setSharedScale(rtc.getSharedScale());\n }\n return getImageToDisplay();\n}\n"
|
"protected Operation prepareOperation() {\n SerializationService serializationService = getClientEngine().getSerializationService();\n IFunction filter = serializationService.toObject(filterData);\n return new ReadManyOperation(name, startSequence, minCount, maxCount, filter);\n}\n"
|
"private void addTransition(SAFAInputMove<P, S> transition, BooleanAlgebra<P, S> ba, boolean skipSatCheck) {\n if (skipSatCheck || transition.isSatisfiable(ba)) {\n transitionCount++;\n if (transition.from > maxStateId)\n maxStateId = transition.from;\n if (transition.maxState > maxStateId)\n maxStateId = transition.maxState;\n states.add(transition.from);\n states.addAll(transition.toStates);\n getInputMovesFrom(transition.from).add(transition);\n }\n}\n"
|
"public JedisCommand getCommand() {\n if (redisVersion.containsKey(String.valueOf(id))) {\n version = redisVersion.get(String.valueOf(id));\n } else {\n version = getRedisVersion();\n redisVersion.put(String.valueOf(id), version);\n }\n for (JedisCommand command : commands) {\n if (command.getVersion().getVersion() <= version.getVersion()) {\n return command;\n }\n }\n return command;\n}\n"
|
"public boolean setPassenger(final Entity passenger) {\n if (!getHandle().getPassenger().isPresent()) {\n getHandle().setPassenger(((PoreEntity) passenger).getHandle());\n final PoreEntity mounted = this;\n Pore.getGame().getEventManager().post(new EntityMountEvent() {\n private boolean cancelled = false;\n public org.spongepowered.api.entity.Entity getMounted() {\n return mounted.getHandle();\n }\n public boolean isCancelled() {\n return cancelled;\n }\n public void setCancelled(boolean cancel) {\n this.cancelled = cancel;\n if (cancel)\n mounted.getHandle().eject();\n else\n ((PoreEntity) passenger).getHandle().mount(getHandle());\n }\n public org.spongepowered.api.entity.Entity getEntity() {\n return ((PoreEntity) passenger).getHandle();\n }\n public Game getGame() {\n return Pore.getGame();\n }\n public CallbackList getCallbacks() {\n return null;\n }\n });\n return true;\n } else if (passenger == null) {\n getHandle().eject();\n return true;\n }\n return false;\n}\n"
|
"private void refreshModelPageSchema() {\n String content = null;\n try {\n content = Util.nodeToString(xsdSchema.getDocument());\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n XSDSchema schema = null;\n try {\n schema = Util.createXsdSchema(content, xobject);\n } catch (Exception e) {\n e.printStackTrace();\n }\n setXsdSchema(schema);\n getTypeContentProvider().setXsdSchema(schema);\n getSchemaContentProvider().setXsdSchema(schema);\n refresh();\n}\n"
|
"public int executeCommand(String command, Scheduler scheduler) throws ProcessExecutionException, InterruptedException {\n if (scheduler == null) {\n try {\n output = this.nativeProcessExecutor.execute(command);\n } catch (IOException ioe) {\n throw new ProcessExecutionException(-1, ioe);\n } catch (CommandExecutionException cee) {\n throw new ProcessExecutionException(-1, cee);\n }\n } else {\n return scheduler.executeCommand(command);\n }\n}\n"
|
"public void run() {\n try {\n final boolean fullSync = !Hosts.isCoordinator() && host.isLocalHost() && BootstrapArgs.isCloudController() && !Databases.isSynchronized();\n final boolean passiveSync = !fullSync && host.hasSynced();\n DriverDatabaseClusterMBean cluster = LookupPersistenceContextDatabaseCluster.INSTANCE.apply(contextName);\n final String dbUrl = \"String_Node_Str\" + ServiceUris.remote(Database.class, host.getBindAddress(), contextName);\n final String dbPass = SystemIds.databasePassword();\n final String realJdbcDriver = Databases.getDriverName();\n if (!cluster.getActiveDatabases().contains(hostName) && !cluster.getInactiveDatabases().contains(hostName)) {\n LOG.info(\"String_Node_Str\" + host);\n cluster.add(hostName, realJdbcDriver, dbUrl);\n final InactiveDatabaseMBean database = Databases.lookupInactiveDatabase(contextName, hostName);\n database.setUser(\"String_Node_Str\");\n database.setPassword(dbPass);\n }\n if (fullSync) {\n if (cluster.getActiveDatabases().contains(hostName)) {\n LOG.info(\"String_Node_Str\" + host);\n cluster.deactivate(hostName);\n }\n LOG.info(\"String_Node_Str\" + host + \"String_Node_Str\" + cluster.getActiveDatabases());\n cluster.activate(hostName, \"String_Node_Str\");\n } else if (passiveSync) {\n if (!cluster.getActiveDatabases().contains(hostName)) {\n LOG.info(\"String_Node_Str\" + host);\n cluster.activate(hostName, \"String_Node_Str\");\n } else {\n LOG.info(\"String_Node_Str\" + host);\n }\n }\n } catch (final NoSuchElementException ex1) {\n LOG.error(ex1, ex1);\n } catch (final Exception ex1) {\n Logs.extreme().error(ex1, ex1);\n throw Exceptions.toUndeclared(\"String_Node_Str\" + host + \"String_Node_Str\" + ex1.getMessage(), ex1);\n }\n}\n"
|
"private On parseOn(String exp) {\n constraints.validateAllCharsValid(exp);\n SpecialCharFieldValue specialChar = new SpecialCharFieldValue(SpecialChar.NONE);\n IntegerFieldValue nth = new IntegerFieldValue(-1);\n IntegerFieldValue time = new IntegerFieldValue(-1);\n String expression = exp;\n if (exp.contains(\"String_Node_Str\")) {\n return parseOnWithHash(exp);\n }\n if (exp.contains(\"String_Node_Str\")) {\n specialChar = new SpecialCharFieldValue(SpecialChar.LW);\n exp = exp.replace(\"String_Node_Str\", \"String_Node_Str\");\n if (\"String_Node_Str\".equals(exp)) {\n expression = null;\n } else {\n expression = exp;\n }\n }\n if (exp.contains(\"String_Node_Str\")) {\n specialChar = new SpecialCharFieldValue(SpecialChar.L);\n exp = exp.replace(\"String_Node_Str\", \"String_Node_Str\");\n if (\"String_Node_Str\".equals(exp)) {\n expression = null;\n } else {\n expression = exp;\n }\n }\n if (exp.contains(\"String_Node_Str\")) {\n specialChar = new SpecialCharFieldValue(SpecialChar.W);\n expression = exp.replace(\"String_Node_Str\", \"String_Node_Str\");\n }\n constraints.validateSpecialCharAllowed(specialChar.getValue());\n if (expression != null) {\n return new On(constraints, mapToIntegerFieldValue(expression), specialChar, nth);\n } else {\n return new On(constraints, time, specialChar, nth);\n }\n}\n"
|
"final int broadcastIntentLocked(ProcessRecord callerApp, String callerPackage, Intent intent, String resolvedType, IIntentReceiver resultTo, int resultCode, String resultData, Bundle resultExtras, String[] requiredPermissions, int appOp, Bundle bOptions, boolean ordered, boolean sticky, int callingPid, int callingUid, int userId) {\n intent = new Intent(intent);\n intent.addFlags(Intent.FLAG_EXCLUDE_STOPPED_PACKAGES);\n if (!mProcessesReady && (intent.getFlags() & Intent.FLAG_RECEIVER_BOOT_UPGRADE) == 0) {\n intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);\n }\n if (DEBUG_BROADCAST_LIGHT)\n Slog.v(TAG_BROADCAST, (sticky ? \"String_Node_Str\" : \"String_Node_Str\") + intent + \"String_Node_Str\" + ordered + \"String_Node_Str\" + userId);\n if ((resultTo != null) && !ordered) {\n Slog.w(TAG, \"String_Node_Str\" + intent + \"String_Node_Str\");\n }\n userId = mUserController.handleIncomingUser(callingPid, callingUid, userId, true, ALLOW_NON_FULL, \"String_Node_Str\", callerPackage);\n if (userId != UserHandle.USER_ALL && !mUserController.isUserRunningLocked(userId, 0)) {\n if ((callingUid != Process.SYSTEM_UID || (intent.getFlags() & Intent.FLAG_RECEIVER_BOOT_UPGRADE) == 0) && !Intent.ACTION_SHUTDOWN.equals(intent.getAction())) {\n Slog.w(TAG, \"String_Node_Str\" + intent + \"String_Node_Str\" + userId + \"String_Node_Str\");\n return ActivityManager.BROADCAST_FAILED_USER_STOPPED;\n }\n }\n BroadcastOptions brOptions = null;\n if (bOptions != null) {\n brOptions = new BroadcastOptions(bOptions);\n if (brOptions.getTemporaryAppWhitelistDuration() > 0) {\n if (checkComponentPermission(android.Manifest.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST, Binder.getCallingPid(), Binder.getCallingUid(), -1, true) != PackageManager.PERMISSION_GRANTED) {\n String msg = \"String_Node_Str\" + intent.getAction() + \"String_Node_Str\" + callerPackage + \"String_Node_Str\" + callingPid + \"String_Node_Str\" + callingUid + \"String_Node_Str\" + \"String_Node_Str\" + android.Manifest.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST;\n Slog.w(TAG, msg);\n throw new SecurityException(msg);\n }\n }\n }\n final String action = intent.getAction();\n final boolean isProtectedBroadcast;\n try {\n isProtectedBroadcast = AppGlobals.getPackageManager().isProtectedBroadcast(action);\n } catch (RemoteException e) {\n Slog.w(TAG, \"String_Node_Str\", e);\n return ActivityManager.BROADCAST_SUCCESS;\n }\n final boolean isCallerSystem;\n switch(UserHandle.getAppId(callingUid)) {\n case Process.ROOT_UID:\n case Process.SYSTEM_UID:\n case Process.PHONE_UID:\n case Process.BLUETOOTH_UID:\n case Process.NFC_UID:\n isCallerSystem = true;\n break;\n default:\n isCallerSystem = (callerApp != null) && callerApp.persistent;\n break;\n }\n if (isCallerSystem) {\n if (isProtectedBroadcast || Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals(action) || Intent.ACTION_MEDIA_SCANNER_SCAN_FILE.equals(action) || Intent.ACTION_GET_PERMISSIONS_COUNT.equals(action) || Intent.ACTION_GET_PERMISSIONS_PACKAGES.equals(action) || Intent.ACTION_SHOW_KEYBOARD_SHORTCUTS.equals(action) || AppWidgetManager.ACTION_APPWIDGET_CONFIGURE.equals(action) || AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action) || LocationManager.HIGH_POWER_REQUEST_CHANGE_ACTION.equals(action)) {\n } else {\n Log.wtf(TAG, \"String_Node_Str\" + action + \"String_Node_Str\", new Throwable());\n }\n } else {\n if (isProtectedBroadcast) {\n String msg = \"String_Node_Str\" + action + \"String_Node_Str\" + callingPid + \"String_Node_Str\" + callingUid;\n Slog.w(TAG, msg);\n throw new SecurityException(msg);\n } else if (AppWidgetManager.ACTION_APPWIDGET_CONFIGURE.equals(action) || AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action)) {\n if (callerPackage == null) {\n String msg = \"String_Node_Str\" + action + \"String_Node_Str\";\n Slog.w(TAG, msg);\n throw new SecurityException(msg);\n } else if (intent.getComponent() != null) {\n if (!intent.getComponent().getPackageName().equals(callerPackage)) {\n String msg = \"String_Node_Str\" + action + \"String_Node_Str\" + intent.getComponent().getPackageName() + \"String_Node_Str\" + callerPackage;\n Slog.w(TAG, msg);\n throw new SecurityException(msg);\n }\n } else {\n intent.setPackage(callerPackage);\n }\n }\n }\n if (action != null) {\n switch(action) {\n case Intent.ACTION_UID_REMOVED:\n case Intent.ACTION_PACKAGE_REMOVED:\n case Intent.ACTION_PACKAGE_CHANGED:\n case Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE:\n case Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE:\n case Intent.ACTION_PACKAGES_SUSPENDED:\n case Intent.ACTION_PACKAGES_UNSUSPENDED:\n if (checkComponentPermission(android.Manifest.permission.BROADCAST_PACKAGE_REMOVED, callingPid, callingUid, -1, true) != PackageManager.PERMISSION_GRANTED) {\n String msg = \"String_Node_Str\" + intent.getAction() + \"String_Node_Str\" + callerPackage + \"String_Node_Str\" + callingPid + \"String_Node_Str\" + callingUid + \"String_Node_Str\" + \"String_Node_Str\" + android.Manifest.permission.BROADCAST_PACKAGE_REMOVED;\n Slog.w(TAG, msg);\n throw new SecurityException(msg);\n }\n switch(action) {\n case Intent.ACTION_UID_REMOVED:\n final Bundle intentExtras = intent.getExtras();\n final int uid = intentExtras != null ? intentExtras.getInt(Intent.EXTRA_UID) : -1;\n if (uid >= 0) {\n mBatteryStatsService.removeUid(uid);\n mAppOpsService.uidRemoved(uid);\n }\n break;\n case Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE:\n String[] list = intent.getStringArrayExtra(Intent.EXTRA_CHANGED_PACKAGE_LIST);\n if (list != null && list.length > 0) {\n for (int i = 0; i < list.length; i++) {\n forceStopPackageLocked(list[i], -1, false, true, true, false, false, userId, \"String_Node_Str\");\n }\n mRecentTasks.cleanupLocked(UserHandle.USER_ALL);\n sendPackageBroadcastLocked(IApplicationThread.EXTERNAL_STORAGE_UNAVAILABLE, list, userId);\n }\n break;\n case Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE:\n mRecentTasks.cleanupLocked(UserHandle.USER_ALL);\n break;\n case Intent.ACTION_PACKAGE_REMOVED:\n case Intent.ACTION_PACKAGE_CHANGED:\n Uri data = intent.getData();\n String ssp;\n if (data != null && (ssp = data.getSchemeSpecificPart()) != null) {\n boolean removed = Intent.ACTION_PACKAGE_REMOVED.equals(action);\n final boolean replacing = intent.getBooleanExtra(Intent.EXTRA_REPLACING, false);\n final boolean killProcess = !intent.getBooleanExtra(Intent.EXTRA_DONT_KILL_APP, false);\n final boolean fullUninstall = removed && !replacing;\n if (killProcess) {\n forceStopPackageLocked(ssp, UserHandle.getAppId(intent.getIntExtra(Intent.EXTRA_UID, -1)), false, true, true, false, fullUninstall, userId, removed ? \"String_Node_Str\" : \"String_Node_Str\");\n }\n if (removed) {\n final int cmd = killProcess ? IApplicationThread.PACKAGE_REMOVED : IApplicationThread.PACKAGE_REMOVED_DONT_KILL;\n sendPackageBroadcastLocked(cmd, new String[] { ssp }, userId);\n if (fullUninstall) {\n mAppOpsService.packageRemoved(intent.getIntExtra(Intent.EXTRA_UID, -1), ssp);\n removeUriPermissionsForPackageLocked(ssp, userId, true);\n removeTasksByPackageNameLocked(ssp, userId);\n mBatteryStatsService.notePackageUninstalled(ssp);\n }\n } else {\n cleanupDisabledPackageComponentsLocked(ssp, userId, killProcess, intent.getStringArrayExtra(Intent.EXTRA_CHANGED_COMPONENT_NAME_LIST));\n }\n }\n break;\n case Intent.ACTION_PACKAGES_SUSPENDED:\n case Intent.ACTION_PACKAGES_UNSUSPENDED:\n final boolean suspended = Intent.ACTION_PACKAGES_SUSPENDED.equals(intent.getAction());\n final String[] packageNames = intent.getStringArrayExtra(Intent.EXTRA_CHANGED_PACKAGE_LIST);\n final int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL);\n synchronized (ActivityManagerService.this) {\n mRecentTasks.onPackagesSuspendedChanged(packageNames, suspended, userHandle);\n }\n break;\n }\n break;\n case Intent.ACTION_PACKAGE_REPLACED:\n {\n final Uri data = intent.getData();\n final String ssp;\n if (data != null && (ssp = data.getSchemeSpecificPart()) != null) {\n final ApplicationInfo aInfo = getPackageManagerInternalLocked().getApplicationInfo(ssp, userId);\n mStackSupervisor.updateActivityApplicationInfoLocked(aInfo);\n sendPackageBroadcastLocked(IApplicationThread.PACKAGE_REPLACED, new String[] { ssp }, userId);\n }\n break;\n }\n case Intent.ACTION_PACKAGE_ADDED:\n {\n Uri data = intent.getData();\n String ssp;\n if (data != null && (ssp = data.getSchemeSpecificPart()) != null) {\n final boolean replacing = intent.getBooleanExtra(Intent.EXTRA_REPLACING, false);\n mCompatModePackages.handlePackageAddedLocked(ssp, replacing);\n try {\n ApplicationInfo ai = AppGlobals.getPackageManager().getApplicationInfo(ssp, 0, 0);\n mBatteryStatsService.notePackageInstalled(ssp, ai != null ? ai.versionCode : 0);\n } catch (RemoteException e) {\n }\n }\n break;\n }\n case Intent.ACTION_TIMEZONE_CHANGED:\n mHandler.sendEmptyMessage(UPDATE_TIME_ZONE);\n break;\n case Intent.ACTION_TIME_CHANGED:\n final int is24Hour = intent.getBooleanExtra(Intent.EXTRA_TIME_PREF_24_HOUR_FORMAT, false) ? 1 : 0;\n mHandler.sendMessage(mHandler.obtainMessage(UPDATE_TIME, is24Hour, 0));\n BatteryStatsImpl stats = mBatteryStatsService.getActiveStatistics();\n synchronized (stats) {\n stats.noteCurrentTimeChangedLocked();\n }\n break;\n case Intent.ACTION_CLEAR_DNS_CACHE:\n mHandler.sendEmptyMessage(CLEAR_DNS_CACHE_MSG);\n break;\n case Proxy.PROXY_CHANGE_ACTION:\n ProxyInfo proxy = intent.getParcelableExtra(Proxy.EXTRA_PROXY_INFO);\n mHandler.sendMessage(mHandler.obtainMessage(UPDATE_HTTP_PROXY_MSG, proxy));\n break;\n case android.hardware.Camera.ACTION_NEW_PICTURE:\n case android.hardware.Camera.ACTION_NEW_VIDEO:\n Slog.w(TAG, action + \"String_Node_Str\" + UserHandle.formatUid(callingUid));\n return ActivityManager.BROADCAST_SUCCESS;\n }\n }\n if (sticky) {\n if (checkPermission(android.Manifest.permission.BROADCAST_STICKY, callingPid, callingUid) != PackageManager.PERMISSION_GRANTED) {\n String msg = \"String_Node_Str\" + callingPid + \"String_Node_Str\" + callingUid + \"String_Node_Str\" + android.Manifest.permission.BROADCAST_STICKY;\n Slog.w(TAG, msg);\n throw new SecurityException(msg);\n }\n if (requiredPermissions != null && requiredPermissions.length > 0) {\n Slog.w(TAG, \"String_Node_Str\" + intent + \"String_Node_Str\" + Arrays.toString(requiredPermissions));\n return ActivityManager.BROADCAST_STICKY_CANT_HAVE_PERMISSION;\n }\n if (intent.getComponent() != null) {\n throw new SecurityException(\"String_Node_Str\");\n }\n if (userId != UserHandle.USER_ALL) {\n ArrayMap<String, ArrayList<Intent>> stickies = mStickyBroadcasts.get(UserHandle.USER_ALL);\n if (stickies != null) {\n ArrayList<Intent> list = stickies.get(intent.getAction());\n if (list != null) {\n int N = list.size();\n int i;\n for (i = 0; i < N; i++) {\n if (intent.filterEquals(list.get(i))) {\n throw new IllegalArgumentException(\"String_Node_Str\" + intent + \"String_Node_Str\" + userId + \"String_Node_Str\");\n }\n }\n }\n }\n }\n ArrayMap<String, ArrayList<Intent>> stickies = mStickyBroadcasts.get(userId);\n if (stickies == null) {\n stickies = new ArrayMap<>();\n mStickyBroadcasts.put(userId, stickies);\n }\n ArrayList<Intent> list = stickies.get(intent.getAction());\n if (list == null) {\n list = new ArrayList<>();\n stickies.put(intent.getAction(), list);\n }\n final int stickiesCount = list.size();\n int i;\n for (i = 0; i < stickiesCount; i++) {\n if (intent.filterEquals(list.get(i))) {\n list.set(i, new Intent(intent));\n break;\n }\n }\n if (i >= stickiesCount) {\n list.add(new Intent(intent));\n }\n }\n int[] users;\n if (userId == UserHandle.USER_ALL) {\n users = mUserController.getStartedUserArrayLocked();\n } else {\n users = new int[] { userId };\n }\n List receivers = null;\n List<BroadcastFilter> registeredReceivers = null;\n if ((intent.getFlags() & Intent.FLAG_RECEIVER_REGISTERED_ONLY) == 0) {\n receivers = collectReceiverComponents(intent, resolvedType, callingUid, users);\n }\n if (intent.getComponent() == null) {\n if (userId == UserHandle.USER_ALL && callingUid == Process.SHELL_UID) {\n for (int i = 0; i < users.length; i++) {\n if (mUserController.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES, users[i])) {\n continue;\n }\n List<BroadcastFilter> registeredReceiversForUser = mReceiverResolver.queryIntent(intent, resolvedType, false, users[i]);\n if (registeredReceivers == null) {\n registeredReceivers = registeredReceiversForUser;\n } else if (registeredReceiversForUser != null) {\n registeredReceivers.addAll(registeredReceiversForUser);\n }\n }\n } else {\n registeredReceivers = mReceiverResolver.queryIntent(intent, resolvedType, false, userId);\n }\n }\n final boolean replacePending = (intent.getFlags() & Intent.FLAG_RECEIVER_REPLACE_PENDING) != 0;\n if (DEBUG_BROADCAST)\n Slog.v(TAG_BROADCAST, \"String_Node_Str\" + intent.getAction() + \"String_Node_Str\" + replacePending);\n int NR = registeredReceivers != null ? registeredReceivers.size() : 0;\n if (!ordered && NR > 0) {\n final BroadcastQueue queue = broadcastQueueForIntent(intent);\n BroadcastRecord r = new BroadcastRecord(queue, intent, callerApp, callerPackage, callingPid, callingUid, resolvedType, requiredPermissions, appOp, brOptions, registeredReceivers, resultTo, resultCode, resultData, resultExtras, ordered, sticky, false, userId);\n if (DEBUG_BROADCAST)\n Slog.v(TAG_BROADCAST, \"String_Node_Str\" + r);\n final boolean replaced = replacePending && queue.replaceParallelBroadcastLocked(r);\n if (!replaced) {\n queue.enqueueParallelBroadcastLocked(r);\n queue.scheduleBroadcastsLocked();\n }\n registeredReceivers = null;\n NR = 0;\n }\n int ir = 0;\n if (receivers != null) {\n String[] skipPackages = null;\n if (Intent.ACTION_PACKAGE_ADDED.equals(intent.getAction()) || Intent.ACTION_PACKAGE_RESTARTED.equals(intent.getAction()) || Intent.ACTION_PACKAGE_DATA_CLEARED.equals(intent.getAction())) {\n Uri data = intent.getData();\n if (data != null) {\n String pkgName = data.getSchemeSpecificPart();\n if (pkgName != null) {\n skipPackages = new String[] { pkgName };\n }\n }\n } else if (Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE.equals(intent.getAction())) {\n skipPackages = intent.getStringArrayExtra(Intent.EXTRA_CHANGED_PACKAGE_LIST);\n }\n if (skipPackages != null && (skipPackages.length > 0)) {\n for (String skipPackage : skipPackages) {\n if (skipPackage != null) {\n int NT = receivers.size();\n for (int it = 0; it < NT; it++) {\n ResolveInfo curt = (ResolveInfo) receivers.get(it);\n if (curt.activityInfo.packageName.equals(skipPackage)) {\n receivers.remove(it);\n it--;\n NT--;\n }\n }\n }\n }\n }\n int NT = receivers != null ? receivers.size() : 0;\n int it = 0;\n ResolveInfo curt = null;\n BroadcastFilter curr = null;\n while (it < NT && ir < NR) {\n if (curt == null) {\n curt = (ResolveInfo) receivers.get(it);\n }\n if (curr == null) {\n curr = registeredReceivers.get(ir);\n }\n if (curr.getPriority() >= curt.priority) {\n receivers.add(it, curr);\n ir++;\n curr = null;\n it++;\n NT++;\n } else {\n it++;\n curt = null;\n }\n }\n }\n while (ir < NR) {\n if (receivers == null) {\n receivers = new ArrayList();\n }\n receivers.add(registeredReceivers.get(ir));\n ir++;\n }\n if ((receivers != null && receivers.size() > 0) || resultTo != null) {\n BroadcastQueue queue = broadcastQueueForIntent(intent);\n BroadcastRecord r = new BroadcastRecord(queue, intent, callerApp, callerPackage, callingPid, callingUid, resolvedType, requiredPermissions, appOp, brOptions, receivers, resultTo, resultCode, resultData, resultExtras, ordered, sticky, false, userId);\n if (DEBUG_BROADCAST)\n Slog.v(TAG_BROADCAST, \"String_Node_Str\" + r + \"String_Node_Str\" + queue.mOrderedBroadcasts.size());\n if (DEBUG_BROADCAST)\n Slog.i(TAG_BROADCAST, \"String_Node_Str\" + r.intent.getAction());\n boolean replaced = replacePending && queue.replaceOrderedBroadcastLocked(r);\n if (!replaced) {\n queue.enqueueOrderedBroadcastLocked(r);\n queue.scheduleBroadcastsLocked();\n }\n }\n return ActivityManager.BROADCAST_SUCCESS;\n}\n"
|
"public void putFromLoad(Data dataKey, Object value, long ttl) {\n Record record = records.get(dataKey);\n if (record == null || record.getValue() == null) {\n value = mapService.interceptPut(name, null, value);\n record = mapService.createRecord(name, dataKey, value, ttl);\n records.put(dataKey, record);\n updateSizeEstimator(calculateRecordSize(record));\n } else {\n value = mapService.interceptPut(name, record.getValue(), value);\n updateSizeEstimator(-calculateRecordSize(record));\n setRecordValue(record, value);\n updateSizeEstimator(calculateRecordSize(record));\n updateTtl(record, ttl);\n }\n saveIndex(record);\n}\n"
|
"public void craft(IFusionCraftingInventory inventory, World world, BlockPos pos) {\n if (!matches(inventory, world, pos)) {\n return;\n }\n List<ICraftingInjector> pedestals = new ArrayList<>();\n pedestals.addAll(inventory.getInjectors());\n for (Object ingredient : ingredients) {\n for (ICraftingPedestal pedestal : pedestals) {\n if (!pedestal.getStackInPedestal().isEmpty() && OreDictHelper.areStacksEqual(ingredient, pedestal.getStackInPedestal()) && pedestal.getPedestalTier() >= craftingTier) {\n ItemStack stack = pedestal.getStackInPedestal();\n if (stack.getItem().hasContainerItem(stack)) {\n stack = stack.getItem().getContainerItem(stack);\n } else {\n stack.shrink(1);\n if (stack.getCount() <= 0) {\n stack = ItemStack.EMPTY;\n }\n }\n pedestal.setStackInPedestal(stack);\n pedestals.remove(pedestal);\n break;\n }\n }\n }\n ItemStack catalyst = inventory.getStackInCore(0);\n catalyst.shrink(this.catalyst.getCount());\n if (catalyst.getCount() <= 0) {\n catalyst = ItemStack.EMPTY;\n }\n inventory.setStackInCore(0, catalyst);\n inventory.setStackInCore(1, result.copy());\n}\n"
|
"public void testServeFile() throws Exception {\n Map<String, FileData> files = new HashMap<String, FileData>();\n files.put(\"String_Node_Str\", new FileData(\"String_Node_Str\", \"String_Node_Str\", -1));\n files.put(\"String_Node_Str\", new FileData(\"String_Node_Str\", \"String_Node_Str\", 20));\n FilesCache filesCache = new FilesCache(files);\n TestResourceServlet resourceServlet = new TestResourceServlet(filesCache);\n resourceServlet.service(\"String_Node_Str\", writer);\n assertEquals(\"String_Node_Str\", out.toString());\n out.reset();\n resourceServlet.service(\"String_Node_Str\", writer);\n assertEquals(\"String_Node_Str\", out.toString());\n}\n"
|
"protected void createFormContent(IManagedForm managedForm) {\n final ScrolledForm scrolledForm = managedForm.getForm();\n final FormToolkit formToolkit = managedForm.getToolkit();\n GridLayout layout = new GridLayout(1, true);\n layout.marginWidth = 0;\n layout.marginHeight = 0;\n scrolledForm.getBody().setLayout(layout);\n managedFormRef = managedForm;\n if (list != null) {\n Composite parent = managedForm.getForm().getBody();\n Section listSection = formToolkit.createSection(parent, Section.TITLE_BAR | Section.DESCRIPTION | Section.TWISTIE | Section.EXPANDED | Section.COMPACT);\n Composite sectionClient = new Composite(parent, SWT.FLAT);\n Table table = formToolkit.createTable(sectionClient, SWT.FLAT);\n DefaultEventTableViewer tableViewer = new DefaultEventTableViewer(list, table, list);\n listSection.setClient(sectionClient);\n }\n return;\n}\n"
|
"public void run() {\n for (int index = 0; index < view.getChildCount(); ++index) {\n View child = view.getChildAt(index);\n Animation animation = new TranslateAnimation(500, 0, 0, 0);\n animation.setDuration(1000);\n animation.setStartOffset(index * 100);\n child.startAnimation(animation);\n view.setScrollY(y);\n }\n view.post(new Runnable() {\n public void run() {\n System.out.println(\"String_Node_Str\" + y + \"String_Node_Str\" + yz);\n view.scrollTo(0, y);\n }\n });\n}\n"
|
"public void testRun() {\n OCMMappingStore ocmMappingStore = extension.getOCMMappingStore();\n OCMMapping mapping = ocmMappingStore.findMapping(BasicNode.class);\n Assert.assertNotNull(mapping);\n Assert.assertEquals(3, mapping.getFieldsToProperties().size());\n String result = mapping.getFieldsToProperties().get(\"String_Node_Str\");\n Assert.assertEquals(\"String_Node_Str\", result);\n String uuid = mapping.getFieldsToProperties().get(\"String_Node_Str\");\n Assert.assertEquals(\"String_Node_Str\", uuid);\n}\n"
|
"public CurrentWeather getCurrentCondition(String data) throws WeatherLibException {\n CurrentWeather cWeather = new CurrentWeather();\n Weather weather = new Weather();\n try {\n XmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser();\n parser.setInput(new StringReader(data));\n String tagName = null;\n String currentTag = null;\n int event = parser.getEventType();\n boolean isFirstDayForecast = true;\n while (event != XmlPullParser.END_DOCUMENT) {\n tagName = parser.getName();\n if (event == XmlPullParser.START_TAG) {\n if (tagName.equals(\"String_Node_Str\")) {\n weather.wind.setChill(Integer.parseInt(parser.getAttributeValue(null, \"String_Node_Str\")));\n weather.wind.setDeg(Integer.parseInt(parser.getAttributeValue(null, \"String_Node_Str\")));\n weather.wind.setSpeed(WeatherUtility.string2Float(parser.getAttributeValue(null, \"String_Node_Str\")));\n } else if (tagName.equals(\"String_Node_Str\")) {\n weather.currentCondition.setHumidity(Integer.parseInt(parser.getAttributeValue(null, \"String_Node_Str\")));\n weather.currentCondition.setVisibility(WeatherUtility.string2Float(parser.getAttributeValue(null, \"String_Node_Str\")));\n weather.currentCondition.setPressure(WeatherUtility.string2Float(parser.getAttributeValue(null, \"String_Node_Str\")));\n weather.currentCondition.setPressureTrend(Integer.parseInt(parser.getAttributeValue(null, \"String_Node_Str\")));\n } else if (tagName.equals(\"String_Node_Str\")) {\n if (isFirstDayForecast) {\n weather.temperature.setMinTemp(Integer.parseInt(parser.getAttributeValue(null, \"String_Node_Str\")));\n weather.temperature.setMaxTemp(Integer.parseInt(parser.getAttributeValue(null, \"String_Node_Str\")));\n isFirstDayForecast = false;\n }\n } else if (tagName.equals(\"String_Node_Str\")) {\n weather.currentCondition.setWeatherId(Integer.parseInt(parser.getAttributeValue(null, \"String_Node_Str\")));\n weather.currentCondition.setIcon(\"String_Node_Str\" + weather.currentCondition.getWeatherId());\n if (codeProvider != null) {\n try {\n weather.currentCondition.setWeatherCode(codeProvider.getWeatherCode(String.valueOf(weather.currentCondition.getWeatherId())));\n } catch (Throwable t) {\n weather.currentCondition.setWeatherCode(WeatherCode.NOT_AVAILABLE);\n }\n }\n weather.currentCondition.setCondition(parser.getAttributeValue(null, \"String_Node_Str\"));\n weather.temperature.setTemp(Integer.parseInt(parser.getAttributeValue(null, \"String_Node_Str\")));\n } else if (tagName.equals(\"String_Node_Str\")) {\n weather.location.setCity(parser.getAttributeValue(null, \"String_Node_Str\"));\n weather.location.setRegion(parser.getAttributeValue(null, \"String_Node_Str\"));\n weather.location.setCountry(parser.getAttributeValue(null, \"String_Node_Str\"));\n } else if (tagName.equals(\"String_Node_Str\"))\n currentTag = \"String_Node_Str\";\n else if (tagName.equals(\"String_Node_Str\")) {\n if (currentTag == null) {\n }\n } else if (tagName.equals(\"String_Node_Str\")) {\n currentTag = \"String_Node_Str\";\n } else if (tagName.equals(\"String_Node_Str\")) {\n String val = parser.getAttributeValue(null, \"String_Node_Str\");\n SimpleDateFormat sdf = new SimpleDateFormat(\"String_Node_Str\");\n if (val != null) {\n java.util.Date d = sdf.parse(val);\n weather.location.setSunrise(d.getTime());\n }\n val = parser.getAttributeValue(null, \"String_Node_Str\");\n if (val != null) {\n java.util.Date d = sdf.parse(val);\n weather.location.setSunset(d.getTime());\n }\n }\n } else if (event == XmlPullParser.END_TAG) {\n if (\"String_Node_Str\".equals(currentTag)) {\n currentTag = null;\n }\n }\n event = parser.next();\n }\n } catch (Throwable t) {\n t.printStackTrace();\n throw new WeatherLibException(t);\n }\n cWeather.setUnit(units);\n cWeather.weather = weather;\n return cWeather;\n}\n"
|
"public ResponseStatus handleResponse(Player p, String r) {\n SpoutPlayer player = (SpoutPlayer) p;\n int optionOffset = 0;\n if (MenuMetaMod.debug)\n System.out.println(\"String_Node_Str\" + r);\n InGameHUD main = null;\n if (player.isSpoutCraftEnabled()) {\n main = player.getMainScreen();\n if (r.equalsIgnoreCase(\"String_Node_Str\")) {\n if (main.getActivePopup() != null) {\n player.closeActiveWindow();\n }\n return ResponseStatus.HandledFinished;\n }\n }\n if (isNumber(r)) {\n if (player.isSpoutCraftEnabled()) {\n if (main.getActivePopup() != null) {\n player.closeActiveWindow();\n } else\n return ResponseStatus.NotHandled;\n }\n int response = Integer.valueOf(r).intValue();\n if (response == 0)\n response = 10;\n if (pages > page && response == 10) {\n sendPage(player, page + 1);\n return ResponseStatus.Handled;\n } else if (page > 1 && response == 9) {\n sendPage(player, page - 1);\n return ResponseStatus.Handled;\n } else if (pages == page && response == 10) {\n return ResponseStatus.HandledFinished;\n }\n if (page > 1) {\n optionOffset = 9;\n optionOffset += ((page - 2) * 8);\n }\n if ((optionOffset + response) > commands.length)\n return ResponseStatus.NotHandled;\n else {\n String[] comArray = { commands[optionOffset + response - 1] };\n if (commands[optionOffset + response - 1].contains(\"String_Node_Str\")) {\n comArray = commands[optionOffset + response - 1].split(\"String_Node_Str\");\n }\n MenuMetaMod.plugin.scheduler.scheduleSyncDelayedTask(MenuMetaMod.plugin, new CommandRunner(player, comArray), 5);\n return ResponseStatus.HandledFinished;\n }\n }\n return ResponseStatus.NotHandled;\n}\n"
|
"public static void main(String[] args) {\n ArgumentParser ap = new ArgumentParser();\n ap.setExecutableName(\"String_Node_Str\");\n ap.addOption(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", ArgumentParser.OPTIONAL);\n ap.addOption(\"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\", ArgumentParser.OPTIONAL);\n ap.addAlias(\"String_Node_Str\", \"String_Node_Str\");\n ap.addOption(\"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\", ArgumentParser.OPTIONAL);\n ap.addAlias(\"String_Node_Str\", \"String_Node_Str\");\n ap.addOption(\"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\", ArgumentParser.OPTIONAL);\n ap.addAlias(\"String_Node_Str\", \"String_Node_Str\");\n ap.addFlag(\"String_Node_Str\", \"String_Node_Str\");\n ap.addOption(\"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\", ArgumentParser.OPTIONAL);\n ap.addFlag(\"String_Node_Str\", \"String_Node_Str\");\n ap.addFlag(\"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n ap.addOption(\"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\", ArgumentParser.OPTIONAL);\n ap.addFlag(\"String_Node_Str\", \"String_Node_Str\");\n ap.addFlag(\"String_Node_Str\", \"String_Node_Str\");\n ap.addAlias(\"String_Node_Str\", \"String_Node_Str\");\n try {\n ap.parse(args);\n if (ap.isPresent(\"String_Node_Str\")) {\n ap.usage();\n System.exit(0);\n }\n InetAddress bindTo = null;\n if (ap.isPresent(\"String_Node_Str\")) {\n bindTo = InetAddress.getLocalHost();\n }\n boolean secure = true;\n if (ap.isPresent(\"String_Node_Str\")) {\n secure = false;\n }\n GSSCredential cred = null;\n if (secure) {\n GlobusCredential gc;\n if (ap.hasValue(\"String_Node_Str\")) {\n gc = new GlobusCredential(ap.getStringValue(\"String_Node_Str\"));\n } else {\n gc = GlobusCredential.getDefaultCredential();\n }\n cred = new GlobusGSSCredentialImpl(gc, GSSCredential.INITIATE_AND_ACCEPT);\n }\n int port = 1984;\n if (ap.hasValue(\"String_Node_Str\")) {\n if (ap.hasValue(\"String_Node_Str\")) {\n throw new ArgumentParserException(\"String_Node_Str\");\n }\n port = ap.getIntValue(\"String_Node_Str\");\n }\n String portFile = null;\n if (ap.hasValue(\"String_Node_Str\")) {\n portFile = ap.getStringValue(\"String_Node_Str\");\n port = 0;\n }\n int localport = 0;\n if (ap.hasValue(\"String_Node_Str\")) {\n if (ap.hasValue(\"String_Node_Str\")) {\n throw new ArgumentParserException(\"String_Node_Str\");\n }\n localport = ap.getIntValue(\"String_Node_Str\");\n }\n String localPortFile = null;\n if (ap.hasValue(\"String_Node_Str\")) {\n localPortFile = ap.getStringValue(\"String_Node_Str\");\n localport = 0;\n }\n setupLogging();\n final CoasterPersistentService s;\n if (!secure) {\n s = new CoasterPersistentService(false, port, bindTo);\n } else {\n s = new CoasterPersistentService(cred, port, bindTo);\n }\n s.setAuthorization(new SelfAuthorization());\n if (localport > 0) {\n s.initializeLocalService(localport);\n } else {\n s.initializeLocalService();\n }\n writePorts(s, portFile, localPortFile);\n s.setIgnoreIdleTime(true);\n if (ap.isPresent(\"String_Node_Str\")) {\n s.setDefaultQP(\"String_Node_Str\");\n passive = true;\n } else if (ap.isPresent(\"String_Node_Str\")) {\n s.setDefaultQP(\"String_Node_Str\");\n s.setShared(true);\n loadSharedSettings(ap.getStringValue(\"String_Node_Str\"), s.getSharedQueue().getSettings());\n } else {\n s.setDefaultQP(\"String_Node_Str\");\n }\n s.start();\n addShutdownHook(s);\n System.out.println(\"String_Node_Str\" + s);\n System.out.println(\"String_Node_Str\" + s.getLocalService().getContact());\n if (ap.isPresent(\"String_Node_Str\")) {\n disableConsoleLogging();\n statusDisplay = new CPSStatusDisplay(passive);\n statusDisplay.initScreen();\n Timer.every(1000, new Runnable() {\n public void run() {\n statusDisplay.printStats(s);\n }\n });\n }\n s.waitFor();\n System.exit(0);\n } catch (ArgumentParserException e) {\n System.err.println(e.getMessage());\n ap.usage();\n System.exit(1);\n } catch (GlobusCredentialException e) {\n System.err.println(\"String_Node_Str\" + e.getMessage());\n logger.info(\"String_Node_Str\", e);\n System.exit(3);\n } catch (GSSException e) {\n e.printStackTrace();\n } catch (Exception e) {\n System.out.println(\"String_Node_Str\" + e.getMessage());\n logger.info(\"String_Node_Str\", e);\n System.exit(2);\n }\n}\n"
|
"public static final AbstractBeanDefinition getXQueryExecutor(Element element) {\n BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(XQueryExecutor.class);\n IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, \"String_Node_Str\");\n IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, \"String_Node_Str\", \"String_Node_Str\");\n IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, \"String_Node_Str\");\n setXQueryInBuilder(element, builder);\n setXQueryParameters(element, builder);\n return builder.getBeanDefinition();\n}\n"
|
"protected void queryArtistsInternal(final String library, final Subscriber<List<Artist>> subscriber, final Bundle args) {\n Observable.create(new Observable.OnSubscribe<Artist>() {\n public void call(Subscriber<? super Artist> subscriber) {\n queryArtists(library, subscriber, args);\n }\n }).subscribeOn(scheduler).compose(new BundleableListTransformer<Artist>(ArtistCompare.func(args.getString(Extras.SORTORDER)))).subscribe(subscriber);\n}\n"
|
"void addSendExtensions(IConfigurationElement[] configElements) {\n String[] existingSchemes = getPlatformSupportedSchemes();\n for (int i = 0; i < configElements.length; i++) {\n final String protocol = configElements[i].getAttribute(PROTOCOL_ATTR);\n if (protocol == null || \"String_Node_Str\".equals(protocol))\n return;\n String CONTRIBUTION_WARNING = \"String_Node_Str\";\n try {\n final ISendFileTransferFactory clazz = (ISendFileTransferFactory) configElements[i].createExecutableExtension(CLASS_ATTR);\n int priority = getPriority(configElements[i], CONTRIBUTION_WARNING, protocol);\n String contributorName = configElements[i].getDeclaringExtension().getContributor().getName();\n ProtocolFactory newProtocolFactory = new ProtocolFactory(clazz, priority, contributorName);\n synchronized (sendFileTransferProtocolMap) {\n ProtocolFactory oldProtocolFactory = (ProtocolFactory) sendFileTransferProtocolMap.get(protocol);\n if (oldProtocolFactory != null) {\n int result = oldProtocolFactory.compareTo(newProtocolFactory);\n if (result < 0) {\n Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.Activator_WARNING_EXISTING_HIGHER_PRIORITY, new Object[] { CONTRIBUTION_WARNING, protocol, contributorName }), null));\n continue;\n } else if (result == 0) {\n Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.Activator_WARNING_SAME_PRIORITY, new Object[] { CONTRIBUTION_WARNING, protocol, contributorName, new Integer(priority) }), null));\n } else if (result > 0) {\n Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.Activator_WARNING_NEW_HIGHER_PRIORITY, new Object[] { CONTRIBUTION_WARNING, protocol, contributorName, new Integer(priority), new Integer(oldProtocolFactory.priority) }), null));\n }\n }\n if (!isSchemeRegistered(protocol, existingSchemes))\n registerScheme(protocol);\n sendFileTransferProtocolMap.put(protocol, newProtocolFactory);\n }\n } catch (final CoreException e) {\n Activator.getDefault().log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, NLS.bind(Messages.Activator_EXCEPTION_LOADING_EXTENSION_POINT, SEND_FILETRANSFER_PROTOCOL_FACTORY_EPOINT), e));\n }\n }\n}\n"
|
"public SyncTaskTO updateSyncTask(final SyncTaskTO taskTO) {\n return restTemplate.postForObject(baseURL + \"String_Node_Str\", taskTO, SyncTaskTO.class);\n}\n"
|
"public boolean equals(Object obj) {\n if (this == obj)\n return true;\n if (obj == null)\n return false;\n if (!(obj instanceof RecCV))\n throw new STCRuntimeError(\"String_Node_Str\" + this.getClass().getName() + \"String_Node_Str\" + obj.getClass().getName());\n RecCV other = (RecCV) obj;\n if (arg != null) {\n if (other.arg == null) {\n return false;\n } else if (!arg.equals(other.arg))\n return false;\n if (cv == null) {\n if (other.cv != null)\n return false;\n } else if (!cv.equals(other.cv))\n return false;\n return true;\n}\n"
|
"public Mono<ListSpacesResponse> retrieveSpaceId(String orgId, String spaceName) {\n if (\"String_Node_Str\".equals(spaceName) && orgId.equals(ORG_UUID)) {\n SpaceResource sr = SpaceResource.builder().entity(SpaceEntity.builder().name(spaceName).build()).metadata(Metadata.builder().createdAt(CREATED_AT_TIMESTAMP).id(SPACE_UUID).build()).build();\n List<SpaceResource> list = new LinkedList<>();\n list.add(sr);\n ListSpacesResponse resp = ListSpacesResponse.builder().addAllResources(list).build();\n return Mono.just(resp).delayElement(this.getSleepRandomDuration());\n }\n log.error(\"String_Node_Str\");\n return null;\n}\n"
|
"public void setup() throws Exception {\n executeDataSet(\"String_Node_Str\");\n executeDataSet(\"String_Node_Str\");\n emr.getRegimenManager().clear();\n InputStream stream = getClass().getClassLoader().getResourceAsStream(\"String_Node_Str\");\n emr.getRegimenManager().loadDefinitionsFromXML(stream);\n this.ui = new FragmentActionUiUtils(null, null, null);\n DrugOrder aspirin = new DrugOrder();\n aspirin.setConcept(Context.getConceptService().getConcept(71617));\n aspirin.setDose(100.0d);\n aspirin.setUnits(\"String_Node_Str\");\n aspirin.setFrequency(\"String_Node_Str\");\n DrugOrder stavudine = new DrugOrder();\n stavudine.setConcept(Context.getConceptService().getConcept(84309));\n stavudine.setDose(30.0d);\n stavudine.setUnits(\"String_Node_Str\");\n stavudine.setFrequency(\"String_Node_Str\");\n regimen = new RegimenOrder(new HashSet<DrugOrder>(Arrays.asList(aspirin, stavudine)));\n}\n"
|
"protected void removeSSRC(long ssrc) {\n int index = -1;\n if (ssrcList == null || ssrcList.length == 0) {\n return;\n }\n for (int i = 0; i < ssrcList.length; i++) {\n if (ssrcList[i] == ssrc) {\n index = i;\n break;\n }\n }\n if (index < 0 || index >= ssrcList.length) {\n return;\n }\n if (ssrcList.length == 1) {\n setSsrcList(null);\n return;\n }\n long[] newSsrcList = new long[ssrcList.length - 1];\n System.arraycopy(ssrcList, 0, newSsrcList, 0, index);\n if (index < ssrcList.length - 1) {\n System.arraycopy(ssrcList, index + 1, newSsrcList, index, ssrcList.length - index - 1);\n }\n setSsrcList(newSsrcList);\n}\n"
|
"public void handleMessage(Message msg) {\n String type;\n switch(msg.what) {\n case MessageListItem.MSG_LIST_EDIT_MMS:\n type = \"String_Node_Str\";\n break;\n case MessageListItem.MSG_LIST_EDIT_SMS:\n type = \"String_Node_Str\";\n break;\n default:\n Log.w(TAG, \"String_Node_Str\" + msg.what);\n return;\n }\n MessageItem msgItem = getMessageItem(type, (Long) msg.obj);\n if (msgItem != null) {\n editMessageItem(msgItem);\n drawBottomPanel();\n }\n}\n"
|
"private void renderWithTemplateEngineOrRaw(Context context, Result result) {\n TemplateEngine templateEngine = templateEngineManager.getTemplateEngineForContentType(result.getContentType());\n if (templateEngine != null) {\n templateEngine.invoke(context, result);\n } else {\n if (result.getRenderable() instanceof String) {\n if (result.getContentType() == null) {\n result.contentType(Result.TEXT_PLAIN);\n }\n ResponseStreams responseStreams = context.finalizeHeaders(result);\n try (Writer writer = responseStreams.getWriter()) {\n writer.write((String) result.getRenderable());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n } else if (result.getRenderable() instanceof byte[]) {\n if (result.getContentType() == null) {\n result.contentType(Result.APPLICATION_OCTET_STREAM);\n }\n ResponseStreams responseStreams = context.finalizeHeaders(result);\n try (OutputStream outputStream = responseStreams.getOutputStream()) {\n outputStream.write((byte[]) result.getRenderable());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n } else {\n context.finalizeHeaders(result);\n throw new IllegalArgumentException(\"String_Node_Str\" + result.getContentType());\n }\n }\n}\n"
|
"private void RemoveWrongLabels(String Label) {\n for (Component comp : comps) {\n AttributeSet attrs = comp.getAttributeSet();\n if (attrs.containsAttribute(StdAttr.LABEL)) {\n String CompLabel = attrs.getValue(StdAttr.LABEL);\n if (Label.toUpperCase().equals(CompLabel.toUpperCase())) {\n attrs.setValue(StdAttr.LABEL, \"String_Node_Str\");\n }\n }\n }\n Iterator<? extends Component> wire = wires.getComponents();\n while (wire.hasNext()) {\n Component comp = wire.next();\n AttributeSet attrs = comp.getAttributeSet();\n if (attrs.containsAttribute(StdAttr.LABEL)) {\n String CompLabel = attrs.getValue(StdAttr.LABEL);\n if (Label.equals(CompLabel.toUpperCase())) {\n attrs.setValue(StdAttr.LABEL, \"String_Node_Str\");\n }\n }\n }\n UsedLabels.remove(Label);\n JOptionPane.showMessageDialog(null, \"String_Node_Str\" + Label + \"String_Node_Str\" + Strings.get(\"String_Node_Str\"));\n}\n"
|
"public boolean equals(Object object) {\n if (object instanceof RootKeepAsElement) {\n if (t1 == null && ((RootKeepAsElement) object).getT1() == null) {\n return true;\n } else if (t1 == null && ((RootKeepAsElement) object).getT1() != null) {\n return false;\n } else {\n Object value1 = t1;\n Object value2 = ((RootKeepAsElement) object).getT1();\n if ((value1 instanceof Element) && (value2 instanceof Element)) {\n Element elem1 = (Element) value1;\n Element elem2 = (Element) value2;\n if (!(elem1.getLocalName().equals(elem2.getLocalName()))) {\n return false;\n }\n return true;\n } else {\n return this.t1.equals(((RootKeepAsElement) object).getT1());\n }\n }\n }\n return false;\n}\n"
|
"public static int compare(Object obj1, Object obj2) throws DataException {\n if (obj1 == null || obj2 == null) {\n if (obj1 == null && obj2 != null)\n return -1;\n else if (obj1 != null && obj2 == null)\n return 1;\n else\n return 0;\n }\n try {\n if (MiscUtil.isSameType(obj1, obj2)) {\n if (obj1 instanceof Boolean) {\n if (obj1.equals(obj2))\n return 0;\n Boolean bool = (Boolean) obj1;\n if (bool.equals(Boolean.TRUE))\n return 1;\n else\n return -1;\n } else if (obj1 instanceof Comparable) {\n return ((Comparable) obj1).compareTo(obj2);\n } else {\n return myCollator.compare(obj1.toString(), obj2.toString());\n }\n } else if (MiscUtil.isNumericOrString(obj1) && MiscUtil.isNumericOrString(obj2)) {\n return DataTypeUtil.toDouble(obj1).compareTo(DataTypeUtil.toDouble(obj2));\n } else if (MiscUtil.isDateOrString(obj1) && MiscUtil.isDateOrString(obj2)) {\n return DataTypeUtil.toDate(obj1).compareTo(DataTypeUtil.toDate(obj2));\n } else\n throw new DataException(ResourceConstants.INVALID_TYPE_IN_EXPR);\n } catch (BirtException e) {\n throw new DataException(ResourceConstants.DATATYPEUTIL_ERROR, e);\n }\n}\n"
|
"public Map<String, List> getPageContent() {\n return embeddedPageContent;\n}\n"
|
"public String getRelativeImageFolder() {\n return request.getContextPath() + \"String_Node_Str\" + IMAGE_FOLDER + \"String_Node_Str\" + request.getSession().getId();\n}\n"
|
"public List<String> getJavaOpts() {\n Iterable<String> sysprops = Iterables.transform(getJavaSystemProperties().entrySet(), new Function<Map.Entry, String>() {\n public String apply(Map.Entry entry) {\n Object k = entry.getKey();\n Object v = entry.getValue();\n try {\n if (v != null && Primitives.isWrapperType(v.getClass())) {\n v = \"String_Node_Str\" + v;\n } else {\n v = BasicConfigKey.resolveValue(v, Object.class, entity.getExecutionContext());\n if (v == null) {\n } else if (v instanceof CharSequence) {\n } else if (TypeCoercions.isPrimitiveOrBoxer(v.getClass())) {\n v = \"String_Node_Str\" + v;\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\" + v + \"String_Node_Str\" + v.getClass() + \"String_Node_Str\");\n }\n }\n return \"String_Node_Str\" + k + (v != null ? \"String_Node_Str\" + v : \"String_Node_Str\");\n } catch (Exception e) {\n log.warn(\"String_Node_Str\", k, e);\n throw Throwables.propagate(e);\n }\n }\n });\n Set<String> result = MutableSet.<String>builder().addAll(getCustomJavaConfigOptions()).addAll(sysprops).build();\n for (String customOpt : entity.getConfig(UsesJava.JAVA_OPTS)) {\n for (List<String> mutuallyExclusiveOpt : MUTUALLY_EXCLUSIVE_OPTS) {\n if (mutuallyExclusiveOpt.contains(customOpt)) {\n result.removeAll(mutuallyExclusiveOpt);\n }\n }\n for (String keyValOptPrefix : KEY_VAL_OPT_PREFIXES) {\n if (customOpt.startsWith(keyValOptPrefix)) {\n for (Iterator<String> iter = result.iterator(); iter.hasNext(); ) {\n String existingOpt = (String) iter.next();\n if (existingOpt.startsWith(keyValOptPrefix)) {\n iter.remove();\n }\n }\n }\n }\n if (customOpt.indexOf(\"String_Node_Str\") != -1) {\n String customOptPrefix = customOpt.substring(0, customOpt.indexOf(\"String_Node_Str\"));\n for (Iterator<String> iter = result.iterator(); iter.hasNext(); ) {\n String existingOpt = (String) iter.next();\n if (existingOpt.startsWith(customOptPrefix)) {\n iter.remove();\n }\n }\n }\n result.add(customOpt);\n }\n return ImmutableList.copyOf(result);\n}\n"
|
"public boolean generate(World world, Random random, int x, int y, int z) {\n int type;\n if (this.mushroomType >= 0) {\n type = this.mushroomType;\n } else {\n type = random.nextInt(2);\n }\n int height = random.nextInt(3) + 4;\n boolean flag = true;\n if (y >= 1 && y + height + 1 < 256) {\n int blockID;\n int posY;\n int l1;\n int posX = 0;\n for (blockID = y; blockID <= y + 1 + height; ++blockID) {\n byte b0 = 3;\n if (blockID <= y + 3) {\n b0 = 0;\n }\n for (posY = x - b0; posY <= x + b0 && flag; ++posY) {\n for (l1 = z - b0; l1 <= z + b0 && flag; ++l1) {\n if (blockID >= 0 && blockID < 256) {\n Block block = world.getBlock(posY, blockID, l1);\n if (posX != 0 && block != null && !block.isLeaves(world, posY, blockID, l1) && posX != NContent.glowshroom) {\n flag = false;\n }\n } else {\n flag = false;\n }\n }\n }\n }\n if (!flag) {\n return false;\n } else {\n Block blockb = world.getBlock(x, y - 1, z);\n if (blockb != Blocks.mycelium && blockb != Blocks.netherrack && blockb != NContent.taintedSoil && blockb != Blocks.soul_sand) {\n return false;\n } else {\n int j2 = y + height;\n if (type == 1) {\n j2 = y + height - 3;\n }\n for (posY = j2; posY <= y + height; ++posY) {\n l1 = 1;\n if (posY < y + height) {\n ++l1;\n }\n if (type == 0) {\n l1 = 3;\n }\n for (posX = x - l1; posX <= x + l1; ++posX) {\n for (int posZ = z - l1; posZ <= z + l1; ++posZ) {\n int meta = 5;\n if (posX == x - l1) {\n --meta;\n }\n if (posX == x + l1) {\n ++meta;\n }\n if (posZ == z - l1) {\n meta -= 3;\n }\n if (posZ == z + l1) {\n meta += 3;\n }\n if (type == 0 || posY < y + height) {\n if ((posX == x - l1 || posX == x + l1) && (posZ == z - l1 || posZ == z + l1)) {\n continue;\n }\n if (posX == x - (l1 - 1) && posZ == z - l1) {\n meta = 1;\n }\n if (posX == x - l1 && posZ == z - (l1 - 1)) {\n meta = 1;\n }\n if (posX == x + (l1 - 1) && posZ == z - l1) {\n meta = 3;\n }\n if (posX == x + l1 && posZ == z - (l1 - 1)) {\n meta = 3;\n }\n if (posX == x - (l1 - 1) && posZ == z + l1) {\n meta = 7;\n }\n if (posX == x - l1 && posZ == z + (l1 - 1)) {\n meta = 7;\n }\n if (posX == x + (l1 - 1) && posZ == z + l1) {\n meta = 9;\n }\n if (posX == x + l1 && posZ == z + (l1 - 1)) {\n meta = 9;\n }\n }\n if (meta == 5 && posY < y + height) {\n meta = 0;\n }\n Block block = world.getBlock(posX, posY, posZ);\n if ((meta != 0 || y >= y + height - 1) && (block == null || block.canBeReplacedByLeaves(world, posX, posY, posZ))) {\n Block localID = type == 1 ? NContent.glowshroomBlue : NContent.glowshroomGreen;\n world.setBlock(posX, posY, posZ, localID, meta, 0);\n }\n }\n }\n }\n for (posY = 0; posY < height; ++posY) {\n Block block = world.getBlock(x, y + posY, z);\n if (block == null || block.canBeReplacedByLeaves(world, x, y + posY, z)) {\n Block localID = type == 1 ? NContent.glowshroomBlue : NContent.glowshroomGreen;\n world.setBlock(x, y + posY, z, localID, 10, 0);\n }\n }\n return true;\n }\n }\n } else {\n return false;\n }\n}\n"
|
"private void dumpTopFrameInfo(int verbosity) {\n Log.write(\"String_Node_Str\");\n Log.writeln(topFrame);\n Log.write(\"String_Node_Str\");\n Log.writeln(ip);\n Log.write(\"String_Node_Str\");\n Log.writeln(fp);\n Log.write(\"String_Node_Str\");\n Log.writeln(thread.getContextRegisters().ip);\n if (verbosity >= 3 && thread.getJNIEnv() != null)\n thread.getJNIEnv().dumpJniRefsStack();\n}\n"
|
"public void resetZoom() {\n mDrawMatrixValues = new float[] { 1f, 0f, 0f, 0f, 1f, 0f, 0f, 0f, 1f };\n mDrawMatrix.setValues(mDrawMatrixValues);\n if (!mSeries.isEmpty() && _recalculate) {\n recalculateXCoordinates(mGraphWidth * mDrawMatrixValues[0]);\n if (calculateLegendBounds())\n Utils.calculateLegendInformation(mSeries.get(0).getSeries(), 0, mGraphWidth * mDrawMatrixValues[0], mLegendPaint);\n calculateValueTextHeight();\n }\n invalidateGlobal();\n}\n"
|
"private EngineeringCRS parseEngineeringCRS(final int mode, final Element parent, final boolean isBaseCRS) throws ParseException {\n final Element element = parent.pullElement(mode, isBaseCRS ? new String[] { WKTKeywords.BaseEngCRS } : new String[] { WKTKeywords.EngineeringCRS, WKTKeywords.EngCRS, WKTKeywords.Local_CS });\n if (element == null) {\n return null;\n }\n final boolean isWKT1 = element.getKeywordIndex() == 2;\n final String name = element.pullString(\"String_Node_Str\");\n final EngineeringDatum datum = parseEngineeringDatum(MANDATORY, element, isWKT1);\n final Unit<?> unit = parseUnit(element);\n try {\n final CoordinateSystem cs = parseCoordinateSystem(element, null, 1, isWKT1, unit, datum);\n final Map<String, ?> properties = parseMetadataAndClose(element, name, datum);\n if (baseCRS != null) {\n return crsFactory.createDerivedCRS(properties, baseCRS, fromBase, cs);\n }\n return crsFactory.createEngineeringCRS(properties, datum, cs);\n } catch (FactoryException exception) {\n throw element.parseFailed(exception);\n }\n}\n"
|
"public CpuData getCpuInfo() {\n final CpuData result = new CpuData(getTotalCpuUsage());\n if (mCpuInfoList != null) {\n for (int i = 0; i < mCpuInfoList.size(); i++) {\n final CpuInfo info = mCpuInfoList.get(i);\n result.addCpuUtil(info.getUsage());\n }\n }\n return result;\n}\n"
|
"public void bindView(View view, Context context, Cursor cursor) {\n String a = \"String_Node_Str\";\n super.bindView(view, context, cursor);\n ViewHolder holder = (ViewHolder) view.getTag();\n Weapon weapon = mWeaponCursor.getWeapon();\n String arc = weapon.getRecoil();\n String charge = weapon.getCharges();\n String chargeText = \"String_Node_Str\";\n String[] charges = charge.split(\"String_Node_Str\");\n for (String c : charges) {\n chargeText = chargeText + getChargeData(c);\n }\n holder.arctv.setText(arc);\n holder.chargetv.setText(chargeText);\n holder.powerv.setImageDrawable(null);\n holder.crangev.setImageDrawable(null);\n holder.poisonv.setImageDrawable(null);\n holder.parav.setImageDrawable(null);\n holder.sleepv.setImageDrawable(null);\n holder.exhaustv.setImageDrawable(null);\n holder.slimev.setImageDrawable(null);\n holder.paintv.setImageDrawable(null);\n holder.powerv.setVisibility(View.GONE);\n holder.crangev.setVisibility(View.GONE);\n holder.poisonv.setVisibility(View.GONE);\n holder.parav.setVisibility(View.GONE);\n holder.sleepv.setVisibility(View.GONE);\n holder.exhaustv.setVisibility(View.GONE);\n holder.slimev.setVisibility(View.GONE);\n holder.paintv.setVisibility(View.GONE);\n String[] coatings = weapon.getCoatings().split(\"String_Node_Str\");\n if (!coatings[0].equals(\"String_Node_Str\")) {\n powerv.setImageDrawable(getDrawable(context, \"String_Node_Str\"));\n powerv.setVisibility(View.VISIBLE);\n }\n if (!coatings[1].equals(\"String_Node_Str\")) {\n poisonv.setImageDrawable(getDrawable(context, \"String_Node_Str\"));\n poisonv.setVisibility(View.VISIBLE);\n }\n if (!coatings[2].equals(\"String_Node_Str\")) {\n parav.setImageDrawable(getDrawable(context, \"String_Node_Str\"));\n parav.setVisibility(View.VISIBLE);\n }\n if (!coatings[3].equals(\"String_Node_Str\")) {\n sleepv.setImageDrawable(getDrawable(context, \"String_Node_Str\"));\n sleepv.setVisibility(View.VISIBLE);\n }\n if (!coatings[4].equals(\"String_Node_Str\")) {\n crangev.setImageDrawable(getDrawable(context, \"String_Node_Str\"));\n crangev.setVisibility(View.VISIBLE);\n }\n if (!coatings[5].equals(\"String_Node_Str\")) {\n paintv.setImageDrawable(getDrawable(context, \"String_Node_Str\"));\n paintv.setVisibility(View.VISIBLE);\n }\n if (!coatings[6].equals(\"String_Node_Str\")) {\n exhaustv.setImageDrawable(getDrawable(context, \"String_Node_Str\"));\n exhaustv.setVisibility(View.VISIBLE);\n }\n if (!coatings[7].equals(\"String_Node_Str\")) {\n slimev.setImageDrawable(getDrawable(context, \"String_Node_Str\"));\n slimev.setVisibility(View.VISIBLE);\n }\n}\n"
|
"public void testOnlineOfflinePusher() throws Exception {\n URL remote = getReplicationURL();\n final CustomizableMockHttpClient mockHttpClient = new CustomizableMockHttpClient();\n mockHttpClient.addResponderFakeLocalDocumentUpdate404();\n mockHttpClient.addResponderRevDiffsSmartResponder();\n HttpClientFactory mockHttpClientFactory = mockFactoryFactory(mockHttpClient);\n manager.setDefaultHttpClientFactory(mockHttpClientFactory);\n Replication pusher = database.createPushReplication(remote);\n pusher.setContinuous(true);\n pusher.start();\n for (int i = 0; i < 5; i++) {\n Log.d(Database.TAG, \"String_Node_Str\" + i);\n putReplicationOffline(pusher);\n String docFieldName = \"String_Node_Str\" + i;\n String docFieldVal = \"String_Node_Str\" + i;\n Map<String, Object> properties = new HashMap<String, Object>();\n properties.put(docFieldName, docFieldVal);\n createDocumentWithProperties(database, properties);\n final CountDownLatch gotBulkDocsRequest = new CountDownLatch(1);\n CustomizableMockHttpClient.ResponseListener bulkDocsListener = new CustomizableMockHttpClient.ResponseListener() {\n public void responseSent(HttpUriRequest httpUriRequest, HttpResponse response) {\n if (httpUriRequest.getURI().getPath().endsWith(\"String_Node_Str\")) {\n gotBulkDocsRequest.countDown();\n }\n }\n };\n mockHttpClient.addResponseListener(bulkDocsListener);\n putReplicationOnline(pusher);\n boolean succeeded = gotBulkDocsRequest.await(30, TimeUnit.SECONDS);\n assertTrue(succeeded);\n mockHttpClient.removeResponseListener(bulkDocsListener);\n boolean foundExpectedDoc = false;\n List<HttpRequest> capturedRequests = mockHttpClient.getCapturedRequests();\n for (HttpRequest capturedRequest : capturedRequests) {\n Log.d(Database.TAG, \"String_Node_Str\" + capturedRequest);\n if (capturedRequest instanceof HttpPost) {\n HttpPost capturedPostRequest = (HttpPost) capturedRequest;\n if (capturedPostRequest.getURI().getPath().endsWith(\"String_Node_Str\")) {\n ArrayList docs = CustomizableMockHttpClient.extractDocsFromBulkDocsPost(capturedRequest);\n if (docs.size() != 1) {\n Log.d(Database.TAG, \"String_Node_Str\");\n }\n assertEquals(1, docs.size());\n Map<String, Object> doc = (Map) docs.get(0);\n assertEquals(docFieldVal, doc.get(docFieldName));\n foundExpectedDoc = true;\n }\n }\n }\n assertTrue(foundExpectedDoc);\n mockHttpClient.clearCapturedRequests();\n }\n}\n"
|
"public void removeLava(Block testBlock) {\n if (TEMP_LAVA_BLOCKS.containsKey(testBlock)) {\n TempBlock tb = TEMP_LAVA_BLOCKS.get(testBlock);\n tb.revertBlock();\n TEMP_LAVA_BLOCKS.remove(testBlock);\n affectedBlocks.remove(tb);\n return;\n }\n TempBlock tblock = new TempBlock(testBlock, REVERT_MATERIAL, testBlock.getData());\n affectedBlocks.add(tblock);\n TEMP_LAND_BLOCKS.add(tblock);\n}\n"
|
"public void validate(ParseTreeContext context) {\n super.validate(context);\n TypeHelper typeHelper = context.getTypeHelper();\n Object type = typeHelper.resolveSchema(abstractSchemaName);\n if (type == null) {\n throw JPQLException.entityTypeNotFound2(context.getQueryInfo(), getLine(), getColumn(), abstractSchemaName);\n }\n setType(type);\n}\n"
|
"public void process(Pair<Integer, GenericData.Record> input, Emitter<GenericData.Record> emitter) {\n if (outputIndex == input.first()) {\n emitter.emit((GenericData.Record) input.second().get(\"String_Node_Str\"));\n }\n}\n"
|
"private int nextSelectorIndex() {\n int value = nextSelectorIndex.getAndIncrement();\n return HashUtil.hashToIndex(value, selectorThreadCount);\n}\n"
|
"public void reset() throws PermissionBackendException {\n this.clearCache();\n if (this.backend != null) {\n this.backend.reload();\n }\n this.callEvent(PermissionSystemEvent.Action.RELOADED);\n}\n"
|
"public void receiveFamilyRegistration(BlockUri familyUri, Map<String, Integer> registration) {\n BlockFamily family;\n if (isFreeformFamily(familyUri)) {\n family = blockLoader.loadWithShape(familyUri);\n } else {\n family = getAvailableBlockFamily(familyUri);\n }\n if (family != null) {\n for (Block block : family.getBlocks()) {\n Integer id = registration.get(block.getURI().toString());\n if (id != null) {\n block.setId((short) id.intValue());\n } else {\n logger.error(\"String_Node_Str\", block.getURI(), familyUri);\n block.setId(UNKNOWN_ID);\n }\n registerFamily(family);\n }\n } else {\n logger.error(\"String_Node_Str\", familyUri);\n }\n}\n"
|
"private static Map<String, String> generateHeaders(String host) {\n Validate.notNull(host);\n Map<String, String> ret = new LinkedHashMap<>();\n ret.put(\"String_Node_Str\", host);\n ret.put(\"String_Node_Str\", \"String_Node_Str\");\n return ret;\n}\n"
|
"public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n if (viewType == TYPE_VIEW_LOADING) {\n final LoadingViewHolder holder = new LoadingViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.view_adapter_loading, parent, false));\n holder.itemView.setOnClickListener(this);\n return holder;\n } else {\n return mWrappedAdapter.createViewHolder(parent, viewType);\n }\n}\n"
|
"public void refresh() {\n for (IDb db : dbs) {\n if (db instanceof DbResource) {\n ((DbResource) db).close();\n }\n }\n dbs.clear();\n dbs.add(new IDb() {\n public IDatabasePlatform getPlatform() {\n return platform;\n }\n public String getName() {\n return \"String_Node_Str\";\n }\n });\n IAgentManager agentManager = context.getAgentManager();\n Collection<Agent> agents = agentManager.getAvailableAgents();\n for (Agent agent : agents) {\n AgentRuntime runtime = agentManager.getAgentRuntime(agent);\n Collection<IResourceRuntime> resources = runtime.getDeployedResources();\n for (IResourceRuntime iResource : resources) {\n if (iResource.getResource().getType().equals(Datasource.TYPE)) {\n DbResource db = new DbResource(agent, iResource);\n dbs.add(db);\n }\n }\n }\n Collections.sort(dbs, new Comparator<IDb>() {\n public int compare(IDb o1, IDb o2) {\n return o1.getName().compareTo(o2.getName());\n }\n });\n}\n"
|
"protected void initialize() {\n boolean isNewArea = (root == null);\n createRoot();\n if (isNewArea) {\n IStyle areaStyle = root.getStyle();\n validateBoxProperty(areaStyle, parent.getCurrentMaxContentWidth(), context.getMaxHeight());\n setOffsetX(root.getContentX());\n setOffsetY(isFirst ? root.getContentY() : 0);\n int maxWidth = parent.getCurrentMaxContentWidth();\n int leftWidth = maxWidth - parent.getCurrentIP();\n calculateSpecifiedWidth();\n int width = maxWidth;\n if (specifiedWidth > 0) {\n width = Math.min(specifiedWidth, maxWidth);\n } else {\n if (leftWidth > maxWidth / 4) {\n width = leftWidth;\n } else {\n width = maxWidth;\n }\n }\n root.setAllocatedWidth(width);\n setCurrentBP(0);\n setCurrentIP(0);\n }\n maxAvaWidth = root.getContentWidth();\n root.setAllocatedHeight(parent.getCurrentMaxContentHeight());\n maxAvaHeight = root.getContentHeight();\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.