content
stringlengths
40
137k
"protected void handleDispose(DisposeEvent event) {\n if (this.isCellEditorActive()) {\n CellEditor[] cellEditors = this.getCellEditors();\n for (CellEditor cellEditor : cellEditors) {\n if (cellEditor != null && cellEditor.isActivated() && cellEditor instanceof IShowInvisibleCellEditorMethods) {\n ((IShowInvisibleCellEditorMethods) cellEditor).fireApplyEditorValue();\n }\n }\n }\n super.handleDispose(event);\n}\n"
"public boolean remove(Widget widget) {\n if (widget.getParent() != this) {\n return false;\n }\n widgetMap.removeWidgetByElement(widget.getElement());\n disown(widget);\n return true;\n}\n"
"public void onStop() {\n super.onStop();\n mRemoteLogger.d(TAG + \"String_Node_Str\");\n mBroadcastManager.unregisterReceiver(mCallStatusReceiver);\n mBroadcastManager.unregisterReceiver(mDTMFButtonPressed);\n if (mServiceBound && (mSipService != null && mSipService.getCurrentCall() == null)) {\n unbindService(mConnection);\n mServiceBound = false;\n }\n}\n"
"public TreeOperation handleDeleteOnTextNode(Range caret) {\n int pos = caret.getStartOffset();\n Node startContainer = caret.getStartContainer();\n Text textNode = Text.as(startContainer);\n List<Integer> path = TreeHelper.getLocator(startContainer);\n TreeOperation op = null;\n final Node ancestorParagraph = getAncestorParagraph(startContainer);\n Element leftParagraph = Element.as(ancestorParagraph);\n Element rightParagraph = leftParagraph.getNextSiblingElement();\n if (pos < textNode.getLength()) {\n op = new TreeDeleteText(clientJupiter.getSiteId(), pos, TreeHelper.toIntArray(path));\n } else {\n op = skipDeleteOnEmptyTexts(textNode, path, leftParagraph, rightParagraph);\n }\n return op;\n}\n"
"public String redirect(String candidateURL) {\n List<Triple> redirect = index.search(candidateURL, \"String_Node_Str\", null);\n if (redirect.size() == 1) {\n return redirect.get(0).getObject();\n } else if (redirect.size() > 1) {\n log.warn(\"String_Node_Str\" + candidateURL);\n return candidateURL;\n } else {\n return candidateURL;\n }\n}\n"
"public synchronized boolean isCached() {\n if (isReadingChildren()) {\n return false;\n }\n if (lsTimeStamp != file.getDate()) {\n setReadingChildren(true);\n Thread lsThread = new Thread(\"String_Node_Str\") {\n public void run() {\n lsAsync();\n }\n });\n return false;\n }\n return true;\n}\n"
"public void widgetSelected(SelectionEvent e) {\n dirTxt.setText(dirTxt.getText());\n populateElement();\n}\n"
"public IApiaristTracker getBreedingTracker(World world, GameProfile player) {\n String filename = \"String_Node_Str\" + (player == null ? \"String_Node_Str\" : player.getId());\n ApiaristTracker tracker = (ApiaristTracker) world.loadItemData(ApiaristTracker.class, filename);\n if (tracker == null) {\n tracker = new ApiaristTracker(filename);\n world.setItemData(filename, tracker);\n }\n return tracker;\n}\n"
"public String generateWrapupEntryCode() throws IllegalActionException {\n if (_isTopLevel()) {\n return _eol + _eol + \"String_Node_Str\" + _eol;\n } else {\n String escapeName = _sanitizedModelName.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n return _eol + _eol + \"String_Node_Str\" + _eol + \"String_Node_Str\" + escapeName + \"String_Node_Str\" + \"String_Node_Str\" + _eol;\n }\n}\n"
"public static void setPlayerGunLevel(JavaPlugin plugin, String p, String g, String attribute, int level, double cost) {\n int credits = MinigamesAPI.getAPI().pinstances.get(plugin).getStatsInstance().getPoints(p);\n FileConfiguration config = MinigamesAPI.getAPI().pinstances.get(plugin).getGunsConfig().getConfig();\n String path = \"String_Node_Str\" + p + \"String_Node_Str\" + g + \"String_Node_Str\";\n config.set(path + attribute, level);\n MinigamesAPI.getAPI().pinstances.get(plugin).getGunsConfig().saveConfig();\n MinigamesAPI.getAPI().pinstances.get(plugin).getStatsInstance().setPoints(p, (int) (credits - cost));\n}\n"
"public void visitInnerClass(String internalName, String outerName, String innerName, int access) {\n cw.visitInnerClass(internalName, outerName, innerName, access);\n if (forInnerClass || isSyntheticOrEnumClass(access) || !isNestedInsideClassBeingModified(internalName, outerName)) {\n return;\n }\n String innerClassName = internalName.replace('/', '.');\n if (INNER_CLASS_MODIFIERS.containsKey(innerClassName)) {\n return;\n }\n ClassReader innerCR = createClassReader(CoverageModifier.class.getClassLoader(), internalName);\n if (innerCR != null) {\n CoverageModifier innerClassModifier = new CoverageModifier(innerCR, this, innerName);\n innerCR.accept(innerClassModifier, SKIP_FRAMES);\n INNER_CLASS_MODIFIERS.put(innerClassName, innerClassModifier);\n }\n}\n"
"public Object[] write(T input, String[] headers, int[] indexesToWrite) {\n if (!initialized) {\n this.headers = headers;\n super.initialize();\n this.headers = null;\n }\n return reverseConversions(input, headers, indexesToWrite);\n}\n"
"public void validate() throws ValidationException {\n final Set<Integer> messageIds = new HashSet<Integer>();\n final Set<String> messages = new HashSet<String>();\n for (MethodDescriptor md : methodDesc) {\n if (messages.add(md.message())) {\n final int id = md.message().id();\n if (id > Message.NONE && !messageIds.add(id)) {\n throw new ValidationException(\"String_Node_Str\", md.method());\n }\n }\n }\n}\n"
"public void test_invalid_event_date() throws Exception {\n DomainDto domain = generateDomainDto();\n List<EventDto> events = new ArrayList<EventDto>();\n domain.setEvents(events);\n EventDto event = new EventDto();\n events.add(event);\n event.setEventAction(\"String_Node_Str\");\n event.setEventActor(\"String_Node_Str\");\n event.setEventDate(\"String_Node_Str\");\n String content = JsonHelper.serialize(domain);\n mockMvc.perform(post(URI_DOMAIN_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isBadRequest()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath(\"String_Node_Str\").value(400)).andExpect(jsonPath(\"String_Node_Str\").value(4007)).andExpect(jsonPath(\"String_Node_Str\").value(CoreMatchers.hasItems(String.format(ServiceErrorCode.ERROR_4007.getMessage(), \"String_Node_Str\"))));\n}\n"
"public InputStream getThumbnailInputStream() throws IOException {\n if (useSuperThumb || getParent() instanceof FileTranscodeVirtualFolder && (getMediaSubtitle() != null || getMediaAudio() != null)) {\n return super.getThumbnailInputStream();\n }\n File file = getFile();\n File cachedThumbnail = null;\n if (getParent() != null && getParent() instanceof RealFile) {\n cachedThumbnail = ((RealFile) getParent()).getPotentialCover();\n }\n File thumbFolder = null;\n boolean alternativeCheck = false;\n while (cachedThumbnail == null) {\n if (thumbFolder == null && getType() != Format.IMAGE) {\n thumbFolder = file.getParentFile();\n }\n cachedThumbnail = FileUtil.getFileNameWithNewExtension(thumbFolder, file, \"String_Node_Str\");\n if (cachedThumbnail != null) {\n break;\n }\n if (cachedThumbnail == null) {\n cachedThumbnail = FileUtil.getFileNameWithAddedExtension(thumbFolder, file, \"String_Node_Str\");\n }\n if (cachedThumbnail == null) {\n cachedThumbnail = FileUtil.getFileNameWithAddedExtension(thumbFolder, file, \"String_Node_Str\");\n }\n if (alternativeCheck) {\n break;\n }\n if (StringUtils.isNotBlank(configuration.getAlternateThumbFolder())) {\n thumbFolder = new File(configuration.getAlternateThumbFolder());\n if (!thumbFolder.isDirectory()) {\n thumbFolder = null;\n break;\n }\n }\n alternativeCheck = true;\n }\n if (file.isDirectory()) {\n cachedThumbnail = FileUtil.getFileNameWithNewExtension(file.getParentFile(), file, \"String_Node_Str\");\n if (cachedThumbnail == null) {\n cachedThumbnail = FileUtil.getFileNameWithNewExtension(file.getParentFile(), file, \"String_Node_Str\");\n }\n }\n boolean hasAlreadyEmbeddedCoverArt = getType() == Format.AUDIO && getMedia() != null && getMedia().getThumb() != null;\n if (cachedThumbnail != null && (!hasAlreadyEmbeddedCoverArt || file.isDirectory())) {\n return new FileInputStream(cachedThumbnail);\n } else if (getMedia() != null && getMedia().getThumb() != null) {\n return getMedia().getThumbnailInputStream();\n } else {\n return super.getThumbnailInputStream();\n }\n}\n"
"protected void setStyleName(String styleClass, IContent content) {\n StringBuffer classBuffer = new StringBuffer();\n if (enableMetadata) {\n String metadataStyleClass = metadataEmitter.getMetadataStyleClass(content);\n if (null != metadataStyleClass) {\n classBuffer.append(metadataStyleClass);\n }\n }\n if (!enableInlineStyle && styleClass != null && styleClass.length() > 0) {\n String[] strings = styleClass.split(\"String_Node_Str\");\n for (String string : strings) {\n string = string.trim();\n if (string.length() > 0) {\n if (classBuffer.length() > 0) {\n classBuffer.append(' ');\n }\n if (null != htmlIDNamespace) {\n classBuffer.append(htmlIDNamespace);\n }\n classBuffer.append(string);\n }\n }\n }\n if (hasCsslinks) {\n Object genBy = content.getGenerateBy();\n if (genBy instanceof StyledElementDesign) {\n DesignElementHandle handle = ((StyledElementDesign) genBy).getHandle();\n if (handle != null) {\n String name = handle.getStringProperty(ReportItemHandle.STYLE_PROP);\n if (name != null) {\n if (classBuffer.length() != 0) {\n classBuffer.append(\"String_Node_Str\" + name);\n } else {\n classBuffer.append(name);\n }\n }\n }\n }\n }\n if (classBuffer.length() != 0) {\n writer.attribute(HTMLTags.ATTR_CLASS, classBuffer.toString());\n }\n}\n"
"protected void compileSnippetWithLeftoverMerge(final String code, int mergeLimit) throws UnableToCompleteException {\n addMockIntrinsic();\n sourceOracle.addOrReplace(new MockJavaResource(\"String_Node_Str\") {\n public CharSequence getContent() {\n return code;\n }\n });\n addBuiltinClasses(sourceOracle);\n CompilationState state = CompilationStateBuilder.buildFrom(logger, sourceOracle.getResources(), getAdditionalTypeProviderDelegate(), sourceLevel);\n jProgram = JavaAstConstructor.construct(logger, state, \"String_Node_Str\", \"String_Node_Str\");\n jProgram.addEntryMethod(findMethod(jProgram, \"String_Node_Str\"));\n CastNormalizer.exec(jProgram, false);\n ArrayNormalizer.exec(jProgram);\n Map<StandardSymbolData, JsName> symbolTable = new TreeMap<StandardSymbolData, JsName>(new SymbolData.ClassIdentComparator());\n JavaToJavaScriptMap map = GenerateJavaScriptAST.exec(jProgram, jsProgram, JsOutputOption.PRETTY, symbolTable, new PropertyOracle[] { new StaticPropertyOracle(orderedProps, orderedPropValues, configProps) }).getLeft();\n CodeSplitter2.exec(logger, jProgram, jsProgram, map, 4, NULL_RECORDER, mergeLimit);\n}\n"
"public void runUnifiedGenotyper(String input, String output, double scc, double sec, String ref, String[] knownSites, String region) throws InterruptedException {\n ArrayList<String> command = new ArrayList<String>();\n command.addAll(java);\n String[] gatkcmd = { mem, \"String_Node_Str\", gatk, \"String_Node_Str\", \"String_Node_Str\", multiThreadingTypes[threadingType], \"String_Node_Str\" + threads, \"String_Node_Str\", ref, \"String_Node_Str\", input, \"String_Node_Str\", output, \"String_Node_Str\", roundOneDecimal(scc), \"String_Node_Str\", roundOneDecimal(sec), \"String_Node_Str\", region, NO_CMD_HEADER, DISABLE_VCF_LOCKING };\n command.addAll(Arrays.asList(gatkcmd));\n if (knownSites != null) {\n for (String knownSite : knownSites) {\n command.add(\"String_Node_Str\");\n command.add(knownSite);\n }\n }\n String customArgs = HalvadeConf.getCustomArgs(context.getConfiguration(), \"String_Node_Str\", \"String_Node_Str\");\n command = CommandGenerator.addToCommand(command, customArgs);\n Object[] objectList = command.toArray();\n long estimatedTime = runProcessAndWait(\"String_Node_Str\", Arrays.copyOf(objectList, objectList.length, String[].class));\n if (context != null)\n context.getCounter(HalvadeCounters.TIME_GATK_VARIANT_CALLER).increment(estimatedTime);\n}\n"
"public void tokenize() {\n String code = this.file.getCode();\n int len = code.length();\n StringBuilder buf = new StringBuilder(20);\n Token first = new Token(-1, \"String_Node_Str\", (byte) 0, null, null, 0, -1, -1);\n Token prev = first;\n int start = 0;\n int lineNumber = 1;\n int i;\n char l = 0;\n char c = 0;\n int type = 0;\n int subtype = 0;\n boolean addToken = false;\n boolean reparse = true;\n for (i = 0; i < len; ++i, l = c) {\n c = code.charAt(i);\n if (c == '\\n') {\n lineNumber++;\n }\n if (type == 0) {\n start = i;\n if (isWhitespace(c)) {\n continue;\n }\n int m = getMode(c, code, i);\n type = m & 0xFFFF;\n subtype = m & 0xFFFF0000;\n }\n if (type == TYPE_IDENTIFIER) {\n if (subtype == MOD_DOTS) {\n if (c == '.') {\n buf.append(c);\n } else {\n addToken = true;\n reparse = true;\n }\n } else if (c == '_' || c == '$' || c == '@') {\n subtype = MOD_SYMBOL | MOD_LETTER;\n buf.append(c);\n } else {\n boolean letter = (subtype & MOD_LETTER) != 0;\n boolean symbol = (subtype & MOD_SYMBOL) != 0;\n if (letter) {\n if (isIdentifierPart(c)) {\n subtype = MOD_LETTER;\n buf.append(c);\n continue;\n }\n }\n if (symbol) {\n if (isIdentifierSymbol(c)) {\n subtype = MOD_SYMBOL;\n buf.append(c);\n continue;\n }\n }\n addToken = true;\n }\n } else if (type == TYPE_SYMBOL) {\n buf.append(c);\n addToken = true;\n reparse = false;\n } else if (type == TYPE_BRACKET) {\n buf.append(c);\n addToken = true;\n reparse = false;\n } else if (type == TYPE_COMMENT) {\n if (subtype == MOD_LINE) {\n if (c == '\\n') {\n type = 0;\n continue;\n }\n } else if (subtype == MOD_BLOCK) {\n if (l == '*' && c == '/') {\n type = 0;\n continue;\n }\n }\n } else if (type == TYPE_INT || type == TYPE_LONG) {\n if (c == '.') {\n type = TYPE_FLOAT;\n buf.append('.');\n } else if (c == 'l' || c == 'L') {\n type = TYPE_LONG;\n addToken = true;\n reparse = false;\n } else if (subtype == MOD_DEC) {\n if (isDigit(c)) {\n buf.append(c);\n } else if (c == 'f' || c == 'F') {\n type = TYPE_FLOAT;\n addToken = true;\n reparse = false;\n } else if (c == 'd' || c == 'D') {\n type = TYPE_FLOAT;\n addToken = true;\n reparse = false;\n } else {\n addToken = true;\n }\n } else if (subtype == MOD_BIN) {\n if (c == 'b' || isBinDigit(c)) {\n buf.append(c);\n } else {\n addToken = true;\n }\n } else if (subtype == MOD_OCT) {\n if (isOctDigit(c)) {\n buf.append(c);\n } else {\n addToken = true;\n }\n } else if (subtype == MOD_HEX) {\n if (c == 'x' || isHexDigit(c)) {\n buf.append(c);\n } else {\n addToken = true;\n }\n }\n } else if (type == TYPE_FLOAT || type == TYPE_DOUBLE) {\n if (c == 'x') {\n subtype = MOD_HEX;\n buf.append(c);\n } else if (c == 'f' || c == 'F') {\n addToken = true;\n reparse = false;\n } else if (c == 'd' || c == 'D') {\n type = TYPE_DOUBLE;\n addToken = true;\n reparse = false;\n } else if (isDigit(c) || c == '.' || c == 'e') {\n buf.append(c);\n } else {\n addToken = true;\n }\n } else if (type == TYPE_STRING) {\n if (c == '\"' && buf.length() > 0) {\n buf.append('\"');\n addToken = true;\n reparse = false;\n } else {\n buf.append(c);\n }\n } else if (type == TYPE_CHAR) {\n if (c == '\\'' && buf.length() > 0) {\n buf.append('\\'');\n addToken = true;\n reparse = false;\n } else {\n buf.append(c);\n }\n }\n if (addToken) {\n prev = this.addToken(prev, buf, type | subtype, lineNumber, start);\n addToken = false;\n type = 0;\n if (reparse) {\n i--;\n } else {\n reparse = true;\n }\n }\n }\n if (buf.length() > 0) {\n this.addToken(prev, buf, type, lineNumber, start, i);\n }\n this.first = first.next();\n}\n"
"protected List<RouteResultNode> doSharding(int poolId, List<RedisRequest> requests, List<RedisRequestPolicy> requestPolicys) throws PhysicalNodeUnavailableException {\n List<RouteResultNode> nodes = new ArrayList<RouteResultNode>();\n AbstractPool pool = RedisEngineCtx.INSTANCE().getPoolMap().get(poolId);\n if (pool.getType() == 0) {\n RouteResultNode node = new RouteResultNode();\n PhysicalNode physicalNode = pool.getPhysicalNode();\n if (physicalNode == null)\n throw new PhysicalNodeUnavailableException(\"String_Node_Str\");\n node.setPhysicalNode(physicalNode);\n for (int i = 0; i < requests.size(); i++) {\n node.addRequestIndex(i);\n }\n node.setPhysicalNode(pool.getPhysicalNode());\n nodes.add(node);\n } else if (pool.getType() == 1) {\n RedisClusterPool clusterPool = (RedisClusterPool) pool;\n for (int i = 0; i < requests.size(); i++) {\n if (requestPolicys.get(i).getLevel() == CommandParse.AUTO_RESP_CMD) {\n continue;\n }\n int slot = 0;\n RedisRequest request = requests.get(i);\n byte[] requestKey = request.getNumArgs() > 1 ? request.getArgs()[1] : null;\n if (requestKey != null) {\n slot = ClusterCRC16Util.getSlot(requestKey);\n }\n PhysicalNode physicalNode = clusterPool.getPhysicalNodeBySlot(slot);\n if (physicalNode == null)\n throw new PhysicalNodeUnavailableException(\"String_Node_Str\");\n arrangePhyNode(nodes, i, physicalNode);\n }\n } else if (pool.getType() == 2) {\n RedisCustomClusterPool ccPool = (RedisCustomClusterPool) pool;\n for (int i = 0; i < requests.size(); i++) {\n if (requestPolicys.get(i).getLevel() == CommandParse.AUTO_RESP_CMD) {\n continue;\n }\n RedisRequest request = requests.get(i);\n PhysicalNode physicalNode = ccPool.getPhysicalNode(request);\n arrangePhyNode(nodes, i, physicalNode);\n }\n }\n return nodes;\n}\n"
"private void handleVideoEvent(VideoEvent videoEvent, Container videoContainer) {\n if (videoEvent != null) {\n if ((videoEvent.getOrigin() == VideoEvent.REMOTE) && (videoEvent instanceof SizeChangeVideoEvent)) {\n SizeChangeVideoEvent sizeChangeVideoEvent = (SizeChangeVideoEvent) videoEvent;\n Component visualComponent = sizeChangeVideoEvent.getVisualComponent();\n int width = sizeChangeVideoEvent.getWidth();\n int height = sizeChangeVideoEvent.getHeight();\n if (visualComponent.getParent() == null)\n visualComponent.setPreferredSize(new Dimension(width, height));\n else if (isAncestor(videoContainer, visualComponent)) {\n ensureSize(visualComponent, width, height);\n return;\n }\n switch(videoEvent.getType()) {\n case VideoEvent.VIDEO_ADDED:\n case VideoEvent.VIDEO_REMOVED:\n break;\n default:\n return;\n }\n }\n int zOrder = 0;\n videoContainer.removeAll();\n if (localVideo != null) {\n videoContainer.add(localVideo, VideoLayout.LOCAL, zOrder++);\n if (!callDialog.isVideoButtonSelected())\n callDialog.setVideoButtonSelected(true);\n }\n Component video = videoTelephony.getVisualComponent(callPeer);\n if (video != null)\n videoContainer.add(video, VideoLayout.CENTER_REMOTE, zOrder++);\n videoContainer.validate();\n videoContainer.repaint();\n}\n"
"public void testPointcutName() throws IOException {\n File testFile = openFile(\"String_Node_Str\" + File.separator + \"String_Node_Str\");\n IProgramElement node = manager.getHierarchy().findElementForSourceFile(testFile.getAbsolutePath());\n assertTrue(\"String_Node_Str\", node != null);\n IProgramElement pNode = (IProgramElement) (node).getChildren().get(2);\n IProgramElement pointcut = (IProgramElement) pNode.getChildren().get(0);\n assertTrue(\"String_Node_Str\", pointcut.getKind().equals(IProgramElement.Kind.POINTCUT));\n assertTrue(\"String_Node_Str\" + pointcut.getName(), pointcut.toLabelString().equals(\"String_Node_Str\"));\n}\n"
"public static boolean isLinkedDataModelMeasureView(MeasureViewHandle mv) {\n String refColumn = getRefLinkedDataModelColumnName(mv);\n return refColumn != null && refColumn.trim().length() > 0;\n}\n"
"public Token next() throws IOException {\n while (true) {\n Token t = input.next();\n if (t == null)\n return t;\n String term = t.termText();\n String mapped = accentMap.mapWord(term);\n if (mapped == null)\n return t;\n if (mapped.length() == 0)\n continue;\n Token newToken = new Token(mapped, t.startOffset(), t.endOffset(), t.type());\n newToken.setPositionIncrement(t.getPositionIncrement());\n return newToken;\n }\n}\n"
"public int decrementAndGet() {\n return count.decrementAndGet();\n}\n"
"final private JsonElement JsonValue() throws ParseException {\n JsonElement o = null;\n switch((jj_ntk == -1) ? jj_ntk() : jj_ntk) {\n case QUOTE:\n o = JsonString();\n break;\n case DIGITS:\n case 24:\n o = JsonNumber();\n break;\n case 16:\n o = JsonObject();\n break;\n case 19:\n o = JsonArray();\n break;\n case 21:\n jj_consume_token(21);\n o = new JsonPrimitive(true);\n break;\n case 22:\n jj_consume_token(22);\n o = new JsonPrimitive(false);\n break;\n case 23:\n jj_consume_token(23);\n break;\n default:\n jj_la1[5] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n {\n if (true)\n return o;\n }\n throw new Error(\"String_Node_Str\");\n}\n"
"protected int updateWrapStrand(int maxIter) {\n int icnt = 0;\n boolean converged = false;\n double dscale = myDscale;\n updateContactingKnotPositions();\n int[] contactCnts = getContactCnts();\n int[] newContactCnts = new int[myWrappables.size()];\n updateForces();\n double prevEnergy = computeEnergy();\n double prevForceSqr = computeForceSqr();\n double prevForce = forceNorm();\n boolean wroteR = false;\n boolean wroteRx = false;\n do {\n double prevLength = myLength;\n if (inContact()) {\n }\n updateStiffness(0, dscale);\n boolean clipped = (factorAndSolve() < 1.0);\n double r0 = forceDotDisp();\n double denom = forceNorm() * computeDvecLength();\n double cos = r0 / denom;\n double mincos = 0.1;\n if (cos < mincos) {\n double lam = (denom * (mincos - cos) / computeForceSqr());\n modifyDvec(lam);\n r0 = forceDotDisp();\n if (debugLevel > 0) {\n System.out.println(\"String_Node_Str\" + cos + \"String_Node_Str\" + r0 / (forceNorm() * computeDvecLength()));\n }\n }\n double computedFSqr = computeForceSqrDeriv();\n savePosToPrev();\n LineSearchFunc func = new EnergyFunc();\n double f0, df0;\n if (func instanceof ForceSqrFunc) {\n f0 = computeForceSqr();\n df0 = computeForceSqrDeriv();\n } else {\n f0 = computeEnergy();\n df0 = -forceDotDisp();\n }\n double h = 1e-8;\n prevEnergy = computeEnergy();\n advancePosByDvec(h);\n updateContacts(null, false);\n updateForces();\n double forceSqr = computeForceSqr();\n double energy = computeEnergy();\n double ederiv = (energy - prevEnergy) / h;\n double fsqrDeriv = (forceSqr - prevForceSqr) / h;\n double s = 1.0;\n advancePosByDvec(s);\n contactDebug = (icnt == 0);\n boolean contactChanged = updateContacts(newContactCnts, true);\n contactDebug = false;\n boolean contactBroken = checkForBrokenContact(contactCnts, newContactCnts);\n updateForces();\n energy = computeEnergy();\n forceSqr = computeForceSqr();\n if (debugLevel > 0) {\n System.out.println(\"String_Node_Str\" + prevEnergy + \"String_Node_Str\" + energy + \"String_Node_Str\" + ederiv);\n }\n double r1 = forceDotDisp();\n DoubleHolder deriv = new DoubleHolder();\n double f1 = func.eval(deriv, s);\n double df1 = deriv.value;\n if (contactBroken) {\n saveDvecToVtmp();\n updateStiffness(0, dscale);\n factorAndSolve();\n double pullback = 1.0;\n for (int k = 0; k < myNumKnots; k++) {\n WrapKnot knot = myKnots[k];\n int widx = knot.myPrevWrappableIdx;\n if (widx != -1 && newContactCnts[widx] != 0) {\n if (knot.myDvec.dot(knot.myVtmp) < 0) {\n if (debugLevel > 0)\n System.out.println(\"String_Node_Str\");\n double dist = knot.myDist;\n double prev = knot.myPrevDist;\n if (dist != Wrappable.OUTSIDE && dist > 0 && prev < 0) {\n double r = dist / (dist - prev);\n if (r < scale) {\n scale = r;\n }\n }\n }\n }\n }\n if (scale < 1.0) {\n if (myContactRescaling) {\n if (debugLevel > 0) {\n System.out.println(\"String_Node_Str\" + (1 - scale));\n }\n advancePosByVtmp(1 - scale);\n s = 1 - scale;\n updateContacts(contactCnts, true);\n updateForces();\n f1 = computeEnergy();\n df1 = -forceDotDisp();\n }\n } else {\n restoreDvecFromVtmp();\n }\n }\n double ltol = myLength * myLengthConvTol;\n if (!contactChanged) {\n double maxLatDisp = maxLateralDisplacement();\n if (debugLevel > 0) {\n }\n if (maxLatDisp / myLength < 1e-4 && Math.abs(prevLength - myLength) < ltol) {\n converged = true;\n }\n }\n if (!converged && myLineSearchP) {\n ResidualFunc rfunc = new ResidualFunc();\n double maxs = (contactChanged ? s : 3.0);\n if (df0 >= 0) {\n System.out.println(\"String_Node_Str\" + df0);\n printStuckDebugInfo(maxs);\n } else {\n double snew = lineSearch(f0, df0, f1, df1, func, 0.1, 2.0, s, maxs);\n if (snew != s) {\n if (debugLevel > 0) {\n System.out.printf(\"String_Node_Str\", snew);\n }\n rfunc.eval(snew);\n updateContacts(null, true);\n energy = computeEnergy();\n forceSqr = computeForceSqr();\n } else {\n rfunc.eval(s);\n updateContacts(null, true);\n }\n }\n if (false) {\n }\n }\n double newEnergy = computeEnergy();\n if (debugLevel > 0) {\n System.out.printf(\"String_Node_Str\", (newEnergy - prevEnergy));\n }\n prevEnergy = energy;\n prevForceSqr = forceSqr;\n prevForce = forceNorm();\n } while (++icnt < maxIter && !converged);\n saveContactingKnotPositions();\n totalIterations += icnt;\n totalCalls++;\n if (converged) {\n if (debugLevel > 0) {\n System.out.println(\"String_Node_Str\" + icnt);\n }\n } else {\n if (debugLevel > 0) {\n System.out.println(\"String_Node_Str\");\n }\n totalFails++;\n }\n if ((totalCalls % 100) == 0) {\n }\n myDscale = dscale;\n return icnt;\n}\n"
"public boolean choose(Outcome outcome, Target target, UUID sourceId, Game game, Map<String, Serializable> options) {\n if (!choices.isEmpty()) {\n if ((target instanceof TargetPermanent) || (target instanceof TargetPermanentOrPlayer)) {\n FilterPermanent filterPermanent;\n if (target instanceof TargetPermanentOrPlayer) {\n filterPermanent = ((TargetPermanentOrPlayer) target).getFilterPermanent();\n } else {\n filterPermanent = ((TargetPermanent) target).getFilter();\n }\n for (String choose2 : choices) {\n String[] targetList = choose2.split(\"String_Node_Str\");\n boolean targetFound = false;\n for (String targetName : targetList) {\n for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filterPermanent, game)) {\n if (target.getTargets().contains(permanent.getId())) {\n continue;\n }\n } else if ((permanent.getName() + \"String_Node_Str\" + permanent.getExpansionSetCode()).equals(choose2)) {\n if (((TargetPermanent) target).canTarget(playerId, permanent.getId(), null, game) && !target.getTargets().contains(permanent.getId())) {\n target.add(permanent.getId(), game);\n choices.remove(choose2);\n return true;\n }\n }\n }\n }\n }\n if (target instanceof TargetPlayer) {\n for (Player player : game.getPlayers().values()) {\n for (String choose2 : choices) {\n if (player.getName().equals(choose2)) {\n if (((TargetPlayer) target).canTarget(playerId, player.getId(), null, game) && !target.getTargets().contains(player.getId())) {\n target.add(player.getId(), game);\n choices.remove(choose2);\n return true;\n }\n }\n }\n }\n }\n if (target instanceof TargetSource) {\n Set<UUID> possibleTargets;\n TargetSource t = ((TargetSource) target);\n possibleTargets = t.possibleTargets(sourceId, playerId, game);\n for (UUID targetId : possibleTargets) {\n MageObject targetObject = game.getObject(targetId);\n if (targetObject != null) {\n for (String choose2 : choices) {\n if (targetObject.getName().equals(choose2)) {\n List<UUID> alreadyTargetted = target.getTargets();\n if (t.canTarget(targetObject.getId(), game)) {\n if (alreadyTargetted != null && !alreadyTargetted.contains(targetObject.getId())) {\n target.add(targetObject.getId(), game);\n choices.remove(choose2);\n return true;\n }\n }\n }\n }\n }\n }\n }\n }\n return super.choose(outcome, target, sourceId, game, options);\n}\n"
"public static String addQuotesWithSpaceFieldForSQLStringForce(String fieldName, String dbType, boolean simple) {\n EDatabaseTypeName name = EDatabaseTypeName.getTypeFromDbType(dbType);\n final String quote = getQuoteByDBType(name);\n boolean isCheck = false;\n String preferenceValue = CorePlugin.getDefault().getPreferenceStore().getString(ITalendCorePrefConstants.SQL_ADD_QUOTE);\n isCheck = Boolean.parseBoolean(preferenceValue);\n String temp = removeQuotes(fieldName);\n Pattern pattern = Pattern.compile(\"String_Node_Str\");\n Matcher matcher = pattern.matcher(temp);\n boolean isSqlKeyword = KeywordsValidator.isSqlKeyword(temp, name.getProduct());\n boolean isH2 = EDatabaseTypeName.H2 == name;\n if (((!matcher.matches() || isSqlKeyword) && !isH2 && EDatabaseTypeName.SAS != name && EDatabaseTypeName.IMPALA != name) || isIBMDB2ContainLowerCase(dbType, fieldName)) {\n isCheck = true;\n }\n if (!isCheck && isPSQLSimilar(name) && !EDatabaseTypeName.MYSQL.equals(name)) {\n return fieldName;\n }\n String newFieldName = fieldName;\n newFieldName = TalendQuoteUtils.addQuotesForSQLString(newFieldName, quote, simple);\n return newFieldName;\n}\n"
"private static void createReplayOfRemainingTasks(MapLoader newSavegame, ReplayStartInformation replayStartInformation, String newReplayFile) throws IOException {\n System.out.println(\"String_Node_Str\" + newReplayFile + \"String_Node_Str\");\n new File(newReplayFile).getAbsoluteFile().getParentFile().mkdirs();\n ReplayStartInformation replayInfo = new ReplayStartInformation(0, newSavegame.getMapName(), newSavegame.getMapId(), replayStartInformation.getPlayerId(), replayStartInformation.getPlayerSettings());\n DataOutputStream dos = new DataOutputStream(new FileOutputStream(newReplayFile));\n replayInfo.serialize(dos);\n MatchConstants.clock.saveRemainingTasks(dos);\n dos.close();\n System.out.println(\"String_Node_Str\");\n}\n"
"public static void closeZooKeeper() {\n Collection<ZooKeeperConntrollerWatchInfo> values = _zkConnectionInfo.values();\n for (ZooKeeperConntrollerWatchInfo zooKeeperConntrollerWatchInfo : values) {\n closeQuietly(zooKeeperConntrollerWatchInfo);\n }\n}\n"
"private NodeList getNodes(Node contextNode, XPathFragment xPathFragment, XMLNamespaceResolver xmlNamespaceResolver, AbstractNullPolicy nullPolicy) {\n if (xPathFragment.isAttribute()) {\n return selectAttributeNodes(contextNode, xPathFragment, xmlNamespaceResolver);\n } else if (xPathFragment.nameIsText()) {\n return selectTextNodes(contextNode, nullPolicy, concatText);\n } else if (xPathFragment.isSelfFragment()) {\n XMLNodeList xmlNodeList = new XMLNodeList(1);\n xmlNodeList.add(contextNode);\n return xmlNodeList;\n }\n if (xPathFragment.containsIndex()) {\n return selectElementNodes(contextNode, xPathFragment, xmlNamespaceResolver, xPathFragment.getIndexValue());\n }\n return selectElementNodes(contextNode, xPathFragment, xmlNamespaceResolver);\n}\n"
"public void consumerShouldSeeOwnEntitlements() {\n consumerResource.bind(consumer.getUuid(), pool.getId(), null, null, 1, null, null);\n consumerResource.bind(consumer.getUuid(), pool.getId(), null, null, 1, null, null);\n consumerResource.bind(consumer.getUuid(), pool.getId(), null, null, 1, null, null);\n setupPrincipal(new ConsumerPrincipal(consumer));\n securityInterceptor.enable();\n crudInterceptor.enable();\n assertEquals(3, consumerResource.listEntitlements(consumer.getUuid(), null).size());\n}\n"
"public SessionEventListener getSessionEventListener(AbstractSession session) {\n return new PreLoginMappingAdapterV2();\n}\n"
"public void handleEvent(Event event) {\n String type = event.getType();\n if (type.equals(CLICK))\n visualComponent.getListener(ClickListener.class).clickPerformed(visualComponent);\n else if (type.equals(DBLCLICK))\n visualComponent.getListener(DoubleClickListener.class).doubleClickPerformed(visualComponent);\n else if (type.equals(MOUSEOVER))\n visualComponent.getListener(MouseOverListener.class).mouseOverPerformed(visualComponent);\n else if (type.equals(MOUSEOUT))\n visualComponent.getListener(MouseOutListener.class).mouseOutPerformed(visualComponent);\n else if (type.equals(MOUSEDOWN))\n visualComponent.getListener(MouseDownListener.class).mouseDownPerformed(null);\n else if (type.equals(MOUSEUP))\n visualComponent.getListener(MouseUpListener.class).mouseUpPerformed(visualComponent);\n else if (type.equals(BLUR))\n visualComponent.getListener(BlurListener.class).blurPerformed(visualComponent);\n else if (type.equals(INPUT))\n visualComponent.getListener(InputListener.class).inputPerformed(visualComponent);\n else if (event instanceof KeyboardEvent) {\n KeyboardEvent keyboardEvent = (KeyboardEvent) event;\n int keyId = keyboardEvent.getKeyCode();\n if (type.equals(KEYUP))\n visualComponent.getListener(KeyUpListener.class).keyupPerformed(visualComponent, keyId);\n else if (type.equals(KEYDOWN))\n visualComponent.getListener(KeyDownListener.class).keydownPerformed(visualComponent, keyId);\n else if (type.equals(KEYPRESS))\n visualComponent.getListener(KeyPressListener.class).keypressPerformed(visualComponent, keyId);\n }\n}\n"
"public void convertClassNamesToClasses(ClassLoader classLoader) {\n Iterator<XMLField> fields = fieldToClassNameMappings.keySet().iterator();\n while (fields.hasNext()) {\n XMLField next = fields.next();\n String className = fieldToClassNameMappings.get(next);\n Class elementType = null;\n try {\n if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {\n try {\n elementType = (Class) AccessController.doPrivileged(new PrivilegedClassForName(className, true, classLoader));\n } catch (PrivilegedActionException exception) {\n throw ValidationException.classNotFoundWhileConvertingClassNames(className, exception.getException());\n }\n } else {\n elementType = org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(className, true, classLoader);\n }\n } catch (ClassNotFoundException exc) {\n throw ValidationException.classNotFoundWhileConvertingClassNames(className, exc);\n }\n if (classToFieldMappings.get(elementType) == null) {\n classToFieldMappings.put(elementType, next);\n }\n }\n}\n"
"public void destroy() throws Exception {\n HttpResponse httpResponse;\n if (app1Name != null) {\n httpResponse = apiStore.removeApplication(app1Name);\n checkError(httpResponse.getData(), \"String_Node_Str\" + app1Name);\n }\n if (app2Name != null) {\n httpResponse = apiStore.removeApplication(app2Name);\n checkError(httpResponse.getData(), \"String_Node_Str\" + app2Name);\n }\n httpResponse = apiPublisher.deleteAPI(apiName, \"String_Node_Str\", publisherContext.getSuperTenant().getContextUser().getUserName());\n checkError(httpResponse.getData(), \"String_Node_Str\" + apiName);\n httpResponse = apiPublisher.deleteAPI(apiNameFaultyAPI, \"String_Node_Str\", publisherContext.getSuperTenant().getContextUser().getUserName());\n checkError(httpResponse.getData(), \"String_Node_Str\" + apiNameFaultyAPI);\n super.cleanUp();\n}\n"
"protected boolean removeSomething(String type, String first, String second) throws NetworkException, APIException {\n Response response = null;\n if (second != null) {\n response = this.getAPIURL(\"String_Node_Str\" + type, \"String_Node_Str\", first, second);\n } else {\n response = this.getAPIURL(\"String_Node_Str\" + type, \"String_Node_Str\", first);\n }\n if (response.getContent() != null && response.getContent().length() != 0) {\n JSONNode json = null;\n try {\n json = response.getJSONResult();\n } catch (ParserException e) {\n throw new APIException(\"String_Node_Str\");\n }\n if (json.getBoolean(\"String_Node_Str\", false)) {\n return true;\n } else {\n throw new APIException(json.getString(\"String_Node_Str\"));\n }\n }\n throw new APIException(\"String_Node_Str\");\n}\n"
"public static Double getIrrelevantParameterThreshold(ExplorationStrategy strategyConfig) {\n String value = strategyConfig.getConfiguration().get(IRRELEVANT_PARAMETER_THRESHOLD);\n if (value != null && !value.isEmpty()) {\n return Double.valueOf(value);\n } else {\n return IRRELEVANT_PARAMETER_THRESHOLD_DEFAULT_VALUE;\n }\n}\n"
"public boolean get(long bitIndex) {\n long longIndex = bitIndex >> 6;\n if (bitIndex < 0 || longIndex >= longLength)\n throw new IndexOutOfBoundsException();\n long l = bytes.readVolatileLong(longIndex << 3);\n return (l >> bitIndex) != 0;\n}\n"
"public static Long selectLongValue(String query, Object... args) {\n Connection c = DBConnect.getDBConnection();\n PreparedStatement s = null;\n try {\n s = DBUtils.prepareStatement(c, query, args);\n return selectLongValue(s);\n } catch (SQLException e) {\n throw new IOFailure(\"String_Node_Str\" + query + \"String_Node_Str\" + args + \"String_Node_Str\" + ExceptionUtils.getSQLExceptionCause(e), e);\n } finally {\n DBUtils.closeStatementIfOpen(s);\n }\n}\n"
"public static Block getEarthSourceBlock(Player player, double range) {\n Block testblock = player.getTargetBlock(getTransparentEarthbending(), (int) range);\n if (isEarthbendable(player, testblock) || isMetalbendable(player, testblock.getType()))\n return testblock;\n Location location = player.getEyeLocation();\n Vector vector = location.getDirection().clone().normalize();\n for (double i = 0; i <= range; i++) {\n Block block = location.clone().add(vector.clone().multiply(i)).getBlock();\n if (GeneralMethods.isRegionProtectedFromBuild(player, \"String_Node_Str\", location))\n continue;\n if (isEarthbendable(player, block)) {\n return block;\n }\n }\n return null;\n}\n"
"public void dismiss() {\n if (mIsDismissing) {\n return;\n }\n mIsDismissing = true;\n if (mEventListener != null && mIsShowing) {\n mEventListener.onDismiss(Snackbar.this);\n }\n if (!animate) {\n finish();\n return;\n }\n final Animation slideOut = AnimationUtils.loadAnimation(getContext(), R.anim.snackbar_out);\n slideOut.setAnimationListener(new Animation.AnimationListener() {\n public void onAnimationStart(Animation animation) {\n }\n public void onAnimationEnd(Animation animation) {\n post(new Runnable() {\n public void run() {\n finish();\n }\n });\n }\n public void onAnimationRepeat(Animation animation) {\n }\n });\n startAnimation(slideOut);\n}\n"
"public void run() {\n setPresenceIcon(updated.getPresenceResId());\n}\n"
"private int createValueListComposite(Composite parent) {\n if (valueListComposite != null && !valueListComposite.isDisposed()) {\n return 0;\n }\n disposeComposites();\n valueListComposite = new Composite(parent, SWT.NONE);\n GridData gdata = new GridData(GridData.FILL_HORIZONTAL);\n gdata.horizontalSpan = 4;\n valueListComposite.setLayoutData(gdata);\n GridLayout layout = new GridLayout();\n layout.numColumns = 4;\n valueListComposite.setLayout(layout);\n compositeList.add(valueListComposite);\n Group group = new Group(valueListComposite, SWT.NONE);\n GridData data = new GridData(GridData.FILL_HORIZONTAL);\n data.heightHint = 118;\n data.horizontalSpan = 3;\n data.horizontalIndent = 0;\n data.grabExcessHorizontalSpace = true;\n group.setLayoutData(data);\n layout = new GridLayout();\n layout.numColumns = 4;\n group.setLayout(layout);\n new Label(group, SWT.NONE).setText(Messages.getString(\"String_Node_Str\"));\n GridData expgd = new GridData();\n expgd.widthHint = 100;\n addExpressionValue = new MultiValueCombo(group, SWT.NONE);\n addExpressionValue.setLayoutData(expgd);\n addBtn = new Button(group, SWT.PUSH);\n addBtn.setText(Messages.getString(\"String_Node_Str\"));\n addBtn.setToolTipText(Messages.getString(\"String_Node_Str\"));\n setButtonLayoutData(addBtn);\n addBtn.addSelectionListener(new SelectionListener() {\n public void widgetDefaultSelected(SelectionEvent e) {\n }\n public void widgetSelected(SelectionEvent e) {\n String value = addExpressionValue.getText().trim();\n if (valueList.indexOf(value) < 0) {\n valueList.add(value);\n tableViewer.refresh();\n updateButtons();\n addExpressionValue.setFocus();\n addExpressionValue.setText(\"String_Node_Str\");\n } else {\n addBtn.setEnabled(false);\n }\n }\n });\n new Label(group, SWT.NONE);\n int tableStyle = SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION;\n table = new Table(group, tableStyle);\n data = new GridData(GridData.FILL_BOTH);\n data.horizontalSpan = 4;\n table.setLayoutData(data);\n table.setHeaderVisible(false);\n table.setLinesVisible(true);\n TableColumn column;\n int i;\n String[] columNames = new String[] { Messages.getString(\"String_Node_Str\") };\n int[] columLength = new int[] { 288 };\n for (i = 0; i < columNames.length; i++) {\n column = new TableColumn(table, SWT.NONE, i);\n column.setText(columNames[i]);\n column.setWidth(columLength[i]);\n }\n table.addSelectionListener(new SelectionListener() {\n public void widgetDefaultSelected(SelectionEvent e) {\n }\n public void widgetSelected(SelectionEvent e) {\n checkEditDelButtonStatus();\n }\n });\n table.addKeyListener(new KeyListener() {\n public void keyPressed(KeyEvent e) {\n if (e.keyCode == SWT.DEL) {\n delTableValue();\n }\n }\n public void keyReleased(KeyEvent e) {\n }\n });\n table.addMouseListener(new MouseAdapter() {\n public void mouseDoubleClick(MouseEvent e) {\n editTableValue();\n }\n });\n tableViewer = new TableViewer(table);\n tableViewer.setUseHashlookup(true);\n tableViewer.setColumnProperties(columNames);\n tableViewer.setLabelProvider(tableLableProvier);\n tableViewer.setContentProvider(tableContentProvider);\n Composite rightPart = new Composite(valueListComposite, SWT.NONE);\n data = new GridData(GridData.FILL_BOTH | GridData.VERTICAL_ALIGN_END);\n rightPart.setLayoutData(data);\n layout = new GridLayout();\n layout.makeColumnsEqualWidth = true;\n rightPart.setLayout(layout);\n editBtn = new Button(rightPart, SWT.PUSH);\n editBtn.setText(Messages.getString(\"String_Node_Str\"));\n editBtn.setToolTipText(Messages.getString(\"String_Node_Str\"));\n setButtonLayoutData(editBtn);\n editBtn.addSelectionListener(new SelectionListener() {\n public void widgetDefaultSelected(SelectionEvent e) {\n }\n public void widgetSelected(SelectionEvent e) {\n editTableValue();\n }\n });\n delBtn = new Button(rightPart, SWT.PUSH);\n delBtn.setText(Messages.getString(\"String_Node_Str\"));\n delBtn.setToolTipText(Messages.getString(\"String_Node_Str\"));\n setButtonLayoutData(delBtn);\n delBtn.addSelectionListener(new SelectionAdapter() {\n\n public void widgetSelected(SelectionEvent e) {\n delTableValue();\n }\n });\n delAllBtn = new Button(rightPart, SWT.PUSH);\n delAllBtn.setText(Messages.getString(\"String_Node_Str\"));\n delAllBtn.setToolTipText(Messages.getString(\"String_Node_Str\"));\n setButtonLayoutData(delAllBtn);\n delAllBtn.addSelectionListener(new SelectionListener() {\n public void widgetDefaultSelected(SelectionEvent e) {\n }\n public void widgetSelected(SelectionEvent e) {\n int count = valueList.size();\n if (count > 0) {\n valueList.clear();\n tableViewer.refresh();\n updateButtons();\n } else {\n delAllBtn.setEnabled(false);\n }\n }\n });\n addExpressionValue.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent e) {\n checkAddButtonStatus();\n updateButtons();\n }\n });\n addExpressionValue.addSelectionListener(0, mAddSelValueAction);\n addExpressionValue.addSelectionListener(1, mAddExpValueAction);\n addExpressionValue.setItems(popupItems);\n parent.getParent().layout(true, true);\n if (parent.getShell() != null)\n parent.getShell().pack();\n return 1;\n}\n"
"public void tickProgression() {\n World world = manager.getWorld();\n if (world.getTotalWorldTime() % 3 == 0) {\n if (isGrowing) {\n if (size < maxSize) {\n size++;\n } else {\n }\n } else {\n }\n }\n float tempAdjustRate = (float) ConfigStorm.Storm_TemperatureAdjustRate;\n int levelWaterBuildRate = ConfigStorm.Storm_Rain_WaterBuildUpRate;\n int levelWaterSpendRate = ConfigStorm.Storm_Rain_WaterSpendRate;\n int randomChanceOfWaterBuildFromWater = ConfigStorm.Storm_Rain_WaterBuildUpOddsTo1FromSource;\n int randomChanceOfWaterBuildFromNothing = ConfigStorm.Storm_Rain_WaterBuildUpOddsTo1FromNothing;\n boolean isInOcean = false;\n boolean isOverWater = false;\n if (world.getTotalWorldTime() % ConfigStorm.Storm_AllTypes_TickRateDelay == 0) {\n NBTTagCompound playerNBT = PlayerData.getPlayerNBT(userSpawnedFor);\n long lastStormDeadlyTime = playerNBT.getLong(\"String_Node_Str\");\n Biome bgb = world.getBiome(new BlockPos(MathHelper.floor(pos.xCoord), 0, MathHelper.floor(pos.zCoord)));\n if (bgb != null) {\n isInOcean = bgb.biomeName.contains(\"String_Node_Str\") || bgb.biomeName.contains(\"String_Node_Str\");\n float biomeTempAdj = getTemperatureMCToWeatherSys(CoroUtilCompatibility.getAdjustedTemperature(manager.getWorld(), bgb, new BlockPos(MathHelper.floor(pos.xCoord), MathHelper.floor(pos.yCoord), MathHelper.floor(pos.zCoord))));\n if (levelTemperature > biomeTempAdj) {\n levelTemperature -= tempAdjustRate;\n } else {\n levelTemperature += tempAdjustRate;\n }\n }\n boolean performBuildup = false;\n Random rand = new Random();\n if (!isPrecipitating() && rand.nextInt(randomChanceOfWaterBuildFromNothing) == 0) {\n performBuildup = true;\n }\n Block blockID = world.getBlockState(new BlockPos(MathHelper.floor(pos.xCoord), currentTopYBlock - 1, MathHelper.floor(pos.zCoord))).getBlock();\n if (!CoroUtilBlock.isAir(blockID)) {\n if (blockID.getMaterial(blockID.getDefaultState()) instanceof MaterialLiquid) {\n isOverWater = true;\n }\n }\n if (!performBuildup && !isPrecipitating() && rand.nextInt(randomChanceOfWaterBuildFromWater) == 0) {\n if (isOverWater) {\n performBuildup = true;\n }\n if (!performBuildup && bgb != null && (isInOcean || bgb.biomeName.contains(\"String_Node_Str\") || bgb.biomeName.contains(\"String_Node_Str\") || bgb.biomeName.contains(\"String_Node_Str\"))) {\n performBuildup = true;\n }\n }\n if (performBuildup) {\n levelWater += levelWaterBuildRate;\n }\n if (isPrecipitating()) {\n levelWater -= levelWaterSpendRate;\n if (levelWater < 0)\n levelWater = 0;\n if (levelWater <= 0) {\n setPrecipitating(false);\n Weather.dbg(\"String_Node_Str\" + ID);\n }\n } else {\n if (!ConfigMisc.overcastMode || manager.getWorld().isRaining()) {\n if (levelWater >= levelWaterStartRaining) {\n if (ConfigStorm.Player_Storm_Rain_OddsTo1 != -1 && rand.nextInt(ConfigStorm.Player_Storm_Rain_OddsTo1) == 0) {\n setPrecipitating(true);\n Weather.dbg(\"String_Node_Str\" + ID);\n }\n }\n }\n }\n WeatherManagerServer wm = ServerTickHandler.lookupDimToWeatherMan.get(world.provider.getDimension());\n boolean tryFormStorm = false;\n if (this.canBeDeadly && this.levelCurIntensityStage == STATE_NORMAL) {\n if (ConfigStorm.Server_Storm_Deadly_UseGlobalRate) {\n if (ConfigStorm.Server_Storm_Deadly_TimeBetweenInTicks != -1) {\n if (wm.lastStormFormed == 0 || wm.lastStormFormed + ConfigStorm.Server_Storm_Deadly_TimeBetweenInTicks < world.getTotalWorldTime()) {\n tryFormStorm = true;\n }\n }\n } else {\n if (ConfigStorm.Player_Storm_Deadly_TimeBetweenInTicks != -1) {\n if (lastStormDeadlyTime == 0 || lastStormDeadlyTime + ConfigStorm.Player_Storm_Deadly_TimeBetweenInTicks < world.getTotalWorldTime()) {\n tryFormStorm = true;\n }\n }\n }\n }\n if (weatherMachineControlled) {\n return;\n }\n if (((ConfigMisc.overcastMode && manager.getWorld().isRaining()) || !ConfigMisc.overcastMode) && WeatherUtilConfig.listDimensionsStorms.contains(manager.getWorld().provider.getDimension()) && tryFormStorm) {\n int stormFrontCollideDist = ConfigStorm.Storm_Deadly_CollideDistance;\n int randomChanceOfCollide = ConfigStorm.Player_Storm_Deadly_OddsTo1;\n if (ConfigStorm.Server_Storm_Deadly_UseGlobalRate) {\n randomChanceOfCollide = ConfigStorm.Server_Storm_Deadly_OddsTo1;\n }\n if (isInOcean && (ConfigStorm.Storm_OddsTo1OfOceanBasedStorm > 0 && rand.nextInt(ConfigStorm.Storm_OddsTo1OfOceanBasedStorm) == 0)) {\n EntityPlayer entP = world.getPlayerEntityByName(userSpawnedFor);\n if (entP != null) {\n initRealStorm(entP, null);\n } else {\n initRealStorm(null, null);\n }\n if (ConfigStorm.Server_Storm_Deadly_UseGlobalRate) {\n wm.lastStormFormed = world.getTotalWorldTime();\n } else {\n playerNBT.setLong(\"String_Node_Str\", world.getTotalWorldTime());\n }\n } else if (!isInOcean && ConfigStorm.Storm_OddsTo1OfLandBasedStorm > 0 && rand.nextInt(ConfigStorm.Storm_OddsTo1OfLandBasedStorm) == 0) {\n EntityPlayer entP = world.getPlayerEntityByName(userSpawnedFor);\n if (entP != null) {\n initRealStorm(entP, null);\n } else {\n initRealStorm(null, null);\n }\n if (ConfigStorm.Server_Storm_Deadly_UseGlobalRate) {\n wm.lastStormFormed = world.getTotalWorldTime();\n } else {\n playerNBT.setLong(\"String_Node_Str\", world.getTotalWorldTime());\n }\n } else if (rand.nextInt(randomChanceOfCollide) == 0) {\n for (int i = 0; i < manager.getStormObjects().size(); i++) {\n WeatherObject wo = manager.getStormObjects().get(i);\n if (wo instanceof StormObject) {\n StormObject so = (StormObject) wo;\n boolean startStorm = false;\n if (so.ID != this.ID && so.levelCurIntensityStage <= 0 && !so.isCloudlessStorm() && !so.weatherMachineControlled) {\n if (so.pos.distanceTo(pos) < stormFrontCollideDist) {\n if (this.levelTemperature < 0) {\n if (so.levelTemperature > 0) {\n startStorm = true;\n }\n } else if (this.levelTemperature > 0) {\n if (so.levelTemperature < 0) {\n startStorm = true;\n }\n }\n }\n }\n if (startStorm) {\n playerNBT.setLong(\"String_Node_Str\", world.getTotalWorldTime());\n EntityPlayer entP = world.getPlayerEntityByName(userSpawnedFor);\n if (entP != null) {\n initRealStorm(entP, so);\n } else {\n initRealStorm(null, so);\n }\n break;\n }\n }\n }\n }\n }\n if (isRealStorm()) {\n if (ConfigMisc.overcastMode) {\n if (!manager.getWorld().isRaining()) {\n hasStormPeaked = true;\n }\n }\n if (!hasStormPeaked) {\n levelWater = levelWaterStartRaining;\n setPrecipitating(true);\n }\n if ((levelCurIntensityStage == STATE_HIGHWIND || levelCurIntensityStage == STATE_HAIL) && isOverWater) {\n if (ConfigStorm.Storm_OddsTo1OfHighWindWaterSpout != 0 && rand.nextInt(ConfigStorm.Storm_OddsTo1OfHighWindWaterSpout) == 0) {\n attrib_waterSpout = true;\n }\n } else {\n attrib_waterSpout = false;\n }\n float levelStormIntensityRate = 0.02F;\n float minIntensityToProgress = 0.6F;\n int oddsTo1OfIntensityProgressionBase = ConfigStorm.Storm_OddsTo1OfProgressionBase;\n if (levelCurIntensityStage >= levelStormIntensityFormingStartVal) {\n levelStormIntensityRate *= 3;\n oddsTo1OfIntensityProgressionBase /= 3;\n }\n int oddsTo1OfIntensityProgression = oddsTo1OfIntensityProgressionBase + (levelCurIntensityStage * ConfigStorm.Storm_OddsTo1OfProgressionStageMultiplier);\n if (!hasStormPeaked) {\n levelCurStagesIntensity += levelStormIntensityRate;\n if (levelCurIntensityStage < maxIntensityStage && (!ConfigTornado.Storm_NoTornadosOrCyclones || levelCurIntensityStage < STATE_FORMING - 1)) {\n if (levelCurStagesIntensity >= minIntensityToProgress) {\n if (alwaysProgresses || rand.nextInt(oddsTo1OfIntensityProgression) == 0) {\n stageNext();\n Weather.dbg(\"String_Node_Str\" + this.ID + \"String_Node_Str\" + levelCurIntensityStage);\n if (isInOcean) {\n if (levelCurIntensityStage == STATE_FORMING) {\n Weather.dbg(\"String_Node_Str\" + this.ID + \"String_Node_Str\");\n stormType = TYPE_WATER;\n }\n }\n }\n }\n }\n if (levelCurStagesIntensity >= 1F) {\n Weather.dbg(\"String_Node_Str\" + levelCurIntensityStage);\n hasStormPeaked = true;\n }\n } else {\n if (ConfigMisc.overcastMode && manager.getWorld().isRaining()) {\n levelCurStagesIntensity -= levelStormIntensityRate * 0.9F;\n } else {\n levelCurStagesIntensity -= levelStormIntensityRate * 0.3F;\n }\n if (levelCurStagesIntensity <= 0) {\n stagePrev();\n Weather.dbg(\"String_Node_Str\" + this.ID + \"String_Node_Str\" + levelCurIntensityStage);\n if (levelCurIntensityStage <= 0) {\n setNoStorm();\n }\n }\n }\n } else {\n if (ConfigMisc.overcastMode) {\n if (!manager.getWorld().isRaining()) {\n if (attrib_precipitation) {\n setPrecipitating(false);\n }\n }\n }\n }\n }\n}\n"
"public Object getCachedObject(Object object, boolean nullIfAbsent) {\n Object entity = null;\n if (object instanceof Identifiable) {\n entity = entitiesByUid.get(object.getClass().getName() + \"String_Node_Str\" + getUid((Identifiable) object));\n } else if (object instanceof EntityRef) {\n entity = entitiesByUid.get(((EntityRef) object).getClassName() + \"String_Node_Str\" + ((EntityRef) object).getUid());\n }\n if (entity != null)\n return entity;\n if (nullIfAbsent)\n return null;\n return object;\n}\n"
"private static void copyJarConfig(File file) {\n OutputStream outStream = null;\n try {\n file.createNewFile();\n InputStream templateIn = plugin.getResource(resource);\n outStream = new FileOutputStream(file);\n int read = 0;\n byte[] bytes = new byte[1024];\n while ((read = templateIn.read(bytes)) != -1) {\n outStream.write(bytes, 0, read);\n }\n templateIn.close();\n outStream.flush();\n outStream.close();\n CreeperLog.logInfo(\"String_Node_Str\", 1);\n } catch (Exception e) {\n CreeperLog.warning(\"String_Node_Str\");\n CreeperLog.warning(e.getMessage());\n if (outStream != null) {\n try {\n outStream.flush();\n outStream.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n }\n}\n"
"public static void main(String[] args) throws Exception {\n KafkaArgs spraynozzleArgs;\n try {\n spraynozzleArgs = CliFactory.parseArguments(KafkaArgs.class, args);\n } catch (ArgumentValidationException e) {\n System.err.println(e.getMessage());\n return;\n }\n String zk = spraynozzleArgs.getZk();\n ZkClient zkClient = new ZkClient(zk, 10000);\n Boolean spraynozzleHA = spraynozzleArgs.getIsHighlyAvailable();\n boolean buffering = spraynozzleArgs.getBuffering();\n String topic = spraynozzleArgs.getTopic();\n final List<String> urls = spraynozzleArgs.getUrls();\n final String cleanedUrl = urls.get(0).replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n final int threadCount = spraynozzleArgs.getThreadCount();\n final int partitionCount = spraynozzleArgs.getPartitionCount();\n final String filterClass = spraynozzleArgs.getFilterClass();\n final String filterClasspath = spraynozzleArgs.getFilterClasspath();\n final String filterClassArgs = spraynozzleArgs.getFilterClassArgs();\n final String statsClass = spraynozzleArgs.getStatsClass();\n final String statsClasspath = spraynozzleArgs.getStatsClasspath();\n final String statsClassArgs = spraynozzleArgs.getStatsClassArgs();\n String[] topics = topic.split(\"String_Node_Str\");\n if (topics.length == 1) {\n System.out.println(\"String_Node_Str\" + topic + \"String_Node_Str\" + zk + \"String_Node_Str\" + urls);\n } else {\n System.out.println(\"String_Node_Str\" + topic + \"String_Node_Str\" + zk + \"String_Node_Str\" + urls);\n }\n if (spraynozzleHA) {\n String zkLeaderLatchFolderPath = \"String_Node_Str\" + topics[0] + cleanedUrl;\n System.out.println(\"String_Node_Str\");\n String spraynozzleName = \"String_Node_Str\" + UUID.randomUUID();\n SpraynozzleLeaderLatch curatorClient = new SpraynozzleLeaderLatch(zk, zkLeaderLatchFolderPath, spraynozzleName);\n curatorClient.start();\n curatorClient.blockUntilisLeader();\n System.out.println(\"String_Node_Str\" + spraynozzleName + \"String_Node_Str\");\n }\n if (!buffering) {\n clearZkPath(zkClient, \"String_Node_Str\" + topics[0] + cleanedUrls);\n }\n Properties kafkaProps = new Properties();\n kafkaProps.put(\"String_Node_Str\", zk);\n kafkaProps.put(\"String_Node_Str\", \"String_Node_Str\");\n kafkaProps.put(\"String_Node_Str\", \"String_Node_Str\" + topics[0] + cleanedUrl);\n kafkaProps.put(\"String_Node_Str\", \"String_Node_Str\");\n kafkaProps.put(\"String_Node_Str\", String.valueOf(2 * 1024 * 1024));\n ConsumerConfig consumerConfig = new ConsumerConfig(kafkaProps);\n ConsumerConnector consumerConnector = Consumer.createJavaConsumerConnector(consumerConfig);\n HashMap<String, Integer> topicParallelism = new HashMap<String, Integer>();\n for (int i = 0; i < topics.length; i++) {\n topicParallelism.put(topics[i], partitionCount);\n }\n Map<String, List<KafkaStream<Message>>> topicMessageStreams = consumerConnector.createMessageStreams(topicParallelism);\n ArrayList<List<KafkaStream<Message>>> streams = new ArrayList<List<KafkaStream<Message>>>();\n for (int i = 0; i < topics.length; i++) {\n List<KafkaStream<Message>> stream = topicMessageStreams.get(topics[i]);\n streams.add(stream);\n }\n ExecutorService executor = Executors.newFixedThreadPool(threadCount + (partitionCount * topics.length) + 1);\n final PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager();\n cm.setMaxTotal(threadCount);\n cm.setDefaultMaxPerRoute(threadCount);\n final ConcurrentLinkedQueue<ByteArrayEntity> queue = new ConcurrentLinkedQueue<ByteArrayEntity>();\n final ConcurrentLinkedQueue<String> logQueue = new ConcurrentLinkedQueue<String>();\n StatsReporter statsReporter = getStatsReporter(statsClasspath, statsClass, statsClassArgs);\n executor.submit(new KafkaLog(logQueue, statsReporter, topic, urls));\n for (final List<KafkaStream<Message>> streamList : streams) {\n for (final KafkaStream<Message> stream : streamList) {\n executor.submit(new KafkaReader(queue, stream, logQueue));\n }\n }\n for (int i = 0; i < threadCount; i++) {\n KafkaFilter messageFilter = getKafkaFilter(filterClass, filterClasspath, filterClassArgs);\n executor.submit(new KafkaPoster(queue, cm, urls, logQueue, messageFilter));\n }\n}\n"
"private List<TileSpec> getTileSpecsForCoordinates(final List<TileCoordinates> coordinatesList, final ResolvedTileSpecCollection tiles) {\n if ((coordinatesList == null) || (coordinatesList.size() == 0)) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n String tileId;\n TileSpec tileSpec;\n final List<TileSpec> tileSpecList = new ArrayList<>();\n for (final TileCoordinates coordinates : coordinatesList) {\n tileId = coordinates.getTileId();\n if (tileId != null) {\n tileSpec = tiles.getTileSpec(tileId);\n if (tileSpec != null) {\n tileSpecList.add(tileSpec);\n }\n }\n }\n if (tileSpecList.size() == 0) {\n throw new IllegalArgumentException(\"String_Node_Str\" + z + \"String_Node_Str\" + stack + \"String_Node_Str\" + Arrays.toString(coordinatesList.get(0).getWorld()));\n }\n return tileSpecList;\n}\n"
"public void onPerformSync(Account account, Bundle extras, String authority, ContentProviderClient provider, SyncResult syncResult) {\n Log.d(TAG, \"String_Node_Str\" + authority);\n Thread.currentThread().setContextClassLoader(getContext().getClassLoader());\n Optional<DavAccount> davAccountOptional = DavAccountHelper.getAccount(getContext());\n if (!davAccountOptional.isPresent()) {\n Log.d(TAG, \"String_Node_Str\");\n syncResult.stats.numAuthExceptions++;\n showNotifications(syncResult);\n return;\n }\n try {\n Optional<MasterCipher> masterCipher = KeyHelper.getMasterCipher(getContext());\n if (!masterCipher.isPresent()) {\n Log.d(TAG, \"String_Node_Str\");\n syncResult.stats.numAuthExceptions++;\n return;\n }\n LocalCalendarStore localStore = new LocalCalendarStore(provider, davAccountOptional.get().getOsAccount());\n HidingCalDavStore remoteStore = DavAccountHelper.getHidingCalDavStore(getContext(), davAccountOptional.get(), masterCipher.get());\n if (DavAccountHelper.isUsingOurServers(getContext())) {\n for (HidingCalDavCollection remoteCollection : remoteStore.getCollections()) {\n try {\n if (!remoteCollection.getPath().contains(KeySyncUtil.PATH_KEY_COLLECTION) && !localStore.getCollection(remoteCollection.getPath()).isPresent()) {\n if (remoteCollection.getHiddenDisplayName().isPresent() && remoteCollection.getHiddenColor().isPresent()) {\n localStore.addCollection(remoteCollection.getPath(), remoteCollection.getHiddenDisplayName().get(), remoteCollection.getHiddenColor().get());\n } else if (remoteCollection.getHiddenDisplayName().isPresent())\n localStore.addCollection(remoteCollection.getPath(), remoteCollection.getHiddenDisplayName().get());\n else\n localStore.addCollection(remoteCollection.getPath());\n }\n } catch (IOException e) {\n handleException(getContext(), e, syncResult);\n } catch (PropertyParseException e) {\n handleException(getContext(), e, syncResult);\n } catch (RemoteException e) {\n handleException(getContext(), e, syncResult);\n } catch (InvalidMacException e) {\n handleException(getContext(), e, syncResult);\n } catch (GeneralSecurityException e) {\n handleException(getContext(), e, syncResult);\n }\n }\n }\n for (LocalEventCollection localCollection : localStore.getCollections()) {\n Log.d(TAG, \"String_Node_Str\" + localCollection.getPath());\n Optional<HidingCalDavCollection> remoteCollection = remoteStore.getCollection(localCollection.getPath());\n if (remoteCollection.isPresent())\n new CalendarSyncWorker(getContext(), localCollection, remoteCollection.get()).run(syncResult, false);\n else {\n Log.d(TAG, \"String_Node_Str\");\n localStore.removeCollection(localCollection.getPath());\n }\n }\n finalizeCopiedCalendars(localStore, remoteStore);\n remoteStore.releaseConnections();\n } catch (IOException e) {\n handleException(getContext(), e, syncResult);\n } catch (DavException e) {\n handleException(getContext(), e, syncResult);\n } catch (PropertyParseException e) {\n handleException(getContext(), e, syncResult);\n } catch (RemoteException e) {\n handleException(getContext(), e, syncResult);\n } catch (GeneralSecurityException e) {\n handleException(getContext(), e, syncResult);\n }\n showNotifications(syncResult);\n new CalendarsSyncScheduler(getContext()).setTimeLastSync(new Date().getTime());\n}\n"
"public UriInfo parseUri(final String input, final Edm edm) throws UriParserException {\n boolean readQueryParameter = false;\n boolean readFragment = false;\n UriContext context = new UriContext();\n UriParseTreeVisitor uriParseTreeVisitor = new UriParseTreeVisitor(edm, context);\n try {\n RawUri uri = UriDecoder.decodeUri(input, 0);\n String firstSegment = \"String_Node_Str\";\n if (uri.pathSegmentListDecoded.size() > 0) {\n firstSegment = uri.pathSegmentListDecoded.get(0);\n }\n if (firstSegment.length() == 0) {\n readQueryParameter = true;\n context.contextUriInfo = new UriInfoImpl().setKind(UriInfoKind.service);\n } else if (firstSegment.startsWith(\"String_Node_Str\")) {\n BatchEOFContext ctxBatchEOF = (BatchEOFContext) parseRule(uri.pathSegmentListDecoded.get(0), ParserEntryRules.Batch);\n uriParseTreeVisitor.visitBatchEOF(ctxBatchEOF);\n readQueryParameter = true;\n } else if (firstSegment.startsWith(\"String_Node_Str\")) {\n MetadataEOFContext ctxMetadataEOF = (MetadataEOFContext) parseRule(uri.pathSegmentListDecoded.get(0), ParserEntryRules.Metadata);\n uriParseTreeVisitor.visitMetadataEOF(ctxMetadataEOF);\n readQueryParameter = true;\n readFragment = true;\n } else if (firstSegment.startsWith(\"String_Node_Str\")) {\n context.contextUriInfo = new UriInfoImpl().setKind(UriInfoKind.entityId);\n if (uri.pathSegmentListDecoded.size() > 1) {\n EntityEOFContext ctxEntityEOF = (EntityEOFContext) parseRule(uri.pathSegmentListDecoded.get(1), ParserEntryRules.Entity);\n uriParseTreeVisitor.visitEntityEOF(ctxEntityEOF);\n }\n readQueryParameter = true;\n } else if (firstSegment.startsWith(\"String_Node_Str\")) {\n AllEOFContext ctxResourcePathEOF = (AllEOFContext) parseRule(uri.pathSegmentListDecoded.get(0), ParserEntryRules.All);\n uriParseTreeVisitor.visitAllEOF(ctxResourcePathEOF);\n readQueryParameter = true;\n } else if (firstSegment.startsWith(\"String_Node_Str\")) {\n CrossjoinEOFContext ctxResourcePathEOF = (CrossjoinEOFContext) parseRule(uri.pathSegmentListDecoded.get(0), ParserEntryRules.CrossJoin);\n uriParseTreeVisitor.visitCrossjoinEOF(ctxResourcePathEOF);\n readQueryParameter = true;\n } else {\n List<PathSegmentEOFContext> ctxPathSegments = new ArrayList<PathSegmentEOFContext>();\n for (String pathSegment : uri.pathSegmentListDecoded) {\n PathSegmentEOFContext ctxPathSegment = (PathSegmentEOFContext) parseRule(pathSegment, ParserEntryRules.PathSegment);\n ctxPathSegments.add(ctxPathSegment);\n }\n context.contextUriInfo = new UriInfoImpl().setKind(UriInfoKind.resource);\n for (PathSegmentEOFContext ctxPathSegment : ctxPathSegments) {\n uriParseTreeVisitor.visitPathSegmentEOF(ctxPathSegment);\n }\n UriResource lastSegment = context.contextUriInfo.getLastResourcePart();\n if (lastSegment instanceof UriResourcePartTyped) {\n UriResourcePartTyped typed = (UriResourcePartTyped) lastSegment;\n UriParseTreeVisitor.TypeInformation myType = uriParseTreeVisitor.getTypeInformation(typed);\n UriParseTreeVisitor.TypeInformation typeInfo = uriParseTreeVisitor.new TypeInformation(myType.type, typed.isCollection());\n context.contextTypes.push(typeInfo);\n }\n readQueryParameter = true;\n }\n if (readQueryParameter) {\n for (RawUri.QueryOption option : uri.queryOptionListDecoded) {\n if (option.name.startsWith(\"String_Node_Str\")) {\n SystemQueryOption systemOption = null;\n if (option.name.equals(SystemQueryOptionKind.FILTER.toString())) {\n FilterExpressionEOFContext ctxFilterExpression = (FilterExpressionEOFContext) parseRule(option.value, ParserEntryRules.FilterExpression);\n FilterOptionImpl filterOption = (FilterOptionImpl) uriParseTreeVisitor.visitFilterExpressionEOF(ctxFilterExpression);\n systemOption = filterOption;\n } else if (option.name.equals(SystemQueryOptionKind.FORMAT.toString())) {\n FormatOptionImpl formatOption = new FormatOptionImpl();\n formatOption.setName(option.name);\n formatOption.setText(option.value);\n if (option.value.equalsIgnoreCase(ODataFormat.JSON.name()) || option.value.equalsIgnoreCase(ODataFormat.XML.name()) || option.value.equalsIgnoreCase(ODataFormat.ATOM.name()) || isFormatSyntaxValid(option)) {\n formatOption.setFormat(option.value);\n } else {\n throw new UriParserSyntaxException(\"String_Node_Str\", UriParserSyntaxException.MessageKeys.WRONG_VALUE_FOR_SYSTEM_QUERY_OPTION_FORMAT, option.value);\n }\n systemOption = formatOption;\n } else if (option.name.equals(SystemQueryOptionKind.EXPAND.toString())) {\n ExpandItemsEOFContext ctxExpandItems = (ExpandItemsEOFContext) parseRule(option.value, ParserEntryRules.ExpandItems);\n ExpandOptionImpl expandOption = (ExpandOptionImpl) uriParseTreeVisitor.visitExpandItemsEOF(ctxExpandItems);\n systemOption = expandOption;\n } else if (option.name.equals(SystemQueryOptionKind.ID.toString())) {\n IdOptionImpl idOption = new IdOptionImpl();\n idOption.setName(option.name);\n idOption.setText(option.value);\n idOption.setValue(option.value);\n systemOption = idOption;\n } else if (option.name.equals(SystemQueryOptionKind.LEVELS.toString())) {\n throw new UriParserSyntaxException(\"String_Node_Str\", UriParserSyntaxException.MessageKeys.SYSTEM_QUERY_OPTION_LEVELS_NOT_ALLOWED_HERE);\n } else if (option.name.equals(SystemQueryOptionKind.ORDERBY.toString())) {\n OrderByEOFContext ctxOrderByExpression = (OrderByEOFContext) parseRule(option.value, ParserEntryRules.Orderby);\n OrderByOptionImpl orderByOption = (OrderByOptionImpl) uriParseTreeVisitor.visitOrderByEOF(ctxOrderByExpression);\n systemOption = orderByOption;\n } else if (option.name.equals(SystemQueryOptionKind.SEARCH.toString())) {\n throw new RuntimeException(\"String_Node_Str\");\n } else if (option.name.equals(SystemQueryOptionKind.SELECT.toString())) {\n SelectEOFContext ctxSelectEOF = (SelectEOFContext) parseRule(option.value, ParserEntryRules.Select);\n SelectOptionImpl selectOption = (SelectOptionImpl) uriParseTreeVisitor.visitSelectEOF(ctxSelectEOF);\n systemOption = selectOption;\n } else if (option.name.equals(SystemQueryOptionKind.SKIP.toString())) {\n SkipOptionImpl skipOption = new SkipOptionImpl();\n skipOption.setName(option.name);\n skipOption.setText(option.value);\n try {\n skipOption.setValue(Integer.parseInt(option.value));\n } catch (final NumberFormatException e) {\n throw new UriParserSyntaxException(\"String_Node_Str\", e, UriParserSyntaxException.MessageKeys.WRONG_VALUE_FOR_SYSTEM_QUERY_OPTION, option.name, option.value);\n }\n systemOption = skipOption;\n } else if (option.name.equals(SystemQueryOptionKind.SKIPTOKEN.toString())) {\n SkipTokenOptionImpl skipTokenOption = new SkipTokenOptionImpl();\n skipTokenOption.setName(option.name);\n skipTokenOption.setText(option.value);\n skipTokenOption.setValue(option.value);\n systemOption = skipTokenOption;\n } else if (option.name.equals(SystemQueryOptionKind.TOP.toString())) {\n TopOptionImpl topOption = new TopOptionImpl();\n topOption.setName(option.name);\n topOption.setText(option.value);\n try {\n topOption.setValue(Integer.parseInt(option.value));\n } catch (final NumberFormatException e) {\n throw new UriParserSyntaxException(\"String_Node_Str\", e, UriParserSyntaxException.MessageKeys.WRONG_VALUE_FOR_SYSTEM_QUERY_OPTION, option.name, option.value);\n }\n systemOption = topOption;\n } else if (option.name.equals(SystemQueryOptionKind.COUNT.toString())) {\n CountOptionImpl inlineCountOption = new CountOptionImpl();\n inlineCountOption.setName(option.name);\n inlineCountOption.setText(option.value);\n if (option.value.equals(\"String_Node_Str\") || option.value.equals(\"String_Node_Str\")) {\n inlineCountOption.setValue(Boolean.parseBoolean(option.value));\n } else {\n throw new UriParserSyntaxException(\"String_Node_Str\", UriParserSyntaxException.MessageKeys.WRONG_VALUE_FOR_SYSTEM_QUERY_OPTION, option.name, option.value);\n }\n systemOption = inlineCountOption;\n } else {\n throw new UriParserSyntaxException(\"String_Node_Str\", UriParserSyntaxException.MessageKeys.WRONG_VALUE_FOR_SYSTEM_QUERY_OPTION_FORMAT, option.value);\n }\n context.contextUriInfo.setSystemQueryOption(formatOption);\n } else if (option.name.equals(SystemQueryOptionKind.EXPAND.toString())) {\n ExpandItemsEOFContext ctxExpandItems = (ExpandItemsEOFContext) parseRule(option.value, ParserEntryRules.ExpandItems);\n ExpandOptionImpl expandOption = (ExpandOptionImpl) uriParseTreeVisitor.visitExpandItemsEOF(ctxExpandItems);\n context.contextUriInfo.setSystemQueryOption(expandOption);\n } else if (option.name.equals(SystemQueryOptionKind.ID.toString())) {\n IdOptionImpl idOption = new IdOptionImpl();\n idOption.setName(option.name);\n idOption.setText(option.value);\n idOption.setValue(option.value);\n context.contextUriInfo.setSystemQueryOption(idOption);\n } else if (option.name.equals(SystemQueryOptionKind.LEVELS.toString())) {\n throw new UriParserSyntaxException(\"String_Node_Str\", UriParserSyntaxException.MessageKeys.SYSTEM_QUERY_OPTION_LEVELS_NOT_ALLOWED_HERE);\n } else if (option.name.equals(SystemQueryOptionKind.ORDERBY.toString())) {\n OrderByEOFContext ctxOrderByExpression = (OrderByEOFContext) parseRule(option.value, ParserEntryRules.Orderby);\n OrderByOptionImpl orderByOption = (OrderByOptionImpl) uriParseTreeVisitor.visitOrderByEOF(ctxOrderByExpression);\n context.contextUriInfo.setSystemQueryOption(orderByOption);\n } else if (option.name.equals(SystemQueryOptionKind.SEARCH.toString())) {\n throw new RuntimeException(\"String_Node_Str\");\n } else if (option.name.equals(SystemQueryOptionKind.SELECT.toString())) {\n SelectEOFContext ctxSelectEOF = (SelectEOFContext) parseRule(option.value, ParserEntryRules.Select);\n SelectOptionImpl selectOption = (SelectOptionImpl) uriParseTreeVisitor.visitSelectEOF(ctxSelectEOF);\n context.contextUriInfo.setSystemQueryOption(selectOption);\n } else if (option.name.equals(SystemQueryOptionKind.SKIP.toString())) {\n SkipOptionImpl skipOption = new SkipOptionImpl();\n skipOption.setName(option.name);\n skipOption.setText(option.value);\n try {\n skipOption.setValue(Integer.parseInt(option.value));\n } catch (final NumberFormatException e) {\n throw new UriParserSyntaxException(\"String_Node_Str\", e, UriParserSyntaxException.MessageKeys.WRONG_VALUE_FOR_SYSTEM_QUERY_OPTION, option.name, option.value);\n }\n context.contextUriInfo.setSystemQueryOption(skipOption);\n } else if (option.name.equals(SystemQueryOptionKind.SKIPTOKEN.toString())) {\n SkipTokenOptionImpl skipTokenOption = new SkipTokenOptionImpl();\n skipTokenOption.setName(option.name);\n skipTokenOption.setText(option.value);\n skipTokenOption.setValue(option.value);\n context.contextUriInfo.setSystemQueryOption(skipTokenOption);\n } else if (option.name.equals(SystemQueryOptionKind.TOP.toString())) {\n TopOptionImpl topOption = new TopOptionImpl();\n topOption.setName(option.name);\n topOption.setText(option.value);\n try {\n topOption.setValue(Integer.parseInt(option.value));\n } catch (final NumberFormatException e) {\n throw new UriParserSyntaxException(\"String_Node_Str\", e, UriParserSyntaxException.MessageKeys.WRONG_VALUE_FOR_SYSTEM_QUERY_OPTION, option.name, option.value);\n }\n context.contextUriInfo.setSystemQueryOption(topOption);\n } else if (option.name.equals(SystemQueryOptionKind.COUNT.toString())) {\n CountOptionImpl inlineCountOption = new CountOptionImpl();\n inlineCountOption.setName(option.name);\n inlineCountOption.setText(option.value);\n if (option.value.equals(\"String_Node_Str\") || option.value.equals(\"String_Node_Str\")) {\n inlineCountOption.setValue(Boolean.parseBoolean(option.value));\n } else {\n throw new UriParserSyntaxException(\"String_Node_Str\", UriParserSyntaxException.MessageKeys.WRONG_VALUE_FOR_SYSTEM_QUERY_OPTION, option.name, option.value);\n }\n context.contextUriInfo.setSystemQueryOption(inlineCountOption);\n } else {\n throw new UriParserSyntaxException(\"String_Node_Str\", UriParserSyntaxException.MessageKeys.UNKNOWN_SYSTEM_QUERY_OPTION, option.name);\n }\n }\n }\n if (readFragment) {\n context.contextUriInfo.setFragment(uri.fragment);\n }\n return context.contextUriInfo;\n } catch (ParseCancellationException e) {\n throw e.getCause() instanceof UriParserException ? (UriParserException) e.getCause() : new UriParserSyntaxException(\"String_Node_Str\", e, UriParserSyntaxException.MessageKeys.SYNTAX);\n }\n}\n"
"public Collection<org.osgi.service.remoteserviceadmin.ExportReference> getExportedServices() {\n Collection<org.osgi.service.remoteserviceadmin.ExportReference> results = new ArrayList<org.osgi.service.remoteserviceadmin.ExportReference>();\n synchronized (exportedRegistrations) {\n if (exportedRegistrations.isEmpty())\n checkRSAReadAccess();\n for (org.osgi.service.remoteserviceadmin.ExportRegistration reg : exportedRegistrations) {\n org.osgi.service.remoteserviceadmin.ExportReference eRef = reg.getExportReference();\n if (eRef != null && checkEndpointPermissionRead(\"String_Node_Str\", eRef.getExportedEndpoint()))\n results.add(eRef);\n }\n }\n return results;\n}\n"
"protected String getValueToWrite(QName schemaType, Object value, CoreAbstractSession session) {\n return (String) ((ConversionManager) session.getDatasourcePlatform().getConversionManager()).convertObject(value, CoreClassConstants.STRING, schemaType);\n}\n"
"private void addCronJob(JobPo jobPo) throws DupEntryException {\n Date nextTriggerTime = CronExpressionUtils.getNextTriggerTime(jobPo.getCronExpression());\n if (nextTriggerTime != null) {\n appContext.getCronJobQueue().add(jobPo);\n if (JobUtils.isRelyOnPrevCycle(jobPo)) {\n if (appContext.getExecutingJobQueue().getJob(jobPo.getTaskTrackerNodeGroup(), jobPo.getTaskId()) == null) {\n jobPo.setTriggerTime(nextTriggerTime.getTime());\n try {\n appContext.getExecutableJobQueue().add(jobPo);\n } catch (DupEntryException e) {\n appContext.getCronJobQueue().remove(jobPo.getJobId());\n throw e;\n }\n }\n } else {\n appContext.getNonRelyOnPrevCycleJobScheduler().addScheduleJobForOneHour(jobPo);\n }\n }\n}\n"
"protected void setOCEventDataAuditLogs(StudyBean study, OdmClinicalDataBean data, String studySubjectOids, HashMap<String, String> evnOidPoses) {\n this.setOCEventDataAuditsTypesExpected();\n logger.debug(\"String_Node_Str\");\n logger.debug(\"String_Node_Str\" + this.getOCEventDataAuditsSql(studySubjectOids));\n ArrayList rows = select(this.getOCEventDataAuditsSql(studySubjectOids));\n Iterator iter = rows.iterator();\n while (iter.hasNext()) {\n HashMap row = (HashMap) iter.next();\n String studySubjectLabel = (String) row.get(\"String_Node_Str\");\n String sedOid = (String) row.get(\"String_Node_Str\");\n Integer auditId = (Integer) row.get(\"String_Node_Str\");\n String type = (String) row.get(\"String_Node_Str\");\n Integer userId = (Integer) row.get(\"String_Node_Str\");\n Date auditDate = (Date) row.get(\"String_Node_Str\");\n String auditReason = (String) row.get(\"String_Node_Str\");\n String oldValue = (String) row.get(\"String_Node_Str\");\n String newValue = (String) row.get(\"String_Node_Str\");\n Integer typeId = (Integer) row.get(\"String_Node_Str\");\n if (evnOidPoses.containsKey(studySubjectLabel + sedOid)) {\n String[] poses = evnOidPoses.get(studySubjectLabel + sedOid).split(\"String_Node_Str\");\n ExportStudyEventDataBean se = data.getExportSubjectData().get(Integer.parseInt(poses[0])).getExportStudyEventData().get(Integer.parseInt(poses[1]));\n AuditLogBean auditLog = new AuditLogBean();\n auditLog.setOid(\"String_Node_Str\" + auditId);\n auditLog.setUserId(\"String_Node_Str\" + userId);\n auditLog.setDatetimeStamp(auditDate);\n auditLog.setType(type);\n auditLog.setReasonForChange(auditReason);\n if (typeId == 17 || typeId == 18 || typeId == 19 || typeId == 20 || typeId == 21 || typeId == 22 || typeId == 23 || typeId == 31) {\n if (\"String_Node_Str\".equals(newValue)) {\n auditLog.setOldValue(SubjectEventStatus.INVALID.getName());\n } else {\n auditLog.setNewValue(SubjectEventStatus.getFromMap(Integer.parseInt(newValue)).getName());\n }\n if (\"String_Node_Str\".equals(oldValue)) {\n auditLog.setOldValue(SubjectEventStatus.INVALID.getName());\n } else {\n auditLog.setOldValue(SubjectEventStatus.getFromMap(Integer.parseInt(oldValue)).getName());\n }\n } else {\n auditLog.setNewValue(newValue);\n auditLog.setOldValue(oldValue);\n }\n AuditLogsBean logs = se.getAuditLogs();\n if (logs.getEntityID() == null || logs.getEntityID().length() <= 0) {\n logs.setEntityID(se.getStudyEventOID());\n }\n logs.getAuditLogs().add(auditLog);\n se.setAuditLogs(logs);\n }\n }\n}\n"
"public static void main(String[] args) throws Exception {\n org.apache.log4j.Logger.getRootLogger().addAppender(new ConsoleAppender(new SimpleLayout()));\n org.apache.log4j.Logger.getRootLogger().setLevel(Level.INFO);\n org.apache.log4j.Logger.getLogger(DataPropertyDomainAxiomLearner.class).setLevel(Level.INFO);\n SparqlEndpointKS ks = new SparqlEndpointKS(SparqlEndpoint.getEndpointDBpedia());\n SPARQLReasoner reasoner = new SPARQLReasoner(ks);\n reasoner.prepareSubsumptionHierarchy();\n ObjectPropertyDomainAxiomLearner l = new ObjectPropertyDomainAxiomLearner(ks);\n l.setReasoner(reasoner);\n l.setPropertyToDescribe(new ObjectProperty(\"String_Node_Str\"));\n l.setMaxExecutionTimeInSeconds(40);\n l.init();\n l.start();\n System.out.println(l.getCurrentlyBestEvaluatedAxioms());\n}\n"
"private PortalCoord generatePortal(V10Location block, BlockFace face) {\n PortalCoord portal = new PortalCoord();\n portal.block = block;\n Block rb = block.getHandle().getBlock();\n switch(face) {\n case DOWN:\n case UP:\n if (!plugin.config.CompactPortal || plugin.config.FillPortalBack < 0) {\n portal.border.add(new V10Location(rb.getRelative(BlockFace.NORTH)));\n if (!plugin.config.CompactPortal) {\n portal.border.add(new V10Location(rb.getRelative(BlockFace.NORTH_WEST)));\n portal.border.add(new V10Location(rb.getRelative(BlockFace.WEST)));\n portal.border.add(new V10Location(rb.getRelative(BlockFace.SOUTH_WEST)));\n portal.border.add(new V10Location(rb.getRelative(BlockFace.SOUTH)));\n portal.border.add(new V10Location(rb.getRelative(BlockFace.SOUTH_EAST)));\n portal.border.add(new V10Location(rb.getRelative(BlockFace.EAST)));\n portal.border.add(new V10Location(rb.getRelative(BlockFace.NORTH_EAST)));\n }\n }\n portal.inside.add(new V10Location(rb));\n portal.destLoc = new V10Location(rb.getRelative(face));\n face = face.getOppositeFace();\n portal.behind.add(new V10Location(rb.getRelative(face)));\n portal.tpFace = face;\n portal.vertical = true;\n return portal;\n case NORTH:\n case NORTH_EAST:\n face = BlockFace.SOUTH;\n break;\n case EAST:\n case SOUTH_EAST:\n face = BlockFace.WEST;\n break;\n case SOUTH:\n case SOUTH_WEST:\n face = BlockFace.NORTH;\n break;\n default:\n face = BlockFace.NORTH;\n break;\n }\n portal.tpFace = face;\n switch(face) {\n case NORTH:\n case SOUTH:\n face = BlockFace.EAST;\n break;\n default:\n face = BlockFace.NORTH;\n }\n if (!plugin.config.CompactPortal || plugin.config.FillPortalBack < 0) {\n Block block2 = rb.getRelative(BlockFace.DOWN, 2);\n portal.border.add(new V10Location(block2));\n if (!plugin.config.CompactPortal) {\n portal.border.add(new V10Location(rb.getRelative(BlockFace.UP)));\n Block block2 = rb.getRelative(face);\n for (int i = 0; i < 3; i++) portal.border.add(new V10Location(block2.getRelative(BlockFace.DOWN, i)));\n block2 = rb.getRelative(face.getOppositeFace());\n for (int i = 0; i < 3; i++) portal.border.add(new V10Location(block2.getRelative(BlockFace.DOWN, i)));\n }\n }\n portal.inside.add(block);\n Block block2 = rb.getRelative(BlockFace.DOWN);\n portal.inside.add(new V10Location(block2));\n portal.destLoc = new V10Location(block2.getRelative(portal.tpFace));\n portal.vertical = false;\n block2.getRelative(portal.tpFace.getOppositeFace());\n portal.behind.add(new V10Location(block2));\n portal.behind.add(new V10Location(block2.getRelative(BlockFace.UP)));\n return portal;\n}\n"
"public static void generateLayout(Form form, ServoyDataConverterContext context, PrintWriter writer, boolean design, boolean highlight) {\n try {\n FormLayoutGenerator.generateFormStartTag(writer, form, realFormName, false, design);\n Iterator<IPersist> components = form.getAllObjects(PositionComparator.XY_PERSIST_COMPARATOR);\n while (components.hasNext()) {\n IPersist component = components.next();\n if (component instanceof LayoutContainer) {\n generateLayoutContainer((LayoutContainer) component, context, writer, design, highlight);\n } else if (component instanceof IFormElement) {\n FormLayoutGenerator.generateFormElement(writer, FormElementHelper.INSTANCE.getFormElement((IFormElement) component, context, null), design, highlight);\n }\n }\n FormLayoutGenerator.generateFormEndTag(writer);\n } catch (Exception e) {\n Debug.error(e);\n }\n}\n"
"public void testClearChecksums() throws Exception {\n if (database == null) {\n return;\n }\n Migrator migrator = createMigrator(completeChangeLog);\n migrator.dropAll(getSchemasToDrop());\n migrator = createMigrator(completeChangeLog);\n migrator.dropAll(getSchemasToDrop());\n migrator = createMigrator(completeChangeLog);\n migrator.migrate();\n migrator.clearCheckSums();\n}\n"
"public Object clone(Workspace workspace) throws CloneNotSupportedException {\n CanBus newObject = (CanBus) super.clone(workspace);\n newObject._ioPortToCanPriority = new HashMap<Port, Integer>();\n newObject._tokenTree = new TreeMap<Integer, LinkedList<Object[]>>();\n newObject._multiCast = new HashMap<Integer, Integer>();\n newObject._frameSize = _frameSize;\n newObject._nextTokenSize = _nextTokenSize;\n newObject._nextTokenFiringTime = null;\n newObject._startingTime = null;\n newObject._channelUsed = _channelUsed;\n newObject._bitRate = _bitRate;\n newObject._mostRecentFrame = _mostRecentFrame;\n return newObject;\n}\n"
"public void remove() {\n if (owner != null) {\n owner.replace(this, null);\n dispose();\n }\n}\n"
"public boolean hasNext() {\n return pos.getZ() <= box.max().getZ() && it <= iterationsPerCycle;\n}\n"
"private Properties getProperties(String iBasename) throws Exception {\n String tFilename = iBasename + \"String_Node_Str\";\n InputStream tStream = this.getClass().getClassLoader().getResourceAsStream(tFilename);\n if (tStream == null) {\n getLogger().warn(\"String_Node_Str\" + tFilename + \"String_Node_Str\");\n return new java.util.Properties();\n }\n Properties tProperties = new java.util.Properties();\n try {\n oProperties.load(tStream);\n return oProperties;\n } catch (IOException e) {\n throw e;\n }\n}\n"
"public String toUrlSafe() {\n return BaseEncoding.base64Url().encode(byteString.toByteArray());\n}\n"
"public void actionPerformed(ActionEvent evt) {\n Call call = callParticipant.getCall();\n if (call != null) {\n String command = evt.getActionCommand();\n if (command.equals(\"String_Node_Str\")) {\n OperationSetBasicTelephony telephony = (OperationSetBasicTelephony) call.getProtocolProvider().getOperationSet(OperationSetBasicTelephony.class);\n if (telephony.isSecured(callParticipant)) {\n updateSecureButton(false);\n telephony.setSecured(callParticipant, false, OperationSetBasicTelephony.SecureStatusChangeSource.SECURE_STATUS_CHANGE_BY_LOCAL);\n } else {\n updateSecureButton(true);\n telephony.setSecured(callParticipant, true, OperationSetBasicTelephony.SecureStatusChangeSource.SECURE_STATUS_CHANGE_BY_LOCAL);\n }\n }\n }\n}\n"
"public static void preInit(FMLPreInitializationEvent event) {\n LogHelper.debug(\"String_Node_Str\");\n ModIntegration.LoadedMods.init();\n proxy.registerEventHandlers();\n NetworkWrapperAgriCraft.init();\n ConfigurationHandler.init(event);\n FMLCommonHandler.instance().bus().register(new ConfigurationHandler());\n if (ConfigurationHandler.debug) {\n FMLCommonHandler.instance().bus().register(new RenderLogger());\n }\n Blocks.init();\n Crops.init();\n Items.init();\n LogHelper.info(\"String_Node_Str\");\n}\n"
"void init() {\n txThreadMap = java.util.Collections.synchronizedMap(new HashMap<Thread, Transaction>());\n String txLogDir = System.getProperty(\"String_Node_Str\");\n if (txLogDir == null) {\n throw new RuntimeException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n String separator = System.getProperty(\"String_Node_Str\");\n logSwitcherFileName = txLogDir + separator + \"String_Node_Str\";\n txLog1FileName = txLogDir + separator + \"String_Node_Str\";\n txLog2FileName = txLogDir + separator + \"String_Node_Str\";\n try {\n if (new File(logSwitcherFileName).exists()) {\n FileChannel fc = new RandomAccessFile(logSwitcherFileName, \"String_Node_Str\").getChannel();\n byte[] fileName = new byte[256];\n ByteBuffer buf = ByteBuffer.wrap(fileName);\n fc.read(buf);\n String currentTxLog = new String(fileName).trim();\n if (!new File(currentTxLog).exists()) {\n throw new RuntimeException(\"String_Node_Str\" + \"String_Node_Str\" + currentTxLog + \"String_Node_Str\");\n }\n txLog = new TxLog(currentTxLog);\n } else {\n if (new File(txLog1FileName).exists() || new File(txLog2FileName).exists()) {\n throw new RuntimeException(\"String_Node_Str\" + \"String_Node_Str\" + txLog1FileName + \"String_Node_Str\" + txLog2FileName + \"String_Node_Str\" + \"String_Node_Str\");\n }\n ByteBuffer buf = ByteBuffer.wrap(txLog1FileName.getBytes(\"String_Node_Str\"));\n FileChannel fc = new RandomAccessFile(logSwitcherFileName, \"String_Node_Str\").getChannel();\n fc.write(buf);\n txLog = new TxLog(txLog1FileName);\n fc.force(true);\n fc.close();\n }\n Iterator<List<TxLog.Record>> danglingRecordList = txLog.getDanglingRecords();\n if (danglingRecordList.hasNext()) {\n log.warning(\"String_Node_Str\" + \"String_Node_Str\");\n recover(danglingRecordList);\n }\n getTxLog().truncate();\n tmOk = true;\n } catch (IOException e) {\n e.printStackTrace();\n log.severe(\"String_Node_Str\");\n throw new RuntimeException(e);\n }\n}\n"
"public Serializable getObject() {\n Date date = null;\n if (list != null && !list.isEmpty() && StringUtils.hasText(list.get(0).toString())) {\n try {\n date = formatter.parse(list.get(0));\n } catch (ParseException e) {\n LOG.error(\"String_Node_Str\", e);\n }\n }\n return date;\n}\n"
"private void testConcurrentCreate() throws Exception {\n deleteDb(\"String_Node_Str\");\n final String url = getURL(\"String_Node_Str\", true);\n Connection conn = getConnection(url);\n Task[] tasks = new Task[2];\n try {\n Statement stat = conn.createStatement();\n stat.execute(\"String_Node_Str\");\n stat.execute(\"String_Node_Str\");\n stat.execute(\"String_Node_Str\");\n for (int i = 0; i < tasks.length; i++) {\n final int x = i;\n tasks[i] = new Task() {\n public void call() throws Exception {\n Connection conn = getConnection(url);\n try {\n PreparedStatement prep = conn.prepareStatement(\"String_Node_Str\");\n PreparedStatement prep2 = conn.prepareStatement(\"String_Node_Str\");\n while (!stop) {\n prep.execute();\n if (Math.random() < 0.01) {\n prep2.execute();\n }\n if (Math.random() < 0.01) {\n createDropTrigger(conn);\n }\n }\n } finally {\n conn.close();\n }\n }\n private void createDropTrigger(Connection conn) throws Exception {\n String triggerName = \"String_Node_Str\" + x;\n Statement stat = conn.createStatement();\n stat.execute(\"String_Node_Str\" + triggerName + \"String_Node_Str\" + TriggerTest.class.getName() + \"String_Node_Str\");\n stat.execute(\"String_Node_Str\" + triggerName);\n }\n }.execute();\n }\n Thread.sleep(1000);\n for (Task t : tasks) {\n t.get();\n }\n } finally {\n for (Task t : tasks) {\n t.join();\n }\n conn.close();\n }\n}\n"
"private void init() {\n mForm = (OForm) findViewById(R.id.crmLeadForm);\n if (!extra.containsKey(OColumn.ROW_ID)) {\n if (extra.getString(\"String_Node_Str\").equals(Customers.Type.Opportunities.toString())) {\n type = \"String_Node_Str\";\n findViewById(R.id.opportunity_controls).setVisibility(View.VISIBLE);\n }\n mForm.initForm(null);\n actionBar.setTitle(R.string.label_tag_new);\n actionBar.setHomeAsUpIndicator(R.drawable.ic_action_navigation_close);\n } else {\n initFormValues();\n }\n mForm.setEditable(true);\n TextView currency_symbol = (TextView) findViewById(R.id.currency_symbol);\n ODataRow currency = ResCompany.getCurrency(this);\n if (currency != null) {\n currency_symbol.setText(currency.getString(\"String_Node_Str\"));\n }\n}\n"
"public DatabaseInfo parse(String url) {\n if (url == null) {\n return JDBCUrlParser.createUnknownDataBase(ServiceType.MYSQL, ServiceType.MYSQL_EXECUTE_QUERY, null);\n }\n if (isLoadbalanceUrl(url)) {\n return parseLoadbalancedUrl(url);\n }\n return parseNormal(url);\n}\n"
"private MessagesWithActionComposite createMessagesComposite(Composite parent) {\n MessagesWithActionComposite messagesComposite = new MessagesWithActionComposite(parent, SWT.TOP) {\n protected void changeBackgroundColor(int status) {\n switch(status) {\n case IStatus.WARNING:\n CoreUIPlugin.setCSSId(this, CSS_MESSAGES_WITH_ACTION_COMPOSITE_WARN);\n break;\n case IStatus.ERROR:\n CoreUIPlugin.setCSSId(this, CSS_MESSAGES_WITH_ACTION_COMPOSITE_ERROR);\n break;\n default:\n }\n }\n };\n return messagesComposite;\n}\n"
"public boolean clearValue() throws OseeCoreException {\n if (!getStatus().isOverwriteAllowed()) {\n if (DEBUG) {\n System.out.println(String.format(\"String_Node_Str\", getAttrId()));\n }\n return false;\n }\n if (DEBUG) {\n System.out.println(String.format(\"String_Node_Str\", getAttrId()));\n }\n setStatus(ConflictStatus.UNTOUCHED);\n if (isWordAttribute()) {\n getAttribute().resetToDefaultValue();\n getArtifact().persist(getClass().getSimpleName());\n } else {\n getArtifact().setSoleAttributeFromString(getAttributeType(), NO_VALUE);\n getArtifact().persist(getClass().getSimpleName());\n }\n computeEqualsValues();\n return true;\n}\n"
"private void createStructure() {\n Cluster cluster = HFactory.getOrCreateCluster(\"String_Node_Str\", \"String_Node_Str\");\n dropStructure();\n ColumnFamilyDefinition cfDef = HFactory.createColumnFamilyDefinition(\"String_Node_Str\", \"String_Node_Str\", ComparatorType.BYTESTYPE);\n KeyspaceDefinition keyspaceDef = cluster.describeKeyspace(\"String_Node_Str\");\n if (keyspaceDef == null) {\n KeyspaceDefinition newKeyspace = HFactory.createKeyspaceDefinition(\"String_Node_Str\", ThriftKsDef.DEF_STRATEGY_CLASS, 1, Arrays.asList(cfDef));\n cluster.addKeyspace(newKeyspace, true);\n }\n}\n"
"public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException {\n Item item = submission.getItem();\n Collection collection = submission.getCollection();\n String actionURL = IdentifierService.getURL(collection).toString() + \"String_Node_Str\";\n int state = ((WorkflowItem) submission).getState();\n Request request = ObjectModelHelper.getRequest(objectModel);\n String showfull = request.getParameter(\"String_Node_Str\");\n if (showfull != null && request.getParameter(\"String_Node_Str\") != null)\n showfull = null;\n Division div = body.addInteractiveDivision(\"String_Node_Str\", actionURL, Division.METHOD_POST, \"String_Node_Str\");\n div.setHead(T_workflow_head);\n if (showfull == null) {\n ReferenceSet referenceSet = div.addReferenceSet(\"String_Node_Str\", ReferenceSet.TYPE_SUMMARY_VIEW);\n referenceSet.addReference(item);\n div.addPara().addButton(\"String_Node_Str\").setValue(T_showfull);\n } else {\n ReferenceSet referenceSet = div.addReferenceSet(\"String_Node_Str\", ReferenceSet.TYPE_DETAIL_VIEW);\n referenceSet.addReference(item);\n div.addPara().addButton(\"String_Node_Str\").setValue(T_showsimple);\n div.addHidden(\"String_Node_Str\").setValue(\"String_Node_Str\");\n }\n Table table = div.addTable(\"String_Node_Str\", 1, 1);\n table.setHead(T_info1);\n Row row;\n if (state == WFSTATE_STEP1POOL || state == WFSTATE_STEP2POOL || state == WFSTATE_STEP3POOL) {\n row = table.addRow();\n row.addCellContent(T_take_help);\n row.addCell().addButton(\"String_Node_Str\").setValue(T_take_submit);\n row = table.addRow();\n row.addCellContent(T_leave_help);\n row.addCell().addButton(\"String_Node_Str\").setValue(T_leave_submit);\n }\n if (state == WFSTATE_STEP1 || state == WFSTATE_STEP2) {\n row = table.addRow();\n row.addCellContent(T_approve_help);\n row.addCell().addButton(\"String_Node_Str\").setValue(T_approve_submit);\n }\n if (state == WFSTATE_STEP3) {\n row = table.addRow();\n row.addCellContent(T_commit_help);\n row.addCell().addButton(\"String_Node_Str\").setValue(T_commit_submit);\n }\n if (state == WFSTATE_STEP1 || state == WFSTATE_STEP2) {\n row = table.addRow();\n row.addCellContent(T_reject_help);\n row.addCell().addButton(\"String_Node_Str\").setValue(T_reject_submit);\n }\n if (state == WFSTATE_STEP2 || state == WFSTATE_STEP3) {\n row = table.addRow();\n row.addCellContent(T_edit_help);\n row.addCell().addButton(\"String_Node_Str\").setValue(T_edit_submit);\n }\n if (state == WFSTATE_STEP1 || state == WFSTATE_STEP2 || state == WFSTATE_STEP3) {\n row = table.addRow();\n row.addCellContent(T_return_help);\n row.addCell().addButton(\"String_Node_Str\").setValue(T_return_submit);\n }\n row = table.addRow();\n row.addCell(0, 2).addButton(\"String_Node_Str\").setValue(T_cancel_submit);\n div.addHidden(\"String_Node_Str\").setValue(knot.getId());\n}\n"
"protected OptionValue[] configureVnc(OptionValue[] optionsToMerge, VmwareHypervisorHost hyperHost, String vmName, String vncPassword, String keyboardLayout) throws Exception {\n VirtualMachineMO vmMo = hyperHost.findVmOnHyperHost(vmName);\n VmwareManager mgr = hyperHost.getContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME);\n if (!mgr.beginExclusiveOperation(600))\n throw new Exception(\"String_Node_Str\");\n try {\n int maxVncPorts = 64;\n int vncPort = 0;\n Random random = new Random();\n HostMO vmOwnerHost = vmMo.getRunningHost();\n ManagedObjectReference morParent = vmOwnerHost.getParentMor();\n HashMap<String, Integer> portInfo;\n if (morParent.getType().equalsIgnoreCase(\"String_Node_Str\")) {\n ClusterMO clusterMo = new ClusterMO(vmOwnerHost.getContext(), morParent);\n portInfo = clusterMo.getVmVncPortsOnCluster();\n } else {\n portInfo = vmOwnerHost.getVmVncPortsOnHost();\n }\n Collection<Integer> existingPorts = portInfo.values();\n int val = random.nextInt(maxVncPorts);\n int startVal = val;\n do {\n if (!existingPorts.contains(5900 + val)) {\n vncPort = 5900 + val;\n break;\n }\n val = (++val) % maxVncPorts;\n } while (val != startVal);\n if (vncPort == 0) {\n s_logger.info(\"String_Node_Str\");\n Pair<Integer, Integer> additionalRange = mgr.getAddiionalVncPortRange();\n maxVncPorts = additionalRange.second();\n val = random.nextInt(maxVncPorts);\n startVal = val;\n do {\n if (!existingPorts.contains(additionalRange.first() + val)) {\n vncPort = additionalRange.first() + val;\n break;\n }\n val = (++val) % maxVncPorts;\n } while (val != startVal);\n }\n if (vncPort == 0) {\n throw new Exception(\"String_Node_Str\");\n }\n if (s_logger.isInfoEnabled()) {\n s_logger.info(\"String_Node_Str\" + vmName + \"String_Node_Str\" + vncPort + \"String_Node_Str\" + vmOwnerHost.getHyperHostName());\n }\n return VmwareHelper.composeVncOptions(optionsToMerge, true, vncPassword, vncPort, keyboardLayout);\n } finally {\n try {\n mgr.endExclusiveOperation();\n } catch (Throwable e) {\n assert (false);\n s_logger.error(\"String_Node_Str\", e);\n }\n }\n}\n"
"public void show() {\n row = 0;\n col = 0;\n popup.center();\n activate();\n Scheduler.get().scheduleDeferred(new ScheduledCommand() {\n public void execute() {\n field.setFocus(true);\n }\n });\n}\n"
"protected void calculateOffsets() {\n float legendRight = 0f, legendBottom = 0f;\n if (mDrawLegend && mLegend != null && mLegend.getPosition() != LegendPosition.NONE) {\n if (mLegend.getPosition() == LegendPosition.RIGHT_OF_CHART || mLegend.getPosition() == LegendPosition.RIGHT_OF_CHART_CENTER) {\n float spacing = Utils.convertDpToPixel(12f);\n legendRight = mLegend.getMaximumEntryLength(mLegendLabelPaint) + mLegend.getFormSize() + mLegend.getFormToTextSpace() + spacing;\n mLegendLabelPaint.setTextAlign(Align.LEFT);\n } else if (mLegend.getPosition() == LegendPosition.BELOW_CHART_LEFT || mLegend.getPosition() == LegendPosition.BELOW_CHART_RIGHT || mLegend.getPosition() == LegendPosition.BELOW_CHART_CENTER) {\n if (mXAxis.getPosition() == XLabelPosition.TOP)\n legendBottom = mLegendLabelPaint.getTextSize() * 3.5f;\n else {\n legendBottom = mLegendLabelPaint.getTextSize() * 2.5f;\n }\n }\n mLegend.setOffsetBottom(legendBottom);\n mLegend.setOffsetRight(legendRight);\n }\n float yleft = 0f, yright = 0f;\n if (mAxisLeft.isEnabled()) {\n String label = mAxisLeft.getLongestLabel();\n float ylabelwidth = Utils.calcTextWidth(mAxisRendererLeft.getAxisPaint(), label + (mAxisLeft.mAxisMinimum < 0 ? \"String_Node_Str\" : \"String_Node_Str\"));\n yleft = ylabelwidth + mAxisRendererLeft.getXOffset() / 2f;\n }\n if (mAxisRight.isEnabled()) {\n String label = mAxisRight.getLongestLabel();\n float ylabelwidth = Utils.calcTextWidth(mAxisRendererRight.getAxisPaint(), label + (mAxisLeft.mAxisMinimum < 0 ? \"String_Node_Str\" : \"String_Node_Str\"));\n yright = ylabelwidth + mAxisRendererRight.getXOffset() / 2f;\n }\n float xtop = 0f, xbottom = 0f;\n float xlabelheight = Utils.calcTextHeight(mXAxisRenderer.getAxisPaint(), \"String_Node_Str\") * 2f;\n if (mXAxis.isEnabled()) {\n if (mXAxis.getPosition() == XLabelPosition.BOTTOM) {\n xbottom = xlabelheight;\n } else if (mXAxis.getPosition() == XLabelPosition.TOP) {\n xtop = xlabelheight;\n } else if (mXAxis.getPosition() == XLabelPosition.BOTH_SIDED) {\n xbottom = xlabelheight;\n xtop = xlabelheight;\n }\n }\n float min = Utils.convertDpToPixel(11f);\n float offsetBottom = Math.max(min, xbottom + legendBottom);\n float offsetTop = Math.max(min, xtop);\n float offsetLeft = Math.max(min, yleft);\n float offsetRight = Math.max(min, yright + legendRight);\n if (mLegend != null) {\n mLegend.setOffsetTop(offsetTop + min / 3f);\n mLegend.setOffsetLeft(offsetLeft);\n }\n mViewPortHandler.restrainViewPort(offsetLeft, offsetTop, offsetRight, offsetBottom);\n if (mLogEnabled) {\n Log.i(LOG_TAG, \"String_Node_Str\" + offsetLeft + \"String_Node_Str\" + offsetTop + \"String_Node_Str\" + offsetRight + \"String_Node_Str\" + offsetBottom);\n Log.i(LOG_TAG, \"String_Node_Str\" + mViewPortHandler.getContentRect().toString());\n }\n prepareOffsetMatrix();\n prepareValuePxMatrix();\n}\n"
"private boolean testWithinLine(Point pStart, Point pEnd, Point p) {\n boolean c = (p.x >= pStart.x && p.x <= pEnd.x || p.x <= pStart.x && p.x >= pEnd.x) && (p.y >= pStart.y && p.y <= pEnd.y || p.y <= pStart.y && p.y >= pEnd.y);\n if (c) {\n if (pEnd.x == pStart.x && pEnd.x == p.x) {\n return true;\n } else if ((pEnd.x - pStart.x) * (pEnd.x - p.x) == 0) {\n return false;\n }\n c = ChartUtil.mathEqual((pEnd.y - pStart.y) / (pEnd.x - pStart.x), (pEnd.y - p.y) / (pEnd.x - p.x));\n }\n return c;\n}\n"
"public void onFailure(Throwable throwable) {\n LOG.error(\"String_Node_Str\", writeTransaction.getIdentifier(), throwable.getCause());\n}\n"
"public void logIt(String[] s, int type, String messageName, Hashtable ssoProperties) {\n if (logStatus && (s != null)) {\n try {\n LogMessageProviderBase provider = (LogMessageProviderBase) MessageProviderFactory.getProvider(\"String_Node_Str\");\n if (auditor == null) {\n auditor = InjectorHolder.getInstance(LegacyAuthenticationEventAuditor.class);\n }\n CoreWrapper cw = new CoreWrapper();\n String orgName = (String) ssoProperties.get(\"String_Node_Str\");\n String realmName = cw.convertOrgNameToRealmName(orgName);\n if (auditor.isAuditing(realmName)) {\n if (!auditor.isLogoutEvent(messageName)) {\n String userName = (String) ssoProperties.get(\"String_Node_Str\");\n String description = provider.getAllHashMessageIDs().get(messageName).getDescription();\n String contextID = (String) ssoProperties.get(\"String_Node_Str\");\n String LoginIDSid = (String) ssoProperties.get(\"String_Node_Str\");\n long time = Calendar.getInstance().getTimeInMillis();\n Map<String, String> contexts = null;\n if (StringUtils.isNotEmpty(contextID)) {\n contexts = new HashMap<>();\n contexts.put(AUTH.toString(), contextID);\n }\n if (StringUtils.isNotEmpty(LoginIDSid)) {\n InternalSession session = AuthD.getSession(new SessionID(LoginIDSid));\n String sessionContext = null;\n if (session != null) {\n sessionContext = session.getProperty(Constants.AM_CTX_ID);\n contexts.put(SESSION.toString(), sessionContext);\n }\n }\n AMIdentity identity = cw.getIdentity(userName, realmName);\n String authentication = null;\n if (identity != null) {\n authentication = identity.getUniversalId();\n }\n String moduleName = (String) ssoProperties.get(\"String_Node_Str\");\n List<Entry> entries = null;\n if (StringUtils.isNotEmpty(moduleName)) {\n Map<String, String> info = new HashMap<>();\n String ip = (String) ssoProperties.get(\"String_Node_Str\");\n if (StringUtils.isNotEmpty(ip)) {\n info = Collections.singletonMap(\"String_Node_Str\", ip);\n }\n Map<String, Object> map = new HashMap<>();\n map.put(\"String_Node_Str\", moduleName);\n map.put(\"String_Node_Str\", description);\n description = AM_LOGIN_CHAIN_COMPLETED.toString();\n map.put(\"String_Node_Str\", info);\n entries = Collections.singletonList(map);\n }\n auditor.audit(messageName, description, AuditRequestContext.getTransactionIdValue(), authentication, realmName, time, contexts, entries);\n }\n }\n com.sun.identity.log.LogRecord lr = null;\n SSOToken ssot = AccessController.doPrivileged(AdminTokenAction.getInstance());\n if (ssoProperties == null) {\n lr = provider.createLogRecord(messageName, s, ssot);\n } else {\n lr = provider.createLogRecord(messageName, s, ssoProperties);\n }\n com.sun.identity.log.Logger logger;\n switch(type) {\n case LOG_ACCESS:\n logger = (com.sun.identity.log.Logger) Logger.getLogger(\"String_Node_Str\");\n logger.log(lr, ssot);\n break;\n case LOG_ERROR:\n logger = (com.sun.identity.log.Logger) Logger.getLogger(\"String_Node_Str\");\n logger.log(lr, ssot);\n break;\n default:\n logger = (com.sun.identity.log.Logger) Logger.getLogger(\"String_Node_Str\");\n logger.log(lr, ssot);\n break;\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n debug.error(\"String_Node_Str\" + ex.getMessage());\n }\n }\n}\n"
"private String readPassword() throws IOException {\n try {\n Object console = Utils.callStaticMethod(\"String_Node_Str\");\n print(\"String_Node_Str\");\n char[] password = (char[]) Utils.callMethod(console, \"String_Node_Str\");\n return password == null ? null : new String(password);\n } catch (Exception e) {\n }\n Thread passwordHider = new Thread(this, \"String_Node_Str\");\n stopHide = false;\n passwordHider.start();\n print(\"String_Node_Str\");\n String p = readLine();\n stopHide = true;\n try {\n passwordHider.join();\n } catch (InterruptedException e) {\n }\n print(\"String_Node_Str\");\n return p;\n}\n"
"public static Member findBestMemberMatch(List<? extends Member> members, RolapMember parent, RolapLevel level, Id.Segment searchName, MatchType matchType, boolean caseInsensitive) {\n Member searchMember = level.getHierarchy().createMember(parent, level, searchName.name, null);\n Member bestMatch = null;\n for (Member member : members) {\n int rc;\n if (searchName.quoting == Id.Quoting.KEY && member instanceof RolapMember) {\n if (((RolapMember) member).getKey().toString().equals(searchName.name)) {\n return member;\n }\n }\n if (matchType.isExact()) {\n if (caseInsensitive) {\n rc = Util.compareName(member.getName(), searchName.name);\n } else {\n rc = member.getName().compareTo(searchName.name);\n }\n } else {\n rc = FunUtil.compareSiblingMembers(member, searchMember);\n }\n if (rc == 0) {\n return member;\n }\n if (matchType == MatchType.BEFORE) {\n if (rc < 0 && (bestMatch == null || FunUtil.compareSiblingMembers(member, bestMatch) > 0)) {\n bestMatch = member;\n }\n } else if (matchType == MatchType.AFTER) {\n if (rc > 0 && (bestMatch == null || FunUtil.compareSiblingMembers(member, bestMatch) < 0)) {\n bestMatch = member;\n }\n }\n }\n if (matchType == MatchType.EXACT) {\n return null;\n }\n return bestMatch;\n}\n"
"public T next() {\n if (hasNext()) {\n T out = (T) beanHolder[0];\n beanHolder[0] = null;\n }\n return out;\n}\n"
"protected List<List<FileSplit>> getCrossValidationSplits(JobContext job, int count) throws IOException {\n LOG.debug(\"String_Node_Str\", count);\n List<FileStatus> files = listCrossValidationStatus(job);\n List<FileSplit> current = new ArrayList<FileSplit>();\n List<List<FileSplit>> validationList = new ArrayList<List<FileSplit>>();\n long lengthSum = 0L;\n for (FileStatus file : files) {\n Path path = file.getPath();\n if (isPigOrHadoopMetaFile(path)) {\n continue;\n }\n lengthSum += file.getLen();\n }\n long size = lengthSum / count + 1;\n long remaining = 0L;\n for (FileStatus file : files) {\n Path path = file.getPath();\n if (isPigOrHadoopMetaFile(path)) {\n continue;\n }\n FileSystem fs = path.getFileSystem(job.getConfiguration());\n long offset = 0L;\n long length = file.getLen();\n if (length + remaining >= size) {\n long cut = (size - remaining) >= length ? length : (size - remaining);\n current.add(getFileSplit(fs, file, offset, cut));\n offset = cut;\n remaining = length - cut;\n validationList.add(current);\n current = new ArrayList<FileSplit>();\n while (remaining >= size) {\n current.add(getFileSplit(fs, file, offset, size));\n validationList.add(current);\n current = new ArrayList<FileSplit>();\n remaining -= size;\n offset += size;\n }\n if (remaining > 0) {\n current.add(getFileSplit(fs, file, offset, remaining));\n }\n } else {\n current.add(getFileSplit(fs, file, 0, length));\n remaining += length;\n }\n }\n if (current.size() > 0) {\n validationList.add(current);\n }\n LOG.info(\"String_Node_Str\", validationList.size());\n return validationList;\n}\n"
"public org.hl7.fhir.dstu2.model.DeviceComponent.DeviceComponentProductionSpecificationComponent convertDeviceComponentProductionSpecificationComponent(org.hl7.fhir.dstu3.model.DeviceComponent.DeviceComponentProductionSpecificationComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.DeviceComponent.DeviceComponentProductionSpecificationComponent tgt = new org.hl7.fhir.dstu2.model.DeviceComponent.DeviceComponentProductionSpecificationComponent();\n copyElement(src, tgt);\n tgt.setSpecType(convertCodeableConcept(src.getSpecType()));\n tgt.setComponentId(convertIdentifier(src.getComponentId()));\n tgt.setProductionSpec(src.getProductionSpec());\n return tgt;\n}\n"
"public DCEVSEStatusType getDCEVSEStatus(EVSENotificationType notification) {\n DCEVSEStatusType dcEvseStatus = new DCEVSEStatusType();\n dcEvseStatus.setNotificationMaxDelay(0);\n dcEvseStatus.setEVSENotification((notification != null) ? notification : EVSENotificationType.NONE);\n dcEvseStatus.setEVSEStatusCode(DCEVSEStatusCodeType.EVSE_READY);\n dcEvseStatus.setEVSEIsolationStatus(getIsolationLevel());\n return dcEvseStatus;\n}\n"
"protected Parent content() {\n TextField milestoneTitleField = new TextField();\n milestoneTitleField.setPrefWidth(120);\n milestoneTitleField.setText(originalMilestone.getTitle());\n DatePicker datePicker = (originalMilestone.getDueOn() != null) ? new DatePicker(originalMilestone.getDueOn()) : new DatePicker();\n datePicker.setPrefWidth(110);\n Button done = new Button(\"String_Node_Str\");\n done.setOnAction(e -> {\n respond(milestoneTitleField.getText(), toUtilDate(datePicker.getValue()));\n close();\n });\n HBox layout = new HBox();\n layout.setPadding(new Insets(15));\n layout.setSpacing(10);\n layout.setAlignment(Pos.BASELINE_CENTER);\n layout.getChildren().addAll(milestoneTitleField, datePicker, done);\n return layout;\n}\n"
"public void initialise() {\n playerCamera = worldRenderer.getActiveCamera();\n addDesiredStateChange(new LookThroughNormalized(playerCamera));\n initSkysphere(playerCamera.getzFar() < RADIUS ? playerCamera.getzFar() : RADIUS);\n wireframeStateChange = new SetWireframe(true);\n RenderingDebugConfig renderingDebugConfig = config.getRendering().getDebug();\n new WireframeTrigger(renderingDebugConfig, this);\n addDesiredStateChange(new SetViewportToSizeOf(WRITEONLY_GBUFFER, displayResolutionDependentFBOs));\n update();\n addDesiredStateChange(new EnableMaterial(\"String_Node_Str\"));\n addDesiredStateChange(new DisableDepthWriting());\n addDesiredStateChange(new EnableFaceCulling());\n addDesiredStateChange(new SetFacesToCull(GL_FRONT));\n}\n"
"public List<purejavahidapi.HidDeviceInfo> enumerateDevices() {\n try {\n List<purejavahidapi.HidDeviceInfo> list = new LinkedList<purejavahidapi.HidDeviceInfo>();\n GUID InterfaceClassGuid = new GUID(0x4d1e55b2, 0xf16f, 0x11cf, 0x88, 0xcb, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30);\n SP_DEVINFO_DATA devinfo_data = new SP_DEVINFO_DATA();\n SP_DEVICE_INTERFACE_DATA device_interface_data = new SP_DEVICE_INTERFACE_DATA();\n SP_DEVICE_INTERFACE_DETAIL_DATA_A device_interface_detail_data = null;\n HDEVINFO device_info_set = null;\n int deviceIndex = 0;\n int i;\n devinfo_data.cbSize = devinfo_data.size();\n device_interface_data.cbSize = device_interface_data.size();\n device_info_set = SetupDiGetClassDevs(InterfaceClassGuid, null, null, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);\n for (int deviceIndex = 0; ; deviceIndex++) {\n HANDLE devHandle = INVALID_HANDLE_VALUE;\n if (!SetupDiEnumDeviceInterfaces(device_info_set, null, InterfaceClassGuid, deviceIndex, device_interface_data)) {\n if (GetLastError() == ERROR_NO_MORE_ITEMS)\n break;\n reportLastError();\n }\n ;\n int[] required_size = { 0 };\n if (!SetupDiGetDeviceInterfaceDetail(device_info_set, device_interface_data, null, 0, required_size, null)) {\n if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)\n reportLastError();\n }\n device_interface_detail_data = new SP_DEVICE_INTERFACE_DETAIL_DATA_A(required_size[0]);\n if (!SetupDiGetDeviceInterfaceDetail(device_info_set, device_interface_data, device_interface_detail_data, required_size[0], null, null))\n reportLastError();\n char[] driverNameChars = new char[256];\n if (!SetupDiEnumDeviceInfo(device_info_set, deviceIndex, devinfo_data)) {\n reportLastError();\n continue;\n }\n if (!SetupDiGetDeviceRegistryProperty(device_info_set, devinfo_data, SPDRP_CLASS, null, driverNameChars, driverNameChars.length, null)) {\n reportLastError();\n continue;\n }\n int driverNameLen = 0;\n while (driverNameChars[driverNameLen++] != 0) ;\n String drivername = new String(driverNameChars, 0, driverNameLen - 1);\n if (\"String_Node_Str\".equals(drivername)) {\n if (!SetupDiGetDeviceRegistryProperty(device_info_set, devinfo_data, SPDRP_DRIVER, null, driverNameChars, driverNameChars.length, null)) {\n if (GetLastError() != ERROR_INVALID_DATA)\n reportLastError();\n continue;\n }\n char[] deviceIdChars = new char[256];\n int[] deviceIdLen = { 0 };\n if (!SetupDiGetDeviceInstanceId(device_info_set, devinfo_data, deviceIdChars, deviceIdChars.length, deviceIdLen))\n reportLastError();\n String deviceId = new String(deviceIdChars);\n int[] parent = { devinfo_data.DevInst };\n while (CM_Get_Parent(parent, parent[0], 0) == 0) {\n int[] parentIdLen = { 0 };\n if (CM_Get_Device_ID_Size(parentIdLen, parent[0], 0) != CR_SUCCESS)\n reportLastError();\n parentIdLen[0]++;\n char[] parentIdChars = new char[parentIdLen[0]];\n if (CM_Get_Device_ID(parent[0], parentIdChars, parentIdLen[0], 0) != CR_SUCCESS)\n reportLastError();\n String parentId = new String(parentIdChars, 0, parentIdLen[0] - 1);\n if (parentId.startsWith(\"String_Node_Str\")) {\n deviceId = parentId;\n break;\n }\n }\n String path = new String(device_interface_detail_data.DevicePath);\n devHandle = openDeviceHandle(path, true);\n if (devHandle == INVALID_HANDLE_VALUE)\n break;\n HIDD_ATTRIBUTES attrib = new HIDD_ATTRIBUTES();\n attrib.Size = new NativeLong(attrib.size());\n HidD_GetAttributes(devHandle, attrib);\n list.add(new HidDeviceInfo(path, deviceId, devHandle, attrib));\n CloseHandle(devHandle);\n }\n deviceIndex++;\n }\n SetupDiDestroyDeviceInfoList(device_info_set);\n return list;\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n}\n"
"protected void drawData() {\n ArrayList<LineDataSet> dataSets = (ArrayList<LineDataSet>) mCurrentData.getDataSets();\n mRenderPaint.setStyle(Paint.Style.STROKE);\n for (int i = 0; i < mCurrentData.getDataSetCount(); i++) {\n LineDataSet dataSet = dataSets.get(i);\n ArrayList<? extends Entry> entries = dataSet.getYVals();\n float[] valuePoints = generateTransformedValues(entries, 0f);\n mRenderPaint.setStrokeWidth(dataSet.getLineWidth());\n mRenderPaint.setPathEffect(dataSet.getDashPathEffect());\n if (mDrawCubic) {\n mRenderPaint.setColor(dataSet.getColor(i));\n Path spline = new Path();\n spline.moveTo(entries.get(0).getXIndex(), entries.get(0).getVal());\n for (int x = 1; x < entries.size() - 3; x += 2) {\n spline.cubicTo(entries.get(x).getXIndex(), entries.get(x).getVal(), entries.get(x + 1).getXIndex(), entries.get(x + 1).getVal(), entries.get(x + 2).getXIndex(), entries.get(x + 2).getVal());\n }\n transformPath(spline);\n mDrawCanvas.drawPath(spline, mRenderPaint);\n } else {\n for (int j = 0; j < (valuePoints.length - 2) * mPhaseX; j += 2) {\n mRenderPaint.setColor(dataSet.getColor(j / 2));\n if (isOffContentRight(valuePoints[j]))\n break;\n if (j != 0 && isOffContentLeft(valuePoints[j - 1]) && isOffContentTop(valuePoints[j + 1]) && isOffContentBottom(valuePoints[j + 1]))\n continue;\n mDrawCanvas.drawLine(valuePoints[j], valuePoints[j + 1], valuePoints[j + 2], valuePoints[j + 3], mRenderPaint);\n }\n }\n mRenderPaint.setPathEffect(null);\n if (dataSet.isDrawFilledEnabled() && entries.size() > 0) {\n mRenderPaint.setStyle(Paint.Style.FILL);\n mRenderPaint.setColor(dataSet.getFillColor());\n mRenderPaint.setAlpha(dataSet.getFillAlpha());\n Path filled = generateFilledPath(entries);\n transformPath(filled);\n mDrawCanvas.drawPath(filled, mRenderPaint);\n mRenderPaint.setAlpha(255);\n }\n }\n}\n"
"public void onPlayerInteract(PlayerInteractEvent event) {\n Player player = event.getPlayer();\n if ((event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.LEFT_CLICK_BLOCK) && player.getItemInHand().getType() == Material.WOOL) {\n Block targetBlock = player.getTargetBlock(null, 1000);\n if (targetBlock.getType() != Material.AIR) {\n if (!replacedBlocks.contains(targetBlock)) {\n replacedBlocks.add(targetBlock);\n replacedBlocksMaterial.add(targetBlock.getType());\n targetBlock.setType(Wool.setData((byte) 14));\n plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n replaceBlock();\n }\n }, 20L);\n } else {\n replacedBlocks.add(replacedBlocks.get(replacedBlocks.indexOf(targetBlock)));\n replacedBlocksMaterial.add(replacedBlocks.get(replacedBlocks.indexOf(targetBlock)).getType());\n targetBlock.setType((Material.WOOL).setData(14));\n plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n replaceBlock();\n }\n }, 20L);\n }\n }\n }\n}\n"
"private Token getParameter(String verb, List<Object> statement, int index, Map<String, Object> namespace, Set<TokenType> tokenTypes) {\n Object item;\n Token token;\n try {\n item = statement.get(index);\n } catch (IndexOutOfBoundsException e) {\n throw new InvalidRuleException(String.format(\"String_Node_Str\", verb, index + 1, statement.size(), e));\n }\n try {\n token = new Token(item, namespace);\n } catch (Exception e) {\n throw new StatementErrorException(String.format(\"String_Node_Str\", index, e));\n }\n token.load();\n if (tokenTypes != null) {\n try {\n token.get();\n } catch (UndefinedValueException e) {\n }\n if (!tokenTypes.contains(token.type)) {\n throw new InvalidTypeException(String.format(\"String_Node_Str\", verb, index, tokenTypes, item.getClass().getSimpleName(), statement));\n }\n }\n return token;\n}\n"
"public boolean postfire() throws IllegalActionException {\n Time currentTime = getDirector().getModelTime();\n Time delayToTime = currentTime.add(_delay);\n if (_delayedOutputTokens.size() > 0) {\n if (_currentOutput != null) {\n _delayedOutputTokens.take();\n }\n }\n if (_delayedOutputTokens.size() > 0) {\n TimedEvent earliestEvent = (TimedEvent) _delayedOutputTokens.get();\n Time eventTime = earliestEvent.timeStamp;\n if (eventTime.equals(currentTime)) {\n getDirector().fireAt(this, currentTime);\n }\n }\n if (_currentInput != null) {\n _delayedOutputTokens.put(new TimedEvent(delayToTime, value.getToken()));\n getDirector().fireAt(this, delayToTime);\n }\n return super.postfire();\n}\n"
"private void commitVersionFile(byte[] data) throws IOException {\n File f = new File(CommonUtils.getUserSettingsDir(), \"String_Node_Str\");\n File nf = new File(CommonUtils.getUserSettingsDir(), \"String_Node_Str\");\n RandomAccessFile raf = new RandomAccessFile(nf, \"String_Node_Str\");\n raf.write(data);\n raf.close();\n boolean deleteOld = f.delete();\n if (deleteOld) {\n boolean renamed = nf.renameTo(f);\n if (!renamed) {\n nf.delete();\n throw new IOException();\n }\n } else {\n nf.delete();\n throw new IOException();\n}\n"
"void drainUntil(long upToNanos) {\n long now = timeNanos;\n PriorityBlockingQueue<TestTask> q = queue;\n for (; ; ) {\n TestTask tt = q.peek();\n if (tt == null || tt.dueNanos > upToNanos) {\n break;\n }\n q.remove(tt);\n timeNanos = tt.dueNanos;\n tt.run();\n }\n timeNanos = upToNanos;\n}\n"
"public void copyToContainer(final Path directory, String containerId, String path) throws DockerException, InterruptedException, IOException {\n final WebTarget resource = resource().path(\"String_Node_Str\").path(containerId).path(\"String_Node_Str\").queryParam(\"String_Node_Str\", true).queryParam(\"String_Node_Str\", path);\n final CompressedDirectory compressedDirectory = CompressedDirectory.create(directory);\n final InputStream fileStream = Files.newInputStream(compressedDirectory.file());\n request(PUT, String.class, resource, resource.request(APPLICATION_OCTET_STREAM_TYPE), Entity.entity(fileStream, \"String_Node_Str\"));\n}\n"
"public static ChatPanelBasic getChat(UUID chatId) {\n return CHATS.get(chatId);\n}\n"
"public void write(byte[] data, int offset, int length) throws IOException {\n int expectEnd = currentInnerChunkIndex + length;\n if (expectEnd <= CHUNK_SIZE) {\n mappedByteBuffer.put(data, offset, length);\n currentInnerChunkIndex = expectEnd;\n realSize += length;\n } else {\n int writeLength = CHUNK_SIZE - currentInnerChunkIndex;\n mappedByteBuffer.put(data, offset, writeLength);\n realSize += writeLength;\n getNextChunk();\n write(data, offset + writeLength, length - writeLength);\n currentInnerChunkIndex += (length - writeLength);\n realSize += (length - writeLength);\n }\n if (currentInnerChunkIndex == CHUNK_SIZE)\n getNextChunk();\n}\n"