content stringlengths 40 137k |
|---|
"public void doTask() {\n if (x.allocationMode() == DataBuffer.AllocationMode.HEAP) {\n if (x.dataType() == DataBuffer.Type.FLOAT) {\n float[] xf = (float[]) x.array();\n float[] yf = (float[]) y.array();\n if (incrX == 1 && incrY == 1 && (x == z || incrZ == 1)) {\n if (x == z) {\n for (int i = 0; i < n; i++) {\n xf[offsetX + i] *= yf[offsetY + i];\n }\n } else {\n float[] zf = (float[]) z.array();\n for (int i = 0; i < n; i++) {\n zf[offsetZ + i] = xf[offsetX + i] * yf[offsetY + i];\n }\n }\n } else {\n if (x == z) {\n for (int i = 0; i < n; i++) {\n xf[offsetX + i * incrX] *= yf[offsetY + i * incrY];\n }\n } else {\n float[] zf = (float[]) z.array();\n for (int i = 0; i < n; i++) {\n zf[offsetZ + i * incrZ] = xf[offsetX + i * incrX] * yf[offsetY + i * incrY];\n }\n }\n }\n } else {\n double[] xd = (double[]) x.array();\n double[] yd = (double[]) y.array();\n if (incrX == 1 && incrY == 1 && (x == z || incrZ == 1)) {\n if (x == z) {\n for (int i = 0; i < n; i++) {\n xd[offsetX + i] *= yd[offsetY + i];\n }\n } else {\n double[] zd = (double[]) z.array();\n for (int i = 0; i < n; i++) {\n zd[offsetZ + i] = xd[offsetX + i] * yd[offsetY + i];\n }\n }\n } else {\n if (x == z) {\n for (int i = 0; i < n; i++) {\n xd[offsetX + i * incrX] *= yd[offsetY + i * incrY];\n }\n } else {\n double[] zd = (double[]) z.array();\n for (int i = 0; i < n; i++) {\n zd[offsetZ + i * incrZ] = xd[offsetX + i * incrX] * yd[offsetY + i * incrY];\n }\n }\n }\n }\n } else {\n ByteBuf nbbx = x.asNetty();\n ByteBuf nbby = y.asNetty();\n ByteBuf nbbz = z.asNetty();\n if (x.dataType() == DataBuffer.Type.FLOAT) {\n int byteOffsetX = 4 * offsetX;\n int byteOffsetY = 4 * offsetY;\n int byteOffsetZ = 4 * offsetZ;\n if (incrX == 1 && incrY == 1 && (x == z || incrZ == 1)) {\n if (x == z) {\n for (int i = 0; i < 4 * n; i += 4) {\n int xbIdx = byteOffsetX + i;\n nbbx.setFloat(xbIdx, nbbx.getFloat(xbIdx) * nbby.getFloat(byteOffsetY + i));\n }\n } else {\n for (int i = 0; i < 4 * n; i += 4) {\n nbbz.setFloat(byteOffsetZ + i, nbbx.getFloat(byteOffsetX + i) * nbby.getFloat(byteOffsetY + i));\n }\n }\n } else {\n if (x == z) {\n for (int i = 0; i < 4 * n; i += 4) {\n int xbIdx = byteOffsetX + i * incrX;\n nbbx.setFloat(xbIdx, nbbx.getFloat(xbIdx) * nbby.getFloat(byteOffsetY + i * incrY));\n }\n } else {\n for (int i = 0; i < 4 * n; i += 4) {\n nbbz.setFloat(byteOffsetZ + i * incrZ, nbbx.getFloat(byteOffsetX + i * incrX) * nbby.getFloat(byteOffsetY + i * incrY));\n }\n }\n }\n } else {\n int byteOffsetX = 8 * offsetX;\n int byteOffsetY = 8 * offsetY;\n int byteOffsetZ = 8 * offsetZ;\n if (incrX == 1 && incrY == 1 && (x == z || incrZ == 1)) {\n if (x == z) {\n for (int i = 0; i < 8 * n; i += 8) {\n int xbIdx = byteOffsetX + i;\n nbbx.setDouble(xbIdx, nbbx.getDouble(xbIdx) * nbby.getDouble(byteOffsetY + i));\n }\n } else {\n for (int i = 0; i < 8 * n; i += 8) {\n nbbz.setDouble(byteOffsetZ + i, nbbx.getDouble(byteOffsetX + i) * nbby.getDouble(byteOffsetY + i));\n }\n }\n } else {\n if (x == z) {\n for (int i = 0; i < 8 * n; i += 8) {\n int xbIdx = byteOffsetX + i * incrX;\n nbbx.setDouble(xbIdx, nbbx.getDouble(xbIdx) * nbby.getDouble(byteOffsetY + i * incrY));\n }\n } else {\n for (int i = 0; i < 8 * n; i += 8) {\n nbbz.setDouble(byteOffsetZ + i * incrZ, nbbx.getDouble(byteOffsetX + i * incrX) * nbby.getDouble(byteOffsetY + i * incrY));\n }\n }\n }\n }\n }\n}\n"
|
"public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n if (debug)\n Log.d(TAG, \"String_Node_Str\");\n firstTime = icicle != null ? icicle.getBoolean(Restore.KEY_FIRST_TIME) : false;\n if (firstTime == false) {\n Bundle extras = getIntent().getExtras();\n firstTime = extras != null ? extras.getBoolean(Restore.KEY_FIRST_TIME) : false;\n }\n if ((!firstTime) && (CategoryList.isSignedIn() == false)) {\n Intent frontdoor = new Intent(this, FrontDoor.class);\n startActivity(frontdoor);\n finish();\n }\n setContentView(R.layout.restore);\n String title = getResources().getString(R.string.app_name) + \"String_Node_Str\" + getResources().getString(R.string.restore);\n setTitle(title);\n if (filename == null) {\n filename = CategoryList.BACKUP_FILENAME;\n }\n TextView filenameText;\n filenameText = (TextView) findViewById(R.id.restore_filename);\n filenameText.setText(filename);\n TextView restoreInfoText;\n restoreInfoText = (TextView) findViewById(R.id.restore_info);\n EditText passwordText;\n passwordText = (EditText) findViewById(R.id.restore_password);\n Button restoreButton;\n restoreButton = (Button) findViewById(R.id.restore_button);\n if (!backupFileExists(filename)) {\n passwordText.setVisibility(0);\n restoreButton.setVisibility(0);\n restoreInfoText.setText(R.string.restore_no_file);\n return;\n }\n restoreInfoText.setText(R.string.restore_set_password);\n passwordText.setVisibility(1);\n restoreButton.setVisibility(1);\n restoreButton.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n EditText passwordText;\n passwordText = (EditText) findViewById(R.id.restore_password);\n String masterPassword = passwordText.getText().toString();\n read(filename, masterPassword);\n }\n });\n}\n"
|
"public void addToObjectsToCommit(IdEObject idEObject) throws BimDatabaseException {\n if (idEObject.getOid() == -1) {\n throw new BimDatabaseException(\"String_Node_Str\");\n }\n objectsToCommit.forcePut(idEObject, idEObject.getOid());\n}\n"
|
"public boolean removeFromZone(Game game, Zone fromZone, UUID sourceId) {\n boolean removed = false;\n MageObject lkiObject = null;\n switch(fromZone) {\n case GRAVEYARD:\n removed = game.getPlayer(ownerId).removeFromGraveyard(this, game);\n break;\n case HAND:\n removed = game.getPlayer(ownerId).removeFromHand(this, game);\n break;\n case LIBRARY:\n removed = game.getPlayer(ownerId).removeFromLibrary(this, game);\n break;\n case EXILED:\n if (game.getExile().getCard(getId(), game) != null) {\n removed = game.getExile().removeCard(this, game);\n }\n break;\n case STACK:\n StackObject stackObject;\n if (getSpellAbility() != null) {\n stackObject = game.getStack().getSpell(getSpellAbility().getId());\n } else {\n stackObject = game.getStack().getSpell(this.getId());\n }\n if (stackObject == null && (this instanceof SplitCard)) {\n stackObject = game.getStack().getSpell(((SplitCard) this).getLeftHalfCard().getId());\n if (stackObject == null) {\n stackObject = game.getStack().getSpell(((SplitCard) this).getRightHalfCard().getId());\n }\n }\n if (stackObject == null) {\n stackObject = game.getStack().getSpell(getId());\n }\n if (stackObject != null) {\n removed = game.getStack().remove(stackObject);\n lkiObject = stackObject;\n }\n break;\n case COMMAND:\n lkiObject = (Commander) game.getObject(objectId);\n if (lkiObject != null) {\n removed = game.getState().getCommand().remove((Commander) game.getObject(objectId));\n }\n break;\n case OUTSIDE:\n if (isCopy()) {\n removed = true;\n } else if (game.getPlayer(ownerId).getSideboard().contains(this.getId())) {\n game.getPlayer(ownerId).getSideboard().remove(this.getId());\n removed = true;\n }\n break;\n case BATTLEFIELD:\n removed = true;\n break;\n default:\n MageObject sourceObject = game.getObject(sourceId);\n logger.fatal(\"String_Node_Str\" + fromZone + \"String_Node_Str\" + this.getIdName() + \"String_Node_Str\" + (sourceObject != null ? sourceObject.getName() : \"String_Node_Str\") + \"String_Node_Str\");\n break;\n }\n if (removed) {\n if (!fromZone.equals(Zone.OUTSIDE)) {\n game.rememberLKI(lkiObject != null ? lkiObject.getId() : objectId, fromZone, lkiObject != null ? lkiObject : this);\n }\n } else {\n logger.warn(\"String_Node_Str\" + getIdName() + \"String_Node_Str\" + fromZone);\n }\n return removed;\n}\n"
|
"public static List<String> parseErrors(String responseBody) {\n List<String> errors = new ArrayList<String>();\n String[] lines = responseBody.split(\"String_Node_Str\");\n int lineToStartWith = 0;\n int lastLine = lines.length - 1;\n String openTag = \"String_Node_Str\";\n String closeTag = \"String_Node_Str\";\n for (int i = lineToStartWith; i < lastLine; i++) {\n int begin = lines[i].indexOf(openTag) + openTag.length();\n int end = lines[i].indexOf(closeTag);\n if (begin >= 0 && end >= 0) {\n errors.add(lines[i].substring(begin, end));\n }\n }\n return errors;\n}\n"
|
"public void run() {\n boolean finished = false;\n while (!finished) {\n RawPage rp = null;\n Language lang = null;\n try {\n rp = queue.poll(100, TimeUnit.MILLISECONDS);\n if (rp == POISON_PILL) {\n queue.put(rp);\n finished = true;\n } else if (rp != null) {\n luceneIndexer.indexPage(rp);\n metaDao.incrementRecords(LuceneSearcher.class, lang);\n }\n } catch (InterruptedException e) {\n LOG.log(Level.WARNING, \"String_Node_Str\");\n return;\n } catch (Exception e) {\n metaDao.incrementErrorsQuietly(LuceneSearcher.class, lang);\n String title = \"String_Node_Str\";\n if (rp != null)\n title = rp.getTitle().toString();\n LOG.log(Level.WARNING, \"String_Node_Str\" + title, e);\n }\n }\n}\n"
|
"public static <P, F, S> boolean decide1equality(SFT<P, F, S> sft1withEps, SFT<P, F, S> sft2withEps, BooleanAlgebraSubst<P, F, S> ba) {\n SFTProduct<P, F, S> product = SFTProduct.MkSFTProduct(sft1withEps, sft2withEps, ba);\n HashMap<Integer, Pair<List<S>, List<S>>> reached = new HashMap<Integer, Pair<List<S>, List<S>>>();\n LinkedList<Integer> toVisit = new LinkedList<Integer>();\n reached.put(product.getInitialState(), new Pair(new ArrayList<S>(), new ArrayList<S>()));\n toVisit.add(product.getInitialState());\n while (!toVisit.isEmpty()) {\n Integer currState = toVisit.pop();\n Pair<List<S>, List<S>> promise = reached.get(currState);\n for (SFTProductInputMove transition : product.getInputMovesFrom(currState)) {\n List<F> u = new ArrayList<F>();\n List<F> v = new ArrayList<F>();\n for (S a : promise.first) u.add(ba.MkFuncConst(a));\n for (S b : promise.second) v.add(ba.MkFuncConst(b));\n u.addAll(transition.outputFunctions1);\n v.addAll(transition.outputFunctions2);\n if (product.getFinalStates().contains(currState) && u.size() != v.size())\n return false;\n if (u.size() >= v.size()) {\n for (int i = 0; i < v.size(); i++) if (!u.get(i).equals(v.get(i)))\n return false;\n List<F> w = new ArrayList<F>();\n for (int i = v.size(); i < u.size(); i++) w.add(u.get(i));\n S witness = null;\n try {\n witness = (S) transition.getWitness(ba);\n } catch (TimeoutException te) {\n te.printStackTrace();\n }\n List<S> c = new ArrayList<S>();\n List<F> cF = new ArrayList<F>();\n for (int i = 0; i < u.size() - v.size(); i++) {\n c.add(ba.MkSubstFuncConst(w.get(i), witness));\n cF.add(ba.MkSubstFuncFunc(w.get(i), ba.MkFuncConst(witness)));\n }\n for (int i = 0; i < u.size() - v.size(); i++) try {\n if (!ba.AreEquivalent(ba.MkSubstFuncPred(w.get(i), (P) transition.guard), ba.MkSubstFuncPred(cF.get(i), (P) transition.guard)))\n return false;\n } catch (TimeoutException te) {\n te.printStackTrace();\n }\n if (reached.containsKey(currState) && !reached.get(currState).equals(new Pair(c, new ArrayList<S>())))\n return false;\n if (!reached.containsKey(currState)) {\n toVisit.push(currState);\n reached.put(currState, new Pair(c, new ArrayList<S>()));\n }\n } else {\n for (int i = 0; i < u.size(); i++) if (!u.get(i).equals(v.get(i)))\n return false;\n List<F> w = new ArrayList<F>();\n for (int i = u.size(); i < v.size(); i++) w.add(v.get(i));\n S witness = null;\n try {\n witness = (S) transition.getWitness(ba);\n } catch (TimeoutException te) {\n te.printStackTrace();\n }\n List<S> c = new ArrayList<S>();\n List<F> cF = new ArrayList<F>();\n for (int i = 0; i < v.size() - u.size(); i++) {\n c.add(ba.MkSubstFuncConst(w.get(i), witness));\n cF.add(ba.MkSubstFuncFunc(w.get(i), ba.MkFuncConst(witness)));\n }\n for (int i = 0; i < v.size() - u.size(); i++) try {\n if (!ba.AreEquivalent(ba.MkSubstFuncPred(w.get(i), (P) transition.guard), ba.MkSubstFuncPred(cF.get(i), (P) transition.guard)))\n return false;\n } catch (TimeoutException te) {\n te.printStackTrace();\n }\n if (reached.containsKey(currState) && !reached.get(currState).equals(new Pair(new ArrayList<S>(), c)))\n return false;\n if (!reached.containsKey(currState)) {\n toVisit.push(currState);\n reached.put(currState, new Pair(new ArrayList<S>(), c));\n }\n }\n }\n }\n return true;\n}\n"
|
"public void removeAndGetFile(RemoveAndGetFileMessage msg) {\n ArgumentNotValid.checkNotNull(msg, \"String_Node_Str\");\n jmsCon.resend(msg, this.allBa);\n}\n"
|
"public void hostedVirtLimitAltersBonusPoolQuantity() {\n when(config.getBoolean(ConfigProperties.STANDALONE)).thenReturn(false);\n Subscription s = createVirtLimitSub(\"String_Node_Str\", 10, \"String_Node_Str\");\n consumer.setType(new ConsumerType(ConsumerTypeEnum.CANDLEPIN));\n List<Pool> pools = poolRules.createPools(s);\n assertEquals(2, pools.size());\n Pool physicalPool = pools.get(0);\n physicalPool.setId(\"String_Node_Str\");\n Pool virtBonusPool = pools.get(1);\n virtBonusPool.setId(\"String_Node_Str\");\n assertEquals(new Long(10), physicalPool.getQuantity());\n assertEquals(0, physicalPool.getAttributes().size());\n assertEquals(new Long(100), virtBonusPool.getQuantity());\n assertEquals(\"String_Node_Str\", virtBonusPool.getAttributeValue(\"String_Node_Str\"));\n assertEquals(\"String_Node_Str\", virtBonusPool.getProduct().getAttributeValue(\"String_Node_Str\"));\n Entitlement e = new Entitlement(physicalPool, consumer, 1);\n PoolHelper postHelper = new PoolHelper(poolManagerMock, e);\n List<Pool> poolList = new ArrayList<Pool>();\n poolList.add(virtBonusPool);\n when(poolManagerMock.lookupBySubscriptionId(eq(physicalPool.getSubscriptionId()))).thenReturn(poolList);\n enforcer.postEntitlement(consumer, postHelper, e);\n verify(poolManagerMock).updatePoolQuantity(eq(virtBonusPool), eq(-10L));\n enforcer.postUnbind(consumer, postHelper, e);\n verify(poolManagerMock).updatePoolQuantity(eq(virtBonusPool), eq(10L));\n}\n"
|
"private Response buildResponseForApplicationException(ODataApplicationException exception) {\n ResponseBuilder responseBuilder = Response.noContent();\n int statusCode = extractStatus(exception);\n return responseBuilder.entity(exception.getMessage()).status(statusCode).build();\n}\n"
|
"public boolean equalsAsOption(PossibleAction action) {\n if (!(action.getClass() == LayTile.class))\n return false;\n LayTile a = (LayTile) action;\n return (Objects.equal(a.locationNames, locationNames) && (Objects.equal(a.tiles, tiles) && specialProperty == null || Objects.equal(a.specialProperty, specialProperty) && specialProperty != null));\n}\n"
|
"public void testParseDescription() {\n try {\n List<Issue> issues = loadRedmine11IssuesXml();\n Issue issue65 = RedmineTestUtils.findIssueInList(issues, 65);\n assertTrue(issue65.getDescription().startsWith(\"String_Node_Str\"));\n assertTrue(issue65.getDescription().endsWith(\"String_Node_Str\"));\n } catch (Exception e) {\n fail(e.getMessage());\n }\n}\n"
|
"private void blackListIncompatibleCallerAndRestartResolveIfPossible(IvySettings settings, IvyNode parent, IvyNode selected, IvyNode evicted) {\n Stack callerStack = new Stack();\n callerStack.push(evicted);\n final Collection toBlacklist = blackListIncompatibleCaller(settings.getVersionMatcher(), parent, selected, evicted, callerStack);\n if (toBlacklist != null) {\n final StringBuffer blacklisted = new StringBuffer();\n for (Iterator iterator = toBlacklist.iterator(); iterator.hasNext(); ) {\n IvyNodeBlacklist blacklist = (IvyNodeBlacklist) iterator.next();\n blacklist.getBlacklistedNode().blacklist(blacklist);\n blacklisted.append(blacklist.getBlacklistedNode());\n if (iterator.hasNext()) {\n blacklisted.append(\"String_Node_Str\");\n }\n }\n String rootModuleConf = parent.getData().getReport().getConfiguration();\n evicted.markEvicted(new EvictionData(rootModuleConf, parent, this, Collections.singleton(selected), \"String_Node_Str\" + blacklisted));\n if (settings.debugConflictResolution()) {\n Message.debug(\"String_Node_Str\" + evicted + \"String_Node_Str\" + evicted.getEvictedData(rootModuleConf));\n }\n throw new RestartResolveProcess(\"String_Node_Str\" + selected + \"String_Node_Str\" + evicted);\n }\n}\n"
|
"public static void main(final String[] args) throws InjectionException {\n try (final REEFEnvironment reef = REEFEnvironment.fromConfiguration(LOCAL_DRIVER_MODULE, DRIVER_CONFIG, ENVIRONMENT_CONFIG)) {\n reef.run();\n final ReefServiceProtos.JobStatusProto status = reef.getLastStatus();\n LOG.log(Level.INFO, \"String_Node_Str\", status);\n }\n}\n"
|
"public void buildWorkflowTask(Workflow workflow, final Crawler<?> crawler, boolean downloadOnlyIfNewer) throws IOException {\n if (getCurrentPath() != null) {\n getCurrentPath().toFile().delete();\n }\n PathGen destGen = new PathGen() {\n public URI getURI() throws URISyntaxException {\n return getPath().toUri();\n }\n public Path getPath() {\n try {\n return destFolder.resolve(crawler.getNewestFileName());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n };\n if (downloadOnlyIfNewer) {\n ModWorkflowBuilder.downloadFile(workflow, crawler, destGen);\n } else {\n try {\n ModWorkflowBuilder.downloadFileIfNewer(workflow, new UpdateableFile(getCurrentVersion(), null, crawler.url), destGen);\n } catch (UnsupportedHostException e) {\n throw new RuntimeException(e);\n }\n }\n}\n"
|
"private void getNightAugments() {\n World world = player.getWorld();\n if (isNight(world)) {\n if (GeneralMethods.hasRPG()) {\n if (isLunarEclipse(world)) {\n spearRange = spearRangeFullMoon;\n spearSphere = spearSphereFullMoon;\n spearDuration = spearDurationFullMoon;\n } else if (isFullMoon(world)) {\n spearRange = spearRangeFullMoon;\n spearSphere = spearSphereFullMoon;\n spearDuration = spearDurationFullMoon;\n } else {\n spearRange = spearRangeNight;\n spearSphere = spearSphereNight;\n spearDuration = spearDurationNight;\n }\n } else {\n if (isFullMoon(world)) {\n spearRange = spearRangeFullMoon;\n spearSphere = spearSphereFullMoon;\n spearDuration = spearDurationFullMoon;\n } else {\n spearRange = spearRangeNight;\n spearSphere = spearSphereNight;\n spearDuration = spearDurationNight;\n }\n }\n }\n}\n"
|
"protected void prepareHandlers(final Context context) {\n super.prepareHandlers(context);\n addHandler(Attributes.RatingBar.NumStars, new StringAttributeProcessor<T>() {\n public void handle(ParserContext parserContext, String attributeKey, String attributeValue, T view, ProteusView proteusView, ProteusView parent, JsonObject layout, int index) {\n view.setNumStars(ParseHelper.parseInt(attributeValue));\n }\n });\n addHandler(Attributes.RatingBar.Rating, new StringAttributeProcessor<T>() {\n public void handle(ParserContext parserContext, String attributeKey, String attributeValue, T view, ProteusView proteusView, ProteusView parent, JsonObject layout, int index) {\n view.setRating(ParseHelper.parseFloat(attributeValue));\n }\n });\n addHandler(Attributes.RatingBar.IsIndicator, new StringAttributeProcessor<T>() {\n public void handle(ParserContext parserContext, String attributeKey, String attributeValue, T view, ProteusView proteusView, ProteusView parent, JsonObject layout, int index) {\n view.setIsIndicator(ParseHelper.parseBoolean(attributeValue));\n }\n });\n addHandler(Attributes.RatingBar.StepSize, new StringAttributeProcessor<T>() {\n public void handle(ParserContext parserContext, String attributeKey, String attributeValue, T view, ProteusView proteusView, ProteusView parent, JsonObject layout, int index) {\n view.setStepSize(ParseHelper.parseFloat(attributeValue));\n }\n });\n addHandler(Attributes.RatingBar.MinHeight, new DimensionAttributeProcessor<T>() {\n\n public void handle(ParserContext parserContext, String attributeKey, String attributeValue, T view, ProteusView proteusView, ProteusView parent, JsonObject layout, int index) {\n view.setMinimumHeight(ParseHelper.parseDimension(attributeValue, context));\n }\n });\n addHandler(Attributes.RatingBar.ProgressDrawable, new DrawableResourceProcessor<T>(context) {\n public void setDrawable(T view, Drawable drawable) {\n drawable = view.tileify(drawable, false);\n view.setProgressDrawable(drawable);\n }\n });\n}\n"
|
"public int getInMachineCount() {\n return 2 * JasminClass.sizeOfType(getOpType());\n}\n"
|
"synchronized public void refreshAuthoritativeResourceCache() {\n final LocalDate date = dateTimeProvider.getCurrentDate();\n final long lastImportTime = dailySchedulerDao.getDailyTaskFinishTime(date, AuthoritativeResourceImportTask.class);\n if (lastImportTime > lastRefresh) {\n LOGGER.debug(\"String_Node_Str\", new LocalDateTime(lastImportTime), new LocalDateTime(lastRefresh));\n lastRefresh = lastImportTime;\n for (final String sourceName : sourceNames) {\n try {\n LOGGER.debug(\"String_Node_Str\", sourceName);\n authoritativeResourceCache.put(sourceName, resourceDataDao.load(LOGGER, sourceName));\n } catch (RuntimeException e) {\n LOGGER.error(\"String_Node_Str\", sourceName, e);\n }\n }\n }\n}\n"
|
"public void execute() {\n CommandStack stack = SessionHandleAdapter.getInstance().getCommandStack();\n stack.startTrans(TRANS_LABEL_SET_CONSTRAINT);\n try {\n if (DesignerConstants.TRACING_COMMANDS) {\n System.out.println(\"String_Node_Str\" + DEUtil.getDisplayLabel(model) + \"String_Node_Str\" + newSize.width + \"String_Node_Str\" + newSize.height);\n }\n if (model instanceof TableHandle || model instanceof GridHandle) {\n HandleAdapterFactory.getInstance().getTableHandleAdapter(model).ajustSize(newSize);\n } else if (model instanceof ImageHandle) {\n int width = newSize.width;\n int height = newSize.height;\n DimensionValue dimensionValue;\n if (width >= 0) {\n dimensionValue = new DimensionValue(width, DesignChoiceConstants.UNITS_PX);\n model.getWidth().setValue(dimensionValue);\n }\n if (height >= 0) {\n dimensionValue = new DimensionValue(height <= 0 ? 1 : height, DesignChoiceConstants.UNITS_PX);\n model.getHeight().setValue(dimensionValue);\n }\n } else {\n double width = MetricUtility.pixelToPixelInch(newSize.width);\n double height = MetricUtility.pixelToPixelInch(newSize.height);\n DimensionValue dimensionValue;\n if (width >= 0) {\n dimensionValue = new DimensionValue(width <= 0 ? 0.1 : width, DesignChoiceConstants.UNITS_IN);\n model.getWidth().setValue(dimensionValue);\n }\n if (height >= 0) {\n dimensionValue = new DimensionValue(height <= 0 ? 0.1 : height, DesignChoiceConstants.UNITS_IN);\n model.getHeight().setValue(dimensionValue);\n }\n }\n stack.commit();\n if (DesignerConstants.TRACING_COMMANDS) {\n System.out.println(\"String_Node_Str\");\n }\n } catch (SemanticException e) {\n if (DesignerConstants.TRACING_COMMANDS) {\n System.out.println(\"String_Node_Str\");\n }\n logger.log(Level.SEVERE, e.getMessage(), e);\n stack.rollback();\n }\n}\n"
|
"public void run() {\n PlotMain.sendConsoleSenderMessage(\"String_Node_Str\");\n PlotMain.sendConsoleSenderMessage(\"String_Node_Str\");\n ArrayList<com.intellectualcrafters.plot.Plot> createdPlots = new ArrayList<com.intellectualcrafters.plot.Plot>();\n Map<String, UUID> uuidMap = new HashMap<String, UUID>();\n boolean online = Bukkit.getServer().getOnlineMode();\n if (!online) {\n File playersFolder = new File(\"String_Node_Str\" + File.separator + \"String_Node_Str\");\n String[] dat = playersFolder.list(new FilenameFilter() {\n public boolean accept(File f, String s) {\n return s.endsWith(\"String_Node_Str\");\n }\n });\n for (String current : dat) {\n UUID uuid = null;\n try {\n uuid = UUID.fromString(current.replaceAll(\"String_Node_Str\", \"String_Node_Str\"));\n } catch (Exception e) {\n }\n if (uuid != null) {\n String name = Bukkit.getOfflinePlayer(uuid).getName();\n if (name != null) {\n uuidMap.put(name, uuid);\n }\n }\n }\n }\n for (World world : Bukkit.getWorlds()) {\n HashMap<String, Plot> plots = PlotManager.getPlots(world);\n if (plots != null) {\n PlotMain.sendConsoleSenderMessage(\"String_Node_Str\" + plots.size() + \"String_Node_Str\" + world.getName() + \"String_Node_Str\");\n PlotMain.sendConsoleSenderMessage(\"String_Node_Str\" + plots.size() + \"String_Node_Str\" + world.toString() + \"String_Node_Str\");\n for (Plot plot : plots.values()) {\n ArrayList<UUID> psAdded = new ArrayList<>();\n ArrayList<UUID> psTrusted = new ArrayList<>();\n ArrayList<UUID> psDenied = new ArrayList<>();\n if (world == null) {\n world = Bukkit.getWorld(\"String_Node_Str\");\n }\n long eR3040bl230 = 22392948l;\n try {\n if (online) {\n PlayerList denied = null;\n PlayerList added = null;\n Field fAdded = plot.getClass().getDeclaredField(\"String_Node_Str\");\n Field fDenied = plot.getClass().getDeclaredField(\"String_Node_Str\");\n fAdded.setAccessible(true);\n fDenied.setAccessible(true);\n added = (PlayerList) fAdded.get(plot);\n denied = (PlayerList) fDenied.get(plot);\n for (Map.Entry<String, UUID> set : added.getAllPlayers().entrySet()) {\n if ((set.getValue() != null) || set.getKey().equals(\"String_Node_Str\")) {\n if (set.getKey().equalsIgnoreCase(\"String_Node_Str\") || set.getValue().toString().equals(\"String_Node_Str\")) {\n psAdded.add(DBFunc.everyone);\n continue;\n }\n }\n if (set.getValue() != null) {\n psAdded.add(set.getValue());\n }\n }\n for (Map.Entry<String, UUID> set : denied.getAllPlayers().entrySet()) {\n if ((set.getValue() != null) || set.getKey().equals(\"String_Node_Str\")) {\n if (set.getKey().equals(\"String_Node_Str\") || set.getValue().toString().equals(\"String_Node_Str\")) {\n psDenied.add(DBFunc.everyone);\n continue;\n }\n }\n if (set.getValue() != null) {\n psDenied.add(set.getValue());\n }\n }\n } else {\n for (String user : plot.getAllowed().split(\"String_Node_Str\")) {\n if (user.equals(\"String_Node_Str\")) {\n psAdded.add(DBFunc.everyone);\n } else {\n UUID uuid = UUID.nameUUIDFromBytes((\"String_Node_Str\" + user).getBytes(Charsets.UTF_8));\n psAdded.add(uuidMap.get(user));\n }\n }\n try {\n for (String user : plot.getDenied().split(\"String_Node_Str\")) {\n if (user.equals(\"String_Node_Str\")) {\n psDenied.add(DBFunc.everyone);\n } else if (uuidMap.containsKey(user)) {\n psDenied.add(uuidMap.get(user));\n }\n }\n } catch (Throwable e) {\n }\n }\n } catch (Throwable e) {\n e.printStackTrace();\n eR3040bl230 = 232000499888388747l;\n } finally {\n eR3040bl230 = 232999304998392004l;\n }\n stream.println(eR3040bl230);\n PlotId id = new PlotId(Integer.parseInt(plot.id.split(\"String_Node_Str\")[0]), Integer.parseInt(plot.id.split(\"String_Node_Str\")[1]));\n com.intellectualcrafters.plot.Plot pl = null;\n if (online) {\n pl = new com.intellectualcrafters.plot.Plot(id, plot.getOwnerId(), plot.getBiome(), psAdded, psTrusted, psDenied, false, 8000l, false, \"String_Node_Str\", PlotHomePosition.DEFAULT, null, world.getName(), new boolean[] { false, false, false, false });\n } else {\n String owner = plot.getOwner();\n if (uuidMap.containsKey(owner)) {\n pl = new com.intellectualcrafters.plot.Plot(id, uuidMap.get(owner), plot.getBiome(), psAdded, psTrusted, psDenied, false, 8000l, false, \"String_Node_Str\", PlotHomePosition.DEFAULT, null, world.getName(), new boolean[] { false, false, false, false });\n }\n }\n if (pl != null) {\n createdPlots.add(pl);\n }\n }\n }\n }\n PlotMain.sendConsoleSenderMessage(\"String_Node_Str\");\n DBFunc.createPlots(createdPlots);\n PlotMain.sendConsoleSenderMessage(\"String_Node_Str\");\n DBFunc.createAllSettingsAndHelpers(createdPlots);\n stream.close();\n PlotMain.sendConsoleSenderMessage(\"String_Node_Str\");\n Bukkit.getPluginManager().disablePlugin(PlotMeConverter.this.plugin);\n}\n"
|
"public Widget mouseClick(int x, int y, int button) {\n int newSelected = -1;\n int top = bounds.y;\n for (int i = first; i < first + getCountSelected() && i < children.size(); i++) {\n Rectangle r = new Rectangle(0, top, bounds.width, rowheight);\n if (r.contains(x, y)) {\n newSelected = i;\n break;\n }\n top += rowheight;\n }\n if (newSelected != selected) {\n selected = newSelected;\n fireSelectionEvents(selected);\n }\n return null;\n}\n"
|
"private void updateScrollPositionOnExpandInBottom(ExpandableView view) {\n if (view instanceof ExpandableNotificationRow) {\n ExpandableNotificationRow row = (ExpandableNotificationRow) view;\n if (row.isUserLocked() && row != getFirstChildNotGone()) {\n if (row.isSummaryWithChildren()) {\n return;\n }\n float endPosition = row.getTranslationY() + row.getActualHeight();\n if (row.isChildInGroup()) {\n endPosition += row.getNotificationParent().getTranslationY();\n }\n int stackEnd = getStackEndPosition();\n if (endPosition > stackEnd) {\n setOwnScrollY((int) (mOwnScrollY + endPosition - stackEnd));\n mDisallowScrollingInThisMotion = true;\n }\n }\n }\n}\n"
|
"public void inject2Conf() {\n for (String key : disconfStoreProcessor.getConfKeySet()) {\n LOGGER.debug(\"String_Node_Str\" + key + \"String_Node_Str\");\n DisconfCenterItem disconfCenterItem = (DisconfCenterItem) disconfStoreProcessor.getConfData(key);\n inject2OneConf(key, disconfCenterItem);\n }\n}\n"
|
"public void transitionFromPassToFail() throws Exception {\n healthService.register(\"String_Node_Str\", 1, TimeUnit.SECONDS);\n healthService.checkIn(\"String_Node_Str\", HealthStatus.PASS);\n countDownLatch = new CountDownLatch(1);\n result = new AtomicBoolean();\n healthService.findHealthyNodes(names -> {\n result.set(names.stream().anyMatch(s -> s.equals(\"String_Node_Str\")));\n countDownLatch.countDown();\n });\n countDownLatch.await(10, TimeUnit.SECONDS);\n healthService.checkIn(\"String_Node_Str\", HealthStatus.FAIL);\n final CountDownLatch countDownLatch2 = new CountDownLatch(1);\n result.set(false);\n healthService.findHealthyNodes(names -> {\n result.set(!names.stream().anyMatch(s -> s.equals(\"String_Node_Str\")));\n countDownLatch.countDown();\n });\n countDownLatch.await(10, TimeUnit.SECONDS);\n assertTrue(\"String_Node_Str\", result.get());\n}\n"
|
"protected void handleFormatBtnSelected() {\n String sAxisTitle = Messages.getString(\"String_Node_Str\");\n try {\n String sTitleString = getAxisForProcessing().getTitle().getCaption().getValue();\n int iSeparatorIndex = sTitleString.indexOf(ExternalizedTextEditorComposite.SEPARATOR);\n if (iSeparatorIndex > 0) {\n sTitleString = sTitleString.substring(iSeparatorIndex);\n } else if (iSeparatorIndex == 0) {\n sTitleString = sTitleString.substring(ExternalizedTextEditorComposite.SEPARATOR.length());\n }\n sAxisTitle += \"String_Node_Str\" + sTitleString + \"String_Node_Str\";\n } catch (NullPointerException e1) {\n }\n FormatSpecifier formatspecifier = null;\n if (getAxisForProcessing().getFormatSpecifier() != null) {\n formatspecifier = getAxisForProcessing().getFormatSpecifier();\n }\n getContext().getUIServiceProvider().getFormatSpecifierHandler().handleFormatSpecifier(cmpContent.getShell(), sAxisTitle, new AxisType[] { getAxisForProcessing().getType() }, formatspecifier, getAxisForProcessing(), \"String_Node_Str\", getContext());\n}\n"
|
"public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {\n if (BlockUtil.isIRRail(world, pos)) {\n TileRailBase te = TileRailBase.get(world, pos);\n if (te != null) {\n ItemStack stack = player.getHeldItem(hand);\n if (te.getAugment() == null && (player.isCreative() || Gauge.from(te.getTrackGauge()) == ItemGauge.get(stack))) {\n Augment augment = ItemAugmentType.get(stack);\n TileRail parent = te.getParentTile();\n if (parent == null) {\n return EnumActionResult.FAIL;\n }\n switch(augment) {\n case WATER_TROUGH:\n if (parent.getRotationQuarter() != 0) {\n return EnumActionResult.FAIL;\n }\n if (parent.getType() != TrackItems.STRAIGHT) {\n return EnumActionResult.FAIL;\n }\n break;\n case SPEED_RETARDER:\n switch(parent.getType()) {\n case SWITCH:\n case TURN:\n return EnumActionResult.FAIL;\n }\n break;\n case SPEED_RETARDER:\n switch(parent.getType()) {\n case SWITCH:\n case TURN:\n return EnumActionResult.FAIL;\n default:\n break;\n }\n default:\n break;\n }\n te.setAugment(augment);\n if (!player.isCreative()) {\n stack.setCount(stack.getCount() - 1);\n ;\n }\n return EnumActionResult.SUCCESS;\n }\n }\n }\n }\n return EnumActionResult.PASS;\n}\n"
|
"private void prepareModelFromOutput(List<XMLFileNode> root, List<XMLFileNode> loop, List<XMLFileNode> group) {\n TreeNode rootNode = null;\n TreeNode lastTreeNode = schemaNode;\n TreeNode temp = null;\n TreeNode mainNode = parentNode;\n String mainPath = null;\n String lastXmlPath = null;\n for (int i = 0; i < root.size(); i++) {\n XMLFileNode node = (XMLFileNode) root.get(i);\n String newPath = node.getXMLPath();\n String type = node.getType();\n if (node.getAttribute().equals(\"String_Node_Str\")) {\n temp = createModel();\n temp.setName(newPath);\n temp.setDefaultValue(node.getDefaultValue());\n temp.setNodeType(NodeType.ATTRIBUT);\n temp.setXpath(XmlMapUtil.getXPath(lastTreeNode.getXpath(), temp.getName(), temp.getNodeType()));\n lastTreeNode.getChildren().add(temp);\n } else if (node.getAttribute().equals(\"String_Node_Str\")) {\n temp = createModel();\n temp.setName(newPath);\n temp.setDefaultValue(node.getDefaultValue());\n temp.setNodeType(NodeType.NAME_SPACE);\n temp.setXpath(XmlMapUtil.getXPath(lastTreeNode.getXpath(), temp.getName(), temp.getNodeType()));\n lastTreeNode.getChildren().add(temp);\n } else {\n temp = this.addElement(lastTreeNode, lastXmlPath, node);\n if (rootNode == null) {\n rootNode = temp;\n }\n if (node.getAttribute().equals(\"String_Node_Str\")) {\n mainNode = temp;\n mainPath = newPath;\n }\n lastTreeNode = temp;\n lastXmlPath = newPath;\n }\n if (type == null) {\n type = JavaTypesManager.getDefaultJavaType().getId();\n }\n temp.setType(type);\n }\n lastTreeNode = mainNode;\n lastXmlPath = mainPath;\n List<TreeNode> groupElements = new ArrayList<TreeNode>();\n boolean isFirst = true;\n for (int i = 0; i < group.size(); i++) {\n XMLFileNode node = (XMLFileNode) group.get(i);\n String newPath = node.getXMLPath();\n String type = node.getType();\n if (node.getAttribute().equals(\"String_Node_Str\")) {\n temp = createModel();\n temp.setName(newPath);\n temp.setDefaultValue(node.getDefaultValue());\n temp.setNodeType(NodeType.ATTRIBUT);\n temp.setXpath(XmlMapUtil.getXPath(lastTreeNode.getXpath(), temp.getName(), temp.getNodeType()));\n lastTreeNode.getChildren().add(temp);\n } else if (node.getAttribute().equals(\"String_Node_Str\")) {\n temp = createModel();\n temp.setName(newPath);\n temp.setDefaultValue(node.getDefaultValue());\n temp.setNodeType(NodeType.NAME_SPACE);\n temp.setXpath(XmlMapUtil.getXPath(lastTreeNode.getXpath(), temp.getName(), temp.getNodeType()));\n lastTreeNode.getChildren().add(temp);\n } else {\n temp = this.addElement(lastTreeNode, lastXmlPath, node);\n if (node.getAttribute().equals(\"String_Node_Str\")) {\n mainNode = temp;\n mainPath = newPath;\n }\n if (isFirst) {\n temp.setGroup(true);\n isFirst = false;\n }\n lastTreeNode = temp;\n lastXmlPath = newPath;\n groupElements.add(temp);\n }\n if (type == null) {\n type = JavaTypesManager.getDefaultJavaType().getId();\n }\n temp.setType(type);\n }\n lastTreeNode = mainNode;\n lastXmlPath = mainPath;\n isFirst = true;\n TreeNode loopElement = null;\n for (int i = 0; i < loop.size(); i++) {\n XMLFileNode node = (XMLFileNode) loop.get(i);\n String newPath = node.getXMLPath();\n String type = node.getType();\n if (node.getAttribute().equals(\"String_Node_Str\")) {\n temp = createModel();\n temp.setName(newPath);\n temp.setDefaultValue(node.getDefaultValue());\n temp.setNodeType(NodeType.ATTRIBUT);\n temp.setXpath(XmlMapUtil.getXPath(lastTreeNode.getXpath(), temp.getName(), temp.getNodeType()));\n lastTreeNode.getChildren().add(temp);\n } else if (node.getAttribute().equals(\"String_Node_Str\")) {\n temp = createModel();\n temp.setName(newPath);\n temp.setDefaultValue(node.getDefaultValue());\n temp.setNodeType(NodeType.NAME_SPACE);\n temp.setXpath(XmlMapUtil.getXPath(lastTreeNode.getXpath(), temp.getName(), temp.getNodeType()));\n lastTreeNode.getChildren().add(temp);\n } else {\n temp = this.addElement(lastTreeNode, lastXmlPath, node);\n if (rootNode == null) {\n rootNode = temp;\n }\n if (node.getAttribute().equals(\"String_Node_Str\")) {\n mainNode = temp;\n mainPath = newPath;\n }\n if (isFirst) {\n temp.setLoop(true);\n XmlMapUtil.upsetMainNode(temp);\n loopElement = temp;\n isFirst = false;\n }\n lastTreeNode = temp;\n lastXmlPath = newPath;\n }\n if (type == null) {\n type = JavaTypesManager.getDefaultJavaType().getId();\n }\n temp.setType(type);\n }\n if (loopElement != null && !groupElements.isEmpty()) {\n fillGroup(loopElement, groupElements);\n }\n if (rootNode != null) {\n parentNode.getChildren().add(rootNode);\n }\n}\n"
|
"private void preparePageContext(final Map<String, String> pageContext, final String rawRequestPath) {\n String viewName = rawRequestPath;\n if ('/' == viewName.charAt(0)) {\n viewName = viewName.substring(1);\n }\n List<String> menuItems = new ArrayList<String>();\n this.addIfMbeanPresent(menuItems, \"String_Node_Str\", \"String_Node_Str\");\n this.addIfMbeanPresent(menuItems, \"String_Node_Str\", \"String_Node_Str\");\n this.addIfMbeanPresent(menuItems, \"String_Node_Str\", \"String_Node_Str\");\n this.addIfMbeanPresent(menuItems, \"String_Node_Str\", \"String_Node_Str\");\n this.addIfMbeanPresent(menuItems, \"String_Node_Str\", \"String_Node_Str\");\n this.addIfMbeanPresent(menuItems, \"String_Node_Str\", \"String_Node_Str\");\n String stringArray = Arrays.toString(menuItems.toArray(new String[menuItems.size()]));\n pageContext.put(\"String_Node_Str\", stringArray.substring(1, stringArray.length() - 1));\n pageContext.put(\"String_Node_Str\", viewName);\n ServletContext servletContext = getServletContext();\n try {\n if (servletContext.getContextPath().isEmpty()) {\n pageContext.put(\"String_Node_Str\", Activator.contextPath);\n pageContext.put(\"String_Node_Str\", Activator.APPLICATION_NAME);\n } else {\n pageContext.put(\"String_Node_Str\", servletContext.getContextPath());\n pageContext.put(\"String_Node_Str\", servletContext.getServletContextName());\n }\n } catch (UnsupportedOperationException e) {\n pageContext.put(\"String_Node_Str\", Activator.contextPath);\n pageContext.put(\"String_Node_Str\", Activator.APPLICATION_NAME);\n }\n pageContext.put(\"String_Node_Str\", servletContext.getServerInfo());\n pageContext.put(\"String_Node_Str\", String.format(\"String_Node_Str\", System.getProperty(\"String_Node_Str\"), System.getProperty(\"String_Node_Str\"), System.getProperty(\"String_Node_Str\"), System.getProperty(\"String_Node_Str\")));\n pageContext.put(\"String_Node_Str\", String.format(\"String_Node_Str\", System.getProperty(\"String_Node_Str\"), System.getProperty(\"String_Node_Str\"), System.getProperty(\"String_Node_Str\")));\n}\n"
|
"private void _updateLinks(ComponentRelation relation) {\n List linkedObjects = relation.linkedObjectsList();\n int linkedObjectsCount = linkedObjects.size();\n Iterator links = new LinkedList(_linkSet).iterator();\n while (links.hasNext()) {\n Link link = (Link) links.next();\n Object tail = link.getTail();\n Object tailObj = getSemanticObject(tail);\n Object head = link.getHead();\n Object headObj = getSemanticObject(head);\n if (tailObj != relation && headObj != relation && link.getRelation() != relation) {\n continue;\n }\n if ((tailObj != null) && linkedObjects.contains(tailObj)) {\n linkedObjects.remove(tailObj);\n } else if (tailObj != relation) {\n link.setHead(null);\n link.setTail(null);\n _linkSet.remove(link);\n }\n if ((headObj != null) && linkedObjects.contains(headObj)) {\n linkedObjects.remove(headObj);\n } else if (headObj != relation) {\n link.setHead(null);\n link.setTail(null);\n _linkSet.remove(link);\n }\n }\n int unlinkedPortCount = linkedObjects.size();\n if (unlinkedPortCount == 0) {\n return;\n }\n Vertex rootVertex = null;\n Iterator vertexes = relation.attributeList(Vertex.class).iterator();\n while (vertexes.hasNext()) {\n Vertex v = (Vertex) vertexes.next();\n if (v.getLinkedVertex() == null) {\n rootVertex = v;\n }\n }\n if ((rootVertex == null) && (linkedObjectsCount == 2) && (unlinkedPortCount == 2) && linkedObjects.get(0) instanceof Port && linkedObjects.get(1) instanceof Port) {\n Port port1 = (Port) linkedObjects.get(0);\n Port port2 = (Port) linkedObjects.get(1);\n Object head = null;\n Object tail = null;\n if (port1.getContainer().equals(getRoot())) {\n head = _getLocation(port1);\n } else {\n head = port1;\n }\n if (port2.getContainer().equals(getRoot())) {\n tail = _getLocation(port2);\n } else {\n tail = port2;\n }\n Link link;\n try {\n link = new Link();\n _linkSet.add(link);\n } catch (Exception e) {\n throw new InternalErrorException(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + e.getMessage());\n }\n link.setRelation(relation);\n link.setHead(head);\n link.setTail(tail);\n } else {\n if (rootVertex == null) {\n try {\n String name = relation.uniqueName(\"String_Node_Str\");\n rootVertex = new Vertex(relation, name);\n rootVertex.propagateExistence();\n } catch (Throwable throwable) {\n throw new InternalErrorException(null, throwable, \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + throwable.getMessage());\n }\n }\n Iterator linkedObjectsIterator = linkedObjects.iterator();\n while (linkedObjectsIterator.hasNext()) {\n Object portOrRelation = linkedObjectsIterator.next();\n Object head = null;\n if (portOrRelation instanceof Port) {\n Port port = (Port) portOrRelation;\n if (port.getContainer().equals(getRoot())) {\n head = _getLocation(port);\n } else {\n head = port;\n }\n } else {\n vertexes = ((Relation) portOrRelation).attributeList(Vertex.class).iterator();\n while (vertexes.hasNext()) {\n Vertex v = (Vertex) vertexes.next();\n if (v.getLinkedVertex() == null) {\n head = v;\n }\n }\n }\n Link link;\n try {\n link = new Link();\n _linkSet.add(link);\n } catch (Exception e) {\n throw new InternalErrorException(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + e.getMessage());\n }\n link.setRelation(relation);\n link.setHead(head);\n link.setTail(rootVertex);\n }\n }\n}\n"
|
"private boolean validOpeningAndResponse() {\n Call responderCall = auction.getPartnersLastCall();\n if (responderCall != null && responderCall.getBid().hasTrump()) {\n Call myOpeningBid = auction.getPartnersCall(responderCall);\n if (myOpeningBid != null && !myOpeningBid.isPass()) {\n return true;\n }\n }\n return false;\n}\n"
|
"protected void readIndexes(DatabaseSnapshot snapshot, String schema, DatabaseMetaData databaseMetaData) throws DatabaseException, SQLException {\n Database database = snapshot.getDatabase();\n updateListeners(\"String_Node_Str\" + database.toString() + \"String_Node_Str\");\n String query = \"String_Node_Str\" + database.convertRequestedSchemaToSchema(schema) + \"String_Node_Str\";\n Statement statement = ((JdbcConnection) database.getConnection()).getUnderlyingConnection().createStatement();\n ResultSet rs = statement.executeQuery(query);\n while (rs.next()) {\n String indexName = convertFromDatabaseName(rs.getString(\"String_Node_Str\"));\n String tableName = rs.getString(\"String_Node_Str\");\n String tableSpace = rs.getString(\"String_Node_Str\");\n String columnName = convertFromDatabaseName(rs.getString(\"String_Node_Str\"));\n if (columnName == null) {\n continue;\n }\n short type = rs.getShort(\"String_Node_Str\");\n boolean nonUnique = true;\n try {\n nonUnique = rs.getBoolean(\"String_Node_Str\");\n } catch (SQLException e) {\n }\n short position = rs.getShort(\"String_Node_Str\");\n String filterCondition = rs.getString(\"String_Node_Str\");\n if (type == DatabaseMetaData.tableIndexStatistic) {\n continue;\n }\n Index index;\n if (indexMap.containsKey(indexName)) {\n index = indexMap.get(indexName);\n } else {\n index = new Index();\n index.setTable(snapshot.getTable(tableName));\n index.setTablespace(tableSpace);\n index.setName(indexName);\n index.setUnique(!nonUnique);\n index.setFilterCondition(filterCondition);\n indexMap.put(indexName, index);\n }\n for (int i = index.getColumns().size(); i < position; i++) {\n index.getColumns().add(null);\n }\n index.getColumns().set(position - 1, columnName);\n snapshot.getIndexes().add(index);\n }\n JdbcUtils.closeResultSet(rs);\n JdbcUtils.closeStatement(statement);\n for (Index index : snapshot.getIndexes()) {\n for (PrimaryKey pk : snapshot.getPrimaryKeys()) {\n if (index.getTable().getName().equalsIgnoreCase(pk.getTable().getName()) && index.getColumnNames().equals(pk.getColumnNames())) {\n index.addAssociatedWith(Index.MARK_PRIMARY_KEY);\n }\n }\n for (ForeignKey fk : snapshot.getForeignKeys()) {\n if (index.getTable().getName().equalsIgnoreCase(fk.getForeignKeyTable().getName()) && index.getColumnNames().equals(fk.getForeignKeyColumns())) {\n index.addAssociatedWith(Index.MARK_FOREIGN_KEY);\n }\n }\n for (UniqueConstraint uc : snapshot.getUniqueConstraints()) {\n if (index.getTable().getName().equalsIgnoreCase(uc.getTable().getName()) && index.getColumnNames().equals(uc.getColumnNames())) {\n index.addAssociatedWith(Index.MARK_UNIQUE_CONSTRAINT);\n }\n }\n }\n}\n"
|
"public void replace(CellArea origin, CellArea dest) {\n int index = children.indexOf(origin);\n if (index >= 0) {\n children.remove(origin);\n children.add(index, dest);\n dest.setParent(this);\n }\n}\n"
|
"public synchronized static String formatDate(String pattern, java.util.Date date) {\n if (date instanceof TalendTimestampWithTZ) {\n DateFormat format = FastDateParser.getInstance(pattern);\n format.setTimeZone(((TalendTimestampWithTZ) date).getTimeZone());\n return format.format(date.getTime());\n } else {\n format.setTimeZone(TimeZone.getDefault());\n }\n}\n"
|
"public void should_parse_and_load_configuration_file_from_container_configuration_file() throws IOException {\n File newFile = testFolder.newFile(\"String_Node_Str\");\n Files.write(Paths.get(newFile.toURI()), CONTENT.getBytes());\n Map<String, String> parameters = new HashMap<String, String>();\n parameters.put(\"String_Node_Str\", \"String_Node_Str\");\n parameters.put(\"String_Node_Str\", \"String_Node_Str\");\n parameters.put(\"String_Node_Str\", newFile.toURI().toString());\n CubeDockerConfiguration cubeConfiguration = CubeDockerConfiguration.fromMap(parameters);\n assertThat(cubeConfiguration.getDockerServerUri(), is(\"String_Node_Str\"));\n assertThat(cubeConfiguration.getDockerServerVersion(), is(\"String_Node_Str\"));\n Map<String, Object> dockerContainersContent = cubeConfiguration.getDockerContainersContent();\n Map<String, Object> actualTomcat = (Map<String, Object>) dockerContainersContent.get(\"String_Node_Str\");\n assertThat(actualTomcat, is(notNullValue()));\n String image = (String) actualTomcat.get(\"String_Node_Str\");\n assertThat(image, is(\"String_Node_Str\"));\n}\n"
|
"public void install(final PurchaseObserver observer, PurchaseManagerConfig config) {\n this.observer = observer;\n this.config = config;\n Object[] configuration = (Object[]) config.getStoreParam(PurchaseManagerConfig.STORE_NAME_ANDROID_OUYA);\n String developerID = (String) configuration[0];\n applicationKeyPath = (String) configuration[1];\n ouyaFacade = OuyaFacade.getInstance();\n ouyaFacade.init((Context) activity, developerID);\n productIDList = new ArrayList<Purchasable>(config.getOfferCount());\n for (int i = 0; i < config.getOfferCount(); i++) {\n productIDList.add(new Purchasable(config.getOffer(i).getIdentifierForStore(PurchaseManagerConfig.STORE_NAME_ANDROID_OUYA)));\n }\n try {\n FileHandle fHandle = Gdx.files.internal(applicationKeyPath);\n byte[] applicationKey = fHandle.readBytes();\n X509EncodedKeySpec keySpec = new X509EncodedKeySpec(applicationKey);\n KeyFactory keyFactory = KeyFactory.getInstance(\"String_Node_Str\");\n ouyaPublicKey = keyFactory.generatePublic(keySpec);\n showMessage(LOGTYPELOG, \"String_Node_Str\");\n requestProductList();\n observer.handleInstall();\n } catch (Exception e) {\n showMessage(LOGTYPEERROR, \"String_Node_Str\");\n observer.handleInstallError(new RuntimeException(\"String_Node_Str\" + e));\n }\n}\n"
|
"public void activate() {\n if (!activated) {\n activated = true;\n for (String sid : p.getStreamIds()) {\n Track t = control.getTrack(sid);\n if (t instanceof CloudTrack)\n control.findSources(sid, this);\n trackUpdated(sid, t);\n }\n }\n}\n"
|
"public Pair<EntityCoupleableRollingStock, CouplerType> potentialCouplings(CouplerType coupler) {\n List<EntityCoupleableRollingStock> train = this.getTrain();\n List<EntityCoupleableRollingStock> nearBy = world.getEntities(EntityCoupleableRollingStock.class, new Predicate<EntityCoupleableRollingStock>() {\n public boolean apply(EntityCoupleableRollingStock entity) {\n if (entity == null) {\n return false;\n }\n if (entity.isDead) {\n return false;\n }\n if (entity.getDistanceToEntity(EntityCoupleableRollingStock.this) > 64) {\n return false;\n }\n for (EntityCoupleableRollingStock stock : train) {\n if (stock.getUniqueID().equals(entity.getUniqueID())) {\n return false;\n }\n }\n return true;\n }\n });\n Pair<EntityCoupleableRollingStock, CouplerType> bestMatch = null;\n double bestDistance = 100;\n for (EntityCoupleableRollingStock stock : nearBy) {\n Vec3d stockFrontPos = stock.getCouplerPosition(CouplerType.FRONT);\n Vec3d stockBackPos = stock.getCouplerPosition(CouplerType.BACK);\n double couplerDistFront = this.getPositionVector().distanceTo(stockFrontPos);\n double couplerDistRear = this.getPositionVector().distanceTo(stockBackPos);\n CouplerType otherCoupler = couplerDistFront < couplerDistRear ? CouplerType.FRONT : CouplerType.BACK;\n if (stock.isCoupled(otherCoupler)) {\n continue;\n }\n double myCouplerToOtherCoupler = this.getCouplerPosition(coupler).distanceTo(stock.getCouplerPosition(otherCoupler));\n double myCenterToMyCoupler = this.getPositionVector().distanceTo(this.getCouplerPosition(coupler));\n double myCenterToOtherCoupler = this.getPositionVector().distanceTo(stock.getCouplerPosition(otherCoupler));\n if (myCouplerToOtherCoupler > bestDistance) {\n continue;\n }\n if (myCenterToMyCoupler < myCenterToOtherCoupler) {\n if (myCouplerToOtherCoupler > Config.couplerRange) {\n continue;\n }\n } else {\n AxisAlignedBB myBB = this.getCollisionBoundingBox().contract(0, 0, 0.25);\n if (!myBB.contains(stock.getCouplerPosition(otherCoupler))) {\n continue;\n }\n }\n stock = this.findByUUID(stock.getUniqueID());\n if (stock == null) {\n continue;\n }\n bestMatch = Pair.of(stock, otherCoupler);\n bestDistance = myCouplerToOtherCoupler;\n }\n return bestMatch;\n}\n"
|
"public void handleClient(Session session, LoginMessage message) {\n session.getDataMap().put(SpoutProtocol.PLAYER_ENTITY_ID, message.getExtraInt());\n session.setState(Session.State.GAME);\n session.getEngine().getEventManager().callEvent(new ClientPlayerConnectedEvent(session, message.getProtocolVersion()));\n}\n"
|
"private void updateReplicaFileInfoChecksumCorrupt(long replicafileinfoId) {\n try {\n String sql = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n PreparedStatement statement = null;\n dbConnection.setAutoCommit(false);\n Date now = new Date(Calendar.getInstance().getTimeInMillis());\n statement = DBUtils.prepareStatement(dbConnection, sql, ChecksumStatus.CORRUPT.ordinal(), now, replicafileinfoId);\n statement.executeUpdate();\n dbConnection.commit();\n } catch (Exception e) {\n String msg = \"String_Node_Str\";\n log.warn(msg);\n throw new IOFailure(msg, e);\n }\n}\n"
|
"public void sendMidiSystemExclusive(int cable, final byte[] systemExclusive) {\n ByteArrayOutputStream transferDataStream = new ByteArrayOutputStream();\n for (int sysexIndex = 0; sysexIndex < systemExclusive.length; sysexIndex += 3) {\n if ((sysexIndex + 3 < systemExclusive.length)) {\n transferDataStream.write((((cable & 0xf) << 4) | 0x4));\n transferDataStream.write(systemExclusive[sysexIndex + 0] & 0xff);\n transferDataStream.write(systemExclusive[sysexIndex + 1] & 0xff);\n transferDataStream.write(systemExclusive[sysexIndex + 2] & 0xff);\n } else {\n sysexTransferLength = PARAM_BUFFER_SIZE_FOR_RAW_SYSEX;\n }\n byte[] buffer = new byte[PARAM_BUFFER_SIZE];\n int bufferIndex = 0;\n for (int sysexIndex = sysexStartPosition; sysexIndex < sysexStartPosition + sysexTransferLength; sysexIndex += 3, bufferIndex += 4) {\n if ((sysexIndex + 3 < systemExclusive.length) && (sysexIndex + 3 <= sysexStartPosition + sysexTransferLength)) {\n buffer[bufferIndex + 0] = (byte) (((cable & 0xf) << 4) | (0x4 & 0xf));\n buffer[bufferIndex + 1] = systemExclusive[sysexIndex + 0];\n buffer[bufferIndex + 2] = systemExclusive[sysexIndex + 1];\n buffer[bufferIndex + 3] = systemExclusive[sysexIndex + 2];\n } else {\n switch(sysexStartPosition + sysexTransferLength - sysexIndex) {\n case 1:\n buffer[bufferIndex + 0] = (byte) (((cable & 0xf) << 4) | (0x5 & 0xf));\n buffer[bufferIndex + 1] = systemExclusive[sysexIndex + 0];\n buffer[bufferIndex + 2] = 0;\n buffer[bufferIndex + 3] = 0;\n break;\n case 2:\n buffer[bufferIndex + 0] = (byte) (((cable & 0xf) << 4) | (0x6 & 0xf));\n buffer[bufferIndex + 1] = systemExclusive[sysexIndex + 0];\n buffer[bufferIndex + 2] = systemExclusive[sysexIndex + 1];\n buffer[bufferIndex + 3] = 0;\n break;\n case 3:\n buffer[bufferIndex + 0] = (byte) (((cable & 0xf) << 4) | (0x7 & 0xf));\n buffer[bufferIndex + 1] = systemExclusive[sysexIndex + 0];\n buffer[bufferIndex + 2] = systemExclusive[sysexIndex + 1];\n buffer[bufferIndex + 3] = systemExclusive[sysexIndex + 2];\n break;\n default:\n break;\n }\n }\n }\n deviceConnection.bulkTransfer(outputEndpoint, buffer, buffer.length, 0);\n }\n}\n"
|
"public void testQuery2() throws InterruptedException {\n log.info(\"String_Node_Str\");\n SiddhiManager siddhiManager = new SiddhiManager();\n StreamDefinition streamDefinition = StreamDefinition.id(\"String_Node_Str\").attribute(\"String_Node_Str\", Attribute.Type.STRING).attribute(\"String_Node_Str\", Attribute.Type.INT);\n TableDefinition tableDefinition = TableDefinition.id(\"String_Node_Str\").annotation(Annotation.annotation(\"String_Node_Str\").element(\"String_Node_Str\", \"String_Node_Str\")).attribute(\"String_Node_Str\", Attribute.Type.STRING).attribute(\"String_Node_Str\", Attribute.Type.INT);\n Query query = Query.query();\n query.from(InputStream.stream(\"String_Node_Str\"));\n query.insertInto(\"String_Node_Str\");\n ExecutionPlan executionPlan = new ExecutionPlan(\"String_Node_Str\");\n executionPlan.addQuery(query);\n executionPlan.defineStream(streamDefinition);\n executionPlan.defineTable(tableDefinition);\n ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(executionPlan);\n try {\n InputHandler stockStream = executionPlanRuntime.getInputHandler(\"String_Node_Str\");\n executionPlanRuntime.start();\n stockStream.send(new Object[] { \"String_Node_Str\", 55.6f });\n stockStream.send(new Object[] { \"String_Node_Str\", 75.6f });\n Map<String, HazelcastInstance> instanceMap = new HashMap<String, HazelcastInstance>();\n for (HazelcastInstance hci : Hazelcast.getAllHazelcastInstances()) {\n instanceMap.put(hci.getName(), hci);\n }\n Assert.assertTrue(instanceMap.containsKey(HazelcastEventTableConstants.HAZELCAST_INSTANCE_PREFIX + executionPlanRuntime.getName()));\n HazelcastInstance instance = instanceMap.get(HazelcastEventTableConstants.HAZELCAST_INSTANCE_PREFIX + executionPlanRuntime.getName());\n List<StreamEvent> streamEvents = instance.getList(HazelcastEventTableConstants.HAZELCAST_LIST_INSTANCE_PREFIX + executionPlanRuntime.getName() + '_' + tableDefinition.getId());\n SiddhiTestHelper.waitForEvents(100, 2, streamEvents, 60000);\n List<Object[]> expected = Arrays.asList(new Object[] { \"String_Node_Str\", 55.6f }, new Object[] { \"String_Node_Str\", 75.6f });\n List<Object[]> actual = new ArrayList<Object[]>();\n for (StreamEvent event : streamEvents) {\n actual.add(event.getOutputData());\n }\n Assert.assertEquals(2, streamEvents.size());\n Assert.assertEquals(\"String_Node_Str\", true, SiddhiTestHelper.isEventsMatch(actual, expected));\n } finally {\n executionPlanRuntime.shutdown();\n }\n Assert.assertTrue(instanceMap.containsKey(HazelcastEventTableConstants.HAZELCAST_INSTANCE_PREFIX + executionPlanRuntime.getName()));\n HazelcastInstance instance = instanceMap.get(HazelcastEventTableConstants.HAZELCAST_INSTANCE_PREFIX + executionPlanRuntime.getName());\n List<StreamEvent> streamEvents = instance.getList(HazelcastEventTableConstants.HAZELCAST_LIST_INSTANCE_PREFIX + executionPlanRuntime.getName() + '_' + tableDefinition.getId());\n Assert.assertEquals(2, streamEvents.size());\n executionPlanRuntime.shutdown();\n}\n"
|
"private int executeInProcess(ExecutionContext context) {\n if (D8.equals(dexTool)) {\n D8DiagnosticsHandler diagnosticsHandler = new D8DiagnosticsHandler();\n try {\n Set<Path> inputs = new HashSet<>();\n for (Path rawFile : filesToDex) {\n Path toDex = filesystem.resolve(rawFile);\n if (Files.isRegularFile(toDex)) {\n inputs.add(toDex);\n } else {\n Files.newDirectoryStream(toDex, path -> path.toFile().isFile()).forEach(inputs::add);\n }\n }\n boolean outputToDex = outputDexFile.getFileName().toString().endsWith(\"String_Node_Str\");\n Path output = outputToDex ? Files.createTempDirectory(\"String_Node_Str\") : outputDexFile;\n D8Command.Builder builder = D8Command.builder(diagnosticsHandler).addProgramFiles(inputs).setIntermediate(intermediate).setMode(options.contains(Option.NO_OPTIMIZE) ? CompilationMode.DEBUG : CompilationMode.RELEASE).setOutputPath(output);\n D8Command d8Command = builder.build();\n com.android.tools.r8.D8.run(d8Command);\n if (outputToDex) {\n File[] outputs = output.toFile().listFiles();\n if (outputs != null && (outputs.length > 0)) {\n Files.move(outputs[0].toPath(), outputDexFile, StandardCopyOption.REPLACE_EXISTING);\n }\n }\n resourcesReferencedInCode = d8Output.getReferencedResources();\n return 0;\n } catch (CompilationFailedException | IOException e) {\n context.postEvent(ConsoleEvent.severe(String.join(System.lineSeparator(), diagnosticsHandler.diagnostics.stream().map(Diagnostic::getDiagnosticMessage).collect(ImmutableList.toImmutableList()))));\n e.printStackTrace(context.getStdErr());\n return 1;\n }\n } else if (DX.equals(dexTool)) {\n ImmutableList<String> argv = getShellCommandInternal(context);\n Preconditions.checkState(argv.get(0).endsWith(File.separator + \"String_Node_Str\") || argv.get(0).endsWith(\"String_Node_Str\"));\n Preconditions.checkState(argv.get(1).equals(\"String_Node_Str\"));\n ImmutableList<String> args = argv.subList(2, argv.size());\n ByteArrayOutputStream stderr = new ByteArrayOutputStream();\n PrintStream stderrStream = new PrintStream(stderr);\n try {\n com.android.dx.command.dexer.DxContext dxContext = new com.android.dx.command.dexer.DxContext(context.getStdOut(), stderrStream);\n com.android.dx.command.dexer.Main.Arguments arguments = new com.android.dx.command.dexer.Main.Arguments();\n com.android.dx.command.dexer.Main dexer = new com.android.dx.command.dexer.Main(dxContext);\n arguments.parseCommandLine(args.toArray(new String[args.size()]), dxContext);\n int returncode = dexer.run(arguments);\n String stdErrOutput = stderr.toString();\n if (!stdErrOutput.isEmpty()) {\n context.postEvent(ConsoleEvent.warning(\"String_Node_Str\", stdErrOutput));\n }\n if (returncode == 0) {\n resourcesReferencedInCode = dexer.getReferencedResourceNames();\n }\n return returncode;\n } catch (IOException e) {\n e.printStackTrace(context.getStdErr());\n return 1;\n }\n } else {\n return 1;\n }\n}\n"
|
"protected final void doPost(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {\n log.debug(\"String_Node_Str\", request.getRemoteAddr(), request.getRemotePort());\n if (gravity == null) {\n log.error(\"String_Node_Str\");\n return;\n }\n try {\n GravityManager.setGravity(gravity, getServletContext());\n gravity.getGravityConfig().getChannelFactory().init(gravity.getGravityConfig(), getServletConfig());\n GraniteContext context = new HttpGraniteContext(graniteContext, request, response);\n if (context == null) {\n throw new ServletException(\"String_Node_Str\");\n }\n GraniteManager.setCurrentInstance(context);\n AsyncMessage connect = getConnectMessage(request);\n if (connect != null) {\n try {\n String channelId = (String) connect.getClientId();\n GenericChannel channel = (GenericChannel) gravity.getChannel(channelId);\n synchronized (channel) {\n channel.reset();\n channel.runReceived(new AsyncHttpContext(request, response, connect));\n }\n } finally {\n removeConnectMessage(request);\n }\n return;\n }\n Message[] amf3Requests = deserialize(gravity, request);\n log.debug(\"String_Node_Str\", (Object) amf3Requests);\n Message[] amf3Responses = null;\n boolean accessed = false;\n for (int i = 0; i < amf3Requests.length; i++) {\n Message amf3Request = amf3Requests[i];\n Message amf3Response = gravity.handleMessage(amf3Request);\n String channelId = (String) amf3Request.getClientId();\n if (!accessed)\n accessed = gravity.access(channelId);\n if (amf3Response == null) {\n if (amf3Requests.length > 1)\n throw new IllegalArgumentException(\"String_Node_Str\");\n GenericChannel channel = (GenericChannel) gravity.getChannel(channelId);\n if (channel == null)\n throw new NullPointerException(\"String_Node_Str\");\n if (!channel.runReceived(new AsyncHttpContext(request, response, amf3Request))) {\n setConnectMessage(request, amf3Request);\n synchronized (channel) {\n WaitingContinuation continuation = new WaitingContinuation(channel);\n channel.setContinuation(continuation);\n continuation.suspend(gravity.getGravityConfig().getLongPollingTimeoutMillis());\n }\n }\n return;\n }\n if (amf3Responses == null)\n amf3Responses = new Message[amf3Requests.length];\n amf3Responses[i] = amf3Response;\n }\n log.debug(\"String_Node_Str\", (Object) amf3Responses);\n serialize(gravity, response, amf3Responses);\n } catch (IOException e) {\n log.error(e, \"String_Node_Str\");\n throw e;\n } catch (ClassNotFoundException e) {\n log.error(e, \"String_Node_Str\");\n throw new ServletException(\"String_Node_Str\", e);\n } finally {\n cleanupRequest(request);\n }\n removeConnectMessage(request);\n}\n"
|
"public String getRequestURI() {\n return this.cocoonRequest.getRequestURI();\n}\n"
|
"private void saveExtendedFieldValues(Connection c, Domain d) throws SQLException {\n List<ExtendedFieldValue> list = d.getExtendedFieldValues();\n for (int i = 0; i < list.size(); i++) {\n ExtendedFieldValue efv = list.get(i);\n efv.setInstanceID(d.getID());\n ExtendedFieldValueDBDAO dao = (ExtendedFieldValueDBDAO) ExtendedFieldValueDAO.getInstance();\n if (efv.getExtendedFieldValueID() != null) {\n dao.update(c, efv, false);\n } else {\n dao.create(c, efv, false);\n }\n }\n}\n"
|
"public StaticNatRule createStaticNatRule(StaticNatRule rule, boolean openFirewall) throws NetworkRuleConflictException {\n Account caller = UserContext.current().getCaller();\n Long ipAddrId = rule.getSourceIpAddressId();\n IPAddressVO ipAddress = _ipAddressDao.findById(ipAddrId);\n if (ipAddress == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + ipAddrId + \"String_Node_Str\");\n } else if (ipAddress.isSourceNat() || !ipAddress.isOneToOneNat() || ipAddress.getAssociatedWithVmId() == null) {\n throw new NetworkRuleConflictException(\"String_Node_Str\" + ipAddress.getAddress());\n }\n _firewallMgr.validateFirewallRule(caller, ipAddress, rule.getSourcePortStart(), rule.getSourcePortEnd(), rule.getProtocol(), Purpose.StaticNat);\n Long networkId = ipAddress.getAssociatedWithNetworkId();\n Long accountId = ipAddress.getAccountId();\n Long domainId = ipAddress.getDomainId();\n String dstIp = _networkMgr.getIpInNetwork(ipAddress.getAssociatedWithVmId(), networkId);\n Transaction txn = Transaction.currentTxn();\n txn.start();\n FirewallRuleVO newRule = new FirewallRuleVO(rule.getXid(), rule.getSourceIpAddressId(), rule.getSourcePortStart(), rule.getSourcePortEnd(), rule.getProtocol().toLowerCase(), networkId, accountId, domainId, rule.getPurpose(), null, null, null, null);\n newRule = _firewallDao.persist(newRule);\n if (openFirewall) {\n _firewallMgr.createRuleForAllCidrs(ipAddrId, caller, rule.getSourcePortStart(), rule.getSourcePortEnd(), rule.getProtocol(), null, null, newRule.getId());\n }\n try {\n _firewallMgr.detectRulesConflict(newRule, ipAddress);\n if (!_firewallDao.setStateToAdd(newRule)) {\n throw new CloudRuntimeException(\"String_Node_Str\" + newRule);\n }\n UserContext.current().setEventDetails(\"String_Node_Str\" + newRule.getId());\n UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_NET_RULE_ADD, newRule.getAccountId(), 0, newRule.getId(), null);\n _usageEventDao.persist(usageEvent);\n txn.commit();\n StaticNatRule staticNatRule = new StaticNatRuleImpl(newRule, dstIp);\n return staticNatRule;\n } catch (Exception e) {\n if (newRule != null) {\n txn.start();\n _firewallMgr.revokeRelatedFirewallRule(newRule.getId(), false);\n _forwardingDao.remove(newRule.getId());\n txn.commit();\n }\n if (e instanceof NetworkRuleConflictException) {\n throw (NetworkRuleConflictException) e;\n }\n throw new CloudRuntimeException(\"String_Node_Str\" + newRule.getSourceIpAddressId(), e);\n }\n}\n"
|
"static ImmutablePair<MetricsRequest, MetricsRequestContext> parseRequestAndContext(URI requestURI) throws MetricsPathException {\n MetricsRequestBuilder builder = new MetricsRequestBuilder(requestURI);\n String uriPath = requestURI.getRawPath();\n int index = uriPath.lastIndexOf(\"String_Node_Str\");\n builder.setMetricPrefix(urlDecode(uriPath.substring(index + 1)));\n String strippedPath = uriPath.substring(0, index);\n MetricsRequestContext metricsRequestContext;\n if (strippedPath.startsWith(\"String_Node_Str\")) {\n builder.setContextPrefix(CLUSTER_METRICS_CONTEXT);\n builder.setScope(MetricsScope.REACTOR);\n } else {\n metricsRequestContext = parseContext(strippedPath, builder);\n }\n parseQueryString(requestURI, builder);\n return new ImmutablePair<MetricsRequest, MetricsRequestContext>(builder.build(), metricsRequestContext);\n}\n"
|
"public void setScale(float scale) {\n this.scale = scale;\n final float scaleX = scale * scaleFactor;\n final float scaleY = scale * scaleFactor * scaleFactorY;\n baseLayout.setScaleY(scaleFactorY);\n topPart.setScaleX(scaleX);\n topPart.setScaleY(scaleY);\n bottomPart.setScaleX(scaleX);\n bottomPart.setScaleY(scaleY);\n}\n"
|
"public boolean afterPaintingGeometry(Geometry g) {\n if (aggregationType == AggregationType.LAST) {\n return false;\n }\n if (aggregationType == AggregationType.AVERAGE && totalPainter != null) {\n ((WeightedComposite) composite).setWeight(1.0);\n totalPainter.setBounds(b);\n totalPainter.paint(g);\n }\n return true;\n}\n"
|
"public String execute(String[] args) {\n if (args.length > 1) {\n if (checkModelDefined()) {\n if (getCurrentModel().endsWith(\"String_Node_Str\")) {\n return editEntityDSL(args[1]);\n } else {\n editDBModelFile();\n }\n }\n } else {\n return invalidUsage(\"String_Node_Str\");\n }\n return null;\n}\n"
|
"public void run() {\n System.out.println(\"String_Node_Str\");\n try {\n JSONParser parser = new JSONParser();\n InputStreamReader reader = new InputStreamReader(new FileInputStream(path), \"String_Node_Str\");\n JSONObject completeLogFile = (JSONObject) parser.parse(reader);\n Date loggingDate = new Date();\n long prevTimeInMillis = loggingDate.getTime();\n JSONArray sensorDataArray = (JSONArray) completeLogFile.get(\"String_Node_Str\");\n long sensorStartTimeInMilis = 0;\n for (Object senObj : sensorDataArray) {\n JSONObject sensor = (JSONObject) senObj;\n Date sensorTimestamp = RobobuggyDateFormatter.formatRobobuggyDate((String) sensor.get(\"String_Node_Str\"));\n long currentSensorTimeInMillis = sensorTimestamp.getTime();\n long currentTime = loggingDate.getTime();\n if (sensorStartTimeInMilis == 0) {\n sensorStartTimeInMilis = currentSensorTimeInMillis;\n }\n long sensorTimeFromStart = currentSensorTimeInMillis - sensorStartTimeInMilis;\n long realTimeFromStart = currentTime - prevTimeInMillis;\n long playbackSpeed = 100;\n long sleepTime = playbackSpeed * realTimeFromStart - sensorTimeFromStart;\n new RobobuggyLogicNotification(\"String_Node_Str\" + sleepTime, RobobuggyMessageLevel.NOTE);\n if (sleepTime < 0 && false) {\n Thread.sleep(-sleepTime / 1000000);\n }\n String sensorName = (String) sensor.get(\"String_Node_Str\");\n if (sensorName == null) {\n new RobobuggyLogicNotification(\"String_Node_Str\", RobobuggyMessageLevel.EXCEPTION);\n } else {\n JSONObject sensorParams = (JSONObject) sensor.get(\"String_Node_Str\");\n System.out.println(sensorName);\n switch(sensorName) {\n case \"String_Node_Str\":\n double yaw = (double) sensorParams.get(\"String_Node_Str\");\n double pitch = (double) sensorParams.get(\"String_Node_Str\");\n double roll = (double) sensorParams.get(\"String_Node_Str\");\n imuPub.publish(new ImuMeasurement(yaw, pitch, roll));\n break;\n case \"String_Node_Str\":\n double latitude = (double) sensorParams.get(\"String_Node_Str\");\n double longitude = (double) sensorParams.get(\"String_Node_Str\");\n String latDir = (String) sensorParams.get(\"String_Node_Str\");\n String longDir = (String) sensorParams.get(\"String_Node_Str\");\n boolean north = latDir.equals(\"String_Node_Str\");\n boolean west = longDir.equals(\"String_Node_Str\");\n String gpsTimestampString = (String) sensor.get(\"String_Node_Str\");\n Date gpsTimestamp = RobobuggyDateFormatter.formatRobobuggyDate(gpsTimestampString);\n int qualityValue = Integer.valueOf((String) sensorParams.get(\"String_Node_Str\"));\n int numSatellites = Integer.valueOf((String) sensorParams.get(\"String_Node_Str\"));\n double hdop = (double) sensorParams.get(\"String_Node_Str\");\n double antennaAlt = (double) sensorParams.get(\"String_Node_Str\");\n double rawLat = (double) sensorParams.get(\"String_Node_Str\");\n double rawLon = (double) sensorParams.get(\"String_Node_Str\");\n gpsPub.publish(new GpsMeasurement(gpsTimestamp, latitude, north, longitude, west, qualityValue, numSatellites, hdop, antennaAlt, rawLat, rawLon));\n break;\n case \"String_Node_Str\":\n String loggingStatus = (String) sensorParams.get(\"String_Node_Str\");\n GuiLoggingButtonMessage.LoggingMessage loggingMessage = LoggingMessage.STOP;\n switch(loggingStatus) {\n case \"String_Node_Str\":\n loggingMessage = LoggingMessage.START;\n break;\n case \"String_Node_Str\":\n loggingMessage = LoggingMessage.STOP;\n break;\n default:\n new RobobuggyLogicNotification(\"String_Node_Str\", RobobuggyMessageLevel.EXCEPTION);\n break;\n }\n loggingButtonPub.publish(new GuiLoggingButtonMessage(loggingMessage));\n break;\n case \"String_Node_Str\":\n double steeringAngle = (double) sensorParams.get(\"String_Node_Str\");\n steeringPub.publish(new SteeringMeasurement((int) steeringAngle));\n break;\n case \"String_Node_Str\":\n double dataword = (double) sensorParams.get(\"String_Node_Str\");\n double distance = (double) sensorParams.get(\"String_Node_Str\");\n double velocity = 0;\n if (sensorParams.get(\"String_Node_Str\") != null)\n velocity = (double) sensorParams.get(\"String_Node_Str\");\n double accel = 0;\n if (sensorParams.get(\"String_Node_Str\") != null)\n accel = (double) sensorParams.get(\"String_Node_Str\");\n String timestampString = (String) sensor.get(\"String_Node_Str\");\n Date timestamp = RobobuggyDateFormatter.formatRobobuggyDate(timestampString);\n encoderPub.publish(new EncoderMeasurement(timestamp, dataword, distance, velocity, accel));\n break;\n case \"String_Node_Str\":\n break;\n default:\n break;\n }\n }\n }\n } catch (IOException e) {\n new RobobuggyLogicNotification(\"String_Node_Str\", RobobuggyMessageLevel.EXCEPTION);\n } catch (InterruptedException e) {\n new RobobuggyLogicNotification(\"String_Node_Str\", RobobuggyMessageLevel.WARNING);\n } catch (ParseException e) {\n new RobobuggyLogicNotification(\"String_Node_Str\", RobobuggyMessageLevel.EXCEPTION);\n }\n}\n"
|
"public PriceListLine getPriceListLine(SalesOrderLine salesOrderLine, PriceList priceList) {\n return priceListService.getPriceListLine(salesOrderLine.getProduct(), salesOrderLine.getQty(), priceList);\n}\n"
|
"private void _epmem_respond_to_cmd_parse(List<WmeImpl> cmds, boolean good_cue, int path, long retrieve, SymbolImpl next, SymbolImpl previous, SymbolImpl query, SymbolImpl neg_query, List<Long> prohibit, long before, long after, Set<SymbolImpl> currents, Set<WmeImpl> cue_wmes) {\n cue_wmes.clear();\n retrieve.value = EPMEM_MEMID_NONE;\n next = null;\n previous = null;\n query = null;\n neg_query = null;\n prohibit.clear();\n before = EPMEM_MEMID_NONE;\n after = EPMEM_MEMID_NONE;\n good_cue = true;\n path = 0;\n for (WmeImpl w_p : cmds) {\n cue_wmes.add((w_p));\n if (good_cue) {\n if (w_p.attr == predefinedSyms.epmem_sym_retrieve) {\n if ((w_p.getValue().asInteger() != null) && (path == 0) && (w_p.value.asInteger().getValue() > 0)) {\n retrieve = w_p.value.asInteger().getValue();\n path = 1;\n } else {\n good_cue = false;\n }\n } else if (w_p.attr == predefinedSyms.epmem_sym_next) {\n if ((w_p.getValue().asIdentifier() != null) && (path == 0)) {\n next = w_p.value;\n path = 2;\n } else {\n good_cue = false;\n }\n } else if (w_p.attr == predefinedSyms.epmem_sym_prev) {\n if ((w_p.getValue().asIdentifier() != null) && (path == 0)) {\n previous = w_p.value;\n path = 2;\n } else {\n good_cue = false;\n }\n } else if (w_p.attr == predefinedSyms.epmem_sym_query) {\n if ((w_p.getValue().asIdentifier() != null) && ((path == 0) || (path == 3)) && (query == null)) {\n query = w_p.value;\n path = 3;\n } else {\n good_cue = false;\n }\n } else if (w_p.attr == predefinedSyms.epmem_sym_negquery) {\n if ((w_p.getValue().asIdentifier() != null) && ((path == 0) || (path == 3)) && (neg_query == null)) {\n neg_query = w_p.value;\n path = 3;\n } else {\n good_cue = false;\n }\n } else if (w_p.attr == predefinedSyms.epmem_sym_before) {\n if ((w_p.getValue().asInteger() != null) && ((path == 0) || (path == 3))) {\n if ((before == EPMEM_MEMID_NONE) || (w_p.value.asInteger().getValue() < before)) {\n before = w_p.value.asInteger().getValue();\n }\n path = 3;\n } else {\n good_cue = false;\n }\n } else if (w_p.attr == predefinedSyms.epmem_sym_after) {\n if ((w_p.getValue().asInteger() != null) && ((path == 0) || (path == 3))) {\n if (after < w_p.value.asInteger().getValue()) {\n after = w_p.value.asInteger().getValue();\n }\n path = 3;\n } else {\n good_cue = false;\n }\n } else if (w_p.attr == predefinedSyms.epmem_sym_prohibit) {\n if ((w_p.getValue().asInteger() != null) && ((path == 0) || (path == 3))) {\n prohibit.add(w_p.value.asInteger().getValue());\n path = 3;\n } else {\n good_cue = false;\n }\n } else if (w_p.attr == predefinedSyms.epmem_sym_current) {\n if ((w_p.getValue().asIdentifier() != null) && ((path == 0) || (path == 3))) {\n currents.add(w_p.value);\n path = 3;\n } else {\n good_cue = false;\n }\n } else {\n good_cue = false;\n }\n }\n }\n if ((path == 3) && (query == null)) {\n good_cue = false;\n }\n if (path == 0) {\n good_cue = false;\n }\n}\n"
|
"private void handleMemberFaultEvent(String clusterId, String memberId) {\n try {\n AbstractClusterMonitor monitor = getMonitor(clusterId);\n NetworkPartitionContext nwPartitionCtxt;\n try {\n TopologyManager.acquireReadLock();\n Member member = findMember(memberId);\n if (null == member) {\n return;\n }\n if (!member.isActive()) {\n if (log.isDebugEnabled()) {\n log.debug(String.format(\"String_Node_Str\" + \"String_Node_Str\", memberId));\n }\n return;\n }\n if (monitor != null) {\n nwPartitionCtxt = monitor.getNetworkPartitionCtxt(member);\n } else {\n return;\n }\n } finally {\n TopologyManager.releaseReadLockForServices();\n }\n String partitionId = monitor.getPartitionOfMember(memberId);\n PartitionContext partitionCtxt = nwPartitionCtxt.getPartitionCtxt(partitionId);\n if (!partitionCtxt.activeMemberExist(memberId)) {\n if (log.isDebugEnabled()) {\n log.debug(String.format(\"String_Node_Str\", memberId));\n }\n return;\n }\n CloudControllerClient ccClient = CloudControllerClient.getInstance();\n ccClient.terminate(memberId);\n partitionCtxt.removeActiveMemberById(memberId);\n StatusChecker.getInstance().onMemberFaultEvent(clusterId, \"String_Node_Str\", partitionCtxt);\n if (log.isInfoEnabled()) {\n log.info(String.format(\"String_Node_Str\", memberId, partitionId, clusterId));\n }\n } catch (TerminationException e) {\n log.error(e);\n }\n}\n"
|
"public void testForceDeleteClusterWhenStopSucceed() {\n AmbariImpl spy = Mockito.spy(provider);\n Mockito.when(spy.echo()).thenReturn(true);\n Mockito.when(spy.isProvisioned(Mockito.anyString())).thenReturn(true);\n Mockito.doReturn(true).when(spy).onStopCluster(Mockito.<ClusterBlueprint>any(), Mockito.<ClusterReportQueue>any());\n Assert.assertTrue(spy.onDeleteCluster(blueprint, reportQueue));\n}\n"
|
"public final Function_decl_specifiersContext function_decl_specifiers() throws RecognitionException {\n Function_decl_specifiersContext _localctx = new Function_decl_specifiersContext(_ctx, getState());\n enterRule(_localctx, 10, RULE_function_decl_specifiers);\n int _la;\n try {\n enterOuterAlt(_localctx, 1);\n {\n setState(153);\n _la = _input.LA(1);\n if (!(((((_la - 13)) & ~0x3f) == 0 && ((1L << (_la - 13)) & ((1L << (13 - 13)) | (1L << (14 - 13)) | (1L << (37 - 13)) | (1L << (39 - 13)) | (1L << (VIRTUAL - 13)))) != 0))) {\n _errHandler.recoverInline(this);\n }\n consume();\n }\n } catch (RecognitionException re) {\n _localctx.exception = re;\n _errHandler.reportError(this, re);\n _errHandler.recover(this, re);\n } finally {\n exitRule();\n }\n return _localctx;\n}\n"
|
"private void registerUiTestAutomationServiceLocked(IAccessibilityServiceClient client) {\n IAccessibilityManager manager = IAccessibilityManager.Stub.asInterface(ServiceManager.getService(Context.ACCESSIBILITY_SERVICE));\n AccessibilityServiceInfo info = new AccessibilityServiceInfo(true);\n info.eventTypes = AccessibilityEvent.TYPES_ALL_MASK;\n info.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC;\n info.flags |= AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS | AccessibilityServiceInfo.FLAG_REPORT_VIEW_IDS;\n try {\n manager.registerUiTestAutomationService(mToken, client, info);\n mClient = client;\n } catch (RemoteException re) {\n throw new IllegalStateException(\"String_Node_Str\", re);\n }\n}\n"
|
"private BrowseInfo browseByItem(BrowserScope bs) throws BrowseException {\n log.info(LogManager.getHeader(context, \"String_Node_Str\", \"String_Node_Str\"));\n ItemDAO itemDAO = ItemDAOFactory.getInstance(context);\n try {\n dao.setTable(browseIndex.getTableName(scope.inCommunity(), scope.inCollection()));\n dao.setAscending(scope.isAscending());\n String focusValue = null;\n String rawFocusValue = null;\n String focusField = browseIndex.getSortField(scope.isSecondLevel());\n if (scope.hasJumpToItem() || scope.hasJumpToValue() || scope.hasStartsWith()) {\n focusValue = getJumpToValue();\n rawFocusValue = focusValue;\n focusValue = normalizeJumpToValue(focusValue);\n if (scope.hasStartsWith()) {\n if (browseIndex.isDate()) {\n focusValue = focusValue + \"String_Node_Str\";\n }\n }\n log.debug(\"String_Node_Str\" + focusValue);\n if (scope.getSortBy() > 0) {\n focusField = \"String_Node_Str\" + Integer.toString(scope.getSortBy());\n }\n dao.setJumpToField(focusField);\n dao.setJumpToValue(focusValue);\n }\n String value = null;\n String rawValue = null;\n if (scope.hasFilterValue() && scope.isSecondLevel()) {\n value = scope.getFilterValue();\n rawValue = value;\n value = OrderFormat.makeSortString(value, scope.getFilterValueLang(), scope.getBrowseIndex().getDataType());\n dao.setFilterValueField(\"String_Node_Str\");\n dao.setFilterValue(value);\n dao.setFilterValuePartial(scope.getFilterValuePartial());\n }\n if (scope.inCollection() || scope.inCommunity()) {\n if (scope.inCollection()) {\n Collection col = (Collection) scope.getBrowseContainer();\n dao.setContainerIDField(\"String_Node_Str\");\n dao.setContainerID(col.getID());\n } else if (scope.inCommunity()) {\n Community com = (Community) scope.getBrowseContainer();\n dao.setContainerIDField(\"String_Node_Str\");\n dao.setContainerID(com.getID());\n }\n }\n String orderBy = browseIndex.getSortField();\n if (scope.getSortBy() > 0) {\n orderBy = \"String_Node_Str\" + Integer.toString(scope.getSortBy());\n }\n dao.setOrderField(orderBy);\n dao.setLimit(scope.getResultsPerPage() + 1);\n List results = dao.doQuery();\n boolean showLast = false;\n if (results.size() == 0) {\n showLast = true;\n }\n Item next = null;\n int lastIndex = results.size() - 1;\n if (lastIndex >= scope.getResultsPerPage()) {\n next = (Item) results.get(lastIndex);\n results.remove(lastIndex);\n }\n Item prev = null;\n if (scope.hasJumpToItem() || scope.hasJumpToValue() || scope.hasStartsWith()) {\n int prevID = -1;\n if (showLast) {\n prevID = getPreviousPageID(results);\n } else {\n prevID = getPreviousPageID(null);\n }\n if (prevID != -1) {\n prev = itemDAO.retrieve(prevID);\n }\n }\n int offset = 0;\n int total = getTotalResults();\n int position = -1;\n if (total > 0) {\n if (showLast) {\n position = total - scope.getResultsPerPage();\n if (position < 0)\n position = 0;\n } else {\n position = getPosition(false);\n }\n }\n BrowseInfo browseInfo = new BrowseInfo(results, position, total, offset);\n if (next != null) {\n browseInfo.setNextItem(next.getID());\n }\n if (prev != null) {\n browseInfo.setPrevItem(prev.getID());\n }\n browseInfo.setBrowseIndex(browseIndex);\n browseInfo.setSortOption(scope.getSortOption());\n browseInfo.setAscending(scope.isAscending());\n browseInfo.setBrowseLevel(scope.getBrowseLevel());\n browseInfo.setValue(rawValue);\n browseInfo.setFocus(rawFocusValue);\n if (scope.hasJumpToItem()) {\n browseInfo.setFocusItem(scope.getJumpToItem());\n }\n browseInfo.setStartsWith(scope.hasStartsWith());\n if (scope.inCollection() || scope.inCommunity()) {\n browseInfo.setBrowseContainer(scope.getBrowseContainer());\n }\n browseInfo.setResultsPerPage(scope.getResultsPerPage());\n browseInfo.setEtAl(scope.getEtAl());\n return browseInfo;\n } catch (SQLException e) {\n log.error(\"String_Node_Str\", e);\n throw new BrowseException(e);\n }\n}\n"
|
"ICompletionProposal[] getAttributeValueProposals(IAssistTagState assistState) {\n Assert.isNotNull(assistState, \"String_Node_Str\");\n DefaultAssistAttributeState attrState = prepareForValueAssist(assistState);\n ArrayList valueContributors = ((ICFEFileDocument) assistState.getIDocument()).getContentAssistManager().getValueAssistors();\n Iterator CACorIter = valueContributors.iterator();\n Set proposals = new TreeSet();\n while (CACorIter.hasNext()) {\n Value[] valueProps = ((IAssistAttrValueContributor) CACorIter.next()).getAttributeValueProposals(attrState);\n if (valueProps == null)\n continue;\n for (int i = 0; i < valueProps.length; i++) {\n proposals.add(valueProps[i]);\n }\n }\n return makeSetToProposal(proposals, attrState.getOffset(), CFContentAssist.VALUETYPE, attrState.getValueSoFar().length());\n}\n"
|
"public static void convert(List<Move> moves, String pathName) {\n try {\n BufferedWriter out = new BufferedWriter(new FileWriter(FileUtility.getCompletedGamesFile(pathName)));\n String toWrite = \"String_Node_Str\";\n for (int i = 0, j = 1; i < moves.size(); i++) {\n String turn = moves.get(i).toString();\n if (moves.get(i).result != null) {\n turn = moves.get(i) + (i % 2 == 0 ? (\"String_Node_Str\" + moves.get(i).result) : (\"String_Node_Str\" + (j + 1) + \"String_Node_Str\" + moves.get(i).result));\n }\n if (i % 2 != 0 || moves.get(i).result != null) {\n out.write(j + \"String_Node_Str\" + toWrite + \"String_Node_Str\" + turn + '\\n');\n toWrite = \"String_Node_Str\";\n j++;\n } else {\n toWrite += turn;\n }\n }\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n}\n"
|
"public void push(ValueInfo value, boolean addContinueMarker) {\n if (Type.VOID.equals(value.getType()) && !value.isThisReference())\n return;\n stack.add(value);\n if (addContinueMarker && value.usesTwoSlots()) {\n stack.add(ValueInfo.CONTINUED);\n }\n}\n"
|
"protected boolean load(GL2ES2 gl, Collection<ShaderCode> codes) {\n if (this.loaded)\n return true;\n this.state = new ShaderState();\n this.state.setVerbose(true);\n this.program = new ShaderProgram();\n for (ShaderCode code : codes) {\n boolean success = this.program.add(gl, code, System.err);\n GLErrorUtils.logGLError(logger, gl, \"String_Node_Str\" + code);\n GLErrorUtils.logGLShaderInfoLog(logger, gl, code.shader().get(0), \"String_Node_Str\");\n if (!success) {\n return false;\n }\n }\n this.state.attachShaderProgram(gl, this.program, true);\n GLErrorUtils.logGLError(logger, gl, \"String_Node_Str\");\n GLErrorUtils.logGLShaderInfoLog(logger, gl, this.program.program(), \"String_Node_Str\");\n for (GLArrayData array : arrays) {\n this.state.ownAttribute(array, true);\n GLErrorUtils.logGLError(logger, gl, \"String_Node_Str\" + array.getName());\n }\n for (GLUniformData uniform : uniforms) {\n this.state.ownUniform(uniform);\n GLErrorUtils.logGLError(logger, gl, \"String_Node_Str\" + uniform.getName());\n }\n this.loaded = true;\n return true;\n}\n"
|
"private void firebaseAuthWithFacebook(final AccessToken accessToken) {\n Log.d(TAG, \"String_Node_Str\");\n AuthCredential credential = FacebookAuthProvider.getCredential(accessToken.getToken());\n FirebaseUser firebaseUser = mAuth.getCurrentUser();\n Task<AuthResult> authResultTask;\n if (firebaseUser != null) {\n authResultTask = firebaseUser.linkWithCredential(credential);\n } else {\n authResultTask = mAuth.signInWithCredential(credential);\n }\n authResultTask.addOnCompleteListener(activity, new OnCompleteListener<AuthResult>() {\n\n public void onComplete(Task<AuthResult> task) {\n if (task.isSuccessful()) {\n if (updateConnectionStatus(GodotConnectStatus.CONNECTED)) {\n FirebaseUser firebaseUser = mAuth.getCurrentUser();\n Log.d(TAG, \"String_Node_Str\");\n GodotLib.calldeferred(instance_id, \"String_Node_Str\", new Object[] { firebaseUser.getDisplayName() });\n }\n } else {\n if (updateConnectionStatus(GodotConnectStatus.DISCONNECTED)) {\n Log.w(TAG, task.getException());\n GodotLib.calldeferred(instance_id, \"String_Node_Str\", new Object[] { task.getException().toString() });\n }\n }\n }\n });\n}\n"
|
"public void modifyText(ModifyEvent e) {\n if (okBtn != null)\n okBtn.setEnabled(true);\n internalLabel.setText(getInternalName());\n}\n"
|
"protected boolean isValid() {\n ModelElement modelElement = PropertyHelper.getModelElement(((IRepositoryViewObject) selectedObj).getProperty());\n return modelElement instanceof Connection;\n}\n"
|
"public float getTotalInstructionCoverage() {\n if (this.getCoverageResults().size() <= 0) {\n return 0.0f;\n }\n float totalInstr = this.getInstructionCoverage() / this.getCoverageResults().size();\n totalInstr = Utils.roundFloat(1, RoundingMode.HALF_EVEN, totalInstr);\n return totalInstr;\n}\n"
|
"public void onEntityTarget(EntityTargetEvent event) {\n if (CreatureTask.getCreature(event.getEntity()) != null) {\n HumanNPC creature = CreatureTask.getCreature(event.getEntity()).npc;\n if (creature.isEvil()) {\n if (e.getNpcReason() == NpcTargetReason.NPC_RIGHTCLICKED) {\n creature.getEvil().onRightClick((Player) event.getTarget(), creature);\n }\n }\n }\n if (NPCManager.isNPC(event.getTarget())) {\n event.setCancelled(true);\n }\n if (!(event instanceof NPCEntityTargetEvent)) {\n return;\n }\n NPCEntityTargetEvent e = (NPCEntityTargetEvent) event;\n HumanNPC npc = NPCManager.get(e.getEntity());\n if (npc != null && event.getTarget() instanceof Player) {\n if (e.getNpcReason() == NpcTargetReason.NPC_RIGHTCLICKED) {\n Player player = (Player) event.getTarget();\n if (plugin.validateTool(\"String_Node_Str\", player.getItemInHand().getTypeId(), player.isSneaking()) == true) {\n if (!NPCManager.validateSelected(player, npc.getUID())) {\n NPCManager.selectedNPCs.put(player.getName(), npc.getUID());\n player.sendMessage(ChatColor.GREEN + \"String_Node_Str\" + StringUtils.wrap(npc.getStrippedName()) + \"String_Node_Str\" + StringUtils.wrap(\"String_Node_Str\" + npc.getUID()) + \"String_Node_Str\");\n return;\n }\n }\n if (plugin.validateTool(\"String_Node_Str\", player.getItemInHand().getTypeId(), player.isSneaking()) == true) {\n CitizensBasicNPCEvent ev = new CitizensBasicNPCEvent(npc, (Player) e.getTarget(), MessageUtils.getText(npc, (Player) e.getTarget()));\n plugin.getServer().getPluginManager().callEvent(ev);\n }\n if (npc.isTrader()) {\n npc.getTrader().onRightClick(player, npc);\n }\n if (npc.isWizard()) {\n npc.getWizard().onRightClick(player, npc);\n }\n if (npc.isBlacksmith()) {\n npc.getBlacksmith().onRightClick(player, npc);\n }\n if (npc.isBandit()) {\n npc.getBandit().onRightClick(player, npc);\n }\n if (npc.isQuester()) {\n npc.getQuester().onRightClick(player, npc);\n }\n }\n }\n}\n"
|
"public void onTrackEnd(IPlayer player, AudioTrack track, AudioTrackEndReason endReason) {\n if (endReason != AudioTrackEndReason.REPLACED && endReason != AudioTrackEndReason.STOPPED) {\n ((LavalinkPlayer) player).clearTrack();\n }\n}\n"
|
"public void configure() {\n bind(JPAInitializer.class).asEagerSingleton();\n bindConstant().annotatedWith(JpaUnit.class).to(\"String_Node_Str\");\n bind(CertificateResource.class);\n bind(ConsumerResource.class);\n bind(PoolResource.class);\n bind(EntitlementResource.class);\n bind(OwnerResource.class);\n bind(ProductServiceAdapter.class).to(DefaultProductServiceAdapter.class);\n bind(ProductResource.class);\n bind(TestResource.class);\n bind(DateSource.class).to(DateSourceForTesting.class).asEagerSingleton();\n bind(Enforcer.class).to(JavascriptEnforcer.class);\n bind(BouncyCastlePKI.class);\n bind(SubscriptionServiceAdapter.class).to(DefaultSubscriptionServiceAdapter.class);\n bind(IdentityCertServiceAdapter.class).to(StubIdentityCertServiceAdapter.class);\n bind(Config.class);\n bind(EntitlementCertServiceAdapter.class).to(DefaultEntitlementCertServiceAdapter.class);\n bind(RulesCurator.class).to(TestRulesCurator.class);\n bind(ScriptEngine.class).toProvider(ScriptEngineProvider.class);\n bind(Reader.class).annotatedWith(Names.named(\"String_Node_Str\")).toProvider(RulesReaderProvider.class);\n}\n"
|
"public void javaToNative(Object object, TransferData transferData) {\n if (checkText(object) && isSupportedType(transferData)) {\n try {\n super.javaToNative(((String) object).getBytes(\"String_Node_Str\"), transferData);\n } catch (UnsupportedEncodingException e) {\n super.javaToNative(((String) object).getBytes(), transferData);\n }\n }\n}\n"
|
"public static void main(String[] args) {\n new RtThread(10, 1 * 100) {\n\n public void run() {\n up = true;\n flag = false;\n value = 10;\n speed = 0x400;\n while (true) {\n if (state == STATE_ALL) {\n counter++;\n if ((counter % value) == 0) {\n if (flag) {\n flag = false;\n } else {\n flag = true;\n }\n }\n counter1++;\n if ((counter1 % speed) == 0) {\n if (speaker_up) {\n value++;\n if (value >= 50) {\n speaker_up = false;\n value--;\n }\n } else {\n value--;\n if (value <= 10) {\n speaker_up = true;\n value++;\n }\n }\n }\n } else {\n flag = false;\n }\n if (flag) {\n Speaker.write(true);\n } else\n Speaker.write(false);\n waitForNextPeriod();\n }\n }\n };\n new RtThread(10, 100 * 1000) {\n public void run() {\n val = LED0;\n up = true;\n while (true) {\n if (state == STATE_ALL) {\n if (up) {\n switch(val) {\n case LED0:\n val = LED1;\n break;\n case LED1:\n val = LED2;\n break;\n case LED2:\n val = LED3;\n break;\n case LED3:\n {\n up = false;\n val = LED2;\n break;\n }\n default:\n val = LED0;\n break;\n }\n } else {\n switch(val) {\n case LED0:\n {\n up = true;\n val = LED1;\n break;\n }\n case LED1:\n val = LED0;\n break;\n case LED2:\n val = LED1;\n break;\n default:\n val = LED0;\n break;\n }\n }\n } else if (state != STATE_LINEFOLLOWER) {\n val = 0;\n }\n FutureUse.writePins(val);\n waitForNextPeriod();\n }\n }\n };\n new RtThread(10, 50 * 1000) {\n public void run() {\n int forwardCount = 0;\n System.out.println(\"String_Node_Str\");\n MOTORS = new Motor[] { new Motor(0), new Motor(1) };\n freeValue = 0;\n stop = true;\n while (true) {\n for (int i = 0; i < 4; i++) if (Buttons.getButton(i)) {\n state = i + 1;\n Leds.setLed(1, (i & 1) != 0);\n Leds.setLed(2, (i & 2) != 0);\n break;\n }\n stop = !DigitalInputs.getDigitalInput(2);\n if ((Buttons.getButtons() != 0) || stop)\n freeValue = Sensors.readSensor(IR_SENSOR);\n if (stop)\n for (int i = 0; i < 2; i++) MOTORS[i].setState(Motor.STATE_OFF);\n switch(state) {\n case STATE_OFF:\n {\n for (int i = 0; i < 2; i++) MOTORS[i].setState(Motor.STATE_OFF);\n break;\n }\n case STATE_LINEFOLLOWER:\n {\n if (!stop) {\n int val = Sensors.readSensor(IR_SENSOR);\n boolean black = val > 285;\n MOTORS[MOTOR_LEFT].setDutyCyclePercentage(60);\n MOTORS[MOTOR_RIGHT].setDutyCyclePercentage(60);\n if (black) {\n MOTORS[MOTOR_RIGHT].setState(Motor.STATE_FORWARD);\n MOTORS[MOTOR_LEFT].setState(Motor.STATE_BRAKE);\n FutureUse.writePins(LED0 | LED3);\n } else {\n MOTORS[MOTOR_LEFT].setState(Motor.STATE_FORWARD);\n MOTORS[MOTOR_RIGHT].setState(Motor.STATE_BRAKE);\n FutureUse.writePins(LED1 | LED2);\n }\n }\n break;\n }\n case STATE_TOUCHSENSOR:\n case STATE_IRSENSOR:\n case STATE_ALL:\n {\n if (!stop) {\n for (int i = 0; i < 2; i++) MOTORS[i].setMotorPercentage(Motor.STATE_FORWARD, true, 40);\n int totalDifference = Sensors.readSensor(IR_SENSOR) - freeValue;\n if (forwardCount >= 60) {\n if (MOTORS[0].readNormalizedBackEMF()[1] <= 5) {\n Leds.setLeds(0x9);\n turnback(false);\n }\n }\n if (((state == STATE_IRSENSOR) || (state == STATE_ALL)) && (Math.abs(totalDifference) >= IR_SENSOR_THRESHOLD)) {\n turnback(true);\n } else if ((state == STATE_TOUCHSENSOR || state == STATE_ALL) && (forwardCount >= 6) && (DigitalInputs.getDigitalInput(1))) {\n turnback(false);\n }\n }\n break;\n }\n }\n {\n boolean goingForward = false;\n for (int i = 0; i < 2; i++) {\n if (MOTORS[i].getState() == Motor.STATE_FORWARD) {\n goingForward = true;\n break;\n }\n }\n forwardCount = goingForward ? forwardCount + 1 : 0;\n }\n waitForNextPeriod();\n }\n }\n void turnback(boolean fast) {\n int turnspeed, turnsleep;\n boolean dirLeft = false;\n if (fast) {\n turnspeed = 80;\n turnsleep = 300;\n } else {\n turnspeed = 70;\n turnsleep = 400;\n }\n speed = !fast ? 0x400 : 0x50;\n dirLeft = (Native.rd(Const.IO_US_CNT) & 1) != 0;\n for (int i = 0; i < 2; i++) MOTORS[i].setMotorPercentage(Motor.STATE_BACKWARD, false, 100);\n RtThread.sleepMs(100);\n for (int i = 0; i < 2; i++) MOTORS[i].setMotorPercentage(Motor.STATE_BACKWARD, false, turnspeed);\n RtThread.sleepMs(turnsleep - 100);\n MOTORS[dirLeft ? MOTOR_LEFT : MOTOR_RIGHT].setMotorPercentage(Motor.STATE_BACKWARD, false, 70);\n MOTORS[dirLeft ? MOTOR_RIGHT : MOTOR_LEFT].setState(Motor.STATE_OFF);\n RtThread.sleepMs(600);\n speed = 0x400;\n Leds.setLed(0, false);\n Leds.setLed(3, false);\n }\n };\n RtThread.startMission();\n}\n"
|
"protected void activate(ComponentContext context) throws ServletException, NamespaceException {\n logger.info(\"String_Node_Str\", context.getProperties());\n init(context);\n}\n"
|
"private void closeChannels() {\n for (SocketChannelHolder h : channels) {\n closeChannel(h, true);\n }\n}\n"
|
"public <T extends Map> void dropBigMap(String name, T map) {\n map.clear();\n if (isDBopen()) {\n db.delete(name);\n }\n}\n"
|
"public DTMasterParams doCompute(MasterContext<DTMasterParams, DTWorkerParams> context) {\n if (context.isFirstIteration()) {\n return buildInitialMasterParams();\n }\n if (this.cpMasterParams != null) {\n DTMasterParams tmpMasterParams = rebuildRecoverMasterResultDepthList();\n this.cpMasterParams = null;\n if (this.isGBDT) {\n tmpMasterParams.setTrees(trees.subList(trees.size() - 1, trees.size()));\n tmpMasterParams.setTmpTrees(this.trees);\n }\n return tmpMasterParams;\n }\n boolean isFirst = false;\n Map<Integer, NodeStats> nodeStatsMap = null;\n double trainError = 0d, validationError = 0d;\n double weightedTrainCount = 0d, weightedValidationCount = 0d;\n for (DTWorkerParams params : context.getWorkerResults()) {\n if (!isFirst) {\n isFirst = true;\n nodeStatsMap = params.getNodeStatsMap();\n } else {\n Map<Integer, NodeStats> currNodeStatsmap = params.getNodeStatsMap();\n for (Entry<Integer, NodeStats> entry : nodeStatsMap.entrySet()) {\n NodeStats resultNodeStats = entry.getValue();\n mergeNodeStats(resultNodeStats, currNodeStatsmap.get(entry.getKey()));\n }\n }\n trainError += params.getTrainError();\n validationError += params.getValidationError();\n weightedTrainCount += params.getTrainCount();\n weightedValidationCount += params.getValidationCount();\n }\n for (Entry<Integer, NodeStats> entry : nodeStatsMap.entrySet()) {\n NodeStats nodeStats = entry.getValue();\n int treeId = nodeStats.getTreeId();\n Node doneNode = Node.getNode(trees.get(treeId).getNode(), nodeStats.getNodeId());\n Map<Integer, double[]> statistics = nodeStats.getFeatureStatistics();\n List<GainInfo> gainList = new ArrayList<GainInfo>();\n for (Entry<Integer, double[]> gainEntry : statistics.entrySet()) {\n int columnNum = gainEntry.getKey();\n ColumnConfig config = this.columnConfigList.get(columnNum);\n double[] statsArray = gainEntry.getValue();\n GainInfo gainInfo = this.impurity.computeImpurity(statsArray, config);\n if (gainInfo != null) {\n gainList.add(gainInfo);\n }\n }\n GainInfo maxGainInfo = GainInfo.getGainInfoByMaxGain(gainList);\n if (maxGainInfo == null) {\n doneNode.setLeaf(true);\n continue;\n }\n populateGainInfoToNode(treeId, doneNode, maxGainInfo);\n if (this.isLeafWise) {\n boolean isNotSplit = maxGainInfo.getGain() <= 0d;\n if (!isNotSplit) {\n this.toSplitQueue.offer(new TreeNode(treeId, doneNode));\n } else {\n LOG.info(\"String_Node_Str\", doneNode.getId(), treeId);\n }\n } else {\n boolean isLeaf = maxGainInfo.getGain() <= 0d || Node.indexToLevel(doneNode.getId()) == this.maxDepth;\n doneNode.setLeaf(isLeaf);\n splitNodeForLevelWisedTree(isLeaf, treeId, doneNode);\n }\n }\n if (this.isLeafWise) {\n int currSplitIndex = 0;\n while (!toSplitQueue.isEmpty() && currSplitIndex < this.maxBatchSplitSize) {\n TreeNode treeNode = this.toSplitQueue.poll();\n splitNodeForLeafWisedTree(treeNode.getTreeId(), treeNode.getNode());\n }\n }\n Map<Integer, TreeNode> todoNodes = new HashMap<Integer, TreeNode>();\n DTMasterParams masterParams = new DTMasterParams(weightedTrainCount, trainError, weightedValidationCount, validationError);\n if (toDoQueue.isEmpty()) {\n if (this.isGBDT) {\n TreeNode treeNode = this.trees.get(this.trees.size() - 1);\n Node node = treeNode.getNode();\n if (this.trees.size() == this.treeNum + this.existingTreeSize) {\n masterParams.setHalt(true);\n LOG.info(\"String_Node_Str\", context.getCurrentIteration());\n } else if (node.getLeft() == null && node.getRight() == null) {\n masterParams.setHalt(true);\n LOG.warn(\"String_Node_Str\", context.getCurrentIteration());\n } else {\n masterParams.setFirstTree(this.trees.size() == 1);\n treeNode.setFeatures(null);\n TreeNode newRootNode = new TreeNode(this.trees.size(), new Node(Node.ROOT_INDEX), this.learningRate);\n LOG.info(\"String_Node_Str\", this.trees.size());\n this.trees.add(newRootNode);\n newRootNode.setFeatures(getSubsamplingFeatures(this.featureSubsetStrategy, this.featureSubsetRate));\n todoNodes.put(0, newRootNode);\n masterParams.setTodoNodes(todoNodes);\n masterParams.setSwitchToNextTree(true);\n }\n } else {\n masterParams.setHalt(true);\n LOG.info(\"String_Node_Str\", context.getCurrentIteration());\n }\n } else {\n int nodeIndexInGroup = 0;\n long currMem = 0L;\n List<Integer> depthList = new ArrayList<Integer>();\n if (this.isGBDT) {\n depthList.add(-1);\n }\n if (isRF) {\n for (int i = 0; i < this.trees.size(); i++) {\n depthList.add(-1);\n }\n }\n while (!toDoQueue.isEmpty() && currMem <= this.maxStatsMemory) {\n TreeNode node = this.toDoQueue.poll();\n int treeId = node.getTreeId();\n int oldDepth = this.isGBDT ? depthList.get(0) : depthList.get(treeId);\n int currDepth = Node.indexToLevel(node.getNode().getId());\n if (currDepth > oldDepth) {\n if (this.isGBDT) {\n depthList.set(0, currDepth);\n } else {\n depthList.set(treeId, currDepth);\n }\n }\n List<Integer> subsetFeatures = getSubsamplingFeatures(featureSubsetStrategy);\n node.setFeatures(subsetFeatures);\n currMem += getStatsMem(subsetFeatures);\n todoNodes.put(nodeIndexInGroup, node);\n nodeIndexInGroup += 1;\n }\n masterParams.setTreeDepth(depthList);\n masterParams.setTodoNodes(todoNodes);\n masterParams.setSwitchToNextTree(false);\n masterParams.setContinuousRunningStart(false);\n masterParams.setFirstTree(this.trees.size() == 1);\n LOG.info(\"String_Node_Str\", todoNodes.size());\n }\n if (this.isGBDT) {\n if (masterParams.isSwitchToNextTree()) {\n masterParams.setTrees(trees.subList(trees.size() - 2, trees.size()));\n } else {\n masterParams.setTrees(trees.subList(trees.size() - 1, trees.size()));\n }\n }\n if (this.isRF) {\n if (masterParams.getTreeDepth().size() == this.trees.size()) {\n List<TreeNode> todoTrees = new ArrayList<TreeNode>();\n for (int i = 0; i < trees.size(); i++) {\n if (masterParams.getTreeDepth().get(i) >= 0) {\n todoTrees.add(trees.get(i));\n } else {\n todoTrees.add(new TreeNode(i, new Node(Node.INVALID_INDEX), 1d));\n }\n }\n masterParams.setTrees(todoTrees);\n } else {\n masterParams.setTrees(trees);\n }\n }\n if (this.isGBDT) {\n masterParams.setTmpTrees(this.trees);\n }\n doCheckPoint(context, masterParams);\n LOG.info(\"String_Node_Str\", weightedTrainCount, weightedValidationCount, trainError, validationError);\n return masterParams;\n}\n"
|
"public void determineSimilarities(ISet set, Integer iVAIdContent, Integer iVAIdStorage, EClustererType eClustererType) {\n this.iVAIdContent = iVAIdContent;\n this.iVAIdStorage = iVAIdStorage;\n IVirtualArray contentVA = set.getVA(iVAIdContent);\n IVirtualArray storageVA = set.getVA(iVAIdStorage);\n IDistanceMeasure distanceMeasure;\n if (eDistanceMeasure == EDistanceMeasure.EUCLIDEAN_DISTANCE)\n distanceMeasure = new EuclideanDistance();\n else\n distanceMeasure = new PearsonCorrelation();\n if (eClustererType == EClustererType.GENE_CLUSTERING) {\n if (contentVA.get(0) == 0)\n bStart0 = true;\n else\n bStart0 = false;\n int iNrElements = contentVA.size();\n pbSimilarity.setMinimum(0);\n pbSimilarity.setMaximum(iNrElements);\n float[] dArInstance1 = new float[storageVA.size()];\n float[] dArInstance2 = new float[storageVA.size()];\n int icnt1 = 0, icnt2 = 0, isto = 0;\n int count = 0;\n for (Integer iContentIndex1 : contentVA) {\n pbSimilarity.setSelection(icnt1);\n shell.update();\n isto = 0;\n for (Integer iStorageIndex1 : storageVA) {\n dArInstance1[isto] = set.get(iStorageIndex1).getFloat(EDataRepresentation.NORMALIZED, iContentIndex1);\n isto++;\n }\n icnt2 = 0;\n for (Integer iContentIndex2 : contentVA) {\n isto = 0;\n for (Integer iStorageIndex2 : storageVA) {\n dArInstance2[isto] = set.get(iStorageIndex2).getFloat(EDataRepresentation.NORMALIZED, iContentIndex2);\n isto++;\n }\n if (icnt1 != icnt2) {\n s[count] = -distanceMeasure.getMeasure(dArInstance1, dArInstance2);\n i[count] = icnt1;\n k[count] = icnt2;\n count++;\n }\n icnt2++;\n }\n icnt1++;\n }\n float median = ClusterHelper.median(s);\n for (Integer iContentIndex1 : contentVA) {\n s[count] = median * fClusterFactor;\n if (bStart0 == true) {\n i[count] = iContentIndex1;\n k[count] = iContentIndex1;\n } else {\n i[count] = iContentIndex1 - 1;\n k[count] = iContentIndex1 - 1;\n }\n count++;\n }\n } else {\n if (storageVA.get(0) == 0)\n bStart0 = true;\n else\n bStart0 = false;\n int iNrElements = storageVA.size();\n pbSimilarity.setMinimum(0);\n pbSimilarity.setMaximum(iNrElements);\n float[] dArInstance1 = new float[contentVA.size()];\n float[] dArInstance2 = new float[contentVA.size()];\n int icnt1 = 0, icnt2 = 0, isto = 0;\n int count = 0;\n for (Integer iStorageIndex1 : storageVA) {\n pbSimilarity.setSelection(icnt1);\n shell.update();\n isto = 0;\n for (Integer iContentIndex1 : contentVA) {\n dArInstance1[isto] = set.get(iStorageIndex1).getFloat(EDataRepresentation.NORMALIZED, iContentIndex1);\n isto++;\n }\n icnt2 = 0;\n for (Integer iStorageIndex2 : storageVA) {\n isto = 0;\n for (Integer iContentIndex2 : contentVA) {\n dArInstance2[isto] = set.get(iStorageIndex2).getFloat(EDataRepresentation.NORMALIZED, iContentIndex2);\n isto++;\n }\n if (icnt1 != icnt2) {\n s[count] = -distanceMeasure.getMeasure(dArInstance1, dArInstance2);\n if (bStart0 == true) {\n i[count] = iStorageIndex1;\n k[count] = iStorageIndex2;\n } else {\n i[count] = iStorageIndex1 - 1;\n k[count] = iStorageIndex2 - 1;\n }\n count++;\n }\n icnt2++;\n }\n icnt1++;\n }\n float median = ClusterHelper.median(s);\n for (Integer iStorageIndex1 : storageVA) {\n s[count] = median * fClusterFactor;\n if (bStart0 == true) {\n i[count] = iStorageIndex1;\n k[count] = iStorageIndex1;\n } else {\n i[count] = iStorageIndex1 - 1;\n k[count] = iStorageIndex1 - 1;\n }\n count++;\n }\n }\n}\n"
|
"public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {\n monitor.beginTask(DefaultMessagesImpl.getString(\"String_Node_Str\", analysis.getName()), IProgressMonitor.UNKNOWN);\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n if (listener != null) {\n listener.fireRuningItemChanged(false);\n }\n }\n });\n ReturnCode executed = null;\n AnalysisExecutorThread aet = new AnalysisExecutorThread(analysis, monitor);\n new Thread(aet).start();\n while (true) {\n if (aet.getExecuted() != null) {\n executed = aet.getExecuted();\n break;\n }\n if (monitor.isCanceled()) {\n executed = new ReturnCode(DefaultMessagesImpl.getString(\"String_Node_Str\"), false);\n break;\n }\n }\n aet = null;\n monitor.done();\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n if (listener != null) {\n listener.fireRuningItemChanged(true);\n }\n }\n });\n displayResultStatus(executed);\n return Status.OK_STATUS;\n}\n"
|
"public final void updateResourceSchemaNames(final ResourceTO resourceTO) {\n try {\n resourceSchemaNames = (resourceTO != null && resourceTO.getConnectorId() != null) ? restClient.getSchemaNames(resourceTO.getName()) : Collections.EMPTY_LIST;\n } catch (Exception e) {\n LOG.warn(\"String_Node_Str\", e);\n resourceSchemaNames = Collections.EMPTY_LIST;\n }\n}\n"
|
"private static StringBuffer _translateSingleFSMActor(FSMActor actor, String span, boolean isController, String controllerName, String refinementStateName) throws IllegalActionException {\n String refinementStateActivePremise = \"String_Node_Str\" + refinementStateName.trim();\n StringBuffer returnSmvFormat = new StringBuffer(\"String_Node_Str\");\n returnSmvFormat.append(\"String_Node_Str\");\n if (isController == true) {\n ArrayList<StringBuffer> subModules = _retrieveSubSystemModuleNameParameterInfo(actor);\n for (int i = 0; i < subModules.size(); i++) {\n returnSmvFormat.append(subModules.get(i));\n returnSmvFormat.append(\"String_Node_Str\");\n }\n }\n returnSmvFormat.append(\"String_Node_Str\");\n HashSet<State> frontier = null;\n frontier = _enumerateStateSet(actor);\n Iterator<State> it = frontier.iterator();\n while (it.hasNext()) {\n State val = (State) it.next();\n returnSmvFormat.append(val.getDisplayName());\n if (it.hasNext()) {\n returnSmvFormat.append(\"String_Node_Str\");\n }\n }\n returnSmvFormat.append(\"String_Node_Str\");\n HashSet<String> variableSet = null;\n int numSpan = Integer.parseInt(span);\n variableSet = _decideVariableSet(actor, numSpan);\n Iterator<String> itVariableSet = variableSet.iterator();\n while (itVariableSet.hasNext()) {\n String valName = (String) itVariableSet.next();\n returnSmvFormat.append(\"String_Node_Str\" + valName + \"String_Node_Str\");\n VariableInfo individual = (VariableInfo) _variableInfo.get(valName);\n if (individual == null) {\n throw new IllegalActionException(\"String_Node_Str\");\n } else {\n VariableInfo individual = (VariableInfo) _variableInfo.get(valName);\n int lowerBound = Integer.parseInt(individual._minValue);\n int upperBound = Integer.parseInt(individual._maxValue);\n returnSmvFormat.append(\"String_Node_Str\");\n for (int number = lowerBound; number <= upperBound; number++) {\n returnSmvFormat.append(number);\n returnSmvFormat.append(\"String_Node_Str\");\n }\n returnSmvFormat.append(\"String_Node_Str\");\n }\n }\n HashSet<String> signalVariableSet = null;\n signalVariableSet = _decideSignalVariableSet(actor);\n if (signalVariableSet != null) {\n Iterator<String> itSignalVariableSet = signalVariableSet.iterator();\n while (itSignalVariableSet.hasNext()) {\n String valName = (String) itSignalVariableSet.next();\n variableSet.add(valName);\n }\n }\n returnSmvFormat.append(\"String_Node_Str\");\n String name = actor.getInitialState().getName();\n returnSmvFormat.append(\"String_Node_Str\" + name + \"String_Node_Str\");\n _generateAllVariableTransitions(actor, variableSet);\n returnSmvFormat.append(\"String_Node_Str\");\n returnSmvFormat.append(\"String_Node_Str\");\n LinkedList<VariableTransitionInfo> infoList = _variableTransitionInfo.get(\"String_Node_Str\");\n if (infoList != null) {\n for (int i = 0; i < infoList.size(); i++) {\n VariableTransitionInfo info = infoList.get(i);\n if (refinementStateName.equalsIgnoreCase(\"String_Node_Str\")) {\n returnSmvFormat.append(\"String_Node_Str\" + info._preCondition + \"String_Node_Str\" + info._varibleNewValue + \"String_Node_Str\");\n } else {\n returnSmvFormat.append(\"String_Node_Str\" + refinementStateActivePremise + \"String_Node_Str\" + info._preCondition + \"String_Node_Str\" + info._varibleNewValue + \"String_Node_Str\");\n }\n }\n }\n returnSmvFormat.append(\"String_Node_Str\");\n returnSmvFormat.append(\"String_Node_Str\");\n HashMap<String, String> variableInitialValue;\n variableInitialValue = _retrieveVariableInitialValue(actor, variableSet);\n Iterator<String> newItVariableSet = variableSet.iterator();\n while (newItVariableSet.hasNext()) {\n String valName = (String) newItVariableSet.next();\n boolean b = Pattern.matches(\"String_Node_Str\", valName);\n if (b == true) {\n } else {\n returnSmvFormat.append(\"String_Node_Str\" + valName + \"String_Node_Str\" + variableInitialValue.get(valName) + \"String_Node_Str\");\n returnSmvFormat.append(\"String_Node_Str\" + valName + \"String_Node_Str\");\n returnSmvFormat.append(\"String_Node_Str\");\n List<VariableTransitionInfo> innerInfoList = _variableTransitionInfo.get(valName);\n if (innerInfoList != null) {\n for (int i = 0; i < innerInfoList.size(); i++) {\n VariableTransitionInfo info = innerInfoList.get(i);\n if (refinementStateName.equalsIgnoreCase(\"String_Node_Str\")) {\n returnSmvFormat.append(\"String_Node_Str\" + info._preCondition + \"String_Node_Str\" + info._varibleNewValue + \"String_Node_Str\");\n } else {\n returnSmvFormat.append(\"String_Node_Str\" + refinementStateActivePremise + \"String_Node_Str\" + info._preCondition + \"String_Node_Str\" + info._varibleNewValue + \"String_Node_Str\");\n }\n }\n }\n returnSmvFormat.append(\"String_Node_Str\" + valName + \"String_Node_Str\");\n returnSmvFormat.append(\"String_Node_Str\");\n }\n }\n StringBuffer frontAttachment = new StringBuffer(\"String_Node_Str\" + actor.getName() + \"String_Node_Str\");\n ArrayList<String> guardSignalVariableInfo = _globalSignalDistributionInfo.get(actor.getName());\n if (guardSignalVariableInfo == null) {\n HashSet<String> guardSignalVariableSet = null;\n guardSignalVariableSet = _decideGuardSignalVariableSet(actor);\n Iterator<String> itGuardSignalVariableSet = guardSignalVariableSet.iterator();\n while (itGuardSignalVariableSet.hasNext()) {\n String valName = (String) itGuardSignalVariableSet.next();\n if (itGuardSignalVariableSet.hasNext() == true) {\n frontAttachment.append(valName + \"String_Node_Str\");\n } else {\n frontAttachment.append(valName);\n }\n }\n } else {\n for (int i = 0; i < guardSignalVariableInfo.size(); i++) {\n String valName = guardSignalVariableInfo.get(i);\n if (i != guardSignalVariableInfo.size() - 1) {\n frontAttachment.append(valName + \"String_Node_Str\");\n } else {\n frontAttachment.append(valName);\n }\n }\n }\n if (refinementStateName.trim().equalsIgnoreCase(\"String_Node_Str\")) {\n frontAttachment.append(\"String_Node_Str\");\n } else {\n if (guardSignalVariableInfo.size() == 0) {\n frontAttachment.append(\"String_Node_Str\");\n } else {\n frontAttachment.append(\"String_Node_Str\");\n }\n }\n frontAttachment.append(returnSmvFormat);\n if (signalVariableSet != null) {\n if ((signalVariableSet.size() != 0)) {\n frontAttachment.append(\"String_Node_Str\");\n Iterator<String> newItSignalVariableSet = signalVariableSet.iterator();\n while (newItSignalVariableSet.hasNext()) {\n String valName = (String) newItSignalVariableSet.next();\n frontAttachment.append(\"String_Node_Str\" + valName + \"String_Node_Str\");\n List<VariableTransitionInfo> innerInfoList = _variableTransitionInfo.get(valName);\n if (innerInfoList != null) {\n for (int i = 0; i < innerInfoList.size(); i++) {\n VariableTransitionInfo info = innerInfoList.get(i);\n if (i == innerInfoList.size() - 1) {\n if (refinementStateName.equalsIgnoreCase(\"String_Node_Str\")) {\n frontAttachment.append(\"String_Node_Str\" + info._preCondition + \"String_Node_Str\");\n } else {\n frontAttachment.append(\"String_Node_Str\" + refinementStateActivePremise + \"String_Node_Str\" + info._preCondition + \"String_Node_Str\");\n }\n } else {\n if (refinementStateName.equalsIgnoreCase(\"String_Node_Str\")) {\n frontAttachment.append(\"String_Node_Str\" + info._preCondition + \"String_Node_Str\");\n } else {\n frontAttachment.append(\"String_Node_Str\" + refinementStateActivePremise + \"String_Node_Str\" + info._preCondition + \"String_Node_Str\");\n }\n }\n }\n }\n }\n }\n }\n return frontAttachment;\n}\n"
|
"public Object setValue(Object newValue) {\n final Object previousValue = this.value;\n this.value = newValue;\n return oldValue;\n}\n"
|
"private static void computeModels(Map<URI, URI> pluginMap, Map<String, URI> nsURIMap) {\n IWorkspaceRoot root = getWorkspaceRoot();\n Object[] activeModels = (Object[]) invoke(null, PLUGIN_REGISTRY_GET_ACTIVE_MODELS_METHOD, Boolean.FALSE);\n LOOP: for (Object activeModel : activeModels) {\n Object bundleDescription = invoke(activeModel, PLUGIN_MODEL_BASE_GET_BUNDLE_DESCRIPTION_METHOD);\n String symbolicName = (String) invoke(bundleDescription, BUNDLE_DESCRIPTION_GET_SYMBOLIC_NAME_METHOD);\n IResource underlyingResource = (IResource) invoke(activeModel, PLUGIN_MODEL_BASE_GET_UNDERLYING_RESOURCE_METHOD);\n String installLocation = (String) invoke(activeModel, PLUGIN_MODEL_BASE_GET_INSTALL_LOCATION_METHOD);\n URI location = null;\n if (underlyingResource != null) {\n location = URI.createPlatformResourceURI(underlyingResource.getProject().getFullPath().toString(), true);\n } else if (installLocation != null) {\n File file = new File(installLocation);\n if (file.isDirectory()) {\n location = URI.createFileURI(installLocation);\n } else {\n location = URI.createURI(\"String_Node_Str\" + URI.createFileURI(installLocation) + \"String_Node_Str\");\n }\n }\n if (location != null) {\n URI logicalLocation = null;\n Object extensions = invoke(activeModel, PLUGIN_MODEL_BASE_GET_EXTENSIONS_METHOD);\n Object[] pluginExtensions = (Object[]) invoke(extensions, EXTENSIONS_GET_EXTENSIONS_METHOD);\n for (Object pluginExtension : pluginExtensions) {\n String point = (String) invoke(pluginExtension, PLUGIN_EXTENSION_GET_POINT_METHOD);\n if (\"String_Node_Str\".equals(point)) {\n Object[] children = (Object[]) invoke(pluginExtension, PLUGIN_EXTENSION_GET_CHILDREN_METHOD);\n for (Object child : children) {\n if (PLUGIN_ELEMENT_CLASS.isInstance(child)) {\n Object uri = invoke(child, PLUGIN_ELEMENT_GET_ATTRIBUTE_METHOD, \"String_Node_Str\");\n Object genModel = invoke(child, PLUGIN_ELEMENT_GET_ATTRIBUTE_METHOD, \"String_Node_Str\");\n if (uri != null && genModel != null) {\n if (logicalLocation == null) {\n URI platformPluginURI = URI.createPlatformPluginURI(symbolicName, true).appendSegment(\"String_Node_Str\");\n if (location.isPlatformResource()) {\n if (pluginMap != null) {\n pluginMap.put(platformPluginURI, location.appendSegment(\"String_Node_Str\"));\n }\n logicalLocation = location;\n } else {\n logicalLocation = URI.createPlatformResourceURI(symbolicName, true);\n URI resourceURI = logicalLocation.appendSegment(\"String_Node_Str\");\n boolean exists = root.getProject(symbolicName).isAccessible();\n if (pluginMap != null) {\n if (location.isFile()) {\n pluginMap.put(platformPluginURI, location.appendSegment(\"String_Node_Str\"));\n if (!exists) {\n pluginMap.put(resourceURI, location.appendSegment(\"String_Node_Str\"));\n }\n } else {\n pluginMap.put(platformPluginURI, location);\n if (!exists) {\n pluginMap.put(resourceURI, location);\n }\n }\n }\n }\n }\n if (nsURIMap == null) {\n continue LOOP;\n }\n nsURIMap.put((String) invoke(uri, PLUGIN_ATTRIBUTE_GET_VALUE_METHOD), logicalLocation.appendSegments(new Path((String) invoke(genModel, PLUGIN_ATTRIBUTE_GET_VALUE_METHOD)).segments()));\n }\n }\n }\n }\n }\n }\n }\n}\n"
|
"private Vector<String> ContainerLinks(String url) {\n Vector<String> links = new Vector<String>();\n boolean fileDownloaded = false;\n if (!url.startsWith(\"String_Node_Str\"))\n url = \"String_Node_Str\" + url;\n try {\n RequestInfo reqinfo = getRequest(new URL(url));\n String cookie = reqinfo.getCookie();\n File captchaFile = null;\n String capTxt = null;\n while (true) {\n Matcher matcher = patternCaptcha.matcher(reqinfo.getHtmlCode());\n if (matcher.find()) {\n if (captchaFile != null && capTxt != null) {\n JDUtilities.appendInfoToFilename(captchaFile, capTxt, false);\n }\n Vector<Vector<String>> gifs = getAllSimpleMatches(reqinfo.getHtmlCode(), patternCaptcha);\n String captchaAdress = \"String_Node_Str\" + gifs.firstElement().get(1);\n captchaFile = getLocalCaptchaFile(this, \"String_Node_Str\");\n fileDownloaded = JDUtilities.download(captchaFile, getRequestWithoutHtmlCode(new URL(captchaAdress), cookie, null, true).getConnection());\n if (!fileDownloaded || !captchaFile.exists() || captchaFile.length() == 0) {\n logger.severe(\"String_Node_Str\");\n try {\n Thread.sleep(1000);\n reqinfo = getRequest(new URL(url));\n cookie = reqinfo.getCookie();\n } catch (InterruptedException e) {\n }\n continue;\n }\n capTxt = Plugin.getCaptchaCode(captchaFile, this);\n reqinfo = postRequest(new URL(url), \"String_Node_Str\" + matcher.group(1) + \"String_Node_Str\" + capTxt + \"String_Node_Str\");\n } else {\n if (captchaFile != null && capTxt != null) {\n JDUtilities.appendInfoToFilename(captchaFile, capTxt, true);\n }\n break;\n }\n }\n if (reqinfo.getLocation() != null) {\n links.add(reqinfo.getLocation());\n }\n Pattern pattern = Pattern.compile(\"String_Node_Str\", Pattern.CASE_INSENSITIVE);\n Matcher matcher = pattern.matcher(reqinfo.getHtmlCode());\n while (matcher.find()) {\n reqinfo = getRequest(new URL(matcher.group(1)));\n reqinfo = getRequest(new URL(getBetween(reqinfo.getHtmlCode(), \"String_Node_Str\", \"String_Node_Str\")));\n links.add(reqinfo.getLocation());\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n return links;\n}\n"
|
"public String getReplacementName(String oldName) {\n return whitelist.contains(oldName) ? delegate.getReplacementName(oldName) : null;\n}\n"
|
"public static void main(String[] args) {\n String argument = args[0];\n Properties props = readCybsProperty();\n String requestID;\n String decision;\n Document authReply;\n Document captureReply;\n int choice = sample.enum_exist(argument);\n switch(choice) {\n case 0:\n authReply = runAuth(props, \"String_Node_Str\");\n if (authReply == null)\n break;\n requestID = getRequestID(authReply);\n decision = getDecisonCode(authReply);\n break;\n case 1:\n authReply = runAuth(props, \"String_Node_Str\");\n if (authReply == null)\n break;\n requestID = getRequestID(authReply);\n decision = getDecisonCode(authReply);\n if (!((\"String_Node_Str\".equals(requestID)) && (decision.equalsIgnoreCase(\"String_Node_Str\")))) {\n runCapture(props, requestID, \"String_Node_Str\");\n }\n break;\n case 2:\n authReply = runAuthEMV(props, \"String_Node_Str\");\n if (authReply == null)\n break;\n requestID = getRequestID(authReply);\n decision = getDecisonCode(authReply);\n break;\n case 3:\n authReply = runAuth(props, \"String_Node_Str\");\n if (authReply == null)\n break;\n requestID = getRequestID(authReply);\n decision = getDecisonCode(authReply);\n captureReply = runCapture(props, requestID, \"String_Node_Str\");\n requestID = getRequestID(captureReply);\n decision = getDecisonCode(captureReply);\n if (!((\"String_Node_Str\".equals(requestID)) && (\"String_Node_Str\".equalsIgnoreCase(decision))))\n runCredit(props, requestID, \"String_Node_Str\");\n break;\n case 4:\n authReply = runAuth(props, \"String_Node_Str\");\n if (authReply == null)\n break;\n requestID = getRequestID(authReply);\n decision = getDecisonCode(authReply);\n if (!((\"String_Node_Str\".equals(requestID)) && \"String_Node_Str\".equalsIgnoreCase(decision)))\n runAuthReversal(props, requestID, \"String_Node_Str\");\n break;\n case 5:\n runSale(props, \"String_Node_Str\");\n break;\n case -1:\n System.out.println(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n break;\n default:\n break;\n }\n}\n"
|
"public void testReplaceIndexedWithUnindexedByByYear() throws Exception {\n testReplaceIndexedColWithUnindexed(PartitionBy.YEAR, 1000000 * 60 * 5 * 24L * 10L, 2, false);\n}\n"
|
"void publish(MessagingService messagingService) throws IOException {\n if (payloads.isEmpty()) {\n return;\n }\n int failureCount = 0;\n long startTime = -1L;\n boolean done = false;\n while (!done) {\n try {\n messagingService.publish(StoreRequestBuilder.of(topicId).addPayloads(payloads.iterator()).build());\n payloads.clear();\n done = true;\n } catch (TopicNotFoundException | ServiceUnavailableException e) {\n if (startTime < 0) {\n startTime = System.currentTimeMillis();\n }\n long retryMillis = getRetryStrategy().nextRetry(++failureCount, startTime);\n if (retryMillis < 0) {\n throw new IOException(\"String_Node_Str\", e);\n }\n LOG.debug(\"String_Node_Str\", e.getMessage(), retryMillis);\n if (interrupted) {\n LOG.warn(\"String_Node_Str\");\n done = true;\n }\n }\n }\n}\n"
|
"private UpdateReference createUpdatedReferenceOperation(EObject left, EObject right, EReference reference, EObject addedValue, EObject deletedValue) {\n final UpdateReference operation = DiffFactory.eINSTANCE.createUpdateReference();\n operation.setLeftElement(left);\n operation.setRightElement(right);\n operation.setReference(reference);\n EObject rightTarget = getMatchedEObject(addedValue);\n EObject leftTarget = getMatchedEObject(deletedValue);\n if (leftTarget == null) {\n leftTarget = addedValue;\n }\n if (rightTarget == null) {\n rightTarget = deletedValue;\n }\n operation.setLeftTarget(leftTarget);\n operation.setRightTarget(rightTarget);\n return operation;\n}\n"
|
"public File getMapDBFile() {\n return MapDBManager.createPath(ResourceManager.getMapDBFilePath(), ResourceManager.getMapDBFileName(this));\n}\n"
|
"public static void setPosixOwners(String path, int ownerId, int groupId) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchFieldException {\n Class<?> fileSystemsClass = Class.forName(\"String_Node_Str\");\n Class<?> fileSystemClass = Class.forName(\"String_Node_Str\");\n Class<?> pathClass = Class.forName(\"String_Node_Str\");\n Class<?> filesClass = Class.forName(\"String_Node_Str\");\n Class<?> linkOptionClass = Class.forName(\"String_Node_Str\");\n Method fileSystemsGetDefaultMethod = fileSystemsClass.getMethod(\"String_Node_Str\");\n Method fileSystemGetPathMethod = fileSystemClass.getMethod(\"String_Node_Str\", String.class, String[].class);\n Field noFollowLinksField = linkOptionClass.getField(\"String_Node_Str\");\n Object noFollowLinksObject = noFollowLinksField.get(null);\n Object linkOptionsArray = Array.newInstance(linkOptionClass, 1);\n Array.set(linkOptionsArray, 0, noFollowLinksObject);\n Object defaultFileSystemObject = fileSystemsGetDefaultMethod.invoke(null);\n Object pObject = fileSystemGetPathMethod.invoke(defaultFileSystemObject, path, new String[0]);\n Method filesSetAttributeMethod = filesClass.getMethod(\"String_Node_Str\", pathClass, String.class, Object.class, linkOptionsArray.getClass());\n try {\n filesSetAttributeMethod.invoke(null, pObject, \"String_Node_Str\", Integer.valueOf(ownerId), linkOptionsArray);\n filesSetAttributeMethod.invoke(null, pObject, \"String_Node_Str\", Integer.valueOf(groupId), linkOptionsArray);\n } catch (InvocationTargetException ex) {\n if (ex.getCause() instanceof UnsupportedOperationException) {\n } else {\n throw ex;\n }\n }\n}\n"
|
"public void onBindViewHolder(ConnectionViewHolder holder, int position) {\n final PublicizeConnection connection = mConnections.get(position);\n holder.txtUser.setText(connection.getExternalDisplayName());\n holder.divider.setVisibility(position == 0 ? View.GONE : View.VISIBLE);\n if (connection.hasExternalProfilePictureUrl()) {\n holder.imgAvatar.setImageUrl(connection.getExternalProfilePictureUrl(), WPNetworkImageView.ImageType.AVATAR);\n } else {\n holder.imgAvatar.showDefaultGravatarImageAndNullifyUrl();\n }\n holder.btnConnect.setAction(PublicizeConstants.ConnectAction.DISCONNECT);\n holder.btnConnect.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n if (mActionListener != null) {\n mActionListener.onRequestDisconnect(connection);\n }\n }\n });\n}\n"
|
"private void loginToWPCom(WebView view, SiteModel site) {\n String authenticationURL = WPWebViewActivity.getSiteLoginUrl(site);\n String postData = WPWebViewActivity.getAuthenticationPostData(authenticationURL, mRedirectPage, site.getUsername(), site.getPassword(), mAccountStore.getAccessToken());\n view.postUrl(authenticationURL, postData.getBytes());\n}\n"
|
"private SetMap<BufferedInitialSet> populateDivets(FlatFile file) {\n SetMap<BufferedInitialSet> tSet = new SetMap<>();\n readNameMappings divMaps = new readNameMappings();\n ArrayList<ReadPair> tempholder = new ArrayList<>();\n BufferedReader divetReader = ReaderReturn.openFile(file.getDivet().toFile());\n try {\n String line;\n String[] segs;\n while ((line = divetReader.readLine()) != null) {\n segs = line.split(\"String_Node_Str\");\n if (segs.length < 13)\n continue;\n if ((segs[1].equals(this.chr))) {\n divMaps.addRead(segs[0].trim());\n if (!segs[13].equals(\"String_Node_Str\") && Double.valueOf(segs[12]) > pfilter && !segs[9].equals(\"String_Node_Str\") && !segs[9].equals(\"String_Node_Str\")) {\n ReadPair rp = new ReadPair(line, file, readEnum.IsDisc);\n tempholder.add(rp);\n }\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(BufferedReader.class.getName()).log(Level.SEVERE, null, ex);\n }\n int gapCount = 0;\n int curSetCount = 0;\n for (ReadPair d : tempholder) {\n d.setMapCount(divMaps.retMap(d.Name()));\n if (this.useGapOverlap) {\n if (gaps.checkGapOverlap(d)) {\n gapCount++;\n continue;\n }\n }\n if (!tSet.checkAndCombinePairs(d)) {\n BufferedInitialSet temp = new BufferedInitialSet(this.buffer, \"String_Node_Str\");\n temp.bufferedAdd(d);\n tSet.addBedData(temp);\n curSetCount++;\n if (curSetCount % 100000 == 0) {\n log.log(Level.FINE, \"String_Node_Str\" + curSetCount + \"String_Node_Str\" + tempholder.size());\n }\n }\n }\n log.log(Level.INFO, \"String_Node_Str\" + gapCount + \"String_Node_Str\");\n return tSet;\n}\n"
|
"public final void compute(Bounds bo) throws ChartException, IllegalArgumentException {\n bo = bo.scaledInstance(dPointToPixel);\n dSeriesThickness = (ids.getDpiResolution() / 72d) * cwa.getSeriesThickness();\n double dX = bo.getLeft() + insCA.getLeft();\n double dY = bo.getTop() + insCA.getTop();\n double dW = bo.getWidth() - insCA.getLeft() - insCA.getRight();\n double dH = bo.getHeight() - insCA.getTop() - insCA.getBottom();\n iDimension = getDimension(cwa.getDimension());\n dXAxisPlotSpacing = cwa.getPlot().getHorizontalSpacing() * dPointToPixel;\n dYAxisPlotSpacing = cwa.getPlot().getVerticalSpacing() * dPointToPixel;\n if (iDimension == TWO_5_D) {\n dY += dSeriesThickness;\n dH -= dSeriesThickness;\n dW -= dSeriesThickness;\n bo.setHeight(dH);\n bo.setTop(dY);\n bo.setWidth(dW);\n }\n if (aax.getOverlayCount() > 0) {\n if (aax.areAxesSwapped()) {\n updateOverlayScales(aax, dX, dX + dW, dY, dH);\n dY = aax.getStart();\n dH = aax.getLength();\n } else {\n updateOverlayScales(aax, dY - dH, dY, dX, dW);\n dX = aax.getStart();\n dW = aax.getLength();\n }\n }\n double dStart, dEnd;\n final Axis[] axa = cwa.getPrimaryBaseAxes();\n final Axis axPrimaryBase = axa[0];\n final Axis axPrimaryOrthogonal = cwa.getPrimaryOrthogonalAxis(axPrimaryBase);\n Scale sc = axPrimaryBase.getScale();\n AutoScale scPrimaryBase = null;\n OneAxis oaxPrimaryBase = aax.getPrimaryBase();\n int iAxisType = getAxisType(axPrimaryBase);\n Object oaData = null;\n if (iAxisType == TEXT || oaxPrimaryBase.isCategoryScale()) {\n oaData = getTypedDataSet(axPrimaryBase, iAxisType, 0);\n } else if ((iAxisType & NUMERICAL) == NUMERICAL) {\n oaData = getMinMax(axPrimaryBase, iAxisType);\n } else if ((iAxisType & DATE_TIME) == DATE_TIME) {\n oaData = getMinMax(axPrimaryBase, iAxisType);\n }\n DataSetIterator dsi = (oaData instanceof DataSetIterator) ? (DataSetIterator) oaData : new DataSetIterator(oaData, iAxisType);\n oaData = null;\n dStart = (aax.areAxesSwapped()) ? dY + dH : dX;\n dEnd = (aax.areAxesSwapped()) ? dY : dStart + dW;\n int iDirection = AUTO;\n scPrimaryBase = AutoScale.computeScale(ids, oaxPrimaryBase, dsi, iAxisType, dStart, dEnd, sc, axPrimaryBase.getFormatSpecifier(), rtc, iDirection, 1, iMarginPercent);\n oaxPrimaryBase.set(scPrimaryBase);\n AutoScale scPrimaryOrthogonal = null;\n OneAxis oaxPrimaryOrthogonal = aax.getPrimaryOrthogonal();\n iAxisType = getAxisType(axPrimaryOrthogonal);\n oaData = null;\n if ((iAxisType & NUMERICAL) == NUMERICAL || (iAxisType & DATE_TIME) == DATE_TIME) {\n dsi = new DataSetIterator(getMinMax(axPrimaryOrthogonal, iAxisType), iAxisType);\n } else {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.DATA_FORMAT, \"String_Node_Str\", Messages.getResourceBundle(rtc.getULocale()));\n }\n dStart = (aax.areAxesSwapped()) ? dX : dY + dH;\n dEnd = (aax.areAxesSwapped()) ? dX + dW : dY;\n sc = axPrimaryOrthogonal.getScale();\n scPrimaryOrthogonal = AutoScale.computeScale(ids, oaxPrimaryOrthogonal, dsi, iAxisType, dStart, dEnd, sc, oaxPrimaryBase.getModelAxis().getOrigin(), axPrimaryOrthogonal.getFormatSpecifier(), rtc, AUTO, 1, iMarginPercent);\n oaxPrimaryOrthogonal.set(scPrimaryOrthogonal);\n double dYAxisLocation = adjustHorizontal(dX, dW, aax);\n double dXAxisLocation = adjustVerticalDueToHorizontal(dY, dH, aax);\n iAxisType = getAxisType(axPrimaryOrthogonal);\n oaData = getTypedDataSet(axPrimaryOrthogonal, iAxisType, 0);\n scPrimaryOrthogonal.setData(dsi);\n iAxisType = getAxisType(axPrimaryBase);\n if (iAxisType != IConstants.TEXT) {\n scPrimaryBase.setData(getTypedDataSet(axPrimaryBase, iAxisType, 0));\n }\n scPrimaryBase.resetShifts();\n scPrimaryOrthogonal.resetShifts();\n updateOverlayAxes(aax);\n growBaseAxis(aax, bo);\n final OneAxis axPH = aax.areAxesSwapped() ? aax.getPrimaryOrthogonal() : aax.getPrimaryBase();\n final OneAxis axPV = aax.areAxesSwapped() ? aax.getPrimaryBase() : aax.getPrimaryOrthogonal();\n axPH.setAxisCoordinate(dXAxisLocation);\n axPV.setAxisCoordinate(dYAxisLocation);\n double[] daX = axPH.getScale().getEndPoints();\n double[] daY = axPV.getScale().getEndPoints();\n if (axPH.getScale().getDirection() == BACKWARD) {\n boPlotBackground.setLeft(daX[1] - insCA.getLeft());\n boPlotBackground.setWidth(daX[0] - daX[1] + insCA.getLeft() + insCA.getRight() + 1);\n } else {\n boPlotBackground.setLeft(daX[0] - insCA.getLeft());\n boPlotBackground.setWidth(daX[1] - daX[0] + insCA.getLeft() + insCA.getRight() + 1);\n }\n if (axPV.getScale().getDirection() == FORWARD) {\n boPlotBackground.setTop(daY[0] - insCA.getTop());\n boPlotBackground.setHeight(daY[1] - daY[0] + insCA.getTop() + insCA.getBottom() + 1);\n } else {\n boPlotBackground.setTop(daY[1] - insCA.getTop());\n boPlotBackground.setHeight(daY[0] - daY[1] + insCA.getTop() + insCA.getBottom() + 1);\n }\n if (iDimension == TWO_5_D) {\n boPlotBackground.delta(dSeriesThickness, -dSeriesThickness, 0, 0);\n }\n boPlotWithMargin = BoundsImpl.copyInstance(boPlotBackground);\n if (iMarginPercent > 0) {\n AutoScale scale = axPH.getScale();\n if (scale.getMaxWithMargin() != null || scale.getMinWithMargin() != null) {\n if ((scale.getType() & LINEAR) == LINEAR) {\n double factor = Math.abs(daX[1] - daX[0]) / (asDouble(scale.getMaximum()).doubleValue() - asDouble(scale.getMinimum()).doubleValue());\n if (scale.getMinWithMargin() != null) {\n boPlotWithMargin.setLeft(boPlotWithMargin.getLeft() - factor * (asDouble(scale.getMinimum()).doubleValue() - asDouble(scale.getMinWithMargin()).doubleValue()));\n }\n boPlotWithMargin.setWidth(factor * (asDouble(scale.getMaxWithMargin() == null ? scale.getMaximum() : scale.getMaxWithMargin()).doubleValue() - asDouble(scale.getMinWithMargin() == null ? scale.getMinimum() : scale.getMinWithMargin()).doubleValue()) + insCA.getLeft() + insCA.getRight() + 1);\n }\n }\n scale = axPV.getScale();\n if (scale.getMaxWithMargin() != null || scale.getMinWithMargin() != null) {\n if ((scale.getType() & LINEAR) == LINEAR) {\n double factor = Math.abs(daX[1] - daX[0]) / (asDouble(scale.getMaximum()).doubleValue() - asDouble(scale.getMinimum()).doubleValue());\n if (scale.getMaxWithMargin() != null) {\n boPlotWithMargin.setTop(boPlotWithMargin.getTop() - factor * (asDouble(scale.getMaxWithMargin()).doubleValue() - asDouble(scale.getMaximum()).doubleValue()));\n }\n boPlotWithMargin.setHeight(factor * (asDouble(scale.getMaxWithMargin() == null ? scale.getMaximum() : scale.getMaxWithMargin()).doubleValue() - asDouble(scale.getMinWithMargin() == null ? scale.getMinimum() : scale.getMinWithMargin()).doubleValue()) + insCA.getTop() + insCA.getBottom() + 1);\n }\n }\n }\n}\n"
|
"public BigDecimal setScale(final BigDecimal decimal) {\n return decimal.setScale(PRECISION, ROUNDING_MODE);\n}\n"
|
"public static Connection createConnection(Sql2o sql2o) {\n Properties conProps = new Properties();\n conProps.put(\"String_Node_Str\", sql2o.getUser());\n conProps.put(\"String_Node_Str\", sql2o.getPass());\n Connection con;\n try {\n if (!sql2o.getUrl().startsWith(\"String_Node_Str\")) {\n sql2o.setUrl(\"String_Node_Str\" + sql2o.getUrl());\n }\n con = DriverManager.getConnection(sql2o.getUrl(), conProps);\n } catch (Exception ex) {\n throw new RuntimeException(ex);\n }\n return con;\n}\n"
|
"private void onPanelDragged(int newTop) {\n mSlideState = PanelState.DRAGGING;\n mSlideOffset = computeSlideOffset(newTop);\n if (mParallaxOffset > 0 && mSlideOffset >= 0) {\n int mainViewOffset = getCurrentParalaxOffset();\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\n mMainView.setTranslationY(mainViewOffset);\n } else {\n AnimatorProxy.wrap(mMainView).setTranslationY(mainViewOffset);\n }\n }\n dispatchOnPanelSlide(mSlideableView);\n LayoutParams lp = (LayoutParams) mMainView.getLayoutParams();\n int defaultHeight = getHeight() - getPaddingBottom() - getPaddingTop() - mPanelHeight;\n if (mSlideOffset <= 0 && !mOverlayContent) {\n lp.height = mIsSlidingUp ? (newTop - getPaddingBottom()) : (getHeight() - getPaddingBottom() - mSlideableView.getMeasuredHeight() - newTop);\n mMainView.requestLayout();\n } else if (lp.height != defaultHeight && !mOverlayContent) {\n lp.height = defaultHeight;\n mMainView.requestLayout();\n }\n}\n"
|
"protected static String locateSystemLog() {\n String filename = null;\n String osName = service.getInfo().getOsName();\n if (osName.equals(\"String_Node_Str\"))\n filename = \"String_Node_Str\";\n else if (osName.equals(\"String_Node_Str\")) {\n String[] filenames = { \"String_Node_Str\", \"String_Node_Str\" };\n for (String candidate : filenames) {\n if (new File(candidate).exists()) {\n filename = candidate;\n }\n }\n } else if (osName.equals(\"String_Node_Str\")) {\n filename = \"String_Node_Str\";\n } else {\n throw new RuntimeException(\"String_Node_Str\" + osName + \"String_Node_Str\");\n }\n return filename;\n}\n"
|
"public void run() {\n refreshSummary(summary);\n}\n"
|
"public void remove() throws Exception {\n IShardingKey<?> shardingValue = new ShardingKey<Integer>(CLUSTER_KLSTORAGE, 1);\n DB db = cacheClient.getDbCluster().selectDbFromMaster(\"String_Node_Str\", shardingValue);\n primaryCache.remove(db, 1);\n Assert.assertNull(primaryCache.get(db, 1));\n for (int i = 2; i <= 10; i++) {\n primaryCache.remove(db, Arrays.asList(new Number[] { 2, 3, 4, 5, 5, 6 }));\n }\n for (int i = 2; i <= 10; i++) {\n Assert.assertNull(primaryCache.get(db, i));\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.