content stringlengths 40 137k |
|---|
"private void callPropertyChange(PropertyChangeEvent event) {\n String propertyName = event.getPropertyName();\n if (MediaAwareCall.CONFERENCE.equals(propertyName) || MediaAwareCall.DEFAULT_DEVICE.equals(propertyName)) {\n MediaAwareCall<?, ?, ?> call = getPeer().getCall();\n if (call == null)\n return;\n for (MediaType mediaType : MediaType.values()) {\n MediaStream stream = getStream(mediaType);\n if (stream == null)\n continue;\n MediaDevice oldDevice = stream.getDevice();\n if (oldDevice != null) {\n MediaDevice oldValue = (!callConferenceChange && (oldDevice instanceof MediaDeviceWrapper)) ? ((MediaDeviceWrapper) oldDevice).getWrappedDevice() : oldDevice;\n MediaDevice newDevice = getDefaultDevice(mediaType);\n MediaDevice newWrappedDevice = newDevice;\n if (newDevice instanceof MediaDeviceWrapper) {\n newWrappedDevice = ((MediaDeviceWrapper) newDevice).getWrappedDevice();\n }\n if (oldDevice != newWrappedDevice)\n stream.setDevice(newDevice);\n }\n stream.setRTPTranslator(call.getRTPTranslator(mediaType));\n }\n }\n}\n"
|
"public void rcDropCellByColValue(String row, String rowOperator, String value, String regex, String searchType, int delayBeforeDrop) {\n try {\n TableAdapter adapter = (TableAdapter) getComponent();\n int implRow = adapter.getRowFromString(row, rowOperator);\n int implCol = super.findColumn(value, regex, searchType, adapter, implRow);\n TableCell targetCell = getCellAt(implRow + 1, implCol + 1);\n if (targetCell == null) {\n throw new StepExecutionException(\"String_Node_Str\", EventFactory.createActionError(TestErrorEvent.NOT_VISIBLE));\n }\n super.rcDropCellByColValue(row, rowOperator, value, regex, searchType, delayBeforeDrop);\n } finally {\n Node table = ((Node) getRealComponent());\n table.removeEventFilter(ScrollToEvent.ANY, m_scrollConsumer);\n DragAndDropHelper dndHelper = DragAndDropHelper.getInstance();\n getRobot().mouseRelease(null, null, dndHelper.getMouseButton());\n try {\n pressOrReleaseModifiers(dndHelper.getModifier(), false);\n } catch (RobotException e) {\n if (!EnvironmentUtils.isLinuxOS()) {\n throw e;\n }\n }\n dndHelper.setDragMode(false);\n }\n}\n"
|
"protected void executePatch() {\n if (siteService.getSite(RM_SITE_ID) != null) {\n List<SavedSearchDetails> savedSearches = recordsManagementSearchService.getSavedSearches(RM_SITE_ID);\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"String_Node_Str\" + savedSearches.size() + \"String_Node_Str\");\n }\n for (SavedSearchDetails savedSearchDetails : savedSearches) {\n String refreshedJSON = savedSearchDetails.toJSONString();\n NodeRef nodeRef = savedSearchDetails.getNodeRef();\n if (nodeRef != null) {\n ContentWriter writer = contentService.getWriter(nodeRef, ContentModel.PROP_CONTENT, true);\n writer.putContent(refreshedJSON);\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\" + savedSearchDetails.getName() + \"String_Node_Str\" + nodeRef.toString() + \"String_Node_Str\");\n }\n }\n }\n }\n}\n"
|
"public void setPosition(Coord2D coord) {\n try {\n guidedPoint.forcedGuidedCoordinate(coord);\n } catch (Exception e) {\n Log.e(TAG, \"String_Node_Str\", e);\n }\n}\n"
|
"private CoordinateSystemAxis parseAxis(final Element parent, final Unit<?> unit, final boolean mandatory) throws ParseException {\n final Element element;\n if (mandatory) {\n element = parent.pullElement(WKTKeywords.Axis);\n } else {\n element = parent.pullOptionalElement(WKTKeywords.Axis);\n if (element == null) {\n return null;\n }\n }\n String name = CharSequences.trimWhitespaces(element.pullString(\"String_Node_Str\"));\n if (isGeographic) {\n if (name.equalsIgnoreCase(AxisNames.LATITUDE) || name.equalsIgnoreCase(\"String_Node_Str\")) {\n name = AxisNames.GEODETIC_LATITUDE;\n } else if (name.equalsIgnoreCase(AxisNames.LONGITUDE) || name.equalsIgnoreCase(\"String_Node_Str\") || name.equalsIgnoreCase(\"String_Node_Str\")) {\n name = AxisNames.GEODETIC_LONGITUDE;\n }\n }\n final Element orientation = element.pullVoidElement(\"String_Node_Str\");\n final AxisDirection direction = Types.forCodeName(AxisDirection.class, orientation.keyword, mandatory);\n try {\n return csFactory.createCoordinateSystemAxis(parseAuthorityAndClose(element, name), name, direction, unit);\n } catch (FactoryException exception) {\n throw element.parseFailed(exception);\n }\n}\n"
|
"public Boolean call() throws Exception {\n return stage.isShowing();\n}\n"
|
"public Boolean apply(WebDriver driver) {\n try {\n String value = getLocationPreview().getPathAsString();\n currentValue.setLength(0);\n currentValue.append(value);\n return expectedContent.equals(value);\n } catch (NotFoundException e) {\n return false;\n } catch (StaleElementReferenceException e) {\n return false;\n }\n}\n"
|
"public Linked<ChannelConfiguration> createChannel(ChannelCreationRequest channelCreationRequest) {\n String channelName = channelCreationRequest.getName();\n ChannelConfiguration channelConfiguration = channelDao.createChannel(channelName);\n URI channelUri = linkBuilder.buildChannelUri(channelConfiguration);\n return Response.ok(linked(channelConfiguration).withLink(\"String_Node_Str\", channelUri).withLink(\"String_Node_Str\", linkBuilder.buildLatestUri(channelName)).withLink(\"String_Node_Str\", linkBuilder.buildWsLinkFor(channelName)).build()).build();\n}\n"
|
"private void updateSelectionStatus(final JavaSelectionEvent selection) {\n final IJavaElement element = selection.getElement();\n final String text = JavaElementLabels.getElementLabel(element, LABEL_FLAGS);\n selectionStatus.setText(text);\n selectionStatus.setImage(labelProvider.getImage(element));\n}\n"
|
"public void run() {\n for (Group group : viewSpecificGroups) {\n for (Control subControl : group.getChildren()) {\n if (subControl instanceof Label && subControl.getData() == group) {\n if (group.getData(\"String_Node_Str\") != null && ((Integer) group.getData(\"String_Node_Str\")).intValue() == iViewID || eventTrigger instanceof GLPathway && group.getData(\"String_Node_Str\") == GLPathwayView.ID) {\n ((Label) subControl).setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY));\n } else {\n ((Label) subControl).setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_GRAY));\n }\n }\n }\n }\n}\n"
|
"public void startSync() {\n if (plugin.syncRunning) {\n return;\n }\n plugin.syncRunning = true;\n try {\n boolean goNext = true;\n int f = 1;\n while (goNext) {\n long startID = plugin.lastID;\n JsonHandler webHandle = new JsonHandler(plugin);\n HashMap<String, String> url_items = new HashMap<String, String>();\n url_items.put(\"String_Node_Str\", String.valueOf(plugin.lastID));\n url_items.put(\"String_Node_Str\", \"String_Node_Str\");\n JSONObject response = webHandle.hdl_jobj(url_items);\n try {\n if (response.has(\"String_Node_Str\")) {\n if (response.getJSONArray(\"String_Node_Str\").length() > 0) {\n for (int v = 0; v < response.getJSONArray(\"String_Node_Str\").length(); v++) {\n String[] plyer = response.getJSONArray(\"String_Node_Str\").getString(v).split(\"String_Node_Str\");\n OfflinePlayer d = plugin.getServer().getOfflinePlayer(plyer[0]);\n if (d.isBanned()) {\n if (plyer[1].equals(\"String_Node_Str\")) {\n d.setBanned(false);\n }\n } else {\n if (plyer[1].equals(\"String_Node_Str\")) {\n d.setBanned(true);\n }\n }\n }\n }\n }\n }\n if (response.has(\"String_Node_Str\")) {\n long h = response.getLong(\"String_Node_Str\");\n if (h != 0) {\n plugin.lastID = h;\n }\n }\n if (response.has(\"String_Node_Str\")) {\n goNext = true;\n } else {\n goNext = false;\n }\n } catch (NullPointerException e) {\n if (plugin.getConfigs().isDebug()) {\n e.printStackTrace();\n }\n } catch (JSONException e) {\n if (plugin.getConfigs().isDebug()) {\n e.printStackTrace();\n }\n }\n if (plugin.lastID == startID) {\n f++;\n } else {\n f = 1;\n }\n if (f > 5) {\n goNext = false;\n }\n try {\n Thread.sleep(500);\n } catch (InterruptedException ignore) {\n }\n }\n plugin.syncRunning = false;\n}\n"
|
"protected String buildDrillAction(IAction action, IReportContext context) {\n if (action == null || context == null)\n return null;\n String baseURL = getBaseUrl(context);\n StringBuffer link = new StringBuffer();\n String reportName = getReportName(context, action);\n if (reportName != null && !reportName.equals(\"String_Node_Str\")) {\n link.append(baseURL);\n link.append(reportName.toLowerCase().endsWith(\"String_Node_Str\") ? \"String_Node_Str\" : \"String_Node_Str\");\n try {\n link.append(URLEncoder.encode(reportName, ParameterAccessor.UTF_8_ENCODE));\n } catch (UnsupportedEncodingException e1) {\n }\n String format = action.getFormat();\n if (format == null || format.length() == 0)\n format = hostFormat;\n if (format != null && format.length() > 0) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_FORMAT, format));\n }\n if (action.getParameterBindings() != null) {\n Iterator paramsIte = action.getParameterBindings().entrySet().iterator();\n while (paramsIte.hasNext()) {\n Map.Entry entry = (Map.Entry) paramsIte.next();\n try {\n String key = (String) entry.getKey();\n Object valueObj = entry.getValue();\n if (valueObj != null) {\n if (valueObj instanceof List) {\n if (((List) valueObj).size() == 1) {\n valueObj = ((List) valueObj).get(0);\n } else {\n valueObj = ((List) valueObj).toArray();\n }\n }\n Object[] values;\n if (valueObj instanceof Object[]) {\n values = (Object[]) valueObj;\n } else {\n values = new Object[1];\n values[0] = valueObj;\n }\n for (int i = 0; i < values.length; i++) {\n String value = DataUtil.getDisplayValue(values[i], timeZone);\n if (value != null) {\n link.append(ParameterAccessor.getQueryParameterString(URLEncoder.encode(key, ParameterAccessor.UTF_8_ENCODE), URLEncoder.encode(value, ParameterAccessor.UTF_8_ENCODE)));\n } else {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_ISNULL, URLEncoder.encode(key, ParameterAccessor.UTF_8_ENCODE)));\n }\n }\n }\n } catch (UnsupportedEncodingException e) {\n }\n }\n if (!reportName.toLowerCase().endsWith(IBirtConstants.SUFFIX_REPORT_DOCUMENT) && baseURL.lastIndexOf(IBirtConstants.SERVLET_PATH_FRAMESET) > 0) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_OVERWRITE, String.valueOf(true)));\n }\n }\n if (locale != null) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_LOCALE, locale.toString()));\n }\n if (timeZone != null) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_TIMEZONE, timeZone.getID()));\n }\n if (isRtl) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_RTL, String.valueOf(isRtl)));\n }\n if (svg != null) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_SVG, String.valueOf(svg.booleanValue())));\n }\n if (isDesigner != null) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_DESIGNER, String.valueOf(isDesigner)));\n }\n if (pageOverflow > 0) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_PAGE_OVERFLOW, String.valueOf(pageOverflow)));\n }\n if (isMasterPageContent != null) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_MASTERPAGE, String.valueOf(isMasterPageContent)));\n }\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_MASTERPAGE, String.valueOf(this.isMasterPageContent)));\n try {\n if (resourceFolder != null) {\n String res = URLEncoder.encode(resourceFolder, ParameterAccessor.UTF_8_ENCODE);\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_RESOURCE_FOLDER, res));\n }\n } catch (UnsupportedEncodingException e) {\n }\n String bookmark = action.getBookmark();\n if (bookmark != null) {\n try {\n if (baseURL.lastIndexOf(IBirtConstants.SERVLET_PATH_PREVIEW) > 0 || IBirtConstants.PDF_RENDER_FORMAT.equalsIgnoreCase(format)) {\n if (!action.isBookmark() && reportName.toLowerCase().endsWith(\"String_Node_Str\")) {\n InputOptions options = new InputOptions();\n options.setOption(InputOptions.OPT_LOCALE, locale);\n options.setOption(InputOptions.OPT_TIMEZONE, timeZone);\n bookmark = BirtReportServiceFactory.getReportService().findTocByName(reportName, bookmark, options);\n }\n if (bookmark != null) {\n link.append(\"String_Node_Str\");\n link.append(URLEncoder.encode(bookmark, ParameterAccessor.UTF_8_ENCODE));\n }\n } else {\n bookmark = URLEncoder.encode(bookmark, ParameterAccessor.UTF_8_ENCODE);\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_BOOKMARK, bookmark));\n if (!action.isBookmark())\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_ISTOC, \"String_Node_Str\"));\n }\n } catch (UnsupportedEncodingException e) {\n }\n }\n }\n return link.toString();\n}\n"
|
"public void fromBinary(final byte[] bytes) {\n final ByteBuffer buf = ByteBuffer.wrap(bytes);\n binId = new byte[buf.getInt()];\n buf.get(binId);\n final byte[] indexRangesBinary = new byte[bytes.length - 5 - binId.length];\n buf.get(indexRangesBinary);\n indexRanges = PersistenceUtils.fromBinary(indexRangesBinary, MultiDimensionalNumericData.class);\n}\n"
|
"public void userAddPermission(Plugin plugin, CommandSender sender, Map<String, String> args) {\n PermissionUser user = PermissionsPlugin.getPermissionManager().getUser(args.get(\"String_Node_Str\"));\n if (user == null) {\n sender.sendMessage(ChatColor.RED + \"String_Node_Str\");\n return;\n }\n user.addPermission(args.get(\"String_Node_Str\"), args.get(\"String_Node_Str\"));\n sender.sendMessage(ChatColor.WHITE + \"String_Node_Str\");\n}\n"
|
"public InetAddress getGatewayAddress() {\n return mGateway.toInetAddress();\n}\n"
|
"public void shouldParse8MWords() throws Exception {\n final List<File> files = Arrays.asList(new File(\"String_Node_Str\"), new File(\"String_Node_Str\"), new File(\"String_Node_Str\"), new File(\"String_Node_Str\"), new File(\"String_Node_Str\"));\n final LinkedList<String> words = new LinkedList<>();\n final HashSet<String> uniqueWords = new HashSet<>();\n for (File tokenizedFile : files) {\n final List<String> lines = Files.readLines(tokenizedFile, Charsets.UTF_8);\n for (String line : lines) {\n final ArrayList<String> strings = Lists.newArrayList(Splitter.on(\"String_Node_Str\").trimResults().omitEmptyStrings().split(line));\n words.addAll(strings);\n uniqueWords.addAll(strings);\n }\n }\n System.out.println(\"String_Node_Str\" + words.size());\n System.out.println(\"String_Node_Str\" + uniqueWords.size());\n System.out.println(\"String_Node_Str\");\n final TurkishMorphParser parser = TurkishMorphParser.builder().addDefaultDictionaries().addDefaultCache().build();\n final Stopwatch stopWatch = new Stopwatch();\n stopWatch.start();\n int i = 0;\n for (String word : words) {\n parser.parse(word);\n if (++i % 500 == 0)\n System.out.println(\"String_Node_Str\" + i);\n }\n stopWatch.stop();\n System.out.println(\"String_Node_Str\" + stopWatch.toString());\n System.out.println(\"String_Node_Str\" + words.size());\n System.out.println(\"String_Node_Str\" + (stopWatch.elapsed(TimeUnit.MILLISECONDS) * 1.0) / (words.size() * 1.0d) + \"String_Node_Str\");\n}\n"
|
"public int updateClipPlanes(GL3 gl, List<GLClipPlane> clips) {\n float[] clipbuff = new float[getSize() / GLSupport.FLOAT_SIZE];\n int nclips = 0;\n for (GLClipPlane cp : clips) {\n if (cp.isClippingEnabled()) {\n int idx = getOffset(nclips) / Float.BYTES;\n cp.getClipPlaneValues(clipbuff, idx, false);\n nclips++;\n if (nclips >= numClipPlanes) {\n break;\n }\n if (cp.isSlicingEnabled()) {\n idx = getOffset(nclips) / Float.BYTES;\n cp.getClipPlaneValues(clipbuff, idx, true);\n nclips++;\n if (nclips >= numClipPlanes) {\n break;\n }\n }\n }\n }\n FloatBuffer data = FloatBuffer.wrap(clipbuff);\n update(gl, data);\n return nclips;\n}\n"
|
"public void requestInstance(JobID jobID, Configuration conf, InstanceType instanceType) throws InstanceException {\n boolean assignmentSuccessful = false;\n AllocatedResource allocatedResource = null;\n synchronized (this.synchronizationObject) {\n if (this.localInstance != null) {\n if (this.allocatedResource == null) {\n allocatedResource = new AllocatedResource(this.localInstance, instanceType, new AllocationID());\n this.allocatedResource = allocatedResource;\n assignmentSuccessful = true;\n }\n }\n }\n if (assignmentSuccessful) {\n new LocalInstanceNotifier(this.instanceListener, jobID, allocatedResource).start();\n } else {\n throw new InstanceException(\"String_Node_Str\" + instanceType + \"String_Node_Str\");\n }\n}\n"
|
"public void flush() {\n playbackPositionUs = 0;\n while (!queuedInputBuffers.isEmpty()) {\n releaseInputBuffer(queuedInputBuffers.poll());\n }\n if (dequeuedInputBuffer != null) {\n releaseInputBuffer(dequeuedInputBuffer);\n dequeuedInputBuffer = null;\n }\n}\n"
|
"private static String getTipFromPathDeep(NBTTagCompound n, List<String> pathDeep, String type) {\n if (pathDeep.size() == 1) {\n String tagName = pathDeep.get(0);\n String value = NBTHelper.NBTTypeToString(n, tagName, type);\n if (value == null) {\n return null;\n }\n return String.format(\"String_Node_Str\" + TAB + ALIGNRIGHT + WHITE + \"String_Node_Str\", tagName, value);\n } else {\n String compoundID = pathDeep.get(0);\n pathDeep.remove(0);\n return getTipFromPathDeep(n.getCompoundTag(compoundID), pathDeep, type);\n }\n}\n"
|
"public static void removeStarFadeColorsRaw(Item fireworkStar, int... rawColors) {\n if (fireworkStar == null || fireworkStar.getType() != ItemType.FireworkStar) {\n return;\n }\n if (rawColors == null || rawColors.length < 1) {\n return;\n }\n if (verifyTags(fireworkStar, \"String_Node_Str\", COMPOUND, false)) {\n int[] setColors = getExplosionTag(fireworkStar).containsKey(\"String_Node_Str\") ? getExplosionTag(fireworkStar).getIntArray(\"String_Node_Str\") : null;\n if (setColors != null) {\n ArrayList<Integer> colors = new ArrayList<Integer>();\n for (int setColor : setColors) {\n colors.add(setColor);\n }\n for (int rawColor : rawColors) {\n colors.remove(Integer.valueOf(rawColor));\n }\n int[] newColors = new int[colors.size()];\n for (int index = 0; index < colors.size(); index++) {\n newColors[index] = colors.get(index);\n }\n getExplosionTag(fireworkStar).put(\"String_Node_Str\", newColors);\n }\n }\n}\n"
|
"public void process(T gray) {\n configureContourDetector(gray);\n binary.reshape(gray.width, gray.height);\n inputToBinary.process(gray, binary);\n squareDetector.process(gray, binary);\n squareDetector.refineAll();\n squareDetector.getPolygons(candidates, candidatesInfo);\n found.reset();\n if (verbose)\n System.out.println(\"String_Node_Str\" + candidates.size());\n for (int i = 0; i < candidates.size(); i++) {\n Polygon2D_F64 p = candidates.get(i);\n if (!checkSideSize(p)) {\n if (verbose)\n System.out.println(\"String_Node_Str\");\n continue;\n }\n double best = Double.MAX_VALUE;\n for (int j = 0; j < 4; j++) {\n double found = p.get(0).normSq();\n if (found < best) {\n best = found;\n interpolationHack.set(p);\n }\n UtilPolygons2D_F64.shiftDown(p);\n }\n UtilPolygons2D_F64.convert(interpolationHack, q);\n pairsRemovePerspective.get(0).set(0, 0, q.a.x, q.a.y);\n pairsRemovePerspective.get(1).set(square.width, 0, q.b.x, q.b.y);\n pairsRemovePerspective.get(2).set(square.width, square.height, q.c.x, q.c.y);\n pairsRemovePerspective.get(3).set(0, square.height, q.d.x, q.d.y);\n if (!computeHomography.process(pairsRemovePerspective, H)) {\n if (verbose)\n System.out.println(\"String_Node_Str\");\n continue;\n }\n if (!refineHomography.fitModel(pairsRemovePerspective, H, H_refined)) {\n if (verbose)\n System.out.println(\"String_Node_Str\");\n continue;\n }\n ConvertDMatrixStruct.convert(H_refined, H_fixed);\n ConvertFloatType.convert(H_fixed, transformHomography.getModel());\n removePerspective.apply(gray, square);\n DetectPolygonFromContour.Info info = squareDetector.getPolygonInfo().get(i);\n if (minimumBorderBlackFraction > 0) {\n double pixelThreshold = (info.edgeInside + info.edgeOutside) / 2;\n double foundFraction = computeFractionBoundary((float) pixelThreshold);\n if (foundFraction < minimumBorderBlackFraction) {\n if (verbose)\n System.out.println(\"String_Node_Str\" + foundFraction);\n continue;\n }\n }\n if (processSquare(square, result, info.edgeInside, info.edgeOutside)) {\n prepareForOutput(q, result);\n if (verbose)\n System.out.println(\"String_Node_Str\");\n } else {\n if (verbose)\n System.out.println(\"String_Node_Str\");\n }\n }\n}\n"
|
"protected void refreshData() {\n try {\n if (conceptCombo.isDisposed())\n return;\n XtentisPort port = Util.getPort(getXObject());\n WSDataCluster cluster = null;\n if (getXObject().getWsObject() == null) {\n cluster = port.getDataCluster(new WSGetDataCluster((WSDataClusterPK) getXObject().getWsKey()));\n getXObject().setWsObject(cluster);\n } else {\n cluster = (WSDataCluster) getXObject().getWsObject();\n }\n WSUniverse currentUniverse = port.getCurrentUniverse(new WSGetCurrentUniverse());\n String currentUniverseName = \"String_Node_Str\";\n if (currentUniverse != null)\n currentUniverseName = currentUniverse.getName();\n if (currentUniverseName != null && currentUniverseName.equals(\"String_Node_Str\"))\n currentUniverseName = \"String_Node_Str\";\n String[] concepts;\n String clusterName = URLEncoder.encode(cluster.getName(), \"String_Node_Str\");\n String query = \"String_Node_Str\" + clusterName + \"String_Node_Str\";\n WSStringArray array = port.runQuery(new WSRunQuery(null, new WSDataClusterPK(clusterName), query, null));\n long count = Long.valueOf(array.getStrings()[0]);\n if (count > 100000) {\n DataModelSelectDialog dialog = new DataModelSelectDialog(getSite().getShell());\n dialog.setBlockOnOpen(true);\n dialog.open();\n if (dialog.getReturnCode() == Window.OK) {\n String xpath = dialog.getXpath();\n WSDataModel dm = Util.getPort(this.getXObject()).getDataModel(new WSGetDataModel(new WSDataModelPK(xpath)));\n if (dm == null)\n return;\n concepts = new String[Util.getConcepts(Util.getXSDSchema(dm.getXsdSchema())).size()];\n Util.getConcepts(Util.getXSDSchema(dm.getXsdSchema())).toArray(concepts);\n TreeObject object = null;\n for (int i = 0; i < this.getXObject().getServerRoot().getChildren().length; i++) {\n object = this.getXObject().getServerRoot().getChildren()[i];\n if (object.getType() == TreeObject.DATA_MODEL)\n break;\n }\n String revision = \"String_Node_Str\";\n if (object != null)\n revision = object.getDisplayName().substring(object.getDisplayName().indexOf(\"String_Node_Str\") + 1, object.getDisplayName().indexOf(\"String_Node_Str\"));\n for (int i = 0; i < concepts.length; i++) {\n String concept = concepts[i];\n if (revision == null || revision.equals(\"String_Node_Str\"))\n revision = \"String_Node_Str\";\n concepts[i] = concept + \"String_Node_Str\" + \"String_Node_Str\" + revision + \"String_Node_Str\";\n }\n conceptCombo.removeAll();\n conceptCombo.add(\"String_Node_Str\");\n for (int i = 0; i < concepts.length; i++) conceptCombo.add(concepts[i]);\n }\n } else {\n WSConceptRevisionMapMapEntry[] wsConceptRevisionMapMapEntries = port.getConceptsInDataClusterWithRevisions(new WSGetConceptsInDataClusterWithRevisions(new WSDataClusterPK(cluster.getName()), new WSUniversePK(currentUniverseName))).getMapEntry();\n long afterTime1 = System.currentTimeMillis();\n concepts = new String[wsConceptRevisionMapMapEntries.length];\n for (int i = 0; i < wsConceptRevisionMapMapEntries.length; i++) {\n WSConceptRevisionMapMapEntry entry = wsConceptRevisionMapMapEntries[i];\n String concept = entry.getConcept();\n String revision = entry.getRevision();\n if (revision == null || revision.equals(\"String_Node_Str\"))\n revision = \"String_Node_Str\";\n concepts[i] = concept + \"String_Node_Str\" + \"String_Node_Str\" + revision + \"String_Node_Str\";\n }\n conceptCombo.removeAll();\n conceptCombo.add(\"String_Node_Str\");\n for (int i = 0; i < concepts.length; i++) {\n conceptCombo.add(concepts[i]);\n }\n }\n conceptCombo.select(0);\n searchText.setFocus();\n } catch (Exception e) {\n e.printStackTrace();\n MessageDialog.openError(this.getSite().getShell(), \"String_Node_Str\", \"String_Node_Str\" + e.getLocalizedMessage());\n }\n}\n"
|
"public Container or(ArrayContainer value2) {\n ArrayContainer value1 = this;\n final int desiredcapacity = Math.min(value1.getCardinality() + value2.getCardinality(), 65536);\n ArrayContainer answer = new ArrayContainer(desiredcapacity);\n answer.cardinality = Util.union2by2(value1.content, value1.getCardinality(), value2.content, value2.getCardinality(), answer.content);\n if (answer.cardinality >= 1024)\n return new BitmapContainer(answer);\n return answer;\n}\n"
|
"public void existingJobMapPrincipal() {\n List<Permission> permissions = Arrays.asList(new Permission[] { new Permission(new Owner(\"String_Node_Str\"), EnumSet.of(Role.OWNER_ADMIN)) });\n Principal principal = new UserPrincipal(\"String_Node_Str\", permissions);\n when(this.principalProvider.get()).thenReturn(principal);\n JobDetail detail = new JobDetail();\n JobDataMap map = new JobDataMap();\n map.put(\"String_Node_Str\", \"String_Node_Str\");\n detail.setJobDataMap(map);\n when(response.getEntity()).thenReturn(detail);\n this.interceptor.postProcess(response);\n Assert.assertSame(principal, detail.getJobDataMap().get(PinsetterJobListener.PRINCIPAL_KEY));\n}\n"
|
"protected VBD createVbd(Connection conn, VolumeTO volume, String vmName, VM vm) throws XmlRpcException, XenAPIException {\n VolumeType type = volume.getType();\n VDI vdi = mount(conn, vmName, volume);\n VBD.Record vbdr = new VBD.Record();\n vbdr.VM = vm;\n if (vdi != null)\n vbdr.VDI = vdi;\n else {\n vbdr.empty = true;\n }\n if (type == VolumeType.ROOT) {\n vbdr.bootable = true;\n }\n vbdr.userdevice = Long.toString(volume.getDeviceId());\n if (volume.getType() == VolumeType.ISO) {\n vbdr.mode = Types.VbdMode.RO;\n vbdr.type = Types.VbdType.CD;\n } else {\n vbdr.mode = Types.VbdMode.RW;\n vbdr.type = Types.VbdType.DISK;\n }\n VBD vbd = VBD.create(conn, vbdr);\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + vbd.getUuid(conn) + \"String_Node_Str\" + volume);\n }\n return vbd;\n}\n"
|
"public InputStream post(String soapMsg) throws IOException {\n HttpURLConnection postCon = (HttpURLConnection) baseUrl.openConnection();\n if (connectTimeout > 0)\n postCon.setConnectTimeout(connectTimeout);\n if (readTimeout > 0)\n postCon.setReadTimeout(readTimeout);\n try {\n postCon.setRequestMethod(\"String_Node_Str\");\n } catch (ProtocolException e) {\n e.printStackTrace();\n }\n postCon.setDoOutput(true);\n postCon.setDoInput(true);\n postCon.setRequestProperty(SOAP_ACTION_HEADER, soapAction);\n if (cookie != null) {\n postCon.setRequestProperty(\"String_Node_Str\", cookie);\n }\n OutputStream os = postCon.getOutputStream();\n OutputStreamWriter out = new OutputStreamWriter(os, \"String_Node_Str\");\n out.write(soapMsg);\n out.close();\n InputStream is;\n try {\n is = postCon.getInputStream();\n } catch (IOException ioe) {\n is = postCon.getErrorStream();\n }\n if (cookie == null) {\n cookie = postCon.getHeaderField(\"String_Node_Str\");\n }\n return is;\n}\n"
|
"private void sendGeologistToNearest(Movable geologist, EResourceType resourceType) {\n ShortPoint2D resourcePoint = aiStatistics.getNearestResourcePointForPlayer(aiStatistics.getPositionOfPartition(playerId), resourceType, playerId, Integer.MAX_VALUE, geologistFilters[resourceType.ordinal]);\n if (resourcePoint == null) {\n resourcePoint = aiStatistics.getNearestResourcePointInDefaultPartitionFor(aiStatistics.getPositionOfPartition(playerId), resourceType, Integer.MAX_VALUE);\n }\n if (resourcePoint != null) {\n sendMovableTo(geologist, resourcePoint);\n }\n}\n"
|
"private String copyFile(File targetFolder, File propFile, Property property, IPath path, String connNameAfter, String connName, Map<File, File> folderMap) throws IOException {\n File destItemFile = new Path(targetFolder.getAbsolutePath()).append(path).append(connNameAfter).addFileExtension(FactoriesUtil.ITEM_EXTENSION).toFile();\n File destPropFile = new Path(targetFolder.getAbsolutePath()).append(path).append(connNameAfter).addFileExtension(FactoriesUtil.PROPERTIES_EXTENSION).toFile();\n File srcItemFile = new Path(propFile.getAbsolutePath()).removeFileExtension().addFileExtension(FactoriesUtil.ITEM_EXTENSION).toFile();\n File srcPropFile = propFile;\n Item item = property.getItem();\n FileUtils.copyFile(srcItemFile, destItemFile);\n FileUtils.copyFile(srcPropFile, destPropFile);\n if (item instanceof ConnectionItem) {\n ConnectionItem connectionItem = (ConnectionItem) item;\n Connection conn = getConnectionFromFile(destItemFile);\n if (conn != null) {\n if (connName != null) {\n conn.setName(connName);\n conn.setLabel(connName);\n }\n }\n EMFUtil.saveResource(itemResource);\n Resource propResource = getResource(destPropFile.getAbsolutePath());\n Property newProperty = (Property) EcoreUtil.getObjectByType(propResource.getContents(), PropertiesPackage.eINSTANCE.getProperty());\n newProperty.setAuthor(property.getAuthor());\n newProperty.setLabel(connectionItem.getConnection().getName());\n newProperty.setItem(item);\n item.setProperty(newProperty);\n propResource.getContents().clear();\n propResource.getContents().add(newProperty);\n propResource.getContents().add(item);\n propResource.getContents().add(item.getState());\n EMFUtil.saveResource(propResource);\n }\n return connNameAfter;\n}\n"
|
"public void onBlockBreak(BlockEvent.BreakEvent event) {\n EntityPlayer player = event.getPlayer();\n Block block = event.block;\n int meta = event.blockMetadata;\n int x = event.x;\n int y = event.y;\n int z = event.z;\n World world = event.world;\n if (player == null) {\n return;\n }\n ItemStack equipped = player.getCurrentEquippedItem();\n if (equipped == null || equipped.getItem() == null || block == null) {\n return;\n }\n if (equipped.getItem() instanceof ItemSteamDrill) {\n ItemSteamDrill drill = (ItemSteamDrill) equipped.getItem();\n ArrayList<Item> upgrades = UtilSteamTool.getHarvestLevelModifiers(equipped);\n if (upgrades != null && drill.isWound(player)) {\n for (Item upgrade : upgrades) {\n if (upgrade == null) {\n continue;\n }\n if (RecipeHelper.blockMaterials.get(upgrade).right >= block.getHarvestLevel(meta)) {\n block.harvestBlock(world, player, x, y, z, meta);\n world.setBlockToAir(x, y, z);\n }\n event.setCanceled(true);\n }\n }\n if (UtilSteamTool.hasUpgrade(equipped, SteamcraftItems.bigDrill) && drill.isWound(player)) {\n mineExtraBlocks(getExtraBlockCoordinates(sideHit), x, y, z, world, drill, equipped, player);\n }\n } else if (equipped.getItem() instanceof ItemSteamShovel) {\n ItemSteamShovel shovel = (ItemSteamShovel) equipped.getItem();\n if (!shovel.isWound(player)) {\n return;\n }\n if (UtilSteamTool.hasUpgrade(equipped, SteamcraftItems.rotaryBlades)) {\n mineExtraBlocks(getExtraBlockCoordinates(sideHit), x, y, z, world, shovel, equipped, player);\n }\n }\n}\n"
|
"public void playDaxosAndVampire(boolean castVampireDifferentWay) {\n addCard(Zone.HAND, playerA, daxosCard, 1);\n addCard(Zone.BATTLEFIELD, playerA, \"String_Node_Str\", 4);\n addCard(Zone.HAND, playerA, \"String_Node_Str\", 1);\n addCard(Zone.BATTLEFIELD, playerA, \"String_Node_Str\", 8);\n addCard(Zone.HAND, playerA, \"String_Node_Str\", 1);\n addCard(Zone.BATTLEFIELD, playerA, \"String_Node_Str\", 2);\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, daxosCard);\n checkPermanentCount(\"String_Node_Str\", 1, PhaseStep.POSTCOMBAT_MAIN, playerA, daxosCard, 1);\n if (castVampireDifferentWay) {\n castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, \"String_Node_Str\");\n castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, \"String_Node_Str\");\n } else {\n activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, \"String_Node_Str\");\n activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, \"String_Node_Str\");\n activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, \"String_Node_Str\");\n activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, \"String_Node_Str\");\n activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, \"String_Node_Str\");\n activateManaAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, \"String_Node_Str\");\n castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, \"String_Node_Str\");\n castSpell(3, PhaseStep.PRECOMBAT_MAIN, playerA, \"String_Node_Str\");\n }\n checkPT(\"String_Node_Str\", 3, PhaseStep.BEGIN_COMBAT, playerA, daxosCard, 5, 5);\n checkAbility(\"String_Node_Str\", 3, PhaseStep.BEGIN_COMBAT, playerA, daxosCard, FlyingAbility.class, true);\n checkSubType(\"String_Node_Str\", 3, PhaseStep.BEGIN_COMBAT, playerA, daxosCard, SubType.VAMPIRE, true);\n setStopAt(3, PhaseStep.END_TURN);\n execute();\n}\n"
|
"public int buildWithClasspath(JavacExecutionContext context, BuildTarget invokingRule, ImmutableList<String> options, ImmutableList<ResolvedJavacPluginProperties> annotationProcessors, ImmutableSortedSet<Path> javaSourceFilePaths, Path pathToSrcsList, Optional<Path> workingDirectory, CompilationMode compilationMode) throws InterruptedException {\n Preconditions.checkArgument(compilationMode == CompilationMode.FULL, \"String_Node_Str\");\n ImmutableList.Builder<String> command = ImmutableList.builder();\n command.add(pathToJavac.isLeft() ? pathToJavac.getLeft().toString() : context.getAbsolutePathsForInputs().get(0).toString());\n command.addAll(options);\n ImmutableList<Path> expandedSources;\n try {\n expandedSources = getExpandedSourcePaths(context.getProjectFilesystem(), invokingRule, javaSourceFilePaths, workingDirectory);\n } catch (IOException e) {\n throw new HumanReadableException(\"String_Node_Str\", invokingRule, workingDirectory);\n }\n try {\n FluentIterable<String> escapedPaths = FluentIterable.from(expandedSources).transform(Object::toString).transform(ARGFILES_ESCAPER);\n FluentIterable<String> escapedArgs = FluentIterable.from(options).transform(ARGFILES_ESCAPER);\n context.getProjectFilesystem().writeLinesToPath(Iterables.concat(escapedArgs, escapedPaths), pathToArgsList);\n command.add(\"String_Node_Str\" + pathToArgsList);\n } catch (IOException e) {\n context.getEventSink().reportThrowable(e, \"String_Node_Str\", pathToSrcsList);\n return 1;\n }\n int exitCode = -1;\n try {\n ProcessExecutorParams params = ProcessExecutorParams.builder().setCommand(command.build()).setEnvironment(context.getEnvironment()).setDirectory(context.getProjectFilesystem().getRootPath().toAbsolutePath()).build();\n ProcessExecutor.Result result = context.getProcessExecutor().launchAndExecute(params);\n exitCode = result.getExitCode();\n } catch (IOException e) {\n e.printStackTrace(context.getStdErr());\n return exitCode;\n }\n return exitCode;\n}\n"
|
"private void addDescriptors() {\n addDescriptor(getRequiredTestObjectDescriptor());\n addDescriptor(getRequiredTestSubObjectDescriptor());\n}\n"
|
"public String exec(AbstractStackFrame frame) {\n Object[] localVars = frame.getLocalVars();\n if (localVars[0] instanceof EObject) {\n return EcoreUtil.generateUUID();\n }\n throw new IllegalArgumentException(\"String_Node_Str\" + localVars[0]);\n}\n"
|
"public void reset() {\n this.table.setRedraw(false);\n this.context.getImages().clear();\n this.gridLayer = new DataTableGridLayerStack(new DataTableHandleDataProvider(null, context), table, context);\n this.context.reset();\n this.table.setLayer(gridLayer);\n this.table.refresh();\n this.gridLayer.getBodyLayer().getViewportLayer().recalculateScrollBars();\n this.table.getVerticalBar().setVisible(false);\n this.table.getHorizontalBar().setVisible(false);\n this.table.setRedraw(true);\n this.table.redraw();\n this.table.setVisible(false);\n this.table.getVerticalBar().setVisible(true);\n this.table.getHorizontalBar().setVisible(true);\n this.table.setVisible(false);\n}\n"
|
"private Polygon[] processHoles(Map<Integer, List<Integer>> aHoles, Polygon[] aResultHoles) {\n List<Polygon> holes = new ArrayList<>(Arrays.asList(aResultHoles));\n for (Integer key : aHoles.keySet()) {\n List<Integer> deleteCoordinates = aHoles.get(key);\n Collections.sort(deleteCoordinates, new DescComparator());\n Coordinate[] coordinate = GeometryUtils.deletePointsFromCoordinates(aResultHoles[key], deleteCoordinates);\n if (coordinate != null && GeometryUtils.isValidGeometryDataSection(coordinate, Polygon.class)) {\n holes.set(key, (Polygon) GeometryUtils.constructGeometry(coordinate, Polygon.class));\n } else {\n holes.remove(key.intValue());\n }\n }\n Polygon[] res = new Polygon[0];\n return holes.toArray(res);\n}\n"
|
"private void saveGpxFile() {\n String numOfInstructions = view.getInstructionsNumber();\n if (!isAValidInteger(numOfInstructions)) {\n view.showMessage(\"String_Node_Str\");\n return;\n }\n int instNum = Integer.parseInt(numOfInstructions);\n String gpxType = view.getHighlightedGpxType();\n String fileName = view.getNewGpxFileName();\n if (fileName.isEmpty()) {\n view.showMessage(\"String_Node_Str\");\n return;\n }\n try {\n JFileChooser saveFileChooser = new JFileChooser();\n saveFileChooser.setSelectedFile(new File(fileName));\n saveFileChooser.setFileFilter(new GpxFileFilter());\n saveFileChooser.showSaveDialog(view);\n saveGpxFile(instNum, gpxType, saveFileChooser.getSelectedFile());\n } catch (IOException e) {\n view.showMessage(\"String_Node_Str\");\n }\n}\n"
|
"protected void initialize() {\n PeriodicEventHandler peh = new PeriodicEventHandler(new PriorityParameters(11), new PeriodicParameters(new RelativeTime(0, 0), new RelativeTime(1000, 0)), new StorageParameters(0, 0, 0)) {\n\n public void handleAsyncEvent() {\n Terminal.getTerminal().writeln(\"String_Node_Str\");\n }\n };\n}\n"
|
"public XMLDirectMapping generateDirectMapping(Property property, XMLDescriptor descriptor, NamespaceInfo namespaceInfo) {\n XMLDirectMapping mapping = new XMLDirectMapping();\n mapping.setAttributeName(property.getPropertyName());\n String fixedValue = property.getFixedValue();\n if (fixedValue != null) {\n mapping.setIsWriteOnly(true);\n }\n if (property.isSetReadOnly()) {\n mapping.setIsReadOnly(property.isReadOnly());\n }\n if (property.isSetWriteOnly()) {\n mapping.setIsWriteOnly(property.isWriteOnly());\n }\n if (property.isMethodProperty()) {\n if (property.getGetMethodName() == null) {\n String paramTypeAsString = property.getType().getName();\n mapping.setAttributeAccessor(new JAXBSetMethodAttributeAccessor(paramTypeAsString, helper.getClassLoader()));\n mapping.setIsReadOnly(true);\n mapping.setSetMethodName(property.getSetMethodName());\n } else if (property.getSetMethodName() == null) {\n mapping.setGetMethodName(property.getGetMethodName());\n mapping.setIsWriteOnly(true);\n } else {\n mapping.setSetMethodName(property.getSetMethodName());\n mapping.setGetMethodName(property.getGetMethodName());\n }\n }\n if (property.getXmlPath() != null) {\n mapping.setField(new XMLField(property.getXmlPath()));\n } else {\n mapping.setField(getXPathForField(property, namespaceInfo, true));\n }\n if (property.getDefaultValue() != null) {\n mapping.setNullValue(property.getDefaultValue());\n }\n if (property.isSetNullPolicy()) {\n mapping.setNullPolicy(getNullPolicyFromProperty(property, namespaceInfo.getNamespaceResolverForDescriptor()));\n } else {\n if (property.isNillable()) {\n mapping.getNullPolicy().setNullRepresentedByXsiNil(true);\n mapping.getNullPolicy().setMarshalNullRepresentation(XMLNullRepresentationType.XSI_NIL);\n }\n mapping.getNullPolicy().setNullRepresentedByEmptyNode(false);\n if (!mapping.getXPath().equals(\"String_Node_Str\")) {\n ((NullPolicy) mapping.getNullPolicy()).setSetPerformedForAbsentNode(false);\n }\n }\n if (property.isRequired()) {\n ((XMLField) mapping.getField()).setRequired(true);\n }\n if (property.getType() != null) {\n Class theClass = null;\n if (property.isSetXmlJavaTypeAdapter()) {\n theClass = helper.getClassForJavaClass(property.getOriginalType());\n } else {\n theClass = helper.getClassForJavaClass(property.getType());\n }\n mapping.setAttributeClassification(theClass);\n }\n if (XMLConstants.QNAME_QNAME.equals(property.getSchemaType())) {\n ((XMLField) mapping.getField()).setSchemaType(XMLConstants.QNAME_QNAME);\n }\n if (property.isSetCdata()) {\n mapping.setIsCDATA(property.isCdata());\n }\n return mapping;\n}\n"
|
"public void testString() throws IOException {\n int objectNumber = 3000;\n BufferedRandomAccessFile file = new BufferedRandomAccessFile(new File(tmpPath + File.separatorChar + \"String_Node_Str\"), \"String_Node_Str\", 1000);\n for (int i = 0; i < objectNumber; i++) {\n file.writeUTF(\"String_Node_Str\" + i);\n }\n file.seek(0);\n for (int i = 0; i < objectNumber; i++) {\n assertEquals(file.readUTF(), \"String_Node_Str\" + i);\n }\n file.close();\n}\n"
|
"protected void customRun() throws InterruptedException {\n Call call = queue.poll(100, TimeUnit.MILLISECONDS);\n try {\n if (call == null)\n return;\n int count = 0;\n while (call != null) {\n if (call != RECONNECT_CALL) {\n callMap.put(call.getId(), call);\n }\n Connection oldConnection = connection;\n connection = client.getConnectionManager().getConnection();\n if (restoredConnection(oldConnection, connection)) {\n resubscribe(call, oldConnection);\n } else if (connection != null) {\n logger.log(Level.FINEST, \"String_Node_Str\" + call);\n writer.write(connection, call.getRequest());\n } else {\n clusterIsDown();\n }\n call = null;\n if (count++ < 24) {\n call = queue.poll();\n }\n }\n if (connection != null) {\n writer.flush(connection);\n }\n } catch (Throwable io) {\n logger.log(Level.FINE, \"String_Node_Str\" + io.getMessage());\n io.printStackTrace();\n enQueue(call);\n client.getConnectionManager().destroyConnection(connection);\n }\n}\n"
|
"public void requestFocus() {\n textEditorImpl.requestFocus();\n}\n"
|
"public void getResource(ResourceRequest req, ResourceResponse resp) throws IOException, PortletException {\n Integer reps = (Integer) req.getAttribute(ATTRIB_REPS);\n if (reps == null) {\n reps = adb.getReps();\n }\n if (reps <= 0) {\n done = true;\n }\n req.setAttribute(ATTRIB_REPS, reps);\n Boolean auto = (Boolean) req.getAttribute(ATTRIB_AUTO);\n req.removeAttribute(ATTRIB_AUTO);\n if ((adb.getDelay() <= 0) || (auto != null)) {\n PortletRequestDispatcher rd;\n AsyncContext ctx = null;\n try {\n ctx = req.getAsyncContext();\n } catch (Exception e) {\n }\n StringBuilder txt = new StringBuilder(128);\n txt.append(\"String_Node_Str\");\n txt.append(\"String_Node_Str\").append(adb.getDelay());\n txt.append(\"String_Node_Str\").append(adb.getType());\n txt.append(\"String_Node_Str\").append(reps);\n txt.append(\"String_Node_Str\").append(adb.getReps());\n txt.append(\"String_Node_Str\").append(adb.isAutoDispatch());\n txt.append(\"String_Node_Str\").append(auto);\n txt.append(\"String_Node_Str\").append((ctx == null) ? \"String_Node_Str\" : \"String_Node_Str\");\n LOGGER.fine(txt.toString());\n switch(adb.getType()) {\n case DISPATCH:\n LOGGER.fine(\"String_Node_Str\");\n if (ctx != null) {\n ctx.dispatch(JSP);\n }\n break;\n case FWD:\n LOGGER.fine(\"String_Node_Str\");\n req.setAttribute(ATTRIB_TITLE, \"String_Node_Str\");\n rd = req.getPortletContext().getRequestDispatcher(JSP);\n rd.forward(req, resp);\n if (done && ctx != null) {\n ctx.complete();\n }\n break;\n case INC:\n LOGGER.fine(\"String_Node_Str\");\n req.setAttribute(ATTRIB_TITLE, \"String_Node_Str\");\n rd = req.getPortletContext().getRequestDispatcher(JSP);\n rd.include(req, resp);\n if (done && ctx != null) {\n ctx.complete();\n }\n break;\n default:\n LOGGER.fine(\"String_Node_Str\");\n txt.setLength(0);\n txt.append(\"String_Node_Str\");\n txt.append(\"String_Node_Str\").append(req.getDispatcherType().toString());\n txt.append(\"String_Node_Str\");\n resp.getWriter().write(txt.toString());\n if (done && ctx != null) {\n ctx.complete();\n }\n break;\n }\n }\n if (adb.getDelay() > 0 && (!done || auto == null)) {\n AsyncContext ctx = req.startAsync();\n ctx.setTimeout(4000);\n OutputType type = adb.getType();\n if (adb.isAutoDispatch()) {\n type = OutputType.AUTO;\n }\n AsyncRunnable ar = new AsyncRunnable(ctx, adb.getDelay(), type, done);\n ctx.start(ar);\n }\n}\n"
|
"final void completeTracking() {\n if (null == _tracker) {\n Guards.invariant(() -> null == _observables, () -> \"String_Node_Str\");\n return;\n }\n _tracker.invariantDependenciesUnique(\"String_Node_Str\");\n Guards.invariant(() -> _tracker.getState() != ObserverState.NOT_TRACKING, () -> \"String_Node_Str\");\n ObserverState newDerivationState = ObserverState.UP_TO_DATE;\n if (null == _observables) {\n _tracker.setState(newDerivationState);\n _tracker.replaceDependencies(new ArrayList<>());\n return;\n }\n boolean dependenciesChanged = false;\n final int size = _observables.size();\n int currentIndex = 0;\n for (int i = 0; i < size; i++) {\n final Observable observable = _observables.get(i);\n if (!observable.isInCurrentTracking()) {\n observable.putInCurrentTracking();\n if (i != currentIndex) {\n _observables.set(currentIndex, observable);\n }\n currentIndex++;\n final Observer observer = observable.getObserver();\n if (null != observer) {\n final ObserverState dependenciesState = observer.getState();\n if (dependenciesState.ordinal() > newDerivationState.ordinal()) {\n newDerivationState = dependenciesState;\n }\n }\n }\n }\n final ArrayList<Observable> dependencies = _tracker.getDependencies();\n for (int i = dependencies.size() - 1; i >= 0; i--) {\n final Observable observable = dependencies.get(i);\n if (!observable.isInCurrentTracking()) {\n observable.removeObserver(_tracker);\n dependenciesChanged = true;\n } else {\n observable.removeFromCurrentTracking();\n }\n }\n for (int i = currentIndex - 1; i >= 0; i--) {\n final Observable observable = _observables.get(i);\n if (observable.isInCurrentTracking()) {\n observable.removeFromCurrentTracking();\n observable.addObserver(_tracker);\n dependenciesChanged = true;\n }\n }\n if (ObserverState.UP_TO_DATE != newDerivationState) {\n _tracker.setState(newDerivationState);\n }\n for (int i = _observables.size() - 1; i >= currentIndex; i--) {\n _observables.remove(i);\n }\n if (dependenciesChanged) {\n _tracker.replaceDependencies(_observables);\n }\n}\n"
|
"public static void init() {\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.crops, ConfigurationHandler.cropsPerCraft), \"String_Node_Str\", \"String_Node_Str\", 's', \"String_Node_Str\"));\n if (ConfigurationHandler.cropsPerCraft == 3) {\n GameRegistry.addShapelessRecipe(new ItemStack(net.minecraft.init.Items.stick, 6 / ConfigurationHandler.cropsPerCraft), new ItemStack(Items.crops), new ItemStack(Items.crops));\n } else {\n GameRegistry.addShapelessRecipe(new ItemStack(net.minecraft.init.Items.stick, 4 / ConfigurationHandler.cropsPerCraft), new ItemStack(Items.crops));\n }\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.seedAnalyzer, 1), \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", 's', \"String_Node_Str\", 'g', \"String_Node_Str\", 'b', net.minecraft.init.Blocks.stone_slab, 'p', \"String_Node_Str\", 'w', \"String_Node_Str\"));\n GameRegistry.addShapelessRecipe(new ItemStack((Item) Item.itemRegistry.getObject(\"String_Node_Str\")), new ItemStack(net.minecraft.init.Items.potato));\n GameRegistry.addShapelessRecipe(new ItemStack((Item) Item.itemRegistry.getObject(\"String_Node_Str\")), new ItemStack(net.minecraft.init.Items.carrot));\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.journal, 1), \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", 'c', Items.crops, 's', Names.OreDict.listAllseed, 'b', net.minecraft.init.Items.writable_book));\n GameRegistry.addRecipe(new RecipeJournal());\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.trowel, 1, 0), \"String_Node_Str\", \"String_Node_Str\", 's', \"String_Node_Str\", 'i', \"String_Node_Str\"));\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.magnifyingGlass, 1, 0), \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", 's', \"String_Node_Str\", 'g', \"String_Node_Str\"));\n if (ConfigurationHandler.enableWeeds && ConfigurationHandler.enableHandRake) {\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.handRake, 1, 0), \"String_Node_Str\", 'f', net.minecraft.init.Blocks.fence, 's', \"String_Node_Str\"));\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.handRake, 1, 1), \"String_Node_Str\", 'f', net.minecraft.init.Blocks.iron_bars, 's', \"String_Node_Str\"));\n }\n if (Items.handRake != null) {\n ((ItemBlockCustomWood) Item.getItemFromBlock(Blocks.blockWaterTank)).getSubItems(woodList);\n registerCustomWoodRecipes();\n RegisterHelper.removeRecipe(new ItemStack(net.minecraft.init.Items.bowl));\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(net.minecraft.init.Items.bowl, 4), \"String_Node_Str\", \"String_Node_Str\", 'w', Names.OreDict.slabWood));\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.sprinkler, 1), \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", 'w', \"String_Node_Str\", 'i', \"String_Node_Str\", 'b', net.minecraft.init.Blocks.iron_bars, 'c', net.minecraft.init.Items.bucket));\n }\n if (ConfigurationHandler.resourcePlants) {\n if (OreDictHelper.getNuggetForName(\"String_Node_Str\") instanceof ModItem) {\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(net.minecraft.init.Items.diamond, 1), \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", 'n', \"String_Node_Str\"));\n GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(OreDictHelper.getNuggetForName(\"String_Node_Str\"), 9), \"String_Node_Str\"));\n }\n if (OreDictHelper.getNuggetForName(\"String_Node_Str\") instanceof ModItem) {\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(net.minecraft.init.Items.emerald, 1), \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", 'n', \"String_Node_Str\"));\n GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(OreDictHelper.getNuggetForName(\"String_Node_Str\"), 9), \"String_Node_Str\"));\n }\n if (OreDictHelper.getNuggetForName(\"String_Node_Str\") instanceof ModItem) {\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(net.minecraft.init.Items.iron_ingot, 1), \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", 'n', \"String_Node_Str\"));\n GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(OreDictHelper.getNuggetForName(\"String_Node_Str\"), 9), \"String_Node_Str\"));\n }\n for (String[] data : Data.modResources) {\n String oreName = data[0];\n Item nuggetItem = OreDictHelper.getNuggetForName(oreName);\n if (nuggetItem != null && nuggetItem instanceof ModItem) {\n ItemStack nugget = new ItemStack(nuggetItem, 9, OreDictHelper.getNuggetMetaForName(oreName));\n ItemStack ingot = OreDictHelper.getIngot(oreName);\n if (ingot != null) {\n GameRegistry.addRecipe(new ShapedOreRecipe(ingot, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", 'n', \"String_Node_Str\" + oreName));\n }\n GameRegistry.addRecipe(new ShapelessOreRecipe(nugget, \"String_Node_Str\" + oreName));\n }\n }\n }\n LogHelper.debug(\"String_Node_Str\");\n}\n"
|
"public ExactRelation rewriteWithSubsampledErrorBounds() {\n if (!doesIncludeSample()) {\n return getOriginalRelation();\n }\n ExactRelation r = rewriteWithPartition(true);\n List<SelectElem> newElems = new ArrayList<SelectElem>();\n List<SelectElem> oldElems = ((AggregatedRelation) r).getElemList();\n for (int i = 0; i < oldElems.size(); i++) {\n SelectElem elem = oldElems.get(i);\n Optional<SelectElem> originalElem = Optional.absent();\n if (i < this.elems.size()) {\n originalElem = Optional.fromNullable(this.elems.get(i));\n }\n if (!elem.isagg()) {\n if (elem.aliasPresent() && elem.getAlias().equals(partitionColumnName())) {\n continue;\n }\n SelectElem newElem = null;\n if (elem.getAlias() == null) {\n Expr newExpr = elem.getExpr().withTableSubstituted(r.getAlias());\n newElem = new SelectElem(vc, newExpr, elem.getAlias());\n } else {\n newElem = new SelectElem(vc, new ColNameExpr(vc, elem.getAlias(), r.getAlias()), elem.getAlias());\n }\n newElems.add(newElem);\n } else {\n if (elem.getAlias().equals(partitionSizeAlias)) {\n continue;\n }\n if (!originalElem.isPresent()) {\n continue;\n }\n ColNameExpr est = new ColNameExpr(vc, elem.getAlias(), r.getAlias());\n ColNameExpr psize = new ColNameExpr(vc, partitionSizeAlias, r.getAlias());\n Expr averaged = null;\n Expr originalExpr = originalElem.get().getExpr();\n if (originalExpr.isCountDistinct()) {\n averaged = FuncExpr.round(FuncExpr.avg(est));\n } else if (originalExpr.isMax()) {\n averaged = FuncExpr.max(est);\n } else if (originalExpr.isMin()) {\n averaged = FuncExpr.min(est);\n } else {\n averaged = BinaryOpExpr.from(vc, FuncExpr.sum(BinaryOpExpr.from(vc, est, psize, \"String_Node_Str\")), FuncExpr.sum(psize), \"String_Node_Str\");\n if (originalElem.get().getExpr().isCount()) {\n averaged = FuncExpr.round(averaged);\n }\n }\n newElems.add(new SelectElem(vc, averaged, elem.getAlias()));\n if (originalExpr.isMax() || originalExpr.isMin()) {\n } else {\n Expr error = BinaryOpExpr.from(vc, BinaryOpExpr.from(vc, FuncExpr.stddev(est), FuncExpr.sqrt(FuncExpr.avg(psize)), \"String_Node_Str\"), FuncExpr.sqrt(FuncExpr.sum(psize)), \"String_Node_Str\");\n error = BinaryOpExpr.from(vc, error, ConstantExpr.from(vc, confidenceIntervalMultiplier()), \"String_Node_Str\");\n newElems.add(new SelectElem(vc, error, Relation.errorBoundColumn(elem.getAlias())));\n }\n }\n }\n List<Expr> newGroupby = new ArrayList<Expr>();\n for (SelectElem elem : elems) {\n if (!elem.isagg()) {\n if (elem.aliasPresent()) {\n if (!elem.getAlias().equals(partitionColumnName())) {\n newGroupby.add(new ColNameExpr(vc, elem.getAlias(), r.getAlias()));\n }\n } else {\n if (!elem.getExpr().toString().equals(partitionColumnName())) {\n newGroupby.add(elem.getExpr().withTableSubstituted(r.getAlias()));\n }\n }\n }\n }\n if (newGroupby.size() > 0) {\n r = new GroupedRelation(vc, r, newGroupby);\n }\n r = new AggregatedRelation(vc, r, newElems);\n r.setAlias(getAlias());\n return r;\n}\n"
|
"private void addProvider(File appDir, ClassLoader classLoader) {\n File manifestFile = new File(appDir, \"String_Node_Str\" + File.separator + \"String_Node_Str\");\n String appDirPath = \"String_Node_Str\";\n Manifest mf;\n if (manifestFile != null) {\n try {\n appDirPath = appDir.getCanonicalPath();\n FileInputStream fis = new FileInputStream(manifestFile);\n mf = new Manifest(fis);\n } catch (IOException ex) {\n if (logger.isLoggable(Level.FINE)) {\n logger.fine(\"String_Node_Str\" + \"String_Node_Str\" + File.separator + \"String_Node_Str\" + \"String_Node_Str\" + appDirPath);\n logger.fine(ex.getLocalizedMessage());\n }\n return;\n }\n if (mf != null) {\n processManifest(mf, classLoader);\n }\n }\n handleFutureStatsProviders();\n}\n"
|
"private static List<ElementParameter> getParametersFromForm(IElement element, boolean isInitializing, EComponentCategory category, ComponentProperties rootProperty, Properties compProperties, String parentPropertiesPath, Form form, Widget parentWidget, AtomicInteger lastRowNum) {\n List<ElementParameter> elementParameters = new ArrayList<>();\n List<String> parameterNames = new ArrayList<>();\n EComponentCategory compCategory = category;\n if (compCategory == null) {\n compCategory = EComponentCategory.BASIC;\n }\n AtomicInteger lastRN = lastRowNum;\n if (lastRN == null) {\n lastRN = new AtomicInteger();\n }\n if (form == null) {\n return elementParameters;\n }\n Properties componentProperties = compProperties;\n if (componentProperties == null) {\n componentProperties = form.getProperties();\n }\n if (element instanceof INode) {\n INode node = (INode) element;\n if (node.getComponentProperties() == null) {\n node.setComponentProperties(rootProperty);\n }\n }\n Collection<Widget> formWidgets = form.getWidgets();\n for (Widget widget : formWidgets) {\n NamedThing widgetProperty = widget.getContent();\n String propertiesPath = getPropertiesPath(parentPropertiesPath, null);\n if (widgetProperty instanceof Form) {\n Form subForm = (Form) widgetProperty;\n Properties subProperties = subForm.getProperties();\n if (!isSameComponentProperties(componentProperties, widgetProperty)) {\n propertiesPath = getPropertiesPath(parentPropertiesPath, subProperties.getName());\n }\n elementParameters.addAll(getParametersFromForm(element, isInitializing, compCategory, rootProperty, subProperties, propertiesPath, subForm, widget, lastRN));\n continue;\n }\n GenericElementParameter param = new GenericElementParameter(element, rootProperty, form, widget, getComponentService());\n String parameterName = propertiesPath.concat(param.getName());\n param.setName(parameterName);\n param.setCategory(compCategory);\n param.setShow(parentWidget == null ? !widget.isHidden() : !parentWidget.isHidden() && !widget.isHidden());\n int rowNum = 0;\n if (widget.getOrder() != 1) {\n rowNum = lastRN.get();\n } else {\n rowNum = widget.getRow();\n if (parentWidget != null) {\n rowNum += parentWidget.getRow();\n }\n rowNum = rowNum + lastRN.get();\n }\n param.setNumRow(rowNum);\n lastRN.set(rowNum);\n EParameterFieldType fieldType = getFieldType(widget, widgetProperty);\n param.setFieldType(fieldType != null ? fieldType : EParameterFieldType.TEXT);\n if (widgetProperty instanceof SchemaProperty) {\n boolean found = false;\n param.setContext(EConnectionType.FLOW_MAIN.getName());\n for (Connector connector : rootProperty.getPossibleConnectors(true)) {\n if (!(((SchemaProperty) widgetProperty).getValue() instanceof Schema)) {\n continue;\n }\n if (connector instanceof PropertyPathConnector) {\n String linkedSchema = ((PropertyPathConnector) connector).getPropertyPath() + \"String_Node_Str\";\n if (parameterName.equals(linkedSchema)) {\n found = true;\n param.setContext(connector.getName());\n IElementParameterDefaultValue defaultValue = new ElementParameterDefaultValue();\n Schema schema = ((SchemaProperty) widgetProperty).getValue();\n defaultValue.setDefaultValue(new Schema.Parser().parse(schema.toString()));\n param.getDefaultValues().add(defaultValue);\n }\n }\n }\n if (!found) {\n for (Connector connector : rootProperty.getPossibleConnectors(false)) {\n if (!(((SchemaProperty) widgetProperty).getValue() instanceof Schema)) {\n continue;\n }\n if (connector instanceof PropertyPathConnector) {\n String linkedSchema = ((PropertyPathConnector) connector).getPropertyPath() + \"String_Node_Str\";\n if (parameterName.equals(linkedSchema)) {\n if (GenericNodeConnector.INPUT_CONNECTOR.equals(connector.getName())) {\n param.setContext(EConnectionType.FLOW_MAIN.getName());\n } else {\n param.setContext(connector.getName());\n }\n IElementParameterDefaultValue defaultValue = new ElementParameterDefaultValue();\n Schema schema = ((SchemaProperty) widgetProperty).getValue();\n defaultValue.setDefaultValue(new Schema.Parser().parse(schema.toString()));\n param.getDefaultValues().add(defaultValue);\n }\n }\n }\n }\n }\n if (widgetProperty instanceof PresentationItem) {\n param.setValue(widgetProperty.getDisplayName());\n } else if (widgetProperty instanceof Property) {\n Property property = (Property) widgetProperty;\n param.setRequired(property.isRequired());\n param.setValue(getParameterValue(element, property, fieldType, isInitializing));\n boolean isNameProperty = IGenericConstants.NAME_PROPERTY.equals(param.getParameterName());\n if (EParameterFieldType.NAME_SELECTION_AREA.equals(fieldType) || EParameterFieldType.JSON_TABLE.equals(fieldType) || EParameterFieldType.CLOSED_LIST.equals(fieldType) || EParameterFieldType.CHECK.equals(fieldType) || isNameProperty) {\n param.setSupportContext(false);\n } else {\n param.setSupportContext(isSupportContext(property));\n }\n property.setTaggedValue(IComponentConstants.SUPPORT_CONTEXT, param.isSupportContext());\n Object cmTV = property.getTaggedValue(IGenericConstants.IS_CONTEXT_MODE);\n param.setReadOnly(Boolean.valueOf(String.valueOf(cmTV)));\n boolean isDynamic = Boolean.valueOf(String.valueOf(property.getTaggedValue(IGenericConstants.IS_DYNAMIC)));\n param.setContextMode(isDynamic);\n if (element instanceof FakeElement && EParameterFieldType.FILE.equals(fieldType) && GenericTypeUtils.isObjectType(property)) {\n property.setTaggedValue(IGenericConstants.DND_ADD_QUOTES, true);\n }\n List<?> values = property.getPossibleValues();\n if (values != null || EParameterFieldType.CLOSED_LIST.equals(fieldType)) {\n if (values == null) {\n values = Collections.emptyList();\n }\n param.setPossibleValues(values);\n List<String> possVals = new ArrayList<>();\n List<String> possValsDisplay = new ArrayList<>();\n for (Object obj : values) {\n String value = null;\n String valueDisplay = null;\n if (obj instanceof NamedThing) {\n NamedThing nal = (NamedThing) obj;\n value = nal.getName();\n valueDisplay = nal.getDisplayName();\n } else {\n value = String.valueOf(obj);\n valueDisplay = String.valueOf(obj);\n }\n String pvDisplayName = property.getPossibleValuesDisplayName(obj);\n if (StringUtils.isNotBlank(pvDisplayName) && !\"String_Node_Str\".equals(pvDisplayName)) {\n valueDisplay = pvDisplayName;\n }\n possVals.add(value);\n possValsDisplay.add(valueDisplay);\n }\n param.setListItemsDisplayName(possValsDisplay.toArray(new String[0]));\n param.setListItemsDisplayCodeName(possValsDisplay.toArray(new String[0]));\n param.setListItemsValue(possVals.toArray(new String[0]));\n }\n } else if (fieldType != null && fieldType.equals(EParameterFieldType.TABLE) && widgetProperty instanceof Properties) {\n Properties table = (Properties) widgetProperty;\n Form mainForm = table.getForm(Form.MAIN);\n param.setDisplayName(mainForm.getTitle());\n List<ElementParameter> parameters = getParametersFromForm(new FakeElement(\"String_Node_Str\"), mainForm);\n param.setSupportContext(false);\n List<String> codeNames = new ArrayList<>();\n List<String> possValsDisplay = new ArrayList<>();\n for (ElementParameter curParam : parameters) {\n curParam.setFilter(null);\n curParam.setContext(null);\n curParam.setShowIf(null);\n curParam.setNotShowIf(null);\n curParam.setReadOnlyIf(null);\n curParam.setNotReadOnlyIf(null);\n curParam.setNoContextAssist(false);\n curParam.setRaw(false);\n curParam.setReadOnly(false);\n fillDefaultValsForListType(curParam);\n codeNames.add(curParam.getName());\n possValsDisplay.add(curParam.getDisplayName());\n }\n param.setListItemsDisplayName(possValsDisplay.toArray(new String[0]));\n param.setListItemsDisplayCodeName(codeNames.toArray(new String[0]));\n param.setListItemsValue(parameters.toArray(new ElementParameter[0]));\n String[] listItemsShowIf = new String[parameters.size()];\n String[] listItemsNotShowIf = new String[parameters.size()];\n param.setListItemsShowIf(listItemsShowIf);\n param.setListItemsNotShowIf(listItemsNotShowIf);\n param.setValue(GenericTableUtils.getTableValues(table, param));\n param.setBasedOnSchema(Boolean.valueOf(String.valueOf(widget.getConfigurationValue(Widget.HIDE_TOOLBAR_WIDGET_CONF))));\n }\n if (!param.isReadOnly()) {\n param.setReadOnly(element.isReadOnly());\n }\n param.setSerialized(true);\n param.setDynamicSettings(true);\n if (!parameterNames.contains(parameterName)) {\n elementParameters.add(param);\n parameterNames.add(parameterName);\n }\n }\n return elementParameters;\n}\n"
|
"private void resume() {\n if (!waitingForCallback && isConnectedToNetwork() && lastBatch != null) {\n handler.post(new Runnable() {\n public void run() {\n makeNetworkRequest(lastBatch, false);\n }\n });\n } else {\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\", waitingForCallback, isConnectedToNetwork(), lastBatch);\n }\n });\n}\n"
|
"public TreeParent getServerRoot() {\n if (this.serverRoot == null) {\n if (this.type == TreeObject._SERVER_)\n return (TreeParent) this;\n else if (this.type == TreeObject._ROOT_)\n if (((TreeParent) this).getChildren().length > 0)\n return (TreeParent) ((TreeParent) this).getChildren()[0];\n }\n return serverRoot;\n}\n"
|
"private boolean isValidPartitionKey(String key) {\n try {\n LogPartitionType.valueOf(key.toUpperCase());\n } catch (IllegalArgumentException | NullPointerException e) {\n LOG.error(\"String_Node_Str\", key, e.getMessage());\n return false;\n }\n return true;\n}\n"
|
"private Iterator<Triple> execTriples() {\n HttpQuery httpQuery = makeHttpQuery();\n httpQuery.setAccept(modelContentType);\n InputStream in = httpQuery.exec();\n String actualContentType = httpQuery.getContentType();\n if (actualContentType == null || actualContentType.equals(\"String_Node_Str\")) {\n actualContentType = modelContentType;\n }\n Lang lang = WebContent.contentTypeToLang(actualContentType);\n if (!RDFLanguages.isTriples(lang))\n throw new QueryException(\"String_Node_Str\" + actualContentType + \"String_Node_Str\");\n return RiotReader.createIteratorTriples(in, lang, null);\n}\n"
|
"public static void main(String[] args) throws Exception {\n System.out.println(\"String_Node_Str\");\n Logging.start(Logging.LEVEL_ERROR);\n try {\n TimeSync.initializeLocal(60000, 50);\n } catch (Exception ex) {\n ex.printStackTrace();\n System.exit(1);\n }\n StringSet gids = new StringSet();\n gids.add(\"String_Node_Str\");\n creds = new UserCredentials(\"String_Node_Str\", gids, \"String_Node_Str\");\n RPCNIOSocketClient rpcClient = new RPCNIOSocketClient(null, 2 * 60 * 1000, 5 * 60 * 1000);\n rpcClient.start();\n if (args.length != 1)\n usage();\n if (args[0].indexOf(\"String_Node_Str\") == -1) {\n error(\"String_Node_Str\");\n } else {\n for (String adr : args[0].split(\"String_Node_Str\")) {\n participants.add(new DIRClient(rpcClient, parseAddress(adr)));\n }\n }\n setupRandomMasterDIR();\n assert (LOOKUP_PERCENTAGE + DELETE_PERCENTAGE + INSERT_PERCENTAGE == 100);\n long start = System.currentTimeMillis();\n long operationCount = 0;\n long s = start;\n System.out.println(\"String_Node_Str\");\n try {\n while (true) {\n long now = System.currentTimeMillis();\n if ((start + CHECK_INTERVAL) < now) {\n long diff = (System.currentTimeMillis() - s) / 1000;\n System.out.println(\"String_Node_Str\" + (diff - diff % 60 - ((diff - diff % 60) / 60) % 60) / 3600 + \"String_Node_Str\" + ((diff - diff % 60) / 60) % 60 + \"String_Node_Str\" + diff % 60 + \"String_Node_Str\");\n System.out.println(\"String_Node_Str\" + ((double) (operationCount / (CHECK_INTERVAL / 1000))) + \"String_Node_Str\");\n operationCount = 0;\n System.out.println(\"String_Node_Str\" + masterChanges + \"String_Node_Str\");\n masterChanges = 0;\n performConsistencyCheck();\n start = System.currentTimeMillis();\n setupRandomMasterDIR();\n } else {\n try {\n if (random.nextBoolean())\n performAddressMappingOperation();\n else\n performServiceOperation();\n operationCount++;\n } catch (RedirectException e) {\n System.out.println(\"String_Node_Str\" + viewID + \"String_Node_Str\" + actSeq + \"String_Node_Str\");\n setupRandomMasterDIR();\n } catch (IOException e) {\n if (e.getMessage().equals(\"String_Node_Str\")) {\n System.err.println(\"String_Node_Str\" + kind + \"String_Node_Str\" + uuid + \"String_Node_Str\");\n for (DIRClient c : participants) {\n switch(kind) {\n case 0:\n try {\n performAddressMappingLookup(uuid, c);\n System.err.println(\"String_Node_Str\" + c.getDefaultServerAddress());\n } catch (Exception e1) {\n System.err.println(\"String_Node_Str\" + c.getDefaultServerAddress());\n }\n break;\n case 1:\n try {\n performServiceLookup(uuid, c);\n System.err.println(\"String_Node_Str\" + c.getDefaultServerAddress());\n } catch (Exception e1) {\n System.err.println(\"String_Node_Str\" + c.getDefaultServerAddress());\n }\n break;\n case 2:\n try {\n performAddressMappingLookup(uuid, c);\n System.err.println(\"String_Node_Str\" + c.getDefaultServerAddress());\n } catch (Exception e1) {\n System.err.println(\"String_Node_Str\" + c.getDefaultServerAddress());\n }\n break;\n case 3:\n try {\n performServiceLookup(uuid, c);\n System.err.println(\"String_Node_Str\" + c.getDefaultServerAddress());\n } catch (Exception e1) {\n System.err.println(\"String_Node_Str\" + c.getDefaultServerAddress());\n }\n break;\n default:\n throw e;\n }\n }\n } else\n throw e;\n }\n }\n }\n } catch (FailureException e) {\n System.err.println(\"String_Node_Str\" + e.kind + \"String_Node_Str\" + t.get(e.getMessage()) + \"String_Node_Str\" + (viewID - 1) + \"String_Node_Str\" + (t.get(e.getMessage()) - (time - lastSeq)) + \"String_Node_Str\" + time + \"String_Node_Str\" + e.getMessage());\n String data = (e.kind == 0) ? availableAddressMappings.get(e.getMessage()).toString() : availableServices.get(e.getMessage()).toString();\n System.err.println(\"String_Node_Str\" + data);\n for (DIRClient c : participants) {\n try {\n switch(e.kind) {\n case 0:\n performAddressMappingLookup(e.getMessage(), c);\n break;\n case 1:\n performServiceLookup(e.getMessage(), c);\n break;\n default:\n assert (false);\n }\n System.err.println(\"String_Node_Str\" + c.getDefaultServerAddress());\n } catch (Exception e2) {\n System.err.println(\"String_Node_Str\" + c.getDefaultServerAddress());\n }\n }\n }\n}\n"
|
"private FlowScope traverseObjectLiteral(Node n, FlowScope scope) {\n ObjectType objectType = (ObjectType) n.getJSType();\n Preconditions.checkNotNull(objectType);\n if (objectType.hasReferenceName()) {\n return scope;\n }\n for (Node name = n.getFirstChild(); name != null; name = name.getNext().getNext()) {\n Node value = name.getNext();\n scope = traverse(name, scope);\n scope = traverse(value, scope);\n String memberName = NodeUtil.getStringValue(name);\n if (memberName != null) {\n objectType.defineInferredProperty(memberName, getJSType(value), false);\n } else {\n n.setJSType(getNativeType(UNKNOWN_TYPE));\n return scope;\n }\n }\n return scope;\n}\n"
|
"public Structure parsePDBFile(BufferedReader buf) throws IOException {\n loadMaxAtoms = params.getMaxAtoms();\n atomCAThreshold = params.getAtomCaThreshold();\n allModels = new ArrayList<>();\n structure = new StructureImpl();\n currentModel = null;\n currentChain = null;\n currentGroup = null;\n startOfMolecule = true;\n startOfModel = true;\n seqResChains = new ArrayList<Chain>();\n siteMap = new LinkedHashMap<String, Site>();\n pdbHeader = new PDBHeader();\n connects = new ArrayList<Map<String, Integer>>();\n previousContinuationField = \"String_Node_Str\";\n continuationField = \"String_Node_Str\";\n continuationString = \"String_Node_Str\";\n current_compound = null;\n sourceLines.clear();\n compndLines.clear();\n isLastCompndLine = false;\n isLastSourceLine = false;\n prevMolId = -1;\n entities.clear();\n helixList.clear();\n strandList.clear();\n turnList.clear();\n lengthCheck = -1;\n atomCount = 0;\n atomOverflow = false;\n siteToResidueMap.clear();\n blankChainIdsPresent = false;\n parseCAonly = params.isParseCAOnly();\n String line = null;\n while ((line = buf.readLine()) != null) {\n if (line.equals(\"String_Node_Str\") || (line.equals(NEWLINE))) {\n continue;\n }\n if (line.startsWith(\"String_Node_Str\")) {\n continue;\n }\n if (line.length() < 6 && !line.startsWith(\"String_Node_Str\")) {\n logger.info(\"String_Node_Str\" + line + \"String_Node_Str\");\n continue;\n }\n String recordName = null;\n if (line.length() < 6)\n recordName = line.trim();\n else\n recordName = line.substring(0, 6).trim();\n try {\n if (recordName.equals(\"String_Node_Str\"))\n pdb_HELIX_Handler(line);\n else if (recordName.equals(\"String_Node_Str\"))\n pdb_SHEET_Handler(line);\n else if (recordName.equals(\"String_Node_Str\"))\n pdb_TURN_Handler(line);\n } else {\n }\n }\n makeCompounds(compndLines, sourceLines);\n triggerEndFileChecks();\n if (params.shouldCreateAtomBonds()) {\n formBonds();\n }\n if (params.shouldCreateAtomCharges()) {\n addCharges();\n }\n if (params.isParseSecStruc() && !params.isHeaderOnly())\n setSecStruc();\n StructureTools.cleanUpAltLocs(structure);\n return structure;\n}\n"
|
"public void onEventAdded(ShelfEvent se) {\n model.resetModel(NavigationEnum.EVENT_PREVIEW, getLoggedUser(), null, null, null, null, se.getEvent());\n pushEvent(Events.EVENT_DISPLAYED_EVENT);\n}\n"
|
"public void execute(final CommandSender sender, final CommandArgs args) throws ActionNotPermitedException, PlayerNotFound {\n float amount = 0;\n Player target = null;\n final HashMap<String, String> replace = new HashMap<String, String>();\n boolean self = false;\n if (args.hasFlag('p')) {\n target = Utils.getPlayer(args.getValueFlag('p'));\n } else {\n target = (Player) sender;\n self = true;\n }\n if (0 < args.length) {\n if (!args.hasFlag('t')) {\n try {\n amount = args.getFloat(1);\n } catch (final NumberFormatException e) {\n replace.put(\"String_Node_Str\", args.getString(0));\n Utils.I18n(\"String_Node_Str\", replace);\n return;\n }\n }\n } else {\n if (Utils.isPlayer(sender, true)) {\n if (args.hasFlag('t')) {\n target = (Player) sender;\n replace.put(\"String_Node_Str\", String.valueOf(target.getTotalExperience()));\n sender.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n return;\n }\n } else {\n return;\n }\n }\n if (target == null) {\n return;\n }\n replace.put(\"String_Node_Str\", String.valueOf(amount));\n final Player taskTarget = target;\n final float amountXp = amount;\n if (args.hasFlag('d')) {\n final Location loc = target.getLocation();\n loc.setX(loc.getX() + 2);\n ACPluginManager.scheduleSyncTask(new Runnable() {\n public void run() {\n taskTarget.getLocation().getWorld().spawn(loc, ExperienceOrb.class).setExperience((int) amountXp);\n }\n });\n if (self) {\n target.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n } else {\n replace.put(\"String_Node_Str\", Utils.getPlayerName(target));\n target.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n sender.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n }\n } else if (args.hasFlag('a')) {\n ACPluginManager.scheduleSyncTask(new Runnable() {\n public void run() {\n taskTarget.giveExp((int) amountXp);\n }\n });\n if (self) {\n target.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n } else {\n replace.put(\"String_Node_Str\", Utils.getPlayerName(target));\n sender.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n target.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n }\n } else if (args.hasFlag('p')) {\n final float exp = (amount > 1 ? 1 : amount);\n ACPluginManager.scheduleSyncTask(new Runnable() {\n public void run() {\n taskTarget.setExp(exp);\n }\n });\n replace.put(\"String_Node_Str\", String.valueOf(exp * 100.0F));\n if (self) {\n target.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n } else {\n replace.put(\"String_Node_Str\", Utils.getPlayerName(target));\n target.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n sender.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n }\n } else if (args.hasFlag('l')) {\n ACPluginManager.scheduleSyncTask(new Runnable() {\n public void run() {\n taskTarget.setLevel((int) amountXp);\n }\n });\n if (self) {\n target.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n } else {\n replace.put(\"String_Node_Str\", Utils.getPlayerName(target));\n target.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n sender.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n }\n } else if (args.hasFlag('t')) {\n replace.put(\"String_Node_Str\", String.valueOf(target.getTotalExperience()));\n if (self) {\n sender.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n } else {\n replace.put(\"String_Node_Str\", Utils.getPlayerName(target));\n sender.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n }\n }\n}\n"
|
"public static void generateFormStartTag(PrintWriter writer, Form form, boolean responsiveMode, boolean design) {\n writer.print(String.format(\"String_Node_Str\", form.getName()));\n if (Utils.getAsBoolean(Settings.getInstance().getProperty(\"String_Node_Str\", \"String_Node_Str\"))) {\n writer.print(String.format(\"String_Node_Str\", realFormName));\n }\n if (!form.isResponsiveLayout() && !responsiveMode) {\n writer.print(\"String_Node_Str\");\n } else if (design) {\n writer.print(\"String_Node_Str\");\n }\n writer.print(\"String_Node_Str\");\n if (!isTableOrListView(form)) {\n writer.print(\"String_Node_Str\");\n }\n if (form.getStyleClass() != null) {\n writer.print(\"String_Node_Str\");\n writer.print(form.getStyleClass());\n writer.print(\"String_Node_Str\");\n }\n writer.println(\"String_Node_Str\");\n}\n"
|
"public void widgetSelected(final SelectionEvent arg0) {\n if (updateMin())\n controller.update(new ModelEvent(this, ModelPart.ATTRIBUTE_TYPE, attribute));\n}\n"
|
"public Collection<Measurements> find(String tenantId, String name, Map<String, String> dimensions, DateTime startTime, DateTime endTime) throws Exception {\n String serieNameRegex = buildSerieNameRegex(tenantId, name, dimensions);\n String timePart = Utils.WhereClauseBuilder.buildTimePart(startTime, endTime);\n String query = String.format(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", serieNameRegex, timePart);\n logger.debug(\"String_Node_Str\", query);\n List<Serie> result = this.influxDB.Query(this.config.influxDB.getName(), query, TimeUnit.MILLISECONDS);\n List<Measurements> measurementsList = new LinkedList<>();\n for (Serie serie : result) {\n String serieName = serie.getName();\n if (!serieNameMatcher(serieName)) {\n logger.warn(\"String_Node_Str\", serieName);\n continue;\n }\n Utils.SerieNameConverter serieNameConverter = new Utils.SerieNameConverter(serieName);\n Measurements measurements = new Measurements();\n measurements.setName(serieNameConverter.getMetricName());\n measurements.setDimensions(serieNameConverter.getDimensions());\n List<Object[]> valObjArryList = new LinkedList<>();\n final String[] colNames = serie.getColumns();\n final List<Map<String, Object>> rows = serie.getRows();\n for (Map<String, Object> row : rows) {\n Object[] objArry = new Object[3];\n objArry[0] = ((Double) row.get(colNames[1])).longValue();\n Double timeDouble = (Double) row.get(colNames[0]);\n objArry[1] = DATETIME_FORMATTER.print(timeDouble.longValue());\n objArry[2] = (Double) row.get(colNames[2]);\n valObjArryList.add(objArry);\n }\n measurements.setMeasurements(valObjArryList);\n measurementsList.add(measurements);\n }\n return measurementsList;\n}\n"
|
"public DisplayMode getCurrentDisplayMode() {\n try {\n if (checkService()) {\n return sService.getCurrentDisplayMode();\n }\n } catch (RemoteException e) {\n }\n return null;\n}\n"
|
"private Map<Position, ShotFrameController> initShotFrameManager(List<Camera> cameraList) throws ServiceException {\n List<Position> positionList = new ArrayList<>();\n for (int i = 0; i < cameraList.size(); i++) {\n Camera c = cameraList.get(i);\n Position p = profileService.getPositionOfCameraOfProfile(c);\n if (p != null) {\n LOGGER.debug(\"String_Node_Str\");\n positionList.add(p);\n } else {\n LOGGER.info(\"String_Node_Str\" + c.getId());\n cameraHandler.removeCameraFromList(c);\n }\n }\n int positionNumber = profileService.getAllPairCameraPositionOfProfile().size();\n if (positionList.size() != positionNumber) {\n LOGGER.info(\"String_Node_Str\" + positionList.size() + \"String_Node_Str\" + positionNumber);\n throw new ServiceException(\"String_Node_Str\");\n }\n LOGGER.info(\"String_Node_Str\" + positionList.size() + \"String_Node_Str\" + positionNumber);\n if (positionList.isEmpty()) {\n LOGGER.debug(\"String_Node_Str\");\n return null;\n }\n Map<Position, ShotFrameController> positionShotFrameMap = shotFrameManager.init(positionList);\n if (positionShotFrameMap == null || positionShotFrameMap.isEmpty()) {\n LOGGER.error(\"String_Node_Str\");\n throw new ServiceException(\"String_Node_Str\");\n }\n return positionShotFrameMap;\n}\n"
|
"protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {\n mainForm.setStandaloneRendering(true);\n mainForm.setMultipartEnabled(true);\n qtiEl = new AssessmentItemFormItem(\"String_Node_Str\");\n formLayout.add(\"String_Node_Str\", qtiEl);\n ResourceLocator fileResourceLocator = new PathResourceLocator(fUnzippedDirRoot.toPath());\n final ResourceLocator inputResourceLocator = ImsQTI21Resource.createResolvingResourceLocator(fileResourceLocator);\n qtiEl.setResourceLocator(inputResourceLocator);\n qtiEl.setItemSessionController(itemSessionController);\n File manifestPath = new File(fUnzippedDirRoot, filename);\n qtiEl.setAssessmentObjectUri(manifestPath.toURI());\n qtiEl.setCandidateSessionContext(AssessmentItemDisplayController.this);\n qtiEl.setMapperUri(mapperUri);\n}\n"
|
"public void initialise() {\n availableAssetDropdown = find(\"String_Node_Str\", UIDropdownScrollable.class);\n editorTreeView = find(\"String_Node_Str\", UITreeView.class);\n selectedScreenContainer = find(\"String_Node_Str\", UIBox.class);\n availableAssetList.addAll(assetManager.getAvailableAssets(UIElement.class).stream().collect(Collectors.toList()));\n availableAssetList.removeIf(asset -> asset.getRootUrn().equals(ASSET_URI));\n availableAssetList.sort(Comparator.comparing(ResourceUrn::toString));\n availableAssetDropdown.setOptions(availableAssetList);\n availableAssetDropdown.bindSelection(new Binding<ResourceUrn>() {\n public ResourceUrn get() {\n return selectedUrn;\n }\n public void set(ResourceUrn value) {\n if (selectedUrn != value) {\n selectFile(value);\n }\n }\n });\n editorTreeView.subscribeTreeViewUpdate(() -> {\n JsonTree tree = (JsonTree) (editorTreeView.getModel().getItem(0).getRoot());\n if (editorHistoryPosition < editorHistory.size() - 1) {\n editorHistory = editorHistory.subList(0, editorHistoryPosition + 1);\n }\n editorHistory.add(tree);\n editorHistoryPosition++;\n updateWidget(tree);\n });\n editorTreeView.subscribeItemMouseClick((event, item) -> {\n if (event.getMouseButton() == MouseInput.MOUSE_RIGHT) {\n if (!getManager().isOpen(ContextMenuScreen.ASSET_URI)) {\n getManager().pushScreen(ContextMenuScreen.ASSET_URI, ContextMenuScreen.class);\n }\n ((JsonTree) item).setSelected(true);\n ContextMenuBuilder contextMenuBuilder = new ContextMenuBuilder();\n contextMenuBuilder.addOption(OPTION_COPY, this::copy, (JsonTree) item);\n contextMenuBuilder.addOption(OPTION_PASTE, this::paste, (JsonTree) item);\n if (((JsonTree) item).getValue().getType() == JsonTreeNode.ElementType.ARRAY && ((JsonTree) item).getValue().getKey().equals(\"String_Node_Str\")) {\n options.add(OPTION_ADD_WIDGET);\n }\n contextMenuScreen.setList(options);\n contextMenuScreen.setMenuPosition(event.getMouse().getPosition());\n contextMenuScreen.bindSelection(new Binding() {\n public Object get() {\n return null;\n }\n public void set(Object value) {\n getManager().closeScreen(ContextMenuScreen.ASSET_URI);\n ((JsonTree) item).setSelected(false);\n if (value.equals(OPTION_COPY)) {\n editorTreeView.copy(item);\n } else if (value.equals(OPTION_PASTE)) {\n editorTreeView.paste(item);\n } else if (value.equals(OPTION_ADD_WIDGET)) {\n addWidget((JsonTree) item);\n } else {\n throw new IllegalStateException(String.format(\"String_Node_Str\", value));\n }\n }\n });\n contextMenuScreen.subscribeSelection(() -> {\n ((JsonTree) item).setSelected(false);\n });\n }\n });\n WidgetUtil.trySubscribe(this, \"String_Node_Str\", button -> {\n getManager().pushScreen(NUIEditorSettingsScreen.ASSET_URI, NUIEditorSettingsScreen.class);\n });\n WidgetUtil.trySubscribe(this, \"String_Node_Str\", button -> {\n copyJson();\n });\n WidgetUtil.trySubscribe(this, \"String_Node_Str\", button -> {\n pasteJson();\n });\n WidgetUtil.trySubscribe(this, \"String_Node_Str\", button -> {\n undo();\n });\n WidgetUtil.trySubscribe(this, \"String_Node_Str\", button -> {\n redo();\n });\n}\n"
|
"public void addOrUpdateItem(Item item, boolean fromMigration) {\n if (!loaded) {\n loadRelations();\n }\n ProcessType processType = null;\n if (item instanceof ProcessItem) {\n processType = ((ProcessItem) item).getProcess();\n }\n if (item instanceof JobletProcessItem) {\n processType = ((JobletProcessItem) item).getJobletProcess();\n }\n if (processType != null) {\n boolean relationsModified = true;\n Relation relation = new Relation();\n relation.setId(item.getProperty().getId());\n relation.setType(getTypeFromItem(item));\n relation.setVersion(item.getProperty().getVersion());\n Set<Relation> oldProjectRelations = null;\n if (currentProjectItemsRelations.containsKey(relation)) {\n oldProjectRelations = new HashSet<Relation>(currentProjectItemsRelations.get(relation));\n currentProjectItemsRelations.get(relation).clear();\n }\n clearItemsRelations(item);\n Boolean builtIn = null;\n String currentValue = null;\n String relationType = null;\n for (Object o : processType.getContext()) {\n ContextType context = (ContextType) o;\n for (Object o2 : context.getContextParameter()) {\n ContextParameterType contextParam = (ContextParameterType) o2;\n if (!StringUtils.isEmpty(contextParam.getRepositoryContextId())) {\n addRelationShip(item, contextParam.getRepositoryContextId(), LATEST_VERSION, CONTEXT_RELATION);\n }\n }\n }\n if (processType.getParameters() != null) {\n if (processType.getParameters().getRoutinesParameter() != null) {\n for (Object o : processType.getParameters().getRoutinesParameter()) {\n RoutinesParameterType itemInfor = (RoutinesParameterType) o;\n addRelationShip(item, itemInfor.getName(), LATEST_VERSION, ROUTINE_RELATION);\n }\n }\n for (Object o : processType.getParameters().getElementParameter()) {\n if (o instanceof ElementParameterType) {\n ElementParameterType param = (ElementParameterType) o;\n if (param.getName().startsWith(\"String_Node_Str\")) {\n relationType = SCHEMA_RELATION;\n } else if (param.getName().startsWith(\"String_Node_Str\")) {\n relationType = PROPERTY_RELATION;\n } else if (param.getName().startsWith(\"String_Node_Str\")) {\n relationType = VALIDATION_RULE_RELATION;\n } else {\n builtIn = null;\n currentValue = null;\n }\n if (param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\")) {\n builtIn = true;\n if (param.getValue().equals(\"String_Node_Str\")) {\n builtIn = false;\n }\n }\n if (param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\")) {\n currentValue = param.getValue();\n }\n if (builtIn != null && currentValue != null) {\n if (!builtIn) {\n addRelationShip(item, currentValue, LATEST_VERSION, relationType);\n }\n builtIn = null;\n currentValue = null;\n }\n }\n }\n }\n List<String> jobletsComponentsList = new ArrayList<String>();\n IComponentsService compService = (IComponentsService) GlobalServiceRegister.getDefault().getService(IComponentsService.class);\n for (IComponent component : compService.getComponentsFactory().getComponents()) {\n if (component.getComponentType() == EComponentType.JOBLET) {\n jobletsComponentsList.add(component.getName());\n }\n }\n builtIn = null;\n currentValue = null;\n for (Object o : processType.getNode()) {\n if (o instanceof NodeType) {\n NodeType currentNode = (NodeType) o;\n for (Object o2 : currentNode.getElementParameter()) {\n if (o2 instanceof ElementParameterType) {\n ElementParameterType param = (ElementParameterType) o2;\n if (param.getName().startsWith(\"String_Node_Str\")) {\n relationType = QUERY_RELATION;\n } else if (param.getName().startsWith(\"String_Node_Str\") || param.getName().startsWith(\"String_Node_Str\")) {\n relationType = SCHEMA_RELATION;\n } else if (param.getName().startsWith(\"String_Node_Str\")) {\n relationType = PROPERTY_RELATION;\n } else if (param.getName().startsWith(\"String_Node_Str\")) {\n relationType = VALIDATION_RULE_RELATION;\n } else {\n builtIn = null;\n currentValue = null;\n }\n if (param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\")) {\n builtIn = true;\n if (param.getValue().equals(\"String_Node_Str\")) {\n builtIn = false;\n }\n }\n if (param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\")) {\n currentValue = param.getValue();\n }\n if (builtIn != null && currentValue != null) {\n if (!builtIn) {\n addRelationShip(item, currentValue, LATEST_VERSION, relationType);\n }\n builtIn = null;\n currentValue = null;\n }\n if (param.getName().equals(\"String_Node_Str\")) {\n for (Object o3 : param.getElementValue()) {\n if (o3 instanceof ElementValueType && \"String_Node_Str\".equals(((ElementValueType) o3).getElementRef())) {\n addRelationShip(item, ((ElementValueType) o3).getValue(), LATEST_VERSION, SQLPATTERN_RELATION);\n }\n }\n }\n if (param.getField() != null && param.getField().equals(EParameterFieldType.SURVIVOR_RELATION.getName())) {\n String relatedID = param.getValue();\n addRelationShip(item, relatedID, LATEST_VERSION, SURVIVOR_RELATION);\n }\n }\n }\n if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerMapperService.class)) {\n IDesignerMapperService service = (IDesignerMapperService) GlobalServiceRegister.getDefault().getService(IDesignerMapperService.class);\n AbstractExternalData nodeData = currentNode.getNodeData();\n List<String> schemaIds = service.getRepositorySchemaIds(nodeData);\n if (schemaIds.size() > 0) {\n for (String schemaId : schemaIds) {\n addRelationShip(item, schemaId, LATEST_VERSION, SCHEMA_RELATION);\n }\n }\n }\n if (jobletsComponentsList.contains(currentNode.getComponentName())) {\n String version = LATEST_VERSION;\n for (Object o2 : currentNode.getElementParameter()) {\n if (o2 instanceof ElementParameterType) {\n ElementParameterType param = (ElementParameterType) o2;\n if (param.getName().equals(\"String_Node_Str\")) {\n version = param.getValue();\n }\n }\n }\n IComponent cc = compService.getComponentsFactory().get(currentNode.getComponentName());\n IJobletProviderService service = null;\n if (PluginChecker.isJobLetPluginLoaded()) {\n service = (IJobletProviderService) GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);\n }\n Property property = service.getJobletComponentItem(cc);\n if (property != null) {\n addRelationShip(item, property.getId(), version, JOBLET_RELATION);\n }\n if (\"String_Node_Str\".equals(currentNode.getComponentName())) {\n String jobVersion = LATEST_VERSION;\n Set<String> jobIdSet = new HashSet<String>();\n for (Object o2 : currentNode.getElementParameter()) {\n if (o2 instanceof ElementParameterType) {\n ElementParameterType param = (ElementParameterType) o2;\n if (param.getName().equals(\"String_Node_Str\") || param.getName().equals(\"String_Node_Str\")) {\n String jobIds = param.getValue();\n String[] jobsArr = jobIds.split(RelationshipItemBuilder.COMMA);\n for (String jobId : jobsArr) {\n if (StringUtils.isNotEmpty(jobId)) {\n jobIdSet.add(jobId);\n }\n }\n }\n if (param.getName().equals(\"String_Node_Str\") || param.getName().equals(\"String_Node_Str\")) {\n jobVersion = param.getValue();\n }\n }\n }\n for (String jobId : jobIdSet) {\n addRelationShip(item, jobId, jobVersion, JOB_RELATION);\n }\n }\n }\n }\n if (oldProjectRelations != null) {\n Set<Relation> newProjectRelations = currentProjectItemsRelations.get(relation);\n if (oldProjectRelations.size() == newProjectRelations.size()) {\n relationsModified = false;\n for (Relation newRelation : newProjectRelations) {\n if (!oldProjectRelations.contains(newRelation)) {\n relationsModified = true;\n break;\n }\n }\n }\n if (!relationsModified) {\n currentProjectItemsRelations.get(relation).addAll(oldProjectRelations);\n }\n }\n if (relationsModified && !modified) {\n modified = true;\n }\n if (!fromMigration && modified) {\n saveRelations();\n }\n }\n}\n"
|
"public void testUnrunChangeSetsEmptyDatabase() throws Exception {\n if (database == null) {\n return;\n }\n Migrator migrator = createMigrator(completeChangeLog);\n migrator.dropAll(getSchemasToDrop());\n migrator = createMigrator(completeChangeLog);\n List<ChangeSet> list = migrator.listUnrunChangeSets();\n assertTrue(list.size() > 0);\n}\n"
|
"private Chart getConvertedChart(Chart currentChart, String sNewSubType, Orientation newOrientation, String sNewDimension) {\n Chart helperModel = currentChart.copyInstance();\n ChartDimension oldDimension = currentChart.getDimension();\n ChartCacheManager.getInstance().cacheSeries(ChartUIUtil.getAllOrthogonalSeriesDefinitions(helperModel));\n if ((currentChart instanceof ChartWithAxes)) {\n if (currentChart.getType().equals(TYPE_LITERAL)) {\n currentChart.setSubType(sNewSubType);\n EList axes = ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes();\n for (int i = 0, seriesIndex = 0; i < axes.size(); i++) {\n if (sNewSubType.equalsIgnoreCase(PERCENTSTACKED_SUBTYPE_LITERAL)) {\n if (!ChartPreviewPainter.isLivePreviewActive() && !isNumbericAxis((Axis) axes.get(i))) {\n ((Axis) axes.get(i)).setType(AxisType.LINEAR_LITERAL);\n }\n ((Axis) axes.get(i)).setPercent(true);\n } else {\n ((Axis) axes.get(i)).setPercent(false);\n }\n EList seriesdefinitions = ((Axis) axes.get(i)).getSeriesDefinitions();\n Series firstSeries = ((SeriesDefinition) seriesdefinitions.get(0)).getDesignTimeSeries();\n for (int j = 0; j < seriesdefinitions.size(); j++) {\n Series series = ((SeriesDefinition) seriesdefinitions.get(j)).getDesignTimeSeries();\n if ((sNewSubType.equalsIgnoreCase(STACKED_SUBTYPE_LITERAL) || sNewSubType.equalsIgnoreCase(PERCENTSTACKED_SUBTYPE_LITERAL))) {\n if (j != 0) {\n series = getConvertedSeriesAsFirst(series, seriesIndex, firstSeries);\n }\n seriesIndex++;\n if (!ChartPreviewPainter.isLivePreviewActive() && !isNumbericAxis((Axis) axes.get(i))) {\n ((Axis) axes.get(i)).setType(AxisType.LINEAR_LITERAL);\n }\n if (series.canBeStacked()) {\n series.setStacked(true);\n }\n ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().clear();\n ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().add(series);\n } else {\n series.setStacked(false);\n }\n }\n }\n } else if (currentChart.getType().equals(BarChart.TYPE_LITERAL) || currentChart.getType().equals(TubeChart.TYPE_LITERAL) || currentChart.getType().equals(ConeChart.TYPE_LITERAL) || currentChart.getType().equals(PyramidChart.TYPE_LITERAL) || currentChart.getType().equals(LineChart.TYPE_LITERAL) || currentChart.getType().equals(StockChart.TYPE_LITERAL) || currentChart.getType().equals(ScatterChart.TYPE_LITERAL) || currentChart.getType().equals(BubbleChart.TYPE_LITERAL) || currentChart.getType().equals(DifferenceChart.TYPE_LITERAL) || currentChart.getType().equals(GanttChart.TYPE_LITERAL)) {\n currentChart.setType(TYPE_LITERAL);\n currentChart.setSubType(sNewSubType);\n Text title = currentChart.getTitle().getLabel().getCaption();\n if (title.getValue() == null || title.getValue().trim().length() == 0 || title.getValue().trim().equals(oldType.getDefaultTitle().trim())) {\n title.setValue(getDefaultTitle());\n }\n ArrayList axisTypes = new ArrayList();\n EList axes = ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes();\n for (int i = 0, seriesIndex = 0; i < axes.size(); i++) {\n if (!ChartPreviewPainter.isLivePreviewActive() && !isNumbericAxis((Axis) axes.get(i))) {\n ((Axis) axes.get(i)).setType(AxisType.LINEAR_LITERAL);\n }\n if (sNewSubType.equalsIgnoreCase(PERCENTSTACKED_SUBTYPE_LITERAL)) {\n ((Axis) axes.get(i)).setPercent(true);\n } else {\n ((Axis) axes.get(i)).setPercent(false);\n }\n EList seriesdefinitions = ((Axis) axes.get(i)).getSeriesDefinitions();\n for (int j = 0; j < seriesdefinitions.size(); j++) {\n Series series = ((SeriesDefinition) seriesdefinitions.get(j)).getDesignTimeSeries();\n series = getConvertedSeries(series, seriesIndex++);\n if ((sNewSubType.equalsIgnoreCase(STACKED_SUBTYPE_LITERAL) || sNewSubType.equalsIgnoreCase(PERCENTSTACKED_SUBTYPE_LITERAL))) {\n series.setStacked(true);\n } else {\n series.setStacked(false);\n }\n ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().clear();\n ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().add(series);\n axisTypes.add(((Axis) axes.get(i)).getType());\n }\n }\n currentChart.setSampleData(getConvertedSampleData(currentChart.getSampleData(), ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getType(), axisTypes));\n } else {\n return null;\n }\n } else {\n currentChart = ChartWithAxesImpl.create();\n currentChart.setType(TYPE_LITERAL);\n currentChart.setSubType(sNewSubType);\n ((ChartWithAxes) currentChart).setOrientation(newOrientation);\n currentChart.setDimension(ChartUIUtil.getDimensionType(sNewDimension));\n ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).setOrientation(Orientation.HORIZONTAL_LITERAL);\n ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).setType(AxisType.TEXT_LITERAL);\n ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).setCategoryAxis(true);\n ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)).setOrientation(Orientation.VERTICAL_LITERAL);\n ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)).setType(AxisType.LINEAR_LITERAL);\n currentChart.setBlock(helperModel.getBlock());\n currentChart.setDescription(helperModel.getDescription());\n currentChart.setGridColumnCount(helperModel.getGridColumnCount());\n currentChart.setSampleData(helperModel.getSampleData());\n currentChart.setScript(helperModel.getScript());\n currentChart.setSeriesThickness(helperModel.getSeriesThickness());\n currentChart.setUnits(helperModel.getUnits());\n if (helperModel.getInteractivity() != null) {\n currentChart.getInteractivity().setEnable(helperModel.getInteractivity().isEnable());\n currentChart.getInteractivity().setLegendBehavior(helperModel.getInteractivity().getLegendBehavior());\n }\n if (helperModel.getType().equals(PieChart.TYPE_LITERAL) || helperModel.getType().equals(MeterChart.TYPE_LITERAL)) {\n ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().clear();\n ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().add(((ChartWithoutAxes) helperModel).getSeriesDefinitions().get(0));\n ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)).getSeriesDefinitions().clear();\n ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)).getSeriesDefinitions().addAll(((SeriesDefinition) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().get(0)).getSeriesDefinitions());\n Series series = ((SeriesDefinition) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().get(0)).getDesignTimeSeries();\n ((SeriesDefinition) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().get(0)).getSeries().clear();\n ((SeriesDefinition) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getSeriesDefinitions().get(0)).getSeries().add(series);\n EList seriesdefinitions = ((Axis) ((Axis) ((ChartWithAxes) currentChart).getAxes().get(0)).getAssociatedAxes().get(0)).getSeriesDefinitions();\n for (int j = 0; j < seriesdefinitions.size(); j++) {\n series = ((SeriesDefinition) seriesdefinitions.get(j)).getDesignTimeSeries();\n series = getConvertedSeries(series, j);\n series.getLabel().setVisible(false);\n if ((sNewSubType.equalsIgnoreCase(STACKED_SUBTYPE_LITERAL) || sNewSubType.equalsIgnoreCase(PERCENTSTACKED_SUBTYPE_LITERAL))) {\n series.setStacked(true);\n } else {\n series.setStacked(false);\n }\n ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().clear();\n ((SeriesDefinition) seriesdefinitions.get(j)).getSeries().add(series);\n }\n } else {\n return null;\n }\n currentChart.getLegend().setItemType(LegendItemType.SERIES_LITERAL);\n currentChart.getTitle().getLabel().getCaption().setValue(CHART_TITLE);\n }\n if (!((ChartWithAxes) currentChart).getOrientation().equals(newOrientation)) {\n ((ChartWithAxes) currentChart).setOrientation(newOrientation);\n }\n if (!currentChart.getDimension().equals(ChartUIUtil.getDimensionType(sNewDimension))) {\n currentChart.setDimension(ChartUIUtil.getDimensionType(sNewDimension));\n }\n if (sNewDimension.equals(THREE_DIMENSION_TYPE) && ChartUIUtil.getDimensionType(sNewDimension) != oldDimension) {\n ((ChartWithAxes) currentChart).setRotation(Rotation3DImpl.create(new Angle3D[] { Angle3DImpl.create(-20, 45, 0) }));\n ((ChartWithAxes) currentChart).getPrimaryBaseAxes()[0].getAncillaryAxes().clear();\n Axis zAxisAncillary = AxisImpl.create(Axis.ANCILLARY_BASE);\n zAxisAncillary.setTitlePosition(Position.BELOW_LITERAL);\n zAxisAncillary.getTitle().getCaption().setValue(Messages.getString(\"String_Node_Str\"));\n zAxisAncillary.getTitle().setVisible(true);\n zAxisAncillary.setPrimaryAxis(true);\n zAxisAncillary.setLabelPosition(Position.BELOW_LITERAL);\n zAxisAncillary.setOrientation(Orientation.HORIZONTAL_LITERAL);\n zAxisAncillary.getOrigin().setType(IntersectionType.MIN_LITERAL);\n zAxisAncillary.getOrigin().setValue(NumberDataElementImpl.create(0));\n zAxisAncillary.getTitle().setVisible(false);\n zAxisAncillary.setType(AxisType.TEXT_LITERAL);\n ((ChartWithAxes) currentChart).getPrimaryBaseAxes()[0].getAncillaryAxes().add(zAxisAncillary);\n SeriesDefinition sdZ = SeriesDefinitionImpl.create();\n sdZ.getSeriesPalette().shift(0);\n sdZ.getSeries().add(SeriesImpl.create());\n zAxisAncillary.getSeriesDefinitions().add(sdZ);\n if (currentChart.getSampleData().getAncillarySampleData().isEmpty()) {\n BaseSampleData sdAncillary = DataFactory.eINSTANCE.createBaseSampleData();\n sdAncillary.setDataSetRepresentation(\"String_Node_Str\");\n currentChart.getSampleData().getAncillarySampleData().add(sdAncillary);\n }\n EList seriesdefinitions = ChartUIUtil.getOrthogonalSeriesDefinitions(currentChart, 0);\n for (int j = 0; j < seriesdefinitions.size(); j++) {\n Series series = ((SeriesDefinition) seriesdefinitions.get(j)).getDesignTimeSeries();\n series.setStacked(false);\n }\n }\n ChartUIUtil.restoreLabelPositionFromCache(currentChart);\n return currentChart;\n}\n"
|
"private String getJsonString() throws IOException {\n CircleStreamBuffer csb = new CircleStreamBuffer();\n IOException cachedException = null;\n try {\n JsonGenerator json = new JsonFactory().createGenerator(csb.getOutputStream(), JsonEncoding.UTF8).setPrettyPrinter(new DefaultPrettyPrinter());\n appendJson(json);\n json.close();\n csb.getOutputStream().close();\n } catch (IOException e) {\n throw e;\n } finally {\n if (csb != null && csb.getOutputStream() != null) {\n try {\n csb.getOutputStream().close();\n } catch (IOException e) {\n if (cachedException != null) {\n throw cachedException;\n } else {\n throw e;\n }\n }\n }\n }\n try {\n String jsonString = IOUtils.toString(csb.getInputStream());\n csb.getInputStream().close();\n return jsonString;\n } catch (IOException e) {\n throw e;\n } finally {\n if (csb != null && csb.getInputStream() != null) {\n try {\n csb.getInputStream().close();\n } catch (IOException e) {\n if (cachedException != null) {\n throw cachedException;\n } else {\n throw e;\n }\n }\n }\n }\n}\n"
|
"public String build() {\n final URI uri = UriBuilder.fromPath(\"String_Node_Str\").queryParam(\"String_Node_Str\", \"String_Node_Str\").queryParam(\"String_Node_Str\", \"String_Node_Str\").queryParam(\"String_Node_Str\", \"String_Node_Str\").build(Manifests.read(\"String_Node_Str\"), Manifests.read(\"String_Node_Str\"));\n final String response = RestTester.start(uri).get(\"String_Node_Str\").assertStatus(HttpURLConnection.HTTP_OK).assertBody(Matchers.startsWith(\"String_Node_Str\")).getBody();\n return response.split(\"String_Node_Str\", 2)[1];\n}\n"
|
"private String fixedPath(String contextPath, String pathSimple) {\n if (contextPath == null)\n return pathSimple;\n String ptail = pathSimple.substring(pathSimple.indexOf(\"String_Node_Str\") + 1);\n if (redirector != null)\n return contextPath + \"String_Node_Str\" + tail(redirector.getPath()) + \"String_Node_Str\" + ptail.substring(ptail.indexOf(\"String_Node_Str\") + 1);\n else\n return contextPath + \"String_Node_Str\" + ptail;\n}\n"
|
"private void updateComputedColumns(ComputedColumn handle) {\n try {\n DataSetHandle dataSet = ((DataSetEditor) getContainer()).getHandle();\n DataSetViewData[] items = DataSetProvider.getCurrentInstance().getColumns(dataSet, false, true, true);\n int count = items.length;\n DataSetViewData[] newItems = new DataSetViewData[count + 1];\n System.arraycopy(items, 0, newItems, 0, count);\n newItems[count] = new DataSetViewData();\n newItems[count].setName(handle.getName());\n newItems[count].setDataTypeName(handle.getDataType());\n newItems[count].setAlias(handle.getDisplayName());\n newItems[count].setComputedColumn(true);\n newItems[count].setPosition(count + 1);\n newItems[count].setDataType(DataAdapterUtil.adaptModelDataType(handle.getDataType()));\n DataSetProvider.getCurrentInstance().updateColumnsOfDataSetHandle(dataSet, newItems);\n } catch (BirtException e) {\n DataSetExceptionHandler.handle(e);\n }\n}\n"
|
"public CalendarEntry cloneAsSpanningEvent(CalendarEntry eventEntry, long startDate, long endDate) {\n CalendarEntry clone = eventEntry.clone();\n clone.setStartDate(startDate);\n clone.setEndDate(endDate);\n clone.setSpansMultipleDays(true);\n clone.setOriginalEvent(eventEntry);\n return clone;\n}\n"
|
"private boolean mutateGlobalSetting(String name, String value, int requestingUserId, int operation) {\n enforceWritePermission(Manifest.permission.WRITE_SECURE_SETTINGS);\n final int callingUserId = resolveCallingUserIdEnforcingPermissionsLocked(requestingUserId);\n if (isGlobalOrSecureSettingRestrictedForUser(name, callingUserId, value)) {\n return false;\n }\n synchronized (mLock) {\n switch(operation) {\n case MUTATION_OPERATION_INSERT:\n {\n return mSettingsRegistry.insertSettingLocked(SettingsRegistry.SETTINGS_TYPE_GLOBAL, UserHandle.USER_SYSTEM, name, value, getCallingPackage());\n }\n case MUTATION_OPERATION_DELETE:\n {\n return mSettingsRegistry.deleteSettingLocked(SettingsRegistry.SETTINGS_TYPE_GLOBAL, UserHandle.USER_SYSTEM, name);\n }\n case MUTATION_OPERATION_UPDATE:\n {\n return mSettingsRegistry.updateSettingLocked(SettingsRegistry.SETTINGS_TYPE_GLOBAL, UserHandle.USER_SYSTEM, name, value, getCallingPackage());\n }\n }\n }\n return false;\n}\n"
|
"public static XPathPathExpr getPathExpr(String nodeset) {\n XPathExpression path;\n boolean validNonPathExpr = false;\n try {\n path = XPathParseTool.parseXPath(nodeset);\n if (!(path instanceof XPathPathExpr)) {\n validNonPathExpr = true;\n throw new XPathSyntaxException();\n }\n } catch (XPathSyntaxException xse) {\n if (validNonPathExpr) {\n throw new RuntimeException(\"String_Node_Str\" + nodeset + \"String_Node_Str\" + xse.getMessage());\n } else {\n throw new RuntimeException(\"String_Node_Str\" + nodeset + \"String_Node_Str\");\n }\n }\n return (XPathPathExpr) path;\n}\n"
|
"protected Control createContents(Composite parent) {\n Composite client = new Composite(parent, SWT.NONE);\n client.setLayoutData(new GridData(GridData.FILL_BOTH));\n GridLayout layout = new GridLayout(3, false);\n layout.marginHeight = 0;\n layout.marginWidth = 0;\n client.setLayout(layout);\n Label label = new Label(client, SWT.NONE);\n label.setText(Messages.TraceLibraryPath_label);\n traceLibraryPath = new Text(client, SWT.BORDER);\n traceLibraryPath.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));\n traceLibraryPath.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent e) {\n setValid(validateInputs());\n }\n });\n browsePathButton = new Button(client, SWT.PUSH);\n browsePathButton.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));\n browsePathButton.setText(Messages.TraceLibraryPath_browseBtn);\n browsePathButton.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n String dir = new DirectoryDialog(Display.getDefault().getActiveShell()).open();\n if (dir != null) {\n traceLibraryPath.setText(dir);\n }\n }\n });\n Label noteBoldLabel = new Label(client, SWT.BOLD);\n noteBoldLabel.setText(Messages.TraceLibraryPath_Note);\n noteBoldLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false));\n Font font = noteBoldLabel.getFont();\n if (font.getFontData().length > 0)\n noteBoldLabel.setFont(new Font(client.getDisplay(), font.getFontData()[0].getName(), font.getFontData()[0].getHeight(), SWT.BOLD));\n Label noteTextLabel = new Label(client, SWT.WRAP);\n noteTextLabel.setText(Messages.TraceLibraryPath_Message);\n gd = new GridData(SWT.FILL, SWT.CENTER, true, false);\n gd.widthHint = 400;\n gd.horizontalSpan = 2;\n noteTextLabel.setLayoutData(gd);\n performDefaults();\n return client;\n}\n"
|
"public Object willClone(Component comp) {\n if (_model instanceof ComponentCloneListener) {\n GroupsListModelExt clone = (GroupsListModelExt) clone();\n GroupsModel m = (GroupsModel) ((ComponentCloneListener) _model).willClone(comp);\n if (m != null)\n clone._model = m;\n clone.init();\n return clone;\n }\n return null;\n}\n"
|
"public void fire() throws IllegalActionException {\n Director director = getDirector();\n if (director == null) {\n throw new IllegalActionException(this, \"String_Node_Str\");\n }\n _time.setToken(new DoubleToken(director.getCurrentTime()));\n Iterator inputPorts = inputPortList().iterator();\n while (inputPorts.hasNext()) {\n IOPort port = (IOPort) (inputPorts.next());\n if (port.getWidth() > 0) {\n if (port.hasToken(0)) {\n Token inputToken = port.get(0);\n Variable var = (Variable) (getAttribute(port.getName()));\n var.setToken(inputToken);\n }\n }\n }\n BooleanToken result = (BooleanToken) assertion.getToken();\n if (!result.booleanValue()) {\n throw new IllegalActionException(this, \"String_Node_Str\" + assertion.getExpression());\n }\n}\n"
|
"public V getM(M mutation_source) {\n V v = get();\n if (mutator != null)\n mutator.accept(t, mutation_source);\n return t;\n}\n"
|
"public synchronized Object connect(ID remote, Object data, int timeout) throws ECFException {\n if (connection != null)\n throw new ECFException(\"String_Node_Str\");\n if (timeout > 0)\n SmackConfiguration.setPacketReplyTimeout(timeout);\n Roster.setDefaultSubscriptionMode(Roster.SUBSCRIPTION_MANUAL);\n final XMPPID jabberURI = getXMPPID(remote);\n String username = jabberURI.getNodename();\n String hostname = jabberURI.getHostname();\n String hostnameOverride = null;\n int atSignIdx = username.lastIndexOf('@');\n if (atSignIdx != -1) {\n hostnameOverride = hostname;\n hostname = username.substring(atSignIdx + 1);\n username = username.substring(0, atSignIdx);\n }\n if (google && hostnameOverride == null) {\n hostnameOverride = GOOGLE_TALK_HOST;\n }\n final String serviceName = hostname;\n serverPort = jabberURI.getPort();\n serverResource = jabberURI.getResourceName();\n if (serverResource == null || serverResource.equals(XMPPID.PATH_DELIMITER)) {\n serverResource = getClientIdentifier();\n jabberURI.setResourceName(serverResource);\n }\n try {\n if (hostnameOverride != null) {\n if (secure) {\n if (serverPort == -1) {\n serverPort = XMPPS_DEFAULT_PORT;\n }\n connection = new SSLXMPPConnection(hostnameOverride, serverPort, serviceName);\n } else {\n if (serverPort == -1) {\n serverPort = XMPP_DEFAULT_PORT;\n }\n connection = new XMPPConnection(hostnameOverride, serverPort, serviceName);\n }\n } else if (serverPort == -1) {\n if (secure) {\n connection = new SSLXMPPConnection(serviceName);\n } else {\n connection = new XMPPConnection(serviceName);\n }\n } else {\n if (secure) {\n connection = new SSLXMPPConnection(serviceName, serverPort);\n } else {\n connection = new XMPPConnection(serviceName, serverPort);\n }\n }\n connection.addPacketListener(packetListener, null);\n connection.addConnectionListener(connectionListener);\n connection.login(username, (String) data, serverResource);\n isConnected = true;\n } catch (final XMPPException e) {\n if (e.getMessage().equals(\"String_Node_Str\"))\n throw new ContainerAuthenticationException(\"String_Node_Str\", e);\n throw new ContainerConnectException(e.getLocalizedMessage(), e);\n }\n return null;\n}\n"
|
"private void initialize() {\n this.setLayout(new java.awt.BorderLayout());\n this.setSize(200, 220);\n this.setPreferredSize(new java.awt.Dimension(200, 220));\n this.setBackground(java.awt.SystemColor.activeCaptionText);\n this.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.black, 1));\n this.setOpaque(false);\n this.add(getNorthPanel(), java.awt.BorderLayout.NORTH);\n this.add(getSouthPanel(), java.awt.BorderLayout.SOUTH);\n this.add(getCenterPanel(), java.awt.BorderLayout.CENTER);\n}\n"
|
"public void check() {\n dataCollector.collect();\n detected = decideResult(getDetectedValue());\n logger.info(\"String_Node_Str\", this.getClass().getSimpleName(), detected, rule.getApplicationId(), getDetectedValue(), rule.getThreshold());\n}\n"
|
"public void shouldDeployAWarServiceInANode() throws Exception {\n Service service = servicesManager.createService(spec);\n ServiceInstance instance = ((DeployedService) service).getInstances().get(0);\n String url = instance.getNativeUri();\n System.out.println(\"String_Node_Str\" + url);\n npm.upgradeNode(instance.getNode().getId());\n Thread.sleep(1000);\n client = WebClient.create(url);\n String body = client.get(String.class);\n String excerpt = \"String_Node_Str\";\n assertTrue(body.contains(excerpt));\n}\n"
|
"private static void f_monitorexit(int objAddr) {\n if (!RtThreadImpl.useLocks || objAddr == 0) {\n Native.unlock();\n return;\n }\n Scheduler s = Scheduler.sched[Native.rd(Const.IO_CPU_ID)];\n RtThreadImpl c = s.ref[s.active];\n Native.lock();\n cam.ADDRESS = objAddr;\n int result = cam.ADDRESS;\n int index = result & 0x7FFFFFFF;\n int current_thread = Native.toInt(c);\n if ((result & 0x80000000) == 0) {\n throw JVMHelp.IMSExc;\n }\n entry_count[index]--;\n c.lockLevel--;\n if (entry_count[index] == 0) {\n if (queue_front[index] == 0) {\n cam.RESET = 0;\n entries--;\n } else {\n queue_front[index] = c.lockQueue;\n }\n c.lockQueue = 0;\n }\n if (c.lockLevel == 0) {\n Native.wr(0xffffffff, Const.IO_INTMASK);\n }\n Native.unlock();\n}\n"
|
"<X, Y> SelectRecursiveCTECriteriaBuilder<X, Y> withRecursive(Class<X> cteClass, Y result) {\n recursive = true;\n RecursiveCTECriteriaBuilderImpl<X, Y, T> cteBuilder = new RecursiveCTECriteriaBuilderImpl<X, Y, T>(cbf, em, dbmsDialect, cteClass, registeredFunctions, parameterManager, result, this);\n this.onBuilderStarted(cteBuilder);\n return cteBuilder;\n}\n"
|
"public String getSavePath() {\n return Minecraft.getMinecraft().mcDataDir.getAbsolutePath();\n}\n"
|
"protected static MechanismFactory findMechanismFactory(String name) throws IOException {\n if (name == null || name.isEmpty()) {\n throw new IOException(\"String_Node_Str\");\n }\n MechanismFactory factory = null;\n try {\n factory = MECHANISM_FACTORY_FINDER.newInstance(name);\n } catch (Throwable e) {\n throw new IOException(\"String_Node_Str\" + name + \"String_Node_Str\", e);\n }\n return factory;\n}\n"
|
"protected void fireSessionMessageReceived(ByteBuffer data) {\n Message message;\n short clientID;\n try {\n ReceivedMessage recv = MessagePacker.unpack(data, getClassLoader());\n message = recv.getMessage();\n clientID = recv.getClientID();\n } catch (PackerException eme) {\n logger.log(Level.WARNING, \"String_Node_Str\", eme);\n if (eme.getMessageID() != null) {\n message = new ErrorMessage(eme.getMessageID(), eme.getMessage(), eme.getCause());\n clientID = eme.getClientID();\n } else {\n return;\n }\n } catch (Exception ex) {\n logger.log(Level.WARNING, \"String_Node_Str\", ex);\n return;\n }\n ClientRecord record = getClientRecord(clientID);\n if (record == null) {\n throw new IllegalStateException(\"String_Node_Str\" + message + \"String_Node_Str\" + clientID);\n }\n if (logger.isLoggable(Level.FINEST)) {\n logger.finest(getName() + \"String_Node_Str\" + \"String_Node_Str\" + record.getClient().getConnectionType() + \"String_Node_Str\" + message.getClass().getName());\n }\n record.handleMessage(message);\n}\n"
|
"private IMethod makeUnaryStringCall(IClass cls) {\n JSInstructionFactory insts = (JSInstructionFactory) cls.getClassLoader().getInstructionFactory();\n MethodReference ref = AstMethodReference.fnReference(JavaScriptTypes.String);\n JavaScriptSummary S = new JavaScriptSummary(ref, 2);\n S.addStatement(insts.GetInstruction(S.getNumberOfStatements(), 4, 2, \"String_Node_Str\"));\n S.getNextProgramCounter();\n CallSiteReference cs = new JSCallSiteReference(S.getNextProgramCounter());\n S.addStatement(insts.Invoke(S.getNumberOfStatements(), 4, 5, new int[] { 2 }, 6, cs));\n S.addStatement(insts.ReturnInstruction(S.getNumberOfStatements(), 5, false));\n S.getNextProgramCounter();\n return new JavaScriptConstructor(ref, S, cls, cha.lookupClass(JavaScriptTypes.String));\n}\n"
|
"public void doPaintTo(GlimpseContext context) {\n super.doPaintTo(context);\n if (textRenderer == null)\n return;\n GL3 gl3 = context.getGL().getGL3();\n Axis1D axis = getAxis1D(context);\n GlimpseBounds bounds = getBounds(context);\n int width = bounds.getWidth();\n int height = bounds.getHeight();\n if (width == 0 || height == 0)\n return;\n List<TimeStamp> tickTimes = handler.getTickPositions(axis, height);\n progLine.begin(gl3);\n try {\n pathLine.clear();\n for (TimeStamp t : tickTimes) {\n float y = (float) fromTimeStamp(t);\n pathLine.moveTo(width, y);\n pathLine.lineTo(width - tickSize, y);\n }\n style.thickness_PX = tickLineWidth;\n style.rgba = tickColor;\n progLine.setViewport(gl3, bounds);\n progLine.setOrtho(gl3, -0.5f, width - 0.5f, (float) axis.getMin(), (float) axis.getMax());\n progLine.draw(gl3, style, pathLine);\n } finally {\n progLine.end(gl3);\n }\n if (tickInterval <= Time.fromMinutes(1)) {\n double jTimeText = printTickLabels(tickTimes, axis, handler.getSecondMinuteFormat(), width, height);\n printHoverLabels(gl3, tickTimes, axis, handler.getHourDayMonthFormat(), handler.getHourStructFactory(), jTimeText, width, height);\n } else if (tickInterval <= Time.fromHours(12)) {\n double jTimeText = printTickLabels(tickTimes, axis, handler.getHourMinuteFormat(), width, height);\n printHoverLabels(gl3, tickTimes, axis, handler.getDayMonthYearFormat(), handler.getDayStructFactory(), jTimeText, width, height);\n } else if (tickInterval <= Time.fromDays(10)) {\n double jTimeText = printTickLabels(tickTimes, axis, handler.getDayFormat(), width, height);\n printHoverLabels(gl3, tickTimes, axis, handler.getMonthYearFormat(), handler.getMonthStructFactory(), jTimeText, width, height);\n } else if (tickInterval <= Time.fromDays(60)) {\n double jTimeText = printTickLabels(tickTimes, axis, handler.getMonthFormat(), width, height);\n printHoverLabels(gl3, tickTimes, axis, handler.getYearFormat(), handler.getYearStructFactory(), jTimeText, width, height);\n } else {\n printTickLabels(tickTimes, axis, handler.getYearFormat(), width, height);\n }\n}\n"
|
"protected Dimension getSpecifiedDimension(IImageContent content, int pWidth, boolean scale) {\n int imageFileDpiX = 0;\n int imageFileDpiY = 0;\n Image imageObject = null;\n if (reader.getType() == ImageReader.TYPE_IMAGE_OBJECT || reader.getType() == ImageReader.TYPE_CONVERTED_SVG_OBJECT) {\n try {\n imageObject = Image.getInstance(data);\n } catch (Exception e) {\n logger.log(Level.WARNING, e.getLocalizedMessage());\n }\n if (imageObject != null) {\n imageFileDpiX = imageObject.getDpiX();\n imageFileDpiY = imageObject.getDpiY();\n }\n }\n resolutionX = PropertyUtil.getImageDpi(content, imageFileDpiX, context.getDpi());\n resolutionY = PropertyUtil.getImageDpi(content, imageFileDpiY, context.getDpi());\n try {\n intrinsic = getIntrinsicDimension(content, imageObject);\n } catch (Exception e) {\n logger.log(Level.SEVERE, e.getLocalizedMessage());\n }\n int specifiedWidth = PropertyUtil.getImageDimensionValue(content, content.getWidth(), context.getDpi(), pWidth);\n int specifiedHeight = PropertyUtil.getImageDimensionValue(content, content.getHeight(), context.getDpi(), 0);\n Dimension dim = new Dimension(DEFAULT_WIDHT, DEFAULT_HEIGHT);\n if (intrinsic == null) {\n dim.setDimension(specifiedWidth == -1 ? DEFAULT_WIDHT : specifiedWidth, specifiedHeight == -1 ? DEFAULT_HEIGHT : specifiedHeight);\n return dim;\n }\n if (scale) {\n double ratio = intrinsic.getRatio();\n if (specifiedWidth >= 0) {\n if (specifiedHeight >= 0) {\n dim.setDimension(specifiedWidth, specifiedHeight);\n } else {\n dim.setDimension(specifiedWidth, (int) (specifiedWidth / ratio));\n }\n } else {\n if (specifiedHeight >= 0) {\n dim.setDimension((int) (specifiedHeight * ratio), specifiedHeight);\n } else {\n dim.setDimension(intrinsic.getWidth(), intrinsic.getHeight());\n }\n }\n } else {\n if (specifiedWidth >= 0) {\n if (specifiedHeight >= 0) {\n dim.setDimension(specifiedWidth, specifiedHeight);\n } else {\n dim.setDimension(specifiedWidth, intrinsic.getHeight());\n }\n } else {\n if (specifiedHeight >= 0) {\n dim.setDimension(intrinsic.getWidth(), specifiedHeight);\n } else {\n dim.setDimension(intrinsic.getWidth(), intrinsic.getHeight());\n }\n }\n }\n return dim;\n}\n"
|
"public void renderContent(GL2 gl) {\n if (resolvedRowID == null || average == null)\n return;\n List<SelectionType> geneSelectionTypes = geneSelectionManager.getSelectionTypes(davidID);\n List<List<SelectionType>> selectionLists = new ArrayList<List<SelectionType>>();\n selectionLists.add(geneSelectionTypes);\n for (Integer sampleID : experimentPerspective.getVirtualArray()) {\n selectionLists.add(sampleSelectionManager.getSelectionTypes(experimentPerspective.getIdType(), sampleID));\n }\n colorCalculator.calculateColors(Algorithms.mergeListsToUniqueList(selectionLists));\n float[] topBarColor = colorCalculator.getPrimaryColor().getRGBA();\n float[] bottomBarColor = colorCalculator.getSecondaryColor().getRGBA();\n float[] color = MappedDataRenderer.EVEN_BACKGROUND_COLOR;\n gl.glBegin(GL2.GL_QUADS);\n gl.glColor4fv(color, 0);\n gl.glVertex3f(0, 0, z);\n gl.glVertex3f(x, 0, z);\n gl.glVertex3d(x, 0.8f * y, z);\n gl.glVertex3d(0, 0.8f * y, z);\n gl.glEnd();\n gl.glBegin(GL.GL_LINE_LOOP);\n gl.glVertex3f(0, 0, z);\n gl.glVertex3f(x, 0, z);\n gl.glVertex3d(x, 0.8f * y, z);\n gl.glVertex3d(0, 0.8f * y, z);\n gl.glEnd();\n gl.glBegin(GL2.GL_QUADS);\n gl.glColor4fv(topBarColor, 0);\n gl.glVertex3f(0, 0, z);\n gl.glColor4fv(bottomBarColor, 0);\n gl.glVertex3f(x, 0, z);\n gl.glColor3f(bottomBarColor[0] * 0.8f, bottomBarColor[1] * 0.8f, bottomBarColor[2] * 0.8f);\n gl.glVertex3d(x, average.getArithmeticMean() * 0.8f * y, z);\n gl.glColor3f(topBarColor[0] * 0.8f, topBarColor[1] * 0.8f, topBarColor[2] * 0.8f);\n gl.glVertex3d(0, average.getArithmeticMean() * 0.8f * y, z);\n gl.glEnd();\n gl.glColor3f(0.2f, 0.2f, 0.2f);\n gl.glLineWidth(0.1f);\n gl.glBegin(GL.GL_LINE_LOOP);\n gl.glVertex3f(0, 0, z);\n gl.glVertex3f(x, 0, z);\n gl.glVertex3d(x, average.getArithmeticMean() * 0.8f * y, z);\n gl.glVertex3d(0, average.getArithmeticMean() * 0.8f * y, z);\n gl.glEnd();\n}\n"
|
"public void run() {\n while (!stopOperation) {\n try {\n NetworkMessage msg = null;\n Schema schema = null;\n byte[] messageHeader = new byte[5];\n int success = in.read(messageHeader);\n if (success == 5) {\n byte classType = messageHeader[0];\n switch(classType) {\n case -1:\n keepAliveBreak = true;\n break;\n case 1:\n msg = new PlayerRegistrationMessage();\n schema = playerRegSchema;\n break;\n case 2:\n msg = new NetworkMessageMedium();\n schema = mediumMsgSchema;\n break;\n case 3:\n msg = new NetworkMessageLarge();\n schema = largeMsgSchema;\n break;\n default:\n msg = new NetworkMessage();\n schema = networkMsgSchema;\n }\n if (!keepAliveBreak) {\n b.clear();\n b.put(messageHeader, 1, 4);\n b.rewind();\n int mSize = b.getInt();\n byte[] object = new byte[mSize];\n int bytesRead = 0;\n while (bytesRead != mSize) {\n bytesRead += in.read(object, bytesRead, object.length - bytesRead);\n }\n ProtostuffIOUtil.mergeFrom(object, msg, schema);\n processNetworkMessage(msg);\n }\n } else {\n if (success == -1) {\n System.err.println(\"String_Node_Str\");\n fireEvent(new NetworkEvent(this, \"String_Node_Str\"), ConnectionLostListener.class);\n shutdownThread();\n }\n }\n } catch (InterruptedIOException e) {\n } catch (IOException e) {\n System.err.println(\"String_Node_Str\" + e);\n fireEvent(new NetworkEvent(this, \"String_Node_Str\" + e), ConnectionLostListener.class);\n this.shutdownThread();\n break;\n } catch (NullPointerException e) {\n System.err.println(\"String_Node_Str\" + e.getMessage());\n fireEvent(new NetworkEvent(this, \"String_Node_Str\" + e), ConnectionLostListener.class);\n stopOperation = true;\n } catch (RuntimeException e) {\n System.err.println(\"String_Node_Str\" + e);\n } finally {\n keepAliveBreak = false;\n buffer.clear();\n b.clear();\n }\n }\n}\n"
|
"protected void readField(int version, int filedId, DataInputStream in) throws IOException {\n switch(filedId) {\n case FIELD_RAW_TYPE:\n rawType = IOUtil.readString(in);\n break;\n case FIELD_RAWVALUE:\n rawValue = IOUtil.readObject(in, loader);\n if (rawType.equals(TEMPLATE_TYPE) && rawValue instanceof HashMap) {\n rawValue = new Object[] { null, rawValue };\n }\n break;\n case FIELD_ALTTEXT:\n altText = IOUtil.readString(in);\n break;\n case FIELD_ALTTEXTKEY:\n altTextKey = IOUtil.readString(in);\n break;\n case FIELD_RAWKEY:\n rawKey = IOUtil.readString(in);\n break;\n default:\n super.readField(version, filedId, in);\n }\n}\n"
|
"public Class[] eventClassesToConsume() {\n return new Class[] { KeyEvent3D.class, MouseEvent3D.class };\n}\n"
|
"private void buildGetMethodBuffer(ClassBuffer classBuffer, SDOProperty property, java.util.List documentation) {\n String returnType = getJavaTypeForProperty(property);\n String methodName = SDOUtil.getMethodName(property.getName(), returnType);\n if (!(property.getType().isChangeSummaryType() && methodName.equals(\"String_Node_Str\"))) {\n if ((documentation != null) && (documentation.size() > 0)) {\n classBuffer.getMethodBuffer().append(buildGetterJavaDoc(documentation, property.getName()));\n }\n classBuffer.getMethodBuffer().append(indent);\n classBuffer.getMethodBuffer().append(\"String_Node_Str\");\n classBuffer.getMethodBuffer().append(returnType).append(\"String_Node_Str\");\n classBuffer.getMethodBuffer().append(methodName);\n classBuffer.getMethodBuffer().append(\"String_Node_Str\").append(lsep);\n pushIndent();\n classBuffer.getMethodBuffer().append(indent).append(\"String_Node_Str\");\n String builtIn = getBuiltInType(returnType);\n if (builtIn != null) {\n String wrapperCall = getWrapperCall(returnType);\n if (wrapperCall != null) {\n classBuffer.getMethodBuffer().append(wrapperCall);\n }\n classBuffer.getMethodBuffer().append(\"String_Node_Str\").append(builtIn).append(\"String_Node_Str\");\n classBuffer.getMethodBuffer().append(START_PROPERTY_INDEX).append(\"String_Node_Str\").append(property.getIndexInDeclaredProperties());\n classBuffer.getMethodBuffer().append(\"String_Node_Str\");\n if (wrapperCall != null) {\n classBuffer.getMethodBuffer().append(\"String_Node_Str\");\n }\n } else {\n if (!returnType.equals(ClassConstants.OBJECT.getName())) {\n classBuffer.getMethodBuffer().append(\"String_Node_Str\");\n classBuffer.getMethodBuffer().append(returnType).append(\"String_Node_Str\");\n }\n classBuffer.getMethodBuffer().append(\"String_Node_Str\");\n classBuffer.getMethodBuffer().append(START_PROPERTY_INDEX).append(\"String_Node_Str\").append(property.getIndexInDeclaredProperties());\n classBuffer.getMethodBuffer().append(\"String_Node_Str\");\n }\n classBuffer.getMethodBuffer().append(\"String_Node_Str\").append(lsep);\n popIndent();\n classBuffer.getMethodBuffer().append(indent).append(\"String_Node_Str\").append(lsep2);\n }\n if (generateInterfaces) {\n classBuffer.getInterfaceBuffer().append(indent);\n classBuffer.getInterfaceBuffer().append(\"String_Node_Str\");\n classBuffer.getInterfaceBuffer().append(returnType).append(\"String_Node_Str\");\n classBuffer.getInterfaceBuffer().append(methodName);\n classBuffer.getInterfaceBuffer().append(\"String_Node_Str\").append(lsep2);\n }\n}\n"
|
"private SubHyperplane<Euclidean3D> boundaryFacet(final Vector3D point, final BSPTree<Euclidean3D> node) {\n final Vector2D point2D = ((Plane) node.getCut().getHyperplane()).toSubSpace((Point<Euclidean3D>) point);\n final BoundaryAttribute<Euclidean3D> attribute = (BoundaryAttribute<Euclidean3D>) node.getAttribute();\n if ((attribute.getPlusOutside() != null) && (((SubPlane) attribute.getPlusOutside()).getRemainingRegion().checkPoint(point2D) == Location.INSIDE)) {\n return attribute.getPlusOutside();\n }\n if ((attribute.getPlusInside() != null) && (((SubPlane) attribute.getPlusInside()).getRemainingRegion().checkPoint(point2D) == Location.INSIDE)) {\n return attribute.getPlusInside();\n }\n return null;\n}\n"
|
"public Object clone(Workspace workspace) throws CloneNotSupportedException {\n ERGDirector newObject = (ERGDirector) super.clone(workspace);\n newObject._eventComparator = new EventComparator();\n newObject._eventQueue = new PriorityQueue<TimedEvent>(10, newObject._eventComparator);\n newObject._inputQueue = new PriorityQueue<TimedEvent>(5, newObject._eventComparator);\n newObject._controller = null;\n newObject._controllerVersion = -1;\n return newObject;\n}\n"
|
"public ScriptExpression adaptExpression(Expression expr, ExpressionLocation el) {\n if (expr == null)\n return null;\n ScriptExpression jsExpr = null;\n if (ExpressionType.CONSTANT.equals(expr.getType())) {\n jsExpr = new ScriptExpression(JavascriptEvalUtil.transformToJsExpression(expr.getStringExpression()));\n jsExpr.setConstant(true);\n jsExpr.setConstantValue(expr.getExpression());\n return jsExpr;\n } else\n jsExpr = new ExpressionAdapter(expr, el);\n return jsExpr;\n}\n"
|
"public void visit(MoveNodeInstruction instruction) {\n String srcPath = instruction.getSourcePath();\n String destPath = instruction.getDestPath();\n if (PathUtils.isAncestor(srcPath, destPath)) {\n throw new RuntimeException(\"String_Node_Str\" + destPath);\n }\n String srcParentPath = PathUtils.getParentPath(srcPath);\n String srcNodeName = PathUtils.getName(srcPath);\n String destParentPath = PathUtils.getParentPath(destPath);\n String destNodeName = PathUtils.getName(destPath);\n MongoNode srcParent = getStoredNode(srcParentPath);\n if (!srcParent.childExists(srcNodeName)) {\n throw new NotFoundException(srcPath);\n }\n MongoNode destParent = getStoredNode(destParentPath);\n if (destParent.childExists(destNodeName)) {\n throw new RuntimeException(\"String_Node_Str\" + destPath);\n }\n Map<String, MongoNode> nodesToCopy = new FetchNodesActionNew(nodeStore, srcPath, FetchNodesActionNew.LIMITLESS_DEPTH, headRevisionId).execute();\n for (MongoNode nodeMongo : nodesToCopy.values()) {\n String oldPath = nodeMongo.getPath();\n String oldPathRel = PathUtils.relativize(srcPath, oldPath);\n String newPath = PathUtils.concat(destPath, oldPathRel);\n nodeMongo.setPath(newPath);\n nodeMongo.removeField(\"String_Node_Str\");\n pathNodeMap.put(newPath, nodeMongo);\n }\n MongoNode srcNode = getStoredNode(srcPath, false);\n MongoNode destNode = getStagedNode(destPath);\n copyStagedChanges(srcNode, destNode);\n getStagedNode(destPath);\n destParent.addChild(destNodeName);\n srcParent.removeChild(srcNodeName);\n}\n"
|
"public void doFilterInternal(HttpServletRequest req, HttpServletResponse res, FilterChain fc) throws ServletException, IOException {\n logger.debug(\"String_Node_Str\");\n logger.debug(\"String_Node_Str\" + useDefaultDatabaseName);\n MultiTenantMongoDbFactory.clearDatabaseNameForCurrentThread();\n String tenant = req.getHeader(\"String_Node_Str\");\n Cookie tenantCookie = WebUtils.getCookie(req, \"String_Node_Str\");\n if (tenantCookie != null) {\n tenant = tenantCookie.getValue();\n logger.debug(\"String_Node_Str\");\n } else {\n tenant = req.getHeader(\"String_Node_Str\");\n logger.debug(\"String_Node_Str\");\n if (org.apache.commons.lang.StringUtils.isNotBlank(tenant)) {\n tenantCookie = new Cookie(\"String_Node_Str\", tenant);\n tenantCookie.setPath(\"String_Node_Str\");\n res.addCookie(tenantCookie);\n } else {\n if (Boolean.valueOf(useDefaultDatabaseName)) {\n logger.warn(\"String_Node_Str\");\n tenant = defaultDatabase;\n } else {\n throw new MissingTenantException(\"String_Node_Str\");\n }\n }\n }\n logger.debug(\"String_Node_Str\" + tenant);\n MultiTenantMongoDbFactory.setDatabaseNameForCurrentThread(tenant);\n fc.doFilter(req, res);\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.