content
stringlengths
40
137k
"protected void readLine(String line, DeckCardLists deckList) {\n if (line.length() == 0 || line.startsWith(\"String_Node_Str\")) {\n return;\n }\n boolean sideboard = false;\n if (line.startsWith(\"String_Node_Str\")) {\n line = line.substring(3).trim();\n sideboard = true;\n }\n int delim = line.indexOf(' ');\n String lineNum = line.substring(0, delim).trim();\n String setCode = \"String_Node_Str\";\n if (line.indexOf('[') != -1) {\n int setStart = line.indexOf('[') + 1;\n int setEnd = line.indexOf(']');\n setCode = line.substring(setStart, setEnd).trim();\n delim = setEnd;\n }\n String lineName = line.substring(delim + 1).trim();\n try {\n int num = Integer.parseInt(lineNum);\n CardInfo cardInfo = null;\n if (!setCode.isEmpty()) {\n CardCriteria criteria = new CardCriteria();\n criteria.name(lineName);\n criteria.setCodes(setCode);\n List<CardInfo> cards = null;\n cards = CardRepository.instance.findCards(criteria);\n if (!cards.isEmpty()) {\n cardInfo = cards.get(new Random().nextInt(cards.size()));\n }\n } else {\n cardInfo = CardRepository.instance.findPreferedCoreExpansionCard(lineName, true);\n }\n if (cardInfo == null) {\n sbMessage.append(\"String_Node_Str\").append(lineName).append(\"String_Node_Str\").append(lineCount).append(\"String_Node_Str\");\n } else {\n for (int i = 0; i < num; i++) {\n if (!sideboard) {\n deckList.getCards().add(new DeckCardInfo(cardInfo.getName(), cardInfo.getCardNumber(), cardInfo.getSetCode()));\n } else {\n deckList.getSideboard().add(new DeckCardInfo(cardInfo.getName(), cardInfo.getCardNumber(), cardInfo.getSetCode()));\n }\n }\n }\n } catch (NumberFormatException nfe) {\n sbMessage.append(\"String_Node_Str\").append(lineNum).append(\"String_Node_Str\").append(lineCount).append(\"String_Node_Str\");\n }\n}\n"
"public void testValidateValidUrl() throws Exception {\n RestfulHudsonClient client = harness.connect(PrivilegeLevel.ANONYMOUS);\n HudsonServerInfo info = client.validate(null);\n assertEquals(harness.getFixture().getType(), info.getType());\n assertEquals(harness.getFixture().getVersion(), info.getVersion());\n}\n"
"public final synchronized Decompressor getDecompressor(final AbstractByteBufferedInputChannel<?> inputChannel) throws CompressionException {\n final InputGate<?> inputGate = inputChannel.getInputGate();\n DecompressorCacheEntry cacheEntry = this.decompressorCache.get(inputGate);\n if (cacheEntry == null) {\n Decompressor decompressor = initNewDecompressor(inputChannel);\n cacheEntry = new DecompressorCacheEntry(decompressor);\n this.decompressorCache.put(inputGate, cacheEntry);\n this.decompressorMap.put(decompressor, inputGate);\n }\n return cacheEntry.getDecompressor();\n}\n"
"private static void checkCompositeSkylarkObjectSafe(Object object) {\n if (object instanceof SkylarkApiProvider) {\n return;\n } else if (object instanceof SkylarkList) {\n SkylarkList list = (SkylarkList) object;\n if (list.isEmpty()) {\n return;\n }\n for (Object listItem : list) {\n checkSkylarkObjectSafe(listItem);\n }\n return;\n } else if (object instanceof SkylarkNestedSet) {\n Class<?> contentType = ((SkylarkNestedSet) object).getContentType().getType();\n if (!contentType.equals(Object.class) && !isSimpleSkylarkObjectSafe(contentType)) {\n throw new IllegalArgumentException(EvalUtils.getDataTypeNameFromClass(contentType));\n }\n return;\n } else if (object instanceof Map<?, ?>) {\n for (Map.Entry<?, ?> entry : ((Map<?, ?>) object).entrySet()) {\n checkSkylarkObjectSafe(entry.getKey());\n checkSkylarkObjectSafe(entry.getValue());\n }\n return;\n } else if (object instanceof ClassObject) {\n ClassObject struct = (ClassObject) object;\n for (String key : struct.getKeys()) {\n checkSkylarkObjectSafe(struct.getValue(key));\n }\n return;\n }\n throw new IllegalArgumentException(EvalUtils.getDataTypeName(object));\n}\n"
"private void commitTyped(InputConnection inputConnection) {\n if (mPredicting) {\n mPredicting = false;\n if (mWord.size() > 0) {\n if (inputConnection != null) {\n inputConnection.commitText(mWord.getTypedWord(), 1);\n }\n mCommittedLength = mWord.size();\n TextEntryState.acceptedTyped(mWord.getTypedWord());\n addToDictionaries(mWord.getTypedWord(), AutoDictionary.FREQUENCY_FOR_TYPED);\n }\n if (mHandler.hasMessages(MSG_UPDATE_SUGGESTIONS)) {\n performUpdateSuggestions();\n }\n }\n}\n"
"public void parseObjModel(URL fileURL) {\n BufferedReader reader = null;\n InputStream inputStream = null;\n parserFactory = new ObjLineParserFactory(this);\n try {\n inputStream = fileURL.openStream();\n reader = new BufferedReader(new InputStreamReader(inputStream));\n String currentLine = null;\n while ((currentLine = reader.readLine()) != null) {\n currentLine = currentLine.replaceAll(\"String_Node_Str\", \"String_Node_Str\").trim();\n if (currentLine.startsWith(\"String_Node_Str\") || currentLine.length() == 0) {\n continue;\n } else if (currentLine.startsWith(\"String_Node_Str\")) {\n Vertex vertex = parseVertex(currentLine);\n if (vertex != null) {\n vertices.add(vertex);\n }\n } else if (currentLine.startsWith(\"String_Node_Str\")) {\n LogHelper.log(Level.INFO, \"String_Node_Str\");\n } else if (currentLine.startsWith(\"String_Node_Str\")) {\n LogHelper.log(Level.INFO, \"String_Node_Str\");\n } else if (currentLine.startsWith(\"String_Node_Str\")) {\n LogHelper.log(Level.INFO, \"String_Node_Str\");\n } else if (currentLine.startsWith(\"String_Node_Str\")) {\n LogHelper.log(Level.INFO, \"String_Node_Str\");\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n reader.close();\n inputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n}\n"
"public ApplicationLoadBalancerResponse createLoadBalancerContainerReponse(ApplicationLoadBalancerRule lb, Map<Ip, UserVm> lbInstances) {\n ApplicationLoadBalancerResponse lbResponse = new ApplicationLoadBalancerResponse();\n lbResponse.setId(lb.getUuid());\n lbResponse.setName(lb.getName());\n lbResponse.setDescription(lb.getDescription());\n lbResponse.setAlgorithm(lb.getAlgorithm());\n lbResponse.setForDisplay(lb.isDisplay());\n Network nw = ApiDBUtils.findNetworkById(lb.getNetworkId());\n lbResponse.setNetworkId(nw.getUuid());\n populateOwner(lbResponse, lb);\n if (lb.getScheme() == Scheme.Internal) {\n lbResponse.setSourceIp(lb.getSourceIp().addr());\n Network network = ApiDBUtils.findNetworkById(lb.getNetworkId());\n lbResponse.setSourceIpNetworkId(network.getUuid());\n } else {\n IpAddress publicIp = ApiDBUtils.findIpAddressById(lb.getSourceIpAddressId());\n lbResponse.setSourceIp(publicIp.getAddress().addr());\n Network ntwk = ApiDBUtils.findNetworkById(publicIp.getNetworkId());\n lbResponse.setSourceIpNetworkId(ntwk.getUuid());\n }\n List<ApplicationLoadBalancerRuleResponse> ruleResponses = new ArrayList<ApplicationLoadBalancerRuleResponse>();\n ApplicationLoadBalancerRuleResponse ruleResponse = new ApplicationLoadBalancerRuleResponse();\n ruleResponse.setInstancePort(lb.getDefaultPortStart());\n ruleResponse.setSourcePort(lb.getSourcePortStart());\n FirewallRule.State stateToSet = lb.getState();\n if (stateToSet.equals(FirewallRule.State.Revoke)) {\n stateToSet = FirewallRule.State.Deleting;\n }\n ruleResponse.setState(stateToSet.toString());\n ruleResponse.setObjectName(\"String_Node_Str\");\n ruleResponses.add(ruleResponse);\n lbResponse.setLbRules(ruleResponses);\n List<ApplicationLoadBalancerInstanceResponse> instanceResponses = new ArrayList<ApplicationLoadBalancerInstanceResponse>();\n for (Map.Entry<Ip, UserVm> entry : lbInstances.entrySet()) {\n Ip ip = entry.getKey();\n UserVm vm = entry.getValue();\n ApplicationLoadBalancerInstanceResponse instanceResponse = new ApplicationLoadBalancerInstanceResponse();\n instanceResponse.setIpAddress(ip.addr());\n UserVm vm = lbInstances.get(ip);\n instanceResponse.setId(vm.getUuid());\n instanceResponse.setName(vm.getInstanceName());\n instanceResponse.setObjectName(\"String_Node_Str\");\n instanceResponses.add(instanceResponse);\n }\n lbResponse.setLbInstances(instanceResponses);\n List<? extends ResourceTag> tags = ApiDBUtils.listByResourceTypeAndId(ResourceObjectType.LoadBalancer, lb.getId());\n List<ResourceTagResponse> tagResponses = new ArrayList<ResourceTagResponse>();\n for (ResourceTag tag : tags) {\n ResourceTagResponse tagResponse = createResourceTagResponse(tag, true);\n tagResponses.add(tagResponse);\n }\n lbResponse.setTags(tagResponses);\n lbResponse.setObjectName(\"String_Node_Str\");\n return lbResponse;\n}\n"
"private Select createSelect() {\n ColumnName columnName = new ColumnName(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n ColumnSelector columnSelector = new ColumnSelector(columnName);\n columnSelector.setAlias(\"String_Node_Str\");\n Map<Selector, String> columnsAliases = new HashMap<>();\n columnsAliases.put(columnSelector, \"String_Node_Str\");\n Map<String, ColumnType> columnsTypes = new HashMap<>();\n columnsTypes.put(\"String_Node_Str\", new ColumnType(DataType.BIGINT));\n Map<Selector, ColumnType> typeMapFromColumnName = new LinkedHashMap<>();\n typeMapFromColumnName.put(columnSelector, new ColumnType(DataType.BIGINT));\n Set<Operations> operations = new HashSet<>();\n operations.add(Operations.PROJECT);\n return new Select(operations, columnsAliases, columnsTypes, typeMapFromColumnName);\n}\n"
"public void send() {\n wasExecuted = true;\n ResultSet rs;\n String service = sparqlEndpoint.getURL().toString();\n writeToSparqlLog(\"String_Node_Str\");\n SparqlQuery.writeToSparqlLog(\"String_Node_Str\" + sparqlEndpoint.getHTTPRequest());\n writeToSparqlLog(sparqlQueryString);\n logger.trace(\"String_Node_Str\");\n queryExecution = new QueryEngineHTTP(service, sparqlQueryString);\n for (String dgu : sparqlEndpoint.getDefaultGraphURIs()) {\n queryExecution.addDefaultGraph(dgu);\n }\n for (String ngu : sparqlEndpoint.getNamedGraphURIs()) {\n queryExecution.addNamedGraph(ngu);\n }\n HttpQuery.urlLimit = 3 * 1024;\n Monitor httpTime = JamonMonitorLogger.getTimeMonitor(SparqlQuery.class, \"String_Node_Str\").start();\n try {\n logger.debug(\"String_Node_Str\" + sparqlQueryString.length() + \"String_Node_Str\" + sparqlEndpoint.getURL().toString());\n rs = queryExecution.execSelect();\n logger.trace(\"String_Node_Str\");\n json = SparqlQuery.convertResultSetToJSON(ResultSetFactory.makeRewindable(rs));\n logger.trace(json);\n } catch (HTTPException e) {\n logger.debug(\"String_Node_Str\" + e.toString());\n logger.debug(\"String_Node_Str\" + sparqlQueryString);\n writeToSparqlLog(\"String_Node_Str\" + e.toString());\n isRunning = false;\n throw e;\n } catch (RuntimeException e) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\" + e.toString());\n int length = Math.min(sparqlQueryString.length(), 300);\n logger.debug(\"String_Node_Str\" + sparqlQueryString.substring(0, length - 1).replaceAll(\"String_Node_Str\", \"String_Node_Str\"));\n }\n writeToSparqlLog(\"String_Node_Str\" + e.toString());\n isRunning = false;\n throw e;\n }\n httpTime.stop();\n isRunning = false;\n}\n"
"public BytesInput getBytes() {\n int size = (packedCount + bytes.size() * packedArraySize) * 4;\n final ByteBuffer buffer = ByteBuffer.allocate(size);\n buffer.order(ByteOrder.BIG_ENDIAN);\n final IntBuffer intBuffer = buffer.asIntBuffer();\n for (int[] array : bytes) {\n intBuffer.put(array);\n }\n intBuffer.put(packed, 0, packedCount);\n packedCount = 0;\n return BytesInput.from(buffer.array(), 0, (totalValues * bitWidth + 7) / 8);\n}\n"
"public static void tearDown() {\n String ddlDrop = System.getProperty(DATABASE_DDL_DROP_KEY, DEFAULT_DATABASE_DDL_DROP);\n if (\"String_Node_Str\".equalsIgnoreCase(ddlDrop)) {\n runDdl(conn, DROP_BOOL_PROC, ddlDebug);\n runDdl(conn, DROP_BINARY_INT_PROC, ddlDebug);\n runDdl(conn, DROP_PLS_INT_PROC, ddlDebug);\n runDdl(conn, DROP_NATURAL_PROC, ddlDebug);\n runDdl(conn, DROP_POSITIVE_PROC, ddlDebug);\n runDdl(conn, DROP_SIGNTYPE_PROC, ddlDebug);\n }\n}\n"
"protected void calculateOffsets() {\n if (mLegend == null)\n return;\n if (mLegend.getPosition() == LegendPosition.RIGHT_OF_CHART) {\n mLegend.setOffsetRight(mLegend.getMaximumEntryLength(mLegendLabelPaint));\n mLegendLabelPaint.setTextAlign(Align.LEFT);\n } else if (mLegend.getPosition() == LegendPosition.BELOW_CHART_LEFT || mLegend.getPosition() == LegendPosition.BELOW_CHART_RIGHT || mLegend.getPosition() == LegendPosition.BELOW_CHART_CENTER) {\n if (this instanceof RadarChart)\n mLegend.setOffsetBottom(mLegendLabelPaint.getTextSize() * 5.5f);\n else\n mLegend.setOffsetBottom(mLegendLabelPaint.getTextSize() * 4f);\n }\n if (mDrawLegend) {\n mOffsetBottom = Math.max(mOffsetBottom, mLegend.getOffsetBottom());\n mOffsetRight = Math.max(mOffsetRight, mLegend.getOffsetRight() / 3 * 2);\n }\n mLegend.setOffsetTop(mOffsetTop);\n mLegend.setOffsetLeft(mOffsetLeft);\n prepareContentRect();\n float scaleX = (float) ((getWidth() - mOffsetLeft - mOffsetRight) / mDeltaX);\n float scaleY = (float) ((getHeight() - mOffsetBottom - mOffsetTop) / mDeltaY);\n Matrix val = new Matrix();\n val.postTranslate(0, -mYChartMin);\n val.postScale(scaleX, -scaleY);\n mMatrixValueToPx.set(val);\n Matrix offset = new Matrix();\n offset.postTranslate(mOffsetLeft, getHeight() - mOffsetBottom);\n mMatrixOffset.set(offset);\n}\n"
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n String userSafetylegalUrl = SystemProperties.get(PROPERTY_LSAFETYLEGAL_URL);\n final Configuration configuration = getResources().getConfiguration();\n final String language = configuration.locale.getLanguage();\n final String country = configuration.locale.getCountry();\n String loc = String.format(\"String_Node_Str\", language, country);\n userSafetylegalUrl = String.format(\"String_Node_Str\", userSafetylegalUrl, loc);\n mWebView = new WebView(this);\n mWebView.getSettings().setJavaScriptEnabled(true);\n mWebView.loadUrl(userSafetylegalUrl);\n mWebView.setWebViewClient(new WebViewClient() {\n\n public void onPageFinished(WebView view, String url) {\n mAlert.setTitle(getString(R.string.settings_safetylegal_activity_title));\n }\n });\n final AlertController.AlertParams p = mAlertParams;\n p.mTitle = getString(R.string.settings_safetylegal_activity_loading);\n p.mView = webView;\n p.mForceInverseBackground = true;\n setupAlert();\n}\n"
"protected void createLocationTree() {\n Label treeLabel = new Label(getWidgetContainer(), SWT.NORMAL);\n treeLabel.setText(translationService.translate(\"String_Node_Str\"));\n GridData gdLabel = new GridData();\n gdLabel.verticalAlignment = GridData.BEGINNING;\n treeLabel.setLayoutData(gdLabel);\n testStructureTree = ContextInjectionFactory.make(TestStructureTree.class, context);\n testStructureTree.createUI(getWidgetContainer(), testProjectService);\n GridData gdTree = new GridData(GridData.FILL_BOTH);\n testStructureTree.getTreeViewer().setData(CustomWidgetIdConstants.TEST_EDITOR_WIDGET_ID_SWT_BOT_KEY, CustomWidgetIdConstants.TEST_EXPLORER_TREE);\n testStructureTree.getTreeViewer().getTree().setLayoutData(gdTree);\n testStructureTree.selectTestStructure(selectedTS);\n testStructureTree.getTreeViewer().addSelectionChangedListener(new ISelectionChangedListener() {\n public void selectionChanged(SelectionChangedEvent event) {\n validatePageAndSetComplete();\n }\n });\n}\n"
"public int compare(SolrQueryResultItem item1, SolrQueryResultItem item2) {\n double sim1 = 0;\n if (cache.containsKey(item1.getLabel())) {\n sim1 = cache.get(item1.getLabel());\n } else {\n sim1 = Similarity.getSimilarity(s, item1.getLabel());\n cache.put(item1.getLabel(), sim1);\n }\n double sim2 = 0;\n if (cache.containsKey(item2.getLabel())) {\n sim2 = cache.get(item2.getLabel());\n } else {\n sim2 = Similarity.getSimilarity(s, item2.getLabel());\n cache.put(item2.getLabel(), sim2);\n }\n if (sim1 < sim2) {\n return 1;\n } else if (sim1 > sim2) {\n return -1;\n } else {\n return item1.getLabel().compareTo(item2.getLabel());\n }\n}\n"
"private void evalAllCounts(String catalog, String schema, NamedColumnSet t, SchemaIndicator schemaIndic, boolean isTable, ReturnCode ok) throws SQLException {\n String quCatalog = catalog == null ? null : dbms().quote(catalog);\n String quSchema = schema == null ? null : dbms().quote(schema);\n final String table = t.getName();\n String quTable = dbms().quote(table);\n if (isTable) {\n long rowCount = getRowCounts(quCatalog, quSchema, quTable);\n schemaIndic.setTableRowCount(schemaIndic.getTableRowCount() + rowCount);\n int pkCount = getPKCount(quCatalog, quSchema, quTable);\n schemaIndic.setKeyCount(schemaIndic.getKeyCount() + pkCount);\n int idxCount = getIndexCount(quCatalog, quSchema, quTable);\n schemaIndic.setIndexCount(schemaIndic.getIndexCount() + idxCount);\n createTableIndicator(t, schemaIndic, rowCount, pkCount, idxCount);\n } else {\n long rowCount = getRowCounts(quCatalog, quSchema, quTable);\n schemaIndic.setViewRowCount(schemaIndic.getViewRowCount() + rowCount);\n createViewIndicator(t, schemaIndic, rowCount);\n }\n}\n"
"public void unregister() {\n log.info(\"String_Node_Str\");\n configuration.setCsarAuthorizationFilter(null);\n}\n"
"public void setCompoundDrawablesRelative(Drawable start, Drawable top, Drawable end, Drawable bottom) {\n Drawables dr = mDrawables;\n final boolean drawables = start != null || top != null || end != null || bottom != null;\n if (!drawables) {\n if (dr != null) {\n if (dr.mDrawablePadding == 0) {\n mDrawables = null;\n } else {\n if (dr.mDrawableStart != null)\n dr.mDrawableStart.setCallback(null);\n dr.mDrawableStart = null;\n if (dr.mDrawableTop != null)\n dr.mDrawableTop.setCallback(null);\n dr.mDrawableTop = null;\n if (dr.mDrawableEnd != null)\n dr.mDrawableEnd.setCallback(null);\n dr.mDrawableEnd = null;\n if (dr.mDrawableBottom != null)\n dr.mDrawableBottom.setCallback(null);\n dr.mDrawableBottom = null;\n dr.mDrawableSizeStart = dr.mDrawableHeightStart = 0;\n dr.mDrawableSizeEnd = dr.mDrawableHeightEnd = 0;\n dr.mDrawableSizeTop = dr.mDrawableWidthTop = 0;\n dr.mDrawableSizeBottom = dr.mDrawableWidthBottom = 0;\n }\n }\n } else {\n if (dr == null) {\n mDrawables = dr = new Drawables(getContext());\n }\n if (dr.mDrawableStart != start && dr.mDrawableStart != null) {\n dr.mDrawableStart.setCallback(null);\n }\n dr.mDrawableStart = start;\n if (dr.mDrawableTop != top && dr.mDrawableTop != null) {\n dr.mDrawableTop.setCallback(null);\n }\n dr.mDrawableTop = top;\n if (dr.mDrawableEnd != end && dr.mDrawableEnd != null) {\n dr.mDrawableEnd.setCallback(null);\n }\n dr.mDrawableEnd = end;\n if (dr.mDrawableBottom != bottom && dr.mDrawableBottom != null) {\n dr.mDrawableBottom.setCallback(null);\n }\n dr.mDrawableBottom = bottom;\n final Rect compoundRect = dr.mCompoundRect;\n int[] state;\n state = getDrawableState();\n if (start != null) {\n start.setState(state);\n start.copyBounds(compoundRect);\n start.setCallback(this);\n dr.mDrawableSizeStart = compoundRect.width();\n dr.mDrawableHeightStart = compoundRect.height();\n } else {\n dr.mDrawableSizeStart = dr.mDrawableHeightStart = 0;\n }\n if (end != null) {\n end.setState(state);\n end.copyBounds(compoundRect);\n end.setCallback(this);\n dr.mDrawableSizeEnd = compoundRect.width();\n dr.mDrawableHeightEnd = compoundRect.height();\n } else {\n dr.mDrawableSizeEnd = dr.mDrawableHeightEnd = 0;\n }\n if (top != null) {\n top.setState(state);\n top.copyBounds(compoundRect);\n top.setCallback(this);\n dr.mDrawableSizeTop = compoundRect.height();\n dr.mDrawableWidthTop = compoundRect.width();\n } else {\n dr.mDrawableSizeTop = dr.mDrawableWidthTop = 0;\n }\n if (bottom != null) {\n bottom.setState(state);\n bottom.copyBounds(compoundRect);\n bottom.setCallback(this);\n dr.mDrawableSizeBottom = compoundRect.height();\n dr.mDrawableWidthBottom = compoundRect.width();\n } else {\n dr.mDrawableSizeBottom = dr.mDrawableWidthBottom = 0;\n }\n }\n resolveDrawables();\n invalidate();\n requestLayout();\n}\n"
"public void map(LongWritable lineNumber, Text userPrefEntry, OutputCollector<VIntWritable, VIntWritable> output, Reporter reporter) throws IOException {\n String userPrefLine = userPrefEntry.toString();\n String[] prefFields = userPrefLine.split(fieldSeparator);\n if (prefFields.length > 1) {\n try {\n int userId = Integer.parseInt(prefFields[0]);\n int itemId = Integer.parseInt(prefFields[1]);\n user.set(userId);\n item.set(itemId);\n output.collect(user, item);\n } catch (NumberFormatException nfe) {\n reporter.incrCounter(Records.INVALID_IDS, 1);\n log.warn(\"String_Node_Str\", userPrefLine);\n } catch (IllegalArgumentException iae) {\n reporter.incrCounter(Records.INVALID_IDS, 1);\n UserItemMapper.log.warn(\"String_Node_Str\", userPrefLine);\n }\n } else {\n reporter.incrCounter(Records.INVALID_SCHEMA, 1);\n UserItemMapper.log.warn(\"String_Node_Str\", userPrefLine);\n }\n}\n"
"public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {\n ItemStack stack = playerIn.getHeldItem(hand);\n if (!ItemStackUtil.isEmpty(stack) && !worldIn.isRemote) {\n if (FluidLib.hasFluidItemCap(stack)) {\n TileAltarInspiration tileEntity = (TileAltarInspiration) worldIn.getTileEntity(pos);\n if (!playerIn.isSneaking()) {\n FluidActionResult result = FluidUtil.tryEmptyContainer(stack, tileEntity.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, null), Integer.MAX_VALUE, playerIn, true);\n if (result.isSuccess()) {\n playerIn.setHeldItem(hand, result.getResult());\n }\n }\n worldIn.notifyBlockUpdate(pos, state, state, 3);\n tileEntity.markDirty();\n return true;\n }\n }\n if (ItemStackUtil.isEmpty(stack)) {\n TileAltarInspiration tileEntity = (TileAltarInspiration) worldIn.getTileEntity(pos);\n tileEntity.startRitual(playerIn);\n }\n return true;\n}\n"
"public ObjectMapper getObjectMapper(String keyspace) {\n ObjectMapper objectMapper = objectMappers.get(keyspace);\n if (objectMapper == null) {\n logger.debug(\"String_Node_Str\", defaultKeyspace.getName());\n Session session = cluster.connect(defaultKeyspace.getName());\n objectMapper = new ObjectMapper(session, defaultKeyspace, consistencyHorizon);\n objectMapper.setLogCql(logCql);\n objectMappers.put(keyspace, objectMapper);\n }\n return objectMapper;\n}\n"
"public boolean apply(Game game, Ability source) {\n LifeLossOtherFromCombatWatcher watcher = (LifeLossOtherFromCombatWatcher) game.getState().getWatchers().get(LifeLossOtherFromCombatWatcher.class.getName());\n return watcher != null && watcher.opponentLostLifeOtherFromCombat(source.getControllerId(), game);\n}\n"
"public void addChild(XPathFragment anXPathFragment, NodeValue aNodeValue, NamespaceResolver namespaceResolver) {\n if (anXPathFragment != null && namespaceResolver != null && anXPathFragment.getNamespaceURI() == null) {\n if (!anXPathFragment.isAttribute()) {\n anXPathFragment.setNamespaceURI(namespaceResolver.resolveNamespacePrefix(anXPathFragment.getPrefix()));\n } else if (anXPathFragment.hasNamespace()) {\n anXPathFragment.setNamespaceURI(namespaceResolver.resolveNamespacePrefix(anXPathFragment.getPrefix()));\n }\n }\n XPathNode xPathNode = new XPathNode();\n xPathNode.setXPathFragment(anXPathFragment);\n List children;\n Map childrenMap;\n if ((anXPathFragment != null) && anXPathFragment.isAttribute()) {\n if (null == attributeChildren) {\n attributeChildren = new ArrayList();\n attributeChildrenMap = new HashMap();\n }\n children = attributeChildren;\n childrenMap = attributeChildrenMap;\n } else {\n if (null == nonAttributeChildren) {\n nonAttributeChildren = new ArrayList();\n nonAttributeChildrenMap = new HashMap();\n }\n children = nonAttributeChildren;\n childrenMap = nonAttributeChildrenMap;\n }\n if (null == anXPathFragment) {\n if (aNodeValue.isMarshalNodeValue()) {\n xPathNode.setMarshalNodeValue(aNodeValue);\n }\n if (aNodeValue.isUnmarshalNodeValue()) {\n xPathNode.setUnmarshalNodeValue(aNodeValue);\n }\n xPathNode.setParent(this);\n if (aNodeValue instanceof XMLAnyAttributeMappingNodeValue) {\n setAnyAttributeNodeValue((XMLAnyAttributeMappingNodeValue) aNodeValue);\n anyAttributeNode = xPathNode;\n } else {\n if (!children.contains(xPathNode)) {\n children.add(xPathNode);\n }\n childrenMap.put(anXPathFragment, xPathNode);\n }\n return;\n }\n int index = children.indexOf(xPathNode);\n if (index >= 0) {\n xPathNode = (XPathNode) children.get(index);\n } else {\n xPathNode.setParent(this);\n if (!children.contains(xPathNode)) {\n children.add(xPathNode);\n }\n if (XPathFragment.SELF_FRAGMENT.equals(anXPathFragment)) {\n if (null == selfChildren) {\n selfChildren = new ArrayList();\n }\n if (!selfChildren.contains(xPathNode)) {\n selfChildren.add(xPathNode);\n }\n } else {\n childrenMap.put(anXPathFragment, xPathNode);\n }\n }\n if (aNodeValue.isOwningNode(anXPathFragment)) {\n if (aNodeValue.isMarshalNodeValue()) {\n xPathNode.setMarshalNodeValue(aNodeValue);\n }\n if (aNodeValue.isUnmarshalNodeValue()) {\n xPathNode.setUnmarshalNodeValue(aNodeValue);\n }\n } else {\n XPathFragment nextFragment = anXPathFragment.getNextFragment();\n xPathNode.addChild(nextFragment, aNodeValue, namespaceResolver);\n }\n}\n"
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n setContentView(R.layout.main);\n _openCvCameraView = (JavaCameraView) findViewById(R.id.aav_activity_surface_view);\n _openCvCameraView.setCvCameraViewListener(this);\n _openCvCameraView.setMaxFrameSize(176, 144);\n _mainController = new ActuatorController();\n _countOutOfFrame = 0;\n PreferenceManager.setDefaultValues(this, R.xml.settings, false);\n sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n trackingColor = Integer.parseInt(sharedPreferences.getString(getString(R.string.color_key), \"String_Node_Str\"));\n if (trackingColor == 0) {\n _lowerThreshold = new Scalar(60, 100, 30);\n _upperThreshold = new Scalar(130, 255, 255);\n } else if (trackingColor == 1) {\n _lowerThreshold = new Scalar(160, 90, 90);\n _upperThreshold = new Scalar(255, 255, 255);\n } else if (trackingColor == 2) {\n _lowerThreshold = new Scalar(0, 90, 90);\n _upperThreshold = new Scalar(100, 255, 255);\n }\n SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);\n _sensorFusion = new SensorFusion(sensorManager);\n gestureDetector = new GestureDetector(this, new GestureDetector.SimpleOnGestureListener() {\n public void onLongPress(MotionEvent e) {\n startActivityForResult(new Intent(getApplicationContext(), SettingsActivity.class), 0);\n }\n });\n}\n"
"private MappedByteBuffer getPage(int pageIndex) throws IOException {\n while (pageIndex >= pages.size()) {\n pages.add(null);\n }\n MappedByteBuffer page = pages.get(pageIndex);\n if (page == null) {\n long pagePosition = pageIndex << PAGE_SHIFT;\n boolean interrupted = false;\n boolean success = false;\n try {\n while (!success) {\n try {\n interrupted |= Thread.interrupted();\n page = file.getChannel().map(FileChannel.MapMode.READ_WRITE, pagePosition, PAGE_SIZE);\n success = true;\n } catch (ClosedByInterruptException e) {\n file = new RandomAccessFile(filePath, permissions);\n } catch (IOException e) {\n throw new IOException(\"String_Node_Str\" + filePath, e);\n }\n }\n } finally {\n if (interrupted) {\n Thread.currentThread().interrupt();\n }\n }\n pages.set(pageIndex, page);\n }\n return page;\n}\n"
"public void testQuery6() throws InterruptedException {\n log.info(\"String_Node_Str\");\n SiddhiManager siddhiManager = new SiddhiManager();\n String tables = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(tables);\n try {\n List<String> hciNames = new ArrayList<String>();\n for (HazelcastInstance hci : Hazelcast.getAllHazelcastInstances()) {\n hciNames.add(hci.getName());\n }\n Assert.assertTrue(hciNames.contains(HazelcastEventTableConstants.HAZELCAST_INSTANCE_PREFIX + executionPlanRuntime.getName()));\n } finally {\n executionPlanRuntime.shutdown();\n }\n Assert.assertTrue(hciNames.contains(HazelcastEventTableConstants.HAZELCAST_INSTANCE_PREFIX + executionPlanRuntime.getName()));\n executionPlanRuntime.shutdown();\n}\n"
"public void testRunWindupSourceMode() throws Exception {\n Path userPath = FileUtils.getTempDirectory().toPath().resolve(\"String_Node_Str\").resolve(\"String_Node_Str\" + RandomStringUtils.randomAlphanumeric(6));\n try {\n Files.createDirectories(userPath);\n try (InputStream is = getClass().getResourceAsStream(EXAMPLE_USERSCRIPT_INPUT);\n OutputStream os = new FileOutputStream(userPath.resolve(EXAMPLE_USERSCRIPT_OUTPUT).toFile())) {\n IOUtils.copy(is, os);\n }\n try (InputStream is = getClass().getResourceAsStream(\"String_Node_Str\");\n OutputStream os = new FileOutputStream(userPath.resolve(XSLT_OUTPUT_NAME).toFile())) {\n IOUtils.copy(is, os);\n }\n try (GraphContext context = createGraphContext()) {\n List<String> includeList = Collections.emptyList();\n List<String> excludeList = Collections.emptyList();\n super.runTest(context, \"String_Node_Str\", userPath.toFile(), true, includeList, excludeList);\n validateWebXmlReferences(context);\n validatePropertiesModels(context);\n validateReports(context);\n }\n } finally {\n FileUtils.deleteDirectory(userPath.toFile());\n }\n}\n"
"public void reset(String key) throws ReadOnlyException {\n if (isReadOnly(key)) {\n throw new ReadOnlyException(EXCEPTIONS.getString(\"String_Node_Str\", \"String_Node_Str\"));\n }\n boolean resetDone = false;\n for (int i = 0; !resetDone && i < defaultPreferences.length; i++) {\n if (key.equals(defaultPreferences[i].getName())) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\" + key);\n }\n preferences.put(key, defaultPreferences[i]);\n return;\n }\n }\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\" + key);\n }\n}\n"
"public synchronized InetAddress getInetAddress() {\n if (serverSocket != null) {\n try {\n return getServerInetAddress();\n } catch (SocketException e) {\n return serverSocket.getInetAddress();\n } catch (UnknownHostException e) {\n return serverSocket.getInetAddress();\n }\n } else {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n}\n"
"public void onBackPressed() {\n hangup(false);\n}\n"
"public SqlSource createSqlSource(Configuration configuration, String script, Class<?> parameterType) {\n if (script.startsWith(\"String_Node_Str\")) {\n XMLScriptBuilder builder = new XMLScriptBuilder(configuration, script);\n return builder.parseScriptNode();\n } else {\n List<SqlNode> contents = new ArrayList<SqlNode>();\n contents.add(new TextSqlNode(script.toString()));\n MixedSqlNode rootSqlNode = new MixedSqlNode(contents);\n return new DynamicSqlSource(configuration, rootSqlNode);\n }\n}\n"
"public void requestAccessToken(OnRequestAccessTokenCompleteListener onRequestAccessTokenCompleteListener) {\n super.requestAccessToken(onRequestAccessTokenCompleteListener);\n AsyncTask<Void, Void, String> task = new AsyncTask<Void, Void, String>() {\n protected String doInBackground(Void... params) {\n String scope = \"String_Node_Str\" + Scopes.PLUS_LOGIN;\n String token;\n try {\n token = GoogleAuthUtil.getToken(mSocialNetworkManager.getActivity(), Plus.AccountApi.getAccountName(googleApiClient), scope);\n } catch (Exception e) {\n e.printStackTrace();\n return e.getMessage();\n }\n return token;\n }\n protected void onPostExecute(String token) {\n if (token != null) {\n ((OnRequestAccessTokenCompleteListener) mLocalListeners.get(REQUEST_ACCESS_TOKEN)).onRequestAccessTokenComplete(getID(), new AccessToken(token, null));\n } else {\n mLocalListeners.get(REQUEST_LOGIN).onError(getID(), REQUEST_ACCESS_TOKEN, token, null);\n }\n }\n };\n task.execute(mActivity);\n}\n"
"public void pullEdge(AbstractEdge edge, AbstractNode source, AbstractNode target, MetaEdgeImpl metaEdge) {\n float edgeWeight = edge.getWeight();\n float metaWeight = metaEdge.getWeight();\n float edgeCount = metaEdge.getCount();\n float div = 1f;\n if (source == metaEdge.getSource() || source == metaEdge.getTarget() || target == metaEdge.getTarget() || target == metaEdge.getSource()) {\n div = nonDeepDivisor;\n }\n edgeWeight /= div;\n metaWeight = (metaWeight * edgeCount - edgeWeight) / (edgeCount - 1);\n if (metaWeight < weightMinimum) {\n metaWeight = weightMinimum;\n }\n metaEdge.setWeight(metaWeight);\n}\n"
"public void setWorkerInstances(HttpRequest request, HttpResponder responder, String namespaceId, String appId, String workerId) throws ExecutionException, InterruptedException {\n int instances;\n try {\n try {\n instances = getInstances(request);\n } catch (IllegalArgumentException e) {\n responder.sendString(HttpResponseStatus.BAD_REQUEST, \"String_Node_Str\");\n return;\n } catch (JsonSyntaxException e) {\n responder.sendString(HttpResponseStatus.BAD_REQUEST, \"String_Node_Str\");\n return;\n }\n if (instances < 1) {\n responder.sendString(HttpResponseStatus.BAD_REQUEST, \"String_Node_Str\");\n return;\n }\n } catch (Throwable th) {\n responder.sendString(HttpResponseStatus.BAD_REQUEST, \"String_Node_Str\");\n return;\n }\n try {\n Id.Program programId = Id.Program.from(namespaceId, appId, ProgramType.WORKER, workerId);\n int oldInstances = store.getWorkerInstances(programId);\n if (oldInstances != instances) {\n store.setWorkerInstances(programId, instances);\n ProgramRuntimeService.RuntimeInfo runtimeInfo = findRuntimeInfo(programId, runtimeService);\n if (runtimeInfo != null) {\n runtimeInfo.getController().command(ProgramOptionConstants.INSTANCES, ImmutableMap.of(programId.getId(), String.valueOf(instances))).get();\n }\n }\n responder.sendStatus(HttpResponseStatus.OK);\n } catch (SecurityException e) {\n responder.sendStatus(HttpResponseStatus.UNAUTHORIZED);\n } catch (Throwable e) {\n if (respondIfElementNotFound(e, responder)) {\n return;\n }\n throw e;\n }\n}\n"
"public final GeneratedChartState build(IDisplayServer ids, Chart cmDesignTime, Bounds bo, IExternalContext externalContext, RunTimeContext rtc, IStyleProcessor externalProcessor) throws ChartException {\n if (ids == null || cmDesignTime == null || bo == null) {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.GENERATION, \"String_Node_Str\", Messages.getResourceBundle());\n }\n if (rtc == null) {\n rtc = new RunTimeContext();\n }\n if (rtc.getULocale() == null) {\n rtc.setULocale(ULocale.getDefault());\n }\n IChartScriptContext icsc = rtc.getScriptContext();\n if (icsc == null) {\n ChartScriptContext csc = new ChartScriptContext();\n csc.setChartInstance((Chart) EcoreUtil.copy(cmDesignTime));\n csc.setExternalContext(externalContext);\n csc.setULocale(rtc.getULocale());\n csc.setLogger(logger);\n rtc.setScriptContext(csc);\n icsc = csc;\n } else if (icsc instanceof ChartScriptContext) {\n ((ChartScriptContext) icsc).setLogger(logger);\n }\n if (externalContext != null && icsc instanceof ChartScriptContext) {\n ((ChartScriptContext) icsc).setExternalContext(externalContext);\n }\n final Chart cmRunTime = icsc.getChartInstance();\n ScriptHandler sh = rtc.getScriptHandler();\n if (sh == null) {\n sh = new ScriptHandler();\n rtc.setScriptHandler(sh);\n sh.setScriptClassLoader(rtc.getScriptClassLoader());\n sh.setScriptContext(icsc);\n final String sScriptContent = cmRunTime.getScript();\n if (externalContext != null && externalContext.getScriptable() != null) {\n sh.init(externalContext.getScriptable());\n } else {\n sh.init(null);\n }\n sh.setRunTimeModel(cmRunTime);\n if (sScriptContent != null && sScriptContent.length() > 0 && rtc.isScriptingEnabled()) {\n sh.register(null, sScriptContent);\n }\n }\n ScriptHandler.callFunction(sh, ScriptHandler.START_GENERATION, cmRunTime);\n ScriptHandler.callFunction(sh, ScriptHandler.BEFORE_GENERATION, cmRunTime, rtc.getScriptContext());\n prepareStyles(cmRunTime, externalProcessor);\n int iChartType = UNDEFINED;\n Object oComputations = null;\n if (cmRunTime instanceof ChartWithAxes) {\n iChartType = WITH_AXES;\n try {\n if (cmRunTime.getDimension() == ChartDimension.THREE_DIMENSIONAL_LITERAL) {\n oComputations = new PlotWith3DAxes(ids, (ChartWithAxes) cmRunTime, rtc);\n } else {\n oComputations = new PlotWith2DAxes(ids, (ChartWithAxes) cmRunTime, rtc);\n }\n } catch (Exception e) {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.GENERATION, e);\n }\n } else if (cmRunTime instanceof ChartWithoutAxes) {\n iChartType = WITHOUT_AXES;\n oComputations = new PlotWithoutAxes(ids, (ChartWithoutAxes) cmRunTime, rtc);\n }\n if (oComputations == null) {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.GENERATION, \"String_Node_Str\", new Object[] { cmRunTime }, Messages.getResourceBundle(rtc.getULocale()));\n }\n final LinkedHashMap lhmRenderers = new LinkedHashMap();\n BaseRenderer[] brna = null;\n try {\n brna = BaseRenderer.instances(cmRunTime, rtc, oComputations);\n for (int i = 0; i < brna.length; i++) {\n lhmRenderers.put(brna[i].getSeries(), new LegendItemRenderingHints(brna[i], BoundsImpl.create(0, 0, 0, 0)));\n }\n rtc.setSeriesRenderers(lhmRenderers);\n rtc.setLegendLayoutHints(null);\n } catch (Exception ex) {\n ex.printStackTrace();\n throw new ChartException(ChartEnginePlugin.ID, ChartException.GENERATION, ex);\n }\n if (oComputations instanceof PlotWith2DAxes) {\n PlotWith2DAxes pwa = (PlotWith2DAxes) oComputations;\n pwa.initDynamicPlotBounds(bo);\n }\n Block bl = cmRunTime.getBlock();\n final LayoutManager lm = new LayoutManager(bl);\n ScriptHandler.callFunction(sh, ScriptHandler.BEFORE_LAYOUT, cmRunTime);\n lm.doLayout(ids, cmRunTime, bo, rtc);\n ScriptHandler.callFunction(sh, ScriptHandler.AFTER_LAYOUT, cmRunTime);\n Bounds boPlot = cmRunTime.getPlot().getBounds();\n Insets insPlot = cmRunTime.getPlot().getInsets();\n boPlot = boPlot.adjustedInstance(insPlot);\n ScriptHandler.callFunction(sh, ScriptHandler.BEFORE_COMPUTATIONS, cmRunTime, oComputations);\n long lTimer = System.currentTimeMillis();\n if (iChartType == WITH_AXES) {\n PlotWithAxes pwa = (PlotWithAxes) oComputations;\n try {\n pwa.compute(boPlot);\n } catch (Exception ex) {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.GENERATION, ex);\n }\n } else if (iChartType == WITHOUT_AXES) {\n PlotWithoutAxes pwoa = (PlotWithoutAxes) oComputations;\n try {\n pwoa.compute(boPlot);\n } catch (Exception ex) {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.GENERATION, ex);\n }\n }\n ScriptHandler.callFunction(sh, ScriptHandler.AFTER_COMPUTATIONS, cmRunTime, oComputations);\n final Collection co = lhmRenderers.values();\n final LegendItemRenderingHints[] lirha = (LegendItemRenderingHints[]) co.toArray(new LegendItemRenderingHints[co.size()]);\n final int iSize = lhmRenderers.size();\n BaseRenderer br;\n for (int i = 0; i < iSize; i++) {\n br = lirha[i].getRenderer();\n br.set(brna);\n br.set(ids);\n br.set(rtc);\n try {\n if (br.getComputations() instanceof PlotWithoutAxes) {\n br.set(((PlotWithoutAxes) br.getComputations()).getSeriesRenderingHints(br.getSeries()));\n } else {\n br.set(((PlotWithAxes) br.getComputations()).getSeriesRenderingHints(br.getSeriesDefinition(), br.getSeries()));\n }\n ScriptHandler.callFunction(sh, ScriptHandler.START_COMPUTE_SERIES, br.getSeries());\n br.compute(bo, cmRunTime.getPlot(), br.getSeriesRenderingHints());\n ScriptHandler.callFunction(sh, ScriptHandler.FINISH_COMPUTE_SERIES, br.getSeries());\n } catch (Exception ex) {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.GENERATION, ex);\n }\n }\n logger.log(ILogger.INFORMATION, Messages.getString(\"String_Node_Str\", new Object[] { new Long(System.currentTimeMillis() - lTimer) }, rtc.getULocale()));\n final GeneratedChartState gcs = new GeneratedChartState(ids, cmRunTime, lhmRenderers, rtc, oComputations);\n if (sh != null) {\n sh.setGeneratedChartState(gcs);\n ScriptHandler.callFunction(sh, ScriptHandler.FINISH_GENERATION, gcs);\n ScriptHandler.callFunction(sh, ScriptHandler.AFTER_GENERATION, gcs, rtc.getScriptContext());\n }\n return gcs;\n}\n"
"boolean computeIntroduceMethod(TreePathHandle h, CompilationInfo info, TreePath treePath, Tree tree) {\n TreePath block = treePath;\n TreePath method = findMethod(block);\n if (method == null) {\n TreePath parentPath = treePath.getParentPath();\n if (parentPath == null) {\n return false;\n }\n method = parentPath;\n }\n CompilationUnitTree compilationUnit = info.getCompilationUnit();\n SourcePositions sourcePositions = info.getTrees().getSourcePositions();\n long endPosition = sourcePositions.getEndPosition(compilationUnit, method.getLeaf());\n if (TreeUtilities.CLASS_TREE_KINDS.contains(method.getLeaf().getKind())) {\n this.classGeneratePosition = endPosition - 1;\n } else {\n this.classGeneratePosition = endPosition + 1;\n }\n List<? extends StatementTree> blockStatements = getStatements(block);\n StatementTree lastStatement = blockStatements.isEmpty() ? null : blockStatements.get(blockStatements.size() - 1);\n ScanLocalVars scanner = new ScanLocalVars(info, lastStatement);\n scanner.scan(block, null);\n Set<TypeMirror> exceptions = new HashSet<>();\n String returnType = scanner.getReturnType();\n if (returnType == null || !scanner.hasReturns()) {\n TypeMirror type = scanner.getReturnTypeMirror();\n if (type == null) {\n Element lastStatementElement;\n if (lastStatement != null && (lastStatementElement = getElement(info, new TreePath(treePath, lastStatement))) != null) {\n type = lastStatementElement.asType();\n if (TypeKind.EXECUTABLE.equals(type.getKind())) {\n ExecutableType eType = (ExecutableType) type;\n type = eType.getReturnType();\n long lsEnd = sourcePositions.getEndPosition(compilationUnit, lastStatement);\n if (lsEnd < 0) {\n lsEnd = this.snippetCode.length() - 1;\n } else {\n lsEnd -= codeOffset;\n }\n if (';' != this.snippetCode.charAt((int) lsEnd)) {\n this.snippetCode = new StringBuilder(this.snippetCode).insert((int) lsEnd + 1, \"String_Node_Str\").toString();\n }\n }\n }\n }\n if (type != null && !TypeKind.VOID.equals(type.getKind())) {\n returnType = type.toString();\n long lsBegin = sourcePositions.getStartPosition(compilationUnit, lastStatement);\n lsBegin -= codeOffset;\n this.snippetCode = new StringBuilder(this.snippetCode).insert((int) lsBegin, \"String_Node_Str\").append(';').toString();\n }\n if (returnType == null) {\n returnType = info.getTypes().getNoType(TypeKind.VOID).toString();\n }\n }\n for (StatementTree s : blockStatements) {\n TreePath path = new TreePath(treePath, s);\n exceptions.addAll(info.getTreeUtilities().getUncaughtExceptions(path));\n }\n Set<VariableElement> referencedVariables = scanner.getReferencedVariables();\n StringBuilder declaration = new StringBuilder(returnType);\n declaration.append(\"String_Node_Str\");\n boolean isFirst = true;\n for (VariableElement var : referencedVariables) {\n if (!isFirst) {\n declaration.append(\"String_Node_Str\");\n }\n declaration.append(var.asType().toString());\n declaration.append(\"String_Node_Str\");\n declaration.append(var.getSimpleName().toString());\n isFirst = false;\n }\n declaration.append(\"String_Node_Str\");\n if (!exceptions.isEmpty()) {\n declaration.append(\"String_Node_Str\");\n isFirst = true;\n for (TypeMirror exc : exceptions) {\n if (!isFirst) {\n declaration.append(\"String_Node_Str\");\n }\n declaration.append(exc.toString());\n isFirst = false;\n }\n }\n declaration.append(\"String_Node_Str\");\n declaration.append(snippetCode);\n declaration.append(\"String_Node_Str\");\n this.methodBodyCode = declaration.toString();\n StringBuilder methodInvode = new StringBuilder(\"String_Node_Str\");\n isFirst = true;\n for (VariableElement var : referencedVariables) {\n if (!isFirst) {\n methodInvode.append(\"String_Node_Str\");\n }\n methodInvode.append(var.getSimpleName().toString());\n isFirst = false;\n }\n methodInvode.append(\"String_Node_Str\");\n this.methodInvokeCode = methodInvode.toString();\n return true;\n}\n"
"public void pluginComponentAdded(PluginComponentEvent event) {\n PluginComponentFactory factory = event.getPluginComponentFactory();\n if (!factory.getContainer().equals(net.java.sip.communicator.service.gui.Container.CONTAINER_CHAT_WRITE_PANEL))\n return;\n PluginComponent component = factory.getPluginComponentInstance(this);\n ChatSession chatSession = chatPanel.getChatSession();\n if (chatSession != null) {\n ChatTransport currentTransport = chatSession.getCurrentChatTransport();\n Object currentDescriptor = currentTransport.getDescriptor();\n if (currentDescriptor instanceof Contact) {\n Contact contact = (Contact) currentDescriptor;\n component.setCurrentContact(contact, currentTransport.getResourceName());\n }\n }\n GridBagConstraints constraints = new GridBagConstraints();\n constraints.anchor = GridBagConstraints.NORTHEAST;\n constraints.fill = GridBagConstraints.NONE;\n constraints.gridy = 0;\n constraints.gridheight = 1;\n constraints.weightx = 0f;\n constraints.weighty = 0f;\n constraints.insets = new Insets(0, 3, 0, 0);\n centerPanel.add((Component) component.getComponent(), constraints);\n this.centerPanel.repaint();\n}\n"
"static String appendRequiredImportListToSourceCode(String sourceCode, ClassMeta targetClassMeta, Configuration config) {\n Assertion.on(\"String_Node_Str\").mustNotBeNull(targetClassMeta);\n String dest = sourceCode;\n String oneline = TrimFilterUtil.doAllFilters(sourceCode);\n StringBuilder importedListBuf = new StringBuilder();\n List<String> uniqImportedList = new ArrayList<String>();\n for (String imported : targetClassMeta.importedList) {\n if (!uniqImportedList.contains(imported.trim())) {\n uniqImportedList.add(imported.trim());\n }\n }\n for (String imported : uniqImportedList) {\n String newOne = \"String_Node_Str\" + imported + \"String_Node_Str\";\n if (!oneline.matches(RegExp.Anything_ZeroOrMore_Min + newOne + RegExp.Anything_ZeroOrMore_Min)) {\n importedListBuf.append(newOne);\n importedListBuf.append(StringValue.CarriageReturn);\n importedListBuf.append(StringValue.LineFeed);\n }\n }\n String prefix = targetClassMeta.packageName == null ? \"String_Node_Str\" : targetClassMeta.packageName + \"String_Node_Str\";\n appendIfNotExists(importedListBuf, oneline, \"String_Node_Str\" + prefix + targetClassMeta.name + \"String_Node_Str\");\n if (config.junitVersion == JUnitVersion.version3) {\n appendIfNotExists(importedListBuf, oneline, \"String_Node_Str\" + config.testCaseClassNameToExtend + \"String_Node_Str\");\n } else if (config.junitVersion == JUnitVersion.version4) {\n if (!sourceCode.contains(\"String_Node_Str\") && !uniqImportedList.contains(\"String_Node_Str\")) {\n appendIfNotExists(importedListBuf, oneline, \"String_Node_Str\");\n }\n appendIfNotExists(importedListBuf, oneline, \"String_Node_Str\");\n appendIfNotExists(importedListBuf, oneline, \"String_Node_Str\");\n }\n if (config.mockObjectFramework == MockObjectFramework.EasyMock) {\n appendIfNotExists(importedListBuf, oneline, \"String_Node_Str\");\n appendIfNotExists(importedListBuf, oneline, \"String_Node_Str\");\n } else if (config.mockObjectFramework == MockObjectFramework.JMock2) {\n appendIfNotExists(importedListBuf, oneline, \"String_Node_Str\");\n appendIfNotExists(importedListBuf, oneline, \"String_Node_Str\");\n appendIfNotExists(importedListBuf, oneline, \"String_Node_Str\");\n } else if (config.mockObjectFramework == MockObjectFramework.JMockit) {\n appendIfNotExists(importedListBuf, oneline, \"String_Node_Str\");\n appendIfNotExists(importedListBuf, oneline, \"String_Node_Str\");\n } else if (config.mockObjectFramework == MockObjectFramework.Mockito) {\n appendIfNotExists(importedListBuf, oneline, \"String_Node_Str\");\n }\n if (importedListBuf.length() > 0) {\n Matcher matcher = RegExp.PatternObject.PackageDefArea_Group.matcher(sourceCode.replaceAll(RegExp.CRLF, StringValue.Space));\n if (matcher.find()) {\n String packageDef = matcher.group(1);\n String CRLF = StringValue.CarriageReturn + StringValue.LineFeed;\n String replacement = packageDef + CRLF + CRLF + importedListBuf.toString().replaceAll(\"String_Node_Str\", StringValue.Empty);\n dest = dest.replaceFirst(packageDef, replacement);\n } else {\n dest = importedListBuf.toString() + dest;\n }\n }\n return dest;\n}\n"
"private void processAIPPermissions(IndexService index, ModelService model, Job currentJob, AIP aip, Report reportItem) {\n try {\n AIP parentAIP = null;\n String jobCreatorUsername = currentJob.getUsername();\n if (aip.getParentId() != null) {\n try {\n parentAIP = model.retrieveAIP(aip.getParentId());\n Set<PermissionType> userPermissions = parentAIP.getPermissions().getUserPermissions(jobCreatorUsername);\n LOGGER.trace(\"String_Node_Str\", jobCreatorUsername, parentAIP.getId(), userPermissions);\n if (userPermissions.contains(PermissionType.CREATE)) {\n LOGGER.debug(\"String_Node_Str\", jobCreatorUsername);\n } else {\n LOGGER.debug(\"String_Node_Str\", jobCreatorUsername);\n reportItem.setPluginState(PluginState.FAILURE).setPluginDetails(NO_PERMISSION_TO_CREATE_UNDER_AIP);\n }\n } catch (NotFoundException nfe) {\n reportItem.setPluginState(PluginState.FAILURE).setPluginDetails(PARENT_AIP_NOT_FOUND);\n } catch (AuthorizationDeniedException e) {\n LOGGER.debug(\"String_Node_Str\");\n reportItem.setPluginState(PluginState.FAILURE).setPluginDetails(NO_AIP_PERMISSION);\n }\n } else {\n RODAMember member = index.retrieve(RODAMember.class, jobCreatorUsername);\n if (member.getAllRoles().contains(CREATE_TOP_LEVEL_AIP_PERMISSION) || member.getName().equals(\"String_Node_Str\")) {\n LOGGER.debug(\"String_Node_Str\");\n } else {\n reportItem.setPluginState(PluginState.FAILURE).setPluginDetails(NO_CREATE_TOP_LEVEL_AIP_PERMISSION);\n LOGGER.debug(\"String_Node_Str\");\n }\n }\n } catch (GenericException | RequestNotValidException | NotFoundException e) {\n reportItem.setPluginState(PluginState.FAILURE).setPluginDetails(e.getMessage());\n }\n}\n"
"private void processAttribute(List<Element> classes, List<ElementDefinition> diff, List<ElementDefinition> snapshot, Element cclss, String path, Element attr) throws FHIRFormatError {\n String n = attr.getAttribute(\"String_Node_Str\");\n ElementDefinition ed = new ElementDefinition();\n ed.setPath(path + \"String_Node_Str\" + n);\n seePath(ed);\n ed.setMin(Integer.parseInt(attr.getAttribute(\"String_Node_Str\")));\n ed.setMax(attr.getAttribute(\"String_Node_Str\"));\n if (!Utilities.noString(attr.getAttribute(\"String_Node_Str\")))\n ed.addExtension().setUrl(\"String_Node_Str\").setValue(new UriType(attr.getAttribute(\"String_Node_Str\")));\n String type = getType(attr);\n if (\"String_Node_Str\".equals(attr.getAttribute(\"String_Node_Str\"))) {\n if (primitiveTypes.containsKey(type))\n type = primitiveTypes.get(type);\n else\n throw new Error(\"String_Node_Str\");\n ed.addRepresentation(PropertyRepresentation.XMLATTR);\n }\n if (\"String_Node_Str\".equals(type)) {\n ed.setMax(\"String_Node_Str\");\n ed.addRepresentation(PropertyRepresentation.TYPEATTR);\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addExtension().setUrl(\"String_Node_Str\").setValue(new StringType(\"String_Node_Str\"));\n } else if (\"String_Node_Str\".equals(type)) {\n ed.addRepresentation(PropertyRepresentation.TYPEATTR);\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n ed.addType().setCode(\"String_Node_Str\");\n } else\n ed.addType().setCode(type);\n if (\"String_Node_Str\".equals(attr.getAttribute(\"String_Node_Str\")))\n ed.setMustSupport(true);\n if (attr.hasAttribute(\"String_Node_Str\"))\n ed.setDefaultValue(buildValue(attr.getAttribute(\"String_Node_Str\"), type, ed.getPath()));\n List<Element> enums = new ArrayList<Element>();\n XMLUtil.getNamedChildren(attr, \"String_Node_Str\", enums);\n if (enums.size() == 1)\n ed.setFixed(buildValue(enums.get(0).getTextContent(), type, ed.getPath()));\n if (enums.size() > 1) {\n } else if (XMLUtil.getNamedChild(attr, \"String_Node_Str\") != null) {\n Element vocab = XMLUtil.getNamedChild(attr, \"String_Node_Str\");\n String cs = vocab.getAttribute(\"String_Node_Str\");\n String cd = XMLUtil.getNamedChildAttribute(vocab, \"String_Node_Str\", \"String_Node_Str\");\n ElementDefinitionBindingComponent bd = ed.getBinding();\n bd.setStrength(cs.equals(\"String_Node_Str\") ? BindingStrength.REQUIRED : BindingStrength.EXTENSIBLE);\n bd.setValueSet(new CanonicalType(\"String_Node_Str\" + cd));\n v3vs.add(cd);\n }\n diff.add(ed);\n snapshot.add(ed);\n}\n"
"public void debugContextChanged(DebugContextEvent event) {\n ISelection selection = event.getContext();\n if (selection instanceof IStructuredSelection) {\n IStructuredSelection ss = (IStructuredSelection) selection;\n if (ss.size() == 1) {\n Object element = ss.getFirstElement();\n if (element instanceof IAdaptable) {\n ScriptDebugElement frame = (ScriptDebugElement) ((IAdaptable) element).getAdapter(ScriptDebugElement.class);\n if (frame != null) {\n System.setProperty(KEY, \"String_Node_Str\");\n return;\n }\n }\n }\n }\n System.setProperty(KEY, \"String_Node_Str\");\n}\n"
"public Object deserialize(Writable writable) throws SerDeException {\n try {\n return deserializer.deserialize(obj);\n } catch (Throwable t) {\n LOG.info(\"String_Node_Str\", t);\n throw new SerDeException(\"String_Node_Str\", t);\n }\n}\n"
"public void error(String message) {\n error(message, 1);\n}\n"
"protected void onPreExecute() {\n popPostDetail();\n showDialog(ID_DIALOG_DELETING);\n}\n"
"public void onClick(View view) {\n if (!rowItem.getSize().equals(\"String_Node_Str\"))\n toggleChecked(p);\n else\n main.goBack();\n}\n"
"protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {\n String sentence = (String) msg;\n Parser parser = new Parser(PATTERN, sentence);\n if (!parser.matches()) {\n return null;\n }\n Position position = new Position();\n position.setProtocol(getProtocolName());\n String type = parser.next();\n if (type.startsWith(\"String_Node_Str\") && channel != null) {\n channel.write(\"String_Node_Str\" + type.substring(3) + \"String_Node_Str\");\n }\n position.set(Position.KEY_ALARM, decodeAlarm(type));\n DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());\n if (deviceSession == null) {\n return null;\n }\n position.setDeviceId(deviceSession.getDeviceId());\n DateBuilder dateBuilder = new DateBuilder().setTime(parser.nextInt(), parser.nextInt(), parser.nextInt(), parser.nextInt());\n position.setValid(parser.next().equals(\"String_Node_Str\"));\n position.setLatitude(parser.nextCoordinate());\n position.setLongitude(parser.nextCoordinate());\n position.setSpeed(parser.nextDouble());\n position.setCourse(parser.nextDouble());\n dateBuilder.setDateReverse(parser.nextInt(), parser.nextInt(), parser.nextInt());\n position.setTime(dateBuilder.getDate());\n position.set(Position.KEY_INPUT, parser.next());\n position.set(Position.KEY_OUTPUT, parser.next());\n if (parser.hasNext()) {\n String[] values = parser.next().split(\"String_Node_Str\");\n for (int i = 0; i < values.length; i++) {\n position.set(Position.PREFIX_ADC + (i + 1), Integer.parseInt(values[i], 16));\n }\n }\n position.set(Position.KEY_ODOMETER, parser.nextInt());\n position.set(Position.KEY_RFID, parser.next());\n if (parser.hasNext()) {\n int value = parser.nextInt(16);\n position.set(Position.KEY_BATTERY, value >> 8);\n position.set(Position.KEY_GSM, (value >> 4) & 0xf);\n position.set(Position.KEY_SATELLITES, value & 0xf);\n }\n return position;\n}\n"
"public void handleSuccess() {\n updateTrace();\n}\n"
"public static RhsValue copy_rhs_value_and_substitute_varnames(Rete rete, RhsValue rv, Condition cond, char first_letter) {\n final ReteLocation rl = rv.asReteLocation();\n if (rl != null) {\n SymbolImpl sym = Rete.var_bound_in_reconstructed_conds(cond, rl.getFieldNum(), rl.getLevelsUp());\n return sym.toRhsValue();\n }\n final UnboundVariable uv = rv.asUnboundVariable();\n if (uv != null) {\n final int index = uv.getIndex();\n SymbolImpl sym = rete.getRhsVariableBinding(index);\n if (sym == null) {\n sym = rete.variableGenerator.generate_new_variable(Character.toString(uv.getFirstLetter()));\n rete.setRhsVariableBinding(index, sym);\n }\n return new RhsSymbolValue(sym);\n }\n final RhsFunctionCall fc = rv.asFunctionCall();\n if (fc != null) {\n final RhsFunctionCall newFc = new RhsFunctionCall(fc.getName(), fc.isStandalone());\n for (RhsValue c : fc.getArguments()) {\n newFc.addArgument(copy_rhs_value_and_substitute_varnames(rete, c, cond, first_letter));\n }\n return newFc;\n }\n return new RhsSymbolValue(rv.asSymbolValue().getSym());\n}\n"
"public INDArray get(INDArrayIndex... indexes) {\n if (indexes.length == 1 && indexes[0] instanceof NDArrayIndexAll || (indexes.length == 2 && (isRowVector() && indexes[0] instanceof PointIndex && indexes[0].offset() == 0 && indexes[1] instanceof NDArrayIndexAll || isColumnVector() && indexes[1] instanceof PointIndex && indexes[0].offset() == 0 && indexes[0] instanceof NDArrayIndexAll)))\n return this;\n indexes = NDArrayIndex.resolve(shapeInfoDataBuffer(), indexes);\n ShapeOffsetResolution resolution = new ShapeOffsetResolution(this);\n resolution.exec(indexes);\n if (indexes.length < 1)\n throw new IllegalStateException(\"String_Node_Str\");\n int[] shape = resolution.getShapes();\n int numSpecifiedIndex = 0;\n for (int i = 0; i < indexes.length; i++) if (indexes[i] instanceof SpecifiedIndex)\n numSpecifiedIndex++;\n if (shape != null && numSpecifiedIndex > 0) {\n Generator<List<List<Integer>>> gen = SpecifiedIndex.iterate(indexes);\n INDArray ret = Nd4j.create(shape, 'c');\n int count = 0;\n while (true) {\n try {\n List<List<Integer>> next = gen.next();\n List<Integer> coordsCombo = new ArrayList<>();\n for (int i = 0; i < next.size(); i++) {\n if (next.get(i).size() > 1)\n throw new IllegalStateException(\"String_Node_Str\");\n coordsCombo.add(next.get(i).get(0));\n }\n ret.putScalar(count++, getDouble(Ints.toArray(coordsCombo)));\n } catch (NoSuchElementException e) {\n break;\n }\n if (count >= ret.length())\n break;\n }\n return ret;\n }\n INDArray ret = subArray(resolution);\n return ret;\n}\n"
"public List<IAction> getCaldecottActions(IStructuredSelection selection, final CloudFoundryApplicationsEditorPage editorPage) {\n Collection<String> selectedServices = ModifyServicesForApplicationAction.getServiceNames(selection);\n List<IAction> actions = new ArrayList<IAction>();\n final CaldecottTunnelHandler handler = new CaldecottTunnelHandler(cloudServer);\n if (selectedServices != null && !selectedServices.isEmpty()) {\n final List<String> servicesWithTunnels = new ArrayList<String>();\n final List<String> servicesToAdd = getServicesWithNoTunnel(selectedServices, handler, servicesWithTunnels);\n if (!servicesToAdd.isEmpty()) {\n actions.add(new AddServiceStartCaldecottAction(servicesToAdd, cloudServer.getBehaviour(), editorPage, \"String_Node_Str\"));\n } else if (!servicesWithTunnels.isEmpty()) {\n actions.add(new DisconnectCaldecottTunnelAction(editorPage, handler, servicesWithTunnels));\n IAction showCaldecottTunnelInfo = new Action(\"String_Node_Str\", CloudFoundryImages.CONNECT) {\n public void run() {\n displayCaldecottTunnels(servicesWithTunnels);\n }\n };\n actions.add(showCaldecottTunnelInfo);\n }\n }\n return actions;\n}\n"
"public void onBlockPlacedBy(World world, int x, int y, int z, EntityLiving player, ItemStack itemStack) {\n replaceGround(world, x, y - 1, z);\n int direction = MathHelper.floor_float(player.rotationYaw);\n if (direction < 0) {\n direction = 360 + direction;\n }\n int metadata = getMetadataBasedOnRotation(direction);\n world.setBlockMetadataWithNotify(x, y, z, metadata, 2);\n TileEntityGSGraveStone tileEntity = (TileEntityGSGraveStone) world.getBlockTileEntity(x, y, z);\n if (tileEntity != null) {\n if (itemStack.stackTagCompound != null) {\n if (itemStack.stackTagCompound.hasKey(\"String_Node_Str\")) {\n tileEntity.setGraveType(itemStack.stackTagCompound.getByte(\"String_Node_Str\"));\n } else {\n tileEntity.setGraveType((byte) 0);\n }\n if (itemStack.stackTagCompound.hasKey(\"String_Node_Str\")) {\n tileEntity.setDeathText(itemStack.stackTagCompound.getString(\"String_Node_Str\"));\n }\n if (itemStack.stackTagCompound.hasKey(\"String_Node_Str\")) {\n tileEntity.setAge(itemStack.stackTagCompound.getInteger(\"String_Node_Str\"));\n }\n }\n }\n}\n"
"final InstanceFactory redefineType() {\n Class<?> classToMock = typeMetadata.getClassType();\n if (MockingFilters.isSubclassOfUnmockable(classToMock)) {\n String mockSource = typeMetadata.field == null ? \"String_Node_Str\" : \"String_Node_Str\";\n throw new IllegalArgumentException(classToMock + \"String_Node_Str\" + mockSource + \"String_Node_Str\" + typeMetadata.getName() + \"String_Node_Str\");\n }\n Type declaredType = typeMetadata.getDeclaredType();\n return redefineType(declaredType);\n}\n"
"public void update() {\n super.update();\n if (itemInInventory != null) {\n LiquidStack liquid;\n if (Block.ice.blockID == itemInInventory.itemID && heat > COOLANT_THRESHOLD) {\n liquid = LiquidContainerRegistry.getLiquidForFilledItem(new ItemStack(Item.bucketWater));\n } else {\n liquid = LiquidContainerRegistry.getLiquidForFilledItem(itemInInventory);\n }\n if (liquid != null) {\n if (fill(ForgeDirection.UNKNOWN, liquid, false) == liquid.amount) {\n fill(ForgeDirection.UNKNOWN, liquid, true);\n tile.setInventorySlotContents(0, Utils.consumeItem(itemInInventory));\n }\n }\n }\n if (heat > COOLANT_THRESHOLD) {\n int extraHeat = heat - COOLANT_THRESHOLD;\n LiquidStack coolant = this.coolantTank.getLiquid();\n IronEngineCoolant currentCoolant = IronEngineCoolant.getCoolantForLiquid(coolant);\n if (currentCoolant != null) {\n if (coolant.amount * currentCoolant.coolingPerUnit > extraHeat) {\n coolant.amount -= Math.round(extraHeat / currentCoolant.coolingPerUnit);\n heat = COOLANT_THRESHOLD;\n } else {\n heat -= coolant.amount * currentCoolant.coolingPerUnit;\n coolant.amount = 0;\n }\n }\n }\n if (heat > 0 && (penaltyCooling > 0 || !tile.isRedstonePowered)) {\n heat -= 10;\n }\n if (heat <= 0)\n heat = 0;\n if (heat == 0 && penaltyCooling > 0) {\n penaltyCooling--;\n }\n}\n"
"public List<Catalog> fillCatalogs(Connection dbConn, DatabaseMetaData dbJDBCMetadata, IMetadataConnection metaConnection, List<String> catalogFilter) {\n List<Catalog> catalogList = new ArrayList<Catalog>();\n if (dbJDBCMetadata == null) {\n return null;\n }\n if (ConnectionUtils.isPostgresql(dbJDBCMetadata)) {\n return fillPostgresqlCatalogs(metaConnection, dbConn, dbJDBCMetadata, catalogList);\n }\n if (dbConn != null && dbConn.isContextMode()) {\n if (EDatabaseTypeName.MYSQL.getProduct().equals(((DatabaseConnection) dbConn).getProductId()) || EDatabaseTypeName.MSSQL.getProduct().equals(((DatabaseConnection) dbConn).getProductId()) || EDatabaseTypeName.MSSQL05_08.getProduct().equals(((DatabaseConnection) dbConn).getProductId())) {\n IMetadataConnection iMetadataCon = metaConnection;\n if (iMetadataCon == null) {\n iMetadataCon = ConvertionHelper.convert(dbConn);\n }\n if (iMetadataCon != null) {\n String catalogTemp = iMetadataCon.getDatabase();\n if (\"String_Node_Str\".equals(catalogTemp)) {\n catalogFilter.clear();\n }\n }\n }\n }\n try {\n if (dbJDBCMetadata.getDatabaseProductName() != null && dbJDBCMetadata.getDatabaseProductName().indexOf(EDatabaseTypeName.ORACLEFORSID.getProduct()) > -1) {\n return catalogList;\n }\n if (ConnectionUtils.isOdbcTeradata(dbJDBCMetadata)) {\n return catalogList;\n }\n ResultSet catalogNames = null;\n if (dbJDBCMetadata instanceof SybaseDatabaseMetaData) {\n catalogNames = ((SybaseDatabaseMetaData) dbJDBCMetadata).getCatalogs(((DatabaseConnection) dbConn).getUsername());\n } else {\n catalogNames = dbJDBCMetadata.getCatalogs();\n }\n List<String> schemaFilterList = new ArrayList<String>();\n if (catalogNames != null) {\n boolean isHive = MetadataConnectionUtils.isHive(dbJDBCMetadata);\n boolean isSybase = MetadataConnectionUtils.isSybase(dbJDBCMetadata);\n while (catalogNames.next()) {\n String catalogName = null;\n try {\n String temp = null;\n if (isHive) {\n temp = MetaDataConstants.TABLE_CAT.name();\n } else {\n temp = MetadataConnectionUtils.isOdbcPostgresql(dbJDBCMetadata) ? DatabaseConstant.ODBC_POSTGRESQL_CATALOG_NAME : MetaDataConstants.TABLE_CAT.name();\n }\n catalogName = catalogNames.getString(temp);\n if (!isHive && !MetadataConnectionUtils.isODBCCatalog(catalogName, dbJDBCMetadata)) {\n continue;\n }\n } catch (Exception e) {\n log.warn(e, e);\n if (dbJDBCMetadata.getDatabaseProductName() != null && dbJDBCMetadata.getDatabaseProductName().toLowerCase().indexOf(DatabaseConstant.POSTGRESQL_PRODUCT_NAME) > -1) {\n catalogName = \"String_Node_Str\";\n }\n }\n if (catalogName != null) {\n if (!isNullSID(dbConn) && dbConn != null && !((DatabaseConnection) dbConn).getDatabaseType().equals(EDatabaseTypeName.AS400.getDisplayName()) && !((DatabaseConnection) dbConn).getDatabaseType().equals(EDatabaseTypeName.HSQLDB_IN_PROGRESS.getDisplayName()) && !((DatabaseConnection) dbConn).getDatabaseType().equals(EDatabaseTypeName.HSQLDB_SERVER.getDisplayName()) && !((DatabaseConnection) dbConn).getDatabaseType().equals(EDatabaseTypeName.HSQLDB_WEBSERVER.getDisplayName())) {\n String databaseOnConnWizard = ((DatabaseConnection) dbConn).getSID();\n postFillCatalog(catalogList, catalogFilter, schemaFilterList, TalendCWMService.getReadableName(dbConn, databaseOnConnWizard), dbConn);\n break;\n } else if (isCreateElement(catalogFilter, catalogName)) {\n postFillCatalog(catalogList, catalogFilter, schemaFilterList, catalogName, dbConn);\n }\n }\n }\n catalogNames.close();\n if (!isHive) {\n List<Catalog> removeCatalogList = new ArrayList<Catalog>();\n for (Catalog catalog : catalogList) {\n List<Schema> schemaList = new ArrayList<Schema>();\n try {\n schemaList = fillSchemaToCatalog(dbConn, dbJDBCMetadata, catalog, schemaFilterList);\n if (!schemaList.isEmpty() && schemaList.size() > 0) {\n CatalogHelper.addSchemas(schemaList, catalog);\n }\n } catch (Throwable e) {\n removeCatalogList.add(catalog);\n }\n }\n if (isSybase && catalogFilter != null && !catalogFilter.isEmpty() && catalogFilter.size() > 0 && catalogList.isEmpty() && catalogList.size() == 0) {\n catalogFilter.clear();\n return fillCatalogs(dbConn, dbJDBCMetadata, catalogFilter);\n }\n catalogList.removeAll(removeCatalogList);\n }\n Set<MetadataTable> tableSet = ConnectionHelper.getTables(dbConn);\n List<Catalog> replaceCatalogs = new ArrayList<Catalog>();\n List<String> catalogName = new ArrayList<String>();\n for (MetadataTable table : tableSet) {\n EObject eContainer = table.eContainer();\n if (eContainer != null) {\n if (eContainer instanceof Catalog) {\n Catalog c = (Catalog) eContainer;\n String name = c.getName();\n if (!catalogName.contains(name)) {\n replaceCatalogs.add(c);\n catalogName.add(name);\n }\n } else if (eContainer instanceof Schema) {\n EObject parent = eContainer.eContainer();\n if (parent != null && parent instanceof Catalog) {\n Catalog c = (Catalog) parent;\n String name = c.getName();\n if (!catalogName.contains(name)) {\n List<Schema> filterSchemas = new ArrayList<Schema>();\n List<String> schemaName = new ArrayList<String>();\n List<Schema> schemas = CatalogHelper.getSchemas(c);\n for (Schema schema : schemas) {\n if (schemaFilterList != null) {\n if (schemaFilterList.contains(schema.getName())) {\n filterSchemas.add(schema);\n schemaName.add(schema.getName());\n } else if (schema.getOwnedElement() != null && !schema.getOwnedElement().isEmpty()) {\n filterSchemas.add(schema);\n schemaName.add(schema.getName());\n }\n }\n }\n for (Catalog catalog : catalogList) {\n if (catalog.getName().equals(name)) {\n boolean added = false;\n for (Schema schema : CatalogHelper.getSchemas(catalog)) {\n if (!schemaName.contains(schema.getName())) {\n filterSchemas.add(schema);\n added = true;\n }\n }\n if (added) {\n break;\n }\n }\n }\n c.getOwnedElement().clear();\n CatalogHelper.addSchemas(filterSchemas, c);\n replaceCatalogs.add(c);\n catalogName.add(name);\n }\n }\n }\n }\n }\n if (this.isLinked() && !catalogList.isEmpty()) {\n ConnectionHelper.addCatalogs(catalogList, dbConn);\n }\n for (Catalog catalog : replaceCatalogs) {\n List<Catalog> list = new ArrayList<Catalog>();\n String name = catalog.getName();\n Catalog c = (Catalog) ConnectionHelper.getPackage(name, dbConn, Catalog.class);\n if (c != null) {\n list.add(c);\n ConnectionHelper.removeCatalogs(list, dbConn);\n ConnectionHelper.addCatalog(catalog, dbConn);\n } else {\n ConnectionHelper.addCatalog(catalog, dbConn);\n }\n }\n }\n } catch (SQLException e) {\n log.warn(\"String_Node_Str\", e);\n }\n return catalogList;\n}\n"
"public Structure getStructure(String name) throws IOException, StructureException {\n if (name.length() < 4)\n throw new IllegalArgumentException(\"String_Node_Str\");\n Structure n = null;\n boolean useChainNr = false;\n boolean useDomainInfo = false;\n String range = null;\n int chainNr = -1;\n try {\n String pdbId = null;\n String chainId = null;\n if (name.length() == 4) {\n pdbId = name;\n } else if (name.startsWith(\"String_Node_Str\")) {\n return getStructureFromSCOPDomain(name);\n } else if (name.length() == 6) {\n pdbId = name.substring(0, 4);\n if (name.substring(4, 5).equals(CHAIN_SPLIT_SYMBOL)) {\n chainId = name.substring(5, 6);\n } else if (name.substring(4, 5).equals(CHAIN_NR_SYMBOL)) {\n useChainNr = true;\n chainNr = Integer.parseInt(name.substring(5, 6));\n }\n } else if ((name.length() > 6) && (!name.startsWith(PDP_DOMAIN_IDENTIFIER)) && (name.contains(CHAIN_NR_SYMBOL) || name.contains(UNDERSCORE)) && (!(name.startsWith(\"String_Node_Str\") || name.startsWith(\"String_Node_Str\")))) {\n pdbId = name.substring(0, 4);\n useDomainInfo = true;\n range = name.substring(5);\n } else if (name.startsWith(\"String_Node_Str\") || name.startsWith(\"String_Node_Str\")) {\n try {\n URL url = new URL(name);\n return getStructureFromURL(url);\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n } else if (name.startsWith(PDP_DOMAIN_IDENTIFIER)) {\n try {\n return getPDPStructure(name);\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }\n if (pdbId == null) {\n return null;\n }\n while (checkLoading(pdbId)) {\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n System.err.println(e.getMessage());\n }\n }\n Structure s;\n flagLoading(pdbId);\n try {\n PDBFileReader reader = new PDBFileReader();\n reader.setPath(path);\n reader.setPdbDirectorySplit(isSplit);\n reader.setAutoFetch(autoFetch);\n reader.setFetchFileEvenIfObsolete(fetchFileEvenIfObsolete);\n reader.setFetchCurrent(fetchCurrent);\n reader.setFileParsingParameters(params);\n s = reader.getStructureById(pdbId.toLowerCase());\n } catch (Exception e) {\n flagLoadingFinished(pdbId);\n throw new StructureException(e.getMessage() + \"String_Node_Str\" + pdbId, e);\n }\n flagLoadingFinished(pdbId);\n if (chainId == null && chainNr < 0 && range == null) {\n n = StructureTools.getReducedStructure(s, -1);\n } else {\n if (useChainNr) {\n n = StructureTools.getReducedStructure(s, chainNr);\n } else if (useDomainInfo) {\n n = StructureTools.getSubRanges(s, range);\n } else {\n n = StructureTools.getReducedStructure(s, chainId);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n throw new StructureException(e.getMessage() + \"String_Node_Str\" + name, e);\n }\n n.setName(name);\n return n;\n}\n"
"public Map<Capability, String> getNetworkOfferingServiceCapabilities(NetworkOffering offering, Service service) {\n if (!areServicesSupportedByNetworkOffering(offering.getId(), service)) {\n throw new UnsupportedServiceException(\"String_Node_Str\" + service.getName() + \"String_Node_Str\" + offering);\n }\n Map<Capability, String> serviceCapabilities = new HashMap<Capability, String>();\n List<String> providers = _ntwkOfferingSrvcDao.listProvidersForServiceForNetworkOffering(offering.getId(), service);\n if (providers.isEmpty()) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + service.getName() + \"String_Node_Str\" + offering);\n }\n String provider = providers.get(0);\n NetworkElement element = getElementImplementingProvider(provider);\n if (element != null) {\n Map<Service, Map<Capability, String>> elementCapabilities = element.getCapabilities();\n ;\n if (elementCapabilities == null || !elementCapabilities.containsKey(service)) {\n throw new UnsupportedServiceException(\"String_Node_Str\" + service.getName() + \"String_Node_Str\" + element.getName() + \"String_Node_Str\" + provider);\n }\n serviceCapabilities = elementCapabilities.get(service);\n }\n return serviceCapabilities;\n}\n"
"public void initChannel(SocketChannel ch) throws Exception {\n ch.config().setAllocator(UnpooledByteBufAllocator.DEFAULT);\n ch.pipeline().addLast(\"String_Node_Str\", new ByteArrayEncoder());\n ch.pipeline().addLast(\"String_Node_Str\", new ByteArrayDecoder());\n ch.pipeline().addLast(new GossipExceptionHandler());\n if (LOG.isTraceEnabled()) {\n ch.pipeline().addLast(new LoggingHandler(LogLevel.TRACE));\n }\n}\n"
"protected void createButtonsForButtonBar(Composite parent) {\n createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false);\n createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true);\n okButton = getButton(IDialogConstants.OK_ID);\n if (okButton != null) {\n okButton.setEnabled(false);\n }\n}\n"
"public static String getGLShaderInfoLog(GL2ES2 gl, int programObject) {\n IntBuffer intValue = IntBuffer.allocate(1);\n gl.glGetShaderiv(shaderObject, GL_INFO_LOG_LENGTH, intValue);\n int lengthWithNull = intValue.get();\n if (lengthWithNull <= 1) {\n lengthWithNull = 1000;\n }\n ByteBuffer infoLog = ByteBuffer.allocate(lengthWithNull);\n intValue.flip();\n gl.glGetShaderInfoLog(programObject, lengthWithNull, intValue, infoLog);\n int actualLength = intValue.get();\n byte[] infoBytes = new byte[actualLength];\n infoLog.get(infoBytes);\n return new String(infoBytes);\n}\n"
"public void getStatus(final HttpRequest request, final HttpResponder responder, final String appId, final String type, final String id) {\n programLifecycleHttpHandler.getStatus(RESTMigrationUtils.rewriteV2RequestToV3(request), responder, Constants.DEFAULT_NAMESPACE, appId, type, id);\n}\n"
"public void run() {\n if (mainFrame == null) {\n if (Configuration.useRibbonInterface.get()) {\n mainFrame = new MainFrameRibbon();\n } else {\n mainFrame = new MainFrameClassic();\n }\n }\n mainFrame.getPanel().load(swf1, first1);\n if (errorState) {\n mainFrame.getPanel().setErrorState();\n }\n}\n"
"public void initialize(AbstractSession session) throws DescriptorException {\n if (this.hasInheritance()) {\n ((org.eclipse.persistence.internal.oxm.QNameInheritancePolicy) this.getInheritancePolicy()).setNamespaceResolver(this.getNamespaceResolver());\n }\n if (null != this.defaultRootElementField) {\n defaultRootElementField.setNamespaceResolver(this.namespaceResolver);\n defaultRootElementField.initialize();\n }\n if (schemaReference != null && schemaReference.getSchemaContext() != null && (schemaReference.getType() == XMLSchemaReference.COMPLEX_TYPE || schemaReference.getType() == XMLSchemaReference.SIMPLE_TYPE) && getDefaultRootElementType() == null) {\n if (hasInheritance() && isChildDescriptor()) {\n XMLField parentField = ((XMLDescriptor) getInheritancePolicy().getParentDescriptor()).getDefaultRootElementField();\n if (parentField == null || (parentField != null && !defaultRootElementField.getXPathFragment().equals(parentField.getXPathFragment()))) {\n setDefaultRootElementType(schemaReference.getSchemaContextAsQName(getNamespaceResolver()));\n }\n } else {\n setDefaultRootElementType(schemaReference.getSchemaContextAsQName(getNamespaceResolver()));\n }\n }\n if (null != primaryKeyFields) {\n for (int x = 0, primaryKeyFieldsSize = this.primaryKeyFields.size(); x < primaryKeyFieldsSize; x++) {\n XMLField pkField = (XMLField) this.primaryKeyFields.get(x);\n pkField.setNamespaceResolver(this.namespaceResolver);\n pkField.initialize();\n }\n }\n if (shouldBeReadOnly() && (!session.getDefaultReadOnlyClasses().contains(getJavaClass()))) {\n session.getDefaultReadOnlyClasses().add(getJavaClass());\n }\n if (isInitialized(INITIALIZED) || isInvalid()) {\n return;\n }\n setInitializationStage(INITIALIZED);\n if (isChildDescriptor()) {\n ClassDescriptor parentDescriptor = getInheritancePolicy().getParentDescriptor();\n parentDescriptor.initialize(session);\n if (parentDescriptor.hasEventManager()) {\n getEventManager();\n }\n }\n for (Enumeration mappingsEnum = getMappings().elements(); mappingsEnum.hasMoreElements(); ) {\n DatabaseMapping mapping = (DatabaseMapping) mappingsEnum.nextElement();\n validateMappingType(mapping);\n mapping.initialize(session);\n if (mapping.isObjectReferenceMapping()) {\n this.hasReferenceMappings = true;\n }\n if (mapping instanceof XMLChoiceObjectMapping) {\n XMLChoiceObjectMapping choiceMapping = ((XMLChoiceObjectMapping) mapping);\n for (XMLMapping next : choiceMapping.getChoiceElementMappings().values()) {\n if (((DatabaseMapping) next).isObjectReferenceMapping()) {\n this.hasReferenceMappings = true;\n }\n }\n }\n if (mapping instanceof XMLChoiceCollectionMapping) {\n XMLChoiceCollectionMapping choiceMapping = ((XMLChoiceCollectionMapping) mapping);\n for (XMLMapping next : choiceMapping.getChoiceElementMappings().values()) {\n if (((DatabaseMapping) next).isObjectReferenceMapping()) {\n this.hasReferenceMappings = true;\n }\n }\n }\n Helper.addAllUniqueToVector(getFields(), mapping.getFields());\n }\n if (hasInheritance()) {\n getInheritancePolicy().initialize(session);\n }\n setAllFields((Vector) getFields().clone());\n getObjectBuilder().initialize(session);\n if (hasInterfacePolicy()) {\n interfaceInitialization(session);\n }\n if (hasReturningPolicy()) {\n getReturningPolicy().initialize(session);\n }\n if (eventManager != null) {\n eventManager.initialize(session);\n }\n if (copyPolicy != null) {\n copyPolicy.initialize(session);\n }\n getInstantiationPolicy().initialize(session);\n if (getSchemaReference() != null) {\n getSchemaReference().initialize(session);\n }\n if (getInheritancePolicyOrNull() != null && getInheritancePolicy().getParentDescriptor() != null) {\n XMLDescriptor d = (XMLDescriptor) getInheritancePolicy().getParentDescriptor();\n locationAccessor = d.getLocationAccessor();\n }\n if (locationAccessor != null) {\n locationAccessor.initializeAttributes(getJavaClass());\n }\n}\n"
"public static boolean checkDatabase() {\n ReturnCode checkConnection = ConnectionService.checkConnection(getUrl() + getDbName(), getDriver(), getProps());\n return checkConnection.isOk();\n}\n"
"public Timestamp getBeginCompilationTimestamp() {\n return beginCompilationTimestamp == null ? null : (Timestamp) beginCompilationTimestamp.clone();\n}\n"
"public void setSchemaModalPage(final PageReference pageRef, final ModalWindow window, AbstractBaseBean schemaTO, final boolean createFlag) {\n final SchemaTO schema;\n if (schemaTO != null && schemaTO instanceof SchemaTO) {\n schema = (SchemaTO) schemaTO;\n } else {\n schema = new SchemaTO();\n }\n final Form schemaForm = new Form(\"String_Node_Str\");\n schemaForm.setModel(new CompoundPropertyModel(schema));\n schemaForm.setOutputMarkupId(Boolean.TRUE);\n final AjaxTextFieldPanel name = new AjaxTextFieldPanel(\"String_Node_Str\", getString(\"String_Node_Str\"), new PropertyModel<String>(schema, \"String_Node_Str\"));\n name.addRequiredLabel();\n name.setEnabled(createFlag);\n final AjaxTextFieldPanel conversionPattern = new AjaxTextFieldPanel(\"String_Node_Str\", getString(\"String_Node_Str\"), new PropertyModel<String>(schema, \"String_Node_Str\"));\n final IModel<List<String>> validatorsList = new LoadableDetachableModel<List<String>>() {\n private static final long serialVersionUID = 5275935387613157437L;\n protected List<String> load() {\n return restClient.getAllValidatorClasses();\n }\n };\n final AjaxDropDownChoicePanel<String> validatorClass = new AjaxDropDownChoicePanel<String>(\"String_Node_Str\", getString(\"String_Node_Str\"), new PropertyModel(schema, \"String_Node_Str\"));\n ((DropDownChoice) validatorClass.getField()).setNullValid(true);\n validatorClass.setChoices(validatorsList.getObject());\n final AjaxDropDownChoicePanel<AttributeSchemaType> type = new AjaxDropDownChoicePanel<AttributeSchemaType>(\"String_Node_Str\", getString(\"String_Node_Str\"), new PropertyModel(schema, \"String_Node_Str\"));\n type.setChoices(Arrays.asList(AttributeSchemaType.values()));\n type.addRequiredLabel();\n final AjaxTextFieldPanel enumerationValuesPanel = new AjaxTextFieldPanel(\"String_Node_Str\", \"String_Node_Str\", new Model<String>(null));\n final MultiValueSelectorPanel<String> enumerationValues = new MultiValueSelectorPanel<String>(\"String_Node_Str\", new Model(), enumerationValuesPanel);\n schemaForm.add(enumerationValues);\n enumerationValues.setModelObject((Serializable) getEnumValuesAsList(schema.getEnumerationValues()));\n final MultiValueSelectorPanel<String> enumerationKeys = new MultiValueSelectorPanel<String>(\"String_Node_Str\", new Model(), new AjaxTextFieldPanel(\"String_Node_Str\", \"String_Node_Str\", new Model<String>(null)));\n schemaForm.add(enumerationKeys);\n enumerationKeys.setModelObject((Serializable) getEnumValuesAsList(schema.getEnumerationKeys()));\n if (AttributeSchemaType.Enum == schema.getType()) {\n enumerationValues.setEnabled(Boolean.TRUE);\n enumerationKeys.setEnabled(Boolean.TRUE);\n enumerationValuesPanel.addRequiredLabel();\n }\n type.getField().add(new AjaxFormComponentUpdatingBehavior(\"String_Node_Str\") {\n private static final long serialVersionUID = -1107858522700306810L;\n protected void onUpdate(final AjaxRequestTarget target) {\n if (AttributeSchemaType.Enum.ordinal() == Integer.parseInt(type.getField().getValue())) {\n if (!enumerationValuesPanel.isRequired()) {\n enumerationValuesPanel.addRequiredLabel();\n }\n enumerationValues.setEnabled(Boolean.TRUE);\n enumerationValues.setModelObject((Serializable) getEnumValuesAsList(schema.getEnumerationValues()));\n enumerationKeys.setEnabled(Boolean.TRUE);\n enumerationKeys.setModelObject((Serializable) getEnumValuesAsList(schema.getEnumerationKeys()));\n } else {\n if (enumerationValuesPanel.isRequired()) {\n enumerationValuesPanel.removeRequiredLabel();\n }\n final List<String> values = new ArrayList<String>();\n values.add(\"String_Node_Str\");\n enumerationValues.setEnabled(Boolean.FALSE);\n enumerationValues.setModelObject((Serializable) values);\n final List<String> keys = new ArrayList<String>();\n keys.add(\"String_Node_Str\");\n enumerationKeys.setEnabled(Boolean.FALSE);\n enumerationKeys.setModelObject((Serializable) keys);\n }\n target.add(schemaForm);\n }\n });\n final AutoCompleteTextField mandatoryCondition = new AutoCompleteTextField(\"String_Node_Str\") {\n private static final long serialVersionUID = -2428903969518079100L;\n protected Iterator<String> getChoices(String input) {\n List<String> choices = new ArrayList<String>();\n if (Strings.isEmpty(input)) {\n choices = Collections.emptyList();\n return choices.iterator();\n }\n if (\"String_Node_Str\".startsWith(input.toLowerCase())) {\n choices.add(\"String_Node_Str\");\n } else if (\"String_Node_Str\".startsWith(input.toLowerCase())) {\n choices.add(\"String_Node_Str\");\n }\n return choices.iterator();\n }\n };\n mandatoryCondition.add(new AjaxFormComponentUpdatingBehavior(\"String_Node_Str\") {\n private static final long serialVersionUID = -1107858522700306810L;\n protected void onUpdate(final AjaxRequestTarget target) {\n }\n });\n final WebMarkupContainer pwdJexlHelp = JexlHelpUtil.getJexlHelpWebContainer(\"String_Node_Str\");\n schemaForm.add(pwdJexlHelp);\n final AjaxLink<Void> pwdQuestionMarkJexlHelp = JexlHelpUtil.getAjaxLink(pwdJexlHelp, \"String_Node_Str\");\n schemaForm.add(pwdQuestionMarkJexlHelp);\n final AjaxCheckBoxPanel multivalue = new AjaxCheckBoxPanel(\"String_Node_Str\", getString(\"String_Node_Str\"), new PropertyModel<Boolean>(schema, \"String_Node_Str\"));\n final AjaxCheckBoxPanel readonly = new AjaxCheckBoxPanel(\"String_Node_Str\", getString(\"String_Node_Str\"), new PropertyModel<Boolean>(schema, \"String_Node_Str\"));\n final AjaxCheckBoxPanel uniqueConstraint = new AjaxCheckBoxPanel(\"String_Node_Str\", getString(\"String_Node_Str\"), new PropertyModel<Boolean>(schema, \"String_Node_Str\"));\n final AjaxButton submit = new IndicatingAjaxButton(\"String_Node_Str\", new ResourceModel(\"String_Node_Str\")) {\n private static final long serialVersionUID = -958724007591692537L;\n protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {\n final SchemaTO schemaTO = (SchemaTO) form.getDefaultModelObject();\n schemaTO.setEnumerationValues(getEnumValuesAsString(enumerationValues.getView().getModelObject()));\n schemaTO.setEnumerationKeys(getEnumValuesAsString(enumerationKeys.getView().getModelObject()));\n if (schemaTO.isMultivalue() && schemaTO.isUniqueConstraint()) {\n error(getString(\"String_Node_Str\"));\n target.add(feedbackPanel);\n return;\n }\n try {\n if (createFlag) {\n restClient.createSchema(kind, schemaTO);\n } else {\n restClient.updateSchema(kind, schemaTO);\n }\n if (pageRef.getPage() instanceof BasePage) {\n ((BasePage) pageRef.getPage()).setModalResult(true);\n }\n window.close(target);\n } catch (SyncopeClientCompositeErrorException e) {\n error(getString(\"String_Node_Str\") + \"String_Node_Str\" + e.getMessage());\n target.add(feedbackPanel);\n }\n }\n protected void onError(final AjaxRequestTarget target, final Form<?> form) {\n target.add(feedbackPanel);\n }\n };\n final AjaxButton cancel = new IndicatingAjaxButton(\"String_Node_Str\", new ResourceModel(\"String_Node_Str\")) {\n private static final long serialVersionUID = -958724007591692537L;\n protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {\n window.close(target);\n }\n };\n cancel.setDefaultFormProcessing(false);\n String allowedRoles;\n if (createFlag) {\n allowedRoles = xmlRolesReader.getAllAllowedRoles(\"String_Node_Str\", \"String_Node_Str\");\n } else {\n allowedRoles = xmlRolesReader.getAllAllowedRoles(\"String_Node_Str\", \"String_Node_Str\");\n }\n MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, allowedRoles);\n schemaForm.add(name);\n schemaForm.add(conversionPattern);\n schemaForm.add(validatorClass);\n schemaForm.add(type);\n schemaForm.add(mandatoryCondition);\n schemaForm.add(multivalue);\n schemaForm.add(readonly);\n schemaForm.add(uniqueConstraint);\n schemaForm.add(submit);\n schemaForm.add(cancel);\n add(schemaForm);\n}\n"
"public void iterateReferenceObjectForMapping(Object referenceObject, DatabaseMapping mapping) {\n super.iterateReferenceObjectForMapping(referenceObject, mapping);\n if (mapping.isCandidateForPrivateOwnedRemoval()) {\n removePrivateOwnedObject(mapping, referenceObject);\n }\n}\n"
"private Property findObject(String idOrName, String name) {\n for (Project p : allRoutineItems.keySet()) {\n List<Property> list = allRoutineItems.get(p);\n if (list != null) {\n for (Property property : list) {\n String objIdOrName = property.getId();\n String objName = property.getLabel();\n if (objIdOrName != null && objIdOrName.equals(idOrName) && property.getItem() instanceof RoutineItem) {\n return property;\n } else if (name.equals(objName) && property.getItem() instanceof RoutineItem) {\n return property;\n }\n }\n }\n }\n return null;\n}\n"
"public void highlightTouch(Highlight high) {\n if (high == null)\n mIndicesToHightlight = null;\n else {\n mIndicesToHightlight = new Highlight[] { high };\n }\n invalidate();\n if (mSelectionListener != null) {\n if (!valuesToHighlight())\n mSelectionListener.onNothingSelected();\n else {\n Entry e = mData.getEntryForHighlight(high);\n mSelectionListener.onValueSelected(e, high.getDataSetIndex());\n }\n }\n}\n"
"public final boolean isEmptyType() {\n return isNoType() || isNoObjectType() || isNoResolvedType() || areIdentical(this, registry.getNativeFunctionType(JSTypeNative.LEAST_FUNCTION_TYPE));\n}\n"
"private void saveToTable(SearchNode n) {\n if (transpositionTable.size() < TABLE_SIZE && n.depth >= 2) {\n transpositionTable.put(n.gameState, n);\n}\n"
"public static int getPageSize() {\n try {\n String defaultPageSize = Platform.getPreferencesService().getString(CorePlugin.PLUGIN_ID, EditorPreferencePage.ANALYZED_ITEMS_PER_PAGE, null, null);\n if (!\"String_Node_Str\".equals(defaultPageSize)) {\n return Integer.parseInt(defaultPageSize);\n }\n } catch (NumberFormatException e) {\n ExceptionHandler.process(e);\n }\n return PAGE_SIZE;\n}\n"
"private boolean getEntries(List<Entry> entries, int maxBatchSize) throws IOException {\n boolean hasEntry = fetchFromCache(entries, maxBatchSize);\n if (entries.size() < maxBatchSize) {\n populateRowCache(entries.keySet());\n hasEntry = fetchFromCache(entries, maxBatchSize) || hasEntry;\n }\n return hasEntry;\n}\n"
"private void compareBlock(int blockNr, AFPChain afpChain, AFPChain newChain, Atom[] ca1, Atom[] ca2) throws StructureException {\n Atom[] ca1Copy = StructureTools.cloneAtomArray(ca1);\n Atom[] ca2Copy = StructureTools.cloneAtomArray(ca2);\n Atom[] ca2Copy2 = StructureTools.cloneAtomArray(ca2);\n int[][][] blocks2 = newChain.getOptAln();\n Matrix[] maxs2 = newChain.getBlockRotationMatrix();\n Atom[] shifts2 = newChain.getBlockShiftVector();\n int[] optLen = afpChain.getOptLen();\n List<Atom> eqrPos1 = new ArrayList<Atom>();\n List<Atom> eqrPos2 = new ArrayList<Atom>();\n List<Atom> eqrPos2copy = new ArrayList<Atom>();\n for (int z = 0; z < blocks2[blockNr][0].length && z < optLen[blockNr]; z++) {\n int pos1 = blocks2[blockNr][0][z];\n int pos2 = blocks2[blockNr][1][z];\n Atom c1 = ca1Copy[pos1];\n Atom c2 = ca2Copy[pos2];\n Atom c3 = ca2Copy2[pos2];\n eqrPos1.add(c1);\n eqrPos2.add(c2);\n eqrPos2copy.add(c3);\n }\n assertTrue(\"String_Node_Str\" + blockNr + \"String_Node_Str\" + afpChain.getOptLen()[blockNr] + \"String_Node_Str\" + eqrPos2.size(), eqrPos2.size() == afpChain.getOptLen()[blockNr]);\n Atom[] blockSet1 = eqrPos1.toArray(new Atom[eqrPos1.size()]);\n Atom[] blockSet2 = eqrPos2.toArray(new Atom[eqrPos2.size()]);\n Atom[] blockSet2copy = eqrPos2copy.toArray(new Atom[eqrPos2copy.size()]);\n for (Atom a : blockSet2) {\n for (int i = 0; i <= blockNr; i++) {\n Matrix max = maxs2[i];\n Atom shift = shifts2[i];\n Calc.rotate(a, max);\n Calc.shift(a, shift);\n }\n }\n double rmsdFile = Calc.rmsd(blockSet1, blockSet2);\n Matrix4d transform = SuperPositions.superpose(Calc.atomsToPoints(blockSet1), Calc.atomsToPoints(blockSet2copy));\n Matrix m = Matrices.getRotationJAMA(transform);\n Atom s = Calc.getTranslationVector(transform);\n Matrix max = maxs2[blockNr];\n Atom shift = shifts2[blockNr];\n compareMatrices(max, m);\n if (blockNr == 0) {\n compareVectors(shift, s);\n } else {\n System.err.println(\"String_Node_Str\");\n }\n for (Atom a : ca2Copy2) {\n Calc.rotate(a, m);\n Calc.shift(a, s);\n }\n double rmsd3 = SuperPositionSVD.getRMS(blockSet1, blockSet2copy);\n assertTrue(\"String_Node_Str\" + blockNr + \"String_Node_Str\" + rmsd3 + \"String_Node_Str\" + rmsdFile, compareRmsd(rmsd3, rmsdFile));\n}\n"
"private String extractLinksFromHtml(String html, String limit_to_host, String exclude_host) {\n String result = \"String_Node_Str\";\n String[] links = HTMLParser.getHttpLinks(html, null);\n for (String link : links) {\n try {\n for (final HostPluginWrapper pHost : HostPluginWrapper.getHostWrapper()) {\n if (!pHost.isEnabled())\n continue;\n if (exclude_hosters != null) {\n boolean in_ignore_list = false;\n for (final String exclude_hoster : exclude_hosters) {\n if (pHost.getHost().equalsIgnoreCase(exclude_hoster))\n in_ignore_list = true;\n }\n if (in_ignore_list)\n continue;\n }\n if ((limit_to_host != null) && (!limit_to_host.equals(JDFeedMeFeed.HOSTER_ANY_HOSTER))) {\n if (limit_to_host.equals(JDFeedMeFeed.HOSTER_ANY_PREMIUM)) {\n if (!pHost.isPremiumEnabled())\n continue;\n Account account = AccountController.getInstance().getValidAccount(pHost.getPlugin());\n if (account == null)\n continue;\n } else {\n if (!pHost.getHost().equalsIgnoreCase(limit_to_host))\n continue;\n }\n }\n if (!pHost.canHandle(link))\n continue;\n result += link + \"String_Node_Str\";\n }\n } finally {\n }\n }\n return result;\n}\n"
"protected IRemoteServiceReference[] getRemoteServiceReferences(IRemoteServiceContainerAdapter adapter, String clazz, String filter) {\n try {\n return adapter.getRemoteServiceReferences((ID[]) null, clazz, filter);\n } catch (final InvalidSyntaxException e) {\n fail(\"String_Node_Str\");\n }\n return null;\n}\n"
"private void makeSureIdCapacityCannotBeExceeded(IdType type) {\n deleteIdGeneratorFile();\n IdGeneratorImpl.createGenerator(idGeneratorFile());\n long maxValue = type.getMaxValue();\n IdGenerator idGenerator = new IdGeneratorImpl(idGeneratorFile(), 1, maxValue);\n long id = maxValue - 2;\n idGenerator.setHighId(id);\n assertEquals(id, idGenerator.nextId());\n assertEquals(id + 1, idGenerator.nextId());\n assertEquals(id + 2, idGenerator.nextId());\n try {\n idGenerator.nextId();\n fail(\"String_Node_Str\");\n } catch (StoreFailureException e) {\n }\n}\n"
"public static Bitmap loadBitmap(Context context, String path, int width, int height) {\n InputStream in = null;\n try {\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n if (Path.ASSETS.belongsTo(path)) {\n in = context.getAssets().open(Path.ASSETS.crop(path));\n if (in != null) {\n BitmapFactory.decodeStream(in, null, options);\n }\n } else if (Path.FILE.belongsTo(path)) {\n BitmapFactory.decodeFile(Path.FILE.crop(path), options);\n } else if (Path.DRAWABLE.belongsTo(path)) {\n BitmapFactory.decodeResource(context.getResources(), Integer.parseInt(Path.DRAWABLE.crop(path)), options);\n } else {\n BitmapFactory.decodeFile(path, options);\n }\n int outWidth = options.outWidth;\n int outHeight = options.outHeight;\n int sampleSize = 1;\n while (outWidth / (sampleSize * 2) > width || outHeight / (sampleSize * 2) > height) {\n sampleSize *= 2;\n }\n options.inJustDecodeBounds = false;\n options.inSampleSize = sampleSize;\n if (Path.ASSETS.belongsTo(path)) {\n in = context.getAssets().open(Path.ASSETS.crop(path));\n if (in != null) {\n return BitmapFactory.decodeStream(in, null, options);\n }\n } else if (Path.FILE.belongsTo(path)) {\n return BitmapFactory.decodeFile(Path.FILE.crop(path), options);\n } else if (Path.DRAWABLE.belongsTo(path)) {\n return BitmapFactory.decodeResource(context.getResources(), Integer.parseInt(Path.DRAWABLE.crop(path)), options);\n } else {\n return BitmapFactory.decodeFile(path, options);\n }\n } catch (IOException | OutOfMemoryError e) {\n e.printStackTrace();\n } finally {\n if (in != null) {\n try {\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n return null;\n}\n"
"private void runZimpl(String type, int verbosity) {\n String[] cmdArray = new String[] { zimplBinary, \"String_Node_Str\", outputPrefix, \"String_Node_Str\", type, \"String_Node_Str\" + String.valueOf(verbosity), zimplFile.getAbsolutePath() };\n File zimplLog = new File(tempDir, \"String_Node_Str\");\n Command.runCommand(cmdArray, zimplLog, tempDir);\n}\n"
"public void save() {\n this.backend.permissions.setProperty(baseNode, node);\n this.backend.permissions.save();\n}\n"
"private void prepareGroup(IBaseQueryDefinition baseQuery, int groupLevel, Context cx) throws DataException {\n IBaseTransform trans = baseQuery;\n String groupName = IBaseExpression.GROUP_OVERALL;\n if (groupLevel != 0) {\n IGroupDefinition igd = (IGroupDefinition) ((IBaseQueryDefinition) trans).getGroups().get(groupLevel - 1);\n trans = igd;\n groupName = igd.getName();\n }\n Collection exprCol = new ArrayList();\n Map resultSetExpressions = new HashMap();\n Map map = baseQuery.getBindings();\n if (map != null) {\n Iterator it = map.keySet().iterator();\n while (it.hasNext()) {\n Object key = it.next();\n IBinding icbe = ((IBinding) map.get(key));\n if (icbe.getExpression() != null && icbe.getExpression().getGroupName().equals(groupName) && groupLevel != 0) {\n exprCol.add(icbe.getExpression());\n resultSetExpressions.put(key, icbe);\n } else if (groupLevel == 0 && icbe.getAggregatOns().size() == 0) {\n exprCol.add(icbe.getExpression());\n resultSetExpressions.put(key, icbe);\n } else if (groupLevel != 0 && icbe.getAggregatOns().contains(groupName)) {\n exprCol.add(icbe.getExpression());\n resultSetExpressions.put(key, icbe);\n }\n }\n }\n prepareExpressions(exprCol, groupLevel, false, true, cx);\n String key = null;\n if (trans instanceof IGroupDefinition) {\n IGroupDefinition gd = (IGroupDefinition) trans;\n key = gd.getKeyColumn() != null ? gd.getKeyColumn() : gd.getKeyExpression();\n }\n this.exprManager.addBindingExpr(key, resultSetExpressions, groupLevel);\n Collection subQueries = trans.getSubqueries();\n Iterator subIt = subQueries.iterator();\n while (subIt.hasNext()) {\n ISubqueryDefinition subquery = (ISubqueryDefinition) subIt.next();\n PreparedSubquery pq = new PreparedSubquery(this.session, this.dataEngineContext, subquery, queryService, groupLevel);\n subQueryMap.put(subquery.getName(), pq);\n subQueryDefnMap.put(subquery.getName(), new Object[] { subquery, new Integer(groupLevel) });\n }\n}\n"
"public void run() {\n AcceptModuleLicensesWizard licensesWizard = new AcceptModuleLicensesWizard(toDownload);\n AcceptModuleLicensesWizardDialog wizardDialog = new AcceptModuleLicensesWizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), licensesWizard, toDownload, monitor);\n wizardDialog.setPageSize(700, 380);\n wizardDialog.create();\n if (wizardDialog.open() != Window.OK) {\n accepted.set(false);\n }\n}\n"
"public boolean finish() {\n File sourceDir = new File(getSourceDirectoryName());\n if (!sourceDir.isDirectory()) {\n setErrorMessage(Messages.ImportTraceWizard_InvalidTraceDirectory);\n return false;\n }\n String sourceDirPath;\n try {\n sourceDirPath = sourceDir.getCanonicalPath();\n } catch (IOException e) {\n MessageDialog.openInformation(getContainer().getShell(), Messages.ImportTraceWizard_Information, Messages.ImportTraceWizard_InvalidTraceDirectory);\n return false;\n }\n fRootDirectory = getSourceDirectoryName();\n List<FileSystemElement> selectedResources = getSelectedResources();\n Iterator<FileSystemElement> resources = selectedResources.iterator();\n Map<String, File> fileSystemObjects = new HashMap<String, File>();\n while (resources.hasNext()) {\n File file = (File) resources.next().getFileSystemObject();\n String key = file.getAbsolutePath();\n fileSystemObjects.put(key, file);\n }\n if (fileSystemObjects.size() > 0) {\n boolean ok = importResources(sourceDirPath, fileSystemObjects);\n String traceBundle = null;\n String traceTypeId = null;\n String traceIcon = null;\n String traceType = fTraceTypes.getText();\n boolean traceTypeOK = false;\n if (traceType.startsWith(CUSTOM_TXT_CATEGORY)) {\n for (CustomTxtTraceDefinition def : CustomTxtTraceDefinition.loadAll()) {\n if (traceType.equals(CUSTOM_TXT_CATEGORY + \"String_Node_Str\" + def.definitionName)) {\n traceTypeOK = true;\n traceBundle = Activator.getDefault().getBundle().getSymbolicName();\n traceTypeId = CustomTxtTrace.class.getCanonicalName() + \"String_Node_Str\" + def.definitionName;\n traceIcon = DEFAULT_TRACE_ICON_PATH;\n break;\n }\n }\n } else if (traceType.startsWith(CUSTOM_XML_CATEGORY)) {\n for (CustomXmlTraceDefinition def : CustomXmlTraceDefinition.loadAll()) {\n if (traceType.equals(CUSTOM_XML_CATEGORY + \"String_Node_Str\" + def.definitionName)) {\n traceTypeOK = true;\n traceBundle = Activator.getDefault().getBundle().getSymbolicName();\n traceTypeId = CustomXmlTrace.class.getCanonicalName() + \"String_Node_Str\" + def.definitionName;\n traceIcon = DEFAULT_TRACE_ICON_PATH;\n break;\n }\n }\n } else {\n IConfigurationElement ce = fTraceAttributes.get(traceType);\n if (ce != null) {\n traceTypeOK = true;\n traceBundle = ce.getContributor().getName();\n traceTypeId = ce.getAttribute(TmfTraceType.ID_ATTR);\n traceIcon = ce.getAttribute(TmfTraceType.ICON_ATTR);\n }\n }\n if (ok && traceTypeOK && !traceType.equals(\"String_Node_Str\")) {\n List<String> files = new ArrayList<String>(fileSystemObjects.keySet());\n Collections.sort(files, new Comparator<String>() {\n public int compare(String o1, String o2) {\n String v1 = o1 + File.separatorChar;\n String v2 = o2 + File.separatorChar;\n return v1.compareTo(v2);\n }\n });\n String prefix = null;\n for (int i = 0; i < files.size(); i++) {\n File file = fileSystemObjects.get(files.get(i));\n String name = file.getAbsolutePath() + File.separatorChar;\n if (fTargetFolder != null && (prefix == null || !name.startsWith(prefix))) {\n prefix = name;\n IResource resource = fTargetFolder.findMember(file.getName());\n if (resource != null) {\n try {\n resource.setPersistentProperty(TmfCommonConstants.TRACEBUNDLE, traceBundle);\n resource.setPersistentProperty(TmfCommonConstants.TRACETYPE, traceTypeId);\n resource.setPersistentProperty(TmfCommonConstants.TRACEICON, traceIcon);\n for (TmfTraceElement traceElement : TmfProjectRegistry.getProject(resource.getProject()).getTracesFolder().getTraces()) {\n if (traceElement.getName().equals(resource.getName())) {\n traceElement.refreshTraceType();\n break;\n }\n }\n } catch (CoreException e) {\n Activator.getDefault().logError(\"String_Node_Str\" + resource.getName(), e);\n }\n }\n }\n }\n }\n return ok;\n }\n MessageDialog.openInformation(getContainer().getShell(), Messages.ImportTraceWizard_Information, Messages.ImportTraceWizard_SelectTraceNoneSelected);\n return false;\n}\n"
"public void getRequirementsForPlacement(IBuilderContext context, List<ItemStack> requirements) {\n requirements.add(new ItemStack(Blocks.REDSTONE_LAMP, 1, 0));\n}\n"
"public void initDDLFields() {\n scale = 0;\n length = 0;\n precision = 0;\n isUnique = false;\n isNullable = true;\n isUpdatable = true;\n isInsertable = true;\n columnDefinition = \"String_Node_Str\";\n}\n"
"public static byte[] parseHex(String string) {\n try {\n return Hex.decodeHex(string.toCharArray());\n } catch (DecoderException e) {\n throw new RuntimeException(e);\n }\n}\n"
"private List getPages(boolean fitToPage, boolean pagebreakPaginationOnly) throws EngineException {\n String designFile = \"String_Node_Str\";\n IReportRunnable report = openReportDesign(designFile);\n List pageAreas = new ArrayList();\n IEmitterMonitor monitor = new PageMonitor(pageAreas);\n IRunAndRenderTask runAndRenderTask = new TestRunAndRenderTask(engine, report, monitor);\n PDFRenderOption options = createRenderOption();\n if (fitToPage) {\n options.setOption(IPDFRenderOption.PAGE_OVERFLOW, new Integer(IPDFRenderOption.FIT_TO_PAGE_SIZE));\n }\n options.setOption(IPDFRenderOption.PAGEBREAK_PAGINATION_ONLY, new Boolean(pagebreakPaginationOnly));\n runAndRenderTask.setRenderOption(options);\n runAndRenderTask.run();\n runAndRenderTask.close();\n return pageAreas;\n}\n"
"boolean startCleanup(boolean forced) {\n final long now = System.currentTimeMillis();\n long dirtyAge = (now - lastCleanup);\n boolean shouldRun = (store != null && dirty && dirtyAge >= writeDelayMillis) || (dirtyAge > cleanupDelayMillis);\n if (shouldRun && cleanupActive.compareAndSet(false, true)) {\n lastCleanup = now;\n try {\n final long now = System.currentTimeMillis();\n if (nearCache != null) {\n nearCache.evict(now, false);\n }\n final Set<Record> recordsDirty = new HashSet<Record>();\n final Set<Record> recordsUnknown = new HashSet<Record>();\n final Set<Record> recordsToPurge = new HashSet<Record>();\n final Set<Record> recordsToEvict = new HashSet<Record>();\n final Set<Record> sortedRecords = new TreeSet<Record>(new ComparatorWrapper(evictionComparator));\n final Collection<Record> records = mapRecords.values();\n final boolean overCapacity = maxSizePolicy.overCapacity();\n final boolean evictionAware = evictionComparator != null && overCapacity;\n int recordsStillOwned = 0;\n int backupPurgeCount = 0;\n PartitionManager partitionManager = concurrentMapManager.partitionManager;\n for (Record record : records) {\n PartitionInfo partition = partitionManager.getPartition(record.getBlockId());\n Address owner = partition.getOwner();\n boolean owned = (owner != null && thisAddress.equals(owner));\n boolean ownedOrBackup = partition.isOwnerOrBackup(thisAddress, backupCount);\n if (owner != null && !partitionManager.isPartitionMigrating(partition.getPartitionId())) {\n if (owned) {\n if (store != null && writeDelayMillis > 0 && record.isDirty()) {\n if (now > record.getWriteTime()) {\n recordsDirty.add(record);\n record.setDirty(false);\n }\n } else if (shouldPurgeRecord(record, now)) {\n recordsToPurge.add(record);\n } else if (record.isActive() && !record.isValid(now)) {\n recordsToEvict.add(record);\n } else if (evictionAware && record.isActive() && record.isEvictable()) {\n sortedRecords.add(record);\n recordsStillOwned++;\n }\n } else if (ownedOrBackup) {\n if (shouldPurgeRecord(record, now)) {\n recordsToPurge.add(record);\n backupPurgeCount++;\n }\n } else {\n recordsUnknown.add(record);\n }\n }\n }\n if (evictionAware && (forced || overCapacity)) {\n int numberOfRecordsToEvict = (int) (recordsStillOwned * evictionRate);\n int evictedCount = 0;\n for (Record record : sortedRecords) {\n if (record.isActive() && record.isEvictable()) {\n recordsToEvict.add(record);\n if (++evictedCount >= numberOfRecordsToEvict) {\n break;\n }\n }\n }\n }\n Level levelLog = (concurrentMapManager.LOG_STATE) ? Level.INFO : Level.FINEST;\n logger.log(levelLog, name + \"String_Node_Str\" + \"String_Node_Str\" + recordsDirty.size() + \"String_Node_Str\" + recordsToPurge.size() + \"String_Node_Str\" + recordsToEvict.size() + \"String_Node_Str\" + recordsUnknown.size() + \"String_Node_Str\" + recordsStillOwned + \"String_Node_Str\" + backupPurgeCount);\n executeStoreUpdate(recordsDirty);\n executeEviction(recordsToEvict);\n executePurge(recordsToPurge);\n executePurgeUnknowns(recordsUnknown);\n } finally {\n cleanupActive.set(false);\n return true;\n }\n } else {\n return false;\n }\n}\n"
"protected String _generateVariableDeclaration(ProgramCodeGeneratorAdapter target) throws IllegalActionException {\n StringBuffer code = new StringBuffer();\n ProgramCodeGenerator codeGenerator = getCodeGenerator();\n String name = ProgramCodeGeneratorAdapterStrategy.generateName(getComponent());\n String referencedParameterDeclaration = _generateReferencedParameterDeclaration(target);\n if (referencedParameterDeclaration.length() > 1) {\n code.append(_eol + codeGenerator.comment(name + \"String_Node_Str\"));\n code.append(referencedParameterDeclaration);\n }\n String inputVariableDeclaration = _generateInputVariableDeclaration(target);\n if (inputVariableDeclaration.length() > 1) {\n code.append(_eol + codeGenerator.comment(name + \"String_Node_Str\"));\n code.append(inputVariableDeclaration);\n }\n String outputVariableDeclaration = _generateOutputVariableDeclaration(target);\n if (outputVariableDeclaration.length() > 1) {\n code.append(_eol + codeGenerator.comment(name + \"String_Node_Str\"));\n code.append(outputVariableDeclaration);\n }\n String typeConvertVariableDeclaration = _generateTypeConvertVariableDeclaration(target);\n if (typeConvertVariableDeclaration.length() > 1) {\n code.append(_eol + codeGenerator.comment(name + \"String_Node_Str\"));\n code.append(typeConvertVariableDeclaration);\n }\n return processCode(code.toString());\n}\n"
"protected IScheduledExecutorService exec(int index, String postfix) {\n return clients.client(index).getScheduledExecutorService(SCHEDULED_EXEC_NAME + quorumType.name() + postfix);\n}\n"
"public void convert(TypedCompositeActor actor, int threshold) {\n List<ComponentEntity> entities = actor.entityList();\n for (ComponentEntity entity : entities) {\n if (entity instanceof TypedCompositeActor) {\n convert((TypedCompositeActor) entity, threshold);\n if (count((TypedCompositeActor) entity) >= threshold) {\n entity.setClassName(\"String_Node_Str\");\n }\n }\n }\n}\n"
"private static JsonNode dotNotationToStandardJson(JsonNode etcdJson) throws IOException {\n String unflattened = new JsonUnflattener(jsonToString(flattenJson(etcdJson, \"String_Node_Str\"))).withFlattenMode(FlattenMode.MONGODB).withKeyTransformer(new KeyTransformer() {\n public String transform(String s) {\n return s.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n }\n }).unflatten();\n return mapper.readTree(unflattened);\n } else {\n return etcdJson;\n }\n}\n"
"private static void setReceiver(Block block, boolean powerOn) {\n Material mBlock = block.getType();\n int iData = (int) block.getData();\n if (mBlock == Material.LEVER) {\n if (!plugin.isApiOudated()) {\n if ((powerOn && (iData & 0x08) != 0x08) || (!powerOn && (iData & 0x08) == 0x08)) {\n CraftBlock cbBlock = (CraftBlock) block;\n BlockState cbState = cbBlock.getState();\n net.minecraft.server.v1_10_R1.WorldServer w = ((CraftWorld) block.getWorld()).getHandle();\n Location l = block.getLocation();\n int blockX = l.getBlockX();\n int blockY = l.getBlockY();\n int blockZ = l.getBlockZ();\n BlockPosition bp = new BlockPosition(blockX, blockY, blockZ);\n int blockData = cbState.getRawData();\n int j1 = blockData & 7;\n int k1 = 8 - (blockData & 8);\n net.minecraft.server.v1_10_R1.Block netBlock = w.getType(bp).getBlock();\n w.setTypeAndData(bp, netBlock.fromLegacyData(j1 + k1), 3);\n w.applyPhysics(bp, netBlock);\n if (j1 == 1) {\n w.applyPhysics(new BlockPosition(blockX - 1, blockY, blockZ), netBlock);\n } else if (j1 == 2) {\n w.applyPhysics(new BlockPosition(blockX + 1, blockY, blockZ), netBlock);\n } else if (j1 == 3) {\n w.applyPhysics(new BlockPosition(blockX, blockY, blockZ - 1), netBlock);\n } else if (j1 == 4) {\n w.applyPhysics(new BlockPosition(blockX, blockY, blockZ + 1), netBlock);\n } else if (j1 != 5 && j1 != 6) {\n if (j1 == 0 || j1 == 7) {\n w.applyPhysics(new BlockPosition(blockX, blockY + 1, blockZ), netBlock);\n }\n } else {\n w.applyPhysics(new BlockPosition(blockX, blockY - 1, blockZ), netBlock);\n }\n }\n } else {\n BlockState state = block.getState();\n Lever lever = (Lever) state.getData();\n lever.setPowered(powerOn);\n state.setData(lever);\n state.update();\n }\n } else if (mBlock == Material.POWERED_RAIL) {\n if (powerOn && (iData & 0x08) != 0x08) {\n iData |= 0x08;\n } else if (!powerOn && (iData & 0x08) == 0x08) {\n iData ^= 0x08;\n }\n block.setData((byte) iData);\n } else if (mBlock == Material.IRON_DOOR_BLOCK || mBlock == Material.WOODEN_DOOR || mBlock == Material.SPRUCE_DOOR || mBlock == Material.BIRCH_DOOR || mBlock == Material.JUNGLE_DOOR || mBlock == Material.ACACIA_DOOR || mBlock == Material.DARK_OAK_DOOR) {\n Block bOtherPiece = block.getRelative(((iData & 0x08) == 0x08) ? BlockFace.DOWN : BlockFace.UP);\n int iOtherPieceData = (int) bOtherPiece.getData();\n if (powerOn && (iData & 0x04) != 0x04) {\n iData |= 0x04;\n iOtherPieceData |= 0x04;\n } else if (!powerOn && (iData & 0x04) == 0x04) {\n iData ^= 0x04;\n iOtherPieceData ^= 0x04;\n }\n block.setData((byte) iData);\n bOtherPiece.setData((byte) iOtherPieceData);\n block.getWorld().playEffect(block.getLocation(), Effect.DOOR_TOGGLE, 0, 10);\n } else if (mBlock == Material.TRAP_DOOR || mBlock == Material.FENCE_GATE) {\n if (powerOn && (iData & 0x04) != 0x04) {\n iData |= 0x04;\n } else if (!powerOn && (iData & 0x04) == 0x04) {\n iData ^= 0x04;\n }\n block.setData((byte) iData);\n } else if (mBlock == Material.PISTON_BASE || mBlock == Material.PISTON_STICKY_BASE) {\n if (powerOn && (iData & 0x08) != 0x08) {\n iData |= 0x08;\n } else if (!powerOn && (iData & 0x08) == 0x08) {\n iData ^= 0x08;\n }\n block.setData((byte) iData);\n } else if (mBlock == Material.REDSTONE_LAMP_ON) {\n if (!powerOn) {\n keepAlives.remove(block);\n block.setType(Material.REDSTONE_LAMP_OFF);\n }\n } else if (mBlock == Material.REDSTONE_LAMP_OFF) {\n if (powerOn) {\n keepAlives.add(block);\n net.minecraft.server.v1_10_R1.World w = ((CraftWorld) block.getWorld()).getHandle();\n try {\n setStaticStatus(w, true);\n block.setType(Material.REDSTONE_LAMP_ON);\n setStaticStatus(w, false);\n } catch (NoSuchFieldException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n }\n }\n}\n"
"private boolean audioDecodeStep(ByteBuffer buffer) {\n buffer.clear();\n synchronized (Extractor_LOCK) {\n mExtractor.selectTrack(mAudioDecoderTrack);\n int length = mExtractor.readSampleData(buffer, 0);\n if (length != -1) {\n int flags = mExtractor.getSampleFlags();\n mAudioEncoderBufferInfo.size = length;\n mAudioEncoderBufferInfo.flags = flags;\n mAudioEncoderBufferInfo.presentationTimeUs = mExtractor.getSampleTime();\n mAudioEncoderBufferInfo.offset = 0;\n mMuxer.writeSampleData(mAudioEncoderTrack, buffer, mAudioEncoderBufferInfo);\n }\n isAudioExtractorEnd = !mExtractor.advance();\n }\n return isAudioExtractorEnd || isTimeEnd;\n}\n"
"protected void computeValidPlanAlternatives(List<? extends OptimizerNode> altSubPlans1, List<? extends OptimizerNode> altSubPlans2, CostEstimator estimator, List<OptimizerNode> outputPlans) {\n for (OptimizerNode subPlan1 : altSubPlans1) {\n for (OptimizerNode subPlan2 : altSubPlans2) {\n if (!areBranchCompatible(subPlan1, subPlan2)) {\n continue;\n }\n ShipStrategy ss1 = this.input1.getShipStrategy();\n ShipStrategy ss2 = this.input2.getShipStrategy();\n GlobalProperties gp1;\n GlobalProperties gp2;\n if (ss1 == ShipStrategy.NONE) {\n gp1 = subPlan1.getGlobalProperties();\n if (ss2 == ShipStrategy.NONE) {\n gp2 = subPlan2.getGlobalProperties();\n if (partitioningIsOnRightFields(gp1, 0) && gp1.getPartitioning().isComputablyPartitioned()) {\n ss1 = ShipStrategy.FORWARD;\n }\n if (partitioningIsOnRightFields(gp2, 1) && gp2.getPartitioning().isComputablyPartitioned()) {\n if (!partitioningIsOnRightFields(gp1, 0) || !gp1.getPartitioning().isComputablyPartitioned()) {\n ss2 = ShipStrategy.FORWARD;\n } else {\n if (gp1.getPartitioning().isCompatibleWith(gp2.getPartitioning()) && partitioningIsOnSameSubkey(gp1.getPartitionedFields(), gp2.getPartitionedFields())) {\n ss2 = ShipStrategy.FORWARD;\n } else {\n if (gp1.getPartitioning() == PartitionProperty.HASH_PARTITIONED) {\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ShipStrategy.FORWARD, ShipStrategy.PARTITION_HASH, estimator);\n } else if (gp1.getPartitioning() == PartitionProperty.RANGE_PARTITIONED) {\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ShipStrategy.FORWARD, ShipStrategy.PARTITION_RANGE, estimator);\n }\n if (gp2.getPartitioning() == PartitionProperty.HASH_PARTITIONED) {\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ShipStrategy.PARTITION_HASH, ShipStrategy.FORWARD, estimator);\n } else if (gp2.getPartitioning() == PartitionProperty.RANGE_PARTITIONED) {\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ShipStrategy.PARTITION_RANGE, ShipStrategy.FORWARD, estimator);\n }\n continue;\n }\n }\n }\n if (ss1 == ShipStrategy.FORWARD) {\n if (ss2 == ShipStrategy.FORWARD) {\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ss1, ss2, estimator);\n if (gp1.getPartitioning() != PartitionProperty.RANGE_PARTITIONED) {\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ShipStrategy.PARTITION_RANGE, ShipStrategy.PARTITION_RANGE, estimator);\n }\n } else {\n if (partitioningIsOnRightFields(gp1, 0) && gp1.getPartitioning() == PartitionProperty.HASH_PARTITIONED) {\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ss1, ShipStrategy.PARTITION_HASH, estimator);\n } else if (partitioningIsOnRightFields(gp1, 0) && gp1.getPartitioning() == PartitionProperty.RANGE_PARTITIONED) {\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ss1, ShipStrategy.PARTITION_RANGE, estimator);\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ShipStrategy.PARTITION_HASH, ShipStrategy.PARTITION_HASH, estimator);\n } else {\n throw new CompilerException(\"String_Node_Str\" + getPactContract().getName() + \"String_Node_Str\");\n }\n }\n } else if (ss2 == ShipStrategy.FORWARD) {\n if (partitioningIsOnRightFields(gp2, 1) && gp2.getPartitioning() == PartitionProperty.HASH_PARTITIONED) {\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ShipStrategy.PARTITION_HASH, ss2, estimator);\n } else if (partitioningIsOnRightFields(gp2, 1) && gp2.getPartitioning() == PartitionProperty.RANGE_PARTITIONED) {\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ShipStrategy.PARTITION_RANGE, ss2, estimator);\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ShipStrategy.PARTITION_HASH, ShipStrategy.PARTITION_HASH, estimator);\n } else {\n throw new CompilerException(\"String_Node_Str\" + getPactContract().getName() + \"String_Node_Str\");\n }\n } else {\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ShipStrategy.PARTITION_HASH, ShipStrategy.PARTITION_HASH, estimator);\n if (haveValidOutputEstimates(subPlan1) && haveValidOutputEstimates(subPlan2)) {\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ShipStrategy.BROADCAST, ShipStrategy.FORWARD, estimator);\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ShipStrategy.FORWARD, ShipStrategy.BROADCAST, estimator);\n }\n }\n } else {\n gp2 = PactConnection.getGlobalPropertiesAfterConnection(subPlan2, this, 1, ss2);\n switch(ss2) {\n case BROADCAST:\n ss1 = ShipStrategy.FORWARD;\n break;\n case FORWARD:\n if (partitioningIsOnRightFields(gp2, 1) && gp2.getPartitioning().isPartitioned()) {\n if (gp2.getPartitioning() == PartitionProperty.HASH_PARTITIONED) {\n ss1 = ShipStrategy.PARTITION_HASH;\n } else if (gp2.getPartitioning() == PartitionProperty.RANGE_PARTITIONED) {\n ss1 = ShipStrategy.PARTITION_RANGE;\n } else {\n throw new CompilerException();\n }\n } else {\n ss1 = ShipStrategy.BROADCAST;\n }\n break;\n case PARTITION_HASH:\n ss1 = (partitioningIsOnSameSubkey(gp1.getPartitionedFields(), this.keySet2) && gp1.getPartitioning() == PartitionProperty.HASH_PARTITIONED) ? ShipStrategy.FORWARD : ShipStrategy.PARTITION_HASH;\n break;\n case PARTITION_RANGE:\n ss1 = (partitioningIsOnRightFields(gp1, 0) && gp1.getPartitioning() == PartitionProperty.RANGE_PARTITIONED) ? ShipStrategy.FORWARD : ShipStrategy.PARTITION_RANGE;\n break;\n default:\n throw new CompilerException(\"String_Node_Str\" + ss2.name() + \"String_Node_Str\" + getPactContract().getName() + \"String_Node_Str\");\n }\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ss1, ss2, estimator);\n }\n } else if (ss2 == ShipStrategy.NONE) {\n gp1 = PactConnection.getGlobalPropertiesAfterConnection(subPlan1, this, ss1);\n gp2 = subPlan2.getGlobalProperties();\n switch(ss1) {\n case BROADCAST:\n ss2 = ShipStrategy.FORWARD;\n break;\n case FORWARD:\n if (partitioningIsOnRightFields(gp1, 0) && gp1.getPartitioning().isPartitioned()) {\n if (gp1.getPartitioning() == PartitionProperty.HASH_PARTITIONED) {\n ss2 = ShipStrategy.PARTITION_HASH;\n } else if (gp1.getPartitioning() == PartitionProperty.RANGE_PARTITIONED) {\n ss2 = ShipStrategy.PARTITION_RANGE;\n } else {\n throw new CompilerException();\n }\n } else {\n ss2 = ShipStrategy.BROADCAST;\n }\n break;\n case PARTITION_HASH:\n ss2 = (partitioningIsOnSameSubkey(this.keySet1, gp2.getPartitionedFields()) && partitioningIsOnRightFields(gp2, 1) && gp2.getPartitioning() == PartitionProperty.HASH_PARTITIONED) ? ShipStrategy.FORWARD : ShipStrategy.PARTITION_HASH;\n break;\n case PARTITION_RANGE:\n ss2 = (partitioningIsOnRightFields(gp2, 1) && gp2.getPartitioning() == PartitionProperty.RANGE_PARTITIONED) ? ShipStrategy.FORWARD : ShipStrategy.PARTITION_RANGE;\n break;\n default:\n throw new CompilerException(\"String_Node_Str\" + ss1.name() + \"String_Node_Str\" + getPactContract().getName() + \"String_Node_Str\");\n }\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ss1, ss2, estimator);\n } else {\n if ((ss1 == ShipStrategy.BROADCAST && ss2 != ShipStrategy.BROADCAST) || (ss1 != ShipStrategy.BROADCAST && ss2 == ShipStrategy.BROADCAST)) {\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ss1, ss2, estimator);\n } else {\n gp1 = PactConnection.getGlobalPropertiesAfterConnection(subPlan1, this, ss1);\n gp2 = PactConnection.getGlobalPropertiesAfterConnection(subPlan2, this, ss2);\n if (gp1.getPartitioning().isComputablyPartitioned() && gp1.getPartitioning() == gp2.getPartitioning() && partitioningIsOnSameSubkey(gp1.getPartitionedFields(), gp2.getPartitionedFields())) {\n createLocalAlternatives(outputPlans, subPlan1, subPlan2, ss1, ss2, estimator);\n } else {\n continue;\n }\n }\n }\n }\n }\n}\n"
"public boolean isRegistered() {\n return lockBox.map.containsKey(this);\n}\n"
"public void handleMessage(Message msg) {\n Bundle bundle = msg.getData();\n final int numOfCards = bundle.getInt(\"String_Node_Str\");\n final String[] listOfWords = bundle.getStringArray(\"String_Node_Str\");\n final String[] listOfForeign = bundle.getStringArray(\"String_Node_Str\");\n final String[] listOfImageUrls = bundle.getStringArray(\"String_Node_Str\");\n final GridView gridview = (GridView) findViewById(R.id.currentCards);\n ThumbnailAdapter gridAdapter = new ThumbnailAdapter(Startup.this.getApplicationContext(), listOfImageUrls, listOfWords, listOfForeign, numOfCards);\n gridview.setAdapter(gridAdapter);\n gridview.setOnItemClickListener(new OnItemClickListener() {\n public void onItemClick(AdapterView<?> parent, View v, int position, long id) {\n Toast.makeText(Startup.this, \"String_Node_Str\" + position, Toast.LENGTH_SHORT).show();\n Intent myIntent = new Intent(Startup.this, ViewCard.class);\n myIntent.putExtra(\"String_Node_Str\", position);\n myIntent.putExtra(\"String_Node_Str\", numOfCards);\n for (int i = 0; i < numOfCards; i++) {\n myIntent.putExtra(\"String_Node_Str\" + i, listOfWords[i]);\n myIntent.putExtra(\"String_Node_Str\" + i, listOfForeign[i]);\n myIntent.putExtra(\"String_Node_Str\" + i, listOfImageUrls[i]);\n }\n });\n }\n}\n"
"public void start() {\n if (mTarget == null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n if (mState != STATE_PREPARE) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n mState = STATE_DELAYED;\n applyInterpolator();\n if (mNativePtr == null) {\n cancel();\n } else if (mStartDelay <= 0 || !mUiThreadHandlesDelay) {\n nSetStartDelay(mNativePtr.get(), mStartDelay);\n doStart();\n } else {\n getHelper().addDelayedAnimation(this);\n }\n}\n"
"protected void visitInvokeInternal(SSAAbstractInvokeInstruction instruction) {\n if (DEBUG) {\n System.err.println(\"String_Node_Str\" + instruction);\n }\n PointerKey uniqueCatch = null;\n if (hasUniqueCatchBlock(instruction, ir)) {\n uniqueCatch = getBuilder().getUniqueCatchKey(instruction, ir, node);\n }\n if (instruction.getCallSite().isStatic()) {\n CGNode n = getTargetForCall(node, instruction.getCallSite(), (InstanceKey) null);\n if (n == null) {\n Warnings.add(ResolutionFailure.create(node, instruction.getCallSite()));\n } else {\n getBuilder().processResolvedCall(node, instruction, n, computeInvariantParameters(instruction), uniqueCatch);\n if (DEBUG) {\n System.err.println(\"String_Node_Str\" + n);\n }\n processClassInitializer(n.getMethod().getDeclaringClass());\n }\n } else {\n PointerKey receiver = getPointerKeyForLocal(instruction.getReceiver());\n if (contentsAreInvariant(symbolTable, du, instruction.getReceiver())) {\n system.recordImplicitPointsToSet(receiver);\n InstanceKey[] ik = getInvariantContents(instruction.getReceiver());\n for (int i = 0; i < ik.length; i++) {\n system.findOrCreateIndexForInstanceKey(ik[i]);\n CGNode n = getTargetForCall(node, instruction.getCallSite(), ik[i]);\n if (n == null) {\n Warnings.add(ResolutionFailure.create(node, instruction));\n } else {\n getBuilder().processResolvedCall(node, instruction, n, computeInvariantParameters(instruction), uniqueCatch);\n processClassInitializer(n.getMethod().getDeclaringClass());\n }\n }\n } else {\n if (DEBUG) {\n System.err.println(\"String_Node_Str\" + instruction + \"String_Node_Str\" + receiver);\n }\n DispatchOperator dispatchOperator = getBuilder().new DispatchOperator(instruction, node, computeInvariantParameters(instruction), uniqueCatch);\n system.newSideEffect(dispatchOperator, receiver);\n }\n }\n}\n"
"public int getDeviceIdleModeCount(int mode, int which) {\n switch(mode) {\n case DEVICE_IDLE_MODE_LIGHT:\n return mDeviceIdleModeLightTimer.getCountLocked(which);\n case DEVICE_IDLE_MODE_DEEP:\n return mDeviceIdleModeFullTimer.getCountLocked(which);\n }\n return 0;\n}\n"
"public void testAllWrongAndCorrect() {\n getPage().getAgeInput().click();\n getPage().getAgeInput().sendKeys(\"String_Node_Str\");\n getPage().getEmailInput().click();\n getPage().getEmailInput().sendKeys(\"String_Node_Str\");\n getPage().getNameInput().click();\n getPage().getNameInput().sendKeys(\"String_Node_Str\");\n getPage().loseFocus();\n new WebDriverWait(getWebDriver()).failWith(\"String_Node_Str\").until(ElementPresent.getInstance().element(getPage().getAgeErrorArea()));\n new WebDriverWait(getWebDriver()).failWith(\"String_Node_Str\").until(ElementPresent.getInstance().element(getPage().getEmailErrorArea()));\n new WebDriverWait(getWebDriver()).failWith(\"String_Node_Str\").until(ElementPresent.getInstance().element(getPage().getNameErrorArea()));\n getPage().getAgeInput().click();\n getPage().getAgeInput().clear();\n getPage().getAgeInput().sendKeys(\"String_Node_Str\");\n getPage().getEmailInput().click();\n getPage().getEmailInput().clear();\n getPage().getEmailInput().sendKeys(\"String_Node_Str\");\n getPage().getNameInput().click();\n getPage().getNameInput().clear();\n getPage().getNameInput().sendKeys(\"String_Node_Str\");\n getPage().loseFocus();\n new WebDriverWait(getWebDriver()).failWith(\"String_Node_Str\").until(ElementNotPresent.getInstance().element(getPage().getAgeErrorArea()));\n new WebDriverWait(getWebDriver()).failWith(\"String_Node_Str\").until(ElementNotPresent.getInstance().element(getPage().getEmailErrorArea()));\n new WebDriverWait(getWebDriver()).failWith(\"String_Node_Str\").until(ElementNotPresent.getInstance().element(getPage().getNameErrorArea()));\n}\n"