content
stringlengths
40
137k
"public void run() {\n if (null != dbPools) {\n for (DBPoolInfo dbPool : this.dbPools) {\n try {\n LOG.debug(\"String_Node_Str\" + dbPool.getAlias() + \"String_Node_Str\" + pollInterval + \"String_Node_Str\" + dbPool.getThreshold());\n if (dbPool.getMaximumConnections() - dbPool.getActiveConnections() < dbPool.getThreshold()) {\n if (!this.alreadyFaulted.contains(dbPool)) {\n FaultSubsystem.forComponent(this.componentIdClass).havingId(OUT_OF_DB_CONNECTIONS_FAULT_ID).withVar(\"String_Node_Str\", ComponentIds.lookup(componentIdClass).getFaultLogPrefix()).withVar(\"String_Node_Str\", dbPool.getAlias()).log();\n this.alreadyFaulted.add(dbPool);\n } else {\n }\n } else {\n this.alreadyFaulted.remove(dbPool);\n }\n } catch (Exception ex) {\n LOG.error(\"String_Node_Str\" + dbPool.getAlias(), ex);\n }\n }\n } else {\n }\n}\n"
"public void onResponse(Data response) {\n if (marked) {\n tryToPutNearCache(key, response);\n }\n}\n"
"public ContainerRequest filter(ContainerRequest request) {\n if (resourceConfig.getFeature(ResourceConfig.FEATURE_NORMALIZE_URI)) {\n final URI uri = request.getRequestUri();\n final URI normalizedUri = UriHelper.normalize(uri, !resourceConfig.getFeature(ResourceConfig.FEATURE_CANONICALIZE_URI_PATH));\n if (uri != normalizedUri) {\n if (resourceConfig.getFeature(ResourceConfig.FEATURE_REDIRECT)) {\n throw new WebApplicationException(Response.temporaryRedirect(normalizedUri).build());\n } else {\n final URI baseUri = UriHelper.normalize(request.getBaseUri(), !resourceConfig.getFeature(ResourceConfig.FEATURE_CANONICALIZE_URI_PATH));\n request.setUris(baseUri, normalizedUri);\n }\n }\n }\n return request;\n}\n"
"protected RecordsManagementAuditQueryParameters parseQueryParameters(WebScriptRequest req) {\n RecordsManagementAuditQueryParameters params = new RecordsManagementAuditQueryParameters();\n NodeRef nodeRef = null;\n Map<String, String> templateVars = req.getServiceMatch().getTemplateVars();\n String storeType = templateVars.get(\"String_Node_Str\");\n if (storeType != null && storeType.length() > 0) {\n String storeId = templateVars.get(\"String_Node_Str\");\n String nodeId = templateVars.get(\"String_Node_Str\");\n nodeRef = new NodeRef(new StoreRef(storeType, storeId), nodeId);\n }\n String size = null;\n String user = null;\n String event = null;\n String from = null;\n String to = null;\n String property = null;\n if (MimetypeMap.MIMETYPE_JSON.equals(req.getContentType())) {\n try {\n JSONObject json = new JSONObject(new JSONTokener(req.getContent().getContent()));\n if (json.has(PARAM_SIZE)) {\n size = json.getString(PARAM_SIZE);\n }\n if (json.has(PARAM_USER)) {\n user = json.getString(PARAM_USER);\n }\n if (json.has(PARAM_EVENT)) {\n event = json.getString(PARAM_EVENT);\n }\n if (json.has(PARAM_FROM)) {\n from = json.getString(PARAM_FROM);\n }\n if (json.has(PARAM_TO)) {\n to = json.getString(PARAM_TO);\n }\n if (json.has(PARAM_PROPERTY)) {\n property = json.getString(PARAM_PROPERTY);\n }\n } catch (IOException ioe) {\n if (logger.isWarnEnabled()) {\n logger.warn(\"String_Node_Str\" + ioe.getMessage());\n }\n } catch (JSONException je) {\n if (logger.isWarnEnabled()) {\n logger.warn(\"String_Node_Str\" + je.getMessage());\n }\n }\n } else {\n size = req.getParameter(PARAM_SIZE);\n user = req.getParameter(PARAM_USER);\n event = req.getParameter(PARAM_EVENT);\n from = req.getParameter(PARAM_FROM);\n to = req.getParameter(PARAM_TO);\n property = req.getParameter(PARAM_PROPERTY);\n }\n params.setNodeRef(nodeRef);\n params.setUser(user);\n params.setEvent(event);\n if (size != null && size.length() > 0) {\n try {\n params.setMaxEntries(Integer.parseInt(size));\n } catch (NumberFormatException nfe) {\n if (logger.isWarnEnabled()) {\n logger.warn(\"String_Node_Str\" + size + \"String_Node_Str\");\n }\n }\n }\n if (from != null && from.length() > 0) {\n try {\n SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_PATTERN);\n params.setDateFrom(dateFormat.parse(from));\n } catch (ParseException pe) {\n if (logger.isWarnEnabled()) {\n logger.warn(\"String_Node_Str\" + from + \"String_Node_Str\" + DATE_PATTERN);\n }\n }\n }\n if (to != null && to.length() > 0) {\n try {\n SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_PATTERN);\n params.setDateTo(dateFormat.parse(to));\n } catch (ParseException pe) {\n if (logger.isWarnEnabled()) {\n logger.warn(\"String_Node_Str\" + to + \"String_Node_Str\" + DATE_PATTERN);\n }\n }\n }\n if (property != null && property.length() > 0) {\n try {\n params.setProperty(QName.createQName(property, namespaceService));\n } catch (InvalidQNameException iqe) {\n if (logger.isWarnEnabled()) {\n logger.warn(\"String_Node_Str\" + property + \"String_Node_Str\");\n }\n }\n return params;\n}\n"
"public void sendControlMessage() {\n FlowStep flowStep = componentContext.getFlowStep();\n sendMessage(createMessage(new ControlMessage(flowStep.getId()), null, null, true));\n}\n"
"private AbstractCall resolveApply(MarkerList markers, IContext context) {\n IValue instance;\n IMethod method;\n IDataMember field = context.resolveField(this.name);\n if (field == null) {\n IClass iclass = IContext.resolveClass(context, this.name);\n if (iclass == null) {\n return null;\n }\n IMethod match = IContext.resolveMethod(iclass, null, Name.apply, this.arguments);\n if (match == null) {\n return null;\n }\n method = match;\n instance = new ClassAccess(this.position, new ClassType(iclass));\n } else {\n FieldAccess access = new FieldAccess(this.position);\n access.field = field;\n access.name = this.name;\n access.dotless = this.dotless;\n IMethod match = IContext.resolveMethod(field.getType(), access, Name.apply, this.arguments);\n if (match == null) {\n return null;\n }\n method = match;\n instance = access;\n }\n ApplyMethodCall call = new ApplyMethodCall(this.position);\n call.method = method;\n call.instance = instance;\n call.arguments = this.arguments;\n call.genericData = this.genericData;\n return call;\n}\n"
"public boolean apply(Future<?> arg0) {\n if (!arg0.isDone()) {\n try {\n arg0.get(100, TimeUnit.MILLISECONDS);\n } catch (InterruptedException ex) {\n Thread.currentThread().interrupt();\n } catch (ExecutionException ex) {\n LOG.error(ex);\n } catch (TimeoutException ex) {\n }\n return arg0.isDone();\n }\n}\n"
"private void goForward(int count) {\n for (int i = 0; i < count; ++i) {\n if (!nextMove()) {\n break;\n }\n }\n}\n"
"public void run() {\n scheduledTaskMap.remove(second);\n final Map<Object, ScheduledEntry<K, V>> entries = scheduledEntries.remove(second);\n if (entries == null || entries.isEmpty()) {\n return;\n }\n List<ScheduledEntry<K, V>> values = new ArrayList<ScheduledEntry<K, V>>(entries.size());\n for (Map.Entry<Object, ScheduledEntry<K, V>> entry : entries.entrySet()) {\n Integer removed = secondsOfKeys.remove(entry.getKey());\n if (removed != null) {\n values.add(entry.getValue());\n }\n }\n entryProcessor.process(SecondsBasedEntryTaskScheduler.this, sortForEntryProcessing(values));\n}\n"
"private static SequenceAnnotation parseSequenceAnnotationV1(SBOLDocument SBOLDoc, NestedDocument<QName> sequenceAnnotation, List<SBOLPair> precedePairs, URI parentURI, int sa_num) {\n Integer start = null;\n Integer end = null;\n String strand = null;\n URI componentURI = null;\n URI identity = sequenceAnnotation.getIdentity();\n List<Annotation> annotations = new ArrayList<Annotation>();\n if (setURIPrefix != null) {\n persIdentity = parentURI + \"String_Node_Str\" + sa_num;\n identity = URI.create(persIdentity + \"String_Node_Str\");\n }\n for (NamedProperty<QName> namedProperty : sequenceAnnotation.getProperties()) {\n if (namedProperty.getName().equals(Sbol1Terms.SequenceAnnotations.bioStart)) {\n String temp = ((Literal<QName>) namedProperty.getValue()).getValue().toString();\n start = Integer.parseInt(temp);\n } else if (namedProperty.getName().equals(Sbol1Terms.SequenceAnnotations.bioEnd)) {\n String temp2 = ((Literal<QName>) namedProperty.getValue()).getValue().toString();\n end = Integer.parseInt(temp2);\n } else if (namedProperty.getName().equals(Sbol1Terms.SequenceAnnotations.strand)) {\n strand = ((Literal<QName>) namedProperty.getValue()).getValue().toString();\n } else if (namedProperty.getName().equals(Sbol1Terms.SequenceAnnotations.subComponent)) {\n componentURI = parseDnaComponentV1(SBOLDoc, (NestedDocument<QName>) namedProperty.getValue()).getIdentity();\n } else if (namedProperty.getName().equals(Sbol1Terms.SequenceAnnotations.precedes)) {\n URI left = sequenceAnnotation.getIdentity();\n URI right = URI.create(((Literal<QName>) namedProperty.getValue()).getValue().toString());\n SBOLPair pair = new SBOLPair(left, right);\n precedePairs.add(pair);\n } else {\n annotations.add(new Annotation(namedProperty));\n }\n }\n Location location = null;\n if (start != null && end != null) {\n URI range_identity = URI.create(getParentURI(identity) + \"String_Node_Str\");\n Range r = new Range(range_identity, start, end);\n if (strand != null) {\n if (strand.equals(\"String_Node_Str\")) {\n r.setOrientation(Sbol2Terms.Orientation.inline);\n } else if (strand.equals(\"String_Node_Str\")) {\n r.setOrientation(Sbol2Terms.Orientation.reverseComplement);\n }\n location = r;\n }\n } else {\n URI dummyGenericLoc_id = URI.create(getParentURI(identity) + \"String_Node_Str\");\n GenericLocation dummyGenericLoc = new GenericLocation(dummyGenericLoc_id);\n if (strand != null) {\n if (strand.equals(\"String_Node_Str\")) {\n dummyGenericLoc.setOrientation(Sbol2Terms.Orientation.inline);\n } else if (strand.equals(\"String_Node_Str\")) {\n dummyGenericLoc.setOrientation(Sbol2Terms.Orientation.reverseComplement);\n }\n location = dummyGenericLoc;\n }\n }\n SequenceAnnotation s = new SequenceAnnotation(identity, location);\n if (identity != sequenceAnnotation.getIdentity())\n s.setWasDerivedFrom(sequenceAnnotation.getIdentity());\n if (componentURI != null)\n s.setComponent(componentURI);\n if (!annotations.isEmpty())\n s.setAnnotations(annotations);\n return s;\n}\n"
"public void init() {\n UUID id = getWidget().id;\n playlist = PlaylistManager.playlists.getOr(id, getUnusedPlaylist(id));\n PlaylistManager.playlists.add(playlist);\n d(() -> PlaylistManager.playlists.remove(playlist));\n outSelected = outputs.create(widget.id, \"String_Node_Str\", Item.class, null);\n outPlaying = outputs.create(widget.id, \"String_Node_Str\", Item.class, null);\n d(Player.playlistSelected.i.bind(outSelected));\n d(maintain(playlist.playingI, ι -> playlist.getPlaying(), outPlaying));\n d(Player.onItemRefresh(ms -> {\n if (outPlaying.getValue() != null)\n ms.ifHasK(outPlaying.getValue().getURI(), m -> outPlaying.setValue(m.toPlaylist()));\n if (outSelected.getValue() != null)\n ms.ifHasK(outSelected.getValue().getURI(), m -> outSelected.setValue(m.toPlaylist()));\n }));\n table = new PlaylistTable(playlist);\n root.getChildren().add(table.getRoot());\n setAnchors(table.getRoot(), 0d);\n table.setFixedCellSize(gui.GUI.font.getValue().getSize() + 5);\n table.getSelectionModel().setSelectionMode(MULTIPLE);\n d(maintain(orient, table.nodeOrientationProperty()));\n d(maintain(zeropad, table.zeropadIndex));\n d(maintain(orig_index, table.showOriginalIndex));\n d(maintain(show_header, table.headerVisible));\n d(maintain(show_footer, table.footerVisible));\n table.items_info.textFactory = (all, list) -> {\n double Σms = list.stream().mapToDouble(PlaylistItem::getTimeMs).sum();\n return DEFAULT_TEXT_FACTORY.apply(all, list) + \"String_Node_Str\" + new FormattedDuration(Σms);\n };\n table.menuAdd.getItems().addAll(menuItem(\"String_Node_Str\", PlaylistManager::chooseFilestoAdd), menuItem(\"String_Node_Str\", PlaylistManager::chooseFoldertoAdd), menuItem(\"String_Node_Str\", PlaylistManager::chooseUrltoAdd), menuItem(\"String_Node_Str\", PlaylistManager::chooseFilesToPlay), menuItem(\"String_Node_Str\", PlaylistManager::chooseFolderToPlay), menuItem(\"String_Node_Str\", PlaylistManager::chooseUrlToPlay), menuItem(\"String_Node_Str\", () -> playlist.duplicateItemsByOne(table.getSelectedItems())), menuItem(\"String_Node_Str\", () -> playlist.duplicateItemsAsGroup(table.getSelectedItems())));\n table.menuRemove.getItems().addAll(menuItem(\"String_Node_Str\", () -> playlist.removeAll(table.getSelectedItems())), menuItem(\"String_Node_Str\", () -> playlist.retainAll(table.getSelectedItems())), menuItem(\"String_Node_Str\", playlist::removeUnplayable), menuItem(\"String_Node_Str\", playlist::removeDuplicates), menuItem(\"String_Node_Str\", playlist::clear));\n table.menuOrder.getItems().addAll(menuItem(\"String_Node_Str\", playlist::reverse), menuItem(\"String_Node_Str\", playlist::randomize), menuItem(\"String_Node_Str\", () -> WidgetManager.use(SongReader.class, NO_LAYOUT, w -> w.read(table.getSelectedItems()))), menuItem(\"String_Node_Str\", this::saveSelectedAsPlaylist), menuItem(\"String_Node_Str\", this::savePlaylist));\n Menu sortM = new Menu(\"String_Node_Str\");\n for (Field f : Field.values()) sortM.getItems().add(menuItem(f.toStringEnum(), () -> table.sortBy(f)));\n table.menuOrder.getItems().add(0, sortM);\n root.setOnScroll(Event::consume);\n table.getSelectionModel().selectedItemProperty().addListener((o, ov, nv) -> {\n if (!table.movingitems)\n outSelected.setValue(nv);\n });\n d(table::dispose);\n}\n"
"void wakeup(TaskRecord task, boolean flush) {\n synchronized (this) {\n if (task != null) {\n int queueNdx;\n for (queueNdx = mWriteQueue.size() - 1; queueNdx >= 0; --queueNdx) {\n final WriteQueueItem item = mWriteQueue.get(queueNdx);\n if (item instanceof TaskWriteQueueItem && ((TaskWriteQueueItem) item).mTask == task) {\n if (!task.inRecents) {\n removeThumbnails(task);\n }\n break;\n }\n }\n if (queueNdx < 0 && task.isPersistable) {\n mWriteQueue.add(new TaskWriteQueueItem(task));\n }\n } else {\n mWriteQueue.add(new WriteQueueItem());\n }\n if (flush || mWriteQueue.size() > MAX_WRITE_QUEUE_LENGTH) {\n mNextWriteTime = FLUSH_QUEUE;\n } else if (mNextWriteTime == 0) {\n mNextWriteTime = SystemClock.uptimeMillis() + PRE_TASK_DELAY_MS;\n }\n if (DEBUG)\n Slog.d(TAG, \"String_Node_Str\" + task + \"String_Node_Str\" + flush + \"String_Node_Str\" + mNextWriteTime + \"String_Node_Str\" + mWriteQueue.size() + \"String_Node_Str\" + Debug.getCallers(4));\n notifyAll();\n }\n yieldIfQueueTooDeep();\n}\n"
"public void onModuleReady(ModuleSpace readySpace) throws UnableToCompleteException {\n this.space = readySpace;\n SourceOracle srcOracle = new HostedModeSourceOracle(typeOracle, module.getName());\n ByteCodeCompiler compiler = getOrCreateByteCodeCompiler(srcOracle);\n ModuleSpacePropertyOracle propOracle = new ModuleSpacePropertyOracle(module.getProperties(), readySpace);\n Rules rules = module.getRules();\n rebindOracle = new StandardRebindOracle(typeOracle, propOracle, rules, genDir, outDir, module.getCacheManager());\n classLoader = new CompilingClassLoader(logger, compiler);\n}\n"
"public static org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemComponent convertQuestionnaireItemComponent(org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.dstu2016may.model.Questionnaire.QuestionnaireItemComponent();\n copyElement(src, tgt);\n tgt.setLinkId(src.getLinkId());\n for (org.hl7.fhir.dstu3.model.Coding t : src.getConcept()) tgt.addConcept(convertCoding(t));\n tgt.setPrefix(src.getPrefix());\n tgt.setText(src.getText());\n tgt.setType(convertQuestionnaireItemType(src.getType()));\n for (org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemEnableWhenComponent t : src.getEnableWhen()) tgt.addEnableWhen(convertQuestionnaireItemEnableWhenComponent(t));\n tgt.setRequired(src.getRequired());\n tgt.setRepeats(src.getRepeats());\n tgt.setReadOnly(src.getReadOnly());\n tgt.setMaxLength(src.getMaxLength());\n tgt.setOptions(convertReference(src.getOptions()));\n for (org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemOptionComponent t : src.getOption()) tgt.addOption(convertQuestionnaireItemOptionComponent(t));\n tgt.setInitial(convertType(src.getInitial()));\n for (org.hl7.fhir.dstu3.model.Questionnaire.QuestionnaireItemComponent t : src.getItem()) tgt.addItem(convertQuestionnaireItemComponent(t));\n return tgt;\n}\n"
"private static int CommandLineError(String msg) {\n PcalDebug.reportError(\"String_Node_Str\" + msg + \"String_Node_Str\");\n return STATUS_EXIT_WITH_ERRORS;\n}\n"
"public static IRepositoryViewObject getRepositoryObjectById(final String id, boolean withDeleted) {\n if (id == null || \"String_Node_Str\".equals(id) || RepositoryNode.NO_ID.equals(id)) {\n return null;\n }\n IProxyRepositoryFactory factory = CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();\n try {\n IRepositoryViewObject lastVersion = factory.getLastVersion(id);\n return lastVersion;\n } catch (PersistenceException e) {\n }\n return null;\n}\n"
"public static void main(String[] args) {\n Interval[] intervals = new Interval[6];\n intervals[0] = new Interval(0, 2, 3);\n intervals[1] = new Interval(2, 6, 3);\n intervals[2] = new Interval(4, 8, 8);\n intervals[3] = new Interval(5, 9, 10);\n intervals[4] = new Interval(6, 10, 9);\n intervals[5] = new Interval(7, 11, 8);\n HorizonMapping hm = new HorizonMapping();\n Deque<Interval> ll = hm.mergeInterval(intervals);\n Iterator<Interval> itr = ll.iterator();\n while (itr.hasNext()) {\n System.out.println(itr.next());\n }\n}\n"
"public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) {\n if (isMaster()) {\n int recieved = maxReceive;\n if (recieved > maxEnergy - energy)\n recieved = maxEnergy - energy;\n if (!simulate)\n energy += recieved;\n return recieved;\n } else {\n if (master == null)\n findMaster();\n if (master != null)\n return master.receiveEnergy(from, maxReceive, simulate);\n }\n return 0;\n}\n"
"public void testValidExampleMediaTypeValidator() {\n mediaType.setExample(\"String_Node_Str\");\n validator.validate(validationHelper, context, mediaType);\n Assert.assertEquals(0, validationHelper.getEventsSize());\n}\n"
"public void processOwnershipEvent(OwnershipEvent<?, ?> event) {\n Node affectedNode = getAffectedNode(event);\n LibraryNode ln = (LibraryNode) thisNode;\n switch(event.getType()) {\n case MEMBER_ADDED:\n if (affectedNode == null)\n return;\n if (affectedNode instanceof ContextualFacetNode)\n if (!((ContextualFacetNode) affectedNode).canBeLibraryMember())\n break;\n ln.getChildrenHandler().add(affectedNode);\n break;\n case MEMBER_REMOVED:\n if (affectedNode == null || affectedNode.getParent() == null)\n return;\n clearAssignedTypes(affectedNode);\n ln.getChildrenHandler().remove(affectedNode);\n break;\n default:\n break;\n }\n}\n"
"protected int executeCommand() throws CommandException {\n try {\n nodeDir = nodeDir0;\n node = node0;\n File serverDir = new File(nodeDir, node);\n if (!serverDir.isDirectory()) {\n throw new CommandException(strings.get(\"String_Node_Str\", serverDir));\n }\n ArrayList<String> serverNames = getInstanceDirs(serverDir);\n for (String serverName : serverNames) if (isRunning(serverDir, serverName))\n throw new CommandException(strings.get(\"String_Node_Str\", serverName));\n oldPassword = passwords.get(\"String_Node_Str\");\n if (oldPassword == null) {\n oldPassword = super.readPassword(strings.get(\"String_Node_Str\"));\n }\n if (oldPassword == null)\n throw new CommandException(strings.get(\"String_Node_Str\"));\n boolean valid = true;\n for (String instanceDir0 : getInstanceDirs(nodeDirChild)) {\n valid &= verifyInstancePassword(new File(nodeDirChild, instanceDir0));\n }\n if (!valid) {\n throw new CommandException(strings.get(\"String_Node_Str\"));\n }\n ParamModelData nmpo = new ParamModelData(\"String_Node_Str\", String.class, false, null);\n nmpo.prompt = strings.get(\"String_Node_Str\");\n nmpo.promptAgain = strings.get(\"String_Node_Str\");\n nmpo.param._password = true;\n newPassword = super.getPassword(nmpo, null, true);\n for (String instanceDir2 : getInstanceDirs(nodeDirChild)) {\n encryptKeystore(instanceDir2);\n }\n if (savemp) {\n createMasterPasswordFile();\n }\n return 0;\n } catch (Exception e) {\n throw new CommandException(e.getMessage(), e);\n }\n}\n"
"protected void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n mInnerRectF.set(0, 0, mViewSize, mViewSize);\n mInnerRectF.offset((getWidth() - mViewSize) / 2, (getHeight() - mViewSize) / 2);\n if (mShowStroke) {\n final int halfBorder = (int) (mStrokePaint.getStrokeWidth() / 2f + 0.5f);\n mInnerRectF.inset(halfBorder, halfBorder);\n }\n float centerX = mInnerRectF.centerX();\n float centerY = mInnerRectF.centerY();\n canvas.drawArc(mInnerRectF, 0, 360, true, mBackgroundPaint);\n switch(mProgressFillType) {\n case FILL_TYPE_RADIAL:\n float sweepAngle = 360 * mProgress / mMax;\n canvas.drawArc(mInnerRectF, mStartAngle, sweepAngle, true, mProgressPaint);\n break;\n case FILL_TYPE_CENTER:\n float radius = (mViewSize / 2) * ((float) mProgress / mMax);\n canvas.drawCircle(centerX, centerY, radius + 0.5f - mStrokePaint.getStrokeWidth(), mProgressPaint);\n break;\n default:\n throw new IllegalArgumentException(\"String_Node_Str\" + mProgressFillType);\n }\n if (!TextUtils.isEmpty(mText) && mShowText) {\n if (!TextUtils.isEmpty(mTypeface)) {\n Typeface typeface = sTypefaceCache.get(mTypeface);\n if (null == typeface && null != getResources()) {\n AssetManager assets = getResources().getAssets();\n if (null != assets) {\n typeface = Typeface.createFromAsset(assets, mTypeface);\n sTypefaceCache.put(mTypeface, typeface);\n }\n }\n mTextPaint.setTypeface(typeface);\n }\n int xPos = (int) centerX;\n int yPos = (int) (centerY - (mTextPaint.descent() + mTextPaint.ascent()) / 2);\n canvas.drawText(mText, xPos, yPos, mTextPaint);\n }\n if (null != mImage && mShowImage) {\n int drawableSize = mImage.getIntrinsicWidth();\n mImageRect.set(0, 0, drawableSize, drawableSize);\n mImageRect.offset((getWidth() - drawableSize) / 2, (getHeight() - drawableSize) / 2);\n mImage.setBounds(mImageRect);\n mImage.draw(canvas);\n }\n if (mShowStroke) {\n canvas.drawOval(mInnerRectF, mStrokePaint);\n }\n}\n"
"public <T extends ConfigBeanProxy> NotProcessed changed(TYPE type, Class<T> tc, T t) {\n NotProcessed result = null;\n if (tc == Profiler.class) {\n result = new NotProcessed(\"String_Node_Str\");\n } else if (tc == Property.class && t.getParent().getClass() == JavaConfig.class) {\n result = new NotProcessed(\"String_Node_Str\");\n } else if (tc == JavaConfig.class && t instanceof JavaConfig) {\n final JavaConfig njc = (JavaConfig) t;\n logFine(type, njc);\n final List<String> curProps = new ArrayList<String>(njc.getJvmOptions());\n final boolean jvmOptionsWereChanged = !oldProps.equals(curProps);\n final List<String> reasons = handle(oldProps, curProps);\n oldProps = curProps;\n final Map<String, String> curAttrs = collectAttrs(njc);\n reasons.addAll(handleAttrs(oldAttrs, curAttrs));\n oldAttrs = curAttrs;\n result = reasons.isEmpty() ? null : new NotProcessed(CombinedJavaConfigSystemPropertyListener.toString(reasons));\n } else if (tc == SystemProperty.class) {\n final SystemProperty sp = (SystemProperty) t;\n ConfigBeanProxy proxy = sp.getParent();\n ConfigView p = ConfigSupport.getImpl(proxy);\n if (p == ConfigSupport.getImpl(server) || p == ConfigSupport.getImpl(config) || (cluster != null && p == ConfigSupport.getImpl(cluster)) || p == ConfigSupport.getImpl(domain)) {\n String pname = sp.getName();\n if (referencesProperty(pname, oldProps) || referencesProperty(pname, oldAttrs.values())) {\n result = new NotProcessed(\"String_Node_Str\" + pname + \"String_Node_Str\");\n }\n }\n if (type == TYPE.ADD || type == TYPE.CHANGE) {\n if (proxy instanceof Domain) {\n return addToDomain(sp);\n } else if (proxy instanceof Config) {\n return addToConfig(sp);\n } else if (proxy instanceof Cluster) {\n return addToCluster(sp);\n } else {\n if (proxy instanceof Server) {\n Server changedServer = (Server) proxy;\n String changedServerName = changedServer.getName();\n String thisServerName = server.getName();\n if (changedServerName.equals(thisServerName)) {\n return addToServer(sp);\n }\n }\n }\n } else if (type == TYPE.REMOVE) {\n if (proxy instanceof Domain) {\n return removeFromDomain(sp);\n } else if (proxy instanceof Config) {\n return removeFromConfig(sp);\n } else if (proxy instanceof Cluster) {\n return removeFromCluster(sp);\n } else {\n return removeFromServer(sp);\n }\n }\n } else {\n }\n return result;\n}\n"
"public void createResourceRef(String jndiName, String enabled, String target) throws TransactionFailure {\n if (target.equals(DOMAIN)) {\n return;\n }\n if (domain.getConfigNamed(target) != null) {\n return;\n }\n Server server = configBeansUtilities.getServerNamed(target);\n if (server != null) {\n if (!server.isResourceRefExists(jndiName)) {\n server.createResourceRef(enabled, jndiName);\n }\n } else {\n Cluster cluster = domain.getClusterNamed(target);\n if (cluster != null) {\n if (!cluster.isResourceRefExists(jndiName)) {\n cluster.createResourceRef(enabled, jndiName);\n Target tgt = targetProvider.get();\n List<Server> instances = tgt.getInstances(target);\n for (Server svr : instances) {\n if (!svr.isResourceRefExists(jndiName)) {\n svr.createResourceRef(enabled, jndiName);\n }\n }\n }\n }\n }\n}\n"
"public AssetUri getPrefabURI() {\n if (exists()) {\n EntityInfoComponent info = getComponent(EntityInfoComponent.class);\n if (info != null && info.parentPrefab.exists()) {\n return new AssetUri(AssetType.PREFAB, info.parentPrefab.getName());\n }\n }\n return null;\n}\n"
"public String getPrefix(String worldName) {\n String localPrefix = this.getOwnPrefix(worldName);\n if (localPrefix == null || localPrefix.isEmpty()) {\n for (PermissionGroup group : this.getParentGroups(worldName)) {\n localPrefix = group.getPrefix();\n if (localPrefix != null && !localPrefix.isEmpty()) {\n break;\n }\n }\n }\n if (localPrefix == null) {\n localPrefix = \"String_Node_Str\";\n }\n return localPrefix;\n}\n"
"public void setData(String author, long createdUtc, String domain, int downs, int likes, long nowTimeMs, int numComments, boolean over18, String parentSubreddit, int score, String subreddit, int thingBodyWidth, String thingId, String thumbnailUrl, String title, int ups) {\n this.likes = likes;\n this.thingBodyWidth = thingBodyWidth;\n this.thingId = thingId;\n this.thumbnailUrl = thumbnailUrl;\n this.title = title;\n this.scoreText = VotingArrows.getScoreText(score);\n this.statusText = getStatusText(getContext(), author, createdUtc, nowTimeMs, numComments, over18, parentSubreddit, subreddit);\n this.longDetailsText = getContext().getString(R.string.thing_details, ups, downs, domain);\n this.shortDetailsText = domain;\n requestLayout();\n}\n"
"private void writeCollection(final MappedField mf, final DBObject dbObject, Map<Object, DBObject> involvedObjects, String name, Object fieldValue, Mapper mapr) {\n Iterable coll = null;\n if (fieldValue != null)\n if (mf.isArray)\n coll = Arrays.asList((Object[]) fieldValue);\n else\n coll = (Iterable) fieldValue;\n if (coll != null) {\n List values = new ArrayList();\n for (Object o : coll) {\n if (null == o)\n values.add(null);\n else if (mapr.converters.hasSimpleValueConverter(mf) || mapr.converters.hasSimpleValueConverter(o.getClass()))\n values.add(mapr.converters.encode(o));\n else {\n Object val;\n if (Collection.class.isAssignableFrom(o.getClass()) || Map.class.isAssignableFrom(o.getClass()))\n val = mapr.toMongoObject(o, true);\n else\n val = mapr.toDBObject(o, involvedObjects);\n if (!shouldSaveClassName(o, val, mf))\n ((DBObject) val).removeField(Mapper.CLASS_NAME_FIELDNAME);\n values.add(val);\n }\n }\n if (values.size() > 0 || mapr.getOptions().storeEmpties) {\n dbObject.put(name, values);\n }\n }\n}\n"
"private BigInteger toWei(PendingFundCommand command) {\n final TokenInfoDto tokenInfo = tokenInfoService.getTokenInfo(command.getTokenAddress());\n return EthUtil.toWei(new BigDecimal(command.getAmount()), tokenInfo.getDecimals()).toBigInteger();\n}\n"
"public void createApplicationClusters(String appId, ApplicationClusterContextDTO[] appClustersContexts) throws ApplicationClusterRegistrationException {\n if (appClustersContexts == null || appClustersContexts.length == 0) {\n String errorMsg = \"String_Node_Str\";\n LOG.error(errorMsg);\n throw new ApplicationClusterRegistrationException(errorMsg);\n }\n List<Cluster> clusters = new ArrayList<Cluster>();\n for (ApplicationClusterContextDTO appClusterCtxt : appClustersContexts) {\n dataHolder.addClusterContext(new ClusterContext(appClusterCtxt.getClusterId(), appClusterCtxt.getCartridgeType(), appClusterCtxt.getTextPayload(), appClusterCtxt.getHostName(), appClusterCtxt.isLbCluster(), appClusterCtxt.getProperties()));\n Cluster newCluster = new Cluster(appClusterCtxt.getCartridgeType(), appClusterCtxt.getClusterId(), appClusterCtxt.getDeploymentPolicyName(), appClusterCtxt.getAutoscalePolicyName(), appId);\n newCluster.setLbCluster(false);\n newCluster.setTenantRange(appClusterCtxt.getTenantRange());\n newCluster.setStatus(ClusterStatus.Created);\n newCluster.setHostNames(Arrays.asList(appClusterCtxt.getHostName()));\n Cartridge cartridge = dataHolder.getCartridge(appClusterCtxt.getCartridgeType());\n if (cartridge.getDeployerType() != null && cartridge.getDeployerType().equals(StratosConstants.KUBERNETES_DEPLOYER_TYPE)) {\n newCluster.setKubernetesCluster(true);\n }\n clusters.add(newCluster);\n }\n}\n"
"public DataSet evaluate(DataSetDefinition dataSetDefinition, EvaluationContext context) {\n context = ObjectUtil.nvl(context, new EvaluationContext());\n if (context.getBaseCohort() == null) {\n context.setBaseCohort(Context.getPatientSetService().getAllPatients());\n }\n MapDataSet data = new MapDataSet(dataSetDefinition, context);\n CohortDataSetDefinition dsd = (CohortDataSetDefinition) dataSetDefinition;\n CohortDefinitionService cds = Context.getService(CohortDefinitionService.class);\n for (CohortDataSetColumn col : dsd.getDataSetColumns()) {\n Cohort rowCohort = (col.getRowDefinition() == null ? context.getBaseCohort() : cds.evaluate(col.getRowDefinition(), context));\n Cohort colCohort = (col.getColumnDefinition() == null ? context.getBaseCohort() : cds.evaluate(col.getColumnDefinition(), context));\n Cohort c = Cohort.intersect(rowCohort, colCohort);\n data.addData(col, c);\n }\n return data;\n}\n"
"protected Control createDialogArea(Composite parent) {\n Composite composite = (Composite) super.createDialogArea(parent);\n Composite comp = new Composite(composite, SWT.NONE);\n comp.setLayoutData(new GridData(GridData.FILL_BOTH));\n comp.setLayout(new FormLayout());\n Element element = new FakeElement(form.getName());\n dynamicComposite = new DynamicComposite(comp, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS, EComponentCategory.BASIC, element, true, form, true);\n FormData data = new FormData();\n data.left = new FormAttachment(0, 0);\n data.right = new FormAttachment(100, 0);\n data.top = new FormAttachment(0, 0);\n data.bottom = new FormAttachment(100, 0);\n dynamicComposite.setLayoutData(data);\n dynamicComposite.setConnectionItem(connectionItem);\n init();\n return parent;\n}\n"
"public boolean execute() {\n GraphModel graphModel = workspace.getLookup().lookup(GraphModel.class);\n HierarchicalGraph graph = null;\n if (exportVisible) {\n graph = graphModel.getGraphVisible();\n } else {\n graph = graphModel.getGraph();\n }\n try {\n exportData(graph);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n return !cancel;\n}\n"
"public Response execute() {\n DatabaseAccessor db = null;\n try {\n db = initDB();\n db.addExperiment(name);\n for (Annotation annotation : annotations) {\n db.annotateExperiment(name, annotation.getName(), annotation.getValue());\n }\n return new MinimalResponse(HttpStatusCode.CREATED);\n } catch (IOException | SQLException e) {\n e.printStackTrace();\n Debug.log(\"String_Node_Str\" + name + \"String_Node_Str\" + e.getMessage());\n return new ErrorResponse(HttpStatusCode.INTERNAL_SERVER_ERROR, \"String_Node_Str\" + name + \"String_Node_Str\");\n } finally {\n if (db != null) {\n db.close();\n }\n }\n}\n"
"public boolean isValid() {\n boolean init = this.validateUUID(this.annotation.getUuid()) && this.printStatus(\"String_Node_Str\", this.annotation.isSetArgumentList()) && this.printStatus(\"String_Node_Str\", this.annotation.getArgumentListSize() > 0) && this.printStatus(\"String_Node_Str\", this.annotation.isSetSituationType());\n if (!init)\n return false;\n else {\n return true;\n }\n}\n"
"public Iterator<T> getNormalSuccessors(final T ret) {\n Iterator<? extends Object> allPreds = delegate.getPredNodes(ret);\n Filter sameProc = new Filter<T>() {\n\n public boolean accepts(Object o) {\n return getProcOf(ret).equals(getProcOf((T) o));\n }\n };\n Iterator<Object> sameProcPreds = new FilterIterator<Object>(allPreds, sameProc);\n Filter notCall = new Filter() {\n public boolean accepts(Object o) {\n return !delegate.isCall((T) o);\n }\n };\n return new FilterIterator<T>(sameProcPreds, notCall);\n}\n"
"public void activityCreated(Activity activity) {\n if (android.os.Build.VERSION.SDK_INT < 14) {\n activityCreatedCallback(activity);\n }\n}\n"
"public void onAfterAuthenticate(IOCContainer container) {\n super.onAfterAuthenticate(container);\n sliderFactory = container.getBean(\"String_Node_Str\");\n if (sliderFactory != null) {\n slider = sliderFactory.wrap(this, ZOrder.BEHIND, 0);\n }\n}\n"
"private static Driver getClassDriver(String driverClassName, String url, Properties props) throws InstantiationException, IllegalAccessException {\n Driver driver = ExtractMetaDataUtils.getInstance().getDriverCache().get(driverClassName);\n if (driver == null) {\n driver = MetadataConnectionUtils.getDriverCache().get(driverClassName);\n }\n if (driver != null) {\n return driver;\n }\n driver = getClassDriverFromSQLExplorer(driverClassName);\n if (driver != null) {\n return driver;\n }\n try {\n driver = (Driver) Class.forName(driverClassName).newInstance();\n } catch (ClassNotFoundException e) {\n driver = findDriverByLibManageSystem(driverClassName, props);\n }\n return driver;\n}\n"
"public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) {\n ImmutablePluginModel plugin = (ImmutablePluginModel) getItem(position);\n if (plugin == null) {\n return;\n }\n PluginViewHolder holder = (PluginViewHolder) viewHolder;\n holder.mName.setText(plugin.getDisplayName());\n holder.mAuthor.setText(plugin.getAuthorName());\n holder.mIcon.setImageUrl(plugin.getIcon(), WPNetworkImageView.ImageType.PLUGIN_ICON);\n if (plugin.isInstalled()) {\n int textResId;\n int colorResId;\n int drawableResId;\n if (PluginUtils.isAutoManaged(mViewModel.getSite(), plugin)) {\n textResId = R.string.plugin_auto_managed;\n colorResId = R.color.alert_green;\n drawableResId = R.color.transparent;\n } else if (PluginUtils.isUpdateAvailable(plugin)) {\n textResId = R.string.plugin_needs_update;\n colorResId = R.color.alert_yellow;\n drawableResId = R.drawable.plugin_update_available_icon;\n } else if (plugin.isActive()) {\n textResId = R.string.plugin_active;\n colorResId = R.color.alert_green;\n drawableResId = R.drawable.ic_checkmark_green_24dp;\n } else {\n textResId = R.string.plugin_inactive;\n colorResId = R.color.grey;\n drawableResId = R.drawable.ic_cross_grey_600_24dp;\n }\n holder.mStatusText.setText(textResId);\n holder.mStatusText.setTextColor(getResources().getColor(colorResId));\n holder.mStatusIcon.setImageResource(drawableResId);\n holder.mStatusText.setVisibility(View.VISIBLE);\n holder.mStatusIcon.setVisibility(View.VISIBLE);\n holder.mRatingBar.setVisibility(View.GONE);\n } else {\n holder.mStatusText.setVisibility(View.GONE);\n holder.mStatusIcon.setVisibility(View.GONE);\n holder.mRatingBar.setVisibility(View.VISIBLE);\n holder.mRatingBar.setRating(plugin.getAverageStarRating());\n }\n if (position == getItemCount() - 1) {\n mViewModel.loadMore(mListType);\n }\n}\n"
"public static CubeConfiguration fromMap(Map<String, String> map) {\n CubeConfiguration cubeConfiguration = new CubeConfiguration();\n if (map.containsKey(DOCKER_VERSION)) {\n cubeConfiguration.dockerServerVersion = map.get(DOCKER_VERSION);\n }\n if (map.containsKey(DOCKER_URI)) {\n cubeConfiguration.dockerServerUri = map.get(DOCKER_URI);\n }\n if (map.containsKey(BOOT2DOCKER_PATH)) {\n cubeConfiguration.boot2DockerPath = map.get(BOOT2DOCKER_PATH);\n }\n if (map.containsKey(USERNAME)) {\n cubeConfiguration.username = map.get(USERNAME);\n }\n if (map.containsKey(PASSWORD)) {\n cubeConfiguration.password = map.get(PASSWORD);\n }\n if (map.containsKey(EMAIL)) {\n cubeConfiguration.email = map.get(EMAIL);\n }\n if (map.containsKey(CERT_PATH)) {\n cubeConfiguration.certPath = map.get(CERT_PATH);\n }\n if (map.containsKey(DOCKER_REGISTRY)) {\n cubeConfiguration.dockerRegistry = map.get(DOCKER_REGISTRY);\n }\n if (map.containsKey(DOCKER_CONTAINERS)) {\n String content = map.get(DOCKER_CONTAINERS);\n cubeConfiguration.dockerContainersContent = ConfigUtil.applyExtendsRules((Map<String, Object>) new Yaml().load(content));\n }\n if (map.containsKey(DOCKER_CONTAINERS_FILE)) {\n String location = map.get(DOCKER_CONTAINERS_FILE);\n try {\n cubeConfiguration.dockerContainersContent = ConfigUtil.applyExtendsRules((Map<String, Object>) new Yaml().load(new FileInputStream(location)));\n } catch (FileNotFoundException e) {\n throw new IllegalArgumentException(e);\n }\n }\n if (map.containsKey(AUTO_START_CONTAINERS)) {\n cubeConfiguration.autoStartContainers = ConfigUtil.trim(map.get(AUTO_START_CONTAINERS).split(\"String_Node_Str\"));\n }\n if (map.containsKey(CONNECTION_MODE)) {\n cubeConfiguration.connectionMode = ConnectionMode.valueOf(ConnectionMode.class, map.get(CONNECTION_MODE));\n }\n return cubeConfiguration;\n}\n"
"private void removeAuthorityLocked(Account account, String authorityName) {\n AccountInfo accountInfo = mAccounts.get(account);\n if (accountInfo != null) {\n final AuthorityInfo authorityInfo = accountInfo.authorities.remove(authorityName);\n if (authorityInfo != null) {\n mAuthorities.remove(authorityInfo.ident);\n writeAccountInfoLocked();\n }\n }\n}\n"
"public Response getDeploymentTest(final String csar, final String servicetemplate, final Integer id, final Integer deploymenttest) {\n final CSARContent csarContent = this.csarService.findById(csar);\n if (!this.csarService.hasServiceTemplate(csarContent.getCSARID(), servicetemplate)) {\n logger.info(\"String_Node_Str\" + servicetemplate + \"String_Node_Str\");\n throw new NotFoundException(\"String_Node_Str\" + servicetemplate + \"String_Node_Str\");\n }\n final ServiceTemplateInstance sti = new ServiceTemplateInstanceRepository().find(Long.valueOf(id)).orElse(null);\n if (sti == null) {\n logger.info(\"String_Node_Str\" + id + \"String_Node_Str\" + this.serviceTemplateId + \"String_Node_Str\");\n throw new NotFoundException(\"String_Node_Str\" + id + \"String_Node_Str\" + this.serviceTemplateId + \"String_Node_Str\");\n }\n final DeploymentTest object = new DeploymentTestRepository().find(Long.valueOf(deploymenttest)).orElse(null);\n if (object == null) {\n throw new NotFoundException();\n }\n final ResourceDecorator response = new ResourceDecorator();\n response.setObject(object);\n response.add(Link.fromUri(UriUtil.encode(this.uriInfo.getAbsolutePath())).rel(\"String_Node_Str\").build());\n return Response.ok(response).build();\n}\n"
"public void testCursorModel6() throws OLAPException, BirtException {\n ICubeQueryDefinition cqd = new CubeQueryDefinition(CubeCreator.cubeName);\n cqd.createMeasure(\"String_Node_Str\");\n IEdgeDefinition columnEdge = cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);\n IDimensionDefinition timeDim = columnEdge.createDimension(\"String_Node_Str\");\n IHierarchyDefinition timeHier = timeDim.createHierarchy(\"String_Node_Str\");\n timeHier.createLevel(\"String_Node_Str\");\n IEdgeDefinition rowEdge = cqd.createEdge(ICubeQueryDefinition.COLUMN_EDGE);\n IDimensionDefinition geographyDim = rowEdge.createDimension(\"String_Node_Str\");\n IHierarchyDefinition geographyHier = geographyDim.createHierarchy(\"String_Node_Str\");\n geographyHier.createLevel(\"String_Node_Str\");\n geographyHier.createLevel(\"String_Node_Str\");\n IBinding rowGrandTotal = new Binding(\"String_Node_Str\");\n rowGrandTotal.setAggrFunction(BuiltInAggregationFactory.TOTAL_SUM_FUNC);\n rowGrandTotal.setExpression(new ScriptExpression(\"String_Node_Str\"));\n rowGrandTotal.addAggregateOn(\"String_Node_Str\");\n IBinding columnGrandTotal = new Binding(\"String_Node_Str\");\n columnGrandTotal.setAggrFunction(BuiltInAggregationFactory.TOTAL_AVE_FUNC);\n columnGrandTotal.setExpression(new ScriptExpression(\"String_Node_Str\"));\n columnGrandTotal.addAggregateOn(\"String_Node_Str\");\n columnGrandTotal.addAggregateOn(\"String_Node_Str\");\n IBinding totalGrandTotal = new Binding(\"String_Node_Str\");\n totalGrandTotal.setAggrFunction(BuiltInAggregationFactory.TOTAL_COUNTDISTINCT_FUNC);\n totalGrandTotal.setExpression(new ScriptExpression(\"String_Node_Str\"));\n cqd.addBinding(rowGrandTotal);\n cqd.addBinding(columnGrandTotal);\n cqd.addBinding(totalGrandTotal);\n BirtCubeView cubeView = new BirtCubeView(new CubeQueryExecutor(cqd, de.getSession(), this.scope, de.getContext()));\n CubeCursor dataCursor = cubeView.getCubeCursor();\n List columnEdgeBindingNames = new ArrayList();\n columnEdgeBindingNames.add(\"String_Node_Str\");\n columnEdgeBindingNames.add(\"String_Node_Str\");\n List rowEdgeBindingNames = new ArrayList();\n rowEdgeBindingNames.add(\"String_Node_Str\");\n List measureBindingNames = new ArrayList();\n measureBindingNames.add(\"String_Node_Str\");\n List rowGrandTotalNames = new ArrayList();\n rowGrandTotalNames.add(\"String_Node_Str\");\n try {\n this.printCubeAlongEdge(dataCursor, columnEdgeBindingNames, rowEdgeBindingNames, measureBindingNames, rowGrandTotalNames, \"String_Node_Str\", \"String_Node_Str\", null);\n } catch (Exception e) {\n fail(\"String_Node_Str\");\n }\n}\n"
"public boolean calculateCooccurrences(List<String> selectedFiles, String seedFile, int windowSize, String outputPath, int threshold, boolean buildMatrix, IProgressMonitor monitor) {\n String currentLine = null;\n List<String> phrase = new ArrayList<String>();\n Date currTime = new Date();\n setOutputPath(outputPath);\n setThreshold(threshold);\n setWindowSize(windowSize);\n try {\n boolean ret = false;\n if (windowSize > 0) {\n ret = setSeedWords(seedFile);\n }\n if (ret) {\n doPhrases = true;\n buildSeedCombos();\n }\n String[] listOfFiles = (String[]) selectedFiles.toArray(new String[selectedFiles.size()]);\n for (String fname : listOfFiles) {\n File f = new File(fname);\n monitor.subTask(\"String_Node_Str\" + f.getName());\n appendLog(\"String_Node_Str\" + f.getName());\n if (f.getAbsolutePath().contains(\"String_Node_Str\"))\n continue;\n if (!f.exists() || f.isDirectory())\n continue;\n BufferedReader br = new BufferedReader(new FileReader(f));\n int line_no = 0;\n try {\n while ((currentLine = br.readLine()) != null) {\n ArrayList<String> words = new ArrayList<String>(Arrays.asList(delimiters.matcher(currentLine).replaceAll(\"String_Node_Str\").toLowerCase().trim().split(\"String_Node_Str\")));\n line_no++;\n int windowend = Math.min(windowSize, words.size()) - 1;\n List<String> window = new ArrayList<String>(words.subList(0, windowend));\n String pprev_word = null;\n String prev_word = null;\n for (int wi = 0; wi < words.size(); wi++) {\n String word = words.get(wi).trim();\n if (word.isEmpty() || word.equals(\"String_Node_Str\"))\n continue;\n if (window.size() > 0)\n window.remove(0);\n if (windowend < words.size() && windowSize > 1)\n window.add(words.get(windowend++).trim());\n if (buildMatrix) {\n Map<String, Integer> vec = wordMat.get(word);\n if (vec == null) {\n vec = new HashMap<String, Integer>();\n wordMat.put(word, vec);\n }\n for (String nextWord : window) {\n if (vec.containsKey(nextWord)) {\n vec.put(nextWord, vec.get(nextWord) + 1);\n } else {\n vec.put(nextWord, 1);\n }\n Map<String, Integer> revVec = wordMat.get(nextWord);\n if (revVec == null) {\n revVec = new HashMap<String, Integer>();\n wordMat.put(nextWord, revVec);\n }\n if (revVec.containsKey(word)) {\n revVec.put(word, revVec.get(word) + 1);\n } else {\n revVec.put(word, 1);\n }\n }\n }\n if (doPhrases) {\n if (seedWords.containsKey(word)) {\n for (Set<String> combo : seedCombos.keySet()) {\n boolean flag = true;\n String comboStr = StringUtils.join(combo, ' ');\n if (!comboStr.contains(word))\n continue;\n for (String seedWord : combo) {\n if (!window.contains(seedWord) && !word.equals(seedWord)) {\n flag = false;\n break;\n }\n }\n if (flag == true) {\n ArrayList<String> context = new ArrayList<String>();\n context.addAll(Arrays.asList(pprev_word, prev_word, word));\n context.addAll(window);\n if (wi + window.size() + 1 < words.size())\n context.add(words.get(wi + window.size() + 1));\n phrase.add(StringUtils.join(combo, ' ') + \"String_Node_Str\" + f.getName() + \"String_Node_Str\" + line_no + \"String_Node_Str\" + StringUtils.join(context, ' '));\n int phrase_count = seedCombos.get(combo) + 1;\n seedCombos.put(combo, phrase_count);\n }\n }\n if (flag == true) {\n ArrayList<String> context = new ArrayList<String>();\n context.addAll(Arrays.asList(pprev_word, prev_word, word));\n context.addAll(window);\n if (wi + 1 < words.size())\n context.add(words.get(wi + 1));\n phrase.add(StringUtils.join(combo, ' ') + \"String_Node_Str\" + f.getName() + \"String_Node_Str\" + line_no + \"String_Node_Str\" + StringUtils.join(context, ' '));\n int phrase_count = seedCombos.get(combo) + 1;\n seedCombos.put(combo, phrase_count);\n }\n }\n }\n pprev_word = prev_word;\n prev_word = word;\n }\n }\n } catch (OutOfMemoryError e) {\n br.close();\n appendLog(\"String_Node_Str\");\n appendLog(\"String_Node_Str\");\n return false;\n }\n br.close();\n monitor.worked(1);\n }\n try {\n if (buildMatrix) {\n monitor.subTask(\"String_Node_Str\");\n String filename = new SimpleDateFormat(\"String_Node_Str\").format(currTime);\n writeWordMatrix(filename);\n }\n monitor.worked(10);\n if (ret && phrase.size() > 0) {\n monitor.subTask(\"String_Node_Str\");\n String phraseFilename = new SimpleDateFormat(\"String_Node_Str\").format(currTime);\n String freqFilename = new SimpleDateFormat(\"String_Node_Str\").format(currTime);\n writePhrases(phrase, phraseFilename);\n writeSeedComboStats(freqFilename);\n } else {\n appendLog(\"String_Node_Str\");\n appendLog(\"String_Node_Str\");\n }\n } catch (OutOfMemoryError e) {\n appendLog(\"String_Node_Str\");\n appendLog(\"String_Node_Str\");\n return false;\n }\n monitor.worked(10);\n appendLog(String.valueOf(phrase.size()));\n Date dateObj = new Date();\n TacitUtility.createRunReport(outputPath, \"String_Node_Str\", dateObj);\n return true;\n } catch (Exception e) {\n appendLog(\"String_Node_Str\" + e);\n }\n return false;\n}\n"
"public void testServiceFunctionRoundRobinScheduler1() {\n ServiceFunctionPathBuilder serviceFunctionPathBuilder = new ServiceFunctionPathBuilder();\n List<String> result;\n boolean transactionSuccessful = writeTypes();\n assertTrue(\"String_Node_Str\", transactionSuccessful);\n result = scheduler.scheduleServiceFunctions(createServiceFunctionChain(), 255, serviceFunctionPathBuilder.build());\n List<String> serviceFunctionTypes = new ArrayList<>();\n serviceFunctionTypes.add(SF_NAME + \"String_Node_Str\");\n serviceFunctionTypes.add(SF_NAME + \"String_Node_Str\");\n serviceFunctionTypes.add(SF_NAME + \"String_Node_Str\");\n assertNotNull(\"String_Node_Str\", result);\n assertTrue(\"String_Node_Str\", result.containsAll(serviceFunctionTypes));\n}\n"
"public static void clickMenuItem(IRobot robot, JMenuItem item) {\n if (!item.isEnabled()) {\n throw new StepExecutionException(\"String_Node_Str\", EventFactory.createActionError(TestErrorEvent.MENU_ITEM_NOT_ENABLED));\n }\n if (item.getParent() instanceof JPopupMenu && ((JPopupMenu) item.getParent()).getInvoker().getParent() instanceof JMenuBar) {\n robot.click(item, null, ClickOptions.create().setClickType(ClickOptions.ClickType.RELEASED).setFirstHorizontal(false));\n } else {\n robot.click(item, null, ClickOptions.create().setClickType(ClickOptions.ClickType.RELEASED));\n }\n}\n"
"public static <A extends Annotation> A create(A annotation, Locatable parentSourcePos) {\n if (annotation == null)\n return null;\n Class<? extends Annotation> type = annotation.annotationType();\n if (quicks.containsKey(type)) {\n return (A) quicks.get(type).newInstance(parentSourcePos, annotation);\n }\n ClassLoader cl = LocatableAnnotation.class.getClassLoader();\n try {\n Class loadableT = Class.forName(type.getName(), false, cl);\n if (loadableT != type)\n return annotation;\n return (A) Proxy.newProxyInstance(cl, new Class[] { type, Locatable.class }, new LocatableAnnotation(annotation, parentSourcePos));\n } catch (ClassNotFoundException e) {\n return annotation;\n }\n}\n"
"public Optional<BsonTimestamp> getElectionTime() {\n return Optional.ofNullable(electionTime);\n}\n"
"public void renderGridLines(Canvas c) {\n calcXBounds(mTrans);\n if (!mXAxis.isDrawGridLinesEnabled() || !mXAxis.isEnabled())\n return;\n float[] position = new float[] { 0f, 0f };\n mGridPaint.setColor(mXAxis.getGridColor());\n mGridPaint.setStrokeWidth(mXAxis.getGridLineWidth());\n BarData bd = mChart.getData();\n int step = bd.getDataSetCount();\n float div = (float) step + (step > 1 ? bd.getGroupSpace() : 0f);\n float min = (float) mMinX / div;\n float max = (float) mMaxX / div;\n for (int i = (int) min; i <= max; i += mXAxis.mAxisLabelModulus) {\n position[0] = i * step + i * bd.getGroupSpace() - 0.5f;\n mTrans.pointValuesToPixel(position);\n if (mViewPortHandler.isInBoundsX(position[0])) {\n c.drawLine(position[0], mViewPortHandler.offsetTop(), position[0], mViewPortHandler.contentBottom(), mGridPaint);\n }\n }\n}\n"
"public static Slot getSlot(Element elem, Property prop) {\n if (prop == null || elem == null)\n return null;\n Element myOwner = prop.getOwner();\n if (myOwner instanceof Stereotype && StereotypesHelper.hasStereotypeOrDerived(elem, (Stereotype) myOwner)) {\n Slot slot = StereotypesHelper.getSlot(elem, prop, false);\n if (slot != null) {\n return slot;\n }\n }\n return null;\n}\n"
"private KeyStroke getKeyStroke(String keyStrokeSpec) throws RobotException {\n KeyStroke keyStroke;\n if (keyStrokeSpec.length() == 1) {\n char singeKeyStrokeSpecChar = keyStrokeSpec.charAt(0);\n singeKeyStrokeSpecChar = getOSSspecificSpecBaseCharacter(singeKeyStrokeSpecChar);\n keyStroke = KeyStroke.getKeyStroke(singeKeyStrokeSpecChar);\n } else {\n keyStroke = KeyStroke.getKeyStroke(keyStrokeSpec);\n }\n if (keyStroke == null) {\n final String msg = \"String_Node_Str\" + keyStrokeSpec + \"String_Node_Str\";\n if (log.isWarnEnabled()) {\n log.warn(msg);\n }\n throw new RobotException(msg, EventFactory.createActionError(TestErrorEvent.INVALID_PARAM_VALUE));\n }\n return keyStroke;\n}\n"
"private void updateDependencies(IFolder analysesSubFolder) throws CoreException {\n for (IResource resource : analysesSubFolder.members()) {\n if (resource instanceof IFolder) {\n IFolder folder = (IFolder) resource;\n updateDependencies(folder);\n }\n if (resource instanceof IFile) {\n IFile file = (IFile) resource;\n final Analysis analysis = AnaResourceFileHelper.getInstance().findAnalysis(file);\n if (analysis != null) {\n final List<Pattern> patterns = AnalysisHelper.getPatterns(analysis);\n for (Pattern pattern : patterns) {\n DependenciesHandler.getInstance().setDependencyOn(analysis, pattern);\n AnaResourceFileHelper.getInstance().save(analysis);\n }\n final List<IndicatorDefinition> userDefinedIndicators = AnalysisHelper.getUserDefinedIndicators(analysis);\n for (IndicatorDefinition indicatorDefinition : userDefinedIndicators) {\n DependenciesHandler.getInstance().setDependencyOn(analysis, indicatorDefinition);\n AnaResourceFileHelper.getInstance().save(analysis);\n }\n }\n }\n }\n}\n"
"protected void onDraw(Canvas canvas) {\n int startX = getScrollX() + (iconLeftBitmaps == null ? 0 : (iconOuterWidth + iconPadding)) + getPaddingLeft();\n int endX = getScrollX() + (iconRightBitmaps == null ? getWidth() : getWidth() - iconOuterWidth - iconPadding) - getPaddingRight();\n int lineStartY = getScrollY() + getHeight() - getPaddingBottom();\n paint.setAlpha(255);\n if (iconLeftBitmaps != null) {\n Bitmap icon = iconLeftBitmaps[!isInternalValid() ? 3 : !isEnabled() ? 2 : hasFocus() ? 1 : 0];\n int iconLeft = startX - iconPadding - iconOuterWidth + (iconOuterWidth - icon.getWidth()) / 2;\n int iconTop = lineStartY + bottomSpacing - iconOuterHeight + (iconOuterHeight - icon.getHeight()) / 2;\n canvas.drawBitmap(icon, iconLeft, iconTop, paint);\n }\n if (iconRightBitmaps != null) {\n Bitmap icon = iconRightBitmaps[!isInternalValid() ? 3 : !isEnabled() ? 2 : hasFocus() ? 1 : 0];\n int iconRight = endX + iconPadding + (iconOuterWidth - icon.getWidth()) / 2;\n int iconTop = lineStartY + bottomSpacing - iconOuterHeight + (iconOuterHeight - icon.getHeight()) / 2;\n canvas.drawBitmap(icon, iconRight, iconTop, paint);\n }\n if (hasFocus() && showClearButton && !TextUtils.isEmpty(getText()) && isEnabled()) {\n paint.setAlpha(255);\n int buttonLeft;\n if (isRTL()) {\n buttonLeft = startX;\n } else {\n buttonLeft = endX - iconOuterWidth;\n }\n Bitmap clearButtonBitmap = clearButtonBitmaps[0];\n buttonLeft += (iconOuterWidth - clearButtonBitmap.getWidth()) / 2;\n int iconTop = lineStartY + bottomSpacing - iconOuterHeight + (iconOuterHeight - clearButtonBitmap.getHeight()) / 2;\n canvas.drawBitmap(clearButtonBitmap, buttonLeft, iconTop, paint);\n }\n if (!hideUnderline) {\n lineStartY += bottomSpacing;\n if (!isInternalValid()) {\n paint.setColor(errorColor);\n canvas.drawRect(startX, lineStartY, endX, lineStartY + getPixel(2), paint);\n } else if (!isEnabled()) {\n paint.setColor(underlineColor != -1 ? underlineColor : baseColor & 0x00ffffff | 0x44000000);\n float interval = getPixel(1);\n for (float xOffset = 0; xOffset < getWidth(); xOffset += interval * 3) {\n canvas.drawRect(startX + xOffset, lineStartY, startX + xOffset + interval, lineStartY + getPixel(1), paint);\n }\n } else if (hasFocus()) {\n paint.setColor(primaryColor);\n canvas.drawRect(startX, lineStartY, endX, lineStartY + getPixel(2), paint);\n } else {\n paint.setColor(underlineColor != -1 ? underlineColor : baseColor & 0x00ffffff | 0x1E000000);\n canvas.drawRect(startX, lineStartY, endX, lineStartY + getPixel(1), paint);\n }\n }\n textPaint.setTextSize(bottomTextSize);\n Paint.FontMetrics textMetrics = textPaint.getFontMetrics();\n float relativeHeight = -textMetrics.ascent - textMetrics.descent;\n float bottomTextPadding = bottomTextSize + textMetrics.ascent + textMetrics.descent;\n if ((hasFocus() && hasCharactersCounter()) || !isCharactersCountValid()) {\n textPaint.setColor(isCharactersCountValid() ? (baseColor & 0x00ffffff | 0x44000000) : errorColor);\n String charactersCounterText = getCharactersCounterText();\n canvas.drawText(charactersCounterText, isRTL() ? startX : endX - textPaint.measureText(charactersCounterText), lineStartY + bottomSpacing + relativeHeight, textPaint);\n }\n if (textLayout != null) {\n if (tempErrorText != null || ((helperTextAlwaysShown || hasFocus()) && !TextUtils.isEmpty(helperText))) {\n textPaint.setColor(tempErrorText != null ? errorColor : helperTextColor != -1 ? helperTextColor : (baseColor & 0x00ffffff | 0x44000000));\n canvas.save();\n if (isRTL()) {\n canvas.translate(endX - textLayout.getWidth(), lineStartY + bottomSpacing - bottomTextPadding);\n } else {\n canvas.translate(startX + getBottomTextLeftOffset(), lineStartY + bottomSpacing - bottomTextPadding);\n }\n textLayout.draw(canvas);\n canvas.restore();\n }\n }\n if (floatingLabelEnabled && !TextUtils.isEmpty(floatingLabelText)) {\n textPaint.setTextSize(floatingLabelTextSize);\n textPaint.setColor((Integer) focusEvaluator.evaluate(focusFraction * (isEnabled() ? 1 : 0), floatingLabelTextColor != -1 ? floatingLabelTextColor : (baseColor & 0x00ffffff | 0x44000000), primaryColor));\n float floatingLabelWidth = textPaint.measureText(floatingLabelText.toString());\n int floatingLabelStartX;\n if ((getGravity() & Gravity.RIGHT) == Gravity.RIGHT || isRTL()) {\n floatingLabelStartX = (int) (endX - floatingLabelWidth);\n } else if ((getGravity() & Gravity.LEFT) == Gravity.LEFT) {\n floatingLabelStartX = startX;\n } else {\n floatingLabelStartX = startX + (int) (getInnerPaddingLeft() + (getWidth() - getInnerPaddingLeft() - getInnerPaddingRight() - floatingLabelWidth) / 2);\n }\n int distance = floatingLabelPadding;\n int floatingLabelStartY = (int) (innerPaddingTop + floatingLabelTextSize + floatingLabelPadding - distance * (floatingLabelAlwaysShown ? 1 : floatingLabelFraction) + getScrollY());\n int alpha = ((int) ((floatingLabelAlwaysShown ? 1 : floatingLabelFraction) * 0xff * (0.74f * focusFraction * (isEnabled() ? 1 : 0) + 0.26f) * (floatingLabelTextColor != -1 ? 1 : Color.alpha(floatingLabelTextColor) / 256f)));\n textPaint.setAlpha(alpha);\n canvas.drawText(floatingLabelText.toString(), floatingLabelStartX, floatingLabelStartY, textPaint);\n }\n if (hasFocus() && singleLineEllipsis && getScrollX() != 0) {\n paint.setColor(isInternalValid() ? primaryColor : errorColor);\n float startY = lineStartY + bottomSpacing;\n int ellipsisStartX;\n if (isRTL()) {\n ellipsisStartX = endX;\n } else {\n ellipsisStartX = startX;\n }\n int signum = isRTL() ? -1 : 1;\n canvas.drawCircle(ellipsisStartX + signum * bottomEllipsisSize / 2, startY + bottomEllipsisSize / 2, bottomEllipsisSize / 2, paint);\n canvas.drawCircle(ellipsisStartX + signum * bottomEllipsisSize * 5 / 2, startY + bottomEllipsisSize / 2, bottomEllipsisSize / 2, paint);\n canvas.drawCircle(ellipsisStartX + signum * bottomEllipsisSize * 9 / 2, startY + bottomEllipsisSize / 2, bottomEllipsisSize / 2, paint);\n }\n super.onDraw(canvas);\n}\n"
"protected void initRecognizer() {\n this.scorer = new ThreadedAcousticScorer(frontend, null, 10, true, 0);\n this.pruner = new SimplePruner();\n this.activeListFactory = new PartitionActiveListFactory(absoluteBeamWidth, relativeBeamWidth, logMath);\n this.searchManager = new SimpleBreadthFirstSearchManager(logMath, linguist, pruner, scorer, activeListFactory, false, 0.0, 0, false);\n this.decoder = new Decoder(searchManager, false, false, new ArrayList<ResultListener>(), 100000);\n this.recognizer = new Recognizer(decoder, monitors);\n this.monitors = new ArrayList<Monitor>();\n this.monitors.add(new BestPathAccuracyTracker(recognizer, false, false, false, false, false, false));\n this.monitors.add(new MemoryTracker(recognizer, false, false));\n this.monitors.add(new SpeedTracker(recognizer, frontend, true, false, false, false));\n}\n"
"private void strobe(int data) {\n if (DEBUG) {\n log(\"String_Node_Str\" + Utils.hex8(data) + \"String_Node_Str\" + Reg.values()[data]);\n }\n if ((stateMachine == RadioState.POWER_DOWN) && (data != REG_SXOSCON)) {\n if (DEBUG)\n log(\"String_Node_Str\" + data + \"String_Node_Str\");\n return;\n }\n switch(data) {\n case REG_SNOP:\n if (DEBUG)\n log(\"String_Node_Str\" + Utils.hex8(status) + \"String_Node_Str\" + cpu.cycles);\n break;\n case REG_SRXON:\n if (stateMachine == RadioState.IDLE) {\n setState(RadioState.RX_CALIBRATE);\n if (DEBUG) {\n log(\"String_Node_Str\");\n }\n } else {\n if (DEBUG)\n log(\"String_Node_Str\");\n }\n break;\n case REG_SRFOFF:\n if (DEBUG) {\n log(\"String_Node_Str\" + cpu.cycles);\n if (stateMachine == RadioState.TX_ACK || stateMachine == RadioState.TX_FRAME || stateMachine == RadioState.RX_FRAME) {\n log(\"String_Node_Str\" + stateMachine);\n }\n }\n setState(RadioState.IDLE);\n break;\n case REG_STXON:\n if ((stateMachine == RadioState.IDLE) || (stateMachine == RadioState.RX_CALIBRATE) || (stateMachine == RadioState.RX_SFD_SEARCH) || (stateMachine == RadioState.RX_FRAME) || (stateMachine == RadioState.RX_OVERFLOW) || (stateMachine == RadioState.RX_WAIT)) {\n status |= STATUS_TX_ACTIVE;\n setState(RadioState.TX_CALIBRATE);\n if (sendEvents) {\n sendEvent(\"String_Node_Str\", null);\n }\n if (DEBUG)\n log(\"String_Node_Str\" + cpu.cycles);\n }\n break;\n case REG_STXONCCA:\n if ((stateMachine == RadioState.RX_CALIBRATE) || (stateMachine == RadioState.RX_SFD_SEARCH) || (stateMachine == RadioState.RX_FRAME) || (stateMachine == RadioState.RX_OVERFLOW) || (stateMachine == RadioState.RX_WAIT)) {\n if (sendEvents) {\n sendEvent(\"String_Node_Str\", null);\n }\n if (cca) {\n status |= STATUS_TX_ACTIVE;\n setState(RadioState.TX_CALIBRATE);\n if (DEBUG)\n log(\"String_Node_Str\" + cpu.cycles);\n } else {\n if (DEBUG)\n log(\"String_Node_Str\");\n }\n }\n break;\n case REG_SFLUSHRX:\n flushRX();\n break;\n case REG_SFLUSHTX:\n if (DEBUG)\n log(\"String_Node_Str\");\n flushTX();\n break;\n case REG_SXOSCON:\n startOscillator();\n break;\n case REG_SXOSCOFF:\n stopOscillator();\n break;\n case REG_SACK:\n if (stateMachine == RadioState.RX_FRAME) {\n shouldAck = true;\n } else if (crcOk) {\n setState(RadioState.TX_ACK_CALIBRATE);\n }\n break;\n default:\n if (DEBUG) {\n log(\"String_Node_Str\" + data);\n }\n break;\n }\n}\n"
"public void onUpdateProperties(final NodeRef nodeRef, final Map<QName, Serializable> before, final Map<QName, Serializable> after) {\n if (AuthenticationUtil.getFullyAuthenticatedUser() != null && AuthenticationUtil.isRunAsUserTheSystemUser() == false && nodeService.exists(nodeRef) && isRecord(nodeRef)) {\n for (QName property : after.keySet()) {\n Serializable beforeValue = null;\n if (before != null) {\n beforeValue = before.get(property);\n }\n Serializable afterValue = null;\n if (after != null) {\n afterValue = after.get(property);\n }\n boolean propertyUnchanged = false;\n if (beforeValue instanceof Date && afterValue instanceof Date) {\n propertyUnchanged = (((Date) beforeValue).compareTo((Date) afterValue) == 0);\n } else {\n propertyUnchanged = EqualsHelper.nullSafeEquals(beforeValue, afterValue);\n }\n if (propertyUnchanged == false && isPropertyEditable(nodeRef, property) == false) {\n throw new ModelAccessDeniedException(\"String_Node_Str\" + AuthenticationUtil.getFullyAuthenticatedUser() + \"String_Node_Str\" + property.toString() + \"String_Node_Str\" + nodeRef.toString());\n }\n }\n }\n}\n"
"public AbstractNodeType getNodeType(QName nodeTypeId) {\n for (AbstractNodeType nodeType : this.getNodeTypes()) {\n if (nodeType.getId().equals(nodeTypeId)) {\n return nodeType;\n }\n }\n return null;\n}\n"
"public void tick() {\n ThreadsHandler.worldExecutor().execute(() -> {\n redstoneTick = !redstoneTick;\n if (time >= 2400)\n time = 0;\n if (time % 40 == 0)\n TridentPlayer.sendAll(new PacketPlayOutTimeUpdate().set(\"String_Node_Str\", existed).set(\"String_Node_Str\", time));\n rainTime--;\n thunderTime--;\n if (rainTime <= 0) {\n raining = !raining;\n rainTime = ThreadLocalRandom.current().nextInt();\n }\n if (thunderTime <= 0) {\n thundering = !thundering;\n thunderTime = ThreadLocalRandom.current().nextInt();\n }\n time++;\n existed++;\n if (time % 150 == 0) {\n Set<ChunkLocation> set = Sets.newHashSet();\n for (Entity entity : entities) {\n if (entity instanceof Player) {\n Position pos = entity.position();\n int x = (int) pos.x() % 16;\n int z = (int) pos.z() % 16;\n int viewDist = Trident.config().getInt(\"String_Node_Str\", 7);\n for (int i = x - viewDist; i < x + viewDist; i++) {\n for (int j = z - viewDist; j < z + viewDist; j++) {\n set.add(ChunkLocation.create(i, j));\n }\n }\n }\n }\n loadedChunks.retain(set);\n set = null;\n }\n });\n}\n"
"public BigDecimal computeDiscount(int discountTypeSelect, BigDecimal discountAmount, BigDecimal unitPrice, Invoice invoice) {\n return priceListService.computeDiscount(unitPrice, discountTypeSelect, discountAmount);\n}\n"
"public synchronized void stop(final StopContext context) {\n final ManagedQueueExecutorService executor = getValue();\n context.asynchronous();\n executor.internalShutdown();\n executor.addShutdownListener(StopContextEventListener.getInstance(), context);\n}\n"
"private CheckState newState(Status status, String output, boolean hard, int attempt, boolean transitioning) {\n CheckState state = new CheckState();\n state.setCheckId(UUID.randomUUID());\n state.setStatus(status);\n state.setOk(status.isOk());\n state.setOutput(output);\n state.setHard(hard);\n state.setAttempt(attempt);\n state.setTransitioning(transitioning);\n return state;\n}\n"
"private int calculateVisibleType() {\n if (mUserExpanding) {\n int height = !mIsChildInGroup || isGroupExpanded() || mContainingNotification.isExpanded(true) ? mContainingNotification.getMaxContentHeight() : mContainingNotification.getShowingLayout().getMinHeight();\n if (height == 0) {\n height = mContentHeight;\n }\n int expandedVisualType = getVisualTypeForHeight(height);\n int collapsedVisualType = getVisualTypeForHeight(mContainingNotification.getCollapsedHeight());\n return mTransformationStartVisibleType == collapsedVisualType ? expandedVisualType : collapsedVisualType;\n }\n int intrinsicHeight = mContainingNotification.getIntrinsicHeight();\n int viewHeight = mContentHeight;\n if (intrinsicHeight != 0) {\n viewHeight = Math.min(mContentHeight, intrinsicHeight);\n }\n return getVisualTypeForHeight(viewHeight);\n}\n"
"public DatabaseConnection getDatabaseConnection() {\n Property property = this.getObject().getProperty();\n if (property != null && property.getItem() != null && ((ConnectionItem) property.getItem()).getConnection() instanceof DatabaseConnection) {\n return (DatabaseConnection) ((ConnectionItem) property.getItem()).getConnection();\n }\n return null;\n}\n"
"protected IStatus run(IProgressMonitor monitor) {\n if (monitor.isCanceled()) {\n return Status.CANCEL_STATUS;\n }\n NaiveBayesClassifier nbc = new NaiveBayesClassifier();\n try {\n nbc.classify(trainingDataPaths, classificationInputDir, classificationOutputDir, false, false);\n } catch (FileNotFoundException e1) {\n e1.printStackTrace();\n } catch (IOException e1) {\n e1.printStackTrace();\n } catch (EvalError e1) {\n e1.printStackTrace();\n }\n int i = 0;\n while (i < 1000000000) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n if (monitor.isCanceled()) {\n throw new OperationCanceledException();\n }\n i++;\n monitor.worked(1);\n }\n monitor.done();\n return Status.OK_STATUS;\n}\n"
"public void handle(HttpRequest request, final HttpResponder responder, String appId, String procedureName, String methodName) {\n if (\"String_Node_Str\".equals(appId) && \"String_Node_Str\".equals(procedureName) && \"String_Node_Str\".equals(methodName)) {\n byte[] content = request.getContent().array();\n responder.sendByteArray(HttpResponseStatus.OK, content, ImmutableMultimap.of(CONTENT_TYPE, \"String_Node_Str\", CONTENT_LENGTH, Integer.toString(content.length)));\n } else if (\"String_Node_Str\".equals(appId) && \"String_Node_Str\".equals(procedureName) && \"String_Node_Str\".equals(methodName)) {\n responder.sendChunkStart(HttpResponseStatus.OK, ImmutableMultimap.of(CONTENT_TYPE, \"String_Node_Str\"));\n responder.sendChunk(ChannelBuffers.wrappedBuffer(request.getContent().array()));\n responder.sendChunk(ChannelBuffers.wrappedBuffer(request.getContent().array()));\n responder.sendChunkEnd();\n } else if (\"String_Node_Str\".equals(appId) && \"String_Node_Str\".equals(procedureName) && \"String_Node_Str\".equals(methodName)) {\n responder.sendStatus(HttpResponseStatus.INTERNAL_SERVER_ERROR);\n } else {\n responder.sendStatus(HttpResponseStatus.NOT_FOUND);\n }\n}\n"
"public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) {\n int l = par2Random.nextInt(3) + this.minTreeHeight;\n boolean flag = true;\n if (par4 >= 1 && par4 + l + 1 <= 256) {\n byte b0;\n int k1;\n Block block;\n for (int i1 = par4; i1 <= par4 + 1 + l; ++i1) {\n b0 = 1;\n if (i1 == par4) {\n b0 = 0;\n }\n if (i1 >= par4 + 1 + l - 2) {\n b0 = 2;\n }\n for (int j1 = par3 - b0; j1 <= par3 + b0 && flag; ++j1) {\n for (k1 = par5 - b0; k1 <= par5 + b0 && flag; ++k1) {\n if (i1 >= 0 && i1 < 256) {\n block = par1World.getBlock(j1, i1, k1);\n if (!this.isReplaceable(par1World, j1, i1, k1))\n flag = false;\n } else {\n flag = false;\n }\n }\n }\n }\n if (!flag) {\n return false;\n } else {\n Block block2 = par1World.getBlock(par3, par4 - 1, par5);\n boolean isSoil = block2 == TwilightBlocks.skythernGrass;\n if (isSoil && par4 < 256 - l - 1) {\n block2.onPlantGrow(par1World, par3, par4 - 1, par5, par3, par4, par5);\n b0 = 3;\n byte b1 = 0;\n int l1;\n int i2;\n int j2;\n int i3;\n for (k1 = par4 - b0 + l; k1 <= par4 + l; ++k1) {\n i3 = k1 - (par4 + l);\n l1 = b1 + 1 - i3 / 2;\n for (i2 = par3 - l1; i2 <= par3 + l1; ++i2) {\n j2 = i2 - par3;\n for (int k2 = par5 - l1; k2 <= par5 + l1; ++k2) {\n int l2 = k2 - par5;\n if (Math.abs(j2) != l1 || Math.abs(l2) != l1 || par2Random.nextInt(2) != 0 && i3 != 0) {\n Block block1 = par1World.getBlock(i2, k1, k2);\n if (block1.isAir(par1World, i2, k1, k2) || block1.isLeaves(par1World, i2, k1, k2)) {\n this.setBlockAndNotifyAdequately(par1World, i2, k1, k2, TwilightBlocks.skythernLeaves, this.metaLeaves);\n }\n }\n }\n }\n }\n for (k1 = 0; k1 < l; ++k1) {\n block = par1World.getBlock(par3, par4 + k1, par5);\n if (block.isAir(par1World, par3, par4 + k1, par5) || block.isLeaves(par1World, par3, par4 + k1, par5)) {\n this.setBlockAndNotifyAdequately(par1World, par3, par4 + k1, par5, TwilightBlocks.edenLogs, this.metaWood);\n }\n }\n return true;\n } else {\n return false;\n }\n }\n } else {\n return false;\n }\n}\n"
"private boolean isCarrierApp(String packageName) {\n synchronized (mLock) {\n if (!mHaveCarrierPrivilegedApps) {\n fetchCarrierPrivilegedAppsLocked();\n }\n }\n return mCarrierPrivilegedApps.contains(packageName);\n}\n"
"public ConstraintMoney with(CurrencyUnit unit, double amount) {\n return new ConstraintMoney(this.amount.with(unit, amount), predicate);\n}\n"
"public Entity get(final InternalDataDefinition dataDefinition, final Long entityId) {\n checkNotNull(dataDefinition, DATA_DEFINITION_MUST_BE_GIVEN);\n checkState(dataDefinition.isEnabled(), DATA_DEFINITION_BELONGS_TO_DISABLED_PLUGIN);\n checkNotNull(entityId, \"String_Node_Str\");\n Object databaseEntity = getDatabaseEntity(dataDefinition, entityId);\n if (databaseEntity == null) {\n LOG.info(\"String_Node_Str\" + dataDefinition.getPluginIdentifier() + \"String_Node_Str\" + dataDefinition.getName() + \"String_Node_Str\" + entityId + \"String_Node_Str\");\n return null;\n }\n Entity entity = entityService.convertToGenericEntity(dataDefinition, databaseEntity);\n LOG.info(entity + \"String_Node_Str\");\n return entity;\n}\n"
"static Type gcd(Type... types) {\n if (types.length == 0) {\n return Object.class;\n }\n Type best = types[0];\n Primitive bestPrimitive = Primitive.of(best);\n if (bestPrimitive != null) {\n for (int i = 1; i < types.length; i++) {\n final Primitive primitive = Primitive.of(types[i]);\n if (primitive == null) {\n return Object.class;\n }\n if (primitive.assignableFrom(bestPrimitive)) {\n bestPrimitive = primitive;\n } else if (bestPrimitive.assignableFrom(primitive)) {\n } else if (bestPrimitive == Primitive.CHAR || bestPrimitive == Primitive.BYTE) {\n bestPrimitive = Primitive.INT;\n --i;\n } else {\n return Object.class;\n }\n }\n return bestPrimitive.primitiveClass;\n } else {\n for (int i = 1; i < types.length; i++) {\n if (types[i] != types[0]) {\n return Object.class;\n }\n }\n }\n return types[0];\n}\n"
"private void reallyRun() {\n try {\n s_logger.trace(\"String_Node_Str\");\n Date cutTime = new Date(DateUtil.currentGMTTime().getTime() - _jobExpireSeconds * 1000);\n List<AsyncJobVO> l = _jobDao.getExpiredJobs(cutTime, 100);\n if (l != null && l.size() > 0) {\n for (AsyncJobVO job : l) {\n _jobDao.expunge(job.getId());\n }\n }\n List<SyncQueueItemVO> blockItems = _queueMgr.getBlockedQueueItems(_jobCancelThresholdSeconds * 1000, false);\n if (blockItems != null && blockItems.size() > 0) {\n for (SyncQueueItemVO item : blockItems) {\n if (item.getContentType().equalsIgnoreCase(\"String_Node_Str\")) {\n completeAsyncJob(item.getContentId(), 2, 0, getResetResultResponse(\"String_Node_Str\"));\n }\n _queueMgr.purgeItem(item.getId());\n }\n }\n s_logger.trace(\"String_Node_Str\");\n } catch (Throwable e) {\n s_logger.error(\"String_Node_Str\", e);\n } finally {\n StackMaid.current().exitCleanup();\n }\n}\n"
"public void addRemoteVideoSpecificComponents(CallPeer callPeer) {\n if (CallManager.isVideoQualityPresetSupported(callPeer)) {\n if (resizeVideoButton == null) {\n resizeVideoButton = new ResizeVideoButton(callPeer.getCall());\n resizeVideoButton.setIndex(9);\n }\n if (resizeVideoButton.countAvailableOptions() > 1) {\n settingsPanel.add(resizeVideoButton);\n }\n settingsPanel.revalidate();\n settingsPanel.repaint();\n}\n"
"protected synchronized void handlePeerDeath(Peer peer) {\n if (peer == downloadPeer) {\n downloadPeer = null;\n synchronized (peers) {\n if (downloadListener != null && !peers.isEmpty()) {\n startBlockChainDownloadFromPeer(peers.iterator().next());\n }\n }\n }\n}\n"
"public int drainTo(Collection<? super T> c, int maxElements) {\n if (maxElements <= 0) {\n return 0;\n }\n int addedElements = 0;\n while (addedElements < maxElements && peek() != null) {\n c.add(poll());\n addedElements++;\n next = poll();\n }\n return addedElements;\n}\n"
"public final void parse() {\n Vect constants = (Vect) this.configTbl.get(Constant);\n Vect constraints = (Vect) this.configTbl.get(Constraint);\n Vect actionConstraints = (Vect) this.configTbl.get(ActionConstraint);\n Vect invariants = (Vect) this.configTbl.get(Invariant);\n Vect props = (Vect) this.configTbl.get(Prop);\n try {\n FileInputStream fis = FileUtil.newFIS(resolver.resolve(this.configFileName, false));\n if (fis == null) {\n throw new ConfigFileException(EC.CFG_ERROR_READING_FILE, new String[] { this.configFileName, \"String_Node_Str\" });\n }\n SimpleCharStream scs = new SimpleCharStream(fis, 1, 1);\n TLAplusParserTokenManager tmgr = new TLAplusParserTokenManager(scs, 2);\n Token tt = getNextToken(tmgr);\n while (tt.kind != TLAplusParserConstants.EOF) {\n String tval = tt.image;\n int loc = scs.getBeginLine();\n if (tval.equals(Init)) {\n tt = getNextToken(tmgr);\n if (tt.kind == TLAplusParserConstants.EOF) {\n throw new ConfigFileException(EC.CFG_MISSING_ID, new String[] { String.valueOf(loc), Init });\n }\n String old = (String) this.configTbl.put(Init, tt.image);\n if (old.length() != 0) {\n throw new ConfigFileException(EC.CFG_TWICE_KEYWORD, new String[] { Spec, String.valueOf(loc) });\n }\n tt = getNextToken(tmgr);\n } else if (tval.equals(Next)) {\n tt = getNextToken(tmgr);\n if (tt.kind == TLAplusParserConstants.EOF) {\n throw new ConfigFileException(EC.CFG_MISSING_ID, new String[] { Next, String.valueOf(loc) });\n }\n String old = (String) this.configTbl.put(Next, tt.image);\n if (old.length() != 0) {\n throw new ConfigFileException(EC.CFG_TWICE_KEYWORD, new String[] { Next, String.valueOf(loc) });\n }\n tt = getNextToken(tmgr);\n } else if (tval.equals(Spec)) {\n tt = getNextToken(tmgr);\n if (tt.kind == TLAplusParserConstants.EOF) {\n throw new ConfigFileException(EC.CFG_MISSING_ID, new String[] { Spec, String.valueOf(loc) });\n }\n String old = (String) this.configTbl.put(Spec, tt.image);\n if (old.length() != 0) {\n throw new ConfigFileException(EC.CFG_TWICE_KEYWORD, new String[] { Spec, String.valueOf(loc) });\n }\n tt = getNextToken(tmgr);\n } else if (tval.equals(View)) {\n tt = getNextToken(tmgr);\n if (tt.kind == TLAplusParserConstants.EOF) {\n throw new ConfigFileException(EC.CFG_MISSING_ID, new String[] { View, String.valueOf(loc) });\n }\n String old = (String) this.configTbl.put(View, tt.image);\n if (old.length() != 0) {\n throw new ConfigFileException(EC.CFG_TWICE_KEYWORD, new String[] { View, String.valueOf(loc) });\n }\n tt = getNextToken(tmgr);\n } else if (tval.equals(Symmetry)) {\n tt = getNextToken(tmgr);\n if (tt.kind == TLAplusParserConstants.EOF) {\n throw new ConfigFileException(EC.CFG_MISSING_ID, new String[] { Symmetry, String.valueOf(loc) });\n }\n String old = (String) this.configTbl.put(Symmetry, tt.image);\n if (old.length() != 0) {\n throw new ConfigFileException(EC.CFG_TWICE_KEYWORD, new String[] { Symmetry, String.valueOf(loc) });\n }\n tt = getNextToken(tmgr);\n } else if (tval.equals(Type)) {\n tt = getNextToken(tmgr);\n if (tt.kind == TLAplusParserConstants.EOF) {\n throw new ConfigFileException(EC.CFG_MISSING_ID, new String[] { Type, String.valueOf(loc) });\n }\n String old = (String) this.configTbl.put(Type, tt.image);\n if (old.length() != 0) {\n throw new ConfigFileException(EC.CFG_TWICE_KEYWORD, new String[] { Type, String.valueOf(loc) });\n }\n tt = getNextToken(tmgr);\n } else if (tval.equals(TypeConstraint)) {\n tt = getNextToken(tmgr);\n if (tt.kind == TLAplusParserConstants.EOF) {\n throw new ConfigFileException(EC.CFG_MISSING_ID, new String[] { TypeConstraint, String.valueOf(loc) });\n }\n String old = (String) this.configTbl.put(TypeConstraint, tt.image);\n if (old.length() != 0) {\n throw new ConfigFileException(EC.CFG_TWICE_KEYWORD, new String[] { TypeConstraint, String.valueOf(loc) });\n }\n tt = getNextToken(tmgr);\n } else if (tval.equals(Constant) || tval.equals(Constants)) {\n while ((tt = getNextToken(tmgr)).kind != TLAplusParserConstants.EOF) {\n if (this.configTbl.get(tt.image) != null)\n break;\n String lhs = tt.image;\n tt = getNextToken(tmgr);\n while (tt.image.equals(\"String_Node_Str\")) {\n tt = getNextToken(tmgr);\n lhs = lhs + \"String_Node_Str\" + tt.image;\n tt = getNextToken(tmgr);\n }\n Vect line = new Vect();\n line.addElement(lhs);\n if (tt.image.equals(\"String_Node_Str\")) {\n tt = getNextToken(tmgr);\n if (tt.image.equals(\"String_Node_Str\")) {\n tt = getNextToken(tmgr);\n if (tt.kind == TLAplusParserConstants.EOF) {\n throw new ConfigFileException(EC.CFG_EXPECT_ID, new String[] { String.valueOf(scs.getBeginLine()), \"String_Node_Str\" });\n }\n String modName = tt.image;\n tt = getNextToken(tmgr);\n if (!tt.image.equals(\"String_Node_Str\")) {\n throw new ConfigFileException(EC.CFG_EXPECTED_SYMBOL, new String[] { String.valueOf(scs.getBeginLine()), \"String_Node_Str\" });\n }\n tt = getNextToken(tmgr);\n if (tt.kind == TLAplusParserConstants.EOF) {\n throw new ConfigFileException(EC.CFG_EXPECT_ID, new String[] { String.valueOf(scs.getBeginLine()), \"String_Node_Str\" });\n }\n Hashtable defs = (Hashtable) this.modOverrides.get(modName);\n if (defs == null) {\n defs = new Hashtable();\n this.modOverrides.put(modName, defs);\n }\n defs.put(line.elementAt(0), tt.image);\n } else {\n if (tt.kind == TLAplusParserConstants.EOF) {\n throw new ConfigFileException(EC.CFG_EXPECT_ID, new String[] { String.valueOf(scs.getBeginLine()), \"String_Node_Str\" });\n }\n this.overrides.put(line.elementAt(0), tt.image);\n }\n } else {\n if (tt.image.equals(\"String_Node_Str\")) {\n while (true) {\n tt = getNextToken(tmgr);\n Value arg = this.parseValue(tt, scs, tmgr);\n line.addElement(arg);\n tt = getNextToken(tmgr);\n if (!tt.image.equals(\"String_Node_Str\"))\n break;\n }\n if (!tt.image.equals(\"String_Node_Str\")) {\n throw new ConfigFileException(EC.CFG_GENERAL, new String[] { String.valueOf(loc) });\n }\n tt = getNextToken(tmgr);\n }\n if (!tt.image.equals(\"String_Node_Str\")) {\n throw new ConfigFileException(EC.CFG_EXPECTED_SYMBOL, new String[] { String.valueOf(scs.getBeginLine()), \"String_Node_Str\" });\n }\n tt = getNextToken(tmgr);\n if (tt.image.equals(\"String_Node_Str\")) {\n tt = getNextToken(tmgr);\n if (tt.kind == TLAplusParserConstants.EOF) {\n throw new ConfigFileException(EC.CFG_EXPECT_ID, new String[] { String.valueOf(scs.getBeginLine()), \"String_Node_Str\" });\n }\n String modName = tt.image;\n tt = getNextToken(tmgr);\n if (!tt.image.equals(\"String_Node_Str\")) {\n throw new ConfigFileException(EC.CFG_EXPECTED_SYMBOL, new String[] { String.valueOf(scs.getBeginLine()), \"String_Node_Str\" });\n }\n tt = getNextToken(tmgr);\n line.addElement(this.parseValue(tt, scs, tmgr));\n Vect mConsts = (Vect) this.modConstants.get(modName);\n if (mConsts == null) {\n mConsts = new Vect();\n this.modConstants.put(modName, mConsts);\n }\n mConsts.addElement(line);\n } else {\n line.addElement(this.parseValue(tt, scs, tmgr));\n constants.addElement(line);\n }\n }\n }\n } else if (tval.equals(Invariant) || tval.equals(Invariants)) {\n while ((tt = getNextToken(tmgr)).kind != TLAplusParserConstants.EOF) {\n if (this.configTbl.get(tt.image) != null)\n break;\n invariants.addElement(tt.image);\n }\n } else if (tval.equals(Prop) || tval.equals(Props)) {\n while ((tt = getNextToken(tmgr)).kind != TLAplusParserConstants.EOF) {\n if (this.configTbl.get(tt.image) != null)\n break;\n props.addElement(tt.image);\n }\n } else if (tval.equals(Constraint) || tval.equals(Constraints)) {\n while ((tt = getNextToken(tmgr)).kind != TLAplusParserConstants.EOF) {\n if (this.configTbl.get(tt.image) != null)\n break;\n constraints.addElement(tt.image);\n }\n } else if (tval.equals(ActionConstraint) || tval.equals(ActionConstraints)) {\n while ((tt = getNextToken(tmgr)).kind != TLAplusParserConstants.EOF) {\n if (this.configTbl.get(tt.image) != null)\n break;\n actionConstraints.addElement(tt.image);\n }\n } else {\n throw new ConfigFileException(EC.CFG_EXPECTED_SYMBOL, new String[] { String.valueOf(scs.getBeginLine()), \"String_Node_Str\" });\n }\n }\n } catch (IOException e) {\n throw new ConfigFileException(EC.CFG_ERROR_READING_FILE, new String[] { this.configFileName, e.getMessage() }, e);\n }\n}\n"
"public Uid update(ObjectClass objclass, Uid uid, Set<Attribute> replaceAttributes, OperationOptions options) {\n if (objclass == null || (!objclass.equals(ObjectClass.ACCOUNT))) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (uid == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (replaceAttributes == null || replaceAttributes.size() == 0) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n Provisioning provisioning = connection.getProvisioning();\n if (provisioning == null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n final List<WSAttributeValue> attributes = new ArrayList<WSAttributeValue>();\n WSAttributeValue wsAttributeValue;\n WSAttribute wsAttribute;\n for (Attribute attr : replaceAttributes) {\n wsAttribute = new WSAttribute(attr.getName());\n if (attr.is(Name.NAME)) {\n wsAttribute.setKey(true);\n wsAttribute.setNullable(false);\n }\n if (attr.is(OperationalAttributeInfos.PASSWORD.getName())) {\n wsAttribute.setName(OperationalAttributeInfos.PASSWORD.getName());\n wsAttribute.setPassword(true);\n }\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\" + \"String_Node_Str\" + wsAttribute.getName() + \"String_Node_Str\" + wsAttribute.isKey() + \"String_Node_Str\" + wsAttribute.isPassword());\n }\n wsAttributeValue = new WSAttributeValue(wsAttribute);\n attributes.add(wsAttributeValue);\n List value = attr.getValue();\n if (value != null && value.size() == 1 && (value.get(0) instanceof GuardedString || value.get(0) instanceof GuardedByteArray)) {\n wsAttributeValue.setValues(Collections.singletonList(value.toString()));\n } else {\n wsAttributeValue.setValue(value);\n }\n attributes.add(wsAttributeValue);\n }\n Uid uuid = null;\n try {\n uuid = new Uid(provisioning.update(uid.getUidValue(), attributes));\n } catch (ProvisioningException e) {\n if (LOG.isErrorEnabled()) {\n LOG.error(\"String_Node_Str\", e);\n }\n }\n return uuid;\n}\n"
"public Row next() {\n final String source = parser.getCurrentLine();\n final String[] fields = parser.next();\n return new Row(fields, source);\n}\n"
"public void paintControl(PaintEvent pe) {\n Color cBackground = null;\n try {\n Color clrTransparencyBackground = Display.getCurrent().getSystemColor(SWT.COLOR_LIST_BACKGROUND);\n GC gc = pe.gc;\n if (!this.isEnabled()) {\n gc.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));\n Color cFore = Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY);\n gc.setForeground(cFore);\n if (fCurrent == null || fCurrent instanceof ColorDefinition && ((ColorDefinition) fCurrent).getTransparency() == 0) {\n gc.fillRectangle(0, 0, this.getSize().x, this.getSize().y);\n if (!isAutoEnabled || fCurrent != null) {\n gc.drawText(Messages.getString(\"String_Node_Str\"), 2, 2);\n } else {\n gc.drawText(Messages.getString(\"String_Node_Str\"), 2, 2);\n }\n } else {\n gc.fillRectangle(0, 0, this.getSize().x, this.getSize().y);\n gc.setBackground(cFore);\n gc.fillRectangle(2, 2, this.getSize().x - 4, this.getSize().y - 4);\n }\n } else {\n if (fCurrent == null || fCurrent instanceof ColorDefinition && ((ColorDefinition) fCurrent).getTransparency() == 0) {\n gc.setBackground(clrTransparencyBackground);\n gc.fillRectangle(0, 0, this.getSize().x, this.getSize().y);\n Color cText = Display.getDefault().getSystemColor(SWT.COLOR_LIST_FOREGROUND);\n gc.setForeground(cText);\n if (!isAutoEnabled || fCurrent != null) {\n gc.drawText(Messages.getString(\"String_Node_Str\"), 2, 2);\n } else {\n gc.drawText(Messages.getString(\"String_Node_Str\"), 2, 2);\n }\n cText.dispose();\n } else {\n if (fCurrent instanceof ColorDefinition) {\n cBackground = new Color(Display.getDefault(), ((ColorDefinition) fCurrent).getRed(), ((ColorDefinition) fCurrent).getGreen(), ((ColorDefinition) fCurrent).getBlue());\n gc.setBackground(cBackground);\n gc.fillRectangle(2, 2, this.getSize().x - 4, this.getSize().y - 4);\n } else if (fCurrent instanceof Image) {\n org.eclipse.swt.graphics.Image img = getSWTImage((Image) fCurrent);\n if (fCurrent instanceof PatternImage) {\n Pattern ptn = new Pattern(Display.getCurrent(), img);\n gc.setBackgroundPattern(ptn);\n gc.fillRectangle(2, 2, getSize().x - 4, this.getSize().y - 4);\n ptn.dispose();\n } else {\n gc.fillRectangle(2, 2, getSize().x - 4, this.getSize().y - 4);\n gc.drawImage(img, 2, 2);\n }\n if (img != null) {\n img.dispose();\n }\n } else if (fCurrent instanceof Gradient) {\n fillGradient(gc);\n } else if (fCurrent instanceof MultipleFill) {\n fillMultiFill(gc);\n }\n }\n if (isFocusControl()) {\n gc.setLineStyle(SWT.LINE_DOT);\n gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_BLACK));\n gc.drawRectangle(1, 1, getSize().x - 3, this.getSize().y - 3);\n }\n }\n } catch (Exception ex) {\n logger.log(ex);\n } finally {\n if (cBackground != null) {\n cBackground.dispose();\n }\n }\n}\n"
"public void load(InputStream inputStream, ValidationHandler handler) {\n if (inputStream == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n Map<String, Object> options = new HashMap<String, Object>();\n options.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);\n XSDParser parse = new XSDParser(options);\n parse.setDocumentLocator(new LocatorImpl());\n parse.parse(inputStream);\n XSDSchema schema = parse.getSchema();\n schema.validate();\n EList<XSDDiagnostic> diagnostics = schema.getDiagnostics();\n for (XSDDiagnostic diagnostic : diagnostics) {\n XSDDiagnosticSeverity severity = diagnostic.getSeverity();\n if (severity.equals(XSDDiagnosticSeverity.ERROR_LITERAL)) {\n handler.error((TypeMetadata) null, \"String_Node_Str\" + diagnostic.getMessage(), null, -1, -1, ValidationError.XML_SCHEMA);\n } else if (severity.equals(XSDDiagnosticSeverity.WARNING_LITERAL)) {\n handler.error((TypeMetadata) null, \"String_Node_Str\" + diagnostic.getMessage(), -1, -1, ValidationError.XML_SCHEMA);\n }\n }\n XmlSchemaWalker.walk(schema, this);\n resolveAdditionalSuperTypes(this, handler);\n for (TypeMetadata type : getUserComplexTypes()) {\n type.validate(handler);\n }\n for (TypeMetadata type : getNonInstantiableTypes()) {\n type.validate(handler);\n }\n handler.end();\n if (handler.getErrorCount() == 0) {\n for (TypeMetadata type : getTypes()) {\n type.freeze(handler);\n }\n } else {\n LOGGER.error(\"String_Node_Str\" + handler.getErrorCount() + \"String_Node_Str\");\n }\n}\n"
"protected Map<String, Double> updateTrustAfterHunt(double foodHunted, double foodReceived) {\n List<String> members = this.getDataModel().getHuntingTeam().getMembers();\n if ((lastHunted == null) || (members.size() < 2))\n return null;\n String opponentID;\n Map<String, Double> newTrustValue = new HashMap<String, Double>();\n double trust;\n if (members.get(0).equals(this.getId())) {\n opponentID = members.get(1);\n } else {\n opponentID = members.get(0);\n }\n if (this.getDataModel().getTrust(opponentID) != null)\n trust = this.getDataModel().getTrust(opponentID);\n else\n trust = 0;\n if (this.getDataModel().getLastHunted().getName().equals(\"String_Node_Str\")) {\n if (foodHunted == 0) {\n trust = ValueScaler.scale(trust, -1, 0.1);\n } else {\n trust = ValueScaler.scale(trust, 1, 0.1);\n }\n } else {\n trust = ValueScaler.scale(trust, 0, 0.1);\n }\n newTrustValue.put(opponentID, trust);\n return newTrustValue;\n}\n"
"public void testTransactionTrackChangesManualTransaction() throws Exception {\n test.clearScreen();\n DirectoryResource tempDir = factory.create(OperatingSystemUtils.createTempDir()).reify(DirectoryResource.class);\n tempDir.deleteOnExit();\n test.getShell().setCurrentResource(tempDir);\n Assert.assertFalse(test.execute(\"String_Node_Str\", SHELL_TIMEOUT, TimeUnit.SECONDS) instanceof Failed);\n Assert.assertFalse(test.execute(\"String_Node_Str\", SHELL_TIMEOUT, TimeUnit.SECONDS) instanceof Failed);\n Assert.assertFalse(test.execute(\"String_Node_Str\", SHELL_TIMEOUT, TimeUnit.SECONDS) instanceof Failed);\n Assert.assertFalse(test.execute(\"String_Node_Str\", SHELL_TIMEOUT, TimeUnit.SECONDS) instanceof Failed);\n test.clearScreen();\n Assert.assertFalse(test.execute(\"String_Node_Str\", SHELL_TIMEOUT, TimeUnit.SECONDS) instanceof Failed);\n test.waitForStdOutValue(\"String_Node_Str\" + tempDir.getFullyQualifiedName() + File.separator + \"String_Node_Str\", SHELL_TIMEOUT, TimeUnit.SECONDS);\n test.waitForStdOutValue(\"String_Node_Str\" + tempDir.getFullyQualifiedName() + File.separator + \"String_Node_Str\", SHELL_TIMEOUT, TimeUnit.SECONDS);\n test.clearScreen();\n Assert.assertFalse(test.execute(\"String_Node_Str\", SHELL_TIMEOUT, TimeUnit.SECONDS) instanceof Failed);\n test.waitForStdOutValue(\"String_Node_Str\", SHELL_TIMEOUT, TimeUnit.SECONDS);\n Assert.assertFalse(test.getStdOut().contains(\"String_Node_Str\" + tempDir.getFullyQualifiedName() + \"String_Node_Str\"));\n Assert.assertFalse(test.getStdOut().contains(\"String_Node_Str\" + tempDir.getFullyQualifiedName() + \"String_Node_Str\"));\n}\n"
"public ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {\n FileUpload fileUpload = (FileUpload) command;\n if (fileUpload.getFile().length == 0) {\n Object[] args = new Object[] { getText(\"String_Node_Str\", request.getLocale()) };\n errors.rejectValue(\"String_Node_Str\", \"String_Node_Str\", args, \"String_Node_Str\");\n return showForm(request, response, errors);\n }\n MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;\n CommonsMultipartFile file = (CommonsMultipartFile) multipartRequest.getFile(\"String_Node_Str\");\n String uploadDir = getServletContext().getRealPath(\"String_Node_Str\") + \"String_Node_Str\" + request.getRemoteUser() + \"String_Node_Str\";\n File dirPath = new File(uploadDir);\n if (!dirPath.exists()) {\n dirPath.mkdirs();\n }\n InputStream stream = file.getInputStream();\n OutputStream bos = new FileOutputStream(uploadDir + file.getOriginalFilename());\n int bytesRead;\n byte[] buffer = new byte[8192];\n while ((bytesRead = stream.read(buffer, 0, 8192)) != -1) {\n bos.write(buffer, 0, bytesRead);\n }\n bos.close();\n stream.close();\n request.setAttribute(\"String_Node_Str\", fileUpload.getName());\n request.setAttribute(\"String_Node_Str\", file.getOriginalFilename());\n request.setAttribute(\"String_Node_Str\", file.getContentType());\n request.setAttribute(\"String_Node_Str\", file.getSize() + \"String_Node_Str\");\n request.setAttribute(\"String_Node_Str\", dirPath.getAbsolutePath() + Constants.FILE_SEP + file.getOriginalFilename());\n String link = request.getContextPath() + \"String_Node_Str\" + \"String_Node_Str\" + request.getRemoteUser() + \"String_Node_Str\";\n request.setAttribute(\"String_Node_Str\", link + file.getOriginalFilename());\n return new ModelAndView(getSuccessView());\n}\n"
"private void saveNullRowsBetween(int lastRowIndex, int currIndex) throws IOException {\n int gapRows = currIndex - lastRowIndex - 1;\n for (int i = 0; i < gapRows; i++) {\n IOUtil.writeInt(this.rowExprsDos, 0);\n IOUtil.writeLong(this.rowLenDos, currentOffset);\n currentOffset += IOUtil.INT_LENGTH;\n }\n}\n"
"private void addText(String[] args, CommandSender sender) {\n Player p = (Player) sender;\n HumanNPC n = NPCManager.getNPC(NPCManager.NPCSelected.get(p.getName()));\n String text = \"String_Node_Str\";\n int i = 0;\n for (String s : args) {\n if (i == 1 && !s.isEmpty() && !s.equals(\"String_Node_Str\")) {\n text += s;\n }\n if (i > 1 && !s.isEmpty() && !s.equals(\"String_Node_Str\")) {\n text += \"String_Node_Str\" + s;\n }\n i += 1;\n }\n plugin.handler.addNPCText(n.getUID(), text);\n sender.sendMessage(StringUtils.yellowify(text) + \"String_Node_Str\" + StringUtils.yellowify(n.getStrippedName() + \"String_Node_Str\") + \"String_Node_Str\");\n}\n"
"protected int getServerInstanceHttpPort(String server, int default_port, boolean secure) {\n String httpListener = (!secure) ? \"String_Node_Str\" : \"String_Node_Str\";\n String value = getClientUtil().getAttributes(HTTP_LISTENER_INS.replace(\"String_Node_Str\", server).replace(\"String_Node_Str\", httpListener)).get(\"String_Node_Str\");\n return value != null ? Integer.parseInt(value) : defaultPort;\n}\n"
"public void afterRun() {\n mapService.interceptAfterRemove(name, dataValue);\n int eventType = EntryEvent.TYPE_REMOVED;\n mapService.publishEvent(getCallerAddress(), name, eventType, dataKey, dataOldValue, null);\n invalidateNearCaches();\n if (mapContainer.getMapConfig().isStatisticsEnabled()) {\n mapContainer.getMapOperationCounter().incrementRemoves(Clock.currentTimeMillis() - getStartTime());\n }\n}\n"
"public void calcMinMax(int start, int end) {\n if (mValues == null)\n return;\n if (mValues.size() == 0)\n return;\n int endValue;\n if (end == 0 || end >= mValues.size())\n endValue = mValues.size() - 1;\n else\n endValue = end;\n mYMin = yMin(mValues.get(start));\n mYMax = yMax(mValues.get(start));\n for (int i = start; i < endValue; i++) {\n final BubbleEntry entry = mValues.get(i);\n final float ymin = yMin(entry);\n final float ymax = yMax(entry);\n if (ymin < mYMin) {\n mYMin = ymin;\n }\n if (ymax > mYMax) {\n mYMax = ymax;\n }\n final float xmin = xMin(entry);\n final float xmax = xMax(entry);\n if (xmin < mXMin) {\n mXMin = xmin;\n }\n if (xmax > mXMax) {\n mXMax = xmax;\n }\n final float size = largestSize(entry);\n if (size > mMaxSize) {\n mMaxSize = size;\n }\n }\n}\n"
"public final void renderEachAxis() throws ChartException {\n final double dStaggeredLabelOffset = sc.computeStaggeredAxisLabelOffset(xs, la, iOrientation);\n if (!lia.isSetVisible()) {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.RENDERING, \"String_Node_Str\", Messages.getResourceBundle(getRunTimeContext().getULocale()));\n }\n tre.setLabel(la);\n tre.setTextPosition(iLabelLocation);\n tre.setLocation(lo);\n lre.setLineAttributes(lia);\n lre.setStart(LocationImpl.create(0, 0));\n lre.setEnd(LocationImpl.create(0, 0));\n double dXStart = 0;\n double dXEnd = 0;\n double dZStart = 0;\n double dZEnd = 0;\n if (iDimension == IConstants.THREE_D) {\n AllAxes aax = pwa.getAxes();\n dXEnd = aax.getPrimaryBase().getScale().getEnd();\n dZEnd = aax.getAncillaryBase().getScale().getEnd();\n dXStart = aax.getPrimaryBase().getScale().getStart();\n dZStart = aax.getAncillaryBase().getScale().getStart();\n daEndPoints3D = sc.getEndPoints();\n da3D = sc.getTickCordinates();\n lo3d = Location3DImpl.create(0, 0, 0);\n t3dre = (Text3DRenderEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), Text3DRenderEvent.class);\n t3dre.setLabel(la);\n t3dre.setAction(Text3DRenderEvent.RENDER_TEXT_AT_LOCATION);\n t3dre.setTextPosition(iLabelLocation);\n t3dre.setLocation3D(lo3d);\n l3dre = (Line3DRenderEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), Line3DRenderEvent.class);\n l3dre.setLineAttributes(lia);\n l3dre.setStart3D(Location3DImpl.create(0, 0, 0));\n l3dre.setEnd3D(Location3DImpl.create(0, 0, 0));\n }\n if (iOrientation == IConstants.VERTICAL) {\n final ComputationContext context = new ComputationContext(true);\n context.y3d = 0;\n context.dX = dLocation;\n double dZ = 0;\n if (bRendering3D) {\n Location3D l3d = ax.getAxisCoordinate3D();\n context.dX = l3d.getX();\n dZ = l3d.getZ();\n }\n if (iv != null && iv.getType() == IntersectionValue.MAX && iDimension == IConstants.TWO_5_D) {\n trae.setTransform(TransformationEvent.TRANSLATE);\n trae.setTranslation(dSeriesThickness, -dSeriesThickness);\n ipr.applyTransformation(trae);\n }\n context.dTick1 = ((iMajorTickStyle & IConstants.TICK_LEFT) == IConstants.TICK_LEFT) ? context.dX - pwa.getTickSize() : context.dX;\n context.dTick2 = ((iMajorTickStyle & IConstants.TICK_RIGHT) == IConstants.TICK_RIGHT) ? context.dX + pwa.getTickSize() : context.dX;\n if ((iWhatToDraw & IConstants.AXIS) == IConstants.AXIS && lia.isVisible()) {\n if (bRenderOrthogonal3DAxis) {\n final double dStart = daEndPoints3D[0];\n final double dEnd = daEndPoints3D[1];\n l3dre.setLineAttributes(lia);\n l3dre.setStart3D(context.dX, dStart, dZ);\n l3dre.setEnd3D(context.dX, dEnd, dZ);\n dc.addLine(l3dre);\n l3dre.setStart3D(context.dX, dStart, dZEnd);\n l3dre.setEnd3D(context.dX, dEnd, dZEnd);\n dc.addLine(l3dre);\n l3dre.setStart3D(dXEnd, dStart, dZ);\n l3dre.setEnd3D(dXEnd, dEnd, dZ);\n dc.addLine(l3dre);\n if (renderer.isInteractivityEnabled()) {\n Trigger tg;\n EList elTriggers = axModel.getTriggers();\n if (!elTriggers.isEmpty()) {\n ArrayList cachedTriggers = null;\n Location3D[] loaHotspot = new Location3D[4];\n Polygon3DRenderEvent pre3d = (Polygon3DRenderEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), Polygon3DRenderEvent.class);\n loaHotspot[0] = Location3DImpl.create(context.dX - IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZ + IConstants.LINE_EXPAND_DOUBLE_SIZE);\n loaHotspot[1] = Location3DImpl.create(context.dX + IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZ - IConstants.LINE_EXPAND_DOUBLE_SIZE);\n loaHotspot[2] = Location3DImpl.create(context.dX + IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZ - IConstants.LINE_EXPAND_DOUBLE_SIZE);\n loaHotspot[3] = Location3DImpl.create(context.dX - IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZ + IConstants.LINE_EXPAND_DOUBLE_SIZE);\n pre3d.setPoints3D(loaHotspot);\n pre3d.setDoubleSided(true);\n if (renderer.get3DEngine().processEvent(pre3d, panningOffset.getX(), panningOffset.getY()) != null) {\n final InteractionEvent iev = (InteractionEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), InteractionEvent.class);\n cachedTriggers = new ArrayList();\n for (int t = 0; t < elTriggers.size(); t++) {\n tg = TriggerImpl.copyInstance((Trigger) elTriggers.get(t));\n processTrigger(tg, StructureSource.createAxis(axModel));\n cachedTriggers.add(tg);\n iev.addTrigger(TriggerImpl.copyInstance(tg));\n }\n iev.setHotSpot(pre3d);\n ipr.enableInteraction(iev);\n }\n pre3d = (Polygon3DRenderEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), Polygon3DRenderEvent.class);\n loaHotspot = new Location3D[4];\n loaHotspot[0] = Location3DImpl.create(dXStart - IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZEnd + IConstants.LINE_EXPAND_DOUBLE_SIZE);\n loaHotspot[1] = Location3DImpl.create(dXStart + IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZEnd - IConstants.LINE_EXPAND_DOUBLE_SIZE);\n loaHotspot[2] = Location3DImpl.create(dXStart + IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZEnd - IConstants.LINE_EXPAND_DOUBLE_SIZE);\n loaHotspot[3] = Location3DImpl.create(dXStart - IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZEnd + IConstants.LINE_EXPAND_DOUBLE_SIZE);\n pre3d.setPoints3D(loaHotspot);\n pre3d.setDoubleSided(true);\n if (renderer.get3DEngine().processEvent(pre3d, panningOffset.getX(), panningOffset.getY()) != null) {\n final InteractionEvent iev = (InteractionEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), InteractionEvent.class);\n if (cachedTriggers == null) {\n cachedTriggers = new ArrayList();\n for (int t = 0; t < elTriggers.size(); t++) {\n tg = TriggerImpl.copyInstance((Trigger) elTriggers.get(t));\n processTrigger(tg, StructureSource.createAxis(axModel));\n cachedTriggers.add(tg);\n iev.addTrigger(TriggerImpl.copyInstance(tg));\n }\n } else {\n for (int t = 0; t < cachedTriggers.size(); t++) {\n iev.addTrigger(TriggerImpl.copyInstance((Trigger) cachedTriggers.get(t)));\n }\n }\n iev.setHotSpot(pre3d);\n ipr.enableInteraction(iev);\n }\n pre3d = (Polygon3DRenderEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), Polygon3DRenderEvent.class);\n loaHotspot = new Location3D[4];\n loaHotspot[0] = Location3DImpl.create(dXEnd - IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZStart + IConstants.LINE_EXPAND_DOUBLE_SIZE);\n loaHotspot[1] = Location3DImpl.create(dXEnd + IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart, dZStart - IConstants.LINE_EXPAND_DOUBLE_SIZE);\n loaHotspot[2] = Location3DImpl.create(dXEnd + IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZStart - IConstants.LINE_EXPAND_DOUBLE_SIZE);\n loaHotspot[3] = Location3DImpl.create(dXEnd - IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd, dZStart + IConstants.LINE_EXPAND_DOUBLE_SIZE);\n pre3d.setPoints3D(loaHotspot);\n pre3d.setDoubleSided(true);\n if (renderer.get3DEngine().processEvent(pre3d, panningOffset.getX(), panningOffset.getY()) != null) {\n final InteractionEvent iev = (InteractionEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), InteractionEvent.class);\n if (cachedTriggers == null) {\n for (int t = 0; t < elTriggers.size(); t++) {\n tg = TriggerImpl.copyInstance((Trigger) elTriggers.get(t));\n processTrigger(tg, StructureSource.createAxis(axModel));\n iev.addTrigger(tg);\n }\n } else {\n for (int t = 0; t < cachedTriggers.size(); t++) {\n iev.addTrigger((Trigger) cachedTriggers.get(t));\n }\n }\n iev.setHotSpot(pre3d);\n ipr.enableInteraction(iev);\n }\n }\n }\n } else {\n double dStart = daEndPoints[0] + insCA.getBottom(), dEnd = daEndPoints[1] - insCA.getTop();\n if (sc.getDirection() == IConstants.FORWARD) {\n dStart = daEndPoints[1] + insCA.getBottom();\n dEnd = daEndPoints[0] - insCA.getTop();\n }\n if (iv != null && iv.getType() == IntersectionValue.VALUE && iDimension == IConstants.TWO_5_D) {\n final Location[] loa = new Location[4];\n loa[0] = LocationImpl.create(context.dX, dStart);\n loa[1] = LocationImpl.create(context.dX + dSeriesThickness, dStart - dSeriesThickness);\n loa[2] = LocationImpl.create(context.dX + dSeriesThickness, dEnd - dSeriesThickness);\n loa[3] = LocationImpl.create(context.dX, dEnd);\n final PolygonRenderEvent pre = (PolygonRenderEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), PolygonRenderEvent.class);\n pre.setPoints(loa);\n pre.setBackground(ColorDefinitionImpl.create(255, 255, 255, 127));\n pre.setOutline(lia);\n ipr.fillPolygon(pre);\n }\n lre.setLineAttributes(lia);\n lre.getStart().set(context.dX, dStart);\n lre.getEnd().set(context.dX, dEnd);\n ipr.drawLine(lre);\n if (renderer.isInteractivityEnabled()) {\n Trigger tg;\n EList elTriggers = axModel.getTriggers();\n if (!elTriggers.isEmpty()) {\n final InteractionEvent iev = (InteractionEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), InteractionEvent.class);\n for (int t = 0; t < elTriggers.size(); t++) {\n tg = TriggerImpl.copyInstance((Trigger) elTriggers.get(t));\n processTrigger(tg, StructureSource.createAxis(axModel));\n iev.addTrigger(tg);\n }\n Location[] loaHotspot = new Location[4];\n loaHotspot[0] = LocationImpl.create(context.dX - IConstants.LINE_EXPAND_SIZE, dStart);\n loaHotspot[1] = LocationImpl.create(context.dX + IConstants.LINE_EXPAND_SIZE, dStart);\n loaHotspot[2] = LocationImpl.create(context.dX + IConstants.LINE_EXPAND_SIZE, dEnd);\n loaHotspot[3] = LocationImpl.create(context.dX - IConstants.LINE_EXPAND_SIZE, dEnd);\n final PolygonRenderEvent pre = (PolygonRenderEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), PolygonRenderEvent.class);\n pre.setPoints(loaHotspot);\n iev.setHotSpot(pre);\n ipr.enableInteraction(iev);\n }\n }\n }\n }\n renderVerticalAxisByType(context, dXEnd, dZEnd, dZ, dStaggeredLabelOffset);\n la = LabelImpl.copyInstance(ax.getTitle());\n if (la.isVisible() && bRenderAxisTitle) {\n ScriptHandler.callFunction(sh, ScriptHandler.BEFORE_DRAW_AXIS_TITLE, axModel, la, getRunTimeContext().getScriptContext());\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_AXIS_TITLE, la);\n final String sRestoreValue = la.getCaption().getValue();\n la.getCaption().setValue(getRunTimeContext().externalizedMessage(sRestoreValue));\n BoundingBox bb = null;\n boolean bWithinAxis = false;\n final boolean bTitleHorizontal = Math.abs(la.getCaption().getFont().getRotation()) <= 30;\n final double dYAxisHeightPC = ChartUtil.computeHeightOfOrthogonalAxisTitle((ChartWithAxes) this.renderer.cm, xs);\n try {\n if (bTitleHorizontal) {\n bWithinAxis = true;\n } else {\n final BoundingBox bbWoWrap = Methods.computeBox(xs, iLabelLocation, la, 0, 0, dYAxisHeightPC);\n bWithinAxis = bbWoWrap.getHeight() < daEndPoints[0] - daEndPoints[1];\n }\n bb = Methods.computeBox(xs, ax.getTitlePosition(), la, 0, 0, bWithinAxis && !bTitleHorizontal ? daEndPoints[0] - daEndPoints[1] : dYAxisHeightPC);\n } catch (IllegalArgumentException uiex) {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.RENDERING, uiex);\n }\n if (ax.getTitle().isVisible() && la.isVisible()) {\n if (bRendering3D) {\n double yCenter = daEndPoints3D[0] + ((daEndPoints3D[1] - daEndPoints3D[0]) / 2);\n final double x = (iLabelLocation == IConstants.LEFT) ? context.dTick1 - 1 : context.dTick2 + 1;\n double sx = x;\n double sx2 = dXEnd;\n if (bAxisLabelStaggered) {\n if (iLabelLocation == IConstants.LEFT) {\n sx -= dStaggeredLabelOffset;\n sx2 += dStaggeredLabelOffset;\n } else {\n sx += dStaggeredLabelOffset;\n sx2 -= dStaggeredLabelOffset;\n }\n }\n Angle3D a3D = (Angle3D) ((ChartWithAxes) renderer.cm).getRotation().getAngles().get(0);\n double offset = 2;\n t3dre = (Text3DRenderEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), Text3DRenderEvent.class);\n sx = sx - pwa.getHorizontalSpacingInPixels() - bb.getWidth() - bb.getHeight();\n t3dre.setLocation3D(Location3DImpl.create(sx - offset, yCenter, dZEnd + offset + pwa.getHorizontalSpacingInPixels() + (bb.getWidth() + bb.getHeight()) * Math.sin(a3D.getYAngle() * Math.PI / 180)));\n t3dre.setLabel(la);\n t3dre.setTextPosition(Text3DRenderEvent.LEFT);\n t3dre.setAction(Text3DRenderEvent.RENDER_TEXT_AT_LOCATION);\n dc.addLabel(t3dre);\n t3dre = (Text3DRenderEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), Text3DRenderEvent.class);\n sx2 = sx2 + pwa.getHorizontalSpacingInPixels() + 100;\n t3dre.setLocation3D(Location3DImpl.create(sx2, yCenter, dZ - pwa.getHorizontalSpacingInPixels() - 100 * Math.sin(a3D.getYAngle() * Math.PI / 180)));\n t3dre.setLabel(la);\n t3dre.setTextPosition(Text3DRenderEvent.RIGHT);\n t3dre.setAction(Text3DRenderEvent.RENDER_TEXT_AT_LOCATION);\n dc.addLabel(t3dre);\n } else {\n final Bounds boundsTitle = ((ChartWithAxes) this.renderer.cm).getTitle().getBounds();\n final Bounds bo = BoundsImpl.create(ax.getTitleCoordinate(), bWithinAxis ? daEndPoints[1] : (boundsTitle.getTop() + boundsTitle.getHeight()) / 72 * xs.getDpiResolution(), bb.getWidth(), bWithinAxis ? daEndPoints[0] - daEndPoints[1] : dYAxisHeightPC);\n tre.setBlockBounds(bo);\n tre.setLabel(la);\n if (ax.getModelAxis().getAssociatedAxes().size() != 0) {\n tre.setBlockAlignment(ChartUtil.transposeAlignment(la.getCaption().getFont().getAlignment()));\n } else {\n tre.setBlockAlignment(la.getCaption().getFont().getAlignment());\n }\n tre.setAction(TextRenderEvent.RENDER_TEXT_IN_BLOCK);\n if (ax.getTitle().isVisible()) {\n ipr.drawText(tre);\n }\n }\n }\n la.getCaption().setValue(sRestoreValue);\n ScriptHandler.callFunction(sh, ScriptHandler.AFTER_DRAW_AXIS_TITLE, axModel, la, getRunTimeContext().getScriptContext());\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_AXIS_TITLE, la);\n }\n la = LabelImpl.copyInstance(ax.getLabel());\n if (iv != null && iv.getType() == IntersectionValue.MAX && iDimension == IConstants.TWO_5_D) {\n trae.setTranslation(-dSeriesThickness, dSeriesThickness);\n ipr.applyTransformation(trae);\n }\n } else if (iOrientation == IConstants.HORIZONTAL) {\n final ComputationContext context = new ComputationContext(false);\n context.x3d = 0;\n context.z3d = 0;\n context.dY = dLocation;\n double dX = 0;\n double dZ = 0;\n if (bRendering3D) {\n Location3D l3d = ax.getAxisCoordinate3D();\n dX = l3d.getX();\n context.dY = l3d.getY();\n dZ = l3d.getZ();\n }\n context.dTick1 = ((iMajorTickStyle & IConstants.TICK_ABOVE) == IConstants.TICK_ABOVE) ? (bRendering3D ? context.dY + pwa.getTickSize() : context.dY - pwa.getTickSize()) : context.dY;\n context.dTick2 = ((iMajorTickStyle & IConstants.TICK_BELOW) == IConstants.TICK_BELOW) ? (bRendering3D ? context.dY - pwa.getTickSize() : context.dY + pwa.getTickSize()) : context.dY;\n if (iv != null && iDimension == IConstants.TWO_5_D && ((bTransposed && renderer.isRightToLeft() && iv.getType() == IntersectionValue.MIN) || (!renderer.isRightToLeft() && iv.getType() == IntersectionValue.MAX))) {\n trae.setTransform(TransformationEvent.TRANSLATE);\n trae.setTranslation(dSeriesThickness, -dSeriesThickness);\n ipr.applyTransformation(trae);\n }\n if ((iWhatToDraw & IConstants.AXIS) == IConstants.AXIS && lia.isVisible()) {\n if (bRenderBase3DAxis) {\n final double dStart = daEndPoints3D[0];\n final double dEnd = daEndPoints3D[1];\n l3dre.setLineAttributes(lia);\n l3dre.setStart3D(dStart, context.dY, dZ);\n l3dre.setEnd3D(dEnd, context.dY, dZ);\n dc.addLine(l3dre);\n if (renderer.isInteractivityEnabled()) {\n Trigger tg;\n EList elTriggers = axModel.getTriggers();\n if (!elTriggers.isEmpty()) {\n final Polygon3DRenderEvent pre3d = (Polygon3DRenderEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), Polygon3DRenderEvent.class);\n Location3D[] loaHotspot = new Location3D[4];\n loaHotspot[0] = Location3DImpl.create(dStart, context.dY - IConstants.LINE_EXPAND_DOUBLE_SIZE, dZ);\n loaHotspot[1] = Location3DImpl.create(dStart, context.dY + IConstants.LINE_EXPAND_DOUBLE_SIZE, dZ);\n loaHotspot[2] = Location3DImpl.create(dEnd, context.dY + IConstants.LINE_EXPAND_DOUBLE_SIZE, dZ);\n loaHotspot[3] = Location3DImpl.create(dEnd, context.dY - IConstants.LINE_EXPAND_DOUBLE_SIZE, dZ);\n pre3d.setPoints3D(loaHotspot);\n pre3d.setDoubleSided(true);\n if (renderer.get3DEngine().processEvent(pre3d, panningOffset.getX(), panningOffset.getY()) != null) {\n final InteractionEvent iev = (InteractionEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), InteractionEvent.class);\n for (int t = 0; t < elTriggers.size(); t++) {\n tg = TriggerImpl.copyInstance((Trigger) elTriggers.get(t));\n processTrigger(tg, StructureSource.createAxis(axModel));\n iev.addTrigger(tg);\n }\n iev.setHotSpot(pre3d);\n ipr.enableInteraction(iev);\n }\n }\n }\n } else if (bRenderAncillary3DAxis) {\n final double dStart = daEndPoints3D[0];\n final double dEnd = daEndPoints3D[1];\n l3dre.setLineAttributes(lia);\n l3dre.setStart3D(dX, context.dY, dStart);\n l3dre.setEnd3D(dX, context.dY, dEnd);\n dc.addLine(l3dre);\n if (renderer.isInteractivityEnabled()) {\n Trigger tg;\n EList elTriggers = axModel.getTriggers();\n if (!elTriggers.isEmpty()) {\n final Polygon3DRenderEvent pre3d = (Polygon3DRenderEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), Polygon3DRenderEvent.class);\n Location3D[] loaHotspot = new Location3D[4];\n loaHotspot[0] = Location3DImpl.create(dX, context.dY - IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart);\n loaHotspot[1] = Location3DImpl.create(dX, context.dY + IConstants.LINE_EXPAND_DOUBLE_SIZE, dStart);\n loaHotspot[2] = Location3DImpl.create(dX, context.dY + IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd);\n loaHotspot[3] = Location3DImpl.create(dX, context.dY - IConstants.LINE_EXPAND_DOUBLE_SIZE, dEnd);\n pre3d.setPoints3D(loaHotspot);\n pre3d.setDoubleSided(true);\n if (renderer.get3DEngine().processEvent(pre3d, panningOffset.getX(), panningOffset.getY()) != null) {\n final InteractionEvent iev = (InteractionEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), InteractionEvent.class);\n for (int t = 0; t < elTriggers.size(); t++) {\n tg = TriggerImpl.copyInstance((Trigger) elTriggers.get(t));\n processTrigger(tg, StructureSource.createAxis(axModel));\n iev.addTrigger(tg);\n }\n iev.setHotSpot(pre3d);\n ipr.enableInteraction(iev);\n }\n }\n }\n } else {\n double dStart = daEndPoints[0] - insCA.getLeft(), dEnd = daEndPoints[1] + insCA.getRight();\n if (sc.getDirection() == IConstants.BACKWARD) {\n dStart = daEndPoints[1] - insCA.getLeft();\n dEnd = daEndPoints[0] + insCA.getRight();\n }\n if (iv != null && iv.getType() == IntersectionValue.VALUE && iDimension == IConstants.TWO_5_D) {\n final Location[] loa = new Location[4];\n loa[0] = LocationImpl.create(dStart, context.dY);\n loa[1] = LocationImpl.create(dStart + dSeriesThickness, context.dY - dSeriesThickness);\n loa[2] = LocationImpl.create(dEnd + dSeriesThickness, context.dY - dSeriesThickness);\n loa[3] = LocationImpl.create(dEnd, context.dY);\n final PolygonRenderEvent pre = (PolygonRenderEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), PolygonRenderEvent.class);\n pre.setPoints(loa);\n pre.setBackground(ColorDefinitionImpl.create(255, 255, 255, 127));\n pre.setOutline(lia);\n ipr.fillPolygon(pre);\n }\n lre.setLineAttributes(lia);\n lre.getStart().set(dStart, context.dY);\n lre.getEnd().set(dEnd, context.dY);\n ipr.drawLine(lre);\n if (renderer.isInteractivityEnabled()) {\n Trigger tg;\n EList elTriggers = axModel.getTriggers();\n if (!elTriggers.isEmpty()) {\n final InteractionEvent iev = (InteractionEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), InteractionEvent.class);\n for (int t = 0; t < elTriggers.size(); t++) {\n tg = TriggerImpl.copyInstance((Trigger) elTriggers.get(t));\n processTrigger(tg, StructureSource.createAxis(axModel));\n iev.addTrigger(tg);\n }\n Location[] loaHotspot = new Location[4];\n loaHotspot[0] = LocationImpl.create(dStart, context.dY - IConstants.LINE_EXPAND_SIZE);\n loaHotspot[1] = LocationImpl.create(dEnd, context.dY - IConstants.LINE_EXPAND_SIZE);\n loaHotspot[2] = LocationImpl.create(dEnd, context.dY + IConstants.LINE_EXPAND_SIZE);\n loaHotspot[3] = LocationImpl.create(dStart, context.dY + IConstants.LINE_EXPAND_SIZE);\n final PolygonRenderEvent pre = (PolygonRenderEvent) ((EventObjectCache) ipr).getEventObject(StructureSource.createAxis(axModel), PolygonRenderEvent.class);\n pre.setPoints(loaHotspot);\n iev.setHotSpot(pre);\n ipr.enableInteraction(iev);\n }\n }\n }\n }\n renderHorizontalAxisByType(context, dXEnd, dZEnd, dZ, dStaggeredLabelOffset);\n la = LabelImpl.copyInstance(ax.getTitle());\n if (la.isVisible() && bRenderAxisTitle) {\n ScriptHandler.callFunction(sh, ScriptHandler.BEFORE_DRAW_AXIS_TITLE, axModel, la, getRunTimeContext().getScriptContext());\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.BEFORE_DRAW_AXIS_TITLE, la);\n final String sRestoreValue = la.getCaption().getValue();\n la.getCaption().setValue(getRunTimeContext().externalizedMessage(sRestoreValue));\n la.getCaption().getFont().setAlignment(renderer.switchTextAlignment(la.getCaption().getFont().getAlignment()));\n BoundingBox bb = null;\n try {\n bb = Methods.computeBox(xs, ax.getTitlePosition(), la, 0, 0, Math.abs(daEndPoints[1] - daEndPoints[0]));\n } catch (IllegalArgumentException uiex) {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.RENDERING, uiex);\n }\n if (ax.getTitle().isVisible() && la.isVisible()) {\n if (bRendering3D) {\n Bounds cbo = renderer.getPlotBounds();\n if (axisType == IConstants.BASE_AXIS) {\n tre.setBlockBounds(BoundsImpl.create(cbo.getLeft() + (cbo.getWidth() / 3d - bb.getWidth()), cbo.getTop() + cbo.getHeight() - Math.min(bb.getHeight(), bb.getWidth()), bb.getWidth(), bb.getHeight()));\n } else {\n tre.setBlockBounds(BoundsImpl.create(cbo.getLeft() + cbo.getWidth() * 2 / 3d + (cbo.getWidth() / 3d - bb.getWidth()) / 2d, cbo.getTop() + cbo.getHeight() - Math.min(bb.getHeight(), bb.getWidth()), bb.getWidth(), bb.getHeight()));\n }\n tre.setLabel(la);\n tre.setBlockAlignment(la.getCaption().getFont().getAlignment());\n tre.setAction(TextRenderEvent.RENDER_TEXT_IN_BLOCK);\n ipr.drawText(tre);\n } else {\n final Bounds bo = BoundsImpl.create(daEndPoints[0], ax.getTitleCoordinate(), daEndPoints[1] - daEndPoints[0], bb.getHeight());\n tre.setBlockBounds(bo);\n tre.setLabel(la);\n if (ax.getModelAxis().getAssociatedAxes().size() != 0) {\n tre.setBlockAlignment(la.getCaption().getFont().getAlignment());\n } else {\n tre.setBlockAlignment(ChartUtil.transposeAlignment(la.getCaption().getFont().getAlignment()));\n }\n tre.setAction(TextRenderEvent.RENDER_TEXT_IN_BLOCK);\n ipr.drawText(tre);\n }\n }\n ScriptHandler.callFunction(sh, ScriptHandler.AFTER_DRAW_AXIS_TITLE, axModel, la, getRunTimeContext().getScriptContext());\n getRunTimeContext().notifyStructureChange(IStructureDefinitionListener.AFTER_DRAW_AXIS_TITLE, la);\n }\n la = LabelImpl.copyInstance(ax.getLabel());\n if (iv != null && iDimension == IConstants.TWO_5_D && ((bTransposed && renderer.isRightToLeft() && iv.getType() == IntersectionValue.MIN) || (!renderer.isRightToLeft() && iv.getType() == IntersectionValue.MAX))) {\n trae.setTranslation(-dSeriesThickness, dSeriesThickness);\n ipr.applyTransformation(trae);\n }\n }\n}\n"
"public void updateVABasedOnSortingStrategy() {\n ContentGroupList groupList = contentVA.getGroupList();\n contentVA = new ContentVirtualArray(Set.CONTENT, contentTree.getRoot().getLeaveIds());\n contentVA.buildNewGroupList(contentTree.getRoot().getChildren());\n}\n"
"private Lang getLangFromType(String type) {\n if (type.contains(\"String_Node_Str\") || type.contains(\"String_Node_Str\"))\n return Lang.TTL;\n if (type.contains(\"String_Node_Str\") || type.contains(\"String_Node_Str\"))\n return Lang.RDFXML;\n if (type.contains(\"String_Node_Str\"))\n return Lang.RDFXML;\n if (type.contains(\"String_Node_Str\"))\n return Lang.N3;\n return Lang.RDFXML;\n}\n"
"public AbstractTreeElement generateRoot(ExternalDataInstance instance) {\n CommCareApplication app = CommCareApplication._();\n String ref = instance.getReference();\n if (ref.indexOf(LedgerInstanceTreeElement.MODEL_NAME) != -1) {\n if (stockbase == null) {\n SqlStorage<Ledger> storage = app.getUserStorage(Ledger.STORAGE_KEY, Ledger.class);\n stockbase = new LedgerInstanceTreeElement(instance.getBase(), storage);\n } else {\n stockbase.rebase(instance.getBase());\n }\n return stockbase;\n } else if (ref.indexOf(CaseInstanceTreeElement.MODEL_NAME) != -1) {\n if (casebase == null) {\n SqlStorage<ACase> storage = app.getUserStorage(ACase.STORAGE_KEY, ACase.class);\n casebase = new AndroidCaseInstanceTreeElement(instance.getBase(), storage, false);\n } else {\n casebase.rebase(instance.getBase());\n }\n return casebase;\n } else if (instance.getReference().indexOf(\"String_Node_Str\") != -1) {\n String userId = \"String_Node_Str\";\n User u = CommCareApplication._().getSession().getLoggedInUser();\n if (u != null) {\n userId = u.getUniqueId();\n }\n String refId = ref.substring(ref.lastIndexOf('/') + 1, ref.length());\n try {\n FormInstance fixture = CommCareUtil.loadFixture(refId, userId);\n if (fixture == null) {\n throw new RuntimeException(\"String_Node_Str\" + ref);\n }\n TreeElement root = fixture.getRoot();\n root.setParent(instance.getBase());\n return root;\n } catch (IllegalStateException ise) {\n throw new RuntimeException(\"String_Node_Str\" + ref);\n }\n TreeElement root = fixture.getRoot();\n root.setParent(instance.getBase());\n return root;\n }\n if (instance.getReference().indexOf(\"String_Node_Str\") != -1) {\n User u = app.getSession().getLoggedInUser();\n TreeElement root = session.getSessionInstance(app.getPhoneId(), app.getCurrentVersionString(), u.getUsername(), u.getUniqueId(), u.getProperties()).getRoot();\n root.setParent(instance.getBase());\n return root;\n }\n return null;\n}\n"
"public boolean apply(Game game, Ability source) {\n Player controller = game.getPlayer(source.getControllerId());\n MageObject sourceObject = source.getSourceObject(game);\n if (controller != null && sourceObject != null && controller.getLibrary().hasCards()) {\n Library library = controller.getLibrary();\n Card card = library.getFromTop(game);\n if (card != null) {\n boolean exiledCardWasCast = false;\n controller.moveCardToExileWithInfo(card, source.getSourceId(), sourceObject.getIdName(), source.getSourceId(), game, Zone.LIBRARY, true);\n if (!card.getManaCost().isEmpty()) {\n if (controller.chooseUse(Outcome.Benefit, \"String_Node_Str\", source, game) && !card.isLand()) {\n exiledCardWasCast = controller.cast(card.getSpellAbility(), game, false);\n }\n }\n if (!exiledCardWasCast) {\n new DamagePlayersEffect(Outcome.Damage, new StaticValue(2), TargetController.OPPONENT).apply(game, source);\n }\n }\n return true;\n }\n return false;\n}\n"
"public void startContainer(String id, Map<String, Object> containerConfiguration) {\n StartContainerCmd startContainerCmd = this.dockerClient.startContainerCmd(id);\n if (containerConfiguration.containsKey(BINDS)) {\n List<String> binds = asListOfString(containerConfiguration, BINDS);\n startContainerCmd.withBinds(toBinds(binds));\n }\n if (containerConfiguration.containsKey(LINKS)) {\n startContainerCmd.withLinks(toLinks(asListOfString(containerConfiguration, LINKS)));\n }\n if (containerConfiguration.containsKey(PORT_BINDINGS)) {\n List<String> portBindings = asListOfString(containerConfiguration, PORT_BINDINGS);\n Ports ports = assignPorts(portBindings);\n startContainerCmd.withPortBindings(ports);\n }\n if (containerConfiguration.containsKey(PRIVILEGED)) {\n startContainerCmd.withPrivileged(asBoolean(containerConfiguration, PRIVILEGED));\n }\n if (containerConfiguration.containsKey(PUBLISH_ALL_PORTS)) {\n startContainerCmd.withPublishAllPorts(asBoolean(containerConfiguration, PUBLISH_ALL_PORTS));\n }\n if (containerConfiguration.containsKey(NETWORK_MODE)) {\n startContainerCmd.withNetworkMode(asString(containerConfiguration, NETWORK_MODE));\n }\n if (containerConfiguration.containsKey(DNS_SEARCH)) {\n List<String> dnsSearch = asListOfString(containerConfiguration, DNS_SEARCH);\n startContainerCmd.withDnsSearch(dnsSearch.toArray(new String[dnsSearch.size()]));\n }\n if (containerConfiguration.containsKey(DEVICES)) {\n List<Map<String, Object>> devices = asListOfMap(containerConfiguration, DEVICES);\n startContainerCmd.withDevices(toDevices(devices));\n }\n if (containerConfiguration.containsKey(RESTART_POLICY)) {\n Map<String, Object> restart = asMap(containerConfiguration, RESTART_POLICY);\n startContainerCmd.withRestartPolicy(toRestatPolicy(restart));\n }\n if (containerConfiguration.containsKey(CAP_ADD)) {\n List<String> capAdds = asListOfString(containerConfiguration, CAP_ADD);\n startContainerCmd.withCapAdd(toCapability(capAdds));\n }\n if (containerConfiguration.containsKey(CAP_DROP)) {\n List<String> capDrop = asListOfString(containerConfiguration, CAP_DROP);\n startContainerCmd.withCapDrop(capDrop.toArray(new String[capDrop.size()]));\n }\n startContainerCmd.exec();\n}\n"
"public static void iterateSpliceIsoforms(File assembly_gtf, GTFWriter isoform_gtf, PrintStream skipped, Integer max_paths) throws FileNotFoundException {\n TranscriptIterator ti = new TranscriptIterator(assembly_gtf);\n StrandedGenomicIntervalTree<Map<String, Object>> exon_5p = new StrandedGenomicIntervalTree<Map<String, Object>>();\n StrandedGenomicIntervalTree<Map<String, Object>> exon_3p = new StrandedGenomicIntervalTree<Map<String, Object>>();\n StrandedGenomicIntervalTree<Map<String, Object>> sj5p = new StrandedGenomicIntervalTree<Map<String, Object>>();\n MapCounter<String> isoform_count = new MapCounter<String>();\n for (AnnotatedRegion r : ti) {\n if (r.annotation.equals(\"String_Node_Str\")) {\n if (r.getAttribute(\"String_Node_Str\").equals(\"String_Node_Str\")) {\n exon_5p.add(r.chr, r.start, r.end, r.strand, r.attributes);\n } else {\n exon_3p.add(r.chr, r.start, r.end, r.strand, r.attributes);\n }\n }\n if (r.annotation.equals(\"String_Node_Str\")) {\n Map<String, Object> attributes = r.attributes;\n attributes.put(\"String_Node_Str\", r.get3Prime());\n sj5p.add(r.chr, r.get5Prime(), r.get5Prime(), r.strand, attributes);\n }\n }\n Set<String> skipped_ids = new HashSet<String>();\n for (AnnotatedRegion r : exon_5p) {\n if (max_paths == null || countPaths(r, exon_3p, sj5p).compareTo(new BigInteger(String.format(\"String_Node_Str\", max_paths))) < 0) {\n Stack<AnnotatedRegion> isoform_exons = new Stack<AnnotatedRegion>();\n iterateIsoforms(isoform_count, isoform_exons, r, exon_3p, sj5p, isoform_gtf);\n } else {\n String locus_id = (String) r.getAttribute(\"String_Node_Str\");\n if (!skipped_ids.contains(locus_id)) {\n skipped.println(locus_id);\n skipped_ids.add(locus_id);\n }\n }\n }\n}\n"
"public void findBusinessGroupsOfAreaAttendedBy() {\n Identity id1 = JunitTestHelper.createAndPersistIdentityAsUser(\"String_Node_Str\" + UUID.randomUUID().toString());\n Identity id2 = JunitTestHelper.createAndPersistIdentityAsUser(\"String_Node_Str\" + UUID.randomUUID().toString());\n Identity id3 = JunitTestHelper.createAndPersistIdentityAsUser(\"String_Node_Str\" + UUID.randomUUID().toString());\n OLATResource resource = JunitTestHelper.createRandomResource();\n String areaName = UUID.randomUUID().toString();\n BGArea area1 = areaManager.createAndPersistBGAreaIfNotExists(\"String_Node_Str\" + areaName, \"String_Node_Str\" + areaName, resource);\n BGArea area2 = areaManager.createAndPersistBGAreaIfNotExists(\"String_Node_Str\" + areaName, \"String_Node_Str\" + areaName, resource);\n BusinessGroup group1 = businessGroupService.createBusinessGroup(null, \"String_Node_Str\", \"String_Node_Str\", 0, -1, false, false, resource);\n BusinessGroup group2 = businessGroupService.createBusinessGroup(null, \"String_Node_Str\", \"String_Node_Str\", 0, -1, false, false, resource);\n BusinessGroup group3 = businessGroupService.createBusinessGroup(null, \"String_Node_Str\", \"String_Node_Str\", 0, -1, false, false, resource);\n dbInstance.commitAndCloseSession();\n areaManager.addBGToBGArea(group1, area1);\n areaManager.addBGToBGArea(group2, area1);\n areaManager.addBGToBGArea(group2, area2);\n areaManager.addBGToBGArea(group3, area1);\n dbInstance.commitAndCloseSession();\n securityManager.addIdentityToSecurityGroup(id1, group1.getPartipiciantGroup());\n securityManager.addIdentityToSecurityGroup(id2, group2.getPartipiciantGroup());\n securityManager.addIdentityToSecurityGroup(id2, group3.getPartipiciantGroup());\n securityManager.addIdentityToSecurityGroup(id3, group3.getPartipiciantGroup());\n dbInstance.commitAndCloseSession();\n List<BusinessGroup> groupId1 = areaManager.findBusinessGroupsOfAreaAttendedBy(id1, null, resource);\n Assert.assertNotNull(groupId1);\n Assert.assertEquals(1, groupId1.size());\n Assert.assertTrue(groupId1.contains(group1));\n List<Long> area2Keys = Collections.singletonList(area2.getKey());\n List<BusinessGroup> groupId1Area2 = areaManager.findBusinessGroupsOfAreaAttendedBy(id1, area2Keys, resource);\n Assert.assertNotNull(groupId1Area2);\n Assert.assertEquals(0, groupId1Area2.size());\n List<BusinessGroup> groupId2Area1 = areaManager.findBusinessGroupsOfAreaAttendedBy(id2, \"String_Node_Str\" + areaName, resource);\n Assert.assertNotNull(groupId2Area1);\n Assert.assertEquals(2, groupId2Area1.size());\n Assert.assertTrue(groupId2Area1.contains(group2));\n Assert.assertTrue(groupId2Area1.contains(group3));\n}\n"
"public boolean equals(Object obj) {\n if (this == obj)\n return true;\n if (obj == null)\n return false;\n if (!this.getClass().equals(obj.getClass()))\n return false;\n NetworkRule other = (NetworkRule) obj;\n if (highPort == null) {\n if (other.highPort != null)\n return false;\n } else if (!highPort.equals(other.highPort))\n return false;\n if (lowPort == null) {\n if (other.lowPort != null)\n return false;\n } else if (!lowPort.equals(other.lowPort))\n return false;\n if (protocol == null) {\n if (other.protocol != null)\n return false;\n } else if (!protocol.equals(other.protocol))\n return false;\n if (ipRanges == null) {\n if (other.ipRanges != null)\n return false;\n } else if (!ipRanges.equals(other.ipRanges))\n return false;\n if (networkPeers == null) {\n if (other.networkPeers != null)\n return false;\n } else if (!networkPeers.equals(other.networkPeers))\n return false;\n return true;\n}\n"
"public Object clone() throws CloneNotSupportedException {\n ReportDesign design = (ReportDesign) super.clone();\n design.allErrors = new ArrayList();\n design.initSlots();\n for (int i = 0; i < slots.length; i++) {\n design.slots[i] = slots[i].copy(design, i);\n }\n design.translations = (TranslationTable) translations.clone();\n design.fileName = null;\n NameSpace.rebuildNamespace(design);\n return design;\n}\n"
"public void onPlyerUsesBlock(PlayerInteractEvent event) {\n if (event == null)\n return;\n Block block = event.world.getBlock(event.x, event.y, event.z);\n if (block instanceof IEurekaBlock) {\n IEurekaBlock eurekaBlock = (IEurekaBlock) block;\n World world = event.world;\n if (!world.isRemote) {\n if (!eurekaBlock.isAllowed(event.entityPlayer)) {\n ItemStack[] stackArray = eurekaBlock.getComponents();\n for (ItemStack stack : stackArray) Utils.dropItemstack(world, event.x, event.y, event.z, stack);\n if (!world.isRemote)\n world.setBlock(event.x, event.y, event.z, Blocks.air);\n world.markBlockForUpdate(event.x, event.y, event.z);\n event.entityPlayer.addChatComponentMessage(new ChatComponentText(((IEurekaBlock) block).getMessage()));\n }\n }\n}\n"
"public String resetCSRFToken() {\n csrfToken = ESAPI.randomizer().getRandomString(8, EncoderConstants.CHAR_ALPHANUMERICS);\n return csrfToken;\n}\n"