content
stringlengths 40
137k
|
---|
"public void onPlayerMove(PlayerMoveEvent event) {\n CPlayer onlinePlayer = Core.getOnlinePlayer(event.getPlayer());\n MobNPCEnderDragon enderBarFor = manager.enderBars.get(onlinePlayer);\n Point current = Point.of(event.getTo());\n current.setY(-300D);\n if (enderBarFor != null && enderBarFor.isSpawned() && current.distanceSquared(enderBarFor.getLocation()) > 9) {\n enderBarFor.move(Point.of(event.getTo().getX(), -300d, event.getTo().getZ(), 0F, 0F));\n }\n}\n"
|
"public synchronized int hashCode() {\n if (__hashCodeCalc) {\n return 0;\n }\n __hashCodeCalc = true;\n int _hashCode = 1;\n _hashCode += Long.valueOf(getId()).hashCode();\n _hashCode += getS_Count();\n _hashCode += getG_Count();\n if (getCH_Row() != null) {\n _hashCode += getCH_Row().hashCode();\n }\n if (getTC_Row() != null) {\n _hashCode += getTC_Row().hashCode();\n }\n if (getSections() != null) {\n _hashCode += getSections().hashCode();\n }\n if (getGroups() != null) {\n _hashCode += getGroups().hashCode();\n }\n __hashCodeCalc = false;\n return _hashCode;\n}\n"
|
"public void setText(String t) {\n lastLine = -1;\n super.setText(t, contentType);\n}\n"
|
"public void importDatabase(String filename) throws IOException {\n String internalDbPath = getDatabasePath(this.context);\n String internalSpPath = \"String_Node_Str\";\n close();\n Log.w(\"String_Node_Str\", Constants.BACKUPPATH + \"String_Node_Str\" + filename);\n try {\n File newDb = new File(Constants.BACKUPPATH + \"String_Node_Str\" + filename);\n File oldDb = new File(internalDbPath);\n File newSp = new File(Constants.BACKUPPATH + \"String_Node_Str\" + filename + \"String_Node_Str\");\n File oldSp = new File(internalSpPath);\n copyFile(newDb, oldDb);\n copyFile(newSp, oldSp);\n } catch (IOException e) {\n e.printStackTrace();\n }\n}\n"
|
"private Annotation createAnnotation(TreeLogger logger, Class<? extends Annotation> annotationClass, AnnotationData annotationData) {\n Map<String, Object> values = Maps.newHashMap(annotationData.getValues());\n for (Map.Entry<String, Object> entry : values.entrySet()) {\n Method method = null;\n Throwable caught = null;\n try {\n method = annotationClass.getMethod(entry.getKey());\n entry.setValue(resolveAnnotationValue(logger, method.getReturnType(), entry.getValue()));\n } catch (SecurityException e) {\n caught = e;\n } catch (NoSuchMethodException e) {\n caught = e;\n }\n if (caught != null) {\n logger.log(TreeLogger.WARN, \"String_Node_Str\" + annotationClass.getCanonicalName() + \"String_Node_Str\" + entry.getKey() + \"String_Node_Str\" + caught.getMessage());\n return null;\n }\n }\n return AnnotationProxyFactory.create(annotationClass, values);\n}\n"
|
"public void create() {\n Random.seed(Dungeon.seedCurDepth());\n if (!(Dungeon.bossLevel() || Dungeon.depth == 21)) {\n addItemToSpawn(Generator.random(Generator.Category.FOOD));\n if (Dungeon.posNeeded()) {\n addItemToSpawn(new PotionOfStrength());\n Dungeon.LimitedDrops.STRENGTH_POTIONS.count++;\n }\n if (Dungeon.souNeeded()) {\n addItemToSpawn(new ScrollOfUpgrade());\n Dungeon.LimitedDrops.UPGRADE_SCROLLS.count++;\n }\n if (Dungeon.asNeeded()) {\n addItemToSpawn(new Stylus());\n Dungeon.LimitedDrops.ARCANE_STYLI.count++;\n }\n DriedRose rose = Dungeon.hero.belongings.getItem(DriedRose.class);\n if (rose != null && rose.isIdentified() && !rose.cursed) {\n int petalsNeeded = (int) Math.ceil((float) ((Dungeon.depth / 2) - rose.droppedPetals) / 3);\n for (int i = 1; i <= petalsNeeded; i++) {\n if (rose.droppedPetals < 11) {\n addItemToSpawn(new DriedRose.Petal());\n rose.droppedPetals++;\n }\n }\n }\n if (Dungeon.depth > 1) {\n switch(Random.Int(10)) {\n case 0:\n if (!Dungeon.bossLevel(Dungeon.depth + 1)) {\n feeling = Feeling.CHASM;\n }\n break;\n case 1:\n feeling = Feeling.WATER;\n break;\n case 2:\n feeling = Feeling.GRASS;\n break;\n case 3:\n feeling = Feeling.DARK;\n addItemToSpawn(new Torch());\n viewDistance = Math.round(viewDistance / 2f);\n break;\n }\n }\n }\n do {\n width = height = length = 0;\n mobs = new HashSet<>();\n heaps = new SparseArray<>();\n blobs = new HashMap<>();\n plants = new SparseArray<>();\n traps = new SparseArray<>();\n customTiles = new HashSet<>();\n customWalls = new HashSet<>();\n } while (!build());\n buildFlagMaps();\n cleanWalls();\n createMobs();\n createItems();\n Random.seed();\n}\n"
|
"public void testGetDupeLinks() {\n {\n String json = \"String_Node_Str\";\n JSONObject jobj = new JSONObject(json);\n Status s = new Status(jobj, null);\n System.out.println(s.getText());\n System.out.println(s.getDisplayText());\n List<TweetEntity> urlInfo = s.getTweetEntities(KEntityType.urls);\n int lastEntityEnd = 0;\n for (TweetEntity entity : urlInfo) {\n if (lastEntityEnd > entity.start) {\n System.out.println(\"String_Node_Str\" + lastEntityEnd + \"String_Node_Str\" + entity.start);\n fail();\n } else {\n }\n lastEntityEnd = entity.end;\n }\n }\n {\n BigInteger bi = new BigInteger(\"String_Node_Str\");\n Twitter twitter = newTestTwitter();\n Status badStatus = twitter.getStatus(bi);\n List<TweetEntity> urlInfo = badStatus.getTweetEntities(KEntityType.urls);\n int lastEntityEnd = 0;\n for (TweetEntity entity : urlInfo) {\n if (lastEntityEnd > entity.start) {\n System.out.println(\"String_Node_Str\" + lastEntityEnd + \"String_Node_Str\" + entity.start);\n fail();\n } else {\n }\n lastEntityEnd = entity.end;\n }\n lastEntityEnd = entity.end;\n }\n}\n"
|
"public void kickAfkPlayers() {\n if (lastPlayerActivity.size() < 1) {\n return;\n }\n if (plugin.getServer().getOnlinePlayers().length < playerCountThreshold) {\n return;\n }\n long activityWindow = System.currentTimeMillis() - kickTimeout;\n for (String name : lastPlayerActivity.keySet()) {\n Player player = plugin.getServer().getPlayer(name);\n if (player == null) {\n continue;\n }\n if (player.hasPermission(PERMISSION_EXEMPT) || (exemptPlayers.contains(name.toLowerCase()))) {\n continue;\n }\n Long tmpLong = lastPlayerActivity.get(name);\n if (tmpLong == null) {\n continue;\n }\n long lastActivity = lastPlayerActivity.get(name);\n if (lastActivity < activityWindow) {\n kickIdlePlayer(player);\n }\n }\n}\n"
|
"public void requestData(L layer) {\n synchronized (readLock) {\n if (!loaded && !reading) {\n RequestTask task = new RequestTask(this, layer);\n if (!WorldWind.getTaskService().isFull()) {\n loading = true;\n loadingListeners.notifyListeners(isLoading());\n WorldWind.getTaskService().addTask(task);\n }\n }\n }\n}\n"
|
"public static IPlotMe_GeneratorManager getGenManager(String name) {\n return managers.get(name.toLowerCase());\n}\n"
|
"public CostSheetLine createConsumedProductWasteCostSheetLine(Product product, Unit unit, int bomLevel, CostSheetLine parentCostSheetLine, BigDecimal consumptionQty, BigDecimal wasteRate) throws AxelorException {\n BigDecimal qty = consumptionQty.multiply(wasteRate).divide(new BigDecimal(\"String_Node_Str\"), appProductionService.getNbDecimalDigitForBomQty(), BigDecimal.ROUND_HALF_EVEN);\n BigDecimal costPrice = unitConversionService.convert(product.getUnit(), unit, product.getCostPrice().multiply(qty));\n return this.createCostSheetLine(product.getName(), product.getCode(), bomLevel, qty.setScale(appProductionService.getNbDecimalDigitForBomQty(), RoundingMode.HALF_EVEN), costPrice.setScale(appProductionService.getNbDecimalDigitForUnitPrice(), RoundingMode.HALF_EVEN), product.getCostSheetGroup(), product, CostSheetLineRepository.TYPE_CONSUMED_PRODUCT_WASTE, unit, null, parentCostSheetLine);\n}\n"
|
"public List<UnlockedAchievement> getUnlockedAchievements(Comparator<UnlockedAchievement> comparator) {\n if (comparator == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n List<UnlockedAchievement> list = new ArrayList<UnlockedAchievement>(unlockedAchievements);\n Collections.sort(list, comparator);\n return list;\n}\n"
|
"public String getText(Object element) {\n if (element instanceof TableFolderNode) {\n TableFolderNode node = (TableFolderNode) element;\n if (node.isLoaded()) {\n Package catalogOrSchema = PackageHelper.getCatalogOrSchema(node.getParent());\n return ((IFolderNode) element).getName() + \"String_Node_Str\" + PackageHelper.getTables(catalogOrSchema).size() + \"String_Node_Str\";\n } else {\n return ((IFolderNode) element).getName();\n }\n }\n if (element instanceof ViewFolderNode) {\n ViewFolderNode node = (ViewFolderNode) element;\n if (node.isLoaded()) {\n Package catalogOrSchema = PackageHelper.getCatalogOrSchema(node.getParent());\n return ((IFolderNode) element).getName() + \"String_Node_Str\" + PackageHelper.getViews(catalogOrSchema).size() + \"String_Node_Str\";\n } else {\n return ((IFolderNode) element).getName();\n }\n }\n if (element instanceof ColumnFolderNode) {\n ColumnFolderNode node = (ColumnFolderNode) element;\n if (node.isLoaded()) {\n ColumnSet table = SwitchHelpers.COLUMN_SET_SWITCH.doSwitch(node.getParent());\n return ((IFolderNode) element).getName() + \"String_Node_Str\" + ColumnSetHelper.getColumns(table).size() + \"String_Node_Str\";\n } else {\n return ((IFolderNode) element).getName();\n }\n }\n return super.getText(element);\n}\n"
|
"public static void main(String[] args) throws Exception {\n for (File file : sorted(new File(\"String_Node_Str\").listFiles())) {\n try {\n if (file.getName().contains(\"String_Node_Str\") && !file.getName().endsWith(\"String_Node_Str\")) {\n System.out.println(\"String_Node_Str\" + file.getPath() + \"String_Node_Str\");\n DumpLogicalLog.main(new String[] { file.getPath() });\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n}\n"
|
"protected void visitHtmlCloseTagNode(HtmlCloseTagNode node) {\n TagName closeTag = node.getTagName();\n if (isDefinitelyVoid(node)) {\n errorReporter.report(node.getSourceLocation(), INVALID_CLOSE_TAG, closeTag.getStaticTagName().getRawText());\n return;\n }\n if (closeTag.isForeignContent()) {\n foreignContentEndLocation = node.getSourceLocation();\n inForeignContent = false;\n }\n if (!HtmlTagEntry.tryMatchCloseTag(openTagStack, closeTag, errorReporter)) {\n closeTagQueue.addLast(new HtmlTagEntry(closeTag));\n }\n}\n"
|
"public void shouldEstablishConnectionWithSomeExtensionsNegotiated() throws Exception {\n final IoHandler handler = context.mock(IoHandler.class);\n context.checking(new Expectations() {\n {\n oneOf(handler).sessionCreated(with(any(IoSessionEx.class)));\n atMost(1).of(handler).sessionOpened(with(any(IoSessionEx.class)));\n }\n });\n String[] extensions = { \"String_Node_Str\", \"String_Node_Str\" };\n ConnectFuture connectFuture = connector.connect(\"String_Node_Str\", null, extensions, handler);\n connectFuture.awaitUninterruptibly();\n assertTrue(connectFuture.isConnected());\n k3po.finish();\n}\n"
|
"public void testInsert() throws Exception {\n DataHubCompositeValue value = new DataHubCompositeValue(CONTENT_TYPE, CONTENT_LANGUAGE, DATA, 0L);\n ValueInsertionResult expected = new ValueInsertionResult(DATA_HUB_KEY, null, null);\n String columnName = keyRenderer.keyToString(DATA_HUB_KEY);\n when(hector.createColumn(columnName, value, 0, StringSerializer.get(), DataHubCompositeValueSerializer.get())).thenReturn(column);\n when(rowStrategy.buildKey(CHANNEL_NAME, DATA_HUB_KEY)).thenReturn(ROW_KEY);\n when(keyGenerator.newKey(CHANNEL_NAME)).thenReturn(DATA_HUB_KEY);\n CassandraValueWriter testClass = new CassandraValueWriter(connector, hector, rowStrategy, keyGenerator, keyRenderer, mock(TimeProvider.class));\n ValueInsertionResult result = testClass.write(CHANNEL_NAME, value, Optional.of(0));\n assertEquals(expected, result);\n verify(mutator).insert(ROW_KEY, DATA_HUB_COLUMN_FAMILY_NAME, column);\n}\n"
|
"public boolean reserve(Task task) {\n try {\n jdbc.queryForObject(\"String_Node_Str\", String.class, task.getTaskId(), TaskState.WAITING.ordinal());\n return jdbc.update(\"String_Node_Str\" + \"String_Node_Str\", task.getTaskId(), TaskState.WAITING.ordinal()) == 1;\n } catch (Exception e) {\n return false;\n }\n}\n"
|
"private void showRejectUserDialog(final int userId) {\n User user = DatabaseManager.getInstance().getUserManager().get(userId);\n AlertDialog alertDialog = AlertDialog.newInstance(getResources().getString(R.string.frl_dlg_reject_friend, user.getFullName()));\n alertDialog.setPositiveButton(new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n showProgress();\n QBRejectFriendCommand.start(PrivateDialogActivity.this, userId);\n }\n });\n alertDialog.setNegativeButton(new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n alertDialog.show(getFragmentManager(), null);\n}\n"
|
"public synchronized boolean suspendSink(BluetoothDevice device) {\n mContext.enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, \"String_Node_Str\");\n if (DBG)\n log(\"String_Node_Str\" + device + \"String_Node_Str\" + mTargetA2dpState);\n if (device == null || mAudioDevices == null) {\n return false;\n }\n String path = mBluetoothService.getObjectPathFromAddress(device.getAddress());\n Integer state = mAudioDevices.get(device);\n if (path == null || state == null) {\n return false;\n }\n switch(state.intValue()) {\n case BluetoothA2dp.STATE_CONNECTED:\n if (mResuming) {\n mSuspending = true;\n }\n return true;\n case BluetoothA2dp.STATE_PLAYING:\n mAudioManager.setParameters(\"String_Node_Str\");\n mSuspending = suspendSinkNative(path);\n return mSuspending;\n default:\n return false;\n }\n}\n"
|
"public ItemStack getStackInSlotOnClosing(int par1) {\n if (worldObj.getBlockMetadata(xCoord, yCoord, zCoord) == 1) {\n if (this.furnaceItemStacks[par1] != null) {\n ItemStack itemstack = this.furnaceItemStacks[par1];\n this.furnaceItemStacks[par1] = null;\n return itemstack;\n } else {\n return null;\n }\n } else {\n return worldObj.getBlockMetadata(xCoord, yCoord, zCoord) > 0 && hasPrimary() ? getPrimaryTileEntity().getStackInSlotOnClosing(par1) : null;\n }\n}\n"
|
"public String getSignature() {\n return getType() + \"String_Node_Str\" + signature.toString();\n}\n"
|
"public List<AlarmStateHistory> findById(String tenantId, String alarmId, String offset, int limit) throws Exception {\n String q = String.format(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", this.influxV9Utils.publicTenantIdPart(tenantId), this.influxV9Utils.alarmIdPart(alarmId), this.influxV9Utils.timeOffsetPart(offset), this.influxV9Utils.limitPart(limit));\n logger.debug(\"String_Node_Str\", q);\n String r = this.influxV9RepoReader.read(q);\n Series series = this.objectMapper.readValue(r, Series.class);\n List<AlarmStateHistory> alarmStateHistoryList = alarmStateHistoryList(series);\n logger.debug(\"String_Node_Str\", alarmStateHistoryList.size());\n return alarmStateHistoryList;\n}\n"
|
"public static void main(String[] args) throws XMLStreamException, FactoryConfigurationError, CoreIoException {\n get_myParts(SBOL2Doc_test);\n writeRdfOutputStream(SBOL2Doc_test);\n}\n"
|
"public Void computeResults(final OperationParams params) throws Exception {\n final File propFile = getGeoWaveConfigFile(params);\n final Properties existingProps = ConfigOptions.loadProperties(propFile, null);\n if (url != null) {\n existingProps.setProperty(GEOSERVER_URL, url);\n }\n if (getName() != null) {\n existingProps.setProperty(GEOSERVER_USER, getName());\n }\n if (getPass() != null) {\n existingProps.setProperty(GEOSERVER_PASS, getPass());\n }\n if (getWorkspace() != null) {\n existingProps.setProperty(GEOSERVER_WORKSPACE, getWorkspace());\n }\n sslConfigOptions.saveProperties(existingProps);\n ConfigOptions.writeProperties(getGeoWaveConfigFile(params), existingProps, this.getClass(), GEOSERVER_NAMESPACE_PREFIX);\n GeoServerRestClient.invalidateInstance();\n return null;\n}\n"
|
"public void addPages() {\n mainPage = new FolderWizardPage(defaultLabel);\n addPage(mainPage);\n if (defaultLabel != null) {\n setWindowTitle(Messages.getString(\"String_Node_Str\"));\n } else {\n setWindowTitle(Messages.getString(\"String_Node_Str\"));\n }\n}\n"
|
"public LTTngTraceNode[] getTraces() {\n LTTngTraceNode[] result = (LTTngTraceNode[]) Array.newInstance(LTTngTraceNode.class, fChildren.size());\n return fChildren.toArray(result);\n}\n"
|
"protected void onResume() {\n super.onResume();\n ViewGroup playerv = (ViewGroup) findViewById(R.id.player);\n mMp.setController(this, playerv);\n if (mMp.hasActiveVideo())\n playerv.setVisibility(View.VISIBLE);\n else\n playerv.setVisibility(View.GONE);\n if (mDb.isRegisteredToPlaylistTableWatcher(this) && mDb.isPlaylistTableUpdated(this))\n getAdapter().reloadCursorAsync();\n}\n"
|
"public void onConnectionStatusUpdate(boolean connected, ComponentName service, Context context) {\n if (!connected && !list.isEmpty()) {\n SdlRouterStatusProvider provider = new SdlRouterStatusProvider(context, list.poll(), this);\n if (triggerRouterServicePing) {\n provider.setFlags(TransportConstants.ROUTER_STATUS_FLAG_TRIGGER_PING);\n }\n provider.checkIsConnected();\n } else {\n if (service != null) {\n Log.d(TAG, service.getPackageName() + \"String_Node_Str\" + connected);\n } else {\n Log.d(TAG, \"String_Node_Str\");\n }\n if (callback != null) {\n callback.onConnectionStatusUpdate(connected, service, context);\n }\n list.clear();\n }\n}\n"
|
"private boolean resetVMSSHKeyInternal(Long vmId, String sshPublicKey, String password) throws ResourceUnavailableException, InsufficientCapacityException {\n Long userId = CallContext.current().getCallingUserId();\n VMInstanceVO vmInstance = _vmDao.findById(vmId);\n VMTemplateVO template = _templateDao.findByIdIncludingRemoved(vmInstance.getTemplateId());\n Nic defaultNic = _networkModel.getDefaultNic(vmId);\n if (defaultNic == null) {\n s_logger.error(\"String_Node_Str\" + vmInstance + \"String_Node_Str\");\n return false;\n }\n Network defaultNetwork = _networkDao.findById(defaultNic.getNetworkId());\n NicProfile defaultNicProfile = new NicProfile(defaultNic, defaultNetwork, null, null, null, _networkModel.isSecurityGroupSupportedInNetwork(defaultNetwork), _networkModel.getNetworkTag(template.getHypervisorType(), defaultNetwork));\n VirtualMachineProfile vmProfile = new VirtualMachineProfileImpl(vmInstance);\n if (template.getEnablePassword()) {\n vmProfile.setParameter(VirtualMachineProfile.Param.VmPassword, password);\n }\n UserDataServiceProvider element = _networkMgr.getSSHKeyResetProvider(defaultNetwork);\n if (element == null) {\n throw new CloudRuntimeException(\"String_Node_Str\" + Service.UserData.getName() + \"String_Node_Str\");\n }\n boolean result = element.saveSSHKey(defaultNetwork, defaultNicProfile, vmProfile, sshPublicKey);\n if (!result) {\n s_logger.debug(\"String_Node_Str\");\n return false;\n } else {\n if (vmInstance.getState() == State.Stopped) {\n s_logger.debug(\"String_Node_Str\" + vmInstance + \"String_Node_Str\");\n return true;\n }\n if (rebootVirtualMachine(userId, vmId) == null) {\n s_logger.warn(\"String_Node_Str\" + vmInstance);\n return false;\n } else {\n s_logger.debug(\"String_Node_Str\" + vmInstance + \"String_Node_Str\");\n return true;\n }\n }\n}\n"
|
"public void info(Object message, Throwable t) {\n if (isInfoEnabled())\n logger.log(SELF_FQCN, Level.INFO, message, t);\n}\n"
|
"public void render(GLGraphics g, float w, float h, GLElement parent) {\n final IRow r = parent.getLayoutDataAs(IRow.class, null);\n MultiFloat v = model.getSplittedValue(r);\n Color[] colors = model.getColors();\n if (v.repr >= 0) {\n boolean selected = model.getTable().getSelectedRow() == r;\n float[] heights = layout.compute(v.size(), v.repr, h * 0.8f);\n float y = h * 0.1f;\n for (int i = 0; i < heights.length; ++i) {\n if (v.values[i] <= 0 || Float.isNaN(v.values[i]))\n continue;\n float hi = heights[i];\n if (hi <= 0)\n continue;\n g.color(colors[i]).fillRect(0, y, w * v.values[i], hi);\n if (selected) {\n ARankColumnModel modeli = model.get(i);\n String text = (modeli instanceof IMappedColumnMixin) ? ((IMappedColumnMixin) modeli).getRawValue(r) : Formatter.formatNumber(v.values[i]);\n float hli = getTextHeight(hi);\n ScoreBarRenderer.renderLabel(g, y + (hi - hli) * 0.5f, w, hli, text, v.values[i], parent);\n }\n y += hi;\n }\n }\n}\n"
|
"private void saveCategory() {\n LOGGER.error(\"String_Node_Str\");\n String name = txCategoryName.getText();\n if (name.trim().compareTo(\"String_Node_Str\") == 0) {\n showError(\"String_Node_Str\");\n } else {\n Background.Category p = new Background.Category(name);\n try {\n LOGGER.info(\"String_Node_Str\");\n bservice.addCategory(p);\n categoryList.add(p);\n refreshCategoryComboBox(categoryList);\n txCategoryName.clear();\n } catch (ServiceException e) {\n LOGGER.error(\"String_Node_Str\", e);\n }\n }\n}\n"
|
"protected void flowThrough(Object inValue, Unit unit, List outFallValues, List outBranchValues) {\n final LocalTypeSet in = (LocalTypeSet) inValue;\n final LocalTypeSet out = (LocalTypeSet) in.clone();\n LocalTypeSet outBranch = out;\n final Stmt stmt = (Stmt) unit;\n for (Iterator bIt = stmt.getDefBoxes().iterator(); bIt.hasNext(); ) {\n final ValueBox b = (ValueBox) bIt.next();\n Value v = b.getValue();\n if (v instanceof Local && v.getType() instanceof RefType) {\n out.killLocal((Local) v);\n }\n }\n if (stmt instanceof AssignStmt) {\n AssignStmt astmt = (AssignStmt) stmt;\n Value rhs = astmt.getRightOp();\n Value lhs = astmt.getLeftOp();\n if (lhs instanceof Local && rhs.getType() instanceof RefType) {\n Local l = (Local) lhs;\n if (rhs instanceof NewExpr) {\n out.localMustBeSubtypeOf(l, (RefType) rhs.getType());\n } else if (rhs instanceof CastExpr) {\n CastExpr cast = (CastExpr) rhs;\n Type castType = cast.getCastType();\n if (castType instanceof RefType) {\n out.localCopy(l, (Local) cast.getOp());\n out.localMustBeSubtypeOf(l, (RefType) castType);\n out.localMustBeSubtypeOf((Local) cast.getOp(), (RefType) castType);\n }\n } else if (rhs instanceof Local) {\n out.localCopy(l, (Local) rhs);\n }\n }\n } else if (stmt instanceof IfStmt) {\n IfStmt ifstmt = (IfStmt) stmt;\n do {\n if (graph.getPredsOf(stmt).size() != 1)\n break;\n Object predecessor = (Stmt) graph.getPredsOf(stmt).get(0);\n if (!(predecessor instanceof AssignStmt))\n break;\n AssignStmt pred = (AssignStmt) predecessor;\n if (!(pred.getRightOp() instanceof InstanceOfExpr))\n break;\n InstanceOfExpr iofexpr = (InstanceOfExpr) pred.getRightOp();\n if (!(iofexpr.getCheckType() instanceof RefType))\n break;\n ConditionExpr c = (ConditionExpr) ifstmt.getCondition();\n if (!c.getOp1().equals(pred.getLeftOp()))\n break;\n if (!(c.getOp2() instanceof IntConstant))\n break;\n if (((IntConstant) c.getOp2()).value != 0)\n break;\n if (c instanceof NeExpr) {\n outBranch = (LocalTypeSet) out.clone();\n outBranch.localMustBeSubtypeOf((Local) iofexpr.getOp(), (RefType) iofexpr.getCheckType());\n } else if (c instanceof EqExpr) {\n outBranch = (LocalTypeSet) out.clone();\n out.localMustBeSubtypeOf((Local) iofexpr.getOp(), (RefType) iofexpr.getCheckType());\n }\n } while (false);\n }\n for (Iterator it = outFallValues.iterator(); it.hasNext(); ) {\n copy(out, it.next());\n }\n for (Iterator it = outBranchValues.iterator(); it.hasNext(); ) {\n copy(outBranch, it.next());\n }\n}\n"
|
"public FieldInfo identityField() {\n if (identityField != null) {\n return identityField;\n }\n try {\n lock.lock();\n if (identityField == null) {\n for (FieldInfo fieldInfo : fieldsInfo().fields()) {\n AnnotationInfo annotationInfo = fieldInfo.getAnnotations().get(GraphId.CLASS);\n if (annotationInfo != null) {\n if (fieldInfo.getTypeDescriptor().equals(\"String_Node_Str\")) {\n identityField = fieldInfo;\n return fieldInfo;\n }\n }\n }\n FieldInfo fieldInfo = fieldsInfo().get(\"String_Node_Str\");\n if (fieldInfo != null) {\n if (fieldInfo.getDescriptor().equals(\"String_Node_Str\")) {\n identityField = fieldInfo;\n return fieldInfo;\n }\n }\n throw new MappingException(\"String_Node_Str\" + this.className);\n } else {\n return identityField;\n }\n } finally {\n lock.unlock();\n }\n}\n"
|
"public void testRowidNonPartitioned() throws Exception {\n AsOfJoinRecordSource source = new AsOfJoinRecordSource(compiler.compileSource(factory, \"String_Node_Str\"), 0, compiler.compileSource(factory, \"String_Node_Str\"), 0);\n String expected = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n printer.print(source, factory);\n TestUtils.assertEquals(expected, sink);\n source.reset();\n sink.clear();\n printer.printCursor(source, factory);\n TestUtils.assertEquals(expected, sink);\n}\n"
|
"public String createdDocumentsSea() {\n List<Documents> documentsList = new ArrayList<Documents>();\n List<String> vendorCodeDocument = new ArrayList<String>();\n List<OrderItems> orderItemsList = new ArrayList<OrderItems>();\n Orders orderEntity = orderService.findOrdersById(orderIdParam);\n order = transformToOrderFormBean(orderEntity);\n orderItemsList = operationsService.findAllOrderItemsByOrderId(orderIdParam);\n for (OrderItems everyItem : orderItemsList) {\n if (vendorCodeDocument.isEmpty()) {\n vendorCodeDocument.add(everyItem.getVendorSea());\n } else {\n if (!vendorCodeDocument.contains(everyItem.getVendorSea())) {\n vendorCodeDocument.add(everyItem.getVendorSea());\n }\n }\n }\n List<Documents> proforma = documentsService.findDocumentNameAndId(\"String_Node_Str\", orderIdParam);\n for (String itemVendor : vendorCodeDocument) {\n if (proforma.size() == 0) {\n Documents documentEntityProforma = new Documents();\n Client client = clientService.findClientById(getClientId().toString());\n documentEntity.setClient(client);\n documentEntity.setDocumentName(DocumentsConstants.PROFORMA_BILL_OF_LADING);\n documentEntity.setReferenceId(orderEntity.getOrderId());\n documentEntity.setReferenceTable(\"String_Node_Str\");\n documentEntity.setOrderNumber(orderEntity.getOrderNumber());\n documentEntity.setCreatedDate(new Date());\n documentEntity.setDocumentStatus(\"String_Node_Str\");\n documentEntity.setVendorCode(itemVendor);\n documentEntity.setOutboundStage(1);\n documentEntity.setDocumentProcessed(0);\n documentsService.addDocuments(documentEntity);\n } else {\n clearErrorsAndMessages();\n addActionMessage(\"String_Node_Str\");\n for (OrderItems orderItemsElem : orderItemsList) {\n orderItems.add(transformToOrderItemFormBean(orderItemsElem));\n }\n return INPUT;\n }\n }\n clearErrorsAndMessages();\n addActionMessage(\"String_Node_Str\");\n for (OrderItems orderItemsElem : orderItemsList) {\n orderItems.add(transformToOrderItemFormBean(orderItemsElem));\n }\n return SUCCESS;\n}\n"
|
"public void run() {\n for (EventListener listener : eventListeners) {\n if (listener.canHandle(o)) {\n try {\n listener.handle(o);\n } catch (Throwable e) {\n plugin.severe(\"String_Node_Str\", e.getClass().getName(), listener.getClass().getName());\n e.printStackTrace();\n }\n }\n }\n}\n"
|
"public void testParseDateTime() {\n expectExceptionForParseRfc3339(\"String_Node_Str\");\n expectExceptionForParseRfc3339(\"String_Node_Str\");\n DateTime value = DateTime.parseRfc3339(\"String_Node_Str\");\n assertTrue(value.dateOnly);\n value = DateTime.parseRfc3339(\"String_Node_Str\");\n assertFalse(value.dateOnly);\n}\n"
|
"private String getNewCallcount(DocumentModel serviceModel, String newCalls) {\n Long previousCallcount, newCallsLong;\n try {\n previousCallcount = (Long) serviceModel.getProperty(Service.SCHEMA, Service.PROP_CALLCOUNT);\n } catch (Exception e) {\n previousCallcount = new Long(0);\n }\n if (previousCallcount == null) {\n previousCallcount = new Long(0);\n }\n if (newCalls == null) {\n newCallsLong = new Long(0);\n } else {\n newCallsLong = Long.parseLong(newCalls);\n }\n return ((Long) (newCallsLong + previousCallcount)).toString();\n}\n"
|
"public int getOptionInteger(String optionName, String world, int defaultValue) {\n try {\n return Integer.parseInt(this.getOption(optionName, world, Integer.toString(defaultValue)));\n } catch (NumberFormatException ignore) {\n }\n return defaultValue;\n}\n"
|
"public boolean finalizeCommandsOnStart(Commands cmds, VirtualMachineProfile<DomainRouterVO> profile) {\n DomainRouterVO router = profile.getVirtualMachine();\n NicProfile controlNic = (NicProfile) profile.getParameter(VirtualMachineProfile.Param.ControlNic);\n cmds.addCommand(\"String_Node_Str\", new CheckSshCommand(profile.getInstanceName(), controlNic.getIp4Address(), 3922, 5, 20));\n boolean restartNetwork = true;\n if (profile.getParameter(Param.RestartNetwork) != null && (Boolean) profile.getParameter(Param.RestartNetwork) == false) {\n restartNetwork = false;\n }\n if (router.getRole() == VirtualRouter.Role.DHCP_FIREWALL_LB_PASSWD_USERDATA && restartNetwork) {\n s_logger.debug(\"String_Node_Str\");\n long networkId = router.getNetworkId();\n long ownerId = router.getAccountId();\n long zoneId = router.getDataCenterId();\n final List<IPAddressVO> userIps = _networkMgr.listPublicIpAddressesInVirtualNetwork(ownerId, zoneId, null);\n List<PublicIpAddress> publicIps = new ArrayList<PublicIpAddress>();\n if (userIps != null && !userIps.isEmpty()) {\n for (IPAddressVO userIp : userIps) {\n PublicIp publicIp = new PublicIp(userIp, _vlanDao.findById(userIp.getVlanId()), userIp.getMacAddress());\n publicIps.add(publicIp);\n }\n }\n s_logger.debug(\"String_Node_Str\" + publicIps.size() + \"String_Node_Str\" + router + \"String_Node_Str\");\n if (!publicIps.isEmpty()) {\n createAssociateIPCommands(router, publicIps, cmds, 0);\n List<RemoteAccessVpn> vpns = new ArrayList<RemoteAccessVpn>();\n List<? extends PortForwardingRule> pfRules = null;\n List<? extends FirewallRule> staticNatFirewallRules = null;\n for (PublicIpAddress ip : publicIps) {\n pfRules = _pfRulesDao.listForApplication(ip.getId());\n staticNatFirewallRules = _rulesDao.listByIpAndPurpose(ip.getId(), Purpose.StaticNat);\n RemoteAccessVpn vpn = _vpnDao.findById(ip.getId());\n if (vpn != null) {\n vpns.add(vpn);\n }\n }\n s_logger.debug(\"String_Node_Str\" + pfRules.size() + \"String_Node_Str\" + router + \"String_Node_Str\");\n if (!pfRules.isEmpty()) {\n createApplyPortForwardingRulesCommands(pfRules, router, cmds);\n }\n s_logger.debug(\"String_Node_Str\" + staticNatFirewallRules.size() + \"String_Node_Str\" + router + \"String_Node_Str\");\n if (!staticNatFirewallRules.isEmpty()) {\n List<StaticNatRule> staticNatRules = new ArrayList<StaticNatRule>();\n for (FirewallRule rule : staticNatFirewallRules) {\n staticNatRules.add(_rulesMgr.buildStaticNatRule(rule));\n }\n createApplyStaticNatRulesCommands(staticNatRules, router, cmds);\n }\n s_logger.debug(\"String_Node_Str\" + vpns.size() + \"String_Node_Str\" + router + \"String_Node_Str\");\n if (!vpns.isEmpty()) {\n for (RemoteAccessVpn vpn : vpns) {\n createApplyVpnCommands(vpn, router, cmds);\n }\n }\n List<LoadBalancerVO> lbs = _loadBalancerDao.listByNetworkId(networkId);\n List<LoadBalancingRule> lbRules = new ArrayList<LoadBalancingRule>();\n for (LoadBalancerVO lb : lbs) {\n List<LbDestination> dstList = _lbMgr.getExistingDestinations(lb.getId());\n LoadBalancingRule loadBalancing = new LoadBalancingRule(lb, dstList);\n lbRules.add(loadBalancing);\n }\n s_logger.debug(\"String_Node_Str\" + lbRules.size() + \"String_Node_Str\" + router + \"String_Node_Str\");\n if (!lbRules.isEmpty()) {\n createApplyLoadBalancingRulesCommands(lbRules, router, cmds);\n }\n }\n }\n s_logger.debug(\"String_Node_Str\" + router + \"String_Node_Str\");\n createDhcpEntriesCommands(router, cmds);\n s_logger.debug(\"String_Node_Str\" + router + \"String_Node_Str\");\n createUserDataCommands(router, cmds);\n cmds.addCommand(\"String_Node_Str\", new NetworkUsageCommand(controlNic.getIp4Address(), router.getName(), \"String_Node_Str\"));\n return true;\n}\n"
|
"private void toSQL0(RenderContext context) {\n if (usingSyntax) {\n context.sql(\"String_Node_Str\");\n JooqUtil.toSQLNames(context, using);\n context.sql(\"String_Node_Str\");\n } else {\n context.sql(\"String_Node_Str\").sql(getCondition());\n }\n}\n"
|
"public void displayImage(final String url, final String mimeType, final String title, final String description, final String iconSrc, final MediaPlayer.LaunchListener listener) {\n int requestIdNumber = getNextId();\n final String requestId = String.format(Locale.US, \"String_Node_Str\", requestIdNumber);\n JSONObject message = null;\n try {\n message = new JSONObject() {\n {\n putOpt(\"String_Node_Str\", namespaceKey + \"String_Node_Str\");\n putOpt(\"String_Node_Str\", new JSONObject() {\n {\n putOpt(\"String_Node_Str\", \"String_Node_Str\");\n putOpt(\"String_Node_Str\", url);\n putOpt(\"String_Node_Str\", iconSrc);\n putOpt(\"String_Node_Str\", title);\n putOpt(\"String_Node_Str\", description);\n putOpt(\"String_Node_Str\", mimeType);\n putOpt(\"String_Node_Str\", requestId);\n }\n });\n }\n };\n } catch (JSONException e) {\n e.printStackTrace();\n }\n ResponseListener<Object> response = new ResponseListener<Object>() {\n public void onError(ServiceCommandError error) {\n Util.postError(listener, error);\n }\n public void onSuccess(Object object) {\n Util.postSuccess(listener, new MediaLaunchObject(launchSession, getMediaControl()));\n }\n };\n ServiceCommand<ResponseListener<Object>> command = new ServiceCommand<ResponseListener<Object>>(null, null, null, response);\n mActiveCommands.put(requestId, command);\n sendP2PMessage(message, new ResponseListener<Object>() {\n\n public void onError(ServiceCommandError error) {\n Util.postError(listener, error);\n }\n public void onSuccess(Object object) {\n }\n });\n}\n"
|
"public String toString() {\n String s = getFragment() + \"String_Node_Str\";\n if (children != null) {\n s += \"String_Node_Str\";\n for (Node node : children_.getValues()) {\n if (node != null) {\n s += node.getChar() + \"String_Node_Str\";\n }\n }\n s += \"String_Node_Str\";\n } else {\n s += \"String_Node_Str\";\n }\n if (stems != null) {\n for (StemNode stem : stems) {\n s += \"String_Node_Str\" + stem.surfaceForm + \"String_Node_Str\";\n }\n }\n return s;\n}\n"
|
"public boolean equals(Object o) {\n if (this == o)\n return true;\n if (o == null || getClass() != o.getClass())\n return false;\n Index index = (Index) o;\n boolean equals = true;\n for (String column : index.getColumns()) {\n if (!columns.contains(column)) {\n equals = false;\n }\n }\n if (this.unique == null && index.isUnique() != null) {\n equals = false;\n } else if (!this.unique.equals(index.isUnique())) {\n equals = false;\n }\n return equals || table.getName().equalsIgnoreCase(index.table.getName());\n}\n"
|
"public void extract(IDataExtractionOption option) throws BirtException {\n throw new EngineException(MessageConstants.UNSUPPORTED_DOCUMENT_VERSION_ERROR);\n}\n"
|
"public static void draw3DLine(Graphics g, int side, int style, int[] width, Rectangle r) {\n if (width.length <= side || width[side] <= 0) {\n return;\n }\n Color foreColor = g.getForegroundColor();\n Color inSideColor = foreColor;\n Color outSideColor = foreColor;\n Color darkColor = ColorManager.darker(foreColor);\n Color brightColor = ColorManager.brighter(foreColor, ColorConstants.white);\n switch(style) {\n case BaseBorder.LINE_STYLE_RIDGE:\n if (side == TOP || side == LEFT) {\n inSideColor = darkColor;\n outSideColor = brightColor;\n } else if (side == BOTTOM || side == RIGHT) {\n inSideColor = brightColor;\n outSideColor = darkColor;\n }\n break;\n case BaseBorder.LINE_STYLE_GROOVE:\n if (side == TOP || side == LEFT) {\n inSideColor = brightColor;\n outSideColor = darkColor;\n } else if (side == BOTTOM || side == RIGHT) {\n inSideColor = darkColor;\n outSideColor = brightColor;\n }\n break;\n case BaseBorder.LINE_STYLE_INSET:\n if (side == TOP || side == LEFT) {\n inSideColor = darkColor;\n outSideColor = darkColor;\n } else if (side == BOTTOM || side == RIGHT) {\n inSideColor = brightColor;\n outSideColor = brightColor;\n }\n break;\n case BaseBorder.LINE_STYLE_OUTSET:\n if (side == TOP || side == LEFT) {\n inSideColor = brightColor;\n outSideColor = brightColor;\n } else if (side == BOTTOM || side == RIGHT) {\n inSideColor = darkColor;\n outSideColor = darkColor;\n }\n break;\n }\n int inSideWidth = (width[side] + 1) / 2;\n int outSideWidth = width[side] - inSideWidth;\n g.setForegroundColor(outSideColor);\n drawSingleLine(g, side, SWT.LINE_SOLID, width, outSideWidth, 0, r);\n g.setForegroundColor(inSideColor);\n drawSingleLine(g, side, SWT.LINE_SOLID, width, inSideWidth, outSideWidth, r);\n}\n"
|
"private String reEncodeHtml(String str) {\n StringBuilder builder = new StringBuilder();\n if (str == null)\n return \"String_Node_Str\";\n String[] sources = new String[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n String[] dests = new String[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n builder.append(TextUtils.replace(str, sources, dests));\n return builder.toString();\n}\n"
|
"static LatLong calculateCenterOfBoundingBox(LatLong[] coordinates) {\n double pointXMin = coordinates[0].longitude;\n double pointXMax = coordinates[0].longitude;\n double pointYMin = coordinates[0].latitude;\n double pointYMax = coordinates[0].latitude;\n for (int i = 1; i < coordinates.length; ++i) {\n LatLong immutablePoint = coordinates[i];\n if (immutablePoint.longitude < pointXMin) {\n pointXMin = immutablePoint.longitude;\n } else if (immutablePoint.longitude > pointXMax) {\n pointXMax = immutablePoint.longitude;\n }\n if (immutablePoint.y < pointYMin) {\n pointYMin = immutablePoint.y;\n } else if (immutablePoint.y > pointYMax) {\n pointYMax = immutablePoint.y;\n }\n }\n return new LatLong((pointXMin + pointXMax) / 2, (pointYMax + pointYMin) / 2, true);\n}\n"
|
"public int getEndCellIndex(int row) {\n AbstractRowAdv rowObj = (AbstractRowAdv) getRow(row, false);\n if (rowObj != null) {\n idx1 = rowObj.getEndCellIndex();\n }\n NDataGrid dg = getDataGrid();\n if (dg == null || !dg.isSupportedDataStartEndIndex()) {\n return idx1;\n } else {\n int idx2 = dg.getEndCellIndex(row);\n if (idx1 < 0)\n return idx2;\n if (idx2 < 0)\n return idx1;\n return Math.max(idx1, idx2);\n }\n return -1;\n}\n"
|
"private void fetch() {\n while (nextEntry == null && iterator.hasNext()) {\n Map.Entry<Object, RICachedValue> entry = iterator.next();\n RICachedValue cachedValue = entry.getValue();\n K key = (K) RICache.this.keyConverter.fromInternal(entry.getKey());\n lockManager.lock(key);\n try {\n if (!cachedValue.isExpiredAt(now)) {\n V value = (V) RICache.this.valueConverter.fromInternal(cachedValue.getInternalValue(now));\n nextEntry = new RIEntry<K, V>(key, value);\n Duration duration = expiryPolicy.getTTLForAccessedEntry(nextEntry, new Duration(now, cachedValue.getExpiryTime()));\n long expiryTime = duration.getAdjustedTime(now);\n cachedValue.setExpiryTime(expiryTime);\n }\n } finally {\n lockManager.unLock(key);\n }\n }\n}\n"
|
"public void connectionClosedOnError(Exception exception) {\n logger.error(\"String_Node_Str\" + exception.getLocalizedMessage());\n if (!reconnecting)\n reregister();\n else\n reconnecting = false;\n}\n"
|
"public void handleMessage(Message msg) {\n switch(msg.what) {\n case SHOW_ERROR_MSG:\n {\n HashMap data = (HashMap) msg.obj;\n synchronized (ActivityManagerService.this) {\n ProcessRecord proc = (ProcessRecord) data.get(\"String_Node_Str\");\n if (proc != null && proc.crashDialog != null) {\n Slog.e(TAG, \"String_Node_Str\" + proc);\n return;\n }\n AppErrorResult res = (AppErrorResult) data.get(\"String_Node_Str\");\n if (!mSleeping && !mShuttingDown) {\n Dialog d = new AppErrorDialog(mContext, res, proc);\n d.show();\n proc.crashDialog = d;\n } else {\n res.set(0);\n }\n }\n ensureBootCompleted();\n }\n break;\n case SHOW_NOT_RESPONDING_MSG:\n {\n synchronized (ActivityManagerService.this) {\n HashMap data = (HashMap) msg.obj;\n ProcessRecord proc = (ProcessRecord) data.get(\"String_Node_Str\");\n if (proc != null && proc.anrDialog != null) {\n Slog.e(TAG, \"String_Node_Str\" + proc);\n return;\n }\n broadcastIntentLocked(null, null, new Intent(\"String_Node_Str\"), null, null, 0, null, null, null, false, false, MY_PID, Process.SYSTEM_UID);\n Dialog d = new AppNotRespondingDialog(ActivityManagerService.this, mContext, proc, (ActivityRecord) data.get(\"String_Node_Str\"));\n d.show();\n proc.anrDialog = d;\n }\n ensureBootCompleted();\n }\n break;\n case SHOW_STRICT_MODE_VIOLATION_MSG:\n {\n HashMap<String, Object> data = (HashMap<String, Object>) msg.obj;\n synchronized (ActivityManagerService.this) {\n ProcessRecord proc = (ProcessRecord) data.get(\"String_Node_Str\");\n if (proc == null) {\n Slog.e(TAG, \"String_Node_Str\");\n break;\n }\n if (proc.crashDialog != null) {\n Slog.e(TAG, \"String_Node_Str\" + proc);\n return;\n }\n AppErrorResult res = (AppErrorResult) data.get(\"String_Node_Str\");\n if (!mSleeping && !mShuttingDown) {\n Dialog d = new StrictModeViolationDialog(mContext, res, proc);\n d.show();\n proc.crashDialog = d;\n } else {\n res.set(0);\n }\n }\n ensureBootCompleted();\n }\n break;\n case SHOW_FACTORY_ERROR_MSG:\n {\n Dialog d = new FactoryErrorDialog(mContext, msg.getData().getCharSequence(\"String_Node_Str\"));\n d.show();\n ensureBootCompleted();\n }\n break;\n case UPDATE_CONFIGURATION_MSG:\n {\n final ContentResolver resolver = mContext.getContentResolver();\n Settings.System.putConfiguration(resolver, (Configuration) msg.obj);\n }\n break;\n case GC_BACKGROUND_PROCESSES_MSG:\n {\n synchronized (ActivityManagerService.this) {\n performAppGcsIfAppropriateLocked();\n }\n }\n break;\n case WAIT_FOR_DEBUGGER_MSG:\n {\n synchronized (ActivityManagerService.this) {\n ProcessRecord app = (ProcessRecord) msg.obj;\n if (msg.arg1 != 0) {\n if (!app.waitedForDebugger) {\n Dialog d = new AppWaitingForDebuggerDialog(ActivityManagerService.this, mContext, app);\n app.waitDialog = d;\n app.waitedForDebugger = true;\n d.show();\n }\n } else {\n if (app.waitDialog != null) {\n app.waitDialog.dismiss();\n app.waitDialog = null;\n }\n }\n }\n }\n break;\n case BROADCAST_INTENT_MSG:\n {\n if (DEBUG_BROADCAST)\n Slog.v(TAG, \"String_Node_Str\");\n processNextBroadcast(true);\n }\n break;\n case BROADCAST_TIMEOUT_MSG:\n {\n if (mDidDexOpt) {\n mDidDexOpt = false;\n Message nmsg = mHandler.obtainMessage(BROADCAST_TIMEOUT_MSG);\n mHandler.sendMessageDelayed(nmsg, BROADCAST_TIMEOUT);\n return;\n }\n if (mSystemReady) {\n broadcastTimeout();\n }\n }\n break;\n case SERVICE_TIMEOUT_MSG:\n {\n if (mDidDexOpt) {\n mDidDexOpt = false;\n Message nmsg = mHandler.obtainMessage(SERVICE_TIMEOUT_MSG);\n nmsg.obj = msg.obj;\n mHandler.sendMessageDelayed(nmsg, SERVICE_TIMEOUT);\n return;\n }\n serviceTimeout((ProcessRecord) msg.obj);\n }\n break;\n case UPDATE_TIME_ZONE:\n {\n synchronized (ActivityManagerService.this) {\n for (int i = mLruProcesses.size() - 1; i >= 0; i--) {\n ProcessRecord r = mLruProcesses.get(i);\n if (r.thread != null) {\n try {\n r.thread.updateTimeZone();\n } catch (RemoteException ex) {\n Slog.w(TAG, \"String_Node_Str\" + r.info.processName);\n }\n }\n }\n }\n }\n break;\n case SHOW_UID_ERROR_MSG:\n {\n AlertDialog d = new BaseErrorDialog(mContext);\n d.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR);\n d.setCancelable(false);\n d.setTitle(\"String_Node_Str\");\n d.setMessage(\"String_Node_Str\");\n d.setButton(\"String_Node_Str\", mHandler.obtainMessage(IM_FEELING_LUCKY_MSG));\n mUidAlert = d;\n d.show();\n }\n break;\n case IM_FEELING_LUCKY_MSG:\n {\n if (mUidAlert != null) {\n mUidAlert.dismiss();\n mUidAlert = null;\n }\n }\n break;\n case PROC_START_TIMEOUT_MSG:\n {\n if (mDidDexOpt) {\n mDidDexOpt = false;\n Message nmsg = mHandler.obtainMessage(PROC_START_TIMEOUT_MSG);\n nmsg.obj = msg.obj;\n mHandler.sendMessageDelayed(nmsg, PROC_START_TIMEOUT);\n return;\n }\n ProcessRecord app = (ProcessRecord) msg.obj;\n synchronized (ActivityManagerService.this) {\n processStartTimedOutLocked(app);\n }\n }\n break;\n case DO_PENDING_ACTIVITY_LAUNCHES_MSG:\n {\n synchronized (ActivityManagerService.this) {\n doPendingActivityLaunchesLocked(true);\n }\n }\n break;\n case KILL_APPLICATION_MSG:\n {\n synchronized (ActivityManagerService.this) {\n int uid = msg.arg1;\n boolean restart = (msg.arg2 == 1);\n String pkg = (String) msg.obj;\n forceStopPackageLocked(pkg, uid, restart, false, true);\n }\n }\n break;\n case FINALIZE_PENDING_INTENT_MSG:\n {\n ((PendingIntentRecord) msg.obj).completeFinalize();\n }\n break;\n case POST_HEAVY_NOTIFICATION_MSG:\n {\n INotificationManager inm = NotificationManager.getService();\n if (inm == null) {\n return;\n }\n ActivityRecord root = (ActivityRecord) msg.obj;\n ProcessRecord process = root.app;\n if (process == null) {\n return;\n }\n try {\n Context context = mContext.createPackageContext(process.info.packageName, 0);\n String text = mContext.getString(R.string.heavy_weight_notification, context.getApplicationInfo().loadLabel(context.getPackageManager()));\n Notification notification = new Notification();\n notification.icon = com.android.internal.R.drawable.stat_sys_adb;\n notification.when = 0;\n notification.flags = Notification.FLAG_ONGOING_EVENT;\n notification.tickerText = text;\n notification.defaults = 0;\n notification.sound = null;\n notification.vibrate = null;\n notification.setLatestEventInfo(context, text, mContext.getText(R.string.heavy_weight_notification_detail), PendingIntent.getActivity(mContext, 0, root.intent, PendingIntent.FLAG_CANCEL_CURRENT));\n try {\n int[] outId = new int[1];\n inm.enqueueNotification(\"String_Node_Str\", R.string.heavy_weight_notification, notification, outId);\n } catch (RuntimeException e) {\n Slog.w(ActivityManagerService.TAG, \"String_Node_Str\", e);\n } catch (RemoteException e) {\n }\n } catch (NameNotFoundException e) {\n Slog.w(TAG, \"String_Node_Str\", e);\n }\n }\n break;\n case CANCEL_HEAVY_NOTIFICATION_MSG:\n {\n INotificationManager inm = NotificationManager.getService();\n if (inm == null) {\n return;\n }\n try {\n inm.cancelNotification(\"String_Node_Str\", R.string.heavy_weight_notification);\n } catch (RuntimeException e) {\n Slog.w(ActivityManagerService.TAG, \"String_Node_Str\", e);\n } catch (RemoteException e) {\n }\n }\n break;\n case CHECK_EXCESSIVE_WAKE_LOCKS_MSG:\n {\n synchronized (ActivityManagerService.this) {\n checkExcessiveWakeLocksLocked(true);\n removeMessages(CHECK_EXCESSIVE_WAKE_LOCKS_MSG);\n if (mSleeping) {\n Message nmsg = obtainMessage(CHECK_EXCESSIVE_WAKE_LOCKS_MSG);\n sendMessageDelayed(nmsg, WAKE_LOCK_CHECK_DELAY);\n }\n }\n }\n break;\n }\n}\n"
|
"private static ClassNode getNode(String name) throws IOException {\n byte[] bytes = classes.get(name);\n if (bytes == null) {\n InputStream is = clazz.getResourceAsStream(\"String_Node_Str\" + clazz.getName().replace('.', '/') + \"String_Node_Str\");\n if (is == null) {\n return null;\n }\n bytes = Streams.from(is);\n }\n return Asm.getNode(bytes);\n}\n"
|
"public VjoGenerator writeNeeds(final List<? extends IJstType> needs, final IJstType type) {\n if (needs == null || needs.size() == 0) {\n return this;\n } else if (needs.size() == 1) {\n if (!shouldExcludeNeed(type, needs.get(0))) {\n writeNeeds(needs.get(0).getName(), needs.get(0).getAlias());\n }\n return this;\n }\n IJstType first = null;\n List<IJstType> alias = new ArrayList<IJstType>();\n StringBuffer sb = new StringBuffer();\n int i = 0;\n for (IJstType need : needs) {\n if (!shouldExcludeNeed(type, need)) {\n if (need.getAlias() != null && (!need.getAlias().equals(need.getName()) || type.getImportsMap().get(need.getName()) != null)) {\n alias.add(need);\n } else {\n if (i > 0) {\n sb.append(\"String_Node_Str\");\n if (i % 2 == 0) {\n sb.append(getNewline()).append(Indenter.TAB);\n }\n first = null;\n } else {\n first = need;\n }\n sb.append(\"String_Node_Str\").append(need.getName()).append(\"String_Node_Str\");\n i++;\n }\n }\n }\n if (first != null) {\n writeNeeds(first.getName(), first.getAlias());\n } else if (sb.length() > 0) {\n writeNewline();\n getWriter().append(\"String_Node_Str\").append(VjoKeywords.NEEDS).append(\"String_Node_Str\").append(sb.toString()).append(\"String_Node_Str\");\n }\n for (IJstType need : alias) {\n String als = \"String_Node_Str\";\n if (type.getImportsMap().get(need.getName()) == null) {\n als = need.getAlias();\n }\n writeNeeds(need.getName(), als);\n }\n return this;\n}\n"
|
"private void writeClassSerializationStatements() {\n if (serializableClass.isEnhanced()) {\n sourceWriter.println(\"String_Node_Str\" + WEAK_MAPPING_CLASS_NAME + \"String_Node_Str\");\n }\n for (JField serializableField : serializableFields) {\n JType fieldType = serializableField.getType();\n String writeMethodName = Shared.getStreamWriteMethodNameFor(fieldType);\n sourceWriter.print(\"String_Node_Str\");\n sourceWriter.print(writeMethodName);\n sourceWriter.print(\"String_Node_Str\");\n if (needsAccessorMethods(serializableField)) {\n sourceWriter.print(\"String_Node_Str\");\n sourceWriter.print(Shared.capitalize(serializableField.getName()));\n sourceWriter.println(\"String_Node_Str\");\n } else {\n sourceWriter.print(\"String_Node_Str\");\n sourceWriter.print(serializableField.getName());\n sourceWriter.println(\"String_Node_Str\");\n }\n }\n sourceWriter.println();\n JClassType superClass = serializableClass.getSuperclass();\n if (superClass != null && (typesSentFromBrowser.isSerializable(superClass) || typesSentToBrowser.isSerializable(superClass))) {\n String fieldSerializerName = SerializationUtils.getFieldSerializerName(typeOracle, superClass);\n sourceWriter.print(fieldSerializerName);\n sourceWriter.println(\"String_Node_Str\");\n }\n}\n"
|
"public void resetAllModes() {\n mContext.enforcePermission(android.Manifest.permission.UPDATE_APP_OPS_STATS, Binder.getCallingPid(), Binder.getCallingUid(), null);\n HashMap<Callback, ArrayList<Pair<String, Integer>>> callbacks = null;\n synchronized (this) {\n boolean changed = false;\n for (int i = mUidOps.size() - 1; i >= 0; i--) {\n HashMap<String, Ops> packages = mUidOps.valueAt(i);\n for (Map.Entry<String, Ops> ent : packages.entrySet()) {\n String packageName = ent.getKey();\n Ops pkgOps = ent.getValue();\n for (int j = 0; j < pkgOps.size(); j++) {\n Op curOp = pkgOps.valueAt(j);\n if (curOp.mode != AppOpsManager.MODE_ALLOWED) {\n curOp.mode = AppOpsManager.MODE_ALLOWED;\n changed = true;\n callbacks = addCallbacks(callbacks, packageName, curOp.op, mOpModeWatchers.get(curOp.op));\n callbacks = addCallbacks(callbacks, packageName, curOp.op, mPackageModeWatchers.get(packageName));\n pruneOp(curOp, mUidOps.keyAt(i), packageName);\n }\n }\n }\n }\n if (changed) {\n scheduleWriteNowLocked();\n }\n }\n if (callbacks != null) {\n for (Map.Entry<Callback, ArrayList<Pair<String, Integer>>> ent : callbacks.entrySet()) {\n Callback cb = ent.getKey();\n ArrayList<Pair<String, Integer>> reports = ent.getValue();\n for (int i = 0; i < reports.size(); i++) {\n Pair<String, Integer> rep = reports.get(i);\n try {\n cb.mCallback.opChanged(rep.second, rep.first);\n } catch (RemoteException e) {\n }\n }\n }\n }\n}\n"
|
"public boolean visitEdges(Predicate<Atom> predicate, Operation<ReadableAtomSpace, Atom> op) {\n for (Atom e : getEdges()) {\n if (predicate.evaluate(e)) {\n boolean result = op.operate(this, e);\n if (!result)\n return false;\n }\n }\n return true;\n}\n"
|
"public void close() throws IOException {\n flush();\n _writer.close(false);\n if (_countersSetup) {\n _recordRateCounter.close();\n _rowRateCounter.close();\n }\n if (_indexLocally) {\n if (_optimizeInFlight) {\n copyAndOptimizeInFlightDir();\n } else {\n copyDir();\n }\n }\n if (_countersSetup) {\n _copyRateCounter.close();\n }\n}\n"
|
"private void scan(long nowNanos, long nowMillis, OperationRunner[] operationRunners, CurrentOperationData[] currentOperationDataArray) {\n for (int i = 0; i < operationRunners.length && running; i++) {\n if (operationRunners[i].currentTask() == null) {\n continue;\n }\n scanOperationRunner(nowNanos, nowMillis, operationRunners[i], currentOperationDataArray[i]);\n }\n}\n"
|
"public static ByteBuffer defaultValue(AbstractType type) {\n CQL3Type cqlType = type.asCQL3Type();\n if (cqlType == CQL3Type.Native.INT) {\n return ByteBufferUtil.bytes(0);\n } else if (cqlType == CQL3Type.Native.VARINT || cqlType == CQL3Type.Native.BIGINT || cqlType == CQL3Type.Native.COUNTER) {\n return ByteBufferUtil.bytes(0L);\n } else if (cqlType == CQL3Type.Native.DECIMAL || cqlType == CQL3Type.Native.DOUBLE) {\n return ByteBufferUtil.bytes(0D);\n } else if (cqlType == CQL3Type.Native.FLOAT) {\n return ByteBufferUtil.bytes(0F);\n } else if (cqlType == CQL3Type.Native.TEXT || cqlType == CQL3Type.Native.VARCHAR) {\n return ByteBufferUtil.bytes(\"String_Node_Str\");\n } else if (cqlType == CQL3Type.Native.UUID) {\n return ByteBufferUtil.bytes(UUID.randomUUID());\n } else if (cqlType == CQL3Type.Native.TIMEUUID) {\n return ByteBufferUtil.bytes(UUIDGen.getTimeUUID(0));\n } else if (cqlType == CQL3Type.Native.TIMESTAMP) {\n return ByteBufferUtil.bytes(0L);\n } else if (cqlType == CQL3Type.Native.BOOLEAN) {\n return BooleanType.instance.decompose(false);\n } else {\n return ByteBufferUtil.EMPTY_BYTE_BUFFER;\n }\n}\n"
|
"public void run() {\n instances[0].getMultiMap(name).lock(\"String_Node_Str\");\n latch.countDown();\n try {\n latch2.await(10, TimeUnit.SECONDS);\n instances[0].getMultiMap(name).unlock(\"String_Node_Str\");\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n instances[0].getMultiMap(name).unlock(\"String_Node_Str\");\n}\n"
|
"private void placeImgBack() throws IOException, FailedExecuteCommand {\n mShell.execCommand(Const.Busybox + \"String_Node_Str\" + tmpFile);\n Common.copyFile(tmpFile, mCustomIMG);\n}\n"
|
"public FeedbackVo createFeedback(long feedbackType, String feedbackcontent, Date date) throws MultipleMessagesException, DuplicityException {\n FeedbackVo feedbackVo = new FeedbackVo();\n feedbackVo.setContent(feedbackcontent);\n feedbackVo.setDate(date);\n feedbackVo.setFeedbackTypeId(feedbackType);\n EntityManager entityManager = null;\n EntityTransaction transaction = null;\n try {\n entityManager = getEntityManagerFactory().createEntityManager();\n transaction = entityManager.getTransaction();\n transaction.begin();\n feedbackVo = getServiceFactory().getFeedbacksService().create(entityManager, feedbackVo);\n transaction.commit();\n } catch (Exception exception) {\n getServiceFactory().getLogService().error(exception.getMessage(), exception);\n FacadesHelper.checkException(entityManager, exception, MultipleMessagesException.class);\n FacadesHelper.checkDuplicityViolation(entityManager, transaction, exception);\n FacadesHelper.rollbackTransaction(entityManager, transaction, exception);\n } finally {\n FacadesHelper.closeEntityManager(entityManager);\n }\n return feedbackVo;\n}\n"
|
"public Feature getFeature() throws IOException {\n Feature feature = predecessor.getFeature();\n if (feature != null) {\n if (feature.hasContent()) {\n if ((feature.getID() % dropEveryNthFrame) == (dropEveryNthFrame - 1)) {\n if (replaceNthWithPrevious) {\n feature = new Feature(lastFeature.getFeatureData(), id++);\n } else {\n feature = predecessor.getFeature();\n if (feature != null && feature.hasContent()) {\n feature.setID(id++);\n }\n }\n }\n } else {\n feature.setID(id++);\n }\n } else if (feature.hasSignal(Signal.UTTERANCE_START)) {\n id = 0;\n }\n if (feature.hasContent()) {\n lastFeature = feature;\n } else {\n lastFeature = null;\n }\n return feature;\n}\n"
|
"public void use(AbstractPlayer p, AbstractMonster m) {\n AbstractDungeon.actionManager.addToBottom(new DiscardAction(p, p, 1, false));\n AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(m, p, new WeakPower(m, magicNumber, false), magicNumber));\n}\n"
|
"public Set<String> getTeamIDs() {\n final Set<String> set = new HashSet<>();\n if (participantId != null) {\n try {\n Long.parseLong(participantId);\n } catch (final NumberFormatException e) {\n set.add(participantId);\n }\n }\n for (final LeagueEntry entry : entries) {\n try {\n Long.parseLong(entry.getPlayerOrTeamId());\n } catch (final NumberFormatException e) {\n set.add(participantId);\n }\n }\n return set;\n}\n"
|
"public void removeBoard(String name) {\n savedBoards.remove(name);\n}\n"
|
"public final boolean handle(HttpServletRequest req, HttpServletResponse res, String target) {\n if (HuluSetting.isDevMode) {\n log.debug(\"String_Node_Str\", HttpUtil.getClientIP(req), method, target);\n }\n final ActionMethod actionMethod = actionMapping.getActionMethod(target);\n if (actionMethod == null || actionMethod.isHttpMethodMatch() == false) {\n return false;\n }\n fillReqAndRes(req, res);\n actionMethod.resetInterceptorPosition();\n try {\n actionMethod.invoke();\n } catch (ActionException e) {\n Render.renderError500(e.getCause());\n } finally {\n clearReqAndRes();\n }\n return true;\n}\n"
|
"public void tick() {\n setFloatingBus(computer.getMemory().readRaw(scannerAddress + x));\n if (hPeriod > 0) {\n hPeriod--;\n if (hPeriod == 0) {\n x = -1;\n setScannerLocation(currentWriter.getYOffset(y));\n }\n } else {\n if (!isVblank && x < (APPLE_CYCLES_PER_LINE - 1)) {\n draw();\n }\n if (x >= APPLE_CYCLES_PER_LINE - 1) {\n int yy = y + hblankOffsetY;\n if (yy < 0) {\n yy += APPLE_SCREEN_LINES;\n }\n if (yy >= APPLE_SCREEN_LINES) {\n yy -= (TOTAL_LINES - APPLE_SCREEN_LINES);\n }\n setScannerLocation(currentWriter.getYOffset(yy) + hblankOffsetX + (yy < 64 ? 128 : 0));\n x = -1;\n if (!isVblank) {\n if (lineDirty) {\n screenDirty = true;\n currentWriter.clearDirty(y);\n }\n hblankStart(video, y, lineDirty);\n lineDirty = false;\n forceRedrawRowCount--;\n }\n hPeriod = HBLANK;\n y++;\n if (y >= APPLE_SCREEN_LINES) {\n if (!isVblank) {\n y = APPLE_SCREEN_LINES - (TOTAL_LINES - APPLE_SCREEN_LINES);\n isVblank = true;\n vblankStart();\n computer.getMotherboard().vblankStart();\n } else {\n y = 0;\n isVblank = false;\n vblankEnd();\n computer.getMotherboard().vblankEnd();\n }\n }\n }\n }\n x++;\n}\n"
|
"public String addVendorInPlanningError() {\n Map sessionAttributes = ActionContext.getContext().getSession();\n OrderItems entity = operationsService.findOrderItemById((Integer) sessionAttributes.get(\"String_Node_Str\"));\n orderItem = transformToOrderItemFormBean(entity);\n Orders orderEntity = orderService.findOrdersById((Integer) sessionAttributes.get(\"String_Node_Str\"));\n order = transformToOrderFormBean(orderEntity);\n System.out.print(\"String_Node_Str\" + entity.getVesselScheduleId());\n if (entity.getVesselScheduleId() != null) {\n VesselSchedules vesselScheduleEntity = vesselSchedulesService.findVesselSchedulesByIdVoyageNumber(orderItem.getVesselScheduleId());\n vesselSchedule = transformToFormBeanVesselSchedule(vesselScheduleEntity);\n }\n vendorTruckingOriginList = vendorService.findVendorTruckByLocation(order.getOriginationPort());\n vendorTruckingDestinationList = vendorService.findVendorTruckByLocation(order.getDestinationPort());\n nameSizeList = (List) sessionAttributes.get(\"String_Node_Str\");\n orderItems = (List) sessionAttributes.get(\"String_Node_Str\");\n clearErrorsAndMessages();\n addActionMessage(\"String_Node_Str\");\n return SUCCESS;\n}\n"
|
"public void onInventoryClick(InventoryClickEvent event) {\n Inventory inventory = event.getInventory();\n if (inventory.getName() == null) {\n return;\n }\n String title = inventory.getTitle();\n if (!inventory.getTitle().startsWith(plugin.myLocale().warpsTitle + \"String_Node_Str\")) {\n return;\n }\n Player player = (Player) event.getWhoClicked();\n event.setCancelled(true);\n if (event.getSlotType().equals(SlotType.OUTSIDE)) {\n player.closeInventory();\n return;\n }\n if (event.getClick().equals(ClickType.SHIFT_RIGHT)) {\n player.closeInventory();\n player.updateInventory();\n return;\n }\n ItemStack clicked = event.getCurrentItem();\n if (DEBUG)\n plugin.getLogger().info(\"String_Node_Str\" + inventory.getSize());\n if (DEBUG)\n plugin.getLogger().info(\"String_Node_Str\" + clicked);\n if (DEBUG)\n plugin.getLogger().info(\"String_Node_Str\" + event.getRawSlot());\n if (event.getRawSlot() >= event.getInventory().getSize() || clicked.getType() == Material.AIR) {\n return;\n }\n int panelNumber = 0;\n try {\n panelNumber = Integer.valueOf(title.substring(title.indexOf('#') + 1));\n } catch (Exception e) {\n panelNumber = 0;\n }\n if (clicked.getItemMeta().hasDisplayName()) {\n String command = ChatColor.stripColor(clicked.getItemMeta().getDisplayName());\n if (DEBUG)\n plugin.getLogger().info(\"String_Node_Str\" + command);\n if (command != null) {\n if (command.equalsIgnoreCase(ChatColor.stripColor(plugin.myLocale().warpsNext))) {\n player.closeInventory();\n player.performCommand(Settings.ISLANDCOMMAND + \"String_Node_Str\" + (panelNumber + 1));\n } else if (command.equalsIgnoreCase(plugin.myLocale().warpsPrevious)) {\n player.closeInventory();\n player.performCommand(Settings.ISLANDCOMMAND + \"String_Node_Str\" + (panelNumber - 1));\n } else {\n player.closeInventory();\n player.sendMessage(ChatColor.GREEN + plugin.myLocale(player.getUniqueId()).warpswarpToPlayersSign.replace(\"String_Node_Str\", command));\n player.performCommand(Settings.ISLANDCOMMAND + \"String_Node_Str\" + command);\n }\n }\n }\n}\n"
|
"public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n HttpSession session = request.getSession();\n if (session != null) {\n String user = request.getParameter(\"String_Node_Str\");\n String pass = request.getParameter(\"String_Node_Str\");\n Configuration config = (Configuration) session.getAttribute(CommandHandler.ATT_CONFIG);\n if (config != null && config.getAdminLogin().equals(user) && config.getAdminPassword().equals(pass)) {\n org.snipsnap.server.Shutdown.shutdown();\n response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE, \"String_Node_Str\");\n System.exit(0);\n }\n }\n response.sendRedirect(SnipLink.absoluteLink(request, \"String_Node_Str\"));\n}\n"
|
"private void calculatePathwayScaling(final GL2 gl, final PathwayGraph pathway) {\n if (hashGLcontext2TextureManager.get(gl) == null)\n return;\n int pathwayPixelWidth = pathway.getWidth();\n int pathwayPixelHeight = pathway.getHeight();\n if (pathwayPixelWidth == -1 || pathwayPixelHeight == -1) {\n Logger.log(new Status(IStatus.ERROR, this.toString(), \"String_Node_Str\"));\n }\n float pathwayWidth = pixelGLConverter.getGLWidthForPixelWidth(pathwayPixelWidth);\n float pathwayHeight = pixelGLConverter.getGLHeightForPixelHeight(pathwayPixelHeight);\n float viewFrustumWidth = viewFrustum.getRight() - viewFrustum.getLeft();\n float viewFrustumHeight = viewFrustum.getTop() - viewFrustum.getBottom();\n float pathwayAspectRatio = pathwayWidth / pathwayHeight;\n float viewFrustumAspectRatio = viewFrustumWidth / viewFrustumHeight;\n boolean pathwayFitsViewFrustum = true;\n if (isRenderedRemote()) {\n float renderWidth;\n float renderHeight;\n if (pathwayWidth <= viewFrustumWidth && pathwayHeight <= viewFrustumHeight) {\n vecScaling.set(1, 1, 1f);\n vecTranslation.set((viewFrustum.getRight() - viewFrustum.getLeft()) / 2.0f - pathwayWidth / 2.0f, (viewFrustum.getTop() - viewFrustum.getBottom()) / 2.0f - pathwayHeight / 2.0f, 0);\n }\n }\n if (pathwayWidth < viewFrustumWidth) {\n vecTranslation.setX((viewFrustumWidth - pathwayWidth) / 2.0f);\n }\n if (pathwayHeight < viewFrustumWidth) {\n vecTranslation.setY((viewFrustumHeight - pathwayHeight) / 2.0f);\n }\n}\n"
|
"public SessionInfo toSessionInfo() {\n SessionInfo info = new SessionInfo();\n info.sid = sessionID.toString();\n if (sessionType == Session.USER_SESSION) {\n info.stype = \"String_Node_Str\";\n } else if (sessionType == Session.APPLICATION_SESSION) {\n info.stype = \"String_Node_Str\";\n }\n info.cid = clientID;\n info.cdomain = clientDomain;\n info.maxtime = Long.toString(getMaxSessionTime());\n info.maxidle = Long.toString(getMaxIdleTime());\n info.maxcaching = Long.toString(getMaxCachingTime());\n if (willExpireFlag == true) {\n info.timeidle = Long.toString(getIdleTime());\n info.timeleft = Long.toString(getTimeLeft());\n } else {\n info.timeidle = Long.toString(0);\n info.timeleft = Long.toString(Long.MAX_VALUE / 60);\n }\n if (isInvalid()) {\n info.state = \"String_Node_Str\";\n } else if (sessionState == Session.VALID) {\n info.state = \"String_Node_Str\";\n } else if (sessionState == Session.INACTIVE) {\n info.state = \"String_Node_Str\";\n } else if (sessionState == Session.DESTROYED) {\n info.state = \"String_Node_Str\";\n }\n info.properties = (Properties) sessionProperties.clone();\n return info;\n}\n"
|
"public void testIsSame4DiffId() {\n ImportItem ImportItem1 = mock(ImportItem.class);\n Property property1 = mock(Property.class);\n when(itemRecord1.getProperty()).thenReturn(property1);\n when(property1.getId()).thenReturn(\"String_Node_Str\");\n when(property1.getVersion()).thenReturn(\"String_Node_Str\");\n ItemRecord itemRecord2 = mock(ItemRecord.class);\n Property property2 = mock(Property.class);\n when(itemRecord2.getProperty()).thenReturn(property2);\n when(property2.getId()).thenReturn(\"String_Node_Str\");\n when(property2.getVersion()).thenReturn(\"String_Node_Str\");\n ImportBasicHandler basicHandler = new ImportBasicHandler();\n Assert.assertFalse(basicHandler.isSame(itemRecord1, itemRecord2));\n}\n"
|
"public INDArray subArray(int[] offsets, int[] shape, int[] stride) {\n ensureNotCleanedUp();\n int n = shape.length;\n if (shape.length < 1)\n return create(Nd4j.createBuffer(shape));\n if (offsets.length != n)\n throw new IllegalArgumentException(\"String_Node_Str\" + Arrays.toString(offsets));\n if (shape.length != n)\n throw new IllegalArgumentException(\"String_Node_Str\" + Arrays.toString(shape));\n if (Arrays.equals(shape, this.shape)) {\n if (ArrayUtil.isZero(offsets)) {\n return this;\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n }\n boolean adjustOffsets = false;\n if (offsets.length > 1 && Shape.isRowVectorShape(shape) && offsets[0] > 0) {\n for (int i = 1; i < offsets.length; i++) {\n if (offsets[i] == 0) {\n adjustOffsets = true;\n break;\n }\n }\n if (adjustOffsets) {\n for (int i = 1; i < offsets.length; i++) {\n if (offsets[i] < 1)\n offsets[i] = 1;\n }\n }\n }\n int offset = this.offset + ArrayUtil.dotProduct(offsets, this.stride);\n if (ordering() == NDArrayFactory.C) {\n return create(data, Arrays.copyOf(shape, shape.length), ArrayUtil.reverseCopy(stride), offset, ordering);\n } else if (ordering() == NDArrayFactory.FORTRAN) {\n return create(data, Arrays.copyOf(shape, shape.length), stride, offset, ordering);\n }\n throw new IllegalStateException(\"String_Node_Str\");\n}\n"
|
"public void paintCurrentStroke(Canvas canvas, Matrix toScrMatrix, boolean highQuality) {\n Path path = mCurrentPath;\n if (path == null) {\n return;\n }\n Paint paint = new Paint();\n canvas.save();\n canvas.concat(toScrMatrix);\n paint.setStyle(Style.STROKE);\n float scale = toScrMatrix.mapRadius(1);\n Path mCacheTransPath = new Path();\n mCacheTransPath.addPath(path, toScrMatrix);\n draw(canvas, paint, mCurrentColor, toScrMatrix.mapRadius(mCurrentRadius), mCacheTransPath);\n}\n"
|
"public String getCourseStudentListAsCsv(String courseId, String googleId) throws EntityDoesNotExistException {\n HashMap<String, CourseDetailsBundle> courses = getCourseSummariesForInstructor(googleId);\n CourseDetailsBundle course = courses.get(courseId);\n boolean hasSection = hasIndicatedSections(courseId);\n String export = \"String_Node_Str\";\n export += \"String_Node_Str\" + \"String_Node_Str\" + Sanitizer.sanitizeForCsv(courseId) + Const.EOL + \"String_Node_Str\" + \"String_Node_Str\" + Sanitizer.sanitizeForCsv(course.course.name) + Const.EOL;\n if (hasSection) {\n export += \"String_Node_Str\" + \"String_Node_Str\";\n }\n export += \"String_Node_Str\" + Const.EOL;\n for (SectionDetailsBundle section : course.sections) {\n for (TeamDetailsBundle team : section.teams) {\n for (StudentAttributes student : team.students) {\n String studentStatus = null;\n if (student.googleId == null || student.googleId.equals(\"String_Node_Str\")) {\n studentStatus = Const.STUDENT_COURSE_STATUS_YET_TO_JOIN;\n } else {\n studentStatus = Const.STUDENT_COURSE_STATUS_JOINED;\n }\n if (hasSection) {\n export += Sanitizer.sanitizeForCsv(section.name) + \"String_Node_Str\";\n }\n export += Sanitizer.sanitizeForCsv(StringHelper.recoverFromSanitizedText(team.name)) + \"String_Node_Str\" + Sanitizer.sanitizeForCsv(StringHelper.recoverFromSanitizedText(StringHelper.removeExtraSpace(student.name))) + \"String_Node_Str\" + Sanitizer.sanitizeForCsv(StringHelper.recoverFromSanitizedText(StringHelper.removeExtraSpace(student.lastName))) + \"String_Node_Str\" + Sanitizer.sanitizeForCsv(studentStatus) + \"String_Node_Str\" + Sanitizer.sanitizeForCsv(student.email) + Const.EOL;\n }\n }\n }\n return export;\n}\n"
|
"public void createConfigurationFile(String filename) throws IOException {\n ArgumentNotValid.checkNotNullOrEmpty(filename, \"String_Node_Str\");\n File f = new File(filename);\n FileWriter fw = new FileWriter(f);\n try {\n fw.write(deployConfiguration.getXML());\n } finally {\n if (fw != null) {\n fw.close();\n }\n }\n}\n"
|
"public SlackMessageHandle<SlackMessageReply> updateMessage(String timeStamp, SlackChannel channel, String message) {\n SlackMessageHandleImpl<SlackMessageReply> handle = new SlackMessageHandleImpl<SlackMessageReply>(getNextMessageId());\n Map<String, String> arguments = new HashMap<>();\n arguments.put(\"String_Node_Str\", authToken);\n arguments.put(\"String_Node_Str\", timeStamp);\n arguments.put(\"String_Node_Str\", channel.getId());\n arguments.put(\"String_Node_Str\", message);\n postSlackCommand(arguments, CHAT_UPDATE_COMMAND, handle);\n return handle;\n}\n"
|
"protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {\n ChannelBuffer buf = (ChannelBuffer) msg;\n int type = buf.readUnsignedShort();\n buf.readUnsignedShort();\n if (type == MSG_IDENT || type == MSG_IDENT_FULL) {\n buf.readUnsignedInt();\n int length = buf.readUnsignedShort();\n buf.skipBytes(length);\n length = buf.readUnsignedShort();\n buf.skipBytes(length);\n length = buf.readUnsignedShort();\n String imei = buf.readBytes(length).toString(Charset.defaultCharset());\n identify(imei, channel);\n } else if (hasDeviceId() && (type == MSG_POINT || type == MSG_ALARM || type == MSG_LOGMSG)) {\n List<Position> positions = new LinkedList<>();\n int recordCount = 1;\n if (type == MSG_LOGMSG) {\n recordCount = buf.readUnsignedShort();\n }\n for (int j = 0; j < recordCount; j++) {\n Position position = new Position();\n position.setProtocol(getProtocolName());\n position.setDeviceId(getDeviceId());\n if (type == MSG_LOGMSG) {\n position.set(Event.KEY_ARCHIVE, true);\n int subtype = buf.readUnsignedShort();\n if (subtype == MSG_ALARM) {\n position.set(Event.KEY_ALARM, true);\n }\n if (buf.readUnsignedShort() > buf.readableBytes()) {\n lastIndex += 1;\n break;\n }\n lastIndex = buf.readUnsignedInt();\n position.set(Event.KEY_INDEX, lastIndex);\n } else {\n newIndex = buf.readUnsignedInt();\n }\n Calendar time = Calendar.getInstance(TimeZone.getTimeZone(\"String_Node_Str\"));\n time.clear();\n time.setTimeInMillis(buf.readUnsignedInt() * 1000);\n position.setTime(time.getTime());\n position.setLatitude(buf.readInt() * 180.0 / 0x7FFFFFFF);\n position.setLongitude(buf.readInt() * 180.0 / 0x7FFFFFFF);\n position.setSpeed(buf.readUnsignedInt() / 100);\n position.setCourse(buf.readUnsignedShort() / 100);\n position.setAltitude(buf.readUnsignedShort() / 100);\n int satellitesNumber = buf.readUnsignedByte();\n position.set(Event.KEY_SATELLITES, satellitesNumber);\n position.setValid(satellitesNumber >= 3);\n position.set(Event.KEY_GSM, buf.readUnsignedByte());\n position.set(Event.KEY_ODOMETER, buf.readUnsignedInt());\n long extraFlags = buf.readLong();\n if ((extraFlags & 0x1) == 0x1) {\n int count = buf.readUnsignedShort();\n for (int i = 1; i <= count; i++) {\n position.set(Event.PREFIX_ADC + i, buf.readUnsignedShort());\n }\n }\n if ((extraFlags & 0x2) == 0x2) {\n int size = buf.readUnsignedShort();\n position.set(\"String_Node_Str\", buf.toString(buf.readerIndex(), size, Charset.defaultCharset()));\n buf.skipBytes(size);\n }\n if ((extraFlags & 0x4) == 0x4) {\n int size = buf.readUnsignedShort();\n StringBuilder hex = new StringBuilder();\n for (int i = buf.readerIndex(); i < buf.readerIndex() + size; i++) {\n byte b = buf.getByte(i);\n hex.append(HEX_CHARS.charAt((b & 0xf0) >> 4));\n hex.append(HEX_CHARS.charAt((b & 0x0F)));\n }\n position.set(\"String_Node_Str\", hex.toString());\n buf.skipBytes(size);\n }\n if (type == MSG_ALARM) {\n byte[] response = { (byte) 0xC9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };\n channel.write(ChannelBuffers.wrappedBuffer(response));\n position.set(Event.KEY_ALARM, true);\n }\n buf.readUnsignedInt();\n positions.add(position);\n }\n requestArchive(channel);\n return positions;\n }\n return null;\n}\n"
|
"public static String translateScriptPath(String aResourceId) throws Exception {\n if (aResourceId != null && !aResourceId.isEmpty()) {\n Matcher httpMatcher = pattern.matcher(aResourceId);\n if (httpMatcher.matches()) {\n return aResourceId;\n } else {\n if (cache == null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n String resourceId = normalizeResourcePath(aResourceId);\n String appElementCachedPath = cache.translateScriptPath(resourceId);\n if (appElementCachedPath != null) {\n return appElementCachedPath;\n } else {\n throw new IllegalArgumentException(String.format(\"String_Node_Str\", aResourceId));\n }\n }\n } else {\n return null;\n }\n}\n"
|
"public IMapData getMapData() throws MapLoadException {\n loadMapContent(EMapStartResources.HIGH_GOODS, null);\n OriginalMapFileContent mapData = mapContent.mapData;\n mapData.calculateBlockedPartitions();\n return mapData;\n}\n"
|
"public DecompilationResult decompileArchive(final File archive, File outputDir, Filter<ZipEntry> filter, final DecompilationListener listener) throws DecompilationException {\n Checks.checkFileToBeRead(archive, \"String_Node_Str\");\n Checks.checkDirectoryToBeFilled(outputDir, \"String_Node_Str\");\n log.info(\"String_Node_Str\" + archive.getAbsolutePath() + \"String_Node_Str\" + outputDir.getAbsolutePath() + \"String_Node_Str\");\n JarFile jar = loadJar(archive);\n final AtomicInteger jarEntryCount = new AtomicInteger(0);\n Enumeration<JarEntry> countEnum = jar.entries();\n while (countEnum.hasMoreElements()) {\n countEnum.nextElement();\n jarEntryCount.incrementAndGet();\n }\n final DecompilerSettings settings = getDefaultSettings(outputDir);\n settings.setTypeLoader(new CompositeTypeLoader(new JarTypeLoader(jar), settings.getTypeLoader()));\n final DecompilationResult res = new DecompilationResult();\n Filter.Result filterRes = Filter.Result.ACCEPT;\n final AtomicInteger current = new AtomicInteger(0);\n final Enumeration<JarEntry> entries = jar.entries();\n Collection<Callable<File>> tasks = new ArrayList<Callable<File>>();\n final Queue<MetadataSystem> metadataSystemCache = new LinkedList<>();\n refreshMetadataCache(metadataSystemCache, settings);\n while (entries.hasMoreElements()) {\n final JarEntry entry = entries.nextElement();\n if (filter != null)\n filterRes = filter.decide(entry);\n if (filterRes == Filter.Result.REJECT) {\n jarEntryCount.decrementAndGet();\n continue;\n }\n if (filterRes == Filter.Result.STOP)\n break;\n final String name = entry.getName();\n if (!name.endsWith(\"String_Node_Str\")) {\n jarEntryCount.decrementAndGet();\n continue;\n }\n final DecompilerSettings settings = getDefaultSettings(outputDir);\n settings.setTypeLoader(new CompositeTypeLoader(new WindupJarTypeLoader(jar), settings.getTypeLoader()));\n final DecompilationResult res = new DecompilationResult();\n Filter.Result filterRes = Filter.Result.ACCEPT;\n final AtomicInteger current = new AtomicInteger(0);\n final Enumeration<JarEntry> entries = jar.entries();\n Collection<Callable<File>> tasks = new ArrayList<Callable<File>>();\n final Queue<MetadataSystem> metadataSystemCache = new LinkedList<>();\n refreshMetadataCache(metadataSystemCache, settings);\n while (entries.hasMoreElements()) {\n final JarEntry entry = entries.nextElement();\n if (filter != null)\n filterRes = filter.decide(entry);\n if (filterRes == Filter.Result.REJECT) {\n jarEntryCount.decrementAndGet();\n continue;\n }\n if (filterRes == Filter.Result.STOP)\n break;\n final String name = entry.getName();\n if (!name.endsWith(\"String_Node_Str\")) {\n jarEntryCount.decrementAndGet();\n continue;\n }\n final String typeName = StringUtils.removeEnd(name, \"String_Node_Str\");\n Callable<File> callable = new Callable<File>() {\n\n public File call() throws Exception {\n MetadataSystem metadataSystem = null;\n try {\n synchronized (metadataSystemCache) {\n if (current.incrementAndGet() % 50 == 0) {\n log.info(\"String_Node_Str\" + current + \"String_Node_Str\" + jarEntryCount);\n refreshMetadataCache(metadataSystemCache, settings);\n }\n metadataSystem = metadataSystemCache.remove();\n }\n ExecutionStatistics.get().begin(\"String_Node_Str\");\n final DecompileExecutor t = new DecompileExecutor(metadataSystem, typeName);\n t.start();\n t.join(60000L);\n if (!t.success) {\n if (t.e == null) {\n t.cancelDecompilation();\n throw new RuntimeException(\"String_Node_Str\", t.e);\n } else {\n throw new RuntimeException(t.e);\n }\n }\n File outputFile = t.outputFile;\n if (outputFile != null) {\n listener.fileDecompiled(name, outputFile.getAbsolutePath());\n res.addDecompiled(name, outputFile.getAbsolutePath());\n }\n return outputFile;\n } catch (Throwable th) {\n String msg = \"String_Node_Str\" + archive.getPath() + \"String_Node_Str\" + name + \"String_Node_Str\" + th.getMessage();\n DecompilationFailure ex = new DecompilationFailure(msg, name, th);\n log.log(Level.SEVERE, msg, ex);\n res.addFailure(ex);\n } finally {\n if (metadataSystem != null) {\n synchronized (metadataSystemCache) {\n metadataSystemCache.add(metadataSystem);\n }\n }\n ExecutionStatistics.get().end(\"String_Node_Str\");\n }\n return null;\n }\n };\n tasks.add(callable);\n }\n try {\n exService.invokeAll(tasks);\n } catch (InterruptedException e) {\n throw new IllegalStateException(\"String_Node_Str\");\n } finally {\n listener.decompilationProcessComplete();\n }\n return res;\n}\n"
|
"private void checkTimeLockedDependency(boolean shouldAccept) throws Exception {\n control.replay();\n connectWithVersion(useNotFound ? 70001 : 60001);\n ECKey key = new ECKey();\n Wallet wallet = new Wallet(unitTestParams);\n wallet.addKey(key);\n wallet.setAcceptTimeLockedTransactions(shouldAccept);\n peer.addWallet(wallet);\n final Transaction[] vtx = new Transaction[1];\n wallet.addEventListener(new AbstractWalletEventListener() {\n public void onCoinsReceived(Wallet wallet, Transaction tx, BigInteger prevBalance, BigInteger newBalance) {\n vtx[0] = tx;\n }\n });\n Transaction t2 = new Transaction(unitTestParams);\n t2.setLockTime(999999);\n Sha256Hash t3 = Sha256Hash.create(\"String_Node_Str\".getBytes(Charset.forName(\"String_Node_Str\")));\n t2.addInput(new TransactionInput(unitTestParams, t2, new byte[] {}, new TransactionOutPoint(unitTestParams, 0, t3)));\n t2.addOutput(Utils.toNanoCoins(1, 0), new ECKey());\n Transaction t1 = new Transaction(unitTestParams);\n t1.addInput(t2.getOutput(0));\n t1.addOutput(Utils.toNanoCoins(1, 0), key);\n InventoryMessage inv = new InventoryMessage(unitTestParams);\n inv.addTransaction(t1);\n inbound(peer, inv);\n GetDataMessage getdata = (GetDataMessage) outbound();\n assertEquals(t1.getHash(), getdata.getItems().get(0).hash);\n inbound(peer, t1);\n assertNull(vtx[0]);\n getdata = (GetDataMessage) outbound();\n assertEquals(t2.getHash(), getdata.getItems().get(0).hash);\n inbound(peer, t2);\n getdata = (GetDataMessage) outbound();\n assertEquals(t3, getdata.getItems().get(0).hash);\n NotFoundMessage notFound = new NotFoundMessage(unitTestParams);\n notFound.addItem(new InventoryItem(InventoryItem.Type.Transaction, t3));\n inbound(peer, notFound);\n if (shouldAccept)\n assertNotNull(vtx[0]);\n else\n assertNull(vtx[0]);\n}\n"
|
"void readArrayMapInternal(ArrayMap outVal, int N, ClassLoader loader) {\n if (DEBUG_ARRAY_MAP) {\n RuntimeException here = new RuntimeException(\"String_Node_Str\");\n here.fillInStackTrace();\n Log.d(TAG, \"String_Node_Str\" + N + \"String_Node_Str\", here);\n }\n while (N > 0) {\n Object key = readValue(loader);\n if (DEBUG_ARRAY_MAP)\n startPos = dataPosition();\n Object key = readValue(loader);\n Object value = readValue(loader);\n outVal.append(key, value);\n N--;\n }\n}\n"
|
"public NetworkACLItemVO findByAclAndNumber(long aclId, int number) {\n SearchCriteria<NetworkACLItemVO> sc = AllFieldsSearch.create();\n sc.setParameters(\"String_Node_Str\", aclId);\n sc.setParameters(\"String_Node_Str\", number);\n NetworkACLItemVO vo = findOneBy(sc);\n if (vo != null) {\n loadCidrs(vo);\n }\n return vo;\n}\n"
|
"protected void updateTiles(Axis2D axis) {\n int xPix = axis.getAxisX().getSizePixels();\n if (!isVisible() || xPix <= 0) {\n return;\n }\n double minx = axis.getMinX();\n double maxx = axis.getMaxX();\n double maxy = axis.getMaxY();\n double miny = axis.getMinY();\n double[] bounds = new double[] { minx, maxx, miny, maxy };\n if (Arrays.equals(bounds, lastBounds.get())) {\n return;\n }\n lastBounds.set(bounds);\n double xTileDim = xPix / 256.;\n LatLonGeo ne = geoProj.unproject(maxx, maxy);\n LatLonGeo sw = geoProj.unproject(minx, miny);\n double east = ne.getLonDeg();\n double west = sw.getLonDeg();\n double lonSizeDeg = (east - west) / xTileDim;\n double zoomApprox = Math.log(360 / lonSizeDeg) / LOG2;\n final int zoom = (int) Math.min(Math.round(zoomApprox), maxZoom);\n lastZoom.set(zoom);\n Vector2d tileNE = slippyProj[zoom].project(ne);\n Vector2d tileSW = slippyProj[zoom].project(sw);\n final int tileYmin = (int) Math.floor(tileNE.getY());\n final int tileYmax = (int) Math.ceil(tileSW.getY());\n final int tileXmin = (int) Math.floor(tileSW.getX());\n final int tileXmax = (int) Math.ceil(tileNE.getX());\n lock.lock();\n try {\n for (int y = tileYmin; y < tileYmax; y++) {\n for (int x = tileXmin; x < tileXmax; x++) {\n RGBTextureProjected2D tex = cache.getTextureIfPresent(zoom, x, y);\n if (tex != null && drawableTextures.containsKey(new TextureUnit<DrawableTexture>(tex))) {\n continue;\n }\n exec.submit(new FetchTexture(zoom, x, y));\n }\n }\n Iterator<TextureUnit<DrawableTexture>> itr = drawableTextures.keySet().iterator();\n while (itr.hasNext()) {\n TextureUnit<DrawableTexture> texUnit = itr.next();\n TextureProjected2D tex = (TextureProjected2D) texUnit.getTexture();\n double[] texBounds = getBounds(tex.getProjection());\n int texZoom = texZoomMap.get(tex);\n if (texZoom != zoom || !intersect(bounds, texBounds)) {\n itr.remove();\n texZoomMap.remove(tex);\n }\n }\n } finally {\n lock.unlock();\n }\n}\n"
|
"public void applyParameters(Material program) {\n super.applyParameters(program);\n int texId = 0;\n DynamicFBOsManager dynamicFBOsManager = CoreRegistry.get(DynamicFBOsManager.class);\n FBO sceneOpaque = dynamicFBOsManager.get(DefaultDynamicFBOs.READ_ONLY_GBUFFER.getName());\n if (sceneOpaque != null) {\n GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);\n sceneOpaque.bindTexture();\n program.setInt(\"String_Node_Str\", texId++, true);\n GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);\n sceneOpaque.bindDepthTexture();\n program.setInt(\"String_Node_Str\", texId++, true);\n GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);\n sceneOpaque.bindNormalsTexture();\n program.setInt(\"String_Node_Str\", texId++, true);\n GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);\n sceneOpaque.bindLightBufferTexture();\n program.setInt(\"String_Node_Str\", texId++, true);\n }\n FBO sceneReflectiveRefractive = dynamicFBOsManager.get(ChunksRefractiveReflectiveNode.REFRACTIVE_REFLECTIVE_URN);\n if (sceneReflectiveRefractive != null) {\n GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);\n sceneReflectiveRefractive.bindTexture();\n program.setInt(\"String_Node_Str\", texId++, true);\n }\n RenderingConfig renderingConfig = CoreRegistry.get(Config.class).getRendering();\n Camera activeCamera = CoreRegistry.get(WorldRenderer.class).getActiveCamera();\n if (renderingConfig == null || activeCamera == null) {\n return;\n }\n if (renderingConfig.isLocalReflections()) {\n if (sceneReflectiveRefractive != null) {\n GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);\n sceneReflectiveRefractive.bindNormalsTexture();\n program.setInt(\"String_Node_Str\", texId++, true);\n }\n program.setMatrix4(\"String_Node_Str\", activeCamera.getInverseProjectionMatrix(), true);\n program.setMatrix4(\"String_Node_Str\", activeCamera.getProjectionMatrix(), true);\n }\n if (renderingConfig.isSsao()) {\n GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);\n dynamicFBOsManager.bindFboColorTexture(AmbientOcclusionPassesNode.SSAO_BLURRED_URN);\n program.setInt(\"String_Node_Str\", texId++, true);\n }\n if (renderingConfig.isOutline()) {\n GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);\n dynamicFBOsManager.bindFboColorTexture(OutlineNode.OUTLINE_URN);\n program.setInt(\"String_Node_Str\", texId++, true);\n program.setFloat(\"String_Node_Str\", outlineDepthThreshold, true);\n program.setFloat(\"String_Node_Str\", outlineThickness, true);\n }\n if (renderingConfig.isVolumetricFog()) {\n program.setMatrix4(\"String_Node_Str\", activeCamera.getInverseViewProjectionMatrix(), true);\n }\n if (renderingConfig.isInscattering()) {\n GL13.glActiveTexture(GL13.GL_TEXTURE0 + texId);\n dynamicFBOsManager.bindFboColorTexture(SkyBandsNode.SKY_BAND_1_URN);\n program.setInt(\"String_Node_Str\", texId++, true);\n Vector4f skyInscatteringSettingsFrag = new Vector4f();\n skyInscatteringSettingsFrag.y = skyInscatteringStrength;\n skyInscatteringSettingsFrag.z = skyInscatteringLength;\n skyInscatteringSettingsFrag.w = skyInscatteringThreshold;\n program.setFloat4(\"String_Node_Str\", skyInscatteringSettingsFrag, true);\n }\n}\n"
|
"public void postNotification() {\n if (foregroundId != 0 && foregroundNoti != null) {\n final String localPackageName = packageName;\n final int localForegroundId = foregroundId;\n final Notification localForegroundNoti = foregroundNoti;\n ams.mHandler.post(new Runnable() {\n public void run() {\n INotificationManager inm = NotificationManager.getService();\n if (inm == null) {\n return;\n }\n try {\n int[] outId = new int[1];\n inm.enqueueNotification(localPackageName, localForegroundId, localForegroundNoti, outId);\n } catch (RemoteException e) {\n }\n }\n }\n }\n}\n"
|
"private int suck() throws IOException {\n if (buffer.remaining() == buffer.capacity())\n throw new IOException(\"String_Node_Str\");\n int bytesRead = suckle();\n if (bytesRead < 0)\n throw new EOFException(\"String_Node_Str\");\n return bytesRead;\n}\n"
|
"public void test_read_withValidInt() throws Exception {\n positionA = positionDAO.create(positionA);\n Position returnValue2 = positionDAO.create(positionB);\n Position returnValue3 = positionDAO.create(positionC);\n assertTrue(positionDAO.read(returnValue1.getId()).equals(returnValue1));\n assertTrue(positionDAO.read(returnValue2.getId()).equals(returnValue2));\n assertTrue(positionDAO.read(returnValue3.getId()).equals(returnValue3));\n}\n"
|
"public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float sx, float sy, float sz) {\n boolean wrenchUsed = testWrenchUsage(x, y, z, player);\n if (wrenchUsed) {\n if (world.isRemote) {\n EndergenicTileEntity endergenicTileEntity = (EndergenicTileEntity) world.getTileEntity(x, y, z);\n world.playSound(x, y, z, \"String_Node_Str\", 1.0f, 1.0f, false);\n endergenicTileEntity.useWrench(player);\n }\n return true;\n } else {\n return super.onBlockActivated(world, x, y, z, player, side, sx, sy, sz);\n }\n}\n"
|
"public float getTotalBranchCoverage() {\n if (this.getCoverageResults().size() <= 0) {\n return 0.0f;\n }\n float totalBranch = this.getBranchCoverage() / this.getCoverageResults().size();\n totalBranch = Utils.roundFloat(1, RoundingMode.HALF_EVEN, totalBranch);\n return totalBranch;\n}\n"
|
"public void run() {\n synchronized (this) {\n try {\n activateBranches();\n while (isActive()) {\n while (!isIterationOver()) {\n wait();\n if (isDeadlocked() && !isIterationOver()) {\n while (isDeadlocked() && !isIterationOver()) {\n _getDirector()._branchCntlrBlocked();\n wait();\n }\n _getDirector()._branchUnBlocked(this);\n }\n }\n if (isIterationOver() && isActive()) {\n while (isIterationOver() && isActive()) {\n _getDirector()._branchBlocked(this);\n wait();\n }\n _getDirector()._branchUnBlocked(this);\n }\n }\n } catch (InterruptedException e) {\n }\n }\n}\n"
|
"public void initialize(IEmitterServices service) throws EngineException {\n this.service = service;\n if (service != null) {\n this.out = EmitterUtil.getOuputStream(service, \"String_Node_Str\" + getOutputFormat());\n }\n context.setTempFileDir(service.getReportEngine().getConfig().getTempDir());\n IReportContext reportContext = service.getReportContext();\n if (reportContext != null) {\n Locale locale = reportContext.getLocale();\n if (locale != null) {\n context.setLocale(ULocale.forLocale(locale));\n }\n}\n"
|
"public void createDomain(String domainName, String adminID) {\n if (this.hasApplicationConfiguration()) {\n if (!Boolean.parseBoolean(getProperty(NOT_ROUTE53_PROPERTY))) {\n ApplicationConfiguration appConf = this.applicationConfigurationDAO.get(APPLICATION_NAME);\n Route53Util.createDomain(domainName, appConf.getRoute53AccessKeyID(), appConf.getRoute53AccessKeySecret(), appConf.getRoute53ZoneID());\n } else {\n throw new DataDoesNotExistsException(\"String_Node_Str\");\n }\n }\n}\n"
|
"private void callFunction(Context context, String function, FunctionType concrete, List<Var> oList, List<Var> iList, Var priorityVal) throws UndefinedTypeException, UserException {\n ArrayList<Var> realIList = new ArrayList<Var>(iList.size());\n ArrayList<Var> derefVars = new ArrayList<Var>();\n ArrayList<Var> waitVars = new ArrayList<Var>();\n Context waitContext = null;\n assert (concrete.getInputs().size() == iList.size());\n for (int i = 0; i < iList.size(); i++) {\n Var input = iList.get(i);\n Type inputType = input.type();\n Type expType = concrete.getInputs().get(i);\n if (inputType.getImplType().equals(expType.getImplType())) {\n realIList.add(input);\n } else if (Types.isRefTo(inputType, expType)) {\n if (waitContext == null) {\n waitContext = new LocalContext(context);\n }\n Var derefed;\n derefed = waitContext.createAliasVariable(expType);\n waitVars.add(input);\n derefVars.add(derefed);\n realIList.add(derefed);\n } else if (Types.isUpdateableEquiv(inputType, expType)) {\n realIList.add(snapshotUpdateable(context, input));\n } else {\n throw new STCRuntimeError(context.getFileLine() + \"String_Node_Str\" + \"String_Node_Str\" + inputType.toString() + \"String_Node_Str\" + expType.toString());\n }\n }\n ArrayList<Var> usedVars = null;\n if (waitContext != null) {\n FunctionContext fc = context.getFunctionContext();\n usedVars = new ArrayList<Var>();\n usedVars.addAll(iList);\n usedVars.addAll(oList);\n backend.startWaitStatement(fc.constructName(\"String_Node_Str\" + function), waitVars, usedVars, new ArrayList<Var>(), WaitMode.DATA_ONLY, false, TaskMode.LOCAL);\n assert (waitVars.size() == derefVars.size());\n for (int i = 0; i < waitVars.size(); i++) {\n Var derefVar = derefVars.get(i);\n varCreator.declare(derefVar);\n if (Types.isArrayRef(waitVars.get(i).type())) {\n backend.retrieveRef(derefVar, waitVars.get(i));\n } else {\n throw new STCRuntimeError(\"String_Node_Str\" + \"String_Node_Str\" + derefVar);\n }\n }\n }\n backendFunctionCall(context, function, oList, realIList, priorityVal);\n if (waitContext != null) {\n backend.endWaitStatement(usedVars, new ArrayList<Var>());\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.