content
stringlengths
40
137k
"public BankOrder save(BankOrder entity) {\n try {\n BankOrderService bankOrderService = Beans.get(BankOrderService.class);\n bankOrderService.generateSequence(entity);\n if (entity.getGeneratedMetaFile() == null && entity.getStatusSelect() == BankOrderRepository.STATUS_DRAFT) {\n bankOrderService.updateTotalAmounts(entity);\n }\n return super.save(entity);\n } catch (Exception e) {\n throw new PersistenceException(e.getLocalizedMessage());\n }\n}\n"
"public AtsSearchData fromJson(String namespace, String jsonValue) {\n try {\n return AtsJsonFactory.getMapper().readValue(jsonValue, AtsSearchData.class);\n } catch (Exception ex) {\n throw new OseeArgumentException(ex, \"String_Node_Str\", jsonValue);\n }\n return null;\n}\n"
"public static String getRecordTmpPath() {\n return new File(getChatFileDir(), \"String_Node_Str\").getAbsolutePath();\n}\n"
"public Move doMove(Game game, Move move) throws InvalidMoveException {\n move = em.merge(move);\n game = em.find(game.getClass(), game.getId());\n game.setMessageSender(messageSender);\n game.move(move);\n em.flush();\n if (move.getStatus().equals(MoveStatus.INVALID))\n throw new InvalidMoveException(\"String_Node_Str\" + move.toString() + \"String_Node_Str\");\n List<GamePlayer> players = game.listPlayers();\n for (int i = 0; i < players.size(); i++) {\n GamePlayer p = players.get(i);\n if (p instanceof Agent) {\n Agent a = (Agent) p;\n if (a.ready()) {\n List<Move> moves = a.determineMoves(game);\n for (Move m : moves) {\n game.move(m);\n if (m.getStatus() != MoveStatus.INVALID) {\n em.flush();\n break;\n }\n }\n }\n }\n }\n return move;\n}\n"
"public Project[] getProjects(ConnectionBean connBean, ErrorManager errorManager) {\n if (connBean == null) {\n return null;\n }\n Project[] projects = null;\n if (connBean != null) {\n String user2 = connBean.getUser();\n String repositoryId2 = connBean.getRepositoryId();\n String workSpace = connBean.getWorkSpace();\n String name = connBean.getName();\n if (user2 != null && !\"String_Node_Str\".equals(user2) && repositoryId2 != null && !\"String_Node_Str\".equals(repositoryId2) && workSpace != null && !\"String_Node_Str\".equals(workSpace) && name != null && !\"String_Node_Str\".equals(name)) {\n boolean valid = Pattern.matches(RepositoryConstants.MAIL_PATTERN, user2);\n if (valid || RepositoryConstants.REPOSITORY_REMOTE_ID.equals(repositoryId2)) {\n String url = connBean.getDynamicFields().get(RepositoryConstants.REPOSITORY_URL);\n valid = url != null || !\"String_Node_Str\".equals(url);\n }\n connBean.setComplete(valid);\n }\n }\n ProxyRepositoryFactory repositoryFactory = ProxyRepositoryFactory.getInstance();\n repositoryFactory.setRepositoryFactoryFromProvider(RepositoryFactoryProvider.getRepositoriyById(connBean.getRepositoryId()));\n if (!connBean.isComplete()) {\n return projects;\n }\n boolean initialized = false;\n final String newLine = \"String_Node_Str\";\n try {\n try {\n repositoryFactory.checkAvailability();\n } catch (WarningException e) {\n String warnings = e.getMessage();\n if (warnings != null && !warnings.equals(lastWarnings)) {\n lastWarnings = warnings;\n if (errorManager != null) {\n errorManager.setWarnMessage(warnings);\n } else {\n final Shell shell = new Shell(DisplayUtils.getDisplay(), SWT.ON_TOP | SWT.TOP);\n MessageDialog.openWarning(shell, Messages.getString(\"String_Node_Str\"), warnings);\n }\n }\n }\n OverTimePopupDialogTask<Boolean> overTimePopupDialogTask = new OverTimePopupDialogTask<Boolean>() {\n public Boolean run() throws Throwable {\n ProxyRepositoryFactory.getInstance().initialize();\n return null;\n }\n };\n overTimePopupDialogTask.setNeedWaitingProgressJob(false);\n overTimePopupDialogTask.runTask();\n initialized = true;\n } catch (Throwable e) {\n projects = new Project[0];\n if (errorManager != null) {\n errorManager.setErrMessage(Messages.getString(\"String_Node_Str\") + newLine + e.getMessage());\n } else {\n final Shell shell = new Shell(DisplayUtils.getDisplay(), SWT.ON_TOP | SWT.TOP);\n MessageDialog.openError(shell, Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\") + newLine + e.getMessage());\n }\n }\n if (initialized) {\n try {\n OverTimePopupDialogTask<Project[]> overTimePopupDialogTask = new OverTimePopupDialogTask<Project[]>() {\n public Project[] run() throws Throwable {\n return ProxyRepositoryFactory.getInstance().readProject();\n }\n };\n overTimePopupDialogTask.setNeedWaitingProgressJob(false);\n projects = overTimePopupDialogTask.runTask();\n Arrays.sort(projects, new Comparator<Project>() {\n public int compare(Project p1, Project p2) {\n return p1.getLabel().compareTo(p2.getLabel());\n }\n });\n } catch (PersistenceException e) {\n projects = new Project[0];\n if (errorManager != null) {\n errorManager.setErrMessage(Messages.getString(\"String_Node_Str\") + newLine + e.getMessage());\n } else {\n MessageDialog.openError(getUsableShell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\") + newLine + e.getMessage());\n }\n } catch (BusinessException e) {\n projects = new Project[0];\n if (errorManager != null) {\n errorManager.setErrMessage(Messages.getString(\"String_Node_Str\") + newLine + e.getMessage());\n } else {\n MessageDialog.openError(getUsableShell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\") + newLine + e.getMessage());\n }\n } catch (Throwable e) {\n projects = new Project[0];\n if (errorManager != null) {\n errorManager.setErrMessage(Messages.getString(\"String_Node_Str\") + newLine + e.getMessage());\n } else {\n MessageDialog.openError(getUsableShell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\") + newLine + e.getMessage());\n }\n }\n }\n return projects;\n}\n"
"public void function() {\n final String expression = \"String_Node_Str\";\n final String error = \"String_Node_Str\";\n final String result = \"String_Node_Str\";\n final AlwaysSameResultTheRExecutor executor = new AlwaysSameResultTheRExecutor(TheRDebugConstants.DEBUGGING_IN + \"String_Node_Str\" + expression + \"String_Node_Str\" + DEBUG + \"String_Node_Str\" + \"String_Node_Str\" + SERVICE_FUNCTION_PREFIX + \"String_Node_Str\" + SERVICE_ENTER_FUNCTION_SUFFIX + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", DEBUGGING_IN, TextRange.EMPTY_RANGE, error);\n final MyFunctionDebugger debugger = new MyFunctionDebugger();\n final MockTheRFunctionDebuggerFactory factory = new MockTheRFunctionDebuggerFactory(debugger);\n final MockTheROutputReceiver outputReceiver = new MockTheROutputReceiver();\n final MockTheRExpressionHandler handler = new MockTheRExpressionHandler();\n final TheRDebuggerEvaluatorImpl evaluator = new TheRDebuggerEvaluatorImpl(executor, factory, outputReceiver, handler, 1);\n final TheRDebuggerEvaluatorReceiver receiver = new TheRDebuggerEvaluatorReceiver(result);\n evaluator.evalExpression(expression, receiver);\n assertEquals(1, executor.getCounter());\n assertEquals(2, debugger.getCounter());\n assertEquals(1, factory.getCounter());\n assertEquals(1, receiver.getCounter());\n assertEquals(Collections.singletonList(error), outputReceiver.getErrors());\n assertEquals(Collections.emptyList(), outputReceiver.getOutputs());\n assertEquals(1, handler.myCounter);\n assertEquals(expression, handler.myLastExpression);\n}\n"
"public ProgramNode parseProgram() {\n if (debug) {\n System.err.println(\"String_Node_Str\");\n }\n StatementListNode first = null;\n StatementListNode second = null;\n StatementListNode configs = null;\n if (!parsing_include) {\n config_namespaces.push_back(new HashSet<String>());\n config_namespaces.last().add(\"String_Node_Str\");\n configs = parseConfigValues();\n }\n while (lookahead(PACKAGE_TOKEN) || lookahead(DOCCOMMENT_TOKEN)) {\n MetaDataNode meta = null;\n if (lookahead(DOCCOMMENT_TOKEN) || lookahead(LEFTBRACKET_TOKEN) || lookahead(XMLLITERAL_TOKEN)) {\n meta = parseMetaData();\n second = nodeFactory.statementList(second, meta);\n }\n if (lookahead(PACKAGE_TOKEN)) {\n PackageDefinitionNode pkgdef = parsePackageDefinition();\n first = nodeFactory.statementList(first, pkgdef);\n if (meta != null) {\n meta.def = pkgdef;\n pkgdef.addMetaDataNode(meta);\n }\n if (pkgdef != null) {\n second = nodeFactory.statementList(second, pkgdef.statements);\n }\n }\n }\n second = parseDirectives(null, second);\n if ((ctx.dialect(10)) && !parsing_include && second != null) {\n Node udn = nodeFactory.useDirective(null, nodeFactory.memberExpression(null, nodeFactory.getExpression(nodeFactory.identifier(\"String_Node_Str\"))));\n second.items.add(0, udn);\n }\n if (ctx.statics.es4_vectors && !parsing_include && second != null) {\n PackageIdentifiersNode pin = nodeFactory.packageIdentifiers(null, nodeFactory.identifier(\"String_Node_Str\"), true);\n pin = nodeFactory.packageIdentifiers(pin, nodeFactory.identifier(\"String_Node_Str\"), true);\n pin = nodeFactory.packageIdentifiers(pin, nodeFactory.identifier(\"String_Node_Str\"), true);\n Node idn = nodeFactory.importDirective(null, nodeFactory.packageName(pin), null, ctx);\n if (second != null)\n second.items.add(0, idn);\n }\n ProgramNode result = nodeFactory.program(ctx, second, ctx.input.positionOfMark());\n match(EOS_TOKEN);\n if (ctx.scriptAssistParsing) {\n for (ListIterator<Node> it = comments.listIterator(); it.hasNext(); ) {\n ctx.comments.add(it.next());\n }\n }\n clearUnusedBuffers();\n if (!parsing_include) {\n if (result != null) {\n if (configs != null)\n result.statements.items.addAll(0, configs.items);\n NamespaceDefinitionNode configdef = nodeFactory.configNamespaceDefinition(null, nodeFactory.identifier(\"String_Node_Str\"), -1);\n result.statements.items.add(0, configdef);\n }\n config_namespaces.pop_back();\n }\n if (debug) {\n System.err.println(\"String_Node_Str\");\n }\n return result;\n}\n"
"protected EntityReader getReader() {\n if (reader == null) {\n reader = new Neo4JEntityReader();\n }\n return reader;\n}\n"
"public void handle(DeleteCommand command) {\n String key;\n try {\n key = URLDecoder.decode(command.getKey(), \"String_Node_Str\");\n } catch (UnsupportedEncodingException e) {\n logger.log(Level.WARNING, e.getMessage(), e);\n }\n String mapName = \"String_Node_Str\";\n int index = key.indexOf(':');\n if (index != -1) {\n mapName = key.substring(0, index);\n key = key.substring(index + 1);\n }\n command.setResponse(DELETED);\n if (command.shouldReply()) {\n textCommandService.sendResponse(command);\n }\n textCommandService.incrementDeleteCount();\n textCommandService.delete(mapName, key);\n}\n"
"public void openStartElement(XPathFragment xPathFragment, NamespaceResolver namespaceResolver) {\n super.openStartElement(xPathFragment, namespaceResolver);\n if (isStartElementOpen) {\n outputStreamWrite(CLOSE_ELEMENT);\n }\n isStartElementOpen = true;\n outputStreamWrite(OPEN_START_ELEMENT);\n outputStreamWrite(getNameForFragmentBytes(xPathFragment));\n}\n"
"public static CollectionPage getSearchPage(String query, int page) throws Exception {\n ArrayList<Game> gameList = new ArrayList<Game>();\n Pattern variantRegex = Pattern.compile(\"String_Node_Str\");\n URL url = new URL(\"String_Node_Str\" + query + \"String_Node_Str\" + getFirstResult(page));\n Document document = Jsoup.parse(url, 3000);\n CollectionPage collectionPage = new CollectionPage();\n collectionPage.setPage(page);\n Element table = document.select(\"String_Node_Str\").get(0);\n Elements tableRows = table.select(\"String_Node_Str\");\n try {\n for (int i = 0; i < tableRows.size(); i++) {\n Elements tableData = tableRows.get(i).select(\"String_Node_Str\");\n Game newGame = new Game();\n newGame.setConsole(tableData.get(0).text());\n newGame.setRegion(tableData.get(1).select(\"String_Node_Str\").first().attr(\"String_Node_Str\"));\n newGame.setType(tableData.get(2).text());\n newGame.setRFGID(tableData.get(3).select(\"String_Node_Str\").first().attr(\"String_Node_Str\").substring(14));\n newGame.setTitle(tableData.get(3).text());\n newGame.setPublisher(tableData.get(4).text());\n try {\n newGame.setYear(Integer.parseInt(tableData.get(5).text()));\n } catch (Exception e) {\n }\n newGame.setGenre(tableData.get(6).text());\n Matcher matcher = variantRegex.matcher(newGame.getTitle());\n if (matcher.find()) {\n newGame.setVariationTitle(matcher.group().substring(2, matcher.group().length() - 1));\n newGame.setTitle(newGame.getTitle().substring(0, newGame.getTitle().length() - newGame.getVariationTitle().length() - 3));\n }\n gameList.add(newGame);\n }\n } catch (Exception e) {\n }\n collectionPage.setList(gameList);\n try {\n Element div = document.select(\"String_Node_Str\").get(1);\n String divText = div.text().substring(div.text().indexOf(\"String_Node_Str\") + 3);\n collectionPage.setTotalPages(getTotalPages(Integer.parseInt(divText.substring(0, divText.indexOf(\"String_Node_Str\")))));\n } catch (Exception e) {\n collectionPage.setTotalPages(1);\n }\n return collectionPage;\n}\n"
"public void onEvent(Event event) {\n if (_rows != null && _model != null && inPagingMold()) {\n final Paginal pgi = getPaginal();\n int pgsz = pgi.getPageSize();\n final int ofs = pgi.getActivePage() * pgsz;\n if (_rod) {\n getDataLoader().syncModel(ofs, pgsz);\n }\n postOnInitRender();\n }\n if (getModel() != null || getPagingPosition().equals(\"String_Node_Str\"))\n invalidate();\n else if (_rows != null)\n _rows.invalidate();\n}\n"
"private String writeCenterTime() {\n double center = (srcProduct.getStartTime().getMJD() + (srcProduct.getEndTime().getMJD() - srcProduct.getStartTime().getMJD()) / 2.0);\n double seconds = (center - dateDay.getMJD()) * daysToSeconds;\n return seconds + tab + \"String_Node_Str\";\n}\n"
"public void start() {\n sillyObjects.add(\"String_Node_Str\");\n sillyObjects.add(\"String_Node_Str\");\n sillyObjects.add(\"String_Node_Str\");\n JEventListPanel<String> panel = new JEventListPanel<String>(sillyObjects, new SillyObjectFormat());\n panel.setBorder(BorderFactory.createMatteBorder(5, 5, 5, 5, Color.RED));\n panel.setElementColumns(1);\n JButton addButton = new JButton(\"String_Node_Str\");\n addButton.addActionListener(new AddAction(sillyObjects));\n JFrame frame = new JFrame(\"String_Node_Str\");\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n frame.getContentPane().setLayout(new BorderLayout());\n frame.getContentPane().add(panel, BorderLayout.NORTH);\n frame.getContentPane().add(addButton, BorderLayout.SOUTH);\n frame.pack();\n frame.setVisible(true);\n}\n"
"public StringDefinition lookupString(String name) {\n Definition def = lookupDefinition(name);\n return (StringDefinition) ((def instanceof StringDefinition) ? def : null);\n}\n"
"public boolean shouldDisplay() {\n return super.isSlotEnabled();\n}\n"
"public static PaymentMode getPaymentMode(Invoice invoice) throws AxelorException {\n Partner partner = invoice.getPartner();\n if (InvoiceToolService.isOutPayment(invoice)) {\n if (partner != null) {\n PaymentMode paymentMode = partner.getOutPaymentMode();\n if (paymentMode != null) {\n return paymentMode;\n }\n }\n return Beans.get(AccountConfigService.class).getAccountConfig(invoice.getCompany()).getOutPaymentMode();\n } else {\n if (partner != null) {\n PaymentMode paymentMode = partner.getInPaymentMode();\n if (paymentMode != null) {\n return paymentMode;\n }\n }\n return accountConfigService.getAccountConfig(invoice.getCompany()).getInPaymentMode();\n }\n}\n"
"protected void maybeStartStream() throws IOException {\n synchronized (streamSyncRoot) {\n if (stream == null)\n return;\n }\n StreamConnector connector = getStreamConnector();\n if (streamTarget == null) {\n logger.info(\"String_Node_Str\");\n return;\n else\n stream.setConnector(connector);\n MediaStreamTarget streamTarget = createStreamTarget();\n if (streamTarget != null) {\n InetSocketAddress dataAddr = streamTarget.getDataAddress();\n if (dataAddr != null) {\n this.streamTarget.setDataHostAddress(dataAddr.getAddress());\n this.streamTarget.setDataPort(dataAddr.getPort());\n }\n InetSocketAddress ctrlAddr = streamTarget.getControlAddress();\n if (ctrlAddr != null) {\n this.streamTarget.setControlHostAddress(ctrlAddr.getAddress());\n this.streamTarget.setControlPort(ctrlAddr.getPort());\n }\n if (dataAddr != null)\n stream.setTarget(streamTarget);\n }\n Content content = getContent();\n if (!stream.isStarted()) {\n if (RTPLevelRelayType.MIXER.equals(getRTPLevelRelayType()))\n stream.setSSRCFactory(new SSRCFactoryImpl(initialLocalSSRC));\n synchronized (streamSyncRoot) {\n stream.start();\n }\n Videobridge videobridge = getContent().getConference().getVideobridge();\n EventAdmin eventAdmin = videobridge.getEventAdmin();\n if (eventAdmin != null && streamTarget != null) {\n eventAdmin.sendEvent(EventFactory.streamStarted(this));\n }\n }\n if (logger.isTraceEnabled()) {\n logger.trace(\"String_Node_Str\" + getID() + \"String_Node_Str\" + content.getName() + \"String_Node_Str\" + content.getConference().getID() + \"String_Node_Str\" + stream.getDirection() + \"String_Node_Str\");\n }\n touch();\n}\n"
"public String getLabel() {\n if (getObject() == null) {\n return this.getProperties(EProperties.LABEL).toString();\n }\n return this.getNodeName();\n}\n"
"DoubleValueSet<String> decode(String input) {\n Hypothesis hyp = new Hypothesis(null, root, 0, Operation.N_A);\n DoubleValueSet<String> hypotheses = new DoubleValueSet<>();\n Set<Hypothesis> next = expand(hyp, input, hypotheses);\n while (true) {\n HashSet<Hypothesis> newHyps = new HashSet<>();\n for (Hypothesis hypothesis : next) {\n newHyps.addAll(expand(hypothesis, input, hypotheses));\n }\n if (newHyps.size() == 0)\n break;\n next = newHyps;\n }\n return hypotheses;\n}\n"
"private void createTisRepositoryArea(Composite parent) {\n tisRepositoryComposite = toolkit.createComposite(parent);\n tisRepositoryComposite.setLayoutData(new GridData(GridData.FILL_BOTH));\n tisRepositoryComposite.setLayout(new FormLayout());\n tisRepositoryComposite.setBackground(GREY_COLOR);\n FormData formData;\n Composite group = new Composite(tisRepositoryComposite, SWT.None);\n manageConnectionsButton = toolkit.createButton(tisRepositoryComposite, null, SWT.PUSH);\n manageConnectionsButton.setBackground(GREY_COLOR);\n manageConnectionsButton.setImage(ImageProvider.getImage(EImage.THREE_DOTS_ICON));\n formData = new FormData();\n formData.top = new FormAttachment(group, HORIZONTAL_SPACE, SWT.CENTER);\n GC gc = new GC(manageConnectionsButton);\n Point labelSize = gc.stringExtent(Messages.getString(\"String_Node_Str\"));\n gc.dispose();\n formData.left = new FormAttachment(100, -HORIZONTAL_TWO_SPACE - labelSize.x - HORIZONTAL_TWO_SPACE);\n formData.right = new FormAttachment(100, -HORIZONTAL_TWO_SPACE);\n manageConnectionsButton.setLayoutData(formData);\n group.setLayout(new FormLayout());\n formData = new FormData();\n formData.top = new FormAttachment(0, 0);\n formData.left = new FormAttachment(0, 0);\n formData.right = new FormAttachment(manageConnectionsButton, -HORIZONTAL_SPACE);\n formData.bottom = new FormAttachment(100, -2);\n group.setLayoutData(formData);\n Label connectionLabel = toolkit.createLabel(group, null);\n connectionLabel.setBackground(tisRepositoryComposite.getBackground());\n connectionLabel.setText(\"String_Node_Str\");\n formData = new FormData();\n formData.top = new FormAttachment(0, HORIZONTAL_TWO_SPACE);\n formData.left = new FormAttachment(0, HORIZONTAL_TWO_SPACE);\n formData.right = new FormAttachment(0, LEFTSPACE);\n connectionLabel.setLayoutData(formData);\n connectionsViewer = new ComboViewer(group, SWT.BORDER | SWT.READ_ONLY);\n connectionsViewer.setContentProvider(new ArrayContentProvider());\n connectionsViewer.setLabelProvider(new ConnectionLabelProvider());\n formData = new FormData();\n formData.top = new FormAttachment(connectionLabel, 0, SWT.CENTER);\n formData.left = new FormAttachment(connectionLabel, HORIZONTAL_SPACE);\n formData.right = new FormAttachment(0, 300);\n connectionsViewer.getControl().setLayoutData(formData);\n Label emailLabel = toolkit.createLabel(group, null);\n emailLabel.setBackground(tisRepositoryComposite.getBackground());\n emailLabel.setText(Messages.getString(\"String_Node_Str\"));\n formData = new FormData();\n formData.top = new FormAttachment(connectionLabel, HORIZONTAL_TWO_SPACE);\n formData.left = new FormAttachment(0, HORIZONTAL_TWO_SPACE);\n formData.right = new FormAttachment(0, LEFTSPACE);\n emailLabel.setLayoutData(formData);\n user = toolkit.createText(group, null, SWT.BORDER);\n user.setEditable(false);\n user.setEnabled(false);\n formData = new FormData();\n formData.top = new FormAttachment(emailLabel, 0, SWT.CENTER);\n formData.left = new FormAttachment(emailLabel, HORIZONTAL_SPACE);\n formData.right = new FormAttachment(0, 300);\n user.setLayoutData(formData);\n passwordComposite = toolkit.createComposite(parent);\n GridData gd = new GridData(GridData.FILL_BOTH);\n passwordComposite.setLayoutData(gd);\n passwordComposite.setLayout(new FormLayout());\n passwordComposite.setBackground(GREY_COLOR);\n passwordLabel = toolkit.createLabel(passwordComposite, null);\n passwordLabel.setBackground(passwordComposite.getBackground());\n passwordLabel.setText(Messages.getString(\"String_Node_Str\"));\n formData = new FormData();\n formData.top = new FormAttachment(passwordComposite, 3, SWT.TOP);\n formData.left = new FormAttachment(0, HORIZONTAL_TWO_SPACE);\n formData.right = new FormAttachment(0, LEFTSPACE);\n passwordLabel.setLayoutData(formData);\n passwordText = toolkit.createText(passwordComposite, null, SWT.PASSWORD | SWT.BORDER);\n passwordText.setEditable(false);\n passwordText.setEnabled(false);\n formData = new FormData();\n formData.top = new FormAttachment(passwordComposite, 1, SWT.TOP);\n formData.left = new FormAttachment(passwordLabel, HORIZONTAL_SPACE);\n formData.right = new FormAttachment(0, 300);\n passwordText.setLayoutData(formData);\n}\n"
"protected String getDefaultEncoding() {\n try {\n if (data.has(\"String_Node_Str\"))\n return data.getString(\"String_Node_Str\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return \"String_Node_Str\";\n}\n"
"public Object decode(Class targetClass, Object fromDBObject, MappedField mf) throws MappingException {\n if (mf == null || fromDBObject == null)\n return fromDBObject;\n if (fromDBObject == null)\n return null;\n Class subtypeDest = mf.getSubType();\n Collection vals = null;\n if (fromDBObject.getClass().isArray()) {\n vals = new ArrayList();\n for (Object o : (Object[]) fromDBObject) vals.add(chain.decode((subtypeDest != null) ? subtypeDest : o.getClass(), o));\n } else if (fromDBObject instanceof Iterable) {\n vals = createNewCollection(mf);\n for (Object o : (Iterable) fromDBObject) vals.add(chain.decode((subtypeDest != null) ? subtypeDest : o.getClass(), o));\n }\n if (mf.getType().isArray()) {\n Object[] retArray = ReflectionUtils.convertToArray(subtypeDest, (ArrayList) vals);\n return retArray;\n } else\n return vals;\n}\n"
"void handle(final String path) {\n if (path.equals(watcher.getZNodePaths().masterAddressZNode) && !master.isStopped()) {\n handleMasterNodeChange();\n }\n}\n"
"public boolean createRoadEast(PlotArea plotArea, Plot plot) {\n ClassicPlotWorld dpw = (ClassicPlotWorld) plotArea;\n Location pos1 = getPlotBottomLocAbs(plotArea, plot.getId());\n Location pos2 = getPlotTopLocAbs(plotArea, plot.getId());\n int sx = pos2.getX() + 1;\n int ex = sx + dpw.ROAD_WIDTH - 1;\n int sz = pos1.getZ() - 2;\n int ez = pos2.getZ() + 2;\n LocalBlockQueue queue = plotArea.getQueue(false);\n int maxY = plotArea.getPlotManager().getWorldHeight();\n queue.setCuboid(new Location(plotArea.worldname, sx, Math.min(dpw.WALL_HEIGHT, dpw.ROAD_HEIGHT) + 1, sz + 1), new Location(plotArea.worldname, ex, maxY, ez - 1), PlotBlock.get((short) 0, (byte) 0));\n queue.setCuboid(new Location(plotArea.worldname, sx, 0, sz + 1), new Location(plotArea.worldname, ex, 0, ez - 1), PlotBlock.get((short) 7, (byte) 0));\n queue.setCuboid(new Location(plotArea.worldname, sx, 1, sz + 1), new Location(plotArea.worldname, sx, dpw.WALL_HEIGHT, ez - 1), dpw.WALL_FILLING);\n queue.setCuboid(new Location(plotArea.worldname, sx, dpw.WALL_HEIGHT + 1, sz + 1), new Location(plotArea.worldname, sx, dpw.WALL_HEIGHT + 1, ez - 1), dpw.WALL_BLOCK);\n queue.setCuboid(new Location(plotArea.worldname, ex, 1, sz + 1), new Location(plotArea.worldname, ex, dpw.WALL_HEIGHT, ez - 1), dpw.WALL_FILLING);\n queue.setCuboid(new Location(plotArea.worldname, ex, dpw.WALL_HEIGHT + 1, sz + 1), new Location(plotArea.worldname, ex, dpw.WALL_HEIGHT + 1, ez - 1), dpw.WALL_BLOCK);\n queue.setCuboid(new Location(plotArea.worldname, sx + 1, 1, sz + 1), new Location(plotArea.worldname, ex - 1, dpw.ROAD_HEIGHT, ez - 1), dpw.ROAD_BLOCK);\n queue.enqueue();\n return true;\n}\n"
"private int median(int[] arr) {\n int[] copy = Arrays.copyOf(arr, arr.length);\n Arrays.sort(copy);\n return copy[copy.length >> 1];\n}\n"
"public double randIndex(ShortProcessor cluster1, ShortProcessor cluster2) {\n final short[] pixels1 = (short[]) cluster1.getPixels();\n final short[] pixels2 = (short[]) cluster2.getPixels();\n double nPixels = pixels1.length;\n double n = 0;\n cluster1.resetMinAndMax();\n cluster2.resetMinAndMax();\n int[][] cont = new int[(int) cluster1.getMax() + 1][(int) cluster2.getMax() + 1];\n for (int i = 0; i < nPixels; i++) {\n cont[pixels1[i] & 0xffff][pixels2[i] & 0xffff]++;\n if (pixels1[i] > 0)\n n++;\n }\n double[] ni = new double[cont.length];\n for (int i = 1; i < cont.length; i++) for (int j = 0; j < cont[0].length; j++) {\n ni[i] += cont[i][j];\n }\n double[] nj = new double[cont[0].length];\n for (int j = 1; j < cont[0].length; j++) for (int i = 1; i < cont.length; i++) {\n nj[j] += cont[i][j];\n }\n double truePositives = 0;\n for (int j = 1; j < cont[0].length; j++) for (int i = 1; i < cont.length; i++) truePositives += cont[i][j] * (cont[i][j] - 1.0) / 2.0;\n double nPairsTotal = n * (n - 1.0) / 2.0;\n double nPosTrue = 0;\n for (int k = 0; k < ni.length; k++) nPosTrue += ni[k] * (ni[k] - 1.0) / 2.0;\n double nPosActual = 0;\n for (int k = 0; k < nj.length; k++) nPosActual += nj[k] * (nj[k] - 1.0) / 2.0;\n double trueNegatives = nPairsTotal + truePositives - nPosTrue - nPosActual;\n double agreements = truePositives + trueNegatives;\n double randIndex = agreements / nPairsTotal;\n return randIndex;\n}\n"
"private void go() {\n String methodsPath = UTILITIES.getFullPath(new String[] { JDUtilities.getJDHomeDirectory().getAbsolutePath(), \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" });\n String hoster = \"String_Node_Str\";\n JAntiCaptcha jac = new JAntiCaptcha(methodsPath, hoster);\n jac.setShowDebugGui(true);\n UTILITIES.getLogger().info(\"String_Node_Str\" + JAntiCaptcha.hasMethod(methodsPath, hoster));\n LetterComperator.CREATEINTERSECTIONLETTER = true;\n jac.displayLibrary();\n jac.getJas().set(\"String_Node_Str\", 50);\n jac.showPreparedCaptcha(new File(JDUtilities.getJDHomeDirectory().getAbsolutePath() + \"String_Node_Str\" + \"String_Node_Str\" + hoster + \"String_Node_Str\" + \"String_Node_Str\"));\n}\n"
"public void testDeleteCourses() throws IOException, URISyntaxException {\n ICourse course = CoursesWebService.createEmptyCourse(admin, \"String_Node_Str\", \"String_Node_Str\", null);\n DBFactory.getInstance().intermediateCommit();\n assertTrue(conn.login(\"String_Node_Str\", \"String_Node_Str\"));\n URI request = UriBuilder.fromUri(getContextURI()).path(\"String_Node_Str\" + course.getResourceableId()).build();\n HttpDelete method = conn.createDelete(request, MediaType.APPLICATION_JSON);\n HttpResponse response = conn.execute(method);\n assertEquals(200, response.getStatusLine().getStatusCode());\n List<String> courseType = new ArrayList<String>();\n courseType.add(CourseModule.getCourseTypeName());\n Roles roles = new Roles(true, true, true, true, false, true, false);\n List<RepositoryEntry> repoEntries = RepositoryManager.getInstance().genericANDQueryWithRolesRestriction(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", courseType, null, roles, \"String_Node_Str\");\n assertNotNull(repoEntries);\n for (RepositoryEntry entry : repoEntries) {\n assertNotSame(entry.getOlatResource().getResourceableId(), course.getResourceableId());\n }\n}\n"
"private void registerNBTSubtypes(ISubtypeRegistry registry) {\n registry.useNbtForSubtypes(ModItems.armorOfSwiftness_boots, ModItems.armorOfSwiftness_chest, ModItems.armorOfSwiftness_helmet, ModItems.armorOfSwiftness_legs);\n registry.useNbtForSubtypes(ModItems.hunterAxe);\n registry.useNbtForSubtypes(ModItems.hunterCoat_boots, ModItems.hunterCoat_chest, ModItems.hunterCoat_helmet, ModItems.hunterCoat_legs);\n registry.useNbtForSubtypes(ModItems.obsidianArmor_boots, ModItems.obsidianArmor_chest, ModItems.obsidianArmor_legs, ModItems.obsidianArmor_helmet);\n registry.useNbtForSubtypes(ModItems.holyWaterBottle);\n}\n"
"public Void run() {\n if (!m_slider.isEnabled()) {\n throw new StepExecutionException(\"String_Node_Str\", EventFactory.createActionError(\"String_Node_Str\"));\n }\n Integer value = null;\n Dictionary<Integer, ?> labelTable = m_slider.getLabelTable();\n String prefPos = getPreferredPosition(position, units);\n String possiblePos = getPossiblePosition(prefPos);\n int min = m_slider.getMinimum();\n int max = m_slider.getMaximum();\n int incr = getSliderIncrement();\n MatchUtil matcher = MatchUtil.getInstance();\n for (int val = min; val <= max; val += incr) {\n if (labelTable != null) {\n Object label = labelTable.get(val);\n if (label != null && label instanceof JLabel) {\n if (matcher.match(((JLabel) label).getText(), possiblePos, operator)) {\n value = val;\n break;\n }\n }\n if (matcher.match(stringToMatch, position, operator)) {\n value = k;\n break;\n }\n }\n if (value == null) {\n throw new StepExecutionException(\"String_Node_Str\", EventFactory.createActionError(TestErrorEvent.NOT_FOUND));\n }\n } else {\n try {\n value = Integer.valueOf(position);\n } catch (NumberFormatException nfe) {\n throwInvalidInputMessage();\n }\n }\n setValueProgrammatically(units, value);\n return null;\n}\n"
"public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) {\n Player player = null;\n String commandName = command.getName();\n if (sender instanceof Player) {\n player = (Player) sender;\n } else {\n log.info(\"String_Node_Str\");\n return false;\n }\n Animator animator = getAnimator(player.getName());\n if (commandName.equalsIgnoreCase(\"String_Node_Str\")) {\n if (animator.hasOpenAnimation()) {\n player.sendMessage(\"String_Node_Str\");\n } else {\n if (args.length == 1) {\n Animation animation = getAnimation(args[0]);\n if (animation == null) {\n createNewAnimation(args[0], player);\n player.sendMessage(\"String_Node_Str\");\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n }\n return true;\n } else if (commandName.equalsIgnoreCase(\"String_Node_Str\")) {\n if (!animator.hasOpenAnimation()) {\n player.sendMessage(\"String_Node_Str\");\n } else {\n animator.closeAnimation();\n player.sendMessage(\"String_Node_Str\");\n }\n return true;\n } else if (commandName.equalsIgnoreCase(\"String_Node_Str\")) {\n if (animator.hasOpenAnimation()) {\n player.sendMessage(\"String_Node_Str\");\n } else {\n if (args.length == 1) {\n Animation animation = getAnimation(args[0]);\n if (animation != null) {\n animator.openAnimation(animation);\n player.sendMessage(\"String_Node_Str\");\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n }\n return true;\n } else if (commandName.equalsIgnoreCase(\"String_Node_Str\")) {\n if (animator.hasOpenAnimation()) {\n Animation open_anime = animator.getOpenAnimation();\n if (!open_anime.isAreaSet()) {\n if (animator.locationsSet()) {\n Area area = new Area(this, player.getWorld(), animator.getLoc1(), animator.getLoc2());\n open_anime.setArea(area);\n player.sendMessage(\"String_Node_Str\" + area.get_blocks().size());\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n return true;\n } else if (commandName.equalsIgnoreCase(\"String_Node_Str\")) {\n if (animator.hasOpenAnimation()) {\n Animation open_anime = animator.getOpenAnimation();\n if (open_anime.isAreaSet()) {\n frameset this_frameset = open_anime.getFrames();\n if (this_frameset.frames.size() == 0) {\n Hashtable<Integer, Block> blocks = new Hashtable<Integer, Block>();\n for (Location location : open_anime.getArea().get_blocks()) {\n blocks.put(blocks.size(), this_frameset.this_world.getBlockAt(location));\n }\n this_frameset.add_frame(blocks);\n open_anime.setLastFrameBytes(this_frameset.frames.get((this_frameset.frames.size() - 1)).frame_blocks_data);\n open_anime.setLastFrameTypes(this_frameset.frames.get((this_frameset.frames.size() - 1)).frame_blocks_type);\n player.sendMessage(\"String_Node_Str\" + blocks.size() + \"String_Node_Str\" + this_frameset.frames.size());\n } else {\n Hashtable<Integer, Block> blocks = new Hashtable<Integer, Block>();\n Map<Location, Material> jprevtype = this_frameset.frames.get((this_frameset.frames.size() - 1)).frame_blocks_type;\n Map<Location, Byte> jprevbyte = this_frameset.frames.get((this_frameset.frames.size() - 1)).frame_blocks_data;\n for (Location location : open_anime.getArea().get_blocks()) {\n if (this_frameset.this_world.getBlockAt(location).getType() != jprevtype.get(location)) {\n blocks.put(blocks.size(), this_frameset.this_world.getBlockAt(location));\n jprevtype.put(location, this_frameset.this_world.getBlockAt(location).getType());\n jprevbyte.put(location, this_frameset.this_world.getBlockAt(location).getData());\n } else if (this_frameset.this_world.getBlockAt(location).getData() != jprevbyte.get(location)) {\n blocks.put(blocks.size(), this_frameset.this_world.getBlockAt(location));\n jprevbyte.put(location, this_frameset.this_world.getBlockAt(location).getData());\n }\n }\n this_frameset.add_frame(blocks);\n open_anime.setLastFrameBytes(jprevbyte);\n open_anime.setLastFrameTypes(jprevtype);\n player.sendMessage(\"String_Node_Str\" + blocks.size() + \"String_Node_Str\" + this_frameset.frames.size());\n }\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n return true;\n } else if (commandName.equalsIgnoreCase(\"String_Node_Str\")) {\n if (animator.hasOpenAnimation()) {\n Animation open_anime = animator.getOpenAnimation();\n if (open_anime.isAreaSet()) {\n if (!open_anime.isPlaying()) {\n Thread animation_player = null;\n if (args.length == 1) {\n if (args[0].equalsIgnoreCase(\"String_Node_Str\")) {\n open_anime.setRepeat(true);\n animation_player = new play(this, open_anime);\n } else {\n open_anime.setRepeat(false);\n animation_player = new play(this, open_anime, Integer.valueOf(args[0]));\n }\n } else if (args.length == 2) {\n if (args[1].equalsIgnoreCase(\"String_Node_Str\")) {\n open_anime.setRepeat(true);\n }\n animation_player = new play(this, open_anime, Integer.valueOf(args[0]));\n } else {\n open_anime.setRepeat(false);\n animation_player = new play(this, open_anime);\n }\n animation_player.start();\n player.sendMessage(\"String_Node_Str\");\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n return true;\n } else if (commandName.equalsIgnoreCase(\"String_Node_Str\")) {\n if (animator.hasOpenAnimation()) {\n Animation open_anime = animator.getOpenAnimation();\n if (open_anime.isAreaSet()) {\n if (open_anime.isPlaying()) {\n if (open_anime.isRepeat()) {\n player.sendMessage(\"String_Node_Str\");\n open_anime.setRepeat(false);\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n return true;\n } else if (commandName.equalsIgnoreCase(\"String_Node_Str\")) {\n if (animator.hasOpenAnimation()) {\n Animation open_anime = animator.getOpenAnimation();\n if (open_anime.isAreaSet()) {\n if (args.length == 1) {\n if (args[0].equalsIgnoreCase(\"String_Node_Str\")) {\n frameset g = open_anime.getFrames();\n Integer hi = 0;\n while (hi < g.frames.size()) {\n g.gt(hi);\n hi++;\n }\n player.sendMessage(\"String_Node_Str\" + g.frames.size() + \"String_Node_Str\");\n } else if (args[0].equalsIgnoreCase(\"String_Node_Str\")) {\n frameset g = open_anime.getFrames();\n g.gt(0);\n player.sendMessage(\"String_Node_Str\");\n } else if (is_integer(args[0])) {\n frameset g = open_anime.getFrames();\n if (g.frames.size() >= Integer.valueOf(args[0])) {\n Integer hi = 0;\n while (hi < Integer.valueOf(args[0])) {\n g.gt(hi);\n hi++;\n }\n player.sendMessage(\"String_Node_Str\" + (Integer.valueOf(args[0]) + 1) + \"String_Node_Str\");\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n } else {\n player.sendMessage(\"String_Node_Str\");\n }\n return true;\n }\n return false;\n}\n"
"public static IRegion locationToRegion(IDocument document, Location location) throws BadLocationException {\n int offset = document.getLineOffset(location.beginLine() - 1) + location.beginColumn() - 1;\n int length = document.getLineOffset(location.endLine() - 1) + location.endColumn() - offset;\n return new Region(offset, length);\n}\n"
"public void populate() {\n for (int y = 0; y < Chunk.CHUNK_DIMENSIONS.y; y++) {\n for (int x = 0; x < Chunk.CHUNK_DIMENSIONS.x; x++) {\n for (int z = 0; z < Chunk.CHUNK_DIMENSIONS.z; z++) {\n float dens = calcForestDensity(getBlockWorldPosX(x), getBlockWorldPosY(y), getBlockWorldPosZ(z));\n if (dens > 0.55 && dens < 0.7f && _parent.getBlock(getBlockWorldPosX(x), getBlockWorldPosY(y), getBlockWorldPosZ(z)) == 0x1 && y > 32) {\n _parent.generateTree(getBlockWorldPosX(x), getBlockWorldPosY((int) y) + 1, getBlockWorldPosZ(z), false);\n return;\n } else if (dens >= 0.7f && _parent.getBlock(getBlockWorldPosX(x), getBlockWorldPosY(y), getBlockWorldPosZ(z)) == 0x1 && y > 32) {\n _parent.generatePineTree(getBlockWorldPosX(x), getBlockWorldPosY((int) y) + 1, getBlockWorldPosZ(z), false);\n return;\n }\n }\n }\n }\n}\n"
"public void update(InstanceUsageSnapshot snapshot) {\n if (firstSnapshot == null && (priorSnapshot.getTimestampMs() >= period.getBeginningMs() || snapshot.getTimestampMs() >= period.getBeginningMs())) {\n firstSnapshot = priorSnapshot;\n log.debug(\"String_Node_Str\" + firstSnapshot.getTimestampMs());\n }\n if (lastSnapshot == null && (priorSnapshot.getTimestampMs() > period.getEndingMs())) {\n lastSnapshot = priorSnapshot;\n log.debug(\"String_Node_Str\" + lastSnapshot.getTimestampMs());\n accumulateDiskIoMegs(snapshot);\n accumulateNetIoMegs(snapshot);\n }\n if (firstSnapshot != null && lastSnapshot == null) {\n accumulateDiskIoMegs(snapshot);\n accumulateNetIoMegs(snapshot);\n }\n this.priorSnapshot = snapshot;\n}\n"
"public void getStatuses(HttpRequest request, HttpResponder responder) {\n programLifecycleHttpHandler.getStatuses(RESTMigrationUtils.rewriteV2RequestToV3(request), responder, Constants.DEFAULT_NAMESPACE);\n}\n"
"public void initialize() {\n try {\n final ByteArrayOutputStream cloneBuffer = new ByteArrayOutputStream();\n final JsonNode cloner = this.initialAggregate;\n cloner.write(new DataOutputStream(cloneBuffer));\n cloner.read(new DataInputStream(new ByteArrayInputStream(cloneBuffer.toByteArray())));\n this.aggregate = cloner;\n } catch (final IOException e) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n}\n"
"protected void startLoadAttachFile(final File file) {\n final AlertDialog alertDialog = AlertDialog.newInstance(getResources().getString(R.string.dlg_confirm_sending_attach));\n alertDialog.setPositiveButton(new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n showProgress();\n QBLoadAttachFileCommand.start(BaseDialogActivity.this, file);\n }\n });\n alertDialog.show(getFragmentManager(), null);\n}\n"
"protected void drawFrame() {\n super.drawFrame();\n try {\n if (mVideoEncoder != null) {\n mVideoEncoder.frameAvailableSoon();\n }\n }\n}\n"
"public static void main(String[] args) {\n try {\n String name1, name2;\n int[] cps = new int[] {};\n name1 = \"String_Node_Str\";\n name2 = \"String_Node_Str\";\n cp = 122;\n OptimalCECPMain ce = (OptimalCECPMain) StructureAlignmentFactory.getAlgorithm(OptimalCECPMain.algorithmName);\n CeParameters params = (CeParameters) ce.getParameters();\n ce.setParameters(params);\n AtomCache cache = new AtomCache();\n Atom[] ca1 = cache.getAtoms(name1);\n Atom[] ca2 = cache.getAtoms(name2);\n AFPChain afpChain;\n Atom[] ca2clone = cache.getAtoms(name2);\n afpChain = ce.alignPermuted(ca1, ca2clone, params, cp);\n displayAlignment(afpChain, ca1, ca2);\n AFPChain[] alignments = new AFPChain[ca2.length];\n afpChain = ce.alignOptimal(ca1, ca2, params, alignments);\n System.out.format(\"String_Node_Str\", afpChain.getAlignScore());\n System.out.println(\"String_Node_Str\");\n for (int i = 0; i < alignments.length; i++) {\n double tm = AFPChainScorer.getTMScore(alignments[i], ca1, ca2);\n System.out.format(\"String_Node_Str\", i, alignments[i].getAlignScore(), tm, alignments[i].getOptLength(), alignments[i].getTotalRmsdOpt(), alignments[i].getBlockNum());\n }\n displayAlignment(afpChain, ca1, ca2);\n for (int cpPos = 0; cpPos < alignments.length; cpPos++) {\n AFPChain curr = alignments[cpPos];\n if ((!curr.isSequentialAlignment()) || curr.getBlockNum() > 1) {\n System.out.format(\"String_Node_Str\", cpPos, curr.isSequentialAlignment(), curr.getBlockNum());\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n}\n"
"private void updateDigest(ByteBuffer bbf) {\n if (md == null) {\n try {\n md = MessageDigest.getInstance(\"String_Node_Str\");\n } catch (NoSuchAlgorithmException e) {\n throw new IOException(e);\n }\n }\n md.update(bbf.slice());\n}\n"
"private String generateNewQuery() {\n ExtractMetaDataUtils extractMeta = ExtractMetaDataUtils.getInstance();\n if (realDBType != null) {\n dbType = realDBType;\n }\n if (node != null && node instanceof INode) {\n process = ((INode) node).getProcess();\n }\n if (this.realTableId != null && this.dbNameAndDbTypeMap.containsKey(this.realTableId)) {\n dbType = this.dbNameAndDbTypeMap.get(this.realTableId);\n }\n if (dbType == null || dbType.equals(\"String_Node_Str\")) {\n IElementParameter ptParam = node.getElementParameterFromField(EParameterFieldType.PROPERTY_TYPE);\n if (ptParam != null && ptParam.getRepositoryValue() != null) {\n if (ptParam.getRepositoryValue().endsWith(EDatabaseTypeName.GENERAL_JDBC.getProduct())) {\n dbType = EDatabaseTypeName.GENERAL_JDBC.getDisplayName();\n }\n }\n }\n boolean isJdbc = false;\n INode connectionNode = null;\n IElementParameter existConnection = node.getElementParameter(\"String_Node_Str\");\n boolean useExistConnection = (existConnection == null ? false : (Boolean) existConnection.getValue());\n if (useExistConnection) {\n IElementParameter connector = node.getElementParameter(\"String_Node_Str\");\n if (connector != null) {\n String connectorValue = connector.getValue().toString();\n List<? extends INode> graphicalNodes = process.getGraphicalNodes();\n for (INode node : graphicalNodes) {\n if (node.getUniqueName().equals(connectorValue)) {\n connectionNode = node;\n break;\n }\n }\n }\n }\n if (dbType != null && dbType.equals(EDatabaseTypeName.GENERAL_JDBC.getDisplayName())) {\n isJdbc = true;\n String driverClassName = node.getElementParameter(\"String_Node_Str\").getValue().toString();\n if (connectionNode != null) {\n driverClassName = connectionNode.getElementParameter(\"String_Node_Str\").getValue().toString();\n }\n driverClassName = TalendTextUtils.removeQuotes(driverClassName);\n if (driverClassName != null && !\"String_Node_Str\".equals(driverClassName)) {\n boolean isContextModeDriverClass = ContextParameterUtils.containContextVariables(driverClassName);\n if (isContextModeDriverClass) {\n driverClassName = JavaProcessUtil.getContextOriginalValue(process, driverClassName);\n }\n }\n if (driverClassName != null && !\"String_Node_Str\".equals(driverClassName)) {\n if (driverClassName.equals(\"String_Node_Str\")) {\n driverClassName = EDatabase4DriverClassName.SYBASEASE.getDriverClass();\n }\n }\n String driverJarName = node.getElementParameter(\"String_Node_Str\").getValue().toString();\n if (connectionNode != null) {\n driverJarName = connectionNode.getElementParameter(\"String_Node_Str\").getValue().toString();\n }\n if (driverJarName != null && driverJarName.startsWith(\"String_Node_Str\") && driverJarName.endsWith(\"String_Node_Str\")) {\n driverJarName = driverJarName.substring(1, driverJarName.length() - 1);\n if (driverJarName != null && driverJarName.startsWith(\"String_Node_Str\") && driverJarName.endsWith(\"String_Node_Str\")) {\n driverJarName = driverJarName.substring(1, driverJarName.length() - 1);\n }\n }\n if (driverJarName != null && !\"String_Node_Str\".equals(driverJarName)) {\n boolean isContextMode = ContextParameterUtils.containContextVariables(driverJarName);\n if (isContextMode) {\n driverJarName = JavaProcessUtil.getContextOriginalValue(process, driverJarName);\n }\n dbType = extractMeta.getDbTypeByClassNameAndDriverJar(driverClassName, driverJarName);\n } else {\n dbType = extractMeta.getDbTypeByClassName(driverClassName);\n }\n DatabaseConnection dbConn = null;\n if (dbType == null) {\n if (conn != null) {\n if (conn instanceof DatabaseConnection) {\n dbConn = (DatabaseConnection) conn;\n }\n driverClassName = DatabaseConnectionParameterUtil.getTrueParamValue(dbConn, driverClassName);\n dbType = extractMeta.getDbTypeByClassName(driverClassName);\n }\n }\n if (dbType == null) {\n dbType = EDatabaseTypeName.ORACLE_OCI.getDisplayName();\n }\n }\n if (dbNameAndSchemaMap != null) {\n schema = this.dbNameAndSchemaMap.get(this.realTableId);\n }\n String propertyType = (String) node.getPropertyValue(EParameterName.PROPERTY_TYPE.getName());\n boolean isTeradata = false;\n if (dbType != null) {\n isTeradata = dbType.equalsIgnoreCase(EDatabaseTypeName.TERADATA.getDisplayName());\n }\n if (propertyType != null && !propertyType.equals(EmfComponent.REPOSITORY)) {\n List<? extends IElementParameter> elementParameters = this.node.getElementParameters();\n if (useExistConnection) {\n elementParameters = connectionNode.getElementParameters();\n }\n for (IElementParameter param : elementParameters) {\n if (param.getRepositoryValue() != null) {\n if ((!isTeradata && param.getRepositoryValue().equals(\"String_Node_Str\")) || (isTeradata && param.getRepositoryValue().equals(\"String_Node_Str\"))) {\n schema = (String) param.getValue();\n schema = schema.replace(\"String_Node_Str\", \"String_Node_Str\");\n schema = schema.replace(\"String_Node_Str\", \"String_Node_Str\");\n break;\n }\n }\n }\n } else if (schema == null) {\n IElementParameter param = node.getElementParameter(EParameterName.REPOSITORY_PROPERTY_TYPE.getName());\n if (param != null) {\n try {\n IRepositoryViewObject object = DesignerPlugin.getDefault().getRepositoryService().getProxyRepositoryFactory().getLastVersion((String) param.getValue());\n if (object != null) {\n Item item = object.getProperty().getItem();\n if (item != null && item instanceof DatabaseConnectionItem) {\n if (isTeradata) {\n schema = (String) RepositoryToComponentProperty.getValue(((DatabaseConnectionItem) item).getConnection(), \"String_Node_Str\", null);\n } else {\n schema = (String) RepositoryToComponentProperty.getValue(((DatabaseConnectionItem) item).getConnection(), \"String_Node_Str\", null);\n }\n schema = TalendTextUtils.removeQuotes(schema);\n }\n }\n } catch (PersistenceException e) {\n }\n }\n }\n if (conn instanceof DatabaseConnection && conn.isContextMode()) {\n schema = DatabaseConnectionParameterUtil.getContextTrueValue((DatabaseConnection) conn, schema);\n }\n String newQuery = null;\n fillCorrectMetadataTable();\n realTableName = QueryUtil.getTableName(node, newOutputMetadataTable, schema, dbType, realTableName);\n if (realTableName.startsWith(TalendTextUtils.QUOTATION_MARK) && realTableName.endsWith(TalendTextUtils.QUOTATION_MARK) && realTableName.length() > 2) {\n realTableName = realTableName.substring(1, realTableName.length() - 1);\n }\n if (conn != null && (isJdbc || dbType.equals(EDatabaseTypeName.JAVADB_EMBEDED.getDisplayName()) || (StringUtils.isEmpty(schema) && (EDatabaseTypeName.ORACLE_CUSTOM.equals(EDatabaseTypeName.getTypeFromDbType(dbType)) || EDatabaseTypeName.ORACLEFORSID.equals(EDatabaseTypeName.getTypeFromDbType(dbType)) || EDatabaseTypeName.ORACLESN.equals(EDatabaseTypeName.getTypeFromDbType(dbType)) || EDatabaseTypeName.ORACLE_OCI.equals(EDatabaseTypeName.getTypeFromDbType(dbType)))))) {\n schema = getDefaultSchema(realTableName);\n }\n newQuery = QueryUtil.generateNewQuery(node, newOutputMetadataTable, isJdbc, dbType, schema, realTableName);\n if (whereClause != null) {\n newQuery = newQuery.substring(0, newQuery.length() - 1) + whereClause + \"String_Node_Str\";\n }\n return TalendTextUtils.addSQLQuotes(newQuery);\n}\n"
"private FormStatus fillActionDataMap() {\n String filename = null, hostname = null;\n String installDir = \"String_Node_Str\";\n IResource fileResource = null;\n String os = \"String_Node_Str\", accountCode = \"String_Node_Str\";\n DataComponent fileData = null, parallelData = null;\n Entry fileEntry = null, mpiEntry = null;\n int numProcs = 1, numTBBThreads = 1;\n fileData = (DataComponent) form.getComponent(JobLauncherForm.filesId);\n parallelData = (DataComponent) form.getComponent(JobLauncherForm.parallelId);\n if (fileData == null) {\n return FormStatus.InfoError;\n }\n actionDataMap = new Hashtable<String, String>();\n fileData = (DataComponent) form.getComponent(1);\n for (String entryName : inputFileNameMap.keySet()) {\n fileEntry = fileData.retrieveEntry(entryName);\n if (fileEntry != null) {\n fileResource = project.findMember(fileEntry.getValue());\n if (fileResource == null || !fileResource.exists()) {\n System.out.println(\"String_Node_Str\" + filename);\n System.out.println(\"String_Node_Str\" + fileEntry.getAllowedValues());\n return FormStatus.InfoError;\n }\n filename = fileResource.getLocation().toOSString();\n actionDataMap.put(inputFileNameMap.get(entryName).varName, filename);\n } else {\n System.out.println(\"String_Node_Str\" + entryName);\n }\n }\n ArrayList<Integer> selectedRowIds = hostsTable.getSelectedRows();\n int selectedRowId = 1;\n selectedRowId = 0;\n if (selectedRowIds != null) {\n selectedRowId = selectedRowIds.get(0);\n }\n ArrayList<Entry> hostEntries = hostsTable.getRow(selectedRowId);\n hostname = hostEntries.get(0).getValue();\n os = hostEntries.get(1).getValue();\n installDir = hostEntries.get(2).getValue();\n if (parallelData != null) {\n mpiEntry = parallelData.retrieveEntry(\"String_Node_Str\");\n if (mpiEntry != null) {\n numProcs = Math.max(numProcs, Integer.parseInt(mpiEntry.getValue()));\n }\n Entry tbbThreadsEntry = parallelData.retrieveEntry(\"String_Node_Str\");\n if (tbbThreadsEntry != null) {\n numTBBThreads = Math.max(numTBBThreads, Integer.parseInt(tbbThreadsEntry.getValue()));\n }\n Entry accountEntry = parallelData.retrieveEntry(\"String_Node_Str\");\n accountCode = accountEntry.getValue();\n }\n actionDataMap.put(\"String_Node_Str\", executableCommandName);\n actionDataMap.put(\"String_Node_Str\", String.valueOf(uploadInput));\n if (appendInput && !executableCommandName.contains(\"String_Node_Str\")) {\n actionDataMap.put(\"String_Node_Str\", \"String_Node_Str\");\n } else {\n actionDataMap.put(\"String_Node_Str\", \"String_Node_Str\");\n }\n actionDataMap.put(\"String_Node_Str\", installDir);\n actionDataMap.put(\"String_Node_Str\", hostname);\n actionDataMap.put(\"String_Node_Str\", os);\n actionDataMap.put(\"String_Node_Str\", accountCode);\n actionDataMap.put(\"String_Node_Str\", String.valueOf(numProcs));\n actionDataMap.put(\"String_Node_Str\", String.valueOf(numTBBThreads));\n if (remoteDownloadDir != null) {\n actionDataMap.put(\"String_Node_Str\", remoteDownloadDir);\n }\n if (debuggingEnabled) {\n System.out.println(\"String_Node_Str\" + \"String_Node_Str\" + actionDataMap);\n }\n return FormStatus.ReadyToProcess;\n}\n"
"public Properties getConnectionProperties() {\n DataStore ds = getDataStore();\n Properties properties = new Properties();\n if (ds != null) {\n if (ds.getConnection() != null) {\n properties = ds.getConnection().getProperties();\n return properties != null ? properties : new Properties();\n }\n if (logger.isWarnEnabled()) {\n logger.warn(\"String_Node_Str\");\n }\n }\n return properties;\n}\n"
"public BundleDescriptor getRelativeBundle(BundleDescriptor origin, String relativeTargetUri) {\n String targetBundleUri = getTargetUri(origin, relativeTargetUri);\n BundleDescriptor targetBundle = null;\n if (targetBundleUri != null) {\n targetBundle = getModuleByUri(targetBundleUri);\n }\n return targetBundle;\n}\n"
"public boolean onSingleTapUp(MotionEvent e) {\n if (!isEditable)\n return false;\n performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP);\n int pointerId = e.getPointerId(0);\n float x = e.getX(pointerId);\n float y = e.getY(pointerId);\n final Long timestamp = positionToTimestamp(x, y);\n if (timestamp == null)\n return false;\n int offset = timestampToOffset(timestamp);\n if (offset < checkmarks.length) {\n boolean isChecked = checkmarks[offset] == CHECKED_EXPLICITLY;\n checkmarks[offset] = (isChecked ? UNCHECKED : CHECKED_EXPLICITLY);\n }\n controller.onToggleCheckmark(timestamp);\n postInvalidate();\n return true;\n}\n"
"protected void loadSettingsBlocking(boolean notifyOnClear) {\n super.loadSettingsBlocking(notifyOnClear);\n if (loadThreadInterrupted())\n return;\n synchronized (metaLocker) {\n if (!initialized) {\n fileToHash.clear();\n createFileToHashMaps();\n SchemaReplyCollectionMapper mapper = SchemaReplyCollectionMapper.instance();\n LimeXMLSchemaRepository schemaRepository = LimeXMLSchemaRepository.instance();\n if (Thread.currentThread().isInterrupted())\n return;\n String[] schemas = schemaRepository.getAvailableSchemaURIs();\n int len = schemas.length;\n LimeXMLReplyCollection collection;\n for (int i = 0; (i < len) && !Thread.currentThread().isInterrupted(); i++) {\n String s = LimeXMLSchema.getDisplayString(schemas[i]);\n collection = new LimeXMLReplyCollection(fileToHash, schemas[i], this, s.equalsIgnoreCase(\"String_Node_Str\"));\n mapper.add(schemas[i], collection);\n }\n }\n }\n}\n"
"private void assertIdWithinCapacity(long id) {\n if (id > max || id < 0) {\n throw new UnderlyingStorageException(\"String_Node_Str\");\n }\n}\n"
"public String getText(List<Tag> tags) {\n String ret = \"String_Node_Str\";\n if (hasText) {\n ret = initialText;\n }\n if (html) {\n ret = stripTags(ret);\n ret = entitiesReplace(ret);\n }\n return ret;\n}\n"
"public <T extends Enum<T>> T readEnumValue(Class<T> enumClass) {\n boolean exists = readBoolean();\n if (!exists) {\n return null;\n }\n T[] enums = enumClass.getEnumConstants();\n int length = MathHelper.log2DeBruijn(enums.length);\n int index = readFixedBits(length);\n return enums[index];\n}\n"
"protected void executeInternal() {\n final String method = \"String_Node_Str\";\n synchronized (this) {\n if (resetCommand != null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n createResetCommand();\n WFSResult wfsResult = null;\n try {\n wfsResult = resetCommand.call();\n notifyCommandSuccessful();\n } catch (final Exception e) {\n if (LOG.isErrorEnabled()) {\n LOG.error(method, \"String_Node_Str\" + resetCommand, e);\n }\n notifyCommandFailed(e);\n } finally {\n if (wfsResult != null) {\n XfsServiceManager.getInstance().free(wfsResult);\n }\n }\n resetCommand = null;\n }\n}\n"
"private static <T> T getProperty(CacheService cache, Object entity, String... propertyPath) {\n if (null == entity) {\n return null;\n }\n int len = propertyPath.length;\n E.illegalArgumentIf(len < 1);\n Object lastEntity = null;\n for (int i = 0; i < len; ++i) {\n String prop = propertyPath[i];\n String lastProp = i == 0 ? prop : propertyPath[i - 1];\n if (entity instanceof List) {\n List<Class<?>> classList = findPropertyParameterizedType(lastEntity, lastProp);\n ListPropertyGetter getter = propertyHandlerFactory.createListPropertyGetter(classList.get(0));\n lastEntity = entity;\n entity = getter.get(lastEntity, prop);\n } else if (entity instanceof Map) {\n List<Class<?>> classList = findPropertyParameterizedType(lastEntity, lastProp);\n if (null == classList) {\n PropertyGetter getter = propertyGetter(cache, entity, prop, false);\n lastEntity = entity;\n entity = getter.get(entity, null);\n } else {\n MapPropertyGetter getter = propertyHandlerFactory.createMapPropertyGetter(classList.get(0), classList.get(1));\n lastEntity = entity;\n entity = getter.get(lastEntity, prop);\n }\n } else {\n PropertyGetter getter = propertyGetter(cache, entity, prop, false);\n lastEntity = entity;\n entity = getter.get(entity, null);\n }\n if (null == entity) {\n return null;\n }\n }\n return (T) entity;\n}\n"
"protected void listLinks(CommandContext ctx) throws CommandLineException {\n final ModelControllerClient client = ctx.getModelControllerClient();\n final ParsedCommandLine args = ctx.getParsedCommandLine();\n assertNotPresent(allRelevantServerGroups, args);\n assertNotPresent(content, args);\n assertNotPresent(deployments, args);\n assertNotPresent(redeployAffected, args);\n final String name = getName(ctx, true);\n final String sg = serverGroups.getValue(ctx.getParsedCommandLine());\n if (ctx.isDomainMode()) {\n final List<String> groups;\n if (sg == null) {\n groups = Util.getServerGroups(client);\n } else {\n groups = Arrays.asList(sg.split(\"String_Node_Str\"));\n }\n if (groups.size() == 0) {\n throw new CommandFormatException(serverGroups.getFullName() + \"String_Node_Str\");\n }\n for (String group : groups) {\n final List<String> links = loadLinks(client, name, group);\n if (!links.isEmpty()) {\n ctx.printLine(\"String_Node_Str\" + group + Util.LINE_SEPARATOR);\n ctx.printColumns(links);\n ctx.printLine(\"String_Node_Str\");\n }\n }\n } else {\n final List<String> content = loadLinks(client, name, sg);\n if (l.isPresent(args)) {\n for (String contentPath : content) {\n ctx.printLine(contentPath);\n }\n } else {\n ctx.printColumns(content);\n }\n }\n}\n"
"protected ElementParameterType getParameterType(NodeType node, String paramName) {\n ElementParameterType paramType = ParameterUtilTool.findParameterType(node, paramName);\n if (node != null && paramType != null) {\n Object value = ParameterUtilTool.convertParameterValue(paramType);\n if (\"String_Node_Str\".equals(paramName) && \"String_Node_Str\".equals(value)) {\n paramName = \"String_Node_Str\";\n paramType = ParameterUtilTool.findParameterType(node, paramName);\n } else if (\"String_Node_Str\".equals(paramName) && value != null && !\"String_Node_Str\".equals(value)) {\n ElementParameterType useConnection = ParameterUtilTool.findParameterType(node, \"String_Node_Str\");\n if (useConnection != null && Boolean.valueOf(String.valueOf(ParameterUtilTool.convertParameterValue(useConnection)))) {\n return paramType;\n } else {\n return null;\n }\n } else if (\"String_Node_Str\".equals(paramName)) {\n if (\"String_Node_Str\".equals(value)) {\n paramType.setValue(\"String_Node_Str\");\n } else {\n paramType.setValue(\"String_Node_Str\");\n }\n }\n }\n return paramType;\n}\n"
"private static void initTestArguments(String testArguments) {\n if (testArguments == null || testArguments.isEmpty()) {\n return;\n }\n String[] changes = testArguments.split(Constants.REGEX_COMMA_CHARACTER);\n if (changes.length != Constants.TEST_ARGUMENTS_REQUIRED) {\n System.err.print(Constants.MSG_ERROR_TEST_ARGUMENTS);\n System.out.println();\n System.out.println(changes.length + \"String_Node_Str\" + Constants.TEST_ARGUMENTS_REQUIRED + \"String_Node_Str\");\n System.out.println(\"String_Node_Str\" + testArguments);\n System.exit(1);\n }\n try {\n CreateTestInstance cti = new CreateTestInstance(deployConfigFile);\n cti.applyTestArguments(changes[Constants.TEST_ARGUMENT_OFFSET_INDEX], changes[Constants.TEST_ARGUMENT_HTTP_INDEX], changes[Constants.TEST_ARGUMENT_ENVIRONMENT_NAME_INDEX], changes[Constants.TEST_ARGUMENT_MAIL_INDEX]);\n String tmp = deployConfigFile.getPath();\n String[] configFile = tmp.split(Constants.REGEX_DOT_CHARACTER);\n String nameOfNewConfig = configFile[0] + Constants.TEST_CONFIG_FILE_REPLACE_ENDING;\n cti.createConfigurationFile(nameOfNewConfig);\n deployConfigFile = new File(nameOfNewConfig);\n } catch (IOException e) {\n System.out.println(\"String_Node_Str\" + e);\n System.exit(1);\n }\n}\n"
"public String[] createCatalogSelectors(String path) {\n if (path == null || !path.startsWith(\"String_Node_Str\")) {\n return (null);\n }\n Matcher categoryMatcher = categoryPattern.matcher(path);\n ArrayList<String> selectors = new ArrayList<String>();\n while (categoryMatcher.find()) {\n selectors.add(createCatalogSelector(categoryMatcher.group(1)));\n }\n return ((String[]) selectors.toArray());\n}\n"
"public IDiskArray findAll() throws IOException {\n IDiskArray result = new BufferedPrimitiveDiskArray(Math.min(Constants.MAX_LIST_BUFFER_SIZE, length));\n int lastPos = length() - 1;\n for (int i = 0; i <= lastPos; i++) {\n result.add(new Integer(i));\n }\n return result;\n}\n"
"private void checkDocuments(Set hashSet, boolean mp3) {\n Iterator iter = null;\n if (hashSet != null)\n iter = hashSet.iterator();\n if (iter == null)\n return;\n while (iter.hasNext()) {\n File file = (File) iter.next();\n String hash = metaFileManager.readFromMap(file);\n LimeXMLDocument doc;\n synchronized (mainMap) {\n doc = (LimeXMLDocument) mainMap.get(hash);\n }\n if (doc == null)\n continue;\n String actualName = null;\n try {\n actualName = file.getCanonicalPath();\n } catch (IOException ioe) {\n synchronized (mainMap) {\n doc = (LimeXMLDocument) mainMap.get(hash);\n }\n if (doc == null)\n continue;\n String actualName = null;\n try {\n actualName = file.getCanonicalPath();\n } catch (IOException ioe) {\n synchronized (mainMap) {\n mainMap.remove(hash);\n }\n }\n }\n String identifier = doc.getIdentifier();\n if (!actualName.equalsIgnoreCase(identifier))\n doc.setIdentifier(actualName);\n }\n}\n"
"public void render() {\n glClear(GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n RenderContext.colour(Theme.BASE);\n RenderContext.rect(0, 0, Display.getWidth(), Display.getHeight());\n renderChildren(children);\n RenderContext.colour(Colour.YELLOW);\n final String framerate = \"String_Node_Str\" + frameRate + \"String_Node_Str\" + tickRate;\n final int padding = 60;\n RenderContext.drawString(framerate, Display.getWidth() - RenderBackend.INTERFACE_FONT.getWidth(framerate) - (padding * 2), Display.getHeight() - RenderBackend.INTERFACE_FONT.getHeight() - padding);\n RenderContext.drawString(\"String_Node_Str\" + commands + \"String_Node_Str\", padding, Display.getHeight() - RenderBackend.INTERFACE_FONT.getHeight() - padding);\n}\n"
"protected void createFormContent(IManagedForm managedForm) {\n try {\n managedForm.getForm().setText(this.getTitle());\n FormToolkit toolkit = managedForm.getToolkit();\n Composite composite = managedForm.getForm().getBody();\n composite.setLayout(new GridLayout(1, false));\n Composite statusComposite = toolkit.createComposite(composite, SWT.NONE);\n statusComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n statusComposite.setLayout(new GridLayout(5, false));\n Label descriptionLabel = toolkit.createLabel(statusComposite, \"String_Node_Str\", SWT.NULL);\n descriptionLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true, 1, 1));\n statusLabel = toolkit.createLabel(statusComposite, \"String_Node_Str\", SWT.NULL);\n statusLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true, 1, 1));\n Button startButton = toolkit.createButton(statusComposite, \"String_Node_Str\", SWT.TOGGLE);\n startButton.setImage(ImageCache.getCreatedImage(EImage.RUN_EXC.getPath()));\n startButton.setToolTipText(\"String_Node_Str\");\n startButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true, 1, 1));\n startButton.addListener(SWT.Selection, new Listener() {\n public void handleEvent(Event event) {\n startSubscriptionEngine();\n }\n });\n Button stopButton = toolkit.createButton(statusComposite, \"String_Node_Str\", SWT.TOGGLE);\n stopButton.setImage(ImageCache.getCreatedImage(EImage.STOP.getPath()));\n stopButton.setToolTipText(\"String_Node_Str\");\n stopButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true, 1, 1));\n stopButton.addListener(SWT.Selection, new Listener() {\n public void handleEvent(Event event) {\n stopSubscriptionEngine();\n }\n });\n suspendButton = toolkit.createButton(statusComposite, \"String_Node_Str\", SWT.TOGGLE);\n suspendButton.setImage(ImageCache.getCreatedImage(EImage.SUSPEND.getPath()));\n suspendButton.setToolTipText(\"String_Node_Str\");\n suspendButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true, 1, 1));\n suspendButton.addListener(SWT.Selection, new Listener() {\n public void handleEvent(Event event) {\n if (suspendButton.getSelection()) {\n suspendSubscriptionEngine();\n } else {\n resumeSubscriptionEngine();\n }\n }\n });\n Composite separator = toolkit.createCompositeSeparator(composite);\n separator.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n ((GridData) separator.getLayoutData()).heightHint = 2;\n Composite firstLineComposite = toolkit.createComposite(composite);\n firstLineComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));\n firstLineComposite.setLayout(new GridLayout(9, false));\n Label routingOrdersLabel = toolkit.createLabel(firstLineComposite, \"String_Node_Str\", SWT.NULL);\n routingOrdersLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 9, 1));\n final SimpleDateFormat sdf = new SimpleDateFormat(\"String_Node_Str\");\n Label fromLabel = toolkit.createLabel(firstLineComposite, \"String_Node_Str\", SWT.NULL);\n fromLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n CalendarSelectWidget fromCalendar = new CalendarSelectWidget(toolkit, firstLineComposite, true);\n fromText = fromCalendar.getText();\n Label toLabel = toolkit.createLabel(firstLineComposite, \"String_Node_Str\", SWT.NULL);\n toLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n CalendarSelectWidget toCalendar = new CalendarSelectWidget(toolkit, firstLineComposite, false);\n toText = toCalendar.getText();\n Label statusLabel = toolkit.createLabel(firstLineComposite, \"String_Node_Str\", SWT.NULL);\n statusLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n statusCombo = new Combo(firstLineComposite, SWT.READ_ONLY | SWT.DROP_DOWN | SWT.MULTI);\n statusCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n statusCombo.addKeyListener(new KeyListener() {\n public void keyPressed(KeyEvent e) {\n }\n public void keyReleased(KeyEvent e) {\n if ((e.stateMask == 0) && (e.character == SWT.CR)) {\n RoutingEngineV2BrowserMainPage.this.resultsViewer.setInput(getResults());\n }\n }\n });\n statusCombo.add(\"String_Node_Str\");\n statusCombo.add(\"String_Node_Str\");\n statusCombo.add(\"String_Node_Str\");\n statusCombo.select(0);\n Button bSearch = toolkit.createButton(firstLineComposite, \"String_Node_Str\", SWT.CENTER);\n bSearch.setImage(ImageCache.getCreatedImage(EImage.BROWSE.getPath()));\n bSearch.setToolTipText(\"String_Node_Str\");\n bSearch.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n bSearch.addListener(SWT.Selection, new Listener() {\n public void handleEvent(Event event) {\n RoutingEngineV2BrowserMainPage.this.resultsViewer.setInput(getResults());\n }\n });\n Composite searchLineComposite = toolkit.createComposite(composite);\n searchLineComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));\n searchLineComposite.setLayout(new GridLayout(4, false));\n Label documentTypeLabel = toolkit.createLabel(searchLineComposite, \"String_Node_Str\", SWT.NULL);\n documentTypeLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n documentTypeText = toolkit.createText(searchLineComposite, \"String_Node_Str\", SWT.BORDER);\n documentTypeText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));\n ((GridData) documentTypeText.getLayoutData()).widthHint = 120;\n documentTypeText.addKeyListener(new KeyListener() {\n public void keyPressed(KeyEvent e) {\n }\n public void keyReleased(KeyEvent e) {\n if ((e.stateMask == 0) && (e.character == SWT.CR)) {\n RoutingEngineV2BrowserMainPage.this.resultsViewer.setInput(getResults());\n }\n }\n });\n Label idLabel = toolkit.createLabel(searchLineComposite, \"String_Node_Str\", SWT.NULL);\n idLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n idText = toolkit.createText(searchLineComposite, \"String_Node_Str\", SWT.BORDER);\n idText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));\n idText.addKeyListener(new KeyListener() {\n public void keyPressed(KeyEvent e) {\n }\n public void keyReleased(KeyEvent e) {\n if ((e.stateMask == 0) && (e.character == SWT.CR)) {\n RoutingEngineV2BrowserMainPage.this.resultsViewer.setInput(getResults());\n }\n }\n });\n Label serviceLabel = toolkit.createLabel(searchLineComposite, \"String_Node_Str\", SWT.NULL);\n serviceLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n serviceCombo = new Combo(searchLineComposite, SWT.READ_ONLY | SWT.DROP_DOWN | SWT.MULTI);\n serviceCombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n serviceCombo.addKeyListener(new KeyListener() {\n public void keyPressed(KeyEvent e) {\n }\n public void keyReleased(KeyEvent e) {\n if ((e.stateMask == 0) && (e.character == SWT.CR)) {\n RoutingEngineV2BrowserMainPage.this.resultsViewer.setInput(getResults());\n }\n }\n });\n serviceCombo.add(\"String_Node_Str\");\n WSServicesListItem[] servicesList = getPort().getServicesList(new WSGetServicesList(\"String_Node_Str\")).getItem();\n if ((servicesList != null) && (servicesList.length > 0)) {\n String[] services = new String[servicesList.length];\n for (int i = 0; i < servicesList.length; i++) {\n services[i] = servicesList[i].getJndiName().replaceFirst(\"String_Node_Str\", \"String_Node_Str\");\n }\n Arrays.sort(services);\n for (int i = 0; i < services.length; i++) {\n serviceCombo.add(services[i]);\n }\n }\n serviceCombo.select(0);\n Label anyFieldLabel = toolkit.createLabel(searchLineComposite, \"String_Node_Str\", SWT.NULL);\n anyFieldLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n anyFieldText = toolkit.createText(searchLineComposite, \"String_Node_Str\", SWT.BORDER);\n anyFieldText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));\n anyFieldText.addKeyListener(new KeyListener() {\n public void keyPressed(KeyEvent e) {\n }\n public void keyReleased(KeyEvent e) {\n if ((e.stateMask == 0) && (e.character == SWT.CR)) {\n RoutingEngineV2BrowserMainPage.this.resultsViewer.setInput(getResults());\n }\n }\n });\n final Table table = createTable(composite);\n resultsViewer = new TableViewer(table);\n resultsViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n resultsViewer.setContentProvider(new ArrayContentProvider());\n resultsViewer.setLabelProvider(new ClusterTableLabelProvider());\n resultsViewer.addDoubleClickListener(new IDoubleClickListener() {\n public void doubleClick(DoubleClickEvent event) {\n resultsViewer.setSelection(event.getSelection());\n try {\n new EditItemAction(RoutingEngineV2BrowserMainPage.this.getSite().getShell(), resultsViewer).run();\n } catch (Exception e) {\n MessageDialog.openError(RoutingEngineV2BrowserMainPage.this.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\" + e.getClass().getName() + \"String_Node_Str\" + e.getLocalizedMessage());\n }\n }\n });\n hookContextMenu();\n managedForm.reflow(true);\n WidgetFactory factory = WidgetFactory.getWidgetFactory();\n factory.adapt(managedForm.getForm().getBody());\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n}\n"
"public static void amqpPrintFullConfiguration(int brokerId) {\n BrokerConnectionState connectionState = new BrokerConnectionState();\n fillAllAdresses(connectionState, brokerId);\n if (connectionState.addresses != null) {\n Iterator<FullAddress> fullAddressesIter = connectionState.addresses.iterator();\n while (fullAddressesIter.hasNext()) {\n FullAddress currFullAddress = (FullAddress) fullAddressesIter.next();\n if (currFullAddress.equals(activeBroker)) {\n System.out.println(currFullAddress + \"String_Node_Str\");\n foundActiveInDb = true;\n } else {\n System.out.println(currFullAddress);\n }\n }\n }\n}\n"
"public edu.umd.cs.findbugs.Project getFindbugsProject() throws IOException {\n edu.umd.cs.findbugs.Project findbugsProject = new edu.umd.cs.findbugs.Project();\n for (File file : getSourceFiles()) {\n findbugsProject.addFile(file.getCanonicalPath());\n }\n Collection<File> classFilesToAnalyze = javaResourceLocator.classFilesToAnalyze();\n for (File classToAnalyze : classFilesToAnalyze) {\n findbugsProject.addFile(classToAnalyze.getCanonicalPath());\n }\n for (File file : javaResourceLocator.classpath()) {\n findbugsProject.addAuxClasspathEntry(file.getAbsolutePath());\n }\n copyLibs();\n if (annotationsLib != null) {\n findbugsProject.addAuxClasspathEntry(annotationsLib.getAbsolutePath());\n findbugsProject.addAuxClasspathEntry(jsr305Lib.getAbsolutePath());\n }\n findbugsProject.setCurrentWorkingDirectory(fileSystem.workDir());\n return findbugsProject;\n}\n"
"private void newFile() throws Exception {\n String oldFilename = this.currentFilename;\n this.currentTE = this.toTE(getDate());\n this.currentFilename = this.toFilename(this.currentTE);\n this.current = FileHelper.createNewFile(this.currentFilename);\n if (this.writer != null) {\n this.writer.close();\n }\n this.writer = new FileWriter(this.current, true);\n this.delete(new File(this.toFilename(this.minTE())));\n if (LINUX) {\n try {\n new File(this.filename + this.fileExtension).delete();\n } catch (Exception x) {\n log.error(\"String_Node_Str\", x);\n }\n try {\n Runtime rt = Runtime.getRuntime();\n Process result = null;\n String exe = new String(\"String_Node_Str\" + \"String_Node_Str\" + this.currentFilename + \"String_Node_Str\" + this.filename + this.fileExtension);\n result = rt.exec(exe);\n } catch (Exception x) {\n log.error(\"String_Node_Str\", x);\n }\n }\n RollingFileCallback cb = this.getCallback();\n if (cb != null) {\n cb.onRollover(oldFilename, this.currentFilename);\n }\n}\n"
"protected void executeImpl(Action action, NodeRef actionedUponNodeRef) {\n if (nodeService.exists(actionedUponNodeRef) && !nodeService.hasAspect(actionedUponNodeRef, ContentModel.ASPECT_PENDING_DELETE) && recordService.isRecord(actionedUponNodeRef) && !recordService.isDeclared(actionedUponNodeRef)) {\n String workflowDefinitionId = workflowService.getDefinitionByName(REQUEST_INFO_WORKFLOW_DEFINITION_NAME).getId();\n Map<QName, Serializable> parameters = new HashMap<QName, Serializable>();\n parameters.put(WorkflowModel.ASSOC_PACKAGE, getWorkflowPackage(action, actionedUponNodeRef));\n parameters.put(RMWorkflowModel.RM_MIXED_ASSIGNEES, getAssignees(action));\n parameters.put(RMWorkflowModel.RM_REQUESTED_INFORMATION, getRequestedInformation(action));\n parameters.put(RMWorkflowModel.RM_RULE_CREATOR, getRuleCreator(action));\n workflowService.startWorkflow(workflowDefinitionId, parameters);\n } else {\n logger.info(\"String_Node_Str\" + actionedUponNodeRef.toString() + \"String_Node_Str\");\n }\n}\n"
"private boolean findFiles(String[] args, String option, Set<String> suffixes, Map<String, Source> found_files, Map<String, Module> found_modules, Module current_module, boolean inLinksrc) throws ProblemException, ProblemException {\n Set<File> roots = new HashSet<File>();\n List<String> includes = new LinkedList<String>();\n List<String> excludes = new LinkedList<String>();\n List<String> excludefiles = new LinkedList<String>();\n List<String> includefiles = new LinkedList<String>();\n List<String> moduleinfo = new LinkedList<String>();\n moduleinfo.add(\"String_Node_Str\");\n for (int i = 0; i < args.length; ++i) {\n if (args[i].equals(\"String_Node_Str\")) {\n if (i + 1 >= args.length) {\n throw new ProblemException(\"String_Node_Str\");\n }\n String incl = args[i + 1];\n checkPattern(incl);\n includes.add(incl);\n }\n if (args[i].equals(\"String_Node_Str\")) {\n if (i + 1 >= args.length) {\n throw new ProblemException(\"String_Node_Str\");\n }\n String excl = args[i + 1];\n checkPattern(excl);\n excludes.add(excl);\n }\n if (args[i].equals(\"String_Node_Str\")) {\n if (i + 1 >= args.length) {\n throw new ProblemException(\"String_Node_Str\");\n }\n String exclf = args[i + 1];\n checkFilePattern(exclf);\n exclf = Util.normalizeDriveLetter(exclf);\n excludefiles.add(fixupSeparator(exclf));\n }\n if (args[i].equals(\"String_Node_Str\")) {\n if (i + 1 >= args.length) {\n throw new ProblemException(\"String_Node_Str\");\n }\n String inclf = args[i + 1];\n checkFilePattern(inclf);\n inclf = Util.normalizeDriveLetter(inclf);\n includefiles.add(fixupSeparator(inclf));\n }\n if (args[i].equals(option)) {\n if (i + 1 >= args.length) {\n throw new ProblemException(\"String_Node_Str\" + option);\n }\n String[] root_dirs = args[i + 1].split(File.pathSeparator);\n for (String r : root_dirs) {\n File root = new File(r);\n if (!root.isDirectory()) {\n throw new ProblemException(\"String_Node_Str\" + r + \"String_Node_Str\");\n }\n try {\n root = root.getCanonicalFile();\n } catch (IOException e) {\n throw new ProblemException(\"String_Node_Str\" + e);\n }\n if (roots.contains(root)) {\n throw new ProblemException(\"String_Node_Str\" + r + \"String_Node_Str\" + option);\n }\n if (root.equals(bin_dir)) {\n throw new ProblemException(\"String_Node_Str\" + r + \"String_Node_Str\" + option + \"String_Node_Str\");\n }\n if (roots.equals(gensrc_dir)) {\n throw new ProblemException(\"String_Node_Str\" + r + \"String_Node_Str\" + option + \"String_Node_Str\");\n }\n if (roots.equals(header_dir)) {\n throw new ProblemException(\"String_Node_Str\" + r + \"String_Node_Str\" + option + \"String_Node_Str\");\n }\n roots.add(root);\n Source.scanRoot(root, suffixes, excludes, includes, excludefiles, includefiles, found_files, found_modules, current_module, findBooleanOption(args, \"String_Node_Str\"), false, inLinksrc);\n }\n }\n if (args[i].equals(\"String_Node_Str\") || args[i].equals(\"String_Node_Str\") || args[i].equals(\"String_Node_Str\") || args[i].equals(\"String_Node_Str\") || args[i].equals(\"String_Node_Str\")) {\n includes = new LinkedList<String>();\n excludes = new LinkedList<String>();\n excludefiles = new LinkedList<String>();\n includefiles = new LinkedList<String>();\n }\n }\n return true;\n}\n"
"public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {\n this.account = (Account) value;\n Icon accountIcon = account.getIcon();\n if (accountIcon != null)\n accountLabel.setIcon(accountIcon);\n accountLabel.setText(account.getName());\n Icon statusIcon = account.getStatusIcon();\n if (statusIcon != null)\n statusLabel.setIcon(statusIcon);\n String statusName = account.getStatusName();\n if (statusName != null)\n statusLabel.setText(statusName);\n setEnabled(list.isEnabled());\n setFont(list.getFont());\n if (!account.isEnabled()) {\n accountLabel.setForeground(Color.GRAY);\n statusLabel.setForeground(Color.GRAY);\n } else {\n accountLabel.setForeground(Color.BLACK);\n statusLabel.setForeground(Color.BLACK);\n }\n this.index = index;\n this.isSelected = isSelected;\n this.setBounds(0, 0, list.getWidth(), getPreferredSize().height);\n this.addCheckBox(account);\n return this;\n}\n"
"private void updateOrClearHeader(int firstVisiblePosition) {\n final int adapterCount = mAdapter == null ? 0 : mAdapter.getCount();\n if (adapterCount == 0 || !mAreHeadersSticky) {\n return;\n }\n final int headerViewCount = mList.getHeaderViewsCount();\n final int realFirstVisibleItem = firstVisiblePosition - headerViewCount;\n if (mList.getChildCount() == 0 || realFirstVisibleItem < 0 || realFirstVisibleItem > adapterCount - 1) {\n clearHeader();\n return;\n }\n updateHeader(realFirstVisibleItem);\n}\n"
"public SpaceNode reload(Context context, int preloadCount) {\n RecentsConfiguration config = RecentsConfiguration.getInstance();\n Resources res = context.getResources();\n LinkedHashSet<Task> tasksToLoad = new LinkedHashSet<Task>();\n TaskStack stack = new TaskStack();\n SpaceNode root = new SpaceNode();\n root.setStack(stack);\n SystemServicesProxy ssp = mSystemServicesProxy;\n List<ActivityManager.RecentTaskInfo> tasks = getRecentTasks(ssp);\n int taskCount = tasks.size();\n for (int i = 0; i < taskCount; i++) {\n ActivityManager.RecentTaskInfo t = tasks.get(i);\n ActivityInfo info = ssp.getActivityInfo(t.baseIntent.getComponent(), t.userId);\n if (info == null)\n continue;\n ActivityManager.TaskDescription av = t.taskDescription;\n String activityLabel = null;\n Drawable activityIcon = mDefaultApplicationIcon;\n int activityColor = config.taskBarViewDefaultBackgroundColor;\n if (av != null) {\n activityLabel = (av.getLabel() != null ? av.getLabel() : ssp.getActivityLabel(info));\n activityIcon = (av.getIcon() != null) ? ssp.getBadgedIcon(new BitmapDrawable(res, av.getIcon()), t.userId) : null;\n if (av.getPrimaryColor() != 0) {\n activityColor = av.getPrimaryColor();\n }\n } else {\n activityLabel = ssp.getActivityLabel(info);\n }\n boolean isForemostTask = (i == (taskCount - 1));\n Task task = new Task(t.persistentId, (t.id > -1), t.baseIntent, t.affiliatedTaskId, activityLabel, activityIcon, activityColor, t.userId, t.firstActiveTime, t.lastActiveTime, (i == (taskCount - 1)));\n if (i >= (taskCount - preloadCount)) {\n task.applicationIcon = mApplicationIconCache.getCheckLastActiveTime(task.key);\n if (task.applicationIcon == null) {\n if (isForemostTask) {\n task.applicationIcon = ssp.getActivityIcon(info, task.userId);\n if (task.applicationIcon == null) {\n task.applicationIcon = mDefaultApplicationIcon;\n }\n mApplicationIconCache.put(task.key, task.applicationIcon);\n } else {\n tasksToLoad.add(task);\n }\n }\n task.thumbnail = mThumbnailCache.getCheckLastActiveTime(task.key);\n if (task.thumbnail == null) {\n if (isForemostTask) {\n task.thumbnail = ssp.getTaskThumbnail(task.key.id);\n if (task.thumbnail != null) {\n task.thumbnail.setHasAlpha(false);\n } else {\n task.thumbnail = mDefaultThumbnail;\n }\n mThumbnailCache.put(task.key, task.thumbnail);\n } else {\n tasksToLoad.add(task);\n }\n }\n }\n stack.addTask(task);\n }\n stack.createAffiliatedGroupings();\n mLoader.start(context);\n for (Task t : tasksToLoad) {\n mLoadQueue.addTask(t);\n }\n mPackageMonitor.setTasks(tasks);\n return root;\n}\n"
"private static void editRule(String repositoryName, String path, String userName, String groupName, String newRepositoryName, String newPathString, String newUserName, String newGroupName, String newAccess) throws ApplicationException {\n if (path == null) {\n throw new ApplicationException(ResourceUtil.getString(\"String_Node_Str\"));\n }\n if (userName == null && groupName == null) {\n throw new ApplicationException(ResourceUtil.getString(\"String_Node_Str\"));\n }\n if (userName != null && groupName != null) {\n throw new ApplicationException(ResourceUtil.getString(\"String_Node_Str\"));\n }\n if (newUserName != null && newGroupName != null) {\n throw new ApplicationException(ResourceUtil.getString(\"String_Node_Str\"));\n }\n AccessRule rule = null;\n if (userName != null) {\n User user = Document.findUser(userName);\n if (user == null) {\n throw new ApplicationException(ResourceUtil.getFormattedString(\"String_Node_Str\", userName));\n }\n Repository repository = null;\n if (repositoryName != null) {\n repository = Document.findRepository(repositoryName);\n if (repository == null) {\n throw new ApplicationException(ResourceUtil.getFormattedString(\"String_Node_Str\", repositoryName));\n }\n }\n rule = Document.findUserAccessRule(repository, path, user);\n if (rule == null) {\n throw new ApplicationException(ResourceUtil.getString(\"String_Node_Str\"));\n }\n } else if (groupName == null) {\n Group group = Document.findGroup(groupName);\n if (group == null) {\n throw new ApplicationException(ResourceUtil.getFormattedString(\"String_Node_Str\", groupName));\n }\n Repository repository = null;\n if (repositoryName != null) {\n repository = Document.findRepository(repositoryName);\n if (repository == null) {\n throw new ApplicationException(ResourceUtil.getFormattedString(\"String_Node_Str\", repositoryName));\n }\n }\n rule = Document.findGroupAccessRule(repository, path, group);\n if (rule == null) {\n throw new ApplicationException(ResourceUtil.getString(\"String_Node_Str\"));\n }\n } else {\n throw new ApplicationException(ResourceUtil.getString(\"String_Node_Str\"));\n }\n if (newRepositoryName != null) {\n Repository newRepository = Document.findRepository(newRepositoryName);\n if (newRepository == null) {\n throw new ApplicationException(ResourceUtil.getFormattedString(\"String_Node_Str\", repositoryName));\n }\n rule.getPath().setRepository(newRepository);\n }\n if (newPathString != null) {\n Path newPath = Document.addPath(rule.getPath().getRepository(), newPathString);\n rule.setPath(newPath);\n }\n if (newUserName != null) {\n User newUser = Document.addUser(newUserName);\n if (newUser == null) {\n throw new ApplicationException(ResourceUtil.getFormattedString(\"String_Node_Str\", userName));\n }\n rule.setUser(newUser);\n rule.setGroup(null);\n }\n if (newGroupName != null) {\n Group newGroup = Document.findGroup(newGroupName);\n if (newGroup == null) {\n throw new ApplicationException(ResourceUtil.getFormattedString(\"String_Node_Str\", groupName));\n }\n rule.setUser(null);\n rule.setGroup(newGroup);\n }\n if (newAccess != null) {\n String newAccessLevel = (newAccess.equals(Constants.ACCESS_LEVEL_NONE)) ? Constants.ACCESS_LEVEL_DENY_ACCESS : newAccess;\n rule.setLevel(newAccessLevel);\n }\n}\n"
"public void genericTestCse() {\n Supplier<Boolean> result = () -> {\n PageFactory.initElements(new AppiumFieldDecorator(new MockWebDriver()), new TempGenericPage<>());\n return true;\n };\n assertTrue(result.get());\n}\n"
"private File _createTextFile(String name, String header) {\n if (_testsFolder != null) {\n name = _testsFolder + \"String_Node_Str\" + name;\n if (name == null || name.length() < 3) {\n System.out.println(\"String_Node_Str\");\n return null;\n } else {\n if (!(name.endsWith(\"String_Node_Str\") || name.endsWith(\"String_Node_Str\"))) {\n name = name.concat(\"String_Node_Str\");\n }\n try {\n File file = new File(name);\n boolean verify = false;\n if (!file.exists()) {\n verify = file.createNewFile();\n writeInTextFile(file, header);\n } else {\n verify = true;\n }\n if (!verify) {\n throw new Exception();\n }\n System.out.println(name);\n return file;\n } catch (Exception e) {\n System.out.println(\"String_Node_Str\");\n return null;\n }\n }\n } else {\n return null;\n }\n}\n"
"public long newId() {\n long millionNow = million.get();\n long idAddition = currentId.incrementAndGet();\n if (idAddition >= MILLION) {\n synchronized (this) {\n try {\n idAddition = currentId.get();\n if (idAddition >= MILLION) {\n Long idMillion = getNewMillion();\n long newMillion = idMillion * MILLION;\n million.set(newMillion);\n currentId.set(0);\n }\n millionNow = million.get();\n idAddition = currentId.incrementAndGet();\n } catch (Throwable t) {\n t.printStackTrace();\n }\n }\n }\n return millionNow + idAddition;\n}\n"
"private void populateResultSetCacheInResultSetPopulator(OdiResultSetWrapper odaResultSet) throws DataException {\n int max = 0;\n if (computedColumnHelper != null)\n computedColumnHelper.setModel(TransformationConstants.PRE_CALCULATE_MODEL);\n if (filterByRow != null) {\n filterByRow.setWorkingFilterSet(FilterByRow.NO_FILTER);\n }\n max = this.populator.getQuery().getMaxRows();\n if (filterByRow != null)\n this.populator.getQuery().setMaxRows(0);\n PassUtil.pass(this.populator, odaResultSet, false, this.session);\n this.removeOnFetchScriptHelper();\n this.populator.getQuery().setMaxRows(max);\n}\n"
"private boolean isShutdown() {\n boolean isDead = false;\n int numTimes = CHECK_ALIVE_NUMBER_OF_TIMES;\n while (!isDead && numTimes > 0) {\n try {\n numTimes--;\n nwServer.testNotRunning(dbId);\n isDead = true;\n } catch (Exception e) {\n isDead = false;\n try {\n Thread.sleep(3000);\n } catch (InterruptedException ex) {\n }\n }\n }\n return isDead;\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(), getDocumentLocator(), 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 = parentRecord;\n while (pRec.isSelfRecord()) {\n pRec = pRec.parentRecord;\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 QueryHandle enableDataset(Id.DatasetInstance datasetID, DatasetSpecification spec) throws IllegalArgumentException, ExploreException, SQLException, UnsupportedTypeException {\n String datasetName = datasetID.getId();\n Map<String, String> serdeProperties = ImmutableMap.of(Constants.Explore.DATASET_NAME, datasetName, Constants.Explore.DATASET_NAMESPACE, datasetID.getNamespaceId());\n String createStatement = null;\n String datasetType = spec.getType();\n if (ObjectMappedTableModule.FULL_NAME.equals(datasetType) || ObjectMappedTableModule.SHORT_NAME.equals(datasetType)) {\n String schemaStr = spec.getProperty(DatasetProperties.SCHEMA);\n if (schemaStr == null) {\n throw new IllegalArgumentException(\"String_Node_Str\" + datasetID);\n }\n try {\n Schema schema = Schema.parseJson(schemaStr);\n createStatement = new CreateStatementBuilder(datasetName, getHiveTableName(datasetName)).setSchema(schema).setTableComment(\"String_Node_Str\").buildWithStorageHandler(Constants.Explore.DATASET_STORAGE_HANDLER_CLASS, serdeProperties);\n return exploreService.execute(datasetID.getNamespace(), createStatement);\n } catch (IOException e) {\n throw new IllegalArgumentException(\"String_Node_Str\" + datasetID);\n }\n }\n Dataset dataset = ExploreServiceUtils.instantiateDataset(datasetFramework, datasetID);\n if (dataset instanceof RecordScannable || dataset instanceof RecordWritable) {\n LOG.debug(\"String_Node_Str\", datasetName);\n createStatement = new CreateStatementBuilder(datasetName, getDatasetTableName(datasetID)).setSchema(hiveSchemaFor(dataset)).setTableComment(\"String_Node_Str\").buildWithStorageHandler(Constants.Explore.DATASET_STORAGE_HANDLER_CLASS, serdeProperties);\n } else if (dataset instanceof FileSet || dataset instanceof PartitionedFileSet) {\n Map<String, String> properties = spec.getProperties();\n if (FileSetProperties.isExploreEnabled(properties)) {\n LOG.debug(\"String_Node_Str\", datasetName);\n createStatement = generateFileSetCreateStatement(datasetID, dataset, properties);\n }\n }\n return exploreService.execute(datasetID.getNamespace(), createStatement);\n}\n"
"public static void showSnackMessage(Activity activity, String msg) {\n LogHelper.e(\"String_Node_Str\" + msg);\n activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE);\n final Snackbar snackbar = Snackbar.make(activity.getWindow().getDecorView(), msg, Snackbar.LENGTH_SHORT);\n View view = snackbar.getView();\n ((TextView) view.findViewById(R.id.snackbar_text)).setTextColor(ContextCompat.getColor(activity, R.color.white));\n snackbar.show();\n}\n"
"public void onSlotChanged() {\n if (inventory instanceof AppEngInternalInventory)\n ((AppEngInternalInventory) inventory).onInventoryChanged(getSlotIndex());\n else\n super.onSlotChanged();\n isValid = hasCalculatedValidness.NotAvailable;\n}\n"
"public void handle(DownloadLink downloadLink) throws Exception {\n try {\n while (waitForNextStartAllowed(downloadLink)) {\n }\n } catch (InterruptedException e) {\n return;\n }\n putLastTimeStarted(System.currentTimeMillis());\n if (!isAGBChecked()) {\n logger.severe(\"String_Node_Str\" + getPluginID());\n downloadLink.getLinkStatus().addStatus(LinkStatus.ERROR_AGB_NOT_SIGNED);\n downloadLink.getLinkStatus().setErrorMessage(JDLocale.L(\"String_Node_Str\", \"String_Node_Str\"));\n return;\n }\n if (downloadLink.isDupeCheckallowed()) {\n if (DownloadInterface.preDownloadCheckFailed(downloadLink))\n return;\n }\n Long t = 0l;\n if (HOSTER_WAIT_UNTIL_TIMES.containsKey(this.getClass())) {\n t = HOSTER_WAIT_UNTIL_TIMES.get(this.getClass());\n }\n if (!enablePremium || !JDUtilities.getConfiguration().getBooleanProperty(Configuration.PARAM_USE_GLOBAL_PREMIUM, true)) {\n if (t > 0) {\n this.resetHosterWaitTime();\n this.fireControlEvent(ControlEvent.CONTROL_SPECIFIED_DOWNLOADLINKS_CHANGED, JDUtilities.getController().getDownloadLinks(this));\n }\n try {\n handleFree(downloadLink);\n if (dl != null && dl.getConnection() != null) {\n try {\n dl.getConnection().disconnect();\n } catch (Exception e) {\n }\n }\n } catch (PluginException e) {\n e.fillLinkStatus(downloadLink.getLinkStatus());\n }\n return;\n }\n Account account = null;\n ArrayList<Account> disabled = new ArrayList<Account>();\n ArrayList<Account> accounts = getPremiumAccounts();\n synchronized (accounts) {\n for (int i = 0; i < accounts.size(); i++) {\n Account next = accounts.get(i);\n if (!next.isTempDisabled() && next.isEnabled() && next.getPass() != null && next.getPass().trim().length() > 0) {\n account = next;\n break;\n } else if (next.isTempDisabled() && next.isEnabled()) {\n disabled.add(next);\n }\n }\n }\n if (account != null) {\n try {\n handlePremium(downloadLink, account);\n if (dl != null && dl.getConnection() != null) {\n try {\n dl.getConnection().disconnect();\n } catch (Exception e) {\n }\n }\n } catch (PluginException e) {\n e.fillLinkStatus(downloadLink.getLinkStatus());\n }\n synchronized (accounts) {\n if (downloadLink.getLinkStatus().hasStatus(LinkStatus.ERROR_PREMIUM)) {\n if (downloadLink.getLinkStatus().getValue() == LinkStatus.VALUE_ID_PREMIUM_TEMP_DISABLE) {\n logger.severe(\"String_Node_Str\" + account.getUser() + \"String_Node_Str\");\n account.setTempDisabled(true);\n account.setStatus(downloadLink.getLinkStatus().getErrorMessage());\n getPluginConfig().save();\n } else if (downloadLink.getLinkStatus().getValue() == LinkStatus.VALUE_ID_PREMIUM_DISABLE) {\n account.setEnabled(false);\n account.setStatus(downloadLink.getLinkStatus().getLongErrorMessage());\n getPluginConfig().save();\n logger.severe(\"String_Node_Str\" + account.getUser() + \"String_Node_Str\" + downloadLink.getLinkStatus().getLongErrorMessage());\n } else {\n account.setEnabled(false);\n account.setStatus(downloadLink.getLinkStatus().getLongErrorMessage());\n getPluginConfig().save();\n logger.severe(\"String_Node_Str\" + account.getUser() + \"String_Node_Str\" + downloadLink.getLinkStatus().getLongErrorMessage());\n }\n } else {\n account.setStatus(JDLocale.L(\"String_Node_Str\", \"String_Node_Str\"));\n getPluginConfig().save();\n }\n }\n } else {\n if (t > 0) {\n this.resetHosterWaitTime();\n this.fireControlEvent(ControlEvent.CONTROL_SPECIFIED_DOWNLOADLINKS_CHANGED, JDUtilities.getController().getDownloadLinks(this));\n }\n try {\n handleFree(downloadLink);\n if (dl != null && dl.getConnection() != null) {\n try {\n dl.getConnection().disconnect();\n } catch (Exception e) {\n }\n }\n } catch (PluginException e) {\n e.fillLinkStatus(downloadLink.getLinkStatus());\n }\n synchronized (accounts) {\n if (disabled.size() > 0) {\n int randId = (int) (Math.random() * disabled.size());\n disabled.get(randId).setTempDisabled(false);\n getPluginConfig().save();\n }\n }\n }\n return;\n}\n"
"private void updateProperty() {\n Object updateObject = result.getUpdateObject();\n if (updateObject == null) {\n return;\n }\n if (updateObject instanceof Node) {\n Node node = (Node) updateObject;\n boolean update = false;\n boolean isXsdPath = false;\n Object parameter = result.getParameter();\n IElementParameter curPropertyParam = null;\n String parentParamName = \"String_Node_Str\";\n ConnectionItem connectionItem = null;\n if (parameter instanceof ConnectionItem) {\n if (parameter instanceof XmlFileConnectionItem) {\n String filePath = ((XmlFileConnection) ((XmlFileConnectionItem) parameter).getConnection()).getXmlFilePath();\n if (filePath != null) {\n if (XmlUtil.isXSDFile(filePath)) {\n isXsdPath = true;\n }\n }\n }\n connectionItem = (ConnectionItem) result.getParameter();\n for (IElementParameter param : node.getElementParameters()) {\n if (param.getFieldType() == EParameterFieldType.PROPERTY_TYPE && param.getChildParameters().get(EParameterName.REPOSITORY_PROPERTY_TYPE.getName()).getValue().equals(connectionItem.getProperty().getId())) {\n curPropertyParam = param;\n parentParamName = curPropertyParam.getName();\n break;\n }\n }\n }\n if (result.getResultType() == EUpdateResult.UPDATE) {\n if (result.isChecked() && connectionItem != null) {\n List<? extends IElementParameter> elemParameters = new ArrayList<>(node.getElementParameters());\n for (IElementParameter param : elemParameters) {\n String repositoryValue = param.getRepositoryValue();\n if (param.getRepositoryValue() == null || (curPropertyParam != null && param.getRepositoryProperty() != null && !param.getRepositoryProperty().equals(curPropertyParam.getName()))) {\n continue;\n }\n if (param.getFieldType() == EParameterFieldType.PROPERTY_TYPE) {\n continue;\n }\n if ((repositoryValue != null) && (param.isShow(node.getElementParameters()) || (node instanceof INode && ((INode) node).getComponent().getName().equals(\"String_Node_Str\")) || (node instanceof INode && ((INode) node).getComponent().getName().equals(\"String_Node_Str\")))) {\n if (param.getName().equals(EParameterName.PROPERTY_TYPE.getName()) || param.getFieldType() == EParameterFieldType.MEMO_SQL) {\n continue;\n }\n if (param.getFieldType().equals(EParameterFieldType.FILE) && isXsdPath) {\n continue;\n }\n IMetadataTable table = null;\n if (!node.getMetadataList().isEmpty()) {\n table = node.getMetadataList().get(0);\n }\n Object objectValue = RepositoryToComponentProperty.getValue(connectionItem.getConnection(), repositoryValue, table);\n if (objectValue == null || \"String_Node_Str\".equals(objectValue)) {\n if (GlobalServiceRegister.getDefault().isServiceRegistered(IESBService.class)) {\n IESBService service = (IESBService) GlobalServiceRegister.getDefault().getService(IESBService.class);\n if (service != null) {\n String propertyValue = (String) node.getPropertyValue(EParameterName.REPOSITORY_PROPERTY_TYPE.getName());\n if (node.getComponent().getName().startsWith(\"String_Node_Str\")) {\n if (propertyValue.contains(\"String_Node_Str\")) {\n propertyValue = propertyValue.split(\"String_Node_Str\")[0];\n }\n }\n IRepositoryViewObject lastVersion = UpdateRepositoryUtils.getRepositoryObjectById(propertyValue);\n if (lastVersion != null) {\n Item item = lastVersion.getProperty().getItem();\n if (item != null) {\n Object objectValueFromESB = service.getValue(item, repositoryValue, node);\n if (objectValueFromESB != null) {\n objectValue = objectValueFromESB;\n }\n }\n }\n }\n }\n }\n if (param.getName().equals(EParameterName.CDC_TYPE_MODE.getName())) {\n String propertyValue = (String) node.getPropertyValue(EParameterName.REPOSITORY_PROPERTY_TYPE.getName());\n Item item = null;\n IRepositoryViewObject lastVersion = UpdateRepositoryUtils.getRepositoryObjectById(propertyValue);\n if (lastVersion != null) {\n item = lastVersion.getProperty().getItem();\n }\n if (item != null && PluginChecker.isCDCPluginLoaded()) {\n ICDCProviderService service = (ICDCProviderService) GlobalServiceRegister.getDefault().getService(ICDCProviderService.class);\n if (service != null) {\n try {\n List<IRepositoryViewObject> all;\n all = CorePlugin.getDefault().getProxyRepositoryFactory().getAll(ERepositoryObjectType.METADATA_CONNECTIONS);\n for (IRepositoryViewObject obj : all) {\n Item tempItem = obj.getProperty().getItem();\n if (tempItem instanceof DatabaseConnectionItem) {\n String cdcLinkId = service.getCDCConnectionLinkId((DatabaseConnectionItem) tempItem);\n if (cdcLinkId != null && item.getProperty().getId().equals(cdcLinkId)) {\n objectValue = RepositoryToComponentProperty.getValue(((DatabaseConnectionItem) tempItem).getConnection(), repositoryValue, node.getMetadataList().get(0));\n }\n }\n }\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n }\n }\n }\n }\n if (GlobalServiceRegister.getDefault().isServiceRegistered(IJsonFileService.class)) {\n IJsonFileService jsonService = (IJsonFileService) GlobalServiceRegister.getDefault().getService(IJsonFileService.class);\n boolean paramChanged = jsonService.changeFilePathFromRepository(connectionItem.getConnection(), param, node, objectValue);\n if (paramChanged) {\n continue;\n }\n }\n if (objectValue != null) {\n if (param.getFieldType().equals(EParameterFieldType.CLOSED_LIST) && repositoryValue.equals(UpdatesConstants.TYPE)) {\n boolean found = false;\n String[] items = param.getListRepositoryItems();\n for (int i = 0; (i < items.length) && (!found); i++) {\n if (objectValue.equals(items[i])) {\n found = true;\n node.setPropertyValue(param.getName(), param.getListItemsValue()[i]);\n }\n }\n } else {\n if (param.getFieldType().equals(EParameterFieldType.TABLE)) {\n String name = param.getName();\n if (name.equals(\"String_Node_Str\") || name.equals(\"String_Node_Str\") || name.equals(\"String_Node_Str\") && objectValue instanceof List) {\n param.setValue(objectValue);\n } else if (param.getName().equals(\"String_Node_Str\") && objectValue instanceof List) {\n List<Map<String, Object>> paramMaps = (List<Map<String, Object>>) param.getValue();\n if (paramMaps == null) {\n paramMaps = new ArrayList<Map<String, Object>>();\n node.setPropertyValue(param.getName(), paramMaps);\n } else {\n List<Map<String, Object>> objectValueList = (List<Map<String, Object>>) objectValue;\n if (paramMaps.size() < objectValueList.size()) {\n paramMaps.clear();\n for (int i = 0; i < objectValueList.size(); i++) {\n Map<String, Object> map = objectValueList.get(i);\n paramMaps.add(map);\n }\n } else {\n String value = null;\n List<String> repNames = new ArrayList<String>();\n for (int i = 0; i < objectValueList.size(); i++) {\n repNames.add(objectValueList.get(i).get(\"String_Node_Str\").toString());\n }\n for (int j = 0; j < paramMaps.size(); j++) {\n Map<String, Object> map = paramMaps.get(j);\n value = map.get(\"String_Node_Str\").toString();\n if (!repNames.contains(value)) {\n paramMaps.remove(j);\n }\n }\n }\n }\n } else if ((name.equals(\"String_Node_Str\") || name.equals(\"String_Node_Str\") || name.equals(\"String_Node_Str\") || name.equals(\"String_Node_Str\") && objectValue instanceof List)) {\n List<HashMap<String, Object>> oldValue = (List<HashMap<String, Object>>) param.getValue();\n for (HashMap<String, Object> map : oldValue) {\n if (map.get(\"String_Node_Str\") != null && !map.get(\"String_Node_Str\").equals(\"String_Node_Str\") && Boolean.valueOf(String.valueOf(map.get(\"String_Node_Str\")))) {\n ((List<HashMap<String, Object>>) objectValue).add(map);\n }\n }\n param.setValue(objectValue);\n } else if (param.getName().equals(\"String_Node_Str\") && objectValue instanceof List) {\n param.setValue(objectValue);\n }\n } else {\n node.setPropertyValue(param.getName(), objectValue);\n }\n }\n } else if (param.getFieldType().equals(EParameterFieldType.TABLE) && UpdatesConstants.XML_MAPPING.equals(repositoryValue)) {\n RepositoryToComponentProperty.getTableXMLMappingValue(connectionItem.getConnection(), (List<Map<String, Object>>) param.getValue(), node);\n } else if (param.getFieldType().equals(EParameterFieldType.TABLE) && param.getName().equals(\"String_Node_Str\")) {\n objectValue = RepositoryToComponentProperty.getValue(connectionItem.getConnection(), \"String_Node_Str\", node.getMetadataList().get(0));\n List<Map<String, Object>> paramMaps = (List<Map<String, Object>>) param.getValue();\n if (paramMaps == null) {\n paramMaps = new ArrayList<Map<String, Object>>();\n } else {\n paramMaps.clear();\n }\n if (objectValue != null) {\n List<String> objectValueList = (List<String>) objectValue;\n for (int i = 0; i < objectValueList.size(); i++) {\n Map<String, Object> map = new HashedMap();\n map.put(\"String_Node_Str\", TalendTextUtils.addQuotes(objectValueList.get(i)));\n paramMaps.add(map);\n }\n }\n }\n if (!(\"String_Node_Str\".equals(node.getComponent().getName()) && \"String_Node_Str\".equals(param.getRepositoryValue()))) {\n param.setRepositoryValueUsed(true);\n param.setReadOnly(true);\n update = true;\n }\n }\n }\n }\n }\n if (!update) {\n String propertyName = parentParamName + \"String_Node_Str\" + EParameterName.PROPERTY_TYPE.getName();\n if (this.result.getParameter() instanceof IElementParameter) {\n IElementParameter parentParam = ((IElementParameter) this.result.getParameter()).getParentParameter();\n if (parentParam != null) {\n parentParamName = parentParam.getName();\n propertyName = parentParam.getName() + \"String_Node_Str\" + parentParam.getChildParameters().get(EParameterName.PROPERTY_TYPE.getName()).getName();\n }\n }\n node.setPropertyValue(propertyName, EmfComponent.BUILTIN);\n for (IElementParameter param : node.getElementParameters()) {\n if (param.getRepositoryValue() == null || param.getRepositoryProperty() != null && !param.getRepositoryProperty().equals(parentParamName)) {\n continue;\n }\n if (param.getFieldType() == EParameterFieldType.PROPERTY_TYPE) {\n continue;\n }\n if (param.isShow(node.getElementParameters())) {\n if (param.getName().equals(EParameterName.PROPERTY_TYPE.getName()) || param.getFieldType() == EParameterFieldType.MEMO_SQL) {\n continue;\n }\n param.setRepositoryValueUsed(false);\n param.setReadOnly(false);\n }\n }\n }\n }\n}\n"
"public void run() {\n while (isRunning.get()) {\n for (DistributedObject distributedObject : client.getDistributedObjects()) {\n distributedObject.destroy();\n }\n }\n}\n"
"private void materializeCube(CubeHandle cubeHandle, Map appContext) throws BirtException {\n int mode = this.sessionContext.getDataEngineContext().getMode();\n try {\n CubeMaterializer cubeMaterializer = null;\n if (appContext == null)\n appContext = sessionContext.getAppContext();\n if (mode == DataEngineContext.DIRECT_PRESENTATION) {\n int size = 0;\n if (appContext != null) {\n Integer value = DataTypeUtil.toInteger(appContext.get(DataEngine.IN_MEMORY_CUBE_SIZE));\n if (value != null && value.intValue() > 0) {\n size = value.intValue();\n }\n }\n cubeMaterializer = createCubeMaterializer(cubeHandle, size);\n createCube((TabularCubeHandle) cubeHandle, cubeMaterializer, appContext);\n cubeMaterializer.close();\n } else if (mode == DataEngineContext.MODE_GENERATION) {\n cubeMaterializer = createCubeMaterializer(cubeHandle);\n createCube((TabularCubeHandle) cubeHandle, cubeMaterializer, appContext);\n cubeMaterializer.saveCubeToReportDocument(cubeHandle.getQualifiedName(), this.sessionContext.getDocumentWriter(), null);\n cubeMaterializer.close();\n }\n } catch (Exception e) {\n throw new DataException(e.getLocalizedMessage());\n }\n}\n"
"private void setupBlur(Properties props, JdbcTemplate jdbc, List<String> activeCollectors) {\n Map<String, String> blurInstances = loadBlurInstances(props);\n for (Map.Entry<String, String> blurEntry : blurInstances.entrySet()) {\n final String zookeeperName = blurEntry.getKey();\n final String connection = blurEntry.getValue();\n new Thread(new BlurCollector(zookeeperName, connection, activeCollectors, new BlurDatabaseConnection(jdbc), jdbc), \"String_Node_Str\" + zookeeperName).start();\n }\n}\n"
"public boolean isEntry(Statement n) {\n switch(n.getKind()) {\n case PARAM_CALLEE:\n case HEAP_PARAM_CALLEE:\n case METHOD_ENTRY:\n return true;\n case PHI:\n case PI:\n case NORMAL_RET_CALLER:\n case PARAM_CALLER:\n case HEAP_RET_CALLER:\n case NORMAL:\n case EXC_RET_CALLEE:\n case EXC_RET_CALLER:\n case HEAP_PARAM_CALLER:\n case HEAP_RET_CALLEE:\n case NORMAL_RET_CALLEE:\n return false;\n default:\n Assertions.UNREACHABLE(n.toString());\n return false;\n }\n}\n"
"private URI updateHref(final URI href) {\n final URI tempDirUri = tempDir.toURI();\n final URI filePath = tempDirUri.resolve(toURI(inputFile));\n final URI keyValue = tempDirUri.resolve(href);\n return URLUtils.getRelativePath(filePath, keyValue);\n}\n"
"public boolean executeKeyEvent(KeyEvent event) {\n mTempRect.setEmpty();\n if (!canScroll()) {\n if (isFocused() && event.getKeyCode() != KeyEvent.KEYCODE_BACK) {\n View currentFocused = findFocus();\n if (currentFocused == this)\n currentFocused = null;\n View nextFocused = FocusFinder.getInstance().findNextFocus(this, currentFocused, View.FOCUS_DOWN);\n return nextFocused != null && nextFocused != this && nextFocused.requestFocus(View.FOCUS_DOWN);\n }\n return false;\n }\n boolean handled = false;\n if (event.getAction() == KeyEvent.ACTION_DOWN) {\n switch(event.getKeyCode()) {\n case KeyEvent.KEYCODE_DPAD_UP:\n if (!event.isAltPressed()) {\n handled = arrowScroll(View.FOCUS_UP);\n } else {\n handled = fullScroll(View.FOCUS_UP);\n }\n break;\n case KeyEvent.KEYCODE_DPAD_DOWN:\n if (!event.isAltPressed()) {\n handled = arrowScroll(View.FOCUS_DOWN);\n } else {\n handled = fullScroll(View.FOCUS_DOWN);\n }\n break;\n case KeyEvent.KEYCODE_SPACE:\n pageScroll(event.isShiftPressed() ? View.FOCUS_UP : View.FOCUS_DOWN);\n break;\n }\n }\n return handled;\n}\n"
"public boolean deregisterDriver(String className) throws OdaException {\n if (className == null || className.length() == 0)\n return false;\n if (isDeregistered(className)) {\n return true;\n }\n Driver driver = findDriver(className, null);\n if (driver != null) {\n try {\n if (logger.isLoggable(Level.FINER))\n logger.finer(\"String_Node_Str\" + className);\n if (registeredDrivers.containsKey(className)) {\n DriverManager.deregisterDriver(new WrappedDriver(driver, className));\n registeredDrivers.remove(className);\n }\n registeredDrivers.put(className, DRIVER_DEREGISTERED);\n } catch (SQLException e) {\n logger.log(Level.WARNING, \"String_Node_Str\", e);\n }\n }\n return true;\n}\n"
"public static void clearDatabase(Context context) {\n ContentResolver cr = context.getContentResolver();\n cr.delete(StatusColumns.CONTENT_URI, null, null);\n cr.delete(UserColumns.CONTENT_URI, null, null);\n cr.delete(DirectMessageColumns.CONTENT_URI, null, null);\n cr.delete(StatusUpdateInfoColumns.CONTENT_URI, null, null);\n}\n"
"public boolean hasAbility(Ability ability) {\n if (mBattleAbility.getBattleAbility() == ability) {\n return true;\n } else {\n return false;\n }\n}\n"
"private BodyConsumer deployAppStream(final HttpRequest request, final HttpResponder responder, final String namespaceId, final String appId) throws IOException {\n if (!namespaceExists(namespaceId)) {\n LOG.warn(\"String_Node_Str\", namespaceId);\n responder.sendString(HttpResponseStatus.NOT_FOUND, String.format(\"String_Node_Str\" + \"String_Node_Str\", namespaceId));\n return null;\n }\n final String archiveName = request.getHeader(ARCHIVE_NAME_HEADER);\n if (archiveName == null || archiveName.isEmpty()) {\n responder.sendString(HttpResponseStatus.BAD_REQUEST, ARCHIVE_NAME_HEADER + \"String_Node_Str\", ImmutableMultimap.of(HttpHeaders.Names.CONNECTION, HttpHeaders.Values.CLOSE));\n return null;\n }\n File tempDir = new File(configuration.get(Constants.CFG_LOCAL_DATA_DIR), configuration.get(Constants.AppFabric.TEMP_DIR)).getAbsoluteFile();\n if (!DirUtils.mkdirs(tempDir)) {\n throw new IOException(\"String_Node_Str\" + tempDir);\n }\n final Location archiveDir = locationFactory.create(this.archiveDir).append(namespaceId);\n final Location archive = archiveDir.append(archiveName);\n final SessionInfo sessionInfo = new SessionInfo(namespaceId, appId, archiveName, archive, DeployStatus.UPLOADING);\n sessions.put(namespaceId, sessionInfo);\n return new AbstractBodyConsumer(File.createTempFile(\"String_Node_Str\", \"String_Node_Str\", tempDir)) {\n protected void onFinish(HttpResponder responder, File uploadedFile) {\n try {\n Locations.mkdirsIfNotExists(archiveDir);\n Location tmpLocation = archive.getTempFile(\"String_Node_Str\");\n try {\n LOG.debug(\"String_Node_Str\", uploadedFile, tmpLocation.toURI());\n Files.copy(uploadedFile, Locations.newOutputSupplier(tmpLocation));\n if (tmpLocation.renameTo(archive) == null) {\n throw new IOException(String.format(\"String_Node_Str\", tmpLocation.toURI(), archive.toURI()));\n }\n } catch (IOException e) {\n tmpLocation.delete();\n throw e;\n }\n sessionInfo.setStatus(DeployStatus.VERIFYING);\n deploy(namespaceId, appId, archive);\n sessionInfo.setStatus(DeployStatus.DEPLOYED);\n responder.sendString(HttpResponseStatus.OK, \"String_Node_Str\");\n } catch (Exception e) {\n sessionInfo.setStatus(DeployStatus.FAILED);\n LOG.error(\"String_Node_Str\", e);\n responder.sendString(HttpResponseStatus.BAD_REQUEST, e.getMessage());\n } finally {\n saveSessionInfo(sessionInfo.setStatus(sessionInfo.getStatus()), namespaceId);\n sessions.remove(namespaceId);\n }\n }\n };\n}\n"
"private void unselect(final TreeItem item) {\n syncExec(new VoidResult() {\n\n public void run() {\n widget.deselect(item);\n lastSelectionItem = item;\n }\n });\n}\n"
"private String getIDEPath() throws IOException {\n URL url = Lwjgl3ResourceFilePath.class.getClassLoader().getResource(getPath());\n if (url == null)\n throw new IOException(\"String_Node_Str\");\n String urlString = url.toString();\n SilenceEngine.Platform platform = SilenceEngine.getPlatform();\n if (platform == SilenceEngine.Platform.WINDOWS_32 || platform == SilenceEngine.Platform.WINDOWS_64)\n return URLDecoder.decode(urlString.substring(urlString.indexOf('/') + 1), \"String_Node_Str\");\n else\n return \"String_Node_Str\" + URLDecoder.decode(urlString.substring(urlString.indexOf('/') + 1), \"String_Node_Str\");\n}\n"
"public OverlapInfo getOverlapInfo(Aligner<AlignElementSketch<T>> aligner, AlignElementSketch<T> b) {\n Alignment<AlignElementSketch<T>> alignment = localAlignOneSkip(aligner, b);\n int a1 = alignment.getA1();\n int a2 = alignment.getA2();\n int b1 = alignment.getB1();\n int b2 = alignment.getB2();\n a1 = alignment.getA1() * this.stepSize;\n a2 = Math.min(getSequenceLength() - 1, alignment.getA2() * this.stepSize + this.stepSize - 1);\n b1 = alignment.getB1() * b.stepSize;\n b2 = Math.min(b.getSequenceLength() - 1, alignment.getB2() * b.stepSize + b.stepSize - 1);\n double score = alignment.getScore();\n return new OverlapInfo(score / 100000.0, score, a1, a2, b1, b2);\n}\n"
"private static ObjectName getObjectName(int index) throws MalformedObjectNameException {\n return new ObjectName(\"String_Node_Str\" + Settings.get(CommonSettings.THIS_PHYSICAL_LOCATION) + \"String_Node_Str\" + Constants.PRIORITY_KEY_MACHINE + \"String_Node_Str\" + SystemUtils.getLocalHostName() + \"String_Node_Str\" + Settings.get(CommonSettings.HTTP_PORT_NUMBER) + \"String_Node_Str\" + Constants.PRIORITY_KEY_REPLICANAME + \"String_Node_Str\" + Constants.PRIORITY_KEY_PRIORITY + \"String_Node_Str\" + \"String_Node_Str\" + Constants.PRIORITY_KEY_APPLICATIONNAME + \"String_Node_Str\" + Settings.get(CommonSettings.APPLICATION_NAME) + \"String_Node_Str\" + Constants.PRIORITY_KEY_APPLICATIONINSTANCEID + \"String_Node_Str\" + Settings.get(CommonSettings.APPLICATION_INSTANCE_ID) + \"String_Node_Str\" + (index == -1 ? \"String_Node_Str\" : \"String_Node_Str\" + index));\n}\n"
"public boolean allowExternalImages() {\n return allow(AppConfiguration.PERM_EXTERNAL_IMAGES);\n}\n"
"public void writeStatement(MethodWriter writer) {\n Variable var = this.variable;\n if (this.type == DEFAULT) {\n if (var != null) {\n writer.addLocal(var.index, var.type);\n var.value.writeExpression(writer);\n var.writeSet(writer);\n }\n writer.visitLabel(this.startLabel);\n if (this.condition != null) {\n this.condition.writeJump(writer, this.endLabel);\n }\n if (this.then != null) {\n this.then.writeStatement(writer);\n }\n writer.visitLabel(this.updateLabel, false);\n if (this.update != null) {\n this.update.writeStatement(writer);\n }\n writer.visitJumpInsn(Opcodes.GOTO, this.startLabel);\n writer.visitLabel(this.endLabel);\n if (var != null) {\n writer.visitLocalVariable(var.qualifiedName, var.type.getExtendedName(), var.type.getSignature(), this.startLabel, this.endLabel, var.index);\n writer.removeLocals(1);\n }\n return;\n }\n if (this.type == ARRAY) {\n Variable arrayVar = this.arrayVar;\n Variable indexVar = this.indexVar;\n Variable lengthVar = this.lengthVar;\n Label scopeLabel = new Label();\n writer.visitLabel2(scopeLabel);\n writer.addLocal(var.index, MethodWriter.TOP);\n writer.addLocal(indexVar.index, MethodWriter.INT);\n writer.addLocal(lengthVar.index, MethodWriter.INT);\n writer.addLocal(arrayVar.index, arrayVar.type);\n var.value.writeExpression(writer);\n writer.visitInsn(Opcodes.DUP);\n arrayVar.writeSet(writer);\n writer.visitInsn(Opcodes.ARRAYLENGTH);\n lengthVar.writeSet(writer);\n writer.visitLdcInsn(0);\n indexVar.writeSet(writer);\n writer.visitJumpInsn(Opcodes.GOTO, this.updateLabel);\n writer.visitLabel(this.startLabel);\n arrayVar.writeGet(writer);\n indexVar.writeGet(writer);\n writer.visitInsn(arrayVar.type.getArrayLoadOpcode());\n var.writeSet(writer);\n this.then.writeStatement(writer);\n writer.visitIincInsn(indexVar.index, 1);\n writer.visitLabel(this.updateLabel);\n indexVar.writeGet(writer);\n lengthVar.writeGet(writer);\n writer.visitJumpInsn2(Opcodes.IF_ICMPLT, this.startLabel);\n writer.removeLocals(4);\n writer.visitLabel(this.endLabel);\n writer.visitLocalVariable(var.qualifiedName, var.type.getExtendedName(), var.type.getSignature(), scopeLabel, this.endLabel, var.index);\n writer.visitLocalVariable(\"String_Node_Str\", \"String_Node_Str\", null, scopeLabel, this.endLabel, indexVar.index);\n writer.visitLocalVariable(\"String_Node_Str\", \"String_Node_Str\", null, scopeLabel, this.endLabel, lengthVar.index);\n writer.visitLocalVariable(\"String_Node_Str\", arrayVar.type.getExtendedName(), arrayVar.type.getSignature(), scopeLabel, this.endLabel, arrayVar.index);\n return;\n }\n}\n"
"public NBTTagList getTileEntityList(Chunk chunk) {\n NBTTagList tileEntityList = new NBTTagList();\n if (!WDLPluginChannels.canSaveTileEntities(chunk)) {\n return tileEntityList;\n }\n Map<BlockPos, TileEntity> chunkTEMap = chunk.getTileEntityMap();\n Map<BlockPos, NBTTagCompound> oldTEMap = getOldTileEntities(chunk);\n Map<BlockPos, TileEntity> newTEMap = WDL.newTileEntities.get(chunk.getPos());\n if (newTEMap == null) {\n newTEMap = new HashMap<BlockPos, TileEntity>();\n }\n Set<BlockPos> allTELocations = new HashSet<BlockPos>();\n allTELocations.addAll(chunkTEMap.keySet());\n allTELocations.addAll(oldTEMap.keySet());\n allTELocations.addAll(newTEMap.keySet());\n for (BlockPos pos : allTELocations) {\n if (newTEMap.containsKey(pos)) {\n NBTTagCompound compound = new NBTTagCompound();\n TileEntity te = newTEMap.get(pos);\n try {\n te.writeToNBT(compound);\n } catch (Exception e) {\n WDLMessages.chatMessageTranslated(WDLMessageTypes.ERROR, \"String_Node_Str\", te, pos, chunk.x, chunk.z, e);\n logger.warn(\"String_Node_Str\" + compound);\n continue;\n }\n String entityType = compound.getString(\"String_Node_Str\") + \"String_Node_Str\" + te.getClass().getCanonicalName() + \"String_Node_Str\";\n WDLMessages.chatMessageTranslated(WDLMessageTypes.LOAD_TILE_ENTITY, \"String_Node_Str\", entityType, pos);\n editTileEntity(pos, compound, TileEntityCreationMode.NEW);\n tileEntityList.appendTag(compound);\n } else if (oldTEMap.containsKey(pos)) {\n NBTTagCompound compound = oldTEMap.get(pos);\n String entityType = compound.getString(\"String_Node_Str\");\n WDLMessages.chatMessageTranslated(WDLMessageTypes.LOAD_TILE_ENTITY, \"String_Node_Str\", entityType, pos);\n editTileEntity(pos, compound, TileEntityCreationMode.IMPORTED);\n tileEntityList.appendTag(compound);\n } else if (chunkTEMap.containsKey(pos)) {\n TileEntity te = chunkTEMap.get(pos);\n NBTTagCompound compound = new NBTTagCompound();\n try {\n te.writeToNBT(compound);\n } catch (Exception e) {\n WDLMessages.chatMessageTranslated(WDLMessageTypes.ERROR, \"String_Node_Str\", te, pos, chunk.xPosition, chunk.zPosition, e);\n logger.warn(\"String_Node_Str\" + compound);\n continue;\n }\n editTileEntity(pos, compound, TileEntityCreationMode.EXISTING);\n tileEntityList.appendTag(compound);\n }\n }\n return tileEntityList;\n}\n"
"private boolean isEnabled() {\n try {\n Class<?> c = Class.forName(\"String_Node_Str\");\n Object object = c.getMethod(\"String_Node_Str\").invoke(null);\n if (object != null && object instanceof Boolean) {\n return (Boolean) object;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n}\n"
"public DataStreamsPipelineSpec generateSpec(DataStreamsConfig config) {\n long batchIntervalMillis;\n try {\n batchIntervalMillis = TimeParser.parseDuration(config.getBatchInterval());\n } catch (Exception e) {\n throw new IllegalArgumentException(String.format(\"String_Node_Str\", config.getBatchInterval()));\n }\n DataStreamsPipelineSpec.Builder specBuilder = DataStreamsPipelineSpec.builder(batchIntervalMillis).setExtraJavaOpts(config.getExtraJavaOpts());\n configureStages(config, specBuilder);\n return specBuilder.build();\n}\n"
"public void setDisplayName(ChatComponent displayName) {\n if (displayName != null && displayName.getText() == null)\n throw new IllegalArgumentException(\"String_Node_Str\");\n this.displayName = displayName != null ? displayName : ChatComponent.text(this.name);\n synchronized (this.featuredTabLists) {\n this.featuredTabLists.forEach(TabList::update);\n }\n}\n"