content
stringlengths
40
137k
"public static int getDrawerWidth(Resources res) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n if (res.getConfiguration().smallestScreenWidthDp >= 600 || res.getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {\n return (int) (320 * res.getDisplayMetrics().density);\n } else {\n return (int) (res.getDisplayMetrics().widthPixels - (56 * res.getDisplayMetrics().density));\n }\n } else {\n return (int) (res.getDisplayMetrics().widthPixels - (56 * res.getDisplayMetrics().density));\n }\n}\n"
"public void run() {\n try {\n while (true) {\n repOk();\n try {\n waitForQueued();\n sendQueued();\n } catch (IOException e) {\n if (_manager != null)\n _manager.remove(ManagedConnection.this);\n _runnerDied = true;\n return;\n }\n repOk();\n }\n repOk();\n }\n}\n"
"public ModelAndView search(NodeCond searchCondition) throws InvalidSearchConditionException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\" + searchCondition);\n }\n if (!searchCondition.checkValidity()) {\n LOG.error(\"String_Node_Str\" + searchCondition);\n throw new InvalidSearchConditionException();\n }\n List<SyncopeUser> matchingUsers = syncopeUserDAO.search(searchCondition);\n List<UserTO> result = new ArrayList<UserTO>(matchingUsers.size());\n for (SyncopeUser user : matchingUsers) {\n result.add(userDataBinder.getUserTO(user, userWorkflow));\n }\n return result;\n}\n"
"public void drawRadialGridLines(Graphics2D g2, PolarPlot plot, ValueAxis radialAxis, List<ValueTick> ticks, Rectangle2D dataArea) {\n g2.setFont(radialAxis.getTickLabelFont());\n g2.setPaint(plot.getRadiusGridlinePaint());\n g2.setStroke(plot.getRadiusGridlineStroke());\n double centerValue;\n if (radialAxis.isInverted()) {\n centerValue = radialAxis.getUpperBound();\n } else {\n centerValue = radialAxis.getLowerBound();\n }\n Point center = plot.translateToJava2D(0, centerValue, radialAxis, dataArea);\n for (ValueTick tick : ticks) {\n double angleDegrees = plot.isCounterClockwise() ? plot.getAngleOffset() : -plot.getAngleOffset();\n Point p = plot.translateToJava2D(angleDegrees, ((NumberTick) tick).getNumber().doubleValue(), radialAxis, dataArea);\n int r = p.x - center.x;\n int upperLeftX = center.x - r;\n int upperLeftY = center.y - r;\n int d = 2 * r;\n Ellipse2D ring = new Ellipse2D.Double(upperLeftX, upperLeftY, d, d);\n g2.setPaint(plot.getRadiusGridlinePaint());\n g2.draw(ring);\n }\n}\n"
"protected void handleDebuggingIntent(Intent intent, Context context, boolean showMessage) {\n switch(intent.getIntExtra(SensorbergServiceMessage.EXTRA_GENERIC_TYPE, -1)) {\n case SensorbergServiceMessage.MSG_TYPE_DISABLE_LOGGING:\n {\n Logger.log = Logger.QUIET_LOG;\n transport.setLoggingEnabled(false);\n if (intent.getBooleanExtra(SensorbergServiceMessage.EXTRA_SHOW_MESSAGE, false)) {\n Toast.makeText(context, \"String_Node_Str\" + context.getPackageName(), Toast.LENGTH_SHORT).show();\n }\n break;\n }\n case SensorbergServiceMessage.MSG_TYPE_ENABLE_LOGGING:\n {\n Logger.enableVerboseLogging();\n transport.setLoggingEnabled(true);\n if (showMessage) {\n Toast.makeText(context, \"String_Node_Str\" + context.getPackageName(), Toast.LENGTH_SHORT).show();\n }\n break;\n }\n }\n}\n"
"public void testEntityOptions() throws URISyntaxException {\n final EntityResource entityResource = new EntityResource();\n entityResource.setPersistenceFactory(factory);\n final Response response = entityResource.getEntityOptions(version, pu, \"String_Node_Str\", TestHttpHeaders.generateHTTPHeader(MediaType.APPLICATION_JSON_TYPE, MediaType.APPLICATION_JSON), new TestURIInfo());\n assertTrue(response.getMetadata().containsKey(\"String_Node_Str\"));\n final String link = \"String_Node_Str\" + RestUtils.getServerURI(context.getVersion()) + context.getName() + \"String_Node_Str\";\n assertTrue(response.getMetadata().get(\"String_Node_Str\").get(0).equals(link));\n}\n"
"private static void visualizeWithTextArea(RenderedImage ri, String title, final int textFields, final int index, final boolean displayImage) {\n StringBuffer sb = new StringBuffer();\n switch(textFields) {\n case TextType.ONLY_IMAGE_METADATA:\n sb.append(\"String_Node_Str\").append(title);\n break;\n case TextType.ONLY_STREAM_METADATA:\n sb.append(\"String_Node_Str\");\n break;\n case TextType.STREAM_AND_IMAGE_METADATA:\n sb.append(\"String_Node_Str\").append(title);\n break;\n case TextType.PROJECT_AND_GEOTRANSF:\n sb.append(\"String_Node_Str\").append(title);\n break;\n case TextType.EVERYTHING:\n sb.append(\"String_Node_Str\").append(title);\n break;\n }\n final JFrame frame = new JFrame(title);\n frame.getContentPane().setLayout(new BorderLayout());\n String textPosition = BorderLayout.PAGE_START;\n if (displayImage) {\n frame.getContentPane().add(new ScrollingImagePanel(ri, 640, 480));\n textPosition = BorderLayout.LINE_START;\n }\n JLabel label = new JLabel(sb.toString());\n frame.getContentPane().add(label, textPosition);\n JTextArea textArea = new JTextArea();\n if (textFields == TextType.PROJECT_AND_GEOTRANSF)\n textArea.setText(buildCRSProperties(ri, index));\n else if (textFields != TextType.EVERYTHING)\n textArea.setText(buildMetadataText(ri, textFields, index));\n else\n textArea.setText(new StringBuffer(buildMetadataText(ri, textFields, index).toString()).append(newLine).append(buildCRSProperties(ri, index)).toString());\n textArea.setEditable(false);\n frame.getContentPane().add(textArea);\n frame.getContentPane().add(new JScrollPane(textArea), BorderLayout.PAGE_END);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n frame.pack();\n frame.setSize(1024, 768);\n frame.setVisible(true);\n }\n });\n}\n"
"public static void inject(int splitPoint) {\n if (leftoversLoaded) {\n startLoadingFragment(splitPoint);\n return;\n }\n if (baseLoading || leftoversLoading) {\n waitingForLeftovers.add(splitPoint);\n return;\n }\n baseLoading = true;\n logEventProgress(LwmLabels.downloadGroup(splitPoint), LwmLabels.BEGIN, baseFragmentNumber(splitPoint), null);\n startLoadingFragment(baseFragmentNumber(splitPoint));\n}\n"
"public void loadProperties(String propertyPath) {\n InputStream in = null;\n try {\n in = getClass().getResourceAsStream(propertyPath);\n if (in != null) {\n logger.debug(\"String_Node_Str\", propertyPath);\n Properties prop = new Properties();\n prop.load(in);\n String port = prop.getProperty(\"String_Node_Str\");\n if (port != null) {\n arangoHosts.get(0).setPort(Integer.parseInt(port));\n }\n String host = prop.getProperty(\"String_Node_Str\");\n if (host != null) {\n arangoHosts.get(0).setHost(host);\n }\n String arangoHost = prop.getProperty(\"String_Node_Str\");\n if (arangoHost != null) {\n ArangoHost ah = parseArangoHost(arangoHost);\n if (ah != null) {\n arangoHosts.get(0).setHost(ah.getHost());\n arangoHosts.get(0).setPort(ah.getPort());\n }\n }\n String fallbackArangoHost = prop.getProperty(\"String_Node_Str\");\n if (fallbackArangoHost != null) {\n ArangoHost ah = parseArangoHost(fallbackArangoHost);\n if (ah != null) {\n addFallbackArangoHost(ah);\n }\n }\n String timeout = prop.getProperty(\"String_Node_Str\");\n if (timeout != null) {\n setTimeout(Integer.parseInt(timeout));\n }\n String connectionTimeout = prop.getProperty(\"String_Node_Str\");\n if (connectionTimeout != null) {\n setConnectionTimeout(Integer.parseInt(connectionTimeout));\n }\n String proxyHost = prop.getProperty(\"String_Node_Str\");\n if (proxyHost != null) {\n setProxyHost(proxyHost);\n }\n String proxyPort = prop.getProperty(\"String_Node_Str\");\n if (proxyPort != null) {\n setProxyPort(Integer.parseInt(proxyPort));\n }\n String maxPerConnection = prop.getProperty(\"String_Node_Str\");\n if (maxPerConnection != null) {\n setMaxPerConnection(Integer.parseInt(maxPerConnection));\n }\n String maxTotalConnection = prop.getProperty(\"String_Node_Str\");\n if (maxTotalConnection != null) {\n setMaxTotalConnection(Integer.parseInt(maxTotalConnection));\n }\n String retryCount = prop.getProperty(\"String_Node_Str\");\n if (retryCount != null) {\n setRetryCount(Integer.parseInt(retryCount));\n }\n String connnectRetryCount = prop.getProperty(\"String_Node_Str\");\n if (connnectRetryCount != null) {\n setConnectRetryCount(Integer.parseInt(connnectRetryCount));\n }\n String connectRetryWait = prop.getProperty(\"String_Node_Str\");\n if (connectRetryWait != null) {\n setConnectRetryWait(Integer.parseInt(connectRetryWait));\n }\n String user = prop.getProperty(\"String_Node_Str\");\n if (user != null) {\n setUser(user);\n }\n String password = prop.getProperty(\"String_Node_Str\");\n if (password != null) {\n setPassword(password);\n }\n String defaultDatabase = prop.getProperty(\"String_Node_Str\");\n if (defaultDatabase != null) {\n setDefaultDatabase(defaultDatabase);\n }\n String enableCURLLogger = prop.getProperty(\"String_Node_Str\");\n if (enableCURLLogger != null) {\n setEnableCURLLogger(Boolean.parseBoolean(enableCURLLogger));\n }\n String staleConnectionCheck = prop.getProperty(\"String_Node_Str\");\n if (staleConnectionCheck != null) {\n setStaleConnectionCheck(Boolean.parseBoolean(staleConnectionCheck));\n }\n String batchSize = prop.getProperty(\"String_Node_Str\");\n if (batchSize != null) {\n setBatchSize(Integer.parseInt(batchSize));\n }\n String useSsl = prop.getProperty(\"String_Node_Str\");\n if (useSsl != null) {\n setUseSsl(Boolean.parseBoolean(useSsl));\n }\n String sslTrustStore = prop.getProperty(\"String_Node_Str\");\n if (sslTrustStore != null) {\n setSslTrustStore(sslTrustStore);\n }\n }\n }\n String fallbackArangoHost = prop.getProperty(\"String_Node_Str\");\n if (fallbackArangoHost != null) {\n ArangoHost ah = parseArangoHost(fallbackArangoHost);\n if (ah != null) {\n addFallbackArangoHost(ah);\n }\n }\n}\n"
"public AccountInfo getAccountInformation(Account account) throws Exception {\n AccountInfo ai = new AccountInfo(this, account);\n this.setBrowserExclusive();\n try {\n login(account);\n } catch (PluginException e) {\n ai.setValid(false);\n return ai;\n }\n if (!UserInfo.containsKey(\"String_Node_Str\")) {\n ai.setValid(false);\n return ai;\n }\n if (!UserInfo.containsKey(\"String_Node_Str\")) {\n ai.setValid(true);\n ai.setStatus(\"String_Node_Str\");\n return ai;\n }\n Date d = new Date(Long.parseLong(UserInfo.get(\"String_Node_Str\")) * 1000l);\n if (d.compareTo(new Date()) >= 0) {\n ai.setValid(true);\n } else {\n ai.setValid(true);\n ai.setStatus(\"String_Node_Str\");\n }\n ai.setValidUntil(d.getTime());\n return ai;\n}\n"
"public boolean execute(final PlotPlayer plr, String... args) {\n final ArrayList<Plot> plots = PlotSquared.sortPlots(PlotSquared.getPlots(plr), plr.getLocation().getWorld());\n if (plots.size() == 1) {\n MainUtil.teleportPlayer(plr, plr.getLocation(), plots.get(0));\n return true;\n } else if (plots.size() > 1) {\n if (args.length < 1) {\n args = new String[] { \"String_Node_Str\" };\n }\n int id = 0;\n try {\n id = Integer.parseInt(args[0]);\n } catch (final Exception e) {\n Plot temp;\n if ((temp = isAlias(args[0])) != null) {\n if (temp.hasOwner()) {\n if (temp.isOwner(plr.getUUID())) {\n MainUtil.teleportPlayer(plr, plr.getLocation(), temp);\n return true;\n }\n }\n MainUtil.sendMessage(plr, C.NOT_YOUR_PLOT);\n return false;\n }\n MainUtil.sendMessage(plr, C.NOT_VALID_NUMBER);\n return true;\n }\n if ((id > (plots.size())) || (id < 1)) {\n MainUtil.sendMessage(plr, C.NOT_VALID_NUMBER);\n return false;\n }\n MainUtil.teleportPlayer(plr, plr.getLocation(), plots.get(id - 1));\n return true;\n } else {\n MainUtil.sendMessage(plr, C.FOUND_NO_PLOTS);\n return true;\n }\n}\n"
"private void updateAnalysisTypes(DataSetViewData[] viewDatas, boolean updateFlag) {\n for (int i = 0; i < viewDatas.length; i++) {\n DataSetViewData item = viewDatas[i];\n ColumnHintHandle hint = findColumnHint(item);\n if (hint != null) {\n try {\n String analysis = hint.getAnalysis();\n String defaultAnalysis = getDefaultAnalysisType(item.getName(), item.getDataTypeName());\n if (analysis == null && getDefaultAnalysisForNullValue && updateFlag) {\n hint.setAnalysis(ExternalUIUtil.getDefaultAnalysisType(item.getDataTypeName()));\n }\n } catch (SemanticException e) {\n ExceptionHandler.handle(e);\n }\n item.setAnalysis(hint.getAnalysis());\n }\n }\n}\n"
"protected TreeNode addElement(TreeNode lastTreeNode, String lastXmlPath, XMLFileNode xmlFilenode) {\n String newPath = xmlFilenode.getXMLPath();\n String defaultValue = xmlFilenode.getDefaultValue();\n String name = newPath.substring(newPath.lastIndexOf(\"String_Node_Str\") + 1);\n String parentPath = newPath.substring(0, newPath.lastIndexOf(\"String_Node_Str\"));\n TreeNode temp = createModel();\n temp.setName(name);\n temp.setDefaultValue(defaultValue);\n temp.setNodeType(NodeType.ELEMENT);\n if (lastTreeNode == schemaNode) {\n temp.setXpath(XmlMapUtil.getXPath(lastTreeNode.getXpath(), temp.getName(), temp.getNodeType()));\n return temp;\n }\n if (lastXmlPath.equals(parentPath)) {\n temp.setXpath(XmlMapUtil.getXPath(lastTreeNode.getXpath(), temp.getName(), temp.getNodeType()));\n EList<TreeNode> children = lastTreeNode.getChildren();\n int childrenSize = children.size();\n int index = childrenSize;\n int order = xmlFilenode.getOrder();\n for (int i = 0; i < childrenSize; i++) {\n TreeNode treeNode = children.get(i);\n XMLFileNode xmlFileNode = nodeMap.get(treeNode);\n if (xmlFileNode != null) {\n if (order < xmlFileNode.getOrder()) {\n index = children.indexOf(treeNode);\n break;\n }\n }\n }\n if (index == childrenSize) {\n children.add(temp);\n } else {\n children.add(index, temp);\n }\n nodeMap.put(temp, xmlFilenode);\n } else {\n String[] nods = lastXmlPath.split(\"String_Node_Str\");\n String[] newNods = parentPath.split(\"String_Node_Str\");\n int parentLevel = 0;\n int checkLength = nods.length < newNods.length ? nods.length : newNods.length;\n for (int i = 1; i < checkLength; i++) {\n if (nods[i].equals(newNods[i])) {\n parentLevel = i;\n }\n }\n TreeNode parent = lastTreeNode;\n for (int i = 0; i < nods.length - (parentLevel + 1); i++) {\n TreeNode tmpParent = (TreeNode) parent.eContainer();\n if (tmpParent == null) {\n break;\n }\n parent = tmpParent;\n }\n if (parent != null) {\n temp.setXpath(XmlMapUtil.getXPath(parent.getXpath(), temp.getName(), temp.getNodeType()));\n EList<TreeNode> children = parent.getChildren();\n int childrenSize = children.size();\n int index = childrenSize - 1;\n int order = xmlFilenode.getOrder();\n for (int i = 0; i < childrenSize; i++) {\n TreeNode treeNode = children.get(i);\n XMLFileNode xmlFileNode = nodeMap.get(treeNode);\n if (xmlFileNode != null) {\n if (order < xmlFileNode.getOrder()) {\n index = children.indexOf(treeNode);\n break;\n }\n }\n }\n if (index == childrenSize - 1) {\n children.add(temp);\n } else {\n children.add(index, temp);\n }\n nodeMap.put(temp, xmlFilenode);\n }\n }\n return temp;\n}\n"
"public int getOwnOptionInteger(String optionName, String world, int defaultValue) {\n String option = this.getOwnOption(optionName, world, Integer.toString(defaultValue));\n try {\n return Integer.parseInt(option);\n } catch (NumberFormatException ignore) {\n }\n return defaultValue;\n}\n"
"private static String subscribeToLb(String cartridgeType, String loadBalancedCartridgeType, String lbAlias, String defaultAutoscalingPolicy, String deploymentPolicy, ConfigurationContext configurationContext, String userName, String tenantDomain, Property[] props) throws ADCException {\n CartridgeSubscription cartridgeSubscription;\n try {\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + cartridgeType + \"String_Node_Str\" + lbAlias);\n }\n SubscriptionData subscriptionData = new SubscriptionData();\n subscriptionData.setCartridgeType(cartridgeType);\n subscriptionData.setCartridgeAlias(lbAlias.trim());\n subscriptionData.setAutoscalingPolicyName(defaultAutoscalingPolicy);\n subscriptionData.setDeploymentPolicyName(deploymentPolicy);\n subscriptionData.setTenantDomain(tenantDomain);\n subscriptionData.setTenantId(ApplicationManagementUtil.getTenantId(configurationContext));\n subscriptionData.setTenantAdminUsername(userName);\n subscriptionData.setRepositoryType(\"String_Node_Str\");\n subscriptionData.setPrivateRepository(false);\n cartridgeSubscription = cartridgeSubsciptionManager.subscribeToCartridgeWithProperties(subscriptionData);\n cartridgeSubscription.getPayloadData().add(\"String_Node_Str\", loadBalancedCartridgeType);\n Properties lbProperties = new Properties();\n lbProperties.setProperties(props);\n cartridgeSubsciptionManager.registerCartridgeSubscription(cartridgeSubscription, lbProperties);\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + cartridgeType + \"String_Node_Str\" + lbAlias);\n }\n } catch (Exception e) {\n String msg = \"String_Node_Str\" + cartridgeType;\n log.error(msg, e);\n throw new ADCException(msg, e);\n }\n return cartridgeSubscription.getClusterDomain();\n}\n"
"public void onTaskStackChanged() {\n RecentsConfiguration config = Recents.getConfiguration();\n if (config.svelteLevel == RecentsConfiguration.SVELTE_NONE) {\n RecentsTaskLoader loader = Recents.getTaskLoader();\n SystemServicesProxy ssp = Recents.getSystemServices();\n ActivityManager.RunningTaskInfo runningTaskInfo = ssp.getRunningTask();\n RecentsTaskLoadPlan plan = loader.createLoadPlan(mContext);\n loader.preloadTasks(plan, -1, false);\n RecentsTaskLoadPlan.Options launchOpts = new RecentsTaskLoadPlan.Options();\n if (runningTaskInfo != null) {\n launchOpts.runningTaskId = runningTaskInfo.id;\n }\n launchOpts.numVisibleTasks = 2;\n launchOpts.numVisibleTaskThumbnails = 2;\n launchOpts.onlyLoadForCache = true;\n launchOpts.onlyLoadPausedActivities = true;\n loader.loadTasks(mContext, plan, launchOpts);\n }\n}\n"
"public static String getCategoryDisplayName(String categoryId) {\n if (containCategory(categoryId)) {\n return categoryMap.get(categoryId);\n }\n return categoryId;\n}\n"
"public void testGrandTotal() throws Exception {\n ICubeQueryDefinition cqd = new CubeQueryDefinition(cubeName);\n IEdgeDefinition columnEdge = cqd.createEdge(ICubeQueryDefinition.COLUMN_EDGE);\n IEdgeDefinition rowEdge = cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);\n IDimensionDefinition dim1 = columnEdge.createDimension(\"String_Node_Str\");\n IHierarchyDefinition hier1 = dim1.createHierarchy(\"String_Node_Str\");\n ILevelDefinition level11 = hier1.createLevel(\"String_Node_Str\");\n ILevelDefinition level12 = hier1.createLevel(\"String_Node_Str\");\n IDimensionDefinition dim2 = rowEdge.createDimension(\"String_Node_Str\");\n IHierarchyDefinition hier2 = dim2.createHierarchy(\"String_Node_Str\");\n ILevelDefinition level21 = hier2.createLevel(\"String_Node_Str\");\n cqd.createMeasure(\"String_Node_Str\");\n IBinding binding1 = new Binding(\"String_Node_Str\");\n binding1.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding1);\n IBinding binding2 = new Binding(\"String_Node_Str\");\n binding2.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding2);\n IBinding binding4 = new Binding(\"String_Node_Str\");\n binding4.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding4);\n IBinding binding5 = new Binding(\"String_Node_Str\");\n binding5.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(binding5);\n IBinding binding6 = new Binding(\"String_Node_Str\");\n binding6.setExpression(new ScriptExpression(\"String_Node_Str\"));\n binding6.setAggrFunction(IBuildInAggregation.TOTAL_SUM_FUNC);\n binding6.addAggregateOn(\"String_Node_Str\");\n cqd.addBinding(binding6);\n IBinding binding7 = new Binding(\"String_Node_Str\");\n binding7.setExpression(new ScriptExpression(\"String_Node_Str\"));\n binding7.setAggrFunction(IBuildInAggregation.TOTAL_SUM_FUNC);\n binding7.addAggregateOn(\"String_Node_Str\");\n binding7.addAggregateOn(\"String_Node_Str\");\n cqd.addBinding(binding7);\n IBinding binding8 = new Binding(\"String_Node_Str\");\n binding8.setExpression(new ScriptExpression(\"String_Node_Str\"));\n binding8.setAggrFunction(IBuildInAggregation.TOTAL_SUM_FUNC);\n cqd.addBinding(binding8);\n CubeSortDefinition sorter1 = new CubeSortDefinition();\n sorter1.setExpression(\"String_Node_Str\");\n sorter1.setSortDirection(ISortDefinition.SORT_DESC);\n sorter1.setTargetLevel(level21);\n CubeSortDefinition sorter2 = new CubeSortDefinition();\n sorter2.setExpression(\"String_Node_Str\");\n sorter2.setSortDirection(ISortDefinition.SORT_DESC);\n sorter2.setTargetLevel(level11);\n CubeSortDefinition sorter3 = new CubeSortDefinition();\n sorter3.setExpression(\"String_Node_Str\");\n sorter3.setSortDirection(ISortDefinition.SORT_DESC);\n sorter3.setTargetLevel(level12);\n cqd.addSort(sorter1);\n cqd.addSort(sorter2);\n cqd.addSort(sorter3);\n DataEngineImpl engine = (DataEngineImpl) DataEngine.newDataEngine(DataEngineContext.newInstance(DataEngineContext.DIRECT_PRESENTATION, null, null, null));\n this.createCube(engine);\n IPreparedCubeQuery pcq = engine.prepare(cqd, null);\n ICubeQueryResults queryResults = pcq.execute(null);\n CubeCursor cursor = queryResults.getCubeCursor();\n List columnEdgeBindingNames = new ArrayList();\n columnEdgeBindingNames.add(\"String_Node_Str\");\n columnEdgeBindingNames.add(\"String_Node_Str\");\n List rowEdgeBindingNames = new ArrayList();\n rowEdgeBindingNames.add(\"String_Node_Str\");\n this.printCube(cursor, columnEdgeBindingNames, rowEdgeBindingNames, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n}\n"
"public void execute(Element ele, HashMap styles) {\n HashMap cssStyle = null;\n if (!ele.hasAttribute(\"String_Node_Str\")) {\n cssStyle = new HashMap();\n } else {\n cssParser.ReInit(new StringReader(ele.getAttribute(\"String_Node_Str\")));\n cssParser.setCssStatement(ele.getAttribute(\"String_Node_Str\"));\n try {\n cssParser.parse();\n } catch (Exception e) {\n logger.log(Level.SEVERE, \"String_Node_Str\" + ele.getAttribute(\"String_Node_Str\"), e);\n }\n cssStyle = cssParser.getCssProperties();\n ele.removeAttribute(\"String_Node_Str\");\n String src = (String) cssStyle.get(\"String_Node_Str\");\n if (src != null) {\n if (src.startsWith(\"String_Node_Str\") && src.length() > 5) {\n src = src.substring(4, src.length() - 1);\n } else if ((src.startsWith(\"String_Node_Str\") || src.startsWith(\"String_Node_Str\")) && src.length() > 2) {\n src = src.substring(1, src.length() - 1);\n }\n if (design != null) {\n URL url = design.findResource(src, IResourceLocator.IMAGE);\n if (url != null) {\n src = url.toExternalForm();\n }\n }\n if (rootPath != null) {\n if (FileUtil.isLocalResource(src)) {\n src = FileUtil.getAbsolutePath(rootPath, src);\n }\n }\n if (src != null) {\n cssStyle.put(\"String_Node_Str\", src);\n } else {\n cssStyle.remove(\"String_Node_Str\");\n }\n }\n }\n if (\"String_Node_Str\".equals(ele.getTagName())) {\n addToStyle(cssStyle, \"String_Node_Str\", \"String_Node_Str\");\n ele = replaceElement(ele, \"String_Node_Str\");\n } else if (\"String_Node_Str\".equals(ele.getTagName())) {\n addToStyle(cssStyle, \"String_Node_Str\", \"String_Node_Str\");\n ele = replaceElement(ele, \"String_Node_Str\");\n } else if (\"String_Node_Str\".equals(ele.getTagName())) {\n addToStyle(cssStyle, \"String_Node_Str\", ele.getAttribute(\"String_Node_Str\"));\n addToStyle(cssStyle, \"String_Node_Str\", ele.getAttribute(\"String_Node_Str\"));\n if (ele.hasAttribute(\"String_Node_Str\")) {\n try {\n int size = Integer.parseInt(ele.getAttribute(\"String_Node_Str\"));\n addToStyle(cssStyle, \"String_Node_Str\", FONT_SIZE[size + 7]);\n } catch (Exception e) {\n logger.log(Level.SEVERE, \"String_Node_Str\");\n }\n }\n ele.removeAttribute(\"String_Node_Str\");\n ele.removeAttribute(\"String_Node_Str\");\n ele.removeAttribute(\"String_Node_Str\");\n ele = replaceElement(ele, \"String_Node_Str\");\n } else if (\"String_Node_Str\".equals(ele.getTagName())) {\n addToStyle(cssStyle, \"String_Node_Str\", \"String_Node_Str\");\n ele = replaceElement(ele, \"String_Node_Str\");\n } else if (\"String_Node_Str\".equals(ele.getTagName())) {\n String decoration = (String) cssStyle.get(\"String_Node_Str\");\n if (decoration != null && decoration.indexOf(\"String_Node_Str\") == -1 && decoration.indexOf(\"String_Node_Str\") == -1 && decoration.indexOf(\"String_Node_Str\") == -1) {\n decoration = decoration + \"String_Node_Str\";\n } else if (decoration == null) {\n decoration = \"String_Node_Str\";\n }\n cssStyle.put(\"String_Node_Str\", decoration);\n ele = replaceElement(ele, \"String_Node_Str\");\n } else if (\"String_Node_Str\".equals(ele.getTagName())) {\n String src = ele.getAttribute(\"String_Node_Str\");\n if (src != null) {\n if ((src.startsWith(\"String_Node_Str\") || src.startsWith(\"String_Node_Str\")) && src.length() > 2) {\n src = src.substring(1, src.length() - 1);\n }\n if (design != null) {\n URL url = design.findResource(src, IResourceLocator.IMAGE);\n if (url != null) {\n src = url.toExternalForm();\n }\n }\n if (rootPath != null) {\n if (FileUtil.isLocalResource(src)) {\n src = FileUtil.getAbsolutePath(rootPath, src);\n }\n }\n if (src != null) {\n ele.removeAttribute(\"String_Node_Str\");\n ele.setAttribute(\"String_Node_Str\", src);\n }\n }\n }\n styles.put(ele, cssStyle);\n for (int i = 0; i < ele.getChildNodes().getLength(); i++) {\n Node child = ele.getChildNodes().item(i);\n if (child.getNodeType() == Node.ELEMENT_NODE) {\n execute((Element) child, styles);\n }\n }\n}\n"
"public GenericSQLHandler replaceColumn(String columns) {\n sqlString = sqlString.replace(COLUMN_NAMES, columns);\n return this;\n}\n"
"protected List getTableEditParts() {\n List tableParts = new ArrayList();\n for (Iterator itor = getSelectedObjects().iterator(); itor.hasNext(); ) {\n Object obj = itor.next();\n if (obj instanceof DummyEditpart) {\n } else if (obj instanceof TableEditPart) {\n if (obj instanceof GridEditPart) {\n return Collections.EMPTY_LIST;\n }\n if (!(tableParts.contains(obj))) {\n tableParts.add(obj);\n }\n } else if (obj instanceof TableCellEditPart) {\n TableEditPart parent2 = (TableEditPart) ((TableCellEditPart) obj).getParent();\n Object parent = parent2;\n if (parent instanceof GridEditPart) {\n return Collections.EMPTY_LIST;\n }\n if (!(tableParts.contains(parent))) {\n tableParts.add(parent);\n }\n } else {\n return Collections.EMPTY_LIST;\n }\n }\n return tableParts;\n}\n"
"public CodeBlock getLoadFromCursorMethod(boolean isModelContainerAdapter) {\n CodeBlock.Builder builder = CodeBlock.builder().add(\"String_Node_Str\");\n CodeBlock.Builder ifNullBuilder = CodeBlock.builder().add(\"String_Node_Str\");\n CodeBlock.Builder selectBuilder = CodeBlock.builder();\n for (int i = 0; i < foreignKeyReferenceDefinitionList.size(); i++) {\n ForeignKeyReferenceDefinition referenceDefinition = foreignKeyReferenceDefinitionList.get(i);\n String indexName = \"String_Node_Str\" + referenceDefinition.columnName;\n builder.addStatement(\"String_Node_Str\", indexName, LoadFromCursorMethod.PARAM_CURSOR, referenceDefinition.columnName);\n if (i > 0) {\n ifNullBuilder.add(\"String_Node_Str\");\n }\n ifNullBuilder.add(\"String_Node_Str\", indexName, LoadFromCursorMethod.PARAM_CURSOR, indexName);\n selectBuilder.add(\"String_Node_Str\", ClassName.get(referencedTableClassName.packageName(), referencedTableClassName.simpleName() + \"String_Node_Str\" + TableDefinition.DBFLOW_TABLE_TAG), referenceDefinition.foreignColumnName, ModelUtils.getVariable(isModelContainerAdapter), columnAccess.getShortAccessString(elementName, isModelContainerAdapter) + \"String_Node_Str\" + referenceDefinition.columnAccess.getShortAccessString(referenceDefinition.foreignColumnName, isModelContainerAdapter));\n }\n ifNullBuilder.add(\"String_Node_Str\");\n builder.beginControlFlow(ifNullBuilder.build().toString());\n builder.addStatement(columnAccess.setColumnAccessString(elementTypeName, elementName, elementName, isModelContainerAdapter, LoadFromCursorMethod.PARAM_MODEL, CodeBlock.builder().add(\"String_Node_Str\", ClassNames.SELECT, referencedTableClassName).add(selectBuilder.build()).add(\"String_Node_Str\").build().toString()));\n builder.endControlFlow();\n return builder.build();\n}\n"
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n setContentView(R.layout.gallery);\n ViewParams params = new ViewParams(getResources().getDisplayMetrics());\n initParams(params);\n mLayout = (LinearLayout) findViewById(R.id.picker_layout);\n mImagePicker = new GridViewPicker(mLayout, params, mViewPickerListener);\n mImagePicker.initialize(getSupportFragmentManager());\n ArrayList<ItemModel> modelList = new ArrayList<ItemModel>();\n ItemModel item = new ItemModel();\n item.isCameraPhoto = true;\n modelList.add(item);\n modelList.addAll(ImageTools.getGalleryPhotos(getContentResolver()));\n mImagePicker.setImagePath(modelList);\n}\n"
"public List<IComponent> filterNeededComponents(Item item, RepositoryNode seletetedNode, ERepositoryObjectType type) {\n List<IComponent> neededComponents = new ArrayList<IComponent>();\n if (!(item instanceof HadoopClusterConnectionItem)) {\n return neededComponents;\n }\n IComponentsService service = (IComponentsService) GlobalServiceRegister.getDefault().getService(IComponentsService.class);\n Collection<IComponent> components = service.getComponentsFactory().readComponents();\n for (IComponent component : components) {\n if (isValid(item, type, seletetedNode, component, HadoopClusterRepositoryNodeType.HADOOPCLUSTER.name()) && !neededComponents.contains(component)) {\n neededComponents.add(component);\n }\n }\n return neededComponents;\n}\n"
"public void evaluate() throws Throwable {\n Future<Throwable> submitted = executor.submit(callable);\n try {\n Throwable result = submitted.get(timeout, TimeUnit.MILLISECONDS);\n if (result == null) {\n return;\n }\n if (result instanceof TimeoutException) {\n throw new Exception(\"String_Node_Str\", result);\n }\n throw result;\n } catch (TimeoutException e) {\n System.err.printf(\"String_Node_Str\", testName);\n for (Map.Entry<Thread, StackTraceElement[]> t : Thread.getAllStackTraces().entrySet()) {\n Thread thread = t.getKey();\n System.err.printf(\"String_Node_Str\", thread.getName(), thread.getId());\n System.err.printf(\"String_Node_Str\", thread.getState());\n for (StackTraceElement element : t.getValue()) {\n System.err.printf(\"String_Node_Str\", element);\n }\n }\n submitted.cancel(true);\n String message = String.format(\"String_Node_Str\", testName, timeout);\n throw new Exception(message);\n }\n}\n"
"public final int getDpiResolution() {\n if (iDpiResolution == 0) {\n switch(getGraphicsContext().getDeviceConfiguration().getDevice().getType()) {\n case GraphicsDevice.TYPE_RASTER_SCREEN:\n iDpiResolution = computeScreenDpi();\n break;\n case GraphicsDevice.TYPE_PRINTER:\n iDpiResolution = 72;\n break;\n case GraphicsDevice.TYPE_IMAGE_BUFFER:\n if (userResolution == 0) {\n iDpiResolution = computeScreenDpi();\n } else {\n iDpiResolution = userResolution;\n }\n break;\n }\n adjustFractionalMetrics();\n }\n return iDpiResolution;\n}\n"
"public void run() {\n if (minimizing) {\n LabeledRectangle sourceComponent = zoomArrow.getSource();\n LabeledRectangle targetComponent = zoomArrow.getTarget();\n for (LabeledRectangle component : sourceComponents) if (component != sourceComponent)\n component.setVisible(false);\n for (LabeledRectangle component : cdmComponents) if (component != targetComponent)\n component.setVisible(false);\n for (Arrow component : arrows) if (component != zoomArrow)\n component.setVisible(false);\n minimized = true;\n Path heightPath = new Path(getHeight(), HEADER_TOP_MARGIN + HEADER_HEIGHT + MARGIN + ITEM_HEIGHT + BORDER_HEIGHT);\n Path sourcePath = new Path(sourceComponent.getY(), HEADER_TOP_MARGIN + HEADER_HEIGHT);\n Path targetPath = new Path(targetComponent.getY(), HEADER_TOP_MARGIN + HEADER_HEIGHT);\n for (int i = 0; i < nSteps; i++) {\n maxHeight = heightPath.getValue(i);\n sourceComponent.setLocation(sourceX, sourcePath.getValue(i));\n targetComponent.setLocation(targetX, targetPath.getValue(i));\n for (ResizeListener resizeListener : resizeListeners) resizeListener.notifyResized(maxHeight, false, false);\n try {\n sleep(20);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n maxHeight = heightPath.getEnd();\n sourceComponent.setLocation(sourceX, sourcePath.getEnd());\n targetComponent.setLocation(targetX, targetPath.getEnd());\n for (ResizeListener resizeListener : resizeListeners) resizeListener.notifyResized(maxHeight, true, false);\n } else {\n }\n}\n"
"public void checkRefsEnumerationInMatchingState(EnumTypeRef enumRef) {\n EObject owner = objLookup.getStatefulOwner(enumRef);\n ILifecycleStateResolver stateRes = new StateAttributeLifecycleStateResolver(owner.eResource().getResourceSet());\n if (owner != null && stateRes.definesState(owner)) {\n if (!referencedStateChecker.stateMatches(((Enumeration) enumRef.getType()).getState(), owner))\n error(\"String_Node_Str\", ServiceDslPackage.Literals.ENUM_TYPE_REF__TYPE);\n }\n}\n"
"public void addHessian(float sigma) {\n float[] sobelFilter_x = { 1f, 2f, 1f, 0f, 0f, 0f, -1f, -2f, -1f };\n float[] sobelFilter_y = { 1f, 0f, -1f, 2f, 0f, -2f, 1f, 0f, -1f };\n Convolver c = new Convolver();\n GaussianBlur gs = new GaussianBlur();\n ImageProcessor ip_x = originalImage.getProcessor().duplicate();\n gs.blur(ip_x, sigma);\n c.convolveFloat(ip_x, sobelFilter_x, 3, 3);\n ImageProcessor ip_y = originalImage.getProcessor().duplicate();\n gs.blur(ip_y, sigma);\n c = new Convolver();\n c.convolveFloat(ip_y, sobelFilter_y, 3, 3);\n ImageProcessor ip_xx = ip_x.duplicate();\n c.convolveFloat(ip_xx, sobelFilter_x, 3, 3);\n ImageProcessor ip_xy = ip_x.duplicate();\n c.convolveFloat(ip_xy, sobelFilter_y, 3, 3);\n ImageProcessor ip_yy = ip_y.duplicate();\n c.convolveFloat(ip_yy, sobelFilter_y, 3, 3);\n ImageProcessor ip = new FloatProcessor(width, height);\n ImageProcessor ipTr = new FloatProcessor(width, height);\n ImageProcessor ipDet = new FloatProcessor(width, height);\n ImageProcessor ipEig1 = new FloatProcessor(width, height);\n ImageProcessor ipEig2 = new FloatProcessor(width, height);\n for (int x = 0; x < width; x++) {\n for (int y = 0; y < height; y++) {\n float s_xx = ip_xx.getf(x, y);\n float s_xy = ip_xy.getf(x, y);\n float s_yy = ip_yy.getf(x, y);\n ip.setf(x, y, (float) Math.sqrt(s_xx * s_xx + s_xy * s_xy + s_yy * s_yy));\n ipTr.setf(x, y, (float) s_xx + s_yy);\n ipDet.setf(x, y, (float) s_xx * s_yy - s_xy * s_xy);\n ipEig1.setf(x, y, (float) (trace / 2.0 + Math.sqrt((4 * s_xy * s_xy + (s_xx - s_yy) * (s_xx - s_yy)) / 2.0)));\n ipEig2.setf(x, y, (float) (trace / 2.0 - Math.sqrt((4 * s_xy * s_xy + (s_xx - s_yy) * (s_xx - s_yy)) / 2.0)));\n if (s_xy < 0.0) {\n float orientation = (float) (-0.5 * Math.acos((s_xx - s_yy) / Math.sqrt(4.0 * s_xy * s_xy + (s_xx - s_yy) * (s_xx - s_yy))));\n if (Float.isNaN(orientation))\n orientation = 0;\n ipOri.setf(x, y, orientation);\n } else {\n float orientation = (float) (0.5 * Math.acos((s_xx - s_yy) / Math.sqrt(4.0 * s_xy * s_xy + (s_xx - s_yy) * (s_xx - s_yy))));\n if (Float.isNaN(orientation))\n orientation = 0;\n ipOri.setf(x, y, orientation);\n }\n ipSed.setf(x, y, (float) (Math.pow(t, 4) * trace * trace * ((s_xx - s_yy) * (s_xx - s_yy) + 4 * s_xy * s_xy)));\n ipNed.setf(x, y, (float) (Math.pow(t, 2) * ((s_xx - s_yy) * (s_xx - s_yy) + 4 * s_xy * s_xy)));\n }\n }\n wholeStack.addSlice(availableFeatures[HESSIAN] + \"String_Node_Str\" + sigma, ip);\n wholeStack.addSlice(availableFeatures[HESSIAN] + \"String_Node_Str\" + sigma, ipTr);\n wholeStack.addSlice(availableFeatures[HESSIAN] + \"String_Node_Str\" + sigma, ipDet);\n wholeStack.addSlice(availableFeatures[HESSIAN] + \"String_Node_Str\" + sigma, ipEig1);\n wholeStack.addSlice(availableFeatures[HESSIAN] + \"String_Node_Str\" + sigma, ipEig2);\n}\n"
"public void adjustStreamVolume(int streamType, int direction, int flags) {\n IAudioService service = getService();\n try {\n if (mUseMasterVolume) {\n service.adjustMasterVolume(direction, flags, mContext.getOpPackageName());\n } else {\n service.adjustStreamVolume(streamType, direction, flags, mContext.getBasePackageName());\n }\n } catch (RemoteException e) {\n Log.e(TAG, \"String_Node_Str\", e);\n }\n}\n"
"public JSONArray getKieServerStasus() throws ApsSystemException {\n Map<String, String> headersMap = new HashMap<>();\n JSONArray ServersStatus = new JSONArray();\n String result = null;\n JSONObject json = null;\n HashMap<String, KieBpmConfig> ServerConfigurations = super.getKieServerConfigurations();\n for (String key : ServerConfigurations.keySet()) {\n super.setConfig(ServerConfigurations.get(key));\n try {\n Endpoint ep = KieEndpointDictionary.create().get(API_GET_SERVER_STATUS);\n headersMap.put(HEADER_KEY_ACCEPT, HEADER_VALUE_JSON);\n KieClient client = super.getCurrentClient();\n result = (String) new KieRequestBuilder(client).setEndpoint(ep).setHeaders(headersMap).setDebug(this.getKieBpmConfig().getDebug()).doRequest();\n if (!result.isEmpty()) {\n json = new JSONObject(result);\n JSONObject serverStatusJson = new JSONObject();\n serverStatusJson.put(\"String_Node_Str\", this.getKieBpmConfig().getId());\n serverStatusJson.put(\"String_Node_Str\", json);\n JSONObject serverConfJson = new JSONObject();\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getActive());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getId());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getName());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getUsername());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getPassword());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getHostname());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getPort());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getSchema());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getWebapp());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getTimeoutMsec());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getDebug());\n serverStatusJson.put(\"String_Node_Str\", serverConfJson);\n ServersStatus.put(serverStatusJson);\n logger.debug(\"String_Node_Str\", result);\n } else {\n logger.debug(\"String_Node_Str\");\n }\n } catch (Throwable t) {\n JSONObject serverStatusJson = new JSONObject();\n serverStatusJson.put(\"String_Node_Str\", this.getKieBpmConfig().getId());\n serverStatusJson.put(\"String_Node_Str\", \"String_Node_Str\");\n JSONObject serverConfJson = new JSONObject();\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getActive());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getId());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getName());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getUsername());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getPassword());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getHostname());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getPort());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getSchema());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getWebapp());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getTimeoutMsec());\n serverConfJson.put(\"String_Node_Str\", this.getKieBpmConfig().getDebug());\n serverStatusJson.put(\"String_Node_Str\", serverConfJson);\n ServersStatus.put(serverStatusJson);\n logger.debug(\"String_Node_Str\" + t);\n }\n }\n return ServersStatus;\n}\n"
"public void testExecutionDoubleConnection() {\n File inputFile = null;\n File outputFile = null;\n File jarFile = new File(ServerTestUtils.getTempDir() + File.separator + \"String_Node_Str\");\n try {\n inputFile = ServerTestUtils.createInputFile(0);\n outputFile = new File(ServerTestUtils.getTempDir() + File.separator + ServerTestUtils.getRandomFilename());\n JarFileCreator jfc = new JarFileCreator(jarFile);\n jfc.addClass(DoubleSourceTask.class);\n jfc.addClass(DoubleTargetTask.class);\n jfc.createJarFile();\n final JobGraph jg = new JobGraph(\"String_Node_Str\");\n final JobFileInputVertex i1 = new JobFileInputVertex(\"String_Node_Str\", jg);\n i1.setFileInputClass(DoubleSourceTask.class);\n i1.setFilePath(new Path(\"String_Node_Str\" + inputFile.getAbsolutePath().toString()));\n final JobTaskVertex t1 = new JobTaskVertex(\"String_Node_Str\", jg);\n t1.setTaskClass(DoubleTargetTask.class);\n JobFileOutputVertex o1 = new JobFileOutputVertex(\"String_Node_Str\", jg);\n o1.setFileOutputClass(FileLineWriter.class);\n o1.setFilePath(new Path(\"String_Node_Str\" + outputFile.getAbsolutePath().toString()));\n t1.setVertexToShareInstancesWith(i1);\n o1.setVertexToShareInstancesWith(i1);\n i1.connectTo(t1, ChannelType.INMEMORY, CompressionLevel.NO_COMPRESSION);\n i1.connectTo(t1, ChannelType.NETWORK, CompressionLevel.NO_COMPRESSION);\n t1.connectTo(o1, ChannelType.INMEMORY, CompressionLevel.NO_COMPRESSION);\n jg.addJar(new Path(\"String_Node_Str\" + jarFile.getAbsolutePath()));\n final JobClient jobClient = new JobClient(jg, configuration);\n jobClient.submitJobAndWait();\n } catch (JobExecutionException e) {\n fail(e.getMessage());\n } catch (JobGraphDefinitionException jgde) {\n fail(jgde.getMessage());\n } catch (IOException ioe) {\n fail(ioe.getMessage());\n } finally {\n if (inputFile != null) {\n inputFile.delete();\n }\n if (outputFile != null) {\n outputFile.delete();\n }\n if (jarFile != null) {\n jarFile.delete();\n }\n }\n}\n"
"public int showDialog() {\n if (!SwingUtilities.isEventDispatchThread()) {\n final int[] returnCodes = new int[1];\n Exception exception = null;\n try {\n lock.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n return returnCode;\n}\n"
"public synchronized void setIsolated(boolean isolated) {\n ignoreBase = isolated;\n}\n"
"public void processNodes() {\n HTML2Content.processNodes(element, cssStyles, content, action, 0);\n}\n"
"public static void verifyNodesStatus(List<NodeEntity> nodes, NodeStatus expectedStatus, boolean ignoreMissing) {\n for (NodeEntity node : nodes) {\n if (node.getStatus() != expectedStatus) {\n if (ignoreMissing && node.getStatus() == NodeStatus.NOT_EXIST) {\n continue;\n }\n if (expectedStatus == NodeStatus.VM_READY) {\n VcVirtualMachine vm = VcCache.getIgnoreMissing(node.getMoId());\n if (vm == null || !vm.isPoweredOn() || (VcVmUtil.getIpAddress(vm, false) == null)) {\n throw ClusteringServiceException.VM_STATUS_ERROR(node.getVmName(), node.getStatus().toString(), expectedStatus.toString());\n }\n String haFlag = node.getNodeGroup().getHaFlag();\n if (haFlag != null && Constants.HA_FLAG_FT.equals(haFlag.toLowerCase())) {\n if (!VcVmUtil.verifyFTState(vm)) {\n logger.info(\"String_Node_Str\" + vm.getName() + \"String_Node_Str\" + \"String_Node_Str\" + vm.getFTState() + \"String_Node_Str\");\n throw ClusteringServiceException.ENABLE_FT_FAILED(null, node.getVmName());\n }\n }\n }\n throw ClusteringServiceException.VM_STATUS_ERROR(node.getVmName(), node.getStatus().toString(), expectedStatus.toString());\n }\n }\n}\n"
"private static IntervalsSet buildIntervalSet(final Vector3D start, final Vector3D end) throws MathIllegalArgumentException {\n final Line line = new Line(start, end);\n return new IntervalsSet(line.toSubSpace((Point<Euclidean3D>) start).getX(), line.toSubSpace((Point<Euclidean3D>) end).getX());\n}\n"
"private boolean init(Uri uri, IImageList imageList) {\n if (uri == null)\n return false;\n mAllImagesState = (imageList == null) ? buildImageListFromUri(uri) : imageList;\n mAllImages = mAllImagesState;\n mAllImages.open(getContentResolver());\n IImage image = mAllImages.getImageForUri(uri);\n if (image == null)\n return false;\n mCurrentPosition = mAllImages.getImageIndex(image);\n mLastSlideShowImage = mCurrentPosition;\n return true;\n}\n"
"public void addResourceIntoDB(String clusterName, String vcRPName, String networkName, Map<DatastoreType, List<String>> dsNames) {\n rpSvc.addResourcePool(DEFAULT_RP, clusterName, vcRPName);\n logger.info(\"String_Node_Str\" + vcRPName);\n if (!dsNames.get(DatastoreType.SHARED).isEmpty()) {\n dsSvc.addDatastores(DEFAULT_DS_SHARED, DatastoreType.SHARED, dsNames.get(DatastoreType.SHARED), false);\n } else if (!dsNames.get(DatastoreType.LOCAL).isEmpty()) {\n dsSvc.addDatastores(DEFAULT_DS_LOCAL, DatastoreType.LOCAL, dsNames.get(DatastoreType.LOCAL), false);\n }\n logger.info(\"String_Node_Str\" + dsNames);\n if (networkName != null) {\n networkSvc.addDhcpNetwork(DEFAULT_NETWORK, networkName, NetworkDnsType.NORMAL, false);\n logger.info(\"String_Node_Str\" + networkName);\n }\n}\n"
"public static List<Album> filterByYear(List<Album> albums, String year) {\n return select(albums, having(on(Album.class).getReleaseYear(), equalTo(year)));\n}\n"
"public RefiringData fire(Token arguments) throws IllegalActionException {\n _debug(new PteraDebugEvent(this, \"String_Node_Str\"));\n List<String> names = parameters.getParameterNames();\n Type[] types = parameters.getParameterTypes();\n if (arguments instanceof ArrayToken) {\n ArrayToken array = (ArrayToken) arguments;\n int i = 0;\n for (String name : names) {\n Variable variable = (Variable) getAttribute(name);\n if (i < array.length()) {\n tokens[i] = types[i].convert(array.getElement(i));\n } else {\n variable.setToken(NullToken.NIL);\n }\n i++;\n }\n } else if (arguments instanceof RecordToken) {\n RecordToken record = (RecordToken) arguments;\n int i = 0;\n for (String name : names) {\n Variable variable = (Variable) getAttribute(name);\n Token token = record.get(name);\n if (token == null) {\n variable.setToken(NullToken.NIL);\n } else {\n variable.setToken(types[i].convert(token));\n }\n i++;\n }\n } else if (arguments != null) {\n throw new IllegalActionException(this, \"String_Node_Str\" + \"String_Node_Str\" + arguments.getType() + \"String_Node_Str\");\n }\n actions.execute();\n return null;\n}\n"
"public void run() {\n TreeItem item = (TreeItem) composite.getSelectedElement();\n Object selectedElement = item.getData();\n if (selectedElement == null || !(selectedElement instanceof ReportDesignHandle)) {\n return;\n }\n reportProject = createProject(item.getText().substring(0, item.getText().lastIndexOf(\"String_Node_Str\")), false);\n if (reportProject != null) {\n PlaceResources.copy(composite.getShell(), reportProject.getLocation().toOSString(), item.getText(), ((ReportDesignHandle) selectedElement).getFileName());\n }\n if (item.getParentItem().getText().equals(DRILL_TO_DETAILS_CATEGORY)) {\n PlaceResources.copyDrillThroughReport(composite.getShell(), reportProject.getLocation().toOSString(), item.getText());\n }\n if (item.getParentItem().getText().equals(XML_DATA_SOURCE_CATEGORY)) {\n PlaceResources.copyIncludedPng(composite.getShell(), reportProject.getLocation().toOSString());\n }\n if (item.getParentItem().getText().equals(\"String_Node_Str\")) {\n PlaceResources.copyIncludedLibraries(composite.getShell(), reportProject.getLocation().toOSString());\n }\n if (item.getParentItem().getText().equals(SCRIPTING_CATEGORY)) {\n IProject javaProject = createProject(SCRIPTING_CATEGORY, true);\n if (javaProject != null) {\n createSourceAndOutputFolder(javaProject);\n try {\n setClasspath(javaProject);\n } catch (JavaModelException e) {\n ExceptionHandler.handle(e);\n } catch (CoreException e) {\n ExceptionHandler.handle(e);\n }\n }\n Enumeration enumeration = SampleIncludedSourceEntry.getJavaObjects();\n while (enumeration.hasMoreElements()) {\n URL javaObjectURL = (URL) enumeration.nextElement();\n String filename = javaObjectURL.getFile();\n String desFileName = filename.substring(filename.lastIndexOf('/') + 1);\n PlaceResources.copy(composite.getShell(), javaProject.getFolder(\"String_Node_Str\").getLocation().toOSString(), desFileName, javaObjectURL);\n }\n refreshReportProject(javaProject);\n }\n refreshReportProject(reportProject);\n if (item.getParentItem().getParentItem() != null && item.getParentItem().getParentItem().getText().equals(EXTENDING_CATEGORY)) {\n PlaceExtendedPlugin(item.getParentItem().getText());\n }\n}\n"
"public void resetReactor(HttpRequest request, HttpResponder responder) {\n try {\n if (!conf.getBoolean(Constants.Dangerous.UNRECOVERABLE_RESET, Constants.Dangerous.DEFAULT_UNRECOVERABLE_RESET)) {\n responder.sendStatus(HttpResponseStatus.FORBIDDEN);\n return;\n }\n String accountId = getAuthenticatedAccountId(request);\n AuthToken token = new AuthToken(request.getHeader(GatewayAuthenticator.CONTINUUITY_API_KEY));\n TProtocol protocol = getThriftProtocol(Constants.Service.APP_FABRIC, endpointStrategy);\n AppFabricService.Client client = new AppFabricService.Client(protocol);\n try {\n client.reset(token, accountId);\n } finally {\n if (client.getInputProtocol().getTransport().isOpen()) {\n client.getInputProtocol().getTransport().close();\n }\n if (client.getOutputProtocol().getTransport().isOpen()) {\n client.getOutputProtocol().getTransport().close();\n }\n }\n responder.sendStatus(HttpResponseStatus.OK);\n } catch (SecurityException e) {\n responder.sendStatus(HttpResponseStatus.FORBIDDEN);\n } catch (Exception e) {\n responder.sendStatus(HttpResponseStatus.NOT_FOUND);\n }\n}\n"
"public void run() {\n BamMetadataGeneration metadata = new BamMetadataGeneration(checkRG);\n metadata.ScanFile(input, samplimit);\n final Map<String, Integer[]> values = metadata.getThresholds(maxdist);\n Map<String, DivetOutputHandle> divets = metadata.generateDivetOuts(outbase);\n Map<String, SplitOutputHandle> splits = metadata.generateSplitOuts(outbase);\n System.err.println(\"String_Node_Str\");\n metadata.getSampleIDs().stream().forEach((s) -> {\n System.err.println(\"String_Node_Str\" + s + \"String_Node_Str\" + metadata.getSampleInsSize(s) + \"String_Node_Str\" + metadata.getSampleInsStd(s));\n });\n final SAMFileReader reader = new SAMFileReader(new File(input));\n reader.setValidationStringency(SAMFileReader.ValidationStringency.SILENT);\n SAMFileHeader h = reader.getFileHeader();\n List<BedSimple> coords = this.getSamIntervals(h);\n List<SamRecordMatcher> collect = coords.parallelStream().map((b) -> {\n SamRecordMatcher w = new SamRecordMatcher(samplimit, checkRG, utilities.GetBaseName.getBaseName(outbase) + \"String_Node_Str\", values, debug);\n try {\n SAMFileReader temp = new SAMFileReader(new File(input));\n temp.setValidationStringency(SAMFileReader.ValidationStringency.SILENT);\n SAMRecordIterator itr = temp.queryContained(b.Chr(), b.Start(), b.End());\n itr.forEachRemaining((k) -> w.bufferedAdd(k));\n temp.close();\n System.out.print(\"String_Node_Str\");\n System.out.print(\"String_Node_Str\" + b.Chr() + \"String_Node_Str\" + b.Start() + \"String_Node_Str\" + b.End() + \"String_Node_Str\");\n } catch (Exception ex) {\n System.err.println(\"String_Node_Str\" + b.Chr() + \"String_Node_Str\" + b.Start() + \"String_Node_Str\" + b.End());\n ex.printStackTrace();\n }\n return w;\n }).collect(Collectors.toList());\n SamRecordMatcher worker = new SamRecordMatcher(samplimit, checkRG, utilities.GetBaseName.getBaseName(outbase) + \"String_Node_Str\", values, debug);\n collect.stream().forEachOrdered((s) -> {\n worker.combineRecordMatcher(s);\n });\n reader.close();\n System.out.println(System.lineSeparator() + \"String_Node_Str\");\n SAMFileReader next = new SAMFileReader(new File(input));\n next.setValidationStringency(SAMFileReader.ValidationStringency.SILENT);\n worker.convertToVariant(divets, splits);\n worker.RetrieveMissingAnchors(splits, next.iterator());\n System.err.println(\"String_Node_Str\");\n MrsFastRuntimeFactory mfact = new MrsFastRuntimeFactory(threads, metadata.getSamFileHeader());\n mfact.ProcessSplitFastqs(splits, reference, outbase);\n Map<String, String> bams = mfact.getBams();\n try (BufferedWriter out = Files.newBufferedWriter(Paths.get(outbase + \"String_Node_Str\"), Charset.defaultCharset())) {\n for (String s : values.keySet()) {\n out.write(bams.get(s) + \"String_Node_Str\" + divets.get(s).getDivetFileStr() + \"String_Node_Str\");\n out.write(splits.get(s).getAnchorFileStr() + \"String_Node_Str\" + String.valueOf(metadata.getSampleInsSize(s)) + \"String_Node_Str\");\n out.write(String.valueOf(metadata.getSampleInsStd(s)));\n out.newLine();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n System.err.println(\"String_Node_Str\");\n splits.keySet().stream().forEach((s) -> {\n try {\n Files.deleteIfExists(Paths.get(splits.get(s).fq1File()));\n } catch (IOException ex) {\n log.log(Level.SEVERE, \"String_Node_Str\" + splits.get(s).fq1File().toString(), ex);\n }\n });\n mfact.getSams().keySet().stream().forEach((s) -> {\n try {\n Files.deleteIfExists(Paths.get(s));\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n });\n}\n"
"public void applyPostLayoutPolicyLw(WindowState win, WindowManager.LayoutParams attrs, WindowState attached) {\n if (DEBUG_LAYOUT)\n Slog.i(TAG, \"String_Node_Str\" + win + \"String_Node_Str\" + win.isVisibleOrBehindKeyguardLw());\n final int fl = PolicyControl.getWindowFlags(win, attrs);\n if (mTopFullscreenOpaqueWindowState == null && win.isVisibleLw() && attrs.type == TYPE_INPUT_METHOD) {\n mForcingShowNavBar = true;\n mForcingShowNavBarLayer = win.getSurfaceLayer();\n }\n if (attrs.type == TYPE_STATUS_BAR) {\n if ((attrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0) {\n mForceStatusBarFromKeyguard = true;\n }\n if ((attrs.privateFlags & PRIVATE_FLAG_FORCE_STATUS_BAR_VISIBLE_TRANSPARENT) != 0) {\n mForceStatusBarTransparent = true;\n }\n }\n boolean appWindow = attrs.type >= FIRST_APPLICATION_WINDOW && attrs.type < FIRST_SYSTEM_WINDOW;\n final boolean showWhenLocked = (fl & FLAG_SHOW_WHEN_LOCKED) != 0;\n final boolean dismissKeyguard = (fl & FLAG_DISMISS_KEYGUARD) != 0;\n if (mTopFullscreenOpaqueWindowState == null && win.isVisibleOrBehindKeyguardLw() && !win.isGoneForLayoutLw()) {\n if ((fl & FLAG_FORCE_NOT_FULLSCREEN) != 0) {\n if ((attrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0) {\n mForceStatusBarFromKeyguard = true;\n } else {\n mForceStatusBar = true;\n }\n }\n if ((attrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0) {\n mShowingLockscreen = true;\n }\n if (attrs.type == TYPE_DREAM) {\n if (!mDreamingLockscreen || (win.isVisibleLw() && win.hasDrawnLw())) {\n mShowingDream = true;\n appWindow = true;\n }\n }\n final IApplicationToken appToken = win.getAppToken();\n if (appWindow && attached == null) {\n if (showWhenLocked) {\n mAppsToBeHidden.remove(appToken);\n mAppsThatDismissKeyguard.remove(appToken);\n if (mAppsToBeHidden.isEmpty()) {\n if (dismissKeyguard && !mKeyguardSecure) {\n mAppsThatDismissKeyguard.add(appToken);\n } else if (win.isDrawnLw() || win.hasAppShownWindows()) {\n mWinShowWhenLocked = win;\n mHideLockScreen = true;\n mForceStatusBarFromKeyguard = false;\n }\n }\n } else if (dismissKeyguard) {\n if (mKeyguardSecure) {\n mAppsToBeHidden.add(appToken);\n } else {\n mAppsToBeHidden.remove(appToken);\n }\n mAppsThatDismissKeyguard.add(appToken);\n } else {\n mAppsToBeHidden.add(appToken);\n }\n if (attrs.x == 0 && attrs.y == 0 && attrs.width == WindowManager.LayoutParams.MATCH_PARENT && attrs.height == WindowManager.LayoutParams.MATCH_PARENT) {\n if (DEBUG_LAYOUT)\n Slog.v(TAG, \"String_Node_Str\" + win);\n mTopFullscreenOpaqueWindowState = win;\n if (mTopFullscreenOpaqueOrDimmingWindowState == null) {\n mTopFullscreenOpaqueOrDimmingWindowState = win;\n }\n if (!mAppsThatDismissKeyguard.isEmpty() && mDismissKeyguard == DISMISS_KEYGUARD_NONE) {\n if (DEBUG_LAYOUT)\n Slog.v(TAG, \"String_Node_Str\" + win);\n mDismissKeyguard = (mWinDismissingKeyguard == win && mSecureDismissingKeyguard == mKeyguardSecure) ? DISMISS_KEYGUARD_CONTINUE : DISMISS_KEYGUARD_START;\n mWinDismissingKeyguard = win;\n mSecureDismissingKeyguard = mKeyguardSecure;\n mForceStatusBarFromKeyguard = mShowingLockscreen && mKeyguardSecure;\n } else if (mAppsToBeHidden.isEmpty() && showWhenLocked && win.isDrawnLw()) {\n if (DEBUG_LAYOUT)\n Slog.v(TAG, \"String_Node_Str\" + win);\n mHideLockScreen = true;\n mForceStatusBarFromKeyguard = false;\n }\n if ((fl & FLAG_ALLOW_LOCK_WHILE_SCREEN_ON) != 0) {\n mAllowLockscreenWhenOn = true;\n }\n }\n if (mWinShowWhenLocked != null && mWinShowWhenLocked.getAppToken() != win.getAppToken() && (attrs.flags & FLAG_SHOW_WHEN_LOCKED) == 0) {\n win.hideLw(false);\n }\n }\n } else if (mTopFullscreenOpaqueWindowState == null && mWinShowWhenLocked == null) {\n if (win.isAnimatingLw() && appWindow && showWhenLocked && mKeyguardHidden) {\n mHideLockScreen = true;\n mWinShowWhenLocked = win;\n }\n }\n if (mTopFullscreenOpaqueOrDimmingWindowState == null && win.isVisibleOrBehindKeyguardLw() && !win.isGoneForLayoutLw() && win.isDimming()) {\n mTopFullscreenOpaqueOrDimmingWindowState = win;\n }\n}\n"
"public void tick(float elapsed) {\n if (_editor.isThirdButtonDown() && !_editor.isControlDown()) {\n _editor.deleteMouseObject();\n }\n}\n"
"public void onDisable() {\n PlayerQuitEvent pqe;\n for (Player p : getServer().getOnlinePlayers()) {\n pqe = new PlayerQuitEvent(p, null);\n pL.onPlayerQuit(pqe);\n }\n config.saveAll();\n config.unLoad();\n}\n"
"private static NodeVarNames readNodeVarNames(DataInputStream dis, ReteNode node, List<Symbol> symbolMap) throws SoarException, IOException {\n if (node.node_type == ReteNodeType.DUMMY_TOP_BNODE) {\n return null;\n }\n if (node.node_type == ReteNodeType.CN_BNODE) {\n ReteNode temp = node.b_cn().partner.parent;\n NodeVarNames nvn_for_ncc = readNodeVarNames(dis, temp, symbolMap);\n final NodeVarNames bottom_of_subconditions = nvn_for_ncc;\n while (temp != node.parent) {\n temp = temp.real_parent_node();\n nvn_for_ncc = nvn_for_ncc.parent;\n }\n return NodeVarNames.createForNcc(nvn_for_ncc, bottom_of_subconditions);\n }\n Object id = readVarNames(dis, symbolMap);\n Object attr = readVarNames(dis, symbolMap);\n Object value = readVarNames(dis, symbolMap);\n NodeVarNames parent = readNodeVarNames(dis, node.real_parent_node(), symbolMap);\n return NodeVarNames.newInstance(parent, id, attr, value);\n}\n"
"public void onCurrencyHoldCheck(CurrencyHoldEvent event) {\n if (event.getAccount() == null || !transactionCanFail()) {\n return;\n }\n if (!provider.hasAccount(NameManager.getUsername(event.getAccount()), event.getWorld().getName())) {\n event.canHold(false);\n return;\n }\n EconomyResponse response = provider.depositPlayer(Bukkit.getOfflinePlayer(event.getAccount()), event.getWorld().getName(), event.getDoubleAmount());\n if (!response.transactionSuccess()) {\n event.canHold(false);\n return;\n }\n provider.withdrawPlayer(Bukkit.getOfflinePlayer(event.getAccount()), event.getWorld().getName(), event.getDoubleAmount());\n}\n"
"protected Enumeration _schedule() throws NotSchedulableException {\n CTDirector dir = (CTDirector) getContainer();\n if (dir == null) {\n return null;\n }\n CompositeActor ca = (CompositeActor) (dir.getContainer());\n if (ca == null) {\n return null;\n }\n _stateschedule = new LinkedList();\n _transitionschedule = new LinkedList();\n _outputschedule = new LinkedList();\n _statessc = new LinkedList();\n _outputssc = new LinkedList();\n LinkedList _scheList = new LinkedList();\n _classifyActors();\n DirectedAcyclicGraph g = _toArithGraph(ca.deepEntityList());\n DirectedAcyclicGraph gd = _toGraph(dynamicActorList());\n if (!g.isAcyclic()) {\n throw new NotSchedulableException(\"String_Node_Str\");\n }\n int numofdyn = _dynam.size();\n if (numofdyn > 0) {\n Object[] dynactors = _dynam.toArray();\n Object[] xsort = gd.topologicalSort(dynactors);\n for (int i = 0; i < xsort.length; i++) {\n Actor a = (Actor) xsort[i];\n _stateschedule.addFirst(a);\n if (a instanceof CTStepSizeControlActor) {\n _statessc.addFirst(a);\n }\n }\n _scheList.addLast(_stateschedule);\n Object[] fx = g.backwardReachableNodes(dynactors);\n Object[] fxsort = g.topologicalSort(fx);\n for (int i = 0; i < fxsort.length; i++) {\n Actor a = (Actor) fxsort[i];\n _transitionschedule.addLast(a);\n if (a instanceof CTStepSizeControlActor) {\n _statessc.addFirst(a);\n }\n }\n _scheList.addLast(_transitionschedule);\n }\n int numofsink = _sink.size();\n if (numofsink > 0) {\n Object[] sinkactors = _sink.toArray();\n Object[] gx = g.backwardReachableNodes(sinkactors);\n Object[] gxsort = g.topologicalSort(gx);\n for (int i = 0; i < gxsort.length; i++) {\n Actor a = (Actor) gxsort[i];\n _outputschedule.addLast(a);\n if (a instanceof CTStepSizeControlActor) {\n _outputssc.addLast(a);\n }\n }\n for (int i = 0; i < sinkactors.length; i++) {\n Actor a = (Actor) sinkactors[i];\n _outputschedule.addLast(a);\n if (a instanceof CTStepSizeControlActor) {\n _outputssc.addLast(a);\n }\n }\n _outputschedule.addAll(_sink);\n _scheList.addLast(_outputschedule);\n }\n return Collections.enumeration(_scheList);\n}\n"
"public List<IGenericDatasourceInfo> getIds() throws PentahoAccessControlException {\n helper.checkAdministratorAccess();\n List<IGenericDatasourceInfo> datasourceInfoList = new ArrayList<IGenericDatasourceInfo>();\n for (MondrianCatalog mondrianCatalog : mondrianCatalogService.listCatalogs(PentahoSessionHolder.getSession(), true)) {\n String domainId = mondrianCatalog.getName() + METADATA_EXT;\n Domain domain = metadataDomainRepository.getDomain(domainId);\n if (domain == null) {\n datasourceInfoList.add(new GenericDatasourceInfo(mondrianCatalog.getName(), mondrianCatalog.getName(), TYPE));\n }\n }\n return datasourceInfoList;\n}\n"
"private void marshal(Object object, MarshalRecord marshalRecord, AbstractSession session, XMLDescriptor descriptor, boolean isXMLRoot) {\n if (null != schema) {\n marshalRecord = new ValidatingMarshalRecord(marshalRecord, this);\n }\n if (getAttachmentMarshaller() != null) {\n marshalRecord.setXOPPackage(getAttachmentMarshaller().isXOPPackage());\n }\n addDescriptorNamespacesToXMLRecord(descriptor, marshalRecord);\n NamespaceResolver nr = marshalRecord.getNamespaceResolver();\n XMLRoot root = null;\n if (isXMLRoot) {\n root = (XMLRoot) object;\n }\n marshalRecord.beforeContainmentMarshal(object);\n if (!isFragment()) {\n String encoding = getEncoding();\n String version = DEFAULT_XML_VERSION;\n if (!isXMLRoot) {\n marshalRecord.setLeafElementType(descriptor.getDefaultRootElementType());\n } else {\n if (root.getEncoding() != null) {\n encoding = root.getEncoding();\n }\n if (root.getXMLVersion() != null) {\n version = root.getXMLVersion();\n }\n }\n marshalRecord.startDocument(encoding, version);\n }\n if (isXMLRoot) {\n if (root.getObject() instanceof Node) {\n marshalRecord.node((Node) root.getObject(), new NamespaceResolver());\n marshalRecord.endDocument();\n return;\n }\n }\n XPathFragment rootFragment = buildRootFragment(object, descriptor, isXMLRoot, marshalRecord);\n String schemaLocation = getSchemaLocation();\n String noNsSchemaLocation = getNoNamespaceSchemaLocation();\n boolean isNil = false;\n if (isXMLRoot) {\n object = root.getObject();\n if (root.getSchemaLocation() != null) {\n schemaLocation = root.getSchemaLocation();\n }\n if (root.getNoNamespaceSchemaLocation() != null) {\n noNsSchemaLocation = root.getNoNamespaceSchemaLocation();\n }\n marshalRecord.setLeafElementType(root.getSchemaType());\n isNil = root.isNil();\n }\n String xsiPrefix = null;\n if ((null != getSchemaLocation()) || (null != getNoNamespaceSchemaLocation()) || (isNil)) {\n xsiPrefix = nr.resolveNamespaceURI(XMLConstants.SCHEMA_INSTANCE_URL);\n if (null == xsiPrefix) {\n xsiPrefix = XMLConstants.SCHEMA_INSTANCE_PREFIX;\n nr.put(XMLConstants.SCHEMA_INSTANCE_PREFIX, XMLConstants.SCHEMA_INSTANCE_URL);\n }\n }\n TreeObjectBuilder treeObjectBuilder = null;\n if (descriptor != null) {\n treeObjectBuilder = (TreeObjectBuilder) descriptor.getObjectBuilder();\n }\n if (session == null) {\n session = (AbstractSession) xmlContext.getSession(0);\n }\n marshalRecord.setSession(session);\n if (null != rootFragment) {\n marshalRecord.startPrefixMappings(nr);\n if (!isXMLRoot && descriptor.getNamespaceResolver() == null && rootFragment.hasNamespace()) {\n throw XMLMarshalException.namespaceResolverNotSpecified(rootFragment.getShortName());\n }\n marshalRecord.openStartElement(rootFragment, nr);\n if (null != schemaLocation) {\n marshalRecord.attribute(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_LOCATION, xsiPrefix + XMLConstants.COLON + XMLConstants.SCHEMA_LOCATION, schemaLocation);\n }\n if (null != noNsSchemaLocation) {\n marshalRecord.attribute(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.NO_NS_SCHEMA_LOCATION, xsiPrefix + XMLConstants.COLON + XMLConstants.NO_NS_SCHEMA_LOCATION, noNsSchemaLocation);\n }\n if (isNil) {\n marshalRecord.attribute(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_NIL_ATTRIBUTE, xsiPrefix + XMLConstants.COLON + XMLConstants.SCHEMA_NIL_ATTRIBUTE, \"String_Node_Str\");\n }\n marshalRecord.namespaceDeclarations(nr);\n if (descriptor != null && !isNil) {\n treeObjectBuilder.addXsiTypeAndClassIndicatorIfRequired(marshalRecord, descriptor, null, descriptor.getDefaultRootElementField(), root, object, isXMLRoot, true);\n treeObjectBuilder.marshalAttributes(marshalRecord, object, session);\n }\n marshalRecord.closeStartElement();\n }\n if (treeObjectBuilder != null && !isNil) {\n treeObjectBuilder.buildRow(marshalRecord, object, session, this, rootFragment, WriteType.UNDEFINED);\n } else if (isXMLRoot) {\n if (object != null && !isNil) {\n if (root.getDeclaredType() != null && root.getObject() != null && root.getDeclaredType() != root.getObject().getClass()) {\n QName type = (QName) XMLConversionManager.getDefaultJavaTypes().get(object.getClass());\n if (type != null) {\n xsiPrefix = nr.resolveNamespaceURI(XMLConstants.SCHEMA_INSTANCE_URL);\n if (null == xsiPrefix) {\n xsiPrefix = XMLConstants.SCHEMA_INSTANCE_PREFIX;\n marshalRecord.attribute(XMLConstants.XMLNS_URL, xsiPrefix, XMLConstants.XMLNS + ':' + xsiPrefix, XMLConstants.SCHEMA_INSTANCE_URL);\n }\n marshalRecord.attribute(XMLConstants.XMLNS_URL, XMLConstants.SCHEMA_PREFIX, XMLConstants.XMLNS + ':' + XMLConstants.SCHEMA_PREFIX, XMLConstants.SCHEMA_URL);\n marshalRecord.attribute(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_TYPE_ATTRIBUTE, xsiPrefix + \"String_Node_Str\" + XMLConstants.SCHEMA_TYPE_ATTRIBUTE, \"String_Node_Str\" + type.getLocalPart());\n }\n }\n String value = (String) XMLConversionManager.getDefaultXMLManager().convertObject(object, String.class, root.getSchemaType());\n marshalRecord.characters(value);\n }\n }\n if (null != rootFragment) {\n marshalRecord.endElement(rootFragment, nr);\n marshalRecord.endPrefixMappings(nr);\n }\n if (!isFragment()) {\n marshalRecord.endDocument();\n }\n marshalRecord.afterContainmentMarshal(null, object);\n}\n"
"private void selectDefaultListEntry() {\n for (GuiListExtended.IGuiListEntry entry : this.partList.getEntries()) {\n PartEntry partEntry = (PartEntry) entry;\n if ((!partEntry.partInfo.hasPart && !partInfo.hasPart) || (partInfo.hasPart && partEntry.partInfo.hasPart && partEntry.partInfo.typeid == partInfo.typeid && partEntry.partInfo.subid == partInfo.subid)) {\n this.partList.setCurrrentIndex(this.partList.getEntries().indexOf(partEntry));\n }\n }\n}\n"
"public MaterialContainer checkMaterial(final CommandSender sender, final String mat) {\n MaterialContainer m = null;\n try {\n m = Utils.checkMaterial(mat);\n } catch (final InvalidInputException e) {\n final HashMap<String, String> replace = new HashMap<String, String>();\n replace.put(\"String_Node_Str\", mat);\n Utils.sI18n(sender, \"String_Node_Str\", replace);\n return null;\n }\n if (m.isNull()) {\n final HashMap<String, String> replace = new HashMap<String, String>();\n replace.put(\"String_Node_Str\", mat);\n Utils.sI18n(sender, \"String_Node_Str\", replace);\n }\n return m;\n}\n"
"private void writeModelToFileSystem(List<TreeNode> trees, Path out) {\n FSDataOutputStream fos = null;\n try {\n fos = FileSystem.get(new Configuration()).create(out);\n LOG.info(\"String_Node_Str\", out);\n fos.writeUTF(modelConfig.getAlgorithm());\n fos.writeUTF(this.validParams.get(\"String_Node_Str\").toString());\n fos.writeBoolean(this.modelConfig.isClassification());\n fos.writeBoolean(this.modelConfig.getTrain().isOneVsAll());\n fos.writeInt(this.inputCount);\n Map<Integer, String> columnIndexNameMapping = new HashMap<Integer, String>();\n Map<Integer, List<String>> columnIndexCategoricalListMapping = new HashMap<Integer, List<String>>();\n Map<Integer, Double> numericalMeanMapping = new HashMap<Integer, Double>();\n for (ColumnConfig columnConfig : this.columnConfigList) {\n columnIndexNameMapping.put(columnConfig.getColumnNum(), columnConfig.getColumnName());\n if (columnConfig.isCategorical() && CollectionUtils.isNotEmpty(columnConfig.getBinCategory())) {\n columnIndexCategoricalListMapping.put(columnConfig.getColumnNum(), columnConfig.getBinCategory());\n }\n if (columnConfig.isNumerical() && columnConfig.getMean() != null) {\n numericalMeanMapping.put(columnConfig.getColumnNum(), columnConfig.getMean());\n }\n }\n fos.writeInt(numericalMeanMapping.keySet().size());\n for (Entry<Integer, Double> entry : numericalMeanMapping.entrySet()) {\n fos.writeInt(entry.getKey());\n fos.writeDouble(entry.getValue() == null ? 0d : entry.getValue());\n }\n fos.writeInt(columnIndexNameMapping.size());\n for (Entry<Integer, String> entry : columnIndexNameMapping.entrySet()) {\n fos.writeInt(entry.getKey());\n fos.writeUTF(entry.getValue());\n }\n fos.writeInt(columnIndexCategoricalListMapping.size());\n for (Entry<Integer, List<String>> entry : columnIndexCategoricalListMapping.entrySet()) {\n List<String> categories = entry.getValue();\n if (categories != null) {\n fos.writeInt(entry.getKey());\n fos.writeInt(categories.size());\n for (String category : categories) {\n fos.writeUTF(category);\n }\n }\n }\n Map<Integer, Integer> columnMapping = getColumnMapping();\n fos.writeInt(columnMapping.size());\n for (Entry<Integer, Integer> entry : columnMapping.entrySet()) {\n fos.writeInt(entry.getKey());\n fos.writeInt(entry.getValue());\n }\n int treeLength = trees.size();\n fos.writeInt(treeLength);\n for (TreeNode treeNode : trees) {\n treeNode.write(fos);\n }\n } catch (IOException e) {\n LOG.error(\"String_Node_Str\", e);\n } finally {\n IOUtils.closeStream(fos);\n }\n}\n"
"public void onReceive(Integer from, int protocol, byte[] msg) {\n int sequence = ByteManipulator.getInt(msg, 0);\n Session session = this.m_sessionManager.getSession(from);\n if (protocol == MESSAGE_TYPE.NORMAL) {\n if (session.didAlreadyReceiveSequence(sequence)) {\n info(\"String_Node_Str\" + from + \"String_Node_Str\" + sequence);\n this.sendAck(from.intValue(), sequence);\n long identifier = getPacketIdentifier(from.intValue(), sequence);\n this.onReliableMessageSent(identifier);\n } else {\n info(\"String_Node_Str\" + from + \"String_Node_Str\" + sequence);\n session.markSequenceAsReceived(sequence);\n session.addToReceiveQueue(new Packet(msg, from));\n Packet packet;\n while ((packet = session.getNextReceivePacket()) != null) {\n this.onReliableMessageReceived(packet.getFrom(), packet.getBuffer());\n }\n this.sendAck(from.intValue(), sequence);\n } else if (protocol == MESSAGE_TYPE.ACK) {\n info(\"String_Node_Str\" + sequence);\n session.removeFromWaitingForAckList(sequence);\n } else {\n }\n }\n}\n"
"public void setHighLowSupport(String support) {\n String parentPos;\n boolean haveLow = false;\n int i;\n for (Pair<Integer, Dir> a : rootPath) {\n i = a.get1();\n if (i == -1) {\n break;\n }\n if (cs.prm.useGoldSyntax) {\n parentPos = sent.get(i).getPos();\n } else {\n parentPos = sent.get(i).getPpos();\n }\n if (parentPos.equals(support)) {\n if (!haveLow) {\n haveLow = true;\n this.lowSupport = i;\n this.highSupport = i;\n } else {\n this.highSupport = i;\n }\n }\n }\n}\n"
"public Algorithm configure(Properties configuration) throws JMException {\n Algorithm algorithm;\n Mutation mutation;\n algorithm = new SMPSO(problem_);\n swarmSize_ = Integer.parseInt(configuration.getProperty(\"String_Node_Str\", String.valueOf(swarmSize_)));\n maxIterations_ = Integer.parseInt(configuration.getProperty(\"String_Node_Str\", String.valueOf(maxIterations_)));\n archiveSize_ = Integer.parseInt(configuration.getProperty(\"String_Node_Str\", String.valueOf(archiveSize_)));\n c1Min_ = Double.parseDouble(configuration.getProperty(\"String_Node_Str\", String.valueOf(c1Min_)));\n c1Max_ = Double.parseDouble(configuration.getProperty(\"String_Node_Str\", String.valueOf(c1Max_)));\n c2Min_ = Double.parseDouble(configuration.getProperty(\"String_Node_Str\", String.valueOf(c2Min_)));\n c2Min_ = Double.parseDouble(configuration.getProperty(\"String_Node_Str\", String.valueOf(c2Max_)));\n weightMin_ = Double.parseDouble(configuration.getProperty(\"String_Node_Str\", String.valueOf(weightMin_)));\n weightMax_ = Double.parseDouble(configuration.getProperty(\"String_Node_Str\", String.valueOf(weightMax_)));\n algorithm.setInputParameter(\"String_Node_Str\", swarmSize_);\n algorithm.setInputParameter(\"String_Node_Str\", maxIterations_);\n algorithm.setInputParameter(\"String_Node_Str\", archiveSize_);\n algorithm.setInputParameter(\"String_Node_Str\", c1Min_);\n algorithm.setInputParameter(\"String_Node_Str\", c1Max_);\n algorithm.setInputParameter(\"String_Node_Str\", c2Min_);\n algorithm.setInputParameter(\"String_Node_Str\", c2Max_);\n algorithm.setInputParameter(\"String_Node_Str\", weightMin_);\n algorithm.setInputParameter(\"String_Node_Str\", weightMax_);\n algorithm.setInputParameter(\"String_Node_Str\", changeVelocity1_);\n algorithm.setInputParameter(\"String_Node_Str\", changeVelocity2_);\n mutationProbability_ = Double.parseDouble(configuration.getProperty(\"String_Node_Str\", String.valueOf(mutationProbability_)));\n mutationDistributionIndex_ = Double.parseDouble(configuration.getProperty(\"String_Node_Str\", String.valueOf(mutationDistributionIndex_)));\n mutationProbability_ = Double.parseDouble(configuration.getProperty(\"String_Node_Str\", String.valueOf(mutationProbability_)));\n mutationDistributionIndex_ = Double.parseDouble(configuration.getProperty(\"String_Node_Str\", String.valueOf(mutationDistributionIndex_)));\n HashMap<String, Object> parameters = new HashMap<String, Object>();\n parameters.put(\"String_Node_Str\", mutationProbability_);\n parameters.put(\"String_Node_Str\", mutationDistributionIndex_);\n mutation = MutationFactory.getMutationOperator(\"String_Node_Str\", parameters);\n algorithm.addOperator(\"String_Node_Str\", mutation);\n return algorithm;\n}\n"
"public static String getErrorMessage(final Context context, boolean suggestMediaOptimization, final MediaModel media, final MediaStore.MediaError error) {\n if (context == null || media == null || error == null) {\n return null;\n }\n switch(error.type) {\n case FS_READ_PERMISSION_DENIED:\n return context.getString(R.string.error_media_insufficient_fs_permissions);\n case NOT_FOUND:\n return context.getString(R.string.error_media_not_found);\n case AUTHORIZATION_REQUIRED:\n return context.getString(R.string.media_error_no_permission_upload);\n case REQUEST_TOO_LARGE:\n if (media.isVideo()) {\n return context.getString(R.string.media_error_http_too_large_video_upload);\n } else {\n if (!suggestMediaOptimization) {\n return context.getString(R.string.media_error_http_too_large_photo_upload);\n } else {\n return context.getString(R.string.media_error_http_too_large_photo_upload) + \"String_Node_Str\" + context.getString(R.string.media_error_suggest_optimize_image);\n }\n }\n case SERVER_ERROR:\n return context.getString(R.string.media_error_internal_server_error);\n case TIMEOUT:\n return context.getString(R.string.media_error_timeout);\n case CONNECTION_ERROR:\n return context.getString(R.string.connection_error) + \"String_Node_Str\" + context.getString(R.string.media_error_generic_connection_error);\n case EXCEEDS_FILESIZE_LIMIT:\n return context.getString(R.string.media_error_exceeds_php_filesize);\n case EXCEEDS_MEMORY_LIMIT:\n return context.getString(R.string.media_error_exceeds_memory_limit);\n case PARSE_ERROR:\n return context.getString(R.string.error_media_parse_error);\n }\n return null;\n}\n"
"public void create(NamespaceMeta namespaceMeta) throws IOException, ExploreException, SQLException {\n createLocation(namespaceMeta);\n if (cConf.getBoolean(Constants.Explore.EXPLORE_ENABLED)) {\n try {\n exploreFacade.createNamespace(namespaceMeta);\n } catch (ExploreException | SQLException e) {\n try {\n deleteLocation(namespaceMeta.getNamespaceId());\n } catch (Exception e2) {\n e.addSuppressed(e2);\n }\n throw e;\n }\n }\n}\n"
"public Control createControl(final Composite subComposite, final IElementParameter param, final int numInRow, final int nbInRow, final int top, final Control lastControl) {\n this.setDragAndDropActionBool();\n this.curParameter = param;\n Button btnEdit = getWidgetFactory().createButton(subComposite, \"String_Node_Str\", SWT.PUSH);\n FormData data;\n btnEdit.setImage(ImageProvider.getImage(CoreUIPlugin.getImageDescriptor(DOTS_BUTTON)));\n data = new FormData();\n data.left = new FormAttachment(((numInRow * MAX_PERCENT) / nbInRow), -STANDARD_BUTTON_WIDTH);\n data.right = new FormAttachment(((numInRow * MAX_PERCENT) / nbInRow), 0);\n data.top = new FormAttachment(labelLabel, 0, SWT.CENTER);\n data.height = STANDARD_HEIGHT - 2;\n btnEdit.setLayoutData(data);\n btnEdit.setData(NAME, FILE);\n btnEdit.setData(PARAMETER_NAME, param.getName());\n btnEdit.setEnabled(dragAndDropActionBool == true || !param.isReadOnly());\n btnEdit.addSelectionListener(listenerSelection);\n DecoratedField dField = new DecoratedField(subComposite, SWT.BORDER, new SelectAllTextControlCreator());\n if (param.isRequired()) {\n FieldDecoration decoration = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_REQUIRED);\n dField.addFieldDecoration(decoration, SWT.RIGHT | SWT.TOP, false);\n }\n if (param.isRepositoryValueUsed()) {\n FieldDecoration decoration = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);\n decoration.setDescription(Messages.getString(\"String_Node_Str\"));\n dField.addFieldDecoration(decoration, SWT.RIGHT | SWT.BOTTOM, false);\n }\n Control cLayout = dField.getLayoutControl();\n Text filePathText = (Text) dField.getControl();\n filePathText.setData(PARAMETER_NAME, param.getName());\n cLayout.setBackground(subComposite.getBackground());\n editionControlHelper.register(param.getName(), filePathText);\n if (!elem.isReadOnly()) {\n if (param.isRepositoryValueUsed() && dragAndDropActionBool == false) {\n addRepositoryPropertyListener(filePathText);\n }\n filePathText.setEditable(dragAndDropActionBool == true || !param.isRepositoryValueUsed());\n } else {\n filePathText.setEditable(dragAndDropActionBool == true || false);\n }\n addDragAndDropTarget(filePathText);\n if (elem instanceof Node) {\n filePathText.setToolTipText(VARIABLE_TOOLTIP + param.getVariableName());\n }\n hashCurControls.put(param.getName(), filePathText);\n CLabel labelLabel = getWidgetFactory().createCLabel(subComposite, param.getDisplayName());\n data = new FormData();\n if (lastControl != null) {\n data.left = new FormAttachment(lastControl, 0);\n } else {\n data.left = new FormAttachment((((numInRow - 1) * MAX_PERCENT) / nbInRow), 0);\n }\n data.top = new FormAttachment(0, top);\n labelLabel.setLayoutData(data);\n if (numInRow != 1) {\n labelLabel.setAlignment(SWT.RIGHT);\n }\n data = new FormData();\n int currentLabelWidth = STANDARD_LABEL_WIDTH;\n GC gc = new GC(labelLabel);\n Point labelSize = gc.stringExtent(param.getDisplayName());\n gc.dispose();\n if ((labelSize.x + ITabbedPropertyConstants.HSPACE) > currentLabelWidth) {\n currentLabelWidth = labelSize.x + ITabbedPropertyConstants.HSPACE;\n }\n if (numInRow == 1) {\n if (lastControl != null) {\n data.left = new FormAttachment(lastControl, currentLabelWidth);\n } else {\n data.left = new FormAttachment(0, currentLabelWidth);\n }\n } else {\n data.left = new FormAttachment(labelLabel, 0, SWT.RIGHT);\n }\n data.right = new FormAttachment(btnEdit, 0);\n data.top = new FormAttachment(btnEdit, 0, SWT.CENTER);\n cLayout.setLayoutData(data);\n Point initialSize = dField.getLayoutControl().computeSize(SWT.DEFAULT, SWT.DEFAULT);\n dynamicProperty.setCurRowSize(initialSize.y + ITabbedPropertyConstants.VSPACE);\n return btnEdit;\n}\n"
"private String freeAgentsGrouping() {\n String chosenGroup = \"String_Node_Str\";\n double currentHeuristic = 0, previousHeuristic = 0;\n double vectorDistance;\n double maxDistance = Math.sqrt(2);\n double economic, social, esFaction = 0;\n double trustFaction = 0;\n String bestPartner = \"String_Node_Str\";\n for (String trustee : getConn().getUngroupedAgents()) {\n if ((!this.getId().equals(trustee)) && (!invitationHolders.contains(trustee)) && (!groupFounders.contains(trustee))) {\n Double trustValue = this.getDataModel().getTrust(trustee);\n if (trustValue != null)\n trustFaction = trustValue;\n economic = getConn().getAgentById(trustee).getEconomicBelief() - getDataModel().getEconomicBelief();\n social = getConn().getAgentById(trustee).getSocialBelief() - getDataModel().getSocialBelief();\n vectorDistance = Math.sqrt(Math.pow(economic, 2) + Math.pow(social, 2));\n esFaction = 1 - (vectorDistance / maxDistance);\n currentHeuristic = 0.5 * trustFaction + 0.5 * esFaction;\n if ((currentHeuristic > 0.6) && (previousHeuristic < currentHeuristic)) {\n bestPartner = trustee;\n previousHeuristic = currentHeuristic;\n }\n }\n }\n if (bestPartner.equals(\"String_Node_Str\"))\n return null;\n else {\n GroupDataInitialiser myGroup = new GroupDataInitialiser(this.uniformRandLong(), (this.getDataModel().getEconomicBelief() + getConn().getAgentById(bestPartner).getEconomicBelief()) / 2);\n Class<? extends AbstractGroupAgent> gtype = getConn().getAllowedGroupTypes().get(0);\n chosenGroup = getConn().createGroup(gtype, myGroup, bestPartner);\n groupFounders.add(this.getId());\n logger.log(Level.INFO, \"String_Node_Str\" + this.getConn().getAgentById(bestPartner).getName());\n logger.log(Level.INFO, \"String_Node_Str\" + previousHeuristic);\n logger.log(Level.INFO, \"String_Node_Str\" + this.getConn().getAgentById(bestPartner).getName());\n return chosenGroup;\n }\n}\n"
"public static void main(String[] args) {\n final User user = new User(\"String_Node_Str\", \"String_Node_Str\", emptySet());\n driver(true, dsl -> {\n dsl.startNode(\"String_Node_Str\", singleton(new ServiceInfo(ValidatingNotaryService.Companion.getType(), null)), emptyList(), emptyMap());\n try {\n NodeHandle nodeA = dsl.startNode(\"String_Node_Str\", emptySet(), singletonList(user), emptyMap()).get();\n NodeHandle nodeB = dsl.startNode(\"String_Node_Str\", emptySet(), singletonList(user), emptyMap()).get();\n NodeHandle nodeC = dsl.startNode(\"String_Node_Str\", emptySet(), singletonList(user), emptyMap()).get();\n dsl.startWebserver(nodeA);\n dsl.startWebserver(nodeB);\n dsl.startWebserver(nodeC);\n dsl.waitForAllNodesToFinish();\n } catch (Throwable e) {\n System.err.println(\"String_Node_Str\" + e.getMessage());\n e.printStackTrace();\n }\n return null;\n });\n}\n"
"public void start(Context context) throws LifecycleException, InterruptedException {\n logger.info(\"String_Node_Str\", this);\n Preconditions.checkState(name != null, \"String_Node_Str\");\n Preconditions.checkState(source != null, \"String_Node_Str\");\n Preconditions.checkState(sink != null, \"String_Node_Str\");\n driver = new ChannelDriver(name + \"String_Node_Str\");\n driver.setSource(source);\n driver.setSink(sink);\n boolean reached = false;\n try {\n driver.start(context);\n reached = LifecycleController.waitForOneOf(driver, new LifecycleState[] { LifecycleState.START, LifecycleState.ERROR });\n } catch (InterruptedException e) {\n logger.error(\"String_Node_Str\");\n driver.stop(context);\n lifecycleState = LifecycleState.ERROR;\n throw e;\n }\n if (reached) {\n lifecycleState = driver.getLifecycleState();\n }\n}\n"
"public void doOpenGraph(File selectedFile) {\n try {\n if (selectedFile.getName().startsWith(\"String_Node_Str\")) {\n GraphViewerPanelManager<UndirectedGraph<String, String>> viewerPanelManager = new GraphViewerPanelManager<UndirectedGraph<String, String>>(this, path, selectedFile, UndirectedSparseGraph.<String, String>getFactory(), tabbedPane, GraphType.UNDIRECTED);\n viewerPanelManagerMap.put(viewerPanelManager.getVersionDir().getAbsolutePath(), viewerPanelManager);\n viewerPanelManager.createAndAddViewerPanel();\n } else if (selectedFile.getName().startsWith(\"String_Node_Str\")) {\n GraphViewerPanelManager<DirectedGraph<String, String>> viewerPanelManager = new GraphViewerPanelManager<DirectedGraph<String, String>>(this, path, selectedFile, DirectedSparseMultigraph.<String, String>getFactory(), tabbedPane, GraphType.DIRECTED);\n viewerPanelManagerMap.put(selectedFile.getAbsolutePath(), viewerPanelManager);\n viewerPanelManager.createAndAddViewerPanel();\n } else {\n JOptionPane.showMessageDialog(this, String.format(\"String_Node_Str\", selectedFile.getName()));\n }\n } catch (Exception e) {\n e.printStackTrace();\n JOptionPane.showMessageDialog(this, \"String_Node_Str\" + e.getMessage());\n }\n}\n"
"public void mergeInto(DoubleLinkedList<T> newList) {\n newList.head.prev.next = this.head.next;\n this.head.next.prev = newList.head.prev;\n this.head.prev.next = newList.head;\n newList.head.prev = this.head.prev;\n newList.size += size;\n clear();\n}\n"
"private void traverse(MappingState state, PDGNodeMapping nodeMapping) {\n PDGNode nodeG1 = nodeMapping.getNodeG1();\n PDGNode nodeG2 = nodeMapping.getNodeG2();\n Iterator<GraphEdge> nodeG1EdgeIterator = nodeG1.getDependenceIterator();\n while (nodeG1EdgeIterator.hasNext()) {\n PDGDependence edgeG1 = (PDGDependence) nodeG1EdgeIterator.next();\n Iterator<GraphEdge> nodeG2EdgeIterator = nodeG2.getDependenceIterator();\n while (nodeG2EdgeIterator.hasNext()) {\n PDGDependence edgeG2 = (PDGDependence) nodeG2EdgeIterator.next();\n PDGEdgeMapping edgeMapping = new PDGEdgeMapping(edgeG1, edgeG2);\n if (edgeMapping.isCompatible(nodeMapping)) {\n PDGNode dstNodeG1 = null;\n PDGNode dstNodeG2 = null;\n if (edgeG1.getSrc().equals(nodeG1) && edgeG2.getSrc().equals(nodeG2)) {\n dstNodeG1 = (PDGNode) edgeG1.getDst();\n dstNodeG2 = (PDGNode) edgeG2.getDst();\n } else if (edgeG1.getDst().equals(nodeG1) && edgeG2.getDst().equals(nodeG2)) {\n dstNodeG1 = (PDGNode) edgeG1.getSrc();\n dstNodeG2 = (PDGNode) edgeG2.getSrc();\n }\n if (dstNodeG1 instanceof PDGMethodEntryNode && dstNodeG2 instanceof PDGMethodEntryNode) {\n if (!state.edgeMappings.contains(edgeMapping)) {\n state.edgeMappings.add(edgeMapping);\n state.propagateEdgeMappingToChildren(edgeMapping);\n }\n }\n ASTNodeMatcher astNodeMatcher = new ASTNodeMatcher(nodeMapping.getTypeRoot1(), nodeMapping.getTypeRoot2());\n boolean match;\n if (dstNodeG1 instanceof PDGMethodEntryNode || dstNodeG2 instanceof PDGMethodEntryNode)\n match = false;\n else\n match = dstNodeG1.getASTStatement().subtreeMatch(astNodeMatcher, dstNodeG2.getASTStatement());\n if (match) {\n PDGNodeMapping dstNodeMapping = new PDGNodeMapping(dstNodeG1, dstNodeG2, astNodeMatcher);\n MappingState childState = state.getChildStateWithNodeMapping(dstNodeMapping);\n if (childState != null) {\n if (!childState.edgeMappings.contains(edgeMapping)) {\n childState.edgeMappings.add(edgeMapping);\n childState.propagateEdgeMappingToChildren(edgeMapping);\n }\n } else if (!state.containsAtLeastOneNodeInMappings(dstNodeMapping)) {\n MappingState newMappingState = state.copy();\n state.children.add(newMappingState);\n newMappingState.edgeMappings.add(edgeMapping);\n newMappingState.nodeMappings.add(dstNodeMapping);\n traverse(newMappingState, dstNodeMapping);\n }\n }\n }\n }\n }\n}\n"
"public static Object invokeMethod(Object owner, String methodName, Object[] args) {\n Object returnValue = null;\n Class ownerClass = owner.getClass();\n Class[] argsClass = new Class[args.length];\n for (int i = 0, j = args.length; i < j; i++) {\n argsClass[i] = args[i].getClass();\n }\n Method method = ownerClass.getMethod(methodName, argsClass);\n returnValue = method.invoke(owner, args);\n return returnValue;\n}\n"
"public void initialize(Rect taskStackBounds) {\n SystemServicesProxy ssp = Recents.getSystemServices();\n RecentsConfiguration config = Recents.getConfiguration();\n int widthPadding = (int) (config.taskStackWidthPaddingPct * taskStackBounds.width());\n int heightPadding = mContext.getResources().getDimensionPixelSize(R.dimen.recents_stack_top_padding);\n mStackBottomOffset = mSystemInsets.bottom + heightPadding;\n int ffHeight = (taskStackBounds.height() - 2 * heightPadding - mStackBottomOffset) / 2;\n mFreeformRect.set(taskStackBounds.left + widthPadding, taskStackBounds.top + heightPadding, taskStackBounds.right - widthPadding, taskStackBounds.top + heightPadding + ffHeight);\n mFreeformStackRect.set(taskStackBounds.left + widthPadding, taskStackBounds.top + heightPadding + ffHeight + heightPadding, taskStackBounds.right - widthPadding, taskStackBounds.bottom);\n mStackRect.set(taskStackBounds.left + widthPadding, taskStackBounds.top + heightPadding, taskStackBounds.right - widthPadding, taskStackBounds.bottom);\n int size = mStackRect.width();\n mTaskRect.set(mStackRect.left, mStackRect.top, mStackRect.left + size, mStackRect.top + size);\n mCurrentStackRect = ssp.hasFreeformWorkspaceSupport() ? mFreeformStackRect : mStackRect;\n int withinAffiliationOffset = mContext.getResources().getDimensionPixelSize(R.dimen.recents_task_bar_height);\n int betweenAffiliationOffset = (int) (VISIBLE_TASK_HEIGHT_BETWEEN_TASKS * mTaskRect.height());\n mWithinAffiliationPOffset = sCurve.computePOffsetForScaledHeight(withinAffiliationOffset, mCurrentStackRect);\n mBetweenAffiliationPOffset = sCurve.computePOffsetForScaledHeight(betweenAffiliationOffset, mCurrentStackRect);\n mTaskHeightPOffset = sCurve.computePOffsetForScaledHeight(mTaskRect.height(), mCurrentStackRect);\n mTaskHalfHeightPOffset = sCurve.computePOffsetForScaledHeight(mTaskRect.height() / 2, mCurrentStackRect);\n mStackBottomPOffset = sCurve.computePOffsetForHeight(mStackBottomOffset, mCurrentStackRect);\n if (DEBUG) {\n Log.d(TAG, \"String_Node_Str\");\n Log.d(TAG, \"String_Node_Str\" + sCurve.getArcLength());\n Log.d(TAG, \"String_Node_Str\" + mFreeformRect);\n Log.d(TAG, \"String_Node_Str\" + mFreeformStackRect);\n Log.d(TAG, \"String_Node_Str\" + mStackRect);\n Log.d(TAG, \"String_Node_Str\" + mTaskRect);\n Log.d(TAG, \"String_Node_Str\" + mSystemInsets);\n Log.d(TAG, \"String_Node_Str\" + mWithinAffiliationPOffset);\n Log.d(TAG, \"String_Node_Str\" + mBetweenAffiliationPOffset);\n Log.d(TAG, \"String_Node_Str\" + mTaskHeightPOffset);\n Log.d(TAG, \"String_Node_Str\" + mTaskHalfHeightPOffset);\n Log.d(TAG, \"String_Node_Str\" + mStackBottomPOffset);\n Log.d(TAG, \"String_Node_Str\" + sCurve.pToX(0f, mCurrentStackRect));\n Log.d(TAG, \"String_Node_Str\" + sCurve.pToX(1f, mCurrentStackRect));\n }\n}\n"
"private Object getGenericRepositoryValue(GenericConnection connection, String value, IMetadataTable table) {\n if (connection == null) {\n return null;\n }\n String compPropertiesStr = connection.getCompProperties();\n if (compPropertiesStr != null) {\n Deserialized fromSerialized = ComponentProperties.fromSerialized(compPropertiesStr);\n if (fromSerialized != null) {\n ComponentProperties componentProperties = fromSerialized.properties;\n return ComponentsUtils.getGenericRepositoryValue(componentProperties, value);\n }\n }\n return null;\n}\n"
"protected void updateWorkflowOptions() {\n if (selectedPlugin == null) {\n workflowListDescription.clear();\n workflowListDescriptionCategories.setText(\"String_Node_Str\");\n workflowListDescription.setVisible(false);\n workflowListDescriptionCategories.setVisible(false);\n workflowOptions.setPluginInfo(null);\n } else {\n String pluginName = messages.pluginLabelWithVersion(selectedPlugin.getName(), selectedPlugin.getVersion());\n name.setText(pluginName);\n workflowListTitle.setText(pluginName);\n String description = selectedPlugin.getDescription();\n if (description != null && description.length() > 0) {\n String[] split = description.split(\"String_Node_Str\");\n workflowListDescription.clear();\n for (String s : split) {\n Label descriptionLine = new Label(s);\n descriptionLine.addStyleName(\"String_Node_Str\");\n descriptionLine.addStyleName(\"String_Node_Str\");\n workflowListDescription.add(descriptionLine);\n }\n List<String> categoryTranslations = new ArrayList<>();\n for (String category : selectedPlugin.getCategories()) {\n categoryTranslations.add(messages.showPluginCategories(category));\n }\n SafeHtml categories = messages.createJobCategoryWorkflow(categoryTranslations);\n workflowListDescriptionCategories.setHTML(categories);\n workflowListDescription.setVisible(true);\n workflowListDescriptionCategories.setVisible(true);\n } else {\n workflowListDescription.setVisible(false);\n workflowListDescriptionCategories.setVisible(false);\n }\n if (selectedPlugin.getParameters().isEmpty()) {\n workflowPanel.setVisible(false);\n workflowOptions.setPluginInfo(null);\n } else {\n workflowPanel.setVisible(true);\n workflowOptions.setPluginInfo(selectedPlugin);\n }\n }\n}\n"
"private int encode(RenderedImage im, TIFFEncodeParam encodeParam, int ifdOffset, boolean isLast) throws IOException {\n if (CodecUtils.isPackedByteImage(im)) {\n ColorModel sourceCM = im.getColorModel();\n ColorModel destCM = RasterFactory.createComponentColorModel(DataBuffer.TYPE_BYTE, sourceCM.getColorSpace(), sourceCM.hasAlpha(), sourceCM.isAlphaPremultiplied(), sourceCM.getTransparency());\n Point origin = new Point(im.getMinX(), im.getMinY());\n WritableRaster raster = Raster.createWritableRaster(destCM.createCompatibleSampleModel(im.getWidth(), im.getHeight()), origin);\n raster.setRect(im.getData());\n im = new SingleTileRenderedImage(raster, destCM);\n }\n int compression = encodeParam.getCompression();\n boolean isTiled = encodeParam.getWriteTiled();\n int minX = im.getMinX();\n int minY = im.getMinY();\n int width = im.getWidth();\n int height = im.getHeight();\n SampleModel sampleModel = im.getSampleModel();\n int[] sampleSize = sampleModel.getSampleSize();\n for (int i = 1; i < sampleSize.length; i++) {\n if (sampleSize[i] != sampleSize[0]) {\n throw new RuntimeException(JaiI18N.getString(\"String_Node_Str\"));\n }\n }\n int numBands = sampleModel.getNumBands();\n if ((sampleSize[0] == 1 || sampleSize[0] == 4) && numBands != 1) {\n throw new RuntimeException(JaiI18N.getString(\"String_Node_Str\"));\n }\n int dataType = sampleModel.getDataType();\n switch(dataType) {\n case DataBuffer.TYPE_BYTE:\n if (sampleSize[0] != 1 && sampleSize[0] != 4 && sampleSize[0] != 8) {\n throw new RuntimeException(JaiI18N.getString(\"String_Node_Str\"));\n }\n break;\n case DataBuffer.TYPE_SHORT:\n case DataBuffer.TYPE_USHORT:\n if (sampleSize[0] != 16) {\n throw new RuntimeException(JaiI18N.getString(\"String_Node_Str\"));\n }\n break;\n case DataBuffer.TYPE_INT:\n case DataBuffer.TYPE_FLOAT:\n if (sampleSize[0] != 32) {\n throw new RuntimeException(JaiI18N.getString(\"String_Node_Str\"));\n }\n break;\n default:\n throw new RuntimeException(JaiI18N.getString(\"String_Node_Str\"));\n }\n boolean dataTypeIsShort = dataType == DataBuffer.TYPE_SHORT || dataType == DataBuffer.TYPE_USHORT;\n ColorModel colorModel = im.getColorModel();\n if (colorModel != null && colorModel instanceof IndexColorModel && dataType != DataBuffer.TYPE_BYTE) {\n throw new RuntimeException(JaiI18N.getString(\"String_Node_Str\"));\n }\n IndexColorModel icm = null;\n int sizeOfColormap = 0;\n int[] colormap = null;\n int imageType = TIFF_UNSUPPORTED;\n int numExtraSamples = 0;\n int extraSampleType = EXTRA_SAMPLE_UNSPECIFIED;\n if (colorModel instanceof IndexColorModel) {\n icm = (IndexColorModel) colorModel;\n int mapSize = icm.getMapSize();\n if (sampleSize[0] == 1 && numBands == 1) {\n if (mapSize != 2) {\n throw new IllegalArgumentException(JaiI18N.getString(\"String_Node_Str\"));\n }\n byte[] r = new byte[mapSize];\n icm.getReds(r);\n byte[] g = new byte[mapSize];\n icm.getGreens(g);\n byte[] b = new byte[mapSize];\n icm.getBlues(b);\n if ((r[0] & 0xff) == 0 && (r[1] & 0xff) == 255 && (g[0] & 0xff) == 0 && (g[1] & 0xff) == 255 && (b[0] & 0xff) == 0 && (b[1] & 0xff) == 255) {\n imageType = TIFF_BILEVEL_BLACK_IS_ZERO;\n } else if ((r[0] & 0xff) == 255 && (r[1] & 0xff) == 0 && (g[0] & 0xff) == 255 && (g[1] & 0xff) == 0 && (b[0] & 0xff) == 255 && (b[1] & 0xff) == 0) {\n imageType = TIFF_BILEVEL_WHITE_IS_ZERO;\n } else {\n imageType = TIFF_PALETTE;\n }\n } else if (numBands == 1) {\n imageType = TIFF_PALETTE;\n }\n } else if (colorModel == null) {\n if (sampleSize[0] == 1 && numBands == 1) {\n imageType = TIFF_BILEVEL_BLACK_IS_ZERO;\n } else {\n imageType = TIFF_GENERIC;\n if (numBands > 1) {\n numExtraSamples = numBands - 1;\n }\n }\n } else {\n ColorSpace colorSpace = colorModel.getColorSpace();\n switch(colorSpace.getType()) {\n case ColorSpace.TYPE_CMYK:\n imageType = TIFF_CMYK;\n break;\n case ColorSpace.TYPE_GRAY:\n imageType = TIFF_GRAY;\n break;\n case ColorSpace.TYPE_Lab:\n imageType = TIFF_CIELAB;\n break;\n case ColorSpace.TYPE_RGB:\n if (compression == COMP_JPEG_TTN2 && encodeParam.getJPEGCompressRGBToYCbCr()) {\n imageType = TIFF_YCBCR;\n } else {\n imageType = TIFF_RGB;\n }\n break;\n case ColorSpace.TYPE_YCbCr:\n imageType = TIFF_YCBCR;\n break;\n default:\n imageType = TIFF_GENERIC;\n break;\n }\n if (imageType == TIFF_GENERIC) {\n numExtraSamples = numBands - 1;\n } else if (numBands > 1) {\n numExtraSamples = numBands - colorSpace.getNumComponents();\n }\n if (numExtraSamples == 1 && colorModel.hasAlpha()) {\n extraSampleType = colorModel.isAlphaPremultiplied() ? EXTRA_SAMPLE_ASSOCIATED_ALPHA : EXTRA_SAMPLE_UNASSOCIATED_ALPHA;\n }\n }\n if (imageType == TIFF_UNSUPPORTED) {\n throw new RuntimeException(JaiI18N.getString(\"String_Node_Str\"));\n }\n if (compression == COMP_JPEG_TTN2) {\n if (imageType == TIFF_PALETTE) {\n throw new RuntimeException(JaiI18N.getString(\"String_Node_Str\"));\n } else if (!(sampleSize[0] == 8 && (imageType == TIFF_GRAY || imageType == TIFF_RGB || imageType == TIFF_YCBCR))) {\n throw new RuntimeException(JaiI18N.getString(\"String_Node_Str\"));\n }\n }\n if ((imageType != TIFF_BILEVEL_WHITE_IS_ZERO && imageType != TIFF_BILEVEL_BLACK_IS_ZERO) && (compression == COMP_GROUP3_1D || compression == COMP_GROUP3_2D || compression == COMP_GROUP4)) {\n throw new RuntimeException(JaiI18N.getString(\"String_Node_Str\"));\n }\n int photometricInterpretation = -1;\n switch(imageType) {\n case TIFF_BILEVEL_WHITE_IS_ZERO:\n photometricInterpretation = 0;\n break;\n case TIFF_BILEVEL_BLACK_IS_ZERO:\n photometricInterpretation = 1;\n break;\n case TIFF_GRAY:\n case TIFF_GENERIC:\n photometricInterpretation = 1;\n break;\n case TIFF_PALETTE:\n photometricInterpretation = 3;\n icm = (IndexColorModel) colorModel;\n sizeOfColormap = icm.getMapSize();\n byte[] r = new byte[sizeOfColormap];\n icm.getReds(r);\n byte[] g = new byte[sizeOfColormap];\n icm.getGreens(g);\n byte[] b = new byte[sizeOfColormap];\n icm.getBlues(b);\n int redIndex = 0, greenIndex = sizeOfColormap;\n int blueIndex = 2 * sizeOfColormap;\n colormap = new int[sizeOfColormap * 3];\n for (int i = 0; i < sizeOfColormap; i++) {\n colormap[redIndex++] = (r[i] << 8) & 0xffff;\n colormap[greenIndex++] = (g[i] << 8) & 0xffff;\n colormap[blueIndex++] = (b[i] << 8) & 0xffff;\n }\n sizeOfColormap *= 3;\n break;\n case TIFF_RGB:\n photometricInterpretation = 2;\n break;\n case TIFF_CMYK:\n photometricInterpretation = 5;\n break;\n case TIFF_YCBCR:\n photometricInterpretation = 6;\n break;\n case TIFF_CIELAB:\n photometricInterpretation = 8;\n break;\n default:\n throw new RuntimeException(JaiI18N.getString(\"String_Node_Str\"));\n }\n int tileWidth;\n int tileHeight;\n if (isTiled) {\n tileWidth = encodeParam.getTileWidth() > 0 ? encodeParam.getTileWidth() : im.getTileWidth();\n tileHeight = encodeParam.getTileHeight() > 0 ? encodeParam.getTileHeight() : im.getTileHeight();\n } else {\n tileWidth = width;\n tileHeight = encodeParam.getTileHeight() > 0 ? encodeParam.getTileHeight() : DEFAULT_ROWS_PER_STRIP;\n }\n JPEGEncodeParam jep = null;\n if (compression == COMP_JPEG_TTN2) {\n jep = encodeParam.getJPEGEncodeParam();\n int maxSubH = jep.getHorizontalSubsampling(0);\n int maxSubV = jep.getVerticalSubsampling(0);\n for (int i = 1; i < numBands; i++) {\n int subH = jep.getHorizontalSubsampling(i);\n if (subH > maxSubH) {\n maxSubH = subH;\n }\n int subV = jep.getVerticalSubsampling(i);\n if (subV > maxSubV) {\n maxSubV = subV;\n }\n }\n int factorV = 8 * maxSubV;\n tileHeight = (int) ((float) tileHeight / (float) factorV + 0.5F) * factorV;\n if (tileHeight < factorV) {\n tileHeight = factorV;\n }\n if (isTiled) {\n int factorH = 8 * maxSubH;\n tileWidth = (int) ((float) tileWidth / (float) factorH + 0.5F) * factorH;\n if (tileWidth < factorH) {\n tileWidth = factorH;\n }\n }\n }\n int numTiles;\n if (isTiled) {\n numTiles = ((width + tileWidth - 1) / tileWidth) * ((height + tileHeight - 1) / tileHeight);\n } else {\n numTiles = (int) Math.ceil((double) height / (double) tileHeight);\n }\n long[] tileByteCounts = new long[numTiles];\n long bytesPerRow = (long) Math.ceil((sampleSize[0] / 8.0) * tileWidth * numBands);\n long bytesPerTile = bytesPerRow * tileHeight;\n for (int i = 0; i < numTiles; i++) {\n tileByteCounts[i] = bytesPerTile;\n }\n if (!isTiled) {\n long lastStripRows = height - (tileHeight * (numTiles - 1));\n tileByteCounts[numTiles - 1] = lastStripRows * bytesPerRow;\n }\n long totalBytesOfData = bytesPerTile * (numTiles - 1) + tileByteCounts[numTiles - 1];\n long[] tileOffsets = new long[numTiles];\n SortedSet fields = new TreeSet();\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_IMAGE_WIDTH, TIFFField.TIFF_LONG, 1, (Object) (new long[] { (long) width })));\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_IMAGE_LENGTH, TIFFField.TIFF_LONG, 1, new long[] { (long) height }));\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_BITS_PER_SAMPLE, TIFFField.TIFF_SHORT, numBands, intsToChars(sampleSize)));\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_COMPRESSION, TIFFField.TIFF_SHORT, 1, new char[] { (char) compression }));\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_PHOTOMETRIC_INTERPRETATION, TIFFField.TIFF_SHORT, 1, new char[] { (char) photometricInterpretation }));\n if (!isTiled) {\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_STRIP_OFFSETS, TIFFField.TIFF_LONG, numTiles, (long[]) tileOffsets));\n }\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_SAMPLES_PER_PIXEL, TIFFField.TIFF_SHORT, 1, new char[] { (char) numBands }));\n if (!isTiled) {\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_ROWS_PER_STRIP, TIFFField.TIFF_LONG, 1, new long[] { (long) tileHeight }));\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_STRIP_BYTE_COUNTS, TIFFField.TIFF_LONG, numTiles, (long[]) tileByteCounts));\n }\n if (colormap != null) {\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_COLORMAP, TIFFField.TIFF_SHORT, sizeOfColormap, intsToChars(colormap)));\n }\n if (isTiled) {\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_TILE_WIDTH, TIFFField.TIFF_LONG, 1, new long[] { (long) tileWidth }));\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_TILE_LENGTH, TIFFField.TIFF_LONG, 1, new long[] { (long) tileHeight }));\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_TILE_OFFSETS, TIFFField.TIFF_LONG, numTiles, (long[]) tileOffsets));\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_TILE_BYTE_COUNTS, TIFFField.TIFF_LONG, numTiles, (long[]) tileByteCounts));\n }\n if (numExtraSamples > 0) {\n int[] extraSamples = new int[numExtraSamples];\n for (int i = 0; i < numExtraSamples; i++) {\n extraSamples[i] = extraSampleType;\n }\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_EXTRA_SAMPLES, TIFFField.TIFF_SHORT, numExtraSamples, intsToChars(extraSamples)));\n }\n if (dataType != DataBuffer.TYPE_BYTE) {\n int[] sampleFormat = new int[numBands];\n if (dataType == DataBuffer.TYPE_FLOAT) {\n sampleFormat[0] = 3;\n } else if (dataType == DataBuffer.TYPE_USHORT) {\n sampleFormat[0] = 1;\n } else {\n sampleFormat[0] = 2;\n }\n for (int b = 1; b < numBands; b++) {\n sampleFormat[b] = sampleFormat[0];\n }\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_SAMPLE_FORMAT, TIFFField.TIFF_SHORT, numBands, intsToChars(sampleFormat)));\n }\n boolean inverseFill = encodeParam.getReverseFillOrder();\n boolean T4encode2D = encodeParam.getT4Encode2D();\n boolean T4PadEOLs = encodeParam.getT4PadEOLs();\n TIFFFaxEncoder faxEncoder = null;\n if ((imageType == TIFF_BILEVEL_BLACK_IS_ZERO || imageType == TIFF_BILEVEL_WHITE_IS_ZERO) && (compression == COMP_GROUP3_1D || compression == COMP_GROUP3_2D || compression == COMP_GROUP4)) {\n faxEncoder = new TIFFFaxEncoder(inverseFill);\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_FILL_ORDER, TIFFField.TIFF_SHORT, 1, new char[] { inverseFill ? (char) 2 : (char) 1 }));\n if (compression == COMP_GROUP3_2D) {\n long T4Options = 0x00000000;\n if (T4encode2D) {\n T4Options |= 0x00000001;\n }\n if (T4PadEOLs) {\n T4Options |= 0x00000004;\n }\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_T4_OPTIONS, TIFFField.TIFF_LONG, 1, new long[] { T4Options }));\n } else if (compression == COMP_GROUP4) {\n fields.add(new TIFFField(TIFFImageDecoder.TIFF_T6_OPTIONS, TIFFField.TIFF_LONG, 1, new long[] { (long) 0x00000000 }));\n }\n }\n com.sun.image.codec.jpeg.JPEGEncodeParam jpegEncodeParam = null;\n com.sun.image.codec.jpeg.JPEGImageEncoder jpegEncoder = null;\n int jpegColorID = 0;\n if (compression == COMP_JPEG_TTN2) {\n jpegColorID = com.sun.image.codec.jpeg.JPEGDecodeParam.COLOR_ID_UNKNOWN;\n switch(imageType) {\n case TIFF_GRAY:\n case TIFF_PALETTE:\n jpegColorID = com.sun.image.codec.jpeg.JPEGDecodeParam.COLOR_ID_GRAY;\n break;\n case TIFF_RGB:\n jpegColorID = com.sun.image.codec.jpeg.JPEGDecodeParam.COLOR_ID_RGB;\n break;\n case TIFF_YCBCR:\n jpegColorID = com.sun.image.codec.jpeg.JPEGDecodeParam.COLOR_ID_YCbCr;\n break;\n }\n Raster tile00 = im.getTile(im.getMinTileX(), im.getMinTileY());\n jpegEncodeParam = com.sun.image.codec.jpeg.JPEGCodec.getDefaultJPEGEncodeParam(tile00, jpegColorID);\n JPEGImageEncoder.modifyEncodeParam(jep, jpegEncodeParam, numBands);\n if (jep.getWriteImageOnly()) {\n jpegEncodeParam.setImageInfoValid(false);\n jpegEncodeParam.setTableInfoValid(true);\n ByteArrayOutputStream tableStream = new ByteArrayOutputStream();\n jpegEncoder = com.sun.image.codec.jpeg.JPEGCodec.createJPEGEncoder(tableStream, jpegEncodeParam);\n jpegEncoder.encode(tile00);\n byte[] tableData = tableStream.toByteArray();\n fields.add(new TIFFField(TIFF_JPEG_TABLES, TIFFField.TIFF_UNDEFINED, tableData.length, tableData));\n jpegEncoder = null;\n }\n }\n if (imageType == TIFF_YCBCR) {\n int subsampleH = 1;\n int subsampleV = 1;\n if (compression == COMP_JPEG_TTN2) {\n subsampleH = jep.getHorizontalSubsampling(0);\n subsampleV = jep.getVerticalSubsampling(0);\n for (int i = 1; i < numBands; i++) {\n int subH = jep.getHorizontalSubsampling(i);\n if (subH > subsampleH) {\n subsampleH = subH;\n }\n int subV = jep.getVerticalSubsampling(i);\n if (subV > subsampleV) {\n subsampleV = subV;\n }\n }\n }\n fields.add(new TIFFField(TIFF_YCBCR_SUBSAMPLING, TIFFField.TIFF_SHORT, 2, new char[] { (char) subsampleH, (char) subsampleV }));\n fields.add(new TIFFField(TIFF_YCBCR_POSITIONING, TIFFField.TIFF_SHORT, 1, new char[] { compression == COMP_JPEG_TTN2 ? (char) 1 : (char) 2 }));\n long[][] refbw;\n if (compression == COMP_JPEG_TTN2) {\n refbw = new long[][] { { 0, 1 }, { 255, 1 }, { 128, 1 }, { 255, 1 }, { 128, 1 }, { 255, 1 } };\n } else {\n refbw = new long[][] { { 15, 1 }, { 235, 1 }, { 128, 1 }, { 240, 1 }, { 128, 1 }, { 240, 1 } };\n }\n fields.add(new TIFFField(TIFF_REF_BLACK_WHITE, TIFFField.TIFF_RATIONAL, 6, refbw));\n }\n TIFFField[] extraFields = encodeParam.getExtraFields();\n if (extraFields != null) {\n ArrayList extantTags = new ArrayList(fields.size());\n Iterator fieldIter = fields.iterator();\n while (fieldIter.hasNext()) {\n TIFFField fld = (TIFFField) fieldIter.next();\n extantTags.add(new Integer(fld.getTag()));\n }\n int numExtraFields = extraFields.length;\n for (int i = 0; i < numExtraFields; i++) {\n TIFFField fld = extraFields[i];\n Integer tagValue = new Integer(fld.getTag());\n if (!extantTags.contains(tagValue)) {\n fields.add(fld);\n extantTags.add(tagValue);\n }\n }\n }\n int dirSize = getDirectorySize(fields);\n tileOffsets[0] = ifdOffset + dirSize;\n OutputStream outCache = null;\n byte[] compressBuf = null;\n File tempFile = null;\n int nextIFDOffset = 0;\n boolean skipByte = false;\n Deflater deflater = null;\n int deflateLevel = Deflater.DEFAULT_COMPRESSION;\n boolean jpegRGBToYCbCr = false;\n if (compression == COMP_NONE) {\n int numBytesPadding = 0;\n if (sampleSize[0] == 16 && tileOffsets[0] % 2 != 0) {\n numBytesPadding = 1;\n tileOffsets[0]++;\n } else if (sampleSize[0] == 32 && tileOffsets[0] % 4 != 0) {\n numBytesPadding = (int) (4 - tileOffsets[0] % 4);\n tileOffsets[0] += numBytesPadding;\n }\n for (int i = 1; i < numTiles; i++) {\n tileOffsets[i] = tileOffsets[i - 1] + tileByteCounts[i - 1];\n }\n if (!isLast) {\n nextIFDOffset = (int) (tileOffsets[0] + totalBytesOfData);\n if (nextIFDOffset % 2 != 0) {\n nextIFDOffset++;\n skipByte = true;\n }\n }\n writeDirectory(ifdOffset, fields, nextIFDOffset);\n if (numBytesPadding != 0) {\n for (int padding = 0; padding < numBytesPadding; padding++) {\n output.write((byte) 0);\n }\n }\n } else {\n if ((output instanceof SeekableOutputStream)) {\n ((SeekableOutputStream) output).seek(tileOffsets[0]);\n } else {\n outCache = output;\n try {\n tempFile = File.createTempFile(\"String_Node_Str\", \"String_Node_Str\");\n tempFile.deleteOnExit();\n RandomAccessFile raFile = new RandomAccessFile(tempFile, \"String_Node_Str\");\n output = new SeekableOutputStream(raFile);\n } catch (Exception e) {\n tempFile = null;\n output = new ByteArrayOutputStream((int) totalBytesOfData);\n }\n }\n int bufSize = 0;\n switch(compression) {\n case COMP_GROUP3_1D:\n bufSize = (int) Math.ceil((((tileWidth + 1) / 2) * 9 + 2) / 8.0);\n break;\n case COMP_GROUP3_2D:\n case COMP_GROUP4:\n bufSize = (int) Math.ceil((((tileWidth + 1) / 2) * 9 + 2) / 8.0);\n bufSize = tileHeight * (bufSize + 2) + 12;\n break;\n case COMP_PACKBITS:\n bufSize = (int) (bytesPerTile + ((bytesPerRow + 127) / 128) * tileHeight);\n break;\n case COMP_JPEG_TTN2:\n bufSize = 0;\n if (imageType == TIFF_YCBCR && colorModel != null && colorModel.getColorSpace().getType() == ColorSpace.TYPE_RGB) {\n jpegRGBToYCbCr = true;\n }\n break;\n case COMP_DEFLATE:\n bufSize = (int) bytesPerTile;\n deflater = new Deflater(encodeParam.getDeflateLevel());\n break;\n default:\n bufSize = 0;\n }\n if (bufSize != 0) {\n compressBuf = new byte[bufSize];\n }\n }\n int[] pixels = null;\n float[] fpixels = null;\n boolean checkContiguous = ((sampleSize[0] == 1 && sampleModel instanceof MultiPixelPackedSampleModel && dataType == DataBuffer.TYPE_BYTE) || (sampleSize[0] == 8 && sampleModel instanceof ComponentSampleModel));\n byte[] bpixels = null;\n if (compression != COMP_JPEG_TTN2) {\n if (dataType == DataBuffer.TYPE_BYTE) {\n bpixels = new byte[tileHeight * tileWidth * numBands];\n } else if (dataTypeIsShort) {\n bpixels = new byte[2 * tileHeight * tileWidth * numBands];\n } else if (dataType == DataBuffer.TYPE_INT || dataType == DataBuffer.TYPE_FLOAT) {\n bpixels = new byte[4 * tileHeight * tileWidth * numBands];\n }\n }\n int lastRow = minY + height;\n int lastCol = minX + width;\n int tileNum = 0;\n for (int row = minY; row < lastRow; row += tileHeight) {\n int rows = isTiled ? tileHeight : Math.min(tileHeight, lastRow - row);\n int size = rows * tileWidth * numBands;\n for (int col = minX; col < lastCol; col += tileWidth) {\n Raster src = im.getData(new Rectangle(col, row, tileWidth, rows));\n boolean useDataBuffer = false;\n if (compression != COMP_JPEG_TTN2) {\n if (checkContiguous) {\n if (sampleSize[0] == 8) {\n ComponentSampleModel csm = (ComponentSampleModel) src.getSampleModel();\n int[] bankIndices = csm.getBankIndices();\n int[] bandOffsets = csm.getBandOffsets();\n int pixelStride = csm.getPixelStride();\n int lineStride = csm.getScanlineStride();\n if (pixelStride != numBands || lineStride != bytesPerRow) {\n useDataBuffer = false;\n } else {\n useDataBuffer = true;\n for (int i = 0; useDataBuffer && i < numBands; i++) {\n if (bankIndices[i] != 0 || bandOffsets[i] != i) {\n useDataBuffer = false;\n }\n }\n }\n } else {\n MultiPixelPackedSampleModel mpp = (MultiPixelPackedSampleModel) src.getSampleModel();\n if (mpp.getNumBands() == 1 && mpp.getDataBitOffset() == 0 && mpp.getPixelBitStride() == 1) {\n useDataBuffer = true;\n }\n }\n }\n if (!useDataBuffer) {\n if (dataType == DataBuffer.TYPE_FLOAT) {\n fpixels = src.getPixels(col, row, tileWidth, rows, fpixels);\n } else {\n pixels = src.getPixels(col, row, tileWidth, rows, pixels);\n }\n }\n }\n int index;\n int pixel = 0;\n ;\n int k = 0;\n switch(sampleSize[0]) {\n case 1:\n if (useDataBuffer) {\n byte[] btmp = ((DataBufferByte) src.getDataBuffer()).getData();\n MultiPixelPackedSampleModel mpp = (MultiPixelPackedSampleModel) src.getSampleModel();\n int lineStride = mpp.getScanlineStride();\n int inOffset = mpp.getOffset(col - src.getSampleModelTranslateX(), row - src.getSampleModelTranslateY());\n if (lineStride == (int) bytesPerRow) {\n System.arraycopy(btmp, inOffset, bpixels, 0, (int) bytesPerRow * rows);\n } else {\n int outOffset = 0;\n for (int j = 0; j < rows; j++) {\n System.arraycopy(btmp, inOffset, bpixels, outOffset, (int) bytesPerRow);\n inOffset += lineStride;\n outOffset += (int) bytesPerRow;\n }\n }\n } else {\n index = 0;\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < tileWidth / 8; j++) {\n pixel = (pixels[index++] << 7) | (pixels[index++] << 6) | (pixels[index++] << 5) | (pixels[index++] << 4) | (pixels[index++] << 3) | (pixels[index++] << 2) | (pixels[index++] << 1) | pixels[index++];\n bpixels[k++] = (byte) pixel;\n }\n if (tileWidth % 8 > 0) {\n pixel = 0;\n for (int j = 0; j < tileWidth % 8; j++) {\n pixel |= (pixels[index++] << (7 - j));\n }\n bpixels[k++] = (byte) pixel;\n }\n }\n }\n if (compression == COMP_NONE) {\n output.write(bpixels, 0, rows * ((tileWidth + 7) / 8));\n } else if (compression == COMP_GROUP3_1D) {\n int rowStride = (tileWidth + 7) / 8;\n int rowOffset = 0;\n int numCompressedBytes = 0;\n for (int tileRow = 0; tileRow < rows; tileRow++) {\n int numCompressedBytesInRow = faxEncoder.encodeRLE(bpixels, rowOffset, 0, tileWidth, compressBuf);\n output.write(compressBuf, 0, numCompressedBytesInRow);\n rowOffset += rowStride;\n numCompressedBytes += numCompressedBytesInRow;\n }\n tileByteCounts[tileNum++] = numCompressedBytes;\n } else if (compression == COMP_GROUP3_2D) {\n int numCompressedBytes = faxEncoder.encodeT4(!T4encode2D, T4PadEOLs, bpixels, (tileWidth + 7) / 8, 0, tileWidth, rows, compressBuf);\n tileByteCounts[tileNum++] = numCompressedBytes;\n output.write(compressBuf, 0, numCompressedBytes);\n } else if (compression == COMP_GROUP4) {\n int numCompressedBytes = faxEncoder.encodeT6(bpixels, (tileWidth + 7) / 8, 0, tileWidth, rows, compressBuf);\n tileByteCounts[tileNum++] = numCompressedBytes;\n output.write(compressBuf, 0, numCompressedBytes);\n } else if (compression == COMP_PACKBITS) {\n int numCompressedBytes = compressPackBits(bpixels, rows, (int) bytesPerRow, compressBuf);\n tileByteCounts[tileNum++] = numCompressedBytes;\n output.write(compressBuf, 0, numCompressedBytes);\n } else if (compression == COMP_DEFLATE) {\n int numCompressedBytes = deflate(deflater, bpixels, compressBuf);\n tileByteCounts[tileNum++] = numCompressedBytes;\n output.write(compressBuf, 0, numCompressedBytes);\n }\n break;\n case 4:\n index = 0;\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j < tileWidth / 2; j++) {\n pixel = (pixels[index++] << 4) | pixels[index++];\n bpixels[k++] = (byte) pixel;\n }\n if ((tileWidth % 2) == 1) {\n pixel = pixels[index++] << 4;\n bpixels[k++] = (byte) pixel;\n }\n }\n if (compression == COMP_NONE) {\n output.write(bpixels, 0, rows * ((tileWidth + 1) / 2));\n } else if (compression == COMP_PACKBITS) {\n int numCompressedBytes = compressPackBits(bpixels, rows, (int) bytesPerRow, compressBuf);\n tileByteCounts[tileNum++] = numCompressedBytes;\n output.write(compressBuf, 0, numCompressedBytes);\n } else if (compression == COMP_DEFLATE) {\n int numCompressedBytes = deflate(deflater, bpixels, compressBuf);\n tileByteCounts[tileNum++] = numCompressedBytes;\n output.write(compressBuf, 0, numCompressedBytes);\n }\n break;\n case 8:\n if (compression != COMP_JPEG_TTN2) {\n if (useDataBuffer) {\n byte[] btmp = ((DataBufferByte) src.getDataBuffer()).getData();\n ComponentSampleModel csm = (ComponentSampleModel) src.getSampleModel();\n int inOffset = csm.getOffset(col - src.getSampleModelTranslateX(), row - src.getSampleModelTranslateY());\n int lineStride = csm.getScanlineStride();\n if (lineStride == (int) bytesPerRow) {\n System.arraycopy(btmp, inOffset, bpixels, 0, (int) bytesPerRow * rows);\n } else {\n int outOffset = 0;\n for (int j = 0; j < rows; j++) {\n System.arraycopy(btmp, inOffset, bpixels, outOffset, (int) bytesPerRow);\n inOffset += lineStride;\n outOffset += (int) bytesPerRow;\n }\n }\n } else {\n for (int i = 0; i < size; i++) {\n bpixels[i] = (byte) pixels[i];\n }\n }\n }\n if (compression == COMP_NONE) {\n output.write(bpixels, 0, size);\n } else if (compression == COMP_PACKBITS) {\n int numCompressedBytes = compressPackBits(bpixels, rows, (int) bytesPerRow, compressBuf);\n tileByteCounts[tileNum++] = numCompressedBytes;\n output.write(compressBuf, 0, numCompressedBytes);\n } else if (compression == COMP_JPEG_TTN2) {\n long startPos = getOffset(output);\n if (jpegEncoder == null || jpegEncodeParam.getWidth() != src.getWidth() || jpegEncodeParam.getHeight() != src.getHeight()) {\n jpegEncodeParam = com.sun.image.codec.jpeg.JPEGCodec.getDefaultJPEGEncodeParam(src, jpegColorID);\n JPEGImageEncoder.modifyEncodeParam(jep, jpegEncodeParam, numBands);\n jpegEncoder = com.sun.image.codec.jpeg.JPEGCodec.createJPEGEncoder(output, jpegEncodeParam);\n }\n if (jpegRGBToYCbCr) {\n WritableRaster wRas = null;\n if (src instanceof WritableRaster) {\n wRas = (WritableRaster) src;\n } else {\n wRas = src.createCompatibleWritableRaster();\n wRas.setRect(src);\n }\n if (wRas.getMinX() != 0 || wRas.getMinY() != 0) {\n wRas = wRas.createWritableTranslatedChild(0, 0);\n }\n BufferedImage bi = new BufferedImage(colorModel, wRas, false, null);\n jpegEncoder.encode(bi);\n } else {\n jpegEncoder.encode(src.createTranslatedChild(0, 0));\n }\n long endPos = getOffset(output);\n tileByteCounts[tileNum++] = (int) (endPos - startPos);\n } else if (compression == COMP_DEFLATE) {\n int numCompressedBytes = deflate(deflater, bpixels, compressBuf);\n tileByteCounts[tileNum++] = numCompressedBytes;\n output.write(compressBuf, 0, numCompressedBytes);\n }\n break;\n case 16:\n int ls = 0;\n for (int i = 0; i < size; i++) {\n short value = (short) pixels[i];\n bpixels[ls++] = (byte) ((value & 0xff00) >> 8);\n bpixels[ls++] = (byte) (value & 0x00ff);\n }\n if (compression == COMP_NONE) {\n output.write(bpixels, 0, size * 2);\n } else if (compression == COMP_PACKBITS) {\n int numCompressedBytes = compressPackBits(bpixels, rows, (int) bytesPerRow, compressBuf);\n tileByteCounts[tileNum++] = numCompressedBytes;\n output.write(compressBuf, 0, numCompressedBytes);\n } else if (compression == COMP_DEFLATE) {\n int numCompressedBytes = deflate(deflater, bpixels, compressBuf);\n tileByteCounts[tileNum++] = numCompressedBytes;\n output.write(compressBuf, 0, numCompressedBytes);\n }\n break;\n case 32:\n if (dataType == DataBuffer.TYPE_INT) {\n int li = 0;\n for (int i = 0; i < size; i++) {\n int value = pixels[i];\n bpixels[li++] = (byte) ((value & 0xff000000) >> 24);\n bpixels[li++] = (byte) ((value & 0x00ff0000) >> 16);\n bpixels[li++] = (byte) ((value & 0x0000ff00) >> 8);\n bpixels[li++] = (byte) (value & 0x000000ff);\n }\n } else {\n int lf = 0;\n for (int i = 0; i < size; i++) {\n int value = Float.floatToIntBits(fpixels[i]);\n bpixels[lf++] = (byte) ((value & 0xff000000) >> 24);\n bpixels[lf++] = (byte) ((value & 0x00ff0000) >> 16);\n bpixels[lf++] = (byte) ((value & 0x0000ff00) >> 8);\n bpixels[lf++] = (byte) (value & 0x000000ff);\n }\n }\n if (compression == COMP_NONE) {\n output.write(bpixels, 0, size * 4);\n } else if (compression == COMP_PACKBITS) {\n int numCompressedBytes = compressPackBits(bpixels, rows, (int) bytesPerRow, compressBuf);\n tileByteCounts[tileNum++] = numCompressedBytes;\n output.write(compressBuf, 0, numCompressedBytes);\n } else if (compression == COMP_DEFLATE) {\n int numCompressedBytes = deflate(deflater, bpixels, compressBuf);\n tileByteCounts[tileNum++] = numCompressedBytes;\n output.write(compressBuf, 0, numCompressedBytes);\n }\n break;\n }\n }\n }\n if (compression == COMP_NONE) {\n if (skipByte) {\n output.write((byte) 0);\n }\n } else {\n int totalBytes = 0;\n for (int i = 1; i < numTiles; i++) {\n int numBytes = (int) tileByteCounts[i - 1];\n totalBytes += numBytes;\n tileOffsets[i] = tileOffsets[i - 1] + numBytes;\n }\n totalBytes += (int) tileByteCounts[numTiles - 1];\n nextIFDOffset = isLast ? 0 : ifdOffset + dirSize + totalBytes;\n if (nextIFDOffset % 2 != 0) {\n nextIFDOffset++;\n skipByte = true;\n }\n if (outCache == null) {\n if (skipByte) {\n output.write((byte) 0);\n }\n SeekableOutputStream sos = (SeekableOutputStream) output;\n long savePos = sos.getFilePointer();\n sos.seek(ifdOffset);\n writeDirectory(ifdOffset, fields, nextIFDOffset);\n sos.seek(savePos);\n } else if (tempFile != null) {\n output.close();\n FileInputStream fileStream = new FileInputStream(tempFile);\n output = outCache;\n writeDirectory(ifdOffset, fields, nextIFDOffset);\n byte[] copyBuffer = new byte[8192];\n int bytesCopied = 0;\n while (bytesCopied < totalBytes) {\n int bytesRead = fileStream.read(copyBuffer);\n if (bytesRead == -1) {\n break;\n }\n output.write(copyBuffer, 0, bytesRead);\n bytesCopied += bytesRead;\n }\n fileStream.close();\n tempFile.delete();\n if (skipByte) {\n output.write((byte) 0);\n }\n } else if (output instanceof ByteArrayOutputStream) {\n ByteArrayOutputStream memoryStream = (ByteArrayOutputStream) output;\n output = outCache;\n writeDirectory(ifdOffset, fields, nextIFDOffset);\n memoryStream.writeTo(output);\n if (skipByte) {\n output.write((byte) 0);\n }\n } else {\n throw new IllegalStateException();\n }\n }\n return nextIFDOffset;\n}\n"
"protected Hashtable buildFieldTypes() {\n Hashtable fieldTypeMapping;\n fieldTypeMapping = new Hashtable();\n fieldTypeMapping.put(Boolean.class, new FieldTypeDefinition(\"String_Node_Str\", false));\n fieldTypeMapping.put(Integer.class, new FieldTypeDefinition(\"String_Node_Str\", 10));\n fieldTypeMapping.put(Long.class, new FieldTypeDefinition(\"String_Node_Str\", 19));\n fieldTypeMapping.put(Float.class, new FieldTypeDefinition(\"String_Node_Str\", 19, 4));\n fieldTypeMapping.put(Double.class, new FieldTypeDefinition(\"String_Node_Str\", 19, 4));\n fieldTypeMapping.put(Short.class, new FieldTypeDefinition(\"String_Node_Str\", 5));\n fieldTypeMapping.put(Byte.class, new FieldTypeDefinition(\"String_Node_Str\", 3));\n fieldTypeMapping.put(java.math.BigInteger.class, new FieldTypeDefinition(\"String_Node_Str\", 38));\n fieldTypeMapping.put(java.math.BigDecimal.class, new FieldTypeDefinition(\"String_Node_Str\", 38).setLimits(38, -38, 38));\n fieldTypeMapping.put(Number.class, new FieldTypeDefinition(\"String_Node_Str\", 38).setLimits(38, -38, 38));\n fieldTypeMapping.put(String.class, new FieldTypeDefinition(\"String_Node_Str\", DEFAULT_VARCHAR_SIZE));\n fieldTypeMapping.put(Character.class, new FieldTypeDefinition(\"String_Node_Str\", 1));\n fieldTypeMapping.put(Byte[].class, new FieldTypeDefinition(\"String_Node_Str\", false));\n fieldTypeMapping.put(Character[].class, new FieldTypeDefinition(\"String_Node_Str\", false));\n fieldTypeMapping.put(byte[].class, new FieldTypeDefinition(\"String_Node_Str\", false));\n fieldTypeMapping.put(char[].class, new FieldTypeDefinition(\"String_Node_Str\", false));\n fieldTypeMapping.put(java.sql.Blob.class, new FieldTypeDefinition(\"String_Node_Str\", false));\n fieldTypeMapping.put(java.sql.Clob.class, new FieldTypeDefinition(\"String_Node_Str\", false));\n fieldTypeMapping.put(java.sql.Date.class, new FieldTypeDefinition(\"String_Node_Str\", false));\n fieldTypeMapping.put(java.sql.Time.class, new FieldTypeDefinition(\"String_Node_Str\", false));\n fieldTypeMapping.put(java.sql.Timestamp.class, new FieldTypeDefinition(\"String_Node_Str\", false));\n fieldTypeMapping.put(java.util.Calendar.class, new FieldTypeDefinition(\"String_Node_Str\"));\n fieldTypeMapping.put(java.util.Date.class, new FieldTypeDefinition(\"String_Node_Str\"));\n return fieldTypeMapping;\n}\n"
"public void purgeIndicator(Indicator indicator) throws APIException {\n getPersister(indicator.getClass()).purgeIndicator(indicator);\n}\n"
"private <T extends AbstractSchema> boolean evaluateMandatoryCondition(final Set<TargetResource> resources, final List<? extends AbstractAttribute> attributes, final String schemaName, final Class<T> referenceSchema) {\n boolean result = false;\n TargetResource resource;\n for (Iterator<TargetResource> itor = resources.iterator(); itor.hasNext() && result; ) {\n resource = itor.next();\n result &= evaluateMandatoryCondition(resource.getName(), attributes, schemaName, referenceSchema);\n }\n return result;\n}\n"
"public static void shutdownGui() {\n dispatchAndWait(new Runnable() {\n\n public void run() {\n if (!alreadyRunningGTK) {\n gtk_main_quit();\n }\n started = false;\n }\n });\n}\n"
"public List<Pool> listSharedPoolsOf(Pool pool) {\n return listByCriteria(currentSession().createCriteria(Pool.class).createAlias(\"String_Node_Str\", \"String_Node_Str\").createAlias(\"String_Node_Str\", \"String_Node_Str\").add(Restrictions.eq(\"String_Node_Str\", Boolean.TRUE)).add(Restrictions.eq(\"String_Node_Str\", pool)).addOrder(Order.desc(\"String_Node_Str\")));\n}\n"
"private void themeComboBoxActionPerformed(java.awt.event.ActionEvent evt) {\n String laf = (String) lafComboBox.getSelectedItem();\n if (laf.equals(LAF_JGOODIES)) {\n config.setLafJGoodiesTheme((String) themeComboBox.getSelectedItem());\n } else if (laf.equals(LAF_SUBSTANCE)) {\n config.setLafSubstanceSkin((String) themeComboBox.getSelectedItem());\n }\n if (fullyInicialized && lafWhenLoaded.equals(lafComboBox.getSelectedItem())) {\n try {\n ThemeManager.setLaF();\n SwingUtilities.updateComponentTreeUI(MainFrame.getInstance());\n SwingUtilities.updateComponentTreeUI(this);\n } catch (Throwable ex) {\n logger.log(Level.SEVERE, \"String_Node_Str\", ex);\n }\n }\n}\n"
"private void runPost(PostEntHelper postHelper, Entitlement ent) {\n Invocable inv = (Invocable) jsEngine;\n EntitlementPool pool = ent.getPool();\n Consumer c = ent.getConsumer();\n String productOID = pool.getProduct();\n jsEngine.put(\"String_Node_Str\", new ReadOnlyConsumer(c));\n jsEngine.put(\"String_Node_Str\", new ReadOnlyProduct(pool.getProduct()));\n jsEngine.put(\"String_Node_Str\", postHelper);\n jsEngine.put(\"String_Node_Str\", new ReadOnlyEntitlement(ent));\n try {\n inv.invokeFunction(POST_PREFIX + p.getLabel());\n } catch (NoSuchMethodException e) {\n try {\n inv.invokeFunction(GLOBAL_POST_FUNCTION);\n } catch (NoSuchMethodException ex) {\n } catch (ScriptException ex) {\n throw new RuleExecutionException(ex);\n }\n } catch (ScriptException e) {\n throw new RuleExecutionException(e);\n }\n}\n"
"private boolean isDescriptionAllowed(OWLClassExpression description) {\n if (learningProblem instanceof ClassLearningProblem) {\n if (isEquivalenceProblem) {\n if (occursOnFirstLevel(description, classToDescribe)) {\n return false;\n }\n toTest.addAll(reasoner.getEquivalentClasses(d));\n }\n } else {\n TreeSet<OWLClassExpression> toTest = new TreeSet<OWLClassExpression>();\n if (classToDescribe != null) {\n toTest.add(classToDescribe);\n }\n while (!toTest.isEmpty()) {\n OWLClassExpression d = toTest.pollFirst();\n if (occursOnFirstLevel(description, d)) {\n return false;\n }\n toTest.addAll(reasoner.getClassHierarchy().getSuperClasses(d));\n }\n }\n return true;\n}\n"
"protected void align(boolean lastLine) {\n if (root == null) {\n return;\n }\n assert (parent instanceof PDFBlockStackingLM);\n String align = ((PDFBlockStackingLM) parent).getTextAlign();\n boolean isRightAligned = BidiAlignmentResolver.isRightAligned(root.getContent(), align, lastLine);\n if (isRightAligned || CSSConstants.CSS_CENTER_VALUE.equalsIgnoreCase(align)) {\n int spacing = root.getContentWidth() - getCurrentIP();\n Iterator iter = root.getChildren();\n while (iter.hasNext()) {\n AbstractArea area = (AbstractArea) iter.next();\n if (spacing > 0) {\n if (CSSConstants.CSS_RIGHT_VALUE.equalsIgnoreCase(align)) {\n area.setAllocatedPosition(spacing + area.getAllocatedX(), area.getAllocatedY());\n } else if (CSSConstants.CSS_CENTER_VALUE.equalsIgnoreCase(align)) {\n area.setAllocatedPosition(spacing / 2 + area.getAllocatedX(), area.getAllocatedY());\n }\n }\n }\n } else if (CSSConstants.CSS_JUSTIFY_VALUE.equalsIgnoreCase(align) && !lastLine) {\n justify();\n }\n verticalAlign();\n}\n"
"protected Bundle perform(Bundle extras) throws Exception {\n int friendId = extras.getInt(QBServiceConsts.EXTRA_FRIEND_ID);\n friendListHelper.removeFriend(friendId);\n Bundle result = new Bundle();\n result.putSerializable(QBServiceConsts.EXTRA_FRIEND_ID, friendId);\n return result;\n}\n"
"public boolean equals(Object obj) {\n if (obj == this)\n return true;\n if (obj == null)\n return false;\n if (obj.getClass() != getClass())\n return false;\n GitModelBlob objBlob = (GitModelBlob) obj;\n boolean equalsRemoteId;\n ObjectId objRemoteId = objBlob.remoteId;\n if (objRemoteId != null)\n equalsRemoteId = objRemoteId.equals(remoteId);\n else\n equalsRemoteId = remoteId == null;\n return objBlob.baseId.equals(baseId) && equalsRemoteId && objBlob.location.equals(location);\n}\n"
"private boolean exportJobScript(List<RepositoryNode> nodes, String version, String bundleVersion, IProgressMonitor monitor) {\n manager.setJobVersion(version);\n manager.setBundleVersion(bundleVersion);\n List<ExportFileResource> processes = getProcesses(nodes, \"String_Node_Str\");\n boolean isNotFirstTime = directoryName != null;\n if (isNotFirstTime && processes != null) {\n for (ExportFileResource process : processes) {\n process.setDirectoryName(directoryName);\n }\n }\n try {\n ProxyRepositoryFactory.getInstance().initialize();\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n }\n ItemCacheManager.clearCache();\n if (!isMultiNodes()) {\n for (ExportFileResource process : processes) {\n process.removeAllMap();\n ProcessItem processItem = (ProcessItem) process.getItem();\n if (!processItem.getProperty().getVersion().equals(version)) {\n process.setProcess(ItemCacheManager.getProcessItem(processItem.getProperty().getId(), version));\n }\n }\n }\n manager.setProgressMonitor(monitor);\n List<ExportFileResource> resourcesToExport = null;\n try {\n resourcesToExport = manager.getExportResources(processes.toArray(new ExportFileResource[] {}));\n IStructuredSelection selection = new StructuredSelection(nodes);\n boolean hasErrors = CorePlugin.getDefault().getRunProcessService().checkExportProcess(selection, true);\n if (hasErrors) {\n manager.deleteTempFiles();\n return false;\n }\n } catch (ProcessorException e) {\n MessageBoxExceptionHandler.process(e);\n return false;\n }\n if (isMultiNodes()) {\n manager.setTopFolder(resourcesToExport);\n }\n doArchiveExport(monitor, resourcesToExport);\n clean();\n ProcessorUtilities.resetExportConfig();\n boolean generated = generatedCodes(version, monitor, processes);\n if (!generated) {\n return false;\n }\n monitor.subTask(Messages.getString(\"String_Node_Str\", type));\n boolean addClasspathJar = true;\n IDesignerCoreService designerCoreService = CoreRuntimePlugin.getInstance().getDesignerCoreService();\n if (designerCoreService != null) {\n addClasspathJar = designerCoreService.getDesignerCorePreferenceStore().getBoolean(IRepositoryPrefConstants.ADD_CLASSPATH_JAR);\n }\n if (addClasspathJar) {\n reBuildJobZipFile(processes);\n } else {\n String zipFile = getTempDestinationValue();\n String destinationZipFile = manager.getDestinationPath();\n FileCopyUtils.copy(zipFile, destinationZipFile);\n }\n return true;\n}\n"
"private void renderSplineRelation(GL gl, ContentVirtualArray va, HeatMapWrapper heatMapWrapper) {\n float alpha = 0.6f;\n ContentSelectionManager contentSelectionManager = useCase.getContentSelectionManager();\n gl.glColor3f(0, 0, 0);\n for (Integer contentID : va) {\n for (SelectionType type : contentSelectionManager.getSelectionTypes(contentID)) {\n float[] typeColor = type.getColor();\n typeColor[3] = alpha;\n gl.glColor4fv(typeColor, 0);\n if (type == SelectionType.MOUSE_OVER || type == SelectionType.SELECTION) {\n gl.glLineWidth(5);\n break;\n } else {\n gl.glLineWidth(1);\n }\n }\n Vec2f leftPos;\n if (heatMapWrapper == leftHeatMapWrapper)\n leftPos = heatMapWrapper.getRightOverviewLinkPositionFromContentID(contentID);\n else\n leftPos = heatMapWrapper.getLeftOverviewLinkPositionFromContentID(contentID);\n if (leftPos == null)\n return;\n Vec2f rightPos;\n if (heatMapWrapper == leftHeatMapWrapper)\n rightPos = heatMapWrapper.getLeftDetailLinkPositionFromContentID(contentID);\n else\n rightPos = heatMapWrapper.getRightDetailLinkPositionFromContentID(contentID);\n if (rightPos == null)\n return;\n if (xOffset == 0) {\n for (Pair<Float, Integer> cluseterToXOffset : sortedClustersXOffsetUp) {\n if (contentID.equals(cluseterToXOffset.getSecond())) {\n xOffset = (rightPos.x() - leftPos.x()) * -((float) sortedClustersXOffsetUp.indexOf(cluseterToXOffset) + 1) / (sortedClustersXOffsetUp.size() + 1);\n break;\n }\n }\n for (Pair<Float, Integer> cluseterToXOffset : sortedClustersXOffsetDown) {\n if (contentID.equals(cluseterToXOffset.getSecond())) {\n xOffset = (rightPos.x() - leftPos.x()) * -((float) sortedClustersXOffsetDown.indexOf(cluseterToXOffset) + 1) / (sortedClustersXOffsetDown.size() + 1);\n break;\n }\n }\n }\n if (xOffset == 0)\n continue;\n ArrayList<Vec3f> points = new ArrayList<Vec3f>();\n points.add(new Vec3f(leftPos.x(), leftPos.y(), 0));\n points.add(new Vec3f(rightPos.x() + xOffset, leftPos.y(), 0));\n points.add(new Vec3f(rightPos.x() + xOffset, rightPos.y(), 0));\n points.add(new Vec3f(rightPos.x(), rightPos.y(), 0));\n NURBSCurve curve = new NURBSCurve(points, 30);\n points = curve.getCurvePoints();\n gl.glBegin(GL.GL_LINE_STRIP);\n for (int i = 0; i < points.size(); i++) gl.glVertex3f(points.get(i).x(), points.get(i).y(), 0.001f);\n gl.glEnd();\n }\n}\n"
"protected boolean transferIsland(final UUID oldOwner, final UUID newOwner) {\n if (players.hasIsland(oldOwner)) {\n Location islandLoc = players.getIslandLocation(oldOwner);\n players.setHasIsland(newOwner, true);\n players.setIslandLocation(newOwner, islandLoc);\n players.setTeamIslandLocation(newOwner, null);\n players.setHasIsland(oldOwner, false);\n players.setIslandLocation(oldOwner, null);\n players.setTeamIslandLocation(oldOwner, islandLoc);\n Island island = grid.getIslandAt(islandLoc);\n if (island != null) {\n grid.setIslandOwner(island, newOwner);\n }\n topTenList.remove(oldOwner);\n return true;\n }\n return false;\n}\n"
"protected Entity createEntity() {\n Entity ret = new Entity(this.getClass().getName() + \"String_Node_Str\" + cell.getCellID());\n rootNode = createSceneGraph(ret);\n if (cell.getComponent(MovableComponent.class) != null) {\n moveProcessor = new MoveProcessor(ClientContextJME.getWorldManager(), rootNode);\n ret.addComponent(ProcessorComponent.class, moveProcessor);\n }\n RenderComponent rc = ClientContextJME.getWorldManager().getRenderManager().createRenderComponent(rootNode);\n ret.addComponent(RenderComponent.class, rc);\n JMECollisionSystem collisionSystem = (JMECollisionSystem) ClientContextJME.getWorldManager().getCollisionManager().loadCollisionSystem(JMECollisionSystem.class);\n CollisionComponent cc = collisionSystem.createCollisionComponent(rootNode);\n ret.addComponent(CollisionComponent.class, cc);\n return ret;\n}\n"
"private void feedNalUnitTargetEnd(long pesTimeUs, int discardPadding) {\n sps.endNalUnit(discardPadding);\n pps.endNalUnit(discardPadding);\n if (sei.endNalUnit(discardPadding)) {\n int unescapedLength = unescapeStream(sei.nalData, sei.nalLength);\n seiReader.read(sei.nalData, 0, unescapedLength, pesTimeUs);\n }\n}\n"
"public void disconnected(final boolean errorCall) {\n if (SwingUtilities.isEventDispatchThread()) {\n LOGGER.info(\"String_Node_Str\");\n setStatusText(\"String_Node_Str\");\n disableButtons();\n hideGames();\n hideTables();\n } else {\n logger.info(\"String_Node_Str\");\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n setStatusText(\"String_Node_Str\");\n disableButtons();\n hideGames();\n hideTables();\n if (errorCall && JOptionPane.showConfirmDialog(MageFrame.this, \"String_Node_Str\", \"String_Node_Str\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {\n if (performConnect()) {\n enableButtons();\n }\n } else {\n session.disconnect(false);\n }\n }\n });\n }\n}\n"
"public Function getFuntionFromArray(MetadataColumnExt bean, RowGeneratorComponent externalNode, int index) {\n String value = externalNode.getColumnValue(bean, index);\n List<Function> functions = getFunctionByName(bean.getTalendType());\n Function currentFun = getAvailableFunFromValue(bean, value, functions);\n if (currentFun == null) {\n currentFun = new Function();\n String[] arrayTalendFunctions2 = new String[functions.size()];\n if (functions.isEmpty()) {\n currentFun.setDescription(\"String_Node_Str\");\n currentFun.setPreview(\"String_Node_Str\");\n currentFun.setParameters(new ArrayList<Parameter>());\n bean.setArrayFunctions(arrayTalendFunctions2);\n } else {\n int flag = 0;\n for (int i = 0; i < functions.size(); i++) {\n String funName = functions.get(i).getName();\n arrayTalendFunctions2[i] = funName;\n if (DEFAULT_SELECTED_METHOD.equals(funName)) {\n flag = i;\n }\n }\n currentFun = (Function) functions.get(flag).clone();\n bean.setArrayFunctions(arrayTalendFunctions2);\n }\n }\n return currentFun;\n}\n"
"public void check(RequiresDockerMachine context) throws UnsatisfiedRequirementException {\n String name = context.name();\n try {\n if (name != null && !name.isEmpty()) {\n String ip = commandLineExecutor.execCommand(new String[] { \"String_Node_Str\", \"String_Node_Str\", name });\n if (ip == null || ip.isEmpty()) {\n throw new UnsatisfiedRequirementException(\"String_Node_Str\" + name + \"String_Node_Str\");\n }\n } else {\n int machines = countLines(commandLineExecutor.execCommand(\"String_Node_Str\")) - 1;\n if (machines > 0) {\n throw new UnsatisfiedRequirementException(\"String_Node_Str\");\n }\n }\n } catch (ExecutionException e) {\n throw new UnsatisfiedRequirementException(\"String_Node_Str\");\n }\n}\n"
"public void setMotionPointData(final byte[] geometry, final byte[] image, final String missionUUID, final String trackNumber, final String trackUUID, final String trackStatus, final String trackClassification, final String trackItemUUID, final String trackPointSource, final long timeStamp, final long endTimeStamp, final double speed, final double course, final String trackItemClassification, final double latitude, final double longitude, final double elevation, final int pixelRow, final int pixelColumn, final int frameNumber, final String motionEvent) {\n EventType = new IntWritable(1);\n Geometry = new BytesWritable(geometry);\n if (image != null) {\n Image = new BytesWritable(image);\n }\n MissionUUID = new Text(missionUUID);\n TrackNumber = new Text(trackNumber);\n TrackUUID = new Text(trackUUID);\n TrackStatus = new Text(trackStatus);\n TrackClassification = new Text(trackClassification);\n TrackItemUUID = new Text(trackItemUUID);\n TrackPointSource = new Text(trackPointSource);\n TimeStamp = new LongWritable(timeStamp);\n EndTimeStamp = new LongWritable(endTimeStamp);\n Speed = new DoubleWritable(speed);\n Course = new DoubleWritable(course);\n TrackItemClassification = new Text(trackItemClassification);\n Latitude = new DoubleWritable(latitude);\n Longitude = new DoubleWritable(longitude);\n Elevation = new DoubleWritable(elevation);\n PixelRow = new IntWritable(pixelRow);\n PixelColumn = new IntWritable(pixelColumn);\n FrameNumber = new IntWritable(frameNumber);\n MotionEvent = new Text(motionEvent);\n}\n"
"public void handleMessage(Message msg) {\n AsyncResult ar;\n int[] ints;\n String[] strings;\n switch(msg.what) {\n case EVENT_RADIO_AVAILABLE:\n break;\n case EVENT_RUIM_READY:\n isSubscriptionFromRuim = true;\n if (mNeedToRegForRuimLoaded) {\n phone.mRuimRecords.registerForRecordsLoaded(this, EVENT_RUIM_RECORDS_LOADED, null);\n mNeedToRegForRuimLoaded = false;\n }\n cm.getCDMASubscription(obtainMessage(EVENT_POLL_STATE_CDMA_SUBSCRIPTION));\n if (DBG)\n log(\"String_Node_Str\");\n pollState();\n queueNextSignalStrengthPoll();\n break;\n case EVENT_NV_READY:\n isSubscriptionFromRuim = false;\n cm.getCDMASubscription(obtainMessage(EVENT_POLL_STATE_CDMA_SUBSCRIPTION));\n pollState();\n queueNextSignalStrengthPoll();\n break;\n case EVENT_RADIO_STATE_CHANGED:\n setPowerStateToDesired();\n pollState();\n break;\n case EVENT_NETWORK_STATE_CHANGED_CDMA:\n pollState();\n break;\n case EVENT_GET_SIGNAL_STRENGTH:\n if (!(cm.getRadioState().isOn()) || (cm.getRadioState().isGsm())) {\n return;\n }\n ar = (AsyncResult) msg.obj;\n onSignalStrengthResult(ar);\n queueNextSignalStrengthPoll();\n break;\n case EVENT_GET_LOC_DONE_CDMA:\n ar = (AsyncResult) msg.obj;\n if (ar.exception == null) {\n String[] states = (String[]) ar.result;\n int baseStationId = -1;\n int baseStationLongitude = -1;\n int baseStationLatitude = -1;\n int[] baseStationData = { -1, -1, -1 };\n if (states.length == 3) {\n for (int i = 0; i < states.length; i++) {\n try {\n if (states[i] != null && states[i].length() > 0) {\n baseStationData[i] = Integer.parseInt(states[i], 16);\n }\n } catch (NumberFormatException ex) {\n Log.w(LOG_TAG, \"String_Node_Str\" + ex);\n }\n }\n }\n if (cellLoc.getBaseStationId() != baseStationData[0] || cellLoc.getBaseStationLatitude() != baseStationData[1] || cellLoc.getBaseStationLongitude() != baseStationData[2]) {\n cellLoc.setCellLocationData(baseStationData[0], baseStationData[1], baseStationData[2]);\n phone.notifyLocationChanged();\n }\n }\n if (ar.userObj != null) {\n AsyncResult.forMessage(((Message) ar.userObj)).exception = ar.exception;\n ((Message) ar.userObj).sendToTarget();\n }\n break;\n case EVENT_POLL_STATE_REGISTRATION_CDMA:\n case EVENT_POLL_STATE_OPERATOR_CDMA:\n ar = (AsyncResult) msg.obj;\n handlePollStateResult(msg.what, ar);\n break;\n case EVENT_POLL_STATE_CDMA_SUBSCRIPTION:\n ar = (AsyncResult) msg.obj;\n if (ar.exception == null) {\n String[] cdmaSubscription = (String[]) ar.result;\n if (cdmaSubscription != null && cdmaSubscription.length >= 5) {\n mMdn = cdmaSubscription[0];\n if (cdmaSubscription[1] != null) {\n String[] sid = cdmaSubscription[1].split(\"String_Node_Str\");\n mHomeSystemId = new int[sid.length];\n for (int i = 0; i < sid.length; i++) {\n try {\n mHomeSystemId[i] = Integer.parseInt(sid[i]);\n } catch (NumberFormatException ex) {\n Log.e(LOG_TAG, \"String_Node_Str\", ex);\n }\n }\n }\n if (cdmaSubscription[2] != null) {\n String[] nid = cdmaSubscription[2].split(\"String_Node_Str\");\n try {\n mHomeNetworkId = nid.length > 0 ? Integer.parseInt(nid[0]) : 0;\n } catch (NumberFormatException e) {\n mHomeNetworkId = 0;\n }\n }\n mMin = cdmaSubscription[3];\n mPrlVersion = cdmaSubscription[4];\n Log.d(LOG_TAG, \"String_Node_Str\" + mMdn);\n } else {\n Log.w(LOG_TAG, \"String_Node_Str\" + cdmaSubscription.length);\n }\n }\n break;\n case EVENT_POLL_SIGNAL_STRENGTH:\n cm.getSignalStrength(obtainMessage(EVENT_GET_SIGNAL_STRENGTH));\n break;\n case EVENT_NITZ_TIME:\n ar = (AsyncResult) msg.obj;\n String nitzString = (String) ((Object[]) ar.result)[0];\n long nitzReceiveTime = ((Long) ((Object[]) ar.result)[1]).longValue();\n setTimeFromNITZString(nitzString, nitzReceiveTime);\n break;\n case EVENT_SIGNAL_STRENGTH_UPDATE:\n ar = (AsyncResult) msg.obj;\n dontPollSignalStrength = true;\n onSignalStrengthResult(ar);\n break;\n case EVENT_RUIM_RECORDS_LOADED:\n updateSpnDisplay();\n break;\n case EVENT_LOCATION_UPDATES_ENABLED:\n ar = (AsyncResult) msg.obj;\n if (ar.exception == null) {\n getLacAndCid(null);\n }\n break;\n case EVENT_ERI_FILE_LOADED:\n if (DBG)\n log(\"String_Node_Str\");\n pollState();\n break;\n case EVENT_OTA_PROVISION_STATUS_CHANGE:\n ar = (AsyncResult) msg.obj;\n if (ar.exception == null) {\n ints = (int[]) ar.result;\n int otaStatus = ints[0];\n if (otaStatus == phone.CDMA_OTA_PROVISION_STATUS_COMMITTED || otaStatus == phone.CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED) {\n Log.d(LOG_TAG, \"String_Node_Str\");\n cm.getCDMASubscription(obtainMessage(EVENT_POLL_STATE_CDMA_SUBSCRIPTION));\n }\n }\n break;\n default:\n Log.e(LOG_TAG, \"String_Node_Str\" + msg.what);\n break;\n }\n}\n"
"public void buildTableStyle(ITableContent table, StringBuffer styleBuffer) {\n addDefaultTableStyles(styleBuffer);\n IStyle style = table.getStyle();\n CSSValue display = style.getProperty(IStyle.STYLE_DISPLAY);\n if (IStyle.NONE_VALUE == display) {\n styleBuffer.append(\"String_Node_Str\");\n } else if (IStyle.INLINE_VALUE == display || IStyle.INLINE_BLOCK_VALUE == display) {\n if (!reportEmitter.browserSupportsInlineBlock) {\n styleBuffer.append(\"String_Node_Str\");\n } else {\n styleBuffer.append(\"String_Node_Str\");\n }\n }\n DimensionType height = table.getHeight();\n if (null != height) {\n buildSize(styleBuffer, HTMLTags.ATTR_HEIGHT, height);\n }\n boolean widthOutputFlag = false;\n DimensionType width = table.getWidth();\n if (null != width) {\n buildSize(styleBuffer, HTMLTags.ATTR_WIDTH, width);\n widthOutputFlag = true;\n } else {\n if (!\"String_Node_Str\".equalsIgnoreCase(style.getCanShrink())) {\n boolean absoluteWidth = true;\n for (int i = 0; i < table.getColumnCount(); i++) {\n IColumn column = table.getColumn(i);\n DimensionType columnWidth = column.getWidth();\n if (columnWidth == null) {\n absoluteWidth = false;\n break;\n } else {\n if (\"String_Node_Str\".endsWith(columnWidth.getUnits())) {\n absoluteWidth = false;\n break;\n }\n }\n }\n if (!absoluteWidth) {\n styleBuffer.append(\"String_Node_Str\");\n widthOutputFlag = true;\n }\n }\n }\n if (fixedReport) {\n if (!\"String_Node_Str\".equalsIgnoreCase(style.getCanShrink())) {\n if (!widthOutputFlag) {\n styleBuffer.append(\"String_Node_Str\");\n }\n styleBuffer.append(\"String_Node_Str\");\n }\n }\n style = getElementStyle(table);\n if (style == null) {\n return;\n }\n AttributeBuilder.buildFont(styleBuffer, style);\n AttributeBuilder.buildBox(styleBuffer, style);\n AttributeBuilder.buildBackground(styleBuffer, style, reportEmitter);\n AttributeBuilder.buildText(styleBuffer, style);\n AttributeBuilder.buildVisual(styleBuffer, style);\n}\n"
"public void afterRun() {\n mapService.interceptAfterPut(name, dataValue);\n if (eventType == null)\n eventType = dataOldValue == null ? EntryEventType.ADDED : EntryEventType.UPDATED;\n mapService.publishEvent(getCallerAddress(), name, eventType, dataKey, dataOldValue, dataValue);\n invalidateNearCaches();\n if (mapContainer.getWanReplicationPublisher() != null && mapContainer.getWanMergePolicy() != null) {\n Record record = recordStore.getRecord(dataKey);\n SimpleEntryView entryView = new SimpleEntryView(dataKey, mapService.toData(dataValue), record.getStatistics(), record.getCost(), record.getVersion());\n mapService.publishWanReplicationUpdate(name, entryView);\n }\n}\n"
"public static int adminChatToggle(Player player, String[] args) {\n if (!player.canUseCommand(\"String_Node_Str\"))\n return EXIT_FAIL;\n if (!vMinecraftSettings.getInstance().adminChatToggle())\n return EXIT_FAIL;\n if (vMinecraftSettings.getInstance().isAdminToggled(player.getName())) {\n player.sendMessage(Colors.Red + \"String_Node_Str\");\n vMinecraftSettings.getInstance().removeAdminToggled(player.getName());\n } else {\n player.sendMessage(Colors.Blue + \"String_Node_Str\");\n vMinecraftSettings.getInstance().addAdminToggled(player.getName());\n }\n return EXIT_SUCCESS;\n}\n"
"public static void updateMileageBuffer(FloatBuffer xyBuffer, ByteBuffer flagsBuffer, FloatBuffer mileageBuffer, boolean useInitialMileages, double ppvAspectRatio) {\n int firstVertex = mileageBuffer.position();\n xyBuffer.position(2 * firstVertex);\n flagsBuffer.position(1 * firstVertex);\n float x;\n float y;\n float mileage;\n if (firstVertex > 0) {\n int i = firstVertex - 1;\n x = xyBuffer.get(2 * i + 0);\n y = xyBuffer.get(2 * i + 1);\n mileage = mileageBuffer.get(1 * i);\n } else {\n x = 0;\n y = 0;\n mileage = 0;\n }\n while (flagsBuffer.hasRemaining()) {\n float xNew = xyBuffer.get();\n float yNew = xyBuffer.get();\n byte flagsNew = flagsBuffer.get();\n boolean connect = ((flagsNew & FLAGS_CONNECT) != 0);\n if (connect) {\n mileage += distance(x, y, xNew, yNew, ppvAspectRatio);\n mileageBuffer.put(mileage);\n }\n x = xNew;\n y = yNew;\n }\n}\n"
"public String getValidPrintable(String context, String input, int maxLength, boolean allowNull) throws ValidationException, IntrusionException {\n String canonical = \"String_Node_Str\";\n try {\n canonical = ESAPI.encoder().canonicalize(input);\n return new String(getValidPrintable(context, canonical.getBytes(), maxLength, allowNull));\n } catch (EncodingException e) {\n logger.logError(Logger.SECURITY, \"String_Node_Str\", e);\n }\n return canonical;\n}\n"
"private void executeTask(Runnable task) {\n NonBlockingIOThread target = getTargetIoThread(task);\n if (target == this) {\n task.run();\n } else {\n target.addTaskAndWakeup(task);\n }\n}\n"
"public void init() throws ComponentInitException {\n Set<NamedClass> usedConcepts;\n Set<NamedClass> allowedConcepts = configurator.getAllowedConcepts() == null ? null : CommonConfigMappings.getAtomicConceptSet(configurator.getAllowedConcepts());\n Set<NamedClass> ignoredConcepts = configurator.getIgnoredConcepts() == null ? null : CommonConfigMappings.getAtomicConceptSet(configurator.getIgnoredConcepts());\n if (allowedConcepts != null) {\n Helper.checkConcepts(reasoner, allowedConcepts);\n usedConcepts = allowedConcepts;\n } else if (ignoredConcepts != null) {\n usedConcepts = Helper.computeConceptsUsingIgnoreList(reasoner, ignoredConcepts);\n } else {\n usedConcepts = Helper.computeConcepts(reasoner);\n }\n ClassHierarchy classHierarchy = reasoner.getClassHierarchy().cloneAndRestrict(usedConcepts);\n classHierarchy.thinOutSubsumptionHierarchy();\n heuristic = new OEHeuristicRuntime(configurator);\n minimizer = new DescriptionMinimizer(reasoner);\n startClass = Thing.instance;\n singleSuggestionMode = configurator.getSingleSuggestionMode();\n operator = new RhoDRDown(reasoner, classHierarchy, startClass, configurator);\n baseURI = reasoner.getBaseURI();\n prefixes = reasoner.getPrefixes();\n if (configurator.getWriteSearchTree()) {\n Files.clearFile(new File(configurator.getSearchTreeFile()));\n }\n bestEvaluatedDescriptions = new EvaluatedDescriptionSet(configurator.getMaxNrOfResults());\n isClassLearningProblem = (learningProblem instanceof ClassLearningProblem);\n noise = configurator.getNoisePercentage() / 100d;\n maxDepth = configurator.getMaxDepth();\n filterFollowsFromKB = configurator.getFilterDescriptionsFollowingFromKB() && isClassLearningProblem;\n if (isClassLearningProblem) {\n ClassLearningProblem problem = (ClassLearningProblem) learningProblem;\n classToDescribe = problem.getClassToDescribe();\n isEquivalenceProblem = problem.isEquivalenceProblem();\n examples = reasoner.getIndividuals(classToDescribe);\n if (isEquivalenceProblem) {\n Set<Description> existingDefinitions = reasoner.getAssertedDefinitions(classToDescribe);\n if (configurator.getReuseExistingDescription() && (existingDefinitions.size() > 0)) {\n Description existingDefinition = null;\n int highestLength = 0;\n for (Description exDef : existingDefinitions) {\n if (exDef.getLength() > highestLength) {\n existingDefinition = exDef;\n highestLength = exDef.getLength();\n }\n }\n LinkedList<Description> startClassCandidates = new LinkedList<Description>();\n startClassCandidates.add(existingDefinition);\n ((RhoDRDown) operator).setDropDisjuncts(true);\n RefinementOperator upwardOperator = new OperatorInverter(operator);\n boolean startClassFound = false;\n Description candidate;\n do {\n candidate = startClassCandidates.pollFirst();\n if (((ClassLearningProblem) learningProblem).getRecall(candidate) < 1.0) {\n Set<Description> refinements = upwardOperator.refine(candidate, candidate.getLength());\n LinkedList<Description> refinementList = new LinkedList<Description>(refinements);\n startClassCandidates.addAll(refinementList);\n } else {\n startClassFound = true;\n }\n } while (!startClassFound);\n startClass = candidate;\n if (startClass.equals(existingDefinition)) {\n logger.info(\"String_Node_Str\" + startClass.toManchesterSyntaxString(baseURI, prefixes) + \"String_Node_Str\");\n } else {\n logger.info(\"String_Node_Str\" + existingDefinition.toManchesterSyntaxString(baseURI, prefixes) + \"String_Node_Str\" + startClass.toManchesterSyntaxString(baseURI, prefixes) + \"String_Node_Str\");\n }\n ((RhoDRDown) operator).setDropDisjuncts(false);\n } else {\n Set<Description> superClasses = reasoner.getClassHierarchy().getSuperClasses(classToDescribe);\n if (superClasses.size() > 1) {\n startClass = new Intersection(new LinkedList<Description>(superClasses));\n } else if (superClasses.size() == 1) {\n startClass = (Description) superClasses.toArray()[0];\n } else {\n startClass = Thing.instance;\n logger.warn(classToDescribe + \"String_Node_Str\" + \"String_Node_Str\");\n }\n }\n }\n } else if (learningProblem instanceof PosOnlyLP) {\n examples = ((PosOnlyLP) learningProblem).getPositiveExamples();\n } else if (learningProblem instanceof PosNegLP) {\n examples = Helper.union(((PosNegLP) learningProblem).getPositiveExamples(), ((PosNegLP) learningProblem).getNegativeExamples());\n }\n}\n"