content stringlengths 40 137k |
|---|
"protected TUExecutionResult execution(File transformedAppFolder, TransformationContext transformationContext) {\n File pomFile = getAbsoluteFile(transformedAppFolder, transformationContext);\n TUExecutionResult result = null;\n try {\n for (MavenInvocationOutputHandler outputHandler : outputHandlers) {\n multipleOutputHandler.register(outputHandler);\n }\n request.setPomFile(pomFile);\n request.setGoals(Arrays.asList(goals));\n request.setOutputHandler(multipleOutputHandler);\n if (mavenFailureBehavior != null) {\n request.setFailureBehavior(mavenFailureBehavior);\n }\n if (null != properties && false == properties.isEmpty()) {\n request.setProperties(properties);\n }\n invocationResult = invoker.execute(request);\n int exitCode = invocationResult.getExitCode();\n Map<Class<? extends MavenInvocationOutputHandler>, Object> outputHandlersResult = multipleOutputHandler.getResult();\n if (exitCode == 0) {\n result = TUExecutionResult.value(this, outputHandlersResult);\n } else {\n Exception e = invocationResult.getExecutionException();\n if (e == null) {\n e = new TransformationUtilityException(String.format(\"String_Node_Str\", Arrays.toString(goals), exitCode));\n }\n if (warnOnError) {\n result = TUExecutionResult.warning(this, e, outputHandlersResult);\n } else {\n result = TUExecutionResult.error(this, e, outputHandlersResult);\n }\n }\n } catch (Exception e) {\n if (invocationResult != null) {\n Exception invocationException = invocationResult.getExecutionException();\n if (invocationException != null) {\n result = TUExecutionResult.error(this, invocationException);\n }\n }\n if (result == null) {\n if (warnOnError) {\n result = TUExecutionResult.warning(this, e, null);\n } else {\n result = TUExecutionResult.error(this, e);\n }\n }\n }\n return result;\n}\n"
|
"private void moveSelectedTo(ShortPoint2D pos, List<Integer> list) {\n if (list.size() == 1) {\n NewMovable currMovable = NewMovable.getMovableByID(list.get(0));\n if (currMovable != null)\n currMovable.moveTo(targetPosition);\n } else if (!movableIds.isEmpty()) {\n short radius = 1;\n short ringsWithoutSuccessCtr = 0;\n Iterator<ShortPoint2D> posIterator = new HexBorderArea(targetPosition, radius).iterator();\n for (Integer currMovableId : movableIds) {\n NewMovable currMovable = NewMovable.getMovableByID(currMovableId);\n ShortPoint2D currTargetPos;\n do {\n if (!posIterator.hasNext()) {\n ringsWithoutSuccessCtr++;\n if (ringsWithoutSuccessCtr > 5) {\n return;\n }\n radius++;\n posIterator = new HexBorderArea(targetPosition, radius).iterator();\n }\n currTargetPos = posIterator.next();\n } while (!canMoveTo(currMovable, currTargetPos));\n ringsWithoutSuccessCtr = 0;\n currMovable.moveTo(currTargetPos);\n }\n }\n}\n"
|
"public Map<TableId, TableStats> getTableStats(HBaseAdmin admin) throws IOException {\n Map<TableId, TableStats> datasetStat = Maps.newHashMap();\n ClusterStatus clusterStatus = admin.getClusterStatus();\n for (ServerName serverName : clusterStatus.getServers()) {\n Map<byte[], RegionLoad> regionsLoad = clusterStatus.getLoad(serverName).getRegionsLoad();\n for (RegionLoad regionLoad : regionsLoad.values()) {\n TableName tableName = HRegionInfo.getTable(regionLoad.getName());\n HTableDescriptor tableDescriptor = admin.getTableDescriptor(tableName);\n if (!isCDAPTable(tableDescriptor)) {\n continue;\n }\n TableId tableId = HTableNameConverter.from(tableDescriptor);\n TableStats stat = datasetStat.get(tableId);\n if (stat == null) {\n stat = new TableStats(regionLoad.getStorefileSizeMB(), regionLoad.getMemStoreSizeMB());\n datasetStat.put(tableId, stat);\n } else {\n stat.incStoreFileSizeMB(regionLoad.getStorefileSizeMB());\n stat.incMemStoreSizeMB(regionLoad.getMemStoreSizeMB());\n }\n }\n }\n return datasetStat;\n}\n"
|
"private void _resetConditionalState() {\n synchronized (_internalLock) {\n _blocked = false;\n _branchesActive = 0;\n _branchesBlocked = 0;\n _branchesStarted = 0;\n _branchTrying = -1;\n _successfulBranch = -1;\n _threadList = null;\n }\n}\n"
|
"final public Drop Drop() throws ParseException {\n Drop drop = new Drop();\n Token tk = null;\n List dropArgs = new ArrayList();\n List commentArgs = new ArrayList();\n tk = jj_consume_token(K_DROP);\n if (tk.specialToken != null) {\n drop.setComment(tk.specialToken.image);\n }\n switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {\n case S_IDENTIFIER:\n tk = jj_consume_token(S_IDENTIFIER);\n break;\n case K_TABLE:\n tk = jj_consume_token(K_TABLE);\n break;\n case K_INDEX:\n tk = jj_consume_token(K_INDEX);\n break;\n default:\n jj_la1[162] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n drop.setType(tk.image);\n if (tk.specialToken != null) {\n drop.setTypeComment(tk.specialToken.image);\n }\n tk = jj_consume_token(S_IDENTIFIER);\n if (tk.specialToken != null) {\n drop.setNameComment(tk.specialToken.image);\n }\n drop.setName(tk.image);\n label_35: while (true) {\n switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {\n case S_IDENTIFIER:\n ;\n break;\n default:\n jj_la1[163] = jj_gen;\n break label_35;\n }\n tk = jj_consume_token(S_IDENTIFIER);\n if (tk.specialToken != null) {\n commentArgs.add(tk.specialToken.image);\n } else {\n commentArgs.add(\"String_Node_Str\");\n }\n dropArgs.add(tk.image);\n }\n if (dropArgs.size() > 0) {\n drop.setParameters(dropArgs);\n drop.setParametersComment(commentArgs);\n }\n {\n if (true)\n return drop;\n }\n throw new Error(\"String_Node_Str\");\n}\n"
|
"public final void handleAi() {\n if (explodeOnTarget) {\n double distance = Math.sqrt(Math.pow(x - targetX, 2) + Math.pow(y - targetY, 2));\n if (distance - collisionRadius - 20 <= 0) {\n setUnactive();\n active = false;\n parent.triggerCluster(8, x, y);\n }\n }\n for (int i = wrapper.enemies.size() - 1; i >= 0; --i) {\n if (wrapper.enemyStates.get(i) == wrapper.FULL_ACTIVITY) {\n double distance = Math.sqrt(Math.pow(x - wrapper.enemies.get(i).x, 2) + Math.pow(y - wrapper.enemies.get(i).y, 2));\n if (distance - wrapper.enemies.get(i).collisionRadius - collisionRadius <= 0) {\n wrapper.projectileStates.set(listId, 2);\n if (damageType == ProjectileLaser.DAMAGE_ON_TOUCH) {\n wrapper.enemies.get(i).triggerCollision(GameObject.COLLISION_WITH_PROJECTILE, damageOnTouch, armorPiercing);\n if (explodeOnTarget) {\n setUnactive();\n active = false;\n parent.triggerCluster(8, x, y);\n }\n setAction(GLRenderer.ANIMATION_DESTROY, 1, 1, 1);\n } else if (damageType == ProjectileLaser.EXPLODE_ON_TOUCH) {\n setAction(GLRenderer.ANIMATION_DESTROY, 1, 1, 1);\n causeExplosion();\n }\n break;\n }\n if (distance - wrapper.enemies.get(i).collisionRadius - damageRadius <= 0) {\n wrapper.enemies.get(i).health -= (damageOnRadius * (1 - 0.15 * wrapper.enemies.get(i).defence));\n }\n }\n }\n if (explodeTime > 0) {\n currentTime = android.os.SystemClock.uptimeMillis();\n if (currentTime - startTime >= explodeTime) {\n wrapper.projectileStates.set(listId, 2);\n setAction(GLRenderer.ANIMATION_DESTROY, 1, 1, 1);\n causeExplosion();\n }\n }\n if (wrapper.player.x + x < -Options.scaledScreenWidth || wrapper.player.x + x > Options.scaledScreenWidth || wrapper.player.y + y < -Options.scaledScreenHeight || wrapper.player.y + y > Options.scaledScreenHeight) {\n setUnactive();\n }\n}\n"
|
"public synchronized void acceptPushUpload(String file, String host, int port, int index, String guid) {\n synchronized (this) {\n _activeUploads++;\n }\n clearFailedPushes();\n if ((!testAttemptingPush(host, index)) || (!testFailedPush(host, index)))\n return;\n insertAttemptingPush(host, index);\n Thread runner = new Thread() {\n public void run() {\n try {\n synchronized (UploadManager.this) {\n _activeUploads++;\n }\n doSingleUpload(uploader, host, index);\n } finally {\n synchronized (UploadManager.this) {\n _activeUploads--;\n }\n uploader.stop();\n }\n }\n if (uploader != null)\n uploader.stop();\n }\n}\n"
|
"public void simpleMode(InventoryClickEvent event) {\n DecimalFormat f = new DecimalFormat(\"String_Node_Str\");\n int slot = event.getSlot();\n if (slot < 0) {\n event.setCancelled(true);\n return;\n }\n boolean top = event.getView().convertSlot(event.getRawSlot()) == event.getRawSlot();\n if (top) {\n if (event.isShiftClick()) {\n ((Player) event.getWhoClicked()).sendMessage(ChatColor.GOLD + \"String_Node_Str\");\n event.setCancelled(true);\n return;\n }\n if (isManagementSlot(slot, 1)) {\n if (isWool(event.getCurrentItem(), itemsConfig.getItemManagement(7))) {\n switchInventory(TraderStatus.SELL);\n } else if (isWool(event.getCurrentItem(), itemsConfig.getItemManagement(0))) {\n if (!permissionsManager.has(player, \"String_Node_Str\")) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\"));\n } else {\n switchInventory(TraderStatus.SELL);\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\"));\n }\n } else if (isWool(event.getCurrentItem(), itemsConfig.getItemManagement(1))) {\n if (!permissionsManager.has(player, \"String_Node_Str\")) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\"));\n } else {\n switchInventory(TraderStatus.BUY);\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\"));\n }\n }\n } else if (equalsTraderStatus(TraderStatus.SELL)) {\n if (selectItem(slot, TraderStatus.SELL).hasSelectedItem()) {\n if (getSelectedItem().hasMultipleAmouts() && permissionsManager.has(player, \"String_Node_Str\")) {\n switchInventory(getSelectedItem());\n setTraderStatus(TraderStatus.SELL_AMOUNT);\n } else {\n double price = getPrice(player, \"String_Node_Str\");\n if (!checkLimits()) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else if (!inventoryHasPlace(0)) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else if (!buyTransaction(price)) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else {\n addSelectedToInventory(0);\n updateLimits();\n log(\"String_Node_Str\", getSelectedItem().getItemStack().getTypeId(), getSelectedItem().getItemStack().getData().getData(), getSelectedItem().getAmount(), price);\n if (!checkLimits()) {\n getStock().removeItem(\"String_Node_Str\", slot);\n this.switchInventory(getTraderStatus());\n }\n }\n }\n }\n } else if (equalsTraderStatus(TraderStatus.SELL_AMOUNT)) {\n if (!event.getCurrentItem().getType().equals(Material.AIR)) {\n double price = getPrice(player, \"String_Node_Str\", slot);\n if (!checkLimits(slot)) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else if (!inventoryHasPlace(slot)) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else if (!buyTransaction(price)) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else {\n addSelectedToInventory(slot);\n updateLimits(slot);\n switchInventory(getSelectedItem());\n log(\"String_Node_Str\", getSelectedItem().getItemStack().getTypeId(), getSelectedItem().getItemStack().getData().getData(), getSelectedItem().getAmount(slot), price);\n if (!checkLimits(slot)) {\n getStock().removeItem(\"String_Node_Str\", slot);\n this.switchInventory(this.getTraderStatus());\n }\n }\n }\n }\n setInventoryClicked(true);\n } else {\n if (equalsTraderStatus(TraderStatus.BUY)) {\n if (selectItem(event.getCurrentItem(), TraderStatus.BUY, true).hasSelectedItem()) {\n double price = getPrice(player, \"String_Node_Str\");\n int scale = event.getCurrentItem().getAmount() / getSelectedItem().getAmount();\n if (!checkBuyLimits(scale)) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else if (!sellTransaction(price * scale, event.getCurrentItem())) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\" + getSelectedItem().getAmount() * scale).replace(\"String_Node_Str\", f.format(price * scale)));\n removeFromInventory(event.getCurrentItem(), event);\n log(\"String_Node_Str\", getSelectedItem().getItemStack().getTypeId(), getSelectedItem().getItemStack().getData().getData(), getSelectedItem().getAmount() * scale, price * scale);\n addItem(getSelectedItem().getItemStack(), scale, getSelectedItem());\n }\n }\n } else if (equalsTraderStatus(TraderStatus.SELL_AMOUNT)) {\n event.setCancelled(true);\n return;\n } else if (selectItem(event.getCurrentItem(), TraderStatus.BUY, true, true).hasSelectedItem()) {\n double price = getPrice(player, \"String_Node_Str\");\n int scale = event.getCurrentItem().getAmount() / getSelectedItem().getAmount();\n if (!permissionsManager.has(player, \"String_Node_Str\")) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else if (!checkBuyLimits(scale)) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else if (!sellTransaction(price * scale, event.getCurrentItem())) {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n } else {\n player.sendMessage(localeManager.getLocaleString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\" + getSelectedItem().getAmount() * scale).replace(\"String_Node_Str\", f.format(price * scale)));\n updateBuyLimits(scale);\n removeFromInventory(event.getCurrentItem(), event);\n log(\"String_Node_Str\", getSelectedItem().getItemStack().getTypeId(), getSelectedItem().getItemStack().getData().getData(), getSelectedItem().getAmount() * scale, price * scale);\n addItem(getSelectedItem().getItemStack(), scale, getSelectedItem());\n }\n }\n setInventoryClicked(false);\n }\n event.setCancelled(true);\n}\n"
|
"public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n String methodName = method.getName();\n if (method.getReturnType().equals(clazz))\n return assoc(methodName, args[0]);\n switch(methodName) {\n case \"String_Node_Str\":\n return map;\n case \"String_Node_Str\":\n return clazz;\n case \"String_Node_Str\":\n return assoc((String) args[0], args[1]);\n case \"String_Node_Str\":\n return assocEx((String) args[0], args[1]);\n case \"String_Node_Str\":\n return without((String) args[0]);\n case \"String_Node_Str\":\n return map.toString();\n case \"String_Node_Str\":\n return map.hashCode();\n case \"String_Node_Str\":\n Object other = args[0];\n if (other instanceof DynamicObject)\n return map.equals(((DynamicObject) other).getMap());\n } else\n return method.invoke(map, args);\n default:\n return getValueFor(method);\n }\n}\n"
|
"public void onServiceConnected(ComponentName name, IBinder service) {\n binder = (NetworkComBinder) service;\n networkBound = true;\n tv.append(\"String_Node_Str\");\n binder.registerMessenger(eventMessenger);\n if (!binder.isConnectedToServer())\n binder.ConnectToServer();\n timer.schedule(new TimerTask() {\n public void run() {\n if (pingsPerformed < 20) {\n if (networkBound)\n binder.requestLatency();\n pingsPerformed++;\n } else {\n this.cancel();\n }\n }\n }, recurranceDelay * 1000, recurranceDelay * 1000);\n}\n"
|
"public Mana produceMana(boolean netMana, Game game, Ability source) {\n if (netMana) {\n return null;\n }\n Player controller = game.getPlayer(source.getControllerId());\n if (controller != null) {\n int manaCostExiled = 0;\n for (Cost cost : source.getCosts()) {\n if (cost.isPaid() && cost instanceof ExileTargetCost) {\n for (Card card : ((ExileTargetCost) cost).getPermanents()) {\n manaCostExiled += card.getConvertedManaCost();\n }\n }\n }\n ChoiceColor choice = new ChoiceColor();\n if (!controller.choose(Outcome.PutManaInPool, choice, game)) {\n return null;\n }\n Mana chosen = choice.getMana(manaCostExiled + 1);\n return manaBuilder.setMana(chosen, source, game).build();\n }\n return null;\n}\n"
|
"public static MetadataSchema find(Context context, String shortName) throws SQLException {\n if (shortName == null)\n return null;\n if (!isCacheInitialized()) {\n initCache(context);\n }\n if (!name2schema.containsKey(shortName))\n return null;\n return (MetadataSchema) name2schema.get(shortName);\n}\n"
|
"public Player getNextPlayerToSpectate(Players players, Player spectator) {\n if (spectator.isPureSpectator()) {\n return players.getNextAlivePlayerFrom(spectator.getSpectating());\n }\n Player player = spectator.getSpectating();\n return player != null ? spectator.getTeam().getNextAlivePlayerFrom(player) : spectator.getTeam().getAlivePlayer();\n}\n"
|
"public void onMessage(WebSocket socket, String data) {\n MainChannelWebSocket ws = (MainChannelWebSocket) socket;\n if (data.startsWith(\"String_Node_Str\") && ws.getUserLogin() == null) {\n onPeerDeclarationMessage(data, ws);\n } else {\n String callerLogin = ws.getUserLogin();\n try {\n JSONObject jsobj = new JSONObject(data);\n String type = jsobj.getString(\"String_Node_Str\");\n switch(type) {\n case ChannelMessagesType.USER_STATUS:\n onUserStatusRequestMessage(callerLogin, jsobj);\n break;\n case ChannelMessagesType.WEBRTC_INVITE:\n onWebRTCInviteMessage(callerLogin, jsobj);\n break;\n case ChannelMessagesType.WEBRTC_ACCEPT:\n onWebRTCAcceptMessage(callerLogin, jsobj);\n break;\n case ChannelMessagesType.WEBRTC_REJECT:\n onWebRTCRejectMessage(callerLogin, jsobj);\n break;\n case ChannelMessagesType.WEBRTC_HANGUP:\n onWebRTCHangupMessage(callerLogin, jsobj);\n break;\n case ChannelMessagesType.WEBRTC_ANSWER:\n case ChannelMessagesType.WEBRTC_OFFER:\n case ChannelMessagesType.WEBRTC_CANDIDATE:\n case ChannelMessagesType.WEBRTC_BYE:\n onWebRTCSignalingMessage(callerLogin, jsobj, data, type);\n break;\n case ChannelMessagesType.CHAT_MESSAGE:\n onChatMessage(callerLogin, jsobj);\n break;\n default:\n onUnrecognizedMessageType(callerLogin);\n break;\n }\n } catch (JSONException ex) {\n send(callerLogin, ChatMessagesBuilder.BuildJsonExMessage());\n }\n }\n}\n"
|
"private String getColumnTextForChild(ContextTableTabChildModel child, int columnIndex) {\n String text = \"String_Node_Str\";\n String sourceId = child.getContextParameter().getSource();\n String variableName = child.getContextParameter().getName();\n List<IContext> contextList = parentModel.getContexts();\n int size = contextList.size();\n if (columnIndex == 0)\n return child.getContextParameter().getName();\n else if (columnIndex - 1 < size) {\n IContext context = contextList.get(columnIndex - 1);\n List<IContextParameter> list = context.getContextParameterList();\n if (list != null && list.size() > 0) {\n for (IContextParameter contextPara : list) {\n String tempName = contextPara.getName();\n String tempSourceId = contextPara.getSource();\n if (tempName.equals(variableName) && tempSourceId.equals(sourceId)) {\n return ContextParameterUtils.checkAndHideValue(contextPara);\n }\n }\n }\n }\n return text;\n}\n"
|
"public List<Change> getDiffedChanges() throws VcsException {\n final List<Change> result = new ArrayList<Change>();\n for (Map.Entry<String, StringBuilder> e : myPatches.entrySet()) {\n final File file = new File(wcRoot, e.getKey().trim());\n final ContentRevision after = createAfter(file, FileStatus.MODIFIED);\n final String newContent = new DiffUtil().execute(after.getContent(), e.getValue().toString(), file.getName());\n final ContentRevision before = new SimpleContentRevision(newContent, new FilePathImpl(file, false), \"String_Node_Str\");\n result.add(new Change(before, after));\n }\n return result;\n}\n"
|
"public synchronized boolean removeEntry(String name) throws IOException {\n throw new IOException(CoreMessages.getString(ResourceConstants.READ_ONLY_ARCHIVE));\n}\n"
|
"public ICustomerDataset getCustomerDataset() {\n ComparatorsFactory.sort(units, ComparatorsFactory.TEXT_STATISTICS_COMPARATOR_ID);\n CustomerDefaultCategoryDataset customerdataset = new CustomerDefaultCategoryDataset();\n for (IndicatorUnit unit : units) {\n double value = Double.parseDouble(unit.getValue().toString());\n String label = unit.getIndicatorName();\n customerdataset.addValue(value, label, label);\n ChartDataEntity entity = new ChartDataEntity();\n entity.setIndicator(unit.getIndicator());\n entity.setLabel(label);\n entity.setValue(String.valueOf(value));\n entity.setPercent(value / unit.getIndicator().getCount());\n customerdataset.addDataEntity(entity);\n }\n return customerdataset;\n}\n"
|
"protected static boolean handleValidateDataSetColumn(ResultSetColumnHandle insertObj, EditPart target) {\n if (handleValidateDataSetColumnDropContainer(target) && DNDUtil.handleValidateTargetCanContainType(target.getModel(), ReportDesignConstants.DATA_ITEM)) {\n if (target.getModel() instanceof ModuleHandle || isMasterPageHeaderOrFooter(target.getModel())) {\n return true;\n }\n DesignElementHandle handle = (DesignElementHandle) target.getParent().getModel();\n if (handle instanceof ReportItemHandle) {\n ReportItemHandle bindingHolder = DEUtil.getListingContainer(handle);\n DataSetHandle dataSet = DEUtil.getFirstDataSet(handle);\n return dataSet == null && (bindingHolder == null || !bindingHolder.getColumnBindings().iterator().hasNext()) || insertObj.getElementHandle().equals(dataSet);\n }\n }\n return false;\n}\n"
|
"public void testAttachDetachOrder() {\n HasWidgetsTester.testAll(new HorizontalPanel());\n}\n"
|
"public void setImageMetadata(final ImageMetadata[] metadata) {\n imageData = metadata;\n if (imageData == null) {\n for (int i = 0; i <= maxZoomLevel; i++) {\n imageData = (ImageMetadata[]) ArrayUtils.add(imageData, new ImageMetadata());\n }\n } else if ((maxZoomLevel + 1) < imageData.length) {\n imageData = (ImageMetadata[]) ArrayUtils.subarray(imageData, 0, maxZoomLevel + 1);\n } else if (maxZoomLevel > imageData.length) {\n for (int i = imageData.length; i <= maxZoomLevel; i++) {\n imageData = (ImageMetadata[]) ArrayUtils.add(imageData, new ImageMetadata());\n }\n }\n}\n"
|
"public boolean checkWhereClause() {\n if (this.getColumnCount() <= 2) {\n return true;\n }\n GridColumn column = getColumn(2);\n ModelElementIndicator modelElementIndicator = (ModelElementIndicator) column.getData();\n try {\n resultSet = (DatabaseResultSet) getResultSet(modelElementIndicator);\n } catch (SQLException e) {\n MessageDialog.openWarning(null, DefaultMessagesImpl.getString(\"String_Node_Str\"), e.getMessage());\n try {\n if (sqlConn != null) {\n sqlConn.close();\n }\n } catch (SQLException e1) {\n }\n return false;\n }\n return true;\n}\n"
|
"private void initBindings(ICubeQueryDefinition cubeQuery, CubeHandle cube) throws BirtException {\n for (Iterator bindings = ChartReportItemUtil.getAllColumnBindingsIterator(handle); bindings.hasNext(); ) {\n ComputedColumnHandle column = (ComputedColumnHandle) bindings.next();\n IBinding binding = new Binding(column.getName());\n binding.setDataType(DataAdapterUtil.adaptModelDataType(column.getDataType()));\n binding.setAggrFunction(column.getAggregateFunction() == null ? null : DataAdapterUtil.adaptModelAggregationType(column.getAggregateFunction()));\n String expression = column.getExpression();\n if (expression == null) {\n for (Iterator argItr = column.argumentsIterator(); argItr.hasNext(); ) {\n AggregationArgumentHandle aah = (AggregationArgumentHandle) argItr.next();\n expression = aah.getValue();\n }\n }\n binding.setExpression(new ScriptExpression(expression));\n List lstAggOn = column.getAggregateOnList();\n if (expression == null || !bSingleChart && !lstAggOn.isEmpty()) {\n addAggregateOn(binding, lstAggOn, cubeQuery, cube);\n }\n registeredBindings.put(column.getName(), binding);\n registeredQueries.put(binding.getBindingName(), expression);\n }\n}\n"
|
"public Calc compileCall(ResolvedFunCall call, ExpCompiler compiler) {\n final ListCalc listCalc = compiler.compileList(call.getArg(0));\n final Calc calc = call.getArgCount() > 1 ? compiler.compileScalar(call.getArg(1), true) : new ValueCalc(call);\n return new GenericCalc(call) {\n\n public Object evaluate(Evaluator evaluator) {\n Aggregator aggregator = (Aggregator) evaluator.getProperty(Property.AGGREGATION_TYPE.name, null);\n if (aggregator == null) {\n throw newEvalException(null, \"String_Node_Str\");\n }\n Aggregator rollup = aggregator.getRollup();\n if (rollup == null) {\n throw newEvalException(null, \"String_Node_Str\" + aggregator + \"String_Node_Str\");\n }\n final List list = evaluateCurrentList(listCalc, evaluator);\n return rollup.aggregate(evaluator.push(), list, calc);\n }\n public Calc[] getCalcs() {\n return new Calc[] { listCalc, calc };\n }\n public boolean dependsOn(Dimension dimension) {\n return anyDependsButFirst(getCalcs(), dimension);\n }\n };\n}\n"
|
"private boolean wakeUpRouterService(final Context context, final boolean ping, final boolean altTransportWake) {\n new ServiceFinder(context, context.getPackageName(), new ServiceFinder.ServiceFinderCallback() {\n\n public void onComplete(Vector<ComponentName> routerServices) {\n runningBluetoothServicePackage = new Vector<ComponentName>();\n runningBluetoothServicePackage.addAll(routerServices);\n if (runningBluetoothServicePackage.isEmpty()) {\n Intent serviceIntent;\n List<SdlAppInfo> sdlAppInfoList = AndroidTools.querySdlAppInfo(context, new SdlAppInfo.BestRouterComparator());\n if (sdlAppInfoList != null && !sdlAppInfoList.isEmpty()) {\n serviceIntent = new Intent();\n serviceIntent.setComponent(sdlAppInfoList.get(0).getRouterServiceComponentName());\n } else {\n Log.d(TAG, \"String_Node_Str\");\n return;\n }\n if (altTransportWake) {\n serviceIntent.setAction(TransportConstants.BIND_REQUEST_TYPE_ALT_TRANSPORT);\n }\n try {\n serviceIntent.putExtra(FOREGROUND_EXTRA, true);\n context.startForegroundService(serviceIntent);\n SdlRouterService.LocalRouterService self = SdlRouterService.getLocalRouterService(serviceIntent, serviceIntent.getComponent());\n Intent restart = new Intent(SdlRouterService.REGISTER_NEWER_SERVER_INSTANCE_ACTION);\n restart.putExtra(LOCAL_ROUTER_SERVICE_EXTRA, self);\n restart.putExtra(LOCAL_ROUTER_SERVICE_DID_START_OWN, true);\n context.sendBroadcast(restart);\n } catch (SecurityException e) {\n Log.e(TAG, \"String_Node_Str\");\n }\n } else {\n if (altTransportWake) {\n wakeRouterServiceAltTransport(context);\n return;\n }\n return;\n }\n }\n });\n return true;\n }\n}\n"
|
"public void transformPage(View view, float position) {\n switch(mTransformType) {\n case DEPTH:\n if (position > 0 && position < 1) {\n alpha = (1 - position);\n scale = MIN_SCALE_DEPTH + (1 - MIN_SCALE_DEPTH) * (1 - Math.abs(position));\n translationX = (view.getWidth() * -position);\n } else {\n view.setAlpha(0);\n view.setVisibility(View.INVISIBLE);\n }\n break;\n case ZOOM:\n if (position < -1) {\n view.setAlpha(0);\n } else if (position <= 1) {\n int pageWidth = view.getWidth();\n int pageHeight = view.getHeight();\n float scaleFactor = Math.max(MIN_SCALE_ZOOM, 1 - Math.abs(position));\n float vertMargin = pageHeight * (1 - scaleFactor) / 2;\n float horzMargin = pageWidth * (1 - scaleFactor) / 2;\n if (position < 0) {\n view.setTranslationX(horzMargin - vertMargin / 2);\n } else {\n view.setTranslationX(-horzMargin + vertMargin / 2);\n }\n view.setScaleX(scaleFactor);\n view.setScaleY(scaleFactor);\n view.setAlpha(MIN_ALPHA_ZOOM + (scaleFactor - MIN_SCALE_ZOOM) / (1 - MIN_SCALE_ZOOM) * (1 - MIN_ALPHA_ZOOM));\n } else {\n view.setAlpha(0);\n }\n break;\n }\n}\n"
|
"public void freeAreaOccupiedByTower(ShortPoint2D towerPosition) {\n Iterable<ShortPoint2D> positions = partitionsGrid.removeTowerAndFreeOccupiedArea(towerPosition);\n checkAllPositionsForEnclosedBlockedAreas(positions);\n}\n"
|
"public static boolean compareStringsIgnoreCase(String str1, String str2) {\n if (str1 == null) {\n return str2 == null;\n } else {\n return str1.equalsIgnoreCase(str2);\n }\n}\n"
|
"public String toString() {\n SortedMap<String, String> sorted = new TreeMap<String, String>(dictionary);\n StringBuilder result = new StringBuilder();\n for (Map.Entry<String, Object> entry : sorted.entrySet()) {\n result.append(entry.getKey()).append('\\n');\n for (Pronunciation pronunciation : (List<Pronunciation>) entry.getValue()) {\n result.append(\"String_Node_Str\").append(pronunciation).append('\\n');\n }\n }\n return result.toString();\n}\n"
|
"public boolean sendPacketToRegisteredApp(SdlPacket packet) {\n if (registeredApps != null && (registeredApps.size() > 0)) {\n Long appid = getAppIDForSession(packet.getSessionId());\n if (appid != null) {\n RegisteredApp app = registeredApps.get(appid);\n if (app == null) {\n Log.e(TAG, \"String_Node_Str\" + appid);\n return false;\n }\n byte version = (byte) packet.getVersion();\n int packetSize = (int) (packet.getDataSize() + SdlPacket.HEADER_SIZE);\n Message message = Message.obtain();\n Bundle bundle = new Bundle();\n if (packetSize < ByteArrayMessageSpliter.MAX_BINDER_SIZE) {\n message.what = TransportConstants.ROUTER_RECEIVED_PACKET;\n bundle.putParcelable(FORMED_PACKET_EXTRA_NAME, packet);\n bundle.putInt(TransportConstants.BYTES_TO_SEND_FLAGS, TransportConstants.BYTES_TO_SEND_FLAG_NONE);\n message.setData(bundle);\n return sendPacketMessageToClient(app, message, version);\n } else {\n byte[] bytes = packet.getPayload();\n SdlPacket copyPacket = new SdlPacket(packet.getVersion(), packet.isCompression(), (int) packet.getFrameType().getValue(), packet.getServiceType(), packet.getFrameInfo(), packet.getSessionId(), (int) packet.getDataSize(), packet.getMessageId(), null);\n message.what = TransportConstants.ROUTER_RECEIVED_PACKET;\n bundle.putParcelable(FORMED_PACKET_EXTRA_NAME, copyPacket);\n bundle.putInt(TransportConstants.BYTES_TO_SEND_FLAGS, TransportConstants.BYTES_TO_SEND_FLAG_SDL_PACKET_INCLUDED);\n message.setData(bundle);\n Log.d(TAG, \"String_Node_Str\" + message.getData().toString());\n if (!sendPacketMessageToClient(app, message, version)) {\n Log.w(TAG, \"String_Node_Str\" + app.appId);\n return false;\n }\n ByteArrayMessageSpliter splitter = new ByteArrayMessageSpliter(appid, TransportConstants.ROUTER_RECEIVED_PACKET, bytes);\n while (splitter.isActive()) {\n if (!sendPacketMessageToClient(app, splitter.nextMessage(), version)) {\n Log.w(TAG, \"String_Node_Str\" + app.appId);\n splitter.close();\n return false;\n }\n }\n Log.i(TAG, \"String_Node_Str\");\n }\n } else {\n Log.e(TAG, \"String_Node_Str\");\n }\n }\n return false;\n}\n"
|
"private void createDownloadsTable(SQLiteDatabase db) {\n try {\n db.execSQL(\"String_Node_Str\" + DB_TABLE);\n db.execSQL(\"String_Node_Str\" + DB_TABLE + \"String_Node_Str\" + Downloads.Impl._ID + \"String_Node_Str\" + Downloads.Impl.COLUMN_URI + \"String_Node_Str\" + Constants.RETRY_AFTER_X_REDIRECT_COUNT + \"String_Node_Str\" + Downloads.Impl.COLUMN_APP_DATA + \"String_Node_Str\" + Downloads.Impl.COLUMN_NO_INTEGRITY + \"String_Node_Str\" + Downloads.Impl.COLUMN_FILE_NAME_HINT + \"String_Node_Str\" + Constants.OTA_UPDATE + \"String_Node_Str\" + Downloads.Impl._DATA + \"String_Node_Str\" + Downloads.Impl.COLUMN_MIME_TYPE + \"String_Node_Str\" + Downloads.Impl.COLUMN_DESTINATION + \"String_Node_Str\" + Constants.NO_SYSTEM_FILES + \"String_Node_Str\" + Downloads.Impl.COLUMN_VISIBILITY + \"String_Node_Str\" + Downloads.Impl.COLUMN_CONTROL + \"String_Node_Str\" + Downloads.Impl.COLUMN_STATUS + \"String_Node_Str\" + Constants.FAILED_CONNECTIONS + \"String_Node_Str\" + Downloads.Impl.COLUMN_LAST_MODIFICATION + \"String_Node_Str\" + Downloads.Impl.COLUMN_NOTIFICATION_PACKAGE + \"String_Node_Str\" + Downloads.Impl.COLUMN_NOTIFICATION_CLASS + \"String_Node_Str\" + Downloads.Impl.COLUMN_NOTIFICATION_EXTRAS + \"String_Node_Str\" + Downloads.Impl.COLUMN_COOKIE_DATA + \"String_Node_Str\" + Downloads.Impl.COLUMN_USER_AGENT + \"String_Node_Str\" + Downloads.Impl.COLUMN_REFERER + \"String_Node_Str\" + Downloads.Impl.COLUMN_TOTAL_BYTES + \"String_Node_Str\" + Downloads.Impl.COLUMN_CURRENT_BYTES + \"String_Node_Str\" + Constants.ETAG + \"String_Node_Str\" + Constants.UID + \"String_Node_Str\" + Downloads.Impl.COLUMN_OTHER_UID + \"String_Node_Str\" + Downloads.Impl.COLUMN_TITLE + \"String_Node_Str\" + Downloads.Impl.COLUMN_DESCRIPTION + \"String_Node_Str\" + Constants.MEDIA_SCANNED + \"String_Node_Str\");\n } catch (SQLException ex) {\n Log.e(Constants.TAG, \"String_Node_Str\");\n throw ex;\n }\n}\n"
|
"public static void load(Configuration config) {\n String category = \"String_Node_Str\";\n config.addCustomCategoryComment(category, \"String_Node_Str\");\n chameleonSpawnRate = config.get(category, \"String_Node_Str\", 25).getInt() / 100f;\n treasureslimeSpawnRate = config.get(category, \"String_Node_Str\", 20).getInt() / 100f;\n hauntedToolSpawnRate = config.get(category, \"String_Node_Str\", 15).getInt() / 100f;\n groveSpriteSpawnRate = config.get(category, \"String_Node_Str\", 25).getInt() / 100f;\n bewitchedTomeSpawnRate = config.get(category, \"String_Node_Str\", 30).getInt() / 100f;\n filchLizardSpawnRate = config.get(category, \"String_Node_Str\", 25).getInt() / 100f;\n brainSlimeSpawnRate = config.get(category, \"String_Node_Str\", 50).getInt() / 100f;\n rocketCreeperSpawnRate = config.get(category, \"String_Node_Str\", 25).getInt() / 100f;\n festiveCreeperSpawnRate = config.get(category, \"String_Node_Str\", 15).getInt() / 100f;\n supportCreeperSpawnRate = config.get(category, \"String_Node_Str\", 15).getInt() / 100f;\n skeletonWarriorSpawnRate = config.get(category, \"String_Node_Str\", 25).getInt() / 100f;\n blazingJuggernautSpawnRate = config.get(category, \"String_Node_Str\", 25).getInt() / 100f;\n lilyLurkerSpawnRate = config.get(category, \"String_Node_Str\", 30).getInt() / 100f;\n spiderFamilySpawnRate = config.get(category, \"String_Node_Str\", 25).getInt() / 100f;\n}\n"
|
"public static void main(String[] args) {\n int numberOfExperimentRepetitions = 2;\n int numberOfExamplesToPickPerIteration = 1000000;\n int maximumNumberOfIterations = 1000000000;\n boolean includeTitleInResultsPlot = false;\n boolean includeHorizontalAxisLabelInResultsPlot = true;\n boolean includeVerticalAxisLabelInResultsPlot = true;\n boolean includeLegendInResultsPlot = false;\n ActiveLearningMethod[] activeLearningMethods = new ActiveLearningMethod[] { ActiveLearningMethod.RANDOM, ActiveLearningMethod.UNCERTAINTY_HEURISTIC, ActiveLearningMethod.CONSTRAINT_PROPAGATION_HEURISTIC };\n ExamplePickingMethod examplePickingMethod = ExamplePickingMethod.PSEUDO_SEQUENTIAL;\n Set<ResultType> resultTypes = new HashSet<>();\n resultTypes.add(ResultType.AVERAGE_AUC_FULL_DATA_SET);\n String workingDirectory;\n ImportedDataSet dataSet;\n Map<ActiveLearningMethod, List<ExperimentResults>> results;\n logger.info(\"String_Node_Str\");\n numberOfExperimentRepetitions = 10;\n numberOfExamplesToPickPerIteration = 1;\n maximumNumberOfIterations = 100000;\n workingDirectory = \"String_Node_Str\";\n dataSet = importLIBSVMDataSet(workingDirectory, false, 0.0, 0.0);\n dataSet.exportStatistics(workingDirectory + \"String_Node_Str\");\n results = runExperiments(numberOfExperimentRepetitions, numberOfExamplesToPickPerIteration, maximumNumberOfIterations, workingDirectory, activeLearningMethods, examplePickingMethod, dataSet, resultTypes);\n ConstrainedLearningWithoutReTraining.exportResults(numberOfExperimentRepetitions, numberOfExamplesToPickPerIteration, maximumNumberOfIterations, results, workingDirectory + \"String_Node_Str\", resultTypes, includeTitleInResultsPlot, includeHorizontalAxisLabelInResultsPlot, includeVerticalAxisLabelInResultsPlot, includeLegendInResultsPlot);\n logger.info(\"String_Node_Str\");\n}\n"
|
"public Location locationIsOnIsland(final Set<Location> islandTestLocations, final Location loc) {\n for (Location islandTestLocation : islandTestLocations) {\n if (loc.getWorld().equals(islandTestLocation.getWorld())) {\n if (getIslandAt(islandTestLocation) != null) {\n Island island = getProtectedIslandAt(islandTestLocation);\n if (island != null) {\n return island.getCenter();\n }\n } else if (loc.getX() > islandTestLocation.getX() - Settings.islandProtectionRange / 2D && loc.getX() < islandTestLocation.getX() + Settings.islandProtectionRange / 2D && loc.getZ() > islandTestLocation.getZ() - Settings.islandProtectionRange / 2D && loc.getZ() < islandTestLocation.getZ() + Settings.islandProtectionRange / 2D) {\n return islandTestLocation;\n }\n }\n }\n return null;\n}\n"
|
"private void registerArrayInstanceWithAllInterfacesOfElement(int index, IClass elementClass, int dim) {\n Collection ifaces = null;\n try {\n ifaces = elementClass.getAllImplementedInterfaces();\n } catch (ClassHierarchyException e) {\n Warnings.add(ClassHierarchyWarning.create(e.getMessage()));\n return;\n }\n for (Iterator it = ifaces.iterator(); it.hasNext(); ) {\n IClass I = (IClass) it.next();\n TypeReference iArrayRef = makeArray(I.getReference(), dim);\n IClass iArrayClass = null;\n iArrayClass = I.getClassLoader().lookupClass(iArrayRef.getName());\n MutableIntSet set = findOrCreateSparseSetForClass(iArrayClass);\n set.add(index);\n if (DEBUG) {\n Trace.println(\"String_Node_Str\" + iArrayClass + \"String_Node_Str\" + set);\n }\n }\n}\n"
|
"public Structure getBiolAssembly(String pdbId, int biolAssemblyNr) throws IOException, StructureException {\n provider.setPdbId(pdbId);\n if (!provider.hasBiolAssembly()) {\n return null;\n }\n if (provider.getNrBiolAssemblies() <= biolAssemblyNr) {\n return null;\n }\n PdbxStructAssembly psa = provider.getPdbxStructAssembly(biolAssemblyNr);\n List<PdbxStructAssemblyGen> psags = provider.getPdbxStructAssemblyGen(biolAssemblyNr);\n List<PdbxStructOperList> operators = provider.getPdbxStructOperList();\n BiologicalAssemblyBuilder builder = new BiologicalAssemblyBuilder();\n ArrayList<ModelTransformationMatrix> transformations = builder.getBioUnitTransformationList(psa, psag, operators);\n Structure asymUnit = null;\n if (provider instanceof MmCifPDBBiolAssemblyProvider) {\n MmCifPDBBiolAssemblyProvider mmcifprov = (MmCifPDBBiolAssemblyProvider) provider;\n asymUnit = mmcifprov.getAsymUnit();\n } else {\n asymUnit = StructureIO.getStructure(pdbId);\n }\n return builder.rebuildQuaternaryStructure(asymUnit, transformations);\n}\n"
|
"void emitCode(AbcWriter out, Abc abc, Method m) throws IOException {\n int emit_code_trace_phase = pushTracePhase(\"String_Node_Str\");\n addTraceAttr(\"String_Node_Str\", m);\n Map<Block, Integer> padding = new HashMap<Block, Integer>();\n Deque<Block> code = schedule(m.entry.to);\n Map<Block, AbcWriter> writers = new HashMap<Block, AbcWriter>();\n BitSet labels = new BitSet();\n BitSet done = new BitSet();\n for (Block b : code) {\n done.set(b.id);\n for (Edge e : b.succ()) if (done.get(e.to.id)) {\n labels.set(e.to.id);\n }\n }\n Map<Block, Integer> pos = new HashMap<Block, Integer>();\n Map<Block, Integer> blockends = new HashMap<Block, Integer>();\n int code_len = 0;\n Deque<Block> work = new ArrayDeque<Block>(code);\n while (!work.isEmpty()) {\n Block b = work.removeFirst();\n int block_trace_phase = pushTracePhase(\"String_Node_Str\");\n addTraceAttr(\"String_Node_Str\", b);\n addTraceAttr(\"String_Node_Str\", code_len);\n pos.put(b, code_len);\n AbcWriter w = new AbcWriter();\n writers.put(b, w);\n if (labels.get(b.id)) {\n addTraceAttr(\"String_Node_Str\");\n w.write(OP_label);\n }\n emitBlock(w, b, abc);\n code_len += w.size();\n Expr last = b.last();\n if (last.succ.length == 0) {\n w.write(last.op);\n code_len++;\n traceEntry(\"String_Node_Str\", \"String_Node_Str\", opNames[last.op]);\n } else if (isJump(last)) {\n traceEntry(\"String_Node_Str\", \"String_Node_Str\", last.succ[0].to);\n if (work.isEmpty() || last.succ[0].to != work.peekFirst()) {\n code_len += 4;\n padding.put(b, 4);\n addTraceAttr(\"String_Node_Str\", false);\n } else\n addTraceAttr(\"String_Node_Str\", true);\n } else if (isBranch(last)) {\n if (work.isEmpty() || last.succ[0].to != work.peekFirst()) {\n code_len += 8;\n padding.put(b, 8);\n } else {\n code_len += 4;\n padding.put(b, 4);\n }\n } else {\n assert (last.op == OP_lookupswitch);\n int switch_size = 1 + out.sizeOfU30(last.succ.length) + 3 * last.succ.length;\n code_len += switch_size;\n padding.put(b, switch_size);\n }\n blockends.put(b, code_len);\n unwindTrace(block_trace_phase);\n }\n out.writeU30(code_len);\n int code_start = out.size();\n traceEntry(\"String_Node_Str\", \"String_Node_Str\", code_start);\n for (Block b : code) {\n int write_block_trace_phase = pushTracePhase(\"String_Node_Str\");\n addTraceAttr(\"String_Node_Str\", b);\n addTraceAttr(\"String_Node_Str\", b.postorder);\n addTraceAttr(\"String_Node_Str\", out.size());\n addTraceAttr(\"String_Node_Str\", out.size() - code_start);\n writers.get(b).writeTo(out);\n if (padding.containsKey(b)) {\n Expr last = b.last();\n int trace_phase_jump = pushTracePhase(\"String_Node_Str\");\n addTraceAttr(last);\n addTraceAttr(\"String_Node_Str\", opNames[last.op]);\n addTraceAttr(\"String_Node_Str\", padding.get(b));\n if (isBranch(last)) {\n addTraceAttr(\"String_Node_Str\");\n emitBranch(out, last.op, last.succ[1].to, code_start, pos);\n padding.put(b, padding.get(b) - 4);\n }\n if (padding.get(b) == 4) {\n traceEntry(\"String_Node_Str\");\n addTraceAttr(\"String_Node_Str\", last.succ[0].id);\n emitBranch(out, OP_jump, last.succ[0].to, code_start, pos);\n }\n if (last.op == OP_lookupswitch) {\n emitLookupswitch(out, last, code_start, pos);\n }\n unwindTrace(trace_phase_jump);\n }\n unwindTrace(write_block_trace_phase);\n }\n out.writeU30(m.handlers.length);\n for (Handler h : m.handlers) {\n int from = code_len;\n int to = 0;\n for (Block b : code) {\n for (Edge x : b.xsucc) {\n if (x.to == h.entry) {\n if (pos.get(b) < from)\n from = pos.get(b);\n if (blockends.get(b) > to)\n to = blockends.get(b);\n }\n }\n }\n out.writeU30(from);\n out.writeU30(to);\n int off;\n if (h.entry != null)\n off = pos.get(h.entry);\n else {\n off = 0;\n }\n verboseStatus(\"String_Node_Str\" + h.entry + \"String_Node_Str\" + from + \"String_Node_Str\" + to + \"String_Node_Str\" + off);\n out.writeU30(off);\n out.writeU30(abc.typeRef(h.type));\n if (h.name != null)\n out.writeU30(abc.namePool.id(h.name));\n else\n out.writeU30(0);\n }\n unwindTrace(emit_code_trace_phase);\n}\n"
|
"public HttpResponse<NameUsageMatch2> getMatch(ExtendedRecord extendedRecord) {\n HttpResponse<NameUsageMatch2> response = tryNameMatch(extendedRecord.getCoreTerms());\n if (isSuccessfulMatch(response) || !hasIdentifications(extendedRecord)) {\n return response;\n }\n LOG.info(\"String_Node_Str\");\n List<Map<String, String>> identifications = extendedRecord.getExtensions().get(DwcTerm.Identification.qualifiedName());\n identifications.sort(Comparator.comparing((Map<String, String> map) -> {\n ParsedTemporalDates parsedDates = TemporalParser.parseRawDate(map.get(DwcTerm.dateIdentified.qualifiedName()));\n return parsedDates.getFrom().map((temporal) -> Instant.from(temporal).toEpochMilli()).orElse(0L);\n }).reversed());\n for (Map<String, String> record : identifications) {\n response = tryNameMatch(record);\n if (isSuccessfulMatch(response)) {\n LOG.info(\"String_Node_Str\", record.get(DwcTerm.identificationID.name()));\n return response;\n }\n }\n return response;\n}\n"
|
"public boolean isPortableIpTransferableFromNetwork(long ipAddrId, long networkId) {\n Network network = _networksDao.findById(networkId);\n if (network == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n IPAddressVO ip = _ipAddressDao.findById(ipAddrId);\n if (ip == null) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n List<PublicIpAddress> ipList = new ArrayList<PublicIpAddress>();\n PublicIp publicIp = PublicIp.createFromAddrAndVlan(ip, _vlanDao.findById(ip.getVlanId()));\n ipList.add(publicIp);\n Map<PublicIpAddress, Set<Service>> ipToServices = _networkModel.getIpToServices(ipList, false, true);\n if (!ipToServices.isEmpty()) {\n Set<Service> ipServices = ipToServices.get(publicIp);\n if (ipServices != null && !ipServices.isEmpty()) {\n return false;\n }\n }\n return true;\n}\n"
|
"public List<List<PactConnection>> getIncomingConnections() {\n ArrayList<List<PactConnection>> inputs = new ArrayList<List<PactConnection>>(2);\n inputs.add(0, input1);\n inputs.add(1, input2);\n return inputs;\n}\n"
|
"public long getTxn() {\n if (isOpen()) {\n return txLog.getCurrentTxn();\n }\n throw new IllegalStateException(\"String_Node_Str\");\n}\n"
|
"public static BigInteger factorial(int n) {\n BigInteger p = new BigInteger(\"String_Node_Str\");\n if (n == 1 || n == 0)\n return BigInteger.valueOf(1);\n p = BigInteger.valueOf(n).multiply(factorial(n - 1));\n return p;\n}\n"
|
"public ExactRelation rewriteForPointEstimate() {\n ExactRelation r = new ProjectedRelation(vc, source.rewriteForPointEstimate(), elemsWithSubstitutedTables());\n r.setAliasName(getAlias());\n return r;\n}\n"
|
"public Void call() throws Exception {\n if (isCDAPUserTable(desc)) {\n upgradeUserTable(desc);\n } else if (isStreamOrQueueTable(desc.getNameAsString())) {\n updateTableDesc(desc, ddlExecutor);\n }\n return null;\n}\n"
|
"private int getScrollRange() {\n int scrollRange = 0;\n if (getChildCount() > 0) {\n View child = getChildAt(0);\n scrollRange = Math.max(0, child.getHeight() - (getHeight() - mPaddingBottom - mPaddingTop));\n }\n return scrollRange;\n}\n"
|
"public void onBindViewHolder(SentRequestItemHolder myHolder, final int i) {\n myHolder.mItemTitleTv.setText(gifts.get(i).title);\n}\n"
|
"protected void parseFile(BufferedReader reader) throws IOException {\n initializTables();\n swtGuiManager.setProgressBarText(\"String_Node_Str\" + dataSetDescription.getDataSetName());\n float progressBarFactor = 100f / numberOfLinesInFile;\n for (int countHeaderLines = 0; countHeaderLines < dataSetDescription.getNumberOfHeaderLines(); countHeaderLines++) {\n reader.readLine();\n }\n ArrayList<ColumnDescription> parsingPattern = dataSetDescription.getOrCreateParsingPattern();\n int lineCounter = 0;\n String numberParsingErrorMessage = \"String_Node_Str\" + dataSetDescription.getDataSetName() + \"String_Node_Str\" + filePath + \"String_Node_Str\";\n boolean parsingErrorOccured = false;\n IDSpecification rowIDSpecification = dataSetDescription.getRowIDSpecification();\n IDCategory rowIDCategory = IDCategory.getIDCategory(rowIDSpecification.getIdCategory());\n IDType fromIDType = IDType.getIDType(rowIDSpecification.getIdType());\n IDType toIDType;\n if (dataDomain.isColumnDimension())\n toIDType = dataDomain.getRecordIDType();\n else\n toIDType = dataDomain.getDimensionIDType();\n IDMappingManager rowIDMappingManager = IDMappingManagerRegistry.get().getIDMappingManager(rowIDCategory);\n int columnOfRowIDs = dataSetDescription.getColumnOfRowIds();\n MappingType mappingType = rowIDMappingManager.createMap(fromIDType, toIDType, false, true);\n IDTypeParsingRules parsingRules = null;\n if (rowIDSpecification.getIdTypeParsingRules() != null)\n parsingRules = rowIDSpecification.getIdTypeParsingRules();\n else if (toIDType.getIdTypeParsingRules() != null)\n parsingRules = fromIDType.getIdTypeParsingRules();\n String line;\n DataDescription dataDescription = dataSetDescription.getDataDescription();\n while ((line = reader.readLine()) != null) {\n String[] splitLine = line.split(dataSetDescription.getDelimiter());\n String id = splitLine[columnOfRowIDs];\n id = convertID(id, parsingRules);\n rowIDMappingManager.addMapping(mappingType, id, lineCounter);\n for (int count = 0; count < parsingPattern.size(); count++) {\n ColumnDescription columnDescription = parsingPattern.get(count);\n if (columnDescription.getDataDescription() != null) {\n dataDescription = columnDescription.getDataDescription();\n }\n String cellContent = splitLine[columnDescription.getColumn()];\n try {\n switch(dataDescription.getRawDataType()) {\n case FLOAT:\n float floatValue;\n FloatContainer targetColumn = (FloatContainer) targetRawContainer.get(count);\n try {\n floatValue = Float.parseFloat(cellContent);\n targetColumn.add(floatValue);\n } catch (NumberFormatException nfe) {\n parsingErrorOccured = true;\n numberParsingErrorMessage += \"String_Node_Str\" + (columnDescription.getColumn()) + \"String_Node_Str\" + (lineCounter + dataSetDescription.getNumberOfHeaderLines()) + \"String_Node_Str\" + cellContent + \"String_Node_Str\";\n targetColumn.addUnknown();\n }\n break;\n case INTEGER:\n Integer intValue;\n IContainer<Integer> targetIntColumn = (IContainer<Integer>) targetRawContainer.get(count);\n try {\n intValue = Integer.parseInt(cellContent);\n targetIntColumn.add(intValue);\n } catch (NumberFormatException nfe) {\n parsingErrorOccured = true;\n numberParsingErrorMessage += \"String_Node_Str\" + (columnDescription.getColumn()) + \"String_Node_Str\" + (lineCounter + dataSetDescription.getNumberOfHeaderLines()) + \"String_Node_Str\" + cellContent + \"String_Node_Str\";\n targetIntColumn.addUnknown();\n }\n break;\n case STRING:\n String stringValue = cellContent.trim();\n IContainer<String> targetStringColumn = (IContainer<String>) targetRawContainer.get(count);\n if (stringValue.length() == 0) {\n targetStringColumn.addUnknown();\n parsingErrorOccured = true;\n } else {\n targetStringColumn.add(stringValue);\n }\n break;\n default:\n throw new IllegalStateException(\"String_Node_Str\" + dataDescription.getRawDataType());\n }\n } catch (IndexOutOfBoundsException ioobe) {\n Logger.log(new Status(IStatus.ERROR, this.toString(), \"String_Node_Str\" + lineCounter + \"String_Node_Str\" + count));\n }\n }\n if (lineCounter % 100 == 0) {\n swtGuiManager.setProgressBarPercentage((int) (progressBarFactor * lineCounter));\n }\n lineCounter++;\n }\n if (parsingErrorOccured) {\n Logger.log(new Status(IStatus.ERROR, GeneralManager.PLUGIN_ID, numberParsingErrorMessage));\n }\n}\n"
|
"private ODataErrorCallback getErrorHandlerCallbackFromContext(final ODataContext context) throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n ODataErrorCallback callback = null;\n ODataServiceFactory serviceFactory = context.getServiceFactory();\n callback = serviceFactory.getCallback(ODataErrorCallback.class);\n return callback;\n}\n"
|
"public void setOutputInfo(List<String> outputInfo) {\n this.outputInfo = outputInfo;\n}\n"
|
"static VM_Annotation readAnnotation(int[] constantPool, DataInputStream input, ClassLoader classLoader) throws IOException, ClassNotFoundException {\n VM_Atom type;\n int typeIndex = input.readUnsignedShort();\n type = VM_Class.getUtf(constantPool, typeIndex);\n int numAnnotationMembers = input.readUnsignedShort();\n AnnotationMember[] elementValuePairs = new AnnotationMember[numAnnotationMembers];\n for (int i = 0; i < numAnnotationMembers; i++) {\n elementValuePairs[i] = AnnotationMember.readAnnotationMember(constantPool, input, classLoader);\n }\n return new VM_Annotation(type, elementValuePairs, classLoader);\n}\n"
|
"protected TableUniqueName createTempTableWithRand(TableUniqueName originalTableName) throws VerdictException {\n TableUniqueName tempTableName = Relation.getTempTableName(vc);\n VerdictLogger.debug(this, \"String_Node_Str\" + tempTableName);\n executeUpdate(String.format(\"String_Node_Str\", tempTableName, originalTableName));\n VerdictLogger.debug(this, \"String_Node_Str\");\n return tempTableName;\n}\n"
|
"public void modelExchangeCheck(String testName, String csvFile, boolean checkX2) throws Exception {\n double x1MaximumError = 0.0;\n double x2MaximumError = 0.0;\n double epsilon = 0.003;\n int row = 0;\n String line = null;\n BufferedReader bufferedReader = null;\n try {\n bufferedReader = new BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(csvFile), java.nio.charset.Charset.defaultCharset()));\n while ((line = bufferedReader.readLine()) != null) {\n String[] fields = line.split(\"String_Node_Str\");\n row++;\n if (row > 1) {\n double t = Double.valueOf(fields[0]);\n double x1 = Double.valueOf(fields[1]);\n double x1CalculatedValue = 0.0;\n double x2 = 0.0;\n double x2CalculatedValue = 0.0;\n String message = \"String_Node_Str\" + testName + \"String_Node_Str\" + csvFile + \"String_Node_Str\" + row + \"String_Node_Str\" + t + \"String_Node_Str\" + x1 + \"String_Node_Str\" + x1CalculatedValue + (checkX2 ? (\"String_Node_Str\" + x2 + \"String_Node_Str\" + x2CalculatedValue) : \"String_Node_Str\");\n if (checkX2) {\n x1CalculatedValue = 1.0 * Math.exp(-0.5 * t);\n x2 = Double.valueOf(fields[2]);\n x2CalculatedValue = 2.0 * Math.exp(-1.0 * t);\n x2MaximumError = Math.max(x2MaximumError, Math.abs(x2 - x2CalculatedValue));\n assertEquals(message, x2, x2CalculatedValue, epsilon);\n } else {\n x1CalculatedValue = 1.0 * Math.exp(-1.0 * t);\n }\n x1MaximumError = Math.max(x1MaximumError, Math.abs(x1 - x1CalculatedValue));\n assertEquals(message, x1, x1CalculatedValue, epsilon);\n }\n }\n } finally {\n if (bufferedReader != null) {\n bufferedReader.close();\n }\n }\n System.out.println(testName + \"String_Node_Str\" + x1MaximumError + (checkX2 ? (\"String_Node_Str\" + x2MaximumError) : \"String_Node_Str\") + \"String_Node_Str\");\n assertTrue(\"String_Node_Str\" + x1MaximumError + \"String_Node_Str\" + epsilon, x1MaximumError < epsilon);\n assertTrue(\"String_Node_Str\" + x2MaximumError + \"String_Node_Str\" + epsilon, x2MaximumError < epsilon);\n}\n"
|
"protected void genDecorations(BiomeGenBase biome) {\n if (currentWorld.provider.dimensionId != 1) {\n super.genDecorations(biome);\n return;\n }\n DragonSavefile file = WorldDataHandler.get(DragonSavefile.class);\n randomGenerator.nextInt(1 + file.getDragonDeathAmount());\n generateOres();\n double distFromCenter = Math.sqrt(MathUtil.square(chunk_X >> 4) + MathUtil.square(chunk_Z >> 4)) * 16D;\n if (distFromCenter < 120D && randomGenerator.nextInt(5) == 0) {\n int xx = randX(), zz = randZ();\n spikeGen.generate(currentWorld, randomGenerator, xx, currentWorld.getTopSolidOrLiquidBlock(xx, zz), zz);\n }\n if (distFromCenter > 102D && Math.abs(randomGenerator.nextGaussian()) < 0.285D) {\n Stopwatch.timeAverage(\"String_Node_Str\", 64);\n blobGen.prepare(chunk_X + 8, chunk_Z + 8);\n blobGen.generate(currentWorld, randomGenerator, chunk_X + randomGenerator.nextInt(10) + 11, 32 + randomGenerator.nextInt(60), chunk_Z + randomGenerator.nextInt(10) + 11);\n Stopwatch.finish(\"String_Node_Str\");\n }\n if (distFromCenter > 1280D && randomGenerator.nextFloat() * randomGenerator.nextFloat() > 0.666F && randomGenerator.nextFloat() < 0.1F + (distFromCenter / 15000D)) {\n Stopwatch.timeAverage(\"String_Node_Str\", 64);\n for (int attempt = 0; attempt < randomGenerator.nextInt(3); attempt++) {\n meteoroidGen.generate(currentWorld, randomGenerator, randX(), 8 + randomGenerator.nextInt(112), randZ());\n }\n Stopwatch.finish(\"String_Node_Str\");\n }\n if (distFromCenter > 500D && randomGenerator.nextInt(1 + randomGenerator.nextInt(3) + (int) Math.floor(Math.max((11500D - distFromCenter) / 1000D, 0))) <= randomGenerator.nextInt(4)) {\n Stopwatch.timeAverage(\"String_Node_Str\", 64);\n for (int attempt = 0, max = 1 + randomGenerator.nextInt(1 + Math.min(9, (int) Math.floor((Math.max(0, distFromCenter - 1700D)) / 2100D))); attempt < 440; attempt++) {\n if (endiumOreGen.generate(currentWorld, randomGenerator, randX(), 10 + randomGenerator.nextInt(100), randZ()) && --max <= 0)\n break;\n }\n Stopwatch.finish(\"String_Node_Str\");\n }\n Stopwatch.timeAverage(\"String_Node_Str\", 64);\n for (int attempt = 0, placed = 0, xx, yy, zz; attempt < 22 && placed < 4 + randomGenerator.nextInt(5); attempt++) {\n xx = randX();\n yy = 35 + randomGenerator.nextInt(92);\n zz = randZ();\n if (currentWorld.getBlock(xx, yy, zz) == Blocks.end_stone && endPowderOreGen.generate(currentWorld, randomGenerator, xx, yy, zz)) {\n ++placed;\n }\n }\n Stopwatch.finish(\"String_Node_Str\");\n if (chunk_X == 0 && chunk_Z == 0) {\n EntityBossDragon dragon = new EntityBossDragon(currentWorld);\n dragon.setLocationAndAngles(0D, 128D, 0D, randomGenerator.nextFloat() * 360F, 0F);\n currentWorld.spawnEntityInWorld(dragon);\n file.setDragonExists();\n }\n}\n"
|
"protected void compileSnippet(final String code) throws UnableToCompleteException {\n addMockIntrinsic();\n sourceOracle.addOrReplace(new MockJavaResource(\"String_Node_Str\") {\n public CharSequence getContent() {\n return code;\n }\n });\n addBuiltinClasses(sourceOracle);\n CompilationState state = CompilationStateBuilder.buildFrom(logger, sourceOracle.getResources(), getAdditionalTypeProviderDelegate(), sourceLevel);\n jProgram = JavaAstConstructor.construct(logger, state, \"String_Node_Str\", \"String_Node_Str\");\n jProgram.addEntryMethod(findMethod(jProgram, \"String_Node_Str\"));\n CastNormalizer.exec(jProgram, false);\n ArrayNormalizer.exec(jProgram);\n Map<StandardSymbolData, JsName> symbolTable = new TreeMap<StandardSymbolData, JsName>(new SymbolData.ClassIdentComparator());\n JavaToJavaScriptMap map = GenerateJavaScriptAST.exec(jProgram, jsProgram, JsOutputOption.PRETTY, symbolTable, new PropertyOracle[] { new StaticPropertyOracle(orderedProps, orderedPropValues, configProps) }).getLeft();\n CodeSplitter2.exec(logger, jProgram, jsProgram, map, 4, NULL_RECORDER, 0);\n}\n"
|
"public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {\n player.setItemInUse(stack, this.getMaxItemUseDuration(stack));\n if (world.isRemote) {\n return stack;\n }\n MovingObjectPosition mop = this.getMovingObjectPositionFromPlayer(world, player, false);\n if (mop != null) {\n if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {\n Block blockHit = world.getBlock(mop.blockX, mop.blockY, mop.blockZ);\n if (blockHit instanceof BlockGrass || blockHit instanceof BlockDirt) {\n tillAOE(stack, player, world, mop.blockX, mop.blockY, mop.blockZ, world.getBlockMetadata(mop.blockX, mop.blockY, mop.blockZ), 0);\n } else if (blockHit instanceof BlockLog) {\n clearOdAOE(world, stack, player, \"String_Node_Str\", 0);\n } else if (blockHit instanceof BlockLeaves) {\n clearOdAOE(world, stack, player, \"String_Node_Str\", 0);\n }\n }\n } else {\n shearEntityAOE(stack, player, 0);\n }\n return stack;\n}\n"
|
"public static void onShutdown(final Runnable runnable) {\n currentDisplay.getShells()[0].addListener(org.eclipse.swt.SWT.Close, new org.eclipse.swt.widgets.Listener() {\n public void handleEvent(final org.eclipse.swt.widgets.Event event) {\n runnable.run();\n }\n });\n } else {\n dispatch(new Runnable() {\n public void run() {\n currentDisplay.getShells()[0].addListener(org.eclipse.swt.SWT.Close, new org.eclipse.swt.widgets.Listener() {\n public void handleEvent(final org.eclipse.swt.widgets.Event event) {\n runnable.run();\n }\n });\n }\n });\n }\n}\n"
|
"protected MavenExecutionRequest getConfiguredExecutionRequest(DependencyResolutionContext context, IProjectRegistry state, IFile pom, ResolverConfiguration resolverConfiguration) throws CoreException {\n MavenExecutionRequest mavenRequest = DefaultMavenExecutionRequest.copy(context.getExecutionRequest());\n configureExecutionRequest(mavenRequest, state, pom, resolverConfiguration);\n getMaven().populateDefaults(mavenRequest);\n mavenRequest.setOffline(context.getRequest().isOffline());\n mavenRequest.setUpdateSnapshots(context.isForce(pom) && context.getRequest().isUpdateSnapshots());\n return mavenRequest;\n}\n"
|
"public void run() throws RepositoryException, DomainException {\n File domainDir = FileUtils.safeGetCanonicalFile(new File(_domainConfig.getRepositoryRoot(), _domainConfig.getDomainName()));\n createDirectory(domainDir);\n try {\n byte[] buffer = new byte[10000];\n for (Enumeration<JarEntry> entry = _templateJar.entries(); entry.hasMoreElements(); ) {\n JarEntry jarEntry = (JarEntry) entry.nextElement();\n String entryName = jarEntry.getName();\n if (entryName.startsWith(META_DIR_NAME)) {\n continue;\n }\n if (extractedEntries.contains(entryName)) {\n continue;\n }\n if (jarEntry.isDirectory()) {\n File dir = new File(domainDir, jarEntry.getName());\n if (!dir.exists()) {\n if (!dir.mkdir()) {\n _logger.log(Level.WARNING, _strings.get(\"String_Node_Str\", dir.getName()));\n }\n }\n continue;\n }\n InputStream in = null;\n BufferedOutputStream outputStream = null;\n try {\n in = _templateJar.getInputStream(jarEntry);\n outputStream = new BufferedOutputStream(new FileOutputStream(new File(domainDir.getAbsolutePath(), jarEntry.getName())));\n int i = 0;\n while ((i = in.read(buffer)) != -1) {\n outputStream.write(buffer, 0, i);\n }\n } finally {\n if (in != null) {\n try {\n in.close();\n } catch (Exception io) {\n }\n }\n if (outputStream != null) {\n try {\n outputStream.close();\n } catch (Exception io) {\n }\n }\n }\n }\n File configDir = new File(domainDir, DomainConstants.CONFIG_DIR);\n String user = (String) _domainConfig.get(DomainConfig.K_USER);\n String password = (String) _domainConfig.get(DomainConfig.K_PASSWORD);\n String masterPassword = (String) _domainConfig.get(DomainConfig.K_MASTER_PASSWORD);\n Boolean saveMasterPassword = (Boolean) _domainConfig.get(DomainConfig.K_SAVE_MASTER_PASSWORD);\n DomainSecurity domainSecurity = new DomainSecurity();\n domainSecurity.processAdminKeyFile(new File(configDir, DomainConstants.ADMIN_KEY_FILE), user, password);\n try {\n domainSecurity.createSSLCertificateDatabase(configDir, _domainConfig, masterPassword);\n } catch (Exception e) {\n String msg = _strings.getString(\"String_Node_Str\", e.getMessage());\n System.err.println(msg);\n FileOutputStream fos = null;\n try {\n File keystoreFile = new File(configDir, DomainConstants.KEYSTORE_FILE);\n fos = new FileOutputStream(keystoreFile);\n fos.write(keystoreBytes);\n } catch (Exception ex) {\n getLogger().log(Level.SEVERE, UNHANDLED_EXCEPTION, ex);\n } finally {\n if (fos != null)\n fos.close();\n }\n }\n domainSecurity.changeMasterPasswordInMasterPasswordFile(new File(configDir, DomainConstants.MASTERPASSWORD_FILE), masterPassword, saveMasterPassword);\n domainSecurity.createPasswordAliasKeystore(new File(configDir, DomainConstants.DOMAIN_PASSWORD_FILE), masterPassword);\n if (_domainTempalte.hasStringsubs()) {\n StringSubstitutor substitutor = _domainTempalte.getStringSubs();\n Map<String, String> lookUpMap = SubstitutableTokens.getSubstitutableTokens(_domainConfig);\n substitutor.setAttributePreprocessor(new AttributePreprocessorImpl(lookUpMap));\n substitutor.substituteAll();\n }\n try {\n domainSecurity.changeMode(\"String_Node_Str\", configDir);\n } catch (Exception e) {\n throw new DomainException(_strings.get(\"String_Node_Str\"), e);\n }\n DomainInfoManager domainInfoManager = new DomainInfoManager();\n domainInfoManager.process(_domainTempalte, domainDir);\n } catch (DomainException de) {\n FileUtils.liquidate(domainDir);\n throw de;\n } catch (Exception ex) {\n FileUtils.liquidate(domainDir);\n throw new DomainException(ex);\n }\n}\n"
|
"private String findbugs(final Environment env) {\n final List<String> args = new LinkedList<String>();\n args.add(\"String_Node_Str\");\n args.addAll(this.options(env));\n args.add(Wrap.class.getName());\n args.add(env.basedir().getPath());\n args.add(env.outdir().getPath());\n args.add(StringUtils.join(env.classpath(), \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\"));\n final String command = StringUtils.join(args, \"String_Node_Str\");\n Logger.debug(this, \"String_Node_Str\", command);\n final ProcessBuilder builder = new ProcessBuilder(args);\n String report;\n try {\n final Process process = builder.start();\n if (process.waitFor() != 0) {\n Logger.warn(this, \"String_Node_Str\", command, IOUtils.toString(process.getErrorStream()));\n }\n report = IOUtils.toString(process.getInputStream());\n } catch (IOException ex) {\n throw new IllegalStateException(ex);\n } catch (InterruptedException ex) {\n Thread.currentThread().interrupt();\n throw new IllegalStateException(ex);\n }\n Logger.debug(this, \"String_Node_Str\", report);\n return report;\n}\n"
|
"private static boolean extractResourceForkToAppleDoubleFile(FSFork resourceFork, File targetFile) {\n FileOutputStream os = null;\n ReadableRandomAccessStream in = null;\n try {\n AppleSingleBuilder builder = new AppleSingleBuilder(FileType.APPLEDOUBLE, AppleSingleVersion.VERSION_2_0, FileSystem.MACOS_X);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n in = resourceFork.getReadableRandomAccessStream();\n long extractedBytes = IOUtil.streamCopy(in, baos, 128 * 1024);\n if (extractedBytes != resourceFork.getLength()) {\n System.err.println(\"String_Node_Str\" + targetFile.getPath() + \"String_Node_Str\" + resourceFork.getLength() + \"String_Node_Str\" + extractedBytes);\n }\n builder.addResourceFork(baos.toByteArray());\n os = new FileOutputStream(targetFile);\n os.write(builder.getResult());\n return true;\n } catch (FileNotFoundException fnfe) {\n return false;\n } catch (Exception ioe) {\n ioe.printStackTrace();\n return false;\n } finally {\n if (os != null) {\n try {\n os.close();\n } catch (Exception e) {\n }\n }\n if (in != null) {\n try {\n in.close();\n } catch (Exception e) {\n }\n }\n }\n}\n"
|
"private boolean invalidateActions() {\n if (!hasActionButtons()) {\n view.findViewById(R.id.buttonDefaultFrame).setVisibility(View.GONE);\n view.findViewById(R.id.buttonStackedFrame).setVisibility(View.GONE);\n invalidateList();\n return false;\n }\n if (isStacked) {\n view.findViewById(R.id.buttonDefaultFrame).setVisibility(View.GONE);\n view.findViewById(R.id.buttonStackedFrame).setVisibility(View.VISIBLE);\n } else {\n view.findViewById(R.id.buttonDefaultFrame).setVisibility(View.VISIBLE);\n view.findViewById(R.id.buttonStackedFrame).setVisibility(View.GONE);\n }\n positiveButton = view.findViewById(isStacked ? R.id.buttonStackedPositive : R.id.buttonDefaultPositive);\n if (mBuilder.positiveText != null) {\n TextView positiveTextView = (TextView) ((FrameLayout) positiveButton).getChildAt(0);\n setTypeface(positiveTextView, mBuilder.mediumFont);\n positiveTextView.setText(mBuilder.positiveText);\n positiveTextView.setTextColor(getActionTextStateList(mBuilder.positiveColor));\n setBackgroundCompat(positiveButton, DialogUtils.resolveDrawable(getContext(), isStacked ? R.attr.md_selector : R.attr.md_btn_selector));\n positiveButton.setTag(POSITIVE);\n positiveButton.setOnClickListener(this);\n } else {\n positiveButton.setVisibility(View.GONE);\n }\n neutralButton = view.findViewById(isStacked ? R.id.buttonStackedNeutral : R.id.buttonDefaultNeutral);\n if (mBuilder.neutralText != null) {\n TextView neutralTextView = (TextView) ((FrameLayout) neutralButton).getChildAt(0);\n setTypeface(neutralTextView, mBuilder.mediumFont);\n neutralButton.setVisibility(View.VISIBLE);\n neutralTextView.setTextColor(getActionTextStateList(mBuilder.neutralColor));\n setBackgroundCompat(neutralButton, DialogUtils.resolveDrawable(getContext(), isStacked ? R.attr.md_selector : R.attr.md_btn_selector));\n neutralTextView.setText(mBuilder.neutralText);\n neutralButton.setTag(NEUTRAL);\n neutralButton.setOnClickListener(this);\n } else {\n neutralButton.setVisibility(View.GONE);\n }\n negativeButton = view.findViewById(isStacked ? R.id.buttonStackedNegative : R.id.buttonDefaultNegative);\n if (mBuilder.negativeText != null) {\n TextView negativeTextView = (TextView) ((FrameLayout) negativeButton).getChildAt(0);\n setTypeface(negativeTextView, mBuilder.mediumFont);\n negativeButton.setVisibility(View.VISIBLE);\n negativeTextView.setTextColor(getActionTextStateList(mBuilder.negativeColor));\n setBackgroundCompat(negativeButton, DialogUtils.resolveDrawable(getContext(), isStacked ? R.attr.md_selector : R.attr.md_btn_selector));\n negativeTextView.setText(mBuilder.negativeText);\n negativeButton.setTag(NEGATIVE);\n negativeButton.setOnClickListener(this);\n if (!isStacked) {\n RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, (int) getContext().getResources().getDimension(R.dimen.md_button_height));\n if (mBuilder.positiveText != null) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n params.addRule(RelativeLayout.START_OF, R.id.buttonDefaultPositive);\n } else {\n params.addRule(RelativeLayout.LEFT_OF, R.id.buttonDefaultPositive);\n }\n } else {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n params.addRule(RelativeLayout.ALIGN_PARENT_END);\n } else {\n params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);\n }\n }\n negativeButton.setLayoutParams(params);\n }\n } else {\n negativeButton.setVisibility(View.GONE);\n }\n invalidateList();\n return true;\n}\n"
|
"public void testCompactionsOnBigDataSet() throws Exception {\n Options options = new Options();\n options.createIfMissing(true);\n DbImpl db = new DbImpl(databaseDir, options);\n for (int index = 0; index < 5000000; index++) {\n String key = \"String_Node_Str\" + index;\n String value = \"String_Node_Str\" + index + \"String_Node_Str\";\n db.put(key.getBytes(UTF_8), value.getBytes(UTF_8));\n }\n}\n"
|
"private void recognizeString(String content, boolean debug) {\n walls = new ArrayList<Wall>();\n doors = new ArrayList<Door>();\n Pattern oneRow = Pattern.compile(\"String_Node_Str\");\n Pattern oneNumber = Pattern.compile(\"String_Node_Str\");\n String[] allRows = oneRow.split(content);\n for (String entry : allRows) {\n String[] singlenumber = oneNumber.split(entry);\n if (singlenumber[0].equals(\"String_Node_Str\")) {\n wallX1 = Float.parseFloat(singlenumber[1]);\n wallY1 = Float.parseFloat(singlenumber[2]);\n wallX2 = Float.parseFloat(singlenumber[3]);\n wallY2 = Float.parseFloat(singlenumber[4]);\n Wall wall = new Wall(wallX1, wallY1, wallX2, wallY2);\n alpha = wall.getAlpha();\n Log.d(TAG, \"String_Node_Str\" + wall.toString());\n walls.add(wall);\n } else if (singlenumber[0].equals(\"String_Node_Str\")) {\n Door door = new Door(Float.parseFloat(singlenumber[1]), Float.parseFloat(singlenumber[2]), Float.parseFloat(singlenumber[3]), Float.parseFloat(singlenumber[4]), Float.parseFloat(singlenumber[5]));\n Log.d(TAG, \"String_Node_Str\" + door.toString());\n doors.add(door);\n } else {\n Door door = new Door(Float.parseFloat(singlenumber[0]), Float.parseFloat(singlenumber[1]), Float.parseFloat(singlenumber[2]), wallX1, wallY1, alpha);\n Log.d(TAG, \"String_Node_Str\" + door.toString());\n doors.add(door);\n }\n }\n}\n"
|
"private boolean isSplit(String[] segs) {\n int fflags = Integer.parseInt(segs[3]);\n Cigar c = TextCigarCodec.getSingleton().decode(segs[7]);\n return (((fflags & 0x4) == 0x4 && (fflags & 0x8) != 0x8 && (fflags & 0x256) != 0x256) || (isOverSoftClipThreshold(c, segs[11].length()) && (fflags & 0x256) != 0x256));\n}\n"
|
"protected ModelNode remove(CommandContext ctx) throws CommandLineException {\n final ModelControllerClient client = ctx.getModelControllerClient();\n final ParsedCommandLine args = ctx.getParsedCommandLine();\n assertNotPresent(allServerGroups, args);\n final String name = getName(ctx, false);\n final String contentStr = content.getValue(args);\n String deploymentStr = deployments.getValue(args);\n final String sgStr = serverGroups.getValue(args);\n final List<String> sg;\n if (sgStr == null) {\n if (allRelevantServerGroups.isPresent(args)) {\n sg = Util.getServerGroupsReferencingOverlay(name, client);\n } else {\n sg = null;\n }\n } else {\n sg = Arrays.asList(sgStr.split(\"String_Node_Str\"));\n if (sg.isEmpty()) {\n throw new CommandFormatException(serverGroups.getFullName() + \"String_Node_Str\");\n }\n }\n final ModelNode composite = new ModelNode();\n composite.get(Util.OPERATION).set(Util.COMPOSITE);\n composite.get(Util.ADDRESS).setEmptyList();\n final ModelNode steps = composite.get(Util.STEPS);\n byte redeploy = this.redeployAffected.isPresent(args) ? REDEPLOY_ONLY_AFFECTED : REDEPLOY_NONE;\n if (!redeployAffected.isPresent(args)) {\n printWarning(ctx, client, name, contentStr, deploymentStr);\n }\n if (contentStr != null || deploymentStr == null && sg == null) {\n if (redeploy == REDEPLOY_ONLY_AFFECTED) {\n redeploy = REDEPLOY_ALL;\n }\n final List<String> contentList;\n if (contentStr == null) {\n contentList = loadContentFor(client, name);\n } else {\n contentList = java.util.Arrays.asList(contentStr.split(\"String_Node_Str\"));\n }\n for (String content : contentList) {\n final ModelNode op = new ModelNode();\n ModelNode addr = op.get(Util.ADDRESS);\n addr.add(Util.DEPLOYMENT_OVERLAY, name);\n addr.add(Util.CONTENT, content);\n op.get(Util.OPERATION).set(Util.REMOVE);\n steps.add(op);\n }\n }\n if (deploymentStr != null || contentStr == null) {\n if (ctx.isDomainMode()) {\n if (deploymentStr == null) {\n final List<String> groups = sg == null ? Util.getServerGroupsReferencingOverlay(name, client) : sg;\n for (String group : groups) {\n addRemoveRedeployLinksSteps(ctx, client, steps, name, group, null, true, redeploy);\n }\n } else {\n if (ctx.isDomainMode() && sg == null) {\n throw new CommandFormatException(serverGroups.getFullName() + \"String_Node_Str\" + allRelevantServerGroups.getFullName() + \"String_Node_Str\");\n }\n final List<String> links = Arrays.asList(deploymentStr.split(\"String_Node_Str\"));\n for (String group : sg) {\n addRemoveRedeployLinksSteps(ctx, client, steps, name, group, links, true, redeploy);\n }\n }\n } else {\n if (deploymentStr == null) {\n addRemoveRedeployLinksSteps(ctx, client, steps, name, null, null, true, redeploy);\n } else {\n final List<String> links = Arrays.asList(deploymentStr.split(\"String_Node_Str\"));\n addRemoveRedeployLinksSteps(ctx, client, steps, name, null, links, true, redeploy);\n }\n }\n } else if (redeploy == REDEPLOY_ALL) {\n if (ctx.isDomainMode()) {\n for (String group : Util.getServerGroupsReferencingOverlay(name, client)) {\n addRemoveRedeployLinksSteps(ctx, client, steps, name, group, null, false, redeploy);\n }\n } else {\n addRemoveRedeployLinksSteps(ctx, client, steps, name, null, null, false, redeploy);\n }\n }\n if (contentStr == null && deploymentStr == null && sg == null) {\n final ModelNode op = new ModelNode();\n op.get(Util.ADDRESS).add(Util.DEPLOYMENT_OVERLAY, name);\n op.get(Util.OPERATION).set(Util.REMOVE);\n steps.add(op);\n }\n return composite;\n}\n"
|
"public void dump(ShortcutService s, PrintWriter pw, String prefix) {\n pw.println();\n pw.print(prefix);\n pw.print(\"String_Node_Str\");\n pw.print(getPackageName());\n pw.print(\"String_Node_Str\");\n pw.print(getPackageUserId());\n pw.print(\"String_Node_Str\");\n pw.print(getOwnerUserId());\n pw.println();\n getPackageInfo().dump(pw, prefix + \"String_Node_Str\");\n pw.println();\n final int size = mPinnedShortcuts.size();\n for (int i = 0; i < size; i++) {\n pw.println();\n final PackageWithUser pu = mPinnedShortcuts.keyAt(i);\n pw.print(prefix);\n pw.print(\"String_Node_Str\");\n pw.print(\"String_Node_Str\");\n pw.print(pu.packageName);\n pw.print(\"String_Node_Str\");\n pw.println(pu.userId);\n final ArraySet<String> ids = mPinnedShortcuts.valueAt(i);\n final int idSize = ids.size();\n for (int j = 0; j < idSize; j++) {\n pw.print(prefix);\n pw.print(\"String_Node_Str\");\n pw.print(ids.valueAt(j));\n pw.println();\n }\n }\n}\n"
|
"private static void checkMapPropertyConstraint(String propertyName, Map<String, Object> mapPropertyValue, PropertyDefinition propertyDefinition, Consumer<String> missingPropertyConsumer) throws ConstraintValueDoNotMatchPropertyTypeException, ConstraintViolationException {\n if (!ToscaTypes.MAP.equals(propertyDefinition.getType())) {\n throwConstraintValueDoNotMatchPropertyTypeException(\"String_Node_Str\" + propertyDefinition.getType(), propertyName, ToscaTypes.MAP, null);\n }\n PropertyDefinition entrySchema = propertyDefinition.getEntrySchema();\n if (entrySchema == null) {\n throw new ConstraintValueDoNotMatchPropertyTypeException(\"String_Node_Str\" + propertyDefinition.getType() + \"String_Node_Str\");\n }\n checkLengthConstraints(propertyDefinition.getConstraints(), mapPropertyValue);\n for (Map.Entry<String, Object> complexPropertyValueEntry : mapPropertyValue.entrySet()) {\n checkPropertyConstraint(propertyName + \"String_Node_Str\" + complexPropertyValueEntry.getKey(), complexPropertyValueEntry.getValue(), entrySchema, missingPropertyConsumer);\n }\n}\n"
|
"public void run() {\n ShowImageShell showImageShell = (ShowImageShell) shells.get(id);\n if (showImageShell == null) {\n showImageShell = new ShowImageShell(display, id, new DisposeListener() {\n public void widgetDisposed(DisposeEvent e) {\n shells.remove(id);\n }\n });\n shells.put(id, showImageShell);\n }\n showImageShell.initialize(Messages.bind(Messages.EclipseCollabSharedObject_SCREEN_CAPTURE_FROM, fromUser), imageWrapper);\n showImageShell.open();\n}\n"
|
"protected boolean fitSystemWindows(Rect insets) {\n pullChildren();\n final int vis = getWindowSystemUiVisibility();\n final boolean stable = (vis & SYSTEM_UI_FLAG_LAYOUT_STABLE) != 0;\n boolean changed = applyInsets(mActionBarTop, insets, true, true, false, true);\n if (mActionBarBottom != null) {\n changed |= applyInsets(mActionBarBottom, insets, true, false, true, true);\n }\n mBaseInnerInsets.set(insets);\n computeFitSystemWindows(mBaseInnerInsets, mBaseContentInsets);\n if (!mLastBaseContentInsets.equals(mBaseContentInsets)) {\n changed = true;\n mLastBaseContentInsets.set(mBaseContentInsets);\n }\n if (changed) {\n requestLayout();\n }\n return true;\n}\n"
|
"public void incrementDispatchTotals(DispatchProc proc) {\n jdbc.update(\"String_Node_Str\" + \"String_Node_Str\", proc.getIdleCores(), proc.getJobId());\n jdbc.update(\"String_Node_Str\", proc.getIdleCores(), proc.getJobId());\n jdbc.update(\"String_Node_Str\" + \"String_Node_Str\", proc.getIdleCores(), proc.getTaskId());\n}\n"
|
"public void readSecurityHeader(SecureChannel channel, ByteBuf chunkBuffer) throws UaException {\n long tokenId = SymmetricSecurityHeader.decode(chunkBuffer).getTokenId();\n ChannelSecurity channelSecurity = channel.getChannelSecurity();\n if (channelSecurity == null) {\n if (tokenId != 0L) {\n throw new UaException(StatusCodes.Bad_SecureChannelTokenUnknown, \"String_Node_Str\" + tokenId);\n }\n } else {\n long currentTokenId = channelSecurity.getCurrentToken().getTokenId().longValue();\n if (tokenId == currentTokenId) {\n securitySecrets = channelSecurity.getCurrentKeys();\n } else {\n long previousTokenId = channelSecurity.getPreviousToken().map(t -> t.getTokenId().longValue()).orElse(-1L);\n if (tokenId != previousTokenId) {\n throw new UaException(StatusCodes.Bad_SecureChannelTokenUnknown, \"String_Node_Str\" + tokenId);\n }\n }\n }\n}\n"
|
"public void onValueChange(ValueChangeEvent<Date> event) {\n Date date = event.getValue();\n int[] hrs = Util.getAvailableHours(date);\n ServicePresenter.this.view.getFilter().setHours1(hrs);\n}\n"
|
"public void testCreateDeleteMessageWithMatchHidden() throws BurrowException {\n String id = \"String_Node_Str\";\n String body = \"String_Node_Str\";\n try {\n backend.execute(queue.createMessage(id, body).withHide((100L)));\n backend.execute(queue.deleteMessage(id).withMatchHidden(true));\n } catch (CommandException ce) {\n fail(\"String_Node_Str\");\n } catch (MessageNotFoundException e) {\n }\n}\n"
|
"private List<Variables> processSource(String ruleId, TransformContext context, Variables vars, StructureMapGroupRuleSourceComponent src) throws FHIRException {\n Base b = vars.get(VariableMode.INPUT, src.getContext());\n if (b == null)\n throw new FHIRException(\"String_Node_Str\" + src.getContext());\n if (src.hasCondition()) {\n ExpressionNode expr = (ExpressionNode) src.getUserData(MAP_WHERE_EXPRESSION);\n if (expr == null) {\n expr = fpe.parse(src.getCondition());\n src.setUserData(MAP_WHERE_EXPRESSION, expr);\n }\n if (!fpe.evaluateToBoolean(vars, null, b, expr))\n return null;\n }\n if (src.hasCheck()) {\n ExpressionNode expr = (ExpressionNode) src.getUserData(MAP_WHERE_CHECK);\n if (expr == null) {\n expr = fpe.parse(src.getCheck());\n src.setUserData(MAP_WHERE_CHECK, expr);\n }\n if (!fpe.evaluateToBoolean(null, b, expr))\n throw new FHIRException(\"String_Node_Str\" + ruleId + \"String_Node_Str\");\n }\n List<Base> items = new ArrayList<Base>();\n if (!src.hasElement())\n items.add(b);\n else {\n getChildrenByName(b, src.getElement(), items);\n if (items.size() == 0 && src.hasDefaultValue())\n items.add(src.getDefaultValue());\n }\n if (src.hasType()) {\n List<Base> remove = new ArrayList<Base>();\n for (Base item : items) {\n if (item != null && !isType(item, src.getType())) {\n remove.add(item);\n }\n }\n items.removeAll(remove);\n }\n if (src.hasListMode()) {\n switch(src.getListMode()) {\n case FIRST:\n Base bt = items.get(0);\n items.clear();\n items.add(bt);\n break;\n case NOTFIRST:\n if (items.size() > 1)\n items.remove(0);\n break;\n case LAST:\n bt = items.get(items.size() - 1);\n items.clear();\n items.add(bt);\n break;\n case NOTLAST:\n if (items.size() > 1)\n items.remove(items.size() - 1);\n break;\n case ONLYONE:\n if (items.size() > 1)\n items.clear();\n break;\n case NULL:\n }\n }\n List<Variables> result = new ArrayList<Variables>();\n for (Base r : items) {\n Variables v = vars.copy();\n if (src.hasVariable())\n v.add(VariableMode.INPUT, src.getVariable(), r);\n result.add(v);\n }\n return result;\n}\n"
|
"protected double[] _newtonStep(double[] x) throws IllegalActionException {\n final int n = x.length;\n double[] xNew = new double[n];\n System.arraycopy(x, 0, xNew, 0, n);\n double[][] J = new double[n][n];\n final double[] g = _evaluateLoopFunction(x);\n for (int i = 0; i < n; i++) {\n final double xOri = xNew[i];\n xNew[i] += _deltaX[i];\n final double[] gNew = _evaluateLoopFunction(xNew);\n for (int k = 0; k < n; k++) {\n J[i][k] = (gNew[k] - g[k]) / _deltaX[i];\n }\n xNew[i] = xOri;\n }\n final double det = DoubleMatrixMath.determinant(J);\n if (Math.abs(det) < 1E-5) {\n final String LS = System.getProperty(\"String_Node_Str\");\n String em = \"String_Node_Str\" + LS + \"String_Node_Str\" + DoubleMatrixMath.toString(J) + LS + \"String_Node_Str\" + det;\n throw new IllegalArgumentException(em);\n }\n if (n == 1) {\n final double d = -g[0] / J[0][0];\n xNew[0] = x[0] + d;\n } else {\n final double[] d = gaussElimination(J, g);\n for (int i = 0; i < n; i++) xNew[i] = x[i] - d[i];\n }\n return xNew;\n}\n"
|
"public static ContainerLaunchContext createContainerLaunchContext(Map<ApplicationAccessType, String> acls, ContainerId containerId, TezConfiguration conf, TezVertexID vertexId, Token<JobTokenIdentifier> jobToken, Resource assignedCapability, Map<String, LocalResource> localResources, Map<String, String> vertexEnv, String javaOpts, TaskAttemptListener taskAttemptListener, Credentials credentials, boolean shouldProfile, AppContext appContext) {\n synchronized (commonContainerSpecLock) {\n if (commonContainerSpec == null) {\n commonContainerSpec = createCommonContainerLaunchContext(acls, conf, jobToken, vertexId, credentials, appContext);\n }\n }\n Map<String, LocalResource> lResources = new TreeMap<String, LocalResource>();\n lResources.putAll(commonContainerSpec.getLocalResources());\n lResources.putAll(localResources);\n Map<String, String> env = commonContainerSpec.getEnvironment();\n Map<String, String> myEnv = new HashMap<String, String>(env.size());\n myEnv.putAll(env);\n myEnv.putAll(vertexEnv);\n List<String> commands = TezEngineChildJVM.getVMCommand(taskAttemptListener.getAddress(), conf, vertexId, containerId, vertexId.getDAGId().getApplicationId(), shouldProfile, javaOpts);\n Map<String, ByteBuffer> myServiceData = new HashMap<String, ByteBuffer>();\n for (Entry<String, ByteBuffer> entry : commonContainerSpec.getServiceData().entrySet()) {\n myServiceData.put(entry.getKey(), entry.getValue().duplicate());\n }\n ContainerLaunchContext container = BuilderUtils.newContainerLaunchContext(commonContainerSpec.getUser(), lResources, myEnv, commands, myServiceData, commonContainerSpec.getContainerTokens().duplicate(), acls);\n return container;\n}\n"
|
"protected void parseImmunizationRecommendationImmunizationRecommendationRecommendationComponentProperties(JsonObject json, ImmunizationRecommendation owner, ImmunizationRecommendation.ImmunizationRecommendationRecommendationComponent res) throws IOException, FHIRFormatError {\n parseBackboneElementProperties(json, res);\n if (json.has(\"String_Node_Str\")) {\n JsonArray array = json.getAsJsonArray(\"String_Node_Str\");\n for (int i = 0; i < array.size(); i++) {\n res.getVaccineCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));\n }\n }\n ;\n if (json.has(\"String_Node_Str\"))\n res.setTargetDisease(parseCodeableConcept(json.getAsJsonObject(\"String_Node_Str\")));\n if (json.has(\"String_Node_Str\")) {\n JsonArray array = json.getAsJsonArray(\"String_Node_Str\");\n for (int i = 0; i < array.size(); i++) {\n res.getContraindicatedVaccineCode().add(parseCodeableConcept(array.get(i).getAsJsonObject()));\n }\n }\n ;\n if (json.has(\"String_Node_Str\"))\n res.setForecastStatus(parseCodeableConcept(json.getAsJsonObject(\"String_Node_Str\")));\n if (json.has(\"String_Node_Str\")) {\n JsonArray array = json.getAsJsonArray(\"String_Node_Str\");\n for (int i = 0; i < array.size(); i++) {\n res.getForecastReason().add(parseCodeableConcept(array.get(i).getAsJsonObject()));\n }\n }\n ;\n if (json.has(\"String_Node_Str\")) {\n JsonArray array = json.getAsJsonArray(\"String_Node_Str\");\n for (int i = 0; i < array.size(); i++) {\n res.getDateCriterion().add(parseImmunizationRecommendationImmunizationRecommendationRecommendationDateCriterionComponent(array.get(i).getAsJsonObject(), owner));\n }\n }\n ;\n if (json.has(\"String_Node_Str\"))\n res.setDescriptionElement(parseString(json.get(\"String_Node_Str\").getAsString()));\n if (json.has(\"String_Node_Str\"))\n parseElementProperties(json.getAsJsonObject(\"String_Node_Str\"), res.getDescriptionElement());\n if (json.has(\"String_Node_Str\"))\n res.setSeriesElement(parseString(json.get(\"String_Node_Str\").getAsString()));\n if (json.has(\"String_Node_Str\"))\n parseElementProperties(json.getAsJsonObject(\"String_Node_Str\"), res.getSeriesElement());\n Type doseNumber = parseType(\"String_Node_Str\", json);\n if (doseNumber != null)\n res.setDoseNumber(doseNumber);\n Type seriesDoses = parseType(\"String_Node_Str\", json);\n if (seriesDoses != null)\n res.setSeriesDoses(seriesDoses);\n if (json.has(\"String_Node_Str\")) {\n JsonArray array = json.getAsJsonArray(\"String_Node_Str\");\n for (int i = 0; i < array.size(); i++) {\n res.getSupportingImmunization().add(parseReference(array.get(i).getAsJsonObject()));\n }\n }\n ;\n if (json.has(\"String_Node_Str\")) {\n JsonArray array = json.getAsJsonArray(\"String_Node_Str\");\n for (int i = 0; i < array.size(); i++) {\n res.getSupportingPatientInformation().add(parseReference(array.get(i).getAsJsonObject()));\n }\n }\n ;\n}\n"
|
"public Object visitIfThenElseExpressionTerm(cqlParser.IfThenElseExpressionTermContext ctx) {\n If ifObject = of.createIf().withCondition(parseExpression(ctx.expression(0))).withThen(parseExpression(ctx.expression(1))).withElse(parseExpression(ctx.expression(2)));\n DataTypes.verifyType(ifObject.getCondition().getResultType(), resolveTypeName(\"String_Node_Str\"));\n DataType thenType = ifObject.getThen().getResultType();\n DataTypes.verifyType(ifObject.getElse().getResultType(), thenType);\n ifObject.setResultType(thenType);\n return ifObject;\n}\n"
|
"public void fillArc(ArcRenderEvent are) throws ChartException {\n if (iv != null) {\n iv.modifyEvent(are);\n }\n final Fill flBackground = validateMultipleFill(are.getBackground());\n if (isFullTransparent(flBackground)) {\n return;\n }\n if (flBackground instanceof ColorDefinition) {\n final ColorDefinition cl = (ColorDefinition) flBackground;\n final Color clrPrevious = _g2d.getColor();\n final Color currentColor = (Color) _ids.getColor(cl);\n _g2d.setColor(currentColor);\n if (are.getInnerRadius() >= 0 && are.getOuterRadius() > 0 && are.getInnerRadius() < are.getOuterRadius()) {\n Shape outerArc = new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getOuterRadius()) / 2, are.getTopLeft().getY() + (are.getHeight() - 2 * are.getOuterRadius()) / 2, 2 * are.getOuterRadius(), 2 * are.getOuterRadius(), are.getStartAngle(), are.getAngleExtent(), Arc2D.PIE);\n Shape innerArc = new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getInnerRadius()) / 2, are.getTopLeft().getY() + (are.getHeight() - 2 * are.getInnerRadius()) / 2, 2 * are.getInnerRadius(), 2 * are.getInnerRadius(), are.getStartAngle(), are.getAngleExtent(), Arc2D.PIE);\n Area fArea = new Area(outerArc);\n fArea.exclusiveOr(new Area(innerArc));\n Shape prevClip = _g2d.getClip();\n Area ar2 = new Area(fArea);\n if (prevClip != null) {\n Area ar1 = new Area(prevClip);\n ar2.intersect(ar1);\n }\n _g2d.setClip(ar2);\n _g2d.fill(fArea);\n _g2d.setClip(prevClip);\n } else {\n _g2d.fill(new Arc2D.Double(are.getTopLeft().getX(), are.getTopLeft().getY(), are.getWidth(), are.getHeight(), are.getStartAngle(), are.getAngleExtent(), toSwingArcType(are.getStyle())));\n }\n _g2d.setColor(clrPrevious);\n } else if (flBackground instanceof Gradient) {\n final Gradient g = (Gradient) flBackground;\n final ColorDefinition cdStart = g.getStartColor();\n final ColorDefinition cdEnd = g.getEndColor();\n double dAngleInDegrees = g.getDirection();\n final double dAngleInRadians = ((-dAngleInDegrees * Math.PI) / 180.0);\n Bounds bo = are.getBounds();\n if (dAngleInDegrees < -90 || dAngleInDegrees > 90) {\n throw new ChartException(ChartDeviceExtensionPlugin.ID, ChartException.RENDERING, \"String_Node_Str\", new Object[] { new Double(dAngleInDegrees) }, Messages.getResourceBundle(getULocale()));\n }\n Point2D.Double p2dStart, p2dEnd;\n if (dAngleInDegrees == 90) {\n p2dStart = new Point2D.Double(bo.getLeft(), bo.getTop() + bo.getHeight());\n p2dEnd = new Point2D.Double(bo.getLeft(), bo.getTop());\n } else if (dAngleInDegrees == -90) {\n p2dEnd = new Point2D.Double(bo.getLeft(), bo.getTop() + bo.getHeight());\n p2dStart = new Point2D.Double(bo.getLeft(), bo.getTop());\n } else if (dAngleInDegrees > 0) {\n p2dStart = new Point2D.Double(bo.getLeft(), bo.getTop() + bo.getHeight());\n p2dEnd = new Point2D.Double(bo.getLeft() + bo.getWidth(), bo.getTop() + bo.getHeight() - bo.getWidth() * Math.abs(Math.tan(dAngleInRadians)));\n } else if (dAngleInDegrees < 0) {\n p2dStart = new Point2D.Double(bo.getLeft(), bo.getTop());\n p2dEnd = new Point2D.Double(bo.getLeft() + bo.getWidth(), bo.getTop() + bo.getWidth() * Math.abs(Math.tan(dAngleInRadians)));\n } else {\n p2dStart = new Point2D.Double(bo.getLeft(), bo.getTop());\n p2dEnd = new Point2D.Double(bo.getLeft() + bo.getWidth(), bo.getTop());\n }\n final Paint pPrevious = _g2d.getPaint();\n _g2d.setPaint(new GradientPaint(p2dStart, (Color) _ids.getColor(cdStart), p2dEnd, (Color) _ids.getColor(cdEnd)));\n if (are.getInnerRadius() >= 0 && are.getOuterRadius() > 0 && are.getInnerRadius() < are.getOuterRadius()) {\n Shape outerArc = new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getOuterRadius()) / 2, are.getTopLeft().getY() + (are.getHeight() - 2 * are.getOuterRadius()) / 2, 2 * are.getOuterRadius(), 2 * are.getOuterRadius(), are.getStartAngle(), are.getAngleExtent(), Arc2D.PIE);\n Shape innerArc = new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getInnerRadius()) / 2, are.getTopLeft().getY() + (are.getHeight() - 2 * are.getInnerRadius()) / 2, 2 * are.getInnerRadius(), 2 * are.getInnerRadius(), are.getStartAngle(), are.getAngleExtent(), Arc2D.PIE);\n Area fArea = new Area(outerArc);\n fArea.exclusiveOr(new Area(innerArc));\n Shape prevClip = _g2d.getClip();\n Area ar2 = new Area(fArea);\n if (prevClip != null) {\n Area ar1 = new Area(prevClip);\n ar2.intersect(ar1);\n }\n _g2d.setClip(ar2);\n _g2d.fill(fArea);\n _g2d.setClip(prevClip);\n } else {\n _g2d.fill(new Arc2D.Double(are.getTopLeft().getX(), are.getTopLeft().getY(), are.getWidth(), are.getHeight(), are.getStartAngle(), are.getAngleExtent(), toSwingArcType(are.getStyle())));\n }\n _g2d.setPaint(pPrevious);\n } else if (flBackground instanceof org.eclipse.birt.chart.model.attribute.Image) {\n final Bounds bo = are.getBounds();\n final Rectangle2D.Double r2d = new Rectangle2D.Double(bo.getLeft(), bo.getTop(), bo.getWidth(), bo.getHeight());\n Shape shPreviousClip = _g2d.getClip();\n if (are.getInnerRadius() >= 0 && are.getOuterRadius() > 0 && are.getInnerRadius() < are.getOuterRadius()) {\n Shape outerArc = new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getOuterRadius()) / 2, are.getTopLeft().getY() + (are.getHeight() - 2 * are.getOuterRadius()) / 2, 2 * are.getOuterRadius(), 2 * are.getOuterRadius(), are.getStartAngle(), are.getAngleExtent(), Arc2D.PIE);\n Shape innerArc = new Arc2D.Double(are.getTopLeft().getX() + (are.getWidth() - 2 * are.getInnerRadius()) / 2, are.getTopLeft().getY() + (are.getHeight() - 2 * are.getInnerRadius()) / 2, 2 * are.getInnerRadius(), 2 * are.getInnerRadius(), are.getStartAngle(), are.getAngleExtent(), Arc2D.PIE);\n Area fArea = new Area(outerArc);\n fArea.exclusiveOr(new Area(innerArc));\n if (shPreviousClip != null) {\n Area ar1 = new Area(shPreviousClip);\n fArea.intersect(ar1);\n }\n _g2d.setClip(fArea);\n } else {\n final Shape shArc = new Arc2D.Double(are.getTopLeft().getX(), are.getTopLeft().getY(), are.getWidth(), are.getHeight(), are.getStartAngle(), are.getAngleExtent(), toSwingArcType(are.getStyle()));\n Area ar2 = new Area(shArc);\n if (shPreviousClip != null) {\n Area ar1 = new Area(shPreviousClip);\n ar2.intersect(ar1);\n }\n _g2d.setClip(ar2);\n }\n java.awt.Image img = createImageFromModel(flBackground);\n if (img != null) {\n final Size szImage = _ids.getSize(img);\n int iXRepeat = (int) (Math.ceil(r2d.width / szImage.getWidth()));\n int iYRepeat = (int) (Math.ceil(r2d.height / szImage.getHeight()));\n ImageObserver io = (ImageObserver) _ids.getObserver();\n for (int i = 0; i < iXRepeat; i++) {\n for (int j = 0; j < iYRepeat; j++) {\n _g2d.drawImage(img, (int) (r2d.x + i * szImage.getWidth()), (int) (r2d.y + j * szImage.getHeight()), io);\n }\n }\n }\n _g2d.setClip(shPreviousClip);\n }\n}\n"
|
"protected void checkForErrors() {\n errors = new ArrayList<String>();\n if (!new File(dirTxt.getText()).exists()) {\n errors.add(Messages.getString(\"String_Node_Str\"));\n }\n ItemRecord[] elements = getElements();\n for (ItemRecord record : elements) {\n File file = record.getFile();\n IFile iFile = ResourceService.file2IFile(file);\n File[] dependencies = computeDependencies(iFile);\n for (File depFile : dependencies) {\n if (!repositoryTree.getChecked(depFile)) {\n errors.add(\"String_Node_Str\" + record.getElement().getName() + \"String_Node_Str\" + depFile.getName());\n }\n }\n }\n if (!errors.isEmpty()) {\n setErrorMessage(errors.get(0));\n } else {\n setErrorMessage(null);\n }\n updatePageStatus();\n}\n"
|
"public static DeploymentPolicyBean getDeploymentPolicy(String deploymentPolicyId) throws RestAPIException {\n DeploymentPolicyBean deploymentPolicyBean;\n try {\n org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy[] deploymentPolicies = AutoscalerServiceClient.getInstance().getDeploymentPolicies();\n DeploymentPolicy deploymentPolicy = null;\n PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();\n org.apache.stratos.autoscaler.stub.deployment.policy.DeploymentPolicy deploymentPolicy = AutoscalerServiceClient.getInstance().getDeploymentPolicyForTenant(deploymentPolicyId, carbonContext.getTenantId());\n if (deploymentPolicy == null) {\n return null;\n }\n deploymentPolicyBean = ObjectConverter.convertCCStubDeploymentPolicyToDeploymentPolicy(deploymentPolicy);\n } catch (RemoteException e) {\n String msg = \"String_Node_Str\" + deploymentPolicyId;\n log.error(msg, e);\n throw new RestAPIException(msg);\n }\n return deploymentPolicyBean;\n}\n"
|
"public void onChanged(Change<? extends Stage> change) {\n change.next();\n for (final Stage stage : change.getRemoved()) {\n hierarchy.removeComponentFromHierarchy(stage);\n }\n for (final Stage stage : change.getAddedSubList()) {\n stage.addEventFilter(WindowEvent.WINDOW_SHOWN, new EventHandler<WindowEvent>() {\n\n public void handle(WindowEvent event) {\n hierarchy.createHierarchyFrom(stage);\n stageResizeSync.register(stage);\n stage.setOnShown(null);\n }\n });\n }\n}\n"
|
"public void setup() throws Exception {\n context.put(ModuleManager.class, moduleManager);\n mockTime = mock(EngineTime.class);\n context.put(Time.class, mockTime);\n NetworkSystemImpl networkSystem = new NetworkSystemImpl(mockTime, context);\n context.put(Game.class, new Game());\n context.put(NetworkSystem.class, networkSystem);\n EntitySystemSetupUtil.addReflectionBasedLibraries(context);\n EntitySystemSetupUtil.addEntityManagementRelatedClasses(context);\n engineEntityManager = context.get(EngineEntityManager.class);\n BlockManager mockBlockManager = context.get(BlockManager.class);\n BiomeManager biomeManager = context.get(BiomeManager.class);\n RecordedEventStore recordedEventStore = new RecordedEventStore();\n EntityIdMap entityIdMap = new EntityIdMap();\n context.put(EntityIdMap.class, entityIdMap);\n RecordAndReplayUtils recordAndReplayUtils = new RecordAndReplayUtils();\n context.put(RecordAndReplayUtils.class, recordAndReplayUtils);\n RecordAndReplaySerializer recordAndReplaySerializer = new RecordAndReplaySerializer(engineEntityManager, recordedEventStore, entityIdMap, recordAndReplayUtils);\n context.put(RecordAndReplaySerializer.class, recordAndReplaySerializer);\n Path savePath = PathManager.getInstance().getSavePath(\"String_Node_Str\");\n context.put(StorageManager.class, new ReadWriteStorageManager(savePath, moduleManager.getEnvironment(), engineEntityManager, mockBlockManager, biomeManager, recordAndReplaySerializer, recordAndReplayUtils));\n ComponentSystemManager componentSystemManager = new ComponentSystemManager(context);\n context.put(ComponentSystemManager.class, componentSystemManager);\n LoadPrefabs prefabLoadStep = new LoadPrefabs(context);\n boolean complete = false;\n prefabLoadStep.begin();\n while (!complete) {\n complete = prefabLoadStep.step();\n }\n context.get(ComponentSystemManager.class).initialise();\n context.put(Console.class, new ConsoleImpl(context));\n}\n"
|
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n try {\n setContentView(R.layout.displaysurah);\n ayahListView = (ListView) findViewById(R.id.ayahList);\n ArrayList<String> ayahList = new ArrayList<String>();\n Typeface externalFont = Typeface.createFromAsset(getAssets(), \"String_Node_Str\");\n XmlPullParser xpp = this.getResources().getXml(R.xml.quransimple);\n Bundle bundle = this.getIntent().getExtras();\n suraName = bundle.getString(\"String_Node_Str\");\n suraPosition = bundle.getInt(\"String_Node_Str\");\n numAyas = bundle.getInt(\"String_Node_Str\");\n ayahList = SurahDataParser.getAyahList(this, xpp, suraPosition);\n int nTranslationVal = bundle.getInt(\"String_Node_Str\");\n statTranslationVal = nTranslationVal;\n if (nTranslationVal == 1) {\n xpp = this.getResources().getXml(R.xml.entransliteration);\n } else if (nTranslationVal == 2) {\n xpp = this.getResources().getXml(R.xml.ensahih);\n } else if (nTranslationVal == 3) {\n xpp = this.getResources().getXml(R.xml.enyusufali);\n } else if (nTranslationVal == 4) {\n xpp = this.getResources().getXml(R.xml.mlabdulhameed);\n }\n ArrayList<String> translatedAyaList = new ArrayList<String>();\n if (nTranslationVal != 0) {\n translatedAyaList = TranslatedSuraDataParser.getTranslatedAyaList(this, xpp, suraPosition);\n }\n CustomAyaListAdapter customAdapter = new CustomAyaListAdapter(this, ayahList, translatedAyaList, nTranslationVal);\n ayahListView.setAdapter(customAdapter);\n array_gotoAya = new String[numAyas];\n for (int i = 0; i < numAyas; i++) {\n array_gotoAya[i] = String.valueOf(i + 1);\n }\n boolean mExternalStorageAvailable = false;\n boolean mExternalStorageWritable = false;\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n mExternalStorageAvailable = mExternalStorageWritable = true;\n } else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n mExternalStorageAvailable = true;\n mExternalStorageWritable = false;\n } else {\n mExternalStorageAvailable = mExternalStorageWritable = false;\n }\n if ((!mExternalStorageAvailable) || (!mExternalStorageWritable)) {\n AlertDialog.Builder adb = new AlertDialog.Builder(DisplaySuraActivity.this);\n adb.setTitle(\"String_Node_Str\");\n adb.setMessage(\"String_Node_Str\");\n adb.setPositiveButton(\"String_Node_Str\", null);\n adb.show();\n } else {\n getAudioPath(DisplaySuraActivity.this.getExternalFilesDir(null).getAbsolutePath());\n }\n ayahListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n if (ayaOnTapEnabled) {\n if (Recitation.isPlaying()) {\n Recitation.pausePlayer();\n } else {\n Recitation.currentAyaPos = position + 2;\n Recitation.play(DisplaySuraActivity.this, DisplaySuraActivity.this.suraPosition, DisplaySuraActivity.this.numAyas, false);\n }\n }\n }\n });\n } catch (Exception ex) {\n AlertDialog.Builder adb = new AlertDialog.Builder(DisplaySuraActivity.this);\n adb.setTitle(\"String_Node_Str\");\n adb.setMessage(\"String_Node_Str\" + ex.toString() + \"String_Node_Str\" + ex.getMessage());\n adb.setNegativeButton(\"String_Node_Str\", null);\n adb.show();\n }\n}\n"
|
"private Simon getOrCreateSimon(String name, Class<? extends AbstractSimon> simonClass) {\n if (name == null) {\n return instantiateSimon(null, simonClass);\n }\n if (name.equals(ROOT_SIMON_NAME)) {\n throw new SimonException(\"String_Node_Str\");\n }\n AbstractSimon simon = allSimons.get(name);\n if (simon != null && simonClass.isInstance(simon)) {\n return simon;\n }\n return createOrReplaceUnknownSimon(name, simonClass);\n}\n"
|
"public long getCurrentTimeUs(boolean refreshTime, boolean monotonic) throws IllegalStateException {\n synchronized (this) {\n if (mPaused && !refreshTime) {\n return mLastReportedTime;\n }\n long nanoTime = System.nanoTime();\n if (refreshTime || nanoTime >= mLastNanoTime + MAX_NS_WITHOUT_POSITION_CHECK) {\n try {\n mLastTimeUs = mPlayer.getCurrentPosition() * 1000L;\n mPaused = !mPlayer.isPlaying();\n if (DEBUG)\n Log.v(TAG, (mPaused ? \"String_Node_Str\" : \"String_Node_Str\") + \"String_Node_Str\" + mLastTimeUs);\n } catch (IllegalStateException e) {\n if (mPausing) {\n mPausing = false;\n getEstimatedTime(nanoTime, monotonic);\n mPaused = true;\n if (DEBUG)\n Log.d(TAG, \"String_Node_Str\" + mLastReportedTime);\n return mLastReportedTime;\n }\n throw e;\n }\n mLastNanoTime = nanoTime;\n if (monotonic && mLastTimeUs < mLastReportedTime) {\n mTimeAdjustment = mLastReportedTime - mLastTimeUs;\n if (mTimeAdjustment > 1000000) {\n mStopped = false;\n mSeeking = true;\n scheduleNotification(NOTIFY_SEEK, 0);\n }\n } else {\n mTimeAdjustment = 0;\n }\n }\n return getEstimatedTime(nanoTime, monotonic);\n }\n}\n"
|
"public void setNamespaceURI(String namespaceURI) {\n if (isSelfFragment || \"String_Node_Str\".equals(namespaceURI)) {\n this.namespaceURI = null;\n } else {\n this.namespaceURI = namespaceURI;\n }\n}\n"
|
"public Integer call(Object object) throws Exception {\n DateTime dt = Utils.toDateTimeObject(object);\n if (dt != null) {\n return Integer.parseInt(dt.weekyear().getAsString());\n } else {\n return null;\n }\n}\n"
|
"private void setMaprTicketConfig(IMetadataConnection metadataConn, ClassLoader classLoader, boolean useKerberos) throws Exception {\n String mapRTicketUsername = (String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HBASE_AUTHENTICATION_USERNAME);\n String mapRTicketPassword = (String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HBASE_AUTHENTICATION_MAPRTICKET_PASSWORD);\n String mapRTicketCluster = (String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HBASE_AUTHENTICATION_MAPRTICKET_CLUSTER);\n String mapRTicketDuration = (String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HBASE_AUTHENTICATION_MAPRTICKET_DURATION);\n boolean setMapRHadoopLogin = Boolean.valueOf((String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_MAPRTICKET_SETMAPRHADOOPLOGIN));\n String mapRHadoopLogin = (String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_MAPRTICKET_MAPRHADOOPLOGIN);\n Long desiredTicketDurInSecs = 86400L;\n if (mapRTicketDuration != null && StringUtils.isNotBlank(mapRTicketDuration)) {\n if (mapRTicketDuration.endsWith(\"String_Node_Str\")) {\n mapRTicketDuration = mapRTicketDuration.substring(0, mapRTicketDuration.length() - 1);\n desiredTicketDurInSecs = Long.valueOf(mapRTicketDuration) + 'L';\n } else if (StringUtils.isNumeric(mapRTicketDuration)) {\n desiredTicketDurInSecs = Long.valueOf(mapRTicketDuration) + 'L';\n }\n }\n Object mapRClientConfig = ReflectionUtils.newInstance(\"String_Node_Str\", classLoader, new Object[] {});\n if (useKerberos) {\n System.setProperty(\"String_Node_Str\", setMapRHadoopLogin ? mapRHadoopLogin : \"String_Node_Str\");\n ReflectionUtils.invokeMethod(mapRClientConfig, \"String_Node_Str\", new Object[] { ConnectionContextHelper.getParamValueOffContext(metadataConn, mapRTicketCluster), desiredTicketDurInSecs });\n } else {\n if (setMapRHadoopLogin) {\n System.setProperty(\"String_Node_Str\", mapRHadoopLogin);\n } else {\n ReflectionUtils.invokeMethod(mapRClientConfig, \"String_Node_Str\", new Object[] { false }, boolean.class);\n }\n String version = (String) metadataConn.getParameter(ConnParameterKeys.CONN_PARA_KEY_HBASE_VERSION);\n Object[] argsObj = new Object[] { ConnectionContextHelper.getParamValueOffContext(metadataConn, mapRTicketCluster), ConnectionContextHelper.getParamValueOffContext(metadataConn, mapRTicketUsername), ConnectionContextHelper.getParamValueOffContext(metadataConn, mapRTicketPassword), desiredTicketDurInSecs };\n if (version != null && \"String_Node_Str\".compareTo(version) <= 0) {\n argsObj = new Object[] { ConnectionContextHelper.getParamValueOffContext(metadataConn, mapRTicketCluster), ConnectionContextHelper.getParamValueOffContext(metadataConn, mapRTicketUsername), ConnectionContextHelper.getParamValueOffContext(metadataConn, mapRTicketPassword), desiredTicketDurInSecs, \"String_Node_Str\" };\n }\n ReflectionUtils.invokeMethod(mapRClientConfig, \"String_Node_Str\", argsObj);\n }\n}\n"
|
"protected CubeCursor getCubeCursor() {\n if (cubeCursor != null) {\n return cubeCursor;\n } else if (parentExecutor instanceof BaseCrosstabExecutor && !(this instanceof CrosstabReportItemExecutor)) {\n return ((BaseCrosstabExecutor) parentExecutor).getCubeCursor();\n }\n return null;\n}\n"
|
"private ExpressionFactory createExpressionFactory() {\n return new ExpressionFactoryImpl();\n}\n"
|
"public void editFacade(PlanSkeleton skel, SuperFace sf, SuperEdge se, boolean texture) {\n closeSitePlan();\n if (se.toEdit == null) {\n ensureMF(sf, se);\n if (!texture.isSelected())\n se.toEdit.groundFloorHeight = 2;\n }\n if (texture) {\n patchWallTag(skel, se, se.toEdit);\n se.toEdit.width = se.length();\n } else\n se.toEdit.texture = null;\n Plot p = new Plot(se.toEdit);\n Changed c = new Changed() {\n public void changed() {\n PaintThing.debug.clear();\n if (texture)\n new Thread(new Runnable() {\n public void run() {\n Pix2Pix.pix2pix(Collections.singletonList(se.toEdit), new Runnable() {\n public void run() {\n tweed.enqueue(new Runnable() {\n public void run() {\n setSkel(skel, skel.output, sf);\n tweed.getRootNode().updateGeometricState();\n }\n });\n }\n });\n }\n }).start();\n else\n tweed.enqueue(new Runnable() {\n public void run() {\n setSkel(skel, skel.output, sf);\n }\n });\n }\n };\n c.changed();\n p.addEditListener(c);\n}\n"
|
"public String editBulkItemsInlandDestination() {\n Map sessionAttributes = ActionContext.getContext().getSession();\n try {\n String[] checkedItemsInSession = (String[]) sessionAttributes.get(\"String_Node_Str\");\n for (String value : checkedItemsInSession) {\n String modeOfService = sessionAttributes.get(\"String_Node_Str\").toString();\n String freightType = sessionAttributes.get(\"String_Node_Str\").toString();\n Integer orderItemId = Integer.parseInt(value);\n OrderItems orderItemEntity = orderService.findOrderItemByOrderItemId(orderItemId);\n orderItemEntity.setOrderItemId(orderItemId);\n orderItemEntity.setVendorDestination(vendorService.findVendorById(operationsBean.getVendorListDestination()).getVendorCode());\n orderItemEntity.setDriverDestination(operationsBean.getDriverDestination());\n orderItemEntity.setTruckDestination(operationsBean.getTruckDestination());\n orderItemEntity.setFinalDeliveryDate(operationsBean.getDeliveryDate());\n orderItemEntity.setClientId(1);\n if (\"String_Node_Str\".equals(freightType)) {\n if (\"String_Node_Str\".equals(modeOfService)) {\n orderItemEntity.setStatus(\"String_Node_Str\");\n } else {\n orderItemEntity.setStatus(\"String_Node_Str\");\n }\n }\n if (\"String_Node_Str\".equals(freightType)) {\n orderItemEntity.setStatus(\"String_Node_Str\");\n }\n operationsService.updateOrderItem(orderItemEntity);\n }\n } catch (Exception e) {\n log.error(\"String_Node_Str\", e);\n return INPUT;\n }\n sessionAttributes.put(\"String_Node_Str\", vendorIdParam);\n Integer orderId = (Integer) sessionAttributes.get(\"String_Node_Str\");\n return SUCCESS;\n}\n"
|
"public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Object objectValue, AbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext) {\n if (xPathFragment.hasLeafElementType()) {\n marshalRecord.setLeafElementType(xPathFragment.getLeafElementType());\n }\n XMLMarshaller marshaller = marshalRecord.getMarshaller();\n Converter converter = xmlCompositeObjectMapping.getConverter();\n if (null != converter) {\n if (converter instanceof XMLConverter) {\n objectValue = ((XMLConverter) converter).convertObjectValueToDataValue(objectValue, session, marshaller);\n } else {\n objectValue = converter.convertObjectValueToDataValue(objectValue, session);\n }\n }\n if (null == objectValue) {\n return xmlCompositeObjectMapping.getNullPolicy().compositeObjectMarshal(xPathFragment, marshalRecord, object, session, namespaceResolver);\n }\n XPathFragment groupingFragment = marshalRecord.openStartGroupingElements(namespaceResolver);\n boolean isSelfFragment = xPathFragment.isSelfFragment;\n marshalRecord.closeStartGroupingElements(groupingFragment);\n UnmarshalKeepAsElementPolicy keepAsElementPolicy = xmlCompositeObjectMapping.getKeepAsElementPolicy();\n if (((keepAsElementPolicy == UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT) || (keepAsElementPolicy == UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT)) && objectValue instanceof Node) {\n if (isSelfFragment) {\n NodeList children = ((org.w3c.dom.Element) objectValue).getChildNodes();\n for (int i = 0, size = children.getLength(); i < size; i++) {\n Node next = children.item(i);\n if (next.getNodeType() == Node.ELEMENT_NODE) {\n marshalRecord.node(next, marshalRecord.getNamespaceResolver());\n return true;\n }\n }\n } else {\n marshalRecord.node((Node) objectValue, marshalRecord.getNamespaceResolver());\n return true;\n }\n }\n XMLDescriptor descriptor = (XMLDescriptor) xmlCompositeObjectMapping.getReferenceDescriptor();\n if (descriptor == null || (descriptor.hasInheritance() && !(objectValue.getClass() == descriptor.getJavaClass()))) {\n descriptor = (XMLDescriptor) session.getDescriptor(objectValue.getClass());\n }\n if (descriptor != null) {\n marshalRecord.beforeContainmentMarshal(objectValue);\n TreeObjectBuilder objectBuilder = (TreeObjectBuilder) descriptor.getObjectBuilder();\n if (!(isSelfFragment || xPathFragment.nameIsText())) {\n xPathNode.startElement(marshalRecord, xPathFragment, object, session, namespaceResolver, objectBuilder, objectValue);\n }\n List extraNamespaces = objectBuilder.addExtraNamespacesToNamespaceResolver(descriptor, marshalRecord, session);\n writeExtraNamespaces(extraNamespaces, marshalRecord, session);\n if (!isSelfFragment) {\n objectBuilder.addXsiTypeAndClassIndicatorIfRequired(marshalRecord, descriptor, (XMLDescriptor) xmlCompositeObjectMapping.getReferenceDescriptor(), (XMLField) xmlCompositeObjectMapping.getField(), false);\n }\n objectBuilder.buildRow(marshalRecord, objectValue, session, marshaller, xPathFragment, WriteType.UNDEFINED);\n marshalRecord.afterContainmentMarshal(object, objectValue);\n if (!isSelfFragment) {\n marshalRecord.endElement(xPathFragment, namespaceResolver);\n }\n objectBuilder.removeExtraNamespacesFromNamespaceResolver(marshalRecord, extraNamespaces, session);\n } else {\n if (!isSelfFragment) {\n xPathNode.startElement(marshalRecord, xPathFragment, object, session, namespaceResolver, null, objectValue);\n }\n QName schemaType = getSchemaType((XMLField) xmlCompositeObjectMapping.getField(), objectValue, session);\n String stringValue = marshalRecord.getValueToWrite(schemaType, objectValue, (XMLConversionManager) session.getDatasourcePlatform().getConversionManager());\n updateNamespaces(schemaType, marshalRecord, ((XMLField) xmlCompositeObjectMapping.getField()));\n marshalRecord.characters(stringValue);\n if (!isSelfFragment) {\n marshalRecord.endElement(xPathFragment, namespaceResolver);\n }\n }\n return true;\n}\n"
|
"public void adjustTargets(Ability ability, Game game) {\n if (ability.getOriginalId().equals(abilityId)) {\n Card sourceCard = game.getCard(ability.getSourceId());\n if (sourceCard != null) {\n ability.getTargets().clear();\n FilterPlayer filter = new FilterPlayer(\"String_Node_Str\" + sourceCard.getIdName() + \"String_Node_Str\");\n filter.add(Predicates.not(new OwnerIdPredicate(sourceCard.getOwnerId())));\n ability.addTarget(new TargetPlayer(1, 1, false, filter));\n }\n }\n}\n"
|
"public Response createResponse() {\n PECoyoteResponse response = new PECoyoteResponse();\n response.setConnector(this);\n return response;\n}\n"
|
"public void testLogisticRegression() {\n String filename = LogisticRegressionTest.class.getResource(\"String_Node_Str\").getPath();\n TrainingData data = DataPreprocessing.parseLabeledDataFromCSVFile(filename);\n LogisticRegression classifier = new LogisticRegression(data.getData(), data.getLabels());\n classifier.train();\n double[] actualPredictionsProbabilities = classifier.predict(new double[][] { { 3, 14, 35, 51 }, { 3, 13, 35, 50 }, { 2, 16, 34, 48 }, { 2, 17, 34, 54 }, { 2, 15, 37, 53 }, { 19, 61, 28, 74 }, { 22, 58, 30, 65 }, { 19, 53, 27, 64 }, { 20, 50, 25, 57 }, { 24, 51, 28, 58 } });\n int[] actualPredictions = new int[actualPredictionsProbabilities.length];\n for (int i = 0; i < actualPredictions.length; i++) {\n actualPredictions[i] = actualPredictionsProbabilities[i] >= 0.5 ? 1 : 0;\n }\n int[] expectedPredictions = new int[] { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 };\n Assert.assertArrayEquals(expectedPredictions, actualPredictions);\n}\n"
|
"public static String createDataSetRowExpression(String rowName) {\n return DATASET_ROW_INDICATOR + \"String_Node_Str\" + (rowName == null ? \"String_Node_Str\" : rowName.trim()) + \"String_Node_Str\";\n}\n"
|
"public void close() throws IOException {\n super.close();\n isClosed = true;\n warmUpStrategy = NoWarmUpStrategy.INSTANCE;\n synchronized (consumerMonitor) {\n consumerMonitor.notifyAll();\n }\n debug(\"String_Node_Str\" + +inputStreamBuffer.size());\n debug(\"String_Node_Str\" + hasFinishedRead);\n debug(\"String_Node_Str\" + (!inputStreamBuffer.isEmpty() && !hasFinishedRead));\n while (!inputStreamBuffer.isEmpty() && !hasFinishedRead) {\n try {\n debug(\"String_Node_Str\" + inputStreamBuffer.size() + \"String_Node_Str\");\n synchronized (exhaustLock) {\n exhaustLock.wait();\n }\n throwLastFailure();\n debug(\"String_Node_Str\");\n } catch (InterruptedException e) {\n throw new RuntimeException(e);\n }\n }\n throwLastFailure();\n debug(\"String_Node_Str\");\n}\n"
|
"public Response execute() {\n int addedAnnotations;\n int defaultValueIndex = 0;\n DatabaseAccessor db = null;\n try {\n db = initDB();\n for (int i = 0; i < type.size(); i++) {\n if (type.get(i).equals(defaults)) {\n defaultValueIndex = i;\n break;\n }\n }\n if (type.size() == 1 && type.get(0).equals(\"String_Node_Str\")) {\n addedAnnotations = db.addFreeTextAnnotation(name, defaults, forced);\n } else {\n addedAnnotations = db.addDropDownAnnotation(name, type, defaultValueIndex, forced);\n }\n if (addedAnnotations != 0) {\n return new AddAnnotationFieldResponse(HttpStatusCode.CREATED);\n } else {\n return new ErrorResponse(HttpStatusCode.INTERNAL_SERVER_ERROR, \"String_Node_Str\" + name + \"String_Node_Str\");\n }\n } catch (SQLException e) {\n e.printStackTrace();\n if (e.getErrorCode() == 0) {\n return new ErrorResponse(HttpStatusCode.BAD_REQUEST, \"String_Node_Str\" + \"String_Node_Str\" + name + \"String_Node_Str\");\n } else {\n return new ErrorResponse(HttpStatusCode.SERVICE_UNAVAILABLE, e.getMessage());\n }\n } catch (IOException e) {\n e.printStackTrace();\n return new ErrorResponse(HttpStatusCode.BAD_REQUEST, e.getMessage());\n } finally {\n if (db != null) {\n db.close();\n }\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.