content
stringlengths
40
137k
"public int getAlignmentEnd() {\n if (getReadUnmappedFlag()) {\n return NO_ALIGNMENT_START;\n } else if (this.mAlignmentEnd == NO_ALIGNMENT_START) {\n this.mAlignmentEnd = mAlignmentStart + getCigar().getReferenceLength() - 1;\n }\n return this.mAlignmentEnd;\n}\n"
"public void consumeWorkerResults(Iterable<VarSelWorkerResult> workerResults) {\n int[] voteStats = new int[columnConfigList.size() + 1];\n for (VarSelWorkerResult workerResult : workerResults) {\n for (Integer columnId : workerResult.getColumnIdList()) {\n voteStats[columnId + 1]++;\n }\n }\n int maxVotedColumnId = -1;\n int maxVoteCount = Integer.MIN_VALUE;\n for (int i = 0; i < voteStats.length; i++) {\n if (voteStats[i] > maxVoteCount) {\n maxVoteCount = voteStats[i];\n maxVotedColumnId = i;\n }\n }\n LOG.info(\"String_Node_Str\", (maxVotedColumnId - 1), maxVoteCount);\n if (maxVotedColumnId > 0) {\n workingSet.add(maxVotedColumnId - 1);\n }\n}\n"
"public static void main(String[] args) throws Exception {\n Writer diffxResult = new StringWriter();\n try {\n XMLInputFactory inputFactory = XMLInputFactory.newInstance();\n String simplified = combineAdjacent(inputFactory.createXMLStreamReader(new FileInputStream(new File(\"String_Node_Str\"))));\n System.out.println(\"String_Node_Str\");\n } catch (Exception exc) {\n exc.printStackTrace();\n diffxResult = null;\n }\n}\n"
"public DirectBuffer writeShort(int byteIndex, short value) {\n view.setInt16(byteIndex, value, littleEndian);\n return this;\n}\n"
"private void pressRetreiveSchemaButton() {\n ConnectionStatus connectionStatus = checkConnection(false);\n if (!connectionStatus.getResult()) {\n tableSettingsInfoLabel.setText(connectionStatus.getMessageException());\n } else {\n boolean doit = true;\n if (tableEditorView.getMetadataEditor().getBeanCount() > 0) {\n doit = MessageDialog.openConfirm(getShell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"));\n }\n if (doit) {\n List<MetadataColumn> metadataColumns;\n try {\n HadoopOperationManager.getInstance().getDFS(getConnectionBean());\n metadataColumns = ExtractMetaDataFromHDFS.extractColumns(getConnection(), metadataTable);\n } catch (Exception e) {\n ExceptionHandler.process(e);\n return;\n }\n tableEditorView.getMetadataEditor().removeAll();\n List<MetadataColumn> metadataColumnsValid = new ArrayList<MetadataColumn>();\n Iterator iterate = metadataColumns.iterator();\n while (iterate.hasNext()) {\n MetadataColumn metadataColumn = (MetadataColumn) iterate.next();\n if (metadataColumn.getTalendType().equals(JavaTypesManager.DATE.getId()) || metadataColumn.getTalendType().equals(PerlTypesManager.DATE)) {\n if (\"String_Node_Str\".equals(metadataColumn.getPattern())) {\n metadataColumn.setPattern(TalendQuoteUtils.addQuotes(\"String_Node_Str\"));\n }\n }\n String columnLabel = metadataColumn.getLabel();\n metadataColumn.setLabel(tableEditorView.getMetadataEditor().getNextGeneratedColumnName(columnLabel));\n metadataColumnsValid.add(metadataColumn);\n }\n tableEditorView.getMetadataEditor().addAll(metadataColumnsValid);\n }\n }\n updateRetreiveSchemaButton();\n changeTableNavigatorStatus(checkFieldsValue());\n}\n"
"public boolean apply(Game game, Ability source) {\n MageObject sourceObject = source.getSourceObject(game);\n if (sourceObject != null) {\n SacrificeTargetCost cost = new SacrificeTargetCost(new TargetControlledCreaturePermanent());\n for (UUID playerId : game.getState().getPlayerList(source.getControllerId())) {\n cost.clearPaid();\n Player player = game.getPlayer(playerId);\n if (cost.canPay(source, source.getSourceId(), player.getId(), game) && player.chooseUse(outcome, \"String_Node_Str\" + spell.getIdName() + \"String_Node_Str\", source, game)) {\n if (cost.pay(source, game, source.getSourceId(), player.getId(), false)) {\n game.informPlayers(player.getLogName() + \"String_Node_Str\" + spell.getIdName() + \"String_Node_Str\");\n game.getStack().counter(spell.getId(), source.getSourceId(), game);\n }\n }\n }\n return true;\n }\n return false;\n}\n"
"public static void reloadPlugin() {\n ProjectKorra.log.info(\"String_Node_Str\");\n BendingReloadEvent event = new BendingReloadEvent();\n Bukkit.getServer().getPluginManager().callEvent(event);\n new AbilityModuleManager(plugin);\n DBConnection.host = plugin.getConfig().getString(\"String_Node_Str\");\n DBConnection.port = plugin.getConfig().getInt(\"String_Node_Str\");\n DBConnection.pass = plugin.getConfig().getString(\"String_Node_Str\");\n DBConnection.db = plugin.getConfig().getString(\"String_Node_Str\");\n DBConnection.user = plugin.getConfig().getString(\"String_Node_Str\");\n DBConnection.init();\n for (Player player : Bukkit.getOnlinePlayers()) {\n GeneralMethods.createBendingPlayer(player.getUniqueId(), player.getName());\n }\n}\n"
"public Object answer(InvocationOnMock invocation) throws Throwable {\n mCandidateShowsHint = false;\n return null;\n}\n"
"public void traverse() {\n FLASHPhaseConfiguration outerLoopConfiguration;\n if (config.isBinaryPhaseRequired()) {\n outerLoopConfiguration = config.getBinaryPhaseConfiguration();\n } else {\n outerLoopConfiguration = config.getLinearPhaseConfiguration();\n }\n checker.getHistory().setStorageStrategy(config.getSnapshotStorageStrategy());\n PriorityQueue<Integer> queue = new PriorityQueue<Integer>(solutionSpace.getTop().getLevel() + 1, strategy);\n Transformation bottom = solutionSpace.getBottom();\n Transformation top = solutionSpace.getTop();\n NodeChecker.Result result = checker.check(bottom);\n bottom.setProperty(solutionSpace.getPropertyForceSnapshot());\n bottom.setData(result);\n for (int level = bottom.getLevel(); level <= top.getLevel(); level++) {\n for (int transformation : getSortedUnprocessedNodes(level, outerLoopConfiguration.getTriggerSkip())) {\n if (config.isBinaryPhaseRequired()) {\n binarySearch(transformation, queue);\n } else {\n linearSearch(transformation);\n }\n }\n }\n computeUtilityForMonotonicMetrics(bottom);\n computeUtilityForMonotonicMetrics(top);\n bottom.setData(null);\n if (potentiallyInsufficientUtility != null) {\n potentiallyInsufficientUtility.clear();\n }\n}\n"
"private UndirectedEdgeImpl createPreviewUndirectedEdge(GraphImpl previewGraph, org.gephi.graph.api.Edge sourceEdge) {\n org.gephi.graph.api.EdgeData sourceEdgeData = sourceEdge.getEdgeData();\n org.gephi.graph.api.TextData sourceEdgeTextData = sourceEdgeData.getTextData();\n String label = sourceEdgeData.getLabel();\n if (sourceEdgeTextData != null && sourceEdgeTextData.getText() != null && sourceEdgeTextData.getText().isEmpty()) {\n label = sourceEdgeTextData.getText();\n }\n float labelSize = 1f;\n if (sourceEdgeTextData != null) {\n labelSize = sourceEdgeTextData.getSize();\n }\n UndirectedEdgeImpl previewEdge = new UndirectedEdgeImpl(previewGraph, sourceEdge, nodeMap.get(sourceEdge.getSource().getId()), nodeMap.get(sourceEdge.getTarget().getId()), label, labelSize);\n previewGraph.addUndirectedEdge(previewEdge);\n return previewEdge;\n}\n"
"public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) {\n LOG.error(\"String_Node_Str\", e.getCause());\n ChannelFuture future = Channels.future(ctx.getChannel());\n future.addListener(ChannelFutureListener.CLOSE);\n HttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.UNAUTHORIZED);\n Channels.write(ctx, future, response);\n}\n"
"public void drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass) {\n double previous = state.getSeriesRunningTotal();\n if (column == dataset.getColumnCount() - 1) {\n previous = 0.0;\n }\n double current = 0.0;\n Number n = dataset.getValue(row, column);\n if (n != null) {\n current = previous + n.doubleValue();\n }\n state.setSeriesRunningTotal(current);\n int categoryCount = getColumnCount();\n PlotOrientation orientation = plot.getOrientation();\n double rectX = 0.0;\n double rectY = 0.0;\n RectangleEdge rangeAxisLocation = plot.getRangeAxisEdge();\n double j2dy0 = rangeAxis.valueToJava2D(previous, dataArea, rangeAxisLocation);\n double j2dy1 = rangeAxis.valueToJava2D(current, dataArea, rangeAxisLocation);\n double valDiff = current - previous;\n if (j2dy1 < j2dy0) {\n double temp = j2dy1;\n j2dy1 = j2dy0;\n j2dy0 = temp;\n }\n double rectWidth = state.getBarWidth();\n double rectHeight = Math.max(getMinimumBarLength(), Math.abs(j2dy1 - j2dy0));\n Comparable seriesKey = dataset.getRowKey(row);\n Comparable categoryKey = dataset.getColumnKey(column);\n if (orientation == PlotOrientation.HORIZONTAL) {\n rectY = domainAxis.getCategorySeriesMiddle(categoryKey, seriesKey, dataset, getItemMargin(), dataArea, RectangleEdge.LEFT);\n rectX = j2dy0;\n rectHeight = state.getBarWidth();\n rectY = rectY - rectHeight / 2.0;\n rectWidth = Math.max(getMinimumBarLength(), Math.abs(j2dy1 - j2dy0));\n } else if (orientation == PlotOrientation.VERTICAL) {\n rectX = domainAxis.getCategorySeriesMiddle(categoryKey, seriesKey, dataset, getItemMargin(), dataArea, RectangleEdge.TOP);\n rectX = rectX - rectWidth / 2.0;\n rectY = j2dy0;\n }\n Rectangle2D bar = new Rectangle2D.Double(rectX, rectY, rectWidth, rectHeight);\n Paint seriesPaint;\n if (column == 0) {\n seriesPaint = getFirstBarPaint();\n } else if (column == categoryCount - 1) {\n seriesPaint = getLastBarPaint();\n } else {\n if (valDiff >= 0.0) {\n seriesPaint = getPositiveBarPaint();\n } else {\n seriesPaint = getLastBarPaint();\n }\n }\n if (getGradientPaintTransformer() != null && seriesPaint instanceof GradientPaint) {\n GradientPaint gp = (GradientPaint) seriesPaint;\n seriesPaint = getGradientPaintTransformer().transform(gp, bar);\n }\n g2.setPaint(seriesPaint);\n g2.fill(bar);\n if (isDrawBarOutline() && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {\n Stroke stroke = getItemOutlineStroke(row, column);\n Paint paint = getItemOutlinePaint(row, column);\n if (stroke != null && paint != null) {\n g2.setStroke(stroke);\n g2.setPaint(paint);\n g2.draw(bar);\n }\n }\n CategoryItemLabelGenerator generator = getItemLabelGenerator(row, column);\n if (generator != null && isItemLabelVisible(row, column)) {\n drawItemLabel(g2, dataset, row, column, plot, generator, bar, (valDiff < 0.0));\n }\n EntityCollection entities = state.getEntityCollection();\n if (entities != null) {\n addItemEntity(entities, dataset, row, column, bar);\n }\n}\n"
"private void sendSecondaryAssign() {\n try {\n VmInstance vm = VmInstances.lookup(super.getRequest().getInstanceId());\n if (!vm.getPartition().equals(this.address.getPartition())) {\n Partition partition = Partitions.lookupByName(vm.getPartition());\n ServiceConfiguration config = Partitions.lookupService(ClusterController.class, partition);\n AssignAddressType request = new AssignAddressType(this.address.getStateUuid(), this.address.getDisplayName(), vm.getPrivateAddress(), vm.getDisplayName());\n try {\n AsyncRequests.sendSync(config, request);\n } catch (Exception ex) {\n LOG.error(ex, ex);\n }\n }\n } catch (TerminatedInstanceException ex) {\n LOG.error(ex, ex);\n } catch (NoSuchElementException ex) {\n LOG.error(ex, ex);\n }\n}\n"
"public int getOrCreate(TransactionManager txManager, EntityIdGenerator idGenerator, PersistenceManager persistence, RelationshipTypeHolder relTypeHolder, String name) {\n try {\n int eventIdentifier = ((TxManager) txManager).getEventIdentifier();\n return receiver.receive(broker.getMaster().first().createRelationshipType(receiver.getSlaveContext(eventIdentifier), name));\n } catch (ZooKeeperException e) {\n receiver.newMaster(null, e);\n throw e;\n } catch (ComException e) {\n receiver.newMaster(null, e);\n throw e;\n }\n}\n"
"public ComputeImports computeCandidatesEx() {\n ComputeImports cache = (ComputeImports) info.getCachedValue(IMPORT_CANDIDATES_KEY);\n if (cache != null) {\n return cache;\n }\n boolean modules = false;\n if (info.getSourceVersion().compareTo(SourceVersion.RELEASE_9) <= 0) {\n if (info.getClasspathInfo().getClassPath(ClasspathInfo.PathKind.SOURCE).findResource(\"String_Node_Str\") != null) {\n modules = true;\n }\n }\n if (modules) {\n ClasspathInfo cpInfo = info.getClasspathInfo();\n ClasspathInfo extraInfo = ClasspathInfo.create(ClassPathSupport.createProxyClassPath(cpInfo.getClassPath(ClasspathInfo.PathKind.BOOT), cpInfo.getClassPath(ClasspathInfo.PathKind.MODULE_BOOT)), ClassPathSupport.createProxyClassPath(cpInfo.getClassPath(ClasspathInfo.PathKind.COMPILE), cpInfo.getClassPath(ClasspathInfo.PathKind.MODULE_COMPILE), cpInfo.getClassPath(ClasspathInfo.PathKind.MODULE_CLASS)), cpInfo.getClassPath(ClasspathInfo.PathKind.SOURCE));\n JavaSource src = JavaSource.create(extraInfo, info.getSnapshot().getSource().getFileObject());\n try {\n src.runUserActionTask(new Task<CompilationController>() {\n public void run(CompilationController parameter) throws Exception {\n allInfo = parameter;\n parameter.toPhase(JavaSource.Phase.RESOLVED);\n computeCandidates(Collections.<String>emptySet());\n }\n }, true);\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n } else {\n allInfo = info;\n computeCandidates(Collections.<String>emptySet());\n }\n info.putCachedValue(IMPORT_CANDIDATES_KEY, this, CacheClearPolicy.ON_CHANGE);\n return this;\n}\n"
"private void doUpdateViewFromModelInEventDispatchThread() {\n if (callConference.isEnded() || (callConference.getCallPeerCount() == 0)) {\n updateSettingsPanelInEventDispatchThread(true);\n return;\n }\n boolean isConference = isConference();\n boolean isVideo = CallManager.isVideoStreaming(callConference);\n CallPeer callPeer = null;\n boolean validateAndRepaint = false;\n if (callPanel != null) {\n boolean removeCallPanel;\n if (isConference) {\n if (callPanel instanceof BasicConferenceCallPanel) {\n if (isVideo) {\n removeCallPanel = !(callPanel instanceof VideoConferenceCallPanel);\n } else {\n removeCallPanel = (callPanel instanceof VideoConferenceCallPanel);\n }\n } else {\n removeCallPanel = true;\n }\n } else {\n if (callPanel instanceof OneToOneCallPanel) {\n if (callPeer == null) {\n List<CallPeer> callPeers = callConference.getCallPeers();\n if (!callPeers.isEmpty())\n callPeer = callPeers.get(0);\n }\n removeCallPanel = !((OneToOneCallPanel) callPanel).getCallPeer().equals(callPeer);\n } else {\n if ((callPanel instanceof BasicConferenceCallPanel) && ((BasicConferenceCallPanel) callPanel).hasDelayedCallPeers()) {\n removeCallPanel = false;\n } else {\n removeCallPanel = true;\n }\n }\n }\n if (removeCallPanel) {\n remove(callPanel);\n validateAndRepaint = true;\n try {\n ((CallRenderer) callPanel).dispose();\n } finally {\n callPanel = null;\n }\n }\n }\n if (callPanel == null) {\n if (isConference) {\n if (isVideo) {\n callPanel = new VideoConferenceCallPanel(this, callConference, uiVideoHandler);\n } else {\n callPanel = new AudioConferenceCallPanel(this, callConference);\n }\n } else {\n if (callPeer == null) {\n List<CallPeer> callPeers = callConference.getCallPeers();\n if (!callPeers.isEmpty())\n callPeer = callPeers.get(0);\n }\n if (callPeer != null) {\n callPanel = new OneToOneCallPanel(this, callPeer, uiVideoHandler);\n }\n }\n if (callPanel != null) {\n add(callPanel, BorderLayout.CENTER);\n validateAndRepaint = true;\n }\n }\n try {\n updateSettingsPanelInEventDispatchThread(false);\n } finally {\n if (validateAndRepaint) {\n if (isDisplayable()) {\n validate();\n repaint();\n } else\n doLayout();\n }\n }\n}\n"
"public boolean isRegistered(String player) {\n try {\n Util.Debug(\"String_Node_Str\");\n if (Config.script_name.equals(Config.script_name1)) {\n if (phpBB3.checkuser(player.toLowerCase())) {\n dupe = true;\n }\n } else if (Config.script_name.equals(Config.script_name2)) {\n if (SMF1.checkuser(player.toLowerCase())) {\n return true;\n }\n } else if (Config.script_name.equals(Config.script_name3)) {\n if (SMF2.checkuser(player.toLowerCase())) {\n return true;\n }\n } else if (Config.script_name.equals(Config.script_name4)) {\n if (myBB1_6.checkuser(player.toLowerCase())) {\n return true;\n }\n } else if (Config.script_name.equals(Config.script_name5)) {\n if (vB4_1.checkuser(player.toLowerCase())) {\n return true;\n }\n } else {\n Stop(\"String_Node_Str\");\n }\n Util.Debug(\"String_Node_Str\");\n } catch (SQLException e) {\n e.printStackTrace();\n Stop(\"String_Node_Str\");\n }\n return false;\n}\n"
"public static void main(String[] args) throws IOException {\n if (args.length != 6) {\n System.out.println(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n System.exit(1);\n }\n System.out.println(Arrays.toString(args));\n final EventScheduler scheduler = new EventScheduler();\n File tracesDir = new File(args[0]);\n if (!tracesDir.exists() || !tracesDir.isDirectory())\n throw new IllegalArgumentException(args[0] + \"String_Node_Str\");\n String placementPoliceName = args[1];\n Long timeBeforeSleep = Long.valueOf(args[2]);\n Integer replicationLevel = Integer.valueOf(args[3]);\n Long timeBeforeUpdateData = Long.valueOf(args[4]);\n Long timeBeforeDeleteData = Long.valueOf(args[5]);\n EventsGeneratedBySimulationQueue eventsGeneratedBySimulationQueue = new EventsGeneratedBySimulationQueue();\n Set<Machine> machines = createMachines(eventsGeneratedBySimulationQueue, tracesDir, timeBeforeSleep);\n Set<DataServer> dataServers = createDataServers(machines);\n DataPlacementAlgorithm placement = createPlacementPolice(placementPoliceName, dataServers);\n MetadataServer metadataServer = new MetadataServer(scheduler, placement, replicationLevel, timeBeforeDeleteData, timeBeforeUpdateData);\n Set<FileSystemClient> clients = createClients(scheduler, machines, metadataServer);\n MultipleEventSource multipleEventSource = createMultipleEventParser(clients, machines, tracesDir);\n EventInjector eventInjector = new EventInjector(scheduler, multipleEventSource);\n scheduler.registerObserver(eventInjector);\n eventInjector.injectNext();\n scheduler.start();\n System.out.println(Aggregator.getInstance().summarize());\n}\n"
"private void save() {\n try {\n log.info(\"String_Node_Str\");\n if (!getDataFolder().exists()) {\n getDataFolder().mkdirs();\n log.info(\"String_Node_Str\");\n }\n if (!new File(dataFile).exists()) {\n new File(dataFile).createNewFile();\n log.info(\"String_Node_Str\");\n } else {\n log.info(\"String_Node_Str\");\n InputStream is = new FileInputStream(dataFile);\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\n FileWriter fw = new FileWriter(dataFile);\n PrintWriter pw = new PrintWriter(fw);\n String strLine;\n while ((strLine = br.readLine()) != null) {\n if (!gods.contains(getServer().getPlayer(strLine)) && !godsRemoved.contains(getServer().getPlayer(strLine))) {\n gods.add(getServer().getPlayer(strLine));\n }\n }\n fw.close();\n is.close();\n }\n log.info(\"String_Node_Str\");\n FileWriter fw = new FileWriter(dataFile);\n PrintWriter pw = new PrintWriter(fw);\n for (int i = 0; i < gods.size(); i++) {\n if (gods.get(i) != null) {\n log.info(\"String_Node_Str\" + gods.get(i).getDisplayName());\n pw.println(gods.get(i).getDisplayName());\n }\n }\n fw.close();\n log.info(\"String_Node_Str\");\n } catch (Exception e) {\n e.printStackTrace();\n log.severe(\"String_Node_Str\");\n }\n}\n"
"private void listenPreviewUpdate() {\n try {\n if (null != mVideoCapturer) {\n Field field = mVideoCapturer.getClass().getDeclaredField(\"String_Node_Str\");\n field.setAccessible(true);\n Camera camera = (Camera) field.get(mVideoCapturer);\n if (null != camera) {\n try {\n Camera.CameraInfo info = new android.hardware.Camera.CameraInfo();\n Camera.getCameraInfo(mCameraInUse == CAMERA_TYPE_FRONT ? android.hardware.Camera.CameraInfo.CAMERA_FACING_FRONT : android.hardware.Camera.CameraInfo.CAMERA_FACING_BACK, info);\n final int cameraOrientation = info.orientation;\n camera.setPreviewCallbackWithBuffer(new Camera.PreviewCallback() {\n\n public void onPreviewFrame(byte[] data, Camera camera) {\n onPreviewFrameUpdate(camera, cameraOrientation);\n ((VideoCapturerAndroid) mVideoCapturer).onPreviewFrame(data, camera);\n }\n });\n onPreviewFrameUpdate(camera, cameraOrientation);\n } else {\n Log.e(LOG_TAG, \"String_Node_Str\");\n }\n }\n } catch (Exception e) {\n Log.e(LOG_TAG, \"String_Node_Str\" + e.getMessage());\n }\n}\n"
"public boolean placeContent(LegendItemHints lih) throws ChartException {\n if (lih.getType() == LegendItemHints.Type.LG_SEPERATOR) {\n if (bIsLeftRight) {\n flushColumnList();\n dX += dSepThick;\n lih.left(dX - dSepThick * 0.5);\n lih.itemHeight(dMaxH);\n } else {\n dY += dSepThick;\n lih.left(dX);\n lih.top(dY - dSepThick * 0.5);\n lih.width(dMaxW - lgData.dHorizontalSpacing);\n }\n columnList.add(lih);\n return true;\n } else {\n Point size = computeContentSize(lih);\n return placeContentWithSize(lih, size);\n }\n}\n"
"protected void handleAccountDisconnected(RosterUserAccount account) {\n removeAllRosterEntriesForAccount(account);\n disposeAllChatWindowsForAccount(account, \"String_Node_Str\");\n removeAccount(account.getServiceID());\n if (accounts.size() == 0)\n setToolbarEnabled(false);\n}\n"
"public boolean removeWeeds(World world, int x, int y, int z, ItemStack rake) {\n if (!ConfigurationHandler.enableWeeds) {\n return false;\n }\n TileEntity te = world.getTileEntity(x, y, z);\n if (te instanceof TileEntityCrop) {\n TileEntityCrop crop = (TileEntityCrop) te;\n if (!crop.hasWeed()) {\n return false;\n }\n return ((IRake) rake.getItem()).removeWeeds(crop, rake);\n }\n return false;\n}\n"
"public void compute(ActionRequest request, ActionResponse response) throws AxelorException {\n PurchaseOrderLine purchaseOrderLine = request.getContext().asType(PurchaseOrderLine.class);\n BigDecimal exTaxTotal = BigDecimal.ZERO;\n BigDecimal companyExTaxTotal = BigDecimal.ZERO;\n BigDecimal inTaxTotal = BigDecimal.ZERO;\n BigDecimal companyInTaxTotal = BigDecimal.ZERO;\n BigDecimal priceDiscounted = BigDecimal.ZERO;\n if (purchaseOrderLine.getTaxLine() == null) {\n throw new AxelorException(String.format(I18n.get(IExceptionMessage.PURCHASE_ORDER_LINE_TAX_LINE)), IException.CONFIGURATION_ERROR);\n }\n try {\n if (!request.getContext().getParentContext().asType(PurchaseOrder.class).getInAti()) {\n if (purchaseOrderLine.getPrice() != null && purchaseOrderLine.getQty() != null) {\n exTaxTotal = PurchaseOrderLineServiceImpl.computeAmount(purchaseOrderLine.getQty(), purchaseOrderLineService.computeDiscount(purchaseOrderLine));\n inTaxTotal = exTaxTotal.add(exTaxTotal.multiply(purchaseOrderLine.getTaxLine().getValue()));\n priceDiscounted = purchaseOrderLineService.computeDiscount(purchaseOrderLine).setScale(GeneralService.getNbDecimalDigitForUnitPrice(), RoundingMode.HALF_UP);\n }\n if (exTaxTotal != null) {\n PurchaseOrder purchaseOrder = purchaseOrderLine.getPurchaseOrder();\n if (purchaseOrder == null) {\n purchaseOrder = request.getContext().getParentContext().asType(PurchaseOrder.class);\n }\n if (purchaseOrder != null) {\n companyExTaxTotal = purchaseOrderLineService.getCompanyExTaxTotal(exTaxTotal, purchaseOrder);\n companyInTaxTotal = companyExTaxTotal.add(companyExTaxTotal.multiply(purchaseOrderLine.getTaxLine().getValue()));\n response.setValue(\"String_Node_Str\", purchaseOrderLineService.getMinSalePrice(purchaseOrder, purchaseOrderLine));\n response.setValue(\"String_Node_Str\", purchaseOrderLineService.getSalePrice(purchaseOrder, purchaseOrderLine.getPrice()));\n }\n }\n response.setValue(\"String_Node_Str\", exTaxTotal);\n response.setValue(\"String_Node_Str\", inTaxTotal);\n response.setValue(\"String_Node_Str\", companyExTaxTotal);\n response.setValue(\"String_Node_Str\", companyInTaxTotal);\n response.setValue(\"String_Node_Str\", priceDiscounted);\n } else {\n if (purchaseOrderLine.getPrice() != null && purchaseOrderLine.getQty() != null) {\n inTaxTotal = PurchaseOrderLineServiceImpl.computeAmount(purchaseOrderLine.getQty(), purchaseOrderLineService.computeDiscount(purchaseOrderLine));\n exTaxTotal = inTaxTotal.divide(purchaseOrderLine.getTaxLine().getValue().add(new BigDecimal(1)), 2, BigDecimal.ROUND_HALF_UP);\n priceDiscounted = purchaseOrderLineService.computeDiscount(purchaseOrderLine);\n }\n if (inTaxTotal != null) {\n PurchaseOrder purchaseOrder = purchaseOrderLine.getPurchaseOrder();\n if (purchaseOrder == null) {\n purchaseOrder = request.getContext().getParentContext().asType(PurchaseOrder.class);\n }\n if (purchaseOrder != null) {\n companyInTaxTotal = purchaseOrderLineService.getCompanyExTaxTotal(inTaxTotal, purchaseOrder);\n companyExTaxTotal = companyInTaxTotal.divide(purchaseOrderLine.getTaxLine().getValue().add(new BigDecimal(1)), 2, BigDecimal.ROUND_HALF_UP);\n response.setValue(\"String_Node_Str\", purchaseOrderLineService.getMinSalePrice(purchaseOrder, purchaseOrderLine));\n response.setValue(\"String_Node_Str\", purchaseOrderLineService.getSalePrice(purchaseOrder, purchaseOrderLine.getPrice()));\n }\n }\n response.setValue(\"String_Node_Str\", exTaxTotal);\n response.setValue(\"String_Node_Str\", inTaxTotal);\n response.setValue(\"String_Node_Str\", companyInTaxTotal);\n response.setValue(\"String_Node_Str\", companyExTaxTotal);\n response.setValue(\"String_Node_Str\", priceDiscounted);\n }\n } catch (Exception e) {\n response.setFlash(e.getMessage());\n }\n}\n"
"public Collection<Long> getDomainQuota() {\n User currentUser = authenticationService.getCurrentUser();\n DomainConfiguration domainConfiguration = domainConfigurationRepository.findDomainConfigurationByDomain(currentUser.getDomain());\n Long domainQuota = domainConfiguration.getStorageSizeAsLong();\n Long userQuota = currentUser.getAttachmentsSize();\n int quota = Math.round((userQuota * 100) / domainQuota);\n Collection<Integer> taux = new ArrayList<Integer>();\n taux.add(quota);\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + domainQuota);\n }\n return globalDomainQuota;\n}\n"
"static public void sendHal(HttpServerExchange exchange, RequestContext context, List<DBObject> embeddedData, long size) throws IllegalQueryParamenterException {\n String requestPath = URLUtils.removeTrailingSlashes(context.getMappedRequestUri());\n String queryString = exchange.getQueryString() == null || exchange.getQueryString().isEmpty() ? \"String_Node_Str\" : \"String_Node_Str\" + URLUtils.decodeQueryString(exchange.getQueryString());\n Representation rep = new Representation(requestPath + queryString);\n rep.addProperty(\"String_Node_Str\", context.getType().name());\n if (size >= 0) {\n rep.addProperty(\"String_Node_Str\", size);\n }\n if (embeddedData != null) {\n long count = embeddedData.stream().filter((props) -> props.keySet().stream().anyMatch((k) -> k.equals(\"String_Node_Str\") || k.equals(\"String_Node_Str\"))).count();\n rep.addProperty(\"String_Node_Str\", count);\n if (!embeddedData.isEmpty()) {\n embeddedDocuments(embeddedData, requestPath, rep);\n }\n }\n if (context.isParentAccessible()) {\n if (context.getCollectionName().endsWith(RequestContext.FS_FILES_SUFFIX)) {\n rep.addLink(new Link(\"String_Node_Str\", URLUtils.getParentPath(requestPath)));\n } else {\n rep.addLink(new Link(\"String_Node_Str\", URLUtils.getParentPath(requestPath)));\n }\n }\n rep.addLink(new Link(\"String_Node_Str\", requestPath));\n rep.addLink(new Link(\"String_Node_Str\", \"String_Node_Str\", Configuration.RESTHEART_ONLINE_DOC_URL + \"String_Node_Str\", true), true);\n exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, HAL_JSON_MEDIA_TYPE);\n exchange.getResponseSender().send(rep.toString());\n}\n"
"public void bindByTokenNewSubscription() {\n Product prod = TestUtil.createProduct();\n productCurator.create(prod);\n Subscription sub = TestUtil.createSubscription(owner, prod);\n SubscriptionToken token = TestUtil.createSubscriptionToken();\n token.setSubscription(sub);\n subCurator.create(sub);\n subTokenCurator.create(token);\n assertEquals(0, poolCurator.listByOwnerAndProduct(owner, prod.getId()).size());\n consumerResource.bind(consumer.getUuid(), null, token.getToken(), null, 1, null, null);\n assertEquals(1, poolCurator.listByOwnerAndProduct(owner, prod.getId()).size());\n}\n"
"public void print(Agent agent, Printer printer) throws IOException {\n final PredefinedSymbols predefinedSyms = Adaptables.adapt(agent, PredefinedSymbols.class);\n if (object) {\n for (Slot s = id.slots; s != null; s = s.next) {\n if (s.attr == predefinedSyms.operator_symbol)\n printer.print(\"String_Node_Str\", s.id, s.attr);\n else\n printer.print(\"String_Node_Str\", s.id, s.attr);\n for (PreferenceType pt : PreferenceType.values()) {\n if (s.getPreferencesByType(pt) != null) {\n if (s.isa_context_slot)\n printer.print(\"String_Node_Str\", pt.getDisplayName());\n for (Preference p = s.getPreferencesByType(pt); p != null; p = p.next) {\n print_preference_and_source(agent, printer, p);\n }\n }\n }\n }\n if (id.goalInfo != null && id.goalInfo.getImpasseWmes() != null)\n printer.print(\"String_Node_Str\", id);\n for (WmeImpl w = id.goalInfo != null ? id.goalInfo.getImpasseWmes() : null; w != null; w = w.next) {\n printer.print(\"String_Node_Str\", w);\n }\n if (id.getInputWmes() != null)\n printer.print(\"String_Node_Str\", id);\n for (WmeImpl w = id.getInputWmes(); w != null; w = w.next) {\n printer.print(\"String_Node_Str\", w);\n }\n return;\n } else if (!id.isGoal() && attr == null) {\n for (Wme w : agent.getAllWmesInRete()) {\n if (w.getValue() == id) {\n if (w.getValue() == predefinedSyms.operator_symbol)\n printer.print(\"String_Node_Str\");\n else\n printer.print(\"String_Node_Str\");\n printer.print(\"String_Node_Str\", w.getTimetag(), w.getIdentifier(), w.getAttribute(), w.getValue());\n Iterator<Preference> it = w.getPreferences();\n if (!it.hasNext()) {\n printer.print(\"String_Node_Str\");\n } else {\n while (it.hasNext()) {\n print_preference_and_source(agent, printer, it.next());\n }\n }\n }\n }\n return;\n }\n Slot s = Slot.find_slot(id, attr);\n if (s == null) {\n printer.print(\"String_Node_Str\", id, attr);\n return;\n }\n printer.print(\"String_Node_Str\", id, attr);\n for (PreferenceType pt : PreferenceType.values()) {\n if (s.getPreferencesByType(pt) != null) {\n printer.print(\"String_Node_Str\", pt.getDisplayName());\n for (Preference p = s.getPreferencesByType(pt); p != null; p = p.next) {\n print_preference_and_source(agent, printer, p);\n }\n }\n }\n if (id.isGoal() && attr.toString().equals(\"String_Node_Str\")) {\n final ByRef<Preference> cand = ByRef.create(null);\n final Decider decider = Adaptables.adapt(agent, Decider.class);\n ImpasseType impasse_type = decider.run_preference_semantics(s, cand, true);\n if ((impasse_type == ImpasseType.NONE) && cand.value != null) {\n printer.print(\"String_Node_Str\");\n int count = 0;\n double total_probability = 0;\n final Exploration exploration = Adaptables.adapt(agent, Exploration.class);\n for (Preference p = cand.value; p != null; p = p.next_candidate) {\n exploration.exploration_compute_value_of_candidate(p, s, 0);\n ++count;\n if (p.numeric_value > 0)\n total_probability += p.numeric_value;\n }\n assert (count != 0);\n for (Preference p = cand.value; p != null; p = p.next_candidate) {\n double prob = total_probability > 0.0 ? p.numeric_value / total_probability : 1.0 / count;\n print_preference_and_source(agent, printer, p, prob);\n }\n }\n }\n}\n"
"private Metadatum getDcValueFromCSV(String language, String schema, String element, String qualifier, String value, AuthorityValue fromAuthority) {\n Metadatum dcv = new Metadatum();\n dcv.schema = schema;\n dcv.element = element;\n dcv.qualifier = qualifier;\n dcv.language = language;\n if (fromAuthority != null) {\n if (value.indexOf(':') > 0) {\n value = value.substring(0, value.indexOf(':'));\n }\n AuthorityValue example = fromAuthority.newInstance(value);\n List<AuthorityValue> byValue = authorityValueFinder.findByValue(c, schema, element, qualifier, example.getValue());\n AuthorityValue authorityValue = null;\n if (byValue.isEmpty()) {\n String toGenerate = fromAuthority.generateString() + value;\n String field = schema + \"String_Node_Str\" + element + (StringUtils.isNotBlank(qualifier) ? \"String_Node_Str\" + qualifier : \"String_Node_Str\");\n authorityValue = AuthorityValueGenerator.generate(toGenerate, value, field);\n dcv.authority = toGenerate;\n } else {\n authorityValue = byValue.get(0);\n dcv.authority = authorityValue.getId();\n }\n dcv.value = authorityValue.getValue();\n dcv.confidence = Choices.CF_ACCEPTED;\n } else if (value == null || !value.contains(DSpaceCSV.authoritySeparator)) {\n simplyCopyValue(value, dcv);\n } else {\n String[] parts = value.split(DSpaceCSV.escapedAuthoritySeparator);\n dcv.value = parts[0];\n dcv.authority = parts[1];\n dcv.confidence = (parts.length > 2 ? Integer.valueOf(parts[2]) : Choices.CF_ACCEPTED);\n }\n return dcv;\n}\n"
"private void createExpressionCell(Composite parent, String label) {\n ControlProvider.createLabel(parent, label);\n defaultValueComposite = ControlProvider.getDefaultComposite(parent);\n defaultValueString = Utility.getNonNullString(structureHandle.getDefaultValue());\n defaultValue = ControlProvider.createText(defaultValueComposite, defaultValueString);\n defaultValue.setLayoutData(ControlProvider.getGridDataWithHSpan(1));\n defaultValue.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent e) {\n if (defaultValue.isEnabled()) {\n validateSyntax();\n }\n }\n });\n SelectionAdapter listener = new SelectionAdapter() {\n public void widgetSelected(SelectionEvent event) {\n ExpressionBuilder expressionBuilder = new ExpressionBuilder(defaultValue.getText());\n expressionBuilder.setExpressionProvier(null);\n if (expressionBuilder.open() == OK) {\n defaultValue.setText(expressionBuilder.getResult().trim());\n }\n }\n };\n ExpressionProvider provider = new ExpressionProvider((DataSetHandle) getContainer().getModel());\n ExpressionButtonUtil.createExpressionButton(defaultValueComposite, defaultValue, provider, (DataSetHandle) getContainer().getModel(), true, SWT.PUSH);\n ExpressionButtonUtil.initExpressionButtonControl(defaultValue, structureHandle, DataSetParameter.DEFAULT_VALUE_MEMBER);\n}\n"
"public String associateAddress(NodeMetadata node) {\n IaasProvider iaasInfo = getIaasProvider();\n ComputeServiceContext context = iaasInfo.getComputeService().getContext();\n CloudStackApi cloudStackApi = context.unwrapApi(CloudStackApi.class);\n String ip = null;\n ListPublicIPAddressesOptions listPublicIPAddressesOptions = new ListPublicIPAddressesOptions();\n listPublicIPAddressesOptions.zoneId(iaasInfo.getProperty(CloudControllerConstants.AVAILABILITY_ZONE));\n Set<PublicIPAddress> publicIPAddresses = cloudStackApi.getAddressApi().listPublicIPAddresses(listPublicIPAddressesOptions);\n String id = node.getProviderId();\n for (PublicIPAddress publicIPAddress : publicIPAddresses) {\n if (publicIPAddress.getVirtualMachineId().equals(id)) {\n ip = publicIPAddress.getIPAddress();\n log.info(\"String_Node_Str\" + ip + \"String_Node_Str\" + node.getId());\n break;\n }\n }\n if (ip == null || ip.isEmpty()) {\n String msg = \"String_Node_Str\" + node.getId();\n log.debug(msg);\n throw new CloudControllerException(msg);\n }\n return ip;\n}\n"
"public PacketExtension parseExtension(XmlPullParser parser) throws Exception {\n Date stamp = null;\n try {\n synchronized (DelayInformation.UTC_FORMAT) {\n stamp = DelayInformation.UTC_FORMAT.parse(parser.getAttributeValue(\"String_Node_Str\", \"String_Node_Str\"));\n }\n } catch (ParseException e) {\n try {\n stamp = DelayInformation.NEW_UTC_FORMAT.parse(parser.getAttributeValue(\"String_Node_Str\", \"String_Node_Str\"));\n } catch (ParseException e1) {\n SimpleDateFormat formatter = new SimpleDateFormat(\"String_Node_Str\");\n formatter.setTimeZone(TimeZone.getTimeZone(\"String_Node_Str\"));\n stamp = formatter.parse(parser.getAttributeValue(\"String_Node_Str\", \"String_Node_Str\"));\n }\n }\n DelayInformation delayInformation = new DelayInformation(stamp);\n delayInformation.setFrom(parser.getAttributeValue(\"String_Node_Str\", \"String_Node_Str\"));\n delayInformation.setReason(parser.nextText());\n return delayInformation;\n}\n"
"public boolean isRPCServerRunning() {\n synchronized (this) {\n return isRunning;\n }\n}\n"
"public String caseTextValue(TextValue object) {\n return object.getValue();\n}\n"
"public ActionInvoking get(String path) {\n PathInfo<ActionInvoker> info = root.get(path);\n String[] args = Strings.splitIgnoreBlank(info.getRemain(), \"String_Node_Str\");\n return new ActionInvoking(info, args);\n}\n"
"public void commit() {\n if (visible) {\n if (label == null) {\n label = new TextLabel2D(displayName, foregroundColor, backgroundColor, height, true, font);\n label.setLocalTranslation(0, heightAbove, 0);\n Matrix3f rot = new Matrix3f();\n rot.fromAngleAxis((float) Math.PI, new Vector3f(0f, 1f, 0f));\n label.setLocalRotation(rot);\n attachChild(label);\n } else {\n label.setText(displayName, foregroundColor, backgroundColor);\n }\n ClientContextJME.getWorldManager().addToUpdateList(NameTagNode.this);\n }\n}\n"
"public void render(Component comp, Writer out) throws IOException {\n final Groupbox self = (Groupbox) comp;\n final Caption caption = self.getCaption();\n final String uuid = self.getUuid();\n final Execution exec = Executions.getCurrent();\n out.write(\"String_Node_Str\");\n out.write(uuid);\n out.write(\"String_Node_Str\");\n out.write(self.getOuterAttrs());\n out.write(self.getInnerAttrs());\n out.write(\"String_Node_Str\");\n if (caption != null) {\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n caption.redraw(out);\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n }\n String gcExtStyle = \"String_Node_Str\";\n if (caption != null) {\n gcExtStyle += \"String_Node_Str\";\n }\n final String cs = self.getContentStyle();\n if (cs != null) {\n gcExtStyle += cs;\n }\n out.write(\"String_Node_Str\");\n out.write(uuid);\n out.write(\"String_Node_Str\");\n if (self.isOpen()) {\n } else {\n out.write(\"String_Node_Str\");\n }\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n out.write(uuid);\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n out.write(self.getContentSclass());\n out.write(\"String_Node_Str\");\n if (gcExtStyle.length() > 0) {\n out.write(\"String_Node_Str\");\n out.write(gcExtStyle);\n out.write('\"');\n }\n out.write(\"String_Node_Str\");\n for (Iterator it = self.getChildren().iterator(); it.hasNext(); ) {\n final Component child = (Component) it.next();\n if (child != caption)\n child.redraw(out);\n }\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n out.write(self.getUuid());\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n out.write(exec.encodeURL(\"String_Node_Str\"));\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n out.write(\"String_Node_Str\");\n}\n"
"protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {\n String valueStr = value.toString();\n if (valueStr == null || valueStr.length() == 0 || valueStr.trim().length() == 0) {\n LOG.warn(\"String_Node_Str\");\n return;\n }\n double[] dValues = null;\n if (correlation == Correlation.Pearson) {\n if (!this.dataPurifier.isFilterOut(valueStr)) {\n return;\n }\n dValues = getDoubleArrayByRawArray(CommonUtils.split(valueStr, this.dataSetDelimiter));\n } else if (correlation == Correlation.NormPearson) {\n dValues = getDoubleArray(CommonUtils.split(valueStr, Constants.DEFAULT_DELIMITER));\n }\n count += 1L;\n if (count % 2000L == 0) {\n LOG.info(\"String_Node_Str\", count, Thread.currentThread().getName());\n }\n for (int i = 0; i < this.columnConfigList.size(); i++) {\n ColumnConfig columnConfig = this.columnConfigList.get(i);\n if (columnConfig.getColumnFlag() == ColumnFlag.Meta) {\n continue;\n }\n CorrelationWritable cw = this.correlationMap.get(i);\n if (cw == null) {\n cw = new CorrelationWritable();\n this.correlationMap.put(i, cw);\n }\n cw.setColumnIndex(i);\n cw.setCount(cw.getCount() + 1d);\n cw.setSum(cw.getSum() + dValues[i]);\n double squaredSum = dValues[i] * dValues[i];\n cw.setSumSquare(cw.getSumSquare() + squaredSum);\n double[] xySum = cw.getXySum();\n if (xySum == null) {\n xySum = new double[this.columnConfigList.size()];\n cw.setXySum(xySum);\n }\n double[] xxSum = cw.getXxSum();\n if (xxSum == null) {\n xxSum = new double[this.columnConfigList.size()];\n cw.setXxSum(xxSum);\n }\n double[] yySum = cw.getYySum();\n if (yySum == null) {\n yySum = new double[this.columnConfigList.size()];\n cw.setYySum(yySum);\n }\n double[] adjustCount = cw.getAdjustCount();\n if (adjustCount == null) {\n adjustCount = new double[this.columnConfigList.size()];\n cw.setAdjustCount(adjustCount);\n }\n double[] adjustSum = cw.getAdjustSum();\n if (adjustSum == null) {\n adjustSum = new double[this.columnConfigList.size()];\n cw.setAdjustSum(adjustSum);\n }\n double[] adjustSumSquare = cw.getAdjustSumSquare();\n if (adjustSumSquare == null) {\n adjustSumSquare = new double[this.columnConfigList.size()];\n cw.setAdjustSumSquare(adjustSumSquare);\n }\n for (int j = 0; j < this.columnConfigList.size(); j++) {\n ColumnConfig otherColumnConfig = this.columnConfigList.get(j);\n if (otherColumnConfig.getColumnFlag() == ColumnFlag.Meta) {\n continue;\n }\n if (i > j && !this.isComputeAll) {\n continue;\n }\n if (dValues[i] != Double.MIN_VALUE && dValues[j] != Double.MIN_VALUE) {\n xySum[j] += dValues[i] * dValues[j];\n xxSum[j] += squaredSum;\n yySum[j] += dValues[j] * dValues[j];\n adjustCount[j] += 1d;\n adjustSum[j] += dValues[i];\n adjustSumSquare[j] += squaredSum;\n }\n }\n }\n}\n"
"private void adjustCameraParameters() {\n mPreview.setTruePreviewSize(getPreviewResolution().getWidth(), getPreviewResolution().getHeight());\n mCameraParameters.setPreviewSize(getPreviewResolution().getWidth(), getPreviewResolution().getHeight());\n mCameraParameters.setPictureSize(getCaptureResolution().getWidth(), getCaptureResolution().getHeight());\n int rotation = (calculateCameraRotation(mDisplayOrientation) + (mFacing == CameraKit.Constants.FACING_FRONT ? 180 : 0)) % 360;\n mCameraParameters.setRotation(rotation);\n setFocus(mFocus);\n setFlash(mFlash);\n mCamera.setParameters(mCameraParameters);\n}\n"
"public int getNumberOfIndices() {\n return identifierToIndexMap.size();\n}\n"
"private void setupWebViewDrawer() {\n updateWebViewDrawerPosition();\n mLinkLayout.setTranslateDirection(ReboundRevealRelativeLayout.TRANSLATE_DIRECTION_VERTICAL);\n if (!UserPreferenceManager.isExternalBrowserEnabled(getActivity())) {\n mLinkLayout.setOpen(mWasLinkLayoutOpen || (UserPreferenceManager.showLinkFirst(getActivity())));\n }\n final ProgressBar webProgressBar = (ProgressBar) mLinkLayout.findViewById(R.id.web_progress_bar);\n mCloseLink.setOnClickListener(view -> mLinkLayout.setOpen(false));\n mWebView.setVisibility(View.INVISIBLE);\n webProgressBar.setVisibility(View.VISIBLE);\n WebSettings webSettings = mWebView.getSettings();\n webSettings.setLoadWithOverviewMode(true);\n webSettings.setUseWideViewPort(true);\n webSettings.setSupportZoom(true);\n webSettings.setBuiltInZoomControls(true);\n webSettings.setDisplayZoomControls(false);\n webSettings.setJavaScriptEnabled(true);\n mWebView.setWebViewClient(new WebViewClient() {\n public void onPageFinished(WebView view, String url) {\n super.onPageFinished(view, url);\n mWebView.setVisibility(View.VISIBLE);\n webProgressBar.setVisibility(View.GONE);\n }\n });\n mWebView.setWebChromeClient(new WebChromeClient() {\n public void onProgressChanged(WebView view, int newProgress) {\n super.onProgressChanged(view, newProgress);\n webProgressBar.setMax(100);\n webProgressBar.setProgress(newProgress);\n }\n });\n mWebView.setOnScrollChangedCallback(this);\n mWebBack.setOnClickListener(view -> {\n if (mWebView.canGoBack()) {\n mWebView.goBack();\n }\n });\n mWebForward.setOnClickListener(view -> {\n if (mWebView.canGoForward()) {\n mWebView.goForward();\n }\n });\n}\n"
"public void mouseReleased(MouseEvent event) {\n if (dragRectangle != null) {\n if (!isSorted(sourceComponents, new YComparator())) {\n Collections.sort(sourceComponents, new YComparator());\n mapping.setSourceItems(getItemsList(sourceComponents));\n }\n if (!isSorted(cdmComponents, new YComparator())) {\n Collections.sort(cdmComponents, new YComparator());\n mapping.setTargetItems(getItemsList(cdmComponents));\n }\n dragRectangle = null;\n layoutItems();\n } else if (dragArrow != null) {\n if (event.getX() > targetX - ARROW_START_WIDTH && event.getX() < targetX + ITEM_WIDTH)\n for (LabeledRectangle component : getVisibleRectangles(targetComponents)) {\n if (component.contains(event.getPoint(), ARROW_START_WIDTH, 0)) {\n dragArrow.setTarget(component);\n if (dragArrow.getTarget() == dragArrowPreviousTarget) {\n arrows.add(dragArrow);\n break;\n }\n makeMapSourceToTarget(dragArrow.getSource(), dragArrow.getTarget());\n break;\n }\n }\n if (dragArrowPreviousTarget != null && dragArrow.getTarget() != dragArrowPreviousTarget) {\n mapping.removeSourceToTargetMap(dragArrow.getSource().getItem(), dragArrowPreviousTarget.getItem());\n }\n dragArrowPreviousTarget = null;\n dragArrow = null;\n }\n repaint();\n}\n"
"private void process(Runnable task) {\n try {\n task.run();\n } catch (Throwable e) {\n OutOfMemoryErrorDispatcher.inspectOutOfMemoryError(e);\n logger.severe(getName() + \"String_Node_Str\" + task, e);\n }\n}\n"
"public Optional<String> getValueAsString() {\n if (getValue().isPresent()) {\n return Optional.of(new String(BaseEncoding.base64().decode(getValue().get())));\n } else {\n return Optional.absent();\n }\n}\n"
"public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.fragment_ateneo, container, false);\n mPager = (ViewPager) rootView.findViewById(R.id.pager);\n mAdapter = new AteneoFragmentAdapter(getChildFragmentManager());\n mPager.setAdapter(mAdapter);\n TitlePageIndicator titleIndicator = (TitlePageIndicator) rootView.findViewById(R.id.titles);\n titleIndicator.setViewPager(mPager);\n titleIndicator.setCurrentItem(1);\n return rootView;\n}\n"
"private static void countReadsInFeatures(final File samFile, final InputStream gffFile, final File outFile, final StrandUsage stranded, final OverlapMode overlapMode, final String featureType, final String attributeId, final boolean quiet, final int minAverageQual, final File samOutFile, Reporter reporter, String counterGroup) throws EoulsanException, IOException, BadBioEntryException {\n final GenomicArray<String> features = new GenomicArray<String>();\n final Map<String, Integer> counts = Utils.newHashMap();\n Writer writer = new FileWriter(outFile);\n boolean pairedEnd = false;\n final GFFReader gffReader = new GFFReader(gffFile);\n for (final GFFEntry gff : gffReader) {\n if (featureType.equals(gff.getType())) {\n final String featureId = gff.getAttributeValue(attributeId);\n if (featureId == null)\n throw new EoulsanException(\"String_Node_Str\" + featureType + \"String_Node_Str\" + attributeId + \"String_Node_Str\");\n if ((stranded == StrandUsage.YES || stranded == StrandUsage.REVERSE) && '.' == gff.getStrand())\n throw new EoulsanException(\"String_Node_Str\" + featureType + \"String_Node_Str\" + \"String_Node_Str\");\n features.addEntry(new GenomicInterval(gff, stranded.isSaveStrandInfo()), featureId);\n counts.put(featureId, 0);\n }\n }\n gffReader.throwException();\n gffReader.close();\n if (counts.size() == 0)\n throw new EoulsanException(\"String_Node_Str\" + featureType + \"String_Node_Str\");\n List<GenomicInterval> ivSeq = new ArrayList<GenomicInterval>();\n final SAMFileReader inputSam = new SAMFileReader(samFile);\n final SAMFileReader input = new SAMFileReader(samFile);\n SAMRecordIterator samIterator = input.iterator();\n SAMRecord firstRecord = samIterator.next();\n if (firstRecord.getReadPairedFlag())\n pairedEnd = true;\n input.close();\n int empty = 0;\n int ambiguous = 0;\n int notaligned = 0;\n int lowqual = 0;\n int nonunique = 0;\n int i = 0;\n SAMRecord sam1 = null, sam2 = null;\n for (final SAMRecord samRecord : inputSam) {\n reporter.incrCounter(counterGroup, ExpressionCounters.TOTAL_ALIGNMENTS_COUNTER.counterName(), 1);\n i++;\n if (i % 1000000 == 0)\n System.out.println(i + \"String_Node_Str\");\n if (!pairedEnd) {\n ivSeq.clear();\n if (samRecord.getReadUnmappedFlag()) {\n notaligned++;\n reporter.incrCounter(counterGroup, ExpressionCounters.ELIMINATED_READS_COUNTER.counterName(), 1);\n continue;\n }\n if (samRecord.getAttribute(\"String_Node_Str\") != null && samRecord.getIntegerAttribute(\"String_Node_Str\") > 1) {\n nonunique++;\n reporter.incrCounter(counterGroup, ExpressionCounters.ELIMINATED_READS_COUNTER.counterName(), 1);\n continue;\n }\n if (samRecord.getMappingQuality() < minAverageQual) {\n lowqual++;\n reporter.incrCounter(counterGroup, ExpressionCounters.ELIMINATED_READS_COUNTER.counterName(), 1);\n continue;\n }\n ivSeq.addAll(addIntervals(samRecord, stranded));\n } else {\n if (sam1 != null && sam2 != null) {\n sam1 = null;\n sam2 = null;\n ivSeq.clear();\n }\n if (samRecord.getFirstOfPairFlag())\n sam1 = samRecord;\n else\n sam2 = samRecord;\n if (sam1 == null || sam2 == null)\n continue;\n if (!sam1.getReadName().equals(sam2.getReadName())) {\n sam1 = sam2;\n sam2 = null;\n continue;\n }\n if (sam1 != null && !sam1.getReadUnmappedFlag()) {\n ivSeq.addAll(addIntervals(sam1, stranded));\n }\n if (sam2 != null && !sam2.getReadUnmappedFlag()) {\n ivSeq.addAll(addIntervals(sam2, stranded));\n }\n if (sam1.getReadUnmappedFlag() && sam2.getReadUnmappedFlag()) {\n notaligned++;\n reporter.incrCounter(counterGroup, ExpressionCounters.ELIMINATED_READS_COUNTER.counterName(), 1);\n continue;\n }\n if ((sam1.getAttribute(\"String_Node_Str\") != null && sam1.getIntegerAttribute(\"String_Node_Str\") > 1) || (sam2.getAttribute(\"String_Node_Str\") != null && sam2.getIntegerAttribute(\"String_Node_Str\") > 1)) {\n nonunique++;\n reporter.incrCounter(counterGroup, ExpressionCounters.ELIMINATED_READS_COUNTER.counterName(), 1);\n continue;\n }\n if (sam1.getMappingQuality() < minAverageQual || sam2.getMappingQuality() < minAverageQual) {\n lowqual++;\n reporter.incrCounter(counterGroup, ExpressionCounters.ELIMINATED_READS_COUNTER.counterName(), 1);\n continue;\n }\n }\n Set<String> fs = null;\n fs = featuresOverlapped(ivSeq, features, overlapMode, stranded);\n if (fs == null)\n fs = new HashSet<String>();\n switch(fs.size()) {\n case 0:\n empty++;\n reporter.incrCounter(counterGroup, ExpressionCounters.UNMAPPED_READS_COUNTER.counterName(), 1);\n break;\n case 1:\n final String id = fs.iterator().next();\n counts.put(id, counts.get(id) + 1);\n break;\n default:\n ambiguous++;\n reporter.incrCounter(counterGroup, ExpressionCounters.ELIMINATED_READS_COUNTER.counterName(), 1);\n break;\n }\n }\n inputSam.close();\n final List<String> keysSorted = new ArrayList<String>(counts.keySet());\n Collections.sort(keysSorted);\n for (String key : keysSorted) {\n writer.write(key + \"String_Node_Str\" + counts.get(key) + \"String_Node_Str\");\n }\n writer.write(\"String_Node_Str\" + empty + '\\n');\n writer.write(\"String_Node_Str\" + ambiguous + '\\n');\n writer.write(\"String_Node_Str\" + lowqual + '\\n');\n writer.write(\"String_Node_Str\" + notaligned + '\\n');\n writer.write(\"String_Node_Str\" + nonunique + '\\n');\n writer.close();\n}\n"
"public void putPacketInBuffer(int seqno, byte[] data) {\n synchronized (lock) {\n if (!synced) {\n writeIndex = seqno;\n readIndex = seqno;\n synced = true;\n }\n int outputSize = 0;\n if (seqno == writeIndex) {\n outputSize = this.alac_decode(data, audioBuffer[(seqno % BUFFER_FRAMES)].data);\n audioBuffer[(seqno % BUFFER_FRAMES)].ready = true;\n writeIndex++;\n } else if (seqno > writeIndex) {\n server.request_resend(writeIndex, seqno);\n outputSize = this.alac_decode(data, audioBuffer[(seqno % BUFFER_FRAMES)].data);\n audioBuffer[(seqno % BUFFER_FRAMES)].ready = true;\n writeIndex = seqno + 1;\n } else if (seqno > readIndex) {\n outputSize = this.alac_decode(data, audioBuffer[(seqno % BUFFER_FRAMES)].data);\n audioBuffer[(seqno % BUFFER_FRAMES)].ready = true;\n } else {\n System.err.println(\"String_Node_Str\" + seqno);\n }\n actualBufSize = writeIndex - readIndex;\n if (decoder_isStopped && actualBufSize > START_FILL) {\n System.err.println(seqno);\n lock.notify();\n }\n if (writeIndex == 65536) {\n writeIndex = 0;\n }\n }\n}\n"
"public void testNeedExcludeDefaultExclude() {\n final Map<FilterKey, Action> fm = new HashMap<FilterKey, Action>(filterMap);\n fm.put(new FilterKey(\"String_Node_Str\", null), Action.EXCLUDE);\n final FilterUtils f = new FilterUtils(false, fm);\n f.setLogger(new TestUtils.TestLogger());\n assertFalse(f.needExclude(new AttributesImpl(), new String[0][0]));\n assertFalse(f.needExclude(attr(\"String_Node_Str\", \"String_Node_Str\"), new String[0][0]));\n assertTrue(f.needExclude(attr(\"String_Node_Str\", \"String_Node_Str\"), new String[0][0]));\n assertTrue(f.needExclude(attr(\"String_Node_Str\", \"String_Node_Str\"), new String[0][0]));\n}\n"
"public DecomposerRecipe getRecipe(ItemStack input, int level) {\n for (DecomposerRecipe recipe : DecomposerRecipe.recipes) {\n if (Util.stacksAreSameKind(input, recipe.getInput()))\n return recipe;\n }\n if (level < 5) {\n ArrayList<Chemical> output = new ArrayList<Chemical>();\n int foundRecipies = 0;\n for (Object recipe : CraftingManager.getInstance().getRecipeList()) {\n if (recipe instanceof IRecipe) {\n if (((IRecipe) recipe).getRecipeOutput() != null && ((IRecipe) recipe).getRecipeOutput().isItemEqual(input)) {\n ItemStack[] components = null;\n if (recipe instanceof ShapelessOreRecipe && ((ShapelessOreRecipe) recipe).getInput().size() > 0) {\n ArrayList<ItemStack> inputs = new ArrayList<ItemStack>();\n for (Object o : ((ShapelessOreRecipe) recipe).getInput()) {\n if (o instanceof ItemStack) {\n inputs.add((ItemStack) o);\n }\n }\n components = inputs.toArray(new ItemStack[inputs.size()]);\n }\n if (recipe instanceof ShapedOreRecipe) {\n ArrayList<ItemStack> inputs = new ArrayList<ItemStack>();\n for (Object o : ((ShapedOreRecipe) recipe).getInput()) {\n if (o instanceof ItemStack) {\n inputs.add((ItemStack) o);\n } else if (o instanceof String) {\n inputs.add(OreDictionary.getOres((String) o).get(0));\n } else if (o instanceof ArrayList && !((ArrayList) o).isEmpty()) {\n inputs.add((ItemStack) ((ArrayList) o).get(0));\n }\n }\n components = inputs.toArray(new ItemStack[inputs.size()]);\n }\n if (recipe instanceof ShapelessRecipes && ((ShapelessRecipes) recipe).recipeItems.toArray() instanceof ItemStack[]) {\n components = (ItemStack[]) ((ShapelessRecipes) recipe).recipeItems.toArray();\n }\n if (recipe instanceof ShapedRecipes && ((ShapedRecipes) recipe).recipeItems instanceof ItemStack[]) {\n components = ((ShapedRecipes) recipe).recipeItems;\n }\n if (components != null) {\n ArrayList<Chemical> sum = new ArrayList<Chemical>();\n for (ItemStack item : components) {\n if (item != null) {\n DecomposerRecipe decompRecipe = this.getRecipe(item, level + 1);\n if (decompRecipe != null) {\n sum.addAll(decompRecipe.getPartialOutputRaw(((IRecipe) recipe).getRecipeOutput().stackSize));\n }\n }\n }\n if (!sum.isEmpty()) {\n Random rand = new Random();\n if (sum.containsAll(output)) {\n output = sum;\n } else if (!output.containsAll(sum) && (foundRecipies < 1 || rand.nextInt(foundRecipies) == 0)) {\n output = sum;\n foundRecipies += 1;\n }\n }\n }\n }\n }\n }\n if (!output.isEmpty()) {\n return new DecomposerRecipe(input, output.toArray(new Chemical[output.size()]));\n }\n }\n return null;\n}\n"
"protected void closeOldReaders(String table) {\n Set<String> shardsToServe = getShardsToServe(table);\n Map<String, IndexReader> tableReaders = readers.get(table);\n if (tableReaders == null) {\n return;\n }\n Set<String> shardsOpen = new HashSet<String>(tableReaders.keySet());\n shardsOpen.removeAll(shardsToServe);\n if (shardsOpen.isEmpty()) {\n return;\n }\n for (String shard : shardsOpen) {\n LOG.info(\"String_Node_Str\", table, shard);\n IndexReader indexReader = tableReaders.remove(shard);\n closeIndex(table, shard, indexReader);\n }\n}\n"
"public void close() throws IOException {\n for (final Segment segment : this.segments.view()) {\n segment.fileMessageSet.close();\n }\n this.writeLock.lock();\n try {\n this.join(5000);\n } catch (final InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n}\n"
"private void openStartElement(XPathFragment xPathFragment, NamespaceResolver namespaceResolver, boolean addOpenBrace) {\n try {\n Level newLevel = null;\n Level position = null;\n if (levels.isEmpty()) {\n newLevel = new Level(true, true);\n levels.push(newLevel);\n } else {\n position = levels.peek();\n newLevel = new Level(true, true);\n levels.push(newLevel);\n if (position.isFirst()) {\n position.setFirst(false);\n } else {\n writer.write(',');\n }\n }\n if (xPathFragment.nameIsText()) {\n if (position != null && position.isCollection() && position.isEmptyCollection()) {\n if (!charactersAllowed) {\n throw JAXBException.jsonValuePropertyRequired(\"String_Node_Str\");\n }\n writer.write('[');\n position.setEmptyCollection(false);\n position.setNeedToOpenComplex(false);\n charactersAllowed = true;\n return;\n }\n }\n if (position != null && position.needToOpenComplex) {\n writer.write('{');\n position.needToOpenComplex = false;\n position.needToCloseComplex = true;\n }\n if (!(position.isCollection() && !position.isEmptyCollection())) {\n writeKey(xPathFragment);\n if (position != null && position.isEmptyCollection()) {\n XPathFragment nextFragment = xPathFragment.getNextFragment();\n if (nextFragment != null && !nextFragment.nameIsText() && !nextFragment.isAttribute()) {\n newLevel.setEmptyCollection(true);\n newLevel.setCollection(true);\n position.setEmptyCollection(false);\n } else {\n writer.write('[');\n position.setEmptyCollection(false);\n }\n }\n }\n charactersAllowed = true;\n } catch (IOException e) {\n throw XMLMarshalException.marshalException(e);\n }\n}\n"
"public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n ViewGroup viewGroup;\n if (getResources().getConfiguration().screenWidthDp >= 350) {\n viewGroup = (ViewGroup) buttonView.getParent().getParent().getParent();\n } else {\n viewGroup = (ViewGroup) buttonView.getParent();\n }\n StockChartView stockChartView = (StockChartView) viewGroup.findViewById(R.id.StockChartView);\n IndicatorManager iManager = stockChartView.getIndicatorManager();\n if (stockChartView.findSeriesByName(\"String_Node_Str\") != null) {\n if (isChecked) {\n switch(buttonView.getId()) {\n case R.id.enableEMAIndicator:\n iManager.addEma(stockChartView.findSeriesByName(\"String_Node_Str\"), 0);\n break;\n case R.id.enableMACDIndicator:\n iManager.addMacd(stockChartView.findSeriesByName(\"String_Node_Str\"), 0);\n break;\n case R.id.enableRSIIndicator:\n iManager.addRsi(stockChartView.findSeriesByName(\"String_Node_Str\"), 0);\n break;\n case R.id.enableSMAIndicator:\n iManager.addSma(stockChartView.findSeriesByName(\"String_Node_Str\"), 0);\n break;\n default:\n break;\n }\n stockChartView.recalcIndicators();\n stockChartView.recalc();\n stockChartView.invalidate();\n } else {\n List<AbstractIndicator> indicators = stockChartView.getIndicatorManager().getIndicators();\n for (AbstractIndicator x : indicators) {\n switch(buttonView.getId()) {\n case R.id.enableEMAIndicator:\n if (x instanceof EmaIndicator) {\n stockChartView.getIndicatorManager().removeIndicator(x);\n }\n break;\n case R.id.enableMACDIndicator:\n if (x instanceof MacdIndicator) {\n stockChartView.getIndicatorManager().removeIndicator(x);\n }\n break;\n case R.id.enableRSIIndicator:\n if (x instanceof RsiIndicator) {\n stockChartView.getIndicatorManager().removeIndicator(x);\n }\n break;\n case R.id.enableSMAIndicator:\n if (x instanceof SmaIndicator) {\n stockChartView.getIndicatorManager().removeIndicator(x);\n }\n break;\n default:\n break;\n }\n }\n stockChartView.recalc();\n stockChartView.invalidate();\n }\n } else {\n SwitchCompat sw = (SwitchCompat) buttonView;\n sw.setChecked(!isChecked);\n }\n}\n"
"public void testGracefulShutdown2() throws Exception {\n Config config = new Config();\n config.getMapConfig(MAP_NAME).setBackupCount(2);\n TestHazelcastInstanceFactory f = createHazelcastInstanceFactory(6);\n final HazelcastInstance hz = f.newHazelcastInstance(config);\n final IMap<Integer, Integer> map = hz.getMap(MAP_NAME);\n final int size = 50000;\n for (int i = 0; i < size; i++) {\n map.put(i, i);\n }\n final HazelcastInstance hz2 = f.newHazelcastInstance(config);\n final IMap<Object, Object> map2 = hz2.getMap(MAP_NAME);\n assertEquals(size, map2.size());\n final HazelcastInstance hz3 = f.newHazelcastInstance(config);\n final IMap<Object, Object> map3 = hz3.getMap(MAP_NAME);\n final HazelcastInstance hz4 = f.newHazelcastInstance(config);\n final IMap<Object, Object> map4 = hz4.getMap(MAP_NAME);\n assertEquals(size, map3.size());\n assertEquals(size, map4.size());\n final HazelcastInstance hz5 = f.newHazelcastInstance(config);\n final IMap<Object, Object> map5 = hz5.getMap(MAP_NAME);\n final HazelcastInstance hz6 = f.newHazelcastInstance(config);\n final IMap<Object, Object> map6 = hz6.getMap(MAP_NAME);\n assertEquals(size, map5.size());\n assertEquals(size, map6.size());\n hz.shutdown();\n hz2.shutdown();\n assertEquals(size, map3.size());\n assertEquals(size, map4.size());\n assertEquals(size, map5.size());\n assertEquals(size, map6.size());\n hz3.shutdown();\n hz4.shutdown();\n assertEquals(size, map5.size());\n assertEquals(size, map6.size());\n}\n"
"private void newProcess(SelectedItems<IndexedAIP> aips, AsyncCallback<ActionImpact> callback) {\n LastSelectedItemsSingleton.getInstance().setSelectedItems(aips);\n LastSelectedItemsSingleton.getInstance().setLastHistory(HistoryUtils.getCurrentHistoryPath());\n HistoryUtils.newHistory(CreateSelectedJob.RESOLVER, RodaConstants.JOB_PROCESS_ACTION);\n callback.onSuccess(ActionImpact.NONE);\n}\n"
"public void renderTile(AEBaseBlock block, AEBaseTile tile, Tessellator tess, double x, double y, double z, float partialTick, RenderBlocks renderer) {\n if (!(tile instanceof TileSkyChest))\n return;\n TileSkyChest skyChest = (TileSkyChest) tile;\n if (!skyChest.hasWorldObj())\n return;\n GL11.glEnable(32826);\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n ResourceLocation loc;\n if (tile.getWorldObj().getBlockMetadata(tile.xCoord, tile.yCoord, tile.zCoord) == 1)\n loc = new ResourceLocation(\"String_Node_Str\", \"String_Node_Str\");\n else\n loc = new ResourceLocation(\"String_Node_Str\", \"String_Node_Str\");\n Minecraft.getMinecraft().getTextureManager().bindTexture(loc);\n this.applyTESRRotation(x, y, z, skyChest.getForward(), skyChest.getUp());\n GL11.glScalef(1.0F, -1F, -1F);\n GL11.glTranslatef(-0.0F, -1.0F, -1.0F);\n long now = System.currentTimeMillis();\n long distnace = now - skyChest.lastEvent;\n if (skyChest.playerOpen > 0)\n skyChest.lidAngle += distnace * 0.0001;\n else\n skyChest.lidAngle -= distnace * 0.0001;\n if (skyChest.lidAngle > 0.5f)\n skyChest.lidAngle = 0.5f;\n if (skyChest.lidAngle < 0.0f)\n skyChest.lidAngle = 0.0f;\n float lidangle = skyChest.lidAngle;\n lidangle = 1.0F - lidangle;\n lidangle = 1.0F - lidangle * lidangle * lidangle;\n model.chestLid.offsetY = -(0.9f / 16.0f);\n model.chestLid.rotateAngleX = -((lidangle * 3.141593F) / 2.0F);\n model.renderAll();\n GL11.glDisable(32826);\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n}\n"
"private void biome(final SnipeData v) {\n double brushSize = v.getBrushSize();\n double brushSizeSquared = brushSize * brushSize;\n int minx = GenericMath.floor(this.targetBlock.getBlockX() - brushSize);\n int maxx = GenericMath.floor(this.targetBlock.getBlockX() + brushSize) + 1;\n int minz = GenericMath.floor(this.targetBlock.getBlockZ() - brushSize);\n int maxz = GenericMath.floor(this.targetBlock.getBlockZ() + brushSize) + 1;\n for (int x = minx; x <= maxx; x++) {\n double xs = (tx - x) * (tx - x);\n for (int z = minz; z <= maxz; z++) {\n double zs = (minz - z) * (minz - z);\n if ((xs + zs) <= brushSizeSquared) {\n this.world.setBiome(x, z, this.selectedBiome);\n }\n }\n }\n}\n"
"public IParameterDefnBase getParameterDefn(String name) {\n IParameterDefnBase ret = null;\n if (name == null) {\n return ret;\n }\n Collection original = ((ReportRunnable) runnable).getParameterDefns(true);\n Iterator iter = original.iterator();\n while (iter.hasNext()) {\n ParameterDefnBase pBase = (ParameterDefnBase) iter.next();\n if (name.equals(pBase.getName())) {\n try {\n ret = (IParameterDefnBase) pBase.clone();\n break;\n } catch (CloneNotSupportedException e) {\n log.log(Level.SEVERE, e.getMessage(), e);\n }\n }\n }\n if (ret != null) {\n if (ret instanceof ScalarParameterDefn) {\n ((ScalarParameterDefn) ret).setReportDesign((ReportDesignHandle) runnable.getDesignHandle());\n ((ScalarParameterDefn) ret).setLocale(locale);\n ((ScalarParameterDefn) ret).evaluateSelectionList();\n } else if (ret instanceof ParameterGroupDefn) {\n Iterator iter2 = ((ParameterGroupDefn) ret).getContents().iterator();\n while (iter2.hasNext()) {\n IParameterDefnBase p = (IParameterDefnBase) iter2.next();\n if (p instanceof ScalarParameterDefn) {\n ((ScalarParameterDefn) p).setReportDesign((ReportDesignHandle) runnable.getDesignHandle());\n ((ScalarParameterDefn) p).setLocale(locale);\n ((ScalarParameterDefn) p).evaluateSelectionList();\n }\n }\n }\n }\n return ret;\n}\n"
"private JsStatement mapForStatement(Node forNode) throws JsParserException {\n Node fromInit = forNode.getFirstChild();\n Node fromTest = fromInit.getNext();\n Node fromIncr = fromTest.getNext();\n Node fromBody = fromIncr.getNext();\n if (fromBody == null) {\n Node fromIter = forNode.getFirstChild();\n Node fromObjExpr = fromIter.getNext();\n fromBody = fromObjExpr.getNext();\n JsForIn toForIn;\n if (fromIter.getType() == TokenStream.VAR) {\n Node fromIterVarName = fromIter.getFirstChild();\n String fromName = fromIterVarName.getString();\n JsName toName = getScope().declareName(fromName);\n toForIn = new JsForIn(toName);\n Node fromIterInit = fromIterVarName.getFirstChild();\n if (fromIterInit != null) {\n toForIn.setIterExpr(mapOptionalExpression(fromIterInit));\n }\n } else {\n toForIn = new JsForIn();\n toForIn.setIterExpr(mapExpression(fromIter));\n }\n toForIn.setObjExpr(mapExpression(fromObjExpr));\n JsStatement bodyStmt = mapStatement(fromBody);\n if (bodyStmt != null) {\n toForIn.setBody(bodyStmt);\n } else {\n toForIn.setBody(program.getEmptyStmt());\n }\n return toForIn;\n } else {\n JsFor toFor = new JsFor();\n JsNode initThingy = map(fromInit);\n if (initThingy != null) {\n if (initThingy instanceof JsVars) {\n toFor.setInitVars((JsVars) initThingy);\n } else {\n assert (initThingy instanceof JsExpression);\n toFor.setInitExpr((JsExpression) initThingy);\n }\n }\n toFor.setCondition(mapOptionalExpression(fromTest));\n toFor.setIncrExpr(mapOptionalExpression(fromIncr));\n JsStatement bodyStmt = mapStatement(fromBody);\n if (bodyStmt != null) {\n toFor.setBody(bodyStmt);\n } else {\n toFor.setBody(program.getEmptyStmt());\n }\n return toFor;\n }\n}\n"
"public Object unmarshalEntity(String type, String tenantId, MediaType acceptedMedia, InputStream in) throws JAXBException {\n Unmarshaller unmarshaller = getJAXBContext().createUnmarshaller();\n unmarshaller.setProperty(UnmarshallerProperties.JSON_INCLUDE_ROOT, Boolean.FALSE);\n unmarshaller.setProperty(UnmarshallerProperties.MEDIA_TYPE, acceptedMedia.toString());\n unmarshaller.setAdapter(new LinkAdapter(getBaseURI().toString(), this));\n JAXBElement<?> element = unmarshaller.unmarshal(new StreamSource(in), getClass(type));\n return element.getValue();\n}\n"
"public static void main(String[] args) throws IOException {\n if (args.length < 2) {\n throw new JMetalException(\"String_Node_Str\");\n }\n String experimentBaseDirectory = args[0];\n List<Problem<DoubleSolution>> problemList = Arrays.<Problem<DoubleSolution>>asList(new ZDT1(), new ZDT2(), new ZDT3(), new ZDT4(), new ZDT6());\n List<TaggedAlgorithm<List<DoubleSolution>>> algorithmList = configureAlgorithmList(problemList);\n List<String> referenceFrontFileNames = Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n Experiment<DoubleSolution, List<DoubleSolution>> configuration = new ExperimentBuilder<DoubleSolution, List<DoubleSolution>>(\"String_Node_Str\").setAlgorithmList(algorithmList).setProblemList(problemList).setExperimentBaseDirectory(experimentBaseDirectory).setOutputParetoFrontFileName(\"String_Node_Str\").setOutputParetoSetFileName(\"String_Node_Str\").setReferenceFrontDirectory(\"String_Node_Str\").setReferenceFrontFileNames(referenceFrontFileNames).setIndicatorList(Arrays.asList(new Epsilon<DoubleSolution>(), new Spread<DoubleSolution>(), new GenerationalDistance<DoubleSolution>(), new PISAHypervolume<DoubleSolution>(), new InvertedGenerationalDistance<DoubleSolution>(), new InvertedGenerationalDistancePlus<DoubleSolution>())).setIndependentRuns(30).setNumberOfCores(8).build();\n new ExecuteAlgorithms<>(configuration).run();\n new ComputeQualityIndicators<>(configuration).run();\n new GenerateLatexTablesWithStatistics(configuration).run();\n new GenerateWilcoxonTestTablesWithR<>(configuration).run();\n new GenerateFriedmanTestTables<>(configuration).run();\n new GenerateBoxplotsWithR<>(configuration).setRows(3).setColumns(3).run();\n}\n"
"public static Map<String, String> parseAuthorizationHeader(String authorizationHeader) {\n Map<String, String> elements = new HashMap<String, String>();\n String[] keyAndValueArray = authorizationHeader.split(\"String_Node_Str\");\n for (String keyAndValue : keyAndValueArray) {\n String[] arr = keyAndValue.split(\"String_Node_Str\");\n String key = arr[0].trim().replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n String value = arr[1].trim().replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n elements.put(key, OAuthEncoding.decode(value));\n }\n return elements;\n}\n"
"public static Object readObject(DataInput in) throws IOException {\n byte type = in.readByte();\n if (type == 0) {\n return null;\n } else if (type == 1) {\n return in.readLong();\n } else if (type == 2) {\n return in.readInt();\n } else if (type == 3) {\n return in.readUTF();\n } else if (type == 4) {\n return in.readDouble();\n } else if (type == 5) {\n return in.readFloat();\n } else if (type == 6) {\n return in.readBoolean();\n } else if (type == 7) {\n DataSerializable ds;\n try {\n String className = in.readUTF();\n ds = (DataSerializable) Serializer.newInstance(Serializer.classForName(className));\n } catch (Throwable e) {\n throw new IOException(e.getMessage());\n }\n ds.readData(in);\n return ds;\n } else if (type == 8) {\n return new Date(in.readLong());\n } else if (type == 9) {\n int len = in.readInt();\n byte[] buf = new byte[len];\n in.readFully(buf);\n ObjectInputStream oin = Serializer.newObjectInputStream(new ByteArrayInputStream(buf));\n try {\n return oin.readObject();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n oin.close();\n } else {\n throw new IOException(\"String_Node_Str\" + type);\n }\n return null;\n}\n"
"public void onVehicleTypeReceived(FirmwareType type) {\n if (drone != null) {\n return;\n }\n final DroidPlannerPrefs dpPrefs = new DroidPlannerPrefs(context);\n final DroneInterfaces.Handler dpHandler = new DroneInterfaces.Handler() {\n public void removeCallbacks(Runnable thread) {\n handler.removeCallbacks(thread);\n }\n public void post(Runnable thread) {\n handler.post(thread);\n }\n public void postDelayed(Runnable thread, long timeout) {\n handler.postDelayed(thread, timeout);\n }\n };\n switch(type) {\n case ARDU_COPTER:\n if (isCompanionComputerEnabled()) {\n Timber.i(\"String_Node_Str\");\n this.drone = new ArduSolo(context, mavClient, dpHandler, dpPrefs, new AndroidApWarningParser(), this, this);\n } else {\n Timber.i(\"String_Node_Str\");\n this.drone = new ArduCopter(context, mavClient, dpHandler, dpPrefs, new AndroidApWarningParser(), this, this);\n }\n break;\n case ARDU_SOLO:\n Timber.i(\"String_Node_Str\");\n this.drone = new ArduSolo(context, mavClient, dpHandler, dpPrefs, new AndroidApWarningParser(), this, this);\n break;\n case ARDU_PLANE:\n Timber.i(\"String_Node_Str\");\n this.drone = new ArduPlane(context, mavClient, dpHandler, dpPrefs, new AndroidApWarningParser(), this, this);\n break;\n case ARDU_ROVER:\n Timber.i(\"String_Node_Str\");\n this.drone = new ArduRover(context, mavClient, dpHandler, dpPrefs, new AndroidApWarningParser(), this, this);\n break;\n case PX4_NATIVE:\n Timber.i(\"String_Node_Str\");\n this.drone = new Px4Native(dpHandler, mavClient, new AndroidApWarningParser(), this);\n break;\n }\n this.drone.getStreamRates().setRates(dpPrefs.getRates());\n this.followMe = new Follow(this, handler, new FusedLocation(context, handler));\n this.returnToMe = new ReturnToMe(this, new FusedLocation(context, handler, LocationRequest.PRIORITY_HIGH_ACCURACY, 1000L, 1000L, ReturnToMe.UPDATE_MINIMAL_DISPLACEMENT), this);\n drone.addDroneListener(this);\n final Parameters parameters = drone.getParameters();\n if (parameters != null) {\n parameters.setParameterListener(this);\n }\n final MagnetometerCalibrationImpl magnetometer = drone.getMagnetometerCalibration();\n if (magnetometer != null) {\n magnetometer.setListener(this);\n }\n}\n"
"public void shutdown() {\n try {\n joined = false;\n ConcurrentMapManager.get().reset();\n ClusterService.get().stop();\n MulticastService.get().stop();\n ConnectionManager.get().shutdown();\n ExecutorManager.get().stop();\n InSelector.get().shutdown();\n OutSelector.get().shutdown();\n address = null;\n masterAddress = null;\n FactoryImpl.inited = false;\n ClusterManager.get().stop();\n } catch (Throwable e) {\n if (logger != null)\n logger.log(Level.FINEST, \"String_Node_Str\", e);\n }\n}\n"
"private void setOldSuggestions() {\n mShowingVoiceSuggestions = false;\n InputConnection ic = getCurrentInputConnection();\n if (ic == null)\n return;\n ic.beginBatchEdit();\n if (mLastSelectionStart < mLastSelectionEnd) {\n ic.setSelection(mLastSelectionStart, mLastSelectionStart);\n }\n if (!mPredicting && isCursorTouchingWord()) {\n EditingUtil.Range range = new EditingUtil.Range();\n CharSequence touching = EditingUtil.getWordAtCursor(getCurrentInputConnection(), mWordSeparators, range);\n if (touching != null && touching.length() > 1) {\n if (mWordSeparators.indexOf(touching.charAt(touching.length() - 1)) > 0) {\n touching = touching.toString().substring(0, touching.length() - 1);\n }\n String selectedWord = touching.toString().trim();\n if (!mWordToSuggestions.containsKey(selectedWord)) {\n selectedWord = selectedWord.toLowerCase();\n }\n if (mWordToSuggestions.containsKey(selectedWord)) {\n mShowingVoiceSuggestions = true;\n mSuggestionShouldReplaceCurrentWord = true;\n underlineWord(touching, range.charsBefore, range.charsAfter);\n List<CharSequence> suggestions = mWordToSuggestions.get(selectedWord);\n if (Character.isUpperCase((char) touching.charAt(0))) {\n for (int i = 0; i < suggestions.size(); i++) {\n String origSugg = (String) suggestions.get(i);\n String capsSugg = origSugg.toUpperCase().charAt(0) + origSugg.subSequence(1, origSugg.length()).toString();\n suggestions.set(i, capsSugg);\n }\n }\n setSuggestions(suggestions, false, true, true);\n setCandidatesViewShown(true);\n TextEntryState.selectedForCorrection();\n ic.endBatchEdit();\n return;\n }\n WordComposer foundWord = null;\n WordAlternatives alternatives = null;\n for (WordAlternatives entry : mWordHistory) {\n if (TextUtils.equals(entry.getChosenWord(), touching)) {\n if (entry instanceof TypedWordAlternatives) {\n foundWord = ((TypedWordAlternatives) entry).word;\n }\n alternatives = entry;\n break;\n }\n }\n if (foundWord == null && mSuggest.isValidWord(touching)) {\n foundWord = new WordComposer();\n for (int i = 0; i < touching.length(); i++) {\n foundWord.add(touching.charAt(i), new int[] { touching.charAt(i) });\n }\n }\n if (foundWord != null || alternatives != null) {\n mSuggestionShouldReplaceCurrentWord = true;\n underlineWord(touching, range.charsBefore, range.charsAfter);\n TextEntryState.selectedForCorrection();\n if (alternatives == null)\n alternatives = new TypedWordAlternatives(touching, foundWord);\n showCorrections(alternatives);\n if (foundWord != null) {\n mWord = new WordComposer(foundWord);\n } else {\n mWord.reset();\n }\n if (mLastSelectionStart < mLastSelectionEnd) {\n ic.setSelection(mLastSelectionStart, mLastSelectionEnd);\n }\n ic.endBatchEdit();\n return;\n }\n abortCorrection(true);\n } else {\n abortCorrection(true);\n setNextSuggestions();\n }\n } else {\n abortCorrection(true);\n }\n if (mLastSelectionStart < mLastSelectionEnd) {\n ic.setSelection(mLastSelectionStart, mLastSelectionEnd);\n }\n ic.endBatchEdit();\n}\n"
"protected void addValueToHistory(Object value, long timestamp) {\n if (historySize == 0)\n return;\n synchronized (historyValue) {\n historyTime[historyPosition] = timestamp;\n if (propertyType.isPrimitive()) {\n if (propertyType.isAssignableFrom(double.class))\n Array.setDouble(historyValue, historyPosition, ((Double) value).doubleValue());\n else if (propertyType.isAssignableFrom(int.class))\n Array.setInt(historyValue, historyPosition, ((Integer) value).intValue());\n else if (propertyType.isAssignableFrom(long.class))\n Array.setLong(historyValue, historyPosition, ((Long) value).longValue());\n else if (propertyType.isAssignableFrom(short.class))\n Array.setShort(historyValue, historyPosition, ((Short) value).shortValue());\n else if (propertyType.isAssignableFrom(boolean.class))\n Array.setBoolean(historyValue, historyPosition, ((Boolean) value).booleanValue());\n else if (propertyType.isAssignableFrom(byte.class))\n Array.setByte(historyValue, historyPosition, ((Byte) value).byteValue());\n else if (propertyType.isAssignableFrom(float.class))\n Array.setFloat(historyValue, historyPosition, ((Float) value).floatValue());\n else if (propertyType.isAssignableFrom(char.class))\n Array.setChar(historyValue, historyPosition, ((Character) value).charValue());\n else {\n m_logger.log(Level.WARNING, \"String_Node_Str\");\n throw new NO_RESOURCES(\"String_Node_Str\");\n } else\n Array.set(historyValue, historyPosition, value);\n historyPosition = ++historyPosition % historySize;\n if (!historyTurnaround && historyPosition == 0)\n historyTurnaround = true;\n }\n}\n"
"public void setName(String value) {\n row.setString(index_name, value);\n}\n"
"private ModuleToInstall createUnavailableModuleToInstall(String unavailableModuleName, Map<String, List<ModuleNeeded>> contextMap) {\n ModuleToInstall m = new ModuleToInstall();\n m.setName(unavailableModuleName);\n setContext(m, contextMap);\n if (contextMap != null) {\n m.setDescription(getFirstDescription(contextMap.get(unavailableModuleName)));\n }\n return m;\n}\n"
"public static boolean exists(final File file) throws SecurityException {\n if (file == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n try {\n return ((Boolean) AccessController.doPrivileged(new PrivilegedExceptionAction() {\n public Object run() {\n return new Boolean(file.exists());\n }\n })).booleanValue();\n}\n"
"public void selectDrag() {\n ColumnHandle handle = (ColumnHandle) getHandleUnderMouse();\n int columnNumber = handle.getColumnNumber();\n int number = getNumber();\n selectColumns(number, columnNumber);\n}\n"
"public void filterSelectedColumns() {\n Map<ColumnName, String> columnsAliases = new HashMap<>();\n columnsAliases.put(new ColumnName(CATALOG_CONSTANT, TABLE1_CONSTANT.getName(), COLUMN1_CONSTANT), \"String_Node_Str\");\n List<Cells> cells = leftRdd.collect();\n JavaRDD<Cells> rdd = QueryFilterUtils.filterSelectedColumns(leftRdd, columnsAliases.keySet());\n logger.info(\"String_Node_Str\" + rdd.first().toString());\n rdd.collect();\n assertEquals(true, true);\n}\n"
"public boolean consume() {\n valid = rightPutTarget(request.blockId);\n if (valid) {\n offer(request, false);\n request.response = Boolean.TRUE;\n returnScheduledAsBoolean(request);\n return true;\n } else {\n request.response = OBJECT_REDO;\n returnResponse(request);\n return false;\n }\n}\n"
"private ConnectState connectAndLogin(InetSocketAddress address, String serviceName, String userName, String resource, JabberLoginStrategy loginStrategy) throws XMPPException {\n ConnectionConfiguration confConn = new ConnectionConfiguration(address.getAddress().getHostAddress(), address.getPort(), serviceName, proxy);\n if (getOperationSet(OperationSetPersistentPresence.class) != null)\n confConn.setSendPresence(false);\n confConn.setReconnectionAllowed(false);\n boolean tlsRequired = loginStrategy.isTlsRequired();\n confConn.setSecurityMode(tlsRequired ? ConnectionConfiguration.SecurityMode.required : ConnectionConfiguration.SecurityMode.enabled);\n TLSUtils.setTLSOnly(confConn);\n if (connection != null) {\n logger.error(\"String_Node_Str\" + connection.isConnected(), new Exception(\"String_Node_Str\" + getAccountID().getAccountAddress()));\n disconnectAndCleanConnection();\n }\n connection = new XMPPConnection(confConn);\n this.address = address;\n try {\n CertificateService cvs = getCertificateVerificationService();\n if (cvs != null) {\n SSLContext sslContext = loginStrategy.createSslContext(cvs, getTrustManager(cvs, serviceName));\n if (logger.isDebugEnabled() && sslContext != null) {\n final StringBuilder buff = new StringBuilder();\n buff.append(\"String_Node_Str\");\n buff.append(\"String_Node_Str\");\n buff.append(Arrays.toString(sslContext.getDefaultSSLParameters().getProtocols()));\n buff.append(\"String_Node_Str\");\n buff.append(\"String_Node_Str\");\n buff.append(Arrays.toString(sslContext.getSupportedSSLParameters().getProtocols()));\n buff.append(\"String_Node_Str\");\n buff.append(\"String_Node_Str\");\n buff.append(Arrays.toString(sslContext.getDefaultSSLParameters().getCipherSuites()));\n buff.append(\"String_Node_Str\");\n buff.append(\"String_Node_Str\");\n buff.append(Arrays.toString(sslContext.getSupportedSSLParameters().getCipherSuites()));\n logger.debug(buff.toString());\n }\n confConn.setCustomSSLContext(sslContext);\n } else if (tlsRequired)\n throw new XMPPException(\"String_Node_Str\" + \"String_Node_Str\");\n } catch (GeneralSecurityException e) {\n logger.error(\"String_Node_Str\", e);\n throw new XMPPException(\"String_Node_Str\", e);\n }\n if (debugger == null)\n debugger = new SmackPacketDebugger();\n debugger.setConnection(connection);\n connection.addPacketListener(debugger, null);\n connection.addPacketInterceptor(debugger, null);\n connection.connect();\n setTrafficClass();\n if (abortConnecting) {\n abortConnecting = false;\n disconnectAndCleanConnection();\n return ConnectState.ABORT_CONNECTING;\n }\n registerServiceDiscoveryManager();\n if (connectionListener == null) {\n connectionListener = new JabberConnectionListener();\n }\n if (!connection.isSecureConnection() && tlsRequired) {\n throw new XMPPException(\"String_Node_Str\");\n }\n if (!connection.isConnected()) {\n disconnectAndCleanConnection();\n logger.error(\"String_Node_Str\");\n eventDuringLogin = null;\n fireRegistrationStateChanged(getRegistrationState(), RegistrationState.CONNECTION_FAILED, RegistrationStateChangeEvent.REASON_SERVER_NOT_FOUND, null);\n return ConnectState.ABORT_CONNECTING;\n } else {\n if (connection.getSocket() instanceof SSLSocket) {\n final SSLSocket sslSocket = (SSLSocket) connection.getSocket();\n StringBuilder buff = new StringBuilder();\n buff.append(\"String_Node_Str\").append(\"String_Node_Str\").append(sslSocket.getSession().getProtocol()).append(\"String_Node_Str\").append(\"String_Node_Str\").append(sslSocket.getSession().getCipherSuite());\n logger.info(buff.toString());\n if (logger.isDebugEnabled()) {\n buff = new StringBuilder();\n buff.append(\"String_Node_Str\");\n try {\n buff.append(Arrays.toString(sslSocket.getSession().getPeerCertificates()));\n } catch (SSLPeerUnverifiedException ex) {\n buff.append(\"String_Node_Str\").append(ex.getLocalizedMessage()).append(\"String_Node_Str\");\n }\n logger.debug(buff.toString());\n }\n }\n connection.addConnectionListener(connectionListener);\n }\n if (abortConnecting) {\n abortConnecting = false;\n disconnectAndCleanConnection();\n return ConnectState.ABORT_CONNECTING;\n }\n fireRegistrationStateChanged(getRegistrationState(), RegistrationState.REGISTERING, RegistrationStateChangeEvent.REASON_NOT_SPECIFIED, null);\n if (!loginStrategy.login(connection, userName, resource)) {\n disconnectAndCleanConnection();\n eventDuringLogin = null;\n fireRegistrationStateChanged(getRegistrationState(), RegistrationState.CONNECTION_FAILED, RegistrationStateChangeEvent.REASON_AUTHENTICATION_FAILED, loginStrategy.getClass().getName() + \"String_Node_Str\");\n return ConnectState.ABORT_CONNECTING;\n }\n if (connection.isAuthenticated()) {\n eventDuringLogin = null;\n fireRegistrationStateChanged(getRegistrationState(), RegistrationState.REGISTERED, RegistrationStateChangeEvent.REASON_NOT_SPECIFIED, null);\n return ConnectState.STOP_TRYING;\n } else {\n disconnectAndCleanConnection();\n eventDuringLogin = null;\n fireRegistrationStateChanged(getRegistrationState(), RegistrationState.UNREGISTERED, RegistrationStateChangeEvent.REASON_NOT_SPECIFIED, null);\n return ConnectState.CONTINUE_TRYING;\n }\n}\n"
"protected Object getParamValueObject(HttpServletRequest request, ParameterDefinition parameterObj) throws ReportServiceException {\n String paramName = parameterObj.getName();\n String format = parameterObj.getDisplayFormat();\n Object paramValueObj = super.getParamValueObject(request, parameterObj);\n if (paramValueObj != null)\n return paramValueObj;\n if (ParameterAccessor.isDesigner(request) && this.configMap != null && this.configMap.containsKey(paramName)) {\n paramValueObj = this.configMap.get(paramName);\n } else if (this.parameterMap != null && this.parameterMap.containsKey(paramName)) {\n paramValueObj = this.parameterMap.get(paramName);\n }\n return paramValueObj;\n}\n"
"private void problemCompDoesNotExist(ICapPO cap) {\n final ITestCasePO tcPO = (ITestCasePO) cap.getParentNode();\n String message = NLS.bind(Messages.ProblemCheckerCompDoesNotExist, new String[] { cap.getName(), tcPO.getName(), CompSystemI18n.getString(cap.getComponentType(), true) });\n m_localProblemsToShow.add(ProblemFactory.createProblemWithMarker(new Status(IStatus.ERROR, Activator.PLUGIN_ID, message), message, cap, ProblemType.REASON_COMP_DOES_NOT_EXIST));\n}\n"
"private void genBasic() throws Exception {\n Context context = Context.enter();\n Scriptable scope = context.initStandardObjects();\n Context.exit();\n QueryDefinition qd = newReportQuery();\n prepareExprNameAndQuery(qd);\n IQueryResults qr = myGenDataEngine.prepare(qd).execute(scope);\n queryResultID = qr.getID();\n IResultIterator ri = qr.getResultIterator();\n while (ri.next()) {\n ri.getValue(this.rowExprName[0]);\n ri.getValue(this.totalExprName[0]);\n }\n ri.close();\n qr.close();\n myGenDataEngine.shutdown();\n}\n"
"public static NBTTagCompound getTag(ItemStack stack) {\n Objects.requireNonNull(stack, \"String_Node_Str\");\n NBTTagCompound tag = stack.getTagCompound();\n if (tag == null) {\n tag = new NBTTagCompound();\n stack.setTagCompound(tag);\n return tag;\n }\n}\n"
"public void testGeneratedClassesExistFor() {\n ClassLoader loader = new URLClassLoader(new URL[] {}, null);\n ClassLoaderWeavingAdaptor adaptor = new ClassLoaderWeavingAdaptor();\n adaptor.initialize(loader, null);\n boolean exist = adaptor.generatedClassesExistFor(\"String_Node_Str\");\n assertFalse(\"String_Node_Str\", exist);\n}\n"
"public void testGetByConsumerUuid() {\n MultivaluedMap<String, String> params = mock(MultivaluedMap.class);\n when(params.containsKey(\"String_Node_Str\")).thenReturn(true);\n when(params.get(\"String_Node_Str\")).thenReturn(Arrays.asList(\"String_Node_Str\", \"String_Node_Str\"));\n MultiRowResult<DBObject> results = report.run(params);\n assertEquals(1, results.size());\n DBObject snap = results.get(0);\n DBObject consumer = (DBObject) snap.get(\"String_Node_Str\");\n assertEquals(\"String_Node_Str\", consumer.get(\"String_Node_Str\"));\n}\n"
"protected void checkForErrors() {\n errors = new ArrayList<String>();\n errors.addAll(writer.check());\n ItemRecord[] elements = getElements();\n for (ItemRecord record : elements) {\n Map<File, ModelElement> dependencyMap = record.getDependencyMap();\n for (File depFile : dependencyMap.keySet()) {\n if (!repositoryTree.getChecked(ItemRecord.findRecord(depFile))) {\n ModelElement element = dependencyMap.get(depFile);\n String fileName = element != null ? element.getName() : depFile.getName();\n errors.add(\"String_Node_Str\" + record.getName() + \"String_Node_Str\" + fileName);\n }\n }\n }\n if (!errors.isEmpty()) {\n setErrorMessage(errors.get(0));\n } else {\n setErrorMessage(null);\n }\n updatePageStatus();\n}\n"
"public SelectNode validateSelect(SelectNode selectNode) throws OlapException {\n try {\n StringWriter sw = new StringWriter();\n selectNode.unparse(new ParseTreeWriter(new PrintWriter(sw)));\n String mdx = sw.toString();\n Query query = connection.connection.parseQuery(mdx);\n query.resolve();\n return connection.toOlap4j(query);\n } catch (MondrianException e) {\n throw connection.helper.createException(\"String_Node_Str\", e);\n }\n}\n"
"public void flushEdgeCache(SqlgGraph sqlgGraph, Map<SchemaTable, Pair<SortedSet<String>, Map<SqlgEdge, Triple<SqlgVertex, SqlgVertex, Map<String, Object>>>>> edgeCache) {\n C3P0ProxyConnection con = (C3P0ProxyConnection) sqlgGraph.tx().getConnection();\n try {\n Method m = BaseConnection.class.getMethod(\"String_Node_Str\", new Class[] {});\n Object[] arg = new Object[] {};\n CopyManager copyManager = (CopyManager) con.rawConnectionOperation(m, C3P0ProxyConnection.RAW_CONNECTION, arg);\n for (MetaEdge metaEdge : edgeCache.keySet()) {\n Pair<SortedSet<String>, Map<SqlgEdge, Triple<SqlgVertex, SqlgVertex, Map<String, Object>>>> triples = edgeCache.get(metaEdge);\n Map<String, PropertyType> propertyTypeMap = sqlgGraph.getSchemaManager().getAllTables().get(metaEdge.getSchemaTable().getSchema() + \"String_Node_Str\" + SchemaManager.EDGE_PREFIX + metaEdge.getSchemaTable().getTable());\n long endHigh;\n long numberInserted;\n try (InputStream is = mapEdgeToInputStream(propertyTypeMap, triples)) {\n StringBuilder sql = new StringBuilder();\n sql.append(\"String_Node_Str\");\n sql.append(maybeWrapInQoutes(schemaTable.getSchema()));\n sql.append(\"String_Node_Str\");\n sql.append(maybeWrapInQoutes(SchemaManager.EDGE_PREFIX + schemaTable.getTable()));\n sql.append(\"String_Node_Str\");\n for (Triple<SqlgVertex, SqlgVertex, Map<String, Object>> triple : triples.getRight().values()) {\n int count = 1;\n sql.append(maybeWrapInQoutes(triple.getLeft().getSchema() + \"String_Node_Str\" + triple.getLeft().getTable() + SchemaManager.OUT_VERTEX_COLUMN_END));\n sql.append(\"String_Node_Str\");\n sql.append(maybeWrapInQoutes(triple.getMiddle().getSchema() + \"String_Node_Str\" + triple.getMiddle().getTable() + SchemaManager.IN_VERTEX_COLUMN_END));\n for (String key : triples.getLeft()) {\n if (count <= triples.getLeft().size()) {\n sql.append(\"String_Node_Str\");\n }\n count++;\n appendKeyForStream(propertyTypeMap.get(key), sql, key);\n }\n break;\n }\n sql.append(\"String_Node_Str\");\n sql.append(\"String_Node_Str\");\n sql.append(COPY_COMMAND_DELIMITER);\n sql.append(\"String_Node_Str\");\n sql.append(\"String_Node_Str\");\n sql.append(COPY_COMMAND_QUOTE);\n sql.append(\"String_Node_Str\");\n if (logger.isDebugEnabled()) {\n logger.debug(sql.toString());\n }\n numberInserted = copyManager.copyIn(sql.toString(), is);\n try (PreparedStatement preparedStatement = con.prepareStatement(\"String_Node_Str\" + schemaTable.getSchema() + \"String_Node_Str\" + SchemaManager.EDGE_PREFIX + schemaTable.getTable() + \"String_Node_Str\")) {\n ResultSet resultSet = preparedStatement.executeQuery();\n resultSet.next();\n endHigh = resultSet.getLong(1);\n resultSet.close();\n }\n long id = endHigh - numberInserted + 1;\n for (SqlgEdge sqlgEdge : triples.getRight().keySet()) {\n sqlgEdge.setInternalPrimaryKey(RecordId.from(schemaTable, id++));\n }\n }\n }\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n}\n"
"public static void startWorldLoading() {\n Config conf = new Config(UltimateFileLoader.DFworlds);\n for (String str : conf.getKeys(false)) {\n try {\n WorldCreator w = new WorldCreator(str);\n if (conf.contains(str + \"String_Node_Str\")) {\n w.environment(Environment.valueOf(conf.getString(str + \"String_Node_Str\")));\n Bukkit.createWorld(w);\n }\n } catch (Exception ex) {\n r.log(\"String_Node_Str\" + str);\n ErrorLogger.log(ex, \"String_Node_Str\" + str);\n }\n }\n}\n"
"public void executeMigrationTasksForLogon(final Project project, final boolean beforeLogon, final IProgressMonitor monitorWrap) {\n String taskDesc = \"String_Node_Str\" + project.getLabel() + \"String_Node_Str\";\n log.trace(taskDesc);\n final List<IProjectMigrationTask> toExecute = GetTasksHelper.getProjectTasks(beforeLogon);\n final List<MigrationTask> done = new ArrayList<MigrationTask>(project.getEmfProject().getMigrationTask());\n if (beforeLogon) {\n boolean isNewProject = project.getEmfProject().getProductVersion() == null ? true : false;\n setMigrationOnNewProject(beforeLogon && isNewProject && done.isEmpty());\n if (isNewProject && !RelationshipItemBuilder.INDEX_VERSION.equals(project.getEmfProject().getItemsRelationVersion())) {\n project.getEmfProject().setItemsRelationVersion(RelationshipItemBuilder.INDEX_VERSION);\n }\n }\n sortMigrationTasks(toExecute);\n int nbMigrationsToDo = 0;\n for (IProjectMigrationTask task : toExecute) {\n MigrationTask mgTask = MigrationUtil.findMigrationTask(done, task);\n if (mgTask == null && !task.isDeprecated()) {\n nbMigrationsToDo++;\n }\n }\n if (!beforeLogon && (!RelationshipItemBuilder.INDEX_VERSION.equals(project.getEmfProject().getItemsRelationVersion()) || nbMigrationsToDo > 0)) {\n MigrationUtil.removeMigrationTaskById(done, RELATION_TASK);\n RelationshipItemBuilder.getInstance().unloadRelations();\n nbMigrationsToDo++;\n }\n if (nbMigrationsToDo == 0) {\n return;\n }\n MigrationUtil.removeMigrationTaskById(done, \"String_Node_Str\");\n boolean haveAnyBinFolder = false;\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n IProject fsProject = workspace.getRoot().getProject(project.getTechnicalLabel());\n for (ERepositoryObjectType type : (ERepositoryObjectType[]) ERepositoryObjectType.values()) {\n if (!type.hasFolder()) {\n continue;\n }\n String folderName = ERepositoryObjectType.getFolderName(type);\n if (folderName == null || \"String_Node_Str\".equals(folderName)) {\n continue;\n }\n IFolder folder = fsProject.getFolder(folderName);\n if (folder.exists() && folder.getFolder(\"String_Node_Str\").exists()) {\n haveAnyBinFolder = true;\n break;\n }\n }\n if (haveAnyBinFolder) {\n MigrationUtil.removeMigrationTaskById(done, \"String_Node_Str\");\n }\n final SubProgressMonitor subProgressMonitor = new SubProgressMonitor(monitorWrap, toExecute.size());\n IRepositoryService service = (IRepositoryService) GlobalServiceRegister.getDefault().getService(IRepositoryService.class);\n final IProxyRepositoryFactory repFactory = service.getProxyRepositoryFactory();\n RepositoryWorkUnit repositoryWorkUnit = new RepositoryWorkUnit(project, taskDesc) {\n public void run() throws PersistenceException {\n final IWorkspaceRunnable op = new IWorkspaceRunnable() {\n public void run(IProgressMonitor monitor) throws CoreException {\n try {\n boolean needSave = false;\n if (!isMigrationOnNewProject()) {\n if (!beforeLogon) {\n ERepositoryObjectType[] types = (ERepositoryObjectType[]) ERepositoryObjectType.values();\n Arrays.sort(types, new Comparator<ERepositoryObjectType>() {\n public int compare(ERepositoryObjectType arg0, ERepositoryObjectType arg1) {\n if (arg0 == ERepositoryObjectType.PROCESS) {\n return 1;\n }\n if (arg0 == ERepositoryObjectType.JOBLET) {\n return 1;\n }\n return 0;\n }\n });\n for (ERepositoryObjectType type : types) {\n if (!type.isResourceItem()) {\n continue;\n }\n List<IRepositoryViewObject> objects = repFactory.getAll(project, type, true, true);\n for (IRepositoryViewObject object : objects) {\n Item item = object.getProperty().getItem();\n monitorWrap.subTask(\"String_Node_Str\" + item.getProperty().getLabel());\n subProgressMonitor.worked(1);\n for (IProjectMigrationTask task : toExecute) {\n if (monitorWrap.isCanceled()) {\n throw new OperationCanceledException(Messages.getString(\"String_Node_Str\", task.getName()));\n }\n MigrationTask mgTask = MigrationUtil.findMigrationTask(done, task);\n if (mgTask == null && !task.isDeprecated()) {\n ExecutionResult status = task.execute(project, item);\n switch(status) {\n case SUCCESS_WITH_ALERT:\n if (task.getStatus() != ExecutionResult.FAILURE) {\n task.setStatus(status);\n }\n case SUCCESS_NO_ALERT:\n if (task.getStatus() != ExecutionResult.FAILURE) {\n task.setStatus(status);\n }\n case NOTHING_TO_DO:\n if (task.getStatus() != ExecutionResult.SUCCESS_WITH_ALERT && task.getStatus() != ExecutionResult.SUCCESS_NO_ALERT && task.getStatus() != ExecutionResult.FAILURE) {\n task.setStatus(status);\n }\n break;\n case SKIPPED:\n if (task.getStatus() != ExecutionResult.SUCCESS_WITH_ALERT && task.getStatus() != ExecutionResult.SUCCESS_NO_ALERT && task.getStatus() != ExecutionResult.FAILURE) {\n task.setStatus(status);\n }\n break;\n case FAILURE:\n task.setStatus(status);\n default:\n task.setStatus(status);\n break;\n }\n }\n }\n if (object instanceof RepositoryObject) {\n ((RepositoryObject) object).unload();\n }\n }\n monitorWrap.subTask(\"String_Node_Str\");\n }\n }\n for (IProjectMigrationTask task : toExecute) {\n MigrationTask mgTask = MigrationUtil.findMigrationTask(done, task);\n if (mgTask == null && !task.isDeprecated()) {\n try {\n ExecutionResult status;\n if (beforeLogon) {\n status = task.execute(project);\n task.setStatus(status);\n } else {\n status = task.getStatus();\n }\n switch(status) {\n case SUCCESS_WITH_ALERT:\n if (!isMigrationOnNewProject()) {\n doneThisSession.add(task);\n }\n case SUCCESS_NO_ALERT:\n log.debug(\"String_Node_Str\" + task.getName() + \"String_Node_Str\");\n case NOTHING_TO_DO:\n done.add(MigrationUtil.convertMigrationTask(task));\n needSave = true;\n break;\n case SKIPPED:\n log.debug(\"String_Node_Str\" + task.getName() + \"String_Node_Str\");\n break;\n case FAILURE:\n default:\n log.debug(\"String_Node_Str\" + task.getName() + \"String_Node_Str\");\n break;\n }\n } catch (Exception e) {\n ExceptionHandler.process(e);\n log.debug(\"String_Node_Str\" + task.getName() + \"String_Node_Str\");\n }\n } else if (mgTask == null && task.isDeprecated()) {\n done.add(MigrationUtil.convertMigrationTask(task));\n needSave = true;\n }\n }\n } else {\n for (IProjectMigrationTask task : toExecute) {\n task.setStatus(ExecutionResult.NOTHING_TO_DO);\n done.add(MigrationUtil.convertMigrationTask(task));\n }\n needSave = true;\n }\n if (needSave) {\n saveProjectMigrationTasksDone(project, done);\n }\n if (!RelationshipItemBuilder.INDEX_VERSION.equals(project.getEmfProject().getItemsRelationVersion())) {\n project.getEmfProject().setItemsRelationVersion(RelationshipItemBuilder.INDEX_VERSION);\n }\n if (!isMigrationOnNewProject()) {\n RelationshipItemBuilder.getInstance().saveRelations();\n }\n } catch (PersistenceException e) {\n throw new CoreException(new Status(Status.ERROR, \"String_Node_Str\", e.getMessage(), e));\n }\n }\n };\n try {\n IWorkspace workspace1 = ResourcesPlugin.getWorkspace();\n ISchedulingRule schedulingRule = workspace1.getRoot();\n workspace1.run(op, schedulingRule, IWorkspace.AVOID_UPDATE, monitorWrap);\n } catch (CoreException e) {\n throw new PersistenceException(e);\n }\n }\n };\n repositoryWorkUnit.setAvoidUnloadResources(true);\n repFactory.executeRepositoryWorkUnit(repositoryWorkUnit);\n if (!beforeLogon) {\n setMigrationOnNewProject(false);\n }\n}\n"
"protected void performAdd(java.awt.Point imagePosition, OpenGLContext context) {\n if (type.equals(GeometricLayer.POINT)) {\n selectedGeometry = gf.createPoint(new Coordinate(imagePosition.x, imagePosition.y));\n int size = glayer.getGeometries().size();\n Integer maxVal = 0;\n for (int i = 0; i < size; i++) {\n Integer val = (Integer) ((AttributesGeometry) glayer.getGeometries().get(i).getUserData()).get(VDSSchema.ID);\n if (val > maxVal)\n maxVal = val;\n }\n maxVal++;\n AttributesGeometry atts = null;\n atts = new AttributesGeometry(VDSSchema.schema, VDSSchema.types);\n atts.set(VDSSchema.ID, maxVal);\n final AttributesEditor ae = new AttributesEditor(new java.awt.Frame(), true);\n ae.setAttributes(atts);\n ae.setVisible(true);\n HashMap<String, Object> newMapVals = ae.getAttributesValues();\n atts = setNewAttributeValues(atts, newMapVals);\n glayer.put(selectedGeometry, atts);\n ae.addWindowListener(new WindowAdapter() {\n public void windowClosed(WindowEvent e) {\n try {\n } catch (Throwable t) {\n t.printStackTrace();\n }\n }\n });\n }\n}\n"
"public boolean replaceEvent(GameEvent event, Ability source, Game game) {\n Zone fromZone = ((ZoneChangeEvent) event).getFromZone();\n Card card = game.getCard(event.getTargetId());\n UUID sourceId = event.getSourceId();\n UUID controllerId = event.getPlayerId();\n Object object = game.getState().getValue(\"String_Node_Str\" + card.getId());\n if (object != null && object instanceof PermanentCard) {\n return false;\n }\n UUID targetId = null;\n MageObject sourceObject = game.getObject(sourceId);\n if (sourceObject instanceof StackAbility) {\n StackAbility stackAbility = (StackAbility) sourceObject;\n if (!stackAbility.getEffects().isEmpty()) {\n targetId = stackAbility.getEffects().get(0).getTargetPointer().getFirst(game, stackAbility);\n }\n }\n if (targetId == null) {\n Target target = card.getSpellAbility().getTargets().get(0);\n Player player = game.getPlayer(card.getOwnerId());\n if (player != null && player.choose(Outcome.BoostCreature, target, card.getId(), game)) {\n targetId = target.getFirstTarget();\n }\n }\n Permanent targetPermanent = game.getPermanent(targetId);\n Player targetPlayer = game.getPlayer(targetId);\n if (targetPermanent != null || targetPlayer != null) {\n switch(fromZone) {\n case GRAVEYARD:\n game.getPlayer(card.getOwnerId()).removeFromGraveyard(card, game);\n break;\n case HAND:\n game.getPlayer(card.getOwnerId()).removeFromHand(card, game);\n break;\n case LIBRARY:\n game.getPlayer(card.getOwnerId()).removeFromLibrary(card, game);\n break;\n default:\n }\n game.rememberLKI(card.getId(), fromZone, card);\n PermanentCard permanent = new PermanentCard(card, card.getOwnerId());\n game.getBattlefield().addPermanent(permanent);\n game.setZone(card.getId(), Zone.BATTLEFIELD);\n game.applyEffects();\n permanent.entersBattlefield(event.getSourceId(), game, fromZone, true);\n game.applyEffects();\n game.fireEvent(new ZoneChangeEvent(permanent, controllerId, fromZone, Zone.BATTLEFIELD));\n if (targetPermanent != null) {\n targetPermanent.addAttachment(permanent.getId(), game);\n }\n if (targetPlayer != null) {\n targetPlayer.addAttachment(permanent.getId(), game);\n }\n }\n return true;\n}\n"
"protected Map<ExportChoice, Object> getExportChoiceMap() {\n JobExportType comboType = JobExportType.getTypeFromString(exportTypeCombo.getText());\n if (comboType.equals(JobExportType.POJO)) {\n return JavaJobScriptsExportWSWizardPage.super.getExportChoiceMap();\n }\n Map<ExportChoice, Object> exportChoiceMap = new EnumMap<ExportChoice, Object>(ExportChoice.class);\n if (comboType.equals(JobExportType.PETALSESB)) {\n exportChoiceMap.put(ExportChoice.needSourceCode, sourceButton.getSelection());\n exportChoiceMap.put(ExportChoice.needDependencies, Boolean.TRUE);\n exportChoiceMap.put(ExportChoice.needUserRoutine, userRoutineButton.getSelection());\n return exportChoiceMap;\n }\n exportChoiceMap.put(ExportChoice.needJobItem, false);\n exportChoiceMap.put(ExportChoice.needSourceCode, false);\n if (comboType.equals(JobExportType.JBOSSESB)) {\n exportChoiceMap.put(ExportChoice.needMetaInfo, true);\n exportChoiceMap.put(ExportChoice.needContext, contextButton.getSelection());\n exportChoiceMap.put(ExportChoice.esbQueueMessageName, esbQueueMessageName.getText());\n exportChoiceMap.put(ExportChoice.esbServiceName, esbServiceName.getText());\n exportChoiceMap.put(ExportChoice.esbCategory, esbCategory.getText());\n exportChoiceMap.put(ExportChoice.esbExportType, esbTypeCombo.getText());\n exportChoiceMap.put(ExportChoice.needDependencies, exportDependencies.getSelection());\n exportChoiceMap.put(ExportChoice.needJobItem, jobItemButton.getSelection());\n exportChoiceMap.put(ExportChoice.needSourceCode, jobItemButton.getSelection());\n return exportChoiceMap;\n }\n if (comboType.equals(JobExportType.OSGI)) {\n exportChoiceMap.put(ExportChoice.needMetaInfo, true);\n exportChoiceMap.put(ExportChoice.needContext, true);\n exportChoiceMap.put(ExportChoice.needJobItem, false);\n exportChoiceMap.put(ExportChoice.needSourceCode, false);\n return exportChoiceMap;\n }\n exportChoiceMap.put(ExportChoice.needJobItem, jobScriptButton.getSelection());\n exportChoiceMap.put(ExportChoice.needSourceCode, jobScriptButton.getSelection());\n exportChoiceMap.put(ExportChoice.needWEBXML, webXMLButton.getSelection());\n exportChoiceMap.put(ExportChoice.needCONFIGFILE, configFileButton.getSelection());\n exportChoiceMap.put(ExportChoice.needAXISLIB, axisLibButton.getSelection());\n exportChoiceMap.put(ExportChoice.needWSDD, wsddButton.getSelection());\n exportChoiceMap.put(ExportChoice.needWSDL, wsdlButton.getSelection());\n exportChoiceMap.put(ExportChoice.needJobScript, jobScriptButton.getSelection());\n exportChoiceMap.put(ExportChoice.needContext, contextButton.getSelection());\n exportChoiceMap.put(ExportChoice.applyToChildren, applyToChildrenButton.getSelection());\n if (comboType.equals(JobExportType.WSWAR)) {\n exportChoiceMap.put(ExportChoice.needMetaInfo, true);\n exportChoiceMap.put(ExportChoice.needJobItem, true);\n exportChoiceMap.put(ExportChoice.needDependencies, true);\n exportChoiceMap.put(ExportChoice.needSourceCode, true);\n } else {\n exportChoiceMap.put(ExportChoice.needMetaInfo, false);\n }\n return exportChoiceMap;\n}\n"
"public List<ElementParameter> resetParameters() {\n final List<ElementParameter> newParameters = new ArrayList<>();\n List<ElementParameter> currentParameters = (List<ElementParameter>) element.getElementParameters();\n List<ElementParameter> parameters = new ArrayList<>();\n ComponentService componentService = internalService.getComponentService();\n Connection theConnection = null;\n if (connectionItem != null) {\n theConnection = connectionItem.getConnection();\n }\n Properties properties = null;\n PropertyValueEvaluator evaluator = null;\n if (element instanceof FakeElement) {\n properties = form.getProperties();\n evaluator = new MetadataContextPropertyValueEvaluator(theConnection);\n currentParameters.clear();\n } else {\n properties = ((INode) element).getComponentProperties();\n evaluator = new ComponentContextPropertyValueEvaluator((INode) element);\n }\n if (properties instanceof ComponentProperties) {\n properties.setValueEvaluator(evaluator);\n properties.refreshLayout(form);\n properties.setValueEvaluator(null);\n parameters = ComponentsUtils.getParametersFromForm(element, false, section, (ComponentProperties) properties, form);\n addUpdateParameterIfNotExist(parameters);\n properties.setValueEvaluator(evaluator);\n }\n for (ElementParameter parameter : parameters) {\n if (parameter instanceof GenericElementParameter) {\n GenericElementParameter genericElementParameter = (GenericElementParameter) parameter;\n genericElementParameter.setComponentService(componentService);\n genericElementParameter.setDrivedByForm(drivedByForm);\n genericElementParameter.callBeforePresent();\n genericElementParameter.addPropertyChangeListener(this);\n if (EParameterFieldType.SCHEMA_REFERENCE.equals(genericElementParameter.getFieldType())) {\n if (genericElementParameter.getChildParameters().size() == 0) {\n IElementParameter schemaParameter = element.getElementParameterFromField(EParameterFieldType.SCHEMA_REFERENCE, section);\n genericElementParameter.getChildParameters().putAll(schemaParameter.getChildParameters());\n }\n } else if (EParameterFieldType.NAME_SELECTION_AREA.equals(genericElementParameter.getFieldType()) && theConnection != null) {\n List<NamedThing> values = new ArrayList<>();\n List<MetadataTable> metadataTables = SchemaUtils.getMetadataTables(theConnection, SubContainer.class);\n List<String> tableLabels = new ArrayList<>();\n for (MetadataTable metaTable : metadataTables) {\n tableLabels.add(metaTable.getLabel());\n }\n List<NamedThing> possibleValues = ComponentsUtils.getFormalPossibleValues(genericElementParameter);\n for (NamedThing possibleValue : possibleValues) {\n if (tableLabels.contains(possibleValue.getName())) {\n values.add(possibleValue);\n }\n genericElementParameter.setValue(values);\n }\n }\n if (properties != null && isRepository(element)) {\n String repositoryValue = genericElementParameter.getRepositoryValue();\n if (repositoryValue == null) {\n if (genericElementParameter.getValue() != null) {\n genericElementParameter.setRepositoryValue(genericElementParameter.getName());\n repositoryValue = genericElementParameter.getRepositoryValue();\n }\n }\n if (genericElementParameter.isShow(currentParameters) && (repositoryValue != null) && (!genericElementParameter.getName().equals(EParameterName.PROPERTY_TYPE.getName())) && genericElementParameter.getCategory() == section) {\n org.talend.daikon.properties.Property property = properties.getValuedProperty(genericElementParameter.getName());\n if (property != null && property.getTaggedValue(IGenericConstants.REPOSITORY_VALUE) != null) {\n genericElementParameter.setRepositoryValueUsed(true);\n genericElementParameter.setReadOnly(true);\n }\n }\n }\n }\n }\n boolean added = false;\n for (ElementParameter currentParameter : currentParameters) {\n if (EParameterName.UPDATE_COMPONENTS.getName().equals(currentParameter.getName())) {\n currentParameter.setValue(true);\n }\n if (currentParameter.isSerialized() && currentParameter.getCategory().equals(section)) {\n if (!added) {\n newParameters.addAll(parameters);\n added = true;\n }\n continue;\n }\n newParameters.add(currentParameter);\n }\n if (element instanceof FakeElement) {\n newParameters.addAll(parameters);\n }\n element.setElementParameters(newParameters);\n return newParameters;\n}\n"
"public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) {\n super.onUpdate(stack, world, entity, par4, par5);\n if (stack.hasTagCompound()) {\n if (stack.stackTagCompound.hasKey(\"String_Node_Str\")) {\n int delay = stack.stackTagCompound.getInteger(\"String_Node_Str\");\n if (delay > 0) {\n delay--;\n }\n stack.stackTagCompound.setInteger(\"String_Node_Str\", delay);\n }\n }\n}\n"
"private synchronized void open() {\n File dir = new File(directory);\n if (!dir.isAbsolute())\n dir = new File(System.getProperty(\"String_Node_Str\"), directory);\n if (!dir.mkdirs() && !dir.isDirectory()) {\n log.log(Level.SEVERE, sm.getString(\"String_Node_Str\", dir));\n }\n try {\n String pathname;\n if (rotatable) {\n pathname = dir.getAbsolutePath() + File.separator + prefix + dateStamp + suffix;\n } else {\n pathname = dir.getAbsolutePath() + File.separator + prefix + suffix;\n }\n writer = new PrintWriter(new FileWriter(pathname, true), true);\n } catch (IOException e) {\n writer = null;\n }\n}\n"
"public <T extends Document> T fromRow(Collection<T> collection, RDBRow row) throws DocumentStoreException {\n T doc = collection.newDocument(store);\n doc.put(ID, row.getId());\n doc.put(MODIFIED, row.getModified());\n doc.put(MODCOUNT, row.getModcount());\n if (RDBDocumentStore.USECMODCOUNT) {\n doc.put(CMODCOUNT, row.getCollisionsModcount());\n }\n if (row.hasBinaryProperties()) {\n doc.put(HASBINARY, NodeDocument.HAS_BINARY_VAL);\n }\n if (row.deletedOnce()) {\n doc.put(DELETEDONCE, Boolean.TRUE);\n }\n byte[] bdata = row.getBdata();\n boolean blobInUse = false;\n JsopTokenizer json;\n try {\n if (bdata != null && bdata.length != 0) {\n String s = fromBlobData(bdata);\n json = new JsopTokenizer(s);\n json.read('{');\n readDocumentFromJson(json, doc);\n json.read(JsopReader.END);\n blobInUse = true;\n }\n } catch (Exception ex) {\n throw new DocumentStoreException(ex);\n }\n try {\n json = new JsopTokenizer(row.getData());\n int next = json.read();\n if (next == '{') {\n if (blobInUse) {\n throw new DocumentStoreException(\"String_Node_Str\" + row.getData());\n }\n readDocumentFromJson(json, doc);\n } else if (next == JsopReader.STRING) {\n if (!blobInUse) {\n throw new DocumentStoreException(\"String_Node_Str\" + row.getData());\n }\n if (!\"String_Node_Str\".equals(json.getToken())) {\n throw new DocumentStoreException(\"String_Node_Str\");\n }\n } else {\n throw new DocumentStoreException(\"String_Node_Str\" + next + \"String_Node_Str\" + row.getData());\n }\n next = json.read();\n if (next == ',') {\n do {\n Object ob = readValueFromJson(json);\n if (!(ob instanceof List)) {\n throw new DocumentStoreException(\"String_Node_Str\" + ob);\n }\n List<List<Object>> update = (List<List<Object>>) ob;\n for (List<Object> op : update) {\n applyUpdate(doc, update, op);\n }\n } while (json.matches(','));\n }\n json.read(JsopReader.END);\n return doc;\n } catch (Exception ex) {\n throw new DocumentStoreException(ex);\n }\n}\n"
"public String getFailedTaskString() {\n final String description = jfailedTask.getDescription().isPresent() ? jfailedTask.getDescription().get().replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\") : \"String_Node_Str\";\n final String cause = jfailedTask.getReason().isPresent() ? jfailedTask.getReason().get().toString().replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\") : \"String_Node_Str\";\n final String data = jfailedTask.getData().isPresent() ? new String(jfailedTask.getData().get(), StandardCharsets.UTF_8).replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\") : \"String_Node_Str\";\n final String poorSerializedString = \"String_Node_Str\" + jfailedTask.getId().replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\" + jfailedTask.getMessage().replace(\"String_Node_Str\", \"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\" + description + \"String_Node_Str\" + cause + \"String_Node_Str\" + data;\n LOG.log(Level.INFO, \"String_Node_Str\" + poorSerializedString);\n return poorSerializedString;\n}\n"
"public long getRowId() {\n return rec.getRowId();\n}\n"
"private void init() {\n this.moveToMenu.setIcon(new ImageIcon(ImageLoader.getImage(ImageLoader.GROUPS_16x16_ICON)));\n this.addSubcontactMenu.setIcon(new ImageIcon(ImageLoader.getImage(ImageLoader.ADD_CONTACT_16x16_ICON)));\n this.removeContactMenu.setIcon(new ImageIcon(ImageLoader.getImage(ImageLoader.DELETE_16x16_ICON)));\n this.moveSubcontactMenu.setIcon(new ImageIcon(ImageLoader.getImage(ImageLoader.MOVE_CONTACT_ICON)));\n this.callContactMenu.setIcon(new ImageIcon(ImageLoader.getImage(ImageLoader.CALL_16x16_ICON)));\n Iterator providers = mainFrame.getProtocolProviders();\n if (providers.hasNext()) {\n JLabel infoLabel = new JLabel(GuiActivator.getResources().getI18NString(\"String_Node_Str\"));\n infoLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));\n infoLabel.setFont(Constants.FONT.deriveFont(Font.BOLD));\n this.addSubcontactMenu.add(infoLabel);\n this.addSubcontactMenu.addSeparator();\n }\n while (providers.hasNext()) {\n ProtocolProviderService pps = (ProtocolProviderService) providers.next();\n String protocolName = pps.getProtocolName();\n JMenuItem menuItem = new JMenuItem(pps.getAccountID().getDisplayName(), new ImageIcon(ImageLoader.getAccountStatusImage(pps)));\n menuItem.setName(addSubcontactPrefix + protocolName);\n menuItem.addActionListener(this);\n this.addSubcontactMenu.add(menuItem);\n }\n Iterator groups = this.mainFrame.getAllGroups();\n if (groups.hasNext()) {\n JLabel infoLabel = new JLabel(GuiActivator.getResources().getI18NString(\"String_Node_Str\"));\n infoLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));\n infoLabel.setFont(Constants.FONT.deriveFont(Font.BOLD));\n this.moveToMenu.add(infoLabel);\n this.moveToMenu.addSeparator();\n }\n while (groups.hasNext()) {\n MetaContactGroup group = (MetaContactGroup) groups.next();\n JMenuItem menuItem = new JMenuItem(group.getGroupName());\n menuItem.setName(moveToPrefix + group.getMetaUID());\n menuItem.addActionListener(this);\n this.moveToMenu.add(menuItem);\n }\n Iterator contacts = contactItem.getContacts();\n if (contactItem.getContactCount() > 1) {\n JMenuItem allItem = new JMenuItem(allContactsString);\n JMenuItem allItem1 = new JMenuItem(allContactsString);\n allItem.addActionListener(this);\n allItem1.addActionListener(this);\n allItem.setName(removeContactPrefix + \"String_Node_Str\");\n allItem1.setName(moveSubcontactPrefix + \"String_Node_Str\");\n this.removeContactMenu.add(allItem);\n this.moveSubcontactMenu.add(allItem1);\n this.removeContactMenu.addSeparator();\n this.moveSubcontactMenu.addSeparator();\n }\n while (contacts.hasNext()) {\n Contact contact = (Contact) contacts.next();\n ProtocolProviderService protocolProvider = contact.getProtocolProvider();\n String contactDisplayName = contact.getDisplayName();\n JMenuItem contactItem = new JMenuItem(contactDisplayName);\n JMenuItem contactItem1 = new JMenuItem(contactDisplayName);\n Icon protocolIcon = new ImageIcon(createContactStatusImage(contact));\n contactItem.setIcon(protocolIcon);\n contactItem1.setIcon(protocolIcon);\n contactItem.setName(removeContactPrefix + contact.getAddress() + protocolProvider.getProtocolName());\n contactItem1.setName(moveSubcontactPrefix + contact.getAddress() + protocolProvider.getProtocolName());\n contactItem.addActionListener(this);\n contactItem1.addActionListener(this);\n this.removeContactMenu.add(contactItem);\n this.moveSubcontactMenu.add(contactItem1);\n if (contact.getProtocolProvider().getOperationSet(OperationSetBasicTelephony.class) != null) {\n JMenuItem callContactItem = new JMenuItem(contactDisplayName);\n callContactItem.setIcon(protocolIcon);\n callContactItem.setName(callContactPrefix + contact.getAddress() + protocolProvider.getProtocolName());\n callContactItem.addActionListener(this);\n this.callContactMenu.add(callContactItem);\n }\n protocolProvider.getOperationSet(OperationSetWebContactInfo.class);\n }\n this.add(sendMessageItem);\n this.add(sendSmsItem);\n if (callContactMenu.getItemCount() > 1) {\n this.add(callContactMenu);\n } else {\n this.add(callItem);\n }\n this.add(sendFileItem);\n this.addSeparator();\n this.add(moveToMenu);\n this.add(moveSubcontactMenu);\n this.addSeparator();\n this.add(addSubcontactMenu);\n this.addSeparator();\n this.add(removeContactMenu);\n this.add(renameContactItem);\n this.addSeparator();\n this.add(viewHistoryItem);\n this.initPluginComponents();\n this.sendMessageItem.setName(\"String_Node_Str\");\n this.callItem.setName(\"String_Node_Str\");\n this.sendSmsItem.setName(\"String_Node_Str\");\n this.sendFileItem.setName(\"String_Node_Str\");\n this.moveToMenu.setName(\"String_Node_Str\");\n this.addSubcontactMenu.setName(\"String_Node_Str\");\n this.renameContactItem.setName(\"String_Node_Str\");\n this.viewHistoryItem.setName(\"String_Node_Str\");\n this.sendMessageItem.addActionListener(this);\n this.callItem.addActionListener(this);\n this.sendSmsItem.addActionListener(this);\n this.sendFileItem.addActionListener(this);\n this.renameContactItem.addActionListener(this);\n this.viewHistoryItem.addActionListener(this);\n if (contactItem.getDefaultContact(OperationSetFileTransfer.class) == null)\n this.sendFileItem.setEnabled(false);\n if (contactItem.getDefaultContact(OperationSetBasicTelephony.class) == null)\n this.callItem.setEnabled(false);\n if (contactItem.getDefaultContact(OperationSetBasicInstantMessaging.class) == null)\n this.sendMessageItem.setEnabled(false);\n if (contactItem.getDefaultContact(OperationSetSmsMessaging.class) == null)\n this.sendSmsItem.setEnabled(false);\n}\n"
"public void onCompleted(Exception e, PopcornTimeRpcClient.RpcResponse result) {\n try {\n if (result != null && e == null) {\n mCurrentMap = result.getMapResult();\n String title = (String) mCurrentMap.get(\"String_Node_Str\");\n String synopsis = (String) mCurrentMap.get(\"String_Node_Str\");\n String year = Integer.toString(((Double) mCurrentMap.get(\"String_Node_Str\")).intValue());\n String runtime = Integer.toString(((Double) mCurrentMap.get(\"String_Node_Str\")).intValue());\n String rating = (String) mCurrentMap.get(\"String_Node_Str\");\n titleText.setText(title);\n synopsisText.setText(synopsis);\n yearText.setText(year);\n runtimeText.setText(runtime + \"String_Node_Str\" + getString(R.string.minutes));\n ratingText.setText(rating + \"String_Node_Str\");\n String type = null;\n if (mCurrentMap.containsKey(\"String_Node_Str\"))\n type = (String) mCurrentMap.get(\"String_Node_Str\");\n final String posterUrl;\n if (type != null && type.equals(\"String_Node_Str\")) {\n posterUrl = ((String) mCurrentMap.get(\"String_Node_Str\")).replace(\"String_Node_Str\", \"String_Node_Str\");\n } else {\n LinkedTreeMap<String, String> images = (LinkedTreeMap<String, String>) mCurrentMap.get(\"String_Node_Str\");\n posterUrl = images.get(\"String_Node_Str\").replace(\"String_Node_Str\", \"String_Node_Str\");\n }\n final String backdropUrl;\n if (type != null && type.equals(\"String_Node_Str\")) {\n backdropUrl = (String) mCurrentMap.get(\"String_Node_Str\");\n } else {\n LinkedTreeMap<String, String> images = (LinkedTreeMap<String, String>) mCurrentMap.get(\"String_Node_Str\");\n backdropUrl = images.get(\"String_Node_Str\");\n }\n Bitmap poster = Picasso.with(getActivity()).load(posterUrl).get();\n Palette palette = Palette.generate(poster);\n try {\n int vibrantColor = palette.getVibrantColor(R.color.primary);\n final int color;\n if (vibrantColor == R.color.primary) {\n color = palette.getMutedColor(R.color.primary);\n } else {\n color = vibrantColor;\n }\n final ObjectAnimator mainInfoBlockColorFade = ObjectAnimator.ofObject(mainInfoBlock, \"String_Node_Str\", new ArgbEvaluator(), getResources().getColor(R.color.primary), color);\n mainInfoBlockColorFade.setDuration(500);\n Drawable oldDrawable = PixelUtils.changeDrawableColor(getActivity(), R.drawable.ic_av_play_button, getResources().getColor(R.color.primary));\n mPlayButtonDrawable = PixelUtils.changeDrawableColor(getActivity(), R.drawable.ic_av_play_button, color);\n final TransitionDrawable td = new TransitionDrawable(new Drawable[] { oldDrawable, mPlayButtonDrawable });\n mHandler.post(new Runnable() {\n\n public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {\n if (bitmap != null) {\n Palette.generateAsync(bitmap, new Palette.PaletteAsyncListener() {\n public void onGenerated(Palette palette) {\n try {\n int vibrantColor = palette.getVibrantColor(R.color.primary);\n final int color;\n if (vibrantColor == R.color.primary) {\n color = palette.getMutedColor(R.color.primary);\n } else {\n color = vibrantColor;\n }\n final ObjectAnimator mainInfoBlockColorFade = ObjectAnimator.ofObject(mainInfoBlock, \"String_Node_Str\", new ArgbEvaluator(), getResources().getColor(R.color.primary), color);\n mainInfoBlockColorFade.setDuration(500);\n Drawable oldDrawable = PixelUtils.changeDrawableColor(getActivity(), R.drawable.ic_av_play_button, getResources().getColor(R.color.primary));\n mPlayButtonDrawable = PixelUtils.changeDrawableColor(getActivity(), R.drawable.ic_av_play_button, color);\n final TransitionDrawable td = new TransitionDrawable(new Drawable[] { oldDrawable, mPlayButtonDrawable });\n playButton.setImageDrawable(td);\n Picasso.with(getActivity()).load(backdropUrl).into(coverImage, new com.squareup.picasso.Callback() {\n public void onSuccess() {\n mainInfoBlockColorFade.start();\n td.startTransition(500);\n mFadingHelper.actionBarBackground(ActionBarBackground.getColoredBackground(color)).initActionBar(getActivity());\n }\n public void onError() {\n }\n });\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n }\n }\n public void onBitmapFailed(Drawable errorDrawable) {\n }\n public void onPrepareLoad(Drawable placeHolderDrawable) {\n }\n });\n }\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n}\n"
"public boolean equals(Object obj) {\n return this == obj || (obj instanceof RpcMetadataResponse && Objects.equals(serverAddress, ((RpcMetadataResponse) obj).serverAddress));\n}\n"
"private void createPanel(Composite parent) {\n Composite mainPanel = WidgetFactory.createPanel(parent, SWT.NONE, GridData.FILL_BOTH, 1, 1);\n Composite headerPanel = WidgetFactory.createPanel(mainPanel, SWT.NONE, GridData.FILL_HORIZONTAL, 1, 2);\n headerPanel.setLayout(new GridLayout(2, false));\n Label label = new Label(headerPanel, SWT.NONE);\n label.setText(\"String_Node_Str\");\n this.modelNameText = new Text(headerPanel, SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY);\n this.modelNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n this.modelNameText.setBackground(headerPanel.getBackground());\n this.modelNameText.setForeground(GlobalUiColorManager.EMPHASIS_COLOR);\n label = new Label(headerPanel, SWT.NONE);\n label.setText(\"String_Node_Str\");\n this.modelLocationText = new Text(headerPanel, SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY);\n this.modelLocationText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n this.modelLocationText.setBackground(headerPanel.getBackground());\n this.modelLocationText.setForeground(GlobalUiColorManager.EMPHASIS_COLOR);\n CTabFolder tabFolder = WidgetFactory.createTabFolder(mainPanel);\n CTabItem bindingsTab = new CTabItem(tabFolder, SWT.NONE);\n bindingsTab.setText(Messages.modelDetailsPanel_sourceBindingDefinition);\n bindingsTab.setToolTipText(Messages.modelDetailsPanel_sourceBindingDefinitionTooltip);\n Composite sourceBindingsGroup = new Composite(tabFolder, SWT.NONE);\n sourceBindingsGroup.setLayout(new GridLayout(1, false));\n sourceBindingsGroup.setLayoutData(new GridData(GridData.FILL_BOTH));\n bindingsTab.setControl(sourceBindingsGroup);\n SOURCE_BINDING_PANEL: {\n Composite subPanel_1 = WidgetFactory.createPanel(sourceBindingsGroup, SWT.NONE, GridData.FILL_HORIZONTAL, 1, 4);\n subPanel_1.setLayout(new GridLayout(4, false));\n multiSourceCB = WidgetFactory.createButton(subPanel_1, Messages.modelDetailsPanel_multiSourceLabel, SWT.NONE, 1, SWT.CHECK);\n multiSourceCB.setToolTipText(Messages.modelDetailsPanel_multiSourceCheckBoxTooltip);\n multiSourceCB.addSelectionListener(new SelectionListener() {\n public void widgetSelected(SelectionEvent e) {\n if (selectedVdbModelEntry != null) {\n selectedVdbModelEntry.getSourceInfo().setIsMultiSource(multiSourceCB.getSelection());\n }\n refreshModelDetails();\n }\n public void widgetDefaultSelected(SelectionEvent e) {\n }\n });\n addColumnCB = WidgetFactory.createButton(subPanel_1, Messages.modelDetailsPanel_addColumnLabel + \"String_Node_Str\", SWT.NONE, 1, SWT.CHECK);\n addColumnCB.setToolTipText(Messages.modelDetailsPanel_addColumnCheckBoxTooltip);\n addColumnCB.addSelectionListener(new SelectionListener() {\n public void widgetSelected(SelectionEvent e) {\n if (selectedVdbModelEntry != null) {\n selectedVdbModelEntry.getSourceInfo().setAddColumn(addColumnCB.getSelection());\n }\n refreshModelDetails();\n }\n public void widgetDefaultSelected(SelectionEvent e) {\n }\n });\n columnAliaslabel = new Label(subPanel_1, SWT.NONE);\n columnAliaslabel.setText(\"String_Node_Str\");\n columnAliaslabel.setToolTipText(Messages.modelDetailsPanel_columnAliaslabelTooltip);\n columnAliasText = new Text(subPanel_1, SWT.BORDER | SWT.SINGLE);\n columnAliasText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n columnAliasText.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent e) {\n selectedVdbModelEntry.getSourceInfo().setColumnAlias(columnAliasText.getText());\n }\n });\n Composite lowerPanel = WidgetFactory.createPanel(sourceBindingsGroup, SWT.NONE, GridData.FILL_BOTH, 2, 1);\n lowerPanel.setLayout(new GridLayout(2, false));\n GridData gridData = new GridData(GridData.FILL_BOTH | GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING);\n gridData.grabExcessHorizontalSpace = true;\n gridData.grabExcessVerticalSpace = true;\n lowerPanel.setLayoutData(gridData);\n Composite leftToolbarPanel = WidgetFactory.createPanel(lowerPanel, SWT.NONE, GridData.FILL_VERTICAL);\n GridLayout tbGL = new GridLayout();\n tbGL.marginHeight = 0;\n tbGL.marginWidth = 0;\n tbGL.verticalSpacing = 2;\n leftToolbarPanel.setLayout(tbGL);\n addButton = new Button(leftToolbarPanel, SWT.PUSH);\n addButton.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.ADD));\n addButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n addButton.setEnabled(false);\n addButton.setToolTipText(Messages.modelDetailsPanel_addButtonTooltip);\n addButton.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n int numSources = selectedVdbModelEntry.getSourceInfo().getSources().size();\n boolean added = false;\n while (!added) {\n String newName = \"String_Node_Str\" + numSources;\n added = selectedVdbModelEntry.getSourceInfo().add(newName, \"String_Node_Str\", \"String_Node_Str\");\n if (!added)\n numSources++;\n }\n refreshModelDetails();\n }\n });\n deleteButton = new Button(leftToolbarPanel, SWT.PUSH);\n deleteButton.setText(UILabelUtil.getLabel(UiLabelConstants.LABEL_IDS.DELETE));\n deleteButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n deleteButton.setEnabled(false);\n deleteButton.setToolTipText(Messages.modelDetailsPanel_deleteButtonTooltip);\n deleteButton.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n IStructuredSelection selection = (IStructuredSelection) bindingsViewer.getSelection();\n for (Object obj : selection.toArray()) {\n if (obj instanceof VdbSource) {\n selectedVdbModelEntry.getSourceInfo().removeSource((VdbSource) obj);\n refreshModelDetails();\n }\n }\n }\n });\n BINDING_TABLE: {\n int tableStyle = SWT.SINGLE | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;\n bindingsViewer = new TableViewer(lowerPanel, tableStyle);\n Table table = bindingsViewer.getTable();\n table.setLayout(new TableLayout());\n final GridData tblGD = new GridData(GridData.FILL_BOTH);\n tblGD.grabExcessHorizontalSpace = true;\n tblGD.grabExcessVerticalSpace = true;\n table.setLayoutData(tblGD);\n table.setHeaderVisible(true);\n table.setLinesVisible(true);\n TableViewerColumn column = new TableViewerColumn(bindingsViewer, SWT.LEFT);\n column.getColumn().setText(Messages.modelDetailsPanel_sourceNameLabel + \"String_Node_Str\");\n column.setEditingSupport(new SourceNameTextEditingSupport(bindingsViewer));\n column.setLabelProvider(new BindingDataLabelProvider(0));\n column.getColumn().pack();\n column = new TableViewerColumn(bindingsViewer, SWT.LEFT);\n column.getColumn().setText(Messages.modelDetailsPanel_translatorNameLabel + \"String_Node_Str\");\n column.setEditingSupport(new TranslatorEditingSupport(bindingsViewer, vdbEditor.getVdb().getFile()));\n column.setLabelProvider(new BindingDataLabelProvider(1));\n column.getColumn().pack();\n column = new TableViewerColumn(bindingsViewer, SWT.LEFT);\n column.getColumn().setText(Messages.modelDetailsPanel_jndiNameLabel + \"String_Node_Str\");\n column.setEditingSupport(new JndiEditingSupport(bindingsViewer, vdbEditor.getVdb().getFile()));\n column.setLabelProvider(new BindingDataLabelProvider(2));\n column.getColumn().pack();\n bindingsViewer.addSelectionChangedListener(new ISelectionChangedListener() {\n public void selectionChanged(SelectionChangedEvent event) {\n IStructuredSelection sel = (IStructuredSelection) event.getSelection();\n if (sel.isEmpty()) {\n deleteButton.setEnabled(false);\n } else if (selectedVdbModelEntry.getSourceInfo().isMultiSource()) {\n boolean enable = true;\n Object[] objs = sel.toArray();\n for (Object obj : objs) {\n if (!(obj instanceof VdbSource)) {\n enable = false;\n break;\n }\n }\n if (objs.length == 0) {\n enable = false;\n }\n deleteButton.setEnabled(enable);\n }\n }\n });\n }\n }\n CTabItem modelsTab = new CTabItem(tabFolder, SWT.NONE);\n modelsTab.setText(i18n(\"String_Node_Str\"));\n modelsTab.setToolTipText(Messages.modelDetailsPanel_modelDetailsTooltip);\n Composite modelDetailsPanel = new Composite(tabFolder, SWT.NONE);\n modelDetailsPanel.setLayout(new GridLayout(1, false));\n modelDetailsPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\n ((GridData) modelDetailsPanel.getLayoutData()).widthHint = 200;\n modelsTab.setControl(modelDetailsPanel);\n NAME_LOCATION_DESCRIPTION_PANEL: {\n this.modelDescriptionEditor = new StyledTextEditor(modelDetailsPanel, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.WRAP | SWT.BORDER);\n final GridData gridData = new GridData(GridData.FILL_BOTH);\n gridData.horizontalSpan = 1;\n this.modelDescriptionEditor.setLayoutData(gridData);\n this.modelDescriptionEditor.getDocument().addDocumentListener(new IDocumentListener() {\n public void documentAboutToBeChanged(final DocumentEvent event) {\n }\n public void documentChanged(final DocumentEvent event) {\n if (selectedVdbModelEntry != null) {\n selectedVdbModelEntry.setDescription(modelDescriptionEditor.getText());\n }\n }\n });\n selectedVdbModelEntry = null;\n modelNameText.setText(Messages.noSelection);\n modelLocationText.setText(Messages.noSelection);\n modelDescriptionEditor.setText(EMPTY_STRING);\n modelDescriptionEditor.getTextViewer().setEditable(false);\n }\n CTabItem problemsTab = new CTabItem(tabFolder, SWT.NONE);\n problemsTab.setText(Messages.modelDetailsPanel_problemsTabLabel);\n problemsTab.setToolTipText(Messages.modelDetailsPanel_problemsTabTooltip);\n Composite modelProblemsPanel = new Composite(tabFolder, SWT.NONE);\n modelProblemsPanel.setLayout(new GridLayout(1, false));\n modelProblemsPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\n ((GridData) modelProblemsPanel.getLayoutData()).widthHint = 200;\n problemsTab.setControl(modelProblemsPanel);\n MODEL_PROBLEMS_PANEL: {\n Composite subPanel_1 = WidgetFactory.createPanel(modelProblemsPanel, SWT.NONE, GridData.FILL_BOTH, 1, 1);\n subPanel_1.setLayout(new GridLayout(1, false));\n PROBLEMS_TABLE: {\n int tableStyle = SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;\n problemsViewer = new TableViewer(subPanel_1, tableStyle);\n Table table = problemsViewer.getTable();\n table.setLayout(new TableLayout());\n final GridData tblGD = new GridData(GridData.FILL_BOTH);\n tblGD.grabExcessHorizontalSpace = true;\n tblGD.grabExcessVerticalSpace = true;\n table.setLayoutData(tblGD);\n table.setHeaderVisible(true);\n table.setLinesVisible(true);\n TableViewerColumn column = new TableViewerColumn(problemsViewer, SWT.LEFT);\n column.getColumn().setText(Messages.modelDetailsPanel_problemPathLabel + \"String_Node_Str\");\n column.setLabelProvider(new ProblemMarkerLabelProvider(0));\n column.getColumn().pack();\n column = new TableViewerColumn(problemsViewer, SWT.LEFT);\n column.getColumn().setText(\"String_Node_Str\");\n column.setLabelProvider(new ProblemMarkerLabelProvider(1));\n column.getColumn().pack();\n column = new TableViewerColumn(problemsViewer, SWT.LEFT);\n column.getColumn().setText(Messages.modelDetailsPanel_problemDescriptionLabel + \"String_Node_Str\");\n column.setLabelProvider(new ProblemMarkerLabelProvider(2));\n column.getColumn().pack();\n }\n }\n tabFolder.setSelection(0);\n multiSourceCB.setEnabled(false);\n addColumnCB.setEnabled(false);\n columnAliasText.setEnabled(false);\n addButton.setEnabled(false);\n deleteButton.setEnabled(false);\n columnAliaslabel.setEnabled(false);\n columnAliasText.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\n}\n"
"public void register(ExtensionBuilder builder) {\n builder.observer(CubeDockerConfigurator.class).observer(DockerClientCreator.class).observer(CubeDockerRegistrar.class).observer(CubeSuiteLifecycleController.class).observer(BeforeStopContainerObserver.class).observer(Boot2DockerCreator.class).observer(DockerMachineCreator.class).observer(AfterClassContainerObjectObserver.class).observer(StopDockerMachineAfterSuiteObserver.class);\n builder.service(ResourceProvider.class, CubeResourceProvider.class);\n builder.service(TestEnricher.class, CubeContainerObjectTestEnricher.class);\n if (Validate.classExists(\"String_Node_Str\")) {\n builder.observer(DockerServerIPConfigurator.class);\n builder.observer(CubeDockerAutoStartConfigurator.class);\n }\n}\n"
"public void testInlineAcrossSideEffect1() {\n noInline(\"String_Node_Str\");\n}\n"
README.md exists but content is empty.
Downloads last month
37