content
stringlengths
40
137k
"public void addCurrentPrinterToHistory() {\n PrinterInfo printer = (PrinterInfo) mDestinationSpinner.getSelectedItem();\n PrinterId fakePdfPritnerId = mDestinationSpinnerAdapter.mFakePdfPrinter.getId();\n if (printer != null && !printer.getId().equals(fakePdfPritnerId)) {\n FusedPrintersProvider printersLoader = (FusedPrintersProvider) (Loader<?>) getLoaderManager().getLoader(LOADER_ID_PRINTERS_LOADER);\n if (printersLoader != null) {\n printersLoader.addHistoricalPrinter(printer);\n }\n }\n}\n"
"public boolean log(final LogEntry entry) {\n if (entry.level.intValue() >= minimum)\n count++;\n return LogResult.LOG;\n}\n"
"protected HearthTreeNode use_core(int targetPlayerIndex, Minion targetMinion, HearthTreeNode boardState, Deck deckPlayer0, Deck deckPlayer1, boolean singleRealizationOnly) throws HSException {\n if (targetMinion instanceof Hero)\n return null;\n HearthTreeNode toRet = super.use_core(targetPlayerIndex, targetMinion, boardState, deckPlayer0, deckPlayer1, singleRealizationOnly);\n if (toRet != null && targetMinion.getTotalHealth() > 0) {\n if (toRet instanceof CardDrawNode) {\n ((CardDrawNode) toRet).addNumCardsToDraw(1);\n } else {\n toRet = new CardDrawNode(toRet, 1);\n }\n }\n return toRet;\n}\n"
"public void authorize(AuthorizeListener listener) {\n mAuthService.getToken(getAuthCode()).enqueue(new Callback<JwtToken>() {\n\n public void onResponse(Call<JwtToken> call, Response<JwtToken> response) {\n token = response.body();\n if (token == null)\n listener.onFailed();\n else\n listener.onSuccess();\n }\n public void onFailure(Call<JwtToken> call, Throwable t) {\n listener.onFailed();\n }\n });\n}\n"
"private void parseErrors(String header) {\n int cp = header.indexOf(ERRORS_TOKEN);\n if (cp == -1) {\n cp = header.indexOf(COMMIT_ERRORS_TOKEN);\n }\n if (cp == -1) {\n close();\n throw new ResultProcessingException(\"String_Node_Str\" + header + \"String_Node_Str\", null);\n }\n StringBuilder sb = new StringBuilder(header);\n String response;\n try {\n while ((response = scanner.next()) != null) {\n sb.append(response);\n }\n } catch (Exception e) {\n scanner.close();\n }\n throw new ResultProcessingException(sb.substring(cp + 2), null);\n}\n"
"private void notifyProgress() {\n if (BuildConfig.DEBUG) {\n Log.d(TAG, \"String_Node_Str\" + Channel.this);\n }\n mBucket.notifyOnNetworkChangeListeners(Bucket.ChangeType.INDEX);\n}\n"
"public void run() {\n try {\n FileDialog dialog = new FileDialog(UIUtil.getDefaultShell(), SWT.OPEN);\n dialog.setFilterExtensions(new String[] { \"String_Node_Str\" });\n String filename;\n pref = ReportPlugin.getDefault().getPreferenceStore().getInt(PREF_KEY);\n filename = dialog.open();\n if (filename != null) {\n if (getSelection() instanceof ReportDesignHandle)\n ElementExportUtil.exportDesign((ReportDesignHandle) getSelection(), filename);\n else {\n if (pref == PREF_PROMPT) {\n MessageDialog prefDialog = new MessageDialog(dialog.getParent(), DIALOG_TITLE, null, DIALOG_MESSAGE, MessageDialog.INFORMATION, new String[] { BUTTON_YES, BUTTON_NO, BUTTON_CANCEL }, 0) {\n\n protected Control createCustomArea(Composite parent) {\n Composite container = new Composite(parent, SWT.NONE);\n GridLayout gridLayout = new GridLayout();\n gridLayout.marginWidth = 20;\n gridLayout.marginTop = 15;\n container.setLayout(gridLayout);\n Button chkbox = new Button(container, SWT.CHECK);\n chkbox.setText(REMEMBER_DECISION);\n chkbox.addSelectionListener(new SelectionListener() {\n public void widgetSelected(SelectionEvent e) {\n saveDecision = !saveDecision;\n }\n public void widgetDefaultSelected(SelectionEvent e) {\n saveDecision = false;\n }\n });\n return super.createCustomArea(parent);\n }\n protected void buttonPressed(int buttonId) {\n switch(buttonId) {\n case 0:\n pref = PREF_OVERWRITE;\n break;\n case 1:\n pref = PREF_NOT_OVERWRITE;\n break;\n default:\n break;\n }\n if (saveDecision) {\n ReportPlugin.getDefault().getPreferenceStore().setValue(PREF_KEY, pref);\n }\n super.buttonPressed(buttonId);\n }\n };\n if (prefDialog.open() == 2)\n return;\n }\n ElementExportUtil.exportElement((DesignElementHandle) getSelection(), filename, pref == PREF_OVERWRITE);\n }\n } catch (Exception e) {\n ExceptionHandler.handle(e);\n }\n}\n"
"public static synchronized INodePO getNode(String nodeGuid) {\n EntityManager session = GeneralStorage.getInstance().getMasterSession();\n Validate.notNull(session);\n Query specTcQuery = session.createQuery(\"String_Node_Str\" + \"String_Node_Str\");\n specTcQuery.setParameter(\"String_Node_Str\", nodeGuid);\n try {\n Object result = specTcQuery.getSingleResult();\n if (result instanceof INodePO) {\n return (INodePO) result;\n }\n } catch (NoResultException nre) {\n }\n return null;\n}\n"
"private void onDiskScannedLocked(DiskInfo disk) {\n int volumeCount = 0;\n for (int i = 0; i < mVolumes.size(); i++) {\n final VolumeInfo vol = mVolumes.valueAt(i);\n if (Objects.equals(disk.id, vol.getDiskId())) {\n volumeCount++;\n }\n }\n final Intent intent = new Intent(DiskInfo.ACTION_DISK_SCANNED);\n intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);\n intent.putExtra(DiskInfo.EXTRA_DISK_ID, disk.id);\n intent.putExtra(DiskInfo.EXTRA_VOLUME_COUNT, volumeCount);\n mHandler.obtainMessage(H_INTERNAL_BROADCAST, intent).sendToTarget();\n final CountDownLatch latch = mDiskScanLatches.remove(disk.id);\n if (latch != null) {\n latch.countDown();\n }\n disk.volumeCount = volumeCount;\n mCallbacks.notifyDiskScanned(disk, volumeCount);\n}\n"
"void mutatorAdd(Component c) {\n locker.checkForWritePermission(\"String_Node_Str\");\n Annotated = false;\n MyNetList.clear();\n if (c instanceof Wire) {\n Wire w = (Wire) c;\n if (w.getEnd0().equals(w.getEnd1()))\n return;\n boolean added = wires.add(w);\n if (!added)\n return;\n } else {\n boolean added = comps.add(c);\n if (!added)\n return;\n wires.add(c);\n ComponentFactory factory = c.getFactory();\n if (factory instanceof Clock) {\n clocks.add(c);\n } else if (factory instanceof SubcircuitFactory) {\n SubcircuitFactory subcirc = (SubcircuitFactory) factory;\n subcirc.getSubcircuit().circuitsUsingThis.put(c, this);\n }\n c.addComponentListener(myComponentListener);\n }\n RemoveWrongLabels(c.getFactory().getName());\n fireEvent(CircuitEvent.ACTION_ADD, c);\n}\n"
"public void addDomainToRepository(final Domain domain) throws Exception {\n final String domainId = domain.getId();\n final String methodCall = \"String_Node_Str\" + domainId + \"String_Node_Str\";\n logger.debug(methodCall);\n final String domainPath = jcrMetadataInfo.getMetadataFolderPath() + RepositoryFile.SEPARATOR + domainId;\n InputStream inputStream = null;\n try {\n logger.debug(methodCall + \"String_Node_Str\");\n final String xmi = getXmiParser().generateXmi(domain);\n inputStream = new ByteArrayInputStream(xmi.getBytes(LocaleHelper.getSystemEncoding()));\n logger.debug(methodCall + \"String_Node_Str\");\n final String domainFile = domainPath + RepositoryFile.SEPARATOR + jcrMetadataInfo.getMetadataFilename();\n IRepositoryFileData repoFileData = new SimpleRepositoryFileData(inputStream, characterEncoding, mimeType);\n final RepositoryFile metadataFile = repositoryUtils.getFile(domainFile, null, false, false, null);\n if (metadataFile == null) {\n repositoryUtils.getFile(domainFile, repoFileData, true, true, \"String_Node_Str\");\n } else {\n repository.updateFile(metadataFile, repoFileData, \"String_Node_Str\");\n }\n logger.debug(methodCall + \"String_Node_Str\");\n } finally {\n if (inputStream != null) {\n inputStream.close();\n }\n }\n logger.debug(methodCall + \"String_Node_Str\" + domainPath);\n final Properties mappingProperties = getMetadataMappingFile();\n mappingProperties.setProperty(domainId, domainPath);\n writeMappingPropertiesFiles(mappingProperties);\n dumpMappings();\n}\n"
"private void computeProofFoldPositions(TheoremNode theoremNode, HashMap additions, List foldsInCurrentTree, List previousFolds) throws BadLocationException {\n if (theoremNode.getProof() == null) {\n return;\n }\n IRegion theoremStatementRegion = AdapterFactory.locationToRegion(document, theoremNode.getTheorem().getLocation());\n ProofNode proofNode = theoremNode.getProof();\n IRegion proofNodeRegion = AdapterFactory.locationToRegion(document, proofNode.getLocation());\n if (document.getLineOfOffset(theoremStatementRegion.getOffset() + theoremStatementRegion.getLength()) == document.getLineOfOffset(proofNodeRegion.getOffset() + proofNodeRegion.getLength())) {\n return;\n }\n TLAProofPosition matchingPosition = null;\n for (Iterator it = previousFolds.iterator(); it.hasNext(); ) {\n TLAProofPosition proofPosition = (TLAProofPosition) it.next();\n if (proofPosition.isSamePosition(proofNodeRegion, document)) {\n matchingPosition = proofPosition;\n foldsInCurrentTree.add(matchingPosition);\n it.remove();\n break;\n }\n }\n if (matchingPosition == null) {\n matchingPosition = new TLAProofPosition(proofNodeRegion.getOffset(), proofNodeRegion.getLength(), theoremRegion.getOffset(), theoremStatementRegion.getOffset() + theoremStatementRegion.getLength() - theoremRegion.getOffset(), new ProjectionAnnotation(), document);\n additions.put(matchingPosition.getAnnotation(), matchingPosition);\n foldsInCurrentTree.add(matchingPosition);\n }\n if (proofNode instanceof NonLeafProofNode) {\n NonLeafProofNode nonLeafProofNode = (NonLeafProofNode) proofNode;\n LevelNode[] steps = nonLeafProofNode.getSteps();\n for (int i = 0; i < steps.length; i++) {\n if (steps[i] instanceof TheoremNode) {\n computeProofFoldPositions((TheoremNode) steps[i], additions, foldsInCurrentTree, previousFolds);\n }\n }\n }\n}\n"
"public static boolean isWeapon(Material mat) {\n return mat != null && (mat == Material.WOOD_AXE || mat == Material.WOOD_PICKAXE || mat == Material.WOOD_SPADE || mat == Material.WOOD_SWORD || mat == Material.STONE_AXE || mat == Material.STONE_PICKAXE || mat == Material.STONE_SPADE || mat == Material.STONE_SWORD || mat == Material.IRON_AXE || mat == Material.IRON_PICKAXE || mat == Material.IRON_SWORD || mat == Material.IRON_SPADE || mat == Material.DIAMOND_AXE || mat == Material.DIAMOND_PICKAXE || mat == Material.DIAMOND_SWORD || mat == Material.DIAMOND_SPADE || mat == Material.GOLD_AXE || mat == Material.GOLD_HOE || mat == Material.GOLD_SWORD || mat == Material.GOLD_PICKAXE || mat == Material.GOLD_SPADE);\n}\n"
"public void onNodeUpdated_Valid() throws Exception {\n InstanceIdentifier<Node> nodeInstanceIdentifier = InstanceIdentifier.builder(Nodes.class).child(Node.class, new NodeKey(new NodeId(\"String_Node_Str\"))).toInstance();\n NodeUpdated nodeUpdated = new NodeUpdatedBuilder().setNodeRef(new NodeRef(nodeInstanceIdentifier)).build();\n initialFlowWriter.onNodeUpdated(nodeUpdated);\n Thread.sleep(250);\n verify(salFlowService, times(0)).addFlow(any(AddFlowInput.class));\n}\n"
"protected void onLayout(boolean changed, int left, int top, int right, int bottom) {\n int topViewHeight = this.topViewHeight == DEFAULT_TOP_VIEW_HEIGHT ? dragView.getMeasuredHeight() : (int) this.topViewHeight;\n dragView.layout(lastLeftPosition, lastTopPosition, lastLeftPosition + dragView.getMeasuredWidth(), lastTopPosition + topViewHeight);\n secondView.layout(0, lastTopPosition + topViewHeight, right, lastTopPosition + bottom);\n}\n"
"public void generateLayer(Layer previousLayer, Layer currentLayer, Synapse synapse) {\n this.addNewLine();\n this.appendToLine(\"String_Node_Str\");\n this.appendToLine(nameLayer(layer));\n this.appendToLine(\"String_Node_Str\");\n if (currentLayer instanceof ContextLayer) {\n this.appendToLine(\"String_Node_Str\");\n this.appendToLine(currentLayer.getActivationFunction().getClass().getSimpleName());\n this.appendToLine(\"String_Node_Str\");\n this.appendToLine(\"String_Node_Str\");\n this.appendToLine(currentLayer.hasThreshold() ? \"String_Node_Str\" : \"String_Node_Str\");\n this.appendToLine(\"String_Node_Str\");\n this.appendToLine(\"String_Node_Str\" + currentLayer.getNeuronCount());\n this.appendToLine(\"String_Node_Str\");\n } else if (currentLayer instanceof RadialBasisFunctionLayer) {\n this.appendToLine(\"String_Node_Str\");\n this.appendToLine(\"String_Node_Str\" + currentLayer.getNeuronCount());\n this.appendToLine(\"String_Node_Str\");\n } else if (currentLayer instanceof BasicLayer) {\n this.appendToLine(\"String_Node_Str\");\n this.appendToLine(currentLayer.getActivationFunction().getClass().getSimpleName());\n this.appendToLine(\"String_Node_Str\");\n this.appendToLine(\"String_Node_Str\");\n this.appendToLine(currentLayer.hasThreshold() ? \"String_Node_Str\" : \"String_Node_Str\");\n this.appendToLine(\"String_Node_Str\");\n this.appendToLine(\"String_Node_Str\" + currentLayer.getNeuronCount());\n this.appendToLine(\"String_Node_Str\");\n }\n this.addLine();\n if (previousLayer == null) {\n this.appendToLine(\"String_Node_Str\");\n this.appendToLine(nameLayer(currentLayer));\n this.appendToLine(\"String_Node_Str\");\n } else {\n this.appendToLine(nameLayer(previousLayer));\n this.appendToLine(\"String_Node_Str\");\n this.appendToLine(nameLayer(currentLayer));\n if (synapse != null) {\n if (synapse instanceof DirectSynapse) {\n this.appendToLine(\"String_Node_Str\");\n } else if (synapse instanceof OneToOneSynapse) {\n this.appendToLine(\"String_Node_Str\");\n } else if (synapse instanceof WeightlessSynapse) {\n this.appendToLine(\"String_Node_Str\");\n }\n }\n this.appendToLine(\"String_Node_Str\");\n }\n this.addLine();\n for (Synapse nextSynapse : currentLayer.getNext()) {\n Layer nextLayer = nextSynapse.getToLayer();\n if (this.getLayerMap().containsKey(nextLayer)) {\n this.appendToLine(nameLayer(currentLayer));\n this.appendToLine(\"String_Node_Str\");\n this.appendToLine(nameLayer(nextLayer));\n this.appendToLine(\"String_Node_Str\");\n this.addLine();\n } else {\n generateLayer(currentLayer, nextSynapse.getToLayer(), nextSynapse);\n }\n }\n}\n"
"public void testZmqDealer() throws Exception {\n final ZMQ.Context context = ZMQ.context(1);\n final ZMQ.Socket socket = context.socket(ZMQ.DEALER);\n socket.connect(\"String_Node_Str\" + serverAddress.getHostName() + \"String_Node_Str\" + serverAddress.getPort());\n final ZMsg request = ZMsg.newStringMsg(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n request.send(socket);\n final ZMTPIncomingMessage receivedRequest = incomingMessages.take();\n final ZMTPMessage receivedMessage = receivedRequest.getMessage();\n receivedRequest.getSession().getChannel().write(receivedMessage);\n final ZMsg reply = ZMsg.recvMsg(socket);\n assertEquals(request, reply);\n assertEquals(1, receivedMessage.getEnvelope().size());\n assertEquals(2, receivedMessage.getContent().size());\n assertArrayEquals(\"String_Node_Str\".getBytes(), receivedMessage.getEnvelope().get(0).getData());\n assertArrayEquals(\"String_Node_Str\".getBytes(), receivedMessage.getContent().get(0).getData());\n assertArrayEquals(\"String_Node_Str\".getBytes(), receivedMessage.getContent().get(1).getData());\n}\n"
"private boolean setMode(int mode) {\n LOG.v(\"String_Node_Str\", ms(mode));\n if (!mInitialized)\n return false;\n if (mode == mMode)\n return true;\n int oldMode = mMode;\n switch(oldMode) {\n case FLINGING:\n mFlingScroller.forceFinished(true);\n break;\n case ANIMATING:\n mClearAnimation = true;\n break;\n }\n switch(mode) {\n case SCROLLING:\n if (oldMode == PINCHING || oldMode == ANIMATING)\n return false;\n break;\n case FLINGING:\n if (oldMode == ANIMATING)\n return false;\n break;\n case PINCHING:\n if (oldMode == ANIMATING)\n return false;\n break;\n case NONE:\n dispatchOnIdle();\n break;\n }\n mMode = mode;\n return true;\n}\n"
"private void flushRX() {\n if (DEBUG) {\n System.out.println(\"String_Node_Str\" + rxPacket + \"String_Node_Str\" + rxLen);\n rxPacket = false;\n rxCursor = 0;\n rxLen = 0;\n updateFifopPin();\n}\n"
"static List<Member> hierarchyMembers(Hierarchy hierarchy, Evaluator evaluator, final boolean includeCalcMembers) {\n final List<Member> memberList;\n if (evaluator.isNonEmpty()) {\n memberList = new ArrayList<Member>();\n for (Level level : hierarchy.getLevels()) {\n Member[] members = getNonEmptyLevelMembers(evaluator, level, includeCalcMembers);\n memberList.addAll(Arrays.asList(members));\n }\n } else {\n memberList = FunUtil.addMembers(evaluator.getSchemaReader(), new ArrayList<Member>(), hierarchy);\n if (!includeCalcMembers && memberList != null) {\n FunUtil.removeCalculatedMembers(memberList);\n }\n }\n FunUtil.hierarchize(memberList, false);\n return memberList;\n}\n"
"private Response doRestCommand(ParameterMap options, String pathSufix, String method, boolean isForMetadata, MediaType... acceptedResponseTypes) throws CommandException {\n Metrix.event(\"String_Node_Str\");\n boolean shouldTryCommandAgain;\n boolean shouldSendCredentials = secure;\n boolean askedUserForCredentials = false;\n boolean shouldUseSecure = secure;\n boolean usedCallerProvidedCredentials = secure;\n URI uri = createURI(shouldUseSecure, pathSufix);\n do {\n Metrix.event(\"String_Node_Str\");\n WebTarget target = client.target(uri);\n Metrix.event(\"String_Node_Str\");\n target.configuration().setProperty(ClientProperties.HOSTNAME_VERIFIER, new BasicHostnameVerifier(host)).setProperty(ClientProperties.SSL_CONTEXT, getSslContext());\n shouldTryCommandAgain = false;\n try {\n if (logger.isLoggable(Level.FINER)) {\n logger.log(Level.FINER, \"String_Node_Str\", uri.toString());\n logger.log(Level.FINER, \"String_Node_Str\", new Object[] { user, ok(password) ? \"String_Node_Str\" : \"String_Node_Str\" });\n }\n final AuthenticationInfo authInfo = authenticationInfo();\n if (authInfo != null && shouldSendCredentials) {\n HttpBasicAuthFilter besicAuth = new HttpBasicAuthFilter(authInfo.getUser(), authInfo.getPassword() == null ? \"String_Node_Str\" : authInfo.getPassword());\n target.configuration().register(besicAuth);\n }\n Metrix.event(\"String_Node_Str\");\n Builder request = target.request(acceptedResponseTypes);\n Metrix.event(\"String_Node_Str\");\n if (authToken != null) {\n request = request.header(SecureAdmin.Util.ADMIN_ONE_TIME_AUTH_TOKEN_HEADER_NAME, (isForMetadata ? AuthTokenManager.markTokenForReuse(authToken) : authToken));\n }\n if (commandModel != null && isCommandModelFromCache() && commandModel instanceof CachedCommandModel) {\n request = request.header(COMMAND_MODEL_MATCH_HEADER, ((CachedCommandModel) commandModel).getETag());\n if (logger.isLoggable(Level.FINER)) {\n logger.log(Level.FINER, \"String_Node_Str\", ((CachedCommandModel) commandModel).getETag());\n }\n }\n for (Header h : requestHeaders) {\n request = request.header(h.getName(), h.getValue());\n }\n request = addAdditionalHeaders(request);\n if (logger.isLoggable(Level.FINER)) {\n request = request.header(\"String_Node_Str\", \"String_Node_Str\");\n }\n Invocation invoc = null;\n Metrix.event(\"String_Node_Str\");\n if (\"String_Node_Str\".equals(method)) {\n if (outboundPayload != null && outboundPayload.size() > 0) {\n FormDataMultiPart mp = new FormDataMultiPart();\n for (Map.Entry<String, List<String>> entry : options.entrySet()) {\n String key = entry.getKey();\n for (String val : entry.getValue()) {\n mp.field(key, val);\n }\n }\n outboundPayload.addToMultipart(mp, logger);\n Entity<FormDataMultiPart> entity = Entity.<FormDataMultiPart>entity(mp, mp.getMediaType());\n invoc = request.build(method, entity);\n } else {\n Entity<ParameterMap> entity = Entity.<ParameterMap>entity(options, MediaType.APPLICATION_FORM_URLENCODED_TYPE);\n invoc = request.build(method, entity);\n }\n } else {\n invoc = request.build(method);\n }\n Metrix.event(\"String_Node_Str\");\n Response response;\n try {\n response = invoc.invoke();\n } catch (ClientException ex) {\n if (ex.getCause() != null && ex.getCause() instanceof Exception) {\n throw (Exception) ex.getCause();\n } else {\n throw ex;\n }\n }\n Metrix.event(\"String_Node_Str\");\n String redirection = checkConnect(response, uri.getHost(), uri.getPort());\n if (ok(redirection)) {\n if (logger.isLoggable(Level.FINER)) {\n logger.log(Level.FINER, \"String_Node_Str\", redirection);\n }\n uri = new URI(redirection);\n shouldTryCommandAgain = true;\n shouldUseSecure = \"String_Node_Str\".equals(uri.getScheme());\n secure = true;\n shouldSendCredentials = shouldUseSecure;\n continue;\n }\n processHeaders(response);\n logger.finer(\"String_Node_Str\");\n return response;\n } catch (AuthenticationException authEx) {\n logger.log(Level.FINER, \"String_Node_Str\");\n if (!usedCallerProvidedCredentials) {\n logger.log(Level.FINER, \"String_Node_Str\");\n usedCallerProvidedCredentials = true;\n shouldSendCredentials = true;\n shouldTryCommandAgain = true;\n continue;\n }\n logger.log(Level.FINER, \"String_Node_Str\");\n if (askedUserForCredentials) {\n logger.log(Level.FINER, \"String_Node_Str\");\n throw authEx;\n }\n logger.log(Level.FINER, \"String_Node_Str\");\n if (!updateAuthentication()) {\n logger.log(Level.FINER, \"String_Node_Str\");\n throw authEx;\n }\n logger.log(Level.FINER, \"String_Node_Str\");\n askedUserForCredentials = true;\n shouldSendCredentials = true;\n shouldTryCommandAgain = true;\n continue;\n } catch (ConnectException ce) {\n if (logger.isLoggable(Level.FINER)) {\n logger.log(Level.FINER, \"String_Node_Str\", ce);\n }\n String msg = strings.get(\"String_Node_Str\", host, port + \"String_Node_Str\");\n throw new CommandException(msg, ce);\n } catch (UnknownHostException he) {\n if (logger.isLoggable(Level.FINER)) {\n logger.log(Level.FINER, \"String_Node_Str\", he);\n }\n String msg = strings.get(\"String_Node_Str\", host);\n throw new CommandException(msg, he);\n } catch (SocketException se) {\n if (logger.isLoggable(Level.FINER)) {\n logger.log(Level.FINER, \"String_Node_Str\", se);\n }\n try {\n boolean serverAppearsSecure = NetUtils.isSecurePort(host, port);\n if (serverAppearsSecure && !shouldUseSecure) {\n if (retryUsingSecureConnection(host, port)) {\n shouldUseSecure = true;\n shouldSendCredentials = true;\n usedCallerProvidedCredentials = true;\n shouldTryCommandAgain = true;\n continue;\n }\n }\n throw new CommandException(se);\n } catch (IOException io) {\n throw new CommandException(io);\n }\n } catch (SSLException se) {\n if (logger.isLoggable(Level.FINER)) {\n logger.log(Level.FINER, \"String_Node_Str\", se);\n }\n try {\n boolean serverAppearsSecure = NetUtils.isSecurePort(host, port);\n if (!serverAppearsSecure && secure) {\n logger.severe(strings.get(\"String_Node_Str\", host, port + \"String_Node_Str\"));\n }\n throw new CommandException(se);\n } catch (IOException io) {\n throw new CommandException(io);\n }\n } catch (SocketTimeoutException e) {\n if (logger.isLoggable(Level.FINER)) {\n logger.log(Level.FINER, \"String_Node_Str\", e);\n }\n throw new CommandException(strings.get(\"String_Node_Str\", (float) readTimeout / 1000), e);\n } catch (IOException e) {\n if (logger.isLoggable(Level.FINER)) {\n logger.log(Level.FINER, \"String_Node_Str\", e);\n }\n throw new CommandException(strings.get(\"String_Node_Str\", e.getMessage()), e);\n } catch (CommandException e) {\n throw e;\n } catch (Exception e) {\n if (logger.isLoggable(Level.FINER)) {\n logger.log(Level.FINER, \"String_Node_Str\", e);\n }\n ByteArrayOutputStream buf = new ByteArrayOutputStream();\n e.printStackTrace(new PrintStream(buf));\n logger.finer(buf.toString());\n throw new CommandException(e);\n }\n } while (shouldTryCommandAgain);\n outboundPayload = null;\n return null;\n}\n"
"public void executeUpdate(Rider rider) {\n if (rider != null) {\n rider.setTarget(null);\n LivingEntity ride = rider.getRide();\n if (ride != null) {\n if (isWithinRange(ride.getLocation(), destination, rangeSquared)) {\n isGoalDone = true;\n } else {\n setPathEntity(rider, destination);\n updateSpeed(rider);\n }\n }\n }\n}\n"
"public void shouldZipDirWithoutRoot() throws Exception {\n Path toZipDir = temporaryFolder.resolve(\"String_Node_Str\");\n toZipDir.toFile().mkdirs();\n File toZipFile = toZipDir.resolve(SOME_FILE_PATH).toFile();\n toZipFile.getParentFile().mkdirs();\n toZipFile.createNewFile();\n try (ByteArrayOutputStream output = new ByteArrayOutputStream()) {\n ZipUtils.zip(toZipDir.toFile(), output);\n output.close();\n verifyZipContent(output, \"String_Node_Str\");\n }\n}\n"
"public void testBindingRowReferenceCache() throws Exception {\n ICubeQueryDefinition cqd = new CubeQueryDefinition(cubeName);\n IEdgeDefinition columnEdge = cqd.createEdge(ICubeQueryDefinition.COLUMN_EDGE);\n IEdgeDefinition rowEdge = cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);\n IDimensionDefinition dim1 = columnEdge.createDimension(\"String_Node_Str\");\n IHierarchyDefinition hier1 = dim1.createHierarchy(\"String_Node_Str\");\n ILevelDefinition level11 = hier1.createLevel(\"String_Node_Str\");\n ILevelDefinition level12 = hier1.createLevel(\"String_Node_Str\");\n IDimensionDefinition dim2 = rowEdge.createDimension(\"String_Node_Str\");\n IHierarchyDefinition hier2 = dim2.createHierarchy(\"String_Node_Str\");\n hier2.createLevel(\"String_Node_Str\");\n cqd.createMeasure(\"String_Node_Str\");\n IBinding binding1 = new Binding(\"String_Node_Str\");\n binding1.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding1);\n IBinding binding2 = new Binding(\"String_Node_Str\");\n binding2.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding2);\n IBinding binding4 = new Binding(\"String_Node_Str\");\n binding4.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding4);\n IBinding binding5 = new Binding(\"String_Node_Str\");\n binding5.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding5);\n IBinding binding6 = new Binding(\"String_Node_Str\");\n binding6.setExpression(new ScriptExpression(\"String_Node_Str\"));\n binding6.setAggrFunction(IBuildInAggregation.TOTAL_SUM_FUNC);\n binding6.addAggregateOn(\"String_Node_Str\");\n cqd.addBinding(binding6);\n IBinding binding7 = new Binding(\"String_Node_Str\");\n binding7.setExpression(new ScriptExpression(\"String_Node_Str\"));\n binding7.setAggrFunction(IBuildInAggregation.TOTAL_SUM_FUNC);\n binding7.addAggregateOn(\"String_Node_Str\");\n binding7.addAggregateOn(\"String_Node_Str\");\n cqd.addBinding(binding7);\n IBinding binding8 = new Binding(\"String_Node_Str\");\n binding8.setExpression(new ScriptExpression(\"String_Node_Str\"));\n binding8.setAggrFunction(IBuildInAggregation.TOTAL_SUM_FUNC);\n cqd.addBinding(binding8);\n IBinding binding9 = new Binding(\"String_Node_Str\");\n binding9.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding9);\n IBinding binding10 = new Binding(\"String_Node_Str\");\n binding10.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding10);\n IBinding binding11 = new Binding(\"String_Node_Str\");\n binding11.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding11);\n IBinding binding12 = new Binding(\"String_Node_Str\");\n binding12.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding12);\n SortDefinition sorter1 = new SortDefinition();\n sorter1.setExpression(\"String_Node_Str\");\n sorter1.setSortDirection(ISortDefinition.SORT_DESC);\n SortDefinition sorter2 = new SortDefinition();\n sorter2.setExpression(\"String_Node_Str\");\n sorter2.setSortDirection(ISortDefinition.SORT_DESC);\n SortDefinition sorter3 = new SortDefinition();\n sorter3.setExpression(\"String_Node_Str\");\n sorter3.setSortDirection(ISortDefinition.SORT_DESC);\n cqd.addSort(sorter1);\n cqd.addSort(sorter2);\n cqd.addSort(sorter3);\n DataEngine engine = DataEngine.newDataEngine(DataEngineContext.newInstance(DataEngineContext.DIRECT_PRESENTATION, null, null, null));\n this.createCube(engine);\n cqd.setCacheQueryResults(true);\n IPreparedCubeQuery pcq = engine.prepare(cqd, null);\n ICubeQueryResults queryResults = pcq.execute(null);\n CubeCursor cursor = queryResults.getCubeCursor();\n List columnEdgeBindingNames = new ArrayList();\n columnEdgeBindingNames.add(\"String_Node_Str\");\n columnEdgeBindingNames.add(\"String_Node_Str\");\n cqd.setQueryResultsID(queryResults.getID());\n pcq = engine.prepare(cqd, null);\n queryResults = pcq.execute(null);\n cursor = queryResults.getCubeCursor();\n this.printCube(cursor, columnEdgeBindingNames, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n}\n"
"private void twitterSetup() {\n TwitterConfig config = new TwitterConfig.Builder(this).twitterAuthConfig(new TwitterAuthConfig(getResources().getString(R.string.com_twitter_sdk_android_CONSUMER_KEY), getResources().getString(R.string.com_twitter_sdk_android_CONSUMER_SECRET))).build();\n Twitter.initialize(config);\n twitterClient = new TwitterAuthClient();\n bind.twitter.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View v) {\n lastOpenId = ProfileSetupActivity.PROFILE_SETUP_WITH_TWITTER;\n lastOpen = bind.twitter;\n twitterClient.authorize(SigninActivity.this, new Callback<TwitterSession>() {\n public void success(Result<TwitterSession> result) {\n TwitterAuthToken token = result.data.getAuthToken();\n auth.signInWithCredential(TwitterAuthProvider.getCredential(token.token, token.secret)).addOnCompleteListener(signInCallback);\n }\n public void failure(TwitterException exception) {\n showToast(R.string.error);\n dialog.cancel();\n }\n });\n }\n });\n}\n"
"public void describeTo(Description description) {\n description.appendText(\"String_Node_Str\").appendText(comparison(minCompare));\n if (minCompare != maxCompare) {\n description.appendText(\"String_Node_Str\").appendText(comparison(maxCompare));\n }\n description.appendText(\"String_Node_Str\").appendValue(expected);\n}\n"
"public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception {\n if (ctx.getAttachment() instanceof DiscardEvent) {\n ctx.getChannel().setReadable(false);\n return;\n }\n NettyResponseFuture<?> future = (NettyResponseFuture<?>) ctx.getAttachment();\n HttpRequest nettyRequest = future.getNettyRequest();\n AsyncHandler<?> handler = future.getAsyncHandler();\n try {\n if (e.getMessage() instanceof HttpResponse) {\n HttpResponse response = (HttpResponse) e.getMessage();\n future.setHttpResponse(response);\n String ka = response.getHeader(\"String_Node_Str\");\n future.setKeepAlive(ka == null || ka.toLowerCase().equals(\"String_Node_Str\"));\n if (config.isRedirectEnabled() && (response.getStatus().getCode() == 302 || response.getStatus().getCode() == 301)) {\n if (future.incrementAndGetCurrentRedirectCount() < config.getMaxRedirects()) {\n String location = response.getHeader(HttpHeaders.Names.LOCATION);\n if (location.startsWith(\"String_Node_Str\")) {\n location = future.getUrl().getBaseUrl() + location;\n }\n Url url = createUrl(location);\n RequestBuilder builder = new RequestBuilder(future.getRequest());\n future.setUrl(url);\n closeChannel(ctx);\n String newUrl = url.toString();\n if (log.isDebugEnabled()) {\n log.debug(String.format(\"String_Node_Str\", newUrl));\n }\n execute(builder.setUrl(newUrl).build(), future);\n return;\n } else {\n throw new MaxRedirectException(\"String_Node_Str\" + config.getMaxRedirects());\n }\n }\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + response.getStatus());\n log.debug(\"String_Node_Str\" + response.getProtocolVersion());\n log.debug(\"String_Node_Str\");\n if (!response.getHeaderNames().isEmpty()) {\n for (String name : response.getHeaderNames()) {\n log.debug(\"String_Node_Str\" + name + \"String_Node_Str\" + response.getHeaders(name));\n }\n log.debug(\"String_Node_Str\");\n }\n }\n if (updateStatusAndInterrupt(handler, new ResponseStatus(future.getUrl(), response, this))) {\n finishUpdate(future, ctx);\n return;\n } else if (updateHeadersAndInterrupt(handler, new ResponseHeaders(future.getUrl(), response, this))) {\n finishUpdate(future, ctx);\n return;\n } else if (!response.isChunked()) {\n updateBodyAndInterrupt(handler, new ResponseBodyPart(future.getUrl(), response, this));\n finishUpdate(future, ctx);\n return;\n }\n if (response.getStatus().getCode() != 200 || nettyRequest.getMethod().equals(HttpMethod.HEAD)) {\n markAsDoneAndCacheConnection(future, ctx.getChannel());\n }\n } else if (e.getMessage() instanceof HttpChunk) {\n HttpChunk chunk = (HttpChunk) e.getMessage();\n if (handler != null) {\n if (updateBodyAndInterrupt(handler, new ResponseBodyPart(future.getUrl(), null, this, chunk)) || chunk.isLast()) {\n if (chunk instanceof HttpChunkTrailer) {\n updateHeadersAndInterrupt(handler, new ResponseHeaders(future.getUrl(), future.getHttpResponse(), this, (HttpChunkTrailer) chunk));\n }\n finishUpdate(future, ctx);\n }\n }\n }\n } catch (Exception t) {\n try {\n future.abort(t);\n } finally {\n finishUpdate(future, ctx);\n throw t;\n }\n }\n}\n"
"public void onSubmit(final AjaxRequestTarget target, final Form<?> form) {\n if (selectedDetails.size() + selectedPlainSchemas.size() + selectedDerSchemas.size() > MAX_SELECTIONS) {\n SyncopeConsoleSession.get().error(getString(\"String_Node_Str\"));\n onError(target, form);\n } else {\n final Map<String, List<String>> prefs = new HashMap<>();\n prefs.put(DisplayAttributesModalPanel.getPrefDetailView(type), selectedDetails);\n prefs.put(DisplayAttributesModalPanel.getPrefPlainAttributeView(type), selectedPlainSchemas);\n prefs.put(DisplayAttributesModalPanel.getPrefDerivedAttributeView(type), selectedDerSchemas);\n prefMan.setList(getRequest(), getResponse(), prefs);\n SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));\n modal.close(target);\n ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);\n }\n}\n"
"public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected) {\n int center = (GuiWDLEntities.this.width / 2) - (totalWidth / 2) + largestWidth + 10;\n mc.fontRenderer.drawString(this.displayEntity, center - largestWidth - 10, y + slotHeight / 2 - mc.fontRenderer.FONT_HEIGHT / 2, 0xFFFFFF);\n this.onOffButton.x = center;\n this.onOffButton.y = y;\n this.onOffButton.enabled = category.isGroupEnabled();\n this.onOffButton.displayString = getButtonText();\n this.rangeSlider.xPosition = center + 85;\n this.rangeSlider.yPosition = y;\n if (!this.cachedMode.equals(mode)) {\n cachedMode = mode;\n rangeSlider.enabled = (cachedMode.equals(\"String_Node_Str\"));\n rangeSlider.setValue(EntityUtils.getEntityTrackDistance(entity));\n }\n this.onOffButton.drawButton(mc, mouseX, mouseY);\n this.rangeSlider.drawButton(mc, mouseX, mouseY);\n}\n"
"private static void featureSelection(AnnoSentenceCollection sents, JointNlpFeatureExtractorPrm fePrm) {\n if (modelIn != null) {\n return;\n }\n SrlFeatureExtractorPrm srlFePrm = fePrm.srlFePrm;\n removeAts(fePrm);\n if (useTemplates && featureSelection) {\n CorpusStatisticsPrm csPrm = getCorpusStatisticsPrm();\n IGFeatureTemplateSelectorPrm prm = getInformationGainFeatureSelectorPrm();\n SrlFeatTemplates sft = new SrlFeatTemplates(srlFePrm.fePrm.soloTemplates, srlFePrm.fePrm.pairTemplates, null);\n IGFeatureTemplateSelector ig = new IGFeatureTemplateSelector(prm);\n sft = ig.getFeatTemplatesForSrl(inputSents, goldSents, csPrm, sft);\n fePrm.srlFePrm.fePrm.soloTemplates = sft.srlSense;\n fePrm.srlFePrm.fePrm.pairTemplates = sft.srlArg;\n }\n if (CorpusHandler.getGoldOnlyAts().contains(AT.SRL) && acl14DepFeats) {\n fePrm.dpFePrm.firstOrderTpls = srlFePrm.fePrm.pairTemplates;\n }\n if (useTemplates) {\n log.info(\"String_Node_Str\" + srlFePrm.fePrm.soloTemplates.size());\n log.info(\"String_Node_Str\" + srlFePrm.fePrm.pairTemplates.size());\n if (senseFeatTplsOut != null) {\n TemplateWriter.write(senseFeatTplsOut, srlFePrm.fePrm.soloTemplates);\n }\n if (argFeatTplsOut != null) {\n TemplateWriter.write(argFeatTplsOut, srlFePrm.fePrm.pairTemplates);\n }\n }\n}\n"
"public void add(AbstractArea area) {\n super.add(area);\n if (repeatList != null) {\n IContent content = ((ContainerArea) area).getContent();\n if (content != null) {\n IElement parent = content.getParent();\n if (parent != null && parent instanceof IBandContent) {\n int type = ((IBandContent) parent).getBandType();\n if (type == IBandContent.BAND_HEADER || type == IBandContent.BAND_GROUP_HEADER) {\n if (content instanceof IRowContent) {\n RowDesign rowDesign = (RowDesign) content.getGenerateBy();\n if (rowDesign == null || rowDesign.getRepeatable()) {\n repeatList.add(area);\n }\n } else {\n repeatList.add(area);\n }\n }\n }\n }\n }\n}\n"
"public void preloadRecents() {\n SystemServicesProxy ssp = Recents.getSystemServices();\n MutableBoolean isHomeStackVisible = new MutableBoolean(true);\n if (!ssp.isRecentsActivityVisible(isHomeStackVisible)) {\n ActivityManager.RunningTaskInfo runningTask = ssp.getRunningTask();\n RecentsTaskLoader loader = Recents.getTaskLoader();\n sInstanceLoadPlan = loader.createLoadPlan(mContext);\n sInstanceLoadPlan.preloadRawTasks(!isHomeStackVisible.value);\n loader.preloadTasks(sInstanceLoadPlan, runningTask.id, !isHomeStackVisible.value);\n TaskStack stack = sInstanceLoadPlan.getTaskStack();\n if (stack.getTaskCount() > 0) {\n preloadIcon(runningTask);\n updateHeaderBarLayout(stack, null);\n }\n }\n}\n"
"public synchronized void importNewArchive(Csar csar, Topology topology) {\n ArchiveRoot archiveRoot = new ArchiveRoot();\n archiveRoot.setArchive(csar);\n archiveRoot.setTopology(topology);\n publisher.publishEvent(new BeforeArchiveIndexed(this, archiveRoot));\n ensureUniqueness(csar.getName(), csar.getVersion());\n workflowBuilderService.initWorkflows(workflowBuilderService.buildTopologyContext(topology));\n if (csar.getYamlFilePath() == null) {\n csar.setYamlFilePath(\"String_Node_Str\");\n }\n String yaml = exportService.getYaml(csar, topology);\n csarService.save(csar);\n topologyServiceCore.save(topology);\n if (topologyPath == null) {\n archiveRepositry.storeCSAR(csar, yaml);\n } else {\n Files.write(topologyPath.resolve(csar.getYamlFilePath()), yaml.getBytes(Charset.forName(\"String_Node_Str\")));\n archiveRepositry.storeCSAR(csar, topologyPath);\n }\n publisher.publishEvent(new AfterArchiveIndexed(this, archiveRoot));\n}\n"
"public void optimize(DataHandle handle) {\n if (!(handle instanceof DataHandleOutput)) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n DataHandleOutput output = (DataHandleOutput) handle;\n if (output.getInputBuffer() == null || !output.getInputBuffer().equals(this.checker.getInputBuffer())) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n Set<Class<?>> supportedModels = new HashSet<Class<?>>();\n supportedModels.add(KAnonymity.class);\n supportedModels.add(DistinctLDiversity.class);\n supportedModels.add(RecursiveCLDiversity.class);\n supportedModels.add(EntropyLDiversity.class);\n supportedModels.add(HierarchicalDistanceTCloseness.class);\n supportedModels.add(EqualDistanceTCloseness.class);\n supportedModels.add(Inclusion.class);\n for (PrivacyCriterion c : config.getCriteria()) {\n if (!supportedModels.contains(c.getClass())) {\n throw new UnsupportedOperationException(\"String_Node_Str\" + c.getClass().getSimpleName());\n }\n }\n RowSet rowset = RowSet.create(output.getNumRows());\n for (int row = 0; row < output.getNumRows(); row++) {\n if (output.isOutlier(row)) {\n rowset.add(row);\n }\n }\n ARXConfiguration config = this.config.getSubsetInstance(rowset);\n DataDefinition definition = this.definition.clone();\n DataManager manager = this.manager.getSubsetInstance(rowset);\n ARXAnonymizer anonymizer = new ARXAnonymizer();\n Result result = null;\n try {\n result = anonymizer.anonymize(manager, definition, config);\n } catch (IOException e) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n if (result.optimum == null) {\n return;\n }\n TransformedData data = result.checker.applyTransformation(result.optimum, output.getOutputBufferMicroaggregated().getDictionary());\n int newIndex = -1;\n int[][] oldGeneralized = output.getOutputBufferGeneralized().getArray();\n int[][] oldMicroaggregated = output.getOutputBufferMicroaggregated().getArray();\n int[][] newGeneralized = data.bufferGeneralized.getArray();\n int[][] newMicroaggregated = data.bufferMicroaggregated.getArray();\n for (int oldIndex = 0; oldIndex < rowset.length(); oldIndex++) {\n if (rowset.contains(oldIndex)) {\n newIndex++;\n if (oldGeneralized != null && oldGeneralized.length != 0) {\n System.arraycopy(newGeneralized[newIndex], 0, oldGeneralized[oldIndex], 0, newGeneralized[newIndex].length);\n }\n if (oldMicroaggregated != null && oldMicroaggregated.length != 0) {\n System.arraycopy(newMicroaggregated[newIndex], 0, oldMicroaggregated[oldIndex], 0, newMicroaggregated[newIndex].length);\n }\n }\n }\n}\n"
"public static Map getDisplayTexts(Collection parameters, Map displayTexts, HttpServletRequest request) {\n if (displayTexts == null)\n displayTexts = new HashMap();\n Enumeration params = request.getParameterNames();\n while (params != null && params.hasMoreElements()) {\n String param = DataUtil.getString(params.nextElement());\n String paramName = ParameterAccessor.isDisplayText(param);\n if (paramName != null) {\n ParameterDefinition parameter = findParameterDefinition(parameters, paramName);\n if (parameter != null) {\n if (parameter.isMultiValue())\n displayTexts.put(paramName, null);\n else\n displayTexts.put(paramName, ParameterAccessor.getParameter(request, param));\n }\n }\n }\n return displayTexts;\n}\n"
"public void markAsDead(SlaveClient slave) {\n synchronized (stateTable) {\n final State s = stateTable.get(slave.getDefaultServerAddress().getAddress());\n s.openRequests = 0;\n if (!s.dead) {\n Logging.logMessage(Logging.LEVEL_DEBUG, this, \"String_Node_Str\", slave.getDefaultServerAddress().toString(), toString());\n s.dead = true;\n deadSlaves++;\n availableSlaves--;\n stateTable.notify();\n }\n }\n}\n"
"private void showInPopOver() {\n if (!PickerStyle.POPOVER.equals(this.pickerStyle)) {\n if (nonNull(modal)) {\n asElement().removeEventListener(EventType.click.getName(), modalListener);\n modal.close();\n modal.asElement().remove();\n }\n if (isNull(popover)) {\n popover = Popover.createPicker(this.asElement(), this.timePicker.asElement());\n popover.getContentElement().style.setProperty(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n popover.getContentElement().style.setProperty(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n popover.position(this.popupPosition).asElement().style.setProperty(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n popover.getHeadingElement().classList.add(Styles.align_center, timePicker.getColorScheme().color().getStyle());\n }\n }\n this.pickerStyle = PickerStyle.POPOVER;\n}\n"
"private Optional<? extends FileCustomizableResponseType> matchFile(String path) {\n Optional<URL> optionalUrl = staticResourceResolver.resolve(path);\n if (optionalUrl.isPresent()) {\n try {\n URL url = optionalUrl.get();\n URI uri = url.toURI();\n File file = new File(uri.getPath());\n System.out.println(uri.getPath());\n System.out.println(file.getAbsolutePath());\n if (file.exists()) {\n System.out.println(\"String_Node_Str\");\n if (!file.isDirectory() && file.canRead()) {\n return Optional.of(new NettySystemFileCustomizableResponseType(file));\n }\n } else {\n System.out.println(\"String_Node_Str\");\n return Optional.of(new NettyStreamedFileCustomizableResponseType(url));\n }\n } catch (URISyntaxException e) {\n }\n }\n return Optional.empty();\n}\n"
"protected void updateDefaultPropertyValues(DataSetViewData[] viewDatas) {\n updateAnalysisTypes(viewDatas, true);\n}\n"
"public void start() {\n try {\n this.wavPath = File.createTempFile(satellite.getId() + \"String_Node_Str\", \"String_Node_Str\");\n } catch (IOException e) {\n LOG.error(\"String_Node_Str\", e);\n return;\n }\n ProcessWrapper sox = null;\n try {\n Integer ppm = config.getInteger(\"String_Node_Str\");\n if (ppm == null) {\n ppm = 0;\n }\n sox = factory.create(config.getProperty(\"String_Node_Str\") + \"String_Node_Str\" + wavPath.getAbsolutePath() + \"String_Node_Str\", Redirect.INHERIT, false);\n rtlfm = factory.create(config.getProperty(\"String_Node_Str\") + \"String_Node_Str\" + String.valueOf(satellite.getFrequency()) + \"String_Node_Str\" + String.valueOf(ppm) + \"String_Node_Str\", Redirect.INHERIT, false);\n byte[] buf = new byte[BUF_SIZE];\n while (!Thread.currentThread().isInterrupted()) {\n int r = rtlfm.getInputStream().read(buf);\n if (r == -1) {\n break;\n }\n sox.getOutputStream().write(buf, 0, r);\n }\n sox.getOutputStream().flush();\n } catch (IOException e) {\n LOG.error(\"String_Node_Str\", e);\n } finally {\n LOG.info(\"String_Node_Str\");\n Util.shutdown(\"String_Node_Str\", rtlfm, 10000);\n Util.shutdown(\"String_Node_Str\", sox, 10000);\n }\n}\n"
"public Response dbExport() {\n StreamingOutput sout = new StreamingOutput() {\n\n public void write(final OutputStream os) throws IOException {\n configurationController.dbExportInternal(os);\n }\n }).build();\n}\n"
"private boolean inflateViews(NotificationData.Entry entry, ViewGroup parent, boolean isHeadsUp) {\n PackageManager pmUser = getPackageManagerForUser(entry.notification.getUser().getIdentifier());\n int maxHeight = mRowMaxHeight;\n StatusBarNotification sbn = entry.notification;\n RemoteViews contentView = sbn.getNotification().contentView;\n RemoteViews bigContentView = sbn.getNotification().bigContentView;\n if (isHeadsUp) {\n maxHeight = mContext.getResources().getDimensionPixelSize(R.dimen.notification_mid_height);\n bigContentView = sbn.getNotification().headsUpContentView;\n }\n if (contentView == null) {\n return false;\n }\n if (DEBUG) {\n Log.v(TAG, \"String_Node_Str\" + sbn.getNotification().publicVersion);\n }\n Notification publicNotification = sbn.getNotification().publicVersion;\n ExpandableNotificationRow row;\n boolean hasUserChangedExpansion = false;\n boolean userExpanded = false;\n boolean userLocked = false;\n if (entry.row != null) {\n row = entry.row;\n hasUserChangedExpansion = row.hasUserChangedExpansion();\n userExpanded = row.isUserExpanded();\n userLocked = row.isUserLocked();\n entry.reset();\n if (hasUserChangedExpansion) {\n row.setUserExpanded(userExpanded);\n }\n } else {\n LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n row = (ExpandableNotificationRow) inflater.inflate(R.layout.status_bar_notification_row, parent, false);\n row.setExpansionLogger(this, entry.notification.getKey());\n }\n row.setTag(sbn.getPackageName());\n final View guts = row.findViewById(R.id.notification_guts);\n final String pkg = entry.notification.getPackageName();\n String appname = pkg;\n Drawable pkgicon = null;\n int appUid = -1;\n try {\n final ApplicationInfo info = pmUser.getApplicationInfo(pkg, PackageManager.GET_UNINSTALLED_PACKAGES | PackageManager.GET_DISABLED_COMPONENTS);\n if (info != null) {\n appname = String.valueOf(pmUser.getApplicationLabel(info));\n pkgicon = pmUser.getApplicationIcon(info);\n appUid = info.uid;\n }\n } catch (NameNotFoundException e) {\n pkgicon = pmUser.getDefaultActivityIcon();\n }\n ((ImageView) row.findViewById(android.R.id.icon)).setImageDrawable(pkgicon);\n ((DateTimeView) row.findViewById(R.id.timestamp)).setTime(entry.notification.getPostTime());\n ((TextView) row.findViewById(R.id.pkgname)).setText(appname);\n final View settingsButton = guts.findViewById(R.id.notification_inspect_item);\n if (appUid >= 0) {\n final int appUidF = appUid;\n settingsButton.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n startAppNotificationSettingsActivity(pkg, appUidF);\n }\n });\n } else {\n settingsButton.setVisibility(View.GONE);\n }\n workAroundBadLayerDrawableOpacity(row);\n View vetoButton = updateNotificationVetoButton(row, sbn);\n vetoButton.setContentDescription(mContext.getString(R.string.accessibility_remove_notification));\n NotificationContentView expanded = (NotificationContentView) row.findViewById(R.id.expanded);\n NotificationContentView expandedPublic = (NotificationContentView) row.findViewById(R.id.expandedPublic);\n row.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);\n PendingIntent contentIntent = sbn.getNotification().contentIntent;\n if (contentIntent != null) {\n final View.OnClickListener listener = makeClicker(contentIntent, sbn.getKey(), isHeadsUp);\n row.setOnClickListener(listener);\n } else {\n row.setOnClickListener(null);\n }\n View contentViewLocal = null;\n View bigContentViewLocal = null;\n try {\n contentViewLocal = contentView.apply(mContext, expanded, mOnClickHandler);\n if (bigContentView != null) {\n bigContentViewLocal = bigContentView.apply(mContext, expanded, mOnClickHandler);\n }\n } catch (RuntimeException e) {\n final String ident = sbn.getPackageName() + \"String_Node_Str\" + Integer.toHexString(sbn.getId());\n Log.e(TAG, \"String_Node_Str\" + ident, e);\n return false;\n }\n if (contentViewLocal != null) {\n contentViewLocal.setIsRootNamespace(true);\n expanded.setContractedChild(contentViewLocal);\n }\n if (bigContentViewLocal != null) {\n bigContentViewLocal.setIsRootNamespace(true);\n expanded.setExpandedChild(bigContentViewLocal);\n }\n View publicViewLocal = null;\n if (publicNotification != null) {\n try {\n publicViewLocal = publicNotification.contentView.apply(mContext, expandedPublic, mOnClickHandler);\n if (publicViewLocal != null) {\n publicViewLocal.setIsRootNamespace(true);\n expandedPublic.setContractedChild(publicViewLocal);\n }\n } catch (RuntimeException e) {\n final String ident = sbn.getPackageName() + \"String_Node_Str\" + Integer.toHexString(sbn.getId());\n Log.e(TAG, \"String_Node_Str\" + ident, e);\n publicViewLocal = null;\n }\n }\n if (publicViewLocal == null) {\n publicViewLocal = LayoutInflater.from(mContext).inflate(com.android.internal.R.layout.notification_template_material_base, expandedPublic, false);\n publicViewLocal.setIsRootNamespace(true);\n expandedPublic.setContractedChild(publicViewLocal);\n final TextView title = (TextView) publicViewLocal.findViewById(com.android.internal.R.id.title);\n try {\n title.setText(pmUser.getApplicationLabel(pmUser.getApplicationInfo(entry.notification.getPackageName(), 0)));\n } catch (NameNotFoundException e) {\n title.setText(entry.notification.getPackageName());\n }\n final ImageView icon = (ImageView) publicViewLocal.findViewById(com.android.internal.R.id.icon);\n final ImageView profileBadge = (ImageView) publicViewLocal.findViewById(com.android.internal.R.id.profile_badge_line3);\n final StatusBarIcon ic = new StatusBarIcon(entry.notification.getPackageName(), entry.notification.getUser(), entry.notification.getNotification().icon, entry.notification.getNotification().iconLevel, entry.notification.getNotification().number, entry.notification.getNotification().tickerText);\n Drawable iconDrawable = StatusBarIconView.getIcon(mContext, ic);\n icon.setImageDrawable(iconDrawable);\n if (mNotificationColorUtil.isGrayscale(iconDrawable)) {\n icon.setBackgroundResource(com.android.internal.R.drawable.notification_icon_legacy_bg);\n int padding = mContext.getResources().getDimensionPixelSize(com.android.internal.R.dimen.notification_large_icon_circle_padding);\n icon.setPadding(padding, padding, padding, padding);\n }\n if (profileBadge != null) {\n Drawable profileDrawable = mUserManager.getBadgeForUser(entry.notification.getUser(), 0);\n if (profileDrawable != null) {\n profileBadge.setImageDrawable(profileDrawable);\n profileBadge.setVisibility(View.VISIBLE);\n } else {\n profileBadge.setVisibility(View.GONE);\n }\n }\n final View privateTime = contentViewLocal.findViewById(com.android.internal.R.id.time);\n if (privateTime != null && privateTime.getVisibility() == View.VISIBLE) {\n final View timeStub = publicViewLocal.findViewById(com.android.internal.R.id.time);\n timeStub.setVisibility(View.VISIBLE);\n final DateTimeView dateTimeView = (DateTimeView) publicViewLocal.findViewById(com.android.internal.R.id.time);\n dateTimeView.setTime(entry.notification.getNotification().when);\n }\n final TextView text = (TextView) publicViewLocal.findViewById(com.android.internal.R.id.text);\n if (text != null) {\n text.setText(R.string.notification_hidden_text);\n text.setTextAppearance(mContext, R.style.TextAppearance_Material_Notification_Parenthetical);\n }\n int topPadding = Notification.Builder.calculateTopPadding(mContext, false, mContext.getResources().getConfiguration().fontScale);\n title.setPadding(0, topPadding, 0, 0);\n entry.autoRedacted = true;\n }\n row.setClearable(sbn.isClearable());\n if (MULTIUSER_DEBUG) {\n TextView debug = (TextView) row.findViewById(R.id.debug_info);\n if (debug != null) {\n debug.setVisibility(View.VISIBLE);\n debug.setText(\"String_Node_Str\" + mCurrentUserId + \"String_Node_Str\" + entry.notification.getUserId());\n }\n }\n entry.row = row;\n entry.row.setHeightRange(mRowMinHeight, maxHeight);\n entry.row.setOnActivatedListener(this);\n entry.expanded = contentViewLocal;\n entry.expandedPublic = publicViewLocal;\n entry.setBigContentView(bigContentViewLocal);\n applyColorsAndBackgrounds(sbn, entry);\n if (hasUserChangedExpansion) {\n row.setUserExpanded(userExpanded);\n }\n row.setUserLocked(userLocked);\n return true;\n}\n"
"private Optional<ObjectId> verifyId(ObjectId objectId, RevObject.TYPE type) {\n final Optional<RevObject> object = command(RevObjectParse.class).setSource(source).setObjectId(objectId).call();\n checkArgument(object.isPresent(), \"String_Node_Str\", objectId);\n final RevObject revObject = object.get();\n if (type.equals(revObject.getType())) {\n return Optional.of(revObject.getId());\n } else {\n throw new IllegalArgumentException(String.format(\"String_Node_Str\", objectId, type, revObject.getType()));\n }\n}\n"
"public SuggestedWords.Builder getSuggestedWordBuilder(final View view, final WordComposer wordComposer, CharSequence prevWordForBigram, final ProximityInfo proximityInfo) {\n LatinImeLogger.onStartSuggestion(prevWordForBigram);\n mAutoCorrection.init();\n mIsFirstCharCapitalized = wordComposer.isFirstCharCapitalized();\n mIsAllUpperCase = wordComposer.isAllUpperCase();\n collectGarbage(mSuggestions, mPrefMaxSuggestions);\n Arrays.fill(mScores, 0);\n CharSequence typedWord = wordComposer.getTypedWord();\n if (typedWord != null) {\n final String typedWordString = typedWord.toString();\n typedWord = typedWordString;\n LatinImeLogger.onAddSuggestedWord(typedWordString, Suggest.DIC_USER_TYPED, Dictionary.DataType.UNIGRAM);\n }\n mTypedWord = typedWord;\n if (wordComposer.size() <= 1 && (mCorrectionMode == CORRECTION_FULL_BIGRAM || mCorrectionMode == CORRECTION_BASIC)) {\n Arrays.fill(mBigramScores, 0);\n collectGarbage(mBigramSuggestions, PREF_MAX_BIGRAMS);\n if (!TextUtils.isEmpty(prevWordForBigram)) {\n CharSequence lowerPrevWord = prevWordForBigram.toString().toLowerCase();\n if (mMainDict != null && mMainDict.isValidWord(lowerPrevWord)) {\n prevWordForBigram = lowerPrevWord;\n }\n for (final Dictionary dictionary : mBigramDictionaries.values()) {\n dictionary.getBigrams(wordComposer, prevWordForBigram, this);\n }\n if (TextUtils.isEmpty(typedWord)) {\n int insertCount = Math.min(mBigramSuggestions.size(), mPrefMaxSuggestions);\n for (int i = 0; i < insertCount; ++i) {\n addBigramToSuggestions(mBigramSuggestions.get(i));\n }\n } else {\n final char currentChar = typedWord.charAt(0);\n final char currentCharUpper = Character.toUpperCase(currentChar);\n int count = 0;\n final int bigramSuggestionSize = mBigramSuggestions.size();\n for (int i = 0; i < bigramSuggestionSize; i++) {\n final CharSequence bigramSuggestion = mBigramSuggestions.get(i);\n final char bigramSuggestionFirstChar = bigramSuggestion.charAt(0);\n if (bigramSuggestionFirstChar == currentChar || bigramSuggestionFirstChar == currentCharUpper) {\n addBigramToSuggestions(bigramSuggestion);\n if (++count > mPrefMaxSuggestions)\n break;\n }\n }\n }\n }\n } else if (wordComposer.size() > 1) {\n for (final String key : mUnigramDictionaries.keySet()) {\n if (key.equals(DICT_KEY_USER_UNIGRAM) || key.equals(DICT_KEY_WHITELIST))\n continue;\n final Dictionary dictionary = mUnigramDictionaries.get(key);\n dictionary.getWords(wordComposer, this, proximityInfo);\n }\n }\n CharSequence autoText = null;\n final String typedWordString = typedWord == null ? null : typedWord.toString();\n if (typedWord != null) {\n if (mQuickFixesEnabled) {\n final String lowerCaseTypedWord = typedWordString.toLowerCase();\n autoText = capitalizeWord(mIsAllUpperCase, mIsFirstCharCapitalized, AutoText.get(lowerCaseTypedWord, 0, lowerCaseTypedWord.length(), view));\n if (DBG) {\n if (autoText != null) {\n Log.d(TAG, \"String_Node_Str\" + typedWord + \"String_Node_Str\" + autoText);\n }\n autoText = tempAutoText;\n }\n }\n }\n CharSequence whitelistedWord = capitalizeWord(mIsAllUpperCase, mIsFirstCharCapitalized, mWhiteListDictionary.getWhiteListedWord(typedWordString));\n mAutoCorrection.updateAutoCorrectionStatus(mUnigramDictionaries, wordComposer, mSuggestions, mScores, typedWord, mAutoCorrectionThreshold, mCorrectionMode, autoText, whitelistedWord);\n if (autoText != null) {\n mSuggestions.add(0, autoText);\n }\n if (whitelistedWord != null) {\n mSuggestions.add(0, whitelistedWord);\n }\n if (typedWord != null) {\n mSuggestions.add(0, typedWordString);\n }\n Utils.removeDupes(mSuggestions);\n if (DBG) {\n double normalizedScore = mAutoCorrection.getNormalizedScore();\n ArrayList<SuggestedWords.SuggestedWordInfo> scoreInfoList = new ArrayList<SuggestedWords.SuggestedWordInfo>();\n scoreInfoList.add(new SuggestedWords.SuggestedWordInfo(\"String_Node_Str\", false));\n for (int i = 0; i < mScores.length; ++i) {\n if (normalizedScore > 0) {\n final String scoreThreshold = String.format(\"String_Node_Str\", mScores[i], normalizedScore);\n scoreInfoList.add(new SuggestedWords.SuggestedWordInfo(scoreThreshold, false));\n normalizedScore = 0.0;\n } else {\n final String score = Integer.toString(mScores[i]);\n scoreInfoList.add(new SuggestedWords.SuggestedWordInfo(score, false));\n }\n }\n for (int i = mScores.length; i < mSuggestions.size(); ++i) {\n scoreInfoList.add(new SuggestedWords.SuggestedWordInfo(\"String_Node_Str\", false));\n }\n return new SuggestedWords.Builder().addWords(mSuggestions, scoreInfoList);\n }\n return new SuggestedWords.Builder().addWords(mSuggestions, null);\n}\n"
"public static boolean dropColumnFamily(String columnFamilyName, String keyspaceName) {\n try {\n if (columnFamilyExist(columnFamilyName, keyspaceName)) {\n client.system_drop_column_family(columnFamilyName);\n }\n } catch (InvalidRequestException e) {\n return true;\n } catch (SchemaDisagreementException e) {\n return false;\n } catch (TException e) {\n return false;\n }\n return false;\n}\n"
"public static List toList(Object obj, String... delimiters) {\n Object val = obj;\n if (val == null)\n return null;\n List list = new ArrayList();\n if (val instanceof List) {\n list = (List) val;\n } else if (val instanceof String[]) {\n String str = TypeCast.cast(String.class, val);\n if (str != null && StringHelper.contains(str, delimiters)) {\n return toList(str, delimiters);\n }\n for (int i = 0; i < ((Object[]) val).length; i++) {\n Object tmp = (((Object[]) val)[i]);\n if (tmp != null)\n list.add(tmp);\n }\n } else if (val instanceof Object[]) {\n for (int i = 0; i < ((Object[]) val).length; i++) {\n Object tmp = (((Object[]) val)[i]);\n if (tmp != null)\n list.add(tmp);\n }\n } else if (val instanceof Collection) {\n for (Object tmp : (Collection) val) {\n if (tmp != null)\n list.add(tmp);\n }\n } else if (obj instanceof String) {\n String str = TypeCast.cast(String.class, val);\n if (str == null || str.isEmpty())\n return null;\n if (str.startsWith(\"String_Node_Str\") && str.endsWith(\"String_Node_Str\")) {\n try {\n Object jsonobj = JSONValue.parseWithException(str);\n return toList(jsonobj, delimiters);\n } catch (Exception x) {\n return null;\n }\n }\n if (delimiters != null && delimiters.length > 0)\n list.addAll(StringHelper.split(str, delimiters));\n } else if (obj instanceof Enumeration) {\n Enumeration e = (Enumeration) obj;\n while (e.hasMoreElements()) {\n list.add(e.nextElement());\n }\n } else {\n list.add(obj);\n }\n if (list != null && !list.isEmpty())\n return list;\n return null;\n}\n"
"private boolean handleSeparator(final int primaryCode, final int x, final int y, final int spaceState) {\n boolean didAutoCorrect = false;\n if (mWordComposer.isComposingWord()) {\n if (mCurrentSettings.mCorrectionEnabled) {\n commitCurrentAutoCorrection(new String(new int[] { primaryCode }, 0, 1));\n didAutoCorrect = true;\n } else {\n commitTyped(new String(new int[] { primaryCode }, 0, 1));\n }\n }\n final boolean swapWeakSpace = maybeStripSpace(primaryCode, spaceState, Constants.SUGGESTION_STRIP_COORDINATE == x);\n if (SPACE_STATE_PHANTOM == spaceState && mCurrentSettings.isPhantomSpacePromotingSymbol(primaryCode)) {\n sendKeyCodePoint(Keyboard.CODE_SPACE);\n }\n sendKeyCodePoint(primaryCode);\n if (Keyboard.CODE_SPACE == primaryCode) {\n if (mCurrentSettings.isSuggestionsRequested(mDisplayOrientation)) {\n if (maybeDoubleSpace()) {\n mSpaceState = SPACE_STATE_DOUBLE;\n } else if (!isShowingPunctuationList()) {\n mSpaceState = SPACE_STATE_WEAK;\n }\n }\n mHandler.startDoubleSpacesTimer();\n if (!mConnection.isCursorTouchingWord(mCurrentSettings)) {\n mHandler.postUpdateSuggestionStrip();\n }\n } else {\n if (swapWeakSpace) {\n swapSwapperAndSpace();\n mSpaceState = SPACE_STATE_SWAP_PUNCTUATION;\n } else if (SPACE_STATE_PHANTOM == spaceState && !mCurrentSettings.isWeakSpaceStripper(primaryCode) && !mCurrentSettings.isPhantomSpacePromotingSymbol(primaryCode)) {\n mSpaceState = SPACE_STATE_PHANTOM;\n }\n setPunctuationSuggestions();\n }\n Utils.Stats.onSeparator((char) primaryCode, x, y);\n mHandler.postUpdateShiftState();\n return didAutoCorrect;\n}\n"
"private void setParameters(JointDataSetHandle dsHandle) throws SemanticException {\n List<DataSetParameter> params = null;\n PropertyHandle dsParameterHandle = dsHandle.getPropertyHandle(IDataSetModel.PARAMETERS_PROP);\n if (leftDataSetName.equals(rightDataSetName)) {\n params = getDataSetParameters(leftDataSetName + \"String_Node_Str\", leftHandle.getPropertyHandle(IDataSetModel.PARAMETERS_PROP), rightDataSetName + \"String_Node_Str\", rightHandle.getPropertyHandle(IDataSetModel.PARAMETERS_PROP));\n } else {\n params = getDataSetParameters(leftDataSetName, leftHandle.getPropertyHandle(IDataSetModel.PARAMETERS_PROP), rightDataSetName, rightHandle.getPropertyHandle(IDataSetModel.PARAMETERS_PROP));\n }\n if (params.size() == 0) {\n dsParameterHandle.clearValue();\n } else {\n Iterator iter = dsParameterHandle.iterator();\n int i = 0;\n while (iter.hasNext() && i < params.size()) {\n DataSetParameterHandle parameterHandle = (DataSetParameterHandle) iter.next();\n updateDataSetParameterHandle(parameterHandle, params.get(i));\n i++;\n }\n if (dsParameterHandle.getListValue() != null)\n while (i < dsParameterHandle.getListValue().size()) {\n dsParameterHandle.removeItem(dsParameterHandle.getListValue().size() - 1);\n }\n for (; i < params.size(); i++) {\n dsParameterHandle.addItem(params.get(i));\n }\n }\n}\n"
"final ActivityRecord activityIdleInternalLocked(final IBinder token, boolean fromTimeout, Configuration config) {\n if (localLOGV)\n Slog.v(TAG, \"String_Node_Str\" + token);\n ActivityRecord res = null;\n ArrayList<ActivityRecord> stops = null;\n ArrayList<ActivityRecord> finishes = null;\n ArrayList<UserStartedState> startingUsers = null;\n int NS = 0;\n int NF = 0;\n IApplicationThread sendThumbnail = null;\n boolean booting = false;\n boolean enableScreen = false;\n boolean activityRemoved = false;\n ActivityRecord r = ActivityRecord.forToken(token);\n if (r != null) {\n mHandler.removeMessages(IDLE_TIMEOUT_MSG, r);\n r.finishLaunchTickingLocked();\n res = r.task.stack.activityIdleInternalLocked(token, fromTimeout, config);\n if (res != null) {\n if (fromTimeout) {\n reportActivityLaunchedLocked(fromTimeout, r, -1, -1);\n }\n if (config != null) {\n r.configuration = config;\n }\n r.idle = true;\n if (allResumedActivitiesIdle()) {\n mService.scheduleAppGcsLocked();\n }\n if (r.thumbnailNeeded && r.app != null && r.app.thread != null) {\n sendThumbnail = r.app.thread;\n r.thumbnailNeeded = false;\n }\n if (!mService.mBooted && isFrontStack(r.task.stack)) {\n mService.mBooted = true;\n enableScreen = true;\n }\n } else if (fromTimeout) {\n reportActivityLaunchedLocked(fromTimeout, null, -1, -1);\n }\n }\n stops = processStoppingActivitiesLocked(true);\n NS = stops != null ? stops.size() : 0;\n if ((NF = mFinishingActivities.size()) > 0) {\n finishes = new ArrayList<ActivityRecord>(mFinishingActivities);\n mFinishingActivities.clear();\n }\n final ArrayList<ActivityRecord> thumbnails;\n final int NT = mCancelledThumbnails.size();\n if (NT > 0) {\n thumbnails = new ArrayList<ActivityRecord>(mCancelledThumbnails);\n mCancelledThumbnails.clear();\n } else {\n thumbnails = null;\n }\n if (isFrontStack(mHomeStack)) {\n booting = mService.mBooting;\n mService.mBooting = false;\n }\n if (mStartingUsers.size() > 0) {\n startingUsers = new ArrayList<UserStartedState>(mStartingUsers);\n mStartingUsers.clear();\n }\n final IApplicationThread thumbnailThread = sendThumbnail;\n mHandler.post(new Runnable() {\n public void run() {\n if (thumbnailThread != null) {\n try {\n thumbnailThread.requestThumbnail(token);\n } catch (Exception e) {\n Slog.w(TAG, \"String_Node_Str\", e);\n mService.sendPendingThumbnail(null, token, null, null, true);\n }\n }\n for (int i = 0; i < NT; i++) {\n ActivityRecord r = thumbnails.get(i);\n mService.sendPendingThumbnail(r, null, null, null, true);\n }\n }\n });\n for (int i = 0; i < NS; i++) {\n r = stops.get(i);\n final ActivityStack stack = r.task.stack;\n if (r.finishing) {\n stack.finishCurrentActivityLocked(r, ActivityStack.FINISH_IMMEDIATELY, false);\n } else {\n stack.stopActivityLocked(r);\n }\n }\n for (int i = 0; i < NF; i++) {\n r = finishes.get(i);\n activityRemoved |= r.task.stack.destroyActivityLocked(r, true, false, \"String_Node_Str\");\n }\n if (booting) {\n mService.finishBooting();\n } else if (startingUsers != null) {\n for (int i = 0; i < startingUsers.size(); i++) {\n mService.finishUserSwitch(startingUsers.get(i));\n }\n }\n mService.trimApplications();\n if (enableScreen) {\n mService.enableScreenAfterBoot();\n }\n if (activityRemoved) {\n resumeTopActivitiesLocked();\n }\n return res;\n}\n"
"public void makePassOverFieldStmts() {\n for (StoreEdge storeEdge : encounteredStores) {\n PointerKeyAndState storedValAndState = storeEdge.val;\n IField field = storeEdge.field;\n PointerKeyAndState baseAndState = storeEdge.base;\n IntSet trackedSet = find(pkToTrackedSet, baseAndState);\n for (InstanceKeyAndState ikAndState : makeOrdinalSet(trackedSet)) {\n if (forwInstKeyToFields.get(ikAndState).contains(field)) {\n if (!addToInitWorklist(storedValAndState)) {\n InstanceFieldKeyAndState ifk = getInstFieldKey(ikAndState, field);\n findOrCreate(instFieldKeyToP2Set, ifk).addAll(find(pkToP2Set, storedValAndState));\n }\n }\n }\n }\n for (LoadEdge loadEdge : encounteredLoads) {\n PointerKeyAndState loadedValAndState = loadEdge.val;\n IField field = loadEdge.field;\n PointerKey basePointerKey = loadEdge.base.getPointerKey();\n State loadDstState = loadedValAndState.getState();\n PointerKeyAndState baseAndStateToHandle = new PointerKeyAndState(basePointerKey, loadDstState);\n if (Assertions.verifyAssertions) {\n boolean basePointerOkay = pointsToQueried.get(basePointerKey).contains(loadDstState) || !pointsToQueried.get(loadedValAndState.getPointerKey()).contains(loadDstState) || initWorklist.contains(loadedValAndState);\n if (!basePointerOkay) {\n }\n }\n final IntSet curP2Set = find(pkToP2Set, baseAndStateToHandle);\n for (InstanceKeyAndState ikAndState : makeOrdinalSet(curP2Set)) {\n InstanceFieldKeyAndState ifk = getInstFieldKey(ikAndState, field);\n if (pointsToQueried.get(loadedValAndState.getPointerKey()).contains(loadedValAndState.getState())) {\n if (addAllToP2Set(pkToP2Set, loadedValAndState, find(instFieldKeyToP2Set, ifk), AssignLabel.noFilter())) {\n if (DEBUG) {\n System.err.println(\"String_Node_Str\" + loadEdge);\n }\n addToPToWorklist(loadedValAndState);\n }\n addToPToWorklist(loadedValAndState);\n }\n }\n PointerKeyAndState baseAndState = loadEdge.base;\n for (InstanceKeyAndState ikAndState : makeOrdinalSet(find(pkToTrackedSet, baseAndState))) {\n if (backInstKeyToFields.get(ikAndState).contains(field)) {\n InstanceFieldKeyAndState ifk = getInstFieldKey(ikAndState, field);\n if (findOrCreate(pkToTrackedSet, loadedValAndState).addAll(find(instFieldKeyToTrackedSet, ifk))) {\n if (DEBUG) {\n System.err.println(\"String_Node_Str\" + loadEdge);\n }\n addToTrackedPToWorklist(loadedValAndState);\n }\n }\n }\n }\n}\n"
"protected void setOrAddAttributeValue(UnmarshalRecord unmarshalRecord, Object value, XPathFragment xPathFragment, Object collection) {\n if (!xmlAnyCollectionMapping.usesXMLRoot() || xPathFragment.getLocalName() == null || (xmlAnyCollectionMapping.isMixedContent() && unmarshalRecord.getTextWrapperFragment() != null && unmarshalRecord.getTextWrapperFragment().equals(xPathFragment))) {\n unmarshalRecord.addAttributeValue(this, value);\n } else {\n Root xmlRoot = new XMLRoot();\n xmlRoot.setNamespaceURI(xPathFragment.getNamespaceURI());\n xmlRoot.setSchemaType(unmarshalRecord.getTypeQName());\n xmlRoot.setLocalName(xPathFragment.getLocalName());\n xmlRoot.setObject(value);\n unmarshalRecord.addAttributeValue(this, xmlRoot);\n }\n}\n"
"protected void onCommandSuccess(ListResult<IterationChange> result) {\n for (IterationChange iterationChange : result.getList()) {\n if (iterationChange.isDeleted()) {\n Iterator<ValueEvent> valuesIterator = valueChanges.iterator();\n while (valuesIterator.hasNext()) {\n ValueEvent valueEvent = valuesIterator.next();\n if (valueEvent.getIterationId() == iterationChange.getIterationId()) {\n valuesIterator.remove();\n }\n }\n iterationChanges.clear();\n newIterationsTabItems.clear();\n dispatch.execute(new UpdateContact(contactDTO.getId(), valueChanges), new CommandResultHandler<VoidResult>() {\n public void onCommandFailure(final Throwable caught) {\n N10N.error(I18N.CONSTANTS.save(), I18N.CONSTANTS.saveError());\n }\n }\n }\n }\n iterationChanges.clear();\n newIterationsTabItems.clear();\n dispatch.execute(new UpdateContact(contactDTO.getId(), valueChanges), new CommandResultHandler<VoidResult>() {\n public void onCommandFailure(final Throwable caught) {\n N10N.error(I18N.CONSTANTS.save(), I18N.CONSTANTS.saveError());\n }\n protected void onCommandSuccess(final VoidResult result) {\n N10N.infoNotif(I18N.CONSTANTS.infoConfirmation(), I18N.CONSTANTS.saveConfirm());\n eventBus.fireEvent(new UpdateEvent(UpdateEvent.CONTACT_UPDATE, contactDTO));\n for (final ValueEvent event : valueChanges) {\n if (event.getSource() instanceof DefaultContactFlexibleElementDTO) {\n updateCurrentContact(contactDTO, (DefaultContactFlexibleElementDTO) event.getSource(), event.getSingleValue());\n }\n }\n valueChanges.clear();\n if (callback != null) {\n callback.onSuccess(contactDTO);\n }\n refresh(contactDTO);\n }\n }, view.getSaveButton(), new LoadingMask(view.getDetailsContainer()), new LoadingMask(target));\n}\n"
"public void run() {\n hc.add(new Endpoint(\"String_Node_Str\", 6346), false);\n }\n };\n responder.start();\n assertTrue(\"String_Node_Str\", hc.getAnEndpoint() != null);\n assertEquals(\"String_Node_Str\", 1, gWebCache.hostfiles);\n hc.add(new Endpoint(\"String_Node_Str\", 6346), false);\n assertTrue(\"String_Node_Str\", hc.getAnEndpoint() != null);\n assertEquals(\"String_Node_Str\", 1, gWebCache.hostfiles);\n responder = new Thread() {\n public void run() {\n yield();\n hc.add(new Endpoint(\"String_Node_Str\", 6346), false);\n}\n"
"public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {\n for (aH.Argument arg : aH.interpret(scriptEntry.getArguments())) {\n if (!scriptEntry.hasObject(\"String_Node_Str\") && arg.matches(\"String_Node_Str\")) {\n if (!scriptEntry.hasPlayer())\n throw new InvalidArgumentsException(\"String_Node_Str\");\n scriptEntry.addObject(\"String_Node_Str\", Arrays.asList(scriptEntry.getPlayer().getDenizenEntity()));\n } else if (!scriptEntry.hasObject(\"String_Node_Str\") && arg.matchesPrimitive(aH.PrimitiveType.Integer))\n scriptEntry.addObject(\"String_Node_Str\", arg.asElement());\n else if (!scriptEntry.hasObject(\"String_Node_Str\") && arg.matchesArgumentList(dEntity.class))\n scriptEntry.addObject(\"String_Node_Str\", arg.asType(dList.class).filter(dEntity.class, scriptEntry));\n else if (!scriptEntry.hasObject(\"String_Node_Str\") && arg.matchesPrefix(\"String_Node_Str\"))\n scriptEntry.addObject(\"String_Node_Str\", arg.asElement());\n else\n arg.reportUnhandled();\n }\n if (!scriptEntry.hasObject(\"String_Node_Str\") && !scriptEntry.hasObject(\"String_Node_Str\"))\n throw new InvalidArgumentsException(\"String_Node_Str\");\n if (!scriptEntry.hasObject(\"String_Node_Str\")) {\n if (!scriptEntry.hasNPC())\n throw new InvalidArgumentsException(\"String_Node_Str\");\n scriptEntry.addObject(\"String_Node_Str\", Arrays.asList(scriptEntry.getNPC()));\n }\n}\n"
"public void onEvent(SensorEvent<String> event) {\n tomcat.invoke(cumulusConfig, MutableMap.<String, Object>of());\n if (tomcat.getAttribute(Startable.SERVICE_UP)) {\n tomcat.restart();\n }\n}\n"
"protected void clearAction() {\n if (!haveLocator() && allLabels == null)\n throw exception(\"String_Node_Str\");\n if (getLocator().toString().contains(\"String_Node_Str\"))\n throw exception(\"String_Node_Str\");\n if (allLabels != null) {\n clearElements(allLabels.getWebElements());\n return;\n }\n List<WebElement> els = getAvatar().getElements();\n if (els.size() == 1)\n getSelector().deselectAll();\n else\n clearElements(els);\n}\n"
"private Node getTypesInTree(List<XSDDocInterface> wsdlDoc) {\n List<ComplexType> complexTypes = new ArrayList<ComplexType>();\n for (XSDDocInterface xsdDocument : wsdlDoc) {\n if (xsdDocument.getAllComplexTypes() != null) {\n complexTypes.addAll(xsdDocument.getAllComplexTypes());\n }\n }\n Node root = new Node();\n root.setName(\"String_Node_Str\");\n root.setLevel(0);\n for (ComplexType type : complexTypes) {\n Node node = new Node();\n String packageName = type.getPackageName();\n if (packageName == null) {\n packageName = \"String_Node_Str\";\n }\n node.setName(packageName + \"String_Node_Str\" + type.getName());\n node.setOriginalParent(packageName + \"String_Node_Str\" + type.getParentType());\n getParent(root, node, packageName + \"String_Node_Str\" + type.getParentType());\n if (!node.isNodeAdded()) {\n if (root.getChildren() == null) {\n root.setChildren(new TreeSet<Node>());\n }\n node.setParent(root);\n node.setLevel(root.getLevel() + 1);\n root.getChildren().add(node);\n }\n normalizeTree(type, root, node);\n }\n return root;\n}\n"
"private void rxtMigration() throws APIMigrationException {\n log.info(\"String_Node_Str\");\n String rxtName = \"String_Node_Str\";\n String rxtDir = CarbonUtils.getCarbonHome() + File.separator + \"String_Node_Str\" + File.separator + \"String_Node_Str\" + File.separator + \"String_Node_Str\" + File.separator + rxtName;\n for (Tenant tenant : getTenantsArray()) {\n try {\n registryService.startTenantFlow(tenant);\n log.info(\"String_Node_Str\" + tenant.getId() + '(' + tenant.getDomain() + ')');\n String rxt = FileUtil.readFileToString(rxtDir);\n registryService.updateRXTResource(rxtName, rxt);\n log.debug(\"String_Node_Str\" + tenant.getId() + '(' + tenant.getDomain() + ')');\n log.debug(\"String_Node_Str\" + tenant.getId() + '(' + tenant.getDomain() + ')');\n GenericArtifact[] artifacts = registryService.getGenericAPIArtifacts();\n for (GenericArtifact artifact : artifacts) {\n artifact.setAttribute(\"String_Node_Str\", \"String_Node_Str\");\n }\n registryService.updateGenericAPIArtifacts(artifacts);\n log.debug(\"String_Node_Str\" + tenant.getId() + '(' + tenant.getDomain() + ')');\n } catch (GovernanceException e) {\n log.error(\"String_Node_Str\" + tenant.getId() + '(' + tenant.getDomain() + ')', e);\n } catch (IOException e) {\n log.error(\"String_Node_Str\" + rxtDir + \"String_Node_Str\" + tenant.getId() + '(' + tenant.getDomain() + ')', e);\n } catch (org.wso2.carbon.registry.core.exceptions.RegistryException e) {\n log.error(\"String_Node_Str\" + tenant.getId() + '(' + tenant.getDomain() + ')', e);\n } catch (UserStoreException e) {\n log.error(\"String_Node_Str\" + tenant.getId() + '(' + tenant.getDomain() + ')', e);\n } finally {\n registryService.endTenantFlow();\n }\n }\n log.info(\"String_Node_Str\");\n}\n"
"public void makeView() {\n learner.remove(detail);\n run.setEnabled(false);\n System.out.println(\"String_Node_Str\");\n detail.unsetPanel();\n detail.setVisible(false);\n hint.setText(\"String_Node_Str\");\n isInconsistent = false;\n readThread = new ReadingOntologyThread(editorKit, this, model);\n readThread.start();\n hint.setVisible(true);\n advanced.setIcon(icon);\n accept.setEnabled(false);\n action.resetToggled();\n addButtonPanel.add(\"String_Node_Str\", accept);\n sugPanel.setSuggestList(new DefaultListModel());\n sugPanel = sugPanel.updateSuggestClassList();\n advanced.setSelected(false);\n sugPanel.setBounds(10, 35, 470, 110);\n adv.setBounds(40, 195, 200, 20);\n wikiPane.setBounds(220, 0, 350, 30);\n addButtonPanel.setBounds(510, 40, 80, 70);\n run.setBounds(10, 0, 200, 30);\n advanced.setBounds(10, 195, 20, 20);\n detail.setBounds(10, 195, 600, 300);\n detail.setVisible(true);\n sugPanel.setVisible(true);\n posPanel.setVisible(false);\n posPanel.setBounds(10, 225, 490, 250);\n accept.setBounds(510, 40, 80, 80);\n hint.setBounds(10, 150, 490, 35);\n errorMessage.setBounds(510, 100, 490, 50);\n learner.add(run);\n learner.add(wikiPane);\n learner.add(adv);\n learner.add(advanced);\n learner.add(sugPanel);\n learner.add(addButtonPanel);\n learner.add(hint);\n learner.add(errorMessage);\n learner.add(posPanel);\n learnerPanel.add(learner);\n learnerScroll.setViewportView(learnerPanel);\n this.renderErrorMessage(\"String_Node_Str\");\n}\n"
"public void update() {\n markers.clean();\n Home home = drone.home.getHome();\n if (home.isValid()) {\n markers.updateMarker(home, false, context);\n }\n markers.updateMarkers(mission.getMarkers(), isMissionDraggable(), context);\n missionPath.update(mission);\n}\n"
"public boolean marshal(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, AbstractSession session, NamespaceResolver namespaceResolver) {\n if (xmlAnyCollectionMapping.isReadOnly()) {\n return false;\n }\n ContainerPolicy cp = xmlAnyCollectionMapping.getContainerPolicy();\n Object collection = xmlAnyCollectionMapping.getAttributeAccessor().getAttributeValueFromObject(object);\n if (null == collection) {\n AbstractNullPolicy wrapperNP = xmlAnyCollectionMapping.getWrapperNullPolicy();\n if (wrapperNP != null && wrapperNP.getMarshalNullRepresentation().equals(XMLNullRepresentationType.XSI_NIL)) {\n marshalRecord.nilSimple(namespaceResolver);\n return true;\n } else {\n return false;\n }\n }\n Object iterator = cp.iteratorFor(collection);\n if (null != iterator && cp.hasNext(iterator)) {\n XPathFragment groupingFragment = marshalRecord.openStartGroupingElements(namespaceResolver);\n marshalRecord.closeStartGroupingElements(groupingFragment);\n } else {\n if (xmlAnyCollectionMapping.getWrapperNullPolicy() != null) {\n XPathFragment groupingFragment = marshalRecord.openStartGroupingElements(namespaceResolver);\n marshalRecord.closeStartGroupingElements(groupingFragment);\n } else {\n return false;\n }\n }\n if (marshalRecord.getMarshaller().getMediaType() == MediaType.APPLICATION_JSON) {\n List<XPathFragment> frags = new ArrayList();\n List<List> values = new ArrayList<List>();\n XPathFragment xmlRootFragment;\n while (cp.hasNext(iterator)) {\n Object nextValue = cp.next(iterator, session);\n if (xmlAnyCollectionMapping.getConverter() != null) {\n nextValue = xmlAnyCollectionMapping.getConverter().convertObjectValueToDataValue(nextValue, session, marshalRecord.getMarshaller());\n }\n XPathFragment frag = getXPathFragmentForValue(nextValue, marshalRecord, marshalRecord.getMarshaller());\n if (frag != null) {\n if (frag == SIMPLE_FRAGMENT) {\n mixedValues.add(nextValue);\n } else {\n frags.add(frag);\n List valuesList = new ArrayList();\n valuesList.add(nextValue);\n values.add(valuesList);\n }\n }\n }\n for (int i = 0; i < frags.size(); i++) {\n XPathFragment nextFragment = frags.get(i);\n List listValue = values.get(i);\n if (nextFragment != null) {\n marshalRecord.startCollection();\n for (int j = 0; j < listValue.size(); j++) {\n marshalSingleValue(nextFragment, marshalRecord, object, listValue.get(j), session, namespaceResolver, ObjectMarshalContext.getInstance());\n }\n marshalRecord.endCollection();\n }\n }\n return true;\n } else {\n Object objectValue;\n marshalRecord.startCollection();\n while (cp.hasNext(iterator)) {\n objectValue = cp.next(iterator, session);\n if (xmlAnyCollectionMapping.getConverter() != null) {\n objectValue = xmlAnyCollectionMapping.getConverter().convertObjectValueToDataValue(objectValue, session, marshalRecord.getMarshaller());\n }\n marshalSingleValue(xPathFragment, marshalRecord, object, objectValue, session, namespaceResolver, ObjectMarshalContext.getInstance());\n }\n marshalRecord.endCollection();\n return true;\n }\n}\n"
"private void handleChangedProperty(Element sourceElement, String propertyName, Object newValue, Object oldValue) {\n JSONObject elementOb = null;\n String elementID = null;\n ArrayList<String> moveKeywords = new ArrayList<String>();\n moveKeywords.add(PropertyNames.OWNING_ASSOCIATION);\n moveKeywords.add(PropertyNames.OWNING_CONSTRAINT);\n moveKeywords.add(PropertyNames.OWNING_ELEMENT);\n moveKeywords.add(PropertyNames.OWNING_EXPRESSION);\n moveKeywords.add(PropertyNames.OWNING_INSTANCE);\n moveKeywords.add(PropertyNames.OWNING_INSTANCE_SPEC);\n moveKeywords.add(PropertyNames.OWNING_LOWER);\n moveKeywords.add(PropertyNames.OWNING_PACKAGE);\n moveKeywords.add(PropertyNames.OWNING_PARAMETER);\n moveKeywords.add(PropertyNames.OWNING_PROPERTY);\n moveKeywords.add(PropertyNames.OWNING_SIGNAL);\n moveKeywords.add(PropertyNames.OWNING_SLOT);\n moveKeywords.add(PropertyNames.OWNING_STATE);\n moveKeywords.add(PropertyNames.OWNING_TEMPLATE_PARAMETER);\n moveKeywords.add(PropertyNames.OWNING_TRANSITION);\n moveKeywords.add(PropertyNames.OWNING_UPPER);\n moveKeywords.add(PropertyNames._U_M_L_CLASS);\n moveKeywords.add(PropertyNames.OWNER);\n if (propertyName.equals(PropertyNames.NAME)) {\n elementOb = getElementObject(sourceElement);\n ExportUtility.fillName(sourceElement, elementOb);\n ExportUtility.fillOwner(sourceElement, elementOb);\n } else if (sourceElement instanceof Comment && ExportUtility.isElementDocumentation((Comment) sourceElement) && propertyName.equals(PropertyNames.BODY)) {\n Element actual = sourceElement.getOwner();\n elementOb = getElementObject(actual);\n ExportUtility.fillDoc(actual, elementOb);\n ExportUtility.fillOwner(actual, elementOb);\n } else if ((sourceElement instanceof ValueSpecification) && (propertyName.equals(PropertyNames.VALUE)) || (sourceElement instanceof OpaqueExpression) && (propertyName.equals(PropertyNames.BODY)) || (sourceElement instanceof Expression) && (propertyName.equals(PropertyNames.OPERAND))) {\n Element actual = sourceElement.getOwner();\n while (actual instanceof ValueSpecification) actual = actual.getOwner();\n if (!ExportUtility.shouldAdd(actual))\n return;\n elementOb = getElementObject(actual);\n if (actual instanceof Slot || actual instanceof Property) {\n JSONObject specialization = ExportUtility.fillPropertySpecialization(actual, null, true);\n elementOb.put(\"String_Node_Str\", specialization);\n }\n if (actual instanceof Constraint) {\n JSONObject specialization = ExportUtility.fillConstraintSpecialization((Constraint) actual, null);\n elementOb.put(\"String_Node_Str\", specialization);\n }\n ExportUtility.fillOwner(actual, elementOb);\n } else if ((sourceElement instanceof Property) && (propertyName.equals(PropertyNames.DEFAULT_VALUE) || propertyName.equals(PropertyNames.TYPE))) {\n JSONObject specialization = ExportUtility.fillPropertySpecialization(sourceElement, null, true);\n elementOb = getElementObject(sourceElement);\n elementOb.put(\"String_Node_Str\", specialization);\n ExportUtility.fillOwner(sourceElement, elementOb);\n } else if ((sourceElement instanceof Slot) && propertyName.equals(PropertyNames.VALUE) && ExportUtility.shouldAdd(sourceElement)) {\n elementOb = getElementObject(sourceElement);\n JSONObject specialization = ExportUtility.fillPropertySpecialization(sourceElement, null, false);\n elementOb.put(\"String_Node_Str\", specialization);\n ExportUtility.fillOwner(sourceElement, elementOb);\n } else if ((sourceElement instanceof Constraint) && propertyName.equals(PropertyNames.SPECIFICATION)) {\n elementOb = getElementObject(sourceElement);\n JSONObject specialization = ExportUtility.fillConstraintSpecialization((Constraint) sourceElement, null);\n elementOb.put(\"String_Node_Str\", specialization);\n ExportUtility.fillOwner(sourceElement, elementOb);\n } else if (propertyName.equals(UML2MetamodelConstants.INSTANCE_CREATED) && ExportUtility.shouldAdd(sourceElement)) {\n if (isDiagramCreated(sourceElement))\n toRemove.add(ExportUtility.getElementID(sourceElement));\n else {\n elementOb = getElementObject(sourceElement, true);\n ExportUtility.fillElement(sourceElement, elementOb);\n }\n } else if (propertyName.equals(UML2MetamodelConstants.INSTANCE_DELETED) && ExportUtility.shouldAdd(sourceElement)) {\n elementID = ExportUtility.getElementID(sourceElement);\n elements.remove(elementID);\n changedElements.remove(elementID);\n addedElements.remove(elementID);\n if (!auto)\n deletedElements.put(elementID, sourceElement);\n } else if (sourceElement instanceof DirectedRelationship && (propertyName.equals(PropertyNames.SUPPLIER) || propertyName.equals(PropertyNames.CLIENT))) {\n if ((newValue != null) && (oldValue == null)) {\n JSONObject specialization = ExportUtility.fillDirectedRelationshipSpecialization((DirectedRelationship) sourceElement, null);\n elementOb = getElementObject(sourceElement);\n elementOb.put(\"String_Node_Str\", specialization);\n ExportUtility.fillOwner(sourceElement, elementOb);\n }\n } else if ((sourceElement instanceof Generalization) && ((propertyName.equals(PropertyNames.SPECIFIC)) || (propertyName.equals(PropertyNames.GENERAL)))) {\n if ((newValue != null) && (oldValue == null)) {\n JSONObject specialization = ExportUtility.fillDirectedRelationshipSpecialization((DirectedRelationship) sourceElement, null);\n elementOb = getElementObject(sourceElement);\n elementOb.put(\"String_Node_Str\", specialization);\n ExportUtility.fillOwner(sourceElement, elementOb);\n }\n } else if ((moveKeywords.contains(propertyName)) && ExportUtility.shouldAdd(sourceElement)) {\n elementOb = getElementObject(sourceElement);\n ExportUtility.fillOwner(sourceElement, elementOb);\n } else if (sourceElement instanceof ConnectorEnd && propertyName.equals(PropertyNames.ROLE)) {\n Connector conn = ((ConnectorEnd) sourceElement).get_connectorOfEnd();\n elementOb = getElementObject(conn);\n JSONObject specialization = ExportUtility.fillConnectorSpecialization(conn, null);\n elementOb.put(\"String_Node_Str\", specialization);\n ExportUtility.fillOwner(conn, elementOb);\n } else if (sourceElement instanceof Association && propertyName.equals(PropertyNames.OWNED_END)) {\n elementOb = getElementObject(sourceElement);\n JSONObject specialization = ExportUtility.fillAssociationSpecialization((Association) sourceElement, null);\n elementOb.put(\"String_Node_Str\", specialization);\n ExportUtility.fillOwner(sourceElement, elementOb);\n } else if (sourceElement instanceof Property && propertyName.equals(PropertyNames.AGGREGATION)) {\n Association a = ((Property) sourceElement).getAssociation();\n if (a != null) {\n elementOb = getElementObject(a);\n JSONObject specialization = ExportUtility.fillAssociationSpecialization(a, null);\n elementOb.put(\"String_Node_Str\", specialization);\n ExportUtility.fillOwner(a, elementOb);\n }\n }\n}\n"
"public static Address allocateScalar(BootImageInterface bootImage, RVMClass klass, boolean needsIdentityHash, int identityHashValue) {\n TIB tib = klass.getTypeInformationBlock();\n int size = klass.getInstanceSize();\n if (needsIdentityHash) {\n if (JavaHeader.ADDRESS_BASED_HASHING) {\n size += JavaHeader.HASHCODE_BYTES;\n } else {\n throw new Error(\"String_Node_Str\");\n }\n }\n int align = getAlignment(klass);\n int offset = getOffsetForAlignment(klass, needsIdentityHash);\n Address ptr = bootImage.allocateDataStorage(size, align, offset);\n Address ref = JavaHeader.initializeScalarHeader(bootImage, ptr, tib, size, needsIdentityHash, identityHashValue);\n MM_Interface.initializeHeader(bootImage, ref, tib, size, true);\n MiscHeader.initializeHeader(bootImage, ref, tib, size, true);\n return ref;\n}\n"
"protected Callable<IRemoteCallCompleteEvent> createAsyncCallable(final RSARemoteCall call) {\n throw new UnsupportedOperationException(\"String_Node_Str\" + call.getMethod() + \"String_Node_Str\" + call.getReflectMethod().getDeclaringClass());\n}\n"
"private void markExposedInEnclosingEntities(WalkContext context, final String name, Scope definingScope, CAstEntity E, final String entityName, boolean isWrite) {\n Scope curScope = context.currentScope();\n while (!curScope.equals(definingScope)) {\n final Symbol curSymbol = curScope.lookup(name);\n final int vn = curSymbol.valueNumber();\n final Access A = new Access(name, entityName, vn);\n final CAstEntity entity = curScope.getEntity();\n if (entity != definingScope.getEntity()) {\n addExposedName(entity, E, name, vn, isWrite);\n addAccess(entity, A);\n }\n curScope = curScope.getParent();\n }\n}\n"
"public void testEarlyStopping() {\n DmvModel dmvModel = SimpleStaticDmvModel.getAltThreePosTagInstance();\n DmvDepTreeGenerator generator = new DmvDepTreeGenerator(dmvModel, Prng.nextInt(1000000));\n DepTreebank treebank = generator.getTreebank(50);\n DmvTrainCorpus corpus = new DmvTrainCorpus(treebank, 0.0);\n double incumbentScore = -3.0;\n DmvRltRelaxPrm prm = new DmvRltRelaxPrm();\n prm.tempDir = new File(\"String_Node_Str\");\n prm.rltPrm.envelopeOnly = false;\n prm.rltPrm.nameRltVarsAndCons = false;\n prm.cplexPrm.simplexDisplay = 2;\n DmvRltRelaxation relax = new DmvRltRelaxation(prm);\n relax.init1(corpus);\n relax.init2(null);\n DmvSolution initSol = DmvDantzigWolfeRelaxationTest.getInitFeasSol(corpus);\n double offsetProb = 0.5;\n double probOfSkip = 0.5;\n LocalBnBDmvTrainer.setBoundsFromInitSol(relax, initSol, offsetProb, probOfSkip);\n RelaxedDmvSolution relaxSol = (RelaxedDmvSolution) relax.solveRelaxation(incumbentScore, 0);\n Assert.assertTrue(relaxSol.getScore() <= incumbentScore);\n}\n"
"private boolean next(boolean includeMetaData) throws UnrecoverableTimeoutException, StreamCorruptedException {\n for (int i = 0; i < 1000; i++) {\n switch(state) {\n case UNINTIALISED:\n final long firstIndex = queue.firstIndex();\n if (firstIndex == Long.MAX_VALUE)\n return false;\n if (!moveToIndex(firstIndex))\n return false;\n break;\n case FOUND_CYCLE:\n try {\n boolean result = inAnCycle(includeMetaData);\n if (!result) {\n state = TailerState.END_OF_CYCLE;\n break;\n }\n return result;\n } catch (EOFException eof) {\n state = TailerState.END_OF_CYCLE;\n }\n break;\n case END_OF_CYCLE:\n Boolean x = atTheEndOfACycle();\n if (x != null)\n return x;\n break;\n case BEHOND_START:\n if (direction == FORWARD) {\n state = UNINTIALISED;\n continue;\n }\n return false;\n case CYCLE_NOT_FOUND:\n return moveToIndex(index);\n default:\n throw new AssertionError(\"String_Node_Str\" + state);\n }\n }\n throw new IllegalStateException(\"String_Node_Str\");\n}\n"
"void incStartedServices(int memFactor, long now) {\n if (mCommonProcess != this) {\n mCommonProcess.incStartedServices(memFactor, now, serviceName);\n }\n mNumStartedServices++;\n if (mNumStartedServices == 1 && mCurState == STATE_NOTHING) {\n setState(STATE_NOTHING, memFactor, now, null);\n }\n}\n"
"int sameNum(String[] strList){\n\tint num = 0;\n\tint length = Math.min(this.strList.length(), strList.length());\n\tfor (int i = 0; i < length; i ++){\n\t\tif (this.strList[i] == null || strList[i] == null)\n\t\t\tcontinue;\n\t\tif (this.strList[i].equals(strList[i]))\n\t\t\tnum += 1;\n\t}\n\treturn num;\n}\n"
"protected void finished(StepContext context) throws Exception {\n Cloud cloud = Jenkins.getActiveInstance().getCloud(step.getCloud());\n if (cloud instanceof KubernetesCloud) {\n KubernetesCloud kubernetesCloud = (KubernetesCloud) cloud;\n kubernetesCloud.removeTemplate(podTemplate);\n }\n}\n"
"protected void refreshData() {\n try {\n Set<String> outputs = resultsMap.keySet();\n for (Iterator iter = outputs.iterator(); iter.hasNext(); ) {\n String output = (String) iter.next();\n if (output.startsWith(TransformerMainPage.DEFAULT_VAR))\n output = \"String_Node_Str\";\n variablesCombo.add(output);\n }\n variablesCombo.select(0);\n variablesViewer.setDocument(new Document(getText(variablesCombo.getText())));\n } catch (Exception e) {\n e.printStackTrace();\n MessageDialog.openError(this.getShell(), \"String_Node_Str\", \"String_Node_Str\" + e.getLocalizedMessage());\n }\n}\n"
"private KProgressHUD showProgressHUD(Integer maskTypeInteger, KProgressHUDStyle style, String status) {\n Context context = this.reactContext.getCurrentActivity();\n if (this.progressHUD == null) {\n this.progressHUD = KProgressHUD.create(context);\n if (this.progressHUD.isShowing()) {\n this.progressHUD.dismiss();\n }\n this.progressHUD = null;\n }\n if (context != null) {\n KProgressHUDMaskType maskType = getMaskTypeForInteger(maskTypeInteger);\n this.progressHUD = KProgressHUD.create(context).setCancellable(getIsCancellableForMaskType(maskType)).setDimAmount(getDimAmountForMaskType(maskType));\n setProgressHUDStyle(context, this.progressHUD, style);\n this.currentStyle = style;\n if (status != null) {\n this.progressHUD.setLabel(status);\n }\n }\n if (style == KProgressHUDStyle.Progress) {\n this.progressHUD.setMaxProgress(100);\n this.progressHUD.setProgress(0);\n }\n return this.progressHUD.show();\n}\n"
"public String getRawText(String locale, String textID) {\n if (locale == null) {\n throw new UnregisteredLocaleException(\"String_Node_Str\" + textID);\n }\n if (locale.equals(currentLocale)) {\n PrefixTreeNode data = currentLocaleData.get(textID);\n return data == null ? null : data.render();\n } else {\n return (String) getLocaleMap(locale).get(textID);\n }\n}\n"
"public void unlockEntry(Object locker) throws IOException {\n if (isArchiveFileAvailable(af)) {\n af.unlockEntry(locker);\n } else {\n throw new IOException(Messages.getString(ResourceConstants.FILE_HAS_BEEN_CLOSED));\n }\n}\n"
"public void queryKeepAliveOnePreExistingObjectsOneNewObject() throws Exception {\n databaseHelper.addObject(RpslObject.parse(\"String_Node_Str\"));\n AsyncNrtmClient client = new AsyncNrtmClient(NrtmServer.getPort(), \"String_Node_Str\", (updateInterval + 1));\n client.start();\n super.databaseHelper.addObject(RpslObject.parse(\"String_Node_Str\"));\n String response = client.end();\n assertThat(response, containsString(\"String_Node_Str\"));\n assertThat(response, containsString(\"String_Node_Str\"));\n}\n"
"public void run() {\n int i = 1;\n boolean imageSaved = false;\n while (i == 1) {\n Image image = null;\n try {\n final CameraFile cf = cameraGphoto.waitForImage();\n if (cf != null) {\n Shooting activeShooting = shootingService.searchIsActive();\n if (activeShooting != null) {\n int imageID = imageService.getNextImageID();\n String directoryPath = activeShooting.getStorageDir() + \"String_Node_Str\" + activeShooting.getId() + \"String_Node_Str\";\n Path storageDir = Paths.get(directoryPath);\n try {\n Files.createDirectory(storageDir);\n LOGGER.info(\"String_Node_Str\", storageDir);\n } catch (FileAlreadyExistsException e) {\n LOGGER.info(\"String_Node_Str\" + e + \"String_Node_Str\");\n } catch (IOException e) {\n LOGGER.error(\"String_Node_Str\" + e.getMessage() + \"String_Node_Str\");\n throw new ServiceException(\"String_Node_Str\" + e.getMessage() + \"String_Node_Str\");\n }\n DateFormat dateFormat = new SimpleDateFormat(\"String_Node_Str\");\n Date date = new Date();\n String imagePath = directoryPath + \"String_Node_Str\" + camera.getId() + \"String_Node_Str\" + dateFormat.format(date) + \"String_Node_Str\";\n image = new Image(imageID, imagePath, activeShooting.getId(), new Date());\n image = imageService.create(image);\n cf.save(new File(imagePath).getAbsolutePath());\n imageSaved = true;\n LOGGER.debug(image.getImageID() + \"String_Node_Str\");\n LOGGER.debug(imageService.getLastImgPath(activeShooting.getId()));\n } else {\n LOGGER.debug(\"String_Node_Str\");\n }\n cf.close();\n }\n } catch (CameraException ex) {\n LOGGER.debug(\"String_Node_Str\");\n } catch (ServiceException ex) {\n LOGGER.debug(\"String_Node_Str\", ex.getMessage());\n }\n if (imageSaved) {\n shotFrameManager.refreshShot(camera.getId(), image.getImagepath());\n }\n imageSaved = false;\n }\n CameraUtils.closeQuietly(cameraGphoto);\n}\n"
"public V getAndReplace(K key, V value) {\n ensureOpen();\n if (value == null) {\n throw new NullPointerException(\"String_Node_Str\" + key);\n }\n long now = System.currentTimeMillis();\n V result;\n lockManager.lock(key);\n try {\n Object internalKey = keyConverter.toInternal(key);\n RICachedValue cachedValue = entries.get(internalKey);\n if (cachedValue == null || cachedValue.isExpiredAt(now)) {\n result = null;\n } else {\n V oldValue = valueConverter.fromInternal(cachedValue.getInternalValue(now));\n RIEntry<K, V> entry = new RIEntry<K, V>(key, value, oldValue);\n writeCacheEntry(entry);\n result = valueConverter.fromInternal(cachedValue.getInternalValue(now));\n try {\n Duration duration = expiryPolicy.getTTLForModifiedEntry(entry, new Duration(now, cachedValue.getExpiryTime()));\n long expiryTime = duration.getAdjustedTime(now);\n cachedValue.setExpiryTime(expiryTime);\n } catch (Throwable t) {\n }\n Object internalValue = valueConverter.toInternal(value);\n cachedValue.setInternalValue(internalValue, now);\n RICacheEventEventDispatcher<K, V> dispatcher = new RICacheEventEventDispatcher<K, V>();\n dispatcher.addEvent(CacheEntryUpdatedListener.class, new RICacheEntryEvent<K, V>(this, key, value, result));\n dispatcher.dispatch(cacheEntryListenerRegistrations.values());\n }\n } finally {\n lockManager.unLock(key);\n }\n if (statisticsEnabled()) {\n if (result != null) {\n statistics.increaseCacheHits(1);\n statistics.increaseCachePuts(1);\n } else {\n statistics.increaseCacheMisses(1);\n }\n }\n return result;\n}\n"
"public void onMediaUploadCancelClicked(String localMediaId, boolean delete) {\n if (!TextUtils.isEmpty(localMediaId)) {\n MediaModel mediaModel = mMediaStore.getMediaWithLocalId(Integer.valueOf(localMediaId));\n if (mediaModel != null) {\n CancelMediaPayload payload = new CancelMediaPayload(mSite, mediaModel);\n mDispatcher.dispatch(MediaActionBuilder.newCancelMediaUploadAction(payload));\n }\n } else {\n ToastUtils.showToast(this, getString(R.string.error_all_media_upload_canceled));\n EventBus.getDefault().post(new PostEvents.PostMediaCanceled(mPost));\n }\n}\n"
"private boolean isResource(String fileOrDirName) {\n if (NON_ASSET_FILENAMES.contains(fileOrDirName.toLowerCase())) {\n return false;\n }\n if (fileOrDirName.charAt(fileOrDirName.length() - 1) == '~') {\n return false;\n }\n String fileOrDirNameWithoutExtension = Files.getNameWithoutExtension(fileOrDirName);\n for (String ignoredMiniAaptExtension : MiniAapt.IGNORED_FILE_EXTENSIONS) {\n if (filesystem.isSameRelativePathIfFileExists(fileOrDir, fileOrDir.resolveSibling(fileOrDirNameWithoutExtension + \"String_Node_Str\" + ignoredMiniAaptExtension))) {\n return false;\n }\n }\n return true;\n}\n"
"protected boolean _transferOutputs(IOPort port) throws IllegalActionException {\n if (!port.isOutput() || !port.isOpaque()) {\n throw new IllegalActionException(this, port, \"String_Node_Str\" + \"String_Node_Str\");\n }\n if (port instanceof RefinementPort) {\n return super._transferOutputs(port);\n }\n boolean result = false;\n Time physicalTime = getPhysicalTime();\n int compare = 0;\n while (true) {\n if (_realTimeOutputEventQueue.isEmpty()) {\n break;\n }\n RealTimeEvent tokenEvent = (RealTimeEvent) _realTimeOutputEventQueue.peek();\n compare = tokenEvent.deliveryTime.compareTo(physicalTime);\n if (compare > 0) {\n break;\n } else if (compare == 0) {\n if (_isNetworkPort(tokenEvent.port)) {\n throw new IllegalActionException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n _realTimeOutputEventQueue.poll();\n tokenEvent.port.send(tokenEvent.channel, tokenEvent.token);\n if (_debugging) {\n _debug(getName(), \"String_Node_Str\" + tokenEvent.token + \"String_Node_Str\" + tokenEvent.port.getName());\n }\n result = true;\n } else if (compare < 0) {\n throw new IllegalActionException(tokenEvent.port, \"String_Node_Str\" + tokenEvent.deliveryTime + \"String_Node_Str\" + physicalTime);\n }\n }\n if (_isNetworkPort(port) || _transferImmediately(port)) {\n while (true) {\n if (!super._transferOutputs(port)) {\n break;\n } else {\n result = true;\n }\n }\n }\n compare = _currentTime.compareTo(physicalTime);\n if (compare == 0) {\n result = result || super._transferOutputs(port);\n } else if (compare < 0) {\n for (int i = 0; i < port.getWidthInside(); i++) {\n if (port.hasTokenInside(i)) {\n throw new IllegalActionException(port, \"String_Node_Str\" + \"String_Node_Str\" + _currentTime + \"String_Node_Str\" + physicalTime);\n }\n }\n } else {\n for (int i = 0; i < port.getWidthInside(); i++) {\n try {\n if (port.hasTokenInside(i)) {\n Token t = port.getInside(i);\n RealTimeEvent tokenEvent = new RealTimeEvent(port, i, t, _currentTime);\n _realTimeOutputEventQueue.add(tokenEvent);\n Actor container = (Actor) getContainer();\n container.getExecutiveDirector().fireAt((Actor) container, _currentTime);\n }\n } catch (NoTokenException ex) {\n throw new InternalErrorException(this, ex, null);\n }\n }\n }\n return result;\n}\n"
"public <T extends Record> OutputGate<T> createAndRegisterOutputGate(final ChannelSelector<T> selector, final boolean isBroadcast) {\n if (this.unboundOutputGates == null) {\n final RuntimeOutputGate<T> rog = new RuntimeOutputGate<T>(getJobID(), null, getNumberOfOutputGates(), ChannelType.NETWORK, CompressionLevel.NO_COMPRESSION, selector, isBroadcast, null);\n this.outputGates.add(rog);\n return rog;\n }\n final GateDeploymentDescriptor gdd = this.unboundOutputGates.poll();\n if (gdd == null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n RecordSerializerFactory<T> serializerFactory;\n if (gdd.spanningRecordsAllowed()) {\n serializerFactory = new SpanningRecordSerializerFactory<T>();\n } else {\n serializerFactory = new DefaultRecordSerializerFactory<T>();\n }\n return new RuntimeOutputGate<T>(getJobID(), gdd.getGateID(), getNumberOfInputGates(), gdd.getChannelType(), gdd.getCompressionLevel(), selector, isBroadcast, serializerFactory);\n}\n"
"public int execute(StratosCommandContext context, String[] args) throws CommandException {\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\", getName());\n }\n if ((args == null) || (args.length <= 0)) {\n context.getStratosApplication().printUsage(getName());\n return CliConstants.COMMAND_FAILED;\n }\n try {\n CommandLineParser parser = new GnuParser();\n CommandLine commandLine = parser.parse(options, args);\n Options opts = mergeOptionArrays(already_parsed_opts, commandLine.getOptions());\n if ((opts.hasOption(CliConstants.RESOURCE_PATH)) && (opts.hasOption(CliConstants.CLUSTER_ID_OPTION))) {\n String clusterId = opts.getOption(CliConstants.CLUSTER_ID_OPTION).getValue();\n if (clusterId == null) {\n context.getStratosApplication().printUsage(getName());\n return CliConstants.COMMAND_FAILED;\n }\n String resourcePath = commandLine.getOptionValue(CliConstants.RESOURCE_PATH);\n if (resourcePath == null) {\n context.getStratosApplication().printUsage(getName());\n return CliConstants.COMMAND_FAILED;\n }\n String resourceFileContent = CliUtils.readResource(resourcePath);\n RestCommandLineService.getInstance().addKubernetesHost(resourceFileContent, clusterId);\n return CliConstants.COMMAND_SUCCESSFULL;\n } else {\n context.getStratosApplication().printUsage(getName());\n return CliConstants.COMMAND_FAILED;\n }\n } catch (ParseException e) {\n logger.error(\"String_Node_Str\", e);\n System.out.println(e.getMessage());\n return CliConstants.COMMAND_FAILED;\n } catch (IOException e) {\n System.out.println(\"String_Node_Str\");\n return CliConstants.COMMAND_FAILED;\n } catch (Exception e) {\n String message = \"String_Node_Str\" + e.getMessage();\n System.out.println(message);\n logger.error(message, e);\n return CliConstants.COMMAND_FAILED;\n }\n}\n"
"public void testCrossReferencesMmCifAlignSeqRes() throws IOException, StructureException {\n AtomCache cache = new AtomCache();\n cache.setUseMmCif(true);\n FileParsingParameters params = new FileParsingParameters();\n params.setAlignSeqRes(true);\n cache.setFileParsingParams(params);\n StructureIO.setAtomCache(cache);\n Structure structure = StructureIO.getStructure(PDBCODE1);\n System.out.println(\"String_Node_Str\");\n doFullTest(structure);\n}\n"
"public void testSingleFifo() throws Exception {\n QueueName queueName = QueueName.fromFlowlet(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n final HBaseQueueClient queueClient = new HBaseQueueClient(HBaseTestBase.getHBaseAdmin(), \"String_Node_Str\", queueName);\n final int count = 5000;\n LOG.info(\"String_Node_Str\", count);\n Stopwatch stopwatch = new Stopwatch();\n stopwatch.start();\n for (int i = 0; i < count; i++) {\n Transaction transaction = opex.start();\n try {\n byte[] queueData = Bytes.toBytes(i);\n queueClient.startTx(transaction);\n queueClient.enqueue(new QueueEntry(queueData));\n if (opex.canCommit(transaction, queueClient.getTxChanges()) && queueClient.commitTx()) {\n if (!opex.commit(transaction)) {\n queueClient.rollbackTx();\n }\n }\n } catch (Exception e) {\n opex.abort(transaction);\n throw Throwables.propagate(e);\n }\n }\n long elapsed = stopwatch.elapsedTime(TimeUnit.MILLISECONDS);\n LOG.info(\"String_Node_Str\", count, elapsed);\n LOG.info(\"String_Node_Str\", (double) count * 1000 / elapsed);\n final int expectedSum = (count / 2 * (count - 1));\n final AtomicInteger valueSum = new AtomicInteger();\n final int consumerSize = 3;\n final CyclicBarrier startBarrier = new CyclicBarrier(consumerSize + 1);\n final CountDownLatch completeLatch = new CountDownLatch(consumerSize);\n ExecutorService executor = Executors.newFixedThreadPool(consumerSize);\n for (int i = 0; i < consumerSize; i++) {\n final int instanceId = i;\n executor.submit(new Runnable() {\n public void run() {\n try {\n startBarrier.await();\n QueueConsumer consumer = queueClient.createConsumer(new ConsumerConfig(0, instanceId, consumerSize, DequeueStrategy.FIFO, null));\n TransactionAware txAware = (TransactionAware) consumer;\n Stopwatch stopwatch = new Stopwatch();\n stopwatch.start();\n int dequeueCount = 0;\n while (valueSum.get() != expectedSum) {\n Transaction transaction = opex.start();\n txAware.startTx(transaction);\n try {\n DequeueResult result = consumer.dequeue();\n if (opex.canCommit(transaction, queueClient.getTxChanges()) && txAware.commitTx()) {\n if (!opex.commit(transaction)) {\n txAware.rollbackTx();\n }\n }\n if (result.isEmpty()) {\n continue;\n }\n byte[] data = result.getData().iterator().next();\n valueSum.addAndGet(Bytes.toInt(data));\n dequeueCount++;\n } catch (Exception e) {\n opex.abort(transaction);\n throw Throwables.propagate(e);\n }\n }\n long elapsed = stopwatch.elapsedTime(TimeUnit.MILLISECONDS);\n LOG.info(\"String_Node_Str\", dequeueCount, elapsed);\n LOG.info(\"String_Node_Str\", (double) dequeueCount * 1000 / elapsed);\n completeLatch.countDown();\n } catch (Exception e) {\n LOG.error(e.getMessage(), e);\n }\n }\n });\n }\n startBarrier.await();\n Assert.assertTrue(completeLatch.await(40, TimeUnit.SECONDS));\n TimeUnit.SECONDS.sleep(2);\n Assert.assertEquals(expectedSum, valueSum.get());\n executor.shutdownNow();\n}\n"
"public void createPartControl(Composite parent) {\n Composite comp = new Composite(parent, SWT.NONE);\n comp.setLayout(new FillLayout());\n ScrolledComposite scomp = new ScrolledComposite(comp, SWT.H_SCROLL | SWT.V_SCROLL);\n scomp.setLayout(new FillLayout());\n Composite composite = new Composite(scomp, SWT.NONE);\n composite.setLayout(new GridLayout());\n composite.setLayoutData(new GridData(GridData.FILL_BOTH));\n scomp.setExpandHorizontal(true);\n scomp.setExpandVertical(true);\n scomp.setMinWidth(400);\n scomp.setMinHeight(350);\n scomp.setContent(composite);\n gContainer = new Group(composite, SWT.NONE);\n gContainer.setText(DefaultMessagesImpl.getString(\"String_Node_Str\"));\n GridLayout layout = new GridLayout(2, false);\n GridData data = new GridData(GridData.FILL_BOTH);\n gContainer.setLayout(layout);\n gContainer.setLayoutData(data);\n if (switchFlag) {\n tContainer = new Group(composite, SWT.NONE);\n tContainer.setText(DefaultMessagesImpl.getString(\"String_Node_Str\"));\n tContainer.setLayout(new GridLayout(2, false));\n tContainer.setLayoutData(new GridData(GridData.FILL_BOTH));\n createExtDefault();\n }\n createDefault();\n getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this);\n}\n"
"public void refreshWidget(QuestionDef question, IAnswerData data, int changeFlags) {\n prompt.setText(question.getLongText());\n updateWidget(question);\n if (data != null && changeFlags == QuestionStateListener.CHANGE_INIT) {\n setWidgetValue(data.getValue());\n }\n}\n"
"public List<LoginModuleConfig> getMemberLoginModuleConfigs() {\n return staticSecurityConfig.getMemberLoginModuleConfigs();\n}\n"
"public void execute(WebScriptRequest req, WebScriptResponse res) throws IOException {\n if (!subscriptionService.isActive()) {\n res.setStatus(404);\n return;\n }\n try {\n String userId = req.getServiceMatch().getTemplateVars().get(\"String_Node_Str\");\n Object obj = executeImpl(userId, req, res);\n if (obj instanceof JSONObject || obj instanceof JSONArray) {\n res.setContentEncoding(Charset.defaultCharset().displayName());\n Writer writer = res.getWriter();\n if (obj instanceof JSONObject) {\n ((JSONObject) obj).write(writer);\n } else {\n ((JSONArray) obj).write(writer);\n }\n writer.flush();\n } else {\n res.setStatus(204);\n }\n } catch (SubscriptionsDisabledException sde) {\n throw new WebScriptException(404, \"String_Node_Str\", sde);\n } catch (NoSuchPersonException nspe) {\n throw new WebScriptException(404, \"String_Node_Str\" + nspe.getUserName() + \"String_Node_Str\", nspe);\n } catch (PrivateSubscriptionListException psle) {\n throw new WebScriptException(403, \"String_Node_Str\", psle);\n } catch (JSONException je) {\n throw new WebScriptException(500, \"String_Node_Str\", je);\n }\n}\n"
"public String toString() {\n StringBuffer sb = new StringBuffer(super.toString());\n sb.append(\"String_Node_Str\");\n if (currentSource != null) {\n for (Animation a : currentSource.modelInstance.animations) {\n sb.append(\"String_Node_Str\").append(a.id);\n }\n if (currentSource.controller.current != null)\n sb.append(\"String_Node_Str\").append(currentSource.controller.current.animation.id);\n }\n if (currentSource.controller.current != null)\n sb.append(\"String_Node_Str\").append(currentSource.controller.current.animation.id);\n sb.append(\"String_Node_Str\");\n return sb.toString();\n}\n"
"public TableDefinition buildCOUNTRYDWELLERTable() {\n TableDefinition table = new TableDefinition();\n table.setName(\"String_Node_Str\");\n FieldDefinition fieldID = new FieldDefinition();\n fieldID.setName(\"String_Node_Str\");\n fieldID.setTypeName(\"String_Node_Str\");\n fieldID.setSize(18);\n fieldID.setSubSize(0);\n fieldID.setIsPrimaryKey(true);\n fieldID.setIsIdentity(true);\n fieldID.setUnique(true);\n fieldID.setShouldAllowNull(false);\n table.addField(fieldID);\n FieldDefinition fieldFNAME = new FieldDefinition();\n fieldFNAME.setName(\"String_Node_Str\");\n fieldFNAME.setTypeName(\"String_Node_Str\");\n fieldFNAME.setSize(20);\n fieldFNAME.setSubSize(0);\n fieldFNAME.setIsPrimaryKey(true);\n fieldFNAME.setIsIdentity(false);\n fieldFNAME.setUnique(true);\n fieldFNAME.setShouldAllowNull(false);\n table.addField(fieldFNAME);\n FieldDefinition fieldLNAME = new FieldDefinition();\n fieldLNAME.setName(\"String_Node_Str\");\n fieldLNAME.setTypeName(\"String_Node_Str\");\n fieldLNAME.setSize(20);\n fieldLNAME.setSubSize(0);\n fieldLNAME.setIsPrimaryKey(true);\n fieldLNAME.setIsIdentity(false);\n fieldLNAME.setUnique(true);\n fieldLNAME.setShouldAllowNull(false);\n table.addField(fieldLNAME);\n FieldDefinition fieldAGE = new FieldDefinition();\n fieldAGE.setName(\"String_Node_Str\");\n fieldAGE.setTypeName(\"String_Node_Str\");\n fieldAGE.setSize(15);\n fieldAGE.setSubSize(0);\n fieldAGE.setIsPrimaryKey(false);\n fieldAGE.setIsIdentity(false);\n fieldAGE.setUnique(false);\n fieldAGE.setShouldAllowNull(false);\n table.addField(fieldAGE);\n FieldDefinition fieldGENDER = new FieldDefinition();\n fieldGENDER.setName(\"String_Node_Str\");\n fieldGENDER.setTypeName(\"String_Node_Str\");\n fieldGENDER.setSize(6);\n fieldGENDER.setSubSize(0);\n fieldGENDER.setIsPrimaryKey(false);\n fieldGENDER.setIsIdentity(false);\n fieldGENDER.setUnique(false);\n fieldGENDER.setShouldAllowNull(true);\n table.addField(fieldGENDER);\n FieldDefinition fieldWORLDID = new FieldDefinition();\n fieldWORLDID.setName(\"String_Node_Str\");\n fieldWORLDID.setTypeName(\"String_Node_Str\");\n fieldWORLDID.setSize(18);\n fieldWORLDID.setSubSize(0);\n fieldWORLDID.setIsPrimaryKey(false);\n fieldWORLDID.setIsIdentity(false);\n fieldWORLDID.setUnique(false);\n fieldWORLDID.setShouldAllowNull(true);\n fieldWORLDID.setForeignKeyFieldName(\"String_Node_Str\");\n table.addField(fieldWORLDID);\n return table;\n}\n"
"public void notifyChildrenChanged(ViewGroup hostView) {\n if (mIsExpansionChanging) {\n hostView.post(new Runnable() {\n public void run() {\n updateFirstChildHeightWhileExpanding(hostView);\n }\n });\n }\n}\n"
"protected void processSerializationAnnotations(final Set<SerializationAnnotation> serializationAnnotations, final Map<SerializationProperty, String> serializationProperties) {\n for (SerializationAnnotation serializationAnnotation : serializationAnnotations) {\n if (serializationAnnotation instanceof MethodAnnotation) {\n final String methodProp = ((MethodAnnotation) serializationAnnotation).getMethod();\n serializationProperties.put(SerializationProperty.METHOD, methodProp);\n SupportedMethod method = null;\n try {\n method = (methodProp == null ? SupportedMethod.xml : SupportedMethod.valueOf(methodProp));\n } catch (final IllegalArgumentException iae) {\n System.out.println(iae.getMessage());\n }\n if (method != null) {\n if (method.equals(SupportedMethod.xml) || method.equals(SupportedMethod.xhtml)) {\n serializationProperties.put(SerializationProperty.MEDIA_TYPE, getDefaultContentType());\n } else if (method.equals(SupportedMethod.html) || method.equals(SupportedMethod.html5)) {\n serializationProperties.put(SerializationProperty.MEDIA_TYPE, InternetMediaType.TEXT_HTML.getMediaType() + \"String_Node_Str\" + getDefaultEncoding());\n } else if (method.equals(SupportedMethod.json)) {\n serializationProperties.put(SerializationProperty.MEDIA_TYPE, InternetMediaType.APPLICATION_JSON.getMediaType() + \"String_Node_Str\" + getDefaultEncoding());\n }\n }\n } else if (serializationAnnotation instanceof MediaTypeAnnotation) {\n final String mediaType = ((MediaTypeAnnotation) serializationAnnotation).getMediaType();\n serializationProperties.put(SerializationProperty.MEDIA_TYPE, mediaType);\n }\n }\n}\n"
"public void specificCopy() throws Exception {\n logger.debug(\"String_Node_Str\");\n LinkedList<MultiURI> targetURIs = tgtLoc.getURIs();\n LinkedList<URI> selectedTargetURIs = new LinkedList<URI>();\n for (MultiURI uri : targetURIs) {\n URI internalURI = (URI) uri.getInternalURI(GATAdaptor.ID);\n if (internalURI != null) {\n selectedTargetURIs.add(internalURI);\n }\n }\n if (selectedTargetURIs.isEmpty()) {\n throw new GATCopyException(ERR_NO_TGT_URI);\n }\n LinkedList<MultiURI> sourceURIs;\n LinkedList<URI> selectedSourceURIs = new LinkedList<URI>();\n synchronized (srcData) {\n if (srcLoc != null) {\n sourceURIs = srcLoc.getURIs();\n for (MultiURI uri : sourceURIs) {\n URI internalURI = (URI) uri.getInternalURI(GATAdaptor.ID);\n if (internalURI != null) {\n selectedSourceURIs.add(internalURI);\n }\n }\n }\n sourceURIs = srcData.getURIs();\n for (MultiURI uri : sourceURIs) {\n URI internalURI = (URI) uri.getInternalURI(GATAdaptor.ID);\n if (internalURI != null) {\n selectedSourceURIs.add(internalURI);\n }\n }\n if (selectedSourceURIs.isEmpty()) {\n if (srcData.isInMemory()) {\n try {\n srcData.writeToStorage();\n sourceURIs = srcData.getURIs();\n for (MultiURI uri : sourceURIs) {\n URI internalURI = (URI) uri.getInternalURI(GATAdaptor.ID);\n if (internalURI != null) {\n selectedSourceURIs.add(internalURI);\n }\n }\n } catch (Exception e) {\n logger.fatal(\"String_Node_Str\", e);\n throw new GATCopyException(ERR_NO_SRC_URI);\n }\n } else {\n throw new GATCopyException(ERR_NO_SRC_URI);\n }\n }\n }\n GATInvocationException exception = new GATInvocationException(\"String_Node_Str\");\n for (URI src : selectedSourceURIs) {\n for (URI tgt : selectedTargetURIs) {\n try {\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\" + src + \"String_Node_Str\" + tgt);\n }\n URI gatSrc = new URI(DataLocation.Protocol.ANY_URI.getSchema() + src.getHost() + \"String_Node_Str\" + src.getPath());\n URI gatTgt = new URI(DataLocation.Protocol.ANY_URI.getSchema() + tgt.getHost() + \"String_Node_Str\" + tgt.getPath());\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\" + gatSrc + \"String_Node_Str\" + gatTgt);\n }\n doCopy(gatSrc, gatTgt);\n } catch (Exception e) {\n exception.add(\"String_Node_Str\", e);\n continue;\n }\n return;\n }\n }\n if (!(this.reason instanceof WorkersDebugInfoCopyTransferable)) {\n ErrorManager.error(\"String_Node_Str\" + srcData.getName() + \"String_Node_Str\", exception);\n }\n throw exception;\n}\n"
"protected void updateIndex(IContent content) throws IOException {\n long index = cntOffset;\n long parent = -1;\n long previous = -1;\n IContent pContent = (IContent) content.getParent();\n if (pContent != null) {\n pDocExt = (DocumentExtension) pContent.getExtension(IContent.DOCUMENT_EXTENSION);\n if (pDocExt != null) {\n parent = pDocExt.getIndex();\n long lastChild = pDocExt.getLastChild();\n if (lastChild != -1) {\n previous = lastChild;\n }\n pDocExt.setLastChild(index);\n } else {\n previous = rootOffset;\n rootOffset = index;\n }\n } else {\n previous = rootOffset;\n rootOffset = index;\n }\n DocumentExtension docExt = new DocumentExtension(index);\n docExt.setParent(parent);\n docExt.setPrevious(previous);\n content.setExtension(IContent.DOCUMENT_EXTENSION, docExt);\n cntStream.seek(VERSION_SIZE + index);\n cntStream.writeLong(parent);\n cntStream.writeLong(-1);\n cntStream.writeLong(-1);\n cntOffset += INDEX_ENTRY_SIZE;\n if (previous == -1) {\n if (parent != -1) {\n cntStream.seek(VERSION_SIZE + parent + OFFSET_CHILD);\n cntStream.writeLong(index);\n }\n } else {\n cntStream.seek(VERSION_SIZE + previous + OFFSET_NEXT);\n cntStream.writeLong(index);\n }\n}\n"
"private Wallet restoreWalletFromSnapshot() throws FileNotFoundException {\n try {\n final Wallet wallet = readKeys(getAssets().open(Constants.WALLET_KEY_BACKUP_SNAPSHOT));\n System.out.println(\"String_Node_Str\" + Constants.WALLET_KEY_BACKUP_SNAPSHOT + \"String_Node_Str\");\n return wallet;\n } catch (final FileNotFoundException x) {\n throw x;\n } catch (final IOException x) {\n throw new RuntimeException(x);\n }\n}\n"
"public void suspending() {\n executor.execute(new Runnable() {\n public void run() {\n listener.suspending();\n }\n }, \"String_Node_Str\");\n}\n"
"public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase living, ItemStack stack) {\n TileEntity aTile = world.getTileEntity(x, y, z);\n if (aTile instanceof TileTesseract) {\n TileTesseract tile = (TileTesseract) world.getTileEntity(x, y, z);\n tile.removeFromRegistry();\n tile.modeItem = stack.stackTagCompound.getByte(\"String_Node_Str\");\n tile.modeFluid = stack.stackTagCompound.getByte(\"String_Node_Str\");\n tile.modeEnergy = stack.stackTagCompound.getByte(\"String_Node_Str\");\n tile.frequency = stack.stackTagCompound.getInteger(\"String_Node_Str\");\n tile.isActive = tile.frequency != -1;\n tile.addToRegistry();\n tile.sendDescPacket();\n }\n super.onBlockPlacedBy(world, x, y, z, living, stack);\n}\n"
"public Anchor getInstanceLink(InstanceType type, String name) {\n ConfigLink config = new ConfigLink();\n config.setClusterId(clusterId);\n config.setType(type == null ? \"String_Node_Str\" : type.toString());\n config.setName(name);\n Anchor anchor = createLink(name, config);\n return anchor;\n}\n"
"private void importItemRecordsWithRelations(final IProgressMonitor monitor, final ResourcesManager manager, final List<ImportItem> processingItemRecords, final boolean overwriting, ImportItem[] allPopulatedImportItemRecords, IPath destinationPath, final Set<String> overwriteDeletedItems, final Set<String> idDeletedBeforeImport) throws Exception {\n for (ImportItem itemRecord : processingItemRecords) {\n if (monitor.isCanceled()) {\n return;\n }\n if (itemRecord.isImported()) {\n return;\n }\n try {\n final IImportItemsHandler importHandler = itemRecord.getImportHandler();\n if (importHandler != null && itemRecord.isValid()) {\n List<ImportItem> relatedItemRecord = importHandler.findRelatedImportItems(monitor, manager, itemRecord, allPopulatedImportItemRecords);\n if (importHandler.isPriorImportRelatedItem()) {\n if (!relatedItemRecord.isEmpty()) {\n importItemRecordsWithRelations(monitor, manager, relatedItemRecord, overwriting, allPopulatedImportItemRecords, destinationPath, overwriteDeletedItems, idDeletedBeforeImport);\n }\n }\n }\n if (monitor.isCanceled()) {\n return;\n }\n importHandler.doImport(monitor, manager, itemRecord, overwriting, destinationPath, overwriteDeletedItems, idDeletedBeforeImport);\n if (monitor.isCanceled()) {\n return;\n }\n if (!importHandler.isPriorImportRelatedItem()) {\n if (!relatedItemRecord.isEmpty()) {\n importItemRecordsWithRelations(monitor, manager, relatedItemRecord, overwriting, allPopulatedImportItemRecords, destinationPath, overwriteDeletedItems, idDeletedBeforeImport);\n }\n }\n importHandler.afterImportingItems(monitor, manager, itemRecord);\n ImportCacheHelper.getInstance().getImportedItemRecords().add(itemRecord);\n monitor.worked(1);\n }\n }\n}\n"
"private void toolbarPreferencesButtonActionPerformed(java.awt.event.ActionEvent evt) {\n PreferencesDialog pd = new PreferencesDialog(this, true);\n pd.setJDBCConnectionUrl(jdbcConnectionUrl);\n pd.setJDBCDriverClassName(jdbcDriverClassName);\n pd.setJDBCUsername(jdbcUsername);\n pd.setJDBCPassword(jdbcPassword);\n pd.setVisible(true);\n if (pd.accepted()) {\n jdbcConnectionUrl = pd.getJDBCConnectionUrl();\n jdbcDriverClassName = pd.getJDBCDriverClassName();\n jdbcUsername = pd.getJDBCUsername();\n jdbcPassword = pd.getJDBCPassword();\n workbenchProperties.setProperty(\"String_Node_Str\", jdbcDriverClassName);\n workbenchProperties.setProperty(\"String_Node_Str\", jdbcConnectionUrl);\n workbenchProperties.setProperty(\"String_Node_Str\", jdbcUsername);\n workbenchProperties.setProperty(\"String_Node_Str\", jdbcPassword);\n }\n}\n"