content
stringlengths
40
137k
"private static PartialHarvest updateHarvestDefinition(PageContext context, I18n i18n, List<String> unknownDomains, List<String> illegalDomains) {\n ServletRequest request = context.getRequest();\n HTMLUtils.forwardOnEmptyParameter(context, Constants.HARVEST_PARAM, Constants.SCHEDULE_PARAM);\n String name = request.getParameter(Constants.HARVEST_PARAM);\n HTMLUtils.forwardOnMissingParameter(context, Constants.COMMENTS_PARAM, Constants.DOMAINLIST_PARAM);\n String scheduleName = request.getParameter(Constants.SCHEDULE_PARAM);\n Schedule sched = ScheduleDAO.getInstance().read(scheduleName);\n if (sched == null) {\n HTMLUtils.forwardWithErrorMessage(context, i18n, \"String_Node_Str\", scheduleName);\n throw new ForwardedToErrorPage(\"String_Node_Str\" + scheduleName + \"String_Node_Str\");\n }\n String comments = request.getParameter(Constants.COMMENTS_PARAM);\n List<DomainConfiguration> dc = getDomainConfigurations(request.getParameterMap());\n addDomainsToConfigurations(dc, request.getParameter(Constants.DOMAINLIST_PARAM), unknownDomains, illegalDomains);\n HarvestDefinitionDAO hddao = HarvestDefinitionDAO.getInstance();\n if ((request.getParameter(Constants.CREATENEW_PARAM) != null)) {\n if (hddao.getHarvestDefinition(name) != null) {\n HTMLUtils.forwardWithErrorMessage(context, i18n, \"String_Node_Str\", name);\n throw new ForwardedToErrorPage(\"String_Node_Str\" + \"String_Node_Str\" + name + \"String_Node_Str\");\n }\n PartialHarvest hdd = new PartialHarvest(dc, sched, name, comments);\n hdd.setActive(false);\n hddao.create(hdd);\n return hdd;\n } else {\n long edition = HTMLUtils.parseOptionalLong(context, Constants.EDITION_PARAM, Constants.NO_EDITION);\n PartialHarvest hdd = (PartialHarvest) hddao.getHarvestDefinition(name);\n if (hdd.getEdition() != edition) {\n HTMLUtils.forwardWithRawErrorMessage(context, i18n, \"String_Node_Str\", \"String_Node_Str\" + Constants.HARVEST_PARAM + \"String_Node_Str\" + HTMLUtils.encodeAndEscapeHTML(name) + \"String_Node_Str\", \"String_Node_Str\");\n throw new ForwardedToErrorPage(\"String_Node_Str\" + name + \"String_Node_Str\");\n }\n hdd.setDomainConfigurations(dc);\n hdd.setSchedule(sched);\n hdd.setComments(comments);\n hddao.update(hdd);\n return hdd;\n }\n}\n"
"protected void initializeGraphicalViewer() {\n super.initializeGraphicalViewer();\n GraphicalViewer viewer = getGraphicalViewer();\n if (getModel() != null) {\n setContents();\n hookModelEventManager(getModel());\n }\n viewer.addDropTargetListener(createTemplateTransferDropTargetListener(viewer));\n}\n"
"private ToolController initToolController(Identity identity, UserRequest ureq) {\n ToolController myTool = ToolFactory.createToolController(getWindowControl());\n CourseConfig cc = uce.getCourseEnvironment().getCourseConfig();\n if (isCourseAdmin || isCourseCoach || hasCourseRight(CourseRights.RIGHT_COURSEEDITOR) || hasCourseRight(CourseRights.RIGHT_GROUPMANAGEMENT) || hasCourseRight(CourseRights.RIGHT_ARCHIVING) || hasCourseRight(CourseRights.RIGHT_STATISTICS) || hasCourseRight(CourseRights.RIGHT_DB) || hasCourseRight(CourseRights.RIGHT_ASSESSMENT)) {\n myTool.addHeader(translate(\"String_Node_Str\"));\n if (hasCourseRight(CourseRights.RIGHT_COURSEEDITOR) || isCourseAdmin) {\n boolean managed = RepositoryEntryManagedFlag.isManaged(courseRepositoryEntry, RepositoryEntryManagedFlag.editcontent);\n myTool.addLink(COMMAND_EDIT, translate(\"String_Node_Str\"), \"String_Node_Str\", null, \"String_Node_Str\", false);\n myTool.setEnabled(\"String_Node_Str\", !managed);\n }\n if (hasCourseRight(CourseRights.RIGHT_GROUPMANAGEMENT) || isCourseAdmin) {\n myTool.addLink(\"String_Node_Str\", translate(\"String_Node_Str\"), null, null, \"String_Node_Str\", false);\n }\n if (hasCourseRight(CourseRights.RIGHT_ARCHIVING) || isCourseAdmin) {\n myTool.addLink(\"String_Node_Str\", translate(\"String_Node_Str\"));\n }\n if (hasCourseRight(CourseRights.RIGHT_ASSESSMENT) || isCourseCoach || isCourseAdmin) {\n myTool.addLink(\"String_Node_Str\", translate(\"String_Node_Str\"));\n }\n if (hasCourseRight(CourseRights.RIGHT_STATISTICS) || isCourseAdmin || isCourseCoach) {\n final AtomicInteger testNodes = new AtomicInteger();\n final AtomicInteger surveyNodes = new AtomicInteger();\n new TreeVisitor(new Visitor() {\n public void visit(INode node) {\n if (((CourseNode) node).isStatisticNodeResultAvailable(uce, QTIType.test, QTIType.onyx)) {\n testNodes.incrementAndGet();\n } else if (((CourseNode) node).isStatisticNodeResultAvailable(uce, QTIType.survey)) {\n surveyNodes.incrementAndGet();\n }\n }\n }, course.getRunStructure().getRootNode(), true).visitAll();\n if (testNodes.intValue() > 0) {\n myTool.addLink(\"String_Node_Str\", translate(\"String_Node_Str\"));\n }\n if (surveyNodes.intValue() > 0) {\n myTool.addLink(\"String_Node_Str\", translate(\"String_Node_Str\"));\n }\n }\n if (hasCourseRight(CourseRights.RIGHT_STATISTICS) || isCourseAdmin) {\n myTool.addLink(\"String_Node_Str\", translate(\"String_Node_Str\"));\n }\n if (CourseDBManager.getInstance().isEnabled() && (hasCourseRight(CourseRights.RIGHT_DB) || isCourseAdmin)) {\n myTool.addLink(\"String_Node_Str\", translate(\"String_Node_Str\"));\n }\n }\n if (uce.getCoachedGroups().size() > 0) {\n myTool.addHeader(translate(\"String_Node_Str\"));\n for (BusinessGroup group : uce.getCoachedGroups()) {\n myTool.addLink(CMD_START_GROUP_PREFIX + group.getKey().toString(), StringHelper.escapeHtml(group.getName()));\n }\n }\n if (uce.getParticipatingGroups().size() > 0) {\n myTool.addHeader(translate(\"String_Node_Str\"));\n for (BusinessGroup group : uce.getParticipatingGroups()) {\n myTool.addLink(CMD_START_GROUP_PREFIX + group.getKey().toString(), group.getName());\n }\n }\n if (uce.getWaitingLists().size() > 0) {\n myTool.addHeader(translate(\"String_Node_Str\"));\n for (BusinessGroup group : uce.getWaitingLists()) {\n int pos = businessGroupService.getPositionInWaitingListFor(identity, group);\n myTool.addLink(CMD_START_GROUP_PREFIX + group.getKey().toString(), group.getName() + \"String_Node_Str\" + pos + \"String_Node_Str\", group.getKey().toString(), null);\n myTool.setEnabled(group.getKey().toString(), false);\n }\n }\n myTool.addHeader(translate(\"String_Node_Str\"));\n if (cc.isCalendarEnabled() && !isGuest) {\n myTool.addPopUpLink(ACTION_CALENDAR, translate(\"String_Node_Str\"), null, null, \"String_Node_Str\", \"String_Node_Str\", false);\n }\n if (cc.hasGlossary()) {\n myTool.addComponent(glossaryToolCtr.getInitialComponent());\n }\n if (showCourseConfigLink) {\n ChiefController chief = (ChiefController) Windows.getWindows(ureq).getAttribute(\"String_Node_Str\");\n if (chief != null && chief.hasStaticSite(RepositorySite.class)) {\n myTool.addLink(TOOLBOX_LINK_COURSECONFIG, translate(\"String_Node_Str\"));\n }\n }\n if (!isGuest) {\n myTool.addPopUpLink(\"String_Node_Str\", translate(\"String_Node_Str\"), null, null, \"String_Node_Str\", \"String_Node_Str\", false);\n }\n if (offerBookmark && !isGuest) {\n boolean marked = markManager.isMarked(courseRepositoryEntry, getIdentity(), null);\n String css = marked ? \"String_Node_Str\" : \"String_Node_Str\";\n myTool.addLink(ACTION_BOOKMARK, translate(\"String_Node_Str\"), TOOL_BOOKMARK, css);\n }\n if (cc.isEfficencyStatementEnabled() && course.hasAssessableNodes() && !isGuest) {\n myTool.addPopUpLink(\"String_Node_Str\", translate(\"String_Node_Str\"), \"String_Node_Str\", null, \"String_Node_Str\", \"String_Node_Str\", false);\n UserEfficiencyStatement es = efficiencyStatementManager.getUserEfficiencyStatementLight(courseRepositoryEntry.getKey(), identity);\n if (es == null) {\n myTool.setEnabled(\"String_Node_Str\", false);\n }\n }\n InstantMessagingModule imModule = CoreSpringFactory.getImpl(InstantMessagingModule.class);\n boolean chatIsEnabled = !isGuest && imModule.isEnabled() && imModule.isCourseEnabled() && CourseModule.isCourseChatEnabled() && cc.isChatEnabled();\n if (chatIsEnabled) {\n myTool.addLink(ACTION_CHAT, translate(\"String_Node_Str\"), TOOL_CHAT, null);\n }\n if (CourseModule.displayParticipantsCount() && !isGuest) {\n addCurrentUserCount(myTool);\n }\n return myTool;\n}\n"
"public void onPlayerTeleport(final PlayerTeleportEvent e) {\n if (debug) {\n plugin.getLogger().info(e.getEventName());\n }\n if (e.getTo() == null || e.getFrom() == null) {\n return;\n }\n if (!IslandGuard.inWorld(e.getTo()) && !IslandGuard.inWorld(e.getFrom())) {\n return;\n }\n if (plugin.getGrid() == null) {\n return;\n }\n if (!Settings.allowTeleportWhenFalling && e.getPlayer().getGameMode().equals(GameMode.SURVIVAL) && !e.getPlayer().isOp()) {\n if (isFalling(e.getPlayer().getUniqueId())) {\n e.getPlayer().sendMessage(plugin.myLocale(e.getPlayer().getUniqueId()).islandcannotTeleport);\n e.setCancelled(true);\n if (e.getPlayer().getLocation().getBlockY() < 0) {\n e.getPlayer().setHealth(0D);\n unsetFalling(e.getPlayer().getUniqueId());\n }\n return;\n }\n }\n Island islandTo = plugin.getGrid().getProtectedIslandAt(e.getTo());\n if (e.getCause() != null && e.getCause().equals(TeleportCause.ENDER_PEARL)) {\n if (islandTo == null) {\n if (Settings.allowEnderPearls) {\n return;\n }\n } else {\n if (islandTo.isSpawn()) {\n if (Settings.allowEnderPearls) {\n return;\n }\n } else {\n if (islandTo.getIgsFlag(Flags.allowEnderPearls) || islandTo.getMembers().contains(e.getPlayer().getUniqueId())) {\n return;\n }\n }\n }\n e.getPlayer().sendMessage(ChatColor.RED + plugin.myLocale(e.getPlayer().getUniqueId()).islandProtected);\n e.setCancelled(true);\n return;\n }\n Island islandFrom = plugin.getGrid().getProtectedIslandAt(e.getFrom());\n if (islandTo != null && islandTo.getOwner() != null) {\n if (islandTo != islandFrom) {\n if (islandTo.isLocked() || plugin.getPlayers().isBanned(islandTo.getOwner(), e.getPlayer().getUniqueId())) {\n e.getPlayer().sendMessage(ChatColor.RED + plugin.myLocale(e.getPlayer().getUniqueId()).lockIslandLocked);\n if (!plugin.getGrid().locationIsOnIsland(e.getPlayer(), e.getTo()) && !e.getPlayer().isOp() && !VaultHelper.checkPerm(e.getPlayer(), Settings.PERMPREFIX + \"String_Node_Str\") && !VaultHelper.checkPerm(e.getPlayer(), Settings.PERMPREFIX + \"String_Node_Str\")) {\n e.setCancelled(true);\n return;\n }\n }\n e.getPlayer().sendMessage(plugin.myLocale(e.getPlayer().getUniqueId()).lockNowEntering.replace(\"String_Node_Str\", plugin.getPlayers().getName(islandTo.getOwner())));\n }\n }\n}\n"
"public MethodBinding[] getMethods(SourceTypeBinding sourceTypeBinding, char[] selector) {\n MethodBinding[] orig = sourceTypeBinding.getMethodsBase(selector);\n if (interTypeMethods.isEmpty()) {\n return orig;\n }\n Set<MethodBinding> ret = new HashSet<MethodBinding>(Arrays.asList(orig));\n for (int i = 0, len = interTypeMethods.size(); i < len; i++) {\n MethodBinding method = (MethodBinding) interTypeMethods.get(i);\n if (CharOperation.equals(selector, method.selector)) {\n ret.add(method);\n }\n }\n if (ret.isEmpty()) {\n return Binding.NO_METHODS;\n }\n return (MethodBinding[]) ret.toArray(new MethodBinding[ret.size()]);\n}\n"
"private List<HitEnum> buildRegexHitEnums() throws IOException {\n boolean luceneRegex = isLuceneRegexFlavor();\n if (luceneRegex) {\n cache.automatonHitEnumFactories = new HashMap<>();\n }\n Boolean caseInsensitiveOption = (Boolean) getOption(\"String_Node_Str\");\n boolean caseInsensitive = caseInsensitiveOption == null ? false : caseInsensitiveOption;\n List<HitEnum> hitEnums = new ArrayList<>();\n List<String> fieldValues = defaultField.getFieldValues();\n if (fieldValues.isEmpty()) {\n return hitEnums;\n }\n for (String regex : getRegexes()) {\n if (luceneRegex) {\n if (caseInsensitive) {\n regex = regex.toLowerCase(getLocale());\n }\n AutomatonHitEnum.Factory factory = cache.automatonHitEnumFactories.get(regex);\n if (factory == null) {\n factory = buildFactoryForRegex(new RegExp(regex));\n cache.automatonHitEnumFactories.put(regex, factory);\n }\n hitEnums.add(buildLuceneRegexHitEnumForRegex(factory, fieldValues, caseInsensitive));\n } else {\n int options = 0;\n if (caseInsensitive) {\n options |= Pattern.CASE_INSENSITIVE;\n }\n hitEnums.add(buildJavaRegexHitEnumForRegex(Pattern.compile(regex, options), fieldValues));\n }\n }\n return hitEnums;\n}\n"
"private static void loadComputedMeasures(DataInputStream dis, ICubeQueryDefinition qd) throws DataException, IOException {\n int size = IOUtil.readInt(dis);\n for (int i = 0; i < size; i++) {\n IComputedMeasureDefinition md = loadComputedMeasure(dis);\n IMeasureDefinition md1 = qd.createComputedMeasure(md.getName(), md.getDataType(), md.getExpression());\n md1.setAggrFunction(md.getAggrFunction());\n }\n}\n"
"private void parseRoot(Tree tree) throws SAXException {\n if (tree.getType() == JSONLexer.OBJECT) {\n int children = tree.getChildCount();\n if (children == 1) {\n parse((CommonTree) tree.getChild(0));\n } else {\n contentHandler.startElement(\"String_Node_Str\", \"String_Node_Str\", null, attributes.setTree(tree, attributePrefix));\n for (int x = 0, size = tree.getChildCount(); x < size; x++) {\n parse((CommonTree) tree.getChild(x));\n }\n contentHandler.endElement(\"String_Node_Str\", \"String_Node_Str\", null);\n }\n }\n}\n"
"public synchronized int get(byte[] buf, int length) {\n int getLen = length;\n if (mAddIndex == mGetIndex) {\n return 0;\n }\n if ((mGetOffset < mAddOffset) && (mGetOffset + length) > mAddOffset) {\n getLen = mAddOffset - mGetOffset;\n }\n if (buf.length < getLen) {\n getLen = buf.length;\n }\n if ((mGetOffset + getLen) > (mRingBufSize - 1)) {\n int remain = mGetOffset + getLen - mRingBufSize;\n int copyLen = getLen - remain;\n if (copyLen != 0) {\n System.arraycopy(mRingBuf, mGetOffset, buf, 0, copyLen);\n }\n if (DEBUG_SHOW_GET) {\n Log.d(TAG, \"String_Node_Str\" + length + \"String_Node_Str\" + mGetOffset + \"String_Node_Str\" + (mGetOffset + copyLen - 1) + \"String_Node_Str\" + (copyLen - 1) + \"String_Node_Str\");\n }\n mGetOffset = 0;\n if (DEBUG_SHOW_GET) {\n Log.d(TAG, \"String_Node_Str\" + length + \"String_Node_Str\" + mAddOffset + \"String_Node_Str\" + mGetOffset);\n }\n System.arraycopy(mRingBuf, mAddOffset, buf, copyLen, remain);\n mGetOffset = remain;\n if (DEBUG_SHOW_GET) {\n Log.d(TAG, \"String_Node_Str\" + length + \"String_Node_Str\" + (remain - 1) + \"String_Node_Str\" + copyLen + \"String_Node_Str\" + (remain - 1) + \"String_Node_Str\");\n Log.d(TAG, \"String_Node_Str\" + length + \"String_Node_Str\" + mAddOffset + \"String_Node_Str\" + mGetOffset);\n }\n return getLen;\n } else {\n System.arraycopy(mRingBuf, mGetOffset, buf, 0, getLen);\n if (DEBUG_SHOW_GET) {\n Log.d(TAG, \"String_Node_Str\" + length + \"String_Node_Str\" + mGetOffset + \"String_Node_Str\" + (mGetOffset + getLen - 1) + \"String_Node_Str\" + (getLen - 1) + \"String_Node_Str\");\n }\n mGetOffset += getLen;\n if (DEBUG_SHOW_GET) {\n Log.d(TAG, \"String_Node_Str\" + length + \"String_Node_Str\" + mAddOffset + \"String_Node_Str\" + mGetOffset);\n }\n return getLen;\n }\n}\n"
"public static String getSignature(String jwt) {\n try {\n validateJWT(jwt);\n Base64.Decoder dec = Base64.getDecoder();\n final byte[] sectionDecoded = dec.decode(jwt.split(\"String_Node_Str\")[SIGNATURE]);\n return new String(sectionDecoded, \"String_Node_Str\");\n } catch (final Exception e) {\n throw new InvalidParameterException(\"String_Node_Str\");\n }\n}\n"
"public void releaseWriteBuffers() throws IOException, InterruptedException {\n if (this.outgoingTransferEnvelope == null) {\n LOG.error(\"String_Node_Str\" + this.byteBufferedOutputChannel.getID());\n return;\n }\n if (this.outgoingTransferEnvelope.getBuffer() == null) {\n LOG.error(\"String_Node_Str\" + this.byteBufferedOutputChannel.getID() + \"String_Node_Str\");\n return;\n }\n try {\n this.outgoingTransferEnvelope.getBuffer().finishWritePhase();\n } catch (final IOException ioe) {\n this.byteBufferedOutputChannel.reportIOException(ioe);\n }\n if (!this.isReceiverRunning) {\n final Buffer memBuffer = this.outgoingTransferEnvelope.getBuffer();\n final Buffer fileBuffer = this.outputGateContext.getFileBuffer(memBuffer.size());\n memBuffer.copyToBuffer(fileBuffer);\n this.outgoingTransferEnvelope.setBuffer(fileBuffer);\n this.queuedOutgoingEnvelopes.add(this.outgoingTransferEnvelope);\n this.outgoingTransferEnvelope = null;\n memBuffer.recycleBuffer();\n return;\n }\n while (!this.queuedOutgoingEnvelopes.isEmpty()) {\n this.outputGateContext.processEnvelope(this, this.queuedOutgoingEnvelopes.poll());\n }\n this.outputGateContext.processEnvelope(this.outgoingTransferEnvelope);\n this.outgoingTransferEnvelope = null;\n}\n"
"private void setupMap() {\n mMap = getMap();\n if (isMapLayoutFinished()) {\n setupMapUI();\n setupMapOverlay();\n }\n}\n"
"private Object parseNumber() throws ParseException {\n final int startIdx = getPosition();\n if (peek() == '-') {\n next();\n }\n final int integralStartIdx = getPosition();\n for (; hasMore(); next()) {\n final char c = peek();\n if (c < '0' || c > '9') {\n break;\n }\n }\n final int integralEndIdx = getPosition();\n final int numIntegralDigits = integralEndIdx - integralStartIdx;\n if (numIntegralDigits == 0) {\n throw new ParseException(this, \"String_Node_Str\");\n }\n final boolean hasFractionalPart = peek() == '.';\n if (hasFractionalPart) {\n next();\n for (; hasMore(); next()) {\n final char c = peek();\n if (c < '0' || c > '9') {\n break;\n }\n }\n if (getPosition() - (integralEndIdx + 1) == 0) {\n throw new ParseException(this, \"String_Node_Str\");\n }\n }\n final boolean hasExponentPart = peek() == '.';\n if (hasExponentPart) {\n next();\n final char sign = peek();\n if (sign == '-' || sign == '+') {\n next();\n }\n final int exponentStart = getPosition();\n for (; hasMore(); next()) {\n final char c = peek();\n if (c < '0' || c > '9') {\n break;\n }\n }\n if (getPosition() - exponentStart == 0) {\n throw new ParseException(this, \"String_Node_Str\");\n }\n }\n final int endIdx = getPosition();\n final String numberStr = getSubstring(startIdx, endIdx).toString();\n if (hasFractionalPart || hasExponentPart) {\n return Double.valueOf(numberStr);\n } else if (numIntegralDigits < 9) {\n return Integer.valueOf(numberStr);\n } else if (numIntegralDigits == 9) {\n final long longVal = Long.parseLong(numberStr);\n if (longVal >= Integer.MIN_VALUE && longVal < Integer.MAX_VALUE) {\n return Integer.valueOf((int) longVal);\n } else {\n return Long.valueOf(longVal);\n }\n } else {\n return Long.valueOf(numberStr);\n }\n}\n"
"protected void dropFewItems(boolean var1, int var2) {\n int var3 = this.rand.nextInt(2 + var2);\n for (int var4 = 0; var4 < var3; ++var4) {\n this.dropItem(TwilightItemsOther.wildwoodSoul, 2);\n }\n}\n"
"private void addEventHandling(Element elm, StructureSource src, Trigger[] triggers) {\n if (elm != null) {\n for (int x = 0; x < triggers.length; x++) {\n Trigger tg = triggers[x];\n String scriptEvent = getJsScriptEvent(tg.getCondition().getValue());\n if (scriptEvent != null) {\n switch(tg.getAction().getType().getValue()) {\n case ActionType.SHOW_TOOLTIP:\n String tooltipText = ((TooltipValue) tg.getAction().getValue()).getText();\n if ((tooltipText != null) && (tooltipText.trim().length() > 0)) {\n Element title = svg_g2d.dom.createElement(\"String_Node_Str\");\n title.appendChild(svg_g2d.dom.createTextNode(tooltipText));\n elm.appendChild(title);\n if (scriptEvent.equals(\"String_Node_Str\")) {\n elm.setAttribute(\"String_Node_Str\", \"String_Node_Str\");\n elm.setAttribute(\"String_Node_Str\", \"String_Node_Str\");\n } else\n elm.setAttribute(scriptEvent, \"String_Node_Str\");\n }\n break;\n case ActionType.URL_REDIRECT:\n URLValue urlValue = ((URLValue) tg.getAction().getValue());\n if (urlValue.getBaseUrl().startsWith(\"String_Node_Str\")) {\n Element aLink = svg_g2d.createElement(\"String_Node_Str\");\n aLink.setAttribute(scriptEvent, \"String_Node_Str\" + urlValue.getBaseUrl() + \"String_Node_Str\");\n aLink.setAttribute(\"String_Node_Str\", \"String_Node_Str\");\n aLink.appendChild(elm);\n elm = aLink;\n } else {\n String target = urlValue.getTarget();\n if (target == null)\n target = \"String_Node_Str\";\n elm.setAttribute(scriptEvent, \"String_Node_Str\" + target + \"String_Node_Str\" + urlValue.getBaseUrl() + \"String_Node_Str\");\n }\n break;\n case ActionType.TOGGLE_VISIBILITY:\n case ActionType.TOGGLE_DATA_POINT_VISIBILITY:\n case ActionType.HIGHLIGHT:\n addJSCodeOnElement(src, tg, elm, scriptEvent, tg.getAction().getType().getValue());\n break;\n case ActionType.INVOKE_SCRIPT:\n if (tg.getCondition().equals(TriggerCondition.ACCESSIBILITY_LITERAL)) {\n AccessibilityValue accessValue = ((AccessibilityValue) tg.getAction().getValue());\n if (accessValue.getText() != null) {\n Element title = svg_g2d.createElement(\"String_Node_Str\");\n title.appendChild(svg_g2d.dom.createTextNode(accessValue.getText()));\n elm.appendChild(title);\n }\n if (accessValue.getAccessibility() != null) {\n Element description = svg_g2d.createElement(\"String_Node_Str\");\n description.appendChild(svg_g2d.dom.createTextNode(accessValue.getAccessibility()));\n elm.appendChild(description);\n }\n } else {\n String script = ((ScriptValue) tg.getAction().getValue()).getScript();\n String callbackFunction = \"String_Node_Str\" + Math.abs(script.hashCode()) + \"String_Node_Str\" + src.getSource().hashCode() + \"String_Node_Str\";\n elm.setAttribute(scriptEvent, callbackFunction);\n setCursor(elm);\n if (!(scripts.contains(script))) {\n svg_g2d.addScript(\"String_Node_Str\" + Math.abs(script.hashCode()) + \"String_Node_Str\" + \"String_Node_Str\" + script + \"String_Node_Str\");\n scripts.add(script);\n }\n }\n break;\n }\n }\n }\n hotspotLayer.appendChild(elm);\n }\n}\n"
"private ASTNode processASTNodeWithDifferences(AST ast, ASTRewrite sourceRewriter, ASTNode oldASTNode, List<ASTNodeDifference> differences) {\n if (differences.isEmpty()) {\n return oldASTNode;\n } else {\n Set<VariableBindingKeyPair> parameterBindingKeys = originalPassedParameters.keySet();\n Set<VariableBindingKeyPair> declaredLocalVariableBindingKeys = mapper.getDeclaredLocalVariablesInMappedNodes().keySet();\n ASTNode newASTNode = ASTNode.copySubtree(ast, oldASTNode);\n for (ASTNodeDifference difference : differences) {\n Expression oldExpression = difference.getExpression1().getExpression();\n oldExpression = ASTNodeDifference.getParentExpressionOfMethodNameOrTypeName(oldExpression);\n boolean isCommonParameter = false;\n if (oldExpression instanceof SimpleName) {\n SimpleName oldSimpleName = (SimpleName) oldExpression;\n IBinding binding = oldSimpleName.resolveBinding();\n if (parameterBindingKeys.contains(binding.getKey()) || declaredLocalVariableBindingKeys.contains(binding.getKey()))\n isCommonParameter = true;\n } else if (oldExpression instanceof QualifiedName) {\n QualifiedName oldQualifiedName = (QualifiedName) oldExpression;\n SimpleName oldSimpleName = oldQualifiedName.getName();\n IBinding binding = oldSimpleName.resolveBinding();\n if (parameterBindingKeys.contains(binding.getKey()) || declaredLocalVariableBindingKeys.contains(binding.getKey()))\n isCommonParameter = true;\n }\n if (!isCommonParameter) {\n if (difference instanceof FieldAccessReplacedWithGetterInvocationDifference) {\n FieldAccessReplacedWithGetterInvocationDifference nodeDifference = (FieldAccessReplacedWithGetterInvocationDifference) difference;\n MethodInvocation newGetterMethodInvocation = generateGetterMethodInvocation(ast, sourceRewriter, nodeDifference);\n if (oldASTNode.equals(oldExpression)) {\n return newGetterMethodInvocation;\n } else {\n replaceExpression(sourceRewriter, oldASTNode, newASTNode, oldExpression, newGetterMethodInvocation);\n }\n } else if (difference instanceof FieldAssignmentReplacedWithSetterInvocationDifference) {\n FieldAssignmentReplacedWithSetterInvocationDifference nodeDifference = (FieldAssignmentReplacedWithSetterInvocationDifference) difference;\n MethodInvocation newSetterMethodInvocation = generateSetterMethodInvocation(ast, sourceRewriter, nodeDifference);\n if (oldASTNode.equals(oldExpression)) {\n return newSetterMethodInvocation;\n } else {\n replaceExpression(sourceRewriter, oldASTNode, newASTNode, oldExpression, newSetterMethodInvocation);\n }\n } else if (oldExpression.getParent() instanceof Type) {\n Type oldType = (Type) oldExpression.getParent();\n if (difference.containsDifferenceType(DifferenceType.SUBCLASS_TYPE_MISMATCH)) {\n ITypeBinding typeBinding1 = difference.getExpression1().getExpression().resolveTypeBinding();\n ITypeBinding typeBinding2 = difference.getExpression2().getExpression().resolveTypeBinding();\n ITypeBinding commonSuperTypeBinding = ASTNodeMatcher.commonSuperType(typeBinding1, typeBinding2);\n if (commonSuperTypeBinding != null) {\n Type arg = generateTypeFromTypeBinding(commonSuperTypeBinding, ast, sourceRewriter);\n TypeVisitor oldTypeVisitor = new TypeVisitor();\n oldASTNode.accept(oldTypeVisitor);\n List<Type> oldTypes = oldTypeVisitor.getTypes();\n TypeVisitor newTypeVisitor = new TypeVisitor();\n newASTNode.accept(newTypeVisitor);\n List<Type> newTypes = newTypeVisitor.getTypes();\n int j = 0;\n for (Type type : oldTypes) {\n Type newType = newTypes.get(j);\n if (type.equals(oldType)) {\n sourceRewriter.replace(newType, arg, null);\n break;\n }\n j++;\n }\n }\n }\n } else {\n Set<VariableDeclaration> fields1 = fieldDeclarationsToBePulledUp.get(0);\n BindingSignature bindingSignature1 = difference.getBindingSignaturePair().getSignature1();\n boolean expression1IsFieldToBePulledUp = false;\n for (VariableDeclaration field : fields1) {\n if (bindingSignature1.containsOnlyBinding(field.resolveBinding().getKey())) {\n expression1IsFieldToBePulledUp = true;\n break;\n }\n }\n Set<VariableDeclaration> fields2 = fieldDeclarationsToBePulledUp.get(1);\n BindingSignature bindingSignature2 = difference.getBindingSignaturePair().getSignature2();\n boolean expression2IsFieldToBePulledUp = false;\n for (VariableDeclaration field : fields2) {\n if (bindingSignature2.containsOnlyBinding(field.resolveBinding().getKey())) {\n expression2IsFieldToBePulledUp = true;\n break;\n }\n }\n boolean expressionIsFieldToBePulledUp = expression1IsFieldToBePulledUp && expression2IsFieldToBePulledUp;\n if (!expressionIsFieldToBePulledUp) {\n Expression argument = createArgument(ast, difference);\n if (oldASTNode.equals(oldExpression)) {\n return argument;\n } else {\n replaceExpression(sourceRewriter, oldASTNode, newASTNode, oldExpression, argument);\n }\n }\n }\n }\n }\n return newASTNode;\n }\n}\n"
"private FeedbackQuestionSubmitPage loginToStudentFeedbackQuestionSubmitPage(String studentName, String fsName, String questionId) {\n StudentAttributes s = testData.students.get(studentName);\n Url submitPageUrl = new Url(Const.ActionURIs.STUDENT_FEEDBACK_QUESTION_SUBMISSION_EDIT_PAGE).withUserId(s.googleId).withCourseId(testData.feedbackSessions.get(fsName).courseId).withSessionName(testData.feedbackSessions.get(fsName).feedbackSessionName).withParam(Const.ParamsNames.FEEDBACK_QUESTION_ID, questionId);\n return loginAdminToPage(browser, submitPageUrl, FeedbackQuestionSubmitPage.class);\n}\n"
"public ItemStack slotClick(int slotNum, int mouseButton, int modifier, EntityPlayer player) {\n if (slotNum < 0 || slotNum >= inventorySlots.size())\n return super.slotClick(slotNum, mouseButton, modifier, player);\n Slot slot = (Slot) inventorySlots.get(slotNum);\n if (slot instanceof SlotPhantom)\n return clickPhantom(slot, mouseButton, player);\n return super.slotClick(slotNum, mouseButton, modifier, player);\n}\n"
"final boolean update(double timeStep, long currentTime) {\n if (!m_manager.isAny(SCANNING, STARTING_SCAN)) {\n m_timeNotScanning += timeStep;\n }\n boolean stopClassicBoost = false;\n if (m_manager.is(BOOST_SCANNING)) {\n m_timeClassicBoosting += timeStep;\n if (m_timeClassicBoosting >= m_classicLength) {\n stopClassicBoost = true;\n }\n }\n boolean startScan = false;\n if (Interval.isEnabled(m_manager.m_config.autoScanActiveTime) && m_manager.ready() && !m_classicBoost) {\n if (m_manager.isForegrounded()) {\n if (Interval.isEnabled(m_manager.m_config.autoScanDelayAfterBleTurnsOn) && m_triedToStartScanAfterTurnedOn && (currentTime - m_manager.timeTurnedOn()) >= m_manager.m_config.autoScanDelayAfterBleTurnsOn.millis()) {\n m_triedToStartScanAfterTurnedOn = true;\n if (!m_manager.is(SCANNING)) {\n startScan = true;\n }\n } else if (Interval.isEnabled(m_manager.m_config.autoScanDelayAfterResume) && !m_triedToStartScanAfterResume && m_manager.timeForegrounded() >= Interval.secs(m_manager.m_config.autoScanDelayAfterResume)) {\n m_triedToStartScanAfterResume = true;\n if (!m_manager.is(SCANNING)) {\n startScan = true;\n }\n }\n }\n if (!m_manager.is(SCANNING)) {\n double scanInterval = Interval.secs(m_manager.isForegrounded() ? m_manager.m_config.autoScanPauseInterval : m_manager.m_config.autoScanPauseTimeWhileAppIsBackgrounded);\n if (Interval.isEnabled(scanInterval) && m_timeNotScanning >= scanInterval) {\n startScan = true;\n }\n }\n }\n if (startScan) {\n if (m_manager.doAutoScan()) {\n m_manager.startScan_private(m_manager.m_config.autoScanActiveTime, null, null, true);\n }\n }\n final P_Task_Scan scanTask = m_manager.getTaskQueue().get(P_Task_Scan.class, m_manager);\n if (scanTask != null) {\n if (stopClassicBoost) {\n m_classicBoost = false;\n m_timeClassicBoosting = 0;\n stopClassicDiscovery();\n scanTask.onClassicBoostFinished();\n }\n if (scanTask.getState() == PE_TaskState.EXECUTING) {\n m_manager.tryPurgingStaleDevices(scanTask.getAggregatedTimeArmedAndExecuting());\n }\n }\n return startScan;\n}\n"
"private void buildAllDirectoriesAndSymlinks() {\n Set<Path> deletedDirectories = new HashSet<>();\n for (Path path : existingDirectories) {\n if (!absoluteDirectoriesToMake.contains(path)) {\n if (dryRun) {\n stderr(\"String_Node_Str\", path);\n } else {\n deleteAll(path);\n deletedDirectories.add(path);\n }\n }\n }\n existingSymlinks.forEach((filePath, linkPath) -> {\n if (linkPath.equals(symlinksToCreate.get(filePath))) {\n symlinksToCreate.remove(filePath);\n } else {\n if (dryRun) {\n stderr(\"String_Node_Str\", linkPath);\n } else {\n try {\n Files.delete(linkPath);\n } catch (IOException e) {\n if (!linkInDeletedDirectories(deletedDirectories, linkPath)) {\n stderr(\"String_Node_Str\", e.getMessage(), linkPath);\n }\n }\n }\n }\n });\n symlinksToCreate.forEach((filePath, linkPath) -> {\n if (dryRun) {\n stderr(\"String_Node_Str\", filePath, linkPath);\n } else {\n createSymbolicLink(filePath, linkPath);\n }\n });\n}\n"
"private void getURLValueExpressions(List<String> expList, URLValue uv) {\n String sa = uv.getBaseUrl();\n try {\n ActionHandle handle = actionHandleCache.get(sa);\n String exp;\n if (DesignChoiceConstants.ACTION_LINK_TYPE_HYPERLINK.equals(handle.getLinkType())) {\n ExpressionHandle expHandle = handle.getExpressionProperty(org.eclipse.birt.report.model.api.elements.structures.Action.URI_MEMBER);\n if (ExpressionType.JAVASCRIPT.equals(expHandle.getType())) {\n exp = expHandle.getStringExpression();\n if (!expList.contains(exp)) {\n expList.add(exp);\n }\n }\n } else if (DesignChoiceConstants.ACTION_LINK_TYPE_BOOKMARK_LINK.equals(handle.getLinkType())) {\n ExpressionHandle exprHandle = handle.getExpressionProperty(org.eclipse.birt.report.model.api.elements.structures.Action.TARGET_BOOKMARK_MEMBER);\n exprCodec.setExpression(exprHandle.getStringValue());\n exprCodec.setType(exprHandle.getType());\n exp = exprCodec.encode();\n if (!expList.contains(exp)) {\n expList.add(exp);\n }\n } else if (DesignChoiceConstants.ACTION_LINK_TYPE_DRILL_THROUGH.equals(handle.getLinkType())) {\n ExpressionHandle exprHandle = handle.getExpressionProperty(org.eclipse.birt.report.model.api.elements.structures.Action.TARGET_BOOKMARK_MEMBER);\n exprCodec.setExpression(exprHandle.getStringValue());\n exprCodec.setType(exprHandle.getType());\n exp = exprCodec.encode();\n if (exp != null && !expList.contains(exp)) {\n expList.add(exp);\n }\n for (Iterator itr = handle.getSearch().iterator(); itr.hasNext(); ) {\n SearchKeyHandle skh = (SearchKeyHandle) itr.next();\n exp = skh.getExpression();\n if (!expList.contains(exp)) {\n expList.add(exp);\n }\n }\n for (Iterator itr = handle.getParamBindings().iterator(); itr.hasNext(); ) {\n ParamBindingHandle pbh = (ParamBindingHandle) itr.next();\n exp = pbh.getExpression();\n if (!expList.contains(exp)) {\n expList.add(exp);\n }\n }\n }\n } catch (DesignFileException e) {\n logger.log(e);\n }\n}\n"
"public static Object getMock(String mockedTypeDesc, String mockedMethodNameAndDesc, Object mockInstance, String returnTypeDesc, String genericSignature) {\n char typeCode = returnTypeDesc.charAt(0);\n if (typeCode != 'L') {\n return null;\n }\n MockedTypeCascade cascade = CASCADING_TYPES.getCascade(mockedTypeDesc, mockInstance);\n if (cascade == null) {\n return null;\n }\n String resolvedReturnTypeDesc = null;\n if (genericSignature != null) {\n resolvedReturnTypeDesc = cascade.getGenericReturnType(mockedTypeDesc, genericSignature);\n }\n if (resolvedReturnTypeDesc == null) {\n resolvedReturnTypeDesc = getReturnTypeIfCascadingSupportedForIt(returnTypeDesc);\n if (resolvedReturnTypeDesc == null) {\n return null;\n }\n } else if (resolvedReturnTypeDesc.charAt(0) == '[') {\n return DefaultValues.computeForArrayType(resolvedReturnTypeDesc);\n }\n return cascade.getCascadedInstance(mockedMethodNameAndDesc, resolvedReturnTypeDesc, mockInstance);\n}\n"
"public static List<Packet> toPackets(SpongeParticleEffect effect, Vector3d position) {\n SpongeParticleType type = effect.getType();\n EnumParticleTypes internal = type.getInternalType();\n Vector3f offset = effect.getOffset();\n int count = effect.getCount();\n int[] extra = new int[0];\n float px = (float) position.getX();\n float py = (float) position.getY();\n float pz = (float) position.getZ();\n float ox = offset.getX();\n float oy = offset.getY();\n float oz = offset.getZ();\n float f0 = 0f;\n float f1 = 0f;\n float f2 = 0f;\n if (effect instanceof SpongeParticleEffect.Materialized) {\n ItemStack item = ((SpongeParticleEffect.Materialized) effect).getItem();\n ItemType itemType = item.getItem();\n int id = 0;\n int data = 0;\n if (internal == EnumParticleTypes.ITEM_CRACK) {\n id = Item.itemRegistry.getIDForObject(itemType);\n data = item.getDamage();\n } else if (internal == EnumParticleTypes.BLOCK_CRACK || internal == EnumParticleTypes.BLOCK_DUST) {\n if (itemType instanceof ItemBlock) {\n id = Block.blockRegistry.getIDForObject(((ItemBlock) itemType).getBlock());\n data = item.getDamage();\n }\n }\n if (id == 0) {\n return Collections.emptyList();\n }\n extra = new int[] { id, data };\n }\n if (effect instanceof SpongeParticleEffect.Resized) {\n float size = ((SpongeParticleEffect.Resized) effect).getSize();\n if (internal == EnumParticleTypes.EXPLOSION_LARGE) {\n size = (-size * 2f) + 2f;\n }\n if (size == 0f) {\n return Lists.<Packet>newArrayList(new S2APacketParticles(internal, true, px, py, pz, ox, oy, oz, 0f, count, extra));\n }\n f0 = size;\n } else if (effect instanceof SpongeParticleEffect.Colored) {\n Color color0 = ((SpongeParticleEffect.Colored) effect).getColor();\n Color color1 = ((SpongeParticleType.Colorable) type).getDefaultColor();\n if (color0.equals(color1)) {\n return Lists.<Packet>newArrayList(new S2APacketParticles(internal, true, px, py, pz, ox, oy, oz, 0f, count, extra));\n }\n f0 = color0.getRed() / 255f;\n f1 = color0.getGreen() / 255f;\n f2 = color0.getBlue() / 255f;\n if (f0 == 0f && internal == EnumParticleTypes.REDSTONE) {\n f0 = 0.00001f;\n }\n } else if (effect instanceof SpongeParticleEffect.Note) {\n float note = ((SpongeParticleEffect.Note) effect).getNote();\n if (note == 0f) {\n return Lists.<Packet>newArrayList(new S2APacketParticles(internal, true, px, py, pz, ox, oy, oz, 0f, count, extra));\n }\n f0 = note / 24f;\n } else if (type.hasMotion()) {\n Vector3f motion = effect.getMotion();\n float mx = motion.getX();\n float my = motion.getY();\n float mz = motion.getZ();\n if (internal == EnumParticleTypes.WATER_SPLASH) {\n my = 0f;\n }\n if (mx == 0f && my == 0f && mz == 0f) {\n return Lists.<Packet>newArrayList(new S2APacketParticles(internal, true, px, py, pz, ox, oy, oz, 0f, count, extra));\n } else {\n f0 = mx;\n f1 = my;\n f2 = mz;\n }\n }\n if (f0 == 0f && f1 == 0f && f2 == 0f) {\n return Lists.<Packet>newArrayList(new S2APacketParticles(internal, true, px, py, pz, ox, oy, oz, 0f, count, extra));\n }\n List<Packet> packets = Lists.newArrayList();\n if (ox == 0f && oy == 0f && oz == 0f) {\n for (int i = 0; i < count; i++) {\n packets.add(new S2APacketParticles(internal, true, px, py, pz, f0, f1, f2, 1f, 0, extra));\n }\n } else {\n Random random = new Random();\n for (int i = 0; i < count; i++) {\n float px0 = (px + (random.nextFloat() * 2f - 1f) * ox);\n float py0 = (py + (random.nextFloat() * 2f - 1f) * oy);\n float pz0 = (pz + (random.nextFloat() * 2f - 1f) * oz);\n packets.add(new S2APacketParticles(internal, true, px0, py0, pz0, f0, f1, f2, 1f, 0, extra));\n }\n }\n return packets;\n}\n"
"public void testStaticImports_GtoJ() {\n runConformTest(new String[] { \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" }, \"String_Node_Str\");\n}\n"
"public HashMap<NamedEntityInText, String> runDisambiguation(String preAnnotatedText) throws IOException {\n double threshholdTrigram = 1;\n int maxDepth = 2;\n Document document = new Document();\n ArrayList<NamedEntityInText> list = new ArrayList<NamedEntityInText>();\n log.info(\"String_Node_Str\" + preAnnotatedText);\n for (int c = 0; c < preAnnotatedText.length(); c++) {\n if (preAnnotatedText.length() > c + 8) {\n if (preAnnotatedText.substring(c, c + 8).equals(\"String_Node_Str\")) {\n c += 8;\n int beginIndex = c;\n int endIndex = preAnnotatedText.indexOf(\"String_Node_Str\", c);\n String label = preAnnotatedText.substring(beginIndex, endIndex);\n log.info(\"String_Node_Str\" + beginIndex + \"String_Node_Str\" + endIndex + \"String_Node_Str\" + label);\n list.add(new NamedEntityInText(beginIndex, endIndex - beginIndex, label));\n }\n }\n }\n NamedEntitiesInText nes = new NamedEntitiesInText(list);\n DocumentText text = new DocumentText(preAnnotatedText);\n document.addProperty(text);\n document.addProperty(nes);\n algo.run(document, threshholdTrigram, maxDepth);\n NamedEntitiesInText namedEntities = document.getProperty(NamedEntitiesInText.class);\n HashMap<NamedEntityInText, String> results = new HashMap<NamedEntityInText, String>();\n for (NamedEntityInText namedEntity : namedEntities) {\n String disambiguatedURL = algo.findResult(namedEntity);\n results.put(namedEntity, disambiguatedURL);\n }\n return results;\n}\n"
"public boolean equals(Object obj) {\n if (obj == null || obj instanceof DataSourceAndDataSet == false)\n return false;\n if (this == obj)\n return true;\n IBaseDataSourceDesign dataSourceDesign2 = ((DataSourceAndDataSet) obj).dataSourceDesign;\n IBaseDataSetDesign dataSetDesign2 = ((DataSourceAndDataSet) obj).dataSetDesign;\n Collection parameterBindings2 = ((DataSourceAndDataSet) obj).parameterBindings;\n int cacheCount2 = ((DataSourceAndDataSet) obj).cacheCount;\n if (this.dataSourceDesign == dataSourceDesign2) {\n if (this.dataSetDesign == dataSetDesign2) {\n if (this.parameterBindings == parameterBindings2)\n return true;\n } else if (this.dataSetDesign == null || dataSetDesign2 == null) {\n return false;\n } else if (this.dataSourceDesign == null || dataSourceDesign2 == null) {\n return false;\n } else {\n if ((this.dataSetDesign != dataSetDesign2) && (this.dataSetDesign == null || dataSetDesign2 == null))\n return false;\n }\n if (isEqualString(dataSourceDesign.getBeforeOpenScript(), dataSourceDesign2.getBeforeOpenScript()) == false || isEqualString(dataSourceDesign.getAfterOpenScript(), dataSourceDesign2.getAfterOpenScript()) == false || isEqualString(dataSourceDesign.getBeforeCloseScript(), dataSourceDesign2.getBeforeCloseScript()) == false || isEqualString(dataSourceDesign.getAfterCloseScript(), dataSourceDesign2.getAfterCloseScript()) == false)\n return false;\n if (dataSourceDesign instanceof IOdaDataSourceDesign && dataSourceDesign2 instanceof IOdaDataSourceDesign) {\n IOdaDataSourceDesign dataSource = (IOdaDataSourceDesign) dataSourceDesign;\n IOdaDataSourceDesign dataSource2 = (IOdaDataSourceDesign) dataSourceDesign2;\n if (isEqualString(dataSource.getExtensionID(), dataSource2.getExtensionID()) == false)\n return false;\n if (isEqualProps(dataSource.getPublicProperties(), dataSource2.getPublicProperties()) == false || isEqualProps(dataSource.getPrivateProperties(), dataSource2.getPrivateProperties()) == false)\n return false;\n } else if (dataSourceDesign instanceof IScriptDataSourceDesign && dataSourceDesign2 instanceof IScriptDataSourceDesign) {\n IScriptDataSourceDesign dataSource = (IScriptDataSourceDesign) dataSourceDesign;\n IScriptDataSourceDesign dataSource2 = (IScriptDataSourceDesign) dataSourceDesign2;\n if (isEqualString(dataSource.getOpenScript(), dataSource2.getOpenScript()) == false || isEqualString(dataSource.getCloseScript(), dataSource2.getCloseScript()) == false)\n return false;\n }\n if (isEqualString(dataSetDesign.getBeforeOpenScript(), dataSetDesign2.getBeforeOpenScript()) == false || isEqualString(dataSetDesign.getAfterOpenScript(), dataSetDesign2.getAfterOpenScript()) == false || isEqualString(dataSetDesign.getBeforeCloseScript(), dataSetDesign2.getBeforeCloseScript()) == false || isEqualString(dataSetDesign.getAfterCloseScript(), dataSetDesign2.getAfterCloseScript()) == false)\n return false;\n if (isEqualComputedColumns(dataSetDesign.getComputedColumns(), dataSetDesign2.getComputedColumns()) == false || isEqualFilters(dataSetDesign.getFilters(), dataSetDesign2.getFilters()) == false || isEqualParameterBindings(dataSetDesign.getInputParamBindings(), dataSetDesign2.getInputParamBindings()) == false || isEqualParameters(dataSetDesign.getParameters(), dataSetDesign2.getParameters()) == false || isEqualResultHints(dataSetDesign.getResultSetHints(), dataSetDesign2.getResultSetHints()) == false)\n return false;\n if (dataSetDesign instanceof IOdaDataSetDesign && dataSetDesign2 instanceof IOdaDataSetDesign) {\n IOdaDataSetDesign dataSet = (IOdaDataSetDesign) dataSetDesign;\n IOdaDataSetDesign dataSet2 = (IOdaDataSetDesign) dataSetDesign2;\n if (isEqualString(dataSet.getQueryText(), dataSet2.getQueryText()) == false || isEqualString(dataSet.getQueryScript(), dataSet2.getQueryScript()) == false || isEqualString(dataSet.getExtensionID(), dataSet2.getExtensionID()) == false || isEqualString(dataSet.getPrimaryResultSetName(), dataSet2.getPrimaryResultSetName()) == false || isEqualProps(dataSet.getPublicProperties(), dataSet2.getPublicProperties()) == false || isEqualProps(dataSet.getPrivateProperties(), dataSet2.getPrivateProperties()) == false)\n return false;\n } else if (dataSetDesign instanceof IScriptDataSetDesign && dataSetDesign2 instanceof IScriptDataSetDesign) {\n IScriptDataSetDesign dataSet = (IScriptDataSetDesign) dataSetDesign;\n IScriptDataSetDesign dataSet2 = (IScriptDataSetDesign) dataSetDesign2;\n if (isEqualString(dataSet.getOpenScript(), dataSet2.getOpenScript()) == false || isEqualString(dataSet.getFetchScript(), dataSet2.getFetchScript()) == false || isEqualString(dataSet.getCloseScript(), dataSet2.getCloseScript()) == false || isEqualString(dataSet.getDescribeScript(), dataSet2.getDescribeScript()) == false)\n return false;\n } else {\n return false;\n }\n if (this.isEqualParameterBindings(this.parameterBindings, parameterBindings2) == false)\n return false;\n if (this.cacheCount != cacheCount2)\n return false;\n return true;\n}\n"
"private void setTopic(String topic) {\n if (null != this.getActionBar()) {\n this.getActionBar().setSubtitle(topic);\n }\n}\n"
"private void renameFolderForLocal(final ERepositoryObjectType type, final IPath sourcePath, final String label) throws PersistenceException {\n IPath lastPath = sourcePath;\n if (sourcePath.lastSegment().equalsIgnoreCase(label)) {\n String tmpLabel = label.concat(this.getNextId());\n renameFolderExecute(type, sourcePath, tmpLabel);\n lastPath = sourcePath.removeLastSegments(1).append(tmpLabel);\n }\n renameFolder(type, lastPath, label);\n}\n"
"public void testChainingConditions() {\n ConditionGroup conditionQueryBuilder = ConditionGroup.clause();\n conditionQueryBuilder.addCondition(column(ConditionModel$Table.NAME).is(\"String_Node_Str\").separator(\"String_Node_Str\")).addCondition(column(ConditionModel$Table.NUMBER).is(6).separator(\"String_Node_Str\")).addCondition(column(ConditionModel$Table.FRACTION).is(4.5d));\n assertEquals(\"String_Node_Str\", conditionQueryBuilder.getQuery().trim());\n}\n"
"final public void add(double new_value) {\n if (values.size() > 1)\n slope.add(new_value - values.get(values.size() - 1));\n else\n slope.add(0.0);\n mean = (mean * values.size() + new_value);\n values.add(new_value);\n mean /= values.size();\n var0 += new_value * new_value / (double) (values.size());\n std0 = Math.sqrt(var0);\n double tmp = new_value - mean;\n var += tmp * tmp / (double) (values.size());\n std = Math.sqrt(var);\n sortedValues.add(new_value);\n Collections.sort(sortedValues);\n if (sortedValues.size() % 2 == 0) {\n int m = sortedValues.size() / 2;\n median = (sortedValues.get(m - 1) + sortedValues.get(m)) / 2.0;\n } else\n median = values.get(values.size() / 2);\n if (new_value < min)\n min = new_value;\n if (new_value > max)\n max = new_value;\n}\n"
"protected void onPrivateMessage(String sender, String login, String hostname, String message) {\n if (irc.ircCommand(hostname, sender, message.split(\"String_Node_Str\"))) {\n sendRawLine(\"String_Node_Str\" + sender + \"String_Node_Str\");\n } else {\n sendRawLine(\"String_Node_Str\" + sender + \"String_Node_Str\");\n }\n}\n"
"public void generate(MetaData data) {\n String type = getType(data.patternList);\n if (type.length() > 0) {\n type = \"String_Node_Str\" + type + \"String_Node_Str\" + type + \"String_Node_Str\";\n }\n p(\"String_Node_Str\" + data.name + type + \"String_Node_Str\");\n List<MetaData> props = data.properties;\n boolean hasAttribs = false;\n boolean hasElems = false;\n for (MetaData d : props) {\n hasAttribs = hasAttribs || d.nodeType == MetaData.XML_ATTRIBUTE;\n hasElems = hasElems || d.nodeType == MetaData.XML_ELEMENT;\n }\n if (hasAttribs) {\n p(\"String_Node_Str\");\n p(\"String_Node_Str\");\n p(\"String_Node_Str\");\n p(\"String_Node_Str\");\n for (MetaData d : props) {\n if (d.nodeType == MetaData.XML_ATTRIBUTE) {\n p(\"String_Node_Str\" + d.name + \"String_Node_Str\" + d.dataType + \"String_Node_Str\" + RNGMetadataAPI.cardinToString(d.min, d.max) + \"String_Node_Str\" + RNGMetadataAPI.listToString(d.choiceList) + \"String_Node_Str\");\n }\n ;\n }\n p(\"String_Node_Str\");\n p(\"String_Node_Str\");\n }\n if (hasElems) {\n p(\"String_Node_Str\");\n p(\"String_Node_Str\");\n p(\"String_Node_Str\");\n p(\"String_Node_Str\");\n for (MetaData d : props) {\n if (d.nodeType == MetaData.XML_ELEMENT) {\n if (!d.isChoiceGroup) {\n String typeStr = \"String_Node_Str\";\n if (d.patternList.size() > 0) {\n typeStr = \"String_Node_Str\" + getType(d.patternList) + \"String_Node_Str\" + getType(d.patternList) + \"String_Node_Str\";\n }\n p(\"String_Node_Str\" + d.name + \"String_Node_Str\" + typeStr + \"String_Node_Str\" + RNGMetadataAPI.cardinToString(d.min, d.max) + \"String_Node_Str\" + RNGMetadataAPI.listToString(d.choiceList) + \"String_Node_Str\");\n ;\n } else {\n p(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + RNGMetadataAPI.cardinToString(d.min, d.max) + \"String_Node_Str\" + (d.properties.size() > 0 ? RNGMetadataAPI.propertiesToString(d) : \"String_Node_Str\") + \"String_Node_Str\");\n ;\n }\n }\n }\n p(\"String_Node_Str\");\n p(\"String_Node_Str\");\n }\n if (data.hasTextNode) {\n p(\"String_Node_Str\");\n }\n p(\"String_Node_Str\" + data.documentation + \"String_Node_Str\");\n}\n"
"public void mouseOut(Pick pick) {\n triggerToolTipHide();\n}\n"
"public boolean archiveScoData() {\n boolean success = false;\n try {\n String itemId = scormManager.getSequence().findItemFromIndex(Integer.valueOf(olatScoId));\n ItemSequence item = scormManager.getSequence().getItem(itemId);\n if (item != null) {\n success = item.archiveScoData();\n }\n } catch (Exception e) {\n logError(\"String_Node_Str\", e);\n }\n return success;\n}\n"
"private RevisionLocation zipAndUpload(AWSClients aws, String projectName, FilePath sourceDirectory, Map<String, String> envVars) throws IOException, InterruptedException, IllegalArgumentException {\n File zipFile = File.createTempFile(projectName + \"String_Node_Str\", \"String_Node_Str\");\n String key;\n File appspec;\n File dest;\n try {\n if (this.deploymentGroupAppspec) {\n appspec = new File(sourceDirectory + \"String_Node_Str\" + deploymentGroupName + \"String_Node_Str\");\n if (appspec.exists()) {\n dest = new File(sourceDirectory + \"String_Node_Str\");\n FileUtils.copyFile(appspec, dest);\n logger.println(\"String_Node_Str\" + this.deploymentGroupName + \"String_Node_Str\");\n }\n if (!appspec.exists()) {\n throw new IllegalArgumentException(\"String_Node_Str\" + this.deploymentGroupName + \"String_Node_Str\");\n }\n }\n logger.println(\"String_Node_Str\" + zipFile.getAbsolutePath());\n sourceDirectory.zip(new FileOutputStream(zipFile), new DirScanner.Glob(this.includes, this.excludes));\n if (this.s3prefix.isEmpty()) {\n key = zipFile.getName();\n } else {\n key = Util.replaceMacro(this.s3prefix, envVars);\n if (this.s3prefix.endsWith(\"String_Node_Str\")) {\n key += zipFile.getName();\n } else {\n key += \"String_Node_Str\" + zipFile.getName();\n }\n }\n logger.println(\"String_Node_Str\" + this.s3bucket + \"String_Node_Str\" + key);\n PutObjectResult s3result = aws.s3.putObject(this.s3bucket, key, zipFile);\n S3Location s3Location = new S3Location();\n s3Location.setBucket(this.s3bucket);\n s3Location.setKey(key);\n s3Location.setBundleType(BundleType.Zip);\n s3Location.setETag(s3result.getETag());\n RevisionLocation revisionLocation = new RevisionLocation();\n revisionLocation.setRevisionType(RevisionLocationType.S3);\n revisionLocation.setS3Location(s3Location);\n return revisionLocation;\n } finally {\n zipFile.delete();\n }\n}\n"
"private void openReportDocument() throws EngineException {\n try {\n if (archiveWriter == null) {\n openArchive();\n }\n String[] exts = executionContext.getEngineExtensions();\n writer = new ReportDocumentWriter(engine, archiveWriter, exts);\n executionContext.setReportDocWriter(writer);\n DocumentDataSource ds = executionContext.getDataSource();\n if (ds != null) {\n if (ds.isReportletDocument()) {\n writer.saveReportletDocument(ds.getBookmark(), ds.getInstanceID());\n } else {\n writer.removeReportletDoucment();\n }\n }\n } catch (IOException ex) {\n throw new EngineException(MessageConstants.REPORT_ARCHIVE_OPEN_ERROR, ex);\n }\n}\n"
"void joinReset() {\n joinInProgress = false;\n setJoins.clear();\n timeToStartJoin = System.currentTimeMillis() + WAIT_SECONDS_BEFORE_JOIN + 1000;\n}\n"
"public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {\n final InstrumentClass target = instrumentor.getInstrumentClass(loader, className, classfileBuffer);\n target.addField(ThriftConstants.FIELD_ACCESSOR_SOCKET);\n target.addGetter(ThriftConstants.FIELD_GETTER_T_NON_BLOCKING_TRANSPORT, ThriftConstants.FRAME_BUFFER_FIELD_TRANS_);\n if (target.hasField(ThriftConstants.FRAME_BUFFER_FIELD_IN_TRANS_)) {\n target.addGetter(TTransportFieldGetter.class.getName(), ThriftConstants.FRAME_BUFFER_FIELD_IN_TRANS_);\n final InstrumentMethod constructor = target.getConstructor(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n if (constructor != null) {\n String interceptor = \"String_Node_Str\";\n constructor.addInterceptor(interceptor);\n }\n }\n if (target.hasMethod(\"String_Node_Str\", \"String_Node_Str\")) {\n final InstrumentMethod getInputTransport = target.getDeclaredMethod(\"String_Node_Str\", \"String_Node_Str\");\n if (getInputTransport != null) {\n String interceptor = \"String_Node_Str\";\n getInputTransport.addInterceptor(interceptor);\n }\n }\n return target.toBytecode();\n}\n"
"protected void drawCellBox(CellArea cell) {\n drawBorders(cell);\n drawCellDiagonal(cell);\n BoxStyle style = cell.getBoxStyle();\n Color backgroundcolor = style.getBackgroundColor();\n BackgroundImageInfo bgimginfo = style.getBackgroundImage();\n if (!rowStyleStack.isEmpty() && (backgroundcolor == null || bgimginfo == null)) {\n BoxStyle rowStyle = rowStyleStack.peek();\n if (rowStyle != null) {\n if (backgroundcolor == null) {\n backgroundcolor = rowStyle.getBackgroundColor();\n }\n if (bgimginfo == null) {\n bgimginfo = rowStyle.getBackgroundImage();\n }\n }\n }\n if (bgimginfo != null) {\n float offsetY = 0;\n float offsetX = 0;\n int repeatmode = bgimginfo.getRepeatedMode();\n if (repeatmode == BackgroundImageInfo.NO_REPEAT) {\n int imgheight = PPTXUtil.pixelToEmu((int) bgimginfo.getImageInstance().getHeight(), bgimginfo.getImageInstance().getDpiY());\n int imgwidth = PPTXUtil.pixelToEmu((int) bgimginfo.getImageInstance().getWidth(), bgimginfo.getImageInstance().getDpiX());\n int cellheight = PPTXUtil.convertToEnums(canvas.getScaledValue(cell.getHeight()));\n int cellwidth = PPTXUtil.convertToEnums(canvas.getScaledValue(cell.getWidth()));\n offsetY = PPTXUtil.parsePercentageOffset(cellheight, imgheight);\n offsetX = PPTXUtil.parsePercentageOffset(cellwidth, imgwidth);\n }\n canvas.setBackgroundImg(canvas.getImageRelationship(bgimginfo), (int) offsetX, (int) offsetY, repeatmode);\n } else if (backgroundcolor != null) {\n canvas.setBackgroundColor(backgroundcolor);\n }\n}\n"
"private static ZonedDateTime nextSchedule(String cronString, ZonedDateTime lastExecution) {\n CronParser cronParser = new CronParser(CronDefinitionBuilder.instanceDefinitionFor(CronType.UNIX));\n Cron cron = cronParser.parse(cronString);\n ExecutionTime executionTime = ExecutionTime.forCron(cron);\n return executionTime.nextExecution(lastExecution).isPresent() ? executionTime.nextExecution(lastExecution).get() : null;\n}\n"
"public ApplicationDefinition getAppDef(String appName) {\n Utils.require(!m_restClient.isClosed(), \"String_Node_Str\");\n Utils.require(appName != null && appName.length() > 0, \"String_Node_Str\");\n try {\n StringBuilder uri = new StringBuilder(\"String_Node_Str\");\n uri.append(Utils.urlEncode(appName));\n addTenantParam(uri);\n RESTResponse response = m_restClient.sendRequest(HttpMethod.GET, uri.toString());\n m_logger.debug(\"String_Node_Str\", response.toString());\n if (response.getCode() == HttpCode.NOT_FOUND) {\n return null;\n }\n throwIfErrorResponse(response);\n ApplicationDefinition appDef = new ApplicationDefinition();\n appDef.parse(UNode.parse(response.getBody(), response.getContentType()));\n return appDef;\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n}\n"
"public boolean hasPlates(ItemStack me) {\n if (getStackInSlot(me, 1) != null) {\n if (!me.hasTagCompound()) {\n me.setTagCompound(new NBTTagCompound());\n }\n ItemStack clone = getStackInSlot(me, 1).copy();\n clone.setCount(1);\n if (UtilPlates.getPlate(clone) != null) {\n me.getTagCompound().setString(\"String_Node_Str\", UtilPlates.getPlate(clone).getIdentifier());\n return true;\n } else {\n UtilPlates.removePlate(me);\n return false;\n }\n } else {\n if (!me.hasTagCompound()) {\n me.setTagCompound(new NBTTagCompound());\n }\n UtilPlates.removePlate(me);\n return false;\n }\n}\n"
"public void setProperty(String sKey, String sValue) {\n if (sValue == null) {\n m_propsconfig.remove(sKey);\n } else {\n m_propsconfig.setProperty(sKey, sValue);\n }\n}\n"
"private static void reclaim(final PatriciaReclaimSourceTraverser source, final PatriciaReclaimActualTraverser actual) {\n final NodeBase actualNode = actual.currentNode;\n final NodeBase sourceNode = source.currentNode;\n if (actualNode.getAddress() == sourceNode.getAddress()) {\n actual.currentNode = actualNode.getMutableCopy(actual.mainTree);\n actual.getItr();\n actual.wasReclaim = true;\n reclaimActualChildren(source, actual);\n } else {\n ByteIterator srcItr = sourceNode.keySequence.iterator();\n ByteIterator actItr = actualNode.keySequence.iterator();\n int srcPushes = 0;\n int actPushes = 0;\n while (true) {\n if (srcItr.hasNext()) {\n if (actItr.hasNext()) {\n if (srcItr.next() != actItr.next()) {\n break;\n }\n } else {\n final NodeChildrenIterator children = actual.currentNode.getChildren(srcItr.next());\n final ChildReference child = children.getNode();\n if (child == null) {\n break;\n }\n actual.currentChild = child;\n actual.currentIterator = children;\n actual.moveDown();\n ++actPushes;\n actItr = actual.currentNode.keySequence.iterator();\n }\n } else if (actItr.hasNext()) {\n final NodeChildrenIterator children = source.currentNode.getChildren(actItr.next());\n final ChildReference child = children.getNode();\n if (child == null || !source.isAddressReclaimable(child.suffixAddress)) {\n break;\n }\n source.currentChild = child;\n source.currentIterator = children;\n source.moveDown();\n ++srcPushes;\n srcItr = sourceNode.keySequence.iterator();\n } else {\n reclaimChildren(source, actual);\n break;\n }\n }\n for (int i = 0; i < srcPushes; ++i) {\n source.moveUp();\n }\n for (int i = 0; i < actPushes; ++i) {\n actual.popAndMutate();\n }\n }\n}\n"
"public void writeError(final String message, final Map<String, String> otherInfo, final PrintWriter writer) throws IOException {\n BufferedWriter out = new BufferedWriter(writer);\n out.write(\"String_Node_Str\" + VOSerializer.formatAttribute(\"String_Node_Str\", votVersion.getVersionNumber()) + VOSerializer.formatAttribute(\"String_Node_Str\", votVersion.getXmlNamespace()) + \"String_Node_Str\");\n out.newLine();\n out.write(\"String_Node_Str\");\n out.newLine();\n out.write(\"String_Node_Str\" + (message == null ? \"String_Node_Str\" : VOSerializer.formatText(message)) + \"String_Node_Str\");\n out.newLine();\n if (service.getProviderName() != null) {\n out.write(\"String_Node_Str\" + VOSerializer.formatAttribute(\"String_Node_Str\", service.getProviderName()) + \"String_Node_Str\" + ((service.getProviderDescription() == null) ? \"String_Node_Str\" : VOSerializer.formatText(service.getProviderDescription())) + \"String_Node_Str\");\n out.newLine();\n }\n if (otherInfo != null) {\n Iterator<Map.Entry<String, String>> it = otherInfo.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry<String, String> entry = it.next();\n out.write(\"String_Node_Str\" + VOSerializer.formatAttribute(\"String_Node_Str\", entry.getKey()) + \"String_Node_Str\" + VOSerializer.formatText(entry.getValue()) + \"String_Node_Str\");\n out.newLine();\n }\n }\n out.flush();\n out.write(\"String_Node_Str\");\n out.newLine();\n out.write(\"String_Node_Str\");\n out.newLine();\n out.flush();\n}\n"
"public void handleEvent(IContainerEvent event) {\n if (event instanceof IContainerDisconnectedEvent || event instanceof IContainerEjectedEvent) {\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n MultiRosterAccount.this.multiRosterView.rosterAccountDisconnected(MultiRosterAccount.this);\n }\n });\n }\n}\n"
"void setOnBatteryLocked(final long mSecRealtime, final long mSecUptime, final boolean onBattery, final int oldStatus, final int level) {\n boolean doWrite = false;\n Message m = mHandler.obtainMessage(MSG_REPORT_POWER_CHANGE);\n m.arg1 = onBattery ? 1 : 0;\n mHandler.sendMessage(m);\n mOnBattery = mOnBatteryInternal = onBattery;\n final long uptime = mSecUptime * 1000;\n final long realtime = mSecRealtime * 1000;\n final boolean screenOn = mScreenState == Display.STATE_ON;\n if (onBattery) {\n boolean reset = false;\n if (!mNoAutoReset && (oldStatus == BatteryManager.BATTERY_STATUS_FULL || level >= 90 || (mDischargeCurrentLevel < 20 && level >= 80) || (getHighDischargeAmountSinceCharge() >= 200 && mHistoryBuffer.dataSize() >= MAX_HISTORY_BUFFER))) {\n Slog.i(TAG, \"String_Node_Str\" + level + \"String_Node_Str\" + oldStatus + \"String_Node_Str\" + mDischargeCurrentLevel + \"String_Node_Str\" + getLowDischargeAmountSinceCharge() + \"String_Node_Str\" + getHighDischargeAmountSinceCharge());\n if (getLowDischargeAmountSinceCharge() >= 20) {\n final Parcel parcel = Parcel.obtain();\n writeSummaryToParcel(parcel, true);\n BackgroundThread.getHandler().post(new Runnable() {\n public void run() {\n synchronized (mCheckinFile) {\n FileOutputStream stream = null;\n try {\n stream = mCheckinFile.startWrite();\n stream.write(parcel.marshall());\n stream.flush();\n FileUtils.sync(stream);\n stream.close();\n mCheckinFile.finishWrite(stream);\n } catch (IOException e) {\n Slog.w(\"String_Node_Str\", \"String_Node_Str\", e);\n mCheckinFile.failWrite(stream);\n } finally {\n parcel.recycle();\n }\n }\n }\n });\n }\n doWrite = true;\n resetAllStatsLocked();\n mDischargeStartLevel = level;\n reset = true;\n mNumDischargeStepDurations = 0;\n }\n mLastDischargeStepLevel = level;\n mMinDischargeStepLevel = level;\n mLastDischargeStepTime = -1;\n mInitStepMode = mCurStepMode;\n mModStepMode = 0;\n pullPendingStateUpdatesLocked();\n mHistoryCur.batteryLevel = (byte) level;\n mHistoryCur.states &= ~HistoryItem.STATE_BATTERY_PLUGGED_FLAG;\n if (DEBUG_HISTORY)\n Slog.v(TAG, \"String_Node_Str\" + Integer.toHexString(mHistoryCur.states));\n if (reset) {\n mRecordingHistory = true;\n startRecordingHistory(mSecRealtime, mSecUptime, reset);\n }\n addHistoryRecordLocked(mSecRealtime, mSecUptime);\n mDischargeCurrentLevel = mDischargeUnplugLevel = level;\n if (screenOn) {\n mDischargeScreenOnUnplugLevel = level;\n mDischargeScreenOffUnplugLevel = 0;\n } else {\n mDischargeScreenOnUnplugLevel = 0;\n mDischargeScreenOffUnplugLevel = level;\n }\n mDischargeAmountScreenOn = 0;\n mDischargeAmountScreenOff = 0;\n updateTimeBasesLocked(true, !screenOn, uptime, realtime);\n } else {\n pullPendingStateUpdatesLocked();\n mHistoryCur.batteryLevel = (byte) level;\n mHistoryCur.states |= HistoryItem.STATE_BATTERY_PLUGGED_FLAG;\n if (DEBUG_HISTORY)\n Slog.v(TAG, \"String_Node_Str\" + Integer.toHexString(mHistoryCur.states));\n addHistoryRecordLocked(mSecRealtime, mSecUptime);\n mDischargeCurrentLevel = mDischargePlugLevel = level;\n if (level < mDischargeUnplugLevel) {\n mLowDischargeAmountSinceCharge += mDischargeUnplugLevel - level - 1;\n mHighDischargeAmountSinceCharge += mDischargeUnplugLevel - level;\n }\n updateDischargeScreenLevelsLocked(screenOn, screenOn);\n updateTimeBasesLocked(false, !screenOn, uptime, realtime);\n mNumChargeStepDurations = 0;\n mLastChargeStepLevel = level;\n mMaxChargeStepLevel = level;\n mLastChargeStepTime = -1;\n mInitStepMode = mCurStepMode;\n mModStepMode = 0;\n }\n if (doWrite || (mLastWriteTime + (60 * 1000)) < mSecRealtime) {\n if (mFile != null) {\n writeAsyncLocked();\n }\n }\n}\n"
"public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException {\n Request request = ObjectModelHelper.getRequest(objectModel);\n Integer aspectID = (Integer) request.getAttribute(ASPECT_ID);\n if (aspectID == null)\n aspectID = 0;\n aspectID++;\n request.setAttribute(ASPECT_ID, aspectID);\n String path = request.getSitemapURI();\n String aspectPath = PROTOCOL + \"String_Node_Str\" + PREFIX + aspectID + \"String_Node_Str\" + path;\n getLogger().debug(\"String_Node_Str\" + aspectPath);\n super.setup(resolver, objectModel, aspectPath, par);\n}\n"
"public boolean berserking() {\n if (target.HP == 0 && state == State.NORMAL) {\n WarriorShield shield = target.buff(WarriorShield.class);\n if (shield != null) {\n state = State.BERSERK;\n BuffIndicator.refreshHero();\n target.SHLD = shield.maxShield() * 5;\n SpellSprite.show(target, SpellSprite.BERSERK);\n Sample.INSTANCE.play(Assets.SND_CHALLENGE);\n GameScene.flash(0xFF0000);\n }\n }\n return state == State.BERSERK && target.SHLD > 0;\n}\n"
"public Class<?> getWSObjectClass() {\n return WSMenu.class;\n}\n"
"public List<ConstructorDefinition<T>> getConstructorDefinitions() {\n return Arrays.asList(constructorDefinition);\n}\n"
"protected Result onRunJob(Params params) {\n NextcloudTalkApplication.getSharedApplication().getComponentApplication().inject(this);\n PushConfigurationState pushConfigurationState;\n for (Object userEntityObject : userUtils.getUsersScheduledForDeletion()) {\n UserEntity userEntity = (UserEntity) userEntityObject;\n try {\n if (!TextUtils.isEmpty(userEntity.getPushConfigurationState())) {\n pushConfigurationState = LoganSquare.parse(userEntity.getPushConfigurationState(), PushConfigurationState.class);\n PushConfigurationState finalPushConfigurationState = pushConfigurationState;\n ncApi = retrofit.newBuilder().client(okHttpClient.newBuilder().cookieJar(new JavaNetCookieJar(new CookieManager())).build()).build().create(NcApi.class);\n ncApi.unregisterDeviceForNotificationsWithNextcloud(ApiUtils.getCredentials(userEntity.getUsername(), userEntity.getToken()), ApiUtils.getUrlNextcloudPush(userEntity.getBaseUrl())).subscribeOn(Schedulers.newThread()).subscribe(new Observer<GenericOverall>() {\n\n public void onSubscribe(Disposable d) {\n }\n public void onNext(GenericOverall genericOverall) {\n if (genericOverall.getOcs().getMeta().getStatusCode() == 200 || genericOverall.getOcs().getMeta().getStatusCode() == 202) {\n HashMap<String, String> queryMap = new HashMap<>();\n queryMap.put(\"String_Node_Str\", finalPushConfigurationState.deviceIdentifier);\n queryMap.put(\"String_Node_Str\", finalPushConfigurationState.getUserPublicKey());\n queryMap.put(\"String_Node_Str\", finalPushConfigurationState.getDeviceIdentifierSignature());\n ncApi.unregisterDeviceForNotificationsWithProxy(ApiUtils.getCredentials(userEntity.getUsername(), userEntity.getToken()), ApiUtils.getUrlPushProxy(), queryMap).subscribe(new Observer<Void>() {\n public void onSubscribe(Disposable d) {\n }\n public void onNext(Void aVoid) {\n userUtils.deleteUser(userEntity.getUsername(), userEntity.getBaseUrl()).subscribe(new CompletableObserver() {\n public void onSubscribe(Disposable d) {\n }\n public void onComplete() {\n }\n public void onError(Throwable e) {\n }\n });\n }\n public void onError(Throwable e) {\n }\n public void onComplete() {\n }\n });\n }\n }\n public void onError(Throwable e) {\n }\n public void onComplete() {\n }\n });\n } else {\n userUtils.deleteUser(userEntity.getUsername(), userEntity.getBaseUrl()).subscribe(new CompletableObserver() {\n public void onSubscribe(Disposable d) {\n }\n public void onComplete() {\n }\n public void onError(Throwable e) {\n }\n });\n }\n } catch (IOException e) {\n Log.d(TAG, \"String_Node_Str\");\n userUtils.deleteUser(userEntity.getUsername(), userEntity.getBaseUrl()).subscribe(new CompletableObserver() {\n public void onSubscribe(Disposable d) {\n }\n public void onComplete() {\n }\n public void onError(Throwable e) {\n }\n });\n }\n }\n return Result.SUCCESS;\n}\n"
"private static SortedSet<TreeEntry> createRandomTree(int numDirs, int maxFilesPerDir) {\n SortedSet<TreeEntry> tree = new TreeSet<TreeEntry>();\n String currentPath = \"String_Node_Str\";\n for (int i = 0; i < numDirs; i++) {\n if (\"String_Node_Str\".equals(currentPath) || rnd.nextBoolean())\n currentPath = createRandomString(1, 10);\n else\n currentPath = currentPath + \"String_Node_Str\" + createRandomString(1, 10);\n tree.add(new TreeEntry(currentPath, true));\n }\n List<TreeEntry> files = new LinkedList<TreeEntry>();\n for (TreeEntry entry : tree) for (int i = 0; i < rnd.nextDouble() * (maxFilesPerDir + 1); i++) files.add(new TreeEntry(entry.getName() + \"String_Node_Str\" + createRandomString(1, 10) + \"String_Node_Str\", false));\n tree.addAll(files);\n return tree;\n}\n"
"public void shippingInfo() throws Exception {\n withShippingMethodForGermany(client(), shippingMethod -> {\n withTransientTaxCategory(client(), taxCategory -> {\n final MonetaryAmount price = EURO_5;\n final MonetaryAmount freeAbove = EURO_30;\n final ShippingRate shippingRate = ShippingRate.of(price, freeAbove);\n final TaxRate taxRate = taxCategory.getTaxRates().get(0);\n final Reference<TaxCategory> taxCategoryRef = taxCategory.toReference();\n final Optional<Reference<ShippingMethod>> shippingMethodRef = Optional.of(shippingMethod.toReference());\n final ZonedDateTime createdAt = SphereTestUtils.now().minusSeconds(4);\n final ParcelMeasurements parcelMeasurements = ParcelMeasurements.of(2, 3, 1, 3);\n final DeliveryItem deliveryItem = DeliveryItem.of(new LineItemLike() {\n private final String id = randomKey();\n public String getId() {\n return id;\n }\n public Set<ItemState> getState() {\n throw new UnsupportedOperationException();\n }\n public long getQuantity() {\n return 2;\n }\n public Optional<DiscountedLineItemPrice> getDiscountedPrice() {\n return Optional.empty();\n }\n }, 5);\n final String deliveryId = randomKey();\n final TrackingData trackingData = TrackingData.of().withTrackingId(\"String_Node_Str\").withCarrier(\"String_Node_Str\").withProvider(\"String_Node_Str\").withProviderTransaction(\"String_Node_Str\").withIsReturn(true);\n final Parcel parcel = Parcel.of(randomKey(), createdAt, Optional.of(parcelMeasurements), Optional.of(trackingData));\n final List<Delivery> deliveries = asList(Delivery.of(deliveryId, createdAt, asList(deliveryItem), asList(parcel)));\n final OrderShippingInfo shippingInfo = OrderShippingInfo.of(randomString(), price, shippingRate, taxRate, taxCategoryRef, shippingMethodRef, deliveries);\n testOrderAspect(builder -> builder.shippingInfo(shippingInfo), order -> assertThat(order.getShippingInfo()).contains(shippingInfo));\n });\n });\n}\n"
"public Optional<Tuple<Vector3d, Vector3d>> intersects(Vector3d start, Vector3d direction) {\n final double txMin;\n final double txMax;\n final Vector3d xNormal;\n if (Math.copySign(1, direction.getX()) > 0) {\n txMin = (this.min.getX() - start.getX()) / direction.getX();\n txMax = (this.max.getX() - start.getX()) / direction.getX();\n xNormal = Vector3d.UNIT_X;\n } else {\n txMin = (this.max.getX() - start.getX()) / direction.getX();\n txMax = (this.min.getX() - start.getX()) / direction.getX();\n xNormal = Vector3d.UNIT_X.negate();\n }\n final double tyMin;\n final double tyMax;\n final Vector3d yNormal;\n if (direction.getY() >= 0) {\n tyMin = (this.min.getY() - start.getY()) / direction.getY();\n tyMax = (this.max.getY() - start.getY()) / direction.getY();\n yNormal = Vector3d.UNIT_Y;\n } else {\n tyMin = (this.max.getY() - start.getY()) / direction.getY();\n tyMax = (this.min.getY() - start.getY()) / direction.getY();\n yNormal = Vector3d.UNIT_Y.negate();\n }\n if (txMin > tyMax || txMax < tyMin) {\n return Optional.empty();\n }\n Vector3d normalMax;\n Vector3d normalMin;\n double tMin;\n if (tyMin == txMin) {\n tMin = tyMin;\n normalMin = xNormal.negate().sub(yNormal);\n } else if (tyMin > txMin) {\n tMin = tyMin;\n normalMin = yNormal.negate();\n } else {\n tMin = txMin;\n normalMin = xNormal.negate();\n }\n double tMax;\n if (tyMax == txMax) {\n tMax = tyMax;\n normalMax = xNormal.add(yNormal);\n } else if (tyMax < txMax) {\n tMax = tyMax;\n normalMax = yNormal;\n } else {\n tMax = txMax;\n normalMax = xNormal;\n }\n final double tzMin;\n final double tzMax;\n final Vector3d zNormal;\n if (direction.getZ() >= 0) {\n tzMin = (this.min.getZ() - start.getZ()) / direction.getZ();\n tzMax = (this.max.getZ() - start.getZ()) / direction.getZ();\n zNormal = Vector3d.UNIT_Z;\n } else {\n tzMin = (this.max.getZ() - start.getZ()) / direction.getZ();\n tzMax = (this.min.getZ() - start.getZ()) / direction.getZ();\n zNormal = Vector3d.UNIT_Z.negate();\n }\n if (tMin > tzMax || tMax < tzMin) {\n return Optional.empty();\n }\n if (tzMin == tMin) {\n normalMin = normalMin.sub(zNormal);\n } else if (tzMin > tMin) {\n tMin = tzMin;\n normalMin = zNormal.negate();\n }\n if (tzMax == tMax) {\n normalMax = normalMax.add(zNormal);\n } else if (tzMax < tMax) {\n tMax = tzMax;\n normalMax = zNormal;\n }\n if (tMax < 0) {\n return Optional.empty();\n }\n final double t;\n Vector3d normal;\n if (tMin < 0) {\n t = tMax;\n normal = normalMax;\n } else {\n t = tMin;\n normal = normalMin;\n }\n normal = normal.normalize();\n final double x;\n final double y;\n final double z;\n if (normal.getX() > 0) {\n x = max.getX();\n } else if (normal.getX() < 0) {\n x = min.getX();\n } else {\n x = direction.getX() * t + start.getX();\n }\n if (normal.getY() > 0) {\n y = max.getY();\n } else if (normal.getY() < 0) {\n y = min.getY();\n } else {\n y = direction.getY() * t + start.getY();\n }\n if (normal.getZ() > 0) {\n z = max.getZ();\n } else if (normal.getZ() < 0) {\n z = min.getZ();\n } else {\n z = direction.getZ() * t + start.getZ();\n }\n return Optional.of(new Tuple<>(new Vector3d(x, y, z), normal));\n}\n"
"private void disposeResources() {\n left = null;\n top = null;\n editor = null;\n if (diagramViewer != null) {\n diagramViewer.removePropertyChangeListener(propertyListener);\n getZoomManager().removeZoomListener(zoomListener);\n if (font != null)\n font.dispose();\n if (getReportDesignHandle() != null) {\n getReportDesignHandle().removeListener(designListener);\n }\n if (getMasterPageHandle() != null) {\n getMasterPageHandle().removeListener(designListener);\n }\n}\n"
"private CSVReader createCSVReader(String csvFileToIndex, char seperator) throws UnsupportedEncodingException, FileNotFoundException, IOException {\n CSVReader csvReader = new CSVReader(new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(csvFileToIndex.toString()), \"String_Node_Str\")), seperator);\n csvReader.setQuoteChar('\\\"');\n csvReader.readNext();\n return csvReader;\n}\n"
"public Prediction apply(DecisionTree tree) {\n return tree.predict(test);\n}\n"
"protected Worker makeNewWorker() {\n Worker w = new Worker(this, threadFactory);\n currentPoolSize++;\n w.start();\n return w;\n}\n"
"public void baseTest() throws IOException {\n assertSame(afs, ad.getFileSystem(\"String_Node_Str\"));\n assertNull(ad.getFileSystem(\"String_Node_Str\"));\n assertEquals(Collections.singletonList(\"String_Node_Str\"), ad.getRemotelyAccessibleFileSystemNames());\n assertNotNull(ad.getRemotelyAccessibleStorage(\"String_Node_Str\"));\n assertEquals(\"String_Node_Str\", afs.getName());\n assertEquals(1, ad.getProjectFileClasses().size());\n Folder root = afs.getRootFolder();\n assertNotNull(root);\n Folder dir1 = root.createFolder(\"String_Node_Str\");\n assertNotNull(dir1);\n dir1.createFolder(\"String_Node_Str\");\n dir1.createFolder(\"String_Node_Str\");\n dir1 = root.getFolder(\"String_Node_Str\").orElse(null);\n assertNotNull(dir1);\n assertTrue(dir1.isFolder());\n assertTrue(dir1.isWritable());\n assertEquals(\"String_Node_Str\", dir1.getName());\n assertNotNull(dir1.getCreationDate());\n assertNotNull(dir1.getModificationDate());\n assertEquals(0, dir1.getVersion());\n assertFalse(dir1.isAheadOfVersion());\n assertEquals(dir1.getName(), dir1.toString());\n assertEquals(\"String_Node_Str\", dir1.getParent().orElseThrow(AssertionError::new).getName());\n Folder dir2 = dir1.getFolder(\"String_Node_Str\").orElse(null);\n assertNotNull(dir2);\n assertNotNull(dir2.getParent());\n assertEquals(\"String_Node_Str\", dir2.getParent().orElseThrow(AssertionError::new).getPath().toString());\n assertEquals(2, dir1.getChildren().size());\n Folder dir3 = root.getFolder(\"String_Node_Str\").orElse(null);\n assertNull(dir3);\n String str = dir2.getPath().toString();\n assertEquals(\"String_Node_Str\", str);\n Folder mayBeDir2 = afs.getRootFolder().getFolder(\"String_Node_Str\").orElse(null);\n assertNotNull(mayBeDir2);\n assertEquals(\"String_Node_Str\", mayBeDir2.getName());\n Folder mayBeDir2otherWay = afs.getRootFolder().getChild(Folder.class, \"String_Node_Str\", \"String_Node_Str\").orElse(null);\n assertNotNull(mayBeDir2otherWay);\n assertEquals(\"String_Node_Str\", mayBeDir2otherWay.getName());\n Project project1 = dir2.createProject(\"String_Node_Str\");\n project1.setDescription(\"String_Node_Str\");\n assertNotNull(project1);\n assertEquals(\"String_Node_Str\", project1.getName());\n assertEquals(\"String_Node_Str\", project1.getDescription());\n assertNotNull(project1.getIcon());\n assertNotNull(project1.getParent());\n assertEquals(\"String_Node_Str\", project1.getParent().orElseThrow(AssertionError::new).getPath().toString());\n assertTrue(project1.getRootFolder().getChildren().isEmpty());\n assertTrue(project1.getFileSystem() == afs);\n List<String> added = new ArrayList<>();\n List<String> removed = new ArrayList<>();\n project1.getRootFolder().addListener(new ProjectFolderListener() {\n public void childAdded(String nodeId) {\n added.add(nodeId);\n }\n public void childRemoved(String nodeId) {\n removed.add(nodeId);\n }\n };\n project1.getRootFolder().addListener(l);\n ProjectFolder dir4 = project1.getRootFolder().createFolder(\"String_Node_Str\");\n assertTrue(dir4.isFolder());\n assertEquals(\"String_Node_Str\", dir4.getName());\n assertNotNull(dir4.getParent());\n assertTrue(dir4.getChildren().isEmpty());\n assertEquals(1, project1.getRootFolder().getChildren().size());\n dir4.delete();\n assertTrue(project1.getRootFolder().getChildren().isEmpty());\n try {\n dir4.getChildren();\n fail();\n } catch (Exception ignored) {\n }\n ProjectFolder dir5 = project1.getRootFolder().createFolder(\"String_Node_Str\");\n ProjectFolder dir6 = dir5.createFolder(\"String_Node_Str\");\n assertEquals(ImmutableList.of(\"String_Node_Str\", \"String_Node_Str\"), dir6.getPath().toList().subList(1, 3));\n assertEquals(\"String_Node_Str\", dir6.getPath().toString());\n assertEquals(\"String_Node_Str\", project1.getRootFolder().getChild(\"String_Node_Str\").orElseThrow(AssertionError::new).getName());\n assertEquals(Arrays.asList(dir4.getId(), dir5.getId()), added);\n assertEquals(Collections.singletonList(dir4.getId()), removed);\n}\n"
"public static boolean isRightAligned(IContent content, CSSValue align, boolean lastLine) {\n return align != null && isRightAligned(content, align.getCssText(), lastLine);\n}\n"
"private static void checkRelationshipList(int i, int node, int prev, int next, FileChannel fileChannel, ByteBuffer buffer) throws IOException {\n long fileSize = fileChannel.size();\n int recordSize = 33;\n if (next != NO_NEXT_BLOCK) {\n if ((long) (next + 1) * recordSize > fileSize || next < 0) {\n throw new IOException(\"String_Node_Str\" + next + \"String_Node_Str\" + i);\n }\n buffer.clear();\n fileChannel.position((long) next * recordSize);\n fileChannel.read(buffer);\n buffer.flip();\n byte inUse = buffer.get();\n if (inUse != RECORD_IN_USE + NOT_DIRECTED && inUse != RECORD_IN_USE + DIRECTED) {\n throw new IOException(\"String_Node_Str\" + next + \"String_Node_Str\" + i);\n }\n int firstNode = buffer.getInt();\n int secondNode = buffer.getInt();\n buffer.getInt();\n int firstPrev = buffer.getInt();\n buffer.getInt();\n int secondPrev = buffer.getInt();\n buffer.getInt();\n if (firstNode != node && secondNode != node) {\n throw new IOException(\"String_Node_Str\" + next + \"String_Node_Str\" + i);\n }\n if (firstNode == node && firstPrev != i) {\n throw new IOException(\"String_Node_Str\" + next + \"String_Node_Str\" + i);\n }\n if (secondNode == node && secondPrev != i) {\n throw new IOException(\"String_Node_Str\" + next + \"String_Node_Str\" + i);\n }\n }\n if (prev != NO_PREV_BLOCK) {\n if ((prev + 1) * recordSize > fileSize || prev < 0) {\n throw new IOException(\"String_Node_Str\" + prev + \"String_Node_Str\" + i);\n }\n buffer.clear();\n fileChannel.position((long) prev * recordSize);\n fileChannel.read(buffer);\n buffer.flip();\n byte inUse = buffer.get();\n if (inUse != RECORD_IN_USE + NOT_DIRECTED && inUse != RECORD_IN_USE + DIRECTED) {\n throw new IOException(\"String_Node_Str\" + prev + \"String_Node_Str\" + i);\n }\n int firstNode = buffer.getInt();\n int secondNode = buffer.getInt();\n buffer.getInt();\n buffer.getInt();\n int firstNext = buffer.getInt();\n buffer.getInt();\n int secondNext = buffer.getInt();\n if (firstNode != node && secondNode != node) {\n throw new IOException(\"String_Node_Str\" + next + \"String_Node_Str\" + i);\n }\n if (firstNode == node && firstNext != i) {\n throw new IOException(\"String_Node_Str\" + prev + \"String_Node_Str\" + i);\n }\n if (secondNode == node && secondNext != i) {\n throw new IOException(\"String_Node_Str\" + prev + \"String_Node_Str\" + i);\n }\n }\n}\n"
"protected String getModulePathKey() {\n return \"String_Node_Str\";\n}\n"
"public void delete(HttpRequest request, HttpResponder responder, String namespace) {\n if (!cConf.getBoolean(Constants.Dangerous.UNRECOVERABLE_RESET, Constants.Dangerous.DEFAULT_UNRECOVERABLE_RESET)) {\n responder.sendStatus(HttpResponseStatus.FORBIDDEN);\n return;\n }\n Id.Namespace namespaceId = Id.Namespace.from(namespace);\n try {\n namespaceAdmin.deleteNamespace(namespaceId);\n responder.sendStatus(HttpResponseStatus.OK);\n } catch (NotFoundException e) {\n responder.sendString(HttpResponseStatus.NOT_FOUND, String.format(\"String_Node_Str\", namespace));\n } catch (NamespaceCannotBeDeletedException e) {\n responder.sendString(HttpResponseStatus.CONFLICT, e.getMessage());\n } catch (Exception e) {\n LOG.error(\"String_Node_Str\", e);\n responder.sendString(HttpResponseStatus.INTERNAL_SERVER_ERROR, e.getMessage());\n }\n}\n"
"protected void drawStorageTable() {\n TableItem item;\n TableColumn column;\n int iTableColumnIndex = 0;\n int iTmpNumberOfDataItems = 0;\n int iNumberOfTableItems = refCurrentStorage.getMaximumLengthOfAllArrays();\n int iStartItemIndex = iCurrentTablePage * MAX_TABLE_ROWS;\n reinitializeTable();\n int iNumberOfTableItemsToLoad = iNumberOfTableItems;\n if (iNumberOfTableItems > MAX_TABLE_ROWS) {\n iNumberOfTableItemsToLoad = MAX_TABLE_ROWS;\n refNextPageButton.setEnabled(true);\n }\n for (int iTableRowIndex = 0; iTableRowIndex < iNumberOfTableItemsToLoad; iTableRowIndex++) {\n new TableItem(refTable, SWT.NONE);\n }\n if (refCurrentStorage.getSize(StorageType.INT) > 1) {\n int[] intData = refCurrentStorage.getArrayInt();\n column = new TableColumn(refTable, SWT.NONE);\n column.setText(\"String_Node_Str\");\n if (intData.length > iNumberOfTableItemsToLoad) {\n if (iCurrentTablePage >= (iNumberOfTableItems / (float) MAX_TABLE_ROWS - 1)) {\n iTmpNumberOfDataItems = iNumberOfTableItems % MAX_TABLE_ROWS;\n } else\n iTmpNumberOfDataItems = iNumberOfTableItemsToLoad;\n } else {\n iTmpNumberOfDataItems = intData.length;\n }\n for (int dataIndex = 0; dataIndex < iTmpNumberOfDataItems; dataIndex++) {\n item = refTable.getItem(dataIndex);\n item.setText(iTableColumnIndex, Float.toString(intData[iStartItemIndex + dataIndex]));\n }\n column.pack();\n iTableColumnIndex++;\n }\n if (refCurrentStorage.getSize(StorageType.FLOAT) != 0) {\n float[] floatData = refCurrentStorage.getArrayFloat();\n column = new TableColumn(refTable, SWT.NONE);\n column.setText(\"String_Node_Str\");\n if (floatData.length > iNumberOfTableItemsToLoad) {\n if (iCurrentTablePage >= (iNumberOfTableItems / (float) MAX_TABLE_ROWS - 1)) {\n iTmpNumberOfDataItems = iNumberOfTableItems % MAX_TABLE_ROWS;\n } else\n iTmpNumberOfDataItems = iNumberOfTableItemsToLoad;\n } else {\n iTmpNumberOfDataItems = floatData.length;\n }\n for (int dataIndex = 0; dataIndex < iTmpNumberOfDataItems; dataIndex++) {\n item = refTable.getItem(dataIndex);\n item.setText(iTableColumnIndex, Float.toString(floatData[iStartItemIndex + dataIndex]));\n }\n column.pack();\n iTableColumnIndex++;\n }\n if (refCurrentStorage.getSize(StorageType.STRING) != 0) {\n String[] stringData = refCurrentStorage.getArrayString();\n column = new TableColumn(refTable, SWT.NONE);\n column.setText(\"String_Node_Str\");\n if (stringData.length > iNumberOfTableItemsToLoad) {\n if (iCurrentTablePage >= (iNumberOfTableItems / (float) MAX_TABLE_ROWS - 1)) {\n iTmpNumberOfDataItems = iNumberOfTableItems % MAX_TABLE_ROWS;\n } else\n iTmpNumberOfDataItems = iNumberOfTableItemsToLoad;\n } else {\n iTmpNumberOfDataItems = stringData.length;\n }\n for (int dataIndex = 0; dataIndex < iTmpNumberOfDataItems; dataIndex++) {\n item = refTable.getItem(dataIndex);\n item.setText(iTableColumnIndex, stringData[iStartItemIndex + dataIndex]);\n }\n column.pack();\n iTableColumnIndex++;\n }\n if (refCurrentStorage.getSize(StorageType.BOOLEAN) != 0) {\n boolean[] booleanData = refCurrentStorage.getArrayBoolean();\n column = new TableColumn(refTable, SWT.NONE);\n column.setText(\"String_Node_Str\");\n if (booleanData.length > iNumberOfTableItemsToLoad) {\n if (iCurrentTablePage >= (iNumberOfTableItems / (float) MAX_TABLE_ROWS - 1)) {\n iTmpNumberOfDataItems = iNumberOfTableItems % MAX_TABLE_ROWS;\n } else\n iTmpNumberOfDataItems = iNumberOfTableItemsToLoad;\n } else {\n iTmpNumberOfDataItems = booleanData.length;\n }\n for (int dataIndex = 0; dataIndex < iTmpNumberOfDataItems; dataIndex++) {\n item = refTable.getItem(dataIndex);\n item.setText(iTableColumnIndex, Boolean.toString(booleanData[iStartItemIndex + dataIndex]));\n }\n column.pack();\n iTableColumnIndex++;\n }\n if (iCurrentTablePage >= (iNumberOfTableItems / (float) MAX_TABLE_ROWS - 1)) {\n refNextPageButton.setEnabled(false);\n }\n}\n"
"synchronized void write(long pos, byte[] b, int off, int len) throws IOException {\n throw new IOException(CoreMessages.getString(ResourceConstants.READ_ONLY_ARCHIVE));\n}\n"
"public void cacheManagerByInstanceNameTest() throws URISyntaxException {\n final String instanceName = randomName();\n Config config = new Config();\n config.setInstanceName(instanceName);\n Hazelcast.newHazelcastInstance(config);\n URI uri1 = new URI(\"String_Node_Str\");\n Properties properties = new Properties();\n properties.setProperty(HazelcastCachingProvider.HAZELCAST_INSTANCE_NAME, instanceName);\n CacheManager cacheManager = Caching.getCachingProvider().getCacheManager(uri1, null, properties);\n assertNotNull(cacheManager);\n assertEquals(1, Hazelcast.getAllHazelcastInstances().size());\n}\n"
"public String getAutoIncrementingColumnName() {\n throw new InvalidDBConfiguration(String.format(\"String_Node_Str\" + \"String_Node_Str\", getModelClass()));\n}\n"
"private void checkedOffer(List<String> transcript, Queue<List<String>> texts, Queue<TimeFrame> timeFrames, Queue<Range<Integer>> ranges, int start, int end, long timeStart, long timeEnd) {\n double wordDensity = ((double) (timeEnd - timeStart)) / (end - start);\n System.out.println(\"String_Node_Str\" + wordDensity + \"String_Node_Str\" + timeEnd + \"String_Node_Str\" + timeStart + \"String_Node_Str\" + end + \"String_Node_Str\" + start + \"String_Node_Str\" + transcript.subList(start, end).toString());\n if (wordDensity < 10.0) {\n logger.info(\"String_Node_Str\", transcript.subList(start, end));\n return;\n }\n texts.offer(transcript.subList(start, end));\n timeFrames.offer(new TimeFrame(timeStart, timeEnd));\n ranges.offer(Range.closed(start, end - 1));\n}\n"
"private void processNodes(Element ele, HashMap cssStyles) {\n for (Node node = ele.getFirstChild(); node != null; node = node.getNextSibling()) {\n short nodeType = node.getNodeType();\n if (nodeType == Node.TEXT_NODE) {\n if (isScriptText(node)) {\n writer.cdata(node.getNodeValue());\n } else {\n writer.text(node.getNodeValue(), false);\n }\n } else if (nodeType == Node.COMMENT_NODE) {\n writer.comment(node.getNodeValue());\n } else if (nodeType == Node.ELEMENT_NODE) {\n if (\"String_Node_Str\".equalsIgnoreCase(node.getNodeName())) {\n boolean bImplicitCloseTag = writer.isImplicitCloseTag();\n writer.setImplicitCloseTag(true);\n startNode(node, cssStyles);\n processNodes((Element) node, cssStyles);\n endNode(node);\n writer.setImplicitCloseTag(bImplicitCloseTag);\n } else {\n startNode(node, cssStyles);\n processNodes((Element) node, cssStyles);\n endNode(node);\n }\n }\n }\n}\n"
"public List<ConnBundleTO> getBundles() throws NotFoundException, MissingConfKeyException {\n ConnectorInfoManager manager = connInstanceLoader.getConnectorManager();\n List<ConnectorInfo> bundles = manager.getConnectorInfos();\n if (LOG.isDebugEnabled() && bundles != null) {\n LOG.debug(\"String_Node_Str\", bundles.size());\n for (ConnectorInfo bundle : bundles) {\n LOG.debug(\"String_Node_Str\", bundle.getConnectorDisplayName());\n }\n }\n ConnBundleTO connectorBundleTO;\n ConnectorKey key;\n ConfigurationProperties properties;\n List<ConnBundleTO> connectorBundleTOs = new ArrayList<ConnBundleTO>();\n if (bundles != null) {\n for (ConnectorInfo bundle : bundles) {\n connectorBundleTO = new ConnBundleTO();\n connectorBundleTO.setDisplayName(bundle.getConnectorDisplayName());\n key = bundle.getConnectorKey();\n LOG.debug(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", new Object[] { key.getBundleName(), key.getBundleVersion(), key.getConnectorName() });\n connectorBundleTO.setBundleName(key.getBundleName());\n connectorBundleTO.setConnectorName(key.getConnectorName());\n connectorBundleTO.setVersion(key.getBundleVersion());\n properties = bundle.createDefaultAPIConfiguration().getConfigurationProperties();\n ConnConfPropSchema connConfPropSchema;\n for (String propName : properties.getPropertyNames()) {\n connConfPropSchema = new ConnConfPropSchema();\n configurationProperty = properties.getProperty(propName);\n connConfPropSchema.setName(configurationProperty.getName());\n connConfPropSchema.setDisplayName(configurationProperty.getDisplayName(propName));\n connConfPropSchema.setHelpMessage(configurationProperty.getHelpMessage(propName));\n connConfPropSchema.setRequired(configurationProperty.isRequired());\n connConfPropSchema.setType(configurationProperty.getType().getName());\n connectorBundleTO.addProperty(connConfPropSchema);\n }\n LOG.debug(\"String_Node_Str\", connectorBundleTO.getProperties());\n connectorBundleTOs.add(connectorBundleTO);\n }\n }\n return connectorBundleTOs;\n}\n"
"public void putAll(Map<? extends K, ? extends V> map) {\n checkStatusStarted();\n long start = statisticsEnabled() ? System.nanoTime() : 0;\n long now = System.currentTimeMillis();\n if (map.containsKey(null)) {\n throw new NullPointerException(\"String_Node_Str\");\n }\n CacheException exception = null;\n RICacheEventEventDispatcher<K, V> dispatcher = new RICacheEventEventDispatcher<K, V>();\n try {\n boolean isWriteThrough = configuration.isWriteThrough() && cacheWriter != null;\n ArrayList<Cache.Entry<? extends K, ? extends V>> entriesToWrite = new ArrayList<Cache.Entry<? extends K, ? extends V>>();\n HashSet<K> keysToPut = new HashSet<K>();\n for (Map.Entry<? extends K, ? extends V> entry : map.entrySet()) {\n K key = entry.getKey();\n V value = entry.getValue();\n if (value == null) {\n throw new NullPointerException(\"String_Node_Str\" + key + \"String_Node_Str\");\n }\n lockManager.lock(key);\n keysToPut.add(key);\n if (isWriteThrough) {\n entriesToWrite.add(new RIEntry<K, V>(key, value));\n }\n }\n if (isWriteThrough) {\n try {\n cacheWriter.writeAll(entriesToWrite);\n } catch (CacheException e) {\n exception = e;\n }\n for (Entry entry : entriesToWrite) {\n keysToPut.remove(entry.getKey());\n }\n }\n for (K key : keysToPut) {\n V value = map.get(key);\n Object internalKey = keyConverter.toInternal(key);\n Object internalValue = valueConverter.toInternal(value);\n RICachedValue cachedValue = entries.get(internalKey);\n boolean isExpired = cachedValue != null && cachedValue.isExpiredAt(now);\n if (cachedValue == null || isExpired) {\n if (isExpired) {\n V expiredValue = valueConverter.fromInternal(cachedValue.get());\n dispatcher.addEvent(CacheEntryExpiredListener.class, new RICacheEntryEvent<K, V>(this, key, expiredValue));\n }\n Duration duration = expiryPolicy.getTTLForCreatedEntry(new RIEntry<K, V>(key, value));\n long expiryTime = duration.getAdjustedTime(now);\n cachedValue = new RICachedValue(internalValue, now, expiryTime);\n entries.put(internalKey, cachedValue);\n dispatcher.addEvent(CacheEntryCreatedListener.class, new RICacheEntryEvent<K, V>(this, key, value));\n } else if (replaceExistingValues) {\n Duration duration = expiryPolicy.getTTLForModifiedEntry(new RIEntry<K, V>(key, value), new Duration(now, cachedValue.getExpiryTime()));\n long expiryTime = duration.getAdjustedTime(now);\n cachedValue.setInternalValue(internalValue, now);\n cachedValue.setExpiryTime(expiryTime);\n V oldValue = valueConverter.fromInternal(cachedValue.get());\n dispatcher.addEvent(CacheEntryUpdatedListener.class, new RICacheEntryEvent<K, V>(this, key, value, oldValue));\n }\n }\n } finally {\n for (Map.Entry<? extends K, ? extends V> entry : map.entrySet()) {\n K key = entry.getKey();\n V value = entry.getValue();\n lockManager.unLock(key);\n }\n }\n dispatcher.dispatch(cacheEntryListenerRegistrations.values());\n if (statisticsEnabled()) {\n statistics.increaseCachePuts(map.size());\n statistics.addPutTimeNano(System.nanoTime() - start);\n }\n if (exception != null) {\n throw exception;\n }\n}\n"
"public boolean validateCustomVolumeSizeRange(long size) throws InvalidParameterValueException {\n if (size < 0 || (size > 0 && size < 2097152)) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n } else if (size > (_maxVolumeSizeInGb * 1000000000)) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n return true;\n}\n"
"public PartMessage parse(ChannelBuffer buffer) {\n DefaultPartMessage multipart = new DefaultPartMessage();\n for (; ; ) {\n switch(state) {\n case SKIP_CONTROL_CHARS:\n {\n skipControlCharacters(buffer);\n state = State.READ_BOUNDARY;\n break;\n }\n case READ_BOUNDARY:\n {\n state = readBoundary(buffer);\n break;\n }\n case READ_HEADERS:\n {\n readHeaders(buffer, multipart);\n break;\n }\n case READ_CHUNKD_CONTENT:\n {\n return multipart;\n }\n case READ_CONTENT:\n {\n int length = seekNextBoundary(buffer);\n ChannelBuffer newone = buffer.readBytes(length);\n if (this.readContinue != null) {\n ChannelBuffer cb = readContinue.getContent();\n newone = ChannelBuffers.copiedBuffer(cb.array(), newone.array());\n }\n multipart.setContent(newone);\n if (State.READ_CONTENT.equals(this.state)) {\n this.readContinue = multipart;\n } else {\n this.readContinue = null;\n }\n return multipart;\n }\n case EPILOGUE:\n {\n multipart.setLast(true);\n state = State.SKIP_CONTROL_CHARS;\n return multipart;\n }\n default:\n {\n throw new IllegalStateException(\"String_Node_Str\" + state);\n }\n }\n }\n}\n"
"private void fileupload() throws Exception {\n String ruta = this.rutaFile();\n if (uploads != null && !uploads.isEmpty()) {\n try {\n File destFile = new File(ruta, uploadFileNames.get(0));\n FileUtils.copyFile(uploads.get(0), destFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n this.cleanFile();\n}\n"
"public void run() {\n boolean synthAvailable = false;\n String utteranceId = \"String_Node_Str\";\n try {\n synthAvailable = synthesizerLock.tryLock();\n if (!synthAvailable) {\n Thread.sleep(100);\n Thread synth = (new Thread(new SynthThread()));\n synth.start();\n return;\n }\n int streamType = DEFAULT_STREAM_TYPE;\n String language = \"String_Node_Str\";\n String country = \"String_Node_Str\";\n String variant = \"String_Node_Str\";\n String speechRate = \"String_Node_Str\";\n if (speechItem.mParams != null) {\n for (int i = 0; i < speechItem.mParams.size() - 1; i = i + 2) {\n String param = speechItem.mParams.get(i);\n if (param != null) {\n if (param.equals(TextToSpeech.Engine.KEY_PARAM_RATE)) {\n speechRate = speechItem.mParams.get(i + 1);\n } else if (param.equals(TextToSpeech.Engine.KEY_PARAM_LANGUAGE)) {\n language = speechItem.mParams.get(i + 1);\n } else if (param.equals(TextToSpeech.Engine.KEY_PARAM_COUNTRY)) {\n country = speechItem.mParams.get(i + 1);\n } else if (param.equals(TextToSpeech.Engine.KEY_PARAM_VARIANT)) {\n variant = speechItem.mParams.get(i + 1);\n } else if (param.equals(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID)) {\n utteranceId = speechItem.mParams.get(i + 1);\n } else if (param.equals(TextToSpeech.Engine.KEY_PARAM_STREAM)) {\n try {\n streamType = Integer.parseInt(speechItem.mParams.get(i + 1));\n } catch (NumberFormatException e) {\n streamType = DEFAULT_STREAM_TYPE;\n }\n }\n }\n }\n }\n if (mKillList.get(speechItem) == null) {\n if (language.length() > 0) {\n setLanguage(\"String_Node_Str\", language, country, variant);\n }\n if (speechRate.length() > 0) {\n setSpeechRate(\"String_Node_Str\", Integer.parseInt(speechRate));\n }\n try {\n sNativeSynth.speak(speechItem.mText, streamType);\n } catch (NullPointerException e) {\n Log.v(\"String_Node_Str\", \"String_Node_Str\");\n }\n }\n } catch (InterruptedException e) {\n Log.e(\"String_Node_Str\", \"String_Node_Str\");\n e.printStackTrace();\n } finally {\n if (utteranceId.length() > 0) {\n dispatchUtteranceCompletedCallback(utteranceId, speechItem.mCallingApp);\n }\n if (synthAvailable) {\n synthesizerLock.unlock();\n }\n processSpeechQueue();\n }\n}\n"
"public boolean handles(ReadableArchive archive) throws IOException {\n boolean isEar = false;\n try {\n if (Util.getURIName(archive.getURI()).endsWith(EAR_EXTENSION)) {\n return true;\n }\n isEar = archive.exists(APPLICATION_XML) || archive.exists(SUN_APPLICATION_XML) || archive.exists(GF_APPLICATION_XML);\n if (!isEar) {\n isEar = isEARFromIntrospecting(archive);\n }\n } catch (IOException ioe) {\n }\n return isEar;\n}\n"
"public void disableSourceDestCheck(Stack stack) {\n AwsTemplate awsTemplate = (AwsTemplate) stack.getTemplate();\n AwsCredential awsCredential = (AwsCredential) stack.getCredential();\n AmazonCloudFormationClient amazonCfClient = awsStackUtil.createCloudFormationClient(awsTemplate.getRegion(), awsCredential);\n AmazonEC2Client amazonEC2Client = awsStackUtil.createEC2Client(awsTemplate.getRegion(), awsCredential);\n AmazonAutoScalingClient amazonAutoScalingClient = awsStackUtil.createAutoScalingClient(awsTemplate.getRegion(), awsCredential);\n DescribeStackResourceResult result = amazonCfClient.describeStackResource(new DescribeStackResourceRequest().withStackName(stack.getResourcesbyType(ResourceType.CLOUDFORMATION_STACK).get(0).getResourceName()).withLogicalResourceId(\"String_Node_Str\"));\n DescribeAutoScalingGroupsResult describeAutoScalingGroupsResult = amazonAutoScalingClient.describeAutoScalingGroups(new DescribeAutoScalingGroupsRequest().withAutoScalingGroupNames(result.getStackResourceDetail().getPhysicalResourceId()));\n describeAutoScalingGroupsResult.getAutoScalingGroups().get(0).getInstances();\n List<String> instanceIds = new ArrayList<>();\n for (Instance instance : describeAutoScalingGroupsResult.getAutoScalingGroups().get(0).getInstances()) {\n instanceIds.add(instance.getInstanceId());\n }\n DescribeInstancesRequest instancesRequest = new DescribeInstancesRequest().withInstanceIds(instanceIds);\n DescribeInstancesResult instancesResult = amazonEC2Client.describeInstances(instancesRequest);\n List<String> enis = new ArrayList<>();\n for (Reservation reservation : instancesResult.getReservations()) {\n for (com.amazonaws.services.ec2.model.Instance instance : reservation.getInstances()) {\n for (InstanceNetworkInterface instanceNetworkInterface : instance.getNetworkInterfaces()) {\n enis.add(instanceNetworkInterface.getNetworkInterfaceId());\n }\n }\n }\n for (String eni : enis) {\n ModifyNetworkInterfaceAttributeRequest modifyNetworkInterfaceAttributeRequest = new ModifyNetworkInterfaceAttributeRequest().withNetworkInterfaceId(eni).withSourceDestCheck(false);\n amazonEC2Client.modifyNetworkInterfaceAttribute(modifyNetworkInterfaceAttributeRequest);\n }\n LOGGER.info(\"String_Node_Str\", stack.getId(), instanceIds, enis);\n}\n"
"protected Collection<BankTransaction> getCreditTransactionsByDateRange(String accountId, Date startDate, Date endDate) {\n Query query = this.datastoreFacade.createQueryForClass(BankTransaction.class);\n query.setFilter(\"String_Node_Str\");\n return (List<BankTransaction>) query.execute(accountId, startDate.getTime(), endDate.getTime());\n}\n"
"public void execute(Writer writer, SnipMacroParameter params) throws IllegalArgumentException, IOException {\n if (params.getLength() < 2) {\n int count = 0;\n if (params.getLength() == 1) {\n count = Integer.parseInt(params.get(\"String_Node_Str\"));\n } else {\n count = 10;\n }\n String name = params.getSnip().getName();\n Blog blog = space.getBlog(name);\n List posts = blog.getPosts(count);\n int NAME_INDEX = 0;\n int DAY_INDEX = 1;\n int COUNT_INDEX = 2;\n String lastDay = \"String_Node_Str\";\n Iterator iterator = posts.iterator();\n while (iterator.hasNext()) {\n Object object = iterator.next();\n System.err.println(\"String_Node_Str\" + object.getClass());\n Snip entry = (Snip) object;\n String[] entryName = StringUtil.split(entry.getName(), \"String_Node_Str\");\n if (!lastDay.equals(entryName[DAY_INDEX])) {\n writer.write(\"String_Node_Str\");\n writer.write(SnipUtil.toDate(entryName[DAY_INDEX]));\n lastDay = entryName[DAY_INDEX];\n writer.write(\"String_Node_Str\");\n }\n writer.write(entry.getXMLContent());\n writer.write(\"String_Node_Str\");\n SnipLink.appendUrl(writer, entry.getName());\n writer.write(\"String_Node_Str\");\n writer.write(entry.getName());\n writer.write(\"String_Node_Str\");\n SnipLink.appendImage(writer, \"String_Node_Str\", \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(entry.getComments().getCommentString());\n writer.write(\"String_Node_Str\");\n writer.write(entry.getComments().getPostString());\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n BackLinks.appendTo(writer, entry.getAccess().getBackLinks(), 5);\n writer.write(\"String_Node_Str\");\n }\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n}\n"
"private static void openUrlInternal(Context context, String url) {\n if (WPUrlUtils.isWordPressCom(url)) {\n WPWebViewActivity.openUrlByUsingWPCOMCredentials(context, url);\n } else {\n WPWebViewActivity.openURL(context, url, ReaderConstants.HTTP_REFERER_URL);\n }\n}\n"
"public static ApplicationInfoBean getApplicationRuntime(String applicationId, int tenantId) throws RestAPIException {\n ApplicationInfoBean applicationBean = null;\n ApplicationContext applicationContext;\n String applicationUuid;\n try {\n applicationUuid = getAutoscalerServiceClient().getApplicationByTenant(applicationId, tenantId).getApplicationUuid();\n applicationContext = getAutoscalerServiceClient().getApplication(applicationUuid);\n } catch (RemoteException e) {\n String message = \"String_Node_Str\" + applicationId;\n log.error(message, e);\n throw new RestAPIException(message, e);\n } catch (RestAPIException e) {\n String message = \"String_Node_Str\" + applicationId;\n log.error(message, e);\n throw new RestAPIException(message, e);\n }\n try {\n ApplicationManager.acquireReadLockForApplication(applicationUuid);\n Application application = ApplicationManager.getApplications().getApplication(applicationUuid);\n if (application.getInstanceContextCount() > 0 || (applicationContext != null && applicationContext.getStatus().equals(\"String_Node_Str\"))) {\n if (application == null) {\n return null;\n }\n applicationBean = ObjectConverter.convertApplicationToApplicationInstanceBean(application);\n for (ApplicationInstanceBean instanceBean : applicationBean.getApplicationInstances()) {\n addClustersInstancesToApplicationInstanceBean(instanceBean, application);\n addGroupsInstancesToApplicationInstanceBean(instanceBean, application);\n }\n }\n } finally {\n ApplicationManager.releaseReadLockForApplication(applicationUuid);\n }\n return applicationBean;\n}\n"
"private void checkExisted(ItemRecord record) {\n Property property = record.getProperty();\n if (property != null) {\n IPath itemPath = PropertyHelper.getItemPath(property);\n IFile itemFile = ResourcesPlugin.getWorkspace().getRoot().getFile(itemPath);\n try {\n itemFile.getParent().refreshLocal(IResource.DEPTH_INFINITE, null);\n } catch (CoreException e) {\n }\n String aString = record.getName();\n if (itemFile.exists()) {\n ModelElementFileFactory.getResourceFileMap(itemFile).clear();\n URI itemURI = URI.createPlatformResourceURI(itemFile.getFullPath().toString(), false);\n EMFSharedResources.getInstance().unloadResource(itemURI.toString());\n URI propURI = itemURI.trimFileExtension().appendFileExtension(FactoriesUtil.PROPERTIES_EXTENSION);\n EMFSharedResources.getInstance().unloadResource(propURI.toString());\n record.addError(\"String_Node_Str\" + record.getName() + \"String_Node_Str\" + itemFile.getFullPath().toString());\n }\n }\n}\n"
"private Object generateId(Object e, EntityMetadata m, Client<?> client, final KunderaMetadata kunderaMetadata) {\n Metamodel metamodel = KunderaMetadataManager.getMetamodel(kunderaMetadata, m.getPersistenceUnit());\n IdDiscriptor keyValue = ((MetamodelImpl) metamodel).getKeyValue(e.getClass().getName());\n if (keyValue != null) {\n if (!client.getQueryImplementor().getSimpleName().equalsIgnoreCase(\"String_Node_Str\")) {\n if (client != null) {\n GenerationType type = keyValue.getStrategy();\n switch(type) {\n case TABLE:\n return onTableGenerator(m, client, keyValue, e);\n case SEQUENCE:\n return onSequenceGenerator(m, client, keyValue, e);\n case AUTO:\n return onAutoGenerator(m, client, e);\n case IDENTITY:\n throw new UnsupportedOperationException(GenerationType.class.getSimpleName() + \"String_Node_Str\" + type + \"String_Node_Str\" + client.getClass().getName());\n }\n }\n } else {\n int hashCode = e.hashCode();\n Object generatedId = PropertyAccessorHelper.fromSourceToTargetClass(m.getIdAttribute().getJavaType(), Integer.class, new Integer(hashCode));\n PropertyAccessorHelper.setId(e, m, generatedId);\n return generatedId;\n }\n }\n return null;\n}\n"
"private static Object[] testCase_missingAttribute() {\n List<ChangeItem> changes = new LinkedList<>();\n final int ci1AttrId = 1;\n final int artId = 3;\n final long missingGamma = 9L;\n long artGamma = 7L;\n HashMap<Long, ApplicabilityToken> applicMap = new HashMap<>();\n applicMap.put(1L, ApplicabilityToken.BASE);\n ChangeItem ci1 = ChangeItemUtil.newAttributeChange(AttributeId.valueOf(ci1AttrId), AttributeTypeId.valueOf(2L), ArtifactId.valueOf(artId), GammaId.valueOf(4L), ModificationType.MODIFIED, Strings.EMPTY_STRING, ApplicabilityToken.BASE);\n changes.add(ci1);\n List<AttributeData> attrDatas = new LinkedList<>();\n AttributeData attrData1 = createAttributeData(artId, ci1AttrId, 1L, ModificationType.MODIFIED);\n AttributeData attrData2 = createAttributeData(artId, ci1AttrId + 1, missingGamma, ModificationType.INTRODUCED);\n attrDatas.add(attrData1);\n attrDatas.add(attrData2);\n List<ArtifactData> artData = new LinkedList<>();\n ArtifactData artData1 = createArtifactData(artId, artGamma, ModificationType.NEW);\n artData.add(artData1);\n List<ChangeItem> expected = new LinkedList<>();\n expected.add(createExpected(attrData2));\n expected.add(createExpected(artData1));\n return new Object[] { changes, expected, attrDatas, artData, null, null, applicMap };\n}\n"
"public int getZ() {\n return pos.getZ();\n}\n"
"private void delete() {\n Intent intent = new Intent(this, DarkService.class);\n intent.setAction(DarkService.ACTION_DELETE);\n intent.putExtra(DarkService.EXTRA_VOLUME_PATH, getFilesDir() + \"String_Node_Str\");\n startService(intent);\n}\n"
"public static org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingComponent convertConformanceMessagingComponent(org.hl7.fhir.dstu3.model.Conformance.ConformanceMessagingComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingComponent tgt = new org.hl7.fhir.dstu2016may.model.Conformance.ConformanceMessagingComponent();\n copyElement(src, tgt);\n for (org.hl7.fhir.dstu3.model.Conformance.ConformanceMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t));\n tgt.setReliableCache(src.getReliableCache());\n tgt.setDocumentation(src.getDocumentation());\n for (org.hl7.fhir.dstu3.model.Conformance.ConformanceMessagingEventComponent t : src.getEvent()) tgt.addEvent(convertConformanceMessagingEventComponent(t));\n return tgt;\n}\n"
"public void await() {\n int recCount = this.recCount;\n this.recCount = 0;\n holderSlot = -1;\n sysCall.sysPthreadCondWait(cond, mutex);\n this.recCount = recCount;\n holder = RVMThread.getCurrentThread();\n}\n"
"protected boolean refreshNewJob() {\n if (alreadyEditedByUser) {\n return false;\n }\n StructuredSelection selection = (StructuredSelection) mainPage.getSelection();\n if (selection != null && selection.isEmpty()) {\n RepositoryNode node = (RepositoryNode) selection.getFirstElement();\n boolean lastVersion = node.getObject().getVersion().equals(originalVersion);\n if (!lastVersion) {\n originalVersion = node.getObject().getVersion();\n String newVersion = processObject.getVersion();\n processObject = node.getObject();\n processObject.getProperty().setVersion(newVersion);\n }\n }\n IProxyRepositoryFactory repositoryFactory = CorePlugin.getDefault().getRepositoryService().getProxyRepositoryFactory();\n try {\n repositoryFactory.save(getProperty(), this.originaleObjectLabel, this.originalVersion);\n ExpressionPersistance.getInstance().jobNameChanged(originaleObjectLabel, processObject.getLabel());\n ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());\n return true;\n } catch (PersistenceException e) {\n MessageBoxExceptionHandler.process(e);\n return false;\n }\n}\n"
"private static String formatArgument(String argument) {\n String argumentWithoutWhiteSpaces = argument.trim();\n return argumentWithoutWhiteSpaces;\n}\n"
"private void includeSupportedFeatures(FgExamples data, FeatureTemplateList templates) {\n for (int i = 0; i < data.size(); i++) {\n FgExample ex = data.get(i);\n for (int a = 0; a < ex.getOriginalFactorGraph().getNumFactors(); a++) {\n Factor f = ex.getFgLat().getFactor(a);\n if (f instanceof GlobalFactor) {\n continue;\n } else if (f instanceof ExpFamFactor) {\n int t = templates.getTemplateId(f);\n if (t != -1) {\n FeatureVector fv = ex.getObservationFeatures(a);\n if (f.getVars().size() == 0) {\n int predConfig = ex.getGoldConfigIdxPred(a);\n for (IntDoubleEntry entry : fv) {\n included[t][config][entry.index()] = true;\n }\n }\n }\n }\n }\n }\n}\n"
"public List<String> getWailaBody(Entity entity, List<String> tip, IWailaEntityAccessor data, IWailaConfigHandler cfg) {\n if (entity instanceof EntityLiving && cfg.getConfig(showEquippedItems)) {\n EntityLiving living = (EntityLiving) entity;\n for (int i = 0; i < 5; i++) {\n ItemStack stack = living.getEquipmentInSlot(i);\n if (stack != null && data.getPlayer().isSneaking())\n tip.add(StatCollector.translateToLocal(\"String_Node_Str\" + itemTypes[i]) + \"String_Node_Str\" + stack.getDisplayName());\n }\n if (cfg.getConfig(showEntityArmor) && living.getTotalArmorValue() > 0)\n tip.add(StatCollector.translateToLocal(\"String_Node_Str\") + \"String_Node_Str\" + living.getTotalArmorValue());\n }\n if (cfg.getConfig(showPetOwner)) {\n NBTTagCompound tag = Utilities.convertEntityToNbt(entity);\n NBTTagCompound extTag = entity.getEntityData();\n for (String currentKey : petTags) {\n if (tag.hasKey(currentKey) && !tag.getString(currentKey).isEmpty())\n tip.add(StatCollector.translateToLocal(\"String_Node_Str\") + \"String_Node_Str\" + tag.getString(currentKey));\n if (extTag.hasKey(currentKey) && !extTag.getString(currentKey).isEmpty())\n tip.add(StatCollector.translateToLocal(\"String_Node_Str\") + \"String_Node_Str\" + extTag.getString(currentKey));\n }\n }\n if (entity instanceof EntityAnimal) {\n EntityAnimal animal = (EntityAnimal) entity;\n if (cfg.getConfig(showAge) && animal.isChild() && animal.getGrowingAge() != 0)\n tip.add(StatCollector.translateToLocal(\"String_Node_Str\") + \"String_Node_Str\" + ((animal.getGrowingAge() / 20) * -1) + \"String_Node_Str\" + StatCollector.translateToLocal(\"String_Node_Str\"));\n else if (cfg.getConfig(showBirthCooldown) && animal.getGrowingAge() != 0)\n tip.add(StatCollector.translateToLocal(\"String_Node_Str\") + \"String_Node_Str\" + ((animal.getGrowingAge() / 20)) + \"String_Node_Str\" + StatCollector.translateToLocal(\"String_Node_Str\"));\n }\n if (entity instanceof EntityTameable && cfg.getConfig(showPetSitting)) {\n EntityTameable pet = (EntityTameable) entity;\n if (pet.isTamed())\n tip.add(StatCollector.translateToLocal(\"String_Node_Str\") + \"String_Node_Str\" + pet.isSitting());\n }\n return tip;\n}\n"
"public void connect() throws IOException {\n if (token != null && username == null) {\n try {\n doGet(\"String_Node_Str\", true);\n } catch (IOException excep) {\n LOGGER.severe(\"String_Node_Str\" + endpointUrl);\n throw excep;\n }\n return;\n }\n HttpPost post = new HttpPost(MessageFormat.format(\"String_Node_Str\", endpointUrl));\n JSONObject json = new JSONObject();\n json.put(\"String_Node_Str\", getUsername());\n json.put(\"String_Node_Str\", getPassword());\n post.setEntity(new StringEntity(json.toString(), ContentType.APPLICATION_JSON));\n HttpResponse response = httpClient.execute(post);\n int status = response.getStatusLine().getStatusCode();\n if (status != HttpStatus.SC_OK) {\n throw new ClientException(MessageFormat.format(\"String_Node_Str\", status, this.endpointUrl, getErrorMessage(getResponseBodyAsString(response))), status);\n }\n token = getResponseBodyAsString(response);\n}\n"
"public void dontHangOnHugeAutNumObject() throws Exception {\n String response = DummyWhoisClient.query(NrtmServer.getPort(), String.format(\"String_Node_Str\", MIN_RANGE, MAX_RANGE), 5 * 1000);\n assertTrue(response, response.contains(String.format(\"String_Node_Str\", MIN_RANGE)));\n assertTrue(response, response.contains(String.format(\"String_Node_Str\", MIN_RANGE + 1)));\n}\n"
"public DecoratorAttributes createDecoratorAttributes(NamedObj target) {\n if (target instanceof Actor && !(target instanceof ResourceScheduler)) {\n try {\n return new ResourceAttributes(target, this);\n } catch (KernelException ex) {\n throw new InternalErrorException(ex);\n }\n } else {\n return null;\n }\n}\n"
"public void handleRequest(HttpServerExchange exchange, RequestContext context) throws Exception {\n DBObject content = context.getContent();\n if (content == null) {\n content = new BasicDBObject();\n }\n if (content instanceof BasicDBList) {\n ResponseHelper.endExchangeWithMessage(exchange, HttpStatus.SC_NOT_ACCEPTABLE, \"String_Node_Str\");\n return;\n }\n ObjectId etag = RequestHelper.getWriteEtag(exchange);\n if (content.get(\"String_Node_Str\") != null && content.get(\"String_Node_Str\") instanceof String && RequestContext.isReservedResourceDocument((String) content.get(\"String_Node_Str\"))) {\n ResponseHelper.endExchangeWithMessage(exchange, HttpStatus.SC_FORBIDDEN, \"String_Node_Str\");\n return;\n }\n Object docId;\n if (content.get(\"String_Node_Str\") == null) {\n if (context.getDocIdType() == DOC_ID_TYPE.OBJECTID || context.getDocIdType() == DOC_ID_TYPE.STRING_OBJECTID) {\n docId = new ObjectId();\n } else {\n ResponseHelper.endExchangeWithMessage(exchange, HttpStatus.SC_NOT_ACCEPTABLE, \"String_Node_Str\" + context.getDocIdType().name());\n return;\n }\n } else {\n try {\n docId = URLUtils.getId(content.get(\"String_Node_Str\"), context.getDocIdType());\n } catch (IllegalDocumentIdException idide) {\n ResponseHelper.endExchangeWithMessage(exchange, HttpStatus.SC_NOT_ACCEPTABLE, \"String_Node_Str\" + context.getDocIdType().name());\n return;\n }\n }\n int httpCode = this.documentDAO.upsertDocumentPost(exchange, context.getDBName(), context.getCollectionName(), docId, content, etag);\n if (context.getWarnings() != null && !context.getWarnings().isEmpty()) {\n sendWarnings(httpCode, exchange, context);\n } else {\n exchange.setResponseCode(httpCode);\n }\n exchange.endExchange();\n}\n"
"protected void evalSchemaIndicLow(final ConnectionIndicator connectionIndicator, final CatalogIndicator catalogIndic, final SchemaIndicator schemaIndic, final TdCatalog tdCatalog, final TdSchema tdSchema, ReturnCode ok) throws SQLException {\n boolean hasSchema = tdSchema != null;\n boolean hasCatalog = tdCatalog != null;\n String catName = hasCatalog ? tdCatalog.getName() : null;\n String schemaName = hasSchema ? tdSchema.getName() : null;\n schemaIndic.setAnalyzedElement(hasSchema ? tdSchema : tdCatalog);\n TableBuilder tableBuilder = new TableBuilder(connection);\n int tableCount = 0;\n final String[] tablePatterns = tablePattern != null && tablePattern.contains(String.valueOf(FILTER_SEP)) ? StringUtils.split(this.tablePattern, FILTER_SEP) : new String[] { this.tablePattern };\n for (String pat : tablePatterns) {\n String trimPat = pat != null ? pat.trim() : pat;\n List<? extends NamedColumnSet> tables = tableBuilder.getColumnSets(catName, schemaName, trimPat);\n for (NamedColumnSet t : tables) {\n tableCount++;\n evalAllCounts(catName, schemaName, t, schemaIndic, true, ok);\n }\n }\n schemaIndic.setTableCount(tableCount);\n ViewBuilder viewBuilder = new ViewBuilder(connection);\n int viewCount = 0;\n List<? extends NamedColumnSet> views = viewBuilder.getColumnSets(catName, schemaName, viewPattern);\n for (NamedColumnSet t : views) {\n viewCount++;\n evalAllCounts(catName, schemaName, t, schemaIndic, false, ok);\n }\n schemaIndic.setViewCount(viewCount);\n if (hasCatalog && hasSchema) {\n this.addToConnectionIndicator(connectionIndicator, catalogIndic);\n catalogIndic.addSchemaIndicator(schemaIndic);\n catalogIndic.setTableCount(catalogIndic.getTableCount() + tableCount);\n catalogIndic.setTableRowCount(catalogIndic.getTableRowCount() + schemaIndic.getTableRowCount());\n catalogIndic.setViewRowCount(catalogIndic.getViewRowCount() + schemaIndic.getViewRowCount());\n } else if (!hasCatalog) {\n this.addToConnectionIndicator(connectionIndicator, schemaIndic);\n } else if (!hasSchema) {\n if (SchemaPackage.eINSTANCE.getCatalogIndicator().equals(schemaIndic.eClass())) {\n this.addToConnectionIndicator(connectionIndicator, schemaIndic);\n } else {\n log.error(\"String_Node_Str\");\n }\n }\n}\n"
"private void buildDubboServiceComponents(MonitorDataFrame mdf, Map<String, Object> pi, String appid, Map<String, Set<String>> compServices) {\n Map<String, Object> comps = mdf.getElemInstValues(appid, \"String_Node_Str\", \"String_Node_Str\");\n if (comps == null || comps.size() == 0) {\n return;\n }\n pi.put(\"String_Node_Str\", JSONHelper.toString(comps));\n for (String compName : comps.keySet()) {\n Map<String, Object> info = (Map<String, Object>) comps.get(compName);\n Set<String> compServicesURLs = compServices.get(compName);\n if (compServicesURLs == null) {\n compServicesURLs = new HashSet<String>();\n compServices.put(compName, compServicesURLs);\n }\n String group = (String) info.get(\"String_Node_Str\");\n String version = (String) info.get(\"String_Node_Str\");\n String servcls = (String) info.get(\"String_Node_Str\");\n Map<String, Object> compMethodInfo = (Map<String, Object>) info.get(\"String_Node_Str\");\n if (compMethodInfo == null || compMethodInfo.size() == 0) {\n continue;\n }\n Map<String, Object> protocols = (Map<String, Object>) info.get(\"String_Node_Str\");\n if (protocols == null || protocols.size() == 0) {\n continue;\n }\n for (String method : compMethodInfo.keySet()) {\n for (String protocol : protocols.keySet()) {\n Map<String, Object> pAttrs = (Map<String, Object>) protocols.get(protocol);\n Integer port = (Integer) pAttrs.get(\"String_Node_Str\");\n String path = (String) pAttrs.get(\"String_Node_Str\");\n path = (StringHelper.isEmpty(path)) ? servcls : path;\n String url = getDubboURL(ip, group, version, method, port, protocol, path);\n compServicesURLs.add(url);\n }\n }\n }\n}\n"
"protected ReturnCode canSave() {\n ReturnCode checkMdmExecutionEngine = checkMdmExecutionEngine();\n if (!checkMdmExecutionEngine.isOk()) {\n return checkMdmExecutionEngine;\n }\n List<ModelElement> analyzedElement = new ArrayList<ModelElement>();\n for (ModelElementIndicator modelElementIndicator : treeViewer.getModelElementIndicator()) {\n analyzedElement.add(modelElementIndicator.getModelElement());\n }\n if (!analyzedElement.isEmpty()) {\n if (!ModelElementHelper.isFromSameConnection(analyzedElement)) {\n return new ReturnCode(DefaultMessagesImpl.getString(\"String_Node_Str\"), false);\n }\n if (!ModelElementHelper.isFromSameTable(analyzedElement) && !\"String_Node_Str\".equals(dataFilterComp.getDataFilterString())) {\n return new ReturnCode(DefaultMessagesImpl.getString(\"String_Node_Str\"), false);\n }\n }\n return new ReturnCode(true);\n}\n"