content
stringlengths
40
137k
"public void exportMoveLine(MoveLineReport moveLineReport) throws AxelorException, IOException {\n moveLineReportService.setStatus(moveLineReport);\n switch(moveLineReport.getTypeSelect()) {\n case MoveLineReportRepository.EXPORT_SALES:\n this.exportMoveLineTypeSelect1006(moveLineReport, false);\n break;\n case MoveLineReportRepository.EXPORT_REFUNDS:\n this.exportMoveLineTypeSelect7(moveLineReport, false);\n break;\n case MoveLineReportRepository.EXPORT_TREASURY:\n this.exportMoveLineTypeSelect8(moveLineReport, false);\n break;\n case MoveLineReportRepository.EXPORT_PURCHASES:\n this.exportMoveLineTypeSelect9(moveLineReport, false);\n break;\n default:\n break;\n }\n}\n"
"private void setupModalPage() {\n if (userRequestTO != null) {\n switch(userRequestTO.getType()) {\n case CREATE:\n userTO = userRequestTO.getUserTO();\n break;\n case UPDATE:\n initialUserTO = userRestClient.read(userRequestTO.getUserMod().getId());\n userTO = AttributableOperations.apply(initialUserTO, userRequestTO.getUserMod());\n break;\n case DELETE:\n default:\n }\n if (syncTaskTO != null) {\n userTO = syncTaskTO.getUserTemplate();\n }\n if (initialUserTO == null && userTO.getId() > 0) {\n initialUserTO = AttributableOperations.clone(userTO);\n }\n fragment.add(new Label(\"String_Node_Str\", userTO.getId() == 0 ? \"String_Node_Str\" : userTO.getUsername()));\n fragment.add(new Label(\"String_Node_Str\", userTO.getId() == 0 ? getString(\"String_Node_Str\") : \"String_Node_Str\"));\n final Form form = new Form(\"String_Node_Str\");\n form.setModel(new CompoundPropertyModel(userTO));\n form.add(new UserDetailsPanel(\"String_Node_Str\", userTO, form, userRequestTO == null, mode == Mode.TEMPLATE));\n form.add(new AttributesPanel(\"String_Node_Str\", userTO, form, mode == Mode.TEMPLATE));\n form.add(new DerivedAttributesPanel(\"String_Node_Str\", userTO));\n form.add(new VirtualAttributesPanel(\"String_Node_Str\", userTO, mode == Mode.TEMPLATE));\n form.add(new ResourcesPanel(\"String_Node_Str\", userTO));\n form.add(new RolesPanel(\"String_Node_Str\", userTO, mode == Mode.TEMPLATE));\n final AjaxButton submit = new IndicatingAjaxButton(\"String_Node_Str\", new ResourceModel(\"String_Node_Str\")) {\n\n private static final long serialVersionUID = -958724007591692537L;\n protected void onSubmit(final AjaxRequestTarget target, final Form form) {\n final UserTO updatedUserTO = (UserTO) form.getModelObject();\n try {\n if (updatedUserTO.getId() == 0) {\n switch(mode) {\n case SELF:\n requestRestClient.requestCreate(updatedUserTO);\n break;\n case ADMIN:\n default:\n userRestClient.create(updatedUserTO);\n if (userRequestTO != null) {\n requestRestClient.delete(userRequestTO.getId());\n }\n break;\n case TEMPLATE:\n syncTaskTO.setUserTemplate(updatedUserTO);\n taskRestClient.updateSyncTask(syncTaskTO);\n break;\n }\n } else {\n UserMod userMod = AttributableOperations.diff(updatedUserTO, initialUserTO);\n if (!userMod.isEmpty()) {\n if (mode == Mode.SELF) {\n requestRestClient.requestUpdate(userMod);\n } else {\n userRestClient.update(userMod);\n if (userRequestTO != null) {\n requestRestClient.delete(userRequestTO.getId());\n }\n }\n }\n }\n if (callerPageRef.getPage() instanceof BasePage) {\n ((BasePage) callerPageRef.getPage()).setModalResult(true);\n }\n window.close(target);\n } catch (SyncopeClientCompositeErrorException e) {\n LOG.error(\"String_Node_Str\", e);\n error(getString(\"String_Node_Str\") + \"String_Node_Str\" + e.getMessage());\n target.add(feedbackPanel);\n }\n }\n protected void onError(final AjaxRequestTarget target, final Form form) {\n target.add(feedbackPanel);\n }\n };\n if (mode == Mode.ADMIN) {\n String allowedRoles = userTO.getId() == 0 ? xmlRolesReader.getAllAllowedRoles(\"String_Node_Str\", \"String_Node_Str\") : xmlRolesReader.getAllAllowedRoles(\"String_Node_Str\", \"String_Node_Str\");\n MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER, allowedRoles);\n }\n form.add(submit);\n add(form);\n}\n"
"public static List<Identity> retrieveParticipantsFromGroups(List<Long> groupKeys, CourseGroupManager cgm) {\n return cgm.getParticipantsFromBusinessGroups(groupKeys);\n}\n"
"private void commonQueryExistDomain(String queryDomainName, String expectedLdhName, String expectedUnicodeName) throws Exception {\n mockMvc.perform(get(\"String_Node_Str\" + StringUtil.urlEncode(queryDomainName)).accept(MediaType.parseMediaType(\"String_Node_Str\"))).andExpect(status().isOk()).andExpect(content().contentType(\"String_Node_Str\")).andExpect(jsonPath(\"String_Node_Str\").value(\"String_Node_Str\")).andExpect(jsonPath(\"String_Node_Str\").value(\"String_Node_Str\")).andExpect(jsonPath(\"String_Node_Str\").value(expectedLdhName)).andExpect(jsonPath(\"String_Node_Str\").value(expectedUnicodeName)).andExpect(jsonPath(\"String_Node_Str\").value(\"String_Node_Str\")).andExpect(jsonPath(\"String_Node_Str\").isArray()).andExpect(jsonPath(\"String_Node_Str\").value(CoreMatchers.hasItems(\"String_Node_Str\", \"String_Node_Str\"))).andExpect(jsonPath(\"String_Node_Str\").isArray()).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").isArray()).andExpect(jsonPath(\"String_Node_Str\").value(CoreMatchers.hasItems(\"String_Node_Str\", \"String_Node_Str\"))).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").isArray()).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").value(\"String_Node_Str\")).andExpect(jsonPath(\"String_Node_Str\").value(CoreMatchers.hasItems(\"String_Node_Str\", \"String_Node_Str\"))).andExpect(jsonPath(\"String_Node_Str\").exists());\n}\n"
"public void emptyListBox() {\n int listCount = listBox.getItemCount();\n for (int x = listCount; x > 0; x--) {\n listBox.removeItem(x - 1);\n }\n}\n"
"public static void handleOnPageBreak(IListGroupContent content, ExecutionContext context) {\n ReportItemDesign listGroupDesign = (ReportItemDesign) content.getGenerateBy();\n if (!needOnPageBreak(listGroupDesign, context)) {\n return;\n }\n try {\n ReportElementInstance list = new ReportElementInstance(content, context, RunningState.PAGEBREAK);\n if (handleScript(list, listGroupDesign.getOnPageBreak(), context).didRun())\n return;\n IListGroupEventHandler eh = getEventHandler(listGroupDesign, context);\n if (eh != null)\n eh.onPageBreak(list, context.getReportContext());\n } catch (Exception e) {\n addException(context, e, listGroupDesign.getHandle());\n }\n}\n"
"protected final ResponseMessage wrapMessage(AtmosphereResponse res, String message) {\n Response.Builder builder = new Response.Builder();\n builder.body(message).status(res.getStatus(), res.getStatusMessage());\n Map<String, String> headers = res.headers();\n for (String s : headers.keySet()) {\n builder.header(new Header(s, headers.get(s)));\n }\n Request swaggerSocketRequest = ssRequest.get();\n if (swaggerSocketRequest == null) {\n swaggerSocketRequest = (Request) res.request().getAttribute(\"String_Node_Str\");\n }\n builder.uuid(swaggerSocketRequest.getUuid()).method(swaggerSocketRequest.getMethod()).path(swaggerSocketRequest.getPath());\n String identity = (String) getContextValue(res.request(), IDENTITY);\n AtomicInteger expectedResponseCount = (AtomicInteger) getContextValue(res.request(), transactionIdentity.get() + RESPONSE_COUNTER);\n ResponseMessage m = null;\n if (expectedResponseCount != null && res.resource().transport() != AtmosphereResource.TRANSPORT.WEBSOCKET) {\n m = (ResponseMessage) getContextValue(res.request(), transactionIdentity.get() + ResponseMessage.class.getName());\n if (m != null) {\n m.response(builder.build());\n } else {\n m = new ResponseMessage(identity, builder.build());\n }\n if (expectedResponseCount.decrementAndGet() <= 0) {\n return m;\n } else {\n addContextValue(res.request(), transactionIdentity.get() + ResponseMessage.class.getName(), m);\n return null;\n }\n }\n if (m == null) {\n m = new ResponseMessage(identity, builder.build());\n }\n return m;\n}\n"
"public void testAddTestsWithRemoteServerAddress() throws Exception {\n List<String> tests = tests();\n ActionSequenceBuilder builder = new ActionSequenceBuilder(actionFactory, null, null, new BrowserActionExecutorAction(null, null, null, null, null, 0, null, null), new FailureCheckerAction(null, null), new UploadAction(null), new CapturedBrowsers(new BrowserIdStrategy(new MockTime(0))), null, newConfigureProxyActionFactory(), null);\n List<Class<? extends Action>> expectedActions = new ArrayList<Class<? extends Action>>();\n expectedActions.add(ConfigureProxyAction.class);\n expectedActions.add(UploadAction.class);\n expectedActions.add(BrowserActionExecutorAction.class);\n builder.usingFiles(files, false);\n List<Action> sequence = builder.addTests(tests).build();\n assertSequence(expectedActions, sequence);\n}\n"
"private AtomicLong getCounterStorage(Id id) {\n final AtomicLong newCounter = new AtomicLong(0);\n final AtomicLong existingCounter = counters.putIfAbsent(id, newCounter);\n return existingCounter == null ? registry.gauge(id, newCounter) : existingCounter;\n}\n"
"private void computeWeights(StockMove stockMove) throws AxelorException {\n boolean weightsRequired = checkWeightsRequired(stockMove);\n StockConfig stockConfig = stockMove.getCompany().getStockConfig();\n Unit endUnit = stockConfig != null ? stockConfig.getCustomsWeightUnit() : null;\n if (weightsRequired && endUnit == null) {\n throw new AxelorException(stockMove, IException.NO_VALUE, I18n.get(IExceptionMessage.STOCK_MOVE_17));\n }\n List<StockMoveLine> stockMoveLineList = stockMove.getStockMoveLineList();\n if (stockMoveLineList == null) {\n return;\n }\n for (StockMoveLine stockMoveLine : stockMoveLineList) {\n Product product = stockMoveLine.getProduct();\n if (product == null || !ProductRepository.PRODUCT_TYPE_STORABLE.equals(product.getProductTypeSelect())) {\n continue;\n }\n Unit startUnit = product.getWeightUnit();\n BigDecimal netWeight = product.getNetWeight();\n if (startUnit != null && netWeight.compareTo(BigDecimal.ZERO) != 0) {\n UnitConversionService unitConversionService = Beans.get(UnitConversionService.class);\n netWeight = unitConversionService.convert(startUnit, endUnit, netWeight);\n BigDecimal totalNetWeight = netWeight.multiply(stockMoveLine.getRealQty());\n stockMoveLine.setNetWeight(netWeight);\n stockMoveLine.setTotalNetWeight(totalNetWeight);\n } else if (weightsRequired) {\n throw new AxelorException(stockMove, IException.NO_VALUE, I18n.get(IExceptionMessage.STOCK_MOVE_18));\n }\n }\n}\n"
"public Map<K, V> getAll(Set<? extends K> keys, ExpiryPolicy expiryPolicy) {\n final long start = System.nanoTime();\n ensureOpen();\n validateNotNull(keys);\n if (keys.isEmpty()) {\n return emptyMap();\n }\n final Set<Data> keySet = new HashSet<Data>(keys.size());\n for (K key : keys) {\n final Data k = toData(key);\n keySet.add(k);\n }\n Map<K, V> result = getAllFromNearCache(keySet);\n if (keySet.isEmpty()) {\n return result;\n }\n List<Map.Entry<Data, Data>> entries;\n Map<Data, Boolean> markers = createHashMap(keySet.size());\n try {\n for (Data key : keySet) {\n markers.put(key, keyStateMarker.markIfUnmarked(key));\n }\n Data expiryPolicyData = toData(expiryPolicy);\n ClientMessage request = CacheGetAllCodec.encodeRequest(nameWithPrefix, keySet, expiryPolicyData);\n ClientMessage responseMessage = invoke(request);\n entries = CacheGetAllCodec.decodeResponse(responseMessage).response;\n for (Map.Entry<Data, Data> dataEntry : entries) {\n Data keyData = dataEntry.getKey();\n Data valueData = dataEntry.getValue();\n K key = toObject(keyData);\n V value = toObject(valueData);\n result.put(key, value);\n storeInNearCache(keyData, valueData, value, markers.remove(keyData));\n }\n } finally {\n unmarkRemainingMarkedKeys(markers);\n }\n if (statisticsEnabled) {\n statistics.increaseCacheHits(entries.size());\n statistics.addGetTimeNanos(System.nanoTime() - start);\n }\n return result;\n}\n"
"public TmfStringLocation clone() {\n TmfStringLocation clone = null;\n clone = (TmfStringLocation) super.clone();\n return clone;\n}\n"
"public static int invuln(Player player, String[] args) {\n if (!player.canUseCommand(\"String_Node_Str\"))\n return EXIT_FAIL;\n if (!vMinecraftSettings.getInstance().cmdEzModo())\n return EXIT_FAIL;\n if (vMinecraftSettings.getInstance().isEzModo(player.getName())) {\n player.sendMessage(Colors.Red + \"String_Node_Str\");\n vMinecraftSettings.getInstance().removeEzModo(player.getName());\n } else {\n player.sendMessage(Colors.LightBlue + \"String_Node_Str\");\n player.sendMessage(Colors.Rose + \"String_Node_Str\");\n player.sendMessage(Colors.LightBlue + \"String_Node_Str\" + \"String_Node_Str\");\n player.sendMessage(Colors.Red + \"String_Node_Str\");\n vMinecraftSettings.getInstance().addEzModo(player.getName());\n }\n return EXIT_SUCCESS;\n}\n"
"public Object create(final String name) throws TypeException {\n TypeFactory factory = getTypeFactory(name);\n if (null == factory && null != m_parent) {\n factory = m_parent.getTypeFactory(name);\n }\n if (null == factory)\n return null;\n else {\n final Object object = factory.create(name);\n if (!m_type.isInstance(object)) {\n throw new TypeException(\"String_Node_Str\" + name + \"String_Node_Str\" + \"String_Node_Str\" + m_type.getName() + \"String_Node_Str\");\n }\n return object;\n }\n}\n"
"public Object[] getElements(Object inputElement) {\n ArrayList<XSDElementDeclaration> values = (ArrayList<XSDElementDeclaration>) inputElement;\n return values.toArray(new XSDElementDeclaration[values.size()]);\n}\n"
"private void logIn(NetworkClient client, String playerId, String playerName) throws IllegalStateException, InterruptedException {\n int currentNumberOfPlayers = db.getNumberOfPlayers();\n client.logIn(playerId, playerName, null);\n Thread.sleep(40L);\n assertEquals(EPlayerState.LOGGED_IN, client.getState());\n assertEquals(currentNumberOfPlayers + 1, db.getNumberOfPlayers());\n Player p = db.getPlayer(playerId);\n assertEquals(playerId, p.getId());\n assertEquals(playerName, p.getPlayerInfo().getName());\n}\n"
"public Object visitLabeledStmtNode(LabeledStmtNode node, LinkedList args) {\n NameContext ctx = (NameContext) args.get(0);\n Environ env = (Environ) node.getDefinedProperty(ENVIRON_KEY);\n NameNode label = node.getName();\n String labelString = label.getIdent();\n Decl other = ctx.environ.lookup(labelString, CG_STMTLABEL);\n if (other != null) {\n ApplicationUtility.error(\"String_Node_Str\" + labelString);\n }\n StmtLblDecl d = new StmtLblDecl(labelString, node);\n label.setProperty(DECL_KEY, d);\n newEnv.add(d);\n NameContext subCtx = new NameContext(ctx);\n subCtx.environ = env;\n LinkedList childArgs = TNLManip.cons(subCtx);\n node.setStmt((StatementNode) node.getStmt().accept(this, childArgs));\n return node;\n}\n"
"public void setUp() {\n ArchiveUtil.deleteAllFiles(new File(ARCHIVE_NAME));\n ArchiveUtil.deleteAllFiles(new File(TEMP_FOLDER_NAME));\n}\n"
"public void testPutTwoSignaturesOnce() {\n assertThat(invocationsCollector.getNotUploadedInvocations(jvmUuid1), hasSize(0));\n assertThat(invocationsCollector.getNotUploadedInvocations(jvmUuid2), hasSize(0));\n invocationsCollector.put(jvmUuid1, now - 100L, \"String_Node_Str\", now, EXACT_MATCH);\n invocationsCollector.put(jvmUuid1, now - 100L, \"String_Node_Str\", now, EXACT_MATCH);\n assertThat(invocationsCollector.getNotUploadedInvocations(jvmUuid1), hasSize(2));\n assertThat(invocationsCollector.getNotUploadedInvocations(jvmUuid2), hasSize(0));\n}\n"
"public static int pay(Player player, Payment payment) {\n PlayerInventory inv = player.getInventory();\n int currencyID = payment.getItem().getTypeId();\n int current = payment.getPrice();\n int count = 0;\n outer: for (ItemStack i : inv.getContents()) {\n if (i != null && i.getTypeId() == currencyID) {\n int amount = i.getAmount();\n int toChange = 0;\n current -= amount;\n if (current < 0) {\n toChange -= current;\n }\n if (toChange == 0)\n i = null;\n else {\n i.setAmount(toChange);\n }\n inv.setItem(count, i);\n }\n count += 1;\n }\n return payment.getPrice();\n}\n"
"private void link(Plugin plugin, ManagedPlugin managedPlugin, Map<String, PluginComponentDescriptor> componentDescriptors) {\n for (IPluginLoadingCallback callback : SpringUtils.getBeansOfType(alienContext, IPluginLoadingCallback.class)) {\n callback.onPluginLoaded(managedPlugin);\n }\n for (PluginLinker linker : linkers) {\n Map<String, ?> instancesToLink = managedPlugin.getPluginContext().getBeansOfType(linker.linkedType);\n for (Entry<String, ?> instanceToLink : instancesToLink.entrySet()) {\n linker.linker.link(plugin.getId(), instanceToLink.getKey(), instanceToLink.getValue());\n PluginComponentDescriptor componentDescriptor = componentDescriptors.get(instanceToLink.getKey());\n if (componentDescriptor == null) {\n componentDescriptor = new PluginComponentDescriptor();\n componentDescriptor.setBeanName(instanceToLink.getKey());\n componentDescriptor.setName(instanceToLink.getKey());\n }\n componentDescriptor.setType(linker.linkedType.getSimpleName());\n }\n }\n for (PluginComponentDescriptor componentDescriptor : componentDescriptors.values()) {\n if (componentDescriptor.getType() == null) {\n componentDescriptor.setType(UNKNOWN_PLUGIN_COMPONENT_TYPE);\n }\n }\n}\n"
"public void setLabel(org.eclipse.birt.chart.model.component.Label lbl, String sUnits) {\n this.lblCurrent = lbl;\n this.sUnits = sUnits;\n this.fBackground = lblCurrent.getBackground();\n this.laCurrent = lblCurrent.getOutline();\n if (attributesContext.isVisibilityEnabled) {\n btnVisible.setSelectionState(lblCurrent.isSetVisible() ? (lblCurrent.isVisible() ? TristateCheckbox.STATE_SELECTED : TristateCheckbox.STATE_UNSELECTED) : TristateCheckbox.STATE_GRAYED);\n setVisibleState(ChartUIExtensionUtil.canEnableUI(btnVisible) && btnVisible.isEnabled());\n }\n if (attributesContext.isLabelEnabled) {\n this.txtLabel.setText(getLabelText(lbl));\n }\n if (attributesContext.isInsetsEnabled) {\n this.insets = lblCurrent.getInsets();\n this.icInsets.setInsets(insets, this.sUnits);\n }\n if (attributesContext.isShadowEnabled) {\n this.cdShadow = lblCurrent.getShadowColor();\n this.fccShadow.setFill(cdShadow);\n }\n if (attributesContext.isFontEnabled) {\n this.fdCurrent = lblCurrent.getCaption().getFont();\n this.cdFont = lblCurrent.getCaption().getColor();\n this.fdcFont.setFontDefinition(fdCurrent);\n this.fdcFont.setFontColor(cdFont);\n }\n this.fccBackground.setFill(fBackground);\n this.liacOutline.setLineAttributes(laCurrent);\n redraw();\n}\n"
"public void receive(int target, Iterator<Object> it) {\n Map<String, Integer> localwordCounts = new HashMap<>();\n while (it.hasNext()) {\n Object next = it.next();\n if (next instanceof List) {\n for (Object o : (List) next) {\n int count = 0;\n String value = o.toString();\n if (wordCounts.containsKey(value)) {\n count = wordCounts.get(value);\n }\n count++;\n totalCount++;\n wordCounts.put(value, count);\n }\n }\n }\n LOG.info(String.format(\"String_Node_Str\", executor, wordCounts));\n}\n"
"public static void main(final String[] args) {\n final Summoner summoner = Summoner.withAccountId(36321079).withRegion(Region.NORTH_AMERICA).get();\n final MatchHistory matchHistory = MatchHistory.forSummoner(summoner).get();\n final Map<Integer, String> championIdToNameMapping = new HashMap<>();\n for (final Champion champion : Champions.withRegion(Region.NORTH_AMERICA).get()) {\n championIdToNameMapping.put(champion.getId(), champion.getName());\n }\n final Map<String, Integer> playedChampions = new HashMap<>();\n for (final Match match : matchHistory) {\n final Integer championId = match.getParticipants().find(summoner).getChampion().getId();\n final String championName = championIdToNameMapping.get(championId);\n Integer count = playedChampions.get(championName);\n if (count == null) {\n count = 0;\n playedChampions.put(championName, count);\n }\n playedChampions.put(championName, playedChampions.get(championName) + 1);\n }\n System.out.println(\"String_Node_Str\" + matchHistory.size());\n List<Entry<String, Integer>> entries = new ArrayList<>(playedChampions.entrySet());\n entries.sort((Entry<String, Integer> e0, Entry<String, Integer> e1) -> Integer.compare(e1.getValue(), e0.getValue()));\n for (int i = 0; i < 10 && i < entries.size(); i++) {\n String championName = entries.get(i).getKey();\n int count = entries.get(i).getValue();\n System.out.println(championName + \"String_Node_Str\" + count);\n }\n System.out.println(\"String_Node_Str\");\n final Match match = matchHistory.get(0);\n System.out.println(\"String_Node_Str\" + match.getId());\n final Participant participant = match.getParticipants().find(summoner);\n System.out.println(\"String_Node_Str\");\n System.out.println(participant.getSummoner().getName() + \"String_Node_Str\" + participant.getChampion().getName());\n System.out.println(\"String_Node_Str\");\n for (final Participant p : match.getParticipants()) {\n System.out.println(p.getSummoner().getName() + \"String_Node_Str\" + p.getChampion().getName());\n }\n System.out.println(\"String_Node_Str\");\n for (final Participant p : match.getParticipants()) {\n System.out.println(p.getSummoner().getName() + \"String_Node_Str\" + p.getChampion().getName());\n }\n System.out.println(\"String_Node_Str\" + match.getBlueTeam().isWinner());\n System.out.println(\"String_Node_Str\" + match.getRedTeam().isWinner());\n System.out.println(\"String_Node_Str\");\n for (final Participant p : match.getBlueTeam().getParticipants()) {\n System.out.println(p.getSummoner().getName());\n }\n}\n"
"public boolean buildForLaunch(ILaunchConfiguration config, String mode, IProgressMonitor monitor) throws CoreException {\n int STEP = 100;\n try {\n monitor.beginTask(\"String_Node_Str\", 30);\n monitor.subTask(\"String_Node_Str\");\n IProject project = ResourceHelper.getProject(specName);\n if (project == null) {\n throw new CoreException(new Status(IStatus.ERROR, TLCActivator.PLUGIN_ID, \"String_Node_Str\" + specName));\n }\n IFile specRootFile = ResourceHelper.getLinkedFile(project, specRootFilename, false);\n if (specRootFile == null) {\n throw new CoreException(new Status(IStatus.ERROR, TLCActivator.PLUGIN_ID, \"String_Node_Str\" + specRootFilename));\n }\n IFolder modelFolder = project.getFolder(modelName);\n IPath targetFolderPath = modelFolder.getProjectRelativePath().addTrailingSeparator();\n IFile tlaFile = project.getFile(targetFolderPath.append(ModelHelper.FILE_TLA));\n IFile cfgFile = project.getFile(targetFolderPath.append(ModelHelper.FILE_CFG));\n IFile outFile = project.getFile(targetFolderPath.append(ModelHelper.FILE_OUT));\n TLCActivator.logDebug(\"String_Node_Str\" + targetFolderPath.toOSString());\n final IFile[] files = new IFile[] { tlaFile, cfgFile, outFile };\n if (modelFolder.exists()) {\n final IResource[] members = modelFolder.members();\n if (members.length == 0) {\n monitor.worked(STEP);\n } else {\n final boolean recover = config.getAttribute(LAUNCH_RECOVER, LAUNCH_RECOVER_DEFAULT);\n final IResource[] checkpoints = ModelHelper.getCheckpoints(config, true);\n ISchedulingRule deleteRule = ResourceHelper.getDeleteRule(members);\n ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {\n public void run(IProgressMonitor monitor) throws CoreException {\n boolean checkFiles = recover;\n monitor.beginTask(\"String_Node_Str\", members.length);\n for (int i = 0; i < members.length; i++) {\n if (checkFiles) {\n if (checkpoints.length > 0 && checkpoints[0].equals(members[i])) {\n checkFiles = false;\n continue;\n }\n } else {\n try {\n members[i].delete(IResource.FORCE, new SubProgressMonitor(monitor, 1));\n } catch (CoreException e) {\n TLCActivator.logError(\"String_Node_Str\" + members[i].getLocation(), e);\n }\n }\n }\n monitor.done();\n }\n }, deleteRule, IWorkspace.AVOID_UPDATE, new SubProgressMonitor(monitor, STEP));\n }\n } else {\n modelFolder.create(IResource.DERIVED | IResource.FORCE, true, new SubProgressMonitor(monitor, STEP));\n }\n monitor.subTask(\"String_Node_Str\");\n specRootFile.copy(targetFolderPath.append(specRootFile.getProjectRelativePath()), IResource.DERIVED | IResource.FORCE, new SubProgressMonitor(monitor, 1));\n IResource specRootFileCopy = modelFolder.findMember(specRootFile.getProjectRelativePath());\n if (specRootFileCopy == null) {\n throw new CoreException(new Status(IStatus.ERROR, TLCActivator.PLUGIN_ID, \"String_Node_Str\" + specRootFilename + \"String_Node_Str\" + targetFolderPath.toOSString()));\n }\n List extendedModules = ToolboxHandle.getExtendedModules(specRootFile.getName());\n IFile moduleFile = null;\n for (int i = 0; i < extendedModules.size(); i++) {\n String module = (String) extendedModules.get(i);\n if (ToolboxHandle.isUserModule(module)) {\n moduleFile = ResourceHelper.getLinkedFile(project, module, false);\n if (moduleFile != null) {\n moduleFile.copy(targetFolderPath.append(moduleFile.getProjectRelativePath()), IResource.DERIVED | IResource.FORCE, new SubProgressMonitor(monitor, STEP / extendedModules.size()));\n }\n }\n }\n ISchedulingRule fileRule = MultiRule.combine(ResourceHelper.getModifyRule(files), ResourceHelper.getCreateRule(files));\n ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {\n public void run(IProgressMonitor monitor) throws CoreException {\n for (int i = 0; i < files.length; i++) {\n if (files[i].exists()) {\n files[i].setContents(new ByteArrayInputStream(\"String_Node_Str\".getBytes()), IResource.DERIVED | IResource.FORCE, new SubProgressMonitor(monitor, 1));\n } else {\n files[i].create(new ByteArrayInputStream(\"String_Node_Str\".getBytes()), IResource.DERIVED | IResource.FORCE, new SubProgressMonitor(monitor, 1));\n }\n }\n }\n }, fileRule, IWorkspace.AVOID_UPDATE, new SubProgressMonitor(monitor, STEP));\n monitor.worked(STEP);\n monitor.subTask(\"String_Node_Str\");\n ModelWriter writer = new ModelWriter();\n writer.addPrimer(ModelHelper.MC_MODEL_NAME, ResourceHelper.getModuleName(specRootFilename));\n List constants = ModelHelper.deserializeAssignmentList(config.getAttribute(MODEL_PARAMETER_CONSTANTS, new Vector()));\n TypedSet modelValues = TypedSet.parseSet(config.getAttribute(MODEL_PARAMETER_MODEL_VALUES, EMPTY_STRING));\n writer.addConstants(constants, modelValues, MODEL_PARAMETER_CONSTANTS, MODEL_PARAMETER_MODEL_VALUES);\n writer.addNewDefinitions(config.getAttribute(MODEL_PARAMETER_NEW_DEFINITIONS, EMPTY_STRING), MODEL_PARAMETER_NEW_DEFINITIONS);\n List overrides = ModelHelper.deserializeAssignmentList(config.getAttribute(MODEL_PARAMETER_DEFINITIONS, new Vector()));\n writer.addFormulaList(ModelWriter.createOverridesContent(overrides, ModelWriter.DEFOV_SCHEME), \"String_Node_Str\", MODEL_PARAMETER_DEFINITIONS);\n writer.addFormulaList(ModelWriter.createSourceContent(MODEL_PARAMETER_CONSTRAINT, ModelWriter.CONSTRAINT_SCHEME, config), \"String_Node_Str\", MODEL_PARAMETER_CONSTRAINT);\n writer.addFormulaList(ModelWriter.createSourceContent(MODEL_PARAMETER_ACTION_CONSTRAINT, ModelWriter.ACTIONCONSTRAINT_SCHEME, config), \"String_Node_Str\", MODEL_PARAMETER_ACTION_CONSTRAINT);\n int specType = config.getAttribute(MODEL_BEHAVIOR_SPEC_TYPE, MODEL_BEHAVIOR_TYPE_DEFAULT);\n switch(specType) {\n case MODEL_BEHAVIOR_TYPE_NO_SPEC:\n break;\n case MODEL_BEHAVIOR_TYPE_SPEC_CLOSED:\n writer.addFormulaList(ModelWriter.createSourceContent(MODEL_BEHAVIOR_CLOSED_SPECIFICATION, ModelWriter.SPEC_SCHEME, config), \"String_Node_Str\", MODEL_BEHAVIOR_CLOSED_SPECIFICATION);\n break;\n case MODEL_BEHAVIOR_TYPE_SPEC_INIT_NEXT:\n writer.addFormulaList(ModelWriter.createSourceContent(MODEL_BEHAVIOR_SEPARATE_SPECIFICATION_INIT, ModelWriter.INIT_SCHEME, config), \"String_Node_Str\", MODEL_BEHAVIOR_SEPARATE_SPECIFICATION_INIT);\n writer.addFormulaList(ModelWriter.createSourceContent(MODEL_BEHAVIOR_SEPARATE_SPECIFICATION_NEXT, ModelWriter.NEXT_SCHEME, config), \"String_Node_Str\", MODEL_BEHAVIOR_SEPARATE_SPECIFICATION_NEXT);\n break;\n }\n writer.addFormulaList(ModelWriter.createFormulaListContent(config.getAttribute(MODEL_CORRECTNESS_INVARIANTS, new Vector()), ModelWriter.INVARIANT_SCHEME), \"String_Node_Str\", MODEL_CORRECTNESS_INVARIANTS);\n writer.addFormulaList(ModelWriter.createFormulaListContent(config.getAttribute(MODEL_CORRECTNESS_PROPERTIES, new Vector()), ModelWriter.PROP_SCHEME), \"String_Node_Str\", MODEL_CORRECTNESS_PROPERTIES);\n monitor.worked(STEP);\n monitor.subTask(\"String_Node_Str\");\n writer.writeFiles(tlaFile, cfgFile, monitor);\n modelFolder.refreshLocal(IResource.DEPTH_ONE, new SubProgressMonitor(monitor, STEP));\n } finally {\n monitor.done();\n }\n return false;\n}\n"
"public static Repository getRepository(String repoURL) {\n String[] parts = parseRepositoryURL(repoURL);\n return getRepository(parts[0], parts[1], username, password, configFile);\n}\n"
"public ZonedDateTime getTodayDateTime() {\n ZonedDateTime todayDateTime = ZonedDateTime.now();\n String applicationMode = AppSettings.get().get(\"String_Node_Str\", \"String_Node_Str\");\n if (\"String_Node_Str\".equals(applicationMode)) {\n User user = AuthUtils.getUser();\n if (user != null && user.getToday() != null) {\n todayDateTime = user.getToday();\n } else {\n AppBase appBase = getAppBase();\n if (appBase != null && appBase.getToday() != null) {\n return appBase.getToday();\n }\n }\n }\n return todayDateTime;\n}\n"
"private Cell parseOutputStructure(Cell origCell, String outFile) {\n if (!(new File(outFile)).exists() || Utility.readStringFromFile(outFile).isEmpty()) {\n if (GAParameters.getParams().getVerbosity() >= 4)\n System.out.println(\"String_Node_Str\");\n return null;\n }\n String output = Utility.readStringFromFile(outFile);\n List<Vect> basis = new LinkedList<Vect>();\n List<Site> sites = new LinkedList<Site>();\n String[] lines = output.split(\"String_Node_Str\");\n int numAtoms = Integer.parseInt(lines[3]);\n String[] xs = lines[5].split(\"String_Node_Str\");\n double xlo_bound = Double.parseDouble(xs[0]);\n double xhi_bound = Double.parseDouble(xs[1]);\n double xy = Double.parseDouble(xs[2]);\n String[] ys = lines[6].split(\"String_Node_Str\");\n double ylo_bound = Double.parseDouble(ys[0]);\n double yhi_bound = Double.parseDouble(ys[1]);\n double xz = Double.parseDouble(ys[2]);\n String[] zs = lines[7].split(\"String_Node_Str\");\n double zlo_bound = Double.parseDouble(zs[0]);\n double zhi_bound = Double.parseDouble(zs[1]);\n double yz = Double.parseDouble(zs[2]);\n double xlo = xlo_bound - Math.min(Math.min(0.0, xy), Math.min(xz, xy + xz));\n double xhi = xhi_bound - Math.max(Math.max(0.0, xy), Math.max(xz, xy + xz));\n double ylo = ylo_bound - Math.min(0.0, yz);\n double yhi = yhi_bound - Math.max(0.0, yz);\n double zlo = zlo_bound;\n double zhi = zhi_bound;\n basis.add(new Vect(xhi - xlo, 0.0, 0.0));\n basis.add(new Vect(xy, yhi - ylo, 0.0));\n basis.add(new Vect(xz, yz, zhi - zlo));\n for (int i = 0; i < numAtoms; i++) {\n String[] as = lines[9 + i].split(\"String_Node_Str\");\n int type = Integer.parseInt(as[1]) - 1;\n double x = Double.parseDouble(as[2]);\n double y = Double.parseDouble(as[3]);\n double z = Double.parseDouble(as[4]);\n sites.add(new Site(origCell.getComposition().getElements().get(type), new Vect(x - xlo, y - ylo, z - zlo)));\n }\n if (origCell.getBasisSize() != numAtoms) {\n System.out.println(\"String_Node_Str\");\n System.out.println(outFile);\n }\n return new Cell(basis, sites, origCell.getLabel());\n}\n"
"public int getDirection(GameFacade gf) {\n if (gf.getMazeIndex() != currentMaze) {\n currentMaze = gf.getMazeIndex();\n nn = networkForMaze.get(currentMaze);\n if (CommonConstants.monitorSubstrates) {\n ((MsPacManTask) MMNEAT.task).substratesForMaze.get(currentMaze);\n }\n }\n double[] inputs = inputMediator.getInputs(gf, gf.getPacmanLastMoveMade());\n double[] outputs = nn.process(inputs);\n if (pacManFullScreenOutput) {\n int chosenNode = -1;\n double nodePreference = Double.NEGATIVE_INFINITY;\n for (int i = 0; i < gf.lengthMaze(); i++) {\n int x = gf.getNodeXCoord(i);\n int y = gf.getNodeYCoord(i);\n int j = getOutputIndexFromNodeCoord(x, y);\n if (outputs[j] > nodePreference) {\n nodePreference = outputs[j];\n chosenNode = i;\n }\n }\n return gf.getNextPacManDirTowardsTarget(chosenNode);\n } else {\n double[] realOutputs = new double[4];\n realOutputs[GameFacade.moveToIndex(MOVE.UP)] = outputs[UP];\n realOutputs[GameFacade.moveToIndex(MOVE.LEFT)] = outputs[LEFT];\n realOutputs[GameFacade.moveToIndex(MOVE.RIGHT)] = outputs[RIGHT];\n realOutputs[GameFacade.moveToIndex(MOVE.DOWN)] = outputs[DOWN];\n return StatisticsUtilities.argmax(realOutputs);\n }\n}\n"
"public boolean isTileColourAllowed(String tileColour) {\n return tileColours != null && tileColours.containsKey(tileColour) && tileColours.get(tileColour) > 0;\n}\n"
"public ProjectLocale getProjectLocale() {\n return (ProjectLocale) eDynamicGet(PropertiesPackage.PROPERTY_FILE_DESCRIPTOR__PROJECT_LOCALE, PropertiesPackage.Literals.PROPERTY_FILE_DESCRIPTOR__PROJECT_LOCALE, true, true);\n}\n"
"private ArrayList<KeyPredicate> parseKey(final String keyPredicate, final EdmEntityType entityType) throws UriParserException, EdmException {\n ArrayList<KeyPredicate> keyPredicates = new ArrayList<KeyPredicate>();\n for (final String key : keyPredicate.split(\"String_Node_Str\", -1)) {\n final Matcher matcher = NAMED_VALUE_PATTERN.matcher(key);\n if (!matcher.matches())\n throw new UriParserException(\"String_Node_Str\" + key);\n String name = matcher.group(1);\n final String value = matcher.group(2);\n UriParser.LOG.debug(\"String_Node_Str\" + keyPredicate + \"String_Node_Str\" + name + \"String_Node_Str\" + value);\n if (name == null)\n if (singleKey)\n name = keyProperties.get(0).getName();\n else\n throw new UriParserException(\"String_Node_Str\" + keyPredicate);\n EdmProperty keyProperty = null;\n for (EdmProperty testKeyProperty : keyProperties) if (testKeyProperty.getName().equals(name)) {\n keyProperty = testKeyProperty;\n break;\n }\n if (keyProperty == null)\n throw new UriParserException(\"String_Node_Str\" + keyPredicate);\n keyProperties.remove(keyProperty);\n final UriLiteral uriLiteral = parseUriLiteral(value);\n if (!isCompatible(uriLiteral, (EdmSimpleType) keyProperty.getType()))\n throw new UriParserException(\"String_Node_Str\" + value + \"String_Node_Str\" + keyProperty.getName());\n keyPredicates.add(new KeyPredicate(uriLiteral.getLiteral(), keyProperty));\n }\n if (!keyProperties.isEmpty())\n throw new UriParserException(\"String_Node_Str\" + keyPredicate);\n return keyPredicates;\n}\n"
"public TileEntity placeTrack() {\n PosRot pos = getPos();\n if (builder.info.railBedFill && BlockUtil.canBeReplaced(builder.world, pos.down(), false) && builder.info.railBed.getItem() != Items.AIR) {\n builder.world.setBlockState(pos.down(), BlockUtil.itemToBlockState(builder.info.railBed));\n }\n NBTTagCompound replaced = null;\n IBlockState state = builder.world.getBlockState(pos);\n Block removed = state.getBlock();\n TileRailBase te = null;\n if (removed != null) {\n if (removed instanceof BlockRailBase) {\n te = (TileRailBase) builder.world.getTileEntity(pos);\n replaced = te.serializeNBT();\n } else {\n removed.dropBlockAsItem(builder.world, pos, state, 0);\n }\n }\n if (te != null) {\n te.setWillBeReplaced(true);\n }\n builder.world.setBlockState(pos, getBlockState(), 3);\n if (te != null) {\n te.setWillBeReplaced(false);\n }\n TileRailBase tr = (TileRailBase) builder.world.getTileEntity(pos);\n tr.setReplaced(replaced);\n if (parent != null) {\n tr.setParent(parent);\n } else {\n tr.setParent(builder.getParentPos());\n }\n tr.setHeight(getHeight());\n return tr;\n}\n"
"private void init(ProcessType process) {\n allRoutineItems.clear();\n ProjectManager projectManager = ProjectManager.getInstance();\n Project currentProject = projectManager.getCurrentProject();\n initModels(currentProject);\n Set<Project> referenceProjects = new HashSet<Project>();\n this.getAllReferenceProjects(currentProject, referenceProjects);\n initRefProjects(referenceProjects);\n List<RoutinesParameterType> routinesDependencies = process.getParameters().getRoutinesParameter();\n for (RoutinesParameterType type : routinesDependencies) {\n RoutineItemRecord record = new RoutineItemRecord();\n record.setName(type.getName());\n Property property = findObject(type.getId(), type.getName());\n if (property != null) {\n record.setId(property.getId());\n record.setLabel(property.getLabel());\n } else {\n record.setHasProblem(true);\n record.setLabel(type.getName());\n }\n if (!record.hasProblem()) {\n if (((RoutineItem) property.getItem()).isBuiltIn()) {\n systemRoutines.add(record);\n } else {\n userRoutines.add(record);\n }\n }\n }\n}\n"
"protected void onTaskCompleted(boolean result) {\n if (result) {\n if (mAppLib.size() > 0) {\n mCurrentSelection = 0;\n }\n for (int i = 0; i < mImageViewIds.length; ++i) {\n ImageView iv = (ImageView) findViewById(mImageViewIds[i]);\n if (i < mAppLib.size()) {\n mCodeIndexMap.put(mAppLib.get(i).mAppCode, i);\n iv.setVisibility(View.VISIBLE);\n iv.setImageResource(R.drawable.appicon_default);\n iv.setFocusable(true);\n iv.setOnFocusChangeListener(this);\n iv.setTag(new Integer(i));\n iv.setPadding(8, 8, 8, 8);\n if (i == mCurrentSelection) {\n iv.requestFocus();\n updateInstallButtonGuard();\n }\n executeImageTask(mAppLib.get(i).mAppImageUrl, mAppLib.get(i).mAppCode);\n } else {\n iv.setVisibility(View.INVISIBLE);\n }\n }\n }\n}\n"
"public int[] resolve(int specifiedWidth, int maxWidth) {\n assert (specifiedWidth <= maxWidth);\n int columnNumber = table.getColumnCount();\n int[] columns = new int[columnNumber];\n int columnWithWidth = 0;\n int colSum = 0;\n for (int j = 0; j < table.getColumnCount(); j++) {\n IColumn column = (IColumn) table.getColumn(j);\n int columnWidth = getDimensionValue(column.getWidth(), tableWidth);\n if (columnWidth > 0) {\n columns[j] = columnWidth;\n colSum += columnWidth;\n columnWithWidth++;\n } else {\n columns[j] = -1;\n }\n }\n if (columnWithWidth == columnNumber) {\n if (colSum <= maxWidth) {\n return columns;\n } else {\n float delta = colSum - maxWidth;\n for (int i = 0; i < columnNumber; i++) {\n columns[i] -= delta;\n }\n return columns;\n }\n } else {\n if (specifiedWidth == 0) {\n if (colSum < maxWidth) {\n int colNumber = columnNumber - columnWithWidth;\n int aw = (maxWidth - colSum) / colNumber;\n distributeWidth(columns, colNumber, aw);\n } else {\n distributeWidth(columns, columnNumber, maxWidth / columnNumber);\n }\n } else {\n if (colSum < specifiedWidth) {\n int colNumber = columnNumber - columnWithWidth;\n int aw = (specifiedWidth - colSum) / colNumber;\n distributeWidth(columns, colNumber, aw);\n } else {\n if (colSum < maxWidth) {\n int colNumber = columnNumber - columnWithWidth;\n int aw = (maxWidth - colSum) / colNumber;\n distributeWidth(columns, colNumber, aw);\n } else {\n distributeWidth(columns, columnNumber, specifiedWidth / columnNumber);\n }\n }\n }\n }\n return columns;\n}\n"
"public static void main(String[] args) throws Exception {\n if (args.length != 1) {\n System.out.println();\n System.out.println(\"String_Node_Str\");\n System.out.println();\n System.out.println(\"String_Node_Str\");\n return;\n }\n List<MozillaEntry> issues = loadIssues(args[0]);\n EventList<MozillaEntry> issuesEventList = new BasicEventList<MozillaEntry>();\n final String[] empty = {};\n UniqueList<MozillaEntry> uniqueByEmail = new UniqueList<MozillaEntry>(issuesEventList, GlazedLists.beanPropertyComparator(MozillaEntry.class, \"String_Node_Str\", empty));\n UniqueList<MozillaEntry> uniqueBySeverity = new UniqueList<MozillaEntry>(issuesEventList, GlazedLists.beanPropertyComparator(MozillaEntry.class, \"String_Node_Str\", empty));\n UniqueList<MozillaEntry> uniqueByPriority = new UniqueList<MozillaEntry>(issuesEventList, GlazedLists.beanPropertyComparator(MozillaEntry.class, \"String_Node_Str\", empty));\n UniqueList<MozillaEntry> uniqueByOs = new UniqueList<MozillaEntry>(issuesEventList, GlazedLists.beanPropertyComparator(MozillaEntry.class, \"String_Node_Str\", empty));\n UniqueList<MozillaEntry> uniqueByResult = new UniqueList<MozillaEntry>(issuesEventList, GlazedLists.beanPropertyComparator(MozillaEntry.class, \"String_Node_Str\", empty));\n UniqueList<MozillaEntry> uniqueByStatus = new UniqueList<MozillaEntry>(issuesEventList, GlazedLists.beanPropertyComparator(MozillaEntry.class, \"String_Node_Str\", empty));\n System.out.print(\"String_Node_Str\");\n long setUpStart = System.currentTimeMillis();\n issuesEventList.addAll(issues);\n long setUpEnd = System.currentTimeMillis();\n long setUpTime = setUpEnd - setUpStart;\n System.out.println(\"String_Node_Str\" + setUpTime + \"String_Node_Str\");\n System.out.print(\"String_Node_Str\");\n long tearDownStart = System.currentTimeMillis();\n while (!issuesEventList.isEmpty()) {\n int randomIndex = dice.nextInt(issuesEventList.size());\n issuesEventList.remove(randomIndex);\n }\n issuesEventList.addAll(issues);\n long tearDownEnd = System.currentTimeMillis();\n long tearDownTime = tearDownEnd - tearDownStart;\n System.out.println(\"String_Node_Str\" + tearDownTime + \"String_Node_Str\");\n}\n"
"public void execute(Tuple input) {\n StatsComponentType componentId = StatsComponentType.valueOf(input.getSourceComponent());\n InfoMessage message = (InfoMessage) input.getValueByField(MESSAGE_FIELD);\n if (!Destination.WFM_STATS.equals(message.getDestination())) {\n collector.ack(input);\n return;\n }\n LOGGER.debug(\"String_Node_Str\", CORRELATION_ID, message.getCorrelationId(), componentId, StatsStreamType.valueOf(input.getSourceStreamId()));\n PortStatsData data = (PortStatsData) message.getData();\n long timestamp = message.getTimestamp();\n try {\n String switchId = switchNameCache.get(data.getSwitchId());\n if (switchId == null) {\n switchId = \"String_Node_Str\" + data.getSwitchId().replaceAll(\"String_Node_Str\", \"String_Node_Str\").toUpperCase();\n switchNameCache.put(data.getSwitchId(), switchId);\n }\n for (PortStatsReply reply : data.getStats()) {\n for (PortStatsEntry entry : reply.getEntries()) {\n emit(entry, timestamp, switchId);\n }\n }\n } finally {\n collector.ack(input);\n }\n}\n"
"protected IQuery createOdiQuery() throws DataException {\n setCurrentDataSet(dataSetDesign);\n populatePreparedQuery();\n initializeResultClass(dataEngine, appContext);\n return new JointDataSetQuery(resultClass);\n}\n"
"public void shouldFetch_withVariantItemAttributeQueryOnIndex() throws Exception {\n final AttributeQuery query = mock(AttributeQuery.class);\n final Condition mockCondition = mock(Condition.class);\n when(mockCondition.getComparisonOperator()).thenReturn(Operators.EQUALS);\n final String itemId = randomId();\n final String stringProperty = randomString(10);\n final Set<String> stringPropertyValues = new HashSet<>(Arrays.asList(stringProperty));\n when(mockCondition.getValues()).thenReturn(stringPropertyValues);\n when(mockCondition.containsRequiredComparisonValues()).thenReturn(true);\n when(query.getAttributeName()).thenReturn(\"String_Node_Str\");\n when(query.getCondition()).thenReturn(mockCondition);\n final ParentItemConfiguration parentItemConfiguration = new ParentItemConfiguration(StubItem.class, tableName);\n final VariantItemConfiguration variantItemConfiguration = new VariantItemConfiguration(parentItemConfiguration, StubVariantItem.class, \"String_Node_Str\");\n variantItemConfiguration.registerIndexes(Arrays.asList(new IndexDefinition(\"String_Node_Str\")));\n final Collection<ItemConfiguration> itemConfigurations = Arrays.asList(parentItemConfiguration, variantItemConfiguration);\n when(mockDatabaseSchemaHolder.itemConfigurations()).thenReturn(itemConfigurations);\n final DynamoDbTemplate dynamoDbTemplate = new DynamoDbTemplate(mockDatabaseSchemaHolder);\n final QueryResult mockQueryResult = mock(QueryResult.class);\n final Map<String, AttributeValue> mockItem = new HashMap<>();\n mockItem.put(\"String_Node_Str\", new AttributeValue(itemId));\n mockItem.put(\"String_Node_Str\", new AttributeValue(stringProperty));\n mockItem.put(\"String_Node_Str\", new AttributeValue(\"String_Node_Str\"));\n final List<Map<String, AttributeValue>> mockItems = Arrays.asList(mockItem);\n when(mockQueryResult.getItems()).thenReturn(mockItems);\n when(mockQueryResult.getLastEvaluatedKey()).thenReturn(null);\n when(mockAmazonDynamoDbClient.query(any(QueryRequest.class))).thenReturn(mockQueryResult);\n dynamoDbTemplate.initialize(mockAmazonDynamoDbClient);\n final Collection<StubVariantItem> returnedItems = dynamoDbTemplate.fetch(query, StubVariantItem.class);\n final ArgumentCaptor<QueryRequest> queryRequestArgumentCaptor = ArgumentCaptor.forClass(QueryRequest.class);\n verify(mockAmazonDynamoDbClient).query(queryRequestArgumentCaptor.capture());\n final QueryRequest queryRequest = queryRequestArgumentCaptor.getValue();\n assertEquals(schemaName + \"String_Node_Str\" + tableName, queryRequest.getTableName());\n assertEquals(\"String_Node_Str\", queryRequest.getIndexName());\n assertEquals(1, queryRequest.getKeyConditions().size());\n assertEquals(\"String_Node_Str\", queryRequest.getKeyConditions().get(\"String_Node_Str\").getComparisonOperator());\n assertEquals(1, queryRequest.getKeyConditions().get(\"String_Node_Str\").getAttributeValueList().size());\n assertEquals(new AttributeValue(stringProperty), queryRequest.getKeyConditions().get(\"String_Node_Str\").getAttributeValueList().get(0));\n assertNotNull(returnedItems);\n assertEquals(1, returnedItems.size());\n}\n"
"public static org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryRequestComponent tgt = new org.hl7.fhir.dstu2016may.model.Bundle.BundleEntryRequestComponent();\n copyElement(src, tgt);\n tgt.setMethod(convertHTTPVerb(src.getMethod()));\n tgt.setUrl(src.getUrl());\n tgt.setIfNoneMatch(src.getIfNoneMatch());\n tgt.setIfModifiedSince(src.getIfModifiedSince());\n tgt.setIfMatch(src.getIfMatch());\n tgt.setIfNoneExist(src.getIfNoneExist());\n return tgt;\n}\n"
"public void testQueueSpecificationGenWithWordCount() throws Exception {\n ApplicationSpecification appSpec = new WordCountApp().configure();\n ApplicationSpecificationAdapter adapter = ApplicationSpecificationAdapter.create(new ReflectionSchemaGenerator());\n ApplicationSpecification newSpec = adapter.fromJson(adapter.toJson(appSpec));\n QueueSpecificationGenerator generator = new SimpleQueueSpecificationGenerator(Id.Application.from(TEST_ACCOUNT_ID, newSpec.getName()));\n table = generator.create(newSpec.getFlows().values().iterator().next());\n Assert.assertEquals(get(FlowletConnection.Type.STREAM, \"String_Node_Str\", \"String_Node_Str\").iterator().next().getQueueName().toString(), \"String_Node_Str\");\n Assert.assertEquals(get(FlowletConnection.Type.FLOWLET, \"String_Node_Str\", \"String_Node_Str\").iterator().next().getQueueName().toString(), \"String_Node_Str\");\n Assert.assertEquals(1, get(FlowletConnection.Type.FLOWLET, \"String_Node_Str\", \"String_Node_Str\").size());\n}\n"
"public LibraryHandle getLibrary(String namespace) {\n Module library = module.getLibraryWithNamespace(namespace, IModuleNameScope.DIRECTLY_INCLUDED_LEVEL);\n if (library == null)\n return null;\n return (LibraryHandle) library.getHandle(library);\n}\n"
"public String getCoprocessorLocalJar() {\n final String coprocessorJar = getOptional(COPROCESSOR_LOCAL_JAR);\n if (StringUtils.isNotEmpty(coprocessorJar)) {\n return coprocessorJar;\n }\n return getFileName(getKylinHome() + File.separator + \"String_Node_Str\", COPROCESSOR_JAR_NAME_PATTERN);\n}\n"
"private void updateFormatField() {\n String displayFormat;\n IChoiceSet choiceSet = getFormatChoiceSet(getSelectedDataType());\n if (choiceSet == null) {\n displayFormat = DesignEngine.getMetaDataDictionary().getChoiceSet(DesignChoiceConstants.CHOICE_STRING_FORMAT_TYPE).findChoice(DesignChoiceConstants.STRING_FORMAT_TYPE_UNFORMATTED).getDisplayName();\n } else {\n displayFormat = choiceSet.findChoice(formatCategroy).getDisplayName();\n if (formatCategroy != DesignChoiceConstants.STRING_FORMAT_TYPE_CUSTOM) {\n displayFormat += \"String_Node_Str\" + formatPattern;\n }\n }\n formatField.setText(\"String_Node_Str\" + displayFormat);\n changeFormat.setEnabled(choiceSet != null);\n if (selectedParameter != null) {\n doPreview(formatPattern == null ? formatCategroy : formatPattern);\n }\n}\n"
"public void init(WorkerContext<DTMasterParams, DTWorkerParams> context) {\n Properties props = context.getProps();\n try {\n SourceType sourceType = SourceType.valueOf(props.getProperty(CommonConstants.MODELSET_SOURCE_TYPE, SourceType.HDFS.toString()));\n this.modelConfig = CommonUtils.loadModelConfig(props.getProperty(CommonConstants.SHIFU_MODEL_CONFIG), sourceType);\n this.columnConfigList = CommonUtils.loadColumnConfigList(props.getProperty(CommonConstants.SHIFU_COLUMN_CONFIG), sourceType);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n this.columnCategoryIndexMapping = new HashMap<Integer, Map<String, Integer>>();\n for (ColumnConfig config : this.columnConfigList) {\n if (config.isCategorical()) {\n if (config.getBinCategory() != null) {\n Map<String, Integer> tmpMap = new HashMap<String, Integer>();\n for (int i = 0; i < config.getBinCategory().size(); i++) {\n List<String> catVals = CommonUtils.flattenCatValGrp(config.getBinCategory().get(i));\n for (String cval : catVals) {\n tmpMap.put(cval, i);\n }\n }\n this.columnCategoryIndexMapping.put(config.getColumnNum(), tmpMap);\n }\n }\n }\n Integer kCrossValidation = this.modelConfig.getTrain().getNumKFold();\n if (kCrossValidation != null && kCrossValidation > 0) {\n isKFoldCV = true;\n }\n Double upSampleWeight = modelConfig.getTrain().getUpSampleWeight();\n if (Double.compare(upSampleWeight, 1d) != 0 && (modelConfig.isRegression() || (modelConfig.isClassification() && modelConfig.getTrain().isOneVsAll()))) {\n LOG.info(\"String_Node_Str\", upSampleWeight);\n this.upSampleRng = new PoissonDistribution(upSampleWeight - 1);\n }\n this.isContinuousEnabled = Boolean.TRUE.toString().equalsIgnoreCase(context.getProps().getProperty(CommonConstants.CONTINUOUS_TRAINING));\n this.workerThreadCount = modelConfig.getTrain().getWorkerThreadCount();\n this.threadPool = Executors.newFixedThreadPool(this.workerThreadCount);\n context.addCompletionCallBack(new WorkerCompletionCallBack<DTMasterParams, DTWorkerParams>() {\n public void callback(WorkerContext<DTMasterParams, DTWorkerParams> context) {\n DTWorker.this.threadPool.shutdownNow();\n try {\n DTWorker.this.threadPool.awaitTermination(2, TimeUnit.SECONDS);\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n }\n });\n this.trainerId = Integer.valueOf(context.getProps().getProperty(CommonConstants.SHIFU_TRAINER_ID, \"String_Node_Str\"));\n this.isOneVsAll = modelConfig.isClassification() && modelConfig.getTrain().isOneVsAll();\n GridSearch gs = new GridSearch(modelConfig.getTrain().getParams());\n Map<String, Object> validParams = this.modelConfig.getTrain().getParams();\n if (gs.hasHyperParam()) {\n validParams = gs.getParams(this.trainerId);\n LOG.info(\"String_Node_Str\", validParams);\n }\n this.treeNum = Integer.valueOf(validParams.get(\"String_Node_Str\").toString());\n double memoryFraction = Double.valueOf(context.getProps().getProperty(\"String_Node_Str\", \"String_Node_Str\"));\n LOG.info(\"String_Node_Str\", Runtime.getRuntime().maxMemory(), memoryFraction);\n double validationRate = this.modelConfig.getValidSetRate();\n if (StringUtils.isNotBlank(modelConfig.getValidationDataSetRawPath())) {\n this.trainingData = new MemoryLimitedList<Data>((long) (Runtime.getRuntime().maxMemory() * memoryFraction * 0.6), new ArrayList<Data>());\n this.validationData = new MemoryLimitedList<Data>((long) (Runtime.getRuntime().maxMemory() * memoryFraction * 0.4), new ArrayList<Data>());\n } else {\n if (Double.compare(validationRate, 0d) != 0) {\n this.trainingData = new MemoryLimitedList<Data>((long) (Runtime.getRuntime().maxMemory() * memoryFraction * (1 - validationRate)), new ArrayList<Data>());\n this.validationData = new MemoryLimitedList<Data>((long) (Runtime.getRuntime().maxMemory() * memoryFraction * validationRate), new ArrayList<Data>());\n } else {\n this.trainingData = new MemoryLimitedList<Data>((long) (Runtime.getRuntime().maxMemory() * memoryFraction), new ArrayList<Data>());\n }\n }\n int[] inputOutputIndex = DTrainUtils.getNumericAndCategoricalInputAndOutputCounts(this.columnConfigList);\n this.inputCount = inputOutputIndex[0] + inputOutputIndex[1];\n this.isAfterVarSelect = (inputOutputIndex[3] == 1);\n this.isManualValidation = (modelConfig.getValidationDataSetRawPath() != null && !\"String_Node_Str\".equals(modelConfig.getValidationDataSetRawPath()));\n int numClasses = this.modelConfig.isClassification() ? this.modelConfig.getTags().size() : 2;\n String imStr = validParams.get(\"String_Node_Str\").toString();\n int minInstancesPerNode = Integer.valueOf(validParams.get(\"String_Node_Str\").toString());\n double minInfoGain = Double.valueOf(validParams.get(\"String_Node_Str\").toString());\n if (imStr.equalsIgnoreCase(\"String_Node_Str\")) {\n impurity = new Entropy(numClasses, minInstancesPerNode, minInfoGain);\n } else if (imStr.equalsIgnoreCase(\"String_Node_Str\")) {\n impurity = new Gini(numClasses, minInstancesPerNode, minInfoGain);\n } else if (imStr.equalsIgnoreCase(\"String_Node_Str\")) {\n impurity = new FriedmanMSE(minInstancesPerNode, minInfoGain);\n } else {\n impurity = new Variance(minInstancesPerNode, minInfoGain);\n }\n this.isRF = ALGORITHM.RF.toString().equalsIgnoreCase(modelConfig.getAlgorithm());\n this.isGBDT = ALGORITHM.GBT.toString().equalsIgnoreCase(modelConfig.getAlgorithm());\n String lossStr = validParams.get(\"String_Node_Str\").toString();\n if (lossStr.equalsIgnoreCase(\"String_Node_Str\")) {\n this.loss = new LogLoss();\n } else if (lossStr.equalsIgnoreCase(\"String_Node_Str\")) {\n this.loss = new AbsoluteLoss();\n } else if (lossStr.equalsIgnoreCase(\"String_Node_Str\")) {\n this.loss = new HalfGradSquaredLoss();\n } else if (lossStr.equalsIgnoreCase(\"String_Node_Str\")) {\n this.loss = new SquaredLoss();\n } else {\n try {\n this.loss = (Loss) ClassUtils.newInstance(Class.forName(lossStr));\n } catch (ClassNotFoundException e) {\n LOG.warn(\"String_Node_Str\", lossStr);\n this.loss = new SquaredLoss();\n }\n }\n if (this.isGBDT) {\n this.learningRate = Double.valueOf(validParams.get(CommonConstants.LEARNING_RATE).toString());\n Object swrObj = validParams.get(\"String_Node_Str\");\n if (swrObj != null) {\n this.gbdtSampleWithReplacement = Boolean.TRUE.toString().equalsIgnoreCase(swrObj.toString());\n }\n Object dropoutObj = validParams.get(CommonConstants.DROPOUT_RATE);\n if (dropoutObj != null) {\n this.dropOutRate = Double.valueOf(dropoutObj.toString());\n }\n }\n this.isStratifiedSampling = this.modelConfig.getTrain().getStratifiedSample();\n this.checkpointOutput = new Path(context.getProps().getProperty(CommonConstants.SHIFU_DT_MASTER_CHECKPOINT_FOLDER, \"String_Node_Str\" + context.getAppId()));\n LOG.info(\"String_Node_Str\", isAfterVarSelect, treeNum, impurity.getClass().getName(), loss.getClass().getName(), this.learningRate, this.gbdtSampleWithReplacement, this.isRF, this.isGBDT, this.isStratifiedSampling, this.isKFoldCV, kCrossValidation, this.dropOutRate);\n if (!context.isFirstIteration()) {\n if (this.isGBDT) {\n isNeedRecoverGBDTPredict = true;\n } else {\n recoverTrees = context.getLastMasterResult().getTrees();\n }\n }\n if (context.isFirstIteration() && this.isContinuousEnabled && this.isGBDT) {\n Path modelPath = new Path(context.getProps().getProperty(CommonConstants.GUAGUA_OUTPUT));\n TreeModel existingModel = null;\n try {\n existingModel = (TreeModel) CommonUtils.loadModel(modelConfig, modelPath, ShifuFileUtils.getFileSystemBySourceType(this.modelConfig.getDataSet().getSource()));\n } catch (IOException e) {\n LOG.error(\"String_Node_Str\", e);\n }\n if (existingModel == null) {\n LOG.warn(\"String_Node_Str\");\n return;\n } else {\n recoverTrees = existingModel.getTrees();\n LOG.info(\"String_Node_Str\", recoverTrees.size());\n }\n }\n}\n"
"public static DocumentFragment xpathDate(WordprocessingMLPackage wmlPackage, JaxbXmlPart sourcePart, Map<String, CustomXmlDataStoragePart> customXmlDataStorageParts, String storeItemId, String xpath, String prefixMappings, String sdtParent, String contentChild, NodeIterator dateNodeIt) {\n CustomXmlDataStoragePart part = customXmlDataStorageParts.get(storeItemId.toLowerCase());\n if (part == null) {\n log.error(\"String_Node_Str\" + storeItemId);\n return null;\n }\n try {\n String r = part.getData().xpathGetString(xpath, prefixMappings);\n log.debug(xpath + \"String_Node_Str\" + r);\n if (r == null)\n return nullResultParagraph(sdtParent, \"String_Node_Str\");\n CTSdtDate sdtDate = null;\n Node dateNode = dateNodeIt.nextNode();\n if (dateNode != null) {\n sdtDate = (CTSdtDate) XmlUtils.unmarshal(dateNode, Context.jc, CTSdtDate.class);\n }\n if (r.indexOf(\"String_Node_Str\") > 0) {\n r = r.substring(0, r.indexOf(\"String_Node_Str\") - 1);\n log.warn(\"String_Node_Str\" + r);\n }\n DateFormat dateTimeFormat = new SimpleDateFormat(\"String_Node_Str\");\n String format = sdtDate.getDateFormat().getVal();\n System.out.println(\"String_Node_Str\" + format);\n if (format.contains(\"String_Node_Str\")) {\n format = format.replace(\"String_Node_Str\", \"String_Node_Str\");\n }\n Format formatter = new SimpleDateFormat(format);\n org.docx4j.wml.ObjectFactory factory = new org.docx4j.wml.ObjectFactory();\n Date date;\n RPr rPr = null;\n try {\n date = (Date) dateTimeFormat.parse(r);\n } catch (ParseException e) {\n try {\n DateFormat dateFormat = new SimpleDateFormat(\"String_Node_Str\");\n date = (Date) dateFormat.parse(r);\n } catch (ParseException e2) {\n log.warn(e.getMessage());\n date = new Date();\n rPr = factory.createRPr();\n Color colorRed = factory.createColor();\n colorRed.setVal(\"String_Node_Str\");\n rPr.setColor(colorRed);\n }\n }\n String result = formatter.format(date);\n org.docx4j.wml.R run = factory.createR();\n if (rPr != null) {\n run.setRPr(rPr);\n }\n org.docx4j.wml.Text text = factory.createText();\n text.setValue(result);\n run.getContent().add(text);\n org.w3c.dom.Document docContainer = XmlUtils.neww3cDomDocument();\n if (sdtParent.equals(\"String_Node_Str\")) {\n docContainer = XmlUtils.marshaltoW3CDomDocument(run);\n } else {\n org.docx4j.wml.P p = factory.createP();\n p.getContent().add(run);\n docContainer = XmlUtils.marshaltoW3CDomDocument(p);\n }\n DocumentFragment docfrag = docContainer.createDocumentFragment();\n docfrag.appendChild(docContainer.getDocumentElement());\n return docfrag;\n } catch (Exception e) {\n log.error(e);\n return null;\n }\n}\n"
"public RPCResponse xtreemfs_replica_remove(InetSocketAddress server, UserCredentials credentials, String fileId, String osdUUID) {\n xtreemfs_replica_removeRequest rq = new xtreemfs_replica_removeRequest(fileId, osdUUID);\n RPCResponse<XCap> r = sendRequest(server, rq.getOperationNumber(), rq, new RPCResponseDecoder() {\n\n public Object getResult(ReusableBuffer data) {\n final xtreemfs_replica_addResponse resp = new xtreemfs_replica_addResponse();\n resp.deserialize(data);\n return null;\n }\n }, credentials);\n return r;\n}\n"
"public String getName() {\n return (String) getStateHelper().eval(PropertyKeys.name, getId());\n}\n"
"private void tweakLookAndFeel(JToolBar toolbar) {\n if (\"String_Node_Str\".equals(UIManager.getLookAndFeel().getID())) {\n MouseListener hoverListener = new MouseListener() {\n public void mouseExited(MouseEvent arg0) {\n ((JButton) arg0.getSource()).setBorderPainted(false);\n }\n public void mouseEntered(MouseEvent arg0) {\n ((JButton) arg0.getSource()).setBorderPainted(true);\n }\n public void mouseClicked(MouseEvent arg0) {\n }\n public void mouseReleased(MouseEvent arg0) {\n }\n public void mousePressed(MouseEvent arg0) {\n }\n };\n for (Component comp : toolbar.getComponents()) {\n if (comp instanceof JButton) {\n JButton button = (JButton) comp;\n button.setBorderPainted(false);\n button.addMouseListener(hoverListener);\n }\n }\n toolbar.setBackground(new Color(toolbar.getBackground().getRGB()));\n toolbar.setBorderPainted(false);\n } else if (UIManager.getLookAndFeel().getID() == \"String_Node_Str\") {\n toolbar.setBorder(BorderFactory.createLineBorder(getBackground()));\n }\n}\n"
"public void toBytes(ByteBuf buf) {\n buf.writeInt(dimlets.size());\n for (Map.Entry<Integer, DimletKey> me : dimlets.entrySet()) {\n buf.writeInt(me.getKey());\n DimletKey key = me.getValue();\n buf.writeInt(me.getKey());\n NetworkTools.writeString(buf, key.getName());\n buf.writeInt(key.getType().ordinal());\n }\n}\n"
"private void setCellStatus(Cell cell, CellStatus status) {\n logger.fine(\"String_Node_Str\" + cell.getCellID() + \"String_Node_Str\" + status);\n synchronized (cell) {\n int currentStatus = cell.getStatus().ordinal();\n int requiredStatus = status.ordinal();\n if (currentStatus == requiredStatus)\n return;\n int dir = (requiredStatus > currentStatus ? 1 : -1);\n boolean increasing = (dir == 1);\n while (currentStatus != requiredStatus) {\n currentStatus += dir;\n cell.setStatus(CellStatus.values()[currentStatus], increasing);\n }\n }\n}\n"
"private void renderGeneNode(GL2 gl, PathwayVertexRep vertexRep) {\n float[] nodeColor;\n float width = pixelGLConverter.getGLWidthForPixelWidth(vertexRep.getWidth());\n float height = pixelGLConverter.getGLHeightForPixelHeight(vertexRep.getHeight());\n gl.glLineWidth(1);\n gl.glEnable(GL.GL_STENCIL_TEST);\n gl.glColorMask(false, false, false, false);\n gl.glDisable(GL.GL_DEPTH_TEST);\n gl.glDisable(GL.GL_BLEND);\n gl.glStencilFunc(GL.GL_GREATER, 1, 0xff);\n gl.glStencilOp(GL.GL_KEEP, GL.GL_REPLACE, GL.GL_REPLACE);\n renderQuad(gl, width, height);\n gl.glDisable(GL.GL_STENCIL_TEST);\n gl.glColorMask(true, true, true, true);\n gl.glEnable(GL.GL_DEPTH_TEST);\n gl.glEnable(GL.GL_BLEND);\n if (mappingPerspective != null) {\n Average average = getExpressionAverage(mappingPerspective, vertexRep);\n if (average != null) {\n nodeColor = mappingPerspective.getDataDomain().getColorMapper().getColor((float) average.getArithmeticMean());\n } else {\n nodeColor = null;\n }\n if (average != null && nodeColor != null) {\n if (glPathwayView.getDetailLevel() == EDetailLevel.HIGH) {\n gl.glEnable(GL.GL_STENCIL_TEST);\n gl.glDisable(GL.GL_DEPTH_TEST);\n gl.glDisable(GL.GL_BLEND);\n gl.glStencilFunc(GL.GL_GREATER, 2, 0xff);\n gl.glStencilOp(GL.GL_KEEP, GL.GL_KEEP, GL.GL_KEEP);\n gl.glColor4f(nodeColor[0], nodeColor[1], nodeColor[2], 0.8f);\n renderQuad(gl, width, height);\n gl.glEnable(GL.GL_DEPTH_TEST);\n gl.glDisable(GL.GL_STENCIL_TEST);\n Float stdDev = pixelGLConverter.getGLWidthForPixelWidth(PathwayRenderStyle.ENZYME_NODE_PIXEL_WIDTH) * (float) average.getStandardDeviation() * 2.0f;\n if (!stdDev.isNaN()) {\n renderStdDevBar(gl, width, height, stdDev);\n }\n gl.glPushMatrix();\n gl.glTranslatef(0, -(2f * thirdOfstdDevBarHeight - onePxlHeight), 0);\n if (vertexSelectionManager.checkStatus(SelectionType.SELECTION, vertexRep.getID())) {\n nodeColor = SelectionType.SELECTION.getColor();\n gl.glColor4fv(nodeColor, 0);\n renderFrame(gl, width + onePxlWidth, height + (2f * thirdOfstdDevBarHeight) - onePxlHeight);\n gl.glEnable(GL.GL_STENCIL_TEST);\n gl.glColorMask(false, false, false, false);\n gl.glDisable(GL.GL_DEPTH_TEST);\n gl.glDisable(GL.GL_BLEND);\n gl.glStencilFunc(GL.GL_GREATER, 2, 0xff);\n gl.glStencilOp(GL.GL_KEEP, GL.GL_REPLACE, GL.GL_REPLACE);\n renderFrame(gl, width + onePxlWidth, height + (2f * thirdOfstdDevBarHeight) - onePxlHeight);\n gl.glDisable(GL.GL_STENCIL_TEST);\n gl.glColorMask(true, true, true, true);\n gl.glEnable(GL.GL_DEPTH_TEST);\n gl.glEnable(GL.GL_BLEND);\n } else if (vertexSelectionManager.checkStatus(SelectionType.MOUSE_OVER, vertexRep.getID())) {\n nodeColor = SelectionType.MOUSE_OVER.getColor();\n gl.glColor4fv(nodeColor, 0);\n renderFrame(gl, width + onePxlWidth, height + (2f * thirdOfstdDevBarHeight) - onePxlHeight);\n gl.glEnable(GL.GL_STENCIL_TEST);\n gl.glColorMask(false, false, false, false);\n gl.glDisable(GL.GL_DEPTH_TEST);\n gl.glDisable(GL.GL_BLEND);\n gl.glStencilFunc(GL.GL_GREATER, 2, 0xff);\n gl.glStencilOp(GL.GL_KEEP, GL.GL_REPLACE, GL.GL_REPLACE);\n renderFrame(gl, width + onePxlWidth, height + (2f * thirdOfstdDevBarHeight) - onePxlHeight);\n gl.glDisable(GL.GL_STENCIL_TEST);\n gl.glColorMask(true, true, true, true);\n gl.glEnable(GL.GL_DEPTH_TEST);\n gl.glEnable(GL.GL_BLEND);\n }\n gl.glPopMatrix();\n } else {\n renderQuad(gl, width * 3, height * 3);\n gl.glEnable(GL.GL_STENCIL_TEST);\n gl.glColorMask(false, false, false, false);\n gl.glDisable(GL.GL_DEPTH_TEST);\n gl.glDisable(GL.GL_BLEND);\n gl.glStencilFunc(GL.GL_ALWAYS, 2, 0xff);\n gl.glStencilOp(GL.GL_KEEP, GL.GL_KEEP, GL.GL_REPLACE);\n gl.glCallList(upscaledFilledEnzymeNodeDisplayListId);\n gl.glDisable(GL.GL_STENCIL_TEST);\n gl.glColorMask(true, true, true, true);\n gl.glEnable(GL.GL_DEPTH_TEST);\n gl.glEnable(GL.GL_BLEND);\n if (vertexSelectionManager.checkStatus(SelectionType.SELECTION, vertexRep.getID())) {\n nodeColor = SelectionType.SELECTION.getColor();\n gl.glColor4fv(nodeColor, 0);\n gl.glCallList(upscaledFilledEnzymeNodeDisplayListId);\n gl.glEnable(GL.GL_STENCIL_TEST);\n gl.glColorMask(false, false, false, false);\n gl.glDisable(GL.GL_DEPTH_TEST);\n gl.glDisable(GL.GL_BLEND);\n gl.glStencilOp(GL.GL_KEEP, GL.GL_KEEP, GL.GL_REPLACE);\n gl.glStencilFunc(GL.GL_ALWAYS, 2, 0xff);\n gl.glCallList(upscaledFilledEnzymeNodeDisplayListId);\n gl.glDisable(GL.GL_STENCIL_TEST);\n gl.glColorMask(true, true, true, true);\n gl.glEnable(GL.GL_DEPTH_TEST);\n gl.glEnable(GL.GL_BLEND);\n } else if (vertexSelectionManager.checkStatus(SelectionType.MOUSE_OVER, vertexRep.getID())) {\n nodeColor = SelectionType.MOUSE_OVER.getColor();\n gl.glColor4fv(nodeColor, 0);\n gl.glCallList(upscaledFilledEnzymeNodeDisplayListId);\n gl.glEnable(GL.GL_STENCIL_TEST);\n gl.glColorMask(false, false, false, false);\n gl.glDisable(GL.GL_DEPTH_TEST);\n gl.glDisable(GL.GL_BLEND);\n gl.glStencilOp(GL.GL_KEEP, GL.GL_KEEP, GL.GL_REPLACE);\n gl.glStencilFunc(GL.GL_ALWAYS, 2, 0xff);\n gl.glCallList(upscaledFilledEnzymeNodeDisplayListId);\n gl.glDisable(GL.GL_STENCIL_TEST);\n gl.glColorMask(true, true, true, true);\n gl.glEnable(GL.GL_DEPTH_TEST);\n gl.glEnable(GL.GL_BLEND);\n }\n }\n } else {\n gl.glColor4f(0, 0, 0, 0);\n renderQuad(gl, width, height);\n nodeColor = PathwayRenderStyle.ENZYME_NODE_COLOR;\n gl.glColor4f(nodeColor[0], nodeColor[1], nodeColor[2], 0.7f);\n float boxWidth = pixelGLConverter.getGLWidthForPixelWidth(PathwayRenderStyle.COMPOUND_NODE_PIXEL_WIDTH);\n float boxHeight = pixelGLConverter.getGLHeightForPixelHeight(PathwayRenderStyle.COMPOUND_NODE_PIXEL_HEIGHT);\n float y = height;\n gl.glDisable(GL.GL_DEPTH_TEST);\n gl.glBegin(GL2.GL_QUADS);\n gl.glNormal3f(0.0f, 0.0f, 1.0f);\n gl.glVertex3f(0, boxHeight, PathwayRenderStyle.Z_OFFSET);\n gl.glVertex3f(boxWidth, boxHeight, PathwayRenderStyle.Z_OFFSET);\n gl.glVertex3f(boxWidth, 0, PathwayRenderStyle.Z_OFFSET);\n gl.glVertex3f(0, 0, PathwayRenderStyle.Z_OFFSET);\n gl.glEnd();\n gl.glEnable(GL.GL_DEPTH_TEST);\n if (vertexSelectionManager.checkStatus(SelectionType.SELECTION, vertexRep.getID())) {\n nodeColor = SelectionType.SELECTION.getColor();\n gl.glColor4fv(nodeColor, 0);\n renderFrame(gl, width + onePxlWidth, height + thirdOfstdDevBarHeight);\n maskFramedEnzymeNode(gl, width, height);\n } else if (vertexSelectionManager.checkStatus(SelectionType.MOUSE_OVER, vertexRep.getID())) {\n nodeColor = SelectionType.MOUSE_OVER.getColor();\n gl.glColor4fv(nodeColor, 0);\n renderFrame(gl, width + onePxlWidth, height + thirdOfstdDevBarHeight);\n maskFramedEnzymeNode(gl, width, height);\n }\n }\n } else {\n if (vertexSelectionManager.checkStatus(SelectionType.SELECTION, vertexRep.getID())) {\n nodeColor = SelectionType.SELECTION.getColor();\n maskFramedEnzymeNode(gl, width, height);\n } else if (vertexSelectionManager.checkStatus(SelectionType.MOUSE_OVER, vertexRep.getID())) {\n nodeColor = SelectionType.MOUSE_OVER.getColor();\n maskFramedEnzymeNode(gl, width, height);\n } else if (vertexSelectionManager.checkStatus(SelectionType.NORMAL, vertexRep.getID())) {\n nodeColor = PathwayRenderStyle.ENZYME_NODE_COLOR;\n } else {\n nodeColor = new float[] { 0, 0, 0, 0 };\n }\n gl.glColor4fv(nodeColor, 0);\n renderFrame(gl, width + onePxlWidth, height + thirdOfstdDevBarHeight);\n gl.glCallList(framedEnzymeNodeDisplayListId);\n if (!vertexSelectionManager.checkStatus(SelectionType.DESELECTED, vertexRep.getID())) {\n gl.glColor4f(0, 0, 0, 0);\n renderQuad(gl, width, height);\n }\n }\n}\n"
"private void loadMainInfo(DataInputStream coreStream, ReportDocumentCoreInfo documentInfo) throws IOException {\n if (applicationClassLoader == null) {\n applicationClassLoader = createClassLoader(systemId);\n }\n Map originalParameters = IOUtil.readMap(coreStream, applicationClassLoader);\n documentInfo.parameters = convertToCompatibleParameter(originalParameters);\n documentInfo.globalVariables = (HashMap) IOUtil.readMap(coreStream, documentInfo.applicationClassLoader);\n}\n"
"static void insertDeclarationsDetails(StringBuffer fileBuffer, List decls, String kind, int index) {\n if (!declsAboveVisibilityExist(decls))\n return;\n int insertIndex = findDetailsIndex(fileBuffer, index);\n String detailsHeading = \"String_Node_Str\" + \"String_Node_Str\" + kind.toUpperCase() + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + kind + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n fileBuffer.insert(insertIndex, detailsHeading);\n insertIndex += detailsHeading.length();\n for (int i = 0; i < decls.size(); i++) {\n IProgramElement decl = (IProgramElement) decls.get(i);\n if (isAboveVisibility(decl)) {\n String entry = \"String_Node_Str\";\n entry += \"String_Node_Str\" + generateHREFName(decl) + \"String_Node_Str\";\n if (kind.equals(ADVICE_DETAIL)) {\n entry += \"String_Node_Str\" + decl.getName() + \"String_Node_Str\";\n entry += \"String_Node_Str\" + generateAdviceSignatures(decl) + \"String_Node_Str\" + \"String_Node_Str\" + generateDetailsComment(decl) + \"String_Node_Str\" + generateAffects(decl, false);\n } else if (kind.equals(\"String_Node_Str\")) {\n entry += \"String_Node_Str\" + decl.toLabelString() + \"String_Node_Str\" + generateDetailsComment(decl);\n } else if (kind.equals(\"String_Node_Str\")) {\n entry += \"String_Node_Str\" + decl.toLabelString() + \"String_Node_Str\";\n entry += generateIntroductionSignatures(decl, true) + generateAffects(decl, true) + generateDetailsComment(decl);\n }\n if (i != decls.size() - 1) {\n entry += \"String_Node_Str\";\n } else {\n entry += \"String_Node_Str\";\n }\n fileBuffer.insert(insertIndex, entry);\n insertIndex += entry.length();\n }\n }\n}\n"
"public static SecretKeySpec getSecretKey(String fileName) throws ForceEncryptionException {\n if (fileName == null || fileName.length() == 0) {\n fileName = PRIVATE_KEY_PATH;\n }\n InputStream is = AESUtil.class.getResourceAsStream(\"String_Node_Str\" + fileName);\n String key = null;\n if (is == null) {\n LOGGER.warn(\"String_Node_Str\" + fileName + \"String_Node_Str\");\n } else {\n Properties encryptionProps = new Properties();\n try {\n encryptionProps.load(is);\n } catch (IOException e) {\n LOGGER.warn(\"String_Node_Str\" + fileName + \"String_Node_Str\");\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (IOException ignored) {\n }\n }\n }\n key = encryptionProps.getProperty(PRIVATE_KEY_PROPERTY);\n if (key == null || key.trim().length() == 0) {\n LOGGER.warn(PRIVATE_KEY_PROPERTY + \"String_Node_Str\" + fileName + \"String_Node_Str\");\n }\n }\n return getSecretKeySpec(key);\n}\n"
"public void handleData(final ITmfEvent event) {\n super.handleData(event);\n synchronized (fOrderList) {\n if (fOrderList.isEmpty() || !fOrderList.get(fOrderList.size() - 1).equals(foregroundName)) {\n fOrderList.add(foregroundName);\n }\n }\n ++nbEvents;\n}\n"
"private void checkParameters() {\n boolean checkColumnExist = false;\n IMetadataTable metadataTable = null;\n List<IMetadataTable> tables = getMetadataList();\n if (tables != null && tables.size() == 1) {\n metadataTable = tables.get(0);\n checkColumnExist = true;\n }\n boolean checkPreColumnExist = false;\n IMetadataTable preMetadataTable = null;\n int preTableCount = 0;\n List<? extends IConnection> incomingConnections = getIncomingConnections();\n if (incomingConnections != null && incomingConnections.size() > 0) {\n for (IConnection incomingConnection : incomingConnections) {\n if (incomingConnection.getLineStyle().hasConnectionCategory(IConnectionCategory.DATA)) {\n IMetadataTable schemaTable = incomingConnection.getMetadataTable();\n if (schemaTable != null) {\n ++preTableCount;\n if (preTableCount > 1) {\n break;\n }\n preMetadataTable = schemaTable;\n }\n }\n }\n }\n if (preTableCount == 1) {\n checkPreColumnExist = true;\n }\n List<String> currentColumns = new ArrayList<String>();\n if (checkColumnExist) {\n currentColumns = getColumnLabels(metadataTable);\n }\n List<String> preColumns = new ArrayList<String>();\n if (checkPreColumnExist) {\n preColumns = getColumnLabels(preMetadataTable);\n }\n for (IElementParameter param : this.getElementParametersWithChildrens()) {\n if (param.getMaxlength() > 0) {\n String paramValue = param.getValue().toString();\n paramValue.length();\n String tmpValue;\n if (paramValue.startsWith(\"String_Node_Str\") && paramValue.endsWith(\"String_Node_Str\")) {\n tmpValue = paramValue.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n } else {\n continue;\n }\n String factor = \"String_Node_Str\";\n Pattern pattern = Pattern.compile(factor);\n Matcher matcher = pattern.matcher(tmpValue);\n int lenth = 0;\n matcher.groupCount();\n while (matcher.find()) {\n lenth++;\n }\n String last = tmpValue.replaceAll(factor, \"String_Node_Str\");\n last = last.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n int realLength = last.length() + lenth;\n if (realLength > param.getMaxlength()) {\n String errorMessage = Messages.getString(\"String_Node_Str\", param.getDisplayName(), param.getMaxlength());\n Problems.add(ProblemStatus.ERROR, this, errorMessage);\n }\n }\n if (param.getFieldType() == EParameterFieldType.CLOSED_LIST) {\n String showIf = param.getShowIf();\n String notShowIf = param.getNotShowIf();\n IElementParameter dbTypeEle = this.getElementParameter(\"String_Node_Str\");\n if (dbTypeEle != null && showIf != null && notShowIf == null) {\n String dbType = (String) dbTypeEle.getValue();\n boolean show = false;\n if (showIf.contains(dbType)) {\n show = true;\n }\n if (show && !ArrayUtils.contains(param.getListItemsValue(), param.getValue())) {\n Problems.add(ProblemStatus.ERROR, this, \"String_Node_Str\");\n }\n } else if (\"String_Node_Str\".equals(param.getName()) || \"String_Node_Str\".equals(param.getName())) {\n } else {\n if (!ArrayUtils.contains(param.getListItemsValue(), param.getValue())) {\n Problems.add(ProblemStatus.ERROR, this, \"String_Node_Str\" + param.getDisplayName() + \"String_Node_Str\");\n }\n }\n }\n if (param.getFieldType() == EParameterFieldType.TABLE) {\n Object[] tableItemsValue = param.getListItemsValue();\n List<String> columnListParamNames = new ArrayList<String>();\n List<String> preColumnListParamNames = new ArrayList<String>();\n if (tableItemsValue != null && tableItemsValue.length > 0) {\n for (Object tabItemValue : tableItemsValue) {\n if (tabItemValue instanceof IElementParameter) {\n IElementParameter itemParameter = (IElementParameter) tabItemValue;\n if (itemParameter.getFieldType() == EParameterFieldType.COLUMN_LIST) {\n columnListParamNames.add(itemParameter.getName());\n }\n if (itemParameter.getFieldType() == EParameterFieldType.PREV_COLUMN_LIST) {\n preColumnListParamNames.add(itemParameter.getName());\n }\n }\n }\n }\n StringBuffer inexistentColumns = new StringBuffer();\n List<Map<String, Object>> tableValues = (List<Map<String, Object>>) param.getValue();\n if (tableValues != null) {\n for (Map<String, Object> tabMap : tableValues) {\n int row = tableValues.indexOf(tabMap) + 1;\n if (checkColumnExist) {\n for (String paramName : columnListParamNames) {\n Object columnLineValue = tabMap.get(paramName);\n if (columnLineValue instanceof String && !currentColumns.contains(columnLineValue)) {\n inexistentColumns.append(columnLineValue).append(\"String_Node_Str\" + row + \"String_Node_Str\").append(\"String_Node_Str\");\n }\n }\n }\n }\n if (checkPreColumnExist) {\n for (String paramName : preColumnListParamNames) {\n Object columnLineValue = tabMap.get(paramName);\n if (columnLineValue instanceof String && !preColumns.contains(columnLineValue)) {\n inexistentColumns.append(columnLineValue).append(\"String_Node_Str\" + row + \"String_Node_Str\").append(\"String_Node_Str\");\n }\n }\n }\n }\n if (inexistentColumns.length() > 0) {\n inexistentColumns.deleteCharAt(inexistentColumns.length() - 1);\n String warnMessage = Messages.getString(\"String_Node_Str\", inexistentColumns.toString(), param.getDisplayName());\n Problems.add(ProblemStatus.WARNING, this, warnMessage);\n }\n }\n if (param.getName().equals(EParameterName.COMMENT.getName())) {\n String infoValue = (String) param.getValue();\n if (infoValue != null && !infoValue.equals(\"String_Node_Str\")) {\n Problems.add(ProblemStatus.INFO, this, infoValue);\n }\n }\n if (param.isRequired(getElementParameters()) && !param.isShow(getElementParameters()) && this.externalNode != null) {\n if (param.getFieldType().equals(EParameterFieldType.TABLE)) {\n List<Map<String, String>> tableValues = (List<Map<String, String>>) param.getValue();\n if (tableValues != null && \"String_Node_Str\".equalsIgnoreCase(component.getName()) && param.getName().equals(\"String_Node_Str\")) {\n checkFileOutputMSXML(param, tableValues);\n } else if (tableValues != null && \"String_Node_Str\".equalsIgnoreCase(component.getName()) && param.getName().equals(\"String_Node_Str\") && tableValues.size() != 0) {\n if (((Boolean) this.getElementParameter(\"String_Node_Str\").getValue()) == true) {\n List<Map<String, String>> listGroup = (List<Map<String, String>>) externalNode.getElementParameter(\"String_Node_Str\").getValue();\n List<Map<String, String>> listLoop = (List<Map<String, String>>) externalNode.getElementParameter(\"String_Node_Str\").getValue();\n if (listGroup.size() == 0 || listLoop.size() == 0) {\n String errorMessage = Messages.getString(\"String_Node_Str\", param.getDisplayName());\n Problems.add(ProblemStatus.ERROR, this, errorMessage);\n }\n }\n } else if (\"String_Node_Str\".equals(component.getName())) {\n } else {\n if (tableValues == null || tableValues.size() == 0) {\n String errorMessage = Messages.getString(\"String_Node_Str\", param.getDisplayName());\n Problems.add(ProblemStatus.ERROR, this, errorMessage);\n }\n }\n }\n }\n for (IConnection connection : getOutgoingConnections()) {\n if (connection.getSourceNodeConnector() != null && !connection.getSourceNodeConnector().isShow()) {\n Problems.add(ProblemStatus.ERROR, this, \"String_Node_Str\" + connection.getSourceNodeConnector().getLinkName() + \"String_Node_Str\");\n }\n }\n if (param.isRequired() && param.isShow(getElementParameters())) {\n EParameterFieldType fieldType = param.getFieldType();\n String value;\n List multiSchemaDelimetedSeparaor = new ArrayList();\n switch(fieldType) {\n case TABLE:\n List<Map<String, String>> tableValues = (List<Map<String, String>>) param.getValue();\n if (tableValues != null && \"String_Node_Str\".equalsIgnoreCase(component.getName()) && param.getName().equals(\"String_Node_Str\")) {\n checkFileOutputMSXML(param, tableValues);\n } else {\n if (tableValues == null || tableValues.size() == 0) {\n String errorMessage = Messages.getString(\"String_Node_Str\", param.getDisplayName());\n Problems.add(ProblemStatus.ERROR, this, errorMessage);\n } else if (this.getComponent().getName().equals(\"String_Node_Str\")) {\n for (Map<String, String> map : tableValues) {\n if (map != null) {\n if (\"String_Node_Str\".equals(map.get(\"String_Node_Str\")) || map.get(\"String_Node_Str\") == null) {\n Problems.add(ProblemStatus.ERROR, this, Messages.getString(\"String_Node_Str\"));\n }\n }\n }\n }\n }\n break;\n case CHECK:\n break;\n case RADIO:\n break;\n case SCHEMA_TYPE:\n break;\n case DCSCHEMA:\n break;\n case MEMO_SQL:\n String errMessage = Messages.getString(\"String_Node_Str\", param.getDisplayName());\n Object value2 = param.getValue();\n if (value2 == null) {\n break;\n }\n String currentQuery = value2.toString();\n if (CorePlugin.getDefault().getPreferenceStore().getBoolean(ITalendCorePrefConstants.SQL_ADD_WARNING)) {\n if (currentQuery.indexOf(COMPARE_STR1) != -1 || currentQuery.indexOf(COMPARE_STR2) != -1) {\n Problems.add(ProblemStatus.WARNING, this, errMessage);\n break;\n }\n if (!NodeQueryCheckUtil.checkQueryOK(this, currentQuery)) {\n Problems.add(ProblemStatus.WARNING, this, errMessage);\n break;\n }\n }\n break;\n case CLOSED_LIST:\n value = (String) param.getValue();\n if (value == null || value.equals(\"String_Node_Str\")) {\n String errorMessage = Messages.getString(\"String_Node_Str\", param.getDisplayName());\n Problems.add(ProblemStatus.ERROR, this, errorMessage);\n } else {\n if (param.getListItemsValue().length != 0) {\n boolean found = false;\n for (int i = 0; i < param.getListItemsValue().length && !found; i++) {\n if (param.getListItemsValue()[i].equals(value)) {\n found = true;\n }\n }\n if (!found) {\n String errorMessage = Messages.getString(\"String_Node_Str\", param.getDisplayName(), value);\n Problems.add(ProblemStatus.ERROR, this, errorMessage);\n }\n }\n }\n break;\n default:\n if (param.getValue() != null && !(param.getValue() instanceof String)) {\n break;\n }\n value = (String) param.getValue();\n if (value == null || value.equals(\"String_Node_Str\")) {\n if (this.getComponent() != null && \"String_Node_Str\".equals(this.getComponent().getName())) {\n multiSchemaDelimetedSeparaor.add(param);\n if (multiSchemaDelimetedSeparaor.size() == 2) {\n String errorMessage = Messages.getString(\"String_Node_Str\", param.getDisplayName());\n Problems.add(ProblemStatus.ERROR, this, errorMessage);\n }\n } else {\n if (getComponent() != null && \"String_Node_Str\".equals(getComponent().getName())) {\n IElementParameter fromRepository = getElementParameter(\"String_Node_Str\");\n Object isFromRepository = fromRepository.getValue();\n if (isFromRepository != null && \"String_Node_Str\".equals(isFromRepository.toString())) {\n String errorMessage = Messages.getString(\"String_Node_Str\", param.getDisplayName());\n Problems.add(ProblemStatus.ERROR, this, errorMessage);\n } else {\n }\n } else {\n String errorMessage = Messages.getString(\"String_Node_Str\", param.getDisplayName());\n Problems.add(ProblemStatus.ERROR, this, errorMessage);\n }\n }\n }\n }\n }\n checkValidationRule(param);\n checktAggregateRow(param);\n }\n checkJobletConnections();\n IElementParameter enableParallelizeParameter = getElementParameter(EParameterName.PARALLELIZE.getName());\n if (enableParallelizeParameter != null && enableParallelizeParameter.getValue() != null) {\n boolean x = (Boolean) enableParallelizeParameter.getValue();\n if (x) {\n addStatus(Process.PARALLEL_STATUS);\n }\n }\n}\n"
"public String[] getParameters() {\n return parameters == null ? null : copyOf(parameters, parameters.length);\n}\n"
"public void update(Observable o, Object arg) {\n if (arg instanceof JSONObject) {\n handleJson((JSONObject) arg);\n }\n if (o instanceof VisWebSocket) {\n getInstance().sync((VisWebSocket) o);\n if (currentJson == null)\n setCurrentJson();\n return;\n }\n if (o instanceof OpenSimDB) {\n if (arg instanceof ObjectsAddedEvent) {\n ObjectsAddedEvent ev = (ObjectsAddedEvent) arg;\n Vector<OpenSimObject> objs = ev.getObjects();\n for (int i = 0; i < objs.size(); i++) {\n if (objs.get(i) instanceof Model) {\n assert (false);\n }\n if (objs.get(i) instanceof Marker) {\n SingleModelVisuals vis = mapModelsToVisuals.get(ev.getModel());\n repaintAll();\n }\n }\n } else if (arg instanceof ObjectSetCurrentEvent) {\n clearSelectedObjects();\n ObjectSetCurrentEvent ev = (ObjectSetCurrentEvent) arg;\n Vector<OpenSimObject> objs = ev.getObjects();\n for (int i = 0; i < objs.size(); i++) {\n if (objs.get(i) instanceof Model) {\n Model currentModel = (Model) objs.get(i);\n Enumeration<Model> models = mapModelsToVisuals.keys();\n while (models.hasMoreElements()) {\n Model next = models.nextElement();\n double nominalOpacity = modelOpacities.get(next);\n SingleModelVisuals vis = mapModelsToVisuals.get(next);\n if (next == currentModel) {\n setObjectOpacity(next, nominalOpacity);\n vis.setPickable(true);\n } else {\n setObjectOpacity(next, getNonCurrentModelOpacity() * nominalOpacity);\n vis.setPickable(false);\n }\n }\n setCurrentJson();\n break;\n }\n }\n } else if (arg instanceof ObjectsDeletedEvent) {\n handleObjectsDeletedEvent(arg);\n } else if (arg instanceof ObjectEnabledStateChangeEvent) {\n handleObjectsEnabledStateChangeEvent(arg);\n } else if (arg instanceof ObjectsRenamedEvent) {\n ObjectsRenamedEvent ev = (ObjectsRenamedEvent) arg;\n statusDisplaySelectedObjects();\n repaintAll();\n Vector<OpenSimObject> objs = ev.getObjects();\n for (int i = 0; i < objs.size(); i++) {\n if (objs.get(i) instanceof Actuator) {\n } else if (objs.get(i) instanceof Marker) {\n }\n }\n } else if (arg instanceof ModelEvent) {\n ModelEvent ev = (ModelEvent) arg;\n if (ev.getOperation() == ModelEvent.Operation.Open) {\n Model evModel = ev.getModel();\n processSavedSettings(evModel);\n try {\n createNewViewWindowIfNeeded();\n } catch (UnsatisfiedLinkError e) {\n setGraphicsAvailable(false);\n }\n if (isVtkGraphicsAvailable()) {\n SingleModelVisuals newModelVisual = (evModel instanceof ModelForExperimentalData) ? new ExperimentalDataVisuals(evModel) : new SingleModelVisuals(evModel);\n mapModelsToVisuals.put(evModel, newModelVisual);\n getModelVisuals().add(newModelVisual);\n modelOpacities.put(evModel, 1.0);\n addVisObjectToAllViews();\n vtkMatrix4x4 m = (evModel instanceof ModelForExperimentalData) ? new vtkMatrix4x4() : getInitialTransform(newModelVisual);\n newModelVisual.getModelDisplayAssembly().SetUserMatrix(m);\n sceneAssembly.AddPart(newModelVisual.getModelDisplayAssembly());\n }\n if (websocketdb != null) {\n if (debugLevel > 1)\n System.out.println(\"String_Node_Str\");\n ModelVisualizationJson vizJson = createJsonFroModel(jsondb, evModel);\n exportModelJsonToVisualizer(vizJson, null);\n mapModelsToJsons.put(evModel, vizJson);\n } else {\n VisualizerWindowAction.openVisualizerWindow();\n }\n if (OpenSimDB.getInstance().getNumModels() == 1) {\n Iterator<ModelWindowVTKTopComponent> windowIter = openWindows.iterator();\n double[] bnds = new double[6];\n while (windowIter.hasNext()) {\n bnds = computeSceneBounds();\n ModelWindowVTKTopComponent nextWindow = windowIter.next();\n lockDrawingSurfaces(true);\n nextWindow.getCanvas().GetRenderer().ResetCamera(bnds);\n lockDrawingSurfaces(false);\n }\n }\n repaintAll();\n } else if (ev.getOperation() == ModelEvent.Operation.Close) {\n Model dModel = ev.getModel();\n mapModelsToSettings.remove(dModel);\n removeObjectsBelongingToModelFromSelection(dModel);\n SingleModelVisuals visModel = mapModelsToVisuals.get(dModel);\n if (visModel != null) {\n removeObjectFromScene(visModel.getModelDisplayAssembly());\n modelVisuals.remove(visModel);\n }\n removeAnnotationObjects(dModel);\n mapModelsToVisuals.remove(dModel);\n modelOpacities.remove(dModel);\n if (visModel != null)\n visModel.cleanup();\n if (websocketdb != null) {\n ModelVisualizationJson dJson = mapModelsToJsons.get(dModel);\n JSONObject msg = dJson.createCloseModelJson();\n websocketdb.broadcastMessageJson(msg, null);\n System.out.println(msg.toJSONString());\n UUID modelUUID = dJson.getModelUUID();\n mapModelsToJsons.remove(dModel);\n }\n } else if (ev.getOperation() == ModelEvent.Operation.SetCurrent) {\n Enumeration<Model> models = mapModelsToVisuals.keys();\n while (models.hasMoreElements()) {\n Model next = models.nextElement();\n double nominalOpacity = modelOpacities.get(next);\n SingleModelVisuals vis = mapModelsToVisuals.get(next);\n if (next == ev.getModel()) {\n setObjectOpacity(next, nominalOpacity);\n } else {\n setObjectOpacity(next, getNonCurrentModelOpacity() * nominalOpacity);\n }\n }\n if (websocketdb != null) {\n Model cModel = ev.getModel();\n currentJson = mapModelsToJsons.get(cModel);\n JSONObject msg = currentJson.createSetCurrentModelJson();\n websocketdb.broadcastMessageJson(msg, null);\n System.out.println(msg.toJSONString());\n }\n } else if (ev.getOperation() == ModelEvent.Operation.Save) {\n updateSettingsSerializer(ev.getModel());\n }\n }\n }\n}\n"
"protected String writeString(List<String> items) {\n int size = items.size();\n StringBuffer buf = new StringBuffer(size * 50);\n buf.append(\"String_Node_Str\");\n for (int i = 0; i < size; i++) {\n buf.append(items.get(i));\n if (i != size - 1) {\n String trim = ARG_DELIMITER.trim();\n if (!items.get(i + 1).trim().startsWith(trim)) {\n buf.append(ARG_DELIMITER);\n } else {\n buf.append(\"String_Node_Str\");\n }\n }\n }\n return buf.toString();\n}\n"
"public boolean findTarget(boolean doSet) {\n if (worldObj.isRemote) {\n return false;\n }\n boolean columnVisitListIsUpdated = false;\n if (visitList.isEmpty()) {\n createColumnVisitList();\n columnVisitListIsUpdated = true;\n }\n if (!doSet) {\n return !visitList.isEmpty();\n }\n if (visitList.isEmpty()) {\n return false;\n }\n int[] nextTarget = visitList.removeFirst();\n if (!columnVisitListIsUpdated) {\n for (int y = nextTarget[1] + 1; y < yCoord + 3; y++) {\n Block block = worldObj.getBlock(nextTarget[0], y, nextTarget[2]);\n if (BlockUtils.isAnObstructingBlock(block, worldObj, nextTarget[0], y, nextTarget[2])) {\n createColumnVisitList();\n columnVisitListIsUpdated = true;\n nextTarget = null;\n break;\n }\n }\n }\n if (columnVisitListIsUpdated && nextTarget == null && !visitList.isEmpty()) {\n nextTarget = visitList.removeFirst();\n } else if (columnVisitListIsUpdated && nextTarget == null) {\n return false;\n }\n setTarget(nextTarget[0], nextTarget[1] + 1, nextTarget[2]);\n return true;\n}\n"
"public void run() {\n try {\n MsgType msgType = new MsgType();\n if (isAvailable) {\n if (isMissingField) {\n sendBusinessReject(message, BusinessRejectReason.CONDITIONALLY_REQUIRED_FIELD_MISSING, \"String_Node_Str\");\n } else if (message.getHeader().isSetField(DeliverToCompID.FIELD)) {\n sendSessionReject(message, SessionRejectReason.COMPID_PROBLEM);\n } else if (message.getHeader().getField(msgType).valueEquals(\"String_Node_Str\")) {\n executionReport(message, sessionID);\n } else if (message.getHeader().getField(msgType).valueEquals(\"String_Node_Str\")) {\n cancelReject(message, sessionID);\n } else {\n sendBusinessReject(message, BusinessRejectReason.UNSUPPORTED_MESSAGE_TYPE, \"String_Node_Str\");\n }\n } else {\n sendBusinessReject(message, BusinessRejectReason.APPLICATION_NOT_AVAILABLE, \"String_Node_Str\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n}\n"
"public static void spawn(CityLevel level) {\n if (!spawned && Dungeon.depth > 16 && Random.Int(20 - Dungeon.depth) == 0) {\n Imp npc = new Imp();\n do {\n npc.pos = level.randomRespawnCell();\n } while (npc.pos == -1 || level.heaps.get(npc.pos) != null || level.findMob(npc.pos) != null || !(level.passable[npc.pos + PathFinder.CIRCLE4[0]] && level.passable[npc.pos + PathFinder.CIRCLE4[2]]) || !(level.passable[npc.pos + PathFinder.CIRCLE4[1]] && level.passable[npc.pos + PathFinder.CIRCLE4[3]]));\n level.mobs.add(npc);\n spawned = true;\n alternative = Random.Int(2) == 0;\n given = false;\n do {\n reward = (Ring) Generator.random(Generator.Category.RING);\n } while (reward.cursed);\n reward.upgrade(2);\n reward.cursed = true;\n }\n}\n"
"public void injectRDF(String _tripleFile, String _subRefNodeName, RexsterResourceContext _context) {\n final String sMETHOD = \"String_Node_Str\";\n String tripleFile = _tripleFile.trim();\n if (tripleFile.startsWith(FILE_SEPARATOR))\n tripleFile = tripleFile.substring(1);\n TransactionalGraph tranGraph = (TransactionalGraph) _context.getRexsterApplicationGraph().getGraph();\n try {\n logger.info(sMETHOD + \"String_Node_Str\" + tripleFile + \"String_Node_Str\");\n writeToGraphStore(_subRefNodeName, tripleFile, tranGraph);\n logger.info(sMETHOD + \"String_Node_Str\" + tripleFile + \"String_Node_Str\");\n } catch (MalformedURLException mfuex) {\n logger.error(sMETHOD + \"String_Node_Str\" + mfuex.getLocalizedMessage() + \"String_Node_Str\" + mfuex.getStackTrace());\n } catch (Exception ex) {\n logger.error(sMETHOD + \"String_Node_Str\" + ex.getLocalizedMessage() + \"String_Node_Str\");\n }\n RDF_Analyzer.analyzeModelData();\n}\n"
"protected void setupDatabase(Database database) throws Exception {\n dropViewIfExists(null, NEW_VIEW_NAME, database);\n dropViewIfExists(TestContext.ALT_SCHEMA, NEW_VIEW_NAME, database);\n dropAndCreateTable(new CreateTableStatement(null, TABLE_NAME).addPrimaryKeyColumn(\"String_Node_Str\", \"String_Node_Str\"), database);\n dropAndCreateTable(new CreateTableStatement(TestContext.ALT_SCHEMA, TABLE_NAME).addPrimaryKeyColumn(\"String_Node_Str\", \"String_Node_Str\"), database);\n dropAndCreateView(new CreateViewStatement(null, VIEW_NAME, \"String_Node_Str\" + TABLE_NAME), database);\n dropAndCreateView(new CreateViewStatement(TestContext.ALT_SCHEMA, VIEW_NAME, \"String_Node_Str\" + TABLE_NAME), database);\n}\n"
"public void endElement(String namespaceURI, String localName, String qName) throws SAXException {\n try {\n if (null != selfRecords) {\n for (int x = 0, selfRecordsSize = selfRecords.size(); x < selfRecordsSize; x++) {\n UnmarshalRecord selfRecord = selfRecords.get(x);\n if (selfRecord != null) {\n selfRecord.endElement(namespaceURI, localName, qName);\n } else {\n getFragmentBuilder().endSelfElement(namespaceURI, localName, qName);\n }\n }\n }\n if (-1 != unmappedLevel && unmappedLevel <= levelIndex) {\n if (levelIndex == unmappedLevel) {\n unmappedLevel = -1;\n }\n levelIndex--;\n return;\n }\n NodeValue unmarshalNodeValue = xPathNode.getUnmarshalNodeValue();\n if (null != unmarshalNodeValue) {\n try {\n unmarshalNodeValue.endElement(xPathFragment, this);\n } catch (EclipseLinkException e) {\n if ((null == xmlReader) || (null == xmlReader.getErrorHandler())) {\n throw e;\n } else {\n SAXParseException saxParseException = new SAXParseException(e.getLocalizedMessage(), documentLocator, e);\n xmlReader.getErrorHandler().warning(saxParseException);\n }\n }\n } else {\n XPathNode textNode = xPathNode.getTextNode();\n if (null != textNode && textNode.isWhitespaceAware() && getStringBuffer().length() == 0) {\n NodeValue textNodeUnmarshalNodeValue = textNode.getUnmarshalNodeValue();\n if (!isXsiNil) {\n if (textNodeUnmarshalNodeValue.isMappingNodeValue()) {\n textNodeUnmarshalNodeValue.endElement(xPathFragment, this);\n }\n } else {\n if (textNodeUnmarshalNodeValue.isMappingNodeValue()) {\n DatabaseMapping mapping = ((MappingNodeValue) textNodeUnmarshalNodeValue).getMapping();\n if (mapping.isAbstractDirectMapping()) {\n Object nullValue = ((AbstractDirectMapping) mapping).getNullValue();\n if (!(XMLConstants.EMPTY_STRING.equals(nullValue))) {\n setAttributeValue(null, mapping);\n this.removeNullCapableValue((NullCapableValue) textNodeUnmarshalNodeValue);\n }\n }\n isXsiNil = false;\n }\n }\n }\n }\n XPathFragment xPathFragment = xPathNode.getXPathFragment();\n if ((null != xPathFragment && xPathFragment.nameIsText()) || (xpathNodeIsMixedContent && xPathNode.getParent() != null)) {\n xPathNode = xPathNode.getParent();\n }\n if (null != xPathNode.getParent()) {\n xPathNode = xPathNode.getParent();\n }\n xpathNodeIsMixedContent = false;\n unmarshalContext.endElement(this);\n typeQName = null;\n levelIndex--;\n if (this.isNil() && levelIndex > 0) {\n this.setNil(false);\n }\n if ((0 == levelIndex) && (null != parentRecord) && !isSelfRecord()) {\n endDocument();\n UnmarshalRecord pRec = getParentRecord();\n while (pRec.isSelfRecord()) {\n pRec = pRec.getParentRecord();\n }\n pRec.endElement(namespaceURI, localName, qName);\n xmlReader.setContentHandler(pRec);\n xmlReader.setLexicalHandler(pRec);\n }\n } catch (EclipseLinkException e) {\n if ((null == xmlReader) || (null == xmlReader.getErrorHandler())) {\n throw e;\n } else {\n SAXParseException saxParseException = new SAXParseException(null, null, null, 0, 0, e);\n xmlReader.getErrorHandler().warning(saxParseException);\n }\n }\n}\n"
"public ClassDescriptor getDescriptor(String entityName) {\n DatabaseSession session = getJpaSession();\n ClassDescriptor descriptor = session.getDescriptorForAlias(entityName);\n if (descriptor == null) {\n for (Object ajaxBSession : ((JAXBContext) getJAXBContext()).getXMLContext().getSessions()) {\n descriptor = ((Session) ajaxBSession).getClassDescriptorForAlias(entityName);\n if (descriptor != null) {\n break;\n }\n }\n }\n return descriptor;\n}\n"
"public List<ExperimentSample> getExperimentSamples() {\n List<ExperimentSample> samples = this.experiment.getExperimentSamples();\n List<ExperimentSample> result = new ArrayList<>(samples.size());\n for (ExperimentSample sample : samples) {\n result.add(new UnmodifiableExperimentSample(sample));\n }\n return Collections.unmodifiableList(result);\n}\n"
"protected final void engineUpdateAAD(ByteBuffer src) {\n if (src == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (!src.hasRemaining()) {\n return;\n }\n byte[] input;\n int inputOffset;\n int inputLen;\n if (src.hasArray()) {\n input = src.array();\n inputOffset = src.arrayOffset() + src.position();\n inputLen = src.remaining();\n src.position(src.limit());\n } else {\n input = new byte[src.remaining()];\n inputOffset = 0;\n inputLen = input.length;\n src.get(input);\n }\n engineUpdateAAD(input, inputOffset, inputLen);\n}\n"
"public List<Pool> createPools(List<Pool> pools) {\n if (CollectionUtils.isNotEmpty(pools)) {\n poolCurator.saveOrUpdateAll(pools, false, false);\n for (Pool pool : pools) {\n if (pool != null && !updatedPoolIds.contains(pool.getId())) {\n log.debug(\"String_Node_Str\", pool);\n sink.emitPoolCreated(pool);\n }\n }\n }\n return pools;\n}\n"
"private String makeLevelMemberCountSql(RolapLevel level, DataSource dataSource, boolean[] mustCount) {\n mustCount[0] = false;\n SqlQuery sqlQuery = SqlQuery.newQuery(dataSource, \"String_Node_Str\" + level);\n int levelDepth = level.getDepth();\n RolapLevel[] levels = (RolapLevel[]) hierarchy.getLevels();\n if (levelDepth == levels.length) {\n sqlQuery.addSelect(\"String_Node_Str\", null);\n hierarchy.addToFrom(sqlQuery, level.getKeyExp());\n return sqlQuery.toString();\n }\n if (!sqlQuery.getDialect().allowsFromQuery()) {\n List<String> columnList = new ArrayList<String>();\n int columnCount = 0;\n for (int i = levelDepth; i >= 0; i--) {\n RolapLevel level2 = levels[i];\n if (level2.isAll()) {\n continue;\n }\n if (columnCount > 0) {\n if (sqlQuery.getDialect().allowsCompoundCountDistinct()) {\n } else if (true) {\n mustCount[0] = true;\n }\n }\n hierarchy.addToFrom(sqlQuery, level2.getKeyExp());\n String keyExp = level2.getKeyExp().getExpression(sqlQuery);\n if (columnCount > 0 && !sqlQuery.getDialect().allowsCompoundCountDistinct() && sqlQuery.getDialect().getDatabaseProduct() == Dialect.DatabaseProduct.SYBASE) {\n keyExp = \"String_Node_Str\" + columnList + \"String_Node_Str\";\n }\n columnList.add(keyExp);\n if (level2.isUnique()) {\n break;\n }\n ++columnCount;\n }\n if (mustCount[0]) {\n for (String colDef : columnList) {\n final String exp = sqlQuery.getDialect().generateCountExpression(colDef);\n sqlQuery.addSelect(exp, null);\n sqlQuery.addOrderBy(exp, true, false, true);\n }\n } else {\n int i = 0;\n StringBuilder sb = new StringBuilder();\n for (String colDef : columnList) {\n if (i > 0) {\n sb.append(\"String_Node_Str\");\n }\n sb.append(colDef);\n }\n sqlQuery.addSelect(\"String_Node_Str\" + sb.toString() + \"String_Node_Str\", null);\n }\n return sqlQuery.toString();\n } else {\n sqlQuery.setDistinct(true);\n for (int i = levelDepth; i >= 0; i--) {\n RolapLevel level2 = levels[i];\n if (level2.isAll()) {\n continue;\n }\n MondrianDef.Expression keyExp = level2.getKeyExp();\n hierarchy.addToFrom(sqlQuery, keyExp);\n sqlQuery.addSelect(keyExp.getExpression(sqlQuery), null);\n if (level2.isUnique()) {\n break;\n }\n }\n SqlQuery outerQuery = SqlQuery.newQuery(dataSource, \"String_Node_Str\" + level);\n outerQuery.addSelect(\"String_Node_Str\", null);\n boolean failIfExists = true;\n outerQuery.addFrom(sqlQuery, \"String_Node_Str\", failIfExists);\n return outerQuery.toString();\n }\n}\n"
"public float getWordHeight() {\n if (bf == null)\n return fontSize;\n return bf.getFontDescriptor(BaseFont.AWT_ASCENT, fontSize) - bf.getFontDescriptor(BaseFont.AWT_DESCENT, fontSize) + bf.getFontDescriptor(BaseFont.AWT_LEADING, fontSize) + fontSize / 4f;\n}\n"
"public void onDestroy() {\n super.onDestroy();\n Log.d(TAG, \"String_Node_Str\");\n mIBusService.removeCallback(mIBusUpdateListener);\n releaseWakelock();\n if (mIBusBound) {\n unbindServices();\n }\n getActivity().unregisterReceiver(receiver);\n}\n"
"public void activateVision(IVampireVision vision) {\n if (vision != null && !isRemote() && ((GeneralRegistryImpl) VampirismAPI.vampireVisionRegistry()).getIdOfVision(vision) == -1) {\n throw new IllegalArgumentException(\"String_Node_Str\" + vision);\n }\n if (!Objects.equals(activatedVision, vision)) {\n if (activatedVision != null) {\n activatedVision.onDeactivated(this);\n }\n activatedVision = vision;\n if (vision != null) {\n vision.onActivated(this);\n }\n if (!isRemote()) {\n NBTTagCompound nbt = new NBTTagCompound();\n nbt.setInteger(KEY_VISION, activatedVision == null ? -1 : ((GeneralRegistryImpl) VampirismAPI.vampireVisionRegistry()).getIdOfVision(activatedVision));\n this.sync(nbt, false);\n }\n }\n}\n"
"Bitmap screenshotApplicationsInner(IBinder appToken, int displayId, int width, int height, boolean includeFullDisplay, float frameScale, Bitmap.Config config) {\n final DisplayContent displayContent;\n synchronized (mWindowMap) {\n displayContent = getDisplayContentLocked(displayId);\n if (displayContent == null) {\n if (DEBUG_SCREENSHOT)\n Slog.i(TAG_WM, \"String_Node_Str\" + appToken + \"String_Node_Str\" + displayId);\n return null;\n }\n }\n final DisplayInfo displayInfo = displayContent.getDisplayInfo();\n int dw = displayInfo.logicalWidth;\n int dh = displayInfo.logicalHeight;\n if (dw == 0 || dh == 0) {\n if (DEBUG_SCREENSHOT)\n Slog.i(TAG_WM, \"String_Node_Str\" + appToken + \"String_Node_Str\" + dw + \"String_Node_Str\" + dh);\n return null;\n }\n Bitmap bm = null;\n int maxLayer = 0;\n final Rect frame = new Rect();\n final Rect stackBounds = new Rect();\n boolean screenshotReady;\n int minLayer;\n if (appToken == null) {\n screenshotReady = true;\n minLayer = 0;\n } else {\n screenshotReady = false;\n minLayer = Integer.MAX_VALUE;\n }\n WindowState appWin = null;\n boolean appIsImTarget;\n synchronized (mWindowMap) {\n appIsImTarget = mInputMethodTarget != null && mInputMethodTarget.mAppToken != null && mInputMethodTarget.mAppToken.appToken != null && mInputMethodTarget.mAppToken.appToken.asBinder() == appToken;\n }\n final int aboveAppLayer = (mPolicy.windowTypeToLayerLw(TYPE_APPLICATION) + 1) * TYPE_LAYER_MULTIPLIER + TYPE_LAYER_OFFSET;\n synchronized (mWindowMap) {\n appWin = null;\n final WindowList windows = displayContent.getWindowList();\n for (int i = windows.size() - 1; i >= 0; i--) {\n WindowState ws = windows.get(i);\n if (!ws.mHasSurface) {\n continue;\n }\n if (ws.mLayer >= aboveAppLayer) {\n continue;\n }\n if (ws.mIsImWindow) {\n if (!appIsImTarget) {\n continue;\n }\n } else if (ws.mIsWallpaper) {\n if (appWin == null) {\n continue;\n }\n } else if (appToken != null) {\n if (ws.mAppToken == null || ws.mAppToken.token != appToken) {\n continue;\n }\n appWin = ws;\n }\n final WindowStateAnimator winAnim = ws.mWinAnimator;\n int layer = winAnim.mSurfaceController.getLayer();\n if (maxLayer < layer) {\n maxLayer = layer;\n }\n if (minLayer > layer) {\n minLayer = layer;\n }\n if (!includeFullDisplay && !ws.mIsWallpaper) {\n final Rect wf = ws.mFrame;\n final Rect cr = ws.mContentInsets;\n int left = wf.left + cr.left;\n int top = wf.top + cr.top;\n int right = wf.right - cr.right;\n int bottom = wf.bottom - cr.bottom;\n frame.union(left, top, right, bottom);\n ws.getVisibleBounds(stackBounds);\n if (!Rect.intersects(frame, stackBounds)) {\n frame.setEmpty();\n }\n }\n if (ws.mAppToken != null && ws.mAppToken.token == appToken && ws.isDisplayedLw() && winAnim.getShown()) {\n screenshotReady = true;\n }\n if (ws.isObscuringFullscreen(displayInfo)) {\n break;\n }\n }\n if (appToken != null && appWin == null) {\n if (DEBUG_SCREENSHOT)\n Slog.i(TAG_WM, \"String_Node_Str\" + appToken);\n return null;\n }\n if (!screenshotReady) {\n Slog.i(TAG_WM, \"String_Node_Str\" + appToken + \"String_Node_Str\" + (appWin == null ? \"String_Node_Str\" : (appWin + \"String_Node_Str\" + appWin.mWinAnimator.mDrawState)));\n return null;\n }\n if (maxLayer == 0) {\n if (DEBUG_SCREENSHOT)\n Slog.i(TAG_WM, \"String_Node_Str\" + appToken + \"String_Node_Str\" + maxLayer);\n return null;\n }\n if (!includeFullDisplay) {\n if (!frame.intersect(0, 0, dw, dh)) {\n frame.setEmpty();\n }\n } else {\n frame.set(0, 0, dw, dh);\n }\n if (frame.isEmpty()) {\n return null;\n }\n if (width < 0) {\n width = (int) (frame.width() * frameScale);\n }\n if (height < 0) {\n height = (int) (frame.height() * frameScale);\n }\n Rect crop = new Rect(frame);\n if (width / (float) frame.width() < height / (float) frame.height()) {\n int cropWidth = (int) ((float) width / (float) height * frame.height());\n crop.right = crop.left + cropWidth;\n } else {\n int cropHeight = (int) ((float) height / (float) width * frame.width());\n crop.bottom = crop.top + cropHeight;\n }\n int rot = getDefaultDisplayContentLocked().getDisplay().getRotation();\n if (rot == Surface.ROTATION_90 || rot == Surface.ROTATION_270) {\n rot = (rot == Surface.ROTATION_90) ? Surface.ROTATION_270 : Surface.ROTATION_90;\n }\n convertCropForSurfaceFlinger(crop, rot, dw, dh);\n if (DEBUG_SCREENSHOT) {\n Slog.i(TAG_WM, \"String_Node_Str\" + dw + \"String_Node_Str\" + dh + \"String_Node_Str\" + minLayer + \"String_Node_Str\" + maxLayer + \"String_Node_Str\" + appToken);\n for (int i = 0; i < windows.size(); i++) {\n WindowState win = windows.get(i);\n WindowSurfaceController controller = win.mWinAnimator.mSurfaceController;\n Slog.i(TAG_WM, win + \"String_Node_Str\" + win.mLayer + \"String_Node_Str\" + win.mWinAnimator.mAnimLayer + \"String_Node_Str\" + ((controller == null) ? \"String_Node_Str\" : controller.getLayer()));\n }\n }\n ScreenRotationAnimation screenRotationAnimation = mAnimator.getScreenRotationAnimationLocked(Display.DEFAULT_DISPLAY);\n final boolean inRotation = screenRotationAnimation != null && screenRotationAnimation.isAnimating();\n if (DEBUG_SCREENSHOT && inRotation)\n Slog.v(TAG_WM, \"String_Node_Str\");\n bm = SurfaceControl.screenshot(crop, width, height, minLayer, maxLayer, inRotation, rot);\n if (bm == null) {\n Slog.w(TAG_WM, \"String_Node_Str\" + dw + \"String_Node_Str\" + dh + \"String_Node_Str\" + maxLayer);\n return null;\n }\n }\n if (DEBUG_SCREENSHOT) {\n int[] buffer = new int[bm.getWidth() * bm.getHeight()];\n bm.getPixels(buffer, 0, bm.getWidth(), 0, 0, bm.getWidth(), bm.getHeight());\n boolean allBlack = true;\n final int firstColor = buffer[0];\n for (int i = 0; i < buffer.length; i++) {\n if (buffer[i] != firstColor) {\n allBlack = false;\n break;\n }\n }\n if (allBlack) {\n Slog.i(TAG_WM, \"String_Node_Str\" + appWin + \"String_Node_Str\" + Integer.toHexString(firstColor) + \"String_Node_Str\" + (appWin != null ? appWin.mWinAnimator.mSurfaceController.getLayer() : \"String_Node_Str\") + \"String_Node_Str\" + minLayer + \"String_Node_Str\" + maxLayer);\n }\n }\n Bitmap ret = bm.createAshmemBitmap(config);\n bm.recycle();\n return ret;\n}\n"
"public void addObjectToCache(Object obj, Node node, XMLMapping selfRecordMapping) {\n if (obj == null || node.getNodeType() != Node.ELEMENT_NODE) {\n return;\n }\n AbstractSession session = context.getSession(obj);\n XMLDescriptor xmlDescriptor = (XMLDescriptor) session.getDescriptor(obj);\n DOMRecord row = new DOMRecord((Element) node);\n row.setSession(session);\n Object pk = xmlDescriptor.getObjectBuilder().extractPrimaryKeyFromRow(row, session);\n if (xmlDescriptor.shouldPreserveDocument() || xmlDescriptor.getPrimaryKeyFieldNames().size() > 0) {\n if ((pk == null) || (((CacheId) pk).getPrimaryKey().length == 0)) {\n pk = new CacheId(new Object[] { new WeakObjectWrapper(obj) });\n }\n CacheKey key = session.getIdentityMapAccessorInstance().acquireDeferredLock(pk, xmlDescriptor.getJavaClass(), xmlDescriptor);\n if ((xmlDescriptor).shouldPreserveDocument()) {\n key.setRecord(row);\n }\n key.setObject(obj);\n key.releaseDeferredLock();\n }\n}\n"
"public void onCreate() {\n listener = new LocationListener() {\n\n public void onLocationChanged(Location location) {\n if (lastLocation == null) {\n lastLocation = location;\n }\n distanceInMeters += location.distanceTo(lastLocation);\n lastLocation = location;\n }\n public void onProviderDisabled(String arg0) {\n }\n public void onProviderEnabled(String arg0) {\n }\n public void onStatusChanged(String arg0, int arg1, Bundle bundle) {\n }\n };\n LocationManager locManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n locManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 1, listener);\n}\n"
"public Set<CartridgeSubscription> getCartridgeSubscription(String clusterId) {\n LookupDataHolder.getInstance().acquireReadLock();\n try {\n CartridgeSubscription cartridgeSubscription = LookupDataHolder.getInstance().getSubscriptionForAlias(tenantId, subscriptionAlias);\n return cartridgeSubscription;\n } finally {\n LookupDataHolder.getInstance().releaseReadLock();\n }\n}\n"
"public void initialise() {\n final UITooltip tooltip = new UITooltip();\n boolean testBoolean = true;\n windowHeight = config.getRendering().getWindowHeight();\n windowWidth = config.getRendering().getWindowWidth();\n UIDropdown<Preset> videoQuality = find(\"String_Node_Str\", UIDropdown.class);\n if (videoQuality != null) {\n videoQuality.setOptions(Lists.newArrayList(VideoQuality.NICE, VideoQuality.EPIC, VideoQuality.INSANE, VideoQuality.UBER));\n videoQuality.bindSelection(new VideoQualityBinding(config.getRendering()));\n }\n UIDropdown<EnvironmentalEffects> environmentalEffects = find(\"String_Node_Str\", UIDropdown.class);\n if (environmentalEffects != null) {\n environmentalEffects.setOptions(Lists.newArrayList(EnvironmentalEffects.OFF, EnvironmentalEffects.LOW, EnvironmentalEffects.HIGH));\n environmentalEffects.bindSelection(new EnvironmentEffectsBinding(config.getRendering()));\n }\n UIDropdown<ViewDistance> viewDistance = find(\"String_Node_Str\", UIDropdown.class);\n if (viewDistance != null) {\n viewDistance.setOptions(Arrays.asList(ViewDistance.values()));\n viewDistance.bindSelection(BindHelper.bindBeanProperty(\"String_Node_Str\", config.getRendering(), ViewDistance.class));\n }\n UIDropdown<WaterReflection> waterReflection = find(\"String_Node_Str\", UIDropdown.class);\n if (waterReflection != null) {\n waterReflection.setOptions(Lists.newArrayList(WaterReflection.SKY, WaterReflection.GLOBAL, WaterReflection.LOCAL));\n waterReflection.bindSelection(new WaterReflectionBinding(config.getRendering()));\n }\n UIDropdown<Integer> blur = find(\"String_Node_Str\", UIDropdown.class);\n if (blur != null) {\n blur.setOptions(Lists.newArrayList(0, 1, 2, 3));\n blur.bindSelection(BindHelper.bindBeanProperty(\"String_Node_Str\", config.getRendering(), Integer.TYPE));\n blur.setOptionRenderer(new StringTextRenderer<Integer>() {\n public String getString(Integer value) {\n switch(value) {\n case 1:\n return \"String_Node_Str\";\n case 2:\n return \"String_Node_Str\";\n case 3:\n return \"String_Node_Str\";\n default:\n return \"String_Node_Str\";\n }\n }\n });\n }\n UIDropdown<DynamicShadows> dynamicShadows = find(\"String_Node_Str\", UIDropdown.class);\n if (dynamicShadows != null) {\n dynamicShadows.setOptions(Arrays.asList(DynamicShadows.values()));\n dynamicShadows.bindSelection(new DynamicShadowsBinding(config.getRendering()));\n }\n UISlider fovSlider = find(\"String_Node_Str\", UISlider.class);\n if (fovSlider != null) {\n fovSlider.setIncrement(5.0f);\n fovSlider.setPrecision(0);\n fovSlider.setMinimum(70);\n fovSlider.setRange(50);\n fovSlider.bindValue(BindHelper.bindBeanProperty(\"String_Node_Str\", config.getRendering(), Float.TYPE));\n }\n UIDropdown<CameraSetting> cameraSetting = find(\"String_Node_Str\", UIDropdown.class);\n if (cameraSetting != null) {\n cameraSetting.setOptions(Arrays.asList(CameraSetting.values()));\n cameraSetting.bindSelection(new CameraSettingBinding(config.getRendering()));\n }\n WidgetUtil.tryBindCheckbox(this, \"String_Node_Str\", BindHelper.bindBeanProperty(\"String_Node_Str\", engine, Boolean.TYPE));\n WidgetUtil.tryBindCheckbox(this, \"String_Node_Str\", BindHelper.bindBeanProperty(\"String_Node_Str\", config.getRendering(), Boolean.TYPE));\n WidgetUtil.tryBindCheckbox(this, \"String_Node_Str\", BindHelper.bindBeanProperty(\"String_Node_Str\", config.getRendering(), Boolean.TYPE));\n WidgetUtil.tryBindCheckbox(this, \"String_Node_Str\", BindHelper.bindBeanProperty(\"String_Node_Str\", config.getRendering(), Boolean.TYPE));\n WidgetUtil.trySubscribe(this, \"String_Node_Str\", new ActivateEventListener() {\n public void onActivated(UIWidget button) {\n getManager().popScreen();\n }\n });\n}\n"
"private void updateAndStoreManifest(BuildRule rule, RuleKey key, ImmutableSet<SourcePath> inputs, ArtifactCache cache) throws IOException, InterruptedException {\n Preconditions.checkState(useManifestCaching(rule));\n Pair<RuleKey, ImmutableSet<SourcePath>> manifestKey = ruleKeyFactories.getUnchecked(rule.getProjectFilesystem()).depFileRuleKeyBuilderFactory.buildManifestKey(rule);\n final Path manifestPath = getManifestPath(rule);\n Manifest manifest = new Manifest();\n if (rule.getProjectFilesystem().exists(manifestPath)) {\n try (InputStream inputStream = rule.getProjectFilesystem().newFileInputStream(manifestPath)) {\n manifest = new Manifest(inputStream);\n }\n }\n if (manifest.size() >= maxDepFileCacheEntries) {\n manifest = new Manifest();\n }\n manifest.addEntry(fileHashCaches.getUnchecked(rule.getProjectFilesystem()), key, pathResolver, manifestKey.getSecond(), inputs);\n try (OutputStream outputStream = rule.getProjectFilesystem().newFileOutputStream(manifestPath)) {\n manifest.serialize(outputStream);\n }\n try (NamedTemporaryFile tempFile = new NamedTemporaryFile(\"String_Node_Str\", \"String_Node_Str\")) {\n try (InputStream inputStream = rule.getProjectFilesystem().newFileInputStream(manifestPath);\n OutputStream outputStream = new GZIPOutputStream(new BufferedOutputStream(Files.newOutputStream(tempFile.get())))) {\n ByteStreams.copy(inputStream, outputStream);\n }\n cache.store(ImmutableSet.of(manifestKey.getFirst()), ImmutableMap.<String, String>of(), tempFile.get());\n }\n}\n"
"public void deletePeriod(long periodId) throws DataBaseException {\n EntityManager entityManager = null;\n EntityTransaction transaction = null;\n try {\n entityManager = getEntityManagerFactory().createEntityManager();\n transaction = entityManager.getTransaction();\n transaction.begin();\n getServiceFactory().getPeriodsService().delete(entityManager, periodId);\n transaction.commit();\n } catch (DataBaseException exception) {\n getServiceFactory().getLogService().error(exception.getMessage(), exception);\n FacadesHelper.rollbackTransactionAndCloseEntityManager(entityManager, transaction, exception);\n } finally {\n FacadesHelper.closeEntityManager(entityManager);\n }\n}\n"
"public void run() throws IOException {\n FileUtils.mkdir(outputDir.getAbsolutePath());\n final List<File> tests = FileUtils.getFiles(baseDir, includes, excludes);\n if (tests.isEmpty()) {\n logger.warn(\"String_Node_Str\");\n return;\n }\n logger.info(\"String_Node_Str\", tests.size());\n threadCount = Math.min(threadCount, tests.size());\n logger.info(\"String_Node_Str\", threadCount);\n logger.info(\"String_Node_Str\", outputStrategy);\n if (!includeInlineScripts) {\n noInstrumentPatterns.add(inlineScriptRe);\n noInstrumentPatterns.add(\"String_Node_Str\");\n noInstrumentPatterns.add(\"String_Node_Str\");\n }\n if (!noInstrumentPatterns.isEmpty()) {\n logger.info(\"String_Node_Str\", StringUtils.join(noInstrumentPatterns, \"String_Node_Str\"));\n }\n final Set<Pattern> ignorePatterns = createPatterns();\n final ExecutorService executorService = Executors.newFixedThreadPool(threadCount);\n final CompletionService<RunStats> completionService = new ExecutorCompletionService<RunStats>(executorService);\n for (final File test : tests) {\n completionService.submit(new Callable<RunStats>() {\n public RunStats call() {\n logger.info(\"String_Node_Str\", test.getAbsoluteFile().toURI().normalize().getPath());\n try {\n final RunStats runStats = runTest(test, ignorePatterns);\n if (runStats == RunStats.EMPTY) {\n logger.warn(\"String_Node_Str\", test);\n } else if (outputStrategy.contains(OutputStrategy.PER_TEST)) {\n writeRunStats(runStats);\n }\n return runStats;\n } catch (final IOException e) {\n return RunStats.EMPTY;\n }\n }\n });\n }\n final List<RunStats> allRunStats = Lists.newLinkedList();\n try {\n for (final File test : tests) {\n try {\n final Future<RunStats> future = completionService.take();\n final RunStats runStats = future.get();\n allRunStats.add(runStats);\n } catch (final Exception e) {\n logger.warn(\"String_Node_Str\", test.getAbsolutePath(), e.getMessage());\n logger.debug(e.getMessage(), e);\n }\n }\n } finally {\n executorService.shutdown();\n }\n logger.info(\"String_Node_Str\");\n if (outputStrategy.contains(OutputStrategy.TOTAL)) {\n final RunStats totalStats = new RunStats(new File(outputDir, reportName), \"String_Node_Str\");\n if (sourcesToPreload != null) {\n final List<File> filesToPreload = FileUtils.getFiles(baseDir, sourcesToPreload, null);\n final WebClient webClient = localClient.get();\n final ScriptInstrumenter instrumenter = new ScriptInstrumenter(webClient.getJavaScriptEngine().getContextFactory(), coverageVariableName);\n for (final File file : filesToPreload) {\n instrumenter.preProcess(null, org.apache.commons.io.FileUtils.readFileToString(file), \"String_Node_Str\" + file.getAbsolutePath(), 0, null);\n }\n for (final ScriptData data : instrumenter.getScriptDataList()) {\n final Map<Integer, Double> coverageData = Maps.newHashMap();\n for (final Integer lineNumber : data.getLineNumbersOfAllStatements()) {\n coverageData.put(lineNumber, 0D);\n }\n final FileStats fileStats = getFileStatsFromScriptData(coverageData, data);\n totalStats.add(fileStats);\n }\n }\n for (final RunStats runStats : allRunStats) {\n if (runStats != RunStats.EMPTY) {\n for (final FileStats fileStats : runStats) {\n totalStats.add(fileStats);\n }\n }\n }\n writeRunStats(totalStats);\n }\n}\n"
"public void addText(String text) {\n this.text = text;\n}\n"
"protected String tab(final int n) {\n final StringBuilder sb = new StringBuilder();\n for (int i = 0; i < tabulations + n; i++) {\n str += TAB;\n }\n tabulations += n;\n return str;\n}\n"
"protected void saveOneColumn(Document document, IMetadataColumn metadataColumn, Element column) {\n super.saveOneColumn(document, metadataColumn, column);\n if (metadataColumn instanceof MetadataColumnExt) {\n MetadataColumnExt columnExt = (MetadataColumnExt) metadataColumn;\n Attr function = document.createAttribute(\"String_Node_Str\");\n function.setNodeValue(funManager.getFunctionLable(columnExt.getFunction()));\n column.setAttributeNode(function);\n Attr parameter = document.createAttribute(\"String_Node_Str\");\n parameter.setNodeValue(columnExt.getParameter());\n column.setAttributeNode(parameter);\n Attr preview = document.createAttribute(\"String_Node_Str\");\n preview.setNodeValue(columnExt.getPreview());\n column.setAttributeNode(preview);\n }\n}\n"
"private void repositionBlogInfoView() {\n if (mBlogInfoView == null) {\n return;\n }\n int scrollPos = mListView.getVerticalScrollOffset();\n mBlogInfoView.scaleMshotImageBasedOnScrollPos(scrollPos);\n int mshotBottom;\n if (mMshotSpacerView.getHeight() > 0) {\n mshotBottom = mMshotSpacerView.getTop() + mBlogInfoView.getMshotDefaultHeight();\n } else {\n mshotBottom = 0;\n }\n int infoTop = (mshotBottom < mActionBarHeight ? mActionBarHeight : mshotBottom);\n mBlogInfoView.setInfoContainerTop(infoTop);\n}\n"
"public void deleteRemovesAllGivenEntities() throws Exception {\n Collection<Entity> entities = createTestEntities();\n Collection<Key> keys = extractKeys(entities);\n for (Entity e : entities) {\n service.put(e);\n }\n for (Key k : keys) {\n service.delete(k);\n }\n assertStoreDoesNotContain(keys);\n}\n"
"public void manager_should_return_empty_list_when_no_books() {\n BookManager bookManager = new BookManager(bookCollection());\n List<Book> books = bookManager.findAll();\n assertThat(books, hasSize(0));\n}\n"
"public void onClick(View view) {\n final String[] itemStrings = new String[inFriends.size()];\n for (int i = 0; i < inFriends.size(); i++) {\n itemStrings[i] = inFriends.get(i).getName();\n }\n AlertDialog.Builder builder = new AlertDialog.Builder(OrderEditActivity.this);\n builder.setTitle(\"String_Node_Str\").setIcon(android.R.drawable.ic_lock_lock).setItems(itemStrings2, new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int which) {\n friends.add(inFriends.get(which));\n inFriends.remove(which);\n String tmp = \"String_Node_Str\";\n for (int i = 0; i < inFriends.size(); i++) {\n tmp += inFriends.get(i).getName() + \"String_Node_Str\";\n }\n friendList.setText(tmp);\n }\n }).create().show();\n}\n"
"public synchronized Database removeResource(final String name) {\n assertNotClosed();\n final Path resourceFile = mDBConfig.getFile().resolve(DatabaseConfiguration.DatabasePaths.DATA.getFile()).resolve(name);\n if (Databases.hasOpenResourceManagers(resourceFile)) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n if (Files.exists(resourceFile) && ResourceConfiguration.ResourcePaths.compareStructure(resourceFile) == 0) {\n SirixFiles.recursiveRemove(resourceFile);\n mBufferManagers.remove(resourceFile);\n }\n return this;\n}\n"
"private void update() {\n ArrayList<TableView> tableList = new ArrayList<>();\n ArrayList<MatchView> matchList = new ArrayList<>();\n List<Table> allTables = new ArrayList<>(tables.values());\n Collections.sort(allTables, new TableListSorter());\n for (Table table : allTables) {\n if (table.getState() != TableState.FINISHED) {\n tableList.add(new TableView(table));\n } else if (matchList.size() < 50) {\n if (table.isTournament()) {\n matchList.add(new MatchView(table));\n } else {\n matchList.add(new MatchView(table));\n }\n } else {\n if (table.isTournament()) {\n TournamentManager.getInstance().removeTournament(table.getTournament().getId());\n }\n this.removeTable(table.getId());\n }\n }\n tableView = tableList;\n matchView = matchList;\n List<UsersView> users = new ArrayList<>();\n for (User user : UserManager.getInstance().getUsers()) {\n try {\n users.add(new UsersView(user.getName(), user.getInfo(), user.getGameInfo(), user.getPingInfo()));\n } catch (Exception ex) {\n logger.fatal(\"String_Node_Str\" + user.getName() + \"String_Node_Str\" + ex.toString(), ex);\n users.add(new UsersView(user.getName(), user.getInfo(), \"String_Node_Str\", user.getPingInfo()));\n }\n }\n Collections.sort(users, new UserNameSorter());\n List<RoomUsersView> roomUserInfo = new ArrayList<>();\n roomUserInfo.add(new RoomUsersView(users, GameManager.getInstance().getNumberActiveGames()));\n roomUsersView = roomUserInfo;\n}\n"
"public static int getY() {\n return (int) -((org.lwjgl.input.Mouse.getY() - Main.HEIGHT / 2) * WorldRenderer.scale - WorldRenderer.focalPoint.y);\n}\n"
"public void handleEvent(Event event) {\n switch(event.type) {\n case SWT.Dispose:\n case SWT.KeyDown:\n case SWT.MouseMove:\n {\n if (tip == null) {\n break;\n tip.dispose();\n tip = null;\n label = null;\n break;\n }\n case SWT.MouseHover:\n {\n TreeItem item = table.getItem(new Point(event.x, event.y));\n if (item != null) {\n if (tip != null && !tip.isDisposed()) {\n tip.dispose();\n }\n String content = getTooltipContent(item);\n if (content == null) {\n return;\n }\n tip = new Shell(table.getShell(), SWT.ON_TOP | SWT.TOOL);\n tip.setLayout(new FillLayout());\n label = new Label(tip, SWT.NONE);\n label.setForeground(table.getShell().getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));\n label.setBackground(table.getShell().getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));\n label.setData(\"String_Node_Str\", item);\n label.setText(content);\n label.addListener(SWT.MouseExit, labelListener);\n label.addListener(SWT.MouseDown, labelListener);\n checkShellBounds(tip, event);\n tip.setVisible(true);\n }\n }\n }\n}\n"
"public StackDescription describeStack(User user, Stack stack, Credential credential) {\n AwsTemplate awsTemplate = (AwsTemplate) stack.getTemplate();\n AwsCredential awsCredential = (AwsCredential) credential;\n DescribeStacksResult stackResult = null;\n DescribeInstancesResult instancesResult = null;\n try {\n AmazonCloudFormationClient client = awsStackUtil.createCloudFormationClient(awsTemplate.getRegion(), awsCredential);\n DescribeStacksRequest stackRequest = new DescribeStacksRequest().withStackName(resource.getResourceName());\n stackResult = client.describeStacks(stackRequest);\n } catch (AmazonServiceException e) {\n if (CF_SERVICE_NAME.equals(e.getServiceName()) && e.getErrorMessage().equals(String.format(\"String_Node_Str\", stack.getResourcesbyType(ResourceType.CLOUDFORMATION_TEMPLATE_NAME).get(0).getResourceName()))) {\n LOGGER.error(\"String_Node_Str\", stack.getResourcesbyType(ResourceType.CLOUDFORMATION_TEMPLATE_NAME).get(0).getResourceName());\n stackResult = new DescribeStacksResult();\n } else {\n throw e;\n }\n }\n AmazonEC2Client ec2Client = awsStackUtil.createEC2Client(awsTemplate.getRegion(), awsCredential);\n DescribeInstancesRequest instancesRequest = new DescribeInstancesRequest().withFilters(new Filter().withName(\"String_Node_Str\" + INSTANCE_TAG_NAME).withValues(stack.getResourcesbyType(ResourceType.CLOUDFORMATION_TEMPLATE_NAME).get(0).getResourceName()));\n instancesResult = ec2Client.describeInstances(instancesRequest);\n return new AwsStackDescription(stackResult, instancesResult);\n}\n"
"public void init(PageContentProvider provider, MediaSize mediaSize, Margins minMargins) {\n final boolean providerChanged = (mProvider == null) ? provider != null : !mProvider.equals(provider);\n final boolean mediaSizeChanged = (mMediaSize == null) ? mediaSize != null : !mMediaSize.equals(mediaSize);\n final boolean marginsChanged = (mMinMargins == null) ? minMargins != null : !mMinMargins.equals(minMargins);\n if (!providerChanged && !mediaSizeChanged && !marginsChanged) {\n return;\n }\n mProvider = provider;\n mAttributes.setMediaSize(mediaSize);\n mAttributes.setMinMargins(minMargins);\n mContentRequested = false;\n if (mProvider == null && getBackground() != mEmptyState) {\n setBackground(mEmptyState);\n }\n requestPageContentIfNeeded();\n}\n"
"private PatchCameraBuilder buildPatchCameraWithLocalCheck() {\n PatchCameraBuilder patchCameraBuilder = null;\n try {\n patchCameraBuilder = new PatchCameraBuilder(cameraEdit.getCameraId());\n } catch (EvercamException e) {\n Log.e(TAG, e.toString());\n }\n String cameraName = cameraNameEdit.getText().toString();\n if (cameraName.isEmpty()) {\n CustomToast.showInCenter(this, getString(R.string.name_required));\n return null;\n } else if (!cameraName.equals(cameraEdit.getName())) {\n patchCameraBuilder.setName(cameraName);\n }\n String vendorId = getVendorIdFromSpinner();\n patchCameraBuilder.setVendor(vendorId);\n String modelName = getModelIdFromSpinner();\n patchCameraBuilder.setModel(modelName);\n String username = usernameEdit.getText().toString();\n String password = passwordEdit.getText().toString();\n if (!username.equals(cameraEdit.getUsername()) || !password.equals(cameraEdit.getPassword())) {\n patchCameraBuilder.setCameraUsername(username);\n patchCameraBuilder.setCameraPassword(password);\n }\n String externalHost = externalHostEdit.getText().toString();\n String internalHost = internalHostEdit.getText().toString();\n if (externalHost.isEmpty() && internalHost.isEmpty()) {\n CustomToast.showInCenter(this, getString(R.string.host_required));\n return null;\n } else {\n patchCameraBuilder.setInternalHost(internalHost);\n String internalHttp = internalHttpEdit.getText().toString();\n if (!internalHttp.isEmpty()) {\n int internalHttpInt = Integer.valueOf(internalHttp);\n patchCameraBuilder.setInternalHttpPort(internalHttpInt);\n }\n String internalRtsp = internalRtspEdit.getText().toString();\n if (!internalRtsp.isEmpty()) {\n int internalRtspInt = Integer.valueOf(internalRtsp);\n patchCameraBuilder.setInternalRtspPort(internalRtspInt);\n }\n patchCameraBuilder.setExternalHost(externalHost);\n String externalHttp = externalHttpEdit.getText().toString();\n if (!externalHttp.isEmpty()) {\n int externalHttpInt = Integer.valueOf(externalHttp);\n patchCameraBuilder.setExternalHttpPort(externalHttpInt);\n }\n String externalRtsp = externalRtspEdit.getText().toString();\n if (!externalRtsp.isEmpty()) {\n int externalRtspInt = Integer.valueOf(externalRtsp);\n patchCameraBuilder.setExternalRtspPort(externalRtspInt);\n }\n }\n String jpgUrl = buildJpgUrlWithSlash(jpgUrlEdit.getText().toString());\n if (jpgUrl.equals(cameraEdit.getJpgPath())) {\n patchCameraBuilder.setJpgUrl(jpgUrl);\n }\n return patchCameraBuilder;\n}\n"
"public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime * result + ((name == null) ? 0 : toGhName().hashCode());\n return result;\n}\n"
"public static void error(Exception exception, boolean display, boolean terminate) {\n String message = getErrorMessage(exception);\n Logging.error(message);\n if (display) {\n Threads.runLaterFx(0, () -> {\n Notifications.create().title(\"String_Node_Str\" + exception.getClass().getSimpleName()).text(message).hideAfter(Duration.seconds(5)).showError();\n });\n }\n if (terminate) {\n System.exit(0);\n }\n}\n"
"public boolean rollbackTx() throws Exception {\n currentTx = null;\n return super.rollbackTx();\n}\n"