content
stringlengths
40
137k
"public static ArrayList<Arena> loadArenas(JavaPlugin plugin, ArenasConfig cf) {\n ArrayList<Arena> ret = new ArrayList<Arena>();\n FileConfiguration config = cf.getConfig();\n if (!config.isSet(\"String_Node_Str\")) {\n return ret;\n }\n for (String arena : config.getConfigurationSection(\"String_Node_Str\").getKeys(false)) {\n if (Validator.isArenaValid(plugin, arena, cf.getConfig())) {\n ret.add(initArena(plugin, arena));\n }\n }\n return ret;\n}\n"
"private InetAddress pickInetAddress(final Collection<String> interfaces) throws SocketException {\n final Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();\n final boolean preferIPv4Stack = preferIPv4Stack();\n while (networkInterfaces.hasMoreElements()) {\n final NetworkInterface ni = networkInterfaces.nextElement();\n final Enumeration<InetAddress> e = ni.getInetAddresses();\n while (e.hasMoreElements()) {\n final InetAddress inetAddress = e.nextElement();\n if (preferIPv4Stack && inetAddress instanceof Inet6Address) {\n continue;\n }\n if (interfaces != null && !interfaces.isEmpty()) {\n final String address = inetAddress.getHostAddress();\n if (AddressUtil.matchAnyInterface(address, interfaces)) {\n return inetAddress;\n }\n } else if (!inetAddress.isLoopbackAddress()) {\n return inetAddress;\n }\n }\n }\n return null;\n}\n"
"protected void setupTricklePipeline(ServerBootstrap serverBootstrap, ClientBootstrap clientBootstrap, Handler serverHandler, Handler clientHandler) {\n serverBootstrap.getPipeline().addLast(\"String_Node_Str\", new IcapRequestDecoder());\n serverBootstrap.getPipeline().addLast(\"String_Node_Str\", new IcapResponseEncoder());\n serverBootstrap.getPipeline().addLast(\"String_Node_Str\", (SimpleChannelUpstreamHandler) serverHandler);\n clientBootstrap.getPipeline().addLast(\"String_Node_Str\", new TrickleDownstreamHandler(20, 3));\n clientBootstrap.getPipeline().addLast(\"String_Node_Str\", new IcapRequestEncoder());\n clientBootstrap.getPipeline().addLast(\"String_Node_Str\", new IcapResponseDecoder());\n clientBootstrap.getPipeline().addLast(\"String_Node_Str\", (SimpleChannelUpstreamHandler) clientHandler);\n}\n"
"public void setScheduler(Scheduler scheduler) throws IllegalActionException {\n if (scheduler != null && workspace() != scheduler.workspace()) {\n throw new IllegalActionException(this, scheduler, \"String_Node_Str\");\n }\n try {\n workspace().getWriteAccess();\n if (_scheduler != null) {\n _scheduler._makeSchedulerOf(null);\n if (scheduler != null) {\n scheduler._makeSchedulerOf(this);\n }\n _scheduler = scheduler;\n } finally {\n workspace().doneWriting();\n }\n}\n"
"public void invokeAllSetValueShouldCallGetExpiry() {\n CountingExpiryPolicy expiryPolicy = new CountingExpiryPolicy();\n expiryPolicyServer.setExpiryPolicy(expiryPolicy);\n MutableConfiguration<Integer, Integer> config = new MutableConfiguration<>();\n config.setExpiryPolicyFactory(FactoryBuilder.factoryOf(expiryPolicyClient));\n Cache<Integer, Integer> cache = getCacheManager().createCache(getTestCacheName(), config);\n final Integer INITIAL_KEY = 123;\n final Integer MAX_KEY_VALUE = INITIAL_KEY + 4;\n final Integer setValue = 456;\n final Integer modifySetValue = 789;\n Set<Integer> keys = new HashSet<>();\n int createdCount = 0;\n for (int key = INITIAL_KEY; key <= MAX_KEY_VALUE; key++) {\n keys.add(key);\n if (key <= MAX_KEY_VALUE - 2) {\n cache.put(key, setValue);\n createdCount++;\n }\n }\n assertThat(expiryPolicy.getCreationCount(), greaterThanOrEqualTo(createdCount));\n assertThat(expiryPolicy.getAccessCount(), is(0));\n assertThat(expiryPolicy.getUpdatedCount(), is(0));\n expiryPolicy.resetCount();\n Map<Integer, Integer> resultMap = cache.invokeAll(keys, new SetEntryProcessor<Integer, Integer>(setValue));\n assertThat(expiryPolicy.getCreationCount(), greaterThanOrEqualTo(keys.size() - createdCount));\n assertThat(expiryPolicy.getAccessCount(), is(0));\n assertThat(expiryPolicy.getUpdatedCount(), greaterThanOrEqualTo(createdCount));\n expiryPolicy.resetCount();\n cache.invokeAll(keys, new GetEntryProcessor<Integer, Integer, Integer>());\n assertThat(expiryPolicy.getCreationCount(), is(0));\n assertThat(expiryPolicy.getAccessCount(), greaterThanOrEqualTo(keys.size()));\n assertThat(expiryPolicy.getUpdatedCount(), is(0));\n}\n"
"public boolean isVisible() {\n if (mZoomDirty) {\n return mNextZoom > 0.001f;\n } else {\n if (mMessageProc == null) {\n return false;\n } else {\n return mRollo.mMessageProc.mZoom > 0.001f;\n }\n }\n}\n"
"public synchronized boolean disable(Orchestrator orchestrator, boolean force) {\n if (!force) {\n QueryHelper.SearchQueryHelperBuilder searchQueryHelperBuilder = queryHelper.buildSearchQuery(alienDAO.getIndexForType(Deployment.class)).types(Deployment.class).filters(MapUtil.newHashMap(new String[] { \"String_Node_Str\", \"String_Node_Str\" }, new String[][] { new String[] { orchestrator.getId() }, new String[] { null } })).fieldSort(\"String_Node_Str\", true);\n GetMultipleDataResult<Object> result = alienDAO.search(searchQueryHelperBuilder, 0, 1);\n if (result.getData().length > 0) {\n return false;\n }\n }\n try {\n IOrchestratorPlugin orchestratorInstance = (IOrchestratorPlugin) orchestratorPluginService.unregister(orchestrator.getId());\n if (orchestratorInstance != null) {\n IOrchestratorPluginFactory orchestratorFactory = orchestratorService.getPluginFactory(orchestrator);\n orchestratorFactory.destroy(orchestratorInstance);\n }\n } catch (Exception e) {\n log.info(\"String_Node_Str\", e);\n } finally {\n orchestrator.setState(OrchestratorState.DISABLED);\n alienDAO.save(orchestrator);\n }\n return true;\n}\n"
"public void discoverUnregisteredNewObjects(Map clones, Map newObjects, Map unregisteredExistingObjects, Map visitedObjects) {\n if (this.discoverUnregisteredNewObjectsWithoutPersist) {\n super.discoverUnregisteredNewObjects(clones, newObjects, unregisteredExistingObjects, visitedObjects);\n } else {\n Set<Object> cascadePersistErrors = new IdentityHashSet();\n for (Iterator clonesEnum = clones.keySet().iterator(); clonesEnum.hasNext(); ) {\n discoverAndPersistUnregisteredNewObjects(clonesEnum.next(), false, newObjects, unregisteredExistingObjects, visitedObjects, cascadePersistErrors);\n }\n if (!cascadePersistErrors.isEmpty()) {\n throw new IllegalStateException(ExceptionLocalization.buildMessage(\"String_Node_Str\", cascadePersistErrors.toArray()));\n }\n }\n}\n"
"private void v2Tov3(SQLiteDatabase db) {\n Cursor c = db.rawQuery(\"String_Node_Str\", null);\n int cnt = 0;\n if (c.moveToNext()) {\n cnt = c.getInt(0);\n }\n c.close();\n db.execSQL(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n if (cnt > 0) {\n db.execSQL(\"String_Node_Str\");\n int hd_account_id = -1;\n c = BitherApplication.mAddressDbHelper.getReadableDatabase().rawQuery(\"String_Node_Str\", null);\n if (c.moveToNext()) {\n hd_account_id = c.getInt(0);\n if (c.moveToNext()) {\n c.close();\n throw new RuntimeException(\"String_Node_Str\");\n } else {\n c.close();\n }\n } else {\n c.close();\n throw new RuntimeException(\"String_Node_Str\");\n }\n db.execSQL(\"String_Node_Str\", new String[] { Integer.toString(hd_account_id) });\n db.execSQL(\"String_Node_Str\" + \"String_Node_Str\");\n }\n int oldCnt = 0;\n int newCnt = 0;\n c = db.rawQuery(\"String_Node_Str\", null);\n if (c.moveToNext()) {\n oldCnt = c.getInt(0);\n }\n c.close();\n c = db.rawQuery(\"String_Node_Str\", null);\n if (c.moveToNext()) {\n newCnt = c.getInt(0);\n }\n c.close();\n if (oldCnt != newCnt) {\n throw new RuntimeException(\"String_Node_Str\");\n } else {\n db.execSQL(\"String_Node_Str\");\n db.execSQL(\"String_Node_Str\");\n }\n db.execSQL(AbstractDb.CREATE_OUT_HD_ACCOUNT_ID_INDEX);\n db.execSQL(AbstractDb.CREATE_HD_ACCOUNT_ACCOUNT_ID_AND_PATH_TYPE_INDEX);\n}\n"
"public void onAbsolutePathExtFileReceived(String absolutePath) {\n chatUIHelperListener.onScreenResetPossibilityPerformLogout(false);\n imageUtils.showFullImage((android.app.Activity) context, absolutePath);\n}\n"
"private void createPreviewCharts(final ScrolledForm form, final Composite composite, final boolean isCreate) {\n for (ModelElement modelElement : analysisHandler.getAnalyzedColumns()) {\n final TdColumn column = SwitchHelpers.COLUMN_SWITCH.doSwitch(modelElement);\n final Collection<Indicator> indicators = analysisHandler.getIndicators(column);\n final ColumnIndicator columnIndicator = new ColumnIndicator(column);\n columnIndicator.setIndicators(indicators.toArray(new Indicator[indicators.size()]));\n ExpandableComposite exComp = toolkit.createExpandableComposite(composite, ExpandableComposite.TREE_NODE | ExpandableComposite.CLIENT_INDENT);\n exComp.setText(\"String_Node_Str\" + column.getName());\n exComp.setLayout(new GridLayout());\n final Composite comp = toolkit.createComposite(exComp);\n comp.setLayout(new GridLayout());\n comp.setLayoutData(new GridData(GridData.FILL_BOTH));\n if (columnIndicator.getIndicators().length != 0) {\n IRunnableWithProgress rwp = new IRunnableWithProgress() {\n public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {\n monitor.beginTask(\"String_Node_Str\" + column.getName(), IProgressMonitor.UNKNOWN);\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n for (ImageDescriptor descriptor : IndicatorChartFactory.createChart(columnIndicator, isCreate)) {\n ImageHyperlink image = toolkit.createImageHyperlink(comp, SWT.WRAP);\n image.setImage(descriptor.createImage());\n }\n }\n });\n monitor.done();\n }\n };\n try {\n new ProgressMonitorDialog(null).run(true, false, rwp);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n exComp.setExpanded(true);\n }\n exComp.setClient(comp);\n exComp.addExpansionListener(new ExpansionAdapter() {\n public void expansionStateChanged(ExpansionEvent e) {\n form.reflow(true);\n }\n });\n }\n}\n"
"protected SearchCacheEntry getSearchCacheEntry(SearchRequest searchRequest) {\n SearchCacheEntry searchCacheEntry;\n Iterator<Map.Entry<Integer, SearchCacheEntry>> iterator = searchRequestCache.entrySet().iterator();\n while (iterator.hasNext()) {\n Map.Entry<Integer, SearchCacheEntry> next = iterator.next();\n if (next.getValue().getLastAccessed().plus(5, ChronoUnit.MINUTES).isBefore(Instant.now())) {\n searchRequestCache.remove(next.getKey());\n }\n }\n if (searchRequest.getOffset() == 0 || !searchRequestCache.containsKey(searchRequest.hashCode())) {\n SearchEntity searchEntity = new SearchEntity();\n searchEntity.setInternal(searchRequest.isInternal());\n searchEntity.setCategory(searchRequest.getCategory());\n searchEntity.setQuery(searchRequest.getQuery());\n searchEntity.setIdentifiers(searchRequest.getIdentifiers().entrySet().stream().map(x -> new IdentifierKeyValuePair(x.getKey().name(), x.getValue())).collect(Collectors.toList()));\n searchEntity.setSeason(searchRequest.getSeason());\n searchEntity.setEpisode(searchRequest.getEpisode());\n searchEntity.setSearchType(searchRequest.getSearchType());\n searchEntity.setUsername(null);\n searchEntity.setTitle(searchRequest.getTitle());\n searchEntity.setAuthor(searchRequest.getAuthor());\n searchRepository.save(searchEntity);\n List<Indexer> indexersToCall = searchModuleProvider.getIndexers();\n searchCacheEntry = new SearchCacheEntry(searchRequest, indexersToCall);\n } else {\n searchCacheEntry = searchRequestCache.get(searchRequest.hashCode());\n searchCacheEntry.setLastAccessed(Instant.now());\n searchCacheEntry.setSearchRequest(searchRequest);\n }\n return searchCacheEntry;\n}\n"
"private void deleteItems(Object view) {\n if (view != null && view == stepsList) {\n int[] index = stepsList.getSelectionIndices();\n boolean firstPos = false;\n for (int i = index.length - 1; i >= 0; i--) {\n if (index[i] == 0) {\n firstPos = true;\n }\n removeStep(index[i]);\n }\n if (stepsList.getItemCount() == 0) {\n section.setVisible(false);\n }\n if (stepsList.getItemCount() >= 1 && firstPos) {\n stepsList.select(0);\n refreshStep(0);\n }\n } else if (view == stepWidget.inputViewer || view == stepWidget.outputViewer) {\n TableViewer viewer = (TableViewer) view;\n IStructuredSelection selections = (IStructuredSelection) viewer.getSelection();\n java.util.List list = (java.util.List) Arrays.asList(selections.toArray());\n if (list.size() == 0)\n return;\n java.util.List<WSTransformerVariablesMapping> items = (java.util.List<WSTransformerVariablesMapping>) viewer.getInput();\n items.removeAll(list);\n if (view == stepWidget.inputViewer)\n stepWidget.processStep.setInputMappings(items.toArray(new WSTransformerVariablesMapping[items.size()]));\n else\n stepWidget.processStep.setOutputMappings(items.toArray(new WSTransformerVariablesMapping[items.size()]));\n viewer.refresh();\n markDirtyWithoutCommit();\n }\n}\n"
"public boolean isMobileAvailable() {\n try {\n android.net.NetworkInfo mobile = connectivity.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);\n return mobile.isAvailable();\n } catch (Exception e) {\n return false;\n }\n}\n"
"public int getRenderType() {\n return RENDER_ID;\n}\n"
"public static double getTax(Property tax, double price) {\n return roundDown((Config.getFloat(tax) / 100F) * price);\n}\n"
"public void testHandlerHookCall() throws Exception {\n HttpResponse response = doGet(\"String_Node_Str\");\n Assert.assertEquals(HttpResponseStatus.OK.getCode(), response.getStatusLine().getStatusCode());\n awaitPostHook();\n Assert.assertEquals(1, handlerHook1.getNumPreCalls());\n Assert.assertEquals(1, handlerHook1.getNumPostCalls());\n Assert.assertEquals(1, handlerHook2.getNumPreCalls());\n Assert.assertEquals(1, handlerHook2.getNumPostCalls());\n}\n"
"public void execute(Tuple tuple) {\n LOG.trace(\"String_Node_Str\");\n JSONObject original_message = null;\n try {\n key = tuple.getStringByField(\"String_Node_Str\");\n original_message = (JSONObject) tuple.getValueByField(\"String_Node_Str\");\n if (original_message == null || original_message.isEmpty())\n throw new Exception(\"String_Node_Str\");\n LOG.trace(\"String_Node_Str\" + original_message);\n JSONObject alerts_tag = new JSONObject();\n Map<String, JSONObject> alerts_list = _adapter.alert(original_message);\n JSONArray uuid_list = new JSONArray();\n if (alerts_list == null || alerts_list.isEmpty()) {\n LOG.trace(\"String_Node_Str\" + original_message);\n _collector.ack(tuple);\n _collector.emit(new Values(original_message));\n } else {\n for (String alert : alerts_list.keySet()) {\n uuid_list.add(alert);\n System.out.println(\"String_Node_Str\" + alert);\n if (cache.getIfPresent(alert) == null) {\n System.out.println(\"String_Node_Str\" + alert);\n JSONObject global_alert = new JSONObject();\n global_alert.putAll(_identifier);\n global_alert.put(\"String_Node_Str\", alerts_list.get(alert));\n _collector.emit(\"String_Node_Str\", new Values(global_alert));\n cache.put(alert, \"String_Node_Str\");\n } else\n System.out.println(\"String_Node_Str\" + alert);\n LOG.trace(\"String_Node_Str\" + alerts_list);\n if (original_message.containsKey(\"String_Node_Str\")) {\n JSONArray already_triggered = (JSONArray) original_message.get(\"String_Node_Str\");\n uuid_list.addAll(already_triggered);\n LOG.trace(\"String_Node_Str\");\n }\n original_message.put(\"String_Node_Str\", uuid_list);\n LOG.debug(\"String_Node_Str\" + alerts_tag);\n _collector.ack(tuple);\n _collector.emit(new Values(original_message));\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n LOG.error(\"String_Node_Str\" + original_message);\n e.printStackTrace();\n _collector.fail(tuple);\n String error_as_string = org.apache.commons.lang.exception.ExceptionUtils.getStackTrace(e);\n JSONObject error = ErrorGenerator.generateErrorMessage(\"String_Node_Str\" + original_message, error_as_string);\n _collector.emit(\"String_Node_Str\", new Values(error));\n }\n}\n"
"public ItemStack getStack() {\n Item item = (Item) Item.itemRegistry.getObject(\"String_Node_Str\");\n if (item == null) {\n throw new Error(\"String_Node_Str\");\n }\n ItemStack stack = new ItemStack(item, 1, 1);\n NBTTagCompound nbt = NBTUtils.getItemData(stack);\n id.write(nbt);\n nbt.setString(\"String_Node_Str\", author);\n nbt.setString(\"String_Node_Str\", id.name);\n return stack;\n}\n"
"public V remove(Object key) {\n beforeWrite();\n try {\n V result = get(key);\n if (result == null) {\n return null;\n }\n long v = writeVersion;\n synchronized (this) {\n Page p = copyOnWrite(root, v, true);\n result = (V) remove(p, v, key);\n newRoot(p);\n }\n return result;\n } finally {\n afterWrite();\n }\n}\n"
"public void refresh(IElementParameter param, boolean check) {\n String paramName = param.getName();\n CCombo combo = (CCombo) hashCurControls.get(paramName);\n if (combo == null || combo.isDisposed()) {\n return;\n }\n Object value = param.getValue();\n if (value instanceof String) {\n String strValue = \"String_Node_Str\";\n boolean strValueSet = false;\n int nbInList = 0, nbMax = param.getListItemsValue().length;\n String name = (String) value;\n while (strValue.equals(new String(\"String_Node_Str\")) && nbInList < nbMax) {\n if (name.equals(param.getListItemsValue()[nbInList])) {\n strValue = (String) param.getListItemsDisplayName()[nbInList];\n strValueSet = true;\n }\n nbInList++;\n }\n if (!strValueSet) {\n strValue = name;\n }\n String[] paramItems = getListToDisplay(param);\n String[] comboItems = combo.getItems();\n if (!Arrays.equals(paramItems, comboItems)) {\n combo.setItems(paramItems);\n }\n if (param.isRepositoryValueUsed()) {\n combo.removeModifyListener(modifySelection);\n combo.setText(strValue);\n combo.addModifyListener(modifySelection);\n } else {\n combo.setText(strValue);\n }\n combo.setVisible(true);\n }\n if (param.isContextMode()) {\n combo.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_YELLOW));\n combo.setEnabled(false);\n }\n}\n"
"public void setComponentLocation(String componentName, String srs, List<String> pos) {\n Element parent = getComponent(componentName);\n if (parent == null)\n return;\n parent = (Element) parent.getElementsByTagName(\"String_Node_Str\").item(0);\n parent = addNewNode(parent, \"String_Node_Str\", \"String_Node_Str\", srs);\n addNewNode(parent, \"String_Node_Str\", lowerCorner);\n addNewNode(parent, \"String_Node_Str\", upperCorner);\n}\n"
"public static void loadCommands() {\n File commandsFolder = new File(\"String_Node_Str\");\n if (!commandsFolder.exists()) {\n commandsFolder.mkdirs();\n }\n for (File file : commandsFolder.listFiles()) {\n int extIndex = file.getName().lastIndexOf(\"String_Node_Str\");\n String extension = \"String_Node_Str\";\n if (extIndex > 0) {\n extension = file.getName().substring(extIndex + 1);\n }\n if (extension.equalsIgnoreCase(\"String_Node_Str\")) {\n try {\n FileInputStream input = new FileInputStream(file);\n Yaml yaml = new Yaml();\n Map<String, Object> data = (Map<String, Object>) yaml.load(input);\n if (data != null && !data.isEmpty()) {\n try {\n Nexus.getInstance().getCommandManager().register(new DynamicCommand(ColorUtil.deserialise((String) data.get(\"String_Node_Str\")), ColorUtil.deserialise((String) data.get(\"String_Node_Str\")), (Boolean) data.get(\"String_Node_Str\"), ColorUtil.deserialise((String) data.get(\"String_Node_Str\")), ColorUtil.deserialise(((ArrayList<String>) data.get(\"String_Node_Str\")).toArray(new String[0])), ColorUtil.deserialise(((ArrayList<String>) data.get(\"String_Node_Str\")).toArray(new String[0])), (Boolean) data.get(\"String_Node_Str\"), (Boolean) data.get(\"String_Node_Str\")));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n } catch (FileNotFoundException e) {\n Nexus.LOGGER.severe(\"String_Node_Str\" + file.getName().substring(0) + \"String_Node_Str\");\n e.printStackTrace();\n }\n }\n }\n}\n"
"private int compareEncodingPreferences(MediaFormat enc1, MediaFormat enc2) {\n Integer pref1 = encodingPreferences.get(enc1);\n int pref1IntValue = (pref1 == null) ? 0 : pref1;\n Integer pref2 = encodingPreferences.get(enc2);\n int pref2IntValue = (pref2 == null) ? 0 : pref2;\n int res = pref2IntValue - pref1IntValue;\n if (res == 0) {\n res = enc1.getEncoding().compareTo(enc2.getEncoding());\n }\n return res;\n}\n"
"public int compareTo(OpenFileTableEntry e) {\n int res = 0;\n if (this.expTime < e.expTime) {\n res = -1;\n } else if (this.expTime == e.expTime) {\n res = e.fileId == null ? -1 : this.fileId.compareTo(e.fileId);\n } else {\n res = 1;\n }\n return res;\n}\n"
"public void writeGet(MethodWriter writer, IValue instance) throws BytecodeException {\n if (isConstant(this.value)) {\n this.value.writeExpression(writer);\n return;\n }\n if (this.className == null) {\n this.type.writeDefaultValue(writer);\n return;\n }\n String extended = this.type.getExtendedName();\n writer.writeFieldInsn(Opcodes.GETSTATIC, this.className, \"String_Node_Str\", extended);\n}\n"
"protected Attribute[] getAttributesOfVariable(String varName) {\n VariableSimpleIF var;\n if (featureDataset != null) {\n var = (Variable) featureDataset.getDataVariable(varName);\n } else {\n var = netCDFDataset.findVariable(varName);\n }\n if (var != null) {\n return var.getAttributes().toArray(new Attribute[var.getAttributes().size()]);\n }\n return null;\n}\n"
"private void computeProperty(ResourcesManager manager, ItemRecord itemRecord) {\n InputStream stream = null;\n try {\n stream = manager.getStream(itemRecord.getPath());\n final Resource resource = createResource(itemRecord, itemRecord.getPath(), false);\n resource.getResourceSet().setURIConverter(new ExtensibleURIConverterImpl() {\n public InputStream createInputStream(URI uri, Map<?, ?> options) throws IOException {\n InputStream inputStream = null;\n EPackage ePackage = resource.getResourceSet().getPackageRegistry().getEPackage(uri.toString());\n if (ePackage != null || !\"String_Node_Str\".equals(uri.scheme())) {\n inputStream = super.createInputStream(uri, options);\n } else {\n inputStream = null;\n }\n return inputStream;\n }\n });\n resource.load(stream, null);\n itemRecord.setProperty((Property) EcoreUtil.getObjectByType(resource.getContents(), PropertiesPackage.eINSTANCE.getProperty()));\n } catch (IOException e) {\n } finally {\n if (stream != null) {\n try {\n stream.close();\n } catch (IOException e) {\n }\n }\n }\n}\n"
"public final void renderPick(GLGraphics g) {\n if (dirtyLayout)\n layout();\n if (!needToRender()) {\n pickCache.invalidate(context);\n return;\n }\n float x = x_layout;\n float y = y_layout;\n float w = w_layout;\n float h = h_layout;\n g.move(x, y);\n if (!pickCache.render(context, g)) {\n pickCache.begin(context, g, w, h);\n boolean pushed = pickingID >= 0;\n if (pushed)\n g.pushName(this.pickingID);\n renderPickImpl(g, w, h);\n if (pushed)\n g.popName();\n pickCache.end(context, g);\n }\n g.move(-x, -y);\n}\n"
"public File getRoot(final SuccessHandler<?> callback) {\n try {\n return getFilesystemRoot();\n } catch (final IOException e) {\n X_Log.error(ModelServiceJre.class, \"String_Node_Str\", e);\n if (callback instanceof ErrorHandler) {\n ((ErrorHandler) callback).onError(e);\n }\n return null;\n }\n}\n"
"public final void renderSeries(IPrimitiveRenderer ipr, Plot p, ISeriesRenderingHints isrh) throws ChartException {\n try {\n validateDataSetCount(isrh);\n } catch (ChartException vex) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, vex);\n }\n boolean bRendering3D = isDimension3D();\n boolean hasAddedComparsionPolygon = false;\n SeriesRenderingHints srh = null;\n SeriesRenderingHints3D srh3d = null;\n if (bRendering3D) {\n srh3d = (SeriesRenderingHints3D) isrh;\n } else {\n srh = (SeriesRenderingHints) isrh;\n }\n final ChartWithAxes cwa = (ChartWithAxes) getModel();\n final Bounds boClientArea = isrh.getClientAreaBounds(true);\n final AbstractScriptHandler sh = getRunTimeContext().getScriptHandler();\n logger.log(ILogger.INFORMATION, Messages.getString(\"String_Node_Str\", new Object[] { getClass().getName(), Integer.valueOf(iSeriesIndex + 1), Integer.valueOf(iSeriesCount) }, getRunTimeContext().getULocale()));\n final BarSeries bs = (BarSeries) getSeries();\n if (!bs.isVisible()) {\n restoreClipping(ipr);\n return;\n }\n final RiserType rt = bs.getRiser();\n final double dSeriesThickness = bRendering3D ? 0 : srh.getSeriesThickness();\n final double dZeroLocation = bRendering3D ? srh3d.getPlotZeroLocation() : srh.getZeroLocation();\n double dBaseLocation = -1;\n final DataPointHints[] dpha = isrh.getDataPoints();\n validateNullDatapoint(dpha);\n double sizeForNonCategory = -1;\n if (!bRendering3D && !((SeriesRenderingHints) isrh).isCategoryScale() && dpha.length != 0) {\n sizeForNonCategory = computeSizeForNonCategoryBar(cwa.isTransposed(), dpha);\n }\n final ColorDefinition cd = bs.getRiserOutline();\n final LineAttributes lia = goFactory.createLineAttributes(cd == null ? null : goFactory.copyOf(cd), LineStyle.SOLID_LITERAL, 1);\n double dX = 0, dY = 0, dZ = 0;\n double dWidth = 0, dHeight = 0, dSpacing = 0, dValue = 0;\n double dWidthZ = 0, dSpacingZ = 0;\n Location lo;\n Location3D lo3d;\n Location[] loaFrontFace = null;\n List<Location3D[]> loa3dFace = null;\n boolean bInverted = false;\n final double dUnitSpacing = (!cwa.isSetUnitSpacing()) ? 50 : cwa.getUnitSpacing();\n final Bounds clipArea = goFactory.copyOf(boClientAreaWithoutInsets);\n if (cwa.getDimension() == ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL) {\n boClientArea.delta(-dSeriesThickness, dSeriesThickness, 0, 0);\n clipArea.delta(-dSeriesThickness, 0, 2 * dSeriesThickness, dSeriesThickness);\n }\n renderClipping(ipr, clipArea);\n AxisSubUnit au = null;\n Axis ax = getAxis();\n StackedSeriesLookup ssl = null;\n StackGroup sg = null;\n if (!bRendering3D) {\n ssl = srh.getStackedSeriesLookup();\n sg = ssl.getStackGroup(bs);\n }\n int iSharedUnitIndex = (sg == null) ? 0 : sg.getSharedIndex();\n int iSharedUnitCount = (sg == null) ? 1 : sg.getSharedCount();\n double dStart, dEnd;\n Label laDataPoint = null;\n try {\n laDataPoint = bRendering3D ? srh3d.getLabelAttributes(bs) : srh.getLabelAttributes(bs);\n } catch (Exception ex) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, ex);\n }\n final SeriesDefinition sd = getSeriesDefinition();\n final EList<Fill> elPalette = sd.getSeriesPalette().getEntries();\n if (elPalette.isEmpty()) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, \"String_Node_Str\", new Object[] { bs }, Messages.getResourceBundle(getRunTimeContext().getULocale()));\n }\n final boolean bPaletteByCategory = (cwa.getLegend().getItemType().getValue() == LegendItemType.CATEGORIES);\n int iThisSeriesIndex = -1;\n if (!bPaletteByCategory) {\n iThisSeriesIndex = sd.getRunTimeSeries().indexOf(bs);\n if (iThisSeriesIndex < 0) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, \"String_Node_Str\", new Object[] { bs, sd }, Messages.getResourceBundle(getRunTimeContext().getULocale()));\n }\n }\n double[] faX = new double[dpha.length];\n double[] faY = new double[dpha.length];\n boolean bShowOutside = isShowOutside();\n for (int i = 0; i < dpha.length; i++) {\n faX[i] = Double.NaN;\n faY[i] = Double.NaN;\n int iOutside = checkEntryByType(getInternalBaseAxis().getScale(), dpha[i].getBaseValue());\n if (iOutside != 0) {\n dpha[i].markOutside();\n continue;\n }\n laDataPoint = bRendering3D ? srh3d.getLabelAttributes(bs) : srh.getLabelAttributes(bs);\n Fill f = null;\n if (bPaletteByCategory) {\n f = FillUtil.getPaletteFill(elPalette, i);\n } else {\n if (iThisSeriesIndex >= 0) {\n f = FillUtil.getPaletteFill(elPalette, iThisSeriesIndex);\n }\n }\n updateTranslucency(f, bs);\n Fill fixedFill;\n if (dpha[i] != null && dpha[i].getOrthogonalValue() instanceof Double) {\n fixedFill = FillUtil.convertFill(f, ((Double) dpha[i].getOrthogonalValue()).doubleValue(), null);\n } else {\n fixedFill = FillUtil.copyOf(f);\n }\n if (bRendering3D) {\n lo3d = dpha[i].getLocation3D();\n dX = lo3d.getX();\n dY = lo3d.getY();\n dZ = lo3d.getZ();\n dSpacing = ((dpha[i].getSize2D().getWidth()) * dUnitSpacing) / 200;\n dSpacingZ = ((dpha[i].getSize2D().getHeight()) * dUnitSpacing) / 200;\n } else {\n lo = dpha[i].getLocation();\n dX = lo.getX();\n dY = lo.getY();\n dSpacing = ((dpha[i].getSize()) * dUnitSpacing) / 200;\n }\n if (cwa.isTransposed()) {\n BarAxisIdLookup basLookup = new BarAxisIdLookup((ChartWithAxes) cm, this.getAxis());\n if (((SeriesRenderingHints) isrh).isCategoryScale()) {\n dHeight = dpha[i].getSize();\n dHeight -= 2 * dSpacing;\n dHeight /= basLookup.getCount();\n dY += dHeight * basLookup.getId();\n dHeight /= iSharedUnitCount;\n dY += iSharedUnitIndex * dHeight + dSpacing;\n } else {\n dHeight = Math.min(sizeForNonCategory, (dpha[i].getSize() - 2 * dSpacing) * .8);\n dSpacing = (dpha[i].getSize() - dHeight) / 2.0;\n dY -= dpha[i].getSize() * 0.5;\n dHeight /= basLookup.getCount();\n dY += dHeight * basLookup.getId();\n dHeight /= iSharedUnitCount;\n dY += iSharedUnitIndex * dHeight + dSpacing;\n }\n if (isStackedOrPercent(bs)) {\n au = ssl.getUnit(bs, i);\n dValue = isNaN(dpha[i].getOrthogonalValue()) ? 0 : ((Double) dpha[i].getOrthogonalValue()).doubleValue();\n double[] values = computeStackPosition(au, dValue, ax);\n dStart = values[0];\n dEnd = values[1];\n try {\n double dMargin = srh.getLocationOnOrthogonal(dEnd) - srh.getLocationOnOrthogonal(dStart);\n double lastPosition = au.getLastPosition(dValue);\n if (Double.isNaN(lastPosition)) {\n dBaseLocation = srh.getLocationOnOrthogonal(dStart);\n } else {\n dBaseLocation = au.getLastPosition(dValue);\n }\n au.setLastPosition(dValue, dBaseLocation, dMargin);\n dX = au.getLastPosition(dValue);\n } catch (Exception ex) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, ex);\n }\n } else {\n if (!ChartUtil.isStudyLayout(cwa)) {\n dBaseLocation = dZeroLocation;\n } else {\n au = ssl.getUnit(bs, i);\n dValue = Methods.asDouble(dpha[i].getOrthogonalValue());\n try {\n double dMargin = srh.getLocationOnOrthogonal(dpha[i].getOrthogonalValue()) - srh.getLocationOnOrthogonal(srh.getOrthogonalScale().getMinimum());\n double lastPosition = au.getLastPosition(dValue);\n double precisionDelta = 0.00000001d;\n if (Double.isNaN(lastPosition)) {\n dBaseLocation = srh.getLocationOnOrthogonal(srh.getOrthogonalScale().getMinimum()) - precisionDelta;\n } else {\n dBaseLocation = au.getLastPosition(dValue) - precisionDelta;\n }\n au.setLastPosition(dValue, dBaseLocation, dMargin);\n } catch (Exception ex) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, ex);\n }\n dX = au.getLastPosition(dValue);\n }\n }\n if (ChartUtil.mathLT(dX, boClientArea.getLeft())) {\n if (ChartUtil.mathLT(dBaseLocation, boClientArea.getLeft())) {\n if (!bShowOutside) {\n continue;\n }\n }\n dX = boClientArea.getLeft();\n } else if (ChartUtil.mathLT(dBaseLocation, boClientArea.getLeft())) {\n dBaseLocation = boClientArea.getLeft();\n }\n if (ChartUtil.mathGT(dX, boClientArea.getLeft() + boClientArea.getWidth())) {\n if (ChartUtil.mathGT(dBaseLocation, boClientArea.getLeft() + boClientArea.getWidth())) {\n continue;\n }\n dX = boClientArea.getLeft() + boClientArea.getWidth();\n } else if (ChartUtil.mathGT(dBaseLocation, boClientArea.getLeft() + boClientArea.getWidth())) {\n dBaseLocation = boClientArea.getLeft() + boClientArea.getWidth();\n }\n dWidth = dBaseLocation - dX;\n bInverted = dWidth < 0;\n if (bInverted) {\n dX = dBaseLocation;\n dWidth = -dWidth;\n }\n } else {\n if (bRendering3D) {\n dWidth = dpha[i].getSize2D().getWidth();\n dWidth -= 2 * dSpacing;\n dWidthZ = dpha[i].getSize2D().getHeight();\n dWidthZ -= 2 * dSpacingZ;\n dX += dSpacing;\n dZ += dSpacingZ;\n } else {\n BarAxisIdLookup basLookup = new BarAxisIdLookup((ChartWithAxes) cm, this.getAxis());\n if (((SeriesRenderingHints) isrh).isCategoryScale()) {\n dWidth = dpha[i].getSize();\n dWidth -= 2 * dSpacing;\n dWidth /= basLookup.getCount();\n dX += dWidth * basLookup.getId();\n dWidth /= iSharedUnitCount;\n dX += iSharedUnitIndex * dWidth + dSpacing;\n } else {\n dWidth = Math.min(sizeForNonCategory, (dpha[i].getSize() - 2 * dSpacing) * .8);\n dSpacing = (dpha[i].getSize() - dWidth) / 2.0;\n dX -= dpha[i].getSize() / 2;\n dWidth /= basLookup.getCount();\n dX += dWidth * basLookup.getId();\n dWidth /= iSharedUnitCount;\n dX += iSharedUnitIndex * dWidth + dSpacing;\n }\n }\n if (isStackedOrPercent(bs)) {\n if (bRendering3D) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.COMPUTATION, \"String_Node_Str\", Messages.getResourceBundle(getRunTimeContext().getULocale()));\n }\n au = ssl.getUnit(bs, i);\n dValue = isNaN(dpha[i].getOrthogonalValue()) ? 0 : ((Number) dpha[i].getOrthogonalValue()).doubleValue();\n double[] values = computeStackPosition(au, dValue, ax);\n dStart = values[0];\n dEnd = values[1];\n try {\n double dMargin = srh.getLocationOnOrthogonal(dEnd) - srh.getLocationOnOrthogonal(dStart);\n double lastPosition = au.getLastPosition(dValue);\n if (Double.isNaN(lastPosition)) {\n dBaseLocation = srh.getLocationOnOrthogonal(dStart);\n } else {\n dBaseLocation = au.getLastPosition(dValue);\n }\n au.setLastPosition(dValue, dBaseLocation, dMargin);\n dY = au.getLastPosition(dValue);\n } catch (Exception ex) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, ex);\n }\n } else {\n if (!ChartUtil.isStudyLayout(cwa)) {\n dBaseLocation = dZeroLocation;\n } else {\n au = ssl.getUnit(bs, i);\n Object oValue = dpha[i].getOrthogonalValue();\n dValue = oValue == null ? 0 : Methods.asDouble(oValue);\n try {\n double dMargin = srh.getLocationOnOrthogonal(oValue == null ? 0 : oValue) - srh.getLocationOnOrthogonal(srh.getOrthogonalScale().getMinimum());\n double lastPosition = au.getLastPosition(dValue);\n if (Double.isNaN(lastPosition)) {\n dBaseLocation = srh.getLocationOnOrthogonal(srh.getOrthogonalScale().getMinimum());\n } else {\n dBaseLocation = au.getLastPosition(dValue);\n }\n au.setLastPosition(dValue, dBaseLocation, dMargin);\n } catch (Exception ex) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, ex);\n }\n dY = au.getLastPosition(dValue);\n }\n }\n if (bRendering3D) {\n double plotBaseLocation = srh3d.getPlotBaseLocation();\n if (dY < plotBaseLocation) {\n if (bShowOutside) {\n dBaseLocation = plotBaseLocation;\n dY = plotBaseLocation;\n } else {\n if (dBaseLocation < plotBaseLocation) {\n continue;\n }\n dY = plotBaseLocation;\n }\n } else if (dBaseLocation < plotBaseLocation) {\n dBaseLocation = plotBaseLocation;\n }\n if (dY > plotBaseLocation + srh3d.getPlotHeight()) {\n if (dBaseLocation > plotBaseLocation + srh3d.getPlotHeight()) {\n continue;\n }\n dY = plotBaseLocation + srh3d.getPlotHeight();\n } else if (dBaseLocation > plotBaseLocation + srh3d.getPlotHeight()) {\n dBaseLocation = plotBaseLocation + srh3d.getPlotHeight();\n }\n } else {\n if (dY < boClientArea.getTop()) {\n if (dBaseLocation < boClientArea.getTop()) {\n continue;\n }\n dY = boClientArea.getTop();\n } else if (dBaseLocation < boClientArea.getTop()) {\n dBaseLocation = boClientArea.getTop();\n }\n if (dY > boClientArea.getTop() + boClientArea.getHeight()) {\n if (dBaseLocation > boClientArea.getTop() + boClientArea.getHeight()) {\n if (!bShowOutside) {\n continue;\n }\n }\n dY = boClientArea.getTop() + boClientArea.getHeight();\n } else if (dBaseLocation > boClientArea.getTop() + boClientArea.getHeight()) {\n dBaseLocation = boClientArea.getTop() + boClientArea.getHeight();\n }\n }\n dHeight = dBaseLocation - dY;\n bInverted = bRendering3D ? dHeight <= 0 : dHeight < 0;\n if (bInverted) {\n dY = dBaseLocation;\n dHeight = -dHeight;\n }\n }\n Bounds compareBounds = null;\n if (getModel().getDimension() == ChartDimension.TWO_DIMENSIONAL_LITERAL || getModel().getDimension() == ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL) {\n compareBounds = BoundsImpl.create(dX, dY, dWidth, dHeight);\n }\n if (rt.getValue() == RiserType.RECTANGLE) {\n if (bRendering3D) {\n loa3dFace = computeRiserRectangle3D(bInverted, dX, dY, dZ, dHeight, dWidth, dWidthZ);\n } else {\n loaFrontFace = computeRiserRectangle2D(bInverted, i, faX, faY, dX, dY, dHeight, dWidth);\n }\n } else if (rt.getValue() == RiserType.TRIANGLE) {\n if (bRendering3D) {\n loa3dFace = computeRiserTriangle3D(bInverted, dX, dY, dZ, dHeight, dWidth, dWidthZ);\n } else {\n if (isStackedOrPercent(bs)) {\n StackedSizeHints slh = getCurrentStackedSizeHints(i);\n double[] size = null;\n if (isTransposed()) {\n size = computeStacked2DTopNBottomSize(slh, au, dValue, dHeight);\n } else {\n size = computeStacked2DTopNBottomSize(slh, au, dValue, dWidth);\n }\n loaFrontFace = computeStackedRiserTriangle2D(bInverted, i, faX, faY, dX, dY, dHeight, dWidth, size[0], size[1], getCurrentStackedSizeHints(i));\n } else {\n loaFrontFace = computeRiserTriangle2D(bInverted, i, faX, faY, dX, dY, dHeight, dWidth);\n }\n }\n } else if (rt.getValue() == RiserType.TUBE) {\n if (bRendering3D) {\n loa3dFace = computeRiserTube3D(dX, dY, dZ, dHeight, dWidth, dWidthZ);\n } else {\n loaFrontFace = computeRiserTube2D(bInverted, i, faX, faY, dX, dY, dHeight, dWidth);\n }\n } else if (rt.getValue() == RiserType.CONE) {\n if (bRendering3D) {\n loa3dFace = computeRiserCone3D(bInverted, dX, dY, dZ, dHeight, dWidth, dWidthZ);\n } else {\n if (isStackedOrPercent(bs)) {\n StackedSizeHints slh = getCurrentStackedSizeHints(i);\n double[] size = null;\n if (isTransposed()) {\n size = computeStacked2DTopNBottomSize(slh, au, dValue, dHeight);\n } else {\n size = computeStacked2DTopNBottomSize(slh, au, dValue, dWidth);\n }\n loaFrontFace = computeStackedRiserCone2D(bInverted, i, faX, faY, dX, dY, dHeight, dWidth, size[0], size[1]);\n } else {\n loaFrontFace = computeRiserCone2D(bInverted, i, faX, faY, dX, dY, dHeight, dWidth);\n }\n }\n } else {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, \"String_Node_Str\", new Object[] { rt.getName() }, Messages.getResourceBundle(getRunTimeContext().getULocale()));\n }\n if (isNaN(dpha[i].getOrthogonalValue())) {\n faX[i] = Double.NaN;\n faY[i] = Double.NaN;\n continue;\n }\n if (bRendering3D) {\n } else {\n for (int j = 0; j < loaFrontFace.length; j++) {\n Location location = loaFrontFace[j];\n if (location.getX() < boClientArea.getLeft()) {\n location.setX(boClientArea.getLeft());\n } else if (location.getX() > boClientArea.getLeft() + boClientArea.getWidth()) {\n location.setX(boClientArea.getLeft() + boClientArea.getWidth());\n }\n if (location.getY() < boClientArea.getTop()) {\n location.setY(boClientArea.getTop());\n } else if (location.getY() > boClientArea.getTop() + boClientArea.getHeight()) {\n location.setY(boClientArea.getTop() + boClientArea.getHeight());\n }\n }\n }\n if (isInteractivityEnabled()) {\n final EList<Trigger> elTriggers = bs.getTriggers();\n if (!elTriggers.isEmpty()) {\n final StructureSource iSource = WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]);\n if (bRendering3D) {\n for (int j = 0; j < loa3dFace.size(); j++) {\n Location3D[] points = loa3dFace.get(j);\n if (points.length <= 2) {\n continue;\n }\n final InteractionEvent iev = createEvent(iSource, elTriggers, ipr);\n iev.setCursor(bs.getCursor());\n final Polygon3DRenderEvent pre3d = ((EventObjectCache) ipr).getEventObject(StructureSource.createSeries(bs), Polygon3DRenderEvent.class);\n pre3d.setPoints3D(points);\n final Location panningOffset = getPanningOffset();\n if (get3DEngine().processEvent(pre3d, panningOffset.getX(), panningOffset.getY()) != null) {\n iev.setHotSpot(pre3d);\n ipr.enableInteraction(iev);\n }\n }\n } else {\n boolean isConeOrTriangle = (rt.getValue() == RiserType.TRIANGLE || rt.getValue() == RiserType.CONE);\n final InteractionEvent iev = createEvent(iSource, elTriggers, ipr);\n iev.setCursor(bs.getCursor());\n final PolygonRenderEvent pre = ((EventObjectCache) ipr).getEventObject(StructureSource.createSeries(bs), PolygonRenderEvent.class);\n Location[] hotspotLoa = new Location[loaFrontFace.length];\n for (int a = 0; a < hotspotLoa.length; a++) {\n hotspotLoa[a] = goFactory.createLocation(loaFrontFace[a].getX(), loaFrontFace[a].getY());\n }\n if (hotspotLoa.length == 4) {\n if (isTransposed()) {\n if (hotspotLoa[2].getX() - hotspotLoa[1].getX() < MIN_HEIGHT) {\n hotspotLoa[2].setX(hotspotLoa[1].getX() + MIN_HEIGHT);\n hotspotLoa[3].setX(hotspotLoa[0].getX() + MIN_HEIGHT);\n }\n } else {\n if (isConeOrTriangle) {\n if (hotspotLoa[0].getY() - hotspotLoa[1].getY() < MIN_HEIGHT) {\n hotspotLoa[1].setY(hotspotLoa[0].getY() - MIN_HEIGHT);\n hotspotLoa[2].setY(hotspotLoa[3].getY() - MIN_HEIGHT);\n }\n } else {\n if (hotspotLoa[1].getY() - hotspotLoa[0].getY() < MIN_HEIGHT) {\n hotspotLoa[0].setY(hotspotLoa[1].getY() - MIN_HEIGHT);\n hotspotLoa[3].setY(hotspotLoa[2].getY() - MIN_HEIGHT);\n }\n }\n }\n } else if (hotspotLoa.length == 3) {\n if (isTransposed()) {\n if (hotspotLoa[1].getX() - hotspotLoa[0].getX() < MIN_HEIGHT) {\n hotspotLoa[1].setX(hotspotLoa[0].getX() + MIN_HEIGHT);\n }\n } else {\n if (hotspotLoa[0].getY() - hotspotLoa[1].getY() < MIN_HEIGHT) {\n hotspotLoa[1].setY(hotspotLoa[0].getY() - MIN_HEIGHT);\n }\n }\n }\n pre.setPoints(hotspotLoa);\n iev.setHotSpot(pre);\n ipr.enableInteraction(iev);\n }\n }\n }\n ScriptHandler.callFunction(sh, ScriptHandler.BEFORE_DRAW_ELEMENT, dpha[i], fixedFill);\n ScriptHandler.callFunction(sh, ScriptHandler.BEFORE_DRAW_DATA_POINT, dpha[i], fixedFill, getRunTimeContext().getScriptContext());\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_ELEMENT, dpha[i]);\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_DATA_POINT, dpha[i]);\n if (isTransposed() ? dWidth != 0 : dHeight != 0 || bShowOutside) {\n if (bRendering3D) {\n if (!hasAddedComparsionPolygon) {\n hasAddedComparsionPolygon = true;\n Location3D[] l3d = new Location3D[4];\n for (int k = 0; k < 4; k++) {\n l3d[k] = goFactory.createLocation3D(0, 0, 0);\n }\n double x0 = dpha[0].getLocation3D().getX();\n double x1 = dpha[dpha.length - 1].getLocation3D().getX() + dSpacing * 2;\n double z = dZ + dWidthZ;\n l3d[0].set(x0, dY, z);\n l3d[1].set(x0, dY + boClientArea.getHeight(), z);\n l3d[2].set(x1, dY + boClientArea.getHeight(), z);\n l3d[3].set(x1, dY, z);\n Polygon3DRenderEvent pre3d = ((EventObjectCache) ipr).getEventObject(dpha[i], Polygon3DRenderEvent.class);\n pre3d.setEnable(false);\n pre3d.setDoubleSided(false);\n pre3d.setOutline(null);\n pre3d.setPoints3D(l3d);\n pre3d.setBackground(fixedFill);\n Object event = dc.getParentDeferredCache().addPlane(pre3d, PrimitiveRenderEvent.FILL);\n if (event instanceof WrappedInstruction) {\n ((WrappedInstruction) event).setSubDeferredCache(subDeferredCache);\n }\n pre3d.setDoubleSided(false);\n pre3d.setEnable(true);\n }\n if (rt.getValue() == RiserType.TUBE) {\n renderRiserTube3D(ipr, WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), loa3dFace, fixedFill, lia, dpha[i]);\n } else if (rt.getValue() == RiserType.CONE) {\n renderRiserCone3D(ipr, WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), loa3dFace, fixedFill, lia, dpha[i]);\n } else {\n render3DPlane(ipr, WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), loa3dFace, fixedFill, lia);\n }\n } else {\n if (rt.getValue() == RiserType.TUBE) {\n renderRiserTube2D(ipr, WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), dpha[i], loaFrontFace, fixedFill, lia, cwa.getDimension(), cwa.getDimension() == ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL ? dSeriesThickness / 2 : dSeriesThickness / 4, cwa.getDimension() == ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL, isTransposed(), true, bInverted, isStackedOrPercent(bs), 0, compareBounds);\n } else if (rt.getValue() == RiserType.CONE) {\n boolean isStacked = isStackedOrPercent(bs);\n double coneThickness = cwa.getDimension() == ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL ? dSeriesThickness / 2 : dSeriesThickness / 4;\n double coneBottomHeight = computeBottomOvalHeightOfCone(i, coneThickness, loaFrontFace, dValue, isStacked);\n renderRiserCone2D(ipr, WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), dpha[i], loaFrontFace, fixedFill, lia, cwa.getDimension(), coneThickness, cwa.getDimension() == ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL, isTransposed(), true, bInverted, isStackedOrPercent(bs), coneBottomHeight, 0, compareBounds);\n } else if (rt.getValue() == RiserType.TRIANGLE) {\n double[] thicknesses = computeThicknessesWithTriangle2D(loaFrontFace, dWidth, dHeight, dSeriesThickness);\n if (cwa.getDimension() == ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL) {\n adjustLocationsWithTriangle2D(loaFrontFace, thicknesses[0], thicknesses[1], dSeriesThickness);\n }\n renderRiserTriangle2D(ipr, WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), loaFrontFace, fixedFill, lia, cwa.getDimension(), thicknesses[0], thicknesses[1], true, 0, compareBounds);\n } else {\n renderPlane(ipr, WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), loaFrontFace, fixedFill, lia, cwa.getDimension(), dSeriesThickness, true, 0, compareBounds);\n }\n }\n }\n ScriptHandler.callFunction(sh, ScriptHandler.AFTER_DRAW_ELEMENT, dpha[i], fixedFill);\n ScriptHandler.callFunction(sh, ScriptHandler.AFTER_DRAW_DATA_POINT, dpha[i], fixedFill, getRunTimeContext().getScriptContext());\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_ELEMENT, dpha[i]);\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_DATA_POINT, dpha[i]);\n laDataPoint.getCaption().setValue(dpha[i].getDisplayValue());\n ScriptHandler.callFunction(sh, ScriptHandler.BEFORE_DRAW_DATA_POINT_LABEL, dpha[i], laDataPoint, getRunTimeContext().getScriptContext());\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_DATA_POINT_LABEL, laDataPoint);\n Position pDataPoint = null;\n Location loDataPoint = null;\n Location3D loDataPoint3d = null;\n Bounds boDataPoint = null;\n try {\n if (laDataPoint.isVisible()) {\n pDataPoint = bRendering3D ? srh3d.getLabelPosition(bs) : srh.getLabelPosition(bs);\n loDataPoint = goFactory.createLocation(0, 0);\n loDataPoint3d = goFactory.createLocation3D(0, 0, 0);\n boDataPoint = goFactory.createBounds(0, 0, 0, 0);\n }\n } catch (Exception ex) {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, ex);\n }\n if (laDataPoint.isVisible() && (dHeight != 0 || bShowOutside)) {\n if (!dpha[i].isOutside()) {\n if (!cwa.isTransposed()) {\n if (bRendering3D) {\n if (pDataPoint.getValue() == Position.OUTSIDE) {\n if (!bInverted) {\n loDataPoint3d.set(dX + dWidth / 2, dY - p.getVerticalSpacing(), dZ + dWidthZ / 2);\n Text3DRenderEvent tre = ((EventObjectCache) ipr).getEventObject(WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), Text3DRenderEvent.class);\n tre.setLabel(laDataPoint);\n tre.setTextPosition(TextRenderEvent.BELOW);\n tre.setAction(TextRenderEvent.RENDER_TEXT_AT_LOCATION);\n Location3D[] loa3d = new Location3D[5];\n loa3d[0] = loDataPoint3d;\n loa3d[1] = goFactory.createLocation3D(dX, dY - p.getVerticalSpacing(), dZ + dWidthZ / 2);\n loa3d[2] = goFactory.createLocation3D(dX, dY - p.getVerticalSpacing() - 16, dZ + dWidthZ / 2);\n loa3d[3] = goFactory.createLocation3D(dX + dWidth, dY - p.getVerticalSpacing() - 16, dZ + dWidthZ / 2);\n loa3d[4] = goFactory.createLocation3D(dX + dWidth, dY - p.getVerticalSpacing(), dZ + dWidthZ / 2);\n tre.setBlockBounds3D(loa3d);\n getDeferredCache().addLabel(tre);\n } else {\n loDataPoint3d.set(dX + dWidth / 2, dY + dHeight + p.getVerticalSpacing(), dZ + dWidthZ / 2);\n Text3DRenderEvent tre = ((EventObjectCache) ipr).getEventObject(WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), Text3DRenderEvent.class);\n tre.setAction(TextRenderEvent.RENDER_TEXT_AT_LOCATION);\n tre.setLabel(laDataPoint);\n tre.setTextPosition(TextRenderEvent.ABOVE);\n Location3D[] loa3d = new Location3D[5];\n loa3d[0] = loDataPoint3d;\n loa3d[1] = goFactory.createLocation3D(dX + dWidth, dY + dHeight + p.getVerticalSpacing(), dZ + dWidthZ / 2);\n loa3d[2] = goFactory.createLocation3D(dX + dWidth, dY + dHeight + 16 + p.getVerticalSpacing(), dZ + dWidthZ / 2);\n loa3d[3] = goFactory.createLocation3D(dX, dY + dHeight + 16 + p.getVerticalSpacing(), dZ + dWidthZ / 2);\n loa3d[4] = goFactory.createLocation3D(dX, dY + dHeight + p.getVerticalSpacing(), dZ + dWidthZ / 2);\n tre.setBlockBounds3D(loa3d);\n getDeferredCache().addLabel(tre);\n }\n } else {\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, \"String_Node_Str\", new Object[] { pDataPoint.getName() }, Messages.getResourceBundle(getRunTimeContext().getULocale()));\n }\n } else {\n switch(pDataPoint.getValue()) {\n case Position.OUTSIDE:\n if (!bInverted) {\n loDataPoint.set(dX + dWidth / 2, dY - p.getVerticalSpacing());\n renderLabel(WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), TextRenderEvent.RENDER_TEXT_AT_LOCATION, laDataPoint, Position.ABOVE_LITERAL, loDataPoint, null);\n } else {\n loDataPoint.set(dX + dWidth / 2, dY + dHeight + p.getVerticalSpacing());\n renderLabel(WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), TextRenderEvent.RENDER_TEXT_AT_LOCATION, laDataPoint, Position.BELOW_LITERAL, loDataPoint, null);\n }\n break;\n case Position.INSIDE:\n if (rt.getValue() == RiserType.CONE || rt.getValue() == RiserType.TRIANGLE) {\n if (!bInverted) {\n loDataPoint.set(dX + dWidth / 2, dY + dHeight);\n renderLabel(WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), TextRenderEvent.RENDER_TEXT_AT_LOCATION, laDataPoint, Position.ABOVE_LITERAL, loDataPoint, null);\n } else {\n loDataPoint.set(dX + dWidth / 2, dY);\n renderLabel(WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), TextRenderEvent.RENDER_TEXT_AT_LOCATION, laDataPoint, Position.BELOW_LITERAL, loDataPoint, null);\n }\n } else {\n boDataPoint.updateFrom(loaFrontFace);\n renderLabel(WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), TextRenderEvent.RENDER_TEXT_IN_BLOCK, laDataPoint, null, null, boDataPoint);\n }\n break;\n default:\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, \"String_Node_Str\", new Object[] { pDataPoint.getName() }, Messages.getResourceBundle(getRunTimeContext().getULocale()));\n }\n }\n } else {\n switch(pDataPoint.getValue()) {\n case Position.OUTSIDE:\n if (!bInverted) {\n loDataPoint.set(dX - p.getHorizontalSpacing(), dY + dHeight / 2);\n renderLabel(WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), TextRenderEvent.RENDER_TEXT_AT_LOCATION, laDataPoint, Position.LEFT_LITERAL, loDataPoint, null);\n } else {\n loDataPoint.set(dX + dWidth + p.getHorizontalSpacing(), dY + dHeight / 2);\n renderLabel(WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), TextRenderEvent.RENDER_TEXT_AT_LOCATION, laDataPoint, Position.RIGHT_LITERAL, loDataPoint, null);\n }\n break;\n case Position.INSIDE:\n if (rt.getValue() == RiserType.CONE || rt.getValue() == RiserType.TRIANGLE) {\n if (!bInverted) {\n loDataPoint.set(dX + dWidth, dY + dHeight / 2);\n renderLabel(WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), TextRenderEvent.RENDER_TEXT_AT_LOCATION, laDataPoint, Position.LEFT_LITERAL, loDataPoint, null);\n } else {\n loDataPoint.set(dX, dY + dHeight / 2);\n renderLabel(WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), TextRenderEvent.RENDER_TEXT_AT_LOCATION, laDataPoint, Position.RIGHT_LITERAL, loDataPoint, null);\n }\n } else {\n boDataPoint.updateFrom(loaFrontFace);\n renderLabel(WrappedStructureSource.createSeriesDataPoint(bs, dpha[i]), TextRenderEvent.RENDER_TEXT_IN_BLOCK, laDataPoint, null, null, boDataPoint);\n }\n break;\n default:\n throw new ChartException(ChartEngineExtensionPlugin.ID, ChartException.RENDERING, \"String_Node_Str\", new Object[] { pDataPoint.getName() }, Messages.getResourceBundle(getRunTimeContext().getULocale()));\n }\n }\n }\n }\n ScriptHandler.callFunction(sh, ScriptHandler.AFTER_DRAW_DATA_POINT_LABEL, dpha[i], laDataPoint, getRunTimeContext().getScriptContext());\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_DATA_POINT_LABEL, laDataPoint);\n }\n if (!bRendering3D) {\n List<double[]> points = new ArrayList<double[]>();\n for (int i = 0; i < faX.length; i++) {\n points.add(new double[] { faX[i], faY[i] });\n }\n points = filterNull(points);\n if (isLastRuntimeSeriesInAxis()) {\n getRunTimeContext().putState(STACKED_SERIES_LOCATION_KEY, null);\n } else {\n getRunTimeContext().putState(STACKED_SERIES_LOCATION_KEY, points);\n }\n if (getSeries().getCurveFitting() != null) {\n Location[] larray = createLocationArray(points);\n renderFittingCurve(ipr, larray, getSeries().getCurveFitting(), false, true);\n }\n }\n resetAllStackedSizeHints();\n if (!bRendering3D) {\n restoreClipping(ipr);\n }\n}\n"
"public void detach() {\n if (target.invisible > 0)\n target.invisible--;\n stealthed = false;\n cooldown = 10 - (level / 4);\n QuickSlot.refresh();\n super.detach();\n}\n"
"public void postConstruct(Composite parent) {\n final Shell shell = parent.getShell();\n parent.setLayout(new GridLayout(7, false));\n Group grpInputSettings = new Group(parent, SWT.NONE);\n grpInputSettings.setText(\"String_Node_Str\");\n GridData gd_grpInputSettings = new GridData(SWT.LEFT, SWT.CENTER, false, false, 7, 1);\n gd_grpInputSettings.heightHint = 259;\n gd_grpInputSettings.widthHint = 529;\n grpInputSettings.setLayoutData(gd_grpInputSettings);\n Composite composite = new Composite(grpInputSettings, SWT.NONE);\n composite.setBounds(10, 20, 515, 95);\n Label lblLabel_1 = new Label(composite, SWT.NONE);\n lblLabel_1.setBounds(0, 35, 36, 15);\n lblLabel_1.setText(\"String_Node_Str\");\n Label lblLabel = new Label(composite, SWT.NONE);\n lblLabel.setBounds(0, 5, 36, 15);\n lblLabel.setText(\"String_Node_Str\");\n txtLabel1 = new Text(composite, SWT.BORDER);\n txtLabel1.setText(\"String_Node_Str\");\n txtLabel1.setBounds(66, 2, 157, 21);\n txtLabel2 = new Text(composite, SWT.BORDER);\n txtLabel2.setText(\"String_Node_Str\");\n txtLabel2.setBounds(66, 32, 157, 21);\n Label lblFolder = new Label(composite, SWT.NONE);\n lblFolder.setBounds(237, 6, 24, 15);\n lblFolder.setText(\"String_Node_Str\");\n Label lblFolder_1 = new Label(composite, SWT.NONE);\n lblFolder_1.setBounds(237, 36, 24, 15);\n lblFolder_1.setText(\"String_Node_Str\");\n txtFolderPath1 = new Text(composite, SWT.BORDER);\n txtFolderPath1.setBounds(266, 3, 212, 21);\n txtFolderPath2 = new Text(composite, SWT.BORDER);\n txtFolderPath2.setBounds(266, 33, 212, 21);\n Button button = new Button(composite, SWT.NONE);\n button.setBounds(474, 2, 35, 25);\n button.addMouseListener(new MouseAdapter() {\n public void mouseUp(MouseEvent e) {\n DirectoryDialog fd1 = new DirectoryDialog(shell);\n fd1.open();\n String fp1Directory = fd1.getFilterPath();\n txtFolderPath1.setText(fp1Directory);\n }\n });\n button.setText(\"String_Node_Str\");\n Button button_1 = new Button(composite, SWT.NONE);\n button_1.setBounds(474, 32, 35, 25);\n button_1.addMouseListener(new MouseAdapter() {\n public void mouseUp(MouseEvent e) {\n DirectoryDialog fd2 = new DirectoryDialog(shell);\n fd2.open();\n String fp2Directory = fd2.getFilterPath();\n txtFolderPath2.setText(fp2Directory);\n }\n });\n button_1.setText(\"String_Node_Str\");\n final Button btnPreprocess = new Button(composite, SWT.CHECK);\n btnPreprocess.setBounds(0, 67, 94, 18);\n btnPreprocess.setText(\"String_Node_Str\");\n final Button btnWeights = new Button(grpInputSettings, SWT.CHECK);\n btnWeights.setSelection(true);\n btnWeights.setBounds(10, 132, 174, 16);\n btnWeights.setText(\"String_Node_Str\");\n Label lblKfoldCrossValidation = new Label(grpInputSettings, SWT.NONE);\n lblKfoldCrossValidation.setBounds(13, 163, 149, 15);\n lblKfoldCrossValidation.setText(\"String_Node_Str\");\n txtkVal = new Text(grpInputSettings, SWT.BORDER);\n txtkVal.setBounds(170, 160, 46, 21);\n Label lblOutputPath = new Label(grpInputSettings, SWT.NONE);\n lblOutputPath.setBounds(13, 195, 70, 15);\n lblOutputPath.setText(\"String_Node_Str\");\n txtOutputFile = new Text(grpInputSettings, SWT.BORDER);\n txtOutputFile.setBounds(170, 192, 316, 21);\n Button btnTrain = new Button(grpInputSettings, SWT.NONE);\n btnTrain.setBounds(10, 223, 52, 25);\n btnTrain.addMouseListener(new MouseAdapter() {\n public void mouseUp(MouseEvent e) {\n long currentTime = System.currentTimeMillis();\n String ppDir1 = txtFolderPath1.getText();\n String ppDir2 = txtFolderPath2.getText();\n if (ppDir1.equals(\"String_Node_Str\") || ppDir2.equals(\"String_Node_Str\") || txtOutputFile.getText().equals(\"String_Node_Str\")) {\n showError(shell);\n return;\n }\n if (btnPreprocess.getSelection()) {\n ppService = GlobalPresserSettings.ppService;\n if (ppService.options == null) {\n System.out.println(\"String_Node_Str\");\n appendLog(\"String_Node_Str\");\n GlobalPresserSettings.ppService.setOptions(shell);\n }\n IEclipseContext iEclipseContext = context;\n ContextInjectionFactory.inject(ppService, iEclipseContext);\n appendLog(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n try {\n ppDir1 = ppService.doPreprocessing(txtFolderPath1.getText());\n ppDir2 = ppService.doPreprocessing(txtFolderPath2.getText());\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n try {\n SvmClassifier svm = new SvmClassifier(txtLabel1.getText(), txtLabel2.getText(), txtOutputFile.getText());\n IEclipseContext iEclipseContext = context;\n ContextInjectionFactory.inject(svm, iEclipseContext);\n appendLog(\"String_Node_Str\");\n if (true) {\n CrossValidator cv = new CrossValidator();\n ContextInjectionFactory.inject(cv, iEclipseContext);\n cv.doCross(svm, txtLabel1.getText(), ppDir1, txtLabel2.getText(), ppDir2, Integer.parseInt(txtkVal.getText()), btnWeights.getSelection());\n }\n System.out.println(\"String_Node_Str\" + ((System.currentTimeMillis() - currentTime) / (double) 1000) + \"String_Node_Str\");\n appendLog(\"String_Node_Str\" + ((System.currentTimeMillis() - currentTime) / (double) 1000) + \"String_Node_Str\");\n if (btnPreprocess.getSelection() && ppService.doCleanUp()) {\n ppService.clean(ppDir1);\n System.out.println(\"String_Node_Str\" + ppDir1);\n appendLog(\"String_Node_Str\" + ppDir1);\n ppService.clean(ppDir2);\n System.out.println(\"String_Node_Str\" + ppDir2);\n appendLog(\"String_Node_Str\" + ppDir2);\n }\n appendLog(\"String_Node_Str\");\n } catch (IOException ie) {\n ie.printStackTrace();\n }\n }\n });\n btnTrain.setText(\"String_Node_Str\");\n Button button_2 = new Button(grpInputSettings, SWT.NONE);\n button_2.setBounds(482, 191, 36, 25);\n button_2.addMouseListener(new MouseAdapter() {\n public void mouseUp(MouseEvent e) {\n txtOutputFile.setText(\"String_Node_Str\");\n DirectoryDialog fd1 = new DirectoryDialog(shell);\n fd1.open();\n String fp1Directory = fd1.getFilterPath();\n txtOutputFile.setText(fp1Directory);\n }\n });\n button_2.setText(\"String_Node_Str\");\n}\n"
"public void remove() {\n removeLive.set(true);\n}\n"
"private Listitem getVisibleRow(Listitem item) {\n if (item instanceof Listgroup) {\n final Listgroup g = (Listgroup) item;\n if (!g.isOpen()) {\n for (int j = 0, len = g.getItemCount(); j < len && _it.hasNext(); j++) _it.next();\n }\n }\n while (!item.isVisible() && _it.hasNext()) item = (Listitem) _it.next();\n return item;\n}\n"
"public void run() {\n while (true) {\n for (int k = 0; k < 50; k++) {\n for (int i = 0; i < money.length; i++) {\n int j = (int) (Math.random() * money.length);\n money[i] -= 1;\n money[j] += 1;\n }\n }\n Arrays.sort(money);\n frame.render(money);\n AlgoVisHelper.pause(DELAY);\n }\n}\n"
"Optional<char[]> getNewPassword() {\n if (!mSetPass.isSelected())\n return Optional.of(new char[0]);\n char[] newPass = mNewPassField.getPassword();\n if (!Arrays.equals(newPass, mConfirmPassField.getPassword()))\n return Optional.empty();\n return Optional.of(newPass);\n}\n"
"public void handle(Message inputMessage, IMessageTarget messageTarget) {\n getComponentStatistics().incrementInboundMessages();\n IResourceRuntime resourceRuntime = getResourceRuntime();\n String path = resourceRuntime.getAgentOverrides().get(LocalFile.LOCALFILE_PATH);\n if (useTriggerFile) {\n File triggerFile = new File(path, triggerFilePath);\n if (triggerFile.exists()) {\n pollForFiles(path, inputMessage, messageTarget);\n FileUtils.deleteQuietly(triggerFile);\n } else if (cancelOnNoFiles) {\n getComponentStatistics().incrementOutboundMessages();\n messageTarget.put(new ShutdownMessage(getFlowStepId(), true));\n }\n } else {\n pollForFiles(path, inputMessage, messageTarget);\n }\n}\n"
"public <R> R apply(LatticeMorphism<BooleanExpression, R> f) throws TimeoutException {\n if (bdd.isOne()) {\n return f.True();\n } else if (bdd.isZero()) {\n return f.False();\n } else {\n return f.MkOr(f.MkAnd(f.apply(bdd.var()), f.apply(new BDDExpression(bdd.high()))), f.apply(new BDDExpression(bdd.low())));\n }\n}\n"
"Boolean sendPlayerState() {\n return playerBoard.getBrainySnakePlayer().handlePlayerStatusUpdate(this.lastPlayerState);\n}\n"
"public Polygon obtainPologygon() {\n Polygon result = new Polygon();\n if (this.synapse.isSelfConnected()) {\n int x = (int) this.synapse.getFromLayer().getX() + DrawLayer.LAYER_WIDTH;\n int y = (int) this.synapse.getFromLayer().getY();\n result.addPoint(x - 10, y - 10);\n result.addPoint(x + 10, y - 10);\n result.addPoint(x + 10, y + 10);\n result.addPoint(x - 10, y + 10);\n } else if (this.fromSide == Side.Left || this.fromSide == Side.Right) {\n result.addPoint((int) this.from.getX(), (int) from.getY() - 10);\n result.addPoint((int) this.from.getX(), (int) from.getY() + 10);\n result.addPoint((int) this.to.getX(), (int) to.getY() + 10);\n result.addPoint((int) this.to.getX(), (int) to.getY() - 10);\n } else {\n result.addPoint((int) this.from.getX() - 10, (int) from.getY());\n result.addPoint((int) this.from.getX() + 10, (int) from.getY());\n result.addPoint((int) this.to.getX() + 10, (int) to.getY());\n result.addPoint((int) this.to.getX() - 10, (int) to.getY());\n }\n return result;\n}\n"
"public void onClick(View v) {\n int position = getAdapterPosition();\n if (Utils.isWeekOfYearEnabled()) {\n if (position % 8 == 0) {\n return;\n }\n position = fixForWeekOfYearNumber(position);\n }\n if (totalDays < position - 6 - startingDayOfWeek || position - 7 - startingDayOfWeek < 0) {\n return;\n }\n if (position - 7 - startingDayOfWeek >= 0) {\n monthFragment.onClickItem(days.get(position - 7 - startingDayOfWeek).getJdn());\n MonthAdapter.this.selectDay(1 + position - 7 - startingDayOfWeek);\n }\n}\n"
"public static boolean generate() {\n devices = new LinkedList<GPUDevice>();\n OS os = OS.getOS();\n String path = os.getCUDALib();\n if (path == null) {\n System.out.println(\"String_Node_Str\");\n return false;\n }\n CUDA cudalib = null;\n try {\n cudalib = (CUDA) Native.loadLibrary(path, CUDA.class);\n } catch (java.lang.UnsatisfiedLinkError e) {\n System.out.println(\"String_Node_Str\" + path + \"String_Node_Str\");\n return false;\n } catch (java.lang.ExceptionInInitializerError e) {\n System.out.println(\"String_Node_Str\" + e);\n return false;\n } catch (Exception e) {\n System.out.println(\"String_Node_Str\" + e);\n return false;\n }\n int result = CUresult.CUDA_ERROR_UNKNOWN;\n result = cudalib.cuInit(0);\n if (result != CUresult.CUDA_SUCCESS) {\n System.out.println(\"String_Node_Str\" + result + \"String_Node_Str\");\n if (result == CUresult.CUDA_ERROR_UNKNOWN) {\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n }\n return false;\n }\n if (result == CUresult.CUDA_ERROR_NO_DEVICE) {\n return false;\n }\n IntByReference count = new IntByReference();\n result = cudalib.cuDeviceGetCount(count);\n if (result != CUresult.CUDA_SUCCESS) {\n System.out.println(\"String_Node_Str\" + CUresult.stringFor(result) + \"String_Node_Str\");\n return false;\n }\n HashMap<Integer, GPUDevice> devicesWithPciId = new HashMap<Integer, GPUDevice>(count.getValue());\n for (int num = 0; num < count.getValue(); num++) {\n IntByReference aDevice = new IntByReference();\n result = cudalib.cuDeviceGet(aDevice, num);\n if (result != CUresult.CUDA_SUCCESS) {\n System.out.println(\"String_Node_Str\" + CUresult.stringFor(result) + \"String_Node_Str\");\n continue;\n }\n IntByReference pciBusId = new IntByReference();\n result = cudalib.cuDeviceGetAttribute(pciBusId, CUDeviceAttribute.CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, aDevice.getValue());\n if (result != CUresult.CUDA_SUCCESS) {\n System.out.println(\"String_Node_Str\" + CUresult.stringFor(result) + \"String_Node_Str\");\n continue;\n }\n byte[] name = new byte[256];\n result = cudalib.cuDeviceGetName(name, 256, num);\n if (result != CUresult.CUDA_SUCCESS) {\n System.out.println(\"String_Node_Str\" + CUresult.stringFor(result) + \"String_Node_Str\");\n continue;\n }\n LongByReference ram = new LongByReference();\n try {\n result = cudalib.cuDeviceTotalMem_v2(ram, num);\n } catch (UnsatisfiedLinkError e) {\n result = cudalib.cuDeviceTotalMem(ram, num);\n }\n if (result != CUresult.CUDA_SUCCESS) {\n System.out.println(\"String_Node_Str\" + CUresult.stringFor(result) + \"String_Node_Str\");\n return false;\n }\n devicesWithPciId.put(pciBusId.getValue(), new GPUDevice(new String(name).trim(), ram.getValue(), \"String_Node_Str\"));\n }\n int i = 0;\n for (Map.Entry<Integer, GPUDevice> entry : devicesWithPciId.entrySet()) {\n GPUDevice aDevice = entry.getValue();\n aDevice.setCudaName(\"String_Node_Str\" + Integer.toString(i));\n devices.add(aDevice);\n i++;\n }\n return true;\n}\n"
"private static void createComponentsDrawer(final IComponentsFactory compFac, boolean needHiddenComponent, boolean isFavorite, int a) {\n clearGroup();\n LinkedList<CreationToolEntry> nodeList = new LinkedList<CreationToolEntry>();\n PaletteDrawer componentsDrawer;\n String name, longName;\n String family;\n String oraFamily;\n List<String> families = new ArrayList<String>();\n HashMap<String, String> familyMap = new HashMap<String, String>();\n boolean favoriteFlag;\n List listName = new ArrayList();\n CombinedTemplateCreationEntry component;\n Hashtable<String, PaletteDrawer> ht = new Hashtable<String, PaletteDrawer>();\n paletteState = isFavorite;\n if (a == 0) {\n componentsDrawer = new PaletteDrawer(Messages.getString(\"String_Node_Str\"));\n }\n List<IComponent> componentList = new ArrayList<IComponent>(compFac.getComponents());\n IProcess process = ActiveProcessTracker.getCurrentProcess();\n ERepositoryObjectType type = null;\n if (process != null && process instanceof IProcess2 && ((IProcess2) process).getProperty() != null) {\n type = ERepositoryObjectType.getItemType(((IProcess2) process).getProperty().getItem());\n }\n if (type == null) {\n return;\n }\n Iterator<IComponent> iterator = componentList.iterator();\n while (iterator.hasNext()) {\n IComponent comp = iterator.next();\n if (!ArrayUtils.contains(type.getProducts(), comp.getPaletteType())) {\n iterator.remove();\n }\n }\n Collections.sort(componentList, new Comparator<IComponent>() {\n public int compare(IComponent component1, IComponent component2) {\n return component1.getName().compareTo(component2.getName());\n }\n });\n for (int i = 0; i < componentList.size(); i++) {\n IComponent xmlComponent = componentList.get(i);\n if (xmlComponent.isTechnical()) {\n continue;\n }\n if (xmlComponent.isLoaded()) {\n family = xmlComponent.getTranslatedFamilyName();\n oraFamily = xmlComponent.getOriginalFamilyName();\n String[] strings = family.split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX);\n String[] oraStrings = oraFamily.split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX);\n for (int j = 0; j < strings.length; j++) {\n if (!needHiddenComponent && !xmlComponent.isVisible(oraStrings[j])) {\n continue;\n }\n String key = null;\n key = xmlComponent.getName() + \"String_Node_Str\" + oraStrings[j];\n if (a == 0) {\n if (!oraStrings[j].equals(\"String_Node_Str\")) {\n if (isFavorite && !DesignerPlugin.getDefault().getPreferenceStore().getBoolean(key)) {\n continue;\n }\n }\n }\n families.add(strings[j]);\n familyMap.put(strings[j], oraStrings[j]);\n }\n }\n }\n Collections.sort(families);\n if (a == 0) {\n for (Iterator iter = families.iterator(); iter.hasNext(); ) {\n family = (String) iter.next();\n String oraFam = familyMap.get(family);\n componentsDrawer = ht.get(family);\n if (componentsDrawer == null) {\n componentsDrawer = createComponentDrawer(ht, family);\n if (componentsDrawer instanceof IPaletteFilter) {\n ((IPaletteFilter) componentsDrawer).setOriginalName(oraFam);\n }\n }\n }\n }\n boolean noteAeeded = false;\n boolean needAddNote = true;\n boolean needToAdd = false;\n for (int i = 0; i < componentList.size(); i++) {\n IComponent xmlComponent = componentList.get(i);\n if (xmlComponent.isTechnical()) {\n continue;\n }\n family = xmlComponent.getTranslatedFamilyName();\n oraFamily = xmlComponent.getOriginalFamilyName();\n if (filter != null) {\n Pattern pattern = Pattern.compile(\"String_Node_Str\");\n Matcher matcher = pattern.matcher(filter);\n if (!matcher.matches() && filter != \"String_Node_Str\") {\n filter = \"String_Node_Str\";\n }\n }\n if ((oraFamily.equals(\"String_Node_Str\") || oraFamily.equals(\"String_Node_Str\")) && !noteAeeded && needAddNote) {\n CreationToolEntry noteCreationToolEntry = new CreationToolEntry(Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"), new NoteCreationFactory(), ImageProvider.getImageDesc(ECoreImage.CODE_ICON), ImageProvider.getImageDesc(ECoreImage.CODE_ICON));\n if (a == 0) {\n PaletteDrawer drawer = ht.get(family);\n if (drawer != null) {\n noteCreationToolEntry.setParent(drawer);\n drawer.add(noteCreationToolEntry);\n }\n } else if ((a == 1)) {\n for (String s : families) {\n if (s.equals(family)) {\n needToAdd = true;\n }\n }\n if (needToAdd == true)\n nodeList.add(0, noteCreationToolEntry);\n }\n noteAeeded = true;\n }\n if (filter != null) {\n Pattern pattern = Pattern.compile(\"String_Node_Str\");\n Matcher matcher = pattern.matcher(filter);\n if (matcher.matches()) {\n String regex = getFilterRegex();\n if (!xmlComponent.getName().toLowerCase().matches(regex) && !xmlComponent.getLongName().toLowerCase().matches(regex)) {\n continue;\n }\n }\n }\n if (!needHiddenComponent && !xmlComponent.isVisible()) {\n continue;\n }\n family = xmlComponent.getTranslatedFamilyName();\n oraFamily = xmlComponent.getOriginalFamilyName();\n String[] keys = family.split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX);\n String[] oraKeys = oraFamily.split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX);\n for (int j = 0; j < keys.length; j++) {\n String key = null;\n key = xmlComponent.getName() + \"String_Node_Str\" + oraKeys[j];\n if (isFavorite && !DesignerPlugin.getDefault().getPreferenceStore().getBoolean(key)) {\n continue;\n }\n }\n if (xmlComponent.isLoaded()) {\n name = xmlComponent.getName();\n longName = xmlComponent.getLongName();\n ImageDescriptor imageSmall = xmlComponent.getIcon16();\n IPreferenceStore store = DesignerPlugin.getDefault().getPreferenceStore();\n ImageDescriptor imageLarge;\n final String string = store.getString(TalendDesignerPrefConstants.LARGE_ICONS_SIZE);\n if (string.equals(\"String_Node_Str\")) {\n imageLarge = xmlComponent.getIcon24();\n } else {\n imageLarge = xmlComponent.getIcon32();\n }\n String[] strings = family.split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX);\n String[] oraStrings = oraFamily.split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX);\n for (int j = 0; j < strings.length; j++) {\n if (!needHiddenComponent && !xmlComponent.isVisible(oraStrings[j])) {\n continue;\n }\n String key = null;\n key = xmlComponent.getName() + \"String_Node_Str\" + oraStrings[j];\n if (isFavorite && !DesignerPlugin.getDefault().getPreferenceStore().getBoolean(key)) {\n continue;\n }\n component = new CombinedTemplateCreationEntry(name, name, Node.class, new PaletteComponentFactory(xmlComponent), imageSmall, imageLarge);\n component.setDescription(longName);\n if (a == 0) {\n componentsDrawer = ht.get(strings[j]);\n component.setParent(componentsDrawer);\n componentsDrawer.add(component);\n } else if (a == 1) {\n boolean canAdd = true;\n for (int z = 0; z < nodeList.size(); z++) {\n if ((nodeList.get(z).getLabel()).equals(component.getLabel())) {\n canAdd = false;\n }\n }\n if (canAdd == true) {\n nodeList.add(component);\n }\n }\n }\n }\n }\n if (a == 1) {\n for (CreationToolEntry entryComponent : nodeList) {\n entryComponent.setParent(paGroup);\n paGroup.add(entryComponent);\n }\n palette.add(paGroup);\n }\n setFilter(\"String_Node_Str\");\n}\n"
"protected boolean versionFound(String version) {\n if (!version.startsWith(\"String_Node_Str\")) {\n return false;\n }\n String nineFiveVersionString = \"String_Node_Str\";\n if (version.equals(nineFiveVersionString)) {\n try {\n long fileSize = getFileChannel().size();\n long recordCount = fileSize / getRecordSize();\n if (recordCount > 0xFFFF) {\n throw new IllegalStoreVersionException(\"String_Node_Str\" + version + \"String_Node_Str\" + recordCount + \"String_Node_Str\" + \"String_Node_Str\" + 0xFFFF + \"String_Node_Str\");\n }\n } catch (IOException e) {\n throw new IllegalStoreVersionException(\"String_Node_Str\" + \"String_Node_Str\" + version + \"String_Node_Str\");\n }\n return true;\n }\n throw new IllegalStoreVersionException(\"String_Node_Str\" + version + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n}\n"
"protected void mouseClicked(int i, int j, int k) {\n if (gate == null) {\n return;\n }\n super.mouseClicked(i, j, k);\n AdvancedSlot slot = getSlotAtLocation(i, j);\n if (slot instanceof TriggerSlot && container.hasTriggers()) {\n TriggerSlot triggerSlot = (TriggerSlot) slot;\n IStatement changed = null;\n if (triggerSlot.getStatement() == null) {\n if (k == 0) {\n changed = container.getFirstTrigger();\n } else {\n changed = container.getLastTrigger();\n }\n } else {\n Iterator<IStatement> it = container.getTriggerIterator(k != 0);\n for (; it.hasNext(); ) {\n IStatement trigger = it.next();\n if (!it.hasNext()) {\n changed = null;\n break;\n }\n if (trigger == triggerSlot.getStatement()) {\n changed = it.next();\n break;\n }\n }\n }\n if (changed == null) {\n container.setTrigger(triggerSlot.slot, null, true);\n } else {\n container.setTrigger(triggerSlot.slot, changed.getUniqueTag(), true);\n }\n for (StatementParameterSlot p : triggerSlot.parameters) {\n IStatementParameter parameter = null;\n if (changed != null && p.slot < changed.minParameters()) {\n parameter = changed.createParameter(p.slot);\n }\n container.setTriggerParameter(triggerSlot.slot, p.slot, parameter, true);\n }\n } else if (slot instanceof ActionSlot) {\n ActionSlot actionSlot = (ActionSlot) slot;\n IStatement changed = null;\n if (actionSlot.getStatement() == null) {\n if (k == 0) {\n changed = container.getFirstAction();\n } else {\n changed = container.getLastAction();\n }\n } else {\n Iterator<IStatement> it = container.getActionIterator(k != 0);\n for (; it.hasNext(); ) {\n IStatement action = it.next();\n if (!it.hasNext()) {\n changed = null;\n break;\n }\n if (action == actionSlot.getStatement()) {\n changed = it.next();\n break;\n }\n }\n }\n if (changed == null) {\n container.setAction(actionSlot.slot, null, true);\n } else {\n container.setAction(actionSlot.slot, changed.getUniqueTag(), true);\n }\n for (StatementParameterSlot p : actionSlot.parameters) {\n container.setActionParameter(actionSlot.slot, p.slot, null, true);\n }\n } else if (slot instanceof StatementParameterSlot) {\n StatementParameterSlot paramSlot = (StatementParameterSlot) slot;\n StatementSlot statement = paramSlot.statementSlot;\n if (statement.isDefined() && statement.getStatement().maxParameters() != 0) {\n IStatementParameter param = paramSlot.getParameter();\n if (param == null) {\n param = statement.getStatement().createParameter(paramSlot.slot);\n }\n if (param != null) {\n param.onClick(gate, statement.getStatement(), mc.thePlayer.inventory.getItemStack(), k);\n paramSlot.setParameter(param, true);\n }\n }\n }\n container.markDirty();\n}\n"
"public Void call() throws Exception {\n int priorValue = lastValue.getAndSet(index);\n if (priorValue != index) {\n inner.call();\n }\n return null;\n}\n"
"public static HTTPResponseResult postForm(String address, String usernamePropertyName, String passwordPropertyName, String[] formParamNames, String[] formParamValues, int usernameParamIx, int passwordParamIx) {\n DefaultHttpClient httpClient = null;\n try {\n HttpPost postMethod = new HttpPost(address);\n httpClient = getHttpClient(usernamePropertyName, passwordPropertyName, postMethod.getURI().getHost());\n Credentials creds = null;\n if (usernameParamIx != -1 && usernameParamIx < formParamNames.length && passwordParamIx != -1 && passwordParamIx < formParamNames.length) {\n URL url = new URL(address);\n creds = new HTTPCredentialsProvider(usernamePropertyName, passwordPropertyName).getCredentials(new AuthScope(url.getHost(), url.getPort()));\n }\n }\n List<NameValuePair> parameters = new ArrayList<NameValuePair>();\n if (formParamNames != null) {\n for (int i = 0; i < formParamNames.length; i++) {\n if (i == usernameParamIx && creds != null) {\n parameters.add(new BasicNameValuePair(formParamNames[i], creds.getUserPrincipal().getName()));\n } else if (i == passwordParamIx && creds != null) {\n parameters.add(new BasicNameValuePair(formParamNames[i], creds.getPassword()));\n } else {\n parameters.add(new BasicNameValuePair(formParamNames[i], formParamValues[i]));\n }\n }\n String s = URLEncodedUtils.format(parameters, HTTP.UTF_8);\n StringEntity entity = new StringEntity(s, HTTP.UTF_8);\n entity.setContentType(URLEncodedUtils.CONTENT_TYPE);\n postMethod.setEntity(entity);\n HttpEntity resEntity = executeMethod(httpClient, postMethod);\n if (resEntity == null)\n return null;\n return new HTTPResponseResult(resEntity, httpClient);\n } catch (Throwable e) {\n logger.error(\"String_Node_Str\", e);\n }\n return null;\n}\n"
"public void handle(RoutingContext context) {\n DataBase database = DataBase.getInstance();\n String uid = context.request().getParam(\"String_Node_Str\");\n String id = context.request().getParam(\"String_Node_Str\");\n String password = context.request().getParam(\"String_Node_Str\");\n int number = Integer.parseInt(context.request().getParam(\"String_Node_Str\"));\n int status = Integer.parseInt(context.request().getParam(\"String_Node_Str\"));\n String name = context.request().getParam(\"String_Node_Str\");\n try {\n if (Guardian.checkParameters(uid, id, password)) {\n JobResult result = userManager.register(uid, id, password);\n if (result.isSuccess()) {\n database.executeUpdate(\"String_Node_Str\", id, \"String_Node_Str\", number, \"String_Node_Str\", status, \"String_Node_Str\", name, \"String_Node_Str\");\n database.executeUpdate(\"String_Node_Str\", id, \"String_Node_Str\");\n database.executeUpdate(\"String_Node_Str\", id, \"String_Node_Str\");\n context.response().setStatusCode(201);\n context.response().setStatusMessage(result.getMessage()).end();\n context.response().close();\n } else {\n context.response().setStatusCode(409);\n context.response().setStatusMessage(result.getMessage()).end();\n context.response().close();\n }\n } else {\n }\n } catch (SQLException e) {\n context.response().setStatusCode(500).end();\n context.response().close();\n Log.l(\"String_Node_Str\");\n }\n}\n"
"public void testXmlAttributeOverrideInvalid() {\n if (shouldGenerateSchema) {\n outputResolver = generateSchema(CONTEXT_PATH, PATH, 1);\n String controlSchema = PATH + \"String_Node_Str\";\n compareSchemas(outputResolver.schemaFiles.get(EMPTY_NAMESPACE), new File(controlSchema));\n shouldGenerateSchema = false;\n }\n String src = PATH + \"String_Node_Str\";\n String result = validateAgainstSchema(src, EMPTY_NAMESPACE, outputResolver);\n assertTrue(\"String_Node_Str\", result != null);\n}\n"
"private long insertEnvironmentLocation(Uri uri, SQLiteDatabase db, ContentValues values) {\n long environmentId = Long.parseLong(uri.getPathSegments().get(1));\n String geofenceSelection = GeoFenceEntry.COLUMN_LOCATION_NAME + \"String_Node_Str\";\n String[] geofenceSelectionArgs = new String[] { values.getAsString(GeoFenceEntry.COLUMN_LOCATION_NAME) };\n Cursor geofenceCursor = db.query(GeoFenceEntry.TABLE_NAME, null, geofenceSelection, geofenceSelectionArgs, null, null, null);\n long geofenceId;\n if (!geofenceCursor.moveToFirst()) {\n String receivedValues = values.getAsString(GeoFenceEntry.COLUMN_COORD_LAT) + \"String_Node_Str\" + values.getAsString(GeoFenceEntry.COLUMN_COORD_LONG) + \"String_Node_Str\" + values.getAsString(GeoFenceEntry.COLUMN_RADIUS);\n Log.d(LOG_TAG, \"String_Node_Str\" + receivedValues);\n geofenceId = db.insert(GeoFenceEntry.TABLE_NAME, null, values);\n } else {\n boolean isLatEqual = isEqual(values.getAsDouble(GeoFenceEntry.COLUMN_COORD_LAT), geofenceCursor.getDouble(geofenceCursor.getColumnIndex(GeoFenceEntry.COLUMN_COORD_LAT))), isLongEqual = isEqual(values.getAsDouble(GeoFenceEntry.COLUMN_COORD_LONG), geofenceCursor.getDouble(geofenceCursor.getColumnIndex(GeoFenceEntry.COLUMN_COORD_LONG))), isRadiusEqual = values.getAsInteger(GeoFenceEntry.COLUMN_RADIUS) == geofenceCursor.getInt(geofenceCursor.getColumnIndex(GeoFenceEntry.COLUMN_RADIUS));\n if (isLatEqual && isLongEqual && isRadiusEqual) {\n geofenceId = geofenceCursor.getLong(geofenceCursor.getColumnIndex(GeoFenceEntry._ID));\n } else {\n Cursor environmentCursor = query(EnvironmentEntry.buildEnvironmentUriWithId(environmentId), null, null, null, null);\n if (!environmentCursor.moveToFirst()) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n String newLocationName = geofenceSelectionArgs[0] + \"String_Node_Str\" + environmentCursor.getString(environmentCursor.getColumnIndex(EnvironmentEntry.COLUMN_NAME));\n values.remove(GeoFenceEntry.COLUMN_LOCATION_NAME);\n values.put(GeoFenceEntry.COLUMN_LOCATION_NAME, newLocationName);\n geofenceId = db.insert(GeoFenceEntry.TABLE_NAME, null, values);\n environmentCursor.close();\n }\n }\n if (geofenceId == -1) {\n geofenceCursor.close();\n return -1;\n }\n ContentValues environmentContentValues = new ContentValues();\n environmentContentValues.put(EnvironmentEntry.COLUMN_IS_LOCATION_ENABLED, 1);\n environmentContentValues.put(EnvironmentEntry.COLUMN_GEOFENCE_ID, geofenceId);\n geofenceCursor.close();\n return db.update(EnvironmentEntry.TABLE_NAME, environmentContentValues, EnvironmentEntry._ID + \"String_Node_Str\", new String[] { String.valueOf(environmentId) });\n}\n"
"public List<DomainVO> searchForDomains(ListDomainsCmd cmd) throws PermissionDeniedException {\n Long domainId = cmd.getId();\n Account account = UserContext.current().getAccount();\n if (account != null) {\n if (domainId != null) {\n if (!_domainDao.isChildDomain(account.getDomainId(), domainId)) {\n throw new PermissionDeniedException(\"String_Node_Str\" + domainId + \"String_Node_Str\");\n }\n } else {\n domainId = account.getDomainId();\n }\n }\n Filter searchFilter = new Filter(DomainVO.class, \"String_Node_Str\", true, cmd.getStartIndex(), cmd.getPageSizeVal());\n String domainName = cmd.getDomainName();\n Integer level = cmd.getLevel();\n Object keyword = cmd.getKeyword();\n SearchBuilder<DomainVO> sb = _domainDao.createSearchBuilder();\n sb.and(\"String_Node_Str\", sb.entity().getName(), SearchCriteria.Op.LIKE);\n sb.and(\"String_Node_Str\", sb.entity().getLevel(), SearchCriteria.Op.EQ);\n sb.and(\"String_Node_Str\", sb.entity().getPath(), SearchCriteria.Op.LIKE);\n SearchCriteria<DomainVO> sc = sb.create();\n if (keyword != null) {\n SearchCriteria<DomainVO> ssc = _domainDao.createSearchCriteria();\n ssc.addOr(\"String_Node_Str\", SearchCriteria.Op.LIKE, \"String_Node_Str\" + keyword + \"String_Node_Str\");\n sc.addAnd(\"String_Node_Str\", SearchCriteria.Op.SC, ssc);\n }\n if (domainName != null) {\n sc.setParameters(\"String_Node_Str\", \"String_Node_Str\" + domainName + \"String_Node_Str\");\n }\n if (level != null) {\n sc.setParameters(\"String_Node_Str\", level);\n }\n if (domainId != null) {\n sc.setParameters(\"String_Node_Str\", domainId);\n }\n return _domainDao.search(sc, searchFilter);\n}\n"
"public static void main(String[] args) {\n ApproxSet set = new ApproxSet(10, 1024);\n for (int i = -5000; i < 5000; i++) {\n set.add(i);\n }\n int cnt = 0;\n for (int i = 5001; i < 105000; i++) {\n if (set.contains(i))\n cnt++;\n }\n System.out.println(\"String_Node_Str\" + cnt + \"String_Node_Str\" + (cnt / 100000.0));\n}\n"
"protected void setPreferences(String[] programIdParts, PrintStream printStream, Map<String, String> args) throws Exception {\n switch(type) {\n case INSTANCE:\n if (programIdParts.length != 0) {\n throw new CommandInputError(this);\n }\n client.setInstancePreferences(args);\n printSuccessMessage(printStream, type);\n break;\n case NAMESPACE:\n if (programIdParts.length != 0) {\n throw new CommandInputError(this);\n }\n client.setNamespacePreferences(cliConfig.getCurrentNamespace(), args);\n printSuccessMessage(printStream, type);\n break;\n case APP:\n if (programIdParts.length != 1) {\n throw new CommandInputError(this);\n }\n client.setApplicationPreferences(Id.Application.from(cliConfig.getCurrentNamespace(), programIdParts[0]), args);\n printSuccessMessage(printStream, type);\n break;\n case FLOW:\n if (programIdParts.length != 2) {\n throw new CommandInputError(this);\n }\n client.setProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(), programIdParts[0]), type.getPluralName(), programIdParts[1], args);\n printSuccessMessage(printStream, type);\n break;\n case PROCEDURE:\n if (programIdParts.length != 2) {\n throw new CommandInputError(this);\n }\n client.setProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(), programIdParts[0]), type.getPluralName(), programIdParts[1], args);\n printSuccessMessage(printStream, type);\n break;\n case MAPREDUCE:\n if (programIdParts.length != 2) {\n throw new CommandInputError(this);\n }\n client.setProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(), programIdParts[0]), type.getPluralName(), programIdParts[1], args);\n printSuccessMessage(printStream, type);\n break;\n case WORKFLOW:\n if (programIdParts.length != 2) {\n throw new CommandInputError(this);\n }\n client.setProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(), programIdParts[0]), type.getPluralName(), programIdParts[1], args);\n printSuccessMessage(printStream, type);\n break;\n case SERVICE:\n if (programIdParts.length != 2) {\n throw new CommandInputError(this);\n }\n client.setProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(), programIdParts[0]), type.getPluralName(), programIdParts[1], args);\n printSuccessMessage(printStream, type);\n break;\n case SPARK:\n if (programIdParts.length != 2) {\n throw new CommandInputError(this);\n }\n client.setProgramPreferences(Id.Application.from(cliConfig.getCurrentNamespace(), programIdParts[0]), type.getPluralName(), programIdParts[1], args);\n printSuccessMessage(printStream, type);\n break;\n default:\n throw new IllegalArgumentException(\"String_Node_Str\" + type.getPrettyName());\n }\n}\n"
"public IRoomInfo[] getChatRoomsInfo() {\n ID[] chatRooms = getChatRooms();\n if (chatRooms == null)\n return null;\n IRoomInfo[] res = new IRoomInfo[chatRooms.length];\n for (int i = 0; i < chatRooms.length; i++) {\n IRoomInfo infoResult = getChatRoomInfo(chatRooms[i]);\n if (infoResult != null) {\n res[count++] = infoResult;\n }\n }\n return res;\n}\n"
"public void createSchema() {\n if (mongoClientDB == null)\n throw new IllegalStateException(\"String_Node_Str\");\n if (schemaExists()) {\n return;\n }\n mongoClientColl = mongoClientDB.createCollection(mapping.getCollectionName(), new BasicDBObject());\n mongoClientColl.setDBEncoderFactory(GoraDBEncoder.FACTORY);\n LOG.info(\"String_Node_Str\", new Object[] { mapping.getCollectionName(), mongoClientDB.getMongo() });\n}\n"
"public E take(final long waitMillis) {\n try {\n lock.lockInterruptibly();\n E elem = take();\n if (elem == null) {\n empty.signalAll();\n if (waitMillis < 0)\n added.await();\n else\n added.await(waitMillis, TimeUnit.MILLISECONDS);\n elem = take();\n }\n return elem;\n } catch (final InterruptedException e) {\n if (LOG.isTraceEnabled())\n LOG.trace(e.getMessage(), e);\n } finally {\n if (lock.isHeldByCurrentThread())\n lock.unlock();\n }\n return null;\n}\n"
"protected RawPacket createRawPacket(DatagramPacket datagramPacket) {\n if (pkt == null) {\n pkt = new RawPacket(datagramPacket.getData(), datagramPacket.getOffset(), datagramPacket.getLength());\n } else {\n pkt.setBuffer(datagramPacket.getData());\n pkt.setLength(datagramPacket.getLength());\n pkt.setOffset(datagramPacket.getOffset());\n }\n pkt.setBuffer(datagramPacket.getData());\n pkt.setLength(datagramPacket.getLength());\n pkt.setOffset(datagramPacket.getOffset());\n return pkt;\n}\n"
"public void handleEvent(Event event) {\n IAxisSet axisSet = chart.getAxisSet();\n if (axisSet != null) {\n IAxis xAxis = axisSet.getXAxis(0);\n if (xAxis != null) {\n String[] series = xAxis.getCategorySeries();\n ISeries[] data = chart.getSeriesSet().getSeries();\n if (data != null && data.length > 0 && series != null) {\n int x = (int) Math.round(xAxis.getDataCoordinate(event.x));\n if (x >= 0 && x < series.length) {\n chart.getPlotArea().setToolTipText(\"String_Node_Str\" + series[x] + \"String_Node_Str\" + data[0].getYSeries()[x] + \"String_Node_Str\");\n return;\n }\n }\n }\n }\n chart.getPlotArea().setToolTipText(null);\n}\n"
"private void createDefaultMotionObjects() {\n if (getExperimenalMarkerGeometryJson() == null) {\n experimenalMarkerGeometryJson = new JSONObject();\n UUID uuidForMarkerGeometry = UUID.randomUUID();\n getExperimenalMarkerGeometryJson().put(\"String_Node_Str\", uuidForMarkerGeometry.toString());\n getExperimenalMarkerGeometryJson().put(\"String_Node_Str\", \"String_Node_Str\");\n getExperimenalMarkerGeometryJson().put(\"String_Node_Str\", 15);\n getExperimenalMarkerGeometryJson().put(\"String_Node_Str\", \"String_Node_Str\");\n JSONArray json_geometries = (JSONArray) modelVisJson.get(\"String_Node_Str\");\n json_geometries.add(getExperimenalMarkerGeometryJson());\n experimenalMarkerMaterialJson = new JSONObject();\n UUID uuidForMarkerMaterial = UUID.randomUUID();\n getExperimenalMarkerMaterialJson().put(\"String_Node_Str\", uuidForMarkerMaterial.toString());\n String colorString = JSONUtilities.mapColorToRGBA(getDefaultExperimentalMarkerColor());\n getExperimenalMarkerMaterialJson().put(\"String_Node_Str\", \"String_Node_Str\");\n getExperimenalMarkerMaterialJson().put(\"String_Node_Str\", 30);\n getExperimenalMarkerMaterialJson().put(\"String_Node_Str\", true);\n getExperimenalMarkerMaterialJson().put(\"String_Node_Str\", JSONUtilities.mapColorToRGBA(new Vec3(0., 0., 0.)));\n getExperimenalMarkerMaterialJson().put(\"String_Node_Str\", JSONUtilities.mapColorToRGBA(new Vec3(0., 0., 0.)));\n getExperimenalMarkerMaterialJson().put(\"String_Node_Str\", 2);\n getExperimenalMarkerMaterialJson().put(\"String_Node_Str\", false);\n getExperimenalMarkerMaterialJson().put(\"String_Node_Str\", colorString);\n JSONArray json_materials = (JSONArray) modelVisJson.get(\"String_Node_Str\");\n json_materials.add(getExperimenalMarkerMaterialJson());\n }\n}\n"
"public void savePreferences(ChartPreferences preferences, OutputStream os) throws IOException {\n ResourceSet rsChart = new ResourceSetImpl();\n rsChart.getResourceFactoryRegistry().getExtensionToFactoryMap().put(\"String_Node_Str\", new ModelResourceFactoryImpl());\n Resource rChart = rsChart.createResource(URI.createFileURI(\"String_Node_Str\"));\n rChart.getContents().add(preferences);\n Map<String, Object> options = new HashMap<String, Object>();\n options.put(XMLResource.OPTION_ENCODING, \"String_Node_Str\");\n rChart.save(os, options);\n}\n"
"public boolean cleanupAccount(AccountVO account, long callerUserId, Account caller) throws ConcurrentOperationException, ResourceUnavailableException {\n long accountId = account.getId();\n boolean accountCleanupNeeded = false;\n try {\n List<InstanceGroupVO> groups = _vmGroupDao.listByAccountId(accountId);\n for (InstanceGroupVO group : groups) {\n if (!_vmMgr.deleteVmGroup(group.getId())) {\n s_logger.error(\"String_Node_Str\" + group.getId());\n accountCleanupNeeded = true;\n }\n }\n boolean success = _snapMgr.deleteSnapshotDirsForAccount(accountId);\n if (success) {\n s_logger.debug(\"String_Node_Str\" + accountId + \"String_Node_Str\");\n }\n List<VMTemplateVO> userTemplates = _templateDao.listByAccountId(accountId);\n boolean allTemplatesDeleted = true;\n for (VMTemplateVO template : userTemplates) {\n try {\n allTemplatesDeleted = _tmpltMgr.delete(callerUserId, template.getId(), null);\n } catch (Exception e) {\n s_logger.warn(\"String_Node_Str\" + template.getName() + \"String_Node_Str\", e);\n allTemplatesDeleted = false;\n }\n }\n if (!allTemplatesDeleted) {\n s_logger.warn(\"String_Node_Str\" + accountId);\n accountCleanupNeeded = true;\n }\n List<UserVmVO> vms = _userVmDao.listByAccountId(accountId);\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + accountId + \"String_Node_Str\" + vms.size());\n }\n for (UserVmVO vm : vms) {\n if (!_vmMgr.expunge(vm, callerUserId, caller)) {\n s_logger.error(\"String_Node_Str\" + vm.getId());\n accountCleanupNeeded = true;\n }\n UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_VM_DESTROY, vm.getAccountId(), vm.getDataCenterId(), vm.getId(), vm.getName(), vm.getServiceOfferingId(), vm.getTemplateId(), vm.getHypervisorType().toString());\n _usageEventDao.persist(usageEvent);\n }\n List<VolumeVO> volumes = _volumeDao.findDetachedByAccount(accountId);\n for (VolumeVO volume : volumes) {\n if (!volume.getState().equals(Volume.State.Destroy)) {\n try {\n _storageMgr.destroyVolume(volume);\n if (volume.getPoolId() != null) {\n UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_VOLUME_DELETE, volume.getAccountId(), volume.getDataCenterId(), volume.getId(), volume.getName());\n _usageEventDao.persist(usageEvent);\n }\n } catch (ConcurrentOperationException ex) {\n s_logger.warn(\"String_Node_Str\" + accountId + \"String_Node_Str\", ex);\n accountCleanupNeeded = true;\n }\n }\n }\n List<RemoteAccessVpnVO> remoteAccessVpns = _remoteAccessVpnDao.findByAccount(accountId);\n List<VpnUserVO> vpnUsers = _vpnUser.listByAccount(accountId);\n for (VpnUserVO vpnUser : vpnUsers) {\n _remoteAccessVpnMgr.removeVpnUser(accountId, vpnUser.getUsername());\n }\n for (RemoteAccessVpnVO vpn : remoteAccessVpns) {\n _remoteAccessVpnMgr.destroyRemoteAccessVpn(vpn.getServerAddressId());\n }\n int numRemoved = _securityGroupDao.removeByAccountId(accountId);\n s_logger.info(\"String_Node_Str\" + numRemoved + \"String_Node_Str\" + accountId);\n boolean networksDeleted = true;\n s_logger.debug(\"String_Node_Str\" + account.getId());\n List<NetworkVO> networks = _networkDao.listByOwner(accountId);\n if (networks != null) {\n for (NetworkVO network : networks) {\n ReservationContext context = new ReservationContextImpl(null, null, getActiveUser(callerUserId), account);\n if (!_networkMgr.deleteNetworkInternal(network.getId(), context)) {\n s_logger.warn(\"String_Node_Str\" + network + \"String_Node_Str\" + accountId + \"String_Node_Str\");\n accountCleanupNeeded = true;\n networksDeleted = false;\n } else {\n s_logger.debug(\"String_Node_Str\" + network.getId() + \"String_Node_Str\" + accountId + \"String_Node_Str\");\n }\n }\n }\n if (networksDeleted) {\n if (!_configMgr.deleteAccountSpecificVirtualRanges(accountId)) {\n accountCleanupNeeded = true;\n } else {\n s_logger.debug(\"String_Node_Str\" + \"String_Node_Str\" + accountId + \"String_Node_Str\");\n }\n }\n return true;\n } finally {\n s_logger.info(\"String_Node_Str\" + account.getId() + (accountCleanupNeeded ? \"String_Node_Str\" : \"String_Node_Str\"));\n if (accountCleanupNeeded) {\n _accountDao.markForCleanup(accountId);\n }\n }\n}\n"
"public void testStandardGPSNode() {\n GpsNode gpsNode1 = new GpsNode(NodeChannel.GPS, \"String_Node_Str\");\n String input = \"String_Node_Str\";\n byte[] bytes = Charset.forName(\"String_Node_Str\").encode(input).array();\n gpsNode1.peel(bytes, 0, bytes.length);\n try {\n Thread.sleep(3000);\n if (messageList.size() != 1) {\n fail(\"String_Node_Str\");\n }\n Thread.sleep(3000);\n while (!messageList.isEmpty()) {\n GpsMeasurement m = messageList.take();\n assertEquals(m.getLatitude(), 48.1173, 0.0);\n assertEquals(m.getLongitude(), 11.51667, 0.0001);\n assertEquals(m.getNorth(), true);\n assertEquals(m.getWest(), false);\n }\n } catch (Exception e) {\n }\n}\n"
"public boolean clearApplicationUserData(final String packageName, final IPackageDataObserver observer, int userId) {\n enforceNotIsolatedCaller(\"String_Node_Str\");\n int uid = Binder.getCallingUid();\n int pid = Binder.getCallingPid();\n userId = handleIncomingUser(pid, uid, userId, false, ALLOW_FULL_ONLY, \"String_Node_Str\", null);\n long callingId = Binder.clearCallingIdentity();\n try {\n IPackageManager pm = AppGlobals.getPackageManager();\n int pkgUid = -1;\n synchronized (this) {\n try {\n pkgUid = pm.getPackageUid(packageName, userId);\n } catch (RemoteException e) {\n }\n if (pkgUid == -1) {\n Slog.w(TAG, \"String_Node_Str\" + packageName);\n if (observer != null) {\n try {\n observer.onRemoveCompleted(packageName, false);\n } catch (RemoteException e) {\n Slog.i(TAG, \"String_Node_Str\");\n }\n }\n return false;\n }\n if (uid == pkgUid || checkComponentPermission(android.Manifest.permission.CLEAR_APP_USER_DATA, pid, uid, -1, true) == PackageManager.PERMISSION_GRANTED) {\n forceStopPackageLocked(packageName, pkgUid, \"String_Node_Str\");\n } else {\n throw new SecurityException(\"String_Node_Str\" + pid + \"String_Node_Str\" + android.Manifest.permission.CLEAR_APP_USER_DATA + \"String_Node_Str\" + \"String_Node_Str\" + packageName);\n }\n for (int i = mRecentTasks.size() - 1; i >= 0; i--) {\n final TaskRecord tr = mRecentTasks.get(i);\n final String taskPackageName = tr.getBaseIntent().getComponent().getPackageName();\n if (tr.userId != userId)\n continue;\n if (!taskPackageName.equals(packageName))\n continue;\n removeTaskByIdLocked(tr.taskId, false);\n }\n }\n try {\n pm.clearApplicationUserData(packageName, observer, userId);\n synchronized (this) {\n removeUriPermissionsForPackageLocked(packageName, userId, true);\n }\n Intent intent = new Intent(Intent.ACTION_PACKAGE_DATA_CLEARED, Uri.fromParts(\"String_Node_Str\", packageName, null));\n intent.putExtra(Intent.EXTRA_UID, pkgUid);\n broadcastIntentInPackage(\"String_Node_Str\", Process.SYSTEM_UID, intent, null, null, 0, null, null, null, false, false, userId);\n } catch (RemoteException e) {\n }\n } finally {\n Binder.restoreCallingIdentity(callingId);\n }\n return true;\n}\n"
"public void afterTransactionBegin(final Transaction tx) {\n try {\n LOG.debug(String.format(\"String_Node_Str\", Threads.currentStackFrame().getMethodName(), this.operations = 0, tx.toString()));\n } catch (Exception ex) {\n LOG.error(ex, ex);\n }\n super.afterTransactionBegin(tx);\n}\n"
"private void placeComponents() {\n if (cmpHeaders == null) {\n GridLayout glTable = new GridLayout();\n glTable.numColumns = 1;\n glTable.marginWidth = 1;\n glTable.marginHeight = 1;\n glTable.horizontalSpacing = 0;\n glTable.verticalSpacing = 0;\n setLayout(glTable);\n cmpHeaders = new Composite(this, SWT.NONE);\n GridData gdCmpHeaders = new GridData(GridData.FILL_HORIZONTAL);\n cmpHeaders.setLayoutData(gdCmpHeaders);\n FormLayout glHeaders = new FormLayout();\n glHeaders.marginHeight = 0;\n glHeaders.marginWidth = 0;\n cmpHeaders.setLayout(glHeaders);\n cmpHeaders.addMouseListener(this);\n } else {\n Control[] buttons = cmpHeaders.getChildren();\n for (int i = 0; i < buttons.length; i++) {\n buttons[i].dispose();\n }\n }\n btnHeaders.clear();\n if (isDummy) {\n for (int i = 0; i < columnWidths.size(); i++) {\n addHeaderButton(iHeaderAlignment, \"String_Node_Str\", columnWidths.get(i));\n }\n } else {\n for (int i = 0; i < fHeadings.size(); i++) {\n addHeaderButton(iHeaderAlignment, fHeadings.elementAt(i), columnWidths.get(i), i);\n }\n }\n cmpHeaders.layout();\n if (cnvCells != null && !cnvCells.isDisposed()) {\n cnvCells.dispose();\n }\n cnvCells = new TableCanvas(this, SWT.NONE, fHeadings.size(), new Color[] {}, this);\n cnvCells.setLayoutData(new GridData(GridData.FILL_BOTH));\n cnvCells.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_BACKGROUND));\n cnvCells.addMouseMoveListener(this);\n getShell().addControlListener(this);\n addDisposeListener(this);\n}\n"
"public String getValue(R object) {\n ProxyImpl proxyImpl = (ProxyImpl) object;\n return renderer.render(proxyImpl.<T>get(property, clazz));\n}\n"
"public Scanner scan(byte[] startRow, byte[] stopRow, FuzzyRowFilter filter, byte[][] columns, Transaction tx) throws IOException {\n DBIterator iterator = getDB().iterator();\n try {\n if (startRow != null) {\n iterator.seek(createStartKey(startRow));\n } else {\n iterator.seekToFirst();\n }\n } catch (RuntimeException e) {\n try {\n iterator.close();\n } catch (IOException ioe) {\n LOG.warn(\"String_Node_Str\", ioe);\n }\n throw e;\n }\n byte[] endKey = stopRow == null ? null : createEndKey(stopRow);\n return new LevelDBScanner(iterator, endKey, filter, columns, tx);\n}\n"
"private int[] createSparseOffsets(int offset, int[] toremove) {\n int underlyingRank = (int) sparseOffsets.length();\n int[] newOffsets = new int[rank()];\n List<Integer> shapeList = Ints.asList(shape());\n int penultimate = rank() - 1;\n for (int i = 0; i < penultimate; i++) {\n int prod = ArrayUtil.prod(shapeList.subList(i + 1, rank()));\n newOffsets[i] = offset / prod;\n offset = offset - newOffsets[i] * prod;\n }\n newOffsets[rank() - 1] = offset % underlyingShape.getInt(rank() - 1);\n int[] finalOffsets = new int[underlyingRank];\n int dimNotFixed = 0;\n for (int dim = 0; dim < underlyingRank; dim++) {\n if (fixed.getInt(dim) == 1) {\n finalOffsets[dim] = sparseOffsets.getInt(dim);\n } else {\n finalOffsets[dim] = newOffsets[dimNotFixed] + sparseOffsets.getInt(dim);\n dimNotFixed++;\n }\n }\n return finalOffsets;\n}\n"
"public void setupJSRSubroutineMap(Address frameAddress, int mapid, WordArray registerLocations, VM_CompiledMethod compiledMethod) {\n int j = extraUnusualMap.getReferenceMapIndex();\n int k = extraUnusualMap.getNonReferenceMapIndex();\n int l = extraUnusualMap.getReturnAddressMapIndex();\n for (int i = 0; i < bytesPerMap; i++) {\n unusualReferenceMaps[j + i] = 0;\n unusualReferenceMaps[k + i] = 0;\n unusualReferenceMaps[l + i] = 0;\n }\n if (VM.TraceStkMaps) {\n VM.sysWriteln(\"String_Node_Str\", mapid, \"String_Node_Str\", -mapid);\n VM.sysWriteln(\"String_Node_Str\", referenceMaps[(-mapid) * bytesPerMap]);\n VM.sysWriteln(\"String_Node_Str\", referenceMaps[(-mapid) * bytesPerMap] & JSR_INDEX_MASK);\n }\n int unusualMapid = (referenceMaps[(-mapid) * bytesPerMap] & JSR_INDEX_MASK);\n if (unusualMapid == JSR_INDEX_MASK) {\n unusualMapid = findUnusualMap(-mapid);\n }\n VM_QuickUnusualMaps unusualMap = unusualMaps[unusualMapid];\n unusualMapcopy(unusualMap);\n int jsrAddressLocation = unusualMap.getReturnAddressLocation();\n Address jsrAddressAddress = null;\n if (VM_QuickCompiler.isRegister(jsrAddressLocation))\n jsrAddressAddress = registerLocations.get(VM_QuickCompiler.locationToRegister(jsrAddressLocation)).toAddress();\n else\n jsrAddressAddress = frameAddress.plus(VM_QuickCompiler.locationToOffset(jsrAddressLocation));\n Address callerAddress = jsrAddressAddress.loadAddress();\n Offset machineCodeOffset = compiledMethod.getInstructionOffset(callerAddress);\n if (VM.TraceStkMaps) {\n VM.sysWriteln(\"String_Node_Str\", mapid);\n VM.sysWriteln(\"String_Node_Str\", jsrAddressLocation);\n VM.sysWriteln(\"String_Node_Str\", callerAddress);\n VM.sysWriteln(\"String_Node_Str\", machineCodeOffset);\n if (machineCodeOffset.sLT(Offset.zero()))\n VM.sysWriteln(\"String_Node_Str\");\n }\n int jsrMapid = locateGCPoint(machineCodeOffset, compiledMethod.getMethod());\n if (VM.TraceStkMaps) {\n VM.sysWriteln(\"String_Node_Str\", jsrMapid);\n }\n while (jsrMapid < 0) {\n jsrMapid = -jsrMapid;\n if (VM.TraceStkMaps) {\n VM.sysWriteln(\"String_Node_Str\", jsrMapid, \"String_Node_Str\", referenceMaps[jsrMapid]);\n }\n int unusualMapIndex = JSR_INDEX_MASK & referenceMaps[jsrMapid * bytesPerMap];\n if (unusualMapIndex == JSR_INDEX_MASK) {\n unusualMapIndex = findUnusualMap(jsrMapid);\n }\n extraUnusualMap = combineDeltaMaps(unusualMapIndex);\n VM_QuickUnusualMaps thisMap = unusualMaps[unusualMapIndex];\n int thisJsrAddressLocation = thisMap.getReturnAddressLocation();\n Address thisJsrAddressAddress = null;\n if (VM_QuickCompiler.isRegister(thisJsrAddressLocation))\n thisJsrAddressAddress = registerLocations.get(VM_QuickCompiler.locationToRegister(thisJsrAddressLocation)).toAddress();\n else\n thisJsrAddressAddress = frameAddress.add(VM_QuickCompiler.locationToOffset(thisJsrAddressLocation));\n Address nextCallerAddress = thisJsrAddressAddress.loadAddress();\n Offset nextMachineCodeOffset = compiledMethod.getInstructionOffset(nextCallerAddress);\n jsrMapid = locateGCPoint(nextMachineCodeOffset, compiledMethod.getMethod());\n if (VM.TraceStkMaps) {\n VM.sysWriteln(\"String_Node_Str\");\n extraUnusualMap.showInfo();\n VM.sysWriteln();\n VM.sysWriteln(\"String_Node_Str\");\n thisMap.showInfo();\n VM.sysWriteln();\n VM.sysWriteln(\"String_Node_Str\");\n VM.sysWriteln(\"String_Node_Str\", thisJsrAddressLocation);\n VM.sysWriteln(\"String_Node_Str\", nextCallerAddress);\n VM.sysWriteln(\"String_Node_Str\", nextMachineCodeOffset);\n }\n }\n finalMergeMaps((jsrMapid * bytesPerMap), extraUnusualMap);\n if (VM.TraceStkMaps) {\n VM.sysWriteln(\"String_Node_Str\");\n extraUnusualMap.showInfo();\n VM.sysWriteln();\n VM.sysWriteln(\"String_Node_Str\", mergedReferenceMap);\n VM.sysWrite(\"String_Node_Str\");\n showAnUnusualMap(mergedReferenceMap);\n VM.sysWriteln(unusualReferenceMaps[mergedReferenceMap]);\n VM.sysWriteln(\"String_Node_Str\", mergedReturnAddressMap);\n VM.sysWriteln(\"String_Node_Str\", unusualReferenceMaps[mergedReturnAddressMap]);\n showInfo();\n showUnusualMapInfo();\n }\n}\n"
"public void buildContent() {\n tiles.getChildren().clear();\n itemSupply.get().sorted(byNC(textConverter::toS)).forEach(item -> {\n Node cell = cellFactory.apply(item);\n cell.setOnMouseClicked(e -> {\n if (e.getButton() == PRIMARY) {\n onSelect.accept(item);\n e.consume();\n }\n });\n tiles.getChildren().add(cell);\n });\n int s = getCells().size();\n Anim.par(getCells(), (i, n) -> seq(new Anim(n::setOpacity).dur(i * (750 / s)).intpl(0), new Anim(n::setOpacity).dur(500).intpl(x -> sqrt(x)))).play();\n}\n"
"private List<Command> createRefreshingPropertiesCommand(RepositoryNode selectedNode, Node node) {\n List<Command> list = new ArrayList<Command>();\n if (selectedNode.getObject().getProperty().getItem() instanceof ConnectionItem) {\n String propertyId = selectedNode.getObject().getProperty().getId();\n ConnectionItem originalConnectionItem = (ConnectionItem) selectedNode.getObject().getProperty().getItem();\n ConnectionItem connectionItem = originalConnectionItem;\n Connection originalConnection = connectionItem.getConnection();\n Connection connection = connectionItem.getConnection();\n if (node.getComponent().getName().contains(\"String_Node_Str\")) {\n if (selectedNode.getObject().getProperty().getItem() instanceof DatabaseConnectionItem) {\n final DatabaseConnection databaseConnection = (DatabaseConnection) connection;\n CDCConnection cdcConn = databaseConnection.getCdcConns();\n if (cdcConn != null) {\n EList cdcTypes = cdcConn.getCdcTypes();\n if (cdcTypes != null && !cdcTypes.isEmpty()) {\n CDCType cdcType = (CDCType) cdcTypes.get(0);\n propertyId = cdcType.getLinkDB();\n try {\n IRepositoryViewObject object = ProxyRepositoryFactory.getInstance().getLastVersion(propertyId);\n if (object != null) {\n if (object.getProperty().getItem() instanceof DatabaseConnectionItem) {\n DatabaseConnectionItem dbConnItem = (DatabaseConnectionItem) object.getProperty().getItem();\n connectionItem = dbConnItem;\n connection = dbConnItem.getConnection();\n }\n }\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n }\n IElementParameter logModeParam = node.getElementParameter(EParameterName.CDC_TYPE_MODE.getName());\n if (logModeParam != null) {\n String cdcTypeMode = ((DatabaseConnection) originalConnection).getCdcTypeMode();\n Command logModeCmd = new PropertyChangeCommand(node, EParameterName.CDC_TYPE_MODE.getName(), CDCTypeMode.LOG_MODE.getName().equals(cdcTypeMode));\n list.add(logModeCmd);\n }\n final String name = \"String_Node_Str\";\n IElementParameter libParam = node.getElementParameter(name);\n if (libParam != null) {\n Object propValue;\n if (connection.isContextMode() && ContextParameterUtils.isContainContextParam(databaseConnection.getSID())) {\n propValue = databaseConnection.getSID();\n } else {\n propValue = TalendTextUtils.addQuotes(databaseConnection.getSID());\n }\n Command libSettingCmd = new PropertyChangeCommand(node, name, propValue);\n list.add(libSettingCmd);\n }\n }\n }\n }\n }\n if (selectedNode.getObjectType() == ERepositoryObjectType.METADATA_SAP_FUNCTION && PluginChecker.isSAPWizardPluginLoaded()) {\n SAPFunctionUnit functionUnit = (SAPFunctionUnit) ((SAPFunctionRepositoryObject) selectedNode.getObject()).getAbstractMetadataObject();\n for (MetadataTable table : functionUnit.getTables()) {\n Command sapCmd = new RepositoryChangeMetadataForSAPCommand(node, ISAPConstant.TABLE_SCHEMAS, table.getLabel(), ConvertionHelper.convert(table), functionUnit);\n list.add(sapCmd);\n }\n }\n if ((connectionItem instanceof EbcdicConnectionItem) && PluginChecker.isEBCDICPluginLoaded()) {\n IRepositoryViewObject object = selectedNode.getObject();\n if (selectedNode.getObjectType() == ERepositoryObjectType.METADATA_FILE_EBCDIC) {\n for (MetadataTable table : ConnectionHelper.getTables(originalConnection)) {\n Command ebcdicCmd = new RepositoryChangeMetadataForEBCDICCommand(node, IEbcdicConstant.TABLE_SCHEMAS, table.getLabel(), ConvertionHelper.convert(table));\n list.add(ebcdicCmd);\n }\n }\n if (selectedNode.getProperties(EProperties.CONTENT_TYPE) == ERepositoryObjectType.METADATA_CON_TABLE) {\n MetadataTable table = null;\n if (object instanceof MetadataTableRepositoryObject) {\n table = ((MetadataTableRepositoryObject) object).getTable();\n }\n Command ebcdicCmd = new RepositoryChangeMetadataForEBCDICCommand(node, IEbcdicConstant.TABLE_SCHEMAS, table.getLabel(), ConvertionHelper.convert(table));\n list.add(ebcdicCmd);\n }\n }\n if ((selectedNode.getObjectType() == ERepositoryObjectType.METADATA_FILE_HL7 && PluginChecker.isHL7PluginLoaded()) || (selectedNode.getParent() != null && selectedNode.getParent().getObjectType() == ERepositoryObjectType.METADATA_FILE_HL7 && PluginChecker.isHL7PluginLoaded())) {\n if (originalConnection instanceof HL7ConnectionImpl) {\n if (((HL7ConnectionImpl) originalConnection).getRoot() != null) {\n List<Map<String, String>> mapList = new ArrayList<Map<String, String>>();\n for (Object obj : ((HL7ConnectionImpl) originalConnection).getRoot()) {\n if (obj instanceof HL7FileNode) {\n Map<String, String> newMap = new HashMap<String, String>();\n newMap.put(IHL7Constant.ATTRIBUTE, ((HL7FileNode) obj).getAttribute());\n newMap.put(IHL7Constant.PATH, ((HL7FileNode) obj).getFilePath());\n newMap.put(IHL7Constant.COLUMN, ((HL7FileNode) obj).getRelatedColumn());\n newMap.put(IHL7Constant.ORDER, String.valueOf(((HL7FileNode) obj).getOrder()));\n newMap.put(IHL7Constant.VALUE, ((HL7FileNode) obj).getDefaultValue());\n newMap.put(IHL7Constant.REPEATABLE, String.valueOf(((HL7FileNode) obj).isRepeatable()));\n mapList.add(newMap);\n }\n }\n IExternalNode externalNode = ExternalUtilities.getExternalNodeReadyToOpen(node);\n if (externalNode != null && externalNode.getElementParameter(\"String_Node_Str\") != null) {\n externalNode.getElementParameter(\"String_Node_Str\").setValue(mapList);\n }\n String fileName = ((HL7ConnectionImpl) originalConnection).getOutputFilePath();\n if (externalNode != null && externalNode.getElementParameter(\"String_Node_Str\") != null && fileName != null) {\n externalNode.getElementParameter(\"String_Node_Str\").setValue(TalendTextUtils.addQuotes(fileName));\n }\n }\n }\n if (selectedNode.getObjectType() == ERepositoryObjectType.METADATA_FILE_HL7 && PluginChecker.isHL7PluginLoaded()) {\n for (MetadataTable table : ConnectionHelper.getTables(originalConnection)) {\n Command hl7Cmd = new RepositoryChangeMetadataForHL7Command(node, IHL7Constant.TABLE_SCHEMAS, table.getLabel(), ConvertionHelper.convert(table));\n list.add(hl7Cmd);\n }\n }\n }\n if ((selectedNode.getObjectType() == ERepositoryObjectType.METADATA_FILE_BRMS && PluginChecker.isBRMSPluginLoaded()) || (selectedNode.getParent() != null && selectedNode.getParent().getObjectType() == ERepositoryObjectType.METADATA_FILE_BRMS && PluginChecker.isBRMSPluginLoaded())) {\n if (originalConnection instanceof BRMSConnectionImpl) {\n if (((BRMSConnectionImpl) originalConnection).getRoot() != null) {\n List<Map<String, String>> rootList = new ArrayList<Map<String, String>>();\n List<Map<String, String>> loopList = new ArrayList<Map<String, String>>();\n List<Map<String, String>> groupList = new ArrayList<Map<String, String>>();\n for (Object obj : ((BRMSConnectionImpl) originalConnection).getRoot()) {\n if (obj instanceof XMLFileNode) {\n Map<String, String> rootMap = new HashMap<String, String>();\n rootMap.put(\"String_Node_Str\", ((XMLFileNode) obj).getAttribute());\n rootMap.put(\"String_Node_Str\", ((XMLFileNode) obj).getXMLPath());\n rootMap.put(\"String_Node_Str\", ((XMLFileNode) obj).getRelatedColumn());\n rootMap.put(\"String_Node_Str\", String.valueOf(((XMLFileNode) obj).getOrder()));\n rootMap.put(\"String_Node_Str\", ((XMLFileNode) obj).getDefaultValue());\n rootList.add(rootMap);\n }\n }\n for (Object obj : ((BRMSConnectionImpl) originalConnection).getLoop()) {\n if (obj instanceof XMLFileNode) {\n Map<String, String> loopMap = new HashMap<String, String>();\n loopMap.put(\"String_Node_Str\", ((XMLFileNode) obj).getAttribute());\n loopMap.put(\"String_Node_Str\", ((XMLFileNode) obj).getXMLPath());\n loopMap.put(\"String_Node_Str\", ((XMLFileNode) obj).getRelatedColumn());\n loopMap.put(\"String_Node_Str\", String.valueOf(((XMLFileNode) obj).getOrder()));\n loopMap.put(\"String_Node_Str\", ((XMLFileNode) obj).getDefaultValue());\n loopList.add(loopMap);\n }\n }\n for (Object obj : ((BRMSConnectionImpl) originalConnection).getGroup()) {\n if (obj instanceof XMLFileNode) {\n Map<String, String> groupMap = new HashMap<String, String>();\n groupMap.put(\"String_Node_Str\", ((XMLFileNode) obj).getAttribute());\n groupMap.put(\"String_Node_Str\", ((XMLFileNode) obj).getXMLPath());\n groupMap.put(\"String_Node_Str\", ((XMLFileNode) obj).getRelatedColumn());\n groupMap.put(\"String_Node_Str\", String.valueOf(((XMLFileNode) obj).getOrder()));\n groupMap.put(\"String_Node_Str\", ((XMLFileNode) obj).getDefaultValue());\n groupList.add(groupMap);\n }\n }\n IExternalNode externalNode = ExternalUtilities.getExternalNodeReadyToOpen(node);\n if (externalNode != null && externalNode.getElementParameter(\"String_Node_Str\") != null) {\n externalNode.getElementParameter(\"String_Node_Str\").setValue(rootList);\n }\n if (externalNode != null && externalNode.getElementParameter(\"String_Node_Str\") != null) {\n externalNode.getElementParameter(\"String_Node_Str\").setValue(loopList);\n }\n if (externalNode != null && externalNode.getElementParameter(\"String_Node_Str\") != null) {\n externalNode.getElementParameter(\"String_Node_Str\").setValue(groupList);\n }\n }\n }\n }\n IElementParameter propertyParam = node.getElementParameterFromField(EParameterFieldType.PROPERTY_TYPE);\n if (propertyParam != null) {\n propertyParam.getChildParameters().get(EParameterName.PROPERTY_TYPE.getName()).setValue(EmfComponent.REPOSITORY);\n propertyParam.getChildParameters().get(EParameterName.REPOSITORY_PROPERTY_TYPE.getName()).setValue(propertyId);\n }\n IProxyRepositoryFactory factory = DesignerPlugin.getDefault().getProxyRepositoryFactory();\n Map<String, IMetadataTable> repositoryTableMap = new HashMap<String, IMetadataTable>();\n if (!originalConnection.isReadOnly()) {\n for (Object tableObj : ConnectionHelper.getTables(originalConnection)) {\n org.talend.core.model.metadata.builder.connection.MetadataTable table;\n table = (org.talend.core.model.metadata.builder.connection.MetadataTable) tableObj;\n if (factory.getStatus(originalConnectionItem) != ERepositoryStatus.DELETED) {\n if (!factory.isDeleted(table)) {\n String value = table.getId();\n IMetadataTable newTable = ConvertionHelper.convert(table);\n repositoryTableMap.put(value, newTable);\n }\n }\n }\n }\n if (propertyParam != null) {\n IMetadataTable metadataTable = null;\n if (selectedNode.getObject() instanceof IMetadataTable) {\n metadataTable = (IMetadataTable) selectedNode.getObject();\n if (metadataTable != null && repositoryTableMap.get(metadataTable.getId()) != null) {\n metadataTable = repositoryTableMap.get(metadataTable.getId());\n }\n }\n ChangeValuesFromRepository command1 = new ChangeValuesFromRepository(node, connection, metadataTable, propertyParam.getName() + \"String_Node_Str\" + EParameterName.REPOSITORY_PROPERTY_TYPE.getName(), propertyId, true);\n command1.setMaps(repositoryTableMap);\n if (selectedNode.getProperties(EProperties.CONTENT_TYPE) != ERepositoryObjectType.METADATA_CON_QUERY) {\n command1.setGuessQuery(true);\n }\n if (selectedNode.getParent() != null && selectedNode.getParent().getProperties(EProperties.CONTENT_TYPE) == ERepositoryObjectType.METADATA_SAP_FUNCTION) {\n IRepositoryViewObject functionObject = selectedNode.getParent().getObject();\n if (functionObject instanceof SAPFunctionRepositoryObject) {\n SAPFunctionRepositoryObject sapObj = (SAPFunctionRepositoryObject) functionObject;\n String connectionId = connection.getId();\n String functionId = selectedNode.getParent().getObject().getId();\n String tableName = selectedNode.getObject().getLabel();\n MetadataTableRepositoryObject object = (MetadataTableRepositoryObject) selectedNode.getObject();\n if (\"String_Node_Str\".equals(node.getComponent().getName())) {\n MetadataToolHelper.copyTable(ConvertionHelper.convert(object.getTable()), node.getMetadataList().get(0));\n }\n command1.setSapFunctionLabel(((SAPFunctionUnit) sapObj.getAbstractMetadataObject()).getLabel());\n command1.setCurrentTableName(selectedNode.getObject().getLabel());\n }\n }\n if (selectedNode.getProperties(EProperties.CONTENT_TYPE) == ERepositoryObjectType.METADATA_SAP_FUNCTION) {\n IRepositoryViewObject selectedObj = selectedNode.getObject();\n if (selectedObj instanceof SAPFunctionRepositoryObject) {\n SAPFunctionRepositoryObject sapObj = (SAPFunctionRepositoryObject) selectedObj;\n command1.setSapFunctionLabel(((SAPFunctionUnit) sapObj.getAbstractMetadataObject()).getLabel());\n List<IRepositoryNode> nodes = selectedNode.getChildren();\n if (nodes != null && nodes.size() > 0) {\n String firstTableName = nodes.get(0).getObject().getLabel();\n command1.setCurrentTableName(firstTableName);\n if (\"String_Node_Str\".equals(node.getComponent().getName())) {\n IElementParameter schemaParam = node.getElementParameterFromField(EParameterFieldType.SCHEMA_TYPE);\n schemaParam.getChildParameters().get(EParameterName.SCHEMA_TYPE.getName()).setValue(EmfComponent.REPOSITORY);\n } else {\n }\n } else {\n if (\"String_Node_Str\".equals(node.getComponent().getName())) {\n IElementParameter schemaParam = node.getElementParameterFromField(EParameterFieldType.SCHEMA_TYPE);\n schemaParam.getChildParameters().get(EParameterName.SCHEMA_TYPE.getName()).setValue(EmfComponent.BUILTIN);\n command1.setCurrentTableName(null);\n } else {\n }\n }\n }\n }\n if (selectedNode.getProperties(EProperties.CONTENT_TYPE) == ERepositoryObjectType.METADATA_SAP_IDOC) {\n IRepositoryViewObject selectedObj = selectedNode.getObject();\n if (selectedObj instanceof SAPIDocRepositoryObject) {\n SAPIDocRepositoryObject sapObj = (SAPIDocRepositoryObject) selectedObj;\n command1.setSapIDocLabel(((SAPIDocUnit) sapObj.getAbstractMetadataObject()).getLabel());\n }\n }\n SalesforceModuleRepositoryObject sfObject = null;\n if (selectedNode.getProperties(EProperties.CONTENT_TYPE) == ERepositoryObjectType.METADATA_SALESFORCE_MODULE) {\n sfObject = (SalesforceModuleRepositoryObject) selectedNode.getObject();\n } else if (selectedNode.getProperties(EProperties.CONTENT_TYPE) == ERepositoryObjectType.METADATA_CON_TABLE) {\n IRepositoryViewObject object = selectedNode.getParent().getObject();\n if (object instanceof SalesforceModuleRepositoryObject) {\n sfObject = (SalesforceModuleRepositoryObject) object;\n }\n }\n if (sfObject != null) {\n ModelElement modelElement = sfObject.getModelElement();\n if (modelElement instanceof SalesforceModuleUnit) {\n command1.setSalesForceModuleUnit((SalesforceModuleUnit) modelElement);\n }\n }\n list.add(command1);\n }\n Command command = getChangeMetadataCommand(selectedNode, node, originalConnectionItem);\n if (command != null) {\n list.add(command);\n }\n if (selectedNode.getProperties(EProperties.CONTENT_TYPE) == ERepositoryObjectType.METADATA_CON_QUERY) {\n IElementParameter queryParam = node.getElementParameterFromField(EParameterFieldType.QUERYSTORE_TYPE);\n QueryRepositoryObject object = (QueryRepositoryObject) selectedNode.getObject();\n Query query = object.getQuery();\n String value = originalConnectionItem.getProperty().getId() + \"String_Node_Str\" + query.getLabel();\n if (queryParam != null) {\n RepositoryChangeQueryCommand command3 = new RepositoryChangeQueryCommand(node, query, queryParam.getName() + \"String_Node_Str\" + EParameterName.REPOSITORY_QUERYSTORE_TYPE.getName(), value);\n list.add(command3);\n }\n } else {\n if (connection instanceof DatabaseConnection && hasQuery(node)) {\n DatabaseConnection connection2 = (DatabaseConnection) connection;\n String schema = connection2.getUiSchema();\n String dbType = connection2.getDatabaseType();\n QueryGuessCommand queryGuessCommand = null;\n if (node.getMetadataList().size() == 0) {\n queryGuessCommand = new QueryGuessCommand(node, null, schema, dbType);\n } else {\n queryGuessCommand = new QueryGuessCommand(node, node.getMetadataList().get(0), schema, dbType, connection);\n }\n if (queryGuessCommand != null) {\n list.add(queryGuessCommand);\n }\n }\n }\n } else if (selectedNode.getObject().getProperty().getItem() instanceof ProcessItem) {\n ProcessItem processItem = (ProcessItem) selectedNode.getObject().getProperty().getItem();\n String value = processItem.getProperty().getId();\n PropertyChangeCommand command4 = new PropertyChangeCommand(node, EParameterName.PROCESS_TYPE_PROCESS.getName(), value);\n list.add(command4);\n PropertyChangeCommand command5 = new PropertyChangeCommand(node, EParameterName.PROCESS_TYPE_CONTEXT.getName(), processItem.getProcess().getDefaultContext());\n list.add(command5);\n } else if (selectedNode.getObject().getProperty().getItem() instanceof FileItem) {\n if (selectedNode.getObject().getProperty().getItem() instanceof RulesItem) {\n RulesItem rulesItem = (RulesItem) selectedNode.getObject().getProperty().getItem();\n IElementParameter propertyParam = node.getElementParameterFromField(EParameterFieldType.PROPERTY_TYPE);\n if (propertyParam != null) {\n propertyParam.getChildParameters().get(EParameterName.PROPERTY_TYPE.getName()).setValue(EmfComponent.REPOSITORY);\n final String showId = rulesItem.getProperty().getId();\n PropertyChangeCommand command6 = new PropertyChangeCommand(node, EParameterName.REPOSITORY_PROPERTY_TYPE.getName(), showId);\n list.add(command6);\n }\n }\n } else if (selectedNode.getObject().getProperty().getItem() instanceof LinkRulesItem) {\n LinkRulesItem linkItem = (LinkRulesItem) selectedNode.getObject().getProperty().getItem();\n IElementParameter propertyParam = node.getElementParameterFromField(EParameterFieldType.PROPERTY_TYPE);\n if (propertyParam != null) {\n propertyParam.getChildParameters().get(EParameterName.PROPERTY_TYPE.getName()).setValue(EmfComponent.REPOSITORY);\n final String showId = linkItem.getProperty().getId();\n PropertyChangeCommand command7 = new PropertyChangeCommand(node, EParameterName.REPOSITORY_PROPERTY_TYPE.getName(), showId);\n list.add(command7);\n }\n }\n return list;\n}\n"
"void computePotentialSplitScore(List<Point2D_I32> contour, LinkedList.Element<Corner> e0) {\n LinkedList.Element<Corner> e1 = next(e0);\n e0.object.splitable = canBeSplit(contour.size(), e0);\n if (e0.object.splitable) {\n splitter.selectSplitPoint(contour, e0.object.index, e1.object.index, resultsA);\n e0.object.splitLocation = resultsA.index;\n e0.object.splitScore0 = scoreSide(contour, e0.object.index, resultsA.index);\n e0.object.splitScore1 = scoreSide(contour, resultsA.index, e1.object.index);\n }\n}\n"
"public void execute(AdminCommandContext context) {\n ActionReport report = context.getActionReport();\n if (name == null)\n name = nodehost;\n if (nodes.getNode(name) != null) {\n return;\n }\n CommandInvocation ci = cr.getCommandInvocation(\"String_Node_Str\", report);\n ParameterMap map = new ParameterMap();\n map.add(\"String_Node_Str\", name);\n map.add(NodeUtils.PARAM_NODEDIR, nodedir);\n map.add(NodeUtils.PARAM_INSTALLDIR, installdir);\n map.add(NodeUtils.PARAM_NODEHOST, nodehost);\n map.add(NodeUtils.PARAM_TYPE, \"String_Node_Str\");\n ci.parameters(map);\n ci.execute();\n}\n"
"private static boolean isLetter(char c) {\n if (Arrays.binarySearch(Alphabet.getGreekNumbering(), c) != -1)\n return true;\n if (Arrays.binarySearch(Alphabet.CYRILLIC_NUMBERING, c) != -1)\n return true;\n return Character.isLetter(c);\n}\n"
"public Integer getSelectedKeyAtSelectedTableItem(Map<Integer, ITableEntry> searchMaps) {\n Integer selectKey = 0;\n TableViewerCreator tableViewerCreator = null;\n if (uiManager.getCurrentSelectedInputTableView() != null) {\n tableViewerCreator = uiManager.getCurrentSelectedInputTableView().getTableViewerCreatorForColumns();\n } else if (uiManager.getCurrentSelectedOutputTableView() != null) {\n tableViewerCreator = uiManager.getCurrentSelectedOutputTableView().getTableViewerCreatorForColumns();\n }\n if (selection != null && !selection.isEmpty()) {\n List<ITableEntry> list = uiManager.extractSelectedTableEntries(selection);\n if (list != null && !list.isEmpty()) {\n ITableEntry tableEntry = list.get(0);\n if (tableEntry != null) {\n if (searchMaps.containsValue(tableEntry)) {\n Iterator iter = searchMaps.entrySet().iterator();\n while (iter.hasNext()) {\n Map.Entry entry = (Map.Entry) iter.next();\n if (entry.getValue() != null && entry.getValue() instanceof ITableEntry) {\n ITableEntry tableEntryTemp = (ITableEntry) entry.getValue();\n if (tableEntry.equals(tableEntryTemp)) {\n tableViewerCreator.getTableViewer().getTable().deselectAll();\n return (Integer) entry.getKey();\n }\n }\n }\n }\n }\n }\n }\n return selectKey;\n}\n"
"public Coord2D getMiddle() {\n return (new Coord2D((ne_1quadrant.getLat() + sw_3quadrant.getLat()) / 2, (ne_1quadrant.getLng() + sw_3quadrant.getLng()) / 2));\n}\n"
"protected void setEnv(Map parameters, String autServerClasspath) {\n String env = (String) parameters.get(AutConfigConstants.ENVIRONMENT);\n if (env == null) {\n env = StringConstants.EMPTY;\n } else {\n env += ENV_SEPARATOR;\n }\n env += setJavaOptions(parameters);\n if (isRunningFromExecutable(parameters)) {\n String serverPort = \"String_Node_Str\";\n final Communicator autCommunicator = AutStarter.getInstance().getAutCommunicator();\n if (autCommunicator != null) {\n serverPort = String.valueOf(autCommunicator.getLocalPort());\n }\n env += ENV_SEPARATOR + \"String_Node_Str\" + serverPort;\n env += ENV_SEPARATOR + \"String_Node_Str\" + autServerClasspath;\n env += ENV_SEPARATOR + \"String_Node_Str\" + getServerClassName();\n env += ENV_SEPARATOR + AutConfigConstants.AUT_AGENT_HOST + \"String_Node_Str\" + parameters.get(AutConfigConstants.AUT_AGENT_HOST);\n env += ENV_SEPARATOR + AutConfigConstants.AUT_AGENT_PORT + \"String_Node_Str\" + parameters.get(AutConfigConstants.AUT_AGENT_PORT);\n env += ENV_SEPARATOR + AutConfigConstants.AUT_NAME + \"String_Node_Str\" + parameters.get(AutConfigConstants.AUT_NAME);\n }\n parameters.put(AutConfigConstants.ENVIRONMENT, env);\n}\n"
"private void _parseExpression(String expression, int rowIndex, boolean inmode) {\n if (expression != \"String_Node_Str\") {\n String condition = \"String_Node_Str\";\n String value = \"String_Node_Str\";\n for (int i = 1; i < getColumnCount(); i++) {\n expression = expression.substring(expression.indexOf(\"String_Node_Str\") + 1).trim();\n int endOfCondition = expression.indexOf(\"String_Node_Str\");\n if (expression.contains(\"String_Node_Str\") && (expression.indexOf(\"String_Node_Str\") < expression.indexOf(\"String_Node_Str\"))) {\n endOfCondition = SCRTableHelper.indexOfMatchingCloseBracket(expression, expression.indexOf(\"String_Node_Str\"));\n }\n condition = expression.substring(0, endOfCondition).trim();\n expression = expression.substring(endOfCondition).trim();\n expression = expression.substring(expression.indexOf(\"String_Node_Str\") + 1).trim();\n int endOfValue = expression.indexOf(\"String_Node_Str\");\n if (expression.contains(\"String_Node_Str\") && (expression.indexOf(\"String_Node_Str\") < expression.indexOf(\"String_Node_Str\"))) {\n endOfValue = SCRTableHelper.indexOfMatchingCloseBracket(expression, expression.indexOf(\"String_Node_Str\"));\n }\n value = expression.substring(0, endOfValue).trim();\n expression = expression.substring(expression.indexOf(\"String_Node_Str\") + 1).trim();\n expression = expression.substring(expression.indexOf(\"String_Node_Str\") + 1).trim();\n int valueIndex = _getContentIndex(getRowCount() - 1, i);\n int contentIndex = _getContentIndex(rowIndex, i);\n if (inmode && condition.equals(\"String_Node_Str\")) {\n condition = \"String_Node_Str\";\n }\n String content = (String) _tableContent.get(contentIndex);\n if (!content.equals(\"String_Node_Str\")) {\n if (content.equals(\"String_Node_Str\")) {\n content = condition;\n } else if (condition.equals(\"String_Node_Str\")) {\n } else {\n content = content + \"String_Node_Str\" + condition;\n }\n } else {\n content = condition;\n }\n _tableContent.add(valueIndex, value);\n _tableContent.remove(valueIndex + 1);\n _tableContent.add(contentIndex, content);\n _tableContent.remove(contentIndex + 1);\n }\n }\n}\n"
"public static List<Field> getPrimaryColumnFields(List<Field> outFields, Class<?> inClass) {\n for (Field field : inClass.getDeclaredFields()) {\n if (StructureUtils.isPrimaryKey(field)) {\n outFields.add(field);\n }\n }\n if (inClass.getSuperclass() != null && !inClass.getSuperclass().equals(Model.class)) {\n outFields = getAllColumns(outFields, inClass.getSuperclass());\n }\n return outFields;\n}\n"
"protected void deliverEvent(Event evt) {\n final SOWrapper wrap = getSharedObjectWrapper(presenceHelperID);\n if (wrap != null)\n wrap.deliverEvent(evt);\n}\n"
"private Collection<Address> getPossibleAddresses() {\n final Collection<String> possibleMembers = getMembers();\n final Set<Address> possibleAddresses = new HashSet<Address>();\n final NetworkConfig networkConfig = config.getNetworkConfig();\n for (String possibleMember : possibleMembers) {\n try {\n final AddressHolder addressHolder = AddressUtil.getAddressHolder(possibleMember);\n final boolean portIsDefined = addressHolder.port != -1 || !networkConfig.isPortAutoIncrement();\n final int count = portIsDefined ? 1 : MAX_PORT_TRIES;\n final int port = addressHolder.port != -1 ? addressHolder.port : networkConfig.getPort();\n AddressMatcher addressMatcher = null;\n try {\n addressMatcher = AddressUtil.getAddressMatcher(addressHolder.address);\n } catch (InvalidAddressException ignore) {\n }\n if (addressMatcher != null) {\n final Collection<String> matchedAddresses;\n if (addressMatcher.isIPv4()) {\n matchedAddresses = AddressUtil.getMatchingIpv4Addresses(addressMatcher);\n } else {\n matchedAddresses = Collections.singleton(addressHolder.address);\n }\n for (String matchedAddress : matchedAddresses) {\n addPossibleAddresses(possibleAddresses, null, InetAddress.getByName(matchedAddress), port, count);\n }\n } else {\n final String host = addressHolder.address;\n final Interfaces interfaces = networkConfig.getInterfaces();\n if (interfaces.isEnabled()) {\n final InetAddress[] inetAddresses = InetAddress.getAllByName(host);\n if (inetAddresses.length > 1) {\n for (InetAddress inetAddress : inetAddresses) {\n if (AddressUtil.matchAnyInterface(inetAddress.getHostAddress(), interfaces.getInterfaces())) {\n addPossibleAddresses(possibleAddresses, null, inetAddress, port, count);\n }\n }\n } else {\n final InetAddress inetAddress = inetAddresses[0];\n if (AddressUtil.matchAnyInterface(inetAddress.getHostAddress(), interfaces.getInterfaces())) {\n addPossibleAddresses(possibleAddresses, host, null, port, count);\n }\n }\n } else {\n addPossibleAddresses(possibleAddresses, host, null, port, count);\n }\n }\n } catch (UnknownHostException e) {\n logger.log(Level.WARNING, e.getMessage(), e);\n }\n }\n possibleAddresses.addAll(networkConfig.getJoin().getTcpIpConfig().getAddresses());\n return possibleAddresses;\n}\n"
"public boolean checkTrigger(GameEvent event, Game game) {\n if (event == null) {\n return false;\n }\n Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId());\n if (permanent == null) {\n return false;\n }\n if (permanent.getControllerId().equals(this.getControllerId())) {\n return false;\n }\n return true;\n}\n"
"public Boolean razePlot(User user) {\n String locKey = user.getLocationKey();\n Plot plot = getPlotAtUser(user);\n if (!exists(locKey)) {\n user.message(\"String_Node_Str\");\n return false;\n }\n if (plugin.userManager.isLeader(user) && plot.getOwner().equals(user.getNation())) {\n collection.remove(locKey);\n deleteObject(locKey);\n plugin.groupManager.getGroup(user.getNation()).removePlot(locKey);\n user.setCurrentLocationName(\"String_Node_Str\");\n user.message(\"String_Node_Str\" + locKey + \"String_Node_Str\");\n return true;\n } else {\n user.message(\"String_Node_Str\");\n return false;\n }\n}\n"
"private Object handleChild(Object child, int maxDepth) throws Exception {\n if (child instanceof OTID && (maxDepth == -1 || maxDepth > 0)) {\n CopyEntry itemCopyEntry = getCopyEntry((OTID) child);\n if (itemCopyEntry == null) {\n OTDataObject itemObj = sourceDb.getOTDataObject(root, (OTID) child);\n if (itemObj == null) {\n itemObj = dataObjectFinder.findDataObject((OTID) child);\n if (itemObj == null) {\n throw new IllegalStateException(\"String_Node_Str\" + child);\n }\n }\n OTDataObject itemCopy = destinationDb.createDataObject(itemObj.getType());\n int copyMaxDepth = -1;\n if (maxDepth != -1) {\n copyMaxDepth = maxDepth - 1;\n }\n itemCopyEntry = new CopyEntry(itemObj, copyMaxDepth, itemCopy);\n toBeCopied.add(itemCopyEntry);\n } else {\n return child;\n }\n child = itemCopyEntry.copy.getGlobalId();\n }\n return child;\n}\n"
"IMap newMapProxy(String name) {\n IMap imap = Hazelcast.getMap(name);\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n Class[] interfaces = new Class[] { IMap.class };\n IMap proxy = (IMap) Proxy.newProxyInstance(classLoader, interfaces, new ThreadBoundInvocationHandler(imap));\n if (listToAdd != null) {\n listToAdd.add(proxy);\n }\n return proxy;\n}\n"
"private void createOtrContactMenus(MetaContact metaContact) {\n for (int itemIndex = 0, itemCount = menu.getItemCount(); itemIndex < itemCount; ) {\n JMenuItem menuItem = menu.getItem(itemIndex);\n if (menuItem instanceof OtrContactMenu) {\n menu.remove(itemIndex);\n itemCount--;\n ((OtrContactMenu) menuItem).dispose();\n } else\n itemIndex++;\n }\n if (metaContact != null) {\n Iterator<Contact> contacts = metaContact.getContacts();\n int itemIndex = 0;\n while (contacts.hasNext()) {\n menu.insert(new OtrContactMenu(contacts.next(), inMacOSXScreenMenuBar), itemIndex);\n itemIndex++;\n }\n }\n}\n"
"private String computeLanguageName() {\n if (WikiTextPlugin.getDefault() == null) {\n return TextileLanguage.class.getName();\n }\n return \"String_Node_Str\";\n}\n"
"public void resumeActor(NamedObj actor) throws IllegalActionException {\n List<DEEvent> events = _actorsInExecution.get(actor);\n ActorExecutionAspect aspect = getExecutionAspect(actor);\n if (aspect == null) {\n throw new IllegalActionException(this, \"String_Node_Str\" + actor.getName() + \"String_Node_Str\");\n }\n NamedObj container = aspect.getContainer();\n if (container == null) {\n throw new IllegalActionException(this, \"String_Node_Str\" + actor.getName());\n }\n Director director = ((CompositeActor) container).getDirector();\n if (director == null) {\n throw new IllegalActionException(this, \"String_Node_Str\" + container.getName() + \"String_Node_Str\" + actor.getName());\n }\n Time time = director.getModelTime();\n DEEvent event = events.get(0);\n events.remove(event);\n _actorsInExecution.put((Actor) actor, events);\n if (event.ioPort() != null) {\n _enqueueTriggerEvent(event.ioPort(), time);\n } else {\n _enqueueEvent((Actor) actor, time, 1);\n }\n fireContainerAt(time);\n if (_actorsFinished == null) {\n _actorsFinished = new ArrayList();\n }\n _actorsFinished.add((Actor) actor);\n}\n"
"public void onBindViewHolder(AbstractViewHolder holder, int position) {\n if (artistList.isEmpty()) {\n return;\n }\n Artist artist = artistList.get(position);\n holder.getTitle().setText(artist.getName().toLowerCase());\n if (artist.getListeners() != null) {\n holder.getCount().setText(Constants.formatNumberWithSeperator(artist.getListeners()) + \"String_Node_Str\");\n }\n Glide.with(mainActivity).load(artist.getImage().get(Constants.IMAGE_LARGE).getText()).into(holder.getThumbnail());\n ((ArtistViewHolder) holder).getOverflow().setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n holder.showPopupMenu(mainActivity, ((ArtistViewHolder) holder).getOverflow());\n }\n });\n this.specificArtistSearchable.addOnArtistResultClickedListener(holder, artist.getName());\n}\n"
"public void testReplaceBranchInfo() throws Exception {\n project.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n IvyResolve res = new IvyResolve();\n res.setProject(project);\n res.execute();\n deliver.setPubrevision(\"String_Node_Str\");\n deliver.setPubbranch(\"String_Node_Str\");\n deliver.setDeliverpattern(\"String_Node_Str\");\n deliver.execute();\n File deliveredIvyFile = new File(\"String_Node_Str\");\n assertTrue(deliveredIvyFile.exists());\n ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(new IvySettings(), deliveredIvyFile.toURI().toURL(), true);\n assertEquals(ModuleRevisionId.newInstance(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), md.getModuleRevisionId());\n}\n"
"private Migrator createMigrator(String changeLogFile, FileOpener fileOpener) throws JDBCException {\n return new Migrator(changeLogFile, fileOpener, database);\n}\n"
"public void put(Request req) {\n long now = System.currentTimeMillis();\n if (mapRecords.size() >= maxSize) {\n }\n if (req.value == null) {\n req.value = new Data();\n }\n Record record = getRecord(req.key);\n if (record != null && !record.isValid(now)) {\n }\n if (req.operation == CONCURRENT_MAP_PUT_IF_ABSENT) {\n if (record != null && record.isActive() && record.isValid(now) && record.getValue() != null) {\n req.clearForResponse();\n req.response = record.getValue();\n return;\n }\n } else if (req.operation == CONCURRENT_MAP_REPLACE_IF_NOT_NULL) {\n if (record == null || !record.isActive() || !record.isValid(now) || record.getValue() == null) {\n return;\n }\n } else if (req.operation == CONCURRENT_MAP_REPLACE_IF_SAME) {\n if (record == null || !record.isActive() || !record.isValid(now)) {\n req.response = Boolean.FALSE;\n return;\n }\n MultiData multiData = (MultiData) toObject(req.value);\n if (multiData == null || multiData.size() != 2) {\n throw new RuntimeException(\"String_Node_Str\" + multiData);\n }\n Data expectedOldValue = multiData.getData(0);\n req.value = multiData.getData(1);\n if (!record.getValue().equals(expectedOldValue)) {\n req.response = Boolean.FALSE;\n return;\n }\n }\n Data oldValue = null;\n Op op = UPDATE;\n if (record == null) {\n record = createNewRecord(req.key, req.value);\n mapRecords.put(req.key, record);\n op = CREATE;\n } else {\n if (!record.isActive()) {\n op = CREATE;\n }\n markAsActive(record);\n oldValue = (record.isValid(now)) ? record.getValue() : null;\n record.setValue(req.value);\n record.incrementVersion();\n record.setLastUpdated();\n }\n if (req.ttl > 0) {\n record.setExpirationTime(req.ttl);\n ttlPerRecord = true;\n }\n if (oldValue == null) {\n concurrentMapManager.fireMapEvent(mapListeners, getName(), EntryEvent.TYPE_ADDED, record, req.caller);\n } else {\n fireInvalidation(record);\n concurrentMapManager.fireMapEvent(mapListeners, getName(), EntryEvent.TYPE_UPDATED, record);\n }\n if (req.txnId != -1) {\n unlock(record);\n }\n record.setIndexes(req.indexes, req.indexTypes);\n updateStats(op, record, true, oldValue);\n updateIndexes(record);\n markAsDirty(record);\n req.clearForResponse();\n req.version = record.getVersion();\n req.longValue = record.getCopyCount();\n if (req.operation == CONCURRENT_MAP_REPLACE_IF_SAME) {\n req.response = Boolean.TRUE;\n } else {\n req.response = oldValue;\n }\n}\n"
"protected boolean isUserDisabled(SearchResult result) throws NamingException {\n boolean isDisabledUser = false;\n String userAccountControl = LdapUtils.getAttributeValue(result.getAttributes(), _ldapConfiguration.getUserAccountControlAttribute());\n if (userAccountControl != null) {\n int control = Integer.parseInt(userAccountControl);\n if ((control & 2) > 0) {\n isDisabledUser = true;\n }\n }\n return isDisabledUser;\n}\n"
"public void build() throws BirtException {\n IReportExecutor executor = executionContext.getExecutor();\n engine = LayoutEngineFactory.createLayoutEngine(ExtensionManager.PAGE_BREAK_PAGINATION);\n engine.setOption(EngineTask.TASK_TYPE, new Integer(IEngineTask.TASK_RUN));\n IReportContent report = executor.execute();\n if (executionContext.isFixedLayout() && engine instanceof HTMLReportLayoutEngine) {\n HTMLLayoutContext htmlContext = ((HTMLReportLayoutEngine) engine).getContext();\n htmlContext.setFixedLayout(true);\n LayoutEngine pdfEmitter = new LayoutEngine(executor, htmlContext, outputEmitters, null, executionContext, 0);\n pdfEmitter.setPageHandler(layoutPageHandler);\n initializeContentEmitter(pdfEmitter, executor);\n pdfEmitter.createPageHintGenerator();\n pdfEmitter.start(report);\n engine.layout(executor, report, pdfEmitter, true);\n engine.close();\n pdfEmitter.end(report);\n } else {\n engine.setPageHandler(layoutPageHandler);\n outputEmitters.start(report);\n engine.layout(executor, report, outputEmitters, true);\n engine.close();\n outputEmitters.end(report);\n }\n engine = null;\n}\n"
"public List<Variable> getVariables() {\n List<Variable> variables = new ArrayList<Variable>();\n for (IDataMapTable table : this.tables) {\n List<IColumnEntry> dataMapTableEntries = table.getColumnEntries();\n for (IColumnEntry entrySource : dataMapTableEntries) {\n String variable = null;\n if (table instanceof VarsTable) {\n variable = entrySource.getExpression();\n } else {\n variable = LanguageProvider.getCurrentLanguage().getLocation(entrySource.getParentName(), entrySource.getName());\n }\n String talendType = null;\n boolean nullable = true;\n if (entrySource instanceof AbstractInOutTableEntry) {\n talendType = ((AbstractInOutTableEntry) entrySource).getMetadataColumn().getTalendType();\n nullable = ((AbstractInOutTableEntry) entrySource).getMetadataColumn().isNullable();\n } else if (entrySource instanceof VarTableEntry) {\n talendType = ((VarTableEntry) entrySource).getType();\n nullable = ((VarTableEntry) entrySource).isNullable();\n }\n if (talendType != null) {\n if (LanguageManager.getCurrentLanguage() == ECodeLanguage.JAVA) {\n boolean exist = false;\n for (Variable v : variables) {\n if (variable != null && v.getName() != null && v.getName().trim().equals(variable.trim())) {\n exist = true;\n break;\n }\n }\n if (!exist) {\n variables.add(new Variable(variable, JavaTypesManager.getDefaultValueFromJavaIdType(talendType, nullable).toString(), talendType, nullable));\n }\n } else {\n variables.add(new Variable(variable, \"String_Node_Str\", talendType, nullable));\n }\n }\n }\n }\n return variables;\n}\n"
"protected boolean _transferInputs(IOPort port) throws IllegalActionException {\n if (!port.isInput() || !port.isOpaque()) {\n throw new IllegalActionException(this, port, \"String_Node_Str\" + \"String_Node_Str\");\n }\n if (port instanceof RefinementPort) {\n return super._transferInputs(port);\n }\n boolean result = false;\n Tag physicalTag = getPhysicalTag();\n while (true) {\n if (_realTimeInputEventQueue.isEmpty()) {\n break;\n }\n RealTimeEvent realTimeEvent = (RealTimeEvent) _realTimeInputEventQueue.peek();\n int compare = realTimeEvent.deliveryTime.compareTo(physicalTime);\n if (compare > 0) {\n break;\n } else if (compare == 0) {\n Parameter parameter = (Parameter) ((NamedObj) realTimeEvent.port).getAttribute(\"String_Node_Str\");\n double realTimeDelay = 0.0;\n if (parameter != null) {\n realTimeDelay = ((DoubleToken) parameter.getToken()).doubleValue();\n } else {\n throw new IllegalActionException(\"String_Node_Str\");\n }\n Time lastModelTime = _currentTime;\n if (_isNetworkPort(realTimeEvent.port)) {\n _realTimeInputEventQueue.poll();\n realTimeEvent.port.sendInside(realTimeEvent.channel, realTimeEvent.token);\n } else {\n int lastMicrostep = _microstep;\n setTag(realTimeEvent.deliveryTime.subtract(realTimeDelay), 0);\n _realTimeInputEventQueue.poll();\n realTimeEvent.port.sendInside(realTimeEvent.channel, realTimeEvent.token);\n setTag(lastModelTime, lastMicrostep);\n }\n if (_debugging) {\n _debug(getName(), \"String_Node_Str\" + realTimeEvent.port.getName());\n }\n result = true;\n } else {\n throw new IllegalActionException(realTimeEvent.port, \"String_Node_Str\" + \"String_Node_Str\" + realTimeEvent.deliveryTime + \"String_Node_Str\" + physicalTime);\n }\n }\n if (_isNetworkPort(port)) {\n while (true) {\n if (!super._transferInputs(port)) {\n break;\n } else {\n result = true;\n }\n }\n }\n Parameter parameter = (Parameter) ((NamedObj) port).getAttribute(\"String_Node_Str\");\n double realTimeDelay = 0.0;\n if (parameter != null) {\n realTimeDelay = ((DoubleToken) parameter.getToken()).doubleValue();\n }\n if (realTimeDelay == 0.0) {\n Time lastModelTime = _currentTime;\n setTag(physicalTime, 0);\n result = result || super._transferInputs(port);\n setTag(lastModelTime, 0);\n } else {\n for (int i = 0; i < port.getWidth(); i++) {\n try {\n if (i < port.getWidthInside()) {\n if (port.hasToken(i)) {\n Token t = port.get(i);\n Time waitUntilTime = physicalTime.add(realTimeDelay);\n RealTimeEvent realTimeEvent = new RealTimeEvent(port, i, t, waitUntilTime);\n _realTimeInputEventQueue.add(realTimeEvent);\n result = true;\n Actor container = (Actor) getContainer();\n container.getExecutiveDirector().fireAt((Actor) container, waitUntilTime);\n }\n }\n } catch (NoTokenException ex) {\n throw new InternalErrorException(this, ex, null);\n }\n }\n }\n return result;\n}\n"
"private long hash(byte[] digest, int number) {\n return (((long) (digest[3 + number * 4] & 0xFF) << 24) | ((long) (digest[2 + number * 4] & 0xFF) << 16) | ((long) (digest[1 + number * 4] & 0xFF) << 8) | (digest[number * 4] & 0xFF)) & 0xFFFFFFFFL;\n}\n"
"private void parseCurrentLine() {\n Arrays.fill(columnStarts, 0);\n Arrays.fill(columnEnds, 0);\n Arrays.fill(fieldStarts, 0);\n Arrays.fill(fieldEnds, 0);\n columnStarts[0] = 0;\n int columnIndex = 0;\n int fieldIndex = 0;\n lineLength = line.length();\n int[] lineFieldIndexToColumnIndex = new int[numberOfFields];\n Arrays.fill(lineFieldIndexToColumnIndex, -1);\n IntArrayList previousColumnFieldIndices = new IntArrayList();\n for (int i = 0; i < lineLength; i++) {\n final char c = line.charAt(i);\n if (c == columnSeparatorCharacter) {\n columnEnds[columnIndex] = i;\n if (columnIndex + 1 < numberOfColumns) {\n columnStarts[columnIndex + 1] = i + 1;\n }\n }\n if (c == columnSeparatorCharacter || c == fieldSeparatorCharacter || (columnIndex >= formatColumnIndex && c == formatFieldSeparatorCharacter)) {\n if (TSV) {\n fieldEnds[columnIndex] = columnEnds[columnIndex];\n fieldStarts[columnIndex] = columnStarts[columnIndex];\n fieldIndex = columnIndex;\n lineFieldIndexToColumnIndex[fieldIndex] = columnIndex;\n } else {\n fieldEnds[fieldIndex] = i;\n if (fieldIndex + 1 < numberOfFields) {\n fieldStarts[fieldIndex + 1] = i + 1;\n }\n previousColumnFieldIndices.add(fieldIndex);\n fieldIndex++;\n }\n }\n if (c == columnSeparatorCharacter) {\n push(columnIndex, lineFieldIndexToColumnIndex, previousColumnFieldIndices);\n columnIndex++;\n }\n }\n int numberOfFieldsOnLine = fieldIndex;\n int numberOfColumnsOnLine = columnIndex;\n columnStarts[0] = 0;\n columnEnds[numberOfColumnsOnLine] = line.length();\n fieldStarts[0] = 0;\n fieldEnds[numberOfFieldsOnLine] = line.length();\n previousColumnFieldIndices.add(fieldIndex);\n push(columnIndex, lineFieldIndexToColumnIndex, previousColumnFieldIndices);\n Arrays.fill(fieldPermutation, -1);\n for (ColumnInfo c : columns) {\n c.formatIndex = 0;\n }\n for (int lineFieldIndex = 0; lineFieldIndex <= numberOfFieldsOnLine; lineFieldIndex++) {\n int start = fieldStarts[lineFieldIndex];\n int end = fieldEnds[lineFieldIndex];\n final int cIndex = lineFieldIndexToColumnIndex[lineFieldIndex];\n ColumnInfo column = columnList.get(cIndex);\n int colMinGlobalFieldIndex = Integer.MAX_VALUE;\n int colMaxGlobalFieldIndex = Integer.MIN_VALUE;\n for (ColumnField f : column.fields) {\n colMinGlobalFieldIndex = Math.min(colMinGlobalFieldIndex, f.globalFieldIndex);\n colMaxGlobalFieldIndex = Math.max(colMaxGlobalFieldIndex, f.globalFieldIndex);\n }\n int formatColumnIndex = TSV ? -1 : formatColumn.columnIndex;\n int startFormatColumn = TSV ? 0 : columnStarts[formatColumnIndex];\n int endFormatColumn = TSV ? 0 : columnEnds[formatColumnIndex];\n MutableString formatSpan = line.substring(startFormatColumn, endFormatColumn);\n formatSpan.compact();\n String[] formatTokens = formatSpan.toString().split(Character.toString(formatFieldSeparatorCharacter));\n for (ColumnField f : column.fields) {\n if (colMaxGlobalFieldIndex == colMinGlobalFieldIndex) {\n fieldPermutation[f.globalFieldIndex] = lineFieldIndex;\n } else {\n int j = start;\n final String id = f.id;\n int matchLength = 0;\n for (int i = 0; i < id.length(); i++) {\n if (j >= end) {\n break;\n }\n char linechar = line.charAt(j);\n if (id.charAt(i) != linechar) {\n matchLength = -1;\n break;\n }\n matchLength++;\n j++;\n }\n if (matchLength == id.length() && line.charAt(j) == '=' || (j == end && f.type == ColumnType.Flag)) {\n fieldPermutation[f.globalFieldIndex] = lineFieldIndex;\n if (f.type != ColumnType.Flag) {\n fieldStarts[lineFieldIndex] += f.id.length() + 1;\n }\n } else {\n if (column.useFormat && column.formatIndex < formatTokens.length) {\n if (f.id.equals(formatTokens[column.formatIndex])) {\n fieldPermutation[f.globalFieldIndex] = lineFieldIndex;\n column.formatIndex++;\n break;\n }\n }\n }\n }\n }\n }\n}\n"
"public void whenInvalidInstanceNameAsUri_thenFails() throws URISyntaxException {\n cachingProvider.getCacheManager(new URI(\"String_Node_Str\"), null);\n}\n"