content
stringlengths
40
137k
"private void executeSendAllUnsentCommand() {\n Enumeration en = this.models.elements();\n Vector unsent = new Vector();\n while (en.hasMoreElements()) {\n DataModelTreeMetaData data = (DataModelTreeMetaData) en.nextElement();\n DataModelTree model = new DataModelTree();\n ITransportManager tm = JavaRosaServiceProvider.instance().getTransportManager();\n try {\n this.dataModelRMSUtility.retrieveFromRMS(data.getRecordId(), model);\n } catch (IOException e) {\n handleModelRetrieveException(e);\n return;\n } catch (DeserializationException e) {\n handleModelRetrieveException(e);\n return;\n }\n if (TransportMessage.STATUS_DELIVERED == tm.getModelDeliveryStatus(data.getRecordId(), true)) {\n } else {\n XFormSerializingVisitor visitor = new XFormSerializingVisitor();\n IDataPayload payload;\n try {\n payload = visitor.createSerializedPayload(model);\n unsent.addElement(payload);\n } catch (IOException e) {\n System.out.println(\"String_Node_Str\" + model.getId());\n e.printStackTrace();\n }\n }\n }\n if (unsent.size() > 0) {\n Hashtable formSendArgs = new Hashtable();\n formSendArgs.put(returnKey, CMD_SEND_ALL_UNSENT);\n formSendArgs.put(\"String_Node_Str\", unsent);\n this.parent.returnFromActivity(this, Constants.ACTIVITY_NEEDS_RESOLUTION, formSendArgs);\n } else {\n initView();\n }\n}\n"
"public void handleChannelEvent(IChannelEvent event) {\n if (event instanceof IChannelMessageEvent) {\n setEditorEditable(false);\n Activator.getDefault().setListenerActive(false);\n IChannelMessageEvent msg = (IChannelMessageEvent) event;\n ByteArrayInputStream bins = new ByteArrayInputStream(msg.getData());\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(bins);\n EditorChangeMessage message = (EditorChangeMessage) ois.readObject();\n appendLocallyFromRemote(message);\n } catch (IOException e) {\n Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0, e.getLocalizedMessage(), e));\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } finally {\n setEditorEditable(true);\n Activator.getDefault().setListenerActive(true);\n }\n }\n}\n"
"public void performClose() {\n if (this.prune != null) {\n BasicNetwork network = this.prune.getBestNetwork();\n if (network != null) {\n if (EncogWorkBench.askQuestion(\"String_Node_Str\", \"String_Node_Str\")) {\n if (network != null) {\n collection.add(name, network);\n collection.save();\n EncogWorkBench.getInstance().refresh();\n }\n }\n }\n }\n}\n"
"public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {\n if (cmd.getName().equalsIgnoreCase(\"String_Node_Str\")) {\n if (args.length == 0) {\n sender.sendMessage(\"String_Node_Str\");\n sender.sendMessage(\"String_Node_Str\");\n sender.sendMessage(\"String_Node_Str\");\n sender.sendMessage(\"String_Node_Str\");\n return true;\n } else if ((args.length == 1) && args[0].equalsIgnoreCase(\"String_Node_Str\")) {\n sender.sendMessage(\"String_Node_Str\" + plugin.getDescription().getName() + \"String_Node_Str\" + plugin.getDescription().getVersion());\n return true;\n } else if ((args.length == 1) && args[0].equalsIgnoreCase(\"String_Node_Str\")) {\n Motd = this.plugin.Motd;\n port = this.plugin.port;\n sender.sendMessage(\"String_Node_Str\" + Motd);\n sender.sendMessage(\"String_Node_Str\" + port);\n return true;\n } else if ((args.length == 1) && args[0].equalsIgnoreCase(\"String_Node_Str\")) {\n sender.sendMessage(\"String_Node_Str\");\n sender.sendMessage(\"String_Node_Str\");\n return true;\n }\n }\n return false;\n}\n"
"protected void setlinkStyle(StyleEntry entry, HyperlinkDef link) {\n if (link != null) {\n Color color = link.getColor();\n if (color != null) {\n entry.setProperty(StyleConstant.COLOR_PROP, color);\n } else {\n entry.setProperty(StyleConstant.COLOR_PROP, StyleConstant.HYPERLINK_COLOR);\n }\n entry.setProperty(StyleConstant.TEXT_UNDERLINE_PROP, true);\n entry.setName(StyleEntry.ENTRYNAME_HYPERLINK);\n }\n}\n"
"protected void setUp() throws Exception {\n applicationContext = ApplicationContextHelper.getApplicationContext();\n repositoryHelper = (Repository) this.applicationContext.getBean(\"String_Node_Str\");\n ApplicationContextFactory fileServers = (ApplicationContextFactory) this.applicationContext.getBean(\"String_Node_Str\");\n cifsHelper = (CifsHelper) fileServers.getApplicationContext().getBean(\"String_Node_Str\");\n driver = (ContentDiskDriver) fileServers.getApplicationContext().getBean(\"String_Node_Str\");\n mlAwareNodeService = (NodeService) this.applicationContext.getBean(\"String_Node_Str\");\n nodeService = (NodeService) applicationContext.getBean(\"String_Node_Str\");\n transactionService = (TransactionService) applicationContext.getBean(\"String_Node_Str\");\n contentService = (ContentService) applicationContext.getBean(\"String_Node_Str\");\n ruleService = (RuleService) applicationContext.getBean(\"String_Node_Str\");\n actionService = (ActionService) this.applicationContext.getBean(\"String_Node_Str\");\n assertNotNull(\"String_Node_Str\", driver);\n assertNotNull(\"String_Node_Str\", repositoryHelper);\n assertNotNull(\"String_Node_Str\", mlAwareNodeService);\n assertNotNull(\"String_Node_Str\", nodeService);\n assertNotNull(\"String_Node_Str\", transactionService);\n assertNotNull(\"String_Node_Str\", contentService);\n assertNotNull(\"String_Node_Str\", ruleService);\n assertNotNull(\"String_Node_Str\", actionService);\n AuthenticationUtil.setRunAsUserSystem();\n RetryingTransactionCallback<Void> removeRootCB = new RetryingTransactionCallback<Void>() {\n public Void execute() throws Throwable {\n NodeRef companyHome = repositoryHelper.getCompanyHome();\n NodeRef rootNode = nodeService.getChildByName(companyHome, ContentModel.ASSOC_CONTAINS, TEST_ROOT_PATH);\n if (rootNode != null) {\n logger.debug(\"String_Node_Str\");\n nodeService.deleteNode(rootNode);\n }\n return null;\n }\n };\n final RetryingTransactionHelper tran = transactionService.getRetryingTransactionHelper();\n tran.doInTransaction(removeRootCB, false, true);\n}\n"
"public void setIsExpanded(boolean isExpanded) {\n if (isExpanded != mIsExpanded) {\n mIsExpanded = isExpanded;\n if (isExpanded) {\n releaseAllToShade();\n }\n }\n}\n"
"public void updateState(MachineState state, List<Move> moves) {\n if (savedState == null || state != savedState) {\n for (Proposition p : basePropositions.values()) {\n p.setValue(false);\n }\n for (GdlSentence s : state.getContents()) {\n basePropositions.get(s.toTerm()).setValue(true);\n }\n }\n for (Proposition p : inputPropositions.values()) {\n p.setValue(false);\n }\n if (moves != null) {\n List<GdlTerm> does = toDoes(moves);\n for (GdlTerm term : does) {\n Proposition p = inputPropositions.get(term);\n p.setValue(true);\n }\n }\n initProposition.setValue(false);\n for (Proposition p : ordering) {\n if (p.getInputs().size() == 1) {\n p.setValue(p.getSingleInput().getValue());\n }\n }\n if (moves != null)\n savedState = null;\n else\n savedState = state;\n}\n"
"public IntLongEntry next() {\n entry.i++;\n return entry;\n}\n"
"protected void setStatus(CellStatus status, boolean increasing) {\n super.setStatus(status, increasing);\n if (status == CellStatus.INACTIVE && increasing) {\n AppConventionalMessageReceiver mr = new AppConventionalMessageReceiver();\n channel.addMessageReceiver(AppConventionalCellSetConnectionInfoMessage.class, mr);\n channel.addMessageReceiver(AppConventionalCellAppExittedMessage.class, mr);\n } else if (status == CellStatus.INACTIVE && !increasing) {\n channel.removeMessageReceiver(AppConventionalCellSetConnectionInfoMessage.class);\n channel.removeMessageReceiver(AppConventionalCellAppExittedMessage.class);\n }\n if (status == CellStatus.ACTIVE) {\n if (increasing) {\n cellRendererExists = true;\n } else {\n if (connectionInfo != null) {\n logger.info(\"String_Node_Str\");\n startTheSlave(connectionInfo);\n }\n }\n appStarted = true;\n }\n}\n"
"private void move(boolean separateStacks, boolean drop) throws Exception {\n int toIndex = -1;\n synchronized (this) {\n toIndex = getNextIndex(separateStacks, drop);\n if (toIndex != -1) {\n switch(shortcutType) {\n case MOVE_ONE_STACK:\n {\n vv slot = container.getSlot(fromSection, fromIndex);\n if (fromSection != InvTweaksContainerSection.CRAFTING_OUT) {\n boolean canStillMove = true;\n while (hasStack(slot) && toIndex != -1 && canStillMove) {\n canStillMove = container.move(fromSection, fromIndex, toSection, toIndex);\n toIndex = getNextIndex(separateStacks, drop);\n }\n } else {\n container.move(fromSection, fromIndex, toSection, toIndex);\n toIndex = getNextIndex(separateStacks, drop);\n }\n break;\n }\n case MOVE_ONE_ITEM:\n {\n container.moveSome(fromSection, fromIndex, toSection, toIndex, 1);\n break;\n }\n case MOVE_ALL_ITEMS:\n {\n dk stackToMatch = copy(fromStack);\n moveAll(fromSection, toSection, separateStacks, drop, stackToMatch);\n if (fromSection == InvTweaksContainerSection.INVENTORY_NOT_HOTBAR && toSection == InvTweaksContainerSection.CHEST) {\n moveAll(InvTweaksContainerSection.INVENTORY_HOTBAR, toSection, separateStacks, drop, stackToMatch);\n }\n }\n }\n }\n }\n}\n"
"public synchronized void launchWorkflow(SecretProviderConfigurationAndCredentials secretProviderConfigurationAndCredentials, String applicationEnvironmentId, String workflowName, Map<String, Object> params, IPaaSCallback<?> iPaaSCallback) {\n Deployment deployment = deploymentService.getActiveDeploymentOrFail(applicationEnvironmentId);\n DeploymentTopology deploymentTopology = deploymentRuntimeStateService.getRuntimeTopologyFromEnvironment(deployment.getEnvironmentId());\n IOrchestratorPlugin orchestratorPlugin = orchestratorPluginService.getOrFail(deployment.getOrchestratorId());\n final DeploymentTopology topology = alienMonitorDao.findById(DeploymentTopology.class, deployment.getId());\n Map<String, String> locationIds = TopologyLocationUtils.getLocationIds(topology);\n Map<String, Location> locations = deploymentTopologyService.getLocations(locationIds);\n PaaSDeploymentContext deploymentContext = new PaaSDeploymentContext(deployment, deploymentTopology, secretProviderService.generateSecretConfiguration(locations, secretProviderConfigurationAndCredentials.getSecretProviderConfiguration().getPluginName(), secretProviderConfigurationAndCredentials.getCredentials()));\n orchestratorPlugin.launchWorkflow(deploymentContext, workflowName, params, iPaaSCallback);\n}\n"
"private void populateNestedXMLDataMappingColumns() {\n if (!isNotNestedXMLTable) {\n for (int i = 0; i < namesOfCachedColumns.length; i++) {\n for (int j = 0; j < namesOfColumns.length; j++) {\n if (namesOfCachedColumns[i].equals(namesOfColumns[j])) {\n cachedResultSet[cachedResultSetRowNo][j] = this.spNestedQueryHelper.getNestedColumnValue(namesOfCachedColumns[i], path);\n }\n }\n }\n }\n}\n"
"private void updateBlobWithUpdateBinaryStream(ResultSet rs) throws SQLException {\n Blob b;\n byte[] value, expectedValue;\n String blobData = \"String_Node_Str\";\n String updatedBlobData = \"String_Node_Str\";\n b = rs.getBlob(2);\n value = b.getBytes(1, blobData.length() + 1);\n expectedValue = (blobData + rs.getInt(1)).getBytes(\"String_Node_Str\");\n assertTrue(\"String_Node_Str\", Arrays.equals(value, expectedValue));\n value = (updatedBlobData + rs.getInt(1)).getBytes();\n InputStream updateValue = new ByteArrayInputStream(value);\n rs.updateBinaryStream(2, updateValue, value.length);\n rs.updateRow();\n rs.next();\n rs.previous();\n b = rs.getBlob(2);\n value = b.getBytes(1, updatedBlobData.length() + 1);\n expectedValue = (updatedBlobData + rs.getInt(1)).getBytes();\n assertTrue(\"String_Node_Str\", Arrays.equals(value, expectedValue));\n}\n"
"public void delete() {\n nodeManager.acquireLock(this, LockType.WRITE);\n boolean success = false;\n try {\n ArrayMap<Integer, PropertyData> skipMap = nodeManager.getCowPropertyRemoveMap(this, true);\n ArrayMap<Integer, PropertyData> removedProps = nodeManager.deleteNode(this);\n if (removedProps.size() > 0) {\n for (int index : removedProps.keySet()) {\n skipMap.put(index, removedProps.get(index));\n }\n }\n success = true;\n } finally {\n nodeManager.releaseLock(this, LockType.WRITE);\n if (!success) {\n setRollbackOnly();\n }\n }\n}\n"
"public void onCheckedChanged(CompoundButton view, boolean checked) {\n setVibrate(checked);\n}\n"
"protected Object convertToType(Object value, String type) {\n try {\n if (DesignChoiceConstants.SCALAR_PARAM_TYPE_MULTI_VALUE.equals(paramType)) {\n List<Object> list = new ArrayList<Object>();\n for (String string : values) {\n list.add(convertParameterType(string, type));\n }\n return list.toArray();\n } else {\n if (values.size() == 0) {\n return null;\n }\n return convertParameterType(values.get(0), type);\n }\n } catch (BirtException e) {\n log.log(Level.SEVERE, e.getLocalizedMessage(), e);\n }\n return null;\n}\n"
"public void read(Reader r) {\n BufferedReader in = new BufferedReader(r);\n FormatUtil formatter = new FormatUtil();\n String line = null;\n try {\n Header header = null;\n boolean inHeader = true;\n while ((line = in.readLine()) != null && inHeader) {\n line = line.trim();\n if (\"String_Node_Str\".equals(line)) {\n inHeader = false;\n } else if (line.startsWith(MAJOR_HEADER_PREFIX)) {\n if (header != null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n String className = line.substring(MAJOR_HEADER_PREFIX.length()).trim();\n try {\n header = (Header) loadClass(className).newInstance();\n } catch (Exception e) {\n throw new PicardException(\"String_Node_Str\" + className, e);\n }\n } else if (line.startsWith(MINOR_HEADER_PREFIX)) {\n if (header == null) {\n throw new IllegalStateException(\"String_Node_Str\" + line);\n }\n header.parse(line.substring(MINOR_HEADER_PREFIX.length()));\n this.headers.add(header);\n header = null;\n } else {\n throw new PicardException(\"String_Node_Str\" + line);\n }\n }\n if (line == null) {\n throw new PicardException(\"String_Node_Str\");\n }\n while (!line.startsWith(MAJOR_HEADER_PREFIX)) {\n line = in.readLine().trim();\n }\n if (line.startsWith(METRIC_HEADER)) {\n String className = line.split(SEPARATOR)[1];\n Class<?> type = null;\n try {\n type = loadClass(className);\n } catch (ClassNotFoundException cnfe) {\n throw new PicardException(\"String_Node_Str\" + className, cnfe);\n }\n String[] fieldNames = in.readLine().split(SEPARATOR);\n Field[] fields = new Field[fieldNames.length];\n for (int i = 0; i < fieldNames.length; ++i) {\n try {\n fields[i] = type.getField(fieldNames[i]);\n } catch (Exception e) {\n throw new PicardException(\"String_Node_Str\" + fieldNames[i] + \"String_Node_Str\" + type.getName());\n }\n }\n while ((line = in.readLine()) != null) {\n line = line.trim();\n if (\"String_Node_Str\".equals(line)) {\n break;\n } else {\n String[] values = line.split(SEPARATOR, -1);\n BEAN bean = null;\n try {\n bean = (BEAN) type.newInstance();\n } catch (Exception e) {\n throw new PicardException(\"String_Node_Str\" + type.getName(), e);\n }\n for (int i = 0; i < fields.length; ++i) {\n Object value = null;\n if (values[i] != null && values[i].length() > 0) {\n value = formatter.parseObject(values[i], fields[i].getType());\n }\n try {\n fields[i].set(bean, value);\n } catch (Exception e) {\n throw new PicardException(\"String_Node_Str\" + fields[i].getName() + \"String_Node_Str\" + type.getName(), e);\n }\n }\n this.metrics.add(bean);\n }\n }\n }\n while (line != null && !line.startsWith(MAJOR_HEADER_PREFIX)) {\n line = in.readLine();\n }\n if (line != null && line.startsWith(HISTO_HEADER)) {\n String keyClassName = line.split(SEPARATOR)[1].trim();\n Class<?> keyClass = null;\n try {\n keyClass = loadClass(keyClassName);\n } catch (ClassNotFoundException cnfe) {\n throw new PicardException(\"String_Node_Str\" + keyClassName);\n }\n String[] labels = in.readLine().split(SEPARATOR);\n for (int i = 1; i < labels.length; ++i) {\n this.histograms.add(new Histogram<HKEY>(labels[0], labels[i]));\n }\n while ((line = in.readLine()) != null && !\"String_Node_Str\".equals(line)) {\n String[] fields = line.trim().split(SEPARATOR);\n HKEY key = (HKEY) formatter.parseObject(fields[0], keyClass);\n for (int i = 1; i < fields.length; ++i) {\n double value = formatter.parseDouble(fields[i]);\n this.histograms.get(i - 1).increment(key, value);\n }\n }\n }\n } catch (IOException ioe) {\n throw new PicardException(\"String_Node_Str\", ioe);\n }\n}\n"
"public void onErrorResponse(VolleyError volleyError) {\n AppLog.w(T.READER, \"String_Node_Str\" + actionName + \"String_Node_Str\");\n AppLog.e(T.READER, volleyError);\n if (hasBlogUrl) {\n ReaderBlogTable.setIsFollowedBlogUrl(blogUrl, !isAskingToFollow);\n }\n if (hasBlogId) {\n ReaderPostTable.setFollowStatusForPostsInBlog(blogId, !isAskingToFollow);\n }\n}\n"
"protected void paintComponent(Graphics g) {\n Graphics2D g2d = (Graphics2D) g.create();\n if (icon == null) {\n g2d.drawLine(0, 0, iconWidth, iconWidth);\n g2d.drawLine(0, iconWidth, iconWidth, 0);\n } else {\n Image image = ((ImageIcon) icon).getImage();\n g2d.drawImage(image, 0, 0, Color.WHITE, null);\n g2d.translate(icon.getIconWidth(), 0);\n }\n int iconWidth = icon.getIconWidth();\n g2d.translate(iconWidth, 0);\n super.paintComponent(g2d);\n boolean valueEntered = getText().length() > 0;\n if (!hasFocus() && !valueEntered) {\n g2d.setColor(Color.LIGHT_GRAY);\n FontMetrics fm = g2d.getFontMetrics();\n int x = 2;\n int y = fm.getAscent() + 2;\n g2d.drawString(defaultText, x, y);\n }\n g2d.dispose();\n}\n"
"public void onPageStarted(WebView view, String url, Bitmap favicon) {\n try {\n URI uri = new URI(url);\n String[] segments = uri.getPath().split(\"String_Node_Str\");\n String filename = segments[segments.length - 1];\n currentPage = htmlMap.get(filename);\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n System.out.println(currentPage + \"String_Node_Str\" + url);\n}\n"
"protected void repOk() {\n if (!DEBUG)\n return;\n Assert.that(buckets.size() == incompletes.size());\n Assert.that(buckets.size() == sha1s.length);\n for (int i = 0; i < buckets.size(); i++) {\n List bucket = (List) buckets.get(i);\n File tmp1 = (File) incompletes.get(i);\n for (int j = 0; j < bucket.size(); j++) {\n try {\n File tmp2 = incompleteFileManager.getFile((RemoteFileDesc) bucket.get(j));\n Assert.that(tmp1.equals(tmp2));\n } catch (IOException ioe) {\n Assert.that(false, ioe.getMessage());\n }\n }\n }\n for (int i = 0; i < buckets.size(); i++) {\n List bucket = (List) buckets.get(i);\n URN urn1 = sha1s[i];\n for (int j = 0; j < bucket.size(); j++) {\n URN urn2 = ((RemoteFileDesc) bucket.get(j)).getSHA1Urn();\n if (urn2 != null) {\n Assert.that(urn1 != null);\n Assert.that(urn1.equals(urn2));\n }\n }\n }\n}\n"
"public static void main(String[] args) throws TTransportException, IOException, KeeperException, InterruptedException, BlurException {\n int serverIndex = getServerIndex(args);\n LOG.info(\"String_Node_Str\");\n Thread.setDefaultUncaughtExceptionHandler(new SimpleUncaughtExceptionHandler());\n BlurConfiguration configuration = new BlurConfiguration();\n int numberOfBlocksPerBank = 16384;\n int blockSize = BlockDirectory.BLOCK_SIZE;\n int bankCount = configuration.getInt(BLUR_SHARD_BLOCKCACHE_SLAB_COUNT, 1);\n Configuration config = new Configuration();\n BlurMetrics blurMetrics = new BlurMetrics(config);\n boolean directAllocation = configuration.getBoolean(BLUR_SHARD_BLOCKCACHE_DIRECT_MEMORY_ALLOCATION, true);\n int slabSize = numberOfBlocksPerBank * blockSize;\n LOG.info(\"String_Node_Str\", bankCount, directAllocation);\n LOG.info(\"String_Node_Str\", slabSize, bankCount, ((long) bankCount * (long) slabSize));\n BufferStore.init(configuration, blurMetrics);\n BlockCache blockCache;\n try {\n long totalMemory = (long) bankCount * (long) numberOfBlocksPerBank * (long) blockSize;\n blockCache = new BlockCache(blurMetrics, directAllocation, totalMemory, slabSize, blockSize);\n } catch (OutOfMemoryError e) {\n if (\"String_Node_Str\".equals(e.getMessage())) {\n System.err.println(\"String_Node_Str\");\n System.exit(1);\n }\n throw e;\n }\n BlockDirectoryCache cache = new BlockDirectoryCache(blockCache, blurMetrics);\n String bindAddress = configuration.get(BLUR_SHARD_BIND_ADDRESS);\n int bindPort = configuration.getInt(BLUR_SHARD_BIND_PORT, -1);\n bindPort += serverIndex;\n LOG.info(\"String_Node_Str\", serverIndex, bindAddress + \"String_Node_Str\" + bindPort);\n String nodeNameHostName = getNodeName(configuration, BLUR_SHARD_HOSTNAME);\n String nodeName = nodeNameHostName + \"String_Node_Str\" + bindPort;\n String zkConnectionStr = isEmpty(configuration.get(BLUR_ZOOKEEPER_CONNECTION), BLUR_ZOOKEEPER_CONNECTION);\n BlurQueryChecker queryChecker = new BlurQueryChecker(configuration);\n final ZooKeeper zooKeeper = ZkUtils.newZooKeeper(zkConnectionStr);\n try {\n ZookeeperSystemTime.checkSystemTime(zooKeeper, configuration.getLong(BLUR_ZOOKEEPER_SYSTEM_TIME_TOLERANCE, 3000));\n } catch (KeeperException e) {\n if (e.code() == Code.CONNECTIONLOSS) {\n System.err.println(\"String_Node_Str\" + zkConnectionStr + \"String_Node_Str\");\n System.exit(1);\n }\n }\n final ZookeeperClusterStatus clusterStatus = new ZookeeperClusterStatus(zooKeeper);\n final BlurIndexRefresher refresher = new BlurIndexRefresher();\n refresher.init();\n BlurFilterCache filterCache = getFilterCache(configuration);\n BlurIndexWarmup indexWarmup = getIndexWarmup(configuration);\n IndexDeletionPolicy indexDeletionPolicy = new TimeBasedIndexDeletionPolicy(configuration.getLong(BLUR_SHARD_INDEX_DELETION_POLICY_MAXAGE, 60000));\n final DistributedIndexServer indexServer = new DistributedIndexServer();\n indexServer.setBlurMetrics(blurMetrics);\n indexServer.setCache(cache);\n indexServer.setClusterStatus(clusterStatus);\n indexServer.setConfiguration(config);\n indexServer.setNodeName(nodeName);\n indexServer.setRefresher(refresher);\n indexServer.setShardOpenerThreadCount(configuration.getInt(BLUR_SHARD_OPENER_THREAD_COUNT, 16));\n indexServer.setZookeeper(zooKeeper);\n indexServer.setFilterCache(filterCache);\n indexServer.setSafeModeDelay(configuration.getLong(BLUR_SHARD_SAFEMODEDELAY, 60000));\n indexServer.setWarmup(indexWarmup);\n indexServer.setIndexDeletionPolicy(indexDeletionPolicy);\n indexServer.setTimeBetweenCommits(configuration.getLong(BLUR_SHARD_TIME_BETWEEN_COMMITS, 60000));\n indexServer.setTimeBetweenRefreshs(configuration.getLong(BLUR_SHARD_TIME_BETWEEN_REFRESHS, 500));\n indexServer.init();\n final IndexManager indexManager = new IndexManager();\n indexManager.setIndexServer(indexServer);\n indexManager.setMaxClauseCount(configuration.getInt(BLUR_MAX_CLAUSE_COUNT, 1024));\n indexManager.setThreadCount(configuration.getInt(BLUR_INDEXMANAGER_SEARCH_THREAD_COUNT, 32));\n indexManager.setBlurMetrics(blurMetrics);\n indexManager.setFilterCache(filterCache);\n indexManager.init();\n final BlurShardServer shardServer = new BlurShardServer();\n shardServer.setIndexServer(indexServer);\n shardServer.setIndexManager(indexManager);\n shardServer.setZookeeper(zooKeeper);\n shardServer.setClusterStatus(clusterStatus);\n shardServer.setDataFetchThreadCount(configuration.getInt(BLUR_SHARD_DATA_FETCH_THREAD_COUNT, 8));\n shardServer.setMaxQueryCacheElements(configuration.getInt(BLUR_SHARD_CACHE_MAX_QUERYCACHE_ELEMENTS, 128));\n shardServer.setMaxTimeToLive(configuration.getLong(BLUR_SHARD_CACHE_MAX_TIMETOLIVE, TimeUnit.MINUTES.toMillis(1)));\n shardServer.setQueryChecker(queryChecker);\n shardServer.init();\n Iface iface = BlurUtil.recordMethodCallsAndAverageTimes(blurMetrics, shardServer, Iface.class);\n int threadCount = configuration.getInt(BLUR_SHARD_SERVER_THRIFT_THREAD_COUNT, 32);\n final ThriftBlurShardServer server = new ThriftBlurShardServer();\n server.setNodeName(nodeName);\n server.setBindAddress(bindAddress);\n server.setBindPort(bindPort);\n server.setThreadCount(threadCount);\n server.setIface(iface);\n server.setConfiguration(configuration);\n new BlurServerShutDown().register(new BlurShutdown() {\n public void shutdown() {\n ThreadWatcher threadWatcher = ThreadWatcher.instance();\n quietClose(refresher, server, shardServer, indexManager, indexServer, threadWatcher);\n System.exit(0);\n }\n }, zooKeeper);\n server.start();\n}\n"
"public synchronized void unHarness() {\n santa_is_harnessing = false;\n notifyAll();\n}\n"
"public void tick() {\n if (timer1running) {\n timer1counter--;\n if (timer1counter < 0) {\n timer1counter = timer1latch;\n if (!timer1freerun) {\n timer1running = false;\n if (timer1interruptEnabled) {\n timer1IRQ = true;\n computer.getCpu().generateInterrupt();\n }\n }\n }\n if (timer2running) {\n timer2counter--;\n if (timer2counter < 0) {\n timer2running = false;\n timer2counter = timer2latch;\n if (timer2interruptEnabled) {\n timer2IRQ = true;\n computer.getCpu().generateInterrupt();\n }\n }\n }\n if (!timer1running && !timer2running)\n setRun(false);\n}\n"
"public File getDataFolder() {\n return plotMeCorePlugin.getDataFolder();\n}\n"
"public List<PostInfo> getPosts(PostFilterParameters filterParameters, IWContext iwc) {\n Collection<PostEntity> postEntities = null;\n postEntities = this.postDao.getPosts(filterParameters.getCreators(), filterParameters.getReceivers(), filterParameters.getTypes(), filterParameters.getMax(), filterParameters.getBeginUri(), filterParameters.getGetUp() != null);\n List<PostInfo> posts = new ArrayList<PostInfo>(postEntities.size());\n List<String> uris = new ArrayList<String>(1);\n this.articleListManadgedBean.setShowAllItems(true);\n IWSlideService slide = getServiceInstance(IWSlideService.class);\n for (PostEntity entity : postEntities) {\n uris.add(entity.getArticle().getUri());\n List<ArticleItemBean> articleItems = this.articleListManadgedBean.getArticlesByURIs(uris, iwc);\n if (ListUtil.isEmpty(articleItems)) {\n continue;\n }\n uris.clear();\n ArticleItemBean article = articleItems.get(0);\n PostInfo post = new PostInfo();\n try {\n int userId = entity.getPostCreator();\n User user = this.getUserBusiness().getUser(userId);\n UserDataBean userInfo = this.getUserApplicationEngine().getUserInfo(user);\n post.setUriToAuthorPicture(userInfo.getPictureUri());\n post.setAuthor(userInfo.getName());\n post.setDate(entity.getArticle().getModificationDate());\n } catch (RemoteException e) {\n this.getLogger().log(Level.WARNING, \"String_Node_Str\", e);\n }\n post.setTitle(article.getHeadline());\n post.setUriToBody(article.getResourcePath());\n post.setBody(article.getBody());\n List<?> attachments = article.getAttachments();\n List<Item> items = new ArrayList<Item>(attachments.size());\n for (String path : attachments) {\n WebdavResource resource = null;\n try {\n resource = slide.getWebdavResourceAuthenticatedAsRoot(path);\n } catch (Exception e) {\n this.getLogger().log(Level.WARNING, \"String_Node_Str\" + path, e);\n continue;\n }\n items.add(new Item(path, resource.getDisplayName()));\n }\n post.setAttachments(items);\n posts.add(post);\n }\n return posts;\n}\n"
"private void provisionServicesForApplication(String appName, ReadableArchive archive, DeploymentContext dc) {\n logger.entering(getClass().getName(), \"String_Node_Str\");\n Set<Plugin> installedPlugins = getPlugins();\n ServiceMetadata appServiceMetadata = serviceDependencyDiscovery(appName, archive, installedPlugins);\n Set<ProvisionedService> appProvisionedSvcs = provisionServices(installedPlugins, appServiceMetadata, dc);\n logger.log(Level.FINE, \"String_Node_Str\" + appName + \"String_Node_Str\" + appProvisionedSvcs);\n serviceMetadata.put(appName, appServiceMetadata);\n provisionedServices.put(appName, appProvisionedSvcs);\n logger.exiting(getClass().getName(), \"String_Node_Str\");\n}\n"
"public Response exportExecutionResult(final Long executionId, final ReportExecExportFormat fmt) {\n final ReportExecExportFormat format = (fmt == null) ? ReportExecExportFormat.XML : fmt;\n final ReportExec reportExec = reportController.getAndCheckReportExecInternal(executionId);\n StreamingOutput sout = new StreamingOutput() {\n\n public void write(final OutputStream os) throws IOException {\n reportController.exportExecutionResultInternal(os, reportExec, format);\n }\n }).build();\n}\n"
"private List getBinarySourcesFrom(Map binarySourceEntries) {\n List ret = new ArrayList();\n for (Iterator binIter = binarySourceEntries.keySet().iterator(); binIter.hasNext(); ) {\n String sourceFileName = (String) binIter.next();\n List unwovenClassFiles = (List) binarySourceEntries.get(sourceFileName);\n CompilationResult result = new CompilationResult(sourceFileName.toCharArray(), 0, 0, Integer.MAX_VALUE);\n result.noSourceAvailable();\n InterimCompilationResult binarySource = new InterimCompilationResult(result, unwovenClassFiles);\n ret.add(binarySource);\n }\n return ret;\n}\n"
"protected List<JAXBElement> createShellJAXBElementList(List<ReportItem> reportItems) {\n List<JAXBElement> jaxbElements = new ArrayList<JAXBElement>(reportItems.size());\n if ((reportItems != null) && (reportItems.size() > 0)) {\n for (int index = 0; index < reportItems.size(); index++) {\n ReportItem reportItem = reportItems.get(index);\n Object reportItemValue = record;\n if (record instanceof Object[]) {\n reportItemValue = ((Object[]) record)[index];\n }\n Class reportItemValueType = null;\n if (reportItemValue != null) {\n reportItemValueType = reportItemValue.getClass();\n }\n if (reportItemValueType == null) {\n DatabaseMapping dbMapping = reportItem.getMapping();\n if (dbMapping != null) {\n resultType = dbMapping.getAttributeClassification();\n } else {\n ClassDescriptor desc = reportItem.getDescriptor();\n if (desc != null) {\n resultType = desc.getJavaClass();\n } else {\n return null;\n }\n }\n }\n JAXBElement element = new JAXBElement(new QName(reportItemName), resultType, null);\n jaxbElements.add(reportItem.getResultIndex(), element);\n }\n }\n return jaxbElements;\n}\n"
"public void addKeyword(String keyword) {\n if (!isEmptyTrimmed(keyword)) {\n keyword = keyword.trim();\n if (!keywords.contains(keyword)) {\n keywords.add(keyword);\n }\n }\n}\n"
"public void readFields(DataInput in) throws IOException {\n BooleanWritable flag = new BooleanWritable(false);\n flag.readFields(in);\n double[] xUpdated = null;\n if (flag.get()) {\n DoubleArrayWritable reader = new DoubleArrayWritable();\n reader.readFields(in);\n xUpdated = reader.get();\n }\n flag.set(false);\n double[] uInitial = null;\n flag.readFields(in);\n if (flag.get()) {\n DoubleArrayWritable reader = new DoubleArrayWritable();\n reader.readFields(in);\n uInitial = reader.get();\n }\n flag.set(false);\n double[] zUpdated = null;\n flag.readFields(in);\n if (flag.get()) {\n DoubleArrayWritable reader = new DoubleArrayWritable();\n reader.readFields(in);\n zUpdated = reader.get();\n }\n flag.set(false);\n DoubleWritable rho = new DoubleWritable();\n rho.readFields(in);\n DoubleWritable lambda = new DoubleWritable();\n lambda.readFields(in);\n DoubleWritable primalObjectiveValue = new DoubleWritable();\n primalObjectiveValue.readFields(in);\n LongWritable count = new LongWritable();\n count.readFields(in);\n context = new AdmmReducerContext(null, null, null, zUpdated, primalObjectiveValue.get(), rho.get(), lambda.get(), count.get());\n}\n"
"public void onFinish() {\n if (stopped || !isEnabled() || getModel().getSelectedFeatures().isEmpty() || getModel().getSelectedClasses().isEmpty()) {\n setStatusEmpty();\n return;\n }\n for (final TableItem i : table.getItems()) {\n i.dispose();\n }\n for (int i = 0; i < classes.length; i++) {\n TableItem item = new TableItem(table, SWT.NONE);\n item.setText(0, classes[i]);\n item.setText(1, String.valueOf(numClasses.get(i)));\n for (int j = 0; j < values.get(i).size(); j++) {\n item.setData(String.valueOf(2 + j), values.get(i).get(j));\n }\n item.setData(matrixes.get(i));\n }\n table.setFocus();\n table.select(0);\n setChartSeries(matrixes.get(0));\n root.layout();\n sash.setWeights(new int[] { 2, 2 });\n setStatusDone();\n}\n"
"public Case parse() throws InvalidStructureException, IOException, XmlPullParserException {\n this.checkNode(\"String_Node_Str\");\n this.nextTag(\"String_Node_Str\");\n String caseId = parser.nextText().trim();\n this.nextTag(\"String_Node_Str\");\n String dateModified = parser.nextText().trim();\n Date modified = DateUtils.parseDateTime(dateModified);\n boolean create = false;\n boolean update = false;\n boolean close = false;\n while (this.nextTagInBlock(\"String_Node_Str\")) {\n String action = parser.getName().toLowerCase();\n if (action.equals(\"String_Node_Str\")) {\n String[] data = new String[4];\n while (this.nextTagInBlock(\"String_Node_Str\")) {\n if (parser.getName().equals(\"String_Node_Str\")) {\n data[0] = parser.nextText().trim();\n } else if (parser.getName().equals(\"String_Node_Str\")) {\n data[1] = parser.nextText().trim();\n } else if (parser.getName().equals(\"String_Node_Str\")) {\n data[2] = parser.nextText().trim();\n } else if (parser.getName().equals(\"String_Node_Str\")) {\n data[3] = parser.nextText().trim();\n } else {\n throw new InvalidStructureException(\"String_Node_Str\" + parser.getName(), parser);\n }\n }\n for (String s : data) {\n if (s == null) {\n throw new InvalidStructureException(\"String_Node_Str\" + caseId, parser);\n }\n }\n Case c = null;\n boolean overriden = false;\n if (acceptCreateOverwrites) {\n c = retrieve(caseId);\n if (c != null) {\n c.setName(data[3]);\n c.setTypeId(data[0]);\n overriden = true;\n }\n }\n if (c == null) {\n c = new Case(data[3], data[0]);\n c.setCaseId(caseId);\n }\n c.setUserId(data[2]);\n c.setExternalId(data[1]);\n c.setCaseId(caseId);\n commit(c);\n create = true;\n Logger.log(\"String_Node_Str\", c.getID() + \"String_Node_Str\" + PropertyUtils.trim(c.getCaseId(), 12) + \"String_Node_Str\" + c.getTypeId());\n } else if (action.equals(\"String_Node_Str\")) {\n Case c = retrieve(caseId);\n if (c == null) {\n throw new InvalidStructureException(\"String_Node_Str\" + caseId, parser);\n }\n while (this.nextTagInBlock(\"String_Node_Str\")) {\n String key = parser.getName();\n String value = parser.nextText().trim();\n c.setProperty(key, value);\n }\n commit(c);\n update = true;\n } else if (action.equals(\"String_Node_Str\")) {\n Case c = retrieve(caseId);\n if (c == null) {\n throw new InvalidStructureException(\"String_Node_Str\" + caseId, parser);\n }\n c.setClosed(true);\n commit(c);\n Logger.log(\"String_Node_Str\", PropertyUtils.trim(c.getCaseId(), 12));\n close = true;\n } else if (action.equals(\"String_Node_Str\")) {\n new ReferralXmlParser(parser, caseId, modified).parse();\n }\n }\n if (create) {\n tallies[0]++;\n } else if (close) {\n tallies[2]++;\n } else if (update) {\n tallies[1]++;\n }\n return null;\n}\n"
"protected INDArray compute() {\n INDArray x = op.x();\n INDArray y = op.y();\n DataBuffer dx = x.data();\n DataBuffer dy = (y != null ? y.data() : null);\n int nTensors = x.tensorssAlongDimension(dimensions);\n List<RecursiveTask<Pair<Double, Integer>>> taskList = new ArrayList<>(nTensors);\n boolean canDoDirectly = false;\n for (int i = 0; i < nTensors; i++) {\n IndexAccumulation opOnDimension = (IndexAccumulation) op.opForDimension(i, dimensions);\n INDArray x2 = opOnDimension.x();\n INDArray y2 = opOnDimension.y();\n if (i == 0) {\n if (y2 == null)\n canDoDirectly = OpExecutionerUtil.canDoTransformOpDirectly(x2);\n else\n canDoDirectly = OpExecutionerUtil.canDoTransformOpDirectly(x2, y2);\n }\n RecursiveTask<Pair<Double, Integer>> task;\n if (canDoDirectly) {\n if (y != null) {\n task = opOnDimension.getIndexAccumulationOpDataBufferTask(0, opOnDimension.n(), dx, dy, x2.offset(), y2.offset(), x2.elementWiseStride(), y2.elementWiseStride(), 0, true);\n } else {\n task = opOnDimension.getIndexAccumulationOpDataBufferTask(0, opOnDimension.n(), dx, null, x2.offset(), 0, x2.elementWiseStride(), 0, 0, true);\n }\n } else {\n task = opOnDimension.getIndexAccumulationOpDataBufferTask(parallelThreshold, opOnDimension.n(), x2.data(), null, x2.offset(), 0, x2.elementWiseStride(), 0, 0, true);\n }\n task.fork();\n taskList.add(task);\n }\n int[] retShape = ArrayUtil.removeIndex(x.shape(), dimensions);\n INDArray out = Nd4j.create(retShape);\n int i = 0;\n for (RecursiveTask<Pair<Double, Integer>> task : taskList) {\n Pair<Double, Integer> pair = task.join();\n out.putScalar(i++, pair.getSecond());\n }\n return out;\n}\n"
"public static boolean isIn(Location loc) {\n for (Region region : REGION_LIST) {\n if (region.isIn(loc)) {\n return true;\n }\n }\n return false;\n}\n"
"public static void main(final String[] args) {\n final DefaultData data = Data.create();\n data.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n data.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n data.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n data.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n data.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n data.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n data.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n data.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n data.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n data.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n final DefaultData subsetData = Data.create();\n subsetData.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n subsetData.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n subsetData.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n subsetData.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n subsetData.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n subsetData.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n final DataSubset subset = DataSubset.create(data, subsetData);\n final DefaultHierarchy age = Hierarchy.create();\n age.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n age.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n age.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n age.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n age.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n age.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n age.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n age.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n age.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n final DefaultHierarchy nationality = Hierarchy.create();\n nationality.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n nationality.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n nationality.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n nationality.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n nationality.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n nationality.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n nationality.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n final DefaultHierarchy zip = Hierarchy.create();\n zip.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n zip.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n zip.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n zip.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n zip.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n zip.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n zip.add(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n data.getDefinition().setAttributeType(\"String_Node_Str\", AttributeType.IDENTIFYING_ATTRIBUTE);\n data.getDefinition().setAttributeType(\"String_Node_Str\", AttributeType.IDENTIFYING_ATTRIBUTE);\n data.getDefinition().setAttributeType(\"String_Node_Str\", zip);\n data.getDefinition().setAttributeType(\"String_Node_Str\", age);\n data.getDefinition().setAttributeType(\"String_Node_Str\", nationality);\n data.getDefinition().setAttributeType(\"String_Node_Str\", AttributeType.INSENSITIVE_ATTRIBUTE);\n final ARXAnonymizer anonymizer = new ARXAnonymizer();\n final ARXConfiguration config = new ARXConfiguration();\n config.addCriterion(new KAnonymity(2));\n config.addCriterion(new DPresence(1d / 2d, 2d / 3d, subset));\n config.setAllowedOutliers(0d);\n config.setMetric(Metric.createEntropyMetric());\n try {\n final ARXResult result = anonymizer.anonymize(data, config);\n printResult(result, data);\n System.out.println(\"String_Node_Str\");\n print(result.getHandle().iterator());\n System.out.println(\"String_Node_Str\");\n transformed = result.getHandle().getContextSpecificView(config).iterator();\n while (transformed.hasNext()) {\n System.out.print(\"String_Node_Str\");\n System.out.println(Arrays.toString(transformed.next()));\n }\n } catch (final IllegalArgumentException e) {\n throw new RuntimeException(e);\n } catch (final IOException e) {\n throw new RuntimeException(e);\n }\n}\n"
"private void makeResultResource(ITestResult result, String status) {\n String className = result.getTestClass().getName();\n className = className.substring(className.lastIndexOf(\"String_Node_Str\") + 1);\n Resource assertionResource = model.createResource(null, Earl.Assertion);\n Resource resultResource = model.createResource(null, Earl.TestResult);\n Resource subjectResource = model.getResource(homepage);\n Resource assertorResource = model.getResource(assertor);\n assertionResource.addProperty(Earl.testSubject, subjectResource);\n assertionResource.addProperty(Earl.test, model.getResource(createTestCaseURL(className, result.getName())));\n Method method = result.getMethod().getConstructorOrMethod().getMethod();\n if (method.getAnnotation(SpecTest.class) != null) {\n SpecTest specTest = method.getAnnotation(SpecTest.class);\n if (specTest.coveredByGroups().length > 0 && specTest.coveredByGroups().length > 0) {\n ArrayList<String> testResults = new ArrayList<String>();\n for (Class<?> classVal : specTest.coveredByTests()) {\n Method[] classMethod = classVal.getDeclaredMethods();\n for (Method methodName : classMethod) {\n if (methodName.getAnnotation(Test.class) != null) {\n String group = Arrays.toString(methodName.getAnnotation(Test.class).groups());\n for (String groupCover : specTest.coveredByGroups()) {\n if (group.contains(groupCover) && !methodName.getName().contains(\"String_Node_Str\")) {\n testResults.add(findTestResult(methodName.getName()));\n }\n }\n }\n }\n }\n if (testResults.size() > 0) {\n if (testResults.contains(FAIL))\n status = FAIL;\n else if (testResults.contains(PASS) && !testResults.contains(FAIL))\n status = PASS;\n else if (testResults.contains(SKIP) && !testResults.contains(FAIL) && !testResults.contains(PASS))\n status = SKIP;\n }\n }\n }\n switch(status) {\n case FAIL:\n resultResource.addProperty(Earl.outcome, Earl.failed);\n break;\n case PASS:\n resultResource.addProperty(Earl.outcome, Earl.passed);\n break;\n case SKIP:\n resultResource.addProperty(Earl.outcome, Earl.untested);\n break;\n default:\n break;\n }\n if (result.getThrowable() != null) {\n createExceptionProperty(result.getThrowable(), resultResource);\n }\n if (result.getMethod().getConstructorOrMethod().getMethod().getAnnotation(SpecTest.class) != null) {\n SpecTest test = result.getMethod().getConstructorOrMethod().getMethod().getAnnotation(SpecTest.class);\n METHOD type = test.testMethod();\n switch(type) {\n case AUTOMATED:\n assertionResource.addProperty(Earl.mode, Earl.automatic);\n break;\n case MANUAL:\n assertionResource.addProperty(Earl.mode, Earl.manual);\n break;\n case INDIRECT:\n assertionResource.addProperty(Earl.mode, Earl.automatic);\n break;\n default:\n assertionResource.addProperty(Earl.mode, Earl.notTested);\n break;\n }\n }\n assertionResource.addProperty(Earl.assertedBy, subjectResource);\n assertionResource.addLiteral(ranAsClass, result.getTestClass().getRealClass().getSimpleName());\n resultResource.addProperty(DCTerms.date, model.createTypedLiteral(GregorianCalendar.getInstance()));\n assertionResource.addProperty(Earl.testResult, resultResource);\n}\n"
"public void shutdown() {\n if (!isInitialized) {\n return;\n }\n new ShutdownThread().run();\n}\n"
"public void run(ProgressStatus progressStatus) {\n progressStatus.setDescription(\"String_Node_Str\");\n if (ProjectUtilities.isFromTeamworkServer(project.getPrimaryProject()) && TeamworkUtils.getLoggedUserName() == null) {\n Utils.guilog(\"String_Node_Str\");\n return;\n }\n LocalSyncTransactionCommitListener listener = LocalSyncProjectEventListenerAdapter.getProjectMapping(project).getLocalSyncTransactionCommitListener();\n if (listener == null) {\n Utils.guilog(\"String_Node_Str\");\n return;\n }\n String url;\n try {\n url = MMSUtils.getServerUrl(project);\n } catch (IllegalStateException e) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\");\n return;\n }\n if (url == null || url.isEmpty()) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\");\n return;\n }\n String site = MMSUtils.getSiteName(project);\n if (site == null || site.isEmpty()) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\");\n return;\n }\n try {\n if (!MMSUtils.isSiteEditable(project, site)) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\");\n return;\n }\n } catch (ServerException e) {\n e.printStackTrace();\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + e.getMessage());\n return;\n } catch (URISyntaxException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n listener.setDisabled(true);\n SyncElements.lockSyncFolder(project);\n listener.setDisabled(false);\n JMSSyncProjectEventListenerAdapter.JMSSyncProjectMapping jmsSyncProjectMapping = JMSSyncProjectEventListenerAdapter.getProjectMapping(Application.getInstance().getProject());\n JMSMessageListener jmsMessageListener = jmsSyncProjectMapping.getJmsMessageListener();\n if (jmsMessageListener == null) {\n if (MDKOptionsGroup.getMDKOptions().isChangeListenerEnabled()) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\");\n }\n return;\n }\n Changelog<String, Element> persistedLocalChangelog = new Changelog<>();\n Collection<SyncElement> persistedLocalSyncElements = SyncElements.getAllOfType(project, SyncElement.Type.LOCAL);\n for (SyncElement syncElement : persistedLocalSyncElements) {\n persistedLocalChangelog = persistedLocalChangelog.and(SyncElements.buildChangelog(syncElement), (key, value) -> Converters.getIdToElementConverter().apply(key, project));\n }\n Changelog<String, Element> localChangelog = persistedLocalChangelog.and(listener.getInMemoryLocalChangelog());\n Map<String, Element> localCreated = localChangelog.get(Changelog.ChangeType.CREATED), localUpdated = localChangelog.get(Changelog.ChangeType.UPDATED), localDeleted = localChangelog.get(Changelog.ChangeType.DELETED);\n Changelog<String, Void> persistedJmsChangelog = new Changelog<>();\n Collection<SyncElement> persistedJmsSyncElements = SyncElements.getAllOfType(project, SyncElement.Type.MMS);\n for (SyncElement syncElement : persistedJmsSyncElements) {\n persistedJmsChangelog = persistedJmsChangelog.and(SyncElements.buildChangelog(syncElement));\n }\n Changelog<String, Void> jmsChangelog = persistedJmsChangelog.and(jmsMessageListener.getInMemoryJMSChangelog(), (key, objectNode) -> null);\n Map<String, Void> jmsCreated = jmsChangelog.get(Changelog.ChangeType.CREATED), jmsUpdated = jmsChangelog.get(Changelog.ChangeType.UPDATED), jmsDeleted = jmsChangelog.get(Changelog.ChangeType.DELETED);\n Set<String> elementIdsToGet = new HashSet<>(jmsUpdated.keySet());\n elementIdsToGet.addAll(jmsCreated.keySet());\n if (shouldUpdate && !jmsChangelog.isEmpty()) {\n int size = jmsChangelog.flattenedSize();\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + size + \"String_Node_Str\" + (size != 1 ? \"String_Node_Str\" : \"String_Node_Str\") + \"String_Node_Str\");\n }\n Map<String, ObjectNode> jmsJsons = new HashMap<>(elementIdsToGet.size());\n if (!elementIdsToGet.isEmpty()) {\n progressStatus.setDescription(\"String_Node_Str\" + elementIdsToGet.size() + \"String_Node_Str\" + (elementIdsToGet.size() != 1 ? \"String_Node_Str\" : \"String_Node_Str\") + \"String_Node_Str\");\n ObjectNode response = null;\n try {\n response = MMSUtils.getElementsById(elementIdsToGet, project, progressStatus);\n } catch (ServerException | IOException | URISyntaxException e) {\n if (e instanceof ServerException && ((ServerException) e).getCode() == 404) {\n (response = JacksonUtils.getObjectMapper().createObjectNode()).putArray(\"String_Node_Str\");\n } else if (!progressStatus.isCancel()) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\");\n e.printStackTrace();\n return;\n }\n }\n if (progressStatus.isCancel()) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\");\n return;\n }\n JsonNode elementsArrayNode;\n if (response == null || (elementsArrayNode = response.get(\"String_Node_Str\")) == null || !elementsArrayNode.isArray()) {\n Utils.guilog(\"String_Node_Str\");\n return;\n }\n for (JsonNode jsonNode : elementsArrayNode) {\n if (!jsonNode.isObject()) {\n continue;\n }\n String webId = jsonNode.get(MDKConstants.SYSML_ID_KEY).asText();\n jmsJsons.put(webId, (ObjectNode) jsonNode);\n }\n }\n progressStatus.setDescription(\"String_Node_Str\");\n Map<String, Pair<Changelog.Change<Element>, Changelog.Change<Void>>> conflictedChanges = new LinkedHashMap<>(), unconflictedChanges = new LinkedHashMap<>();\n localChangelog.findConflicts(jmsChangelog, (change, change2) -> change != null && change2 != null, conflictedChanges, unconflictedChanges);\n Map<String, Element> localElementsToPost = new LinkedHashMap<>(localCreated.size() + localUpdated.size());\n Set<String> localElementsToDelete = new HashSet<>(localDeleted.size());\n Map<String, ObjectNode> jmsElementsToCreateLocally = new LinkedHashMap<>(jmsCreated.size());\n Map<String, Pair<ObjectNode, Element>> jmsElementsToUpdateLocally = new LinkedHashMap<>(jmsUpdated.size());\n Map<String, Element> jmsElementsToDeleteLocally = new LinkedHashMap<>(jmsDeleted.size());\n for (Map.Entry<String, Pair<Changelog.Change<Element>, Changelog.Change<Void>>> unconflictedEntry : unconflictedChanges.entrySet()) {\n String id = unconflictedEntry.getKey();\n Changelog.Change<Element> localChange = unconflictedEntry.getValue().getFirst();\n Changelog.Change<ObjectNode> jmsChange = unconflictedEntry.getValue().getSecond() != null ? new Changelog.Change<>(jmsJsons.get(id), unconflictedEntry.getValue().getSecond().getType()) : null;\n if (shouldCommit && localChange != null) {\n Element element = localChange.getChanged();\n switch(localChange.getType()) {\n case CREATED:\n case UPDATED:\n if (element == null) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + id + \"String_Node_Str\");\n continue;\n }\n localElementsToPost.put(id, element);\n break;\n case DELETED:\n if (element != null && !project.isDisposed(element)) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + id + \"String_Node_Str\");\n continue;\n }\n localElementsToDelete.add(id);\n break;\n }\n } else if (shouldUpdate && jmsChange != null) {\n ObjectNode objectNode = jmsChange.getChanged();\n Element element = Converters.getIdToElementConverter().apply(id, project);\n switch(jmsChange.getType()) {\n case CREATED:\n if (objectNode == null) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + id + \"String_Node_Str\");\n continue;\n }\n if (element != null) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + id + \"String_Node_Str\");\n continue;\n }\n jmsElementsToCreateLocally.put(id, objectNode);\n break;\n case UPDATED:\n if (objectNode == null) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + id + \"String_Node_Str\");\n continue;\n }\n if (element == null) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + id + \"String_Node_Str\");\n continue;\n }\n if (!element.isEditable()) {\n if (MDUtils.isDeveloperMode()) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + id + \"String_Node_Str\");\n }\n failedJmsChangelog.addChange(id, null, Changelog.ChangeType.UPDATED);\n continue;\n }\n jmsElementsToUpdateLocally.put(id, new Pair<>(objectNode, element));\n break;\n case DELETED:\n if (element == null) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + id + \"String_Node_Str\");\n continue;\n }\n if (!element.isEditable()) {\n if (MDUtils.isDeveloperMode()) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + id + \"String_Node_Str\");\n }\n failedJmsChangelog.addChange(id, null, Changelog.ChangeType.DELETED);\n continue;\n }\n jmsElementsToDeleteLocally.put(id, element);\n break;\n }\n }\n }\n if (progressStatus.isCancel()) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\");\n return;\n }\n boolean shouldLogNoLocalChanges = shouldCommit;\n if (shouldCommit && !localElementsToPost.isEmpty()) {\n progressStatus.setDescription(\"String_Node_Str\");\n ArrayNode elementsArrayNode = JacksonUtils.getObjectMapper().createArrayNode();\n for (Element element : localElementsToPost.values()) {\n ObjectNode elementObjectNode = Converters.getElementToJsonConverter().apply(element, project);\n if (elementObjectNode != null) {\n elementsArrayNode.add(elementObjectNode);\n }\n }\n if (elementsArrayNode.size() > 0) {\n ObjectNode body = JacksonUtils.getObjectMapper().createObjectNode();\n body.set(\"String_Node_Str\", elementsArrayNode);\n body.put(\"String_Node_Str\", \"String_Node_Str\");\n body.put(\"String_Node_Str\", MDKPlugin.VERSION);\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + NumberFormat.getInstance().format(elementsArrayNode.size()) + \"String_Node_Str\" + (elementsArrayNode.size() != 1 ? \"String_Node_Str\" : \"String_Node_Str\") + \"String_Node_Str\");\n try {\n OutputQueue.getInstance().offer(new Request(MMSUtils.HttpRequestType.POST, MMSUtils.getServiceWorkspacesSitesElementsUri(project), body, true, elementsArrayNode.size(), \"String_Node_Str\"));\n } catch (IOException e) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\");\n e.printStackTrace();\n } catch (URISyntaxException e) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\");\n e.printStackTrace();\n }\n shouldLogNoLocalChanges = false;\n }\n }\n if (shouldCommit && shouldCommitDeletes && !localElementsToDelete.isEmpty()) {\n progressStatus.setDescription(\"String_Node_Str\");\n ArrayNode elementsArrayNode = JacksonUtils.getObjectMapper().createArrayNode();\n for (String id : localElementsToDelete) {\n ObjectNode elementObjectNode = JacksonUtils.getObjectMapper().createObjectNode();\n elementObjectNode.put(MDKConstants.SYSML_ID_KEY, id);\n elementsArrayNode.add(elementObjectNode);\n }\n ObjectNode body = JacksonUtils.getObjectMapper().createObjectNode();\n body.set(\"String_Node_Str\", elementsArrayNode);\n body.put(\"String_Node_Str\", \"String_Node_Str\");\n body.put(\"String_Node_Str\", MDKPlugin.VERSION);\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + NumberFormat.getInstance().format(elementsArrayNode.size()) + \"String_Node_Str\" + (elementsArrayNode.size() != 1 ? \"String_Node_Str\" : \"String_Node_Str\") + \"String_Node_Str\");\n URIBuilder uri = MMSUtils.getServiceWorkspacesSitesElementsUri(project);\n try {\n OutputQueue.getInstance().offer(new Request(MMSUtils.HttpRequestType.DELETE, uri, body, true, elementsArrayNode.size(), \"String_Node_Str\"));\n } catch (IOException e) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\");\n e.printStackTrace();\n } catch (URISyntaxException e) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\");\n e.printStackTrace();\n }\n shouldLogNoLocalChanges = false;\n }\n if (shouldLogNoLocalChanges) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\");\n }\n if (shouldUpdate) {\n listener.setDisabled(true);\n List<ObjectNode> jmsElementsToCreateOrUpdateLocally = new ArrayList<>(jmsElementsToCreateLocally.size() + jmsElementsToUpdateLocally.size());\n jmsElementsToCreateOrUpdateLocally.addAll(jmsElementsToCreateLocally.values());\n jmsElementsToUpdateLocally.values().forEach(pair -> jmsElementsToCreateOrUpdateLocally.add(pair.getFirst()));\n UpdateClientElementAction updateClientElementAction = new UpdateClientElementAction(project);\n updateClientElementAction.setElementsToUpdate(jmsElementsToCreateOrUpdateLocally);\n updateClientElementAction.setElementsToDelete(jmsElementsToDeleteLocally.values().stream().map(Converters.getElementToIdConverter()).filter(id -> id != null).collect(Collectors.toList()));\n updateClientElementAction.run(progressStatus);\n failedJmsChangelog = failedJmsChangelog.and(updateClientElementAction.getFailedChangelog(), (id, objectNode) -> null);\n listener.setDisabled(false);\n }\n progressStatus.setDescription(\"String_Node_Str\");\n Set<Element> localConflictedElements = new HashSet<>();\n Set<ObjectNode> jmsConflictedElements = new HashSet<>();\n for (Map.Entry<String, Pair<Changelog.Change<Element>, Changelog.Change<Void>>> conflictedEntry : conflictedChanges.entrySet()) {\n String id = conflictedEntry.getKey();\n Changelog.Change<Element> localChange = conflictedEntry.getValue().getFirst();\n Changelog.Change<ObjectNode> jmsChange = conflictedEntry.getValue().getSecond() != null ? new Changelog.Change<>(jmsJsons.get(id), conflictedEntry.getValue().getSecond().getType()) : null;\n if (localChange != null && localChange.getChanged() != null && !project.isDisposed(localChange.getChanged())) {\n localConflictedElements.add(localChange.getChanged());\n }\n if (jmsChange != null && jmsChange.getChanged() != null) {\n jmsConflictedElements.add(jmsChange.getChanged());\n }\n }\n ElementValidator elementValidator = new ElementValidator(ElementValidator.buildElementPairs(localConflictedElements, project), jmsConflictedElements, project);\n elementValidator.run(progressStatus);\n if (!elementValidator.getInvalidElements().isEmpty()) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + elementValidator.getInvalidElements().size() + \"String_Node_Str\" + (elementValidator.getInvalidElements().size() != 1 ? \"String_Node_Str\" : \"String_Node_Str\") + \"String_Node_Str\");\n vss.add(elementValidator.getValidationSuite());\n Utils.displayValidationWindow(elementValidator.getValidationSuite(), \"String_Node_Str\");\n for (Map.Entry<String, Pair<Changelog.Change<Element>, Changelog.Change<Void>>> conflictedEntry : conflictedChanges.entrySet()) {\n String id = conflictedEntry.getKey();\n if (!elementValidator.getInvalidElements().containsKey(id)) {\n continue;\n }\n Changelog.Change<Element> localChange = conflictedEntry.getValue().getFirst();\n Changelog.Change<ObjectNode> jmsChange = conflictedEntry.getValue().getSecond() != null ? new Changelog.Change<>(jmsJsons.get(id), conflictedEntry.getValue().getSecond().getType()) : null;\n if (localChange != null && localChange.getChanged() != null || Changelog.ChangeType.DELETED.equals(localChange.getType())) {\n failedLocalChangelog.addChange(conflictedEntry.getKey(), localChange.getChanged(), localChange.getType());\n }\n if (jmsChange != null && jmsChange.getChanged() != null || Changelog.ChangeType.DELETED.equals(jmsChange.getType())) {\n failedJmsChangelog.addChange(conflictedEntry.getKey(), null, jmsChange.getType());\n }\n }\n }\n listener.getInMemoryLocalChangelog().clear();\n jmsMessageListener.getInMemoryJMSChangelog().clear();\n listener.setDisabled(true);\n if (!SessionManager.getInstance().isSessionCreated()) {\n SessionManager.getInstance().createSession(\"String_Node_Str\");\n }\n Changelog<String, Void> unprocessedLocalChangelog = new Changelog<>();\n if (!shouldCommit) {\n unprocessedLocalChangelog = unprocessedLocalChangelog.and(localChangelog, (s, element) -> null);\n }\n if (shouldCommit && !shouldCommitDeletes) {\n Map<String, Void> unprocessedLocalDeletedChanges = unprocessedLocalChangelog.get(Changelog.ChangeType.DELETED);\n for (String key : localChangelog.get(Changelog.ChangeType.DELETED).keySet()) {\n unprocessedLocalDeletedChanges.put(key, null);\n }\n }\n unprocessedLocalChangelog = unprocessedLocalChangelog.and(failedLocalChangelog, (s, element) -> null);\n try {\n SyncElements.setByType(project, SyncElement.Type.LOCAL, JacksonUtils.getObjectMapper().writeValueAsString(SyncElements.buildJson(unprocessedLocalChangelog)));\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n Changelog<String, Void> unprocessedJmsChangelog = new Changelog<>();\n if (!shouldUpdate) {\n unprocessedJmsChangelog = unprocessedJmsChangelog.and(jmsChangelog);\n }\n unprocessedJmsChangelog = unprocessedJmsChangelog.and(failedJmsChangelog);\n try {\n SyncElements.setByType(project, SyncElement.Type.MMS, JacksonUtils.getObjectMapper().writeValueAsString(SyncElements.buildJson(unprocessedJmsChangelog)));\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n SessionManager.getInstance().closeSession();\n listener.setDisabled(false);\n failure = false;\n}\n"
"private void setUpImageListener() {\n getImagePager().addOnPageChangeListener(this);\n}\n"
"final public BitVector get(Type type) {\n if (type == null)\n return null;\n while (allocNodeListener.hasNext()) {\n AllocNode n = allocNodeListener.next();\n for (final Type t : Scene.v().getTypeNumberer()) {\n if (!(t instanceof RefLikeType))\n continue;\n if (t instanceof AnySubType)\n continue;\n if (isUnresolved(t))\n continue;\n if (castNeverFails(n.getType(), t)) {\n BitVector mask = typeMask.get(t);\n if (mask == null) {\n typeMask.put(t, mask = new BitVector());\n for (final AllocNode an : pag.getAllocNodeNumberer()) {\n if (castNeverFails(an.getType(), t)) {\n mask.set(an.getNumber());\n }\n }\n continue;\n }\n mask.set(n.getNumber());\n }\n }\n }\n BitVector ret = (BitVector) typeMask.get(type);\n if (ret == null && fh != null) {\n SootClass curClass = ((RefType) type).getSootClass();\n if (type instanceof RefType && curClass.isPhantom())\n return new BitVector();\n else\n throw new RuntimeException(\"String_Node_Str\" + type);\n return ret;\n}\n"
"private void postponeSync() {\n AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n Intent serviceIntent = new Intent(this, KeyserverSyncAdapterService.class);\n serviceIntent.setAction(ACTION_SYNC_NOW);\n PendingIntent pi = PendingIntent.getService(this, 0, serviceIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n alarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime() + SYNC_POSTPONE_TIME, pi);\n}\n"
"public List<?> getItemIds(int startIndex, int numberOfItems) {\n return container.getItemIds(this.startIndex + startIndex, numberOfItems);\n}\n"
"public void reloadMapTexture() {\n this.regionManager.close();\n this.executor.close();\n MapTexture oldMapTexture = this.mapTexture;\n this.mapTexture = new MapTexture(this.textureSize, this.linearTextureScalingEnabled);\n if (oldMapTexture != null) {\n oldMapTexture.close();\n }\n this.executor = new BackgroundExecutor();\n this.regionManager = new RegionManager(this, this.multiplayer);\n}\n"
"public boolean isConcurrentExectionDisallowed() {\n return ClassUtils.isAnnotationPresent(jobClass, DisallowConcurrentExecution.class);\n}\n"
"protected void setChildrenDrawingCacheEnabled(boolean enabled) {\n final int count = getChildCount();\n for (int i = 0; i < count; i++) {\n final View view = getChildAt(i);\n view.setDrawingCacheEnabled(enabled);\n view.buildDrawingCache(true);\n }\n}\n"
"public int getInt(long offset) {\n return Numbers.INT_NaN;\n}\n"
"public void doInTransactionWithoutResult(TransactionStatus status) {\n List<DataCenterIpAddressVO> privateIps = _privateIpAddressDao.listByPodIdDcId(podId, pod.getDataCenterId());\n if (!privateIps.isEmpty()) {\n if (!(_privateIpAddressDao.deleteIpAddressByPod(podId))) {\n throw new CloudRuntimeException(\"String_Node_Str\" + podId);\n }\n }\n List<DataCenterLinkLocalIpAddressVO> localIps = _linkLocalIpAllocDao.listByPodIdDcId(podId, pod.getDataCenterId());\n if (!localIps.isEmpty()) {\n if (!(_linkLocalIpAllocDao.deleteIpAddressByPod(podId))) {\n throw new CloudRuntimeException(\"String_Node_Str\" + podId);\n }\n }\n List<? extends Vlan> vlans = _networkModel.listPodVlans(podId);\n if (vlans != null && !vlans.isEmpty()) {\n for (Vlan vlan : vlans) {\n _vlanDao.remove(vlan.getId());\n }\n }\n _capacityDao.removeBy(null, null, podId, null, null);\n if (!(_podDao.remove(podId))) {\n throw new CloudRuntimeException(\"String_Node_Str\" + podId);\n }\n DedicatedResourceVO dr = _dedicatedDao.findByPodId(podId);\n if (dr != null) {\n _dedicatedDao.remove(dr.getId());\n }\n}\n"
"protected void verify() {\n if (results.isEmpty()) {\n throw new TestErrorException(\"String_Node_Str\");\n } else {\n ReportQueryResult result = results.firstElement();\n Object value;\n value = result.get(\"String_Node_Str\");\n if (value instanceof Integer && !(getSession().getDatasourcePlatform().isDB2())) {\n throw new TestErrorException(\"String_Node_Str\");\n }\n if (getSession().getDatasourcePlatform().isOracle()) {\n value = result.get(\"String_Node_Str\");\n if (value instanceof Integer) {\n throw new TestErrorException(\"String_Node_Str\");\n }\n }\n value = result.get(\"String_Node_Str\");\n if (value instanceof Integer) {\n throw new TestErrorException(\"String_Node_Str\");\n }\n value = result.get(\"String_Node_Str\");\n if (!(value instanceof BigDecimal || (value instanceof Integer && getSession().getDatasourcePlatform().isDB2()))) {\n throw new TestErrorException(\"String_Node_Str\");\n }\n value = result.get(\"String_Node_Str\");\n if (!(value instanceof BigDecimal || (value instanceof Integer && getSession().getDatasourcePlatform().isDB2()) || (value instanceof Long && getSession().getDatasourcePlatform().isMySQL()))) {\n throw new TestErrorException(\"String_Node_Str\");\n }\n value = result.get(\"String_Node_Str\");\n if (!(value instanceof BigDecimal || (value instanceof Integer && getSession().getDatasourcePlatform().isDB2()))) {\n throw new TestErrorException(\"String_Node_Str\");\n }\n }\n}\n"
"public void onTrustChanged(int userId) {\n updateCanSkipBouncerState();\n notifyKeyguardChanged();\n}\n"
"public static void main(String[] args) {\n TimetableLibrary tl = new TimetableLibrary(timetableURL);\n List<Section> sections;\n sections = tl.getSections(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n System.out.println(sections.size());\n for (Section s : sections) {\n System.out.println(s.getCourse() + \"String_Node_Str\" + s.getInstructor() + \"String_Node_Str\" + s.getDays() + \"String_Node_Str\" + s.getBegin() + \"String_Node_Str\" + s.getEnd() + \"String_Node_Str\" + s.getExam());\n }\n}\n"
"public ComputedColumnHandle addColumnBinding(ComputedColumn addColumn, boolean inForce) throws SemanticException {\n if (addColumn == null)\n return null;\n String expr = addColumn.getExpression();\n if (expr == null)\n return null;\n List columns = (List) getProperty(BOUND_DATA_COLUMNS_PROP);\n if (columns == null)\n return (ComputedColumnHandle) getPropertyHandle(BOUND_DATA_COLUMNS_PROP).addItem(addColumn);\n String aggregateOn = addColumn.getAggregateOn();\n ComputedColumn column = DataBoundColumnUtil.getColumn(columns, expr, aggregateOn);\n if (column != null && !inForce) {\n return (ComputedColumnHandle) column.handle(getPropertyHandle(BOUND_DATA_COLUMNS_PROP), columns.indexOf(column));\n }\n return (ComputedColumnHandle) getPropertyHandle(BOUND_DATA_COLUMNS_PROP).addItem(addColumn);\n}\n"
"int minIndex(String[] list1, char[] list2){\n\tint minIndex = list1.length;\n\tfor (int i = 0; i < list1.length; i++){\n\t\tif (list1[i] == null || list2[i] == null)\n\t\t\tcontinue;\n\t\tint index = list1[i].lastIndexOf(list2[i]);\n\t\tif (index != -1 && index < minIndex)\n\t\t\tminIndex = index;\n\t}\n\treturn minIndex < list1.length ? minIndex : -1;\n}\n"
"public boolean isSticky() {\n return this.sticky;\n}\n"
"public T next() {\n if (hasNext() == false) {\n throw new NoSuchElementException();\n }\n return tableOrView.at(index++);\n}\n"
"public boolean accept(File dir, String name) {\n return (Pattern.matches(\"String_Node_Str\", name) || Pattern.matches(\"String_Node_Str\", name)) && new File(dir, name).isDirectory();\n}\n"
"public boolean checkBlockRequirementsAfter(Player player, Player controller, Game game) {\n Set<UUID> opponents = game.getOpponents(attackingPlayerId);\n Map<UUID, Set<UUID>> mustBeBlockedByAtLeastOne = new HashMap<>();\n Map<UUID, Integer> minNumberOfBlockersMap = new HashMap<>();\n for (Permanent creature : game.getBattlefield().getActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURES_CONTROLLED, player.getId(), game)) {\n if (opponents.contains(creature.getControllerId())) {\n if (creature.getBlocking() > 0) {\n for (Map.Entry<RequirementEffect, Set<Ability>> entry : game.getContinuousEffects().getApplicableRequirementEffects(creature, false, game).entrySet()) {\n RequirementEffect effect = entry.getKey();\n for (Ability ability : entry.getValue()) {\n UUID toBeBlockedCreature = effect.mustBlockAttackerIfElseUnblocked(ability, game);\n if (toBeBlockedCreature != null) {\n minNumberOfBlockers = effect.getMinNumberOfBlockers();\n Set<UUID> potentialBlockers;\n if (mustBeBlockedByAtLeastOne.containsKey(toBeBlockedCreature)) {\n potentialBlockers = mustBeBlockedByAtLeastOne.get(toBeBlockedCreature);\n } else {\n potentialBlockers = new HashSet<>();\n mustBeBlockedByAtLeastOne.put(toBeBlockedCreature, potentialBlockers);\n }\n potentialBlockers.add(creature.getId());\n }\n }\n if (effect.mustBlockAllAttackers(game)) {\n Set<UUID> attackersToBlock = new HashSet<>();\n boolean mayBlock = false;\n for (UUID attackingCreatureId : getAttackers()) {\n if (creature.canBlock(attackingCreatureId, game)) {\n Permanent attackingCreature = game.getPermanent(attackingCreatureId);\n if (attackingCreature != null) {\n if (attackingCreature.getMaxBlockedBy() != 0) {\n int alreadyBlockingCreatures = 0;\n for (CombatGroup group : getGroups()) {\n if (group.getAttackers().contains(attackingCreatureId)) {\n alreadyBlockingCreatures = group.getBlockers().size();\n break;\n }\n }\n if (attackingCreature.getMaxBlockedBy() <= alreadyBlockingCreatures) {\n continue;\n }\n }\n if (attackingCreature.getMinBlockedBy() > 1) {\n int alreadyBlockingCreatures = 0;\n for (CombatGroup group : getGroups()) {\n if (group.getAttackers().contains(attackingCreatureId)) {\n alreadyBlockingCreatures = group.getBlockers().size();\n break;\n }\n }\n if (attackingCreature.getMinBlockedBy() >= alreadyBlockingCreatures) {\n continue;\n }\n } else {\n attackersToBlock.add(attackingCreatureId);\n }\n }\n }\n }\n if (!attackersToBlock.isEmpty()) {\n for (UUID attackerId : attackersToBlock) {\n if (!findGroup(attackerId).getBlockers().contains(creature.getId())) {\n mayBlock = true;\n break;\n }\n }\n }\n if (mayBlock) {\n if (controller.isHuman()) {\n if (!game.isSimulation()) {\n game.informPlayer(controller, \"String_Node_Str\" + creature.getIdName());\n }\n } else {\n Player defender = game.getPlayer(creature.getControllerId());\n if (defender != null) {\n for (UUID attackingCreatureId : getAttackers()) {\n if (creature.canBlock(attackingCreatureId, game) && !findGroup(attackingCreatureId).getBlockers().contains(creature.getId()) && attackersToBlock.contains(attackingCreatureId)) {\n defender.declareBlocker(defender.getId(), creature.getId(), attackingCreatureId, game);\n }\n }\n }\n }\n return false;\n }\n }\n }\n }\n if (creature.getBlocking() == 0) {\n for (Map.Entry<RequirementEffect, Set<Ability>> entry : game.getContinuousEffects().getApplicableRequirementEffects(creature, false, game).entrySet()) {\n RequirementEffect effect = entry.getKey();\n for (Ability ability : entry.getValue()) {\n UUID toBeBlockedCreature = effect.mustBlockAttackerIfElseUnblocked(ability, game);\n if (toBeBlockedCreature != null) {\n minNumberOfBlockers = effect.getMinNumberOfBlockers();\n Set<UUID> potentialBlockers;\n if (mustBeBlockedByAtLeastOne.containsKey(toBeBlockedCreature)) {\n potentialBlockers = mustBeBlockedByAtLeastOne.get(toBeBlockedCreature);\n } else {\n potentialBlockers = new HashSet<>();\n mustBeBlockedByAtLeastOne.put(toBeBlockedCreature, potentialBlockers);\n }\n potentialBlockers.add(creature.getId());\n }\n }\n if (effect.mustBlockAny(game) || effect.mustBlockAllAttackers(game)) {\n boolean mayBlock = false;\n for (UUID attackingCreatureId : getAttackers()) {\n if (creature.canBlock(attackingCreatureId, game)) {\n Permanent attackingCreature = game.getPermanent(attackingCreatureId);\n if (attackingCreature != null) {\n if (attackingCreature.getMaxBlockedBy() != 0) {\n int alreadyBlockingCreatures = 0;\n for (CombatGroup group : getGroups()) {\n if (group.getAttackers().contains(attackingCreatureId)) {\n alreadyBlockingCreatures = group.getBlockers().size();\n break;\n }\n }\n if (attackingCreature.getMaxBlockedBy() <= alreadyBlockingCreatures) {\n continue;\n }\n }\n if (attackingCreature.getMinBlockedBy() > 1) {\n int alreadyBlockingCreatures = 0;\n for (CombatGroup group : getGroups()) {\n if (group.getAttackers().contains(attackingCreatureId)) {\n alreadyBlockingCreatures = group.getBlockers().size();\n break;\n }\n }\n if (attackingCreature.getMinBlockedBy() >= alreadyBlockingCreatures) {\n continue;\n }\n } else {\n mayBlock = true;\n break;\n }\n }\n }\n }\n if (mayBlock) {\n if (controller.isHuman()) {\n if (!game.isSimulation()) {\n game.informPlayer(controller, \"String_Node_Str\" + creature.getIdName());\n }\n } else {\n Player defender = game.getPlayer(creature.getControllerId());\n if (defender != null) {\n for (UUID attackingCreatureId : getAttackers()) {\n if (creature.canBlock(attackingCreatureId, game) && !findGroup(attackingCreatureId).getBlockers().contains(creature.getId())) {\n defender.declareBlocker(defender.getId(), creature.getId(), attackingCreatureId, game);\n break;\n }\n }\n }\n }\n return false;\n }\n }\n }\n }\n }\n }\n for (UUID toBeBlockedCreatureId : mustBeBlockedByAtLeastOne.keySet()) {\n for (CombatGroup combatGroup : game.getCombat().getGroups()) {\n if (combatGroup.getAttackers().contains(toBeBlockedCreatureId)) {\n boolean requirementFulfilled = false;\n for (UUID blockerId : combatGroup.getBlockers()) {\n if (mustBeBlockedByAtLeastOne.get(toBeBlockedCreatureId).contains(blockerId)) {\n requirementFulfilled = true;\n break;\n }\n }\n requirementFulfilled &= (combatGroup.getBlockers().size() >= Math.min(minNumberOfBlockers, mustBeBlockedByAtLeastOne.get(toBeBlockedCreatureId).size()));\n if (!requirementFulfilled) {\n if (controller.isHuman()) {\n Permanent toBeBlockedCreature = game.getPermanent(toBeBlockedCreatureId);\n if (toBeBlockedCreature != null) {\n for (UUID possibleBlockerId : mustBeBlockedByAtLeastOne.get(toBeBlockedCreatureId)) {\n if (combatGroup.getBlockers().contains(possibleBlockerId)) {\n continue;\n }\n String blockRequiredMessage = isCreatureDoingARequiredBlock(possibleBlockerId, toBeBlockedCreatureId, mustBeBlockedByAtLeastOne, game);\n if (blockRequiredMessage != null) {\n removeBlocker(possibleBlockerId, game);\n game.informPlayer(controller, blockRequiredMessage + \"String_Node_Str\" + toBeBlockedCreature.getIdName() + '.');\n return false;\n }\n }\n }\n } else {\n for (UUID possibleBlockerId : mustBeBlockedByAtLeastOne.get(toBeBlockedCreatureId)) {\n String blockRequiredMessage = isCreatureDoingARequiredBlock(possibleBlockerId, toBeBlockedCreatureId, mustBeBlockedByAtLeastOne, game);\n if (blockRequiredMessage != null) {\n Permanent possibleBlocker = game.getPermanent(possibleBlockerId);\n Player defender = game.getPlayer(possibleBlocker.getControllerId());\n if (defender != null) {\n if (possibleBlocker.getBlocking() > 0) {\n removeBlocker(possibleBlockerId, game);\n }\n defender.declareBlocker(defender.getId(), possibleBlockerId, toBeBlockedCreatureId, game);\n }\n if (combatGroup.getBlockers().size() >= minNumberOfBlockers) {\n break;\n }\n }\n }\n }\n }\n }\n }\n }\n StringBuilder sb = new StringBuilder();\n for (Map.Entry<UUID, Set<UUID>> entry : creatureMustBlockAttackers.entrySet()) {\n boolean blockIsValid = true;\n Permanent creatureForcedToBlock = game.getPermanent(entry.getKey());\n if (creatureForcedToBlock == null) {\n break;\n }\n if (!creatureForcedToBlock.getControllerId().equals(player.getId())) {\n continue;\n }\n if (creatureForcedToBlock.getBlocking() == 0) {\n blockIsValid = entry.getValue().isEmpty();\n for (UUID possibleAttackerId : entry.getValue()) {\n CombatGroup attackersGroup = game.getCombat().findGroup(possibleAttackerId);\n Permanent attackingCreature = game.getPermanent(possibleAttackerId);\n if (attackersGroup == null || attackingCreature == null) {\n continue;\n }\n if (attackingCreature.getMinBlockedBy() > 1) {\n if (attackersGroup.getBlockers().size() + 1 < attackingCreature.getMinBlockedBy()) {\n blockIsValid = true;\n }\n }\n }\n } else {\n blockIsValid = false;\n CombatGroups: for (CombatGroup combatGroup : game.getCombat().getGroups()) {\n if (combatGroup.getBlockers().contains(creatureForcedToBlock.getId())) {\n for (UUID forcingAttackerId : combatGroup.getAttackers()) {\n if (entry.getValue().contains(forcingAttackerId)) {\n blockIsValid = true;\n break CombatGroups;\n } else {\n if (combatGroup.getBlockers().size() == 1) {\n if (mustBeBlockedByAtLeastOne.containsKey(forcingAttackerId)) {\n if (mustBeBlockedByAtLeastOne.get(forcingAttackerId).contains(creatureForcedToBlock.getId())) {\n blockIsValid = true;\n break CombatGroups;\n }\n }\n }\n }\n }\n }\n }\n }\n if (!blockIsValid) {\n sb.append(' ').append(creatureForcedToBlock.getIdName());\n }\n }\n if (sb.length() > 0) {\n if (!game.isSimulation()) {\n sb.insert(0, \"String_Node_Str\");\n sb.append(\"String_Node_Str\");\n game.informPlayer(controller, sb.toString());\n }\n return false;\n }\n return true;\n}\n"
"public void enableFollow() {\n isFollowEnabled.set(true);\n}\n"
"private PrestoTopic updateContextFieldValues(PrestoContext context, PrestoFieldUsage field, List<? extends Object> updateableValues) {\n PrestoTopic topic = context.getTopic();\n PrestoType type = context.getType();\n PrestoDataProvider dataProvider = getDataProvider();\n PrestoChangeSet changeSet = dataProvider.newChangeSet(getChangeSetHandler());\n PrestoUpdate update = changeSet.updateTopic(topic, type);\n PrestoContextRules rules = getPrestoContextRules(context);\n List<? extends Object> existingValues = topic.getValues(field);\n boolean includeExisting = true;\n Collection<? extends Object> newValues = mergeInlineTopics(updateableValues, existingValues, includeExisting);\n filterNonStorableFieldValues(rules, field, newValues);\n if (topic.isInline()) {\n PrestoInlineTopicBuilder builder = dataProvider.createInlineTopic(type, topic.getId());\n builder.setValues(field, newValues);\n PrestoTopic newTopic = builder.build();\n return mergeInlineTopic(newTopic, topic);\n } else {\n PrestoDataProvider dataProvider = getDataProvider();\n PrestoChangeSet changeSet = dataProvider.newChangeSet(getChangeSetHandler());\n PrestoUpdate update = changeSet.updateTopic(topic, type);\n update.setValues(field, newValues);\n changeSet.save();\n return update.getTopicAfterSave();\n }\n}\n"
"public List<QuasiLiveService> getAllServices(File source) {\n List<QuasiLiveService> quasiLiveServices = new ArrayList<QuasiLiveService>();\n if (source == null) {\n SortedMap<Long, QuasiLiveService> services = getServicesSortedMap(this.getQuasiFramework());\n for (Entry<Long, QuasiLiveService> serviceEntry : services.entrySet()) {\n quasiLiveServices.add(serviceEntry.getValue());\n }\n }\n return quasiLiveServices;\n}\n"
"public void onClick(View v) {\n if (optDO.getId() == 4) {\n checkForUpdate();\n } else if (optDO.getId() == 6) {\n context.finish();\n } else {\n if (MyAVUser.getCurrentUser() == null && (optDO.getAct() == MonthReportActivity.class || optDO.getAct() == UserLinkActivity.class)) {\n SnackBarUtil.showSnackInfo(v, context, \"String_Node_Str\");\n return;\n }\n if (!NetworkUtil.checkNetwork(context) && optDO.getAct() == UserLinkActivity.class) {\n SnackBarUtil.showSnackInfo(v, context, \"String_Node_Str\");\n return;\n }\n Intent intent = new Intent(context, optDO.getAct());\n if (optDO.getAct() == EditThemeActivity.class) {\n ((MainActivity) context).startActivityForResult(intent, MainActivity.REQUEST_EDIT_THEME);\n } else\n context.startActivity(intent);\n }\n}\n"
"public void follow_path() {\n Point __destination = new Point(this.destination);\n if (path != null && path.getLength() > 0) {\n for (int i = 0; i < path.getLength(); i++) {\n Step tmp_step = path.getStep(i);\n Point tmp = new Point(tmp_step.getX(), tmp_step.getY());\n tmp = WorldModel.tile_map.local2world(tmp);\n System.out.println(\"String_Node_Str\" + Integer.toString(i) + tmp.toString());\n }\n Step step = path.popStep();\n Point location = new Point(step.getX(), step.getY());\n location = WorldModel.tile_map.local2world(location);\n __destination.setLocation(location.getX(), location.getY());\n }\n if (owner.origin.getX() > __destination.getX()) {\n owner.move_to(new Point(owner.origin.getX() - 1, owner.origin.getY()));\n }\n if (owner.origin.getX() < __destination.getX()) {\n owner.move_to(new Point(owner.origin.getX() + 1, owner.origin.getY()));\n }\n if (owner.origin.getY() > __destination.getY()) {\n owner.move_to(new Point(owner.origin.getX(), owner.origin.getY() - 1));\n }\n if (owner.origin.getY() < __destination.getY()) {\n owner.move_to(new Point(owner.origin.getX(), owner.origin.getY() + 1));\n }\n if (owner.origin.equals(destination)) {\n this.destination = null;\n }\n}\n"
"public static void main(String[] args) {\n Cell a = Cell.parseCif(new File(\"String_Node_Str\"));\n Cell b = Cell.parseCif(new File(\"String_Node_Str\"));\n System.out.println(a.matchesCell(b, 0.1, 0.1, 0.1));\n System.out.println(getFindsymOutput(b.getNigliReducedCell()));\n}\n"
"protected void onPersist(EntityMetadata entityMetadata, Object entity, Object id, List<RelationHolder> relations) {\n String tableName = entityMetadata.getSchema();\n try {\n handler.writeData(tableName, entityMetadata, entity, id, relations);\n } catch (IOException e) {\n throw new PersistenceException(e);\n }\n}\n"
"public void setLogger(Logger logger) {\n if (logger != null) {\n EngineLogger.startEngineLogging(logger, null, null, null);\n }\n}\n"
"public void sendMidiSystemExclusive(int cable, byte[] systemExclusive) {\n if (systemExclusive.length > 3) {\n sysexTransferDataStream.reset();\n for (int sysexIndex = 0; sysexIndex < systemExclusive.length; sysexIndex += 3) {\n if ((sysexIndex + 3 < systemExclusive.length)) {\n sysexTransferDataStream.write((((cable & 0xf) << 4) | 0x4));\n sysexTransferDataStream.write(systemExclusive[sysexIndex] & 0xff);\n sysexTransferDataStream.write(systemExclusive[sysexIndex + 1] & 0xff);\n sysexTransferDataStream.write(systemExclusive[sysexIndex + 2] & 0xff);\n } else {\n switch(systemExclusive.length % 3) {\n case 1:\n sysexTransferDataStream.write((((cable & 0xf) << 4) | 0x5));\n sysexTransferDataStream.write(systemExclusive[sysexIndex] & 0xff);\n sysexTransferDataStream.write(0);\n sysexTransferDataStream.write(0);\n break;\n case 2:\n sysexTransferDataStream.write((((cable & 0xf) << 4) | 0x6));\n sysexTransferDataStream.write(systemExclusive[sysexIndex] & 0xff);\n sysexTransferDataStream.write(systemExclusive[sysexIndex + 1] & 0xff);\n sysexTransferDataStream.write(0);\n break;\n case 0:\n sysexTransferDataStream.write((((cable & 0xf) << 4) | 0x7));\n sysexTransferDataStream.write(systemExclusive[sysexIndex] & 0xff);\n sysexTransferDataStream.write(systemExclusive[sysexIndex + 1] & 0xff);\n sysexTransferDataStream.write(systemExclusive[sysexIndex + 2] & 0xff);\n break;\n default:\n break;\n }\n }\n }\n }\n byte[] buffer = transferDataStream.toByteArray();\n Handler handler = waiterThread.getHandler();\n handler.sendMessage(Message.obtain(handler, 0, buffer));\n}\n"
"public org.hl7.fhir.dstu2.model.Ratio convertRatio(org.hl7.fhir.dstu3.model.Ratio src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.Ratio tgt = new org.hl7.fhir.dstu2.model.Ratio();\n copyElement(src, tgt);\n tgt.setNumerator(convertQuantity(src.getNumerator()));\n tgt.setDenominator(convertQuantity(src.getDenominator()));\n return tgt;\n}\n"
"public List<Dag> split() {\n List<Dag> dags = new ArrayList<>();\n Set<String> remainingNodes = new HashSet<>();\n remainingNodes.addAll(nodes);\n Set<String> possibleNewSources = Sets.union(sources, connectors);\n Set<String> possibleNewSinks = Sets.union(sinks, connectors);\n for (String reduceNode : reduceNodes) {\n Dag subdag = subsetAround(reduceNode, possibleNewSources, possibleNewSinks);\n remainingNodes.removeAll(subdag.getNodes());\n dags.add(subdag);\n }\n Set<String> remainingSources = Sets.intersection(remainingNodes, possibleNewSources);\n if (!remainingSources.isEmpty()) {\n Map<String, Set<String>> nodesAccessibleBySources = new HashMap<>();\n for (String remainingSource : remainingSources) {\n Dag remainingNodesDag = subsetFrom(remainingSource, possibleNewSinks);\n nodesAccessibleBySources.put(remainingSource, remainingNodesDag.getNodes());\n }\n for (String remainingSource : remainingSources) {\n if (processedNodes.contains(remainingSource)) {\n continue;\n }\n Set<String> remainingAccessibleNodes = nodesAccessibleBySources.get(remainingSource);\n Set<String> islandNodes = new HashSet<>();\n islandNodes.addAll(remainingAccessibleNodes);\n for (String otherSource : remainingSources) {\n if (remainingSource.equals(otherSource)) {\n continue;\n }\n Set<String> otherAccessibleNodes = nodesAccessibleBySources.get(otherSource);\n if (!Sets.intersection(remainingAccessibleNodes, otherAccessibleNodes).isEmpty()) {\n islandNodes.addAll(otherAccessibleNodes);\n }\n }\n dags.add(createSubDag(islandNodes));\n processedNodes.addAll(islandNodes);\n }\n }\n return dags;\n}\n"
"public void onNext(List<Identifier> identifiers) {\n getMvpView().showProgressbar(false);\n getMvpView().showClientIdentifiers(identifiers);\n if (identifiers.isEmpty()) {\n getMvpView().showEmptyClientIdentifier();\n }\n}\n"
"public void fillInsertStatementFromResultSet(final String sourceConnectorId, final TableMetaData sourceTableMetaData, final String targetConnectorId, final TableMetaData targetTableMetaData, final TargetDatabaseConfiguration targetDatabaseConfiguration, final Connection targetConnection, final ResultSet rs, final PreparedStatement insertStatement, final int numberOfRowsPerBatch, final boolean useMultipleValuesClauses) throws SQLException {\n final CommonColumnTypeResolverTool commonColumnTypeResolver = new CommonColumnTypeResolverTool(_connectorRepository);\n final List<ColumnMetaData> sourceColumns = ColumnOrderHint.getSortedColumns(_connectorRepository, sourceConnectorId, sourceTableMetaData);\n final ColumnMapper columnMapper = _connectorRepository.getConnectorHint(targetConnectorId, ColumnMapper.class).getValue();\n final DatabaseType targetDatabaseType = targetTableMetaData.getDatabaseMetaData().getDatabaseType();\n int targetColumnIndex = 1;\n int dataItemsCount = 0;\n for (int currentRow = 0; currentRow < numberOfRowsPerBatch; currentRow++) {\n final boolean ok = rs.next();\n if (!ok) {\n throw new MissingDataException(\"String_Node_Str\" + currentRow + \"String_Node_Str\" + numberOfRowsPerBatch);\n }\n targetDatabaseConfiguration.beforeNewRow(targetConnection, targetConnectorId, targetTableMetaData);\n for (int columnIndex = 1; columnIndex <= sourceColumns.size(); columnIndex++) {\n final ColumnMetaData columnMetaData1 = sourceColumns.get(columnIndex - 1);\n final ColumnMapperResult mapping = columnMapper.map(columnMetaData1, targetTableMetaData);\n for (final ColumnMetaData columnMetaData2 : mapping.getColumns()) {\n final ColumnTypeMapping columnTypeMapping = findMapping(sourceConnectorId, targetConnectorId, commonColumnTypeResolver, columnMetaData1, columnMetaData2);\n Object value = columnTypeMapping.getSourceColumnType().getValue(rs, columnIndex);\n value = columnTypeMapping.getColumnDataMapper().map(columnMetaData1, columnMetaData2, value);\n columnTypeMapping.getTargetColumnType().setValue(insertStatement, currentIndex++, value, targetDatabaseType, columnMetaData2.getColumnType());\n dataItemsCount++;\n }\n }\n if (!useMultipleValuesClauses) {\n insertStatement.addBatch();\n currentIndex = 1;\n }\n targetDatabaseConfiguration.afterNewRow(targetConnection, targetConnectorId, targetTableMetaData);\n }\n if (useMultipleValuesClauses) {\n insertStatement.addBatch();\n }\n LOG.debug(\"String_Node_Str\" + dataItemsCount);\n}\n"
"public void onMessage(Message message) {\n if (isDisabled()) {\n return;\n }\n lastMessage = message;\n if (!(message instanceof TextMessage)) {\n return;\n }\n final String text;\n try {\n text = ((TextMessage) message).getText();\n } catch (JMSException e) {\n e.printStackTrace();\n return;\n }\n if (MDKOptionsGroup.getMDKOptions().isLogJson()) {\n System.out.println(\"String_Node_Str\" + Converters.getIProjectToIdConverter().apply(project.getPrimaryProject()) + \"String_Node_Str\" + System.lineSeparator() + text);\n }\n JsonNode messageJsonNode;\n try {\n messageJsonNode = JacksonUtils.getObjectMapper().readTree(text);\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n if (!messageJsonNode.isObject()) {\n return;\n }\n JsonNode refsJsonNode = messageJsonNode.get(\"String_Node_Str\"), syncedJsonNode = messageJsonNode.get(\"String_Node_Str\"), sourceJsonNode = messageJsonNode.get(\"String_Node_Str\"), senderJsonNode = messageJsonNode.get(\"String_Node_Str\");\n if (refsJsonNode != null && refsJsonNode.isObject()) {\n for (Map.Entry<String, Changelog.ChangeType> entry : CHANGE_MAPPING.entrySet()) {\n JsonNode changeJsonNode = refsJsonNode.get(entry.getKey());\n if (changeJsonNode == null || !changeJsonNode.isArray()) {\n continue;\n }\n for (JsonNode sysmlIdJsonNode : changeJsonNode) {\n if (!sysmlIdJsonNode.isTextual() || sysmlIdJsonNode.asText().isEmpty()) {\n continue;\n }\n String id = sysmlIdJsonNode.asText();\n try {\n ObjectNode elementJsonNode = JacksonUtils.getObjectMapper().createObjectNode();\n elementJsonNode.put(MDKConstants.ID_KEY, id);\n if (EMFImporter.PreProcessor.SYSML_ID_VALIDATION.getFunction().apply(elementJsonNode, project, false, project.getPrimaryModel()) == null) {\n continue;\n }\n } catch (ImportException | ReadOnlyElementException ignored) {\n continue;\n }\n inMemoryJMSChangelog.addChange(id, null, entry.getValue());\n }\n SyncStatusConfigurator.getSyncStatusAction().update();\n }\n } else if (syncedJsonNode != null && syncedJsonNode.isObject()) {\n JsonNode senderJsonNode, sourceJsonNode;\n if ((senderJsonNode = syncedJsonNode.get(\"String_Node_Str\")) != null && senderJsonNode.isTextual() && senderJsonNode.asText().equals(TicketUtils.getUsername(project))) {\n return;\n }\n Changelog<String, Void> syncedChangelog = SyncElements.buildChangelog((ObjectNode) syncedJsonNode);\n if (syncedChangelog.isEmpty()) {\n return;\n }\n for (Changelog.ChangeType changeType : Changelog.ChangeType.values()) {\n Map<String, ObjectNode> inMemoryJMSChanges = inMemoryJMSChangelog.get(changeType);\n syncedChangelog.get(changeType).keySet().forEach(inMemoryJMSChanges::remove);\n }\n int size = syncedChangelog.flattenedSize();\n if (MDUtils.isDeveloperMode()) {\n Application.getInstance().getGUILog().log(\"String_Node_Str\" + project.getName() + \"String_Node_Str\" + size + \"String_Node_Str\" + (size != 1 ? \"String_Node_Str\" : \"String_Node_Str\") + \"String_Node_Str\");\n }\n SyncStatusConfigurator.getSyncStatusAction().update();\n }\n}\n"
"protected void startUp() throws Exception {\n LOGGER.info(\"String_Node_Str\");\n shutdowner.startAsync();\n shutdowner.awaitRunning();\n BackendBundle backendBundle = config.getBackendBundleGenerator().apply(generalBundleConfig);\n startBundle(backendBundle);\n TorodBundle torodBundle = createTorodBundle(backendBundle);\n startBundle(torodBundle);\n MongoDbCoreBundle mongoDbCoreBundle = createMongoDbCoreBundle(torodBundle);\n startBundle(mongoDbCoreBundle);\n MongoDbWpBundle mongodbWpBundle = config.getMongoDbWpBundleGenerator().apply(generalBundleConfig, mongoDbCoreBundle);\n startBundle(mongodbWpBundle);\n LOGGER.info(\"String_Node_Str\");\n}\n"
"public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {\n boolean retVal = false;\n Player player = (Player) sender;\n if (this.plugin.hasPermission(player, AppStrings.COMMAND_DELETE_PERMISSION, AppStrings.COMMAND_DELETE)) {\n if (args.length == 1) {\n String warpName = args[0];\n String addonMsgPrefix = AppStrings.getAddonMsgPrefix(plugin);\n boolean removed = plugin.getWarpManager().deleteWarp(warpName, player);\n if (removed) {\n player.sendMessage(ChatColor.AQUA + addonMsgPrefix + ChatColor.GREEN + AppStrings.WARP_REMOVED_PREFIX + ChatColor.WHITE + warpName);\n } else {\n player.sendMessage(ChatColor.AQUA + addonMsgPrefix + ChatColor.RED + AppStrings.WARP_NOT_FOUND_PREFIX + ChatColor.WHITE + warpName);\n }\n retVal = true;\n }\n } else\n retVal = true;\n return retVal;\n}\n"
"public void selectionChanged(SelectionChangedEvent e) {\n StructuredSelection sel = (StructuredSelection) e.getSelection();\n xpath = getXpath(sel);\n xpathText.setText(xpath);\n if (getButton(IDialogConstants.OK_ID) != null)\n getButton(IDialogConstants.OK_ID).setEnabled(xpath.length() > 0);\n}\n"
"public static void sendNoSpacePacket(Entity player) {\n ByteBuf buf = Unpooled.buffer();\n ByteBufOutputStream out = new ByteBufOutputStream(buf);\n try {\n out.writeByte(2);\n out.writeInt(player.worldObj.provider.dimensionId);\n out.writeInt(player.getEntityId());\n } catch (IOException ignored) {\n }\n FMLProxyPacket packet = new FMLProxyPacket(buf, \"String_Node_Str\");\n Steamcraft.channel.sendToServer(packet);\n try {\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n}\n"
"final void appNotRespondingLocked(ProcessRecord app, HistoryRecord activity, HistoryRecord parent, final String annotation) {\n if (mShuttingDown || app.notResponding || app.crashing) {\n return;\n }\n EventLog.writeEvent(EventLogTags.AM_ANR, app.pid, app.processName, app.info.flags, annotation);\n ArrayList<Integer> pids = new ArrayList<Integer>(20);\n pids.add(app.pid);\n int parentPid = app.pid;\n if (parent != null && parent.app != null && parent.app.pid > 0)\n parentPid = parent.app.pid;\n if (parentPid != app.pid)\n pids.add(parentPid);\n if (MY_PID != app.pid && MY_PID != parentPid)\n pids.add(MY_PID);\n for (int i = mLruProcesses.size() - 1; i >= 0; i--) {\n ProcessRecord r = mLruProcesses.get(i);\n if (r != null && r.thread != null) {\n int pid = r.pid;\n if (pid > 0 && pid != app.pid && pid != parentPid && pid != MY_PID)\n pids.add(pid);\n }\n }\n File tracesFile = dumpStackTraces(pids);\n StringBuilder info = mStringBuilder;\n info.setLength(0);\n info.append(\"String_Node_Str\").append(app.processName);\n if (activity != null && activity.shortComponentName != null) {\n info.append(\"String_Node_Str\").append(activity.shortComponentName).append(\"String_Node_Str\");\n }\n info.append(\"String_Node_Str\");\n if (annotation != null) {\n info.append(\"String_Node_Str\").append(annotation).append(\"String_Node_Str\");\n }\n if (parent != null && parent != activity) {\n info.append(\"String_Node_Str\").append(parent.shortComponentName).append(\"String_Node_Str\");\n }\n String cpuInfo = null;\n if (MONITOR_CPU_USAGE) {\n updateCpuStatsNow();\n synchronized (mProcessStatsThread) {\n cpuInfo = mProcessStats.printCurrentState();\n }\n info.append(cpuInfo);\n }\n Slog.e(TAG, info.toString());\n if (tracesFile == null) {\n Process.sendSignal(app.pid, Process.SIGNAL_QUIT);\n }\n addErrorToDropBox(\"String_Node_Str\", app, activity, parent, annotation, cpuInfo, tracesFile, null);\n if (mController != null) {\n try {\n int res = mController.appNotResponding(app.processName, app.pid, info.toString());\n if (res != 0) {\n if (res < 0 && app.pid != MY_PID)\n Process.killProcess(app.pid);\n return;\n }\n } catch (RemoteException e) {\n mController = null;\n }\n }\n boolean showBackground = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.ANR_SHOW_BACKGROUND, 0) != 0;\n if (!showBackground && !app.isInterestingToUserLocked() && app.pid != MY_PID) {\n Process.killProcess(app.pid);\n return;\n }\n makeAppNotRespondingLocked(app, activity != null ? activity.shortComponentName : null, annotation != null ? \"String_Node_Str\" + annotation : \"String_Node_Str\", info.toString());\n Message msg = Message.obtain();\n HashMap map = new HashMap();\n msg.what = SHOW_NOT_RESPONDING_MSG;\n msg.obj = map;\n map.put(\"String_Node_Str\", app);\n if (activity != null) {\n map.put(\"String_Node_Str\", activity);\n }\n mHandler.sendMessage(msg);\n return;\n}\n"
"private HandlerCollection createHandlers() {\n WebAppContext ctx = new WebAppContext();\n ctx.setContextPath(\"String_Node_Str\");\n ctx.setWar(appBase);\n if (!Strings.isNullOrEmpty(webInfLocation)) {\n ctx.setDescriptor(webInfLocation);\n }\n HashLoginService loginService = new HashLoginService();\n loginService.setIdentityService(new DefaultIdentityService());\n ctx.getSecurityHandler().setLoginService(loginService);\n ctx.getSecurityHandler().setIdentityService(loginService.getIdentityService());\n HandlerList contexts = new HandlerList();\n contexts.setHandlers(new Handler[] { webAppContext });\n HandlerCollection result = new HandlerCollection();\n result.setHandlers(new Handler[] { contexts });\n return result;\n}\n"
"private int internalAddRow(ResultSet resultSet, int column) throws SQLException {\n RolapMember member = null;\n if (currMember != null) {\n member = currMember;\n } else {\n boolean checkCacheStatus = true;\n for (int i = 0; i <= levelDepth; i++) {\n RolapLevel childLevel = levels[i];\n if (childLevel.isAll()) {\n member = level.getHierarchy().getAllMember();\n continue;\n }\n Object value = resultSet.getObject(++column);\n if (value == null) {\n value = RolapUtil.sqlNullValue;\n }\n Object captionValue;\n if (childLevel.hasCaptionColumn()) {\n captionValue = resultSet.getObject(++column);\n } else {\n captionValue = null;\n }\n RolapMember parentMember = member;\n Object key = cache.makeKey(parentMember, value);\n member = cache.getMember(key, checkCacheStatus);\n checkCacheStatus = false;\n if (member == null) {\n member = memberBuilder.makeMember(parentMember, childLevel, value, captionValue, parentChild, resultSet, key, column);\n }\n if (!childLevel.getOrdinalExp().equals(childLevel.getKeyExp())) {\n ++column;\n }\n column += childLevel.getProperties().length;\n if (member != members[i]) {\n List<RolapMember> children = siblings[i + 1];\n if (children != null) {\n MemberChildrenConstraint mcc = constraint.getMemberChildrenConstraint(members[i]);\n if (mcc != null) {\n cache.putChildren(members[i], mcc, children);\n }\n MemberChildrenConstraint mcc = constraint.getMemberChildrenConstraint(member);\n List cachedChildren = cache.getChildrenFromCache(member, mcc);\n if (i < levelDepth && cachedChildren == null) {\n siblings[i + 1] = new ArrayList<RolapMember>();\n } else {\n siblings[i + 1] = null;\n }\n members[i] = member;\n if (siblings[i] != null) {\n if (value == RolapUtil.sqlNullValue) {\n addAsOldestSibling(siblings[i], member);\n } else {\n siblings[i].add(member);\n }\n }\n }\n }\n currMember = member;\n }\n list.add(member);\n return column;\n}\n"
"public Token parameter(String name, Map<String, Object> options) throws IllegalActionException, NameDuplicationException {\n if (name == null) {\n throw new IllegalActionException(this, \"String_Node_Str\");\n }\n Attribute parameter = getAttribute(name);\n if (parameter == null) {\n parameter = new Parameter(this, name);\n } else {\n if (parameter == script) {\n throw new NameDuplicationException(this, \"String_Node_Str\" + name);\n } else if (!(parameter instanceof Parameter)) {\n throw new NameDuplicationException(this, \"String_Node_Str\" + name);\n }\n }\n Token result = null;\n if (options != null) {\n Type ptType = null;\n Object type = options.get(\"String_Node_Str\");\n if (type instanceof String) {\n ptType = _typeAccessorToPtolemy((String) type, parameter);\n } else if (type != null) {\n throw new IllegalActionException(this, \"String_Node_Str\" + type);\n }\n if (ptType != null) {\n ((Parameter) parameter).setTypeEquals(ptType);\n }\n _setOptionsForSelect(parameter, options);\n Object value = options.get(\"String_Node_Str\");\n if (value != null && !parameter.isOverridden() && parameter.getDerivedLevel() == Integer.MAX_VALUE) {\n Object token;\n try {\n token = ((Invocable) _engine).invokeFunction(\"String_Node_Str\", value);\n } catch (Exception e) {\n throw new IllegalActionException(this, e, \"String_Node_Str\" + value);\n }\n if (token instanceof Token) {\n ((Parameter) parameter).setToken((Token) token);\n } else {\n throw new IllegalActionException(this, \"String_Node_Str\" + value);\n }\n parameter.setDerivedLevel(1);\n }\n if (parameter.isOverridden()) {\n result = ((Parameter) parameter).getToken();\n }\n Object visibility = options.get(\"String_Node_Str\");\n if (visibility instanceof String) {\n String generic = ((String) visibility).trim().toLowerCase();\n switch(generic) {\n case \"String_Node_Str\":\n if (parameter instanceof Variable) {\n ((Variable) parameter).setVisibility(Settable.NONE);\n }\n break;\n case \"String_Node_Str\":\n if (parameter instanceof Variable) {\n ((Variable) parameter).setVisibility(Settable.EXPERT);\n }\n break;\n case \"String_Node_Str\":\n if (parameter instanceof Variable) {\n ((Variable) parameter).setVisibility(Settable.NOT_EDITABLE);\n }\n break;\n default:\n if (parameter instanceof Variable) {\n ((Variable) parameter).setVisibility(Settable.FULL);\n }\n }\n }\n Object description = options.get(\"String_Node_Str\");\n if (description != null) {\n _setPortDescription(parameter, description.toString());\n }\n }\n if (_proxies.get(parameter) == null) {\n PortOrParameterProxy proxy = new PortOrParameterProxy(parameter);\n _proxies.put(parameter, proxy);\n _proxiesByName.put(parameter.getName(), proxy);\n }\n return result;\n}\n"
"public RefactoringStatus checkFinalConditions(IProgressMonitor progressMonitor) throws OperationCanceledException {\n clearChanges();\n RefactoringStatus status = new RefactoringStatus();\n try {\n progressMonitor.beginTask(RefactorResourcesUtils.getString(\"String_Node_Str\"), 2);\n for (IResource resource : getResources()) {\n addChange(resource, new RenameResourceChange(resource.getFullPath(), getNewResourceName()));\n IPath absPath = resource.getRawLocation().makeAbsolute();\n IPath destination = absPath.removeLastSegments(1).append(getNewResourceName());\n String destinationPath = destination.toOSString();\n PathPair pathPair = new PathPair(absPath.toOSString(), destinationPath);\n RelatedResourceCallback callback = new RelatedResourceCallback(pathPair);\n if (ModelUtil.isModelFile(resource)) {\n try {\n TextFileChange textFileChange = new TextFileChange(resource.getName(), (IFile) resource);\n RefactorResourcesUtils.calculateSQLChanges((IFile) resource, pathPair, textFileChange);\n if (textFileChange.getEdit() != null && textFileChange.getEdit().hasChildren()) {\n addChange(resource, textFileChange);\n }\n RefactorResourcesUtils.calculateRelatedVdbResources(resource, status, callback);\n } catch (Exception ex) {\n UiConstants.Util.log(ex);\n status.merge(RefactoringStatus.createFatalErrorStatus(ex.getMessage()));\n }\n }\n RefactorResourcesUtils.calculateRelatedResources(resource, status, callback, Relationship.DEPENDENT);\n }\n } finally {\n progressMonitor.done();\n }\n return status;\n}\n"
"protected Position handlePosition(Position position) {\n Device device = Context.getIdentityManager().getDeviceById(position.getDeviceId());\n String attributes = MiscFormatter.toJsonString(position.getAttributes());\n String request = url.replace(\"String_Node_Str\", device.getUniqueId()).replace(\"String_Node_Str\", String.valueOf(position.getDeviceId())).replace(\"String_Node_Str\", String.valueOf(position.getProtocol())).replace(\"String_Node_Str\", String.valueOf(position.getDeviceTime().getTime())).replace(\"String_Node_Str\", String.valueOf(position.getFixTime().getTime())).replace(\"String_Node_Str\", String.valueOf(position.getValid())).replace(\"String_Node_Str\", String.valueOf(position.getLatitude())).replace(\"String_Node_Str\", String.valueOf(position.getLongitude())).replace(\"String_Node_Str\", String.valueOf(position.getAltitude())).replace(\"String_Node_Str\", String.valueOf(position.getSpeed())).replace(\"String_Node_Str\", String.valueOf(position.getCourse())).replace(\"String_Node_Str\", calculateStatus(position));\n if (position.getAddress() != null) {\n try {\n request = request.replace(\"String_Node_Str\", URLEncoder.encode(position.getAddress(), \"String_Node_Str\"));\n } catch (UnsupportedEncodingException error) {\n Log.warning(error);\n }\n }\n if (request.contains(\"String_Node_Str\")) {\n try {\n request = request.replace(\"String_Node_Str\", URLEncoder.encode(attributes, \"String_Node_Str\"));\n } catch (UnsupportedEncodingException error) {\n Log.warning(error);\n }\n }\n if (request.contains(\"String_Node_Str\")) {\n request = request.replace(\"String_Node_Str\", formatSentence(position));\n }\n Context.getAsyncHttpClient().prepareGet(request).execute();\n return position;\n}\n"
"protected Object runMethod(Method m, Class<? extends Annotation> requiredAnnotation) throws NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException {\n Boolean findRequiredAnnotation = false;\n Boolean findAdapterOnMethod = false;\n NoAdapter noAdapter = NoAdapter.NO_ADAPTER;\n Annotation[] methodAnnotations = m.getAnnotations();\n Annotation[] classAnnotations = this.getClass().getAnnotations();\n LinkedList<Adapter> adapters = new LinkedList<>();\n Filter[] filters = new Filter[methodAnnotations.length + classAnnotations.length];\n int filterSize = 0;\n for (int i = 0; i < methodAnnotations.length + classAnnotations.length; i++) {\n Annotation annotation;\n if (i < methodAnnotations.length) {\n annotation = methodAnnotations[i];\n } else {\n annotation = classAnnotations[i - methodAnnotations.length];\n }\n Class<? extends Annotation> annotationClass = annotation.annotationType();\n if (annotationClass == requiredAnnotation) {\n findRequiredAnnotation = true;\n }\n Class<? extends Adapter> adapterClass = mapper.adapterMap.get(annotationClass);\n if (adapterClass != null) {\n Adapter adapter = newFromThis(adapterClass, Object.class, annotation);\n adapters.add(adapter);\n if (i < methodAnnotations.length) {\n findAdapterOnMethod = true;\n }\n }\n Class<? extends Filter> filterClass = mapper.filterMap.get(annotationClass);\n if (filterClass != null) {\n Filter filter = newFromThis(filterClass, Object.class, annotation);\n filters[filterSize++] = filter;\n }\n }\n if (!findRequiredAnnotation && requiredAnnotation != null) {\n return noAdapter;\n }\n if (this instanceof Handler && !findAdapterOnMethod) {\n return noAdapter;\n }\n for (Adapter adapter : adapters) {\n if (!adapter.match()) {\n return noAdapter;\n }\n }\n Object result = null;\n int filterI = 0;\n int injectorI;\n LinkedList<LinkedList<Injector>> injectors = new LinkedList<>();\n try {\n for (; filterI < filterSize; filterI++) {\n filters[filterI].context = context;\n filters[filterI].before();\n context = filters[filterI].context;\n }\n Parameter[] parameters = m.getParameters();\n Object[] args = new Object[parameters.length];\n for (injectorI = 0; injectorI < parameters.length; injectorI++) {\n Annotation[] annotations = parameters[injectorI].getAnnotations();\n Class parameterClass = parameters[injectorI].getType();\n LinkedList<Injector> paramInjectors = new LinkedList<>();\n injectors.addFirst(paramInjectors);\n Object var = null;\n for (Annotation annotation : annotations) {\n Class<? extends Annotation> annotationClass = annotation.annotationType();\n Class<? extends Injector> injectorClass = mapper.injectorMap.get(annotationClass);\n if (injectorClass == null) {\n continue;\n }\n Injector injector = newFromThis(injectorClass, parameterClass, annotation);\n injector.context = context;\n injector.variable = var;\n paramInjectors.addFirst(injector);\n injector.before();\n var = injector.variable;\n context = injector.context;\n if (context.exception != null) {\n throw context.exception;\n }\n }\n args[injectorI] = var;\n }\n result = m.invoke(this, args);\n if (this instanceof Handler) {\n context.result = result;\n }\n } catch (final InvocationTargetException e) {\n context.exception = (Exception) e.getCause();\n } catch (IllegalAccessException | InstantiationException | NoSuchMethodException e) {\n e.printStackTrace();\n } catch (Exception e) {\n context.exception = e;\n } finally {\n for (LinkedList<Injector> paramsInjectors : injectors) {\n for (Injector injector : paramsInjectors) {\n injector.context = context;\n injector.after();\n context = injector.context;\n }\n }\n for (Filter filter : runFilters) {\n filter.context = context;\n filter.after();\n context = filter.context;\n }\n }\n return result;\n}\n"
"public List<Pair<String, Object>> execute(Map<String, Object> params) {\n Long id = (Long) params.get(BaseCmd.Properties.ID.getName());\n Account account = (Account) params.get(BaseCmd.Properties.ACCOUNT_OBJ.getName());\n String accountName = (String) params.get(BaseCmd.Properties.ACCOUNT.getName());\n Long domainId = (Long) params.get(BaseCmd.Properties.DOMAIN_ID.getName());\n String name = (String) params.get(BaseCmd.Properties.NAME.getName());\n String state = (String) params.get(BaseCmd.Properties.STATE.getName());\n Long zoneId = (Long) params.get(BaseCmd.Properties.ZONE_ID.getName());\n Long podId = (Long) params.get(BaseCmd.Properties.POD_ID.getName());\n Long hostId = (Long) params.get(BaseCmd.Properties.HOST_ID.getName());\n String group = (String) params.get(BaseCmd.Properties.GROUP.getName());\n String keyword = (String) params.get(BaseCmd.Properties.KEYWORD.getName());\n Integer page = (Integer) params.get(BaseCmd.Properties.PAGE.getName());\n Integer pageSize = (Integer) params.get(BaseCmd.Properties.PAGESIZE.getName());\n Long accountId = null;\n Boolean isAdmin = false;\n if ((account == null) || isAdmin(account.getType())) {\n isAdmin = true;\n if (domainId != null) {\n if ((account != null) && !getManagementServer().isChildDomain(account.getDomainId(), domainId)) {\n throw new ServerApiException(BaseCmd.PARAM_ERROR, \"String_Node_Str\" + domainId + \"String_Node_Str\");\n }\n if (accountName != null) {\n account = getManagementServer().findActiveAccount(accountName, domainId);\n if (account == null) {\n throw new ServerApiException(BaseCmd.ACCOUNT_ERROR, \"String_Node_Str\" + accountName + \"String_Node_Str\" + domainId);\n }\n accountId = account.getId();\n }\n } else {\n domainId = ((account == null) ? DomainVO.ROOT_DOMAIN : account.getDomainId());\n }\n } else {\n accountName = account.getAccountName();\n accountId = account.getId();\n domainId = account.getDomainId();\n }\n Long[] accountIds = null;\n if (accountId != null) {\n accountIds = new Long[1];\n accountIds[0] = accountId;\n }\n Long startIndex = Long.valueOf(0);\n int pageSizeNum = 50;\n if (pageSize != null) {\n pageSizeNum = pageSize.intValue();\n }\n if (page != null) {\n int pageNum = page.intValue();\n if (pageNum > 0) {\n startIndex = Long.valueOf(pageSizeNum * (pageNum - 1));\n }\n }\n Criteria c = new Criteria(\"String_Node_Str\", Boolean.TRUE, startIndex, Long.valueOf(pageSizeNum));\n if (keyword != null) {\n c.addCriteria(Criteria.KEYWORD, keyword);\n } else {\n c.addCriteria(Criteria.ID, id);\n c.addCriteria(Criteria.NAME, name);\n c.addCriteria(Criteria.STATE, state);\n if (zoneId != null)\n c.addCriteria(Criteria.DATACENTERID, zoneId);\n if (group != null) {\n if (group.equals(\"String_Node_Str\"))\n c.addCriteria(Criteria.EMPTY_GROUP, group);\n else\n c.addCriteria(Criteria.GROUP, group);\n }\n if (isAdmin == true) {\n c.addCriteria(Criteria.DOMAINID, domainId);\n if (podId != null)\n c.addCriteria(Criteria.PODID, podId);\n c.addCriteria(Criteria.HOSTID, hostId);\n }\n }\n c.addCriteria(Criteria.ACCOUNTID, accountIds);\n c.addCriteria(Criteria.ISADMIN, isAdmin);\n List<? extends UserVm> virtualMachines = getManagementServer().searchForUserVMs(c);\n if (virtualMachines == null) {\n throw new ServerApiException(BaseCmd.VM_LIST_ERROR, \"String_Node_Str\" + accountName.toString());\n }\n Object[] vmTag = new Object[virtualMachines.size()];\n int i = 0;\n HashMap<Long, HostVO> hostMap = new HashMap<Long, HostVO>();\n List<HostVO> hostList = getManagementServer().listAllActiveHosts();\n for (HostVO hostVO : hostList) {\n hostMap.put(hostVO.getId(), hostVO);\n }\n for (UserVm vmInstance : virtualMachines) {\n List<Pair<String, Object>> vmData = new ArrayList<Pair<String, Object>>();\n AsyncJobVO asyncJob = getManagementServer().findInstancePendingAsyncJob(\"String_Node_Str\", vmInstance.getId());\n if (asyncJob != null) {\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.JOB_ID.getName(), asyncJob.getId().toString()));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.JOB_STATUS.getName(), String.valueOf(asyncJob.getStatus())));\n }\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.ID.getName(), Long.toString(vmInstance.getId())));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.NAME.getName(), vmInstance.getName()));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.CREATED.getName(), getDateString(vmInstance.getCreated())));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.IP_ADDRESS.getName(), vmInstance.getPrivateIpAddress()));\n if (vmInstance.getState() != null) {\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.STATE.getName(), vmInstance.getState().toString()));\n }\n Account acct = getManagementServer().findAccountById(Long.valueOf(vmInstance.getAccountId()));\n if (acct != null) {\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.ACCOUNT.getName(), acct.getAccountName()));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.DOMAIN_ID.getName(), Long.toString(acct.getDomainId())));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.DOMAIN.getName(), getManagementServer().findDomainIdById(acct.getDomainId()).getName()));\n }\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.HA_ENABLE.getName(), Boolean.valueOf(vmInstance.isHaEnabled()).toString()));\n if (vmInstance.getDisplayName() != null) {\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.DISPLAY_NAME.getName(), vmInstance.getDisplayName()));\n } else {\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.DISPLAY_NAME.getName(), vmInstance.getName()));\n }\n if (vmInstance.getGroup() != null) {\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.GROUP.getName(), vmInstance.getGroup()));\n }\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.ZONE_ID.getName(), Long.valueOf(vmInstance.getDataCenterId()).toString()));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.ZONE_NAME.getName(), getManagementServer().findDataCenterById(vmInstance.getDataCenterId()).getName()));\n if ((isAdmin == true) && (vmInstance.getHostId() != null)) {\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.HOST_ID.getName(), vmInstance.getHostId().toString()));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.HOST_NAME.getName(), getManagementServer().getHostBy(vmInstance.getHostId()).getName()));\n }\n VMTemplateVO template = getManagementServer().findTemplateById(vmInstance.getTemplateId());\n if (template != null) {\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.TEMPLATE_ID.getName(), Long.valueOf(vmInstance.getTemplateId()).toString()));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.TEMPLATE_NAME.getName(), template.getName()));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.TEMPLATE_DISPLAY_TEXT.getName(), template.getDisplayText()));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.PASSWORD_ENABLED.getName(), template.getEnablePassword()));\n } else {\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.TEMPLATE_ID.getName(), \"String_Node_Str\"));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.TEMPLATE_NAME.getName(), \"String_Node_Str\"));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.TEMPLATE_DISPLAY_TEXT.getName(), \"String_Node_Str\"));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.PASSWORD_ENABLED.getName(), false));\n }\n if (vmInstance.getIsoId() != null) {\n VMTemplateVO iso = getManagementServer().findTemplateById(vmInstance.getIsoId().longValue());\n if (iso != null) {\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.ISO_ID.getName(), Long.valueOf(vmInstance.getIsoId()).toString()));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.ISO_NAME.getName(), iso.getName()));\n }\n }\n ServiceOfferingVO offering = getManagementServer().findServiceOfferingById(vmInstance.getServiceOfferingId());\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.SERVICE_OFFERING_ID.getName(), Long.valueOf(vmInstance.getServiceOfferingId()).toString()));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.SERVICE_OFFERING_NAME.getName(), offering.getName()));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.CPU_NUMBER.getName(), Integer.valueOf(offering.getCpu()).toString()));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.CPU_SPEED.getName(), Integer.valueOf(offering.getSpeed()).toString()));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.MEMORY.getName(), Integer.valueOf(offering.getRamSize()).toString()));\n DecimalFormat decimalFormat = new DecimalFormat(\"String_Node_Str\");\n String cpuUsed = null;\n VmStats vmStats = getManagementServer().getVmStatistics(vmInstance.getId());\n if (vmStats != null) {\n float cpuUtil = (float) vmStats.getCPUUtilization();\n cpuUsed = decimalFormat.format(cpuUtil) + \"String_Node_Str\";\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.CPU_USED.getName(), cpuUsed));\n long networkKbRead = (long) vmStats.getNetworkReadKBs();\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.NETWORK_KB_READ.getName(), networkKbRead));\n long networkKbWrite = (long) vmStats.getNetworkWriteKBs();\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.NETWORK_KB_WRITE.getName(), networkKbWrite));\n }\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.GUEST_OS_ID.getName(), vmInstance.getGuestOSId()));\n GuestOSVO guestOs = getManagementServer().getGuestOs(vmInstance.getGuestOSId());\n if (guestOs != null)\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.OS_TYPE_ID.getName(), guestOs.getCategoryId()));\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.NETWORK_GROUP_LIST.getName(), getManagementServer().getNetworkGroupsNamesForVm(vmInstance.getId())));\n VolumeVO rootVolume = getManagementServer().findRootVolume(vmInstance.getId());\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.ROOT_DEVICE_ID.getName(), rootVolume.getDeviceId()));\n StoragePoolVO storagePool = getManagementServer().findPoolById(rootVolume.getPoolId());\n vmData.add(new Pair<String, Object>(BaseCmd.Properties.ROOT_DEVICE_TYPE.getName(), storagePool.getPoolType().toString()));\n vmTag[i++] = vmData;\n }\n List<Pair<String, Object>> returnTags = new ArrayList<Pair<String, Object>>();\n Pair<String, Object> vmTags = new Pair<String, Object>(\"String_Node_Str\", vmTag);\n returnTags.add(vmTags);\n return returnTags;\n}\n"
"private Query prepareInsertQuery() {\n QueryBuilder qb = QueryBuilder.insert();\n qb.from(getEntity().getGeneratedName());\n for (Field f : getEntity().getFields()) {\n boolean useField = true;\n if (f.isId()) {\n IdGenerationPolicy policy = MappingSession.getConfiguration().getIdGenerationPolicy();\n if (policy == IdGenerationPolicy.ORMAN_ID_GENERATOR)\n setEntityField(f, getEntity(), this, NativeIdGenerator.generate(f, this));\n if (policy == IdGenerationPolicy.DEFER_TO_DBMS)\n useField = false;\n }\n if (useField) {\n Object fieldVal = getEntityField(f, getEntity(), this);\n if (!f.isNullable() && fieldVal == null)\n throw new NotNullableFieldException(getEntity().getOriginalFullName(), f.getOriginalName());\n qb.set(f.getGeneratedName(), fieldVal);\n }\n }\n return qb.getQuery();\n}\n"
"private boolean isCompatiblePhpModuleNodeType(QName nodeTypeId) {\n if (nodeTypeId.equals(this.phpModule)) {\n return true;\n }\n if (nodeTypeId.toString().equals(this.phpModuleNodeTypeTOSCASpecificType.toString())) {\n return true;\n }\n return false;\n}\n"
"public static ThriftServer createServer(int serverIndex, BlurConfiguration configuration, boolean randomPort) throws Exception {\n Configuration config = new Configuration();\n TableContext.setSystemBlurConfiguration(configuration);\n TableContext.setSystemConfiguration(config);\n String bindAddress = configuration.get(BLUR_SHARD_BIND_ADDRESS);\n int bindPort = configuration.getInt(BLUR_SHARD_BIND_PORT, -1);\n bindPort += serverIndex;\n if (randomPort) {\n bindPort = 0;\n }\n TNonblockingServerSocket tNonblockingServerSocket = ThriftServer.getTNonblockingServerSocket(bindAddress, bindPort);\n if (randomPort) {\n bindPort = tNonblockingServerSocket.getServerSocket().getLocalPort();\n }\n int baseGuiPort = Integer.parseInt(configuration.get(BLUR_GUI_SHARD_PORT));\n final HttpJettyServer httpServer;\n if (baseGuiPort > 0) {\n int webServerPort = baseGuiPort + serverIndex;\n httpServer = new HttpJettyServer(bindPort, webServerPort, configuration.getInt(BLUR_CONTROLLER_BIND_PORT, -1), configuration.getInt(BLUR_SHARD_BIND_PORT, -1), configuration.getInt(BLUR_GUI_CONTROLLER_PORT, -1), configuration.getInt(BLUR_GUI_SHARD_PORT, -1), \"String_Node_Str\");\n } else {\n httpServer = null;\n }\n Set<Entry<String, String>> set = configuration.getProperties().entrySet();\n for (Entry<String, String> e : set) {\n String key = e.getKey();\n if (key.startsWith(\"String_Node_Str\")) {\n int index = key.lastIndexOf('.');\n int bufferSize = Integer.parseInt(key.substring(index + 1));\n long amount = Long.parseLong(e.getValue());\n BufferStore.initNewBuffer(bufferSize, amount);\n }\n }\n BlockCacheDirectoryFactory blockCacheDirectoryFactory;\n String blockCacheVersion = configuration.get(BLUR_SHARD_BLOCK_CACHE_VERSION, \"String_Node_Str\");\n long totalNumberOfBytes = configuration.getLong(BLUR_SHARD_BLOCK_CACHE_TOTAL_SIZE, VM.maxDirectMemory() - _64MB);\n if (blockCacheVersion.equals(\"String_Node_Str\")) {\n blockCacheDirectoryFactory = new BlockCacheDirectoryFactoryV1(configuration, totalNumberOfBytes);\n } else if (blockCacheVersion.equals(\"String_Node_Str\")) {\n blockCacheDirectoryFactory = new BlockCacheDirectoryFactoryV2(configuration, totalNumberOfBytes);\n } else {\n throw new RuntimeException(\"String_Node_Str\" + blockCacheVersion + \"String_Node_Str\");\n }\n LOG.info(\"String_Node_Str\", serverIndex, bindAddress + \"String_Node_Str\" + bindPort, randomPort);\n String nodeNameHostName = getNodeName(configuration, BLUR_SHARD_HOSTNAME);\n String nodeName = nodeNameHostName + \"String_Node_Str\" + bindPort;\n String zkConnectionStr = isEmpty(configuration.get(BLUR_ZOOKEEPER_CONNECTION), BLUR_ZOOKEEPER_CONNECTION);\n BlurQueryChecker queryChecker = new BlurQueryChecker(configuration);\n int sessionTimeout = configuration.getInt(BLUR_ZOOKEEPER_TIMEOUT, BLUR_ZOOKEEPER_TIMEOUT_DEFAULT);\n final ZooKeeper zooKeeper = ZkUtils.newZooKeeper(zkConnectionStr, sessionTimeout);\n String cluster = configuration.get(BLUR_CLUSTER_NAME, BLUR_CLUSTER);\n BlurUtil.setupZookeeper(zooKeeper, cluster);\n final ZookeeperClusterStatus clusterStatus = new ZookeeperClusterStatus(zooKeeper, configuration);\n final BlurIndexRefresher refresher = new BlurIndexRefresher();\n BlurFilterCache filterCache = getFilterCache(configuration);\n BlurIndexWarmup indexWarmup = BlurIndexWarmup.getIndexWarmup(configuration);\n DistributedLayoutFactory distributedLayoutFactory = DistributedLayoutFactoryImpl.getDistributedLayoutFactory(configuration, cluster, zooKeeper);\n long safeModeDelay = configuration.getLong(BLUR_SHARD_SAFEMODEDELAY, 60000);\n int shardOpenerThreadCount = configuration.getInt(BLUR_SHARD_OPENER_THREAD_COUNT, 16);\n int internalSearchThreads = configuration.getInt(BLUR_SHARD_WARMUP_THREAD_COUNT, 16);\n int warmupThreads = configuration.getInt(BLUR_SHARD_WARMUP_THREAD_COUNT, 16);\n int maxMergeThreads = configuration.getInt(BLUR_SHARD_MERGE_THREAD_COUNT, 3);\n final DistributedIndexServer indexServer = new DistributedIndexServer(config, zooKeeper, clusterStatus, indexWarmup, filterCache, blockCacheDirectoryFactory, distributedLayoutFactory, cluster, nodeName, safeModeDelay, shardOpenerThreadCount, internalSearchThreads, warmupThreads, maxMergeThreads);\n BooleanQuery.setMaxClauseCount(configuration.getInt(BLUR_MAX_CLAUSE_COUNT, 1024));\n int maxHeapPerRowFetch = configuration.getInt(BLUR_MAX_HEAP_PER_ROW_FETCH, 10000000);\n int remoteFetchCount = configuration.getInt(BLUR_CONTROLLER_REMOTE_FETCH_COUNT, 100);\n int fetchCount = configuration.getInt(BLUR_SHARD_FETCHCOUNT, 110);\n if (fetchCount + 1 <= remoteFetchCount) {\n LOG.warn(\"String_Node_Str\" + BLUR_SHARD_FETCHCOUNT + \"String_Node_Str\" + fetchCount + \"String_Node_Str\" + BLUR_CONTROLLER_REMOTE_FETCH_COUNT + \"String_Node_Str\" + remoteFetchCount + \"String_Node_Str\");\n }\n int indexManagerThreadCount = configuration.getInt(BLUR_INDEXMANAGER_SEARCH_THREAD_COUNT, 32);\n int mutateThreadCount = configuration.getInt(BLUR_INDEXMANAGER_MUTATE_THREAD_COUNT, 32);\n int facetThreadCount = configuration.getInt(BLUR_INDEXMANAGER_FACET_THREAD_COUNT, 16);\n long statusCleanupTimerDelay = TimeUnit.SECONDS.toMillis(10);\n final IndexManager indexManager = new IndexManager(indexServer, clusterStatus, filterCache, maxHeapPerRowFetch, fetchCount, indexManagerThreadCount, mutateThreadCount, statusCleanupTimerDelay, facetThreadCount);\n final BlurShardServer shardServer = new BlurShardServer();\n shardServer.setIndexServer(indexServer);\n shardServer.setIndexManager(indexManager);\n shardServer.setZookeeper(zooKeeper);\n shardServer.setClusterStatus(clusterStatus);\n shardServer.setQueryChecker(queryChecker);\n shardServer.setConfiguration(configuration);\n shardServer.setMaxRecordsPerRowFetchRequest(configuration.getInt(BLUR_MAX_RECORDS_PER_ROW_FETCH_REQUEST, 1000));\n shardServer.setConfiguration(configuration);\n shardServer.init();\n final TraceStorage traceStorage = setupTraceStorage(configuration);\n Trace.setStorage(traceStorage);\n Trace.setNodeName(nodeName);\n Iface iface = BlurUtil.wrapFilteredBlurServer(configuration, shardServer, true);\n iface = BlurUtil.recordMethodCallsAndAverageTimes(iface, Iface.class, false);\n iface = BlurUtil.runWithUser(iface, false);\n iface = BlurUtil.runTrace(iface, false);\n if (httpServer != null) {\n WebAppContext context = httpServer.getContext();\n context.addServlet(new ServletHolder(new TServlet(new Blur.Processor<Blur.Iface>(iface), new TJSONProtocol.Factory())), \"String_Node_Str\");\n context.addServlet(new ServletHolder(new JSONReporterServlet()), \"String_Node_Str\");\n if (enableJsonReporter) {\n JSONReporter.enable(\"String_Node_Str\", 1, TimeUnit.SECONDS, 60);\n }\n }\n int threadCount = configuration.getInt(BLUR_SHARD_SERVER_THRIFT_THREAD_COUNT, 32);\n ShardServerEventHandler eventHandler = new ShardServerEventHandler();\n final ThriftBlurShardServer server = new ThriftBlurShardServer();\n server.setNodeName(nodeName);\n server.setServerTransport(tNonblockingServerSocket);\n server.setThreadCount(threadCount);\n server.setIface(iface);\n server.setEventHandler(eventHandler);\n server.setAcceptQueueSizePerThread(configuration.getInt(BLUR_SHARD_THRIFT_ACCEPT_QUEUE_SIZE_PER_THREAD, 4));\n server.setMaxReadBufferBytes(configuration.getLong(BLUR_SHARD_THRIFT_MAX_READ_BUFFER_BYTES, Long.MAX_VALUE));\n server.setSelectorThreads(configuration.getInt(BLUR_SHARD_THRIFT_SELECTOR_THREADS, 2));\n server.setMaxFrameSize(config.getInt(BLUR_THRIFT_MAX_FRAME_SIZE, 16384000));\n BlurShutdown shutdown = new BlurShutdown() {\n public void shutdown() {\n ThreadWatcher threadWatcher = ThreadWatcher.instance();\n quietClose(traceStorage, refresher, server, shardServer, indexManager, indexServer, threadWatcher, clusterStatus, zooKeeper, httpServer);\n }\n };\n server.setShutdown(shutdown);\n new BlurServerShutDown().register(shutdown, zooKeeper);\n return server;\n}\n"
"public Object getValuesIndicatingNoEntry(DatabaseField key, boolean shouldReturnNodes) {\n XMLField field = convertToXMLField(key);\n NodeList nodeList = UnmarshalXPathEngine.getInstance().selectNodes(dom, field, field.getNamespaceResolver());\n if (null == nodeList) {\n return null;\n }\n int resultSize = nodeList.getLength();\n Vector result = new Vector(resultSize);\n if (resultSize == 0) {\n return result;\n }\n if (shouldReturnNodes) {\n for (int i = 0; i < resultSize; i++) {\n result.add(nodeList.item(i));\n }\n return result;\n }\n Node firstNode = nodeList.item(0);\n if ((firstNode == null) || (firstNode.getNodeType() != Node.ELEMENT_NODE)) {\n if (field.usesSingleNode() && (resultSize == 1)) {\n Node next = nodeList.item(0);\n if (next == null) {\n result.add(null);\n } else {\n Vector list = new Vector();\n String sourceObject = next.getNodeValue();\n StringTokenizer tokenizer = new StringTokenizer(sourceObject, \"String_Node_Str\");\n while (tokenizer.hasMoreElements()) {\n String token = tokenizer.nextToken();\n Object nextItem = convertValue((Element) next.getParentNode(), field, token);\n list.add(nextItem);\n }\n return list;\n }\n }\n for (int x = 0; x < resultSize; x++) {\n Node next = nodeList.item(x);\n if (next == null) {\n result.add(null);\n } else {\n result.add(getValueFromElement((Element) next.getParentNode(), next, field));\n }\n }\n } else {\n for (int x = 0; x < resultSize; x++) {\n result.add(buildNestedRow((Element) nodeList.item(x)));\n }\n }\n return result;\n}\n"
"private List<NetworkVO> listAccountSpecificAndZoneLevelNetworks(SearchCriteria<NetworkVO> sc, Filter searchFilter, String path, List<Long> permittedAccounts) {\n SearchCriteria<NetworkVO> ssc = _networksDao.createSearchCriteria();\n SearchCriteria<NetworkVO> accountSC = _networksDao.createSearchCriteria();\n if (!permittedAccounts.isEmpty()) {\n accountSC.addAnd(\"String_Node_Str\", SearchCriteria.Op.IN, permittedAccounts.toArray());\n }\n accountSC.addAnd(\"String_Node_Str\", SearchCriteria.Op.EQ, false);\n if (path != null) {\n Set<Long> allowedDomains = _domainMgr.getDomainChildrenIds(path);\n accountSC.addAnd(\"String_Node_Str\", SearchCriteria.Op.IN, allowedDomains.toArray());\n }\n ssc.addOr(\"String_Node_Str\", SearchCriteria.Op.SC, accountSC);\n SearchCriteria<NetworkVO> zoneSC = _networksDao.createSearchCriteria();\n zoneSC.addAnd(\"String_Node_Str\", SearchCriteria.Op.EQ, false);\n zoneSC.addAnd(\"String_Node_Str\", SearchCriteria.Op.EQ, true);\n ssc.addOr(\"String_Node_Str\", SearchCriteria.Op.SC, zoneSC);\n sc.addAnd(\"String_Node_Str\", SearchCriteria.Op.SC, ssc);\n return _networksDao.search(sc, searchFilter);\n}\n"
"public void testReplicators() throws Exception {\n statService = new StatServiceBuilder().setRecorder(recorder).addReplicator(replicator).addReplicator(replicator).addReplicator(new NoOpReplicator()).build();\n String[] names = Arry.array(\"String_Node_Str\", \"String_Node_Str\");\n int[] counts = Int.array(1, 2);\n long[] times = Lng.array(Timer.timer().now(), Timer.timer().now() + 2000);\n statService.recordAllCountsWithTimes(names, counts, times);\n ok = replicator.count.get() == 6 || die(replicator.count);\n ok = recorder.count == 0 || die(recorder.count);\n statService.process();\n statService.queueLimit();\n statService.queueEmpty();\n ok = recorder.count == 0 || die(recorder.count);\n statService.time(System.currentTimeMillis() + 61 * 1000);\n statService.process();\n ok = recorder.count == 2 || die(recorder.count);\n statService = new StatServiceBuilder().setRecorder(new NoOpRecorder()).addReplicator(replicator).addReplicator(replicator).addReplicator(new NoOpReplicator()).build();\n statService.time(System.currentTimeMillis() + 61 * 1000);\n statService.process();\n ok = recorder.count == 2 || die(recorder.count);\n}\n"
"protected void sleepInternal(long millis, int ns) throws InterruptedException {\n wakeupNanoTime = VM_Time.nanoTime() + (millis * (long) 1e6) + ns;\n VM_ThreadProxy proxy = new VM_ThreadProxy(this, wakeupNanoTime);\n if (sleepImpl(proxy)) {\n throw new InterruptedException(\"String_Node_Str\");\n }\n}\n"
"public boolean applies(GameEvent event, Ability source, Game game) {\n cardWasCycledThisTurn = false;\n cardHasCycling = false;\n if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD && !game.isSimulation()) {\n Player controller = game.getPlayer(source.getControllerId());\n AbandonedSarcophagusWatcher watcher = (AbandonedSarcophagusWatcher) game.getState().getWatchers().get(AbandonedSarcophagusWatcher.class.getSimpleName());\n Card card = game.getCard(event.getTargetId());\n if (card != null && watcher != null) {\n for (Ability ability : card.getAbilities()) {\n if (ability instanceof CyclingAbility) {\n cardHasCycling = true;\n }\n }\n Cards cards = watcher.getCardsCycledThisTurn(controller.getId());\n for (Card c : cards.getCards(game)) {\n if (c == card) {\n cardWasCycledThisTurn = true;\n watcher.getCardsCycledThisTurn(controller.getId()).remove(card);\n }\n }\n return (!cardWasCycledThisTurn && cardHasCycling);\n }\n }\n return false;\n}\n"
"private TwillController startTwillApplication(TwillRunnerService twillRunner, ServiceStore serviceStore, TokenSecureStoreRenewer secureStoreRenewer) {\n try {\n Path tempPath = Files.createDirectories(Paths.get(cConf.get(Constants.CFG_LOCAL_DATA_DIR), cConf.get(Constants.AppFabric.TEMP_DIR)).toAbsolutePath());\n final Path runDir = Files.createTempDirectory(tempPath, \"String_Node_Str\");\n try {\n Path logbackFile = saveLogbackConf(runDir.resolve(\"String_Node_Str\"));\n MasterTwillApplication masterTwillApp = new MasterTwillApplication(cConf, getServiceInstances(serviceStore, cConf));\n List<String> extraClassPath = masterTwillApp.prepareLocalizeResource(runDir, hConf);\n TwillPreparer preparer = twillRunner.prepare(masterTwillApp);\n if (!cConf.getBoolean(Constants.COLLECT_CONTAINER_LOGS)) {\n preparer.withConfiguration(Collections.singletonMap(Configs.Keys.LOG_COLLECTION_ENABLED, \"String_Node_Str\"));\n }\n if (Files.exists(logbackFile)) {\n preparer.withResources(logbackFile.toUri()).withEnv(Collections.singletonMap(\"String_Node_Str\", ApplicationConstants.LOG_DIR_EXPANSION_VAR));\n }\n String queueName = cConf.get(Constants.Service.SCHEDULER_QUEUE);\n if (queueName != null) {\n LOG.info(\"String_Node_Str\", queueName);\n preparer.setSchedulerQueue(queueName);\n }\n preparer.withDependencies(injector.getInstance(HBaseTableUtil.class).getClass());\n Class<? extends HBaseDDLExecutor> ddlExecutorClass = new HBaseDDLExecutorFactory(cConf, hConf).get().getClass();\n preparer.withDependencies(ddlExecutorClass);\n if (User.isHBaseSecurityEnabled(hConf) || UserGroupInformation.isSecurityEnabled()) {\n preparer.addSecureStore(YarnSecureStore.create(secureStoreRenewer.createCredentials()));\n }\n List<String> yarnAppClassPath = Arrays.asList(hConf.getTrimmedStrings(YarnConfiguration.YARN_APPLICATION_CLASSPATH, YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH));\n preparer.withApplicationClassPaths(yarnAppClassPath).withBundlerClassAcceptor(new HadoopClassExcluder());\n boolean yarnFirst = cConf.getBoolean(Constants.Explore.CONTAINER_YARN_APP_CLASSPATH_FIRST);\n if (yarnFirst) {\n preparer = preparer.withClassPaths(Iterables.concat(yarnAppClassPath, extraClassPath));\n } else {\n preparer = preparer.withClassPaths(extraClassPath);\n }\n if (cConf.getBoolean(Constants.Explore.EXPLORE_ENABLED)) {\n prepareExploreContainer(preparer);\n }\n preparer.setClassLoader(MainClassLoader.class.getName());\n TwillController controller = preparer.start(cConf.getLong(Constants.AppFabric.PROGRAM_MAX_START_SECONDS), TimeUnit.SECONDS);\n Runnable cleanup = new Runnable() {\n public void run() {\n try {\n File dir = runDir.toFile();\n if (dir.isDirectory()) {\n DirUtils.deleteDirectoryContents(dir);\n }\n } catch (IOException e) {\n LOG.warn(\"String_Node_Str\", runDir, e);\n }\n }\n };\n controller.onRunning(cleanup, Threads.SAME_THREAD_EXECUTOR);\n controller.onTerminated(cleanup, Threads.SAME_THREAD_EXECUTOR);\n return controller;\n } catch (Exception e) {\n try {\n DirUtils.deleteDirectoryContents(runDir.toFile());\n } catch (IOException ex) {\n LOG.warn(\"String_Node_Str\", runDir, ex);\n e.addSuppressed(ex);\n }\n throw e;\n }\n } catch (IOException e) {\n throw Throwables.propagate(e);\n }\n}\n"
"protected final void decode(ChannelHandlerContext ctx, FMLProxyPacket msg, List<Object> out) throws Exception {\n testMessageValidity(msg);\n ByteBuf payload = msg.payload();\n byte discriminator = payload.readByte();\n Class<? extends A> clazz = discriminators.get(discriminator);\n if (clazz == null) {\n throw new NullPointerException(\"String_Node_Str\" + discriminator + \"String_Node_Str\" + msg.channel());\n }\n A newMsg = clazz.newInstance();\n ctx.attr(INBOUNDPACKETTRACKER).get().set(msg);\n decodeInto(ctx, payload.slice(), newMsg);\n out.add(newMsg);\n}\n"
"public static void createBootImageObjects(Vector typeNames, String bootImageTypeNamesFile) throws IllegalAccessException, ClassNotFoundException {\n VM_Callbacks.notifyBootImage(typeNames.elements());\n if (verbose >= 1)\n say(\"String_Node_Str\");\n for (Enumeration e = typeNames.elements(); e.hasMoreElements(); ) {\n String typeName = (String) e.nextElement();\n if (verbose >= 4)\n say(\"String_Node_Str\", typeName);\n VM_Type type;\n try {\n VM_TypeReference tRef = VM_TypeReference.findOrCreate(typeName);\n type = tRef.resolve();\n } catch (NoClassDefFoundError ncdf) {\n ncdf.printStackTrace();\n fail(bootImageTypeNamesFile + \"String_Node_Str\" + typeName + \"String_Node_Str\" + ncdf);\n return;\n } catch (IllegalArgumentException ila) {\n ila.printStackTrace();\n fail(bootImageTypeNamesFile + \"String_Node_Str\" + typeName + \"String_Node_Str\" + ila);\n return;\n }\n type.markAsBootImageClass();\n typeName = typeName.replace('/', '.');\n if (typeName.startsWith(\"String_Node_Str\"))\n typeName = typeName.substring(1, typeName.length() - 1);\n bootImageTypes.put(typeName, type);\n }\n if (verbose >= 1)\n say(String.valueOf(bootImageTypes.size()), \"String_Node_Str\");\n if (verbose >= 1)\n say(\"String_Node_Str\");\n for (Enumeration e = bootImageTypes.elements(); e.hasMoreElements(); ) {\n VM_Type type = (VM_Type) e.nextElement();\n if (verbose >= 2)\n say(\"String_Node_Str\" + type);\n type.resolve();\n }\n VM_BootRecord bootRecord = VM_BootRecord.the_boot_record;\n VM_Class rvmBRType = getRvmType(bootRecord.getClass()).asClass();\n VM_Array intArrayType = VM_Array.getPrimitiveArrayType(10);\n int bp = bootImageAddress;\n bp += rvmBRType.getInstanceSize();\n int align = VM_ObjectModel.getAlignment(intArrayType);\n int offset = VM_ObjectModel.getOffsetForAlignment(intArrayType);\n int mod = (bp + offset) & (align - 1);\n int delta = (align - mod) & (align - 1);\n bp += delta;\n bp += intArrayType.getInstanceSize(0);\n bootRecord.tocRegister = VM_Address.fromIntZeroExtend(bp);\n if (verbose >= 1)\n say(\"String_Node_Str\");\n if (PARALLELIZE < 1) {\n int count = 0;\n for (Enumeration e = bootImageTypes.elements(); e.hasMoreElements(); ) {\n VM_Type type = (VM_Type) e.nextElement();\n count++;\n if (verbose >= 1)\n say(count + \"String_Node_Str\" + type);\n type.instantiate();\n }\n } else {\n if (verbose >= 1)\n say(\"String_Node_Str\" + PARALLELIZE + \"String_Node_Str\");\n BootImageWorker.startup(bootImageTypes.elements());\n BootImageWorker[] workers = new BootImageWorker[PARALLELIZE];\n for (int i = 0; i < workers.length; i++) {\n workers[i].id = i;\n workers[i].start();\n }\n try {\n for (int i = 0; i < workers.length; i++) workers[i].join();\n } catch (InterruptedException ie) {\n say(\"String_Node_Str\");\n }\n }\n VM_CodeArray[] functionTable = BuildJNIFunctionTable.buildTable();\n VM_JNIEnvironment.initFunctionTable(functionTable);\n if (verbose >= 1)\n say(\"String_Node_Str\");\n bootImageTypeFields = new HashMap(bootImageTypes.size());\n for (Enumeration e = bootImageTypes.elements(); e.hasMoreElements(); ) {\n VM_Type rvmType = (VM_Type) e.nextElement();\n FieldInfo fieldInfo;\n if (!rvmType.isClassType())\n continue;\n Class jdkType = getJdkType(rvmType);\n if (jdkType == null)\n continue;\n Key key = new Key(jdkType);\n fieldInfo = (FieldInfo) bootImageTypeFields.get(key);\n if (fieldInfo != null) {\n fieldInfo.rvmType = rvmType;\n } else {\n if (verbose >= 1)\n say(\"String_Node_Str\" + rvmType);\n fieldInfo = new FieldInfo();\n fieldInfo.jdkFields = jdkType.getDeclaredFields();\n fieldInfo.jdkType = jdkType;\n fieldInfo.rvmType = rvmType;\n bootImageTypeFields.put(key, fieldInfo);\n for (Class cls = jdkType.getSuperclass(); cls != null; cls = cls.getSuperclass()) {\n key = new Key(cls);\n fieldInfo = (FieldInfo) bootImageTypeFields.get(key);\n if (fieldInfo != null) {\n break;\n } else {\n if (verbose >= 1)\n say(\"String_Node_Str\" + jdkType);\n fieldInfo = new FieldInfo();\n fieldInfo.jdkFields = cls.getDeclaredFields();\n fieldInfo.jdkType = cls;\n fieldInfo.rvmType = null;\n bootImageTypeFields.put(key, fieldInfo);\n }\n }\n }\n }\n for (Iterator iter = bootImageTypeFields.values().iterator(); iter.hasNext(); ) {\n FieldInfo fieldInfo = (FieldInfo) iter.next();\n VM_Type rvmType = fieldInfo.rvmType;\n if (rvmType == null) {\n if (verbose >= 1)\n say(\"String_Node_Str\" + fieldInfo.jdkType);\n continue;\n }\n Class jdkType = fieldInfo.jdkType;\n if (verbose >= 1)\n say(\"String_Node_Str\" + rvmType);\n VM_Field[] rvmFields = rvmType.getStaticFields();\n fieldInfo.jdkStaticFields = new Field[rvmFields.length];\n for (int j = 0; j < rvmFields.length; j++) {\n String rvmName = rvmFields[j].getName().toString();\n for (int k = 0; k < fieldInfo.jdkFields.length; k++) {\n Field f = fieldInfo.jdkFields[k];\n if (f.getName().equals(rvmName)) {\n fieldInfo.jdkStaticFields[j] = f;\n f.setAccessible(true);\n break;\n }\n }\n }\n rvmFields = rvmType.getInstanceFields();\n fieldInfo.jdkInstanceFields = new Field[rvmFields.length];\n for (int j = 0; j < rvmFields.length; j++) {\n String rvmName = rvmFields[j].getName().toString();\n jdkType = getJdkType(rvmFields[j].getDeclaringClass());\n if (jdkType == null)\n continue;\n FieldInfo jdkFieldInfo = (FieldInfo) bootImageTypeFields.get(new Key(jdkType));\n if (jdkFieldInfo == null)\n continue;\n Field[] jdkFields = jdkFieldInfo.jdkFields;\n for (int k = 0; k < jdkFields.length; k++) {\n Field f = jdkFields[k];\n if (f.getName().equals(rvmName)) {\n fieldInfo.jdkInstanceFields[j] = f;\n f.setAccessible(true);\n break;\n }\n }\n }\n }\n int initProc = VM_Scheduler.PRIMORDIAL_PROCESSOR_ID;\n VM_Thread startupThread = new VM_Thread(new byte[STACK_SIZE_BOOT]);\n VM_Scheduler.processors[initProc].activeThread = startupThread;\n int idx = startupThread.stack.length - 1;\n if (VM.LittleEndian) {\n startupThread.stack[idx--] = (byte) 0xde;\n startupThread.stack[idx--] = (byte) 0xad;\n startupThread.stack[idx--] = (byte) 0xba;\n startupThread.stack[idx--] = (byte) 0xbe;\n } else {\n startupThread.stack[idx--] = (byte) 0xbe;\n startupThread.stack[idx--] = (byte) 0xba;\n startupThread.stack[idx--] = (byte) 0xad;\n startupThread.stack[idx--] = (byte) 0xde;\n }\n VM_ClassLoader.setVmRepositories(bootImageRepositoriesAtExecutionTime);\n if (verbose >= 1)\n say(\"String_Node_Str\");\n for (Enumeration e = bootImageTypes.elements(); e.hasMoreElements(); ) {\n VM_Type rvmType = (VM_Type) e.nextElement();\n if (verbose >= 1)\n say(\"String_Node_Str\", rvmType.toString());\n if (!rvmType.isClassType())\n continue;\n Class jdkType = getJdkType(rvmType);\n if (jdkType == null && verbose >= 1) {\n say(\"String_Node_Str\" + rvmType + \"String_Node_Str\");\n }\n VM_Field[] rvmFields = rvmType.getStaticFields();\n for (int j = 0; j < rvmFields.length; ++j) {\n VM_Field rvmField = rvmFields[j];\n VM_TypeReference rvmFieldType = rvmField.getType();\n int rvmFieldSlot = (rvmField.getOffset() >>> 2);\n String rvmFieldName = rvmField.getName().toString();\n Field jdkFieldAcc = null;\n if (jdkType != null)\n jdkFieldAcc = getJdkFieldAccessor(jdkType, j, STATIC_FIELD);\n if (jdkFieldAcc == null) {\n if (jdkType != null) {\n if (verbose >= 2)\n traceContext.push(rvmFieldType.toString(), jdkType.getName(), rvmFieldName);\n if (verbose >= 2)\n traceContext.traceFieldNotInHostJdk();\n if (verbose >= 2)\n traceContext.pop();\n }\n VM_Statics.setSlotContents(rvmFieldSlot, 0);\n if (!VM.runningTool)\n bootImage.countNulledReference();\n continue;\n }\n if (verbose >= 2)\n say(\"String_Node_Str\", String.valueOf(rvmFieldSlot), \"String_Node_Str\", rvmField.toString());\n if (rvmFieldType.isPrimitiveType()) {\n if (rvmFieldType.isBooleanType()) {\n VM_Statics.setSlotContents(rvmFieldSlot, jdkFieldAcc.getBoolean(null) ? 1 : 0);\n } else if (rvmFieldType.isByteType()) {\n VM_Statics.setSlotContents(rvmFieldSlot, jdkFieldAcc.getByte(null));\n } else if (rvmFieldType.isCharType()) {\n VM_Statics.setSlotContents(rvmFieldSlot, jdkFieldAcc.getChar(null));\n } else if (rvmFieldType.isShortType()) {\n VM_Statics.setSlotContents(rvmFieldSlot, jdkFieldAcc.getShort(null));\n } else if (rvmFieldType.isIntType()) {\n try {\n VM_Statics.setSlotContents(rvmFieldSlot, jdkFieldAcc.getInt(null));\n } catch (IllegalArgumentException ex) {\n System.err.println(\"String_Node_Str\" + rvmType + \"String_Node_Str\" + rvmField);\n throw ex;\n }\n } else if (rvmFieldType.isLongType()) {\n VM_Statics.setSlotContents(rvmFieldSlot, jdkFieldAcc.getLong(null));\n } else if (rvmFieldType.isFloatType()) {\n float f = jdkFieldAcc.getFloat(null);\n VM_Statics.setSlotContents(rvmFieldSlot, Float.floatToIntBits(f));\n } else if (rvmFieldType.isDoubleType()) {\n double d = jdkFieldAcc.getDouble(null);\n VM_Statics.setSlotContents(rvmFieldSlot, Double.doubleToLongBits(d));\n } else if (rvmFieldType.equals(VM_TypeReference.Address) || rvmFieldType.equals(VM_TypeReference.Word) || rvmFieldType.equals(VM_TypeReference.Extent) || rvmFieldType.equals(VM_TypeReference.Offset)) {\n Object o = jdkFieldAcc.get(null);\n VM_Address addr = (VM_Address) o;\n String msg = \"String_Node_Str\" + rvmField.toString();\n VM_Statics.setSlotContents(rvmFieldSlot, getAddressValue(addr, msg, true));\n } else if (rvmFieldType.equals(VM_TypeReference.Word)) {\n VM_Word w = (VM_Word) jdkFieldAcc.get(null);\n int val = w == null ? 0 : w.toInt();\n VM_Statics.setSlotContents(rvmFieldSlot, val);\n } else if (rvmFieldType.equals(VM_TypeReference.Offset)) {\n VM_Offset o = (VM_Offset) jdkFieldAcc.get(null);\n int val = o == null ? 0 : o.toInt();\n VM_Statics.setSlotContents(rvmFieldSlot, val);\n } else if (rvmFieldType.equals(VM_TypeReference.Extent)) {\n VM_Extent ex = (VM_Extent) jdkFieldAcc.get(null);\n int val = ex == null ? 0 : ex.toInt();\n VM_Statics.setSlotContents(rvmFieldSlot, val);\n } else {\n fail(\"String_Node_Str\" + rvmFieldType);\n }\n } else {\n Object o = jdkFieldAcc.get(null);\n if (verbose >= 3)\n say(\"String_Node_Str\", String.valueOf(VM_Magic.objectAsAddress(o).toInt()));\n VM_Statics.setSlotContents(rvmFieldSlot, VM_Magic.objectAsAddress(o).toInt());\n VM_Statics.setSlotContents(rvmFieldSlot, VM_Magic.objectAsAddress(o).toLong());\n }\n }\n }\n}\n"
"public Pointcut concretize1(ResolvedTypeX inAspect, IntMap bindings) {\n IfPointcut ret = new IfPointcut(testMethod, extraParameterFlags);\n partiallyConcretized = ret;\n if (bindings.directlyInAdvice()) {\n Advice advice = bindings.getEnclosingAdvice();\n ret.baseArgsCount = advice.getBaseParameterCount();\n ret.residueSource = advice.getPointcut().concretize(inAspect, ret.baseArgsCount, advice);\n } else {\n ResolvedPointcutDefinition def = bindings.peekEnclosingDefinitition();\n if (def == CflowPointcut.CFLOW_MARKER) {\n inAspect.getWorld().getMessageHandler().handleMessage(MessageUtil.error(\"String_Node_Str\", null));\n return Pointcut.makeMatchesNothing(Pointcut.CONCRETE);\n }\n ret.baseArgsCount = def.getParameterTypes().length;\n IntMap newBindings = IntMap.idMap(ret.baseArgsCount);\n newBindings.copyContext(bindings);\n ret.residueSource = def.getPointcut().concretize(inAspect, newBindings);\n }\n return ret;\n}\n"
"private void loadDeep() throws ServerException, UserException, BimServerClientException, PublicInterfaceNotFoundException {\n if (modelState != ModelState.FULLY_LOADED) {\n modelState = ModelState.LOADING;\n Long download = bimServerClient.getBimsie1ServiceInterface().download(roid, getIfcSerializerOid(), true, true);\n try {\n processDownload(download);\n modelState = ModelState.FULLY_LOADED;\n } catch (IfcModelInterfaceException | IOException e) {\n LOGGER.error(\"String_Node_Str\", e);\n }\n }\n}\n"
"public PointF getCenterOffsets() {\n return new PointF(mContentRect.centerX(), mContentRect.centerY());\n}\n"
"public int process(Buffer input, Buffer output) {\n if (!checkInputBuffer(input))\n return BUFFER_PROCESSED_FAILED;\n if (isEOM(input)) {\n propagateEOM(output);\n return BUFFER_PROCESSED_OK;\n }\n if (input.isDiscard() || frameProcessingControl.isMinimalProcessing()) {\n output.setDiscard(true);\n return BUFFER_PROCESSED_OK;\n }\n VideoFormat inputFormat = (VideoFormat) input.getFormat();\n Format thisInputFormat = getInputFormat();\n if ((inputFormat != thisInputFormat) && !inputFormat.equals(thisInputFormat)) {\n setInputFormat(inputFormat);\n }\n VideoFormat outputFormat = (VideoFormat) getOutputFormat();\n if (outputFormat == null) {\n outputFormat = (VideoFormat) output.getFormat();\n if (outputFormat == null)\n return BUFFER_PROCESSED_FAILED;\n }\n Dimension outputSize = outputFormat.getSize();\n if (outputSize == null) {\n outputSize = inputFormat.getSize();\n if (outputSize == null)\n return BUFFER_PROCESSED_FAILED;\n }\n int outputWidth = outputSize.width;\n int outputHeight = outputSize.height;\n if ((outputWidth < MIN_SWS_SCALE_HEIGHT_OR_WIDTH) || (outputHeight < MIN_SWS_SCALE_HEIGHT_OR_WIDTH)) {\n return OUTPUT_BUFFER_NOT_FILLED;\n }\n outputFormat = setSize(outputFormat, outputSize);\n if (outputFormat == null)\n return BUFFER_PROCESSED_FAILED;\n int dstFmt;\n int dstLength;\n if (outputFormat instanceof RGBFormat) {\n dstFmt = getFFmpegPixelFormat((RGBFormat) outputFormat);\n dstLength = (outputWidth * outputHeight * 4);\n } else if (outputFormat instanceof YUVFormat) {\n dstFmt = FFmpeg.PIX_FMT_YUV420P;\n dstLength = outputWidth * outputHeight + 2 * ((outputWidth + 1) / 2) * ((outputHeight + 1) / 2);\n } else\n return BUFFER_PROCESSED_FAILED;\n Class<?> outputDataType = outputFormat.getDataType();\n Object dst = output.getData();\n if (Format.byteArray.equals(outputDataType)) {\n if ((dst == null) || (((byte[]) dst).length < dstLength))\n dst = new byte[dstLength];\n } else if (Format.intArray.equals(outputDataType)) {\n dstLength = dstLength / 4 + ((dstLength % 4 == 0) ? 0 : 1);\n if ((dst == null) || (((int[]) dst).length < dstLength))\n dst = new int[dstLength];\n } else if (Format.shortArray.equals(outputDataType)) {\n dstLength = dstLength / 2 + ((dstLength % 2 == 0) ? 0 : 1);\n if ((dst == null) || (((short[]) dst).length < dstLength))\n dst = new short[dstLength];\n } else {\n logger.error(\"String_Node_Str\" + outputDataType);\n return BUFFER_PROCESSED_FAILED;\n }\n Dimension inputSize = inputFormat.getSize();\n if (inputSize == null)\n return BUFFER_PROCESSED_FAILED;\n int inputWidth = inputSize.width;\n int inputHeight = inputSize.height;\n if ((inputWidth < MIN_SWS_SCALE_HEIGHT_OR_WIDTH) || (inputHeight < MIN_SWS_SCALE_HEIGHT_OR_WIDTH))\n return OUTPUT_BUFFER_NOT_FILLED;\n Object src = input.getData();\n int srcFmt;\n long srcPicture;\n if (src instanceof AVFrame) {\n srcFmt = ((AVFrameFormat) inputFormat).getPixFmt();\n srcPicture = ((AVFrame) src).getPtr();\n } else {\n srcFmt = (inputFormat instanceof YUVFormat) ? FFmpeg.PIX_FMT_YUV420P : getFFmpegPixelFormat((RGBFormat) inputFormat);\n srcPicture = 0;\n }\n swsContext = FFmpeg.sws_getCachedContext(swsContext, inputWidth, inputHeight, srcFmt, outputWidth, outputHeight, dstFmt, FFmpeg.SWS_BICUBIC);\n if (srcPicture == 0) {\n FFmpeg.sws_scale(swsContext, src, srcFmt, inputWidth, inputHeight, 0, inputHeight, dst, dstFmt, outputWidth, outputHeight);\n } else {\n FFmpeg.sws_scale(swsContext, srcPicture, 0, inputHeight, dst, dstFmt, outputWidth, outputHeight);\n }\n output.setData(dst);\n output.setDuration(input.getDuration());\n output.setFlags(input.getFlags());\n output.setFormat(outputFormat);\n output.setLength(dstLength);\n output.setOffset(0);\n output.setSequenceNumber(input.getSequenceNumber());\n output.setTimeStamp(input.getTimeStamp());\n int inFlags = input.getFlags();\n int outFlags = output.getFlags();\n if ((inFlags & Buffer.FLAG_LIVE_DATA) != 0)\n outFlags |= Buffer.FLAG_LIVE_DATA;\n if ((inFlags & Buffer.FLAG_NO_WAIT) != 0)\n outFlags |= Buffer.FLAG_NO_WAIT;\n if ((inFlags & Buffer.FLAG_RELATIVE_TIME) != 0)\n outFlags |= Buffer.FLAG_RELATIVE_TIME;\n if ((inFlags & Buffer.FLAG_RTP_TIME) != 0)\n outFlags |= Buffer.FLAG_RTP_TIME;\n if ((inFlags & Buffer.FLAG_SYSTEM_TIME) != 0)\n outFlags |= Buffer.FLAG_SYSTEM_TIME;\n output.setFlags(outFlags);\n return BUFFER_PROCESSED_OK;\n}\n"