content
stringlengths
40
137k
"private void loopSession() {\n Screen s = getNextScreen();\n while (s != null) {\n s.init(mPlatform, mSession, mSandbox);\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n s.prompt(System.out);\n System.out.print(\"String_Node_Str\");\n try {\n String input = reader.readLine();\n s.updateSession(mSession, input);\n s = getNextScreen();\n } catch (CommCareSessionException ccse) {\n System.out.println(\"String_Node_Str\");\n ccse.printStackTrace();\n System.out.println(\"String_Node_Str\");\n reader.readLine();\n mSession.clearAllState();\n loopSession();\n }\n }\n String formXmlns = mSession.getForm();\n XFormPlayer player = new XFormPlayer(System.in, System.out, null);\n player.setSessionIIF(mSession.getIIF());\n player.start(mEngine.loadFormByXmlns(formXmlns));\n}\n"
"public boolean setFrom(ConnectorAnchor from) {\n boolean ret = super.setFrom(from);\n if (from == null) {\n synchronized (paramAnchors) {\n paramAnchors.remove(info);\n updateParamAnchors();\n }\n }\n return ret;\n}\n"
"public static void segment(Integer segmentId) throws JsonGenerationException, JsonMappingException, IOException {\n final Edge e = graph.getGraph().getEdgeById(segmentId);\n if (e != null) {\n final OsmSegment osmSegment = new OsmSegment(segmentId, e.getGeometry(), e.toString());\n renderJSON(jsonMapper.writeValueAsString(osmSegment));\n } else\n badRequest();\n}\n"
"void calculateSimilarity() {\n for (int vaIndex = group.getStartIndex(); vaIndex < group.getStartIndex() + group.getSize(); vaIndex++) {\n Integer id = va1.get(vaIndex);\n if (va1.getIdType() != va2.getIdType()) {\n IDMappingManager idMappingManager = IDMappingManagerRegistry.get().getIDMappingManager(va1.getIdType().getIDCategory());\n Set<Integer> ids = idMappingManager.getIDAsSet(va1.getIdType(), va2.getIdType(), id);\n if (ids != null) {\n id = ids.iterator().next();\n if (ids.size() > 2) {\n System.out.println(\"String_Node_Str\");\n }\n }\n }\n List<Group> groups2 = va2.getGroupOf(id);\n if (groups2.size() > 1) {\n System.out.println(\"String_Node_Str\" + groups2.size());\n }\n for (Group group2 : groups2) {\n scores[group2.getGroupIndex()] += 1;\n if (createSimilarityVAs) {\n similarityVAs.get(group2.getGroupIndex()).append(id);\n }\n }\n }\n int sum = 0;\n similarities = new float[scores.length];\n for (int count = 0; count < scores.length; count++) {\n sum += scores[count];\n similarities[count] = ((float) scores[count]) / group.getSize();\n }\n if (sum != group.getSize()) {\n System.out.println(\"String_Node_Str\" + sum + \"String_Node_Str\" + group.getSize());\n }\n}\n"
"private void workOnChangeSet(IndexWriter indexWriter, Repository repository, SVNLogEntry logEntry) {\n Set changedPathsSet = logEntry.getChangedPaths().keySet();\n TagBranchRecognition tbr = new TagBranchRecognition(repository);\n TagBranch res = null;\n if (changedPathsSet.size() == 1) {\n res = tbr.checkForTagOrBranch(logEntry, changedPathsSet);\n } else {\n res = tbr.checkForMavenTag(logEntry, changedPathsSet);\n if (res == null) {\n res = tbr.checkForSubverisonTag(logEntry, changedPathsSet);\n }\n }\n int count = 0;\n LOGGER.debug(\"String_Node_Str\" + changedPathsSet.size());\n for (Iterator changedPaths = changedPathsSet.iterator(); changedPaths.hasNext(); ) {\n count++;\n Document doc = new Document();\n if (res != null) {\n switch(res.getType()) {\n case BRANCH:\n addUnTokenizedField(doc, FieldNames.BRANCH, res.getName());\n break;\n case TAG:\n addUnTokenizedField(doc, FieldNames.TAG, res.getName());\n switch(res.getTagType()) {\n case NONE:\n break;\n case TAG:\n break;\n case MAVENTAG:\n addUnTokenizedField(doc, FieldNames.MAVENTAG, res.getName());\n break;\n case SUBVERSIONTAG:\n addUnTokenizedField(doc, FieldNames.SUBVERSIONTAG, res.getName());\n break;\n }\n break;\n default:\n break;\n }\n }\n SVNLogEntryPath entryPath = (SVNLogEntryPath) logEntry.getChangedPaths().get(changedPaths.next());\n LOGGER.debug(\"String_Node_Str\" + entryPath.getType() + \"String_Node_Str\" + entryPath.getPath() + ((entryPath.getCopyPath() != null) ? \"String_Node_Str\" + entryPath.getCopyPath() + \"String_Node_Str\" + entryPath.getCopyRevision() + \"String_Node_Str\" : \"String_Node_Str\"));\n SVNDirEntry dirEntry = tbr.getEntryCache().getEntry(logEntry.getRevision(), entryPath.getPath());\n try {\n indexFile(doc, indexWriter, dirEntry, repository, logEntry, entryPath);\n } catch (IOException e) {\n LOGGER.error(\"String_Node_Str\", e);\n } catch (SVNException e) {\n LOGGER.error(\"String_Node_Str\" + e);\n } catch (Exception e) {\n LOGGER.error(\"String_Node_Str\" + e);\n }\n }\n}\n"
"private boolean checkSize() {\n if (this.changeSizeNeeded) {\n return changeSize();\n }\n}\n"
"public ConstraintsDisabler createConstraintsDisabler() {\n return new DefaultConstraintsDisabler(getDbSupports());\n}\n"
"public void call() {\n putItem(item, null);\n}\n"
"public boolean dumpHistory(PrintWriter pw, String prefix, int filterUid) {\n final int size = mEventIndices.size();\n if (size <= 0) {\n return false;\n }\n pw.println(\"String_Node_Str\");\n long now = SystemClock.elapsedRealtime();\n for (int i = EVENT_BUFFER_SIZE - 1; i >= 0; i--) {\n int uid = mEventUids[i];\n if (filterUid != -1 && filterUid != UserHandle.getAppId(filterUid)) {\n continue;\n }\n int cmd = mEventCmds[i];\n if (cmd == EVENT_NULL) {\n continue;\n }\n String label;\n switch(mEventCmds[i]) {\n case EVENT_START_JOB:\n label = \"String_Node_Str\";\n break;\n case EVENT_STOP_JOB:\n label = \"String_Node_Str\";\n break;\n default:\n label = \"String_Node_Str\";\n break;\n }\n pw.print(prefix);\n TimeUtils.formatDuration(mEventTimes[i] - now, pw, TimeUtils.HUNDRED_DAY_FIELD_LEN);\n pw.print(\"String_Node_Str\");\n pw.print(label);\n pw.print(\"String_Node_Str\");\n UserHandle.formatUid(pw, uid);\n pw.print(\"String_Node_Str\");\n pw.println(mEventTags[i]);\n }\n return true;\n}\n"
"public Text getTextElement() {\n Field textField = LinqUtils.first(getClass().getDeclaredFields(), f -> (f.getType() == Text.class) || (f.getType() == IText.class));\n if (textField == null)\n throw JDISettings.exception(\"String_Node_Str\", toString());\n return (Text) getValueField(textField, element);\n}\n"
"public BingRule fulfilledBingRule(Event event) {\n if (null == event) {\n return null;\n }\n if (!isReady) {\n return null;\n }\n if ((null != event.userId) && (event.userId.equals(mMyUserId))) {\n return null;\n }\n if (mRules != null) {\n for (BingRule bingRule : mRules) {\n if (bingRule.isEnabled) {\n Boolean isFullfilled = false;\n if (BingRule.RULE_ID_CONTAIN_USER_NAME.equals(bingRule.ruleId) || BingRule.RULE_ID_CONTAIN_DISPLAY_NAME.equals(bingRule.ruleId)) {\n if (event.EVENT_TYPE_MESSAGE.equals(event.type)) {\n Message message = JsonUtils.toMessage(event.content);\n MyUser myUser = mSession.getMyUser();\n String pattern = myUser.displayname;\n if (BingRule.RULE_ID_CONTAIN_USER_NAME.equals(bingRule.ruleId)) {\n pattern = mMyUserId.substring(1, mMyUserId.indexOf(\"String_Node_Str\"));\n }\n if (!TextUtils.isEmpty(pattern)) {\n isFullfilled = caseInsensitiveFind(pattern, message.body);\n }\n }\n }\n return mDefaultBingRule;\n }\n }\n return null;\n } else {\n return mDefaultBingRule;\n }\n}\n"
"public String getText(Mode mode) {\n if (staticText != null && !staticText.isEmpty()) {\n return staticText;\n }\n Target target = mode.getTargets().get(0);\n StringBuilder sb = new StringBuilder();\n sb.append(\"String_Node_Str\");\n if (target.getNumberOfTargets() == 0) {\n sb.append(\"String_Node_Str\");\n }\n if (target.getMaxNumberOfTargets() > 1 || target.getNumberOfTargets() == 0) {\n sb.append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(\"String_Node_Str\").append(target.getTargetName()).append(\"String_Node_Str\");\n } else {\n if (!target.getTargetName().startsWith(\"String_Node_Str\")) {\n sb.append(\"String_Node_Str\");\n }\n sb.append(target.getTargetName());\n }\n return sb.toString();\n}\n"
"protected Scan applyScannerSettings(Scan scanner, ByteArrayId primaryId, ByteArrayId secondaryId) {\n Scan scan = super.applyScannerSettings(scanner, primaryId, secondaryId);\n if (primaryId != null) {\n ByteBuffer buf = ByteBuffer.allocate(primaryId.getBytes().length + 1);\n buf.put(primaryId.getBytes());\n buf.put(new byte[] { 0 });\n scan.setStopRow(HBaseUtils.getNextPrefix(buf.array()));\n }\n return scan;\n}\n"
"public IdentifiedDataSerializable createNew(Integer arg) {\n return new RequestPartitionMapping();\n}\n"
"private void calculatePriceSellfromPST() {\n if (!reportlock) {\n reportlock = true;\n Double dPriceSellTax = readCurrency(m_jPriceSellTax.getText());\n if (dPriceSellTax == null) {\n setPriceSell(null);\n } else {\n double dTaxRate = taxeslogic.getTaxRate((TaxCategoryInfo) taxcatmodel.getSelectedItem());\n m_jPriceSell.setText(Formats.CURRENCY.formatValue(new Double(dPriceSellTax.doubleValue() / (1.0 + dTaxRate))));\n }\n reportlock = false;\n }\n}\n"
"public final int matchDataAuthority(Uri data) {\n if (mDataAuthorities == null || data == null) {\n return NO_MATCH_DATA;\n }\n final int numDataAuthorities = mDataAuthorities.size();\n for (int i = 0; i < numDataAuthorities; i++) {\n final AuthorityEntry ae = mDataAuthorities.get(i);\n int match = ae.match(data);\n if (match >= 0) {\n return match;\n }\n }\n return NO_MATCH_DATA;\n}\n"
"public void setSelected(int selected) {\n this.selectedImage = selected;\n this.isUndistorted = false;\n if (origMS == null) {\n BufferedImage image = images.get(selected);\n origMS = ConvertBufferedImage.convertFromMulti(image, null, ImageFloat32.class);\n correctedMS = ConvertBufferedImage.convertFromMulti(image, null, ImageFloat32.class);\n undistorted = new BufferedImage(image.getWidth(), image.getHeight(), image.getType());\n }\n}\n"
"public void writeStatement(MethodWriter writer) throws BytecodeException {\n org.objectweb.asm.Label startLabel = this.startLabel.target = new org.objectweb.asm.Label();\n org.objectweb.asm.Label updateLabel = this.updateLabel.target = new org.objectweb.asm.Label();\n org.objectweb.asm.Label endLabel = this.endLabel.target = new org.objectweb.asm.Label();\n Variable var = this.variable;\n Variable arrayVar = this.arrayVar;\n Variable indexVar = this.indexVar;\n Variable lengthVar = this.lengthVar;\n org.objectweb.asm.Label scopeLabel = new org.objectweb.asm.Label();\n writer.writeLabel(scopeLabel);\n var.value.writeExpression(writer);\n int locals = writer.localCount();\n writer.writeInsn(Opcodes.DUP);\n arrayVar.writeInit(writer, null);\n writer.writeInsn(Opcodes.ARRAYLENGTH);\n lengthVar.writeInit(writer, null);\n writer.writeLDC(0);\n indexVar.writeInit(writer, null);\n writer.writeJumpInsn(Opcodes.IFEQ, endLabel);\n writer.writeTargetLabel(startLabel);\n arrayVar.writeGet(writer, null);\n indexVar.writeGet(writer, null);\n writer.writeInsn(var.type.getArrayLoadOpcode());\n var.writeInit(writer, null);\n if (this.action != null) {\n this.action.writeStatement(writer);\n }\n writer.writeIINC(indexVar.index, 1);\n writer.writeLabel(updateLabel);\n indexVar.writeGet(writer, null);\n lengthVar.writeGet(writer, null);\n writer.writeJumpInsn(Opcodes.IF_ICMPLT, startLabel);\n writer.resetLocals(locals);\n writer.writeLabel(endLabel);\n var.writeLocal(writer, scopeLabel, endLabel);\n indexVar.writeLocal(writer, scopeLabel, endLabel);\n lengthVar.writeLocal(writer, scopeLabel, endLabel);\n arrayVar.writeLocal(writer, scopeLabel, endLabel);\n}\n"
"private void extactHandlersFromArgumentList(MethodAccess method, Object body, List<Object> argsList) {\n if (body instanceof List) {\n List<Object> list = (List<Object>) body;\n extractHandlersFromArgumentListBodyIsList(method, argsList, list);\n } else if (body instanceof Object[]) {\n extractHandlersFromArgumentListArrayCase(method, (Object[]) body, argsList);\n }\n}\n"
"public void adjustTargets(Ability ability, Game game) {\n if (ability.getOriginalId().equals(ability2Id)) {\n int cmc = 0;\n for (Cost cost : ability.getCosts()) {\n if (cost instanceof PayVariableLoyaltyCost) {\n cmc = ((PayVariableLoyaltyCost) cost).getAmount();\n }\n }\n FilterCard newFilter = filter.copy();\n newFilter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, cmc));\n ability.getTargets().clear();\n ability.addTarget(new TargetCardInYourGraveyard(newFilter));\n }\n}\n"
"private void checkVar(Var v, List<Reference> references) {\n blocksWithDeclarations.clear();\n boolean isDeclaredInScope = false;\n boolean isUnhoistedNamedFunction = false;\n boolean hasErrors = false;\n boolean isRead = false;\n Reference hoistedFn = null;\n Reference unusedAssignment = null;\n for (Reference reference : references) {\n if (reference.isHoistedFunction()) {\n blocksWithDeclarations.add(reference.getBasicBlock());\n isDeclaredInScope = true;\n hoistedFn = reference;\n break;\n } else if (NodeUtil.isFunctionDeclaration(reference.getNode().getParent())) {\n isUnhoistedNamedFunction = true;\n }\n }\n for (Reference reference : references) {\n if (reference == hoistedFn) {\n continue;\n }\n BasicBlock basicBlock = reference.getBasicBlock();\n boolean isDeclaration = reference.isDeclaration();\n Node referenceNode = reference.getNode();\n boolean isAssignment = isDeclaration || reference.isLvalue();\n boolean allowDupe = VarCheck.hasDuplicateDeclarationSuppression(referenceNode, v);\n boolean letConstShadowsVar = v.getParentNode().isVar() && (reference.isLetDeclaration() || reference.isConstDeclaration());\n boolean isVarNodeSameAsReferenceNode = v.getNode() == reference.getNode();\n boolean shadowCatchVar = isDeclaration && compiler.getLanguageMode().isEs6OrHigher() && v.getParentNode().isCatch() && !isVarNodeSameAsReferenceNode;\n boolean shadowParam = isDeclaration && v.isParam() && NodeUtil.isBlockScopedDeclaration(referenceNode) && v.getScope() == reference.getScope().getParent();\n boolean shadowDetected = false;\n if (isDeclaration && !allowDupe) {\n for (BasicBlock declaredBlock : blocksWithDeclarations) {\n if (declaredBlock.provablyExecutesBefore(basicBlock)) {\n shadowDetected = true;\n DiagnosticType diagnosticType;\n Node warningNode = referenceNode;\n if (v.isLet() || v.isConst() || v.isClass() || letConstShadowsVar || shadowCatchVar || shadowParam) {\n diagnosticType = REDECLARED_VARIABLE_ERROR;\n } else if (reference.getNode().getParent().isCatch() || allowDupe) {\n return;\n } else {\n diagnosticType = v.getScope().isGlobal() ? VarCheck.VAR_MULTIPLY_DECLARED_ERROR : REDECLARED_VARIABLE;\n if (isVarNodeSameAsReferenceNode && hoistedFn != null && v.name.equals(hoistedFn.getNode().getString())) {\n warningNode = hoistedFn.getNode();\n }\n }\n compiler.report(JSError.make(warningNode, diagnosticType, v.name, v.input != null ? v.input.getName() : \"String_Node_Str\"));\n hasErrors = true;\n break;\n }\n }\n }\n if (!shadowDetected && isDeclaration && (letConstShadowsVar || shadowCatchVar) && v.getScope() == reference.getScope()) {\n compiler.report(JSError.make(referenceNode, REDECLARED_VARIABLE_ERROR, v.name));\n }\n if (isAssignment) {\n Reference decl = references.get(0);\n Node declNode = decl.getNode();\n Node gp = declNode.getGrandparent();\n boolean lhsOfForInLoop = NodeUtil.isForIn(gp) && gp.getFirstFirstChild() == declNode;\n if (decl.getScope().isLocal() && (decl.isVarDeclaration() || decl.isLetDeclaration() || decl.isConstDeclaration()) && !decl.getNode().isFromExterns() && !lhsOfForInLoop) {\n unusedAssignment = reference;\n }\n if ((reference.getParent().isDec() || reference.getParent().isInc()) && NodeUtil.isExpressionResultUsed(reference.getNode())) {\n isRead = true;\n }\n } else {\n isRead = true;\n }\n if (isUnhoistedNamedFunction && !isDeclaration && isDeclaredInScope) {\n for (BasicBlock declaredBlock : blocksWithDeclarations) {\n if (!declaredBlock.provablyExecutesBefore(basicBlock)) {\n compiler.report(JSError.make(referenceNode, AMBIGUOUS_FUNCTION_DECL, v.name));\n hasErrors = true;\n break;\n }\n }\n }\n boolean isUndeclaredReference = false;\n if (!isDeclaration && !isDeclaredInScope) {\n if (!referenceNode.isFromExterns()) {\n Node grandparent = reference.getGrandparent();\n if ((v.isVar() && grandparent.isName() && grandparent.getString().equals(v.name))) {\n continue;\n }\n if (reference.getScope() == v.scope && !v.getName().equals(\"String_Node_Str\")) {\n isUndeclaredReference = true;\n compiler.report(JSError.make(reference.getNode(), (v.isLet() || v.isConst() || v.isClass() || v.isParam()) ? EARLY_REFERENCE_ERROR : EARLY_REFERENCE, v.name));\n hasErrors = true;\n }\n }\n }\n if (!isDeclaration && !isUndeclaredReference && v.isConst() && reference.isLvalue()) {\n compiler.report(JSError.make(referenceNode, REASSIGNED_CONSTANT, v.name));\n }\n if (isDeclaration && !reference.isVarDeclaration() && reference.getGrandparent().isAddedBlock()) {\n compiler.report(JSError.make(referenceNode, DECLARATION_NOT_DIRECTLY_IN_BLOCK, v.name));\n }\n if (isDeclaration) {\n blocksWithDeclarations.add(basicBlock);\n isDeclaredInScope = true;\n }\n }\n if (unusedAssignment != null && !isRead && !hasErrors) {\n boolean inGoogScope = false;\n Scope s = v.getScope();\n Node function = null;\n if (s.isFunctionBlockScope()) {\n function = s.getRootNode().getParent();\n } else if (s.isFunctionScope()) {\n function = s.getRootNode();\n }\n if (function != null) {\n Node callee = function.getParent().getChildBefore(function);\n inGoogScope = callee != null && callee.matchesQualifiedName(\"String_Node_Str\");\n }\n if (!inGoogScope) {\n compiler.report(JSError.make(unusedAssignment.getNode(), UNUSED_LOCAL_ASSIGNMENT, v.name));\n }\n }\n}\n"
"protected ResourceHandle createSingleResource(ResourceAllocator resourceAllocator) throws PoolingException {\n ResourceHandle resourceHandle;\n int count = 0;\n long startTime = 0;\n while (true) {\n try {\n count++;\n startTime = System.currentTimeMillis();\n resourceHandle = resourceAllocator.createResource();\n if (_logger.isLoggable(Level.FINE)) {\n _logger.log(Level.FINE, \"String_Node_Str\" + \"String_Node_Str\" + resourceHandle.getResourceSpec().getResourceId() + \"String_Node_Str\" + (System.currentTimeMillis() - startTime));\n }\n if (validation || validateAtmostEveryIdleSecs)\n resourceHandle.setLastValidated(System.currentTimeMillis());\n break;\n } catch (Exception ex) {\n if (_logger.isLoggable(Level.FINE)) {\n _logger.log(Level.FINE, \"String_Node_Str\" + count + \"String_Node_Str\" + \"String_Node_Str\", ex);\n }\n if (!connectionCreationRetry_ || count > connectionCreationRetryAttempts_)\n throw new PoolingException(ex);\n try {\n Thread.sleep(conCreationRetryInterval_);\n } catch (InterruptedException ie) {\n }\n }\n }\n return resourceHandle;\n}\n"
"public void generateReport(Date fromDate, Date toDate, String criteria, String groupBy, String type) {\n String sessionId = clientFactory.getLocalSession().getSession().getId();\n final String reportUrl = \"String_Node_Str\" + \"String_Node_Str\" + sessionId + \"String_Node_Str\" + type + \"String_Node_Str\" + \"String_Node_Str\" + fromDate.getTime() + \"String_Node_Str\" + toDate.getTime() + \"String_Node_Str\" + criteria + \"String_Node_Str\" + groupBy;\n clientFactory.getReportView().loadReport(reportUrl);\n this.sessionId = sessionId;\n this.fromDate = fromDate;\n this.toDate = toDate;\n this.criteria = criteria;\n this.groupBy = groupBy;\n this.type = type;\n}\n"
"private static Track createTrack(JSONObject trackJson) {\n Track track = new Track();\n track.setAlbum(createSimpleAlbum(trackJson.getJSONObject(\"String_Node_Str\")));\n track.setArtists(createSimpleArtists(trackJson.getJSONArray(\"String_Node_Str\")));\n track.setAvailableMarkets(createAvailableMarkets(trackJson.getJSONArray(\"String_Node_Str\")));\n track.setDiscNumber(trackJson.getInt(\"String_Node_Str\"));\n track.setDurationMs(trackJson.getInt(\"String_Node_Str\"));\n track.setExplicit(trackJson.getBoolean(\"String_Node_Str\"));\n track.setExternalIds(createExternalIds(trackJson.getJSONObject(\"String_Node_Str\")));\n track.setExternalUrls(createExternalUrls(trackJson.getJSONObject(\"String_Node_Str\")));\n track.setHref(trackJson.getString(\"String_Node_Str\"));\n track.setId(trackJson.getString(\"String_Node_Str\"));\n track.setName(trackJson.getString(\"String_Node_Str\"));\n track.setPopularity(trackJson.getInt(\"String_Node_Str\"));\n track.setPreviewUrl(trackJson.getString(\"String_Node_Str\"));\n track.setTrackNumber(trackJson.getInt((\"String_Node_Str\")));\n track.setType(createObjectType(trackJson.getString(\"String_Node_Str\")));\n track.setUri(trackJson.getString(\"String_Node_Str\"));\n return track;\n}\n"
"public ArrayList<TreeComposite> getChildExemplars() {\n ArrayList<TreeComposite> exemplars = new ArrayList<TreeComposite>();\n boolean childExists = false;\n for (EReference exemplar : ecoreNodeMetaData.getEAllReferences()) {\n if (\"String_Node_Str\".equals(exemplar.getEReferenceType().getName())) {\n continue;\n }\n int upperBound = exemplar.getUpperBound();\n if (upperBound == -1) {\n exemplars.add(new EMFTreeComposite(exemplar.getEReferenceType()));\n continue;\n } else if (upperBound <= 1) {\n for (TreeComposite currentChild : children) {\n if (currentChild.getName().equals(exemplar.getEReferenceType().getName())) {\n childExists = true;\n break;\n }\n }\n if (!childExists) {\n exemplars.add(new EMFTreeComposite(exemplar.getEReferenceType()));\n }\n }\n }\n return exemplars;\n}\n"
"private void approveProcessOutput(List<UtxoOutput> outputs, Transaction tx, Set<String> addressSet) {\n for (int i = 0; i < outputs.size(); i++) {\n UtxoOutput output = outputs.get(i);\n if (tx instanceof LockNulsTransaction && i == 0 && output.getLockTime() == 0) {\n output.setStatus(OutPutStatusEnum.UTXO_UNCONFIRMED_CONSENSUS_LOCK);\n } else if (output.getLockTime() > 0) {\n output.setStatus(OutPutStatusEnum.UTXO_UNCONFIRM_TIME_LOCK);\n } else {\n output.setStatus(OutPutStatusEnum.UTXO_UNCONFIRM_UNSPEND);\n }\n ledgerCacheService.putUtxo(output.getKey(), output);\n addressSet.add(output.getAddress());\n }\n}\n"
"public int[] nodeToFileId(int nodeId) {\n if (nodeId < 1 || nodeId > maxId)\n return null;\n int power = Math.max(1, 0x1 << (log2Ceil(maxId) - 1));\n if (nodeId == 1)\n return new int[] { 0, maxId - power };\n int[] ret = new int[2];\n int times = 0;\n while (nodeId < power) {\n times++;\n nodeId <<= 1;\n }\n ret[0] = nodeId - power;\n ret[1] = Math.min(maxId - power, ret[0] + (0x1 << times) - 1);\n return ret;\n}\n"
"private void initConfigEntries() {\n ConfigEntry cfg;\n config.addEntry(cfg = new ConfigEntry(ConfigContainer.TYPE_TEXTFIELD, subConfig, PARAM_NICK, JDL.L(\"String_Node_Str\", \"String_Node_Str\")));\n config.addEntry(cfg = new ConfigEntry(ConfigContainer.TYPE_TEXTAREA, subConfig, PARAM_PERFORM, JDL.L(\"String_Node_Str\", \"String_Node_Str\")));\n ConfigContainer lngse = new ConfigContainer(JDL.L(\"String_Node_Str\", \"String_Node_Str\"));\n config.addEntry(cfg = new ConfigEntry(ConfigContainer.TYPE_CONTAINER, lngse));\n lngse.addEntry(cfg = new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, subConfig, PARAM_DOAUTOTRANSLAT, JDL.L(\"String_Node_Str\", \"String_Node_Str\")));\n cfg.setDefaultValue(false);\n ConfigEntry conditionEntry = cfg;\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngmap.add(new JDLocale(\"String_Node_Str\"));\n lngse.addEntry(cfg = new ConfigEntry(ConfigContainer.TYPE_COMBOBOX, subConfig, PARAM_NATIVELANGUAGE, lngmap.toArray(new JDLocale[] {}), JDL.L(\"String_Node_Str\", \"String_Node_Str\")));\n cfg.setDefaultValue(JDL.DEFAULT_LOCALE);\n lngse.addEntry(conditionEntry = new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, subConfig, PARAM_DOAUTOTRANSLATSELF, JDL.L(\"String_Node_Str\", \"String_Node_Str\")));\n conditionEntry.setDefaultValue(false);\n lngse.addEntry(cfg = new ConfigEntry(ConfigContainer.TYPE_COMBOBOX, subConfig, PARAM_DESLANGUAGE, ar.toArray(new String[] {}), JDL.L(\"String_Node_Str\", \"String_Node_Str\")));\n cfg.setEnabledCondidtion(conditionEntry, \"String_Node_Str\", true);\n}\n"
"public ARXResult anonymize(final Data data, ARXConfiguration config) throws IOException {\n final long time = System.currentTimeMillis();\n if (data == null) {\n throw new NullPointerException(\"String_Node_Str\");\n }\n if (config.containsCriterion(LDiversity.class) || config.containsCriterion(TCloseness.class)) {\n if (data.getDefinition().getSensitiveAttributes().size() == 0) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n }\n for (String attr : data.getDefinition().getSensitiveAttributes()) {\n boolean found = false;\n for (LDiversity c : config.getCriteria(LDiversity.class)) {\n if (c.getAttribute().equals(attr)) {\n found = true;\n break;\n }\n }\n if (!found) {\n for (TCloseness c : config.getCriteria(TCloseness.class)) {\n if (c.getAttribute().equals(attr)) {\n found = true;\n break;\n }\n }\n }\n if (!found) {\n throw new IllegalArgumentException(\"String_Node_Str\" + attr + \"String_Node_Str\");\n }\n }\n for (LDiversity c : config.getCriteria(LDiversity.class)) {\n if (data.getDefinition().getAttributeType(c.getAttribute()) != AttributeType.SENSITIVE_ATTRIBUTE) {\n throw new RuntimeException(\"String_Node_Str\" + c.getAttribute() + \"String_Node_Str\");\n }\n }\n for (TCloseness c : config.getCriteria(TCloseness.class)) {\n if (data.getDefinition().getAttributeType(c.getAttribute()) != AttributeType.SENSITIVE_ATTRIBUTE) {\n throw new RuntimeException(\"String_Node_Str\" + c.getAttribute() + \"String_Node_Str\");\n }\n }\n final DataHandle handle = data.getHandle();\n if (!(handle instanceof DataHandleInput)) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n checkBeforeEncoding(config.getAllowedOutliers(), handle.getDefinition().getHierarchies());\n if (data.getDefinition().getSensitiveAttributes().size() > 1) {\n final AttributeType substition;\n if (config.isProtectSensitiveAssociations()) {\n substition = AttributeType.QUASI_IDENTIFYING_ATTRIBUTE;\n } else {\n substition = AttributeType.INSENSITIVE_ATTRIBUTE;\n }\n Result result = null;\n List<String> sensitive = new ArrayList<String>(data.getDefinition().getSensitiveAttributes());\n for (int i = 0; i < sensitive.size(); i++) {\n String attribute = sensitive.get(i);\n config = config.clone();\n DataDefinition definition = handle.getDefinition().clone();\n for (LDiversity c : config.getCriteria(LDiversity.class)) {\n if (!c.getAttribute().equals(attribute)) {\n config.removeCriterion(c);\n definition.setAttributeType(c.getAttribute(), substition);\n }\n }\n for (TCloseness c : config.getCriteria(TCloseness.class)) {\n if (!c.getAttribute().equals(attribute)) {\n config.removeCriterion(c);\n definition.setAttributeType(c.getAttribute(), substition);\n }\n }\n if (config.isProtectSensitiveAssociations()) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n Lattice lattice = null;\n AbstractAlgorithm algorithm = null;\n if (result != null) {\n if (config.isProtectSensitiveAssociations()) {\n throw new RuntimeException(\"String_Node_Str\");\n } else {\n resetLattice(result.lattice);\n lattice = result.lattice;\n }\n algorithm = result.algorithm;\n }\n result = anonymizeInternal(handle, definition, config, lattice, sensitive.size(), algorithm);\n }\n if (config.isProtectSensitiveAssociations()) {\n throw new RuntimeException(\"String_Node_Str\");\n } else {\n return result.asResult(config, handle, time);\n }\n } else {\n return anonymizeInternal(handle, handle.getDefinition(), config).asResult(config, handle, time);\n }\n}\n"
"public void setAdapterClass(JavaClass adapterCls) {\n adapterClass = adapterCls;\n valueType = helper.getJavaClass(Object.class);\n for (Iterator<JavaMethod> methodIt = adapterClass.getDeclaredMethods().iterator(); methodIt.hasNext(); ) {\n JavaMethod method = methodIt.next();\n if (method.getName().equals(\"String_Node_Str\")) {\n valueType = (JavaClass) method.getReturnType();\n break;\n }\n }\n}\n"
"public void init() {\n ConnectionSocketFactory plainsf = new PlainConnectionSocketFactory();\n SSLConnectionSocketFactory sslsf = initSSLConnectionSocketFactory();\n Registry<ConnectionSocketFactory> r = RegistryBuilder.<ConnectionSocketFactory>create().register(\"String_Node_Str\", plainsf).register(\"String_Node_Str\", sslsf).build();\n cm = new PoolingHttpClientConnectionManager(r);\n cm.setDefaultMaxPerRoute(configure.getMaxPerConnection());\n cm.setMaxTotal(configure.getMaxTotalConnection());\n Builder custom = RequestConfig.custom();\n if (configure.getConnectionTimeout() >= 0) {\n custom.setConnectTimeout(configure.getConnectionTimeout());\n }\n if (configure.getTimeout() >= 0) {\n custom.setConnectionRequestTimeout(configure.getTimeout());\n custom.setSocketTimeout(configure.getTimeout());\n }\n custom.setStaleConnectionCheckEnabled(configure.isStaleConnectionCheck());\n RequestConfig requestConfig = custom.build();\n HttpClientBuilder builder = HttpClientBuilder.create().setDefaultRequestConfig(requestConfig);\n builder.setConnectionManager(cm);\n ConnectionKeepAliveStrategy keepAliveStrategy = new ConnectionKeepAliveStrategy() {\n public long getKeepAliveDuration(HttpResponse response, HttpContext context) {\n HeaderElementIterator it = new BasicHeaderElementIterator(response.headerIterator(HTTP.CONN_KEEP_ALIVE));\n while (it.hasNext()) {\n HeaderElement he = it.nextElement();\n String param = he.getName();\n String value = he.getValue();\n if (value != null && \"String_Node_Str\".equalsIgnoreCase(param)) {\n try {\n return Long.parseLong(value) * 1000L;\n } catch (NumberFormatException ignore) {\n }\n }\n }\n return 30L * 1000L;\n }\n };\n builder.setKeepAliveStrategy(keepAliveStrategy);\n builder.setRetryHandler(new DefaultHttpRequestRetryHandler(configure.getRetryCount(), false));\n addProxyToBuilder(builder);\n client = builder.build();\n}\n"
"public void load(GuaguaWritableAdapter<LongWritable> currentKey, GuaguaWritableAdapter<Tuple> currentValue, WorkerContext<NNParams, NNParams> workerContext) {\n this.initFieldList();\n super.count += 1;\n if ((super.count) % 100000 == 0) {\n LOG.info(\"String_Node_Str\", super.count);\n }\n double baggingSampleRate = super.modelConfig.getBaggingSampleRate();\n if (!super.modelConfig.isFixInitialInput() && Double.compare(Math.random(), baggingSampleRate) >= 0) {\n return;\n }\n double[] inputs = new double[super.inputNodeCount];\n double[] ideal = new double[super.outputNodeCount];\n if (super.isDry) {\n addDataPairToDataSet(0, new BasicMLDataPair(new BasicMLData(inputs), new BasicMLData(ideal)));\n return;\n }\n long hashcode = 0;\n double significance = NNConstants.DEFAULT_SIGNIFICANCE_VALUE;\n int index = 0, inputsIndex = 0, outputIndex = 0;\n Tuple tuple = currentValue.getWritable();\n for (int i = 0; i < tuple.size(); i++) {\n Object element = null;\n try {\n element = tuple.get(i);\n } catch (ExecException e) {\n throw new GuaguaRuntimeException(e);\n }\n double doubleValue = 0d;\n if (element != null) {\n if (element instanceof Double) {\n doubleValue = (Double) element;\n } else {\n doubleValue = NumberFormatUtils.getDouble(element.toString().trim(), 0d);\n }\n }\n if (index == (super.inputNodeCount + super.outputNodeCount)) {\n if (element != null && element instanceof Double) {\n significance = (Double) element;\n } else {\n significance = NumberFormatUtils.getDouble(element.toString().trim(), NNConstants.DEFAULT_SIGNIFICANCE_VALUE);\n ;\n }\n break;\n } else {\n ColumnConfig columnConfig = super.columnConfigList.get(requiredFieldList.getFields().get(index).getIndex());\n if (columnConfig != null && columnConfig.isTarget()) {\n ideal[outputIndex++] = doubleValue;\n } else {\n inputs[inputsIndex++] = doubleValue;\n hashcode = hashcode * 31 + Double.valueOf(doubleValue).hashCode();\n }\n }\n index += 1;\n }\n long longBaggingSampleRate = Double.valueOf(baggingSampleRate * 100).longValue();\n if (super.modelConfig.isFixInitialInput() && hashcode % 100 >= longBaggingSampleRate) {\n return;\n }\n super.sampleCount += 1;\n MLDataPair pair = new BasicMLDataPair(new BasicMLData(inputs), new BasicMLData(ideal));\n pair.setSignificance(significance);\n addDataPairToDataSet(hashcode, pair);\n}\n"
"private static void addKerberos2Client(WebClient client, HCatalogConnection connection) throws Exception {\n HadoopClusterConnection hcConnection = HCRepositoryUtil.getRelativeHadoopClusterConnection(connection);\n if (hcConnection != null) {\n if (hcConnection.isEnableKerberos()) {\n KerberosAuthOutInterceptor kbInterceptor = new KerberosAuthOutInterceptor();\n AuthorizationPolicy policy = new AuthorizationPolicy();\n policy.setAuthorizationType(HttpAuthHeader.AUTH_TYPE_NEGOTIATE);\n kbInterceptor.setPolicy(policy);\n java.util.Map<String, String> properties = new HashMap<String, String>();\n String krbPrincipal = ConnectionContextHelper.getParamValueOffContext(connection, StringUtils.trimToEmpty(connection.getKrbPrincipal()));\n kbInterceptor.setServicePrincipalName(StringUtils.trimToEmpty(krbPrincipal));\n String krbRealm = ConnectionContextHelper.getParamValueOffContext(connection, StringUtils.trimToEmpty(connection.getKrbRealm()));\n kbInterceptor.setRealm(StringUtils.trimToEmpty(krbRealm));\n properties.put(\"String_Node_Str\", \"String_Node_Str\");\n properties.put(\"String_Node_Str\", ConnectionContextHelper.getParamValueOffContext(hcConnection, hcConnection.getKeytabPrincipal()));\n properties.put(\"String_Node_Str\", ConnectionContextHelper.getParamValueOffContext(hcConnection, hcConnection.getKeytab()));\n }\n kbInterceptor.setLoginConfig(new KerberosPolicyConfig(properties));\n WebClient.getConfig(client).getOutInterceptors().add(kbInterceptor);\n }\n}\n"
"private void console(MessageReceiver caller, String[] args) {\n if (args.length < 3) {\n Canary.help().getHelp(caller, \"String_Node_Str\");\n return;\n }\n int amount = 1;\n if (args[args.length - 2].matches(\"String_Node_Str\")) {\n amount = Integer.parseInt(args[args.length - 2]);\n }\n Item item = Canary.factory().getItemFactory().newItem(args[1]);\n if (item == null) {\n caller.notice(Translator.translateAndFormat(\"String_Node_Str\", args[1]));\n return;\n }\n item.setAmount(amount);\n Player target = Canary.getServer().matchPlayer(args[args.length - 1]);\n if (target == null) {\n caller.notice(Translator.translateAndFormat(\"String_Node_Str\", args[args.length - 1]));\n return;\n }\n target.giveItem(item);\n target.sendMessage(Colors.YELLOW + Translator.translateAndFormat(\"String_Node_Str\", item.getType().getDisplayName()));\n caller.notice(Translator.translateAndFormat(\"String_Node_Str\", target.getName()));\n}\n"
"private void createPreviewArea(Composite parent) {\n Composite cmpPreview = ChartUIUtil.createCompositeWrapper(parent);\n {\n GridData gridData = new GridData(GridData.FILL_BOTH);\n gridData.widthHint = CENTER_WIDTH_HINT;\n gridData.heightHint = 200;\n cmpPreview.setLayoutData(gridData);\n }\n Label label = new Label(cmpPreview, SWT.NONE);\n {\n label.setFont(JFaceResources.getBannerFont());\n label.setText(Messages.getString(\"String_Node_Str\"));\n }\n previewCanvas = new Canvas(cmpPreview, SWT.BORDER);\n {\n GridData gd = new GridData(GridData.FILL_BOTH);\n previewCanvas.setLayoutData(gd);\n previewCanvas.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));\n }\n}\n"
"public CtClass getType() throws NotFoundException {\n ConstPool cp = getConstPool();\n int pos = currentPos;\n int index = iterator.u16bitAt(pos + 1);\n String name = cp.getClassInfo(index);\n return thisClass.getClassPool().getCtClass(name);\n}\n"
"private void loadTooltip(final ExtendedTooltip tip) {\n Iterator<Contact> i = metaContact.getContacts();\n MetaContactPhoneUtil contactPhoneUtil = MetaContactPhoneUtil.getPhoneUtil(metaContact);\n String statusMessage = null;\n Contact protocolContact;\n boolean isLoading = false;\n while (i.hasNext()) {\n protocolContact = i.next();\n if (statusMessage == null) {\n statusMessage = protocolContact.getStatusMessage();\n if (ConfigurationUtils.isHideAccountStatusSelectorsEnabled())\n break;\n ImageIcon protocolStatusIcon = ImageLoader.getIndexedProtocolIcon(ImageUtils.getBytesInImage(protocolContact.getPresenceStatus().getStatusIcon()), protocolContact.getProtocolProvider());\n String contactAddress = protocolContact.getAddress();\n tip.addLine(protocolStatusIcon, contactAddress);\n addContactResourceTooltipLines(tip, protocolContact);\n if (!protocolContact.getProtocolProvider().isRegistered())\n continue;\n List<String> phones = contactPhoneUtil.getPhones(protocolContact, new OperationSetServerStoredContactInfo.DetailsResponseListener() {\n public void detailsRetrieved(final Iterator<GenericDetail> details) {\n if (!SwingUtilities.isEventDispatchThread()) {\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n detailsRetrieved(details);\n }\n });\n return;\n }\n tip.removeAllLines();\n loadTooltip(tip);\n }\n }, true);\n if (phones != null) {\n addPhoneTooltipLines(tip, phones.iterator());\n } else\n isLoading = true;\n }\n if (isLoading)\n tip.addLine(null, GuiActivator.getResources().getI18NString(\"String_Node_Str\"));\n if (statusMessage != null)\n tip.setBottomText(statusMessage);\n}\n"
"public void unloadAll() {\n for (Resource resource : resources) resource.unload();\n}\n"
"public WindowInsets dispatchApplyWindowInsets(WindowInsets insets) {\n if (mOutsetBottom != null) {\n final DisplayMetrics metrics = getContext().getResources().getDisplayMetrics();\n int bottom = (int) mOutsetBottom.getDimension(metrics);\n WindowInsets newInsets = insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight(), bottom);\n return super.dispatchApplyWindowInsets(newInsets);\n } else {\n return super.dispatchApplyWindowInsets(insets);\n }\n}\n"
"private void updateChildren() {\n mCurrentStackScrollState.setScrollY(mOwnScrollY);\n mStackScrollAlgorithm.getStackScrollState(mCurrentStackScrollState);\n if (!isCurrentlyAnimating() && !mChildHierarchyDirty) {\n applyCurrentState();\n if (mListener != null) {\n mListener.onChildLocationsChanged(this);\n }\n } else {\n startAnimationToState();\n }\n}\n"
"public AbstractRecord buildIntoNestedRow(AbstractRecord row, Object originalObject, Object object, AbstractSession session, XMLDescriptor refDesc, XMLField xmlField, boolean wasXMLRoot) {\n XMLRecord record = (XMLRecord) row;\n record.setSession(session);\n XMLMarshaller marshaller = record.getMarshaller();\n if ((marshaller != null) && (marshaller.getMarshalListener() != null)) {\n marshaller.getMarshalListener().beforeMarshal(object);\n }\n List extraNamespaces = null;\n if (isXmlDescriptor()) {\n XMLDescriptor xmlDescriptor = (XMLDescriptor) getDescriptor();\n extraNamespaces = addExtraNamespacesToNamespaceResolver(xmlDescriptor, record, session, false);\n writeExtraNamespaces(extraNamespaces, record);\n addXsiTypeAndClassIndicatorIfRequired(record, xmlDescriptor, refDesc, xmlField, originalObject, object, wasXMLRoot, false);\n }\n writeOutMappings(record, object, session);\n if (isXmlDescriptor()) {\n XMLDescriptor xmlDescriptor = (XMLDescriptor) getDescriptor();\n removeExtraNamespacesFromNamespaceResolver(record, extraNamespaces, session);\n }\n if (!getDescriptor().isAggregateDescriptor()) {\n addPrimaryKeyForNonDefaultTable(row);\n }\n if ((marshaller != null) && (marshaller.getMarshalListener() != null)) {\n marshaller.getMarshalListener().afterMarshal(object);\n }\n return row;\n}\n"
"protected void setup() {\n dbAccessor = new DatabaseAccessor();\n expectedException = org.eclipse.persistence.exceptions.DatabaseException.databaseAccessorConnectionIsNull(dbAccessor, null);\n}\n"
"public void testTagBatchingInfo() {\n ArrayList<Data> list1 = Utils.fakeCollection(5);\n ArrayList<Data> list2 = new ArrayList<>(list1);\n TagBatchingStrategy.TagBatch tagBatchInfo = new TagBatchingStrategy.TagBatch(AD_TAG, new SizeBatchingStrategy.SizeBatch<>(list1, 5));\n TagBatchingStrategy.TagBatch tagBatchInfo1 = new TagBatchingStrategy.TagBatch(AD_TAG, new SizeBatchingStrategy.SizeBatch<>(list2, 5));\n Assert.assertNotNull(tagBatchInfo.getTag());\n Assert.assertTrue(tagBatchInfo.equals(tagBatchInfo1));\n Assert.assertTrue(!tagBatchInfo.equals(\"String_Node_Str\"));\n}\n"
"public ShortPoint2D findBestConstructionPosition(AiStatistics aiStatistics, AbstractConstructionMarkableMap constructionMap, byte playerId) {\n List<ScoredConstructionPosition> scoredConstructionPositions = new ArrayList<>();\n for (ShortPoint2D point : aiStatistics.getLandForPlayer(playerId)) {\n if (constructionMap.canConstructAt(point.x, point.y, buildingType, playerId)) {\n int resourceAmount = 0;\n LandscapeGrid landscapeGrid = aiStatistics.getMainGrid().getLandscapeGrid();\n for (RelativePoint relativePoint : buildingType.getBlockedTiles()) {\n int x = point.x + relativePoint.getDx();\n int y = point.y + relativePoint.getDy();\n if (landscapeGrid.getResourceTypeAt(x, y) == resourceType) {\n resourceAmount += landscapeGrid.getResourceAmountAt(x, y);\n }\n }\n if (resourceAmount != 0) {\n scoredConstructionPositions.add(new ScoredConstructionPosition(point, resourceAmount));\n }\n }\n }\n return ScoredConstructionPosition.detectPositionWithLowestScore(scoredConstructionPositions);\n}\n"
"public Trace disableSampling() {\n return traceFactory.disableSampling();\n}\n"
"<T> BindingImpl<T> createBindingForInjectableType(Class<T> type, Scope scope, Object source, boolean isJit) {\n if (Modifier.isAbstract(type.getModifiers())) {\n return null;\n }\n if (Classes.isInnerClass(type)) {\n errorHandler.handle(SourceProviders.defaultSource(), ErrorMessages.CANNOT_INJECT_INNER_CLASS, type);\n return invalidBinding(Key.get(type));\n }\n if (scope == null) {\n scope = Scopes.getScopeForType(type, scopes, errorHandler);\n }\n Key<T> key = Key.get(type);\n LateBoundConstructor<T> lateBoundConstructor = new LateBoundConstructor<T>();\n InternalFactory<? extends T> scopedFactory = Scopes.scope(key, this, lateBoundConstructor, scope);\n BindingImpl<T> binding = new ClassBindingImpl<T>(this, key, source, scopedFactory, scope);\n jitBindings.put(key, binding);\n try {\n lateBoundConstructor.bind(this, type);\n return binding;\n } catch (RuntimeException e) {\n if (isJit) {\n jitBindings.remove(key);\n }\n throw e;\n } catch (Throwable t) {\n if (isJit) {\n jitBindings.remove(key);\n }\n throw new AssertionError(t);\n }\n}\n"
"private boolean teleportTo(double x, double y, double z, boolean ignoreChecks) {\n if (prevTeleportAttempt != null)\n return prevTeleportAttempt.booleanValue();\n else if (!(prevTeleportAttempt = Boolean.valueOf(canTeleport())))\n return false;\n double oldX = posX, oldY = posY, oldZ = posZ;\n posX = x;\n posY = y;\n posZ = z;\n boolean hasTeleported = false;\n int ix = MathHelper.floor_double(posX), iy = MathHelper.floor_double(posY), iz = MathHelper.floor_double(posZ);\n if (worldObj.blockExists(ix, iy, iz) || ignoreChecks) {\n boolean foundTopBlock = ignoreChecks;\n while (!foundTopBlock && iy > 0) {\n if (worldObj.getBlock(ix, iy - 1, iz).getMaterial().blocksMovement())\n foundTopBlock = true;\n else {\n --posY;\n --iy;\n }\n }\n if (foundTopBlock) {\n setPosition(posX, posY, posZ);\n if ((worldObj.getCollidingBoundingBoxes(this, boundingBox).isEmpty() && !worldObj.isAnyLiquid(boundingBox)) || ignoreChecks) {\n hasTeleported = true;\n }\n }\n }\n if (!hasTeleported) {\n setPosition(oldX, oldY, oldZ);\n return false;\n } else {\n if (!worldObj.isRemote)\n PacketPipeline.sendToAllAround(this, 256D, new C22EffectLine(FXType.Line.ENDERMAN_TELEPORT, oldX, oldY, oldZ, posX, posY, posZ));\n return true;\n }\n}\n"
"private void updateCubeSegmentInfoOnSucceed(JobInstance jobInstance, JobEngineConfig engineConfig) throws CubeIntegrityException, IOException {\n if (jobInstance.getStatus().equals(JobStatusEnum.FINISHED)) {\n validate(jobInstance);\n log.info(\"String_Node_Str\" + jobInstance.getRelatedSegment() + \"String_Node_Str\" + jobInstance.getRelatedCube());\n long cubeSize = 0;\n JobStep convertToHFileStep = jobInstance.findStep(JobConstants.STEP_NAME_CONVERT_CUBOID_TO_HFILE);\n if (null != convertToHFileStep) {\n String cubeSizeString = convertToHFileStep.getInfo(JobInstance.HDFS_BYTES_WRITTEN);\n if (cubeSizeString == null || cubeSizeString.equals(\"String_Node_Str\")) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n cubeSize = Long.parseLong(cubeSizeString) / 1024;\n } else {\n log.info(\"String_Node_Str\" + JobConstants.STEP_NAME_CONVERT_CUBOID_TO_HFILE + \"String_Node_Str\");\n }\n CubeManager cubeMgr = CubeManager.getInstance(engineConfig.getConfig());\n CubeInstance cubeInstance = cubeMgr.getCube(jobInstance.getRelatedCube());\n long sourceCount = 0;\n long sourceSize = 0;\n switch(jobInstance.getType()) {\n case BUILD:\n JobStep baseCuboidStep = jobInstance.findStep(JobConstants.STEP_NAME_BUILD_BASE_CUBOID);\n if (null != baseCuboidStep) {\n String sourceRecordsCount = baseCuboidStep.getInfo(JobInstance.SOURCE_RECORDS_COUNT);\n if (sourceRecordsCount == null || sourceRecordsCount.equals(\"String_Node_Str\")) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n sourceCount = Long.parseLong(sourceRecordsCount);\n } else {\n log.info(\"String_Node_Str\" + JobConstants.STEP_NAME_BUILD_BASE_CUBOID + \"String_Node_Str\");\n }\n JobStep createFlatTableStep = jobInstance.findStep(JobConstants.STEP_NAME_CREATE_FLAT_HIVE_TABLE);\n if (null != createFlatTableStep) {\n String sourceRecordsSize = createFlatTableStep.getInfo(JobInstance.SOURCE_RECORDS_SIZE);\n if (sourceRecordsSize == null || sourceRecordsSize.equals(\"String_Node_Str\")) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n sourceSize = Long.parseLong(sourceRecordsSize);\n } else {\n log.info(\"String_Node_Str\" + JobConstants.STEP_NAME_CREATE_FLAT_HIVE_TABLE + \"String_Node_Str\");\n }\n if (cubeInstance.needMergeImmediatelyAfterBuild(newSegment)) {\n for (CubeSegment seg : cubeInstance.getSegment(CubeSegmentStatusEnum.READY)) {\n sourceCount += seg.getSourceRecords();\n sourceSize += seg.getSourceRecordsSize();\n }\n }\n break;\n case MERGE:\n for (CubeSegment seg : cubeInstance.getMergingSegments()) {\n sourceCount += seg.getSourceRecords();\n sourceSize += seg.getSourceRecordsSize();\n }\n break;\n }\n cubeMgr.updateSegmentOnJobSucceed(cubeInstance, jobInstance.getType(), jobInstance.getRelatedSegment(), jobInstance.getUuid(), jobInstance.getExecEndTime(), cubeSize, sourceCount, sourceSize);\n log.info(\"String_Node_Str\" + jobInstance.getRelatedSegment() + \"String_Node_Str\" + jobInstance.getRelatedCube());\n }\n}\n"
"public int[] getTree(String attribute) {\n final int[][] data = dataAnalyzed.getArray();\n final int index = indexesSensitive.get(attribute);\n final int[][] hierarchy = hierarchiesSensitive.get(attribute).map;\n final int totalElementsP = subset == null ? data.length : subsetSize;\n final int height = hierarchy[0].length - 1;\n final int numLeafs = hierarchy.length;\n final ArrayList<Integer> treeList = new ArrayList<Integer>();\n treeList.add(totalElementsP);\n treeList.add(numLeafs);\n treeList.add(height);\n for (int i = 0; i < numLeafs; i++) {\n treeList.add(0);\n }\n final int offsetLeafs = 3;\n for (int i = 0; i < data.length; i++) {\n if (subset == null || subset.contains(i)) {\n int previousFreq = treeList.get(data[i][index] + offsetLeafs);\n previousFreq++;\n treeList.set(data[i][index] + offsetLeafs, previousFreq);\n }\n }\n for (int i = 0; i < numLeafs; i++) {\n treeList.add(-1);\n }\n class TNode {\n IntOpenHashSet children = new IntOpenHashSet();\n int level = 0;\n int offset = 0;\n }\n final int offsetsExtras = offsetLeafs + numLeafs;\n final IntObjectOpenHashMap<TNode> nodes = new IntObjectOpenHashMap<TNode>();\n final ArrayList<ArrayList<TNode>> levels = new ArrayList<ArrayList<TNode>>();\n for (int i = 0; i < hierarchy[0].length; i++) {\n levels.add(new ArrayList<TNode>());\n }\n for (int i = 0; i < hierarchy[0].length; i++) {\n for (int j = 0; j < hierarchy.length; j++) {\n final int nodeID = hierarchy[j][i] + i * hierarchy.length;\n TNode curNode = null;\n if (!nodes.containsKey(nodeID)) {\n curNode = new TNode();\n curNode.level = i;\n nodes.put(nodeID, curNode);\n final ArrayList<TNode> level = levels.get(curNode.level);\n level.add(curNode);\n } else {\n curNode = nodes.get(nodeID);\n }\n if (i > 0) {\n curNode.children.add(hierarchy[j][i - 1]);\n }\n }\n }\n for (final ArrayList<TNode> level : levels) {\n for (final TNode node : level) {\n if (node.level > 0) {\n node.offset = treeList.size();\n treeList.add(node.children.size());\n treeList.add(node.level);\n final int[] keys = node.children.keys;\n final boolean[] allocated = node.children.allocated;\n for (int i = 0; i < allocated.length; i++) {\n if (allocated[i]) {\n treeList.add(node.level == 1 ? keys[i] + offsetsExtras : nodes.get(keys[i]).offset);\n }\n }\n treeList.add(0);\n treeList.add(0);\n }\n }\n }\n final int[] treeArray = new int[treeList.size()];\n int count = 0;\n for (final int val : treeList) {\n treeArray[count++] = val;\n }\n return treeArray;\n}\n"
"private long getVersion() {\n if (!transaction.hasTable(\"String_Node_Str\")) {\n return UNVERSIONED;\n }\n return metadataTable.getLong(0, 0);\n}\n"
"public Number remove(Keyword recordName) {\n Record head = get(recordName).map(select(Keywords.keyword(\"String_Node_Str\", String.class))).head();\n Number result = Numbers.valueOf(head.get(Keywords.keyword(\"String_Node_Str\", String.class)));\n List<Keyword<?>> undefine = undefine(recordName);\n define(recordName, undefine.toArray(new Keyword[0]));\n return result;\n}\n"
"static JsonNode checkDouble(JsonNode parent, String key) throws CloudFormationException {\n JsonNode jsonNode = parent.get(key);\n if (jsonNode != null && !jsonNode.isTextual()) {\n throw error(errorMsg(key, \"String_Node_Str\"));\n }\n try {\n if (jsonNode != null) {\n Double.parseDouble(jsonNode.textValue());\n }\n } catch (NumberFormatException ex) {\n throw error(errorMsg(key, \"String_Node_Str\" + jsonNode.textValue() + \"String_Node_Str\"));\n }\n return jsonNode;\n}\n"
"public void renderReport(OutputStream out, HttpServletRequest request, IReportDocument reportDocument, String format, long pageNumber, String pageRange, boolean masterPage, boolean svgFlag, List activeIds, Locale locale, boolean rtl, String iServletPath) throws RemoteException {\n if (reportDocument == null) {\n AxisFault fault = new AxisFault(BirtResources.getMessage(ResourceConstants.ACTION_EXCEPTION_NO_REPORT_DOCUMENT));\n fault.setFaultCode(new QName(\"String_Node_Str\"));\n throw fault;\n }\n if (out == null)\n return;\n String servletPath = iServletPath;\n if (servletPath == null)\n servletPath = request.getServletPath();\n IRenderTask renderTask = engine.createRenderTask(reportDocument);\n BirtUtility.addTask(request, renderTask);\n Map context = BirtUtility.getAppContext(request, ReportEngineService.class.getClassLoader());\n renderTask.setAppContext(context);\n RenderOption renderOption = null;\n if (format == null)\n format = ParameterAccessor.getFormat(request);\n if (IBirtConstants.PDF_RENDER_FORMAT.equalsIgnoreCase(format) || IBirtConstants.POSTSCRIPT_RENDER_FORMAT.equalsIgnoreCase(format)) {\n renderOption = createPDFRenderOption(servletPath, request, ParameterAccessor.isDesigner(request));\n } else {\n renderOption = createHTMLRenderOption(svgFlag, servletPath, request);\n }\n renderOption.setOutputStream(out);\n renderOption.setOutputFormat(format);\n ViewerHTMLActionHandler handler = null;\n if (IBirtConstants.PDF_RENDER_FORMAT.equalsIgnoreCase(format) || IBirtConstants.POSTSCRIPT_RENDER_FORMAT.equalsIgnoreCase(format)) {\n handler = new ViewerHTMLActionHandler(reportDocument, pageNumber, locale, false, rtl, masterPage, format);\n } else {\n boolean isEmbeddable = false;\n if (IBirtConstants.SERVLET_PATH_FRAMESET.equalsIgnoreCase(servletPath) || IBirtConstants.SERVLET_PATH_RUN.equalsIgnoreCase(servletPath))\n isEmbeddable = true;\n if (renderOption instanceof IHTMLRenderOption)\n ((IHTMLRenderOption) renderOption).setEmbeddable(isEmbeddable);\n if (IBirtConstants.DOC_RENDER_FORMAT.equalsIgnoreCase(format)) {\n ((IHTMLRenderOption) renderOption).setOption(IHTMLRenderOption.HTML_PAGINATION, Boolean.TRUE);\n }\n renderOption.setOption(IHTMLRenderOption.HTML_RTL_FLAG, new Boolean(rtl));\n renderOption.setOption(IHTMLRenderOption.INSTANCE_ID_LIST, activeIds);\n renderOption.setOption(IHTMLRenderOption.MASTER_PAGE_CONTENT, new Boolean(masterPage));\n handler = new ViewerHTMLActionHandler(reportDocument, pageNumber, locale, isEmbeddable, rtl, masterPage, format);\n }\n String resourceFolder = ParameterAccessor.getParameter(request, ParameterAccessor.PARAM_RESOURCE_FOLDER);\n handler.setResourceFolder(resourceFolder);\n renderOption.setActionHandler(handler);\n initializeEmitterConfigs(request, renderOption.getOptions());\n String reportTitle = ParameterAccessor.htmlDecode(ParameterAccessor.getTitle(request));\n if (reportTitle != null)\n renderOption.setOption(IHTMLRenderOption.HTML_TITLE, reportTitle);\n renderTask.setRenderOption(renderOption);\n renderTask.setLocale(locale);\n try {\n if (pageNumber > 0)\n renderTask.setPageNumber(pageNumber);\n if (pageRange != null) {\n if (!IBirtConstants.SERVLET_PATH_FRAMESET.equalsIgnoreCase(servletPath) || !ParameterAccessor.PARAM_FORMAT_HTML.equalsIgnoreCase(format))\n renderTask.setPageRange(pageRange);\n }\n renderTask.render();\n } catch (Exception e) {\n AxisFault fault = new AxisFault(e.getLocalizedMessage(), e.getCause());\n fault.setFaultCode(new QName(\"String_Node_Str\"));\n throw fault;\n } finally {\n BirtUtility.removeTask(request);\n renderTask.close();\n }\n}\n"
"public boolean containsPoint(Point p) {\n boolean retVal = false;\n Iterator<LineSegment> lineSegIter = this.lineSegIterator();\n while (lineSegIter.hasNext() && !retVal) {\n LineSegment seg = lineSegIter.next();\n retVal = seg.intersectsWithCircle(p, MOUSE_HOT_SPHERE_RADIUS);\n if (logger.isTraceEnabled() && retVal) {\n logger.trace(\"String_Node_Str\" + p + \"String_Node_Str\" + seg);\n }\n }\n return retVal;\n}\n"
"public int branchForInstance(Instance inst) {\n int instAttIndex = this.attIndex;\n if (inst.isMissing(instAttIndex)) {\n return -1;\n }\n double v = inst.valueInputAttribute(instAttIndex);\n if (v == this.attValue) {\n return this.equalsPassesTest ? 0 : 1;\n }\n return v < this.attValue ? 0 : 1;\n}\n"
"private BundleDescription createBundleDescription(ArtifactDescriptor artifact, State state) throws BundleException {\n Dictionary<String, String> manifest = BundleBridge.convertToDictionary(artifact);\n try {\n URI uri = artifact.getUri();\n String installLocation = \"String_Node_Str\".equals(uri.getScheme()) ? new File(uri).getAbsolutePath() : uri.toString();\n return this.stateObjectFactory.createBundleDescription(state, manifest, USER_REGION_TAG + installLocation, this.bundleId.getAndIncrement());\n } catch (RuntimeException e) {\n throw new BundleException(\"String_Node_Str\" + artifact.getUri() + \"String_Node_Str\", e);\n } catch (BundleException be) {\n throw new BundleException(\"String_Node_Str\" + artifact.getUri() + \"String_Node_Str\", be);\n }\n}\n"
"public static boolean isSignedInWPComOrHasWPOrgSite(AccountStore accountStore, SiteStore siteStore) {\n return accountStore.hasAccessToken() || siteStore.hasSelfHostedSite();\n}\n"
"protected void composeImmunizationEvaluationInner(ImmunizationEvaluation element) throws IOException {\n composeDomainResourceElements(element);\n if (element.hasIdentifier()) {\n openArray(\"String_Node_Str\");\n for (Identifier e : element.getIdentifier()) composeIdentifier(null, e);\n closeArray();\n }\n ;\n if (element.hasStatusElement()) {\n composeEnumerationCore(\"String_Node_Str\", element.getStatusElement(), new ImmunizationEvaluation.ImmunizationEvaluationStatusEnumFactory(), false);\n composeEnumerationExtras(\"String_Node_Str\", element.getStatusElement(), new ImmunizationEvaluation.ImmunizationEvaluationStatusEnumFactory(), false);\n }\n if (element.hasPatient()) {\n composeReference(\"String_Node_Str\", element.getPatient());\n }\n if (element.hasDateElement()) {\n composeDateTimeCore(\"String_Node_Str\", element.getDateElement(), false);\n composeDateTimeExtras(\"String_Node_Str\", element.getDateElement(), false);\n }\n if (element.hasAuthority()) {\n composeReference(\"String_Node_Str\", element.getAuthority());\n }\n if (element.hasTargetDisease()) {\n openArray(\"String_Node_Str\");\n for (CodeableConcept e : element.getTargetDisease()) composeCodeableConcept(null, e);\n closeArray();\n }\n ;\n if (element.hasImmunizationEvent()) {\n composeReference(\"String_Node_Str\", element.getImmunizationEvent());\n }\n if (element.hasDoseStatus()) {\n composeCodeableConcept(\"String_Node_Str\", element.getDoseStatus());\n }\n if (element.hasDoseStatusReason()) {\n openArray(\"String_Node_Str\");\n for (CodeableConcept e : element.getDoseStatusReason()) composeCodeableConcept(null, e);\n closeArray();\n }\n ;\n if (element.hasDescriptionElement()) {\n composeStringCore(\"String_Node_Str\", element.getDescriptionElement(), false);\n composeStringExtras(\"String_Node_Str\", element.getDescriptionElement(), false);\n }\n if (element.hasSeriesElement()) {\n composeStringCore(\"String_Node_Str\", element.getSeriesElement(), false);\n composeStringExtras(\"String_Node_Str\", element.getSeriesElement(), false);\n }\n if (element.hasDoseNumber()) {\n composeType(\"String_Node_Str\", element.getDoseNumber());\n }\n if (element.hasSeriesDosesElement()) {\n composePositiveIntCore(\"String_Node_Str\", element.getSeriesDosesElement(), false);\n composePositiveIntExtras(\"String_Node_Str\", element.getSeriesDosesElement(), false);\n }\n}\n"
"private void filteValues() {\n valueList.removeAll();\n valueList.deselectAll();\n for (Iterator itor = resultList.iterator(); itor.hasNext(); ) {\n String value = (String) itor.next();\n try {\n if (selectedList.indexOf(value) == -1 && value.startsWith(valueEditor.getText()) || value.matches(valueEditor.getText())) {\n valueList.add(value);\n }\n } catch (PatternSyntaxException e) {\n }\n }\n updateButtons();\n}\n"
"public void visitMROp(MapReduceOper mr) throws VisitorException {\n splan.UDFs.addAll(mr.UDFs);\n updateUDFs(mr.mapPlan);\n new PhyPlanSetter(mr.mapPlan).visit();\n new PhyPlanSetter(mr.reducePlan).visit();\n StormOper mo = getSOp(StormOper.OpType.MAP, getAlias(mr.mapPlan, false));\n mo.mapKeyType = mr.mapKeyType;\n splan.add(mo);\n String mapAlias = mo.name();\n log.info(\"String_Node_Str\" + mapAlias + \"String_Node_Str\");\n if (pc.getProperties().getProperty(mapAlias + \"String_Node_Str\", \"String_Node_Str\").equalsIgnoreCase(\"String_Node_Str\")) {\n mo.shuffleBefore(true);\n }\n if (pc.getProperties().getProperty(mapAlias + \"String_Node_Str\", null) != null) {\n mo.setParallelismHint(Integer.parseInt(pc.getProperties().getProperty(mapAlias + \"String_Node_Str\")));\n }\n for (PhysicalOperator po : mr.mapPlan.getRoots()) {\n POLoad pl = (POLoad) po;\n if (pl instanceof NOPLoad) {\n continue;\n }\n String fn = pl.getLFile().getFileName();\n if (!rootMap.containsKey(fn) && pl.getLoadFunc() instanceof SpoutWrapper) {\n StormOper spout = getSOp(StormOper.OpType.SPOUT, po.getAlias());\n SpoutWrapper sw = ((SpoutWrapper) pl.getLoadFunc());\n spout.setParallelismHint(sw.getParallelismHint());\n spout.setSpout(sw.getSpout());\n spout.setTupleConverter(sw.getTupleConverter());\n splan.add(spout);\n splan.addPLSpoutLink(spout, pl);\n rootMap.put(fn, spout);\n }\n if (rootMap.containsKey(fn)) {\n try {\n splan.connect(rootMap.get(fn), mo);\n } catch (PlanException e) {\n e.printStackTrace();\n }\n } else {\n List<StormOper> wait = missingRoots.get(po);\n if (wait == null) {\n wait = new ArrayList<StormOper>();\n missingRoots.put(fn, wait);\n }\n wait.add(mo);\n }\n }\n mo.setPlan(mr.mapPlan);\n if (mr.combinePlan.size() > 0) {\n mo.isCombined = true;\n }\n if (mr.reducePlan.size() == 0) {\n setupStore(mr.mapPlan.getLeaves(), mo);\n return;\n }\n StormOper po;\n String red_alias;\n if (mr.reducePlan.getRoots().get(0) instanceof POPackage) {\n red_alias = getAlias(mr.mapPlan, false);\n } else {\n red_alias = (mr.combinePlan.size() > 0) ? getAlias(mr.combinePlan, false) : getAlias(mr.reducePlan, true);\n }\n String window_opts = StormOper.getWindowOpts(pc, red_alias);\n if (mr.combinePlan.size() == 0 || window_opts != null) {\n po = getSOp(StormOper.OpType.BASIC_PERSIST, red_alias);\n po.setWindowOptions(window_opts);\n } else {\n po = getSOp(StormOper.OpType.COMBINE_PERSIST, getAlias(mr.combinePlan, false));\n po.setPlan(mr.combinePlan);\n po.mapKeyType = mr.mapKeyType;\n }\n if (mr.getRequestedParallelism() > 0) {\n po.setParallelismHint(mr.getRequestedParallelism());\n }\n splan.add(po);\n if (!po.getStateFactory(pc).getClass().getName().startsWith(\"String_Node_Str\")) {\n StateFactory sf = po.getStateFactory(pc);\n splan.UDFs.add(sf.getClass().getName());\n if (IUDFExposer.class.isInstance(sf)) {\n IUDFExposer ex = (IUDFExposer) sf;\n splan.UDFs.addAll(ex.getUDFs());\n }\n }\n try {\n splan.connect(mo, po);\n } catch (PlanException e) {\n e.printStackTrace();\n }\n StormOper rdo = getSOp(StormOper.OpType.REDUCE_DELTA, getAlias(mr.reducePlan, false));\n splan.add(rdo);\n try {\n splan.connect(po, rdo);\n } catch (PlanException e) {\n e.printStackTrace();\n }\n rdo.setPlan(mr.reducePlan);\n rdo.setWindowOptions(window_opts);\n setupStore(mr.reducePlan.getLeaves(), rdo);\n}\n"
"public void create(NamespaceMeta namespaceMeta) throws IOException, ExploreException, SQLException {\n super.create(namespaceMeta);\n if (NamespaceId.DEFAULT.equals(namespaceMeta.getNamespaceId())) {\n return;\n }\n String hbaseNamespace = tableUtil.getHBaseNamespace(namespaceMeta);\n if (Strings.isNullOrEmpty(namespaceMeta.getConfig().getHbaseNamespace())) {\n try (HBaseDDLExecutor executor = hBaseDDLExecutorFactory.get()) {\n boolean created = executor.createNamespaceIfNotExists(hbaseNamespace);\n if (namespaceMeta.getConfig().getGroupName() != null) {\n try {\n executor.grantPermissions(hbaseNamespace, null, ImmutableMap.of(\"String_Node_Str\" + namespaceMeta.getConfig().getGroupName(), \"String_Node_Str\"));\n } catch (IOException | RuntimeException e) {\n if (created) {\n try {\n executor.deleteNamespaceIfExists(hbaseNamespace);\n } catch (Throwable t) {\n e.addSuppressed(t);\n }\n }\n throw e;\n }\n }\n } catch (Throwable t) {\n try {\n super.delete(namespaceMeta.getNamespaceId());\n } catch (Exception e) {\n t.addSuppressed(e);\n }\n throw t;\n }\n }\n try (HBaseAdmin admin = new HBaseAdmin(hConf)) {\n if (!tableUtil.hasNamespace(admin, hbaseNamespace)) {\n throw new IOException(String.format(\"String_Node_Str\" + \"String_Node_Str\", hbaseNamespace, namespaceMeta.getName()));\n }\n }\n}\n"
"public void saveGameStatus() {\n List<String> status = statusWindow.getGameStatus().getTextContents();\n JFileChooser jfc = new JFileChooser();\n String filename = saveDirectory + \"String_Node_Str\" + savePrefix + \"String_Node_Str\" + saveDateTimeFormat.format(new Date()) + \"String_Node_Str\";\n File proposedFile = new File(filename);\n jfc.setSelectedFile(proposedFile);\n if (jfc.showSaveDialog(statusWindow) == JFileChooser.APPROVE_OPTION) {\n File selectedFile = jfc.getSelectedFile();\n try {\n PrintWriter pw = new PrintWriter(selectedFile);\n for (String line : status) pw.println(line);\n pw.close();\n } catch (IOException e) {\n log.error(\"String_Node_Str\", e);\n getDisplayBuffer().add(LocalText.getText(\"String_Node_Str\", e.getMessage()));\n }\n }\n}\n"
"private int getIndex(int k, int p) {\n if ((k & 1L) != 0) {\n return (k >>> 6 & ((1 << p) - 1));\n } else {\n return (k >>> 1 & ((1 << (p + 1)) - 1));\n }\n}\n"
"protected MaxSizeChecker createNearCacheMaxSizeChecker(EvictionConfig evictionConfig, NearCacheConfig nearCacheConfig, NearCacheContext nearCacheContext) {\n EvictionConfig.MaxSizePolicy maxSizePolicy = evictionConfig.getMaximumSizePolicy();\n if (maxSizePolicy == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (maxSizePolicy == EvictionConfig.MaxSizePolicy.ENTRY_COUNT) {\n return new EntryCountNearCacheMaxSizeChecker(evictionConfig.getSize(), records);\n }\n throw new IllegalArgumentException(\"String_Node_Str\" + \"String_Node_Str\" + maxSizePolicy + \"String_Node_Str\" + getClass().getName() + \"String_Node_Str\" + EvictionConfig.MaxSizePolicy.ENTRY_COUNT + \"String_Node_Str\");\n}\n"
"public void onSuccess(List<ErrorTimeSlotData> dataRanges) {\n String serviceOpName = selectionContext.getSelection(ObjectType.ServiceName);\n if (selectionContext.getSelection(ObjectType.OperationName) != null) {\n serviceOpName += \"String_Node_Str\" + selectionContext.getSelection(ObjectType.OperationName);\n }\n String graphTitle = ConsoleUtil.messages.graphTitle(\"String_Node_Str\", serviceOpName, durationHrs);\n ErrorPresenter.this.view.activate();\n ErrorPresenter.this.view.setServiceSystemErrorTrendData(dataRanges, minAggregationPeriod, durationHrs, graphTitle);\n}\n"
"protected void doStop() {\n executor.submit(new Runnable() {\n public void run() {\n LOG.debug(\"String_Node_Str\");\n notifyStopped();\n }\n });\n executor.shutdown();\n}\n"
"public void playerMove(PlayerMoveEvent event) {\n Player player = event.getPlayer();\n AutoRefMatch match = plugin.getMatch(player.getWorld());\n if (match == null)\n return;\n AutoRefPlayer apl = match.getPlayer(player);\n if (apl == null)\n return;\n AutoRefTeam team = apl.getTeam();\n if (team == null)\n return;\n double d = team.distanceToClosestRegion(event.getTo());\n double fallspeed = event.getFrom().getY() - event.getTo().getY();\n if (player.getGameMode() != GameMode.SURVIVAL || match.inStartRegion(event.getTo()))\n return;\n if (apl != null && match.inStartRegion(event.getFrom()) && !match.inStartRegion(event.getTo())) {\n if (match.getCurrentState() != eMatchStatus.PLAYING) {\n player.teleport(team.getSpawnLocation());\n player.setVelocity(new org.bukkit.util.Vector());\n player.setFallDistance(0.0f);\n } else\n player.getInventory().clear();\n } else if (d > 0.3) {\n if (player.isSneaking() && d < SNEAK_DISTANCE && fallspeed < FREEFALL_THRESHOLD)\n ;\n else if (fallspeed == 0.0 && d > 0.5 && !player.isDead()) {\n player.setLastDamageCause(AutoRefPlayer.VOID_DEATH);\n player.setHealth(0);\n }\n apl.setExitLocation(null);\n }\n}\n"
"private void updateCatInfo(Category cat) {\n if (_log.isDebugEnabled())\n _log.debug(\"String_Node_Str\" + cat.getName() + \"String_Node_Str\" + cat.getKey() + \"String_Node_Str\" + cat.getNumArticles());\n Date lut = cat.getLastUpdateTime();\n if (lut != null)\n lut = new Timestamp(lut.getTime());\n UPDATE_CAT_NEWS_INFO.execute(new Object[] { cat.getNumArticles(), lut, cat.getNumItemsSinceLastDownload(), cat.getKey() });\n User u = cat.getUser();\n Issue i = cat.getIssue();\n _cache.remove(cat.getKey(), Category.class);\n _cache.remove(i.getKey(), Issue.class);\n _cache.remove(u.getUid() + \"String_Node_Str\" + i.getName(), Issue.class);\n _cache.remove(u.getKey(), User.class);\n}\n"
"public PaymentVoucher loadSelectedLines(PaymentVoucher paymentVoucher, PaymentVoucher paymentVoucherContext) throws AxelorException {\n LOG.debug(\"String_Node_Str\");\n List<PaymentInvoice> newPiList = Lists.newArrayList();\n if (paymentVoucherContext.getPaymentInvoiceList() != null) {\n List<PaymentInvoiceToPay> piToPayLine = new ArrayList<PaymentInvoiceToPay>();\n BigDecimal paidAmount = BigDecimal.ZERO;\n if (paymentVoucherContext.getPaidAmount() == null) {\n throw new AxelorException(String.format(\"String_Node_Str\", GeneralServiceAccount.getExceptionAccountingMsg()), IException.MISSING_FIELD);\n } else {\n paidAmount = paymentVoucherContext.getPaidAmount();\n BigDecimal amountToPay = BigDecimal.ZERO;\n int lineSeq = 1;\n List<PaymentInvoice> paymentInvoiceSelectedList = new ArrayList<PaymentInvoice>();\n for (PaymentInvoice pilContext : paymentVoucherContext.getPaymentInvoiceList()) {\n PaymentInvoice paymentInvoiceFromContext = paymentInvoiceRepo.find(pilContext.getId());\n LOG.debug(\"String_Node_Str\", paymentInvoiceFromContext);\n LOG.debug(\"String_Node_Str\", pilContext.isSelected());\n if (pilContext.isSelected()) {\n paymentInvoiceSelectedList.add(paymentInvoiceFromContext);\n } else {\n PaymentInvoice paymentInvoice = new PaymentInvoice();\n if (paymentInvoiceFromContext.getMoveLine() != null) {\n paymentInvoice.setMoveLine(paymentInvoiceFromContext.getMoveLine());\n }\n paymentInvoice.setInvoiceAmount(paymentInvoiceFromContext.getInvoiceAmount());\n paymentInvoice.setPaidAmount(paymentInvoiceFromContext.getPaidAmount());\n paymentInvoice.setPaymentVoucher(paymentInvoiceFromContext.getPaymentVoucher());\n newPiList.add(paymentInvoice);\n }\n }\n paymentVoucher.getPaymentInvoiceList().clear();\n paymentVoucher.getPaymentInvoiceToPayList().clear();\n if (paymentInvoiceSelectedList != null && !paymentInvoiceSelectedList.isEmpty()) {\n if (paymentVoucherContext.getPaymentInvoiceToPayList() != null) {\n for (PaymentInvoiceToPay pToPay : paymentVoucherContext.getPaymentInvoiceToPayList()) {\n PaymentInvoiceToPay piToPayFromContext = paymentInvoiceToPayService.find(pToPay.getId());\n PaymentInvoiceToPay piToPayOld = new PaymentInvoiceToPay();\n piToPayOld.setSequence(piToPayFromContext.getSequence());\n piToPayOld.setMoveLine(piToPayFromContext.getMoveLine());\n if (piToPayFromContext.getMoveLine() != null && piToPayFromContext.getMoveLine().getId() != null) {\n piToPayOld.setMoveLine(piToPayFromContext.getMoveLine());\n }\n piToPayOld.setTotalAmount(piToPayFromContext.getTotalAmount());\n piToPayOld.setRemainingAmount(piToPayFromContext.getRemainingAmount());\n piToPayOld.setAmountToPay(piToPayFromContext.getAmountToPay());\n piToPayOld.setPaymentVoucher(piToPayFromContext.getPaymentVoucher());\n piToPayLine.add(piToPayOld);\n if (paidAmount.compareTo(BigDecimal.ZERO) > 0) {\n paidAmount = paidAmount.subtract(piToPayFromContext.getAmountToPay());\n }\n lineSeq += 1;\n }\n }\n LOG.debug(\"String_Node_Str\", piToPayLine);\n LOG.debug(\"String_Node_Str\", paymentInvoiceSelectedList.size());\n for (PaymentInvoice paymentInvoice : paymentInvoiceSelectedList) {\n PaymentInvoiceToPay paymentInvoiceToPay = new PaymentInvoiceToPay();\n MoveLine moveLine = paymentInvoice.getMoveLine();\n Move move = moveLine.getMove();\n BigDecimal amountRemainingConverted = null;\n paymentInvoiceToPay.setSequence(lineSeq);\n paymentInvoiceToPay.setMoveLine(moveLine);\n paymentInvoiceToPay.setTotalAmount(paymentInvoice.getInvoiceAmount());\n paymentInvoiceToPay.setRemainingAmount(paymentInvoice.getInvoiceAmount().subtract(paymentInvoice.getPaidAmount()));\n paymentInvoiceToPay.setPaymentVoucher(paymentVoucher);\n if (move.getInvoice() != null) {\n paymentInvoiceToPay.setCurrency(move.getInvoice().getCurrency());\n } else {\n paymentInvoiceToPay.setCurrency(move.getCurrency());\n }\n BigDecimal paidAmountConverted = currencyService.getAmountCurrencyConverted(paymentVoucher.getCurrency(), paymentInvoiceToPay.getCurrency(), paidAmount, paymentVoucher.getPaymentDateTime().toLocalDate());\n BigDecimal amountToPay = paidAmountConverted.min(paymentInvoiceToPay.getRemainingAmount());\n paymentInvoiceToPay.setAmountToPay(amountToPay);\n piToPayLine.add(paymentInvoiceToPay);\n paidAmount = paidAmount.subtract(amountToPay);\n lineSeq += 1;\n }\n }\n if (piToPayLine != null && !piToPayLine.isEmpty()) {\n paymentVoucher.getPaymentInvoiceToPayList().addAll(piToPayLine);\n }\n paymentVoucher.getPaymentInvoiceList().addAll(newPiList);\n }\n }\n save(paymentVoucher);\n LOG.debug(\"String_Node_Str\");\n return paymentVoucher;\n}\n"
"public String toString() {\n String value = SWTUtil.getPrettyString(k) + Resources.getMessage(\"String_Node_Str\");\n if (estimator != null) {\n value += \"String_Node_Str\" + estimator + \"String_Node_Str\" + SWTUtil.getPrettyString(significanceLevel) + \"String_Node_Str\";\n }\n return value;\n}\n"
"private void publishStatus(ProtocolProviderService protocolProvider, int floorStatusValue, int ceilStatusValue) {\n if (!protocolProvider.isRegistered())\n return;\n OperationSetPresence presence = protocolProvider.getOperationSet(OperationSetPresence.class);\n if (presence == null)\n return;\n Iterator<PresenceStatus> statusSet = presence.getSupportedStatusSet();\n PresenceStatus status = null;\n while (statusSet.hasNext()) {\n PresenceStatus currentStatus = statusSet.next();\n if (status == null && currentStatus.getStatus() < ceilStatusValue && currentStatus.getStatus() >= floorStatusValue) {\n status = currentStatus;\n }\n if (status != null) {\n if (currentStatus.getStatus() < ceilStatusValue && currentStatus.getStatus() >= floorStatusValue && currentStatus.getStatus() > status.getStatus()) {\n status = currentStatus;\n }\n }\n }\n if (status != null) {\n new PublishPresenceStatusThread(protocolProvider, presence, status).start();\n this.saveStatusInformation(protocolProvider, status.getStatusName());\n }\n}\n"
"public RepositoryItem createRepositoryItem(String id) {\n if (!gridFS.find(id).isEmpty()) {\n throw new DuplicateItemException(id);\n }\n GridFSInputFile dbFile = gridFS.createFile(id);\n dbFile.setId(id);\n return createRepositoryItem(dbFile);\n}\n"
"public static String generateDefaultValueString(Schema schema, String fieldName) {\n if (DIRTY_BYTES_FIELD_NAME.equals(fieldName)) {\n return \"String_Node_Str\" + getNumberOfBytesNeededForDirtyBits(schema) + \"String_Node_Str\";\n } else {\n throw new IllegalArgumentException(fieldName + \"String_Node_Str\");\n }\n}\n"
"public void widgetSelected(SelectionEvent e) {\n if (((Button) e.widget).getSelection()) {\n SessionHandleAdapter.getInstance().getCommandStack().startTrans(Messages.getString(\"String_Node_Str\"));\n for (int i = 0; i < toggleProviders.length; i++) {\n BorderInfomation information = new BorderInfomation();\n information.setPosition(toggleProviders[i].getPosition());\n information.setColor(selectedColor);\n information.setStyle((String) styleCombo.getSelectedItem());\n information.setWidth((String) widthCombo.getSelectedItem());\n toggles[i].setSelection(true);\n previewCanvas.setBorderInfomation(information);\n try {\n toggleProviders[i].save(information);\n } catch (Exception e1) {\n ExceptionHandler.handle(e1);\n }\n }\n restoreInfo = (BorderInfomation) toggleProviders[toggleProviders.length - 1].load();\n SessionHandleAdapter.getInstance().getCommandStack().commit();\n } else {\n boolean reset = true;\n RGB oldColor = null;\n for (int i = 0; i < toggleProviders.length; i++) {\n BorderInfomation info = (BorderInfomation) toggleProviders[i].load();\n oldColor = info.getColor();\n if (oldColor == null) {\n oldColor = autoColor;\n }\n if (!(info.getStyle().equals((String) styleCombo.getSelectedItem())) || !(oldColor.equals(builder.getRGB())) || !(info.getWidth().equals((String) widthCombo.getSelectedItem()))) {\n reset = false;\n break;\n }\n }\n if (reset) {\n SessionHandleAdapter.getInstance().getCommandStack().startTrans(Messages.getString(\"String_Node_Str\"));\n for (int i = 0; i < toggleProviders.length; i++) {\n previewCanvas.removeBorderInfomation(toggleProviders[i].getPosition());\n toggles[i].setSelection(false);\n try {\n toggleProviders[i].reset();\n } catch (Exception e1) {\n ExceptionHandler.handle(e1);\n }\n }\n SessionHandleAdapter.getInstance().getCommandStack().commit();\n } else {\n SessionHandleAdapter.getInstance().getCommandStack().startTrans(Messages.getString(\"String_Node_Str\"));\n for (int i = 0; i < toggleProviders.length; i++) {\n BorderInfomation information = new BorderInfomation();\n information.setPosition(toggleProviders[i].getPosition());\n information.setColor(builder.getRGB());\n information.setStyle((String) styleCombo.getSelectedItem());\n information.setWidth((String) widthCombo.getSelectedItem());\n previewCanvas.setBorderInfomation(information);\n restoreInfo = information;\n try {\n toggleProviders[i].save(information);\n } catch (Exception e1) {\n ExceptionHandler.handle(e1);\n }\n }\n ((Button) e.widget).setSelection(true);\n SessionHandleAdapter.getInstance().getCommandStack().commit();\n }\n }\n previewCanvas.redraw();\n}\n"
"public void deleteResource(ResourceHandle resourceHandle) {\n try {\n super.deleteResource(resourceHandle);\n } finally {\n if (resourceHandle instanceof AssocWithThreadResourceHandle) {\n synchronized (resourceHandle.lock) {\n ((AssocWithThreadResourceHandle) resourceHandle).setDirty();\n }\n }\n }\n}\n"
"public void download(URL url, File desc) throws Exception {\n TalendLibsServerManager manager = TalendLibsServerManager.getInstance();\n final NexusServerBean talendlibServer = manager.getTalentArtifactServer();\n String mavenUri = url.toExternalForm();\n MavenArtifact parseMvnUrl = MavenUrlHelper.parseMvnUrl(mavenUri);\n if (parseMvnUrl != null) {\n String tempPath = getTmpFolderPath();\n File createTempFile = File.createTempFile(\"String_Node_Str\", \"String_Node_Str\");\n createTempFile.delete();\n File tempFolder = new File(tempPath + File.separator + createTempFile.getName());\n if (tempFolder.exists()) {\n tempFolder.delete();\n }\n tempFolder.mkdirs();\n String name = parseMvnUrl.getArtifactId();\n String type = parseMvnUrl.getType();\n if (type == null || \"String_Node_Str\".equals(type)) {\n type = MavenConstants.PACKAGING_JAR;\n }\n name = name + \"String_Node_Str\" + type;\n File downloadedFile = new File(tempFolder, name);\n NullProgressMonitor monitor = new NullProgressMonitor();\n new HttpClientTransport(talendlibServer.getRepositoryURI(), talendlibServer.getUserName(), talendlibServer.getPassword()) {\n protected HttpResponse execute(IProgressMonitor monitor, DefaultHttpClient httpClient, URI targetURI) throws Exception {\n HttpGet httpGet = new HttpGet(targetURI);\n HttpResponse response = httpClient.execute(httpGet);\n if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {\n HttpEntity entity = response.getEntity();\n InputStream inputStream = entity.getContent();\n BufferedInputStream bis = null;\n BufferedOutputStream bos = null;\n try {\n bis = new BufferedInputStream(inputStream);\n bos = new BufferedOutputStream(new FileOutputStream(downloadedFile));\n long contentLength = entity.getContentLength();\n fireDownloadStart(new Long(contentLength).intValue());\n long refreshInterval = 1000;\n if (contentLength < BUFFER_SIZE * 10) {\n refreshInterval = contentLength / 200;\n }\n int bytesDownloaded = 0;\n byte[] buf = new byte[BUFFER_SIZE];\n int bytesRead = -1;\n long startTime = new Date().getTime();\n int byteReadInloop = 0;\n while ((bytesRead = bis.read(buf)) != -1) {\n bos.write(buf, 0, bytesRead);\n long currentTime = new Date().getTime();\n byteReadInloop = byteReadInloop + bytesRead;\n if (currentTime - startTime > refreshInterval) {\n startTime = currentTime;\n fireDownloadProgress(byteReadInloop);\n byteReadInloop = 0;\n }\n }\n if (!localConnectionProvider && !getRepositoryContext().isOffline()) {\n List jars = new ArrayList();\n jars.add(target.getAbsolutePath());\n service.deployNewJar(jars);\n }\n }\n }\n }\n }\n fireDownloadComplete();\n } finally {\n if (bis != null) {\n bis.close();\n }\n if (bos != null) {\n bos.close();\n }\n if (tempFolder != null) {\n FilesUtils.deleteFile(tempFolder, true);\n }\n }\n}\n"
"public List<DavResource> getResources(String url) throws IOException {\n HttpPropFind propFind = new HttpPropFind(url);\n propFind.setEntity(SardineUtil.getResourcesEntity());\n HttpResponse response = this.client.execute(propFind);\n int statusCode = response.getStatusLine().getStatusCode();\n if (!SardineUtil.isGoodResponse(statusCode))\n throw new IOException(\"String_Node_Str\" + statusCode + \"String_Node_Str\" + url);\n Multistatus r = null;\n try {\n r = (Multistatus) this.factory.getUnmarshaller().unmarshal(response.getEntity().getContent());\n } catch (JAXBException ex) {\n IOException exception = new IOException(\"String_Node_Str\" + url);\n exception.initCause(ex);\n throw exception;\n }\n List<Response> responses = r.getResponse();\n List<DavResource> resources = new ArrayList<DavResource>(responses.size());\n String path = responses.get(0).getHref().get(0);\n for (Response resp : responses) {\n String href = resp.getHref().get(0);\n if (href.equals(path))\n continue;\n String name = href.substring(path.length(), href.length());\n if (name.equals(\"String_Node_Str\"))\n continue;\n if (name.endsWith(\"String_Node_Str\"))\n name = name.substring(0, name.length() - 1);\n String creationdate = resp.getPropstat().get(0).getProp().getCreationdate().getContent().get(0);\n String modifieddate = resp.getPropstat().get(0).getProp().getGetlastmodified().getContent().get(0);\n String contentType = \"String_Node_Str\";\n Getcontenttype gtt = resp.getPropstat().get(0).getProp().getGetcontenttype();\n if (gtt != null)\n contentType = gtt.getContent().get(0);\n String contentLength = \"String_Node_Str\";\n Getcontentlength gcl = resp.getPropstat().get(0).getProp().getGetcontentlength();\n if (gcl != null)\n contentLength = gcl.getContent().get(0);\n DavResource dr = new DavResource(url, name, SardineUtil.parseDate(creationdate), SardineUtil.parseDate(modifieddate), contentType, Long.valueOf(contentLength));\n resources.add(dr);\n }\n return resources;\n}\n"
"public static X509Certificate generateEndEntityCert(PublicKey entityKey, PrivateKey caKey, X509Certificate caCert) throws Exception {\n X509V3CertificateGenerator certGen = new X509V3CertificateGenerator();\n certGen.setSerialNumber(BigInteger.valueOf(1));\n certGen.setIssuerDN(PrincipalUtil.getSubjectX509Principal(caCert));\n certGen.setNotBefore(new Date(System.currentTimeMillis() - 50000));\n certGen.setNotAfter(new Date(System.currentTimeMillis() + 50000));\n certGen.setSubjectDN(new X509Principal(\"String_Node_Str\"));\n certGen.setPublicKey(entityKey);\n certGen.setSignatureAlgorithm(\"String_Node_Str\");\n certGen.addExtension(X509Extensions.AuthorityKeyIdentifier, false, new AuthorityKeyIdentifierStructure(caCert));\n certGen.addExtension(X509Extensions.SubjectKeyIdentifier, false, new SubjectKeyIdentifierStructure(getDigest(SubjectPublicKeyInfo.getInstance(entityKey.getEncoded()))));\n certGen.addExtension(X509Extensions.BasicConstraints, true, new BasicConstraints(false));\n certGen.addExtension(X509Extensions.KeyUsage, true, new KeyUsage(KeyUsage.digitalSignature | KeyUsage.keyEncipherment));\n return certGen.generate(caKey, \"String_Node_Str\");\n}\n"
"public Cells call(Cells cells) throws Exception {\n Cells cellsOut = new Cells();\n for (ColumnName columnName : selectedCols) {\n Cell cell = cells.getCellByName(columnName.getTableName().getQualifiedName(), columnName.getName());\n cellsOut.add(cell);\n }\n return cellsout;\n}\n"
"private GuiValidityStateIndicator.State currentBiomeIDState() {\n if (generationInfo.getBiomeTypes() != null) {\n return GuiValidityStateIndicator.State.VALID;\n String biomeID = generationInfo.getBiomeID();\n BiomeGenBase[] biomes = BiomeGenBase.getBiomeGenArray();\n for (int i = 0; i < biomes.length; i++) {\n if (biomes[i] != null && biomes[i].biomeName.equals(biomeID))\n return GuiValidityStateIndicator.State.VALID;\n }\n return biomeID.trim().length() > 0 ? GuiValidityStateIndicator.State.SEMI_VALID : GuiValidityStateIndicator.State.INVALID;\n}\n"
"public List<MLHyperParameter> getHyperParametersOfModel(long analysisId) throws DatabaseHandlerException {\n List<MLHyperParameter> hyperParams = new ArrayList<MLHyperParameter>();\n Connection connection = null;\n PreparedStatement getFeatues = null;\n ResultSet result = null;\n try {\n connection = dbh.getDataSource().getConnection();\n connection.setAutoCommit(true);\n if (algorithmName == null) {\n getFeatues = connection.prepareStatement(SQLQueries.GET_HYPER_PARAMETERS_OF_ANALYSIS);\n getFeatues.setLong(1, analysisId);\n } else {\n getFeatues = connection.prepareStatement(SQLQueries.GET_HYPER_PARAMETERS_OF_ANALYSIS_WITH_ALGORITHM);\n getFeatues.setLong(1, analysisId);\n getFeatues.setString(2, algorithmName);\n }\n result = getFeatues.executeQuery();\n while (result.next()) {\n MLHyperParameter param = new MLHyperParameter();\n param.setKey(result.getString(1));\n param.setValue(result.getString(2));\n hyperParams.add(param);\n }\n return hyperParams;\n } catch (SQLException e) {\n throw new DatabaseHandlerException(\"String_Node_Str\" + \"String_Node_Str\" + analysisId + \"String_Node_Str\" + e.getMessage(), e);\n } finally {\n MLDatabaseUtils.closeDatabaseResources(connection, getFeatues, result);\n }\n}\n"
"public static Pipeline extractPipeline(String name, AbstractProject<?, ?> firstJob) {\n Map<String, Stage> stages = newLinkedHashMap();\n for (AbstractProject job : getAllDownstreamJobs(firstJob)) {\n PipelineProperty property = (PipelineProperty) job.getProperty(PipelineProperty.class);\n String taskName = property != null && !property.getTaskName().equals(\"String_Node_Str\") ? property.getTaskName() : job.getDisplayName();\n Task task = new Task(job.getName(), taskName, StatusFactory.idle());\n String stageName = property != null && !property.getStageName().equals(\"String_Node_Str\") ? property.getStageName() : job.getDisplayName();\n Stage stage = stages.get(stageName);\n if (stage == null)\n stage = new Stage(stageName, Collections.<Task>emptyList());\n stages.put(stageName, new Stage(stage.getName(), newArrayList(concat(stage.getTasks(), singleton(task)))));\n }\n return new Pipeline(name, newArrayList(stages.values()));\n}\n"
"private void addDriverPage(TabFolder tabFolder) {\n Composite page = new Composite(tabFolder, SWT.NONE);\n GridLayout layout = new GridLayout();\n layout.marginHeight = 10;\n layout.marginWidth = 10;\n layout.verticalSpacing = 5;\n page.setLayout(layout);\n page.setLayoutData(new GridData(GridData.FILL_BOTH));\n final Table table = new Table(page, SWT.BORDER | SWT.FULL_SELECTION);\n GridData data = new GridData(GridData.FILL_BOTH);\n table.setLayoutData(data);\n table.setHeaderVisible(true);\n table.setLinesVisible(true);\n TableLayout tableLayout = new TableLayout();\n table.setLayout(tableLayout);\n TableColumn column0 = new TableColumn(table, SWT.NONE);\n column0.setWidth(20);\n TableColumn column1 = new TableColumn(table, SWT.NONE);\n column1.setText(JdbcPlugin.getResourceString(\"String_Node_Str\"));\n column1.setWidth(300);\n column1.addSelectionListener(new SelectionListener() {\n private boolean asc = false;\n public void widgetSelected(SelectionEvent e) {\n sortDriver(1, asc);\n asc = !asc;\n }\n public void widgetDefaultSelected(SelectionEvent e) {\n widgetSelected(e);\n }\n });\n TableColumn column2 = new TableColumn(table, SWT.NONE);\n column2.setText(JdbcPlugin.getResourceString(\"String_Node_Str\"));\n column2.setWidth(100);\n column2.addSelectionListener(new SelectionListener() {\n private boolean asc = false;\n public void widgetSelected(SelectionEvent e) {\n sortDriver(2, asc);\n asc = !asc;\n }\n public void widgetDefaultSelected(SelectionEvent e) {\n widgetSelected(e);\n }\n });\n TableColumn column3 = new TableColumn(table, SWT.NONE);\n column3.setText(JdbcPlugin.getResourceString(\"String_Node_Str\"));\n column3.setWidth(100);\n column3.addSelectionListener(new SelectionListener() {\n private boolean asc = false;\n public void widgetSelected(SelectionEvent e) {\n sortDriver(3, asc);\n asc = !asc;\n }\n public void widgetDefaultSelected(SelectionEvent e) {\n widgetSelected(e);\n }\n });\n driverViewer = new TableViewer(table);\n driverViewer.setContentProvider(new IStructuredContentProvider() {\n public Object[] getElements(Object inputElement) {\n if (inputElement instanceof Map) {\n return ((Map) inputElement).entrySet().toArray();\n }\n return new Object[0];\n }\n public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {\n }\n public void dispose() {\n }\n });\n driverViewer.setSorter(null);\n driverViewer.addSelectionChangedListener(new ISelectionChangedListener() {\n public void selectionChanged(SelectionChangedEvent event) {\n updateDriverButtons();\n }\n });\n driverViewer.addDoubleClickListener(new IDoubleClickListener() {\n public void doubleClick(DoubleClickEvent event) {\n editDriver();\n }\n });\n Composite buttons = new Composite(page, SWT.NONE);\n buttons.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));\n layout = new GridLayout();\n layout.numColumns = 2;\n layout.marginHeight = 0;\n layout.marginWidth = 0;\n buttons.setLayout(layout);\n editButton = new Button(buttons, SWT.PUSH);\n editButton.setText(TEXT_EDITBUTTON);\n data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);\n data.widthHint = btnWidth;\n data.heightHint = btnHeight;\n editButton.setLayoutData(data);\n editButton.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n editDriver();\n }\n });\n TabItem tabItem = new TabItem(tabFolder, SWT.NONE);\n tabItem.setControl(page);\n tabItem.setText(JdbcPlugin.getResourceString(\"String_Node_Str\"));\n}\n"
"public static String getXML(String filename) throws Exception {\n InputStream in = null;\n try {\n in = new FileInputStream(filename);\n return IOUtils.toString(in);\n } finally {\n if (in != null)\n in.close();\n }\n}\n"
"private void handleEnable(boolean quietMode) {\n mQuietEnable = quietMode;\n synchronized (mConnection) {\n if ((mBluetooth == null) && (!mBinding)) {\n Message timeoutMsg = mHandler.obtainMessage(MESSAGE_TIMEOUT_BIND);\n mHandler.sendMessageDelayed(timeoutMsg, TIMEOUT_BIND_MS);\n mConnection.setGetNameAddressOnly(false);\n Intent i = new Intent(IBluetooth.class.getName());\n if (!doBind(i, mConnection, Context.BIND_AUTO_CREATE | Context.BIND_IMPORTANT, UserHandle.CURRENT)) {\n mHandler.removeMessages(MESSAGE_TIMEOUT_BIND);\n } else {\n mBinding = true;\n }\n } else if (mBluetooth != null) {\n if (mConnection.isGetNameAddressOnly()) {\n mConnection.setGetNameAddressOnly(false);\n try {\n mBluetooth.registerCallback(mBluetoothCallback);\n } catch (RemoteException re) {\n Log.e(TAG, \"String_Node_Str\", re);\n }\n sendBluetoothServiceUpCallback();\n }\n try {\n if (!mQuietEnable) {\n if (!mBluetooth.enable()) {\n Log.e(TAG, \"String_Node_Str\");\n }\n } else {\n if (!mBluetooth.enableNoAutoConnect()) {\n Log.e(TAG, \"String_Node_Str\");\n }\n }\n } catch (RemoteException e) {\n Log.e(TAG, \"String_Node_Str\", e);\n }\n }\n }\n}\n"
"public boolean onMenuItemActionExpand(MenuItem item) {\n isNeedToHideSearchView = true;\n emptyListTextView.setVisibility(View.GONE);\n return true;\n}\n"
"public boolean step() {\n BlockManager blockManager = context.get(BlockManager.class);\n BiomeManager biomeManager = context.get(BiomeManager.class);\n ModuleEnvironment environment = context.get(ModuleManager.class).getEnvironment();\n context.put(WorldGeneratorPluginLibrary.class, new DefaultWorldGeneratorPluginLibrary(environment, context));\n WorldInfo worldInfo = gameManifest.getWorldInfo(TerasologyConstants.MAIN_WORLD);\n if (worldInfo.getSeed() == null || worldInfo.getSeed().isEmpty()) {\n FastRandom random = new FastRandom();\n worldInfo.setSeed(random.nextString(16));\n }\n logger.info(\"String_Node_Str\", worldInfo.getSeed());\n WorldGeneratorManager worldGeneratorManager = context.get(WorldGeneratorManager.class);\n WorldGenerator worldGenerator;\n try {\n worldGenerator = WorldGeneratorManager.createGenerator(worldInfo.getWorldGenerator(), context);\n worldGenerator.setWorldSeed(worldInfo.getSeed());\n context.put(WorldGenerator.class, worldGenerator);\n } catch (UnresolvedWorldGeneratorException e) {\n logger.error(\"String_Node_Str\", worldInfo.getWorldGenerator(), worldGeneratorManager.getWorldGenerators());\n context.get(GameEngine.class).changeState(new StateMainMenu(\"String_Node_Str\"));\n return true;\n }\n EngineEntityManager entityManager = (EngineEntityManager) context.get(EntityManager.class);\n boolean writeSaveGamesEnabled = context.get(Config.class).getSystem().isWriteSaveGamesEnabled();\n Path saveOrRecordingPath = getSaveOrRecordingPath();\n StorageManager storageManager;\n RecordAndReplaySerializer recordAndReplaySerializer = context.get(RecordAndReplaySerializer.class);\n RecordAndReplayUtils recordAndReplayUtils = context.get(RecordAndReplayUtils.class);\n try {\n storageManager = writeSaveGamesEnabled ? new ReadWriteStorageManager(saveOrRecordingPath, environment, entityManager, blockManager, biomeManager, recordAndReplaySerializer, recordAndReplayUtils) : new ReadOnlyStorageManager(saveOrRecordingPath, environment, entityManager, blockManager, biomeManager);\n } catch (IOException e) {\n logger.error(\"String_Node_Str\", e);\n context.get(GameEngine.class).changeState(new StateMainMenu(\"String_Node_Str\"));\n return true;\n }\n context.put(StorageManager.class, storageManager);\n LocalChunkProvider chunkProvider = new LocalChunkProvider(storageManager, entityManager, worldGenerator, blockManager, biomeManager);\n context.get(ComponentSystemManager.class).register(new RelevanceSystem(chunkProvider), \"String_Node_Str\");\n Block unloadedBlock = blockManager.getBlock(BlockManager.UNLOADED_ID);\n WorldProviderCoreImpl worldProviderCore = new WorldProviderCoreImpl(worldInfo, chunkProvider, unloadedBlock, context);\n EntityAwareWorldProvider entityWorldProvider = new EntityAwareWorldProvider(worldProviderCore, context);\n WorldProvider worldProvider = new WorldProviderWrapper(entityWorldProvider);\n context.put(WorldProvider.class, worldProvider);\n chunkProvider.setBlockEntityRegistry(entityWorldProvider);\n context.put(BlockEntityRegistry.class, entityWorldProvider);\n context.get(ComponentSystemManager.class).register(entityWorldProvider, \"String_Node_Str\");\n DefaultCelestialSystem celestialSystem = new DefaultCelestialSystem(new BasicCelestialModel(), context);\n context.put(CelestialSystem.class, celestialSystem);\n context.get(ComponentSystemManager.class).register(celestialSystem);\n Skysphere skysphere = new Skysphere(context);\n BackdropProvider backdropProvider = skysphere;\n BackdropRenderer backdropRenderer = skysphere;\n context.put(BackdropProvider.class, backdropProvider);\n context.put(BackdropRenderer.class, backdropRenderer);\n RenderingSubsystemFactory engineSubsystemFactory = context.get(RenderingSubsystemFactory.class);\n WorldRenderer worldRenderer = engineSubsystemFactory.createWorldRenderer(context);\n context.put(WorldRenderer.class, worldRenderer);\n LocalPlayer localPlayer = new LocalPlayer();\n localPlayer.setEntityIdMap(context.get(EntityIdMap.class));\n context.put(LocalPlayer.class, localPlayer);\n context.put(Camera.class, worldRenderer.getActiveCamera());\n return true;\n}\n"
"private static Iterator getFilterIterator(TabularHierarchyHandle handle) {\n if (handle.getDataSet() != null)\n return handle.filtersIterator();\n else {\n CubeHandle cubeHandle = DataRequestSessionImpl.acquireContainerCube(handle);\n if (cubeHandle != null)\n return cubeHandle.filtersIterator();\n }\n return new ArrayList().iterator();\n}\n"
"public Promise<Collection<ResourceSetDescription>, ResourceException> apply(final Pair<QueryResult, Collection<UmaPolicy>> result) {\n final Set<ResourceSetDescription> filteredResourceSets = new HashSet<>();\n try {\n String realm = context.asContext(RealmContext.class).getResolvedRealm();\n Subject subject = createSubject(resourceOwnerId, realm);\n Evaluator evaluator = umaProviderSettingsFactory.get(realm).getPolicyEvaluator(subject);\n for (UmaPolicy sharedPolicy : result.getSecond()) {\n if (!containsResourceSet(resourceSets, sharedPolicy.getResourceSet())) {\n String sharedResourceName = sharedPolicy.getResourceSet().getName();\n List<Entitlement> entitlements = evaluator.evaluate(realm, subject, sharedResourceName, null, false);\n if (!entitlements.isEmpty()) {\n resourceSets.add(sharedPolicy.getResourceSet());\n }\n }\n }\n filteredResourceSets.addAll(query.getResourceSetQuery().accept(new QueryFilterVisitor<Set<ResourceSetDescription>, Set<ResourceSetDescription>, String>() {\n public Set<ResourceSetDescription> visitAndFilter(Set<ResourceSetDescription> resourceSetDescriptions, List<org.forgerock.util.query.QueryFilter<String>> list) {\n for (org.forgerock.util.query.QueryFilter<String> filter : list) {\n resourceSetDescriptions.retainAll(filter.accept(this, resourceSetDescriptions));\n }\n return resourceSetDescriptions;\n }\n public Set<ResourceSetDescription> visitBooleanLiteralFilter(Set<ResourceSetDescription> resourceSetDescriptions, boolean value) {\n if (value) {\n return resourceSetDescriptions;\n } else {\n return Collections.EMPTY_SET;\n }\n }\n public Set<ResourceSetDescription> visitContainsFilter(Set<ResourceSetDescription> resourceSetDescriptions, String fieldName, Object value) {\n Set<ResourceSetDescription> results = new HashSet<>();\n for (ResourceSetDescription resourceSetDescription : resourceSetDescriptions) {\n if (fieldName.equals(\"String_Node_Str\")) {\n if (resourceSetDescription.getName().toLowerCase().contains(((String) value).toLowerCase())) {\n results.add(resourceSetDescription);\n }\n }\n }\n return results;\n }\n public Set<ResourceSetDescription> visitEqualsFilter(Set<ResourceSetDescription> resourceSetDescriptions, String fieldName, Object value) {\n Set<ResourceSetDescription> results = new HashSet<>();\n for (ResourceSetDescription resourceSetDescription : resourceSetDescriptions) {\n if (fieldName.equals(ResourceSetTokenField.RESOURCE_OWNER_ID)) {\n if (resourceSetDescription.getResourceOwnerId().equals(value)) {\n results.add(resourceSetDescription);\n }\n } else if (fieldName.equals(ResourceSetTokenField.RESOURCE_SET_ID)) {\n if (resourceSetDescription.getId().equals(value)) {\n results.add(resourceSetDescription);\n }\n }\n }\n return results;\n }\n public Set<ResourceSetDescription> visitExtendedMatchFilter(Set<ResourceSetDescription> resourceSetDescriptions, String s, String s2, Object o) {\n throw new UnsupportedOperationException(\"String_Node_Str\");\n }\n public Set<ResourceSetDescription> visitGreaterThanFilter(Set<ResourceSetDescription> resourceSetDescriptions, String s, Object o) {\n throw new UnsupportedOperationException(\"String_Node_Str\");\n }\n public Set<ResourceSetDescription> visitGreaterThanOrEqualToFilter(Set<ResourceSetDescription> resourceSetDescriptions, String s, Object o) {\n throw new UnsupportedOperationException(\"String_Node_Str\");\n }\n public Set<ResourceSetDescription> visitLessThanFilter(Set<ResourceSetDescription> resourceSetDescriptions, String s, Object o) {\n throw new UnsupportedOperationException(\"String_Node_Str\");\n }\n public Set<ResourceSetDescription> visitLessThanOrEqualToFilter(Set<ResourceSetDescription> resourceSetDescriptions, String s, Object o) {\n throw new UnsupportedOperationException(\"String_Node_Str\");\n }\n public Set<ResourceSetDescription> visitNotFilter(Set<ResourceSetDescription> resourceSetDescriptions, org.forgerock.util.query.QueryFilter<String> queryFilter) {\n Set<ResourceSetDescription> excludedResourceSets = queryFilter.accept(this, resourceSetDescriptions);\n resourceSetDescriptions.removeAll(excludedResourceSets);\n return resourceSetDescriptions;\n }\n public Set<ResourceSetDescription> visitOrFilter(Set<ResourceSetDescription> resourceSetDescriptions, List<org.forgerock.util.query.QueryFilter<String>> list) {\n throw new UnsupportedOperationException(\"String_Node_Str\");\n }\n public Set<ResourceSetDescription> visitPresentFilter(Set<ResourceSetDescription> resourceSetDescriptions, String s) {\n throw new UnsupportedOperationException(\"String_Node_Str\");\n }\n public Set<ResourceSetDescription> visitStartsWithFilter(Set<ResourceSetDescription> resourceSetDescriptions, String s, Object o) {\n throw new UnsupportedOperationException(\"String_Node_Str\");\n }\n }, resourceSets));\n return Promises.newResultPromise((Collection<ResourceSetDescription>) filteredResourceSets);\n } catch (EntitlementException e) {\n return Promises.newExceptionPromise((ResourceException) new InternalServerErrorException(e));\n }\n}\n"
"private static DBType parseType(String datatype, int length) {\n if (datatype == null)\n return null;\n try {\n DBDatatype dbDatatype = DBDatatype.valueOf(datatype.toUpperCase());\n length = (length <= 0) ? DBType.NO_LENGTH : length;\n switch(dbDatatype) {\n case CHAR:\n case VARCHAR:\n case BINARY:\n case VARBINARY:\n return new DBType(dbDatatype, length);\n default:\n return new DBType(dbDatatype);\n }\n } catch (IllegalArgumentException iae) {\n datatype = datatype.toLowerCase();\n if (datatype.equals(\"String_Node_Str\") || datatype.equals(\"String_Node_Str\") || datatype.equals(\"String_Node_Str\") || datatype.equals(\"String_Node_Str\") || datatype.equals(\"String_Node_Str\") || datatype.equals(\"String_Node_Str\"))\n return new DBType(DBDatatype.SMALLINT);\n else if (datatype.equals(\"String_Node_Str\"))\n return new DBType(DBDatatype.SMALLINT);\n else if (datatype.equals(\"String_Node_Str\") || datatype.equals(\"String_Node_Str\"))\n return new DBType(DBDatatype.INTEGER);\n else if (datatype.equals(\"String_Node_Str\") || datatype.equals(\"String_Node_Str\") || datatype.equals(\"String_Node_Str\") || datatype.equals(\"String_Node_Str\"))\n return new DBType(DBDatatype.BIGINT);\n else if (datatype.equals(\"String_Node_Str\") || datatype.equals(\"String_Node_Str\"))\n return new DBType(DBDatatype.REAL);\n else if (datatype.equals(\"String_Node_Str\") || datatype.equals(\"String_Node_Str\"))\n return new DBType(DBDatatype.DOUBLE);\n else if (datatype.equals(\"String_Node_Str\") || datatype.equals(\"String_Node_Str\"))\n return new DBType(DBDatatype.BINARY, length);\n else if (datatype.equals(\"String_Node_Str\"))\n return new DBType(DBDatatype.VARBINARY, length);\n else if (datatype.equals(\"String_Node_Str\"))\n return new DBType(DBDatatype.CHAR, length);\n else if (datatype.equals(\"String_Node_Str\") || datatype.equals(\"String_Node_Str\"))\n return new DBType(DBDatatype.VARCHAR, length);\n else if (datatype.equals(\"String_Node_Str\"))\n return new DBType(DBDatatype.BLOB);\n else if (datatype.equals(\"String_Node_Str\"))\n return new DBType(DBDatatype.CLOB);\n else if (datatype.equals(\"String_Node_Str\") || datatype.equals(\"String_Node_Str\"))\n return new DBType(DBDatatype.TIMESTAMP);\n else if (datatype.equals(\"String_Node_Str\"))\n return new DBType(DBDatatype.POINT);\n else if (datatype.equals(\"String_Node_Str\") || datatype.equals(\"String_Node_Str\") || datatype.equals(\"String_Node_Str\"))\n return new DBType(DBDatatype.REGION);\n else\n return null;\n }\n}\n"
"public void setGMPath(String gmPath) {\n if (gmPath == null)\n throw new NullPointerException(\"String_Node_Str\");\n gmFactory = builder.buildFactory(gmPath);\n}\n"
"private void renderFull() throws IOException, java.sql.SQLException {\n JspWriter out = pageContext.getOut();\n DCValue[] values = item.getDC(Item.ANY, Item.ANY, Item.ANY);\n out.println(\"String_Node_Str\");\n HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();\n out.println(\"String_Node_Str\");\n out.println(\"String_Node_Str\");\n for (int i = 0; i < values.length; i++) {\n boolean hidden = false;\n if (values[i].element.equals(\"String_Node_Str\") && (values[i].qualifier != null && values[i].qualifier.equals(\"String_Node_Str\"))) {\n hidden = true;\n }\n if (!hidden) {\n out.print(\"String_Node_Str\");\n out.print(values[i].element);\n if (values[i].qualifier != null) {\n out.print(\"String_Node_Str\" + values[i].qualifier);\n }\n out.print(\"String_Node_Str\");\n out.print(Utils.addEntities(values[i].value));\n out.print(\"String_Node_Str\");\n if (values[i].language == null) {\n out.print(\"String_Node_Str\");\n } else {\n out.print(values[i].language);\n }\n out.println(\"String_Node_Str\");\n }\n }\n listCollections();\n out.println(\"String_Node_Str\");\n listBitstreams();\n}\n"
"private void createSlot(int row) {\n PlayerListItem pli = new PlayerListItem();\n pli.setAction(PlayerListItem.Action.ADD_PLAYER);\n Item item = new Item();\n UUID offlineId = java.util.UUID.nameUUIDFromBytes((\"String_Node_Str\" + getSlotID(row)).getBytes(Charsets.UTF_8));\n item.setUuid(offlineId);\n item.setDisplayName(\"String_Node_Str\");\n item.setGamemode(0);\n item.setPing(0);\n item.setUsername(getSlotID(row));\n item.setProperties(new String[0][0]);\n pli.setItems(new Item[] { item });\n getPlayer().unsafe().sendPacket(pli);\n send[row] = null;\n slots_ping[row] = 0;\n sendTextures[row] = null;\n}\n"
"public void getWorkflowSchedules(HttpRequest request, HttpResponder responder, String appId, String workflowId) {\n programLifecycleHttpHandler.getWorkflowSchedules(RESTMigrationUtils.rewriteV2RequestToV3(request), responder, Constants.DEFAULT_NAMESPACE, appId, workflowId);\n}\n"
"private void initBcelWorld(IMessageHandler handler) throws IOException {\n List cp = buildConfig.getBootclasspath();\n cp.addAll(buildConfig.getClasspath());\n bcelWorld = new BcelWorld(cp, handler, null);\n bcelWorld.setXnoInline(buildConfig.isXnoInline());\n bcelWorld.setXlazyTjp(buildConfig.isXlazyTjp());\n bcelWeaver = new BcelWeaver(bcelWorld);\n state.binarySourceFiles = new HashMap();\n for (Iterator i = buildConfig.getAspectpath().iterator(); i.hasNext(); ) {\n File f = (File) i.next();\n bcelWeaver.addLibraryJarFile(f);\n }\n if (buildConfig.getLintMode().equals(AjBuildConfig.AJLINT_DEFAULT)) {\n bcelWorld.getLint().loadDefaultProperties();\n } else {\n bcelWorld.getLint().setAll(buildConfig.getLintMode());\n }\n if (buildConfig.getLintSpecFile() != null) {\n bcelWorld.getLint().setFromProperties(buildConfig.getLintSpecFile());\n }\n for (Iterator i = buildConfig.getInJars().iterator(); i.hasNext(); ) {\n File inJar = (File) i.next();\n List unwovenClasses = bcelWeaver.addJarFile(inJar, buildConfig.getOutputDir(), false);\n state.binarySourceFiles.put(inJar.getPath(), unwovenClasses);\n }\n for (Iterator i = buildConfig.getInpath().iterator(); i.hasNext(); ) {\n File inPathElement = (File) i.next();\n if (!inPathElement.isDirectory()) {\n List unwovenClasses = bcelWeaver.addJarFile(inPathElement, buildConfig.getOutputDir(), true);\n state.binarySourceFiles.put(inPathElement.getPath(), unwovenClasses);\n } else {\n File[] binSrcs = FileUtil.listFiles(inPathElement, binarySourceFilter);\n for (int j = 0; j < binSrcs.length; j++) {\n UnwovenClassFile ucf = bcelWeaver.addClassFile(binSrcs[j], inPathElement, buildConfig.getOutputDir());\n List ucfl = new ArrayList();\n ucfl.add(ucf);\n state.binarySourceFiles.put(binSrcs[j].getPath(), ucfl);\n }\n }\n }\n bcelWeaver.setReweavableMode(buildConfig.isXreweavable(), buildConfig.getXreweavableCompressClasses());\n bcelWorld.resolve(\"String_Node_Str\");\n}\n"
"public boolean marshalSingleValue(XPathFragment xPathFragment, MarshalRecord marshalRecord, Object object, Object value, CoreAbstractSession session, NamespaceResolver namespaceResolver, MarshalContext marshalContext) {\n XMLMarshaller marshaller = marshalRecord.getMarshaller();\n value = xmlCompositeCollectionMapping.convertObjectValueToDataValue(value, session, marshaller);\n if (null == value) {\n return xmlCompositeCollectionMapping.getNullPolicy().compositeObjectMarshal(xPathFragment, marshalRecord, object, session, namespaceResolver);\n }\n Descriptor descriptor = (Descriptor) xmlCompositeCollectionMapping.getReferenceDescriptor();\n if (descriptor == null) {\n descriptor = (Descriptor) session.getDescriptor(value.getClass());\n } else if (descriptor.hasInheritance()) {\n Class objectValueClass = value.getClass();\n if (!(objectValueClass == descriptor.getJavaClass())) {\n descriptor = (Descriptor) session.getDescriptor(objectValueClass);\n }\n }\n UnmarshalKeepAsElementPolicy keepAsElementPolicy = xmlCompositeCollectionMapping.getKeepAsElementPolicy();\n if (null != keepAsElementPolicy && (keepAsElementPolicy.isKeepUnknownAsElement() || keepAsElementPolicy.isKeepAllAsElement()) && value instanceof org.w3c.dom.Node) {\n marshalRecord.node((org.w3c.dom.Node) value, marshalRecord.getNamespaceResolver());\n return true;\n }\n if (descriptor != null) {\n marshalRecord.beforeContainmentMarshal(value);\n ObjectBuilder objectBuilder = (ObjectBuilder) descriptor.getObjectBuilder();\n xPathNode.startElement(marshalRecord, xPathFragment, object, session, namespaceResolver, objectBuilder, value);\n List extraNamespaces = objectBuilder.addExtraNamespacesToNamespaceResolver(descriptor, marshalRecord, session, true, false);\n writeExtraNamespaces(extraNamespaces, marshalRecord, session);\n objectBuilder.addXsiTypeAndClassIndicatorIfRequired(marshalRecord, descriptor, (Descriptor) xmlCompositeCollectionMapping.getReferenceDescriptor(), (Field) xmlCompositeCollectionMapping.getField(), false);\n objectBuilder.buildRow(marshalRecord, value, session, marshaller, xPathFragment, WriteType.UNDEFINED);\n marshalRecord.afterContainmentMarshal(object, value);\n marshalRecord.endElement(xPathFragment, namespaceResolver);\n objectBuilder.removeExtraNamespacesFromNamespaceResolver(marshalRecord, extraNamespaces, session);\n } else {\n if (XMLConstants.UNKNOWN_OR_TRANSIENT_CLASS.equals(xmlCompositeCollectionMapping.getReferenceClassName())) {\n throw XMLMarshalException.descriptorNotFoundInProject(value.getClass().getName());\n }\n xPathNode.startElement(marshalRecord, xPathFragment, object, session, namespaceResolver, null, value);\n QName schemaType = ((Field) xmlCompositeCollectionMapping.getField()).getSchemaTypeForValue(value, session);\n updateNamespaces(schemaType, marshalRecord, ((Field) xmlCompositeCollectionMapping.getField()));\n marshalRecord.characters(schemaType, value, null, false);\n marshalRecord.endElement(xPathFragment, namespaceResolver);\n }\n return true;\n}\n"
"public CxxPreprocessorInput getCxxPreprocessorInput(final CxxPlatform cxxPlatform, HeaderVisibility headerVisibility) throws NoSuchBuildTargetException {\n CxxPreprocessorInput.Builder builder = CxxPreprocessorInput.builder();\n switch(headerVisibility) {\n case PUBLIC:\n if (hasHeaders(cxxPlatform)) {\n CxxPreprocessables.addHeaderSymlinkTree(builder, getBuildTarget(), ruleResolver, cxxPlatform, headerVisibility, CxxPreprocessables.IncludeType.SYSTEM);\n }\n builder.putAllPreprocessorFlags(Preconditions.checkNotNull(getExportedPreprocessorFlags(cxxPlatform)));\n builder.addAllFrameworks(args.frameworks);\n final Iterable<SourcePath> includePaths = args.includeDirs.stream().map(input -> PrebuiltCxxLibraryDescription.getApplicableSourcePath(params.getBuildTarget(), params.getCellRoots(), params.getProjectFilesystem(), ruleResolver, cxxPlatform, input, Optional.empty())).collect(MoreCollectors.toImmutableList());\n for (SourcePath includePath : includePaths) {\n builder.addIncludes(CxxHeadersDir.of(CxxPreprocessables.IncludeType.SYSTEM, includePath));\n }\n return builder.build();\n case PRIVATE:\n return builder.build();\n }\n throw new RuntimeException(\"String_Node_Str\" + headerVisibility);\n}\n"
"public static PrimaryIndex[] getIndices(final PropertyManagement propertyManagement) {\n PersistableStore store = (PersistableStore) StoreParameters.StoreParam.INPUT_STORE.getHelper().getValue(propertyManagement);\n final IndexStore indexStore = store.getDataStoreOptions().createIndexStore();\n final mil.nga.giat.geowave.core.store.CloseableIterator<Index<?, ?>> it = indexStore.getIndices();\n final List<PrimaryIndex> indices = new LinkedList<PrimaryIndex>();\n while (it.hasNext()) {\n indices.add((PrimaryIndex) it.next());\n }\n try {\n it.close();\n } catch (final IOException e) {\n LOGGER.warn(\"String_Node_Str\" + e);\n }\n final PrimaryIndex[] result = new PrimaryIndex[indices.size()];\n indices.toArray(result);\n return result;\n}\n"
"public boolean canExtractItem(int slotIndex, ItemStack itemstack, int side) {\n ISidedInventory inventory = getStructureInventory();\n if (inventory == null)\n return false;\n if (!inventory.canExtractItem(slotIndex, itemstack, side))\n return false;\n return slotIndex != SLOT_QUEEN && slotIndex != SLOT_DRONE;\n}\n"
"protected void generateObstacles() {\n int randDirection = Utility.getRandom(0, 359);\n asteroids[0] = new Obstacle(1, -400, -400, 2, randDirection);\n asteroids[1] = new Obstacle(1, 800, 800, 2, randDirection);\n asteroids[2] = new Obstacle(1, -1200, 400, 2, randDirection);\n planets[0] = new Obstacle(0, 0, -600, 0, 0);\n planets[1] = new Obstacle(0, 800, 0, 0, 0);\n}\n"