content stringlengths 40 137k |
|---|
"public void serialize(Resource value, JsonGenerator gen, SerializerProvider serializers) throws IOException {\n if (gen.getOutputContext().getParent() == null) {\n value._context = Resource.CONTEXT;\n }\n String containingField = getContainingField(gen);\n String typeBackup = null;\n if (ImmutableSet.of(\"String_Node_Str\", \"String_Node_Str\").contains(containingField)) {\n ImageContent imgContent = (ImageContent) value;\n typeBackup = imgContent._type;\n imgContent._type = null;\n }\n Completeness completeness = ModelUtilities.getCompleteness(value, value.getClass());\n if (Objects.equals(containingField, \"String_Node_Str\") && completeness == ModelUtilities.Completeness.ID_AND_TYPE) {\n completeness = ModelUtilities.Completeness.ID_ONLY;\n }\n if (Objects.equals(containingField, \"String_Node_Str\") && completeness == ModelUtilities.Completeness.ID_AND_TYPE) {\n String parentType = null;\n if (gen.getCurrentValue() != null) {\n parentType = ((Resource) gen.getCurrentValue()).getType();\n }\n String withinType = value.getType();\n boolean skipType = ((parentType.equals(\"String_Node_Str\") && withinType.equals(\"String_Node_Str\")) || (parentType.equals(\"String_Node_Str\") && withinType.equals(\"String_Node_Str\")) || (parentType.equals(\"String_Node_Str\") && withinType.equals(\"String_Node_Str\")));\n if (skipType) {\n completeness = ModelUtilities.Completeness.ID_ONLY;\n }\n } else if (Objects.equals(containingField, \"String_Node_Str\") && completeness == ModelUtilities.Completeness.ID_AND_TYPE) {\n boolean skipType = (value instanceof Canvas && gen.getCurrentValue() instanceof Annotation && ((Annotation) gen.getCurrentValue()).getMotivation().equals(Motivation.PAINTING));\n if (skipType) {\n completeness = ModelUtilities.Completeness.ID_ONLY;\n }\n } else {\n ImmutableSet<String> skipParents = ImmutableSet.of(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n boolean shouldSkip = (Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\").contains(containingField) || (completeness == Completeness.ID_AND_TYPE && skipParents.contains(containingField)));\n if (shouldSkip) {\n completeness = Completeness.ID_ONLY;\n }\n }\n switch(completeness) {\n case EMPTY:\n gen.writeNull();\n break;\n case ID_ONLY:\n gen.writeObject(value.getIdentifier().toString());\n break;\n default:\n defaultSerializer.serialize(value, gen, serializers);\n }\n if (typeBackup != null) {\n ((ImageContent) value)._type = typeBackup;\n }\n}\n"
|
"public boolean equals(Object obj) {\n if (this == obj)\n return true;\n if (!super.equals(obj))\n return false;\n if (getClass() != obj.getClass())\n return false;\n ComponentDefinition other = (ComponentDefinition) obj;\n if (roles == null) {\n if (other.roles != null)\n return false;\n } else if (!roles.equals(other.roles))\n return false;\n if (sequences == null) {\n if (other.sequences != null)\n return false;\n } else if (!sequences.equals(other.sequences)) {\n if (getSequences().size() != getSequenceURIs().size() || other.getSequences().size() != other.getSequenceURIs().size() || !getSequences().equals(other.getSequences())) {\n return false;\n }\n }\n if (sequenceAnnotations == null) {\n if (other.sequenceAnnotations != null)\n return false;\n } else if (!sequenceAnnotations.equals(other.sequenceAnnotations))\n return false;\n if (sequenceConstraints == null) {\n if (other.sequenceConstraints != null)\n return false;\n } else if (!sequenceConstraints.equals(other.sequenceConstraints))\n return false;\n if (components == null) {\n if (other.components != null)\n return false;\n } else if (!components.equals(other.components))\n return false;\n if (types == null) {\n if (other.types != null)\n return false;\n } else if (!types.equals(other.types))\n return false;\n return true;\n}\n"
|
"private void codeLocationsPush(ObjectReference code, Address ipLoc) throws InlinePragma {\n if (VALIDATE_REFS) {\n Address ip = ipLoc.loadAddress();\n Offset offset = ip.diff(code.toAddress());\n if (offset.sLT(Offset.zero()) || offset.sGT(Offset.fromIntZeroExtend(ObjectModel.getObjectSize(code)))) {\n Log.writeln(\"String_Node_Str\");\n Log.write(\"String_Node_Str\");\n Log.writeln(code);\n Log.write(\"String_Node_Str\");\n Log.writeln(ip);\n Log.write(\"String_Node_Str\");\n Log.writeln(offset);\n Log.write(\"String_Node_Str\");\n Log.writeln(ipLoc);\n if (!failed)\n failed = true;\n }\n }\n trace.addInteriorRootLocation(code, ipLoc);\n}\n"
|
"protected void drawXLabels(float yPos) {\n float[] position = new float[] { 0f, 0f };\n BarData bd = (BarData) mCurrentData;\n int step = mCurrentData.getDataSetCount();\n for (int i = 0; i < mCurrentData.getXValCount(); i += mXLabels.mXAxisLabelModulus) {\n position[0] = i * step + i * mOriginalData.getGroupSpace() + mOriginalData.getGroupSpace() / 2f;\n if (mXLabels.isCenterXLabelsEnabled())\n position[0] += (step / 2f);\n transformPointArray(position);\n if (position[0] >= mOffsetLeft && position[0] <= getWidth() - mOffsetRight) {\n String label = mCurrentData.getXVals().get(i);\n if (mXLabels.isAvoidFirstLastClippingEnabled()) {\n if (i == mCurrentData.getXValCount() - 1) {\n float width = Utils.calcTextWidth(mXLabelPaint, label);\n if (width > getOffsetRight() * 2 && position[0] + width > getWidth())\n position[0] -= width / 2;\n } else if (i == 0) {\n float width = Utils.calcTextWidth(mXLabelPaint, label);\n position[0] += width / 2;\n }\n }\n mDrawCanvas.drawText(label, position[0], yPos, mXLabelPaint);\n }\n }\n}\n"
|
"private int resolvePort(String url) {\n int port = extractPort(url);\n final SinglePortBindResolver.PortBindInfo portBindInfo = resolveBindPort(port);\n if (portBindInfo == null) {\n return port;\n }\n return portBindInfo.getBindPort();\n}\n"
|
"public void testReterive() throws BirtException {\n try {\n context.eval(\"String_Node_Str\");\n fail();\n } catch (BirtException e) {\n assertTrue(true);\n }\n assertEquals(\"String_Node_Str\", context.eval(\"String_Node_Str\"));\n assertEquals(\"String_Node_Str\", context.eval(\"String_Node_Str\"));\n assertEquals(\"String_Node_Str\", context.eval(\"String_Node_Str\"));\n assertEquals(\"String_Node_Str\", context.eval(\"String_Node_Str\"));\n assertEquals(\"String_Node_Str\", context.eval(\"String_Node_Str\" + \"String_Node_Str\"));\n}\n"
|
"private static String loadUpdates(LoadingWindow window) {\n String notes = null;\n try {\n window.setStatus(\"String_Node_Str\");\n PatchNotesDownloader notesDownloader = new PatchNotesDownloader(PATCH_NOTES_LINK);\n notesDownloader.downloadVersionNotes(VERSION);\n notes = notesDownloader.getVersionNotes();\n if (notesDownloader.updateAvailable()) {\n UpdateDownloader myDownloader = new UpdateDownloader(UPDATE_LINK, BETA_UPDATE_LINK);\n UpdatePrompt myPrompt = new UpdatePrompt(\"String_Node_Str\", myDownloader.getUpdateSize(), notesDownloader.getUpdateLevel(), \"String_Node_Str\", notesDownloader.getVersionNotes(VERSION));\n window.stop();\n myPrompt.showWindow();\n try {\n myPrompt.waitForClose();\n } catch (InterruptedException e) {\n }\n if (myPrompt.shouldUpdateProgram()) {\n myDownloader.updateProgram(myPrompt, new File(PAXChecker.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()));\n System.exit(0);\n } else {\n window.showWindow();\n }\n }\n } catch (IOException | URISyntaxException e) {\n e.printStackTrace();\n }\n return notes;\n}\n"
|
"protected synchronized void tick() {\n if (Config.wimpMode) {\n if (this.getPressure() > 1.09F) {\n this.steam = (int) Math.floor((double) this.capacity * 1.09D);\n }\n } else {\n if (this.transporters != null && this.transporters.keySet() != null) {\n if (this.getPressure() > 1.2F) {\n for (Coord4 coords : transporters.keySet()) {\n ISteamTransporter trans = transporters.get(coords);\n if (trans == null || ((TileEntity) trans).isInvalid()) {\n transporters.remove(coords);\n } else if (!trans.getWorld().isRemote && shouldExplode(oneInX(this.getPressure(), trans.getPressureResistance()))) {\n trans.explode();\n }\n }\n }\n } else {\n System.out.println(\"String_Node_Str\" + this.name);\n }\n }\n}\n"
|
"public void shouldCreateSquarePolygon() throws Exception {\n float x = 10f;\n float y = 20f;\n float width = 25f;\n SquarePolygon square = new SquarePolygon(x, y, width);\n Polygon expectedPolygon = new Polygon(new float[] { x, y, x + width - 1, y, x + width - 1, y + width - 1, x, y + width - 1 });\n Polygon actualPolygon = square.getPolygon();\n assertEquals(expectedPolygon.getPointCount(), actualPolygon.getPointCount());\n assertTrue(actualPolygon.closed());\n validatePolygons(expectedPolygon, actualPolygon);\n}\n"
|
"public void setBound(boolean bound, int memFactor, long now) {\n if (mOwner == null) {\n Slog.wtf(TAG, \"String_Node_Str\" + this + \"String_Node_Str\");\n }\n final int state = bound ? memFactor : STATE_NOTHING;\n if (mBoundState != state) {\n if (mBoundState != STATE_NOTHING) {\n addDuration(SERVICE_BOUND + (mBoundState * SERVICE_COUNT), now - mBoundStartTime);\n } else if (bound) {\n mBoundCount++;\n }\n mBoundState = state;\n mBoundStartTime = now;\n updateRunning(memFactor, now);\n }\n}\n"
|
"public static void main(String[] args) {\n String serialPort;\n if (args.length == 1) {\n serialPort = args[0];\n } else {\n serialPort = Serial4JArduino.selectSerialPort();\n }\n JArduino arduino = new AnalogInOutSerial(serialPort);\n arduino.runArduinoProcess();\n}\n"
|
"public Optional<Geo> fetchCoordinates(String archId) {\n String url = API_URL_COORDINATES + encodeUrl(archId);\n Geo result = null;\n try {\n Optional<JSONObject> jsonObject = net.downloadJson(url);\n if (jsonObject.isPresent()) {\n double zone = jsonObject.get().getDouble(KEY_UTM_ZONE);\n double easting = jsonObject.get().getDouble(KEY_UTM_EASTING);\n double northing = jsonObject.get().getDouble(KEY_UTM_NORTHING);\n result = convertUTMtoLL(northing, easting, zone);\n }\n } catch (JSONException e) {\n Utils.log(String.valueOf(e));\n }\n return Optional.fromNullable(result);\n}\n"
|
"public void calculateOffsets() {\n super.calculateOffsets();\n if (mDataNotSet)\n return;\n float diameter = getDiameter();\n float radius = diameter / 2f;\n PointF c = getCenterOffsets();\n mCircleBox.set(c.x - boxSize, c.y - boxSize, c.x + boxSize, c.y + boxSize);\n}\n"
|
"public void renderPathway(final GL2 gl, final AGLView containingView, final PathwayGraph pathway, final float fTextureTransparency, final boolean bHighlight) {\n Texture tmpPathwayTexture = loadPathwayTexture(pathway);\n tmpPathwayTexture.enable(gl);\n tmpPathwayTexture.bind(gl);\n if (bHighlight) {\n gl.glColor4f(1f, 0.85f, 0.85f, fTextureTransparency);\n } else {\n gl.glColor4f(1f, 1f, 1f, fTextureTransparency);\n }\n TextureCoords texCoords = tmpPathwayTexture.getImageTexCoords();\n float textureWidth = containingView.getPixelGLConverter().getGLWidthForPixelWidth(pathway.getWidth());\n float textureHeight = containingView.getPixelGLConverter().getGLHeightForPixelHeight(pathway.getHeight());\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR_MIPMAP_LINEAR);\n gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);\n gl.glBegin(GL2.GL_QUADS);\n gl.glTexCoord2f(texCoords.left(), texCoords.bottom());\n gl.glVertex3f(0.0f, 0.0f, 0.0f);\n gl.glTexCoord2f(texCoords.right(), texCoords.bottom());\n gl.glVertex3f(textureWidth, 0.0f, 0.0f);\n gl.glTexCoord2f(texCoords.right(), texCoords.top());\n gl.glVertex3f(textureWidth, textureHeight, 0.0f);\n gl.glTexCoord2f(texCoords.left(), texCoords.top());\n gl.glVertex3f(0.0f, textureHeight, 0.0f);\n gl.glEnd();\n tmpPathwayTexture.disable(gl);\n if (bHighlight) {\n gl.glColor4f(1, 0, 0, 1);\n gl.glLineWidth(3);\n } else {\n gl.glColor4f(0.5f, 0.5f, 0.5f, 1.0f);\n gl.glLineWidth(1);\n }\n gl.glBegin(GL.GL_LINE_STRIP);\n gl.glVertex3f(0.0f, 0.0f, 0.0f);\n gl.glVertex3f(textureWidth, 0.0f, 0.0f);\n gl.glVertex3f(textureWidth, textureHeight, 0.0f);\n gl.glVertex3f(0.0f, textureHeight, 0.0f);\n gl.glVertex3f(0.0f, 0.0f, 0.0f);\n gl.glEnd();\n}\n"
|
"public void testTTL() throws Exception {\n int ttl = 1;\n String ttlTable = \"String_Node_Str\";\n String noTtlTable = \"String_Node_Str\";\n DatasetProperties props = DatasetProperties.builder().add(Table.PROPERTY_TTL, String.valueOf(ttl)).build();\n getTableAdmin(CONTEXT1, ttlTable, props).create();\n DatasetSpecification ttlTableSpec = DatasetSpecification.builder(ttlTable, HBaseTable.class.getName()).properties(props.getProperties()).build();\n HBaseTable table = new HBaseTable(CONTEXT1, ttlTableSpec, Collections.<String, String>emptyMap(), cConf, TEST_HBASE.getConfiguration(), hBaseTableUtil);\n DetachedTxSystemClient txSystemClient = new DetachedTxSystemClient();\n Transaction tx = txSystemClient.startShort();\n table.startTx(tx);\n table.put(b(\"String_Node_Str\"), b(\"String_Node_Str\"), b(\"String_Node_Str\"));\n table.commitTx();\n TimeUnit.MILLISECONDS.sleep(1010);\n tx = txSystemClient.startShort();\n table.startTx(tx);\n table.put(b(\"String_Node_Str\"), b(\"String_Node_Str\"), b(\"String_Node_Str\"));\n table.commitTx();\n tx = txSystemClient.startShort();\n table.startTx(tx);\n byte[] val = table.get(b(\"String_Node_Str\"), b(\"String_Node_Str\"));\n if (val != null) {\n LOG.info(\"String_Node_Str\" + Bytes.toStringBinary(val));\n }\n Assert.assertNull(val);\n Assert.assertArrayEquals(b(\"String_Node_Str\"), table.get(b(\"String_Node_Str\"), b(\"String_Node_Str\")));\n DatasetProperties props2 = DatasetProperties.builder().add(Table.PROPERTY_TTL, String.valueOf(Tables.NO_TTL)).build();\n getTableAdmin(CONTEXT1, noTtlTable, props2).create();\n DatasetSpecification noTtlTableSpec = DatasetSpecification.builder(noTtlTable, HBaseTable.class.getName()).properties(props2.getProperties()).build();\n HBaseTable table2 = new HBaseTable(CONTEXT1, noTtlTableSpec, cConf, TEST_HBASE.getConfiguration(), hBaseTableUtil);\n tx = txSystemClient.startShort();\n table2.startTx(tx);\n table2.put(b(\"String_Node_Str\"), b(\"String_Node_Str\"), b(\"String_Node_Str\"));\n table2.commitTx();\n TimeUnit.SECONDS.sleep(2);\n tx = txSystemClient.startShort();\n table2.startTx(tx);\n table2.put(b(\"String_Node_Str\"), b(\"String_Node_Str\"), b(\"String_Node_Str\"));\n table2.commitTx();\n tx = txSystemClient.startShort();\n table2.startTx(tx);\n Assert.assertArrayEquals(b(\"String_Node_Str\"), table2.get(b(\"String_Node_Str\"), b(\"String_Node_Str\")));\n Assert.assertArrayEquals(b(\"String_Node_Str\"), table2.get(b(\"String_Node_Str\"), b(\"String_Node_Str\")));\n}\n"
|
"String getHost() {\n return host == null ? \"String_Node_Str\" : host;\n}\n"
|
"public IProcess getProcessFromItem(Item item, boolean loadScreenshots) {\n if (CamelProcessItemImpl.class == item.getClass()) {\n RouteProcess process = null;\n process = new RouteProcess(item.getProperty());\n return process;\n }\n return null;\n}\n"
|
"public void doExecute() throws BuildException {\n Ivy ivy = getIvyInstance();\n IvySettings settings = ivy.getSettings();\n if (cache == null) {\n cache = settings.getDefaultCache();\n }\n if (xsl && xslFile == null) {\n throw new BuildException(\"String_Node_Str\");\n }\n if (module == null && PatternMatcher.EXACT.equals(matcher)) {\n throw new BuildException(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n } else if (module == null && !PatternMatcher.EXACT.equals(matcher)) {\n module = PatternMatcher.ANY_EXPRESSION;\n }\n ModuleRevisionId mrid = ModuleRevisionId.newInstance(organisation, module, revision);\n try {\n ModuleId[] mids = ivy.listModules(new ModuleId(organisation, module), settings.getMatcher(matcher));\n ModuleRevisionId[] mrids = new ModuleRevisionId[mids.length];\n for (int i = 0; i < mrids.length; i++) {\n if (branch != null) {\n mrids[i] = new ModuleRevisionId(mids[i], branch, revision);\n } else {\n mrids[i] = new ModuleRevisionId(mids[i], revision);\n }\n }\n DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mrids, true, false);\n String resolveId = ResolveOptions.getDefaultResolveId(md);\n ResolveReport report = ivy.resolve(md, new ResolveOptions().setResolveId(resolveId).setCache(ivy.getCacheManager(cache)).setValidate(doValidate(settings)));\n ResolutionCacheManager cacheMgr = getIvyInstance().getCacheManager(cache);\n new XmlReportOutputter().output(report, cacheMgr);\n if (graph) {\n gengraph(cacheMgr, md.getModuleRevisionId().getOrganisation(), md.getModuleRevisionId().getName());\n }\n if (dot) {\n gendot(cacheMgr, md.getModuleRevisionId().getOrganisation(), md.getModuleRevisionId().getName());\n }\n if (xml) {\n FileUtil.copy(cacheMgr.getConfigurationResolveReportInCache(resolveId, \"String_Node_Str\"), new File(todir, outputname + \"String_Node_Str\"), null);\n }\n if (xsl) {\n genreport(cacheMgr, md.getModuleRevisionId().getOrganisation(), md.getModuleRevisionId().getName());\n }\n } catch (Exception e) {\n throw new BuildException(\"String_Node_Str\" + mrid + \"String_Node_Str\" + e, e);\n }\n}\n"
|
"private void sendResponse(Channel channel, SocketAddress remoteAddress, int version, ChannelBuffer id, short type, ChannelBuffer content) {\n if (channel != null) {\n int length = 2 + 2 + id.readableBytes() + 2 + 4 + 8 + 2 + 2;\n ChannelBuffer response = ChannelBuffers.directBuffer(ByteOrder.LITTLE_ENDIAN, length);\n response.writeByte('@');\n response.writeByte('@');\n response.writeShort(length);\n response.writeByte(version);\n response.writeBytes(id);\n response.writeShort(ChannelBuffers.swapShort(type));\n if (content != null) {\n response.writeBytes(content);\n }\n response.writeShort(Checksum.crc16(Checksum.CRC16_X25, response.toByteBuffer(0, response.writerIndex())));\n response.writeByte(0x0D);\n response.writeByte(0x0A);\n channel.write(response, remoteAddress);\n }\n}\n"
|
"public void onResultPropertiesChange(boolean isChanged) {\n getFormulaList().finishActiveActionMode();\n if (!isChanged) {\n formulaState = null;\n return;\n }\n if (formulaState != null) {\n getFormulaList().getUndoState().addEntry(formulaState);\n formulaState = null;\n }\n if (properties.disableCalculation) {\n clearResult();\n }\n updateResultView(true);\n ViewUtils.invalidateLayout(layout, layout);\n}\n"
|
"public TopLevel createCopy(TopLevel topLevel, String URIprefix, String displayId, String version) {\n checkReadOnly();\n if (URIprefix == null) {\n URIprefix = extractURIprefix(topLevel.getIdentity());\n URIprefix = checkURIprefix(URIprefix);\n } else {\n URIprefix = checkURIprefix(URIprefix);\n }\n if (displayId == null) {\n displayId = topLevel.getDisplayId();\n }\n if (version == null) {\n version = topLevel.getVersion();\n }\n validateIdVersion(displayId, version);\n if (topLevel instanceof Collection) {\n Collection newCollection = ((Collection) topLevel).copy(URIprefix, displayId, version);\n addCollection(newCollection);\n return newCollection;\n } else if (topLevel instanceof ComponentDefinition) {\n ComponentDefinition newComponentDefinition = ((ComponentDefinition) topLevel).copy(URIprefix, displayId, version);\n addComponentDefinition(newComponentDefinition);\n return newComponentDefinition;\n } else if (topLevel instanceof Model) {\n Model newModel = ((Model) topLevel).copy(URIprefix, displayId, version);\n addModel(newModel);\n return newModel;\n } else if (topLevel instanceof ModuleDefinition) {\n ModuleDefinition newModuleDefinition = ((ModuleDefinition) topLevel).copy(URIprefix, displayId, version);\n addModuleDefinition(newModuleDefinition);\n return newModuleDefinition;\n } else if (topLevel instanceof Sequence) {\n Sequence newSequence = ((Sequence) topLevel).copy(URIprefix, displayId, version);\n addSequence(newSequence);\n return newSequence;\n } else if (topLevel instanceof GenericTopLevel) {\n GenericTopLevel newGenericTopLevel = ((GenericTopLevel) topLevel).copy(URIprefix, displayId, version);\n addGenericTopLevel(newGenericTopLevel);\n return newGenericTopLevel;\n } else {\n throw new IllegalArgumentException(\"String_Node_Str\" + topLevel.getIdentity());\n }\n}\n"
|
"public AssetFileDescriptor openAssetFileLocal(Uri uri, String mode) throws FileNotFoundException {\n final long ident = Binder.clearCallingIdentity();\n try {\n return openAssetFileInner(uri, mode);\n } finally {\n Binder.restoreCallingIdentity(ident);\n }\n}\n"
|
"public void animateCheck() {\n changeBackground();\n ObjectAnimator objectAnimator;\n if (eventCheck) {\n objectAnimator = ObjectAnimator.ofFloat(this, \"String_Node_Str\", ball.xFin);\n } else {\n objectAnimator = ObjectAnimator.ofFloat(this, \"String_Node_Str\", ball.xIni);\n }\n objectAnimator.setDuration(300);\n objectAnimator.start();\n}\n"
|
"public void wrapup() throws IllegalActionException {\n Time environmentTime = ThreadedComposite.this.getExecutiveDirector().getModelTime();\n if (ThreadedComposite.this._debugging) {\n ThreadedComposite.this._debug(\"String_Node_Str\", \"String_Node_Str\" + environmentTime);\n }\n synchronized (this) {\n _inputFrames.add(new TokenFrame(environmentTime, null, TokenFrame.STOP));\n notifyAll();\n }\n if (_exception != null) {\n throw new IllegalActionException(ThreadedComposite.this, _exception, \"String_Node_Str\");\n }\n if (_thread != null && _thread.isAlive()) {\n try {\n if (ThreadedComposite.this._debugging) {\n ThreadedComposite.this._debug(\"String_Node_Str\");\n }\n _thread.join();\n if (ThreadedComposite.this._debugging) {\n ThreadedComposite.this._debug(\"String_Node_Str\");\n }\n if (_exception != null) {\n throw new IllegalActionException(ThreadedComposite.this, _exception, \"String_Node_Str\");\n }\n } catch (InterruptedException e) {\n }\n }\n super.wrapup();\n}\n"
|
"private void propagateDatas(boolean isExecute) {\n String baseConnectorForCurrentNode = node.getConnectorFromName(currentConnector).getBaseSchema();\n if (outputdataContainer != null && (!outputdataContainer.getInputs().isEmpty() || !outputdataContainer.getOuputs().isEmpty())) {\n for (IODataComponent currentIO : outputdataContainer.getInputs()) {\n INode sourceNode = currentIO.getSource();\n if (currentIO.hasChanged() && (sourceNode.getConnectorFromName(currentIO.getConnection().getConnectorName()).getBaseSchema().equals(baseConnectorForCurrentNode))) {\n sourceNode.metadataOutputChanged(currentIO, currentIO.getName());\n if (isExecute) {\n currentIO.setTable(oldInputMetadata);\n currentIO.setColumnNameChanged(null);\n } else {\n currentIO.setTable(newInputMetadata);\n currentIO.setColumnNameChanged(null);\n }\n }\n }\n for (IODataComponent currentIO : outputdataContainer.getOuputs()) {\n INodeConnector nodeConnector = null;\n String baseConnector = null;\n Node sourceNode = (Node) currentIO.getSource();\n nodeConnector = sourceNode.getConnectorFromName(currentIO.getConnection().getConnectorName());\n baseConnector = nodeConnector.getBaseSchema();\n INode targetNode = currentIO.getTarget();\n boolean sourceIsBuiltIn = ((Node) currentIO.getSource()).getConnectorFromType(currentIO.getConnection().getLineStyle()).isMultiSchema();\n boolean targetIsBuiltIn = ((Node) targetNode).getConnectorFromType(currentIO.getConnection().getLineStyle()).isMultiSchema();\n boolean isJoblet = ((Node) targetNode).isJoblet();\n if (!isJoblet && baseConnector.equals(baseConnectorForCurrentNode) && (targetIsBuiltIn || (targetNode.getMetadataFromConnector(baseConnector) != null && !targetNode.getMetadataFromConnector(baseConnector).sameMetadataAs(newOutputMetadata)))) {\n targetNode.metadataInputChanged(currentIO, currentIO.getUniqueName());\n if (isExecute) {\n if (targetNode instanceof Node) {\n if (((Node) targetNode).getComponent().isSchemaAutoPropagated() && getPropagate() && targetNode.getMetadataList().size() > 0) {\n IMetadataTable tmpClone;\n if (sourceIsBuiltIn) {\n IMetadataTable tab = node.getMetadataTable(currentIO.getConnection().getMetadataTable().getTableName());\n if (tab == null && node.getJobletNode() != null) {\n tab = node.getJobletNode().getMetadataTable(currentIO.getConnection().getMetadataTable().getTableName());\n }\n IMetadataTable toCopy = newOutputMetadata.clone();\n String dbmsId = null;\n IMetadataTable copy;\n if (((Node) targetNode).getMetadataFromConnector(baseConnector) != null) {\n dbmsId = targetNode.getMetadataFromConnector(baseConnector).getDbms();\n MetadataTool.copyTable(dbmsId, toCopy, tmpClone);\n toCopy = tmpClone;\n copy = ((Node) targetNode).getMetadataFromConnector(baseConnector).clone(true);\n } else {\n final String mainConnector = \"String_Node_Str\";\n dbmsId = targetNode.getMetadataFromConnector(mainConnector).getDbms();\n MetadataTool.copyTable(dbmsId, toCopy, tmpClone);\n toCopy = tmpClone;\n copy = ((Node) targetNode).getMetadataFromConnector(mainConnector).clone(true);\n }\n MetadataTool.copyTable(dbmsId, toCopy, copy);\n ChangeMetadataCommand cmd = new ChangeMetadataCommand((Node) targetNode, null, null, copy, inputSchemaParam);\n if (outputdataContainer.getOuputs().size() > 0) {\n List<ColumnNameChanged> columnNameChanged = outputdataContainer.getOuputs().get(0).getColumnNameChanged();\n for (IODataComponent dataComp : cmd.outputdataContainer.getOuputs()) {\n dataComp.setColumnNameChanged(columnNameChanged);\n }\n }\n cmd.execute(true);\n propagatedChange.add(cmd);\n }\n }\n currentIO.setTable(oldOutputMetadata);\n currentIO.setColumnNameChanged(null);\n } else {\n if (targetNode instanceof Node) {\n if (!targetIsBuiltIn && getPropagate()) {\n if (((Node) targetNode).getComponent().isSchemaAutoPropagated()) {\n if (outputdataContainer.getOuputs().size() > 0) {\n List<ColumnNameChanged> columnNameChanged = outputdataContainer.getOuputs().get(0).getColumnNameChanged();\n for (ChangeMetadataCommand cmd : propagatedChange) {\n for (IODataComponent dataComp : cmd.outputdataContainer.getOuputs()) {\n dataComp.setColumnNameChanged(columnNameChanged);\n }\n }\n }\n }\n }\n }\n currentIO.setTable(newOutputMetadata);\n currentIO.setColumnNameChanged(null);\n }\n }\n }\n }\n } else if (dataComponent != null) {\n for (IConnection outgoingConnection : node.getOutgoingConnections()) {\n if (outgoingConnection.getConnectorName().equals(currentConnector)) {\n outgoingConnection.getTarget().metadataInputChanged(dataComponent, outgoingConnection.getName());\n }\n }\n } else {\n if (!node.getOutgoingConnections().isEmpty()) {\n for (IConnection outgoingConnection : node.getOutgoingConnections()) {\n final Node target = (Node) outgoingConnection.getTarget();\n if (target != null && target.getExternalNode() != null) {\n if (GlobalServiceRegister.getDefault().isServiceRegistered(IXmlMapService.class)) {\n final IXmlMapService service = (IXmlMapService) GlobalServiceRegister.getDefault().getService(IXmlMapService.class);\n if (service.isXmlMapComponent(target.getExternalNode())) {\n IODataComponent output = new IODataComponent(outgoingConnection, newOutputMetadata);\n target.metadataInputChanged(output, outgoingConnection.getUniqueName());\n }\n }\n }\n }\n }\n }\n if (inputdataContainer != null) {\n for (IODataComponent currentIO : inputdataContainer.getOuputs()) {\n if (currentIO.hasChanged() && (currentIO.getSource().getConnectorFromName(currentIO.getConnection().getConnectorName()).getBaseSchema().equals(currentConnector))) {\n INode targetNode = currentIO.getTarget();\n targetNode.metadataInputChanged(currentIO, currentIO.getUniqueName());\n if (isExecute) {\n currentIO.setTable(oldInputMetadata);\n currentIO.setColumnNameChanged(null);\n } else {\n currentIO.setTable(newInputMetadata);\n currentIO.setColumnNameChanged(null);\n }\n }\n }\n }\n}\n"
|
"public AgentMessage handle(AgentMessage request) {\n CheckMetrics metrics = (CheckMetrics) request;\n MetricsStat stat = new MetricsStat(request);\n Parcel readings = new Parcel();\n StatsDProcessor processor = this.getAgent().getStatsDProcessor();\n if (processor != null) {\n Pattern filter = Pattern.compile(metrics.getMetricsNameFilter());\n for (Entry<String, Metric> metric : processor.getMetrics().getMetrics().entrySet()) {\n String key = metric.getKey();\n key = metrics.isStripSourceFromMetricName() ? key.substring(key.indexOf(\"String_Node_Str\") + 1) : key;\n if (filter.matcher(key).matches()) {\n readings.addMetric(key, metric.getValue());\n }\n }\n }\n stat.setReadings(readings.getReadings());\n return stat;\n}\n"
|
"private WordAnalysis analyzeWithoutCache(Token token) {\n String word = token.getText();\n String s = normalizeForAnalysis(word);\n if (s.length() == 0) {\n return WordAnalysis.EMPTY_INPUT_RESULT;\n }\n List<SingleAnalysis> result = analyzer.analyze(s);\n if (result.size() == 0) {\n result = analyzeWordsWithApostrophe(s);\n }\n if (result.size() == 0 && useUnidentifiedTokenAnalyzer) {\n result = unidentifiedTokenAnalyzer.analyze(token);\n }\n if (result.size() == 0) {\n result = new ArrayList<>(1);\n result.add(SingleAnalysis.unknown(word));\n }\n return new WordAnalysis(word, s, result);\n}\n"
|
"public synchronized void applyOutputProbes(List<Probe> list, double t1, ModelInfo info) {\n double maxStep = info.model.getMaxStepSize();\n boolean coincidesWithStep = (maxStep != -1 && TimeBase.modulo(t1, maxStep) == 0);\n for (Probe p : list) {\n if (!p.isActive() || TimeBase.compare(t1, p.getStartTime()) < 0 || TimeBase.compare(t1, p.getStopTime()) > 0) {\n continue;\n }\n if (p.isEventTime(t1) || (coincidesWithStep && p.getUpdateInterval() < 0)) {\n p.apply(t1);\n }\n }\n}\n"
|
"public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n updateSiteOrFinishActivity();\n if (savedInstanceState != null) {\n String roleValue = savedInstanceState.getString(KEY_SELECTED_ROLE);\n if (!TextUtils.isEmpty(roleValue)) {\n mRole = Role.fromString(roleValue);\n }\n ArrayList<String> retainedUsernames = savedInstanceState.getStringArrayList(KEY_USERNAMES);\n if (retainedUsernames != null) {\n mUsernames.clear();\n mUsernames.addAll(retainedUsernames);\n }\n }\n setRetainInstance(true);\n}\n"
|
"public void addComponent(ChatConversationComponent component) {\n Style style = document.getStyleSheet().addStyle(StyleConstants.ComponentElementName, document.getStyleSheet().getStyle(\"String_Node_Str\"));\n style.addAttribute(AbstractDocument.ElementNameAttribute, StyleConstants.ComponentElementName);\n TransparentPanel wrapPanel = new TransparentPanel(new BorderLayout());\n wrapPanel.add(component, BorderLayout.NORTH);\n style.addAttribute(StyleConstants.ComponentAttribute, wrapPanel);\n style.addAttribute(\"String_Node_Str\", \"String_Node_Str\");\n style.addAttribute(\"String_Node_Str\", component.getDate().getTime());\n try {\n document.insertString(document.getLength(), \"String_Node_Str\", style);\n } catch (BadLocationException e) {\n logger.error(\"String_Node_Str\", e);\n }\n this.scrollToBottom();\n}\n"
|
"void addMeasurement(String name) {\n MeasurementSet measurementSet = getMeasurementSet();\n Measurement measurement = new Measurement();\n measurement.setName(name);\n measurementSet.adoptAndAppend(Measurement.safeDownCast(measurement.clone()));\n measurementValues.add(null);\n setModified(Operation.MeasurementSetChanged);\n}\n"
|
"public void addressNoValidParametersTest() {\n given().param(\"String_Node_Str\", \"String_Node_Str\").when().get(getEndPointName()).then().assertThat().body(\"String_Node_Str\", is(GeocodingErrorCodes.INVALID_PARAMETER_VALUE)).statusCode(400);\n given().param(\"String_Node_Str\", \"String_Node_Str\").when().get(getEndPointName()).then().assertThat().body(\"String_Node_Str\", is(GeocodingErrorCodes.INVALID_PARAMETER_VALUE)).statusCode(400);\n}\n"
|
"public void updateFromFeed(Map<String, List<Map<String, String>>> data) {\n if (data != null) {\n Collection<FeedProvider> feeds = getVisibleFeedProviders();\n Map<String, Double> valuesMap = new HashMap<String, Double>();\n for (FeedProvider provider : feeds) {\n String feedId = provider.getSubscriptionId();\n List<Map<String, String>> dataForThisFeed = data.get(feedId);\n if (dataForThisFeed != null && !dataForThisFeed.isEmpty()) {\n Map<String, String> entry = dataForThisFeed.get(dataForThisFeed.size() - 1);\n try {\n Object value = entry.get(FeedProvider.NORMALIZED_VALUE_KEY);\n RenderingInfo ri = provider.getRenderingInfo(entry);\n value = ri.getValueText();\n valuesMap.put(feedId, Double.valueOf(ri.getValueText()));\n ;\n for (AbstractComponent parameter : telemetryElements) {\n if (feedId.startsWith(\"String_Node_Str\")) {\n if (feedId.substring(4).equals(parameter.getExternalKey())) {\n telemetryTable.getModel().setValueAt(value, telemetryElements.indexOf(parameter), 2);\n }\n } else {\n if (feedId.equals(parameter.getExternalKey())) {\n telemetryTable.getModel().setValueAt(value, telemetryElements.indexOf(parameter), 2);\n }\n }\n }\n } catch (ClassCastException ex) {\n logger.error(\"String_Node_Str\", ex);\n } catch (NumberFormatException ex) {\n logger.error(\"String_Node_Str\", ex);\n }\n }\n }\n FeedProvider.RenderingInfo multiValueInfo = getMulti().getCapability(Evaluator.class).evaluate(data, getFeedProviders(getMulti()));\n if (multiValueInfo != null) {\n resultOutput.setText(multiValueInfo.getValueText() + multiValueInfo.getStatusText());\n resultOutput.setForeground(multiValueInfo.getValueColor());\n } else {\n resultOutput.setText(\"String_Node_Str\");\n }\n if (getSelectedExpression() != null) {\n MultiExpression expression = new MultiExpression(Enum.valueOf(SetLogic.class, getSelectedExpression().getMultiSetLogic().name()), getSelectedExpression().getPUIs().split(MultiRuleExpression.parameterDelimiter, 0), getSelectedExpression().getSinglePui(), getSelectedExpression().getOperator(), getSelectedExpression().getVal().toString(), getSelectedExpression().getDisplay());\n String ruleResult = expression.execute(valuesMap);\n if (ruleResult != null) {\n controlPanel.setRuleResultField(ruleResult);\n } else {\n controlPanel.setRuleResultField(\"String_Node_Str\");\n }\n }\n }\n}\n"
|
"public static CharBuffer getLineBuffer(Editor editor, int lline) {\n return CharBuffer.wrap(editor.getDocument().getChars(), getLineStartOffset(editor, lline), getLineCharCount(editor, lline));\n}\n"
|
"protected boolean buildJobWithMaven(JobExportType jobExportType, IProgressMonitor monitor) {\n String context = (contextCombo == null || contextCombo.isDisposed()) ? processItem.getProcess().getDefaultContext() : contextCombo.getText();\n try {\n String destination = getDestinationValue();\n int separatorIndex = destination.lastIndexOf(File.separator);\n if (separatorIndex == -1) {\n String userDir = System.getProperty(\"String_Node_Str\");\n destination = userDir + File.separator + destination;\n }\n Map<ExportChoice, Object> exportChoiceMap = getExportChoiceMap();\n exportChoiceMap.put(ExportChoice.addStatistics, Boolean.TRUE);\n return BuildJobManager.getInstance().buildJobs(destination, Arrays.asList(getCheckNodes()), getSelectedJobVersion(), context, exportChoiceMap, jobExportType, monitor);\n } catch (Exception e) {\n MessageBoxExceptionHandler.process(e, getShell());\n return false;\n }\n}\n"
|
"public int getStubVersion() {\n return 92;\n}\n"
|
"public void onSink(INKFRequestContext aContext, DatabaseUtil util) throws Exception {\n IHDSNode details = aContext.sourcePrimary(IHDSNode.class);\n String existsSql = \"String_Node_Str\";\n String updateMetaSql;\n if (util.issueSourceRequest(\"String_Node_Str\", Boolean.class, new ArgByValue(\"String_Node_Str\", existsSql), new ArgByValue(\"String_Node_Str\", aContext.source(\"String_Node_Str\")))) {\n updateMetaSql = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n } else {\n updateMetaSql = \"String_Node_Str\" + \"String_Node_Str\";\n }\n util.issueSourceRequest(\"String_Node_Str\", null, new ArgByValue(\"String_Node_Str\", updateMetaSql), new ArgByValue(\"String_Node_Str\", details.getFirstValue(\"String_Node_Str\")), new ArgByValue(\"String_Node_Str\", aContext.source(\"String_Node_Str\")));\n util.cutGoldenThread(\"String_Node_Str\");\n}\n"
|
"protected void _message(String info) {\n Object[] message = new Object[1];\n message[0] = _messageComponent(StringUtilities.ellipsis(info, StringUtilities.ELLIPSIS_LENGTH_LONG));\n Object[] options = { \"String_Node_Str\" };\n JOptionPane.showOptionDialog(getContext(), message, \"String_Node_Str\", JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, options[0]);\n}\n"
|
"public void runOperation(VariableMap variableMap, IProgressMonitor monitor) throws Exception {\n Branch requirementsBranch = variableMap.getBranch(\"String_Node_Str\");\n Branch testProcedureBranch = variableMap.getBranch(\"String_Node_Str\");\n Collection<? extends IArtifactType> types = variableMap.getCollection(ArtifactType.class, \"String_Node_Str\");\n boolean searchInherited = variableMap.getBoolean(\"String_Node_Str\");\n File scriptDir = new File(variableMap.getString(\"String_Node_Str\"));\n List<TraceabilityStyle> selectedReports = getStyles(variableMap);\n Collection<TraceHandler> traceHandlers = new LinkedList<TraceHandler>();\n for (String handler : availableTraceHandlers) {\n if (variableMap.getBoolean(handler)) {\n traceHandlerIds.add(handler);\n }\n }\n int totalWork = selectedReports.size() * 2 + 1;\n monitor.beginTask(\"String_Node_Str\", totalWork);\n if (selectedReports.size() > 0) {\n TraceabilityProviderOperation provider;\n if (variableMap.getBoolean(PULL_ALL_DATA_LABEL)) {\n provider = new BranchTraceabilityOperation(testProcedureBranch, types, searchInherited);\n } else {\n provider = new ScriptTraceabilityOperation(scriptDir, requirementsBranch, false, types, searchInherited, traceHandlerIds);\n }\n RequirementTraceabilityData traceabilityData = new RequirementTraceabilityData(testProcedureBranch, provider);\n IStatus status = traceabilityData.initialize(monitor);\n if (status.getSeverity() == IStatus.CANCEL) {\n monitor.setCanceled(true);\n } else if (status.getSeverity() == IStatus.OK) {\n monitor.worked(1);\n int count = 0;\n List<IFile> files = new ArrayList<IFile>();\n for (TraceabilityStyle style : selectedReports) {\n monitor.subTask(String.format(\"String_Node_Str\", style.asLabel(), ++count, selectedReports.size()));\n TraceabilityTable table = TraceabilityFactory.getTraceabilityTable(OutputFormat.EXCEL, style, traceabilityData);\n if (table != null) {\n table.run(monitor);\n }\n monitor.worked(1);\n if (table != null) {\n monitor.subTask(String.format(\"String_Node_Str\", style.asLabel(), count, selectedReports.size()));\n String fileName = style.toString() + \"String_Node_Str\" + Lib.getDateTimeString() + \"String_Node_Str\";\n IFile iFile = OseeData.getIFile(fileName);\n AIFile.writeToFile(iFile, table.toString());\n files.add(iFile);\n }\n monitor.worked(1);\n }\n for (IFile iFile : files) {\n Program.launch(iFile.getLocation().toOSString());\n }\n } else {\n throw new Exception(status.getMessage(), status.getException());\n }\n }\n monitor.subTask(\"String_Node_Str\");\n}\n"
|
"public static Sound findFreeSound(int soundIndex) {\n for (int i = 0; i < channels.length; i++) {\n Sound[] sounds = channels[i];\n Sound sound = sounds[soundIndex];\n if (!sound.isPlaying()) {\n return sound;\n }\n return null;\n}\n"
|
"public TableId apply(NamespaceMeta input) {\n try {\n TableId tableId = StreamUtils.getStateStoreTableId(input.getNamespaceId().toId());\n return tableUtil.createHTableId(new NamespaceId(tableId.getNamespace()), tableId.getTableName());\n } catch (IOException e) {\n throw Throwables.propagate(e);\n }\n}\n"
|
"private List<String> getPatterns(Indicator indicator) {\n List<String> patternStrings = new ArrayList<String>();\n Domain dataValidDomain = indicator.getParameters().getDataValidDomain();\n if (dataValidDomain == null) {\n return patternStrings;\n }\n EList<Pattern> patterns = dataValidDomain.getPatterns();\n for (Pattern pattern : patterns) {\n String regexp = this.dbmsLanguage.getRegexp(pattern);\n if (regexp != null) {\n patternStrings.add(regexp);\n }\n }\n return patternStrings;\n}\n"
|
"private void createMinView() {\n GridBagConstraints gbc = new GridBagConstraints();\n Insets insets = new Insets(0, 10, 0, 0);\n gbc.insets = insets;\n gbc.fill = GridBagConstraints.NONE;\n gbc.anchor = GridBagConstraints.CENTER;\n gbc.weightx = 0;\n gbc.weighty = 0;\n gbc.gridheight = 5;\n minPanel.add(minIconLabel, gbc);\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.anchor = GridBagConstraints.NORTHWEST;\n gbc.gridx = 1;\n gbc.weightx = 1;\n gbc.weighty = 0;\n gbc.gridwidth = GridBagConstraints.REMAINDER;\n gbc.gridheight = 1;\n minPanel.add(minTitleLabel, gbc);\n gbc.insets = new Insets(6, 4, 0, 0);\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.anchor = GridBagConstraints.CENTER;\n gbc.gridx = 4;\n gbc.gridy = 0;\n gbc.weightx = 1;\n gbc.weighty = 0;\n gbc.gridwidth = 1;\n gbc.gridheight = 5;\n minPanel.add(minButtonPanel, gbc);\n gbc.insets = insets;\n gbc.fill = GridBagConstraints.NONE;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.gridx = 1;\n gbc.gridy = 1;\n gbc.weightx = 0;\n gbc.weighty = 0;\n gbc.gridwidth = 1;\n gbc.gridheight = 0;\n minPanel.add(minStatusLabel, gbc);\n gbc.insets = new Insets(0, 0, 0, 0);\n gbc.gridx++;\n minPanel.add(minLinkButton, gbc);\n gbc.fill = GridBagConstraints.NONE;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.weightx = 0;\n gbc.weighty = 0;\n gbc.gridwidth = 3;\n gbc.gridheight = 0;\n minPanel.add(Box.createHorizontalStrut(progressBarWidth - 16), gbc);\n}\n"
|
"public static void subtractFromOffSetValue(HandlerContext handlerCtx) {\n String offsetValue = (String) handlerCtx.getInputValue(OFFSET);\n int result = 0;\n try {\n result = Integer.parseInt(offsetValue);\n if (result >= DEFAULT_OFFSET_INCREMENT) {\n result = result - DEFAULT_OFFSET_INCREMENT;\n } else {\n result = 0;\n }\n } catch (NumberFormatException ex) {\n GuiUtil.getLogger().info(\"String_Node_Str\" + ex);\n }\n handlerCtx.setOutputValue(\"String_Node_Str\", result);\n}\n"
|
"protected RealPointValuePair doOptimize() throws FunctionEvaluationException {\n final double[] startPoint = getStartPoint();\n if ((startConfiguration == null) || (startConfiguration.length != startPoint.length)) {\n final double[] unit = new double[startPoint.length];\n Arrays.fill(unit, 1.0);\n setStartConfiguration(unit);\n }\n final boolean isMinim = getGoalType() == GoalType.MINIMIZE;\n final Comparator<RealPointValuePair> comparator = new Comparator<RealPointValuePair>() {\n public int compare(final RealPointValuePair o1, final RealPointValuePair o2) {\n final double v1 = o1.getValue();\n final double v2 = o2.getValue();\n return isMinim ? Double.compare(v1, v2) : Double.compare(v2, v1);\n }\n };\n buildSimplex(startPoint);\n evaluateSimplex(comparator);\n RealPointValuePair[] previous = new RealPointValuePair[simplex.length];\n int iteration = 0;\n final ConvergenceChecker<RealPointValuePair> checker = getConvergenceChecker();\n while (true) {\n if (iteration > 0) {\n boolean converged = true;\n for (int i = 0; i < simplex.length; ++i) {\n converged &= checker.converged(iteration, previous[i], simplex[i]);\n }\n if (converged) {\n return simplex[0];\n }\n }\n System.arraycopy(simplex, 0, previous, 0, simplex.length);\n iterateSimplex(comparator);\n ++iteration;\n }\n}\n"
|
"public void testAbortAfterFinished() throws Exception {\n String path = Paths.get(String.format(\"String_Node_Str\", Paths.get(\"String_Node_Str\").toAbsolutePath().toString(), SCRIPT_PATH, \"String_Node_Str\")).toString();\n Socket client = new Socket();\n client.connect(new InetSocketAddress(\"String_Node_Str\", 61234));\n OutputStream outputStream = client.getOutputStream();\n InputStream inputStream = client.getInputStream();\n byte[] prepare = (\"String_Node_Str\" + \"String_Node_Str\" + (\"String_Node_Str\".length() + path.length()) + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + path + \"String_Node_Str\").getBytes(\"String_Node_Str\");\n outputStream.write(prepare);\n outputStream.flush();\n String preparedContent = \"String_Node_Str\" + path + \"String_Node_Str\";\n ByteBuffer preparedExpected = ByteBuffer.wrap((\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + preparedContent.length() + \"String_Node_Str\" + \"String_Node_Str\" + preparedContent).getBytes(\"String_Node_Str\"));\n ByteBuffer prepared = ByteBuffer.allocate(preparedExpected.capacity());\n while (prepared.hasRemaining()) {\n prepared.put((byte) inputStream.read());\n }\n prepared.flip();\n assertEquals(preparedExpected, prepared);\n byte[] start = (\"String_Node_Str\" + \"String_Node_Str\" + (\"String_Node_Str\".length() + path.length() + \"String_Node_Str\".length()) + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + path + \"String_Node_Str\").getBytes(\"String_Node_Str\");\n outputStream.write(start);\n outputStream.flush();\n String startedContent = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + path + \"String_Node_Str\";\n ByteBuffer startedExpected = ByteBuffer.wrap((\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + startedContent.length() + \"String_Node_Str\" + \"String_Node_Str\" + startedContent).getBytes(\"String_Node_Str\"));\n ByteBuffer started = ByteBuffer.allocate(startedExpected.capacity());\n while (started.hasRemaining()) {\n started.put((byte) inputStream.read());\n }\n started.flip();\n assertEquals(startedExpected, started);\n byte[] resultRequest = (\"String_Node_Str\" + \"String_Node_Str\" + (\"String_Node_Str\".length() + path.length() + \"String_Node_Str\".length()) + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + path + \"String_Node_Str\").getBytes(\"String_Node_Str\");\n outputStream.write(resultRequest);\n outputStream.flush();\n String finishedContent = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + path + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n ByteBuffer finishedExpected = ByteBuffer.wrap((\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + finishedContent.length() + \"String_Node_Str\" + \"String_Node_Str\" + finishedContent).getBytes(\"String_Node_Str\"));\n String errorContent = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + path + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n ByteBuffer errorExpected = ByteBuffer.wrap((\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + errorContent.length() + \"String_Node_Str\" + \"String_Node_Str\" + errorContent).getBytes(\"String_Node_Str\"));\n ByteBuffer finished = ByteBuffer.allocate(errorExpected.capacity());\n while (finished.hasRemaining()) {\n finished.put((byte) inputStream.read());\n if (!finished.hasRemaining() && finished.capacity() == errorExpected.capacity()) {\n if (inputStream.available() > 0) {\n ByteBuffer temp = ByteBuffer.allocate(finishedExpected.capacity());\n finished.flip();\n temp.put(finished);\n finished = temp;\n } else {\n finished.flip();\n assertEquals(errorExpected, finished);\n Thread.sleep(200);\n finished = ByteBuffer.allocate(errorExpected.capacity());\n outputStream.write(resultRequest);\n outputStream.flush();\n }\n }\n }\n finished.flip();\n assertEquals(finishedExpected, finished);\n byte[] abort = (\"String_Node_Str\" + \"String_Node_Str\" + (\"String_Node_Str\".length() + path.length() + \"String_Node_Str\".length()) + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + path + \"String_Node_Str\").getBytes(\"String_Node_Str\");\n outputStream.write(abort);\n outputStream.flush();\n ByteBuffer finishedRecv = ByteBuffer.allocate(finishedExpected.capacity());\n while (finishedRecv.hasRemaining()) {\n finishedRecv.put((byte) inputStream.read());\n }\n finishedRecv.flip();\n client.close();\n assertEquals(finishedExpected, finishedRecv);\n}\n"
|
"public boolean canModify(Object element, String property) {\n boolean editable = false;\n if (getSelectedExecNodeOwner() instanceof AbstractTestCaseEditor && ((AbstractTestCaseEditor) getSelectedExecNodeOwner()).getEditorHelper().requestEditableState() == EditableState.OK) {\n editable = true;\n }\n if (editable && element instanceof ICompNamesPairPO) {\n final ICompNamesPairPO compNamesPair = (ICompNamesPairPO) element;\n return COLUMN_NEW_NAME.equals(property) && isModifiable() && CompNamesBP.isValidCompNamePair(compNamesPair);\n }\n return false;\n}\n"
|
"public void setActive(int active) {\n if (this.active == active)\n return;\n int old = this.active;\n int new_ = active;\n GLElement oldv = getActiveElement();\n switch(lazy) {\n case NONE:\n break;\n case DESTROY:\n if (context != null && oldv != null)\n GLElementAccessor.takeDown(oldv);\n instances[old] = null;\n if (new_ >= 0) {\n instances[new_] = children.get(new_).get();\n instances[new_].setLayoutData(children.get(new_));\n if (context != null)\n setup(instances[new_]);\n }\n break;\n case UNINITIALIZE:\n if (context != null) {\n if (oldv != null)\n GLElementAccessor.takeDown(oldv);\n if (new_ >= 0)\n setup(instances[new_]);\n }\n break;\n }\n this.active = active;\n fireActiveChanged(active);\n relayout();\n}\n"
|
"private void generateJavaFile() {\n final IWorkspaceRunnable op = new IWorkspaceRunnable() {\n public void run(IProgressMonitor monitor) throws CoreException {\n Node node = (Node) elem;\n IProcess process = node.getProcess();\n String jobName = process.getName();\n String nodeName = node.getUniqueName();\n String wsdlfile = (String) node.getPropertyValue(\"String_Node_Str\");\n wsdlfile = wsdlfile.substring(1, wsdlfile.length() - 1);\n if (wsdlfile.equals(\"String_Node_Str\")) {\n Display.getDefault().syncExec(new Runnable() {\n public void run() {\n MessageDialog.openError(Display.getDefault().getActiveShell(), org.talend.designer.core.i18n.Messages.getString(\"String_Node_Str\"), org.talend.designer.core.i18n.Messages.getString(\"String_Node_Str\"));\n }\n });\n return;\n }\n }\n } catch (PersistenceException ex) {\n ExceptionHandler.process(ex);\n }\n try {\n List<RoutinesParameterType> needList = new ArrayList<RoutinesParameterType>();\n List<RoutinesParameterType> createJobRoutineDependencies = RoutinesUtil.createJobRoutineDependencies(false);\n for (RoutineItem returnItem : returnItemList) {\n for (RoutinesParameterType routinesParameterType : createJobRoutineDependencies) {\n if (routinesParameterType.getId().equals(returnItem.getProperty().getId())) {\n needList.add(routinesParameterType);\n }\n }\n }\n if (process instanceof org.talend.designer.core.ui.editor.process.Process) {\n ((org.talend.designer.core.ui.editor.process.Process) process).addGeneratingRoutines(needList);\n }\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n }\n FilesUtils.removeFolder(dir, true);\n}\n"
|
"public void deleteRealFile() throws IOException {\n File victim = new File(filename);\n String namePrefix = victim.getName();\n namePrefix = namePrefix.substring(0, namePrefix.lastIndexOf('.'));\n final String targetPrefix = namePrefix + \"String_Node_Str\";\n File dir = victim.getParentFile();\n if (dir != null) {\n File[] weaverGenerated = dir.listFiles(new FilenameFilter() {\n public boolean accept(File dir, String name) {\n return name.startsWith(targetPrefix);\n }\n });\n if (weaverGenerated != null) {\n for (int i = 0; i < weaverGenerated.length; i++) {\n weaverGenerated[i].delete();\n }\n }\n }\n victim.delete();\n}\n"
|
"public void widgetSelected(SelectionEvent e) {\n if (((TabItem) e.item) == generalDataUseCaseTab) {\n projectMode = EApplicationMode.UNSPECIFIED_NEW_DATA;\n } else if (((TabItem) e.item) == sampleTab) {\n if (btnSampleProject.getSelection())\n projectMode = EApplicationMode.SAMPLE_PROJECT;\n else\n projectMode = EApplicationMode.GENE_EXPRESSION_SAMPLE_DATA;\n } else if (((TabItem) e.item) == geneticDataUseCaseTab) {\n projectMode = EApplicationMode.GENE_EXPRESSION_NEW_DATA;\n } else if (((TabItem) e.item) == loadProjectTab) {\n projectMode = EApplicationMode.LOAD_PROJECT;\n } else if (((TabItem) e.item) == collaborationClientTab) {\n projectMode = EApplicationMode.COLLABORATION_CLIENT;\n } else\n throw new IllegalStateException(\"String_Node_Str\");\n}\n"
|
"public synchronized void connectIfNecessary() throws IOException {\n if ((wsSession == null) || !wsSession.isOpen()) {\n try {\n client = new WebSocketClient();\n SimpleEchoSocket socket = new SimpleEchoSocket();\n client.start();\n ClientUpgradeRequest request = new ClientUpgradeRequest();\n Thread.sleep(100);\n wsSession = client.connect(socket, new URI(url), request).get();\n } catch (Exception e) {\n if (connectionListener != null) {\n connectionListener.connectionFailed();\n }\n if (client != null) {\n log.debug(\"String_Node_Str\", label);\n try {\n client.stop();\n } catch (Exception e1) {\n log.debug(\"String_Node_Str\", label);\n }\n client = null;\n }\n throw new KurentoException(label + \"String_Node_Str\" + url, e);\n }\n try {\n if (!latch.await(this.connectionTimeout, TimeUnit.MILLISECONDS)) {\n if (connectionListener != null) {\n connectionListener.connectionFailed();\n }\n if (client != null) {\n log.debug(\"String_Node_Str\", label);\n client.destroy();\n log.debug(\"String_Node_Str\", label);\n }\n throw new KurentoException(label + \"String_Node_Str\" + this.connectionTimeout + \"String_Node_Str\" + url);\n }\n if (session == null) {\n session = new ClientSession(null, null, JsonRpcClientWebSocket.this);\n handlerManager.afterConnectionEstablished(session);\n } else {\n try {\n rsHelper.sendRequest(METHOD_RECONNECT, String.class);\n log.info(\"String_Node_Str\", label, url);\n } catch (JsonRpcErrorException e) {\n if (e.getCode() == 40007) {\n rsHelper.setSessionId(null);\n rsHelper.sendRequest(METHOD_RECONNECT, String.class);\n log.info(\"String_Node_Str\", label, url);\n }\n }\n }\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n }\n}\n"
|
"private ThemeHandle getThemeHandle() {\n IStructuredSelection selection = null;\n if (getSelection() instanceof IStructuredSelection) {\n selection = (IStructuredSelection) getSelection();\n }\n if (selection != null && !selection.isEmpty() && selection.getFirstElement() instanceof ReportDesignEditPart) {\n return ((ModuleHandle) ((ReportDesignEditPart) selection.getFirstElement()).getModel()).getTheme();\n }\n return null;\n}\n"
|
"public final void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected) {\n drawString(fontRenderer, this.ruleName, x, y + 6, 0xFFFFFFFF);\n this.resetButton.x = x + listWidth / 2 + 110;\n this.resetButton.y = y;\n this.resetButton.enabled = isRuleSet(this.ruleName);\n this.resetButton.drawButton(mc, mouseX, mouseY);\n this.draw(x, y, listWidth, slotHeight, mouseX, mouseY);\n if (this.isMouseOverControl(mouseX, mouseY)) {\n String key = \"String_Node_Str\" + ruleName;\n if (I18n.hasKey(key)) {\n hoveredToolTip = I18n.format(key);\n }\n }\n}\n"
|
"public Token subtract(Token rightArg) throws IllegalActionException {\n int typeInfo = TypeCPO.compare(this, rightArg);\n try {\n if (typeInfo == CPO.LOWER) {\n return rightArg.subtractR(this);\n } else if (rightArg instanceof IntToken) {\n int result = _value - ((IntToken) rightArg).getValue();\n return new IntToken(result);\n } else if (typeInfo == CPO.HIGHER) {\n IntToken tmp = (IntToken) this.convert(rightArg);\n int result = _value - tmp.getValue();\n return new IntToken(result);\n } else {\n throw new Exception();\n }\n } catch (Exception ex) {\n String str = \"String_Node_Str\";\n str = str + this.getClass().getName() + \"String_Node_Str\";\n str = str + rightArg.getClass().getName();\n throw new IllegalActionException(str + \"String_Node_Str\" + ex.getMessage());\n }\n}\n"
|
"public void onReverseView(View view) {\n reverseView();\n}\n"
|
"public void testEJBAnnotatedLdapISRealmOnWar1andWar2IncorrectRealm() throws Exception {\n String response;\n String queryString;\n Log.info(logClass, getCurrentTestName(), \"String_Node_Str\" + getCurrentTestName());\n Log.info(logClass, getCurrentTestName(), \"String_Node_Str\");\n WCApplicationHelper.createWar(myServer, TEMP_DIR, EJB_REALM1_WAR_NAME, true, EJB_BEAN_JAR_NAME, true, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n WCApplicationHelper.createWar(myServer, TEMP_DIR, EJB_REALM2_WAR_NAME, true, EJB_BEAN_JAR_NAME, true, \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n WCApplicationHelper.packageWarsToEar(myServer, TEMP_DIR, EJB_EAR_REALM_NAME, true, EJB_REALM1_WAR_NAME);\n WCApplicationHelper.packageWarsToEar(myServer, TEMP_DIR, EJB_EAR_REALM2_NAME, true, EJB_REALM2_WAR_NAME);\n WCApplicationHelper.addEarToServerApps(myServer, TEMP_DIR, EJB_EAR_REALM_NAME);\n WCApplicationHelper.addEarToServerApps(myServer, TEMP_DIR, EJB_EAR_REALM2_NAME);\n WCApplicationHelper.addWarToServerApps(myServer, \"String_Node_Str\", true, JAR_NAME, false, \"String_Node_Str\", \"String_Node_Str\");\n Log.info(logClass, \"String_Node_Str\", \"String_Node_Str\");\n Log.info(logClass, getCurrentTestName(), \"String_Node_Str\");\n startServer(XML_INCORRECT_REALM, EJB_REALM_APP_NAME, EJB_REALM2_APP_NAME);\n assertNotNull(\"String_Node_Str\", myServer.waitForStringInLog(\"String_Node_Str\"));\n Log.info(logClass, getCurrentTestName(), \"String_Node_Str\");\n queryString = EJB_REALM1_WAR_PATH + SIMPLE_SERVLET_REALM1 + \"String_Node_Str\";\n Log.info(logClass, getCurrentTestName(), \"String_Node_Str\");\n response = executeGetRequestBasicAuthCreds(httpclient, urlBase + queryString, LocalLdapServer.USER1, LocalLdapServer.PASSWORD, HttpServletResponse.SC_FORBIDDEN);\n Log.info(logClass, getCurrentTestName(), \"String_Node_Str\");\n Log.info(logClass, getCurrentTestName(), \"String_Node_Str\");\n verifyEjbErrorUserResponse(response, Constants.ejbAuthorizationFailed);\n Log.info(logClass, getCurrentTestName(), \"String_Node_Str\");\n Log.info(logClass, getCurrentTestName(), \"String_Node_Str\");\n httpclient.getConnectionManager().shutdown();\n setupConnection();\n Log.info(logClass, getCurrentTestName(), \"String_Node_Str\");\n queryString = EJB_REALM2_WAR_PATH + SIMPLE_SERVLET_REALM2 + \"String_Node_Str\";\n Log.info(logClass, getCurrentTestName(), \"String_Node_Str\");\n response = executeGetRequestBasicAuthCreds(httpclient, urlBase + queryString, LocalLdapServer.USER1, LocalLdapServer.ANOTHERPASSWORD, HttpServletResponse.SC_FORBIDDEN);\n Log.info(logClass, getCurrentTestName(), \"String_Node_Str\");\n Log.info(logClass, getCurrentTestName(), \"String_Node_Str\");\n verifyEjbErrorUserResponse(response, Constants.ejbAuthorizationFailed);\n Log.info(logClass, getCurrentTestName(), \"String_Node_Str\");\n Log.info(logClass, getCurrentTestName(), \"String_Node_Str\");\n httpclient.getConnectionManager().shutdown();\n setupConnection();\n myServer.removeInstalledAppForValidation(EJB_REALM_APP_NAME);\n myServer.removeInstalledAppForValidation(EJB_REALM2_APP_NAME);\n myServer.stopServer();\n Log.info(logClass, getCurrentTestName(), \"String_Node_Str\" + getCurrentTestName());\n}\n"
|
"public void run() {\n if (connection.getSource().getDesignSubjobStartNode().getOutgoingConnections(EConnectionType.ON_SUBJOB_OK).size() != 0 || connection.getSource().getDesignSubjobStartNode().getOutgoingConnections(EConnectionType.ON_SUBJOB_ERROR).size() != 0) {\n MessageDialog.openError(new Shell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"));\n return;\n }\n if (checkConnectionStatus(connection.getTarget())) {\n MessageDialog.openError(new Shell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"));\n return;\n }\n ChangeConnectionStatusCommand cmd = new ChangeConnectionStatusCommand(connection);\n execute(cmd);\n}\n"
|
"public Object getBlock(int x, int y, int z) {\n return this.shadow$getBlockState(new BlockPos(x, y, z)).getBlock();\n}\n"
|
"public static String longToIpV4(long longIp) {\n final long posShift = 32;\n long tmp = longIp;\n tmp >>>= posShift;\n if (tmp > 0) {\n return \"String_Node_Str\";\n }\n final int threeByteSize = 24;\n final int threeByteMask = 0x00ffffff;\n final int twoByteSize = 16;\n final int twoByteMask = 0x0000ffff;\n final int oneByteSize = 8;\n final int oneByteMask = 0x000000ff;\n return String.format(\"String_Node_Str\", (longIp >>> threeByteSize) & oneByteMask, (longIp & threeByteMask) >>> twoByteSize, (longIp & twoByteMask) >>> oneByteSize, longIp & oneByteMask);\n}\n"
|
"public IQueryEngine getQueryEngine() throws UnsupportedException {\n IQueryEngine queryEngine = new CassandraQueryEngine(sessions, limitDefault);\n return queryEngine;\n}\n"
|
"private static String prepareTestGame(File gameFile, boolean overrideReport) {\n if (!gameFile.exists() || !gameFile.isFile())\n return null;\n String fileName = gameFile.getName();\n int dot = fileName.lastIndexOf(extensionSeparator);\n String gameName = null;\n if (dot != -1 && fileName.substring(dot + 1).equals(Config.get(\"String_Node_Str\"))) {\n gameName = fileName.substring(0, dot);\n String gamePath = gameFile.getParent();\n String reportFilename = gamePath + File.separator + gameName + \"String_Node_Str\" + Config.get(\"String_Node_Str\");\n File reportFile = new File(reportFilename);\n if (!reportFile.exists() || overrideReport) {\n prepareGameReport(gameFile, reportFilename);\n }\n return gameName;\n}\n"
|
"public String getGithubUri() {\n if (githubUri == null)\n return DEFAULT_URI;\n else\n return githubUri;\n}\n"
|
"private int resolveBindPort(int port) {\n final CubeDockerConfiguration cubeDockerConfiguration = cubeDockerConfigurationInstance.get();\n final SeleniumContainers seleniumContainers = seleniumContainersInstance.get();\n if (port == NO_PORT) {\n return SinglePortBindResolver.resolvePortBindPort(cubeDockerConfiguration, seleniumContainers.getSeleniumContainerName(), seleniumContainers.getVncContainerName());\n } else {\n return SinglePortBindResolver.resolveBindPort(cubeDockerConfiguration, port, seleniumContainers.getSeleniumContainerName(), seleniumContainers.getVncContainerName());\n }\n}\n"
|
"public void onWindowFocusChanged(boolean hasWindowFocus) {\n super.onWindowFocusChanged(hasWindowFocus);\n final int touchMode = isInTouchMode() ? TOUCH_MODE_ON : TOUCH_MODE_OFF;\n if (!hasWindowFocus) {\n setChildrenDrawingCacheEnabled(false);\n if (mFlingRunnable != null) {\n removeCallbacks(mFlingRunnable);\n mFlingRunnable.endFling();\n }\n dismissPopup();\n if (touchMode == TOUCH_MODE_OFF) {\n mResurrectToPosition = mSelectedPosition;\n }\n } else {\n if (mFiltered) {\n showPopup();\n }\n if (touchMode != mLastTouchMode && mLastTouchMode != TOUCH_MODE_UNKNOWN) {\n if (touchMode == TOUCH_MODE_OFF) {\n resurrectSelection();\n } else {\n hideSelector();\n mLayoutMode = LAYOUT_NORMAL;\n layoutChildren();\n }\n }\n }\n mLastTouchMode = touchMode;\n}\n"
|
"public void setTarget(Pos target) {\n this.target = target;\n if (isClient() && world() != null) {\n sendPacket(new PacketTile(this, 1, target));\n }\n}\n"
|
"public int getInt() {\n return next == NullRecord.INSTANCE && metadata.getType() == ColumnType.SYMBOL ? SymbolTable.VALUE_IS_NULL : next.getInt(columnIndex);\n}\n"
|
"private void loadViewToUnderInteractionLayer(final int iViewID) {\n generalManager.getSingelton().logMsg(this.getClass().getSimpleName() + \"String_Node_Str\" + iViewID + \"String_Node_Str\", LoggerType.VERBOSE);\n if (iSlerpFactor > 0 && iSlerpFactor < SLERP_RANGE)\n return;\n arSlerpActions.clear();\n glConnectionLineRenderer.enableRendering(false);\n if (stackLayer.containsElement(iViewID)) {\n SlerpAction slerpActionTransition = new SlerpAction(iViewID, stackLayer, transitionLayer);\n arSlerpActions.add(slerpActionTransition);\n SlerpAction reverseSlerpAction = new SlerpAction(underInteractionLayer.getElementIdByPositionIndex(0), underInteractionLayer, stackLayer);\n arSlerpActions.add(reverseSlerpAction);\n SlerpAction slerpAction = new SlerpAction(iViewID, transitionLayer, underInteractionLayer);\n arSlerpActions.add(slerpAction);\n } else {\n SlerpAction slerpActionTransition = new SlerpAction(iViewID, poolLayer, transitionLayer);\n arSlerpActions.add(slerpActionTransition);\n if (!stackLayer.containsElement(-1)) {\n SlerpAction reverseSlerpAction = new SlerpAction(stackLayer.getElementIdByPositionIndex(stackLayer.getNextPositionIndex()), stackLayer, true);\n arSlerpActions.add(reverseSlerpAction);\n }\n SlerpAction reverseSlerpAction2 = new SlerpAction(underInteractionLayer.getElementIdByPositionIndex(0), underInteractionLayer, true);\n arSlerpActions.add(reverseSlerpAction2);\n SlerpAction slerpAction = new SlerpAction(iViewID, transitionLayer, underInteractionLayer);\n arSlerpActions.add(slerpAction);\n }\n iSlerpFactor = 0;\n}\n"
|
"private void pickObjects(final GL gl, Point pickPoint) {\n int PICKING_BUFSIZE = 1024;\n int[] iArPickingBuffer = new int[PICKING_BUFSIZE];\n IntBuffer pickingBuffer = BufferUtil.newIntBuffer(PICKING_BUFSIZE);\n int iHitCount = -1;\n int[] viewport = new int[4];\n gl.glGetIntegerv(GL.GL_VIEWPORT, viewport, 0);\n gl.glSelectBuffer(PICKING_BUFSIZE, pickingBuffer);\n gl.glRenderMode(GL.GL_SELECT);\n gl.glInitNames();\n gl.glMatrixMode(GL.GL_PROJECTION);\n gl.glPushMatrix();\n gl.glLoadIdentity();\n GLU glu = new GLU();\n glu.gluPickMatrix((double) pickPoint.x, (double) (viewport[3] - pickPoint.y), 5.0, 5.0, viewport, 0);\n float fAspectRatio = (float) (float) (viewport[3] - viewport[1]) / (float) (viewport[2] - viewport[0]);\n if (fAspectRatio < 1.0) {\n fAspectRatio = 1.0f / fAspectRatio;\n gl.glOrtho(-4 * fAspectRatio, 4 * fAspectRatio, -4 * 1.0, 4 * 1.0, -1.0, 1.0);\n } else\n gl.glOrtho(-4 * 1.0, 4 * 1.0, -4 * fAspectRatio, 4 * fAspectRatio, -1.0, 1.0);\n gl.glMatrixMode(GL.GL_MODELVIEW);\n Point tmpPickPoint = (Point) pickPoint.clone();\n pickPoint = null;\n renderScene(gl);\n gl.glMatrixMode(GL.GL_PROJECTION);\n gl.glPopMatrix();\n gl.glMatrixMode(GL.GL_MODELVIEW);\n iHitCount = gl.glRenderMode(GL.GL_RENDER);\n pickingManager.processHits(this, iHitCount, iArPickingBuffer, EPickingMode.CLICKED);\n}\n"
|
"protected void populateResult(boolean usesViewRoot, Map<Object, Map<Object, TuplePromise>> correlationValues, List<Object[]> list) {\n Map<Object, Map<Object, Collection<Object>>> collections;\n if (usesViewRoot) {\n collections = new HashMap<>(list.size());\n for (int i = 0; i < list.size(); i++) {\n Object[] element = list.get(i);\n Map<Object, Collection<Object>> viewRootResult = collections.get(element[0]);\n if (viewRootResult == null) {\n viewRootResult = new HashMap<>();\n collections.put(element[0], viewRootResult);\n }\n Collection<Object> result = viewRootResult.get(element[1]);\n if (result == null) {\n result = (Collection<Object>) createDefaultResult();\n viewRootResult.put(element[1], result);\n }\n if (element[2] != null) {\n add(result, element[2]);\n }\n }\n } else {\n Map<Object, Collection<Object>> viewRootResult = new HashMap<>(list.size());\n collections = Collections.singletonMap(null, viewRootResult);\n for (int i = 0; i < list.size(); i++) {\n Object[] element = (Object[]) list.get(i);\n Collection<Object> result = viewRootResult.get(element[0]);\n if (result == null) {\n result = (Collection<Object>) createDefaultResult();\n viewRootResult.put(element[0], result);\n }\n if (element[1] != null) {\n result.add(element[1]);\n }\n }\n }\n for (Map.Entry<Object, Map<Object, Collection<Object>>> entry : collections.entrySet()) {\n Map<Object, TuplePromise> tuplePromiseMap = correlationValues.get(entry.getKey());\n for (Map.Entry<Object, Collection<Object>> correlationEntry : entry.getValue().entrySet()) {\n tuplePromiseMap.get(correlationEntry.getKey()).onResult(correlationEntry.getValue(), this);\n }\n }\n}\n"
|
"void formatSegments(LineParser lineParser, LineCoverageData lineData) {\n lineNumber = lineParser.getNumber();\n List<BranchCoverageData> branchData = lineData.getBranches();\n int numSegments = lineData.getNumberOfSegments();\n element = lineParser.getInitialElement().appendUntilNextCodeElement(formattedLine);\n segmentIndex = 0;\n appendUntilFirstElementAfterNextBranchingPoint(lineData);\n while (element != null && segmentIndex < numSegments) {\n LineSegmentData segmentData = segmentIndex == 0 ? lineData : branchData.get(segmentIndex - 1);\n element = element.appendUntilNextCodeElement(line);\n appendUntilFirstElementAfterNextBranchingPoint(segmentData);\n }\n if (element != null) {\n element.appendAllBefore(line, null);\n }\n line.append(\"String_Node_Str\");\n if (listOfCallPoints != null && lineData.containsCallPoints()) {\n line.append(listOfCallPoints.getContents());\n }\n}\n"
|
"public String sendGetStatus(String ontid, String password, String claimId) throws Exception {\n if (codeAddress == null) {\n throw new SDKException(ErrorCode.NullCodeHash);\n }\n if (claimId == null || claimId == \"String_Node_Str\") {\n throw new SDKException(ErrorCode.NullKeyOrValue);\n }\n String addr = ontid.replace(Common.didont, \"String_Node_Str\");\n AccountInfo info = sdk.getWalletMgr().getAccountInfo(addr, password);\n List list = new ArrayList<Object>();\n list.add(\"String_Node_Str\".getBytes());\n List tmp = new ArrayList<Object>();\n tmp.add(Helper.hexToBytes(claimId));\n list.add(tmp);\n Transaction tx = makeInvokeTransaction(list, info);\n sdk.signTx(tx, addr, password);\n Object obj = sdk.getConnectMgr().sendRawTransactionPreExec(tx.toHexString());\n if (obj != null) {\n return (String) obj;\n }\n return null;\n}\n"
|
"private String prepareTotalExpression(String oldExpression, List columnBindings, String groupName, boolean isCube) throws EngineException {\n try {\n if (oldExpression == null)\n return null;\n char[] chars = oldExpression.toCharArray();\n if (chars.length < 8)\n return oldExpression;\n else {\n ParseIndicator indicator = new ParseIndicator(0, 0, false, false, true, true);\n for (int i = 0; i < chars.length; i++) {\n indicator = getParseIndicator(chars, i, indicator.omitNextQuote(), indicator.getCandidateKey1(), indicator.getCandidateKey2());\n i = indicator.getNewIndex();\n if (i >= indicator.getRetrieveSize() + 6) {\n if (indicator.isCandidateKey() && chars[i - indicator.getRetrieveSize() - 6] == 'T' && chars[i - indicator.getRetrieveSize() - 5] == 'o' && chars[i - indicator.getRetrieveSize() - 4] == 't' && chars[i - indicator.getRetrieveSize() - 3] == 'a' && chars[i - indicator.getRetrieveSize() - 2] == 'l' && chars[i - indicator.getRetrieveSize() - 1] == '.') {\n if (i - indicator.getRetrieveSize() - 7 <= 0 || isValidProceeding(chars[i - indicator.getRetrieveSize() - 7])) {\n String firstPart = oldExpression.substring(0, i - indicator.getRetrieveSize() - 6);\n int startIndex = i - indicator.getRetrieveSize() - 6;\n i = advanceToNextValidEncloser(chars, i);\n String secondPart = \"String_Node_Str\";\n String name = \"String_Node_Str\";\n String expr = \"String_Node_Str\";\n if (i < chars.length) {\n int endIndex = i + 1;\n expr = oldExpression.substring(startIndex, endIndex);\n secondPart = prepareTotalExpression(oldExpression.substring(i + 1 - indicator.getRetrieveSize()), columnBindings, groupName, isCube);\n } else {\n expr = oldExpression.substring(startIndex);\n }\n boolean shouldAddToList = true;\n for (int j = 0; j < columnBindings.size(); j++) {\n IBaseExpression expression = ((IBinding) columnBindings.get(j)).getExpression();\n if (expression instanceof IScriptExpression) {\n if (oldExpression.equals(((IScriptExpression) expression).getText())) {\n shouldAddToList = false;\n name = ((IBinding) columnBindings.get(j)).getBindingName();\n break;\n }\n }\n }\n if (shouldAddToList) {\n name = TOTAL_PREFIX + totalColumnSuffix;\n totalColumnSuffix++;\n ScriptExpression se = new ScriptExpression(expr);\n se.setGroupName(groupName);\n Binding columnBinding = new Binding(name, se);\n columnBindings.add(columnBinding);\n }\n String newExpression = null;\n if (!isCube) {\n newExpression = firstPart + org.eclipse.birt.core.data.ExpressionUtil.createJSRowExpression(name) + secondPart;\n } else {\n newExpression = firstPart + org.eclipse.birt.core.data.ExpressionUtil.createJSDataExpression(name) + secondPart;\n }\n return newExpression;\n }\n }\n }\n }\n }\n return oldExpression;\n } catch (DataException e) {\n throw new EngineException(e);\n }\n}\n"
|
"private Template loadTemplate(final TemplateLoader templateLoader, final Object source, final String name, final String sourceName, final Locale locale, final Object customLookupCondition, final String initialEncoding, final boolean parseAsFTL) throws IOException {\n Template template;\n String actualEncoding;\n {\n if (parseAsFTL) {\n try {\n final Reader reader = templateLoader.getReader(source, initialEncoding);\n try {\n template = new Template(name, sourceName, reader, config, initialEncoding);\n } finally {\n reader.close();\n }\n actualEncoding = initialEncoding;\n } catch (Template.WrongEncodingException wee) {\n actualEncoding = wee.getTemplateSpecifiedEncoding();\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\" + initialEncoding + \"String_Node_Str\" + actualEncoding + \"String_Node_Str\" + sourceName);\n }\n final Reader reader = templateLoader.getReader(source, actualEncoding);\n try {\n template = new Template(name, sourceName, reader, config, actualEncoding);\n } finally {\n reader.close();\n }\n }\n } else {\n final StringWriter sw = new StringWriter();\n final char[] buf = new char[4096];\n final Reader reader = templateLoader.getReader(source, initialEncoding);\n try {\n fetchChars: while (true) {\n int charsRead = reader.read(buf);\n if (charsRead > 0) {\n sw.write(buf, 0, charsRead);\n } else if (charsRead < 0) {\n break fetchChars;\n }\n }\n } finally {\n reader.close();\n }\n template = Template.getPlainTextTemplate(name, sourceName, sw.toString(), config);\n actualEncoding = initialEncoding;\n }\n }\n template.setLocale(locale);\n template.setCustomLookupCondition(customLookupCondition);\n template.setEncoding(actualEncoding);\n return template;\n}\n"
|
"public boolean doSparklineInteraction(MouseEvent e) {\n int y = e.getY();\n for (SparklineData data : visibleSparklines) {\n if (data.ymin < y && data.ymax > y && data.lastDrawNumber == currentDrawNumber) {\n currentlyHoveringName = data.name;\n currentlyHoveringSection = data.section;\n if (e.getButton() == MouseEvent.BUTTON1) {\n displayDetailedChart(data, false, false);\n graphingSparklines.add(data);\n } else if (e.getButton() == MouseEvent.BUTTON2) {\n displayDetailedChart(data, true, true);\n graphingSparklines.add(data);\n } else if (e.getButton() == MouseEvent.BUTTON3) {\n displayDetailedChart(data, false, true);\n graphingSparklines.add(data);\n }\n return true;\n }\n }\n return false;\n}\n"
|
"public void onReceiveChatMessageAction(Bundle extras) {\n boolean isSplashActivity = activityHelper.getContext() instanceof SplashActivity;\n boolean isCallActivity = activityHelper.getContext() instanceof CallActivity;\n if (!isSplashActivity && !isCallActivity) {\n activityHelper.onReceiveMessage(extras);\n }\n}\n"
|
"private static void addExecutionVertices(Map<ExecutionGroupVertex, ManagementGroupVertex> groupMap, ExecutionGraph executionGraph) {\n ExecutionGraphIterator iterator = new ExecutionGraphIterator(executionGraph, true);\n final Map<ExecutionVertex, ManagementVertex> vertexMap = new HashMap<ExecutionVertex, ManagementVertex>();\n final Map<Gate<? extends Record>, ManagementGate> gateMap = new HashMap<Gate<? extends Record>, ManagementGate>();\n while (iterator.hasNext()) {\n final ExecutionVertex ev = iterator.next();\n final ManagementGroupVertex parent = groupMap.get(ev.getGroupVertex());\n final ManagementVertex managementVertex = new ManagementVertex(parent, ev.getID().toManagementVertexID(), (ev.getAllocatedResource().getInstance().getInstanceConnectionInfo() != null) ? ev.getAllocatedResource().getInstance().getInstanceConnectionInfo().toString() : ev.getAllocatedResource().getInstance().toString(), ev.getAllocatedResource().getInstance().getType().toString(), ev.getCheckpointState().toString(), ev.getEnvironment().getIndexInSubtaskGroup());\n managementVertex.setExecutionState(ev.getExecutionState());\n vertexMap.put(ev, managementVertex);\n for (int i = 0; i < ev.getEnvironment().getNumberOfOutputGates(); i++) {\n final OutputGate<? extends Record> outputGate = ev.getEnvironment().getOutputGate(i);\n final ManagementGate managementGate = new ManagementGate(managementVertex, new ManagementGateID(), i, false, outputGate.getType().toString());\n gateMap.put(outputGate, managementGate);\n }\n for (int i = 0; i < ev.getEnvironment().getNumberOfInputGates(); i++) {\n final InputGate<? extends Record> inputGate = ev.getEnvironment().getInputGate(i);\n final ManagementGate managementGate = new ManagementGate(managementVertex, new ManagementGateID(), i, true, \"String_Node_Str\");\n gateMap.put(inputGate, managementGate);\n }\n }\n iterator = new ExecutionGraphIterator(executionGraph, true);\n while (iterator.hasNext()) {\n final ExecutionVertex source = iterator.next();\n for (int i = 0; i < source.getEnvironment().getNumberOfOutputGates(); i++) {\n final OutputGate<? extends Record> outputGate = source.getEnvironment().getOutputGate(i);\n final ManagementGate manangementOutputGate = gateMap.get(outputGate);\n for (int j = 0; j < outputGate.getNumberOfOutputChannels(); j++) {\n final AbstractOutputChannel<? extends Record> outputChannel = outputGate.getOutputChannel(j);\n final ChannelID inputChannelID = outputChannel.getConnectedChannelID();\n final AbstractInputChannel<? extends Record> inputChannel = executionGraph.getInputChannelByID(inputChannelID);\n final ManagementGate managementInputGate = gateMap.get(inputChannel.getInputGate());\n final ManagementEdgeID managementEdgeID = new ManagementEdgeID(manangementOutputGate.getVertex().getID(), managementInputGate.getVertex().getID());\n new ManagementEdge(managementEdgeID, manangementOutputGate, j, managementInputGate, inputChannel.getChannelIndex(), inputChannel.getType(), inputChannel.getCompressionLevel());\n }\n }\n }\n}\n"
|
"private void validateEnvEntries(Application application) {\n Set<EnvironmentProperty> environmentProperties = null;\n EnvEntriesValidator envValidator = new EnvEntriesValidator();\n environmentProperties = application.getEnvironmentProperties();\n envValidator.validateEnvEntries(application, environmentProperties);\n Set<ApplicationClientDescriptor> appClientDescs = application.getBundleDescriptors(ApplicationClientDescriptor.class);\n for (ApplicationClientDescriptor acd : appClientDescs) {\n environmentProperties = acd.getEnvironmentProperties();\n envValidator.validateEnvEntries(acd, environmentProperties);\n }\n Set<EjbBundleDescriptor> ejbBundleDescs = application.getBundleDescriptors(EjbBundleDescriptor.class);\n for (EjbBundleDescriptor ebd : ejbBundleDescs) {\n Set<EjbDescriptor> ejbDescriptors = (Set<EjbDescriptor>) ebd.getEjbs();\n for (Iterator itr = ejbDescriptors.iterator(); itr.hasNext(); ) {\n EjbDescriptor ejbDescriptor = (EjbDescriptor) itr.next();\n environmentProperties = ejbDescriptor.getEnvironmentProperties();\n envValidator.validateEnvEntries(ejbDescriptor, environmentProperties);\n }\n }\n Set<WebBundleDescriptor> webBundleDescs = application.getBundleDescriptors(WebBundleDescriptor.class);\n for (WebBundleDescriptor wbd : webBundleDescs) {\n Enumeration<EnvironmentEntry> envEntries = wbd.getEnvironmentEntries();\n envValidator.validateEnvEntries(wbd, envEntries);\n }\n}\n"
|
"protected static void addComponentsByNameFilter(final IComponentsFactory compFac, Set<IComponent> componentSet, String nameFilter) {\n if (compFac == null || componentSet == null) {\n return;\n }\n if (nameFilter != null && !nameFilter.trim().isEmpty()) {\n Collection<IComponent> components = compFac.readComponents();\n Iterator<IComponent> iter = components.iterator();\n String regex = getFilterRegex(nameFilter);\n Pattern pattern = Pattern.compile(regex);\n Set<ComponentHit> resultByName = new LinkedHashSet<ComponentHit>();\n Set<ComponentHit> resultByLongName = new LinkedHashSet<ComponentHit>();\n while (iter.hasNext()) {\n IComponent xmlComponent = iter.next();\n Matcher matcher = pattern.matcher(xmlComponent.getName().toLowerCase());\n if (matcher.find()) {\n resultByName.add(new ComponentHit(xmlComponent, matcher.start()));\n continue;\n }\n matcher = pattern.matcher(xmlComponent.getLongName().toLowerCase());\n if (matcher.find()) {\n resultByLongName.add(new ComponentHit(xmlComponent, matcher.start()));\n continue;\n }\n }\n if (!resultByName.isEmpty()) {\n ComponentHit[] hitArray = resultByName.toArray(new ComponentHit[resultByName.size()]);\n Arrays.sort(hitArray);\n addComponents(componentSet, hitArray);\n }\n if (!resultByLongName.isEmpty()) {\n ComponentHit[] hitArray = resultByLongName.toArray(new ComponentHit[resultByLongName.size()]);\n Arrays.sort(hitArray);\n addComponents(componentSet, hitArray);\n }\n }\n}\n"
|
"public int getNormalSetIdx() {\n return 0;\n}\n"
|
"private boolean trySimpleMatch(Chain seqRes, Chain atomRes) {\n List<Group> seqResGroups = seqRes.getAtomGroups();\n List<Group> atmResGroups = atomRes.getAtomGroups();\n boolean startAt1 = true;\n for (int atomResPos = 0; atomResPos < atmResGroups.size(); atomResPos++) {\n Group atomResGroup = atmResGroups.get(atomResPos);\n String threeLetterCode = atomResGroup.getPDBName();\n if (excludeTypes.contains(threeLetterCode)) {\n continue;\n }\n ResidueNumber atomResNum = atomResGroup.getResidueNumber();\n int seqResPos = atomResNum.getSeqNum();\n if (seqResPos < 0) {\n if (DEBUG)\n System.err.println(\"String_Node_Str\");\n return false;\n }\n if (atomResNum.getSeqNum() == 0) {\n Group seqResGroup = seqResGroups.get(0);\n if (seqResGroup.getPDBName().equals(atomResGroup.getPDBName())) {\n startAt1 = false;\n }\n }\n int seqResPos = atomResNum.getSeqNum();\n if (startAt1)\n seqResPos--;\n if (startAt1 && seqResPos >= seqResGroups.size()) {\n if (atomResGroup instanceof AminoAcid) {\n if (DEBUG)\n System.err.println(\"String_Node_Str\" + seqResPos + \"String_Node_Str\" + seqResGroups.size() + \"String_Node_Str\" + atomResGroup);\n return false;\n } else {\n continue;\n }\n }\n Group seqResGroup = seqResGroups.get(seqResPos);\n if (!seqResGroup.getPDBName().trim().equals(atomResGroup.getPDBName().trim())) {\n if (DEBUG)\n System.err.println(\"String_Node_Str\" + seqResPos + \"String_Node_Str\" + atomResGroup + \"String_Node_Str\" + seqResGroup);\n return false;\n }\n seqResGroups.set(seqResPos, atomResGroup);\n }\n return true;\n}\n"
|
"public org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelComponent convertSubscriptionChannelComponent(org.hl7.fhir.dstu3.model.Subscription.SubscriptionChannelComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelComponent tgt = new org.hl7.fhir.dstu2.model.Subscription.SubscriptionChannelComponent();\n copyElement(src, tgt);\n tgt.setType(convertSubscriptionChannelType(src.getType()));\n tgt.setEndpoint(src.getEndpoint());\n tgt.setPayload(src.getPayload());\n tgt.setHeader(src.getHeader());\n return tgt;\n}\n"
|
"public String create(final Set<WSAttributeValue> data) throws ProvisioningException {\n String res = null;\n for (WSAttributeValue value : data) {\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + value.getName() + \"String_Node_Str\" + value.getType() + \"String_Node_Str\" + value.isNullable() + \"String_Node_Str\" + value.isKey() + \"String_Node_Str\" + value.isPassword() + \"String_Node_Str\" + value.getValue().toString());\n }\n if (value.isKey()) {\n res = value.getValue().toString();\n }\n return res;\n}\n"
|
"public int getDayOfMonth() {\n return day;\n}\n"
|
"public void getArtifactPlugin(HttpRequest request, HttpResponder responder, String namespaceId, String artifactName, String artifactVersion, String pluginType, String pluginName, String scope) throws NamespaceNotFoundException, BadRequestException, ArtifactNotFoundException {\n NamespaceId namespace = Ids.namespace(namespaceId);\n NamespaceId artifactNamespace = validateAndGetScopedNamespace(namespace, scope);\n Id.Artifact artifactId = validateAndGetArtifactId(artifactNamespace, artifactName, artifactVersion);\n try {\n SortedMap<ArtifactDescriptor, PluginClass> plugins = artifactRepository.getPlugins(namespace, artifactId, pluginType, pluginName);\n List<PluginInfo> pluginInfos = Lists.newArrayList();\n for (Map.Entry<ArtifactDescriptor, PluginClass> pluginsEntry : plugins.entrySet()) {\n ArtifactDescriptor pluginArtifact = pluginsEntry.getKey();\n ArtifactSummary pluginArtifactSummary = ArtifactSummary.from(pluginArtifact.getArtifactId());\n PluginClass pluginClass = pluginsEntry.getValue();\n pluginInfos.add(new PluginInfo(pluginClass.getName(), pluginClass.getType(), pluginClass.getDescription(), pluginClass.getClassName(), pluginArtifactSummary, pluginClass.getProperties(), pluginClass.getEndpoints()));\n }\n responder.sendJson(HttpResponseStatus.OK, pluginInfos);\n } catch (PluginNotExistsException e) {\n responder.sendString(HttpResponseStatus.NOT_FOUND, e.getMessage());\n } catch (IOException e) {\n LOG.error(\"String_Node_Str\", artifactId, e);\n responder.sendString(HttpResponseStatus.INTERNAL_SERVER_ERROR, \"String_Node_Str\");\n }\n}\n"
|
"public final void info(final Message vm) {\n vm.custom(TextColors.LIGHT_PURPLE, \"String_Node_Str\" + \"String_Node_Str\", TextColors.DARK_PURPLE, this.entityType.getName(), TextColors.LIGHT_PURPLE, \"String_Node_Str\");\n vm.size();\n}\n"
|
"public void showPurchaseOrder(ActionRequest request, ActionResponse response) {\n PurchaseOrder purchaseOrder = request.getContext().asType(PurchaseOrder.class);\n StringBuilder url = new StringBuilder();\n AxelorSettings axelorSettings = AxelorSettings.get();\n String language = \"String_Node_Str\";\n try {\n language = purchaseOrder.getSupplierPartner().getLanguageSelect() != null ? purchaseOrder.getSupplierPartner().getLanguageSelect() : purchaseOrder.getCompany().getPrintingSettings().getLanguageSelect() != null ? purchaseOrder.getCompany().getPrintingSettings().getLanguageSelect() : \"String_Node_Str\";\n } catch (NullPointerException e) {\n language = \"String_Node_Str\";\n }\n language = language.equals(\"String_Node_Str\") ? \"String_Node_Str\" : language;\n url.append(axelorSettings.get(\"String_Node_Str\", \"String_Node_Str\") + \"String_Node_Str\" + purchaseOrderIds + \"String_Node_Str\" + language + axelorSettings.get(\"String_Node_Str\"));\n LOG.debug(\"String_Node_Str\", url);\n String urlNotExist = URLService.notExist(url.toString());\n if (urlNotExist == null) {\n LOG.debug(\"String_Node_Str\" + purchaseOrder.getPurchaseOrderSeq() + \"String_Node_Str\" + url.toString());\n String title = \"String_Node_Str\";\n if (purchaseOrder.getPurchaseOrderSeq() != null) {\n title += purchaseOrder.getPurchaseOrderSeq();\n }\n Map<String, Object> mapView = new HashMap<String, Object>();\n mapView.put(\"String_Node_Str\", title);\n mapView.put(\"String_Node_Str\", url);\n mapView.put(\"String_Node_Str\", \"String_Node_Str\");\n response.setView(mapView);\n } else {\n response.setFlash(urlNotExist);\n }\n}\n"
|
"public static void generalPanel() {\n Runtime runtime = Runtime.getRuntime();\n String javaVersion = java.lang.System.getProperty(\"String_Node_Str\");\n String osName = java.lang.System.getProperty(\"String_Node_Str\");\n String osArch = java.lang.System.getProperty(\"String_Node_Str\");\n String osVersion = java.lang.System.getProperty(\"String_Node_Str\");\n int availableProcessors = runtime.availableProcessors();\n long maximumMemory = runtime.maxMemory() / 1024 / 1024;\n long allocatedMemory = runtime.totalMemory() / 1024 / 1024;\n long freeMemory = runtime.freeMemory() / 1024 / 1024;\n long usedMemory = allocatedMemory - freeMemory / 1024 / 1024;\n String playMode = Play.mode.name();\n String frameworkId = Play.id;\n Date startedAt = new Date(Play.startedAt);\n String httpAddress = Play.configuration.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n String httpPort = Play.configuration.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n String httpPath = Play.configuration.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n String logLevel = Play.configuration.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n String db = Play.configuration.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n String appPath = Play.applicationPath.getPath();\n String attachmentsPath = appPath + File.separator + Play.configuration.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n String indexPath = appPath + File.separator + Play.configuration.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n String mailMode = Play.configuration.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n String mailHost = Play.configuration.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n String mailUser = Play.configuration.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n String mailPass = Play.configuration.getProperty(\"String_Node_Str\");\n String mailChannel = Play.configuration.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n String mailFrom = Play.configuration.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n String mailReply = Play.configuration.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n if (mailPass != null) {\n mailPass = mailPass.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n } else {\n mailPass = \"String_Node_Str\";\n }\n String vireoVersion = Play.configuration.getProperty(\"String_Node_Str\", \"String_Node_Str\");\n long personTotal = personRepo.findPersonsTotal();\n long submissionTotal = subRepo.findSubmissionsTotal();\n long actionLogTotal = subRepo.findActionLogsTotal();\n String indexImpl = indexer.getClass().getSimpleName();\n String indexJob = \"String_Node_Str\";\n if (indexer.isJobRunning()) {\n indexJob = indexer.getCurrentJobLabel();\n float complete = 0;\n if (indexer.getCurrentJobTotal() > 0)\n complete = (((float) indexer.getCurrentJobProgress()) / indexer.getCurrentJobTotal()) * 100;\n indexJob += String.format(\"String_Node_Str\", complete);\n }\n renderTemplate(\"String_Node_Str\", javaVersion, osName, osArch, osVersion, availableProcessors, maximumMemory, allocatedMemory, freeMemory, usedMemory, playMode, frameworkId, httpAddress, httpPort, httpPath, startedAt, appPath, logLevel, db, attachmentsPath, indexPath, mailMode, mailHost, mailUser, mailPass, mailChannel, mailFrom, mailReply, vireoVersion, personTotal, submissionTotal, actionLogTotal, indexImpl, indexJob);\n}\n"
|
"public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n } else if (obj == null) {\n return false;\n } else if (getClass() != obj.getClass()) {\n return false;\n }\n GlobalProperties other = (GlobalProperties) obj;\n if ((ordering == other.getOrdering() || (ordering != null && ordering.equals(other.getOrdering()))) && partitioning == other.getPartitioning() && partitionedFields != null && partitionedFields.equals(other.getPartitionedFields())) {\n return true;\n } else {\n return false;\n }\n}\n"
|
"private <T, U> Node buildPathToNode(Class<U> clazz, boolean isPrefixTarget) throws BindException {\n String[] path = clazz.getName().split(regexp);\n Node root = namespace;\n for (int i = 0; i < path.length - 1; i++) {\n root = root.get(path[i]);\n }\n if (root == null) {\n throw new NullPointerException();\n }\n Node parent = root;\n Class<?> argType = getNamedParameterTargetOrNull(clazz);\n if (argType == null) {\n return new ClassNode<U>(parent, clazz, isPrefixTarget, false);\n } else {\n if (isPrefixTarget) {\n throw new BindException(clazz + \"String_Node_Str\");\n }\n NamedParameterNode<T> np = new NamedParameterNode<T>(parent, (Class<? extends Name<T>>) clazz);\n String shortName = np.getShortName();\n if (shortName != null) {\n NamedParameterNode<?> oldNode = shortNames.get(shortName);\n if (oldNode != null) {\n if (oldNode.getNameClass() == np.getNameClass()) {\n throw new IllegalStateException(\"String_Node_Str\" + oldNode.getNameClass() + \"String_Node_Str\" + shortName);\n }\n throw new BindException(\"String_Node_Str\" + oldNode.getNameClass() + \"String_Node_Str\" + np.getNameClass() + \"String_Node_Str\" + shortName);\n }\n shortNames.put(shortName, np);\n }\n return np;\n }\n}\n"
|
"public boolean pingManagementNode(long msid) {\n ManagementServerHostVO mshost = _mshostDao.findByMsid(msid);\n if (mshost == null)\n return false;\n String targetIp = mshost.getServiceIP();\n if (\"String_Node_Str\".equals(targetIp) || \"String_Node_Str\".equals(targetIp)) {\n s_logger.info(\"String_Node_Str\");\n return false;\n }\n String targetPeer = String.valueOf(msid);\n ClusterService peerService = null;\n for (int i = 0; i < 2; i++) {\n try {\n peerService = getPeerService(targetPeer);\n } catch (RemoteException e) {\n s_logger.error(\"String_Node_Str\" + targetPeer + \"String_Node_Str\");\n }\n if (peerService != null) {\n try {\n return peerService.ping(getSelfPeerName());\n } catch (RemoteException e) {\n s_logger.warn(\"String_Node_Str\", e);\n invalidatePeerService(targetPeer);\n }\n } else {\n s_logger.warn(\"String_Node_Str\" + msid + \"String_Node_Str\");\n }\n }\n return false;\n}\n"
|
"public Textifier visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) {\n buf.setLength(0);\n buf.append('\\n');\n if ((access & Opcodes.ACC_DEPRECATED) != 0) {\n buf.append(tab).append(\"String_Node_Str\");\n }\n buf.append(tab).append(\"String_Node_Str\").append(Integer.toHexString(access).toUpperCase(Locale.ENGLISH)).append('\\n');\n if (signature != null) {\n buf.append(tab);\n appendDescriptor(METHOD_SIGNATURE, signature);\n TraceSignatureVisitor v = new TraceSignatureVisitor(0);\n SignatureReader r = new SignatureReader(signature);\n r.accept(v);\n String genericDecl = v.getDeclaration();\n String genericReturn = v.getReturnType();\n String genericExceptions = v.getExceptions();\n buf.append(tab).append(\"String_Node_Str\").append(genericReturn).append(' ').append(name).append(genericDecl);\n if (genericExceptions != null) {\n buf.append(\"String_Node_Str\").append(genericExceptions);\n }\n buf.append('\\n');\n }\n buf.append(tab);\n appendAccess(access);\n if ((access & Opcodes.ACC_NATIVE) != 0) {\n buf.append(\"String_Node_Str\");\n }\n if ((access & Opcodes.ACC_VARARGS) != 0) {\n buf.append(\"String_Node_Str\");\n }\n if ((access & Opcodes.ACC_BRIDGE) != 0) {\n buf.append(\"String_Node_Str\");\n }\n buf.append(name);\n appendDescriptor(METHOD_DESCRIPTOR, desc);\n if (exceptions != null && exceptions.length > 0) {\n buf.append(\"String_Node_Str\");\n for (int i = 0; i < exceptions.length; ++i) {\n appendDescriptor(INTERNAL_NAME, exceptions[i]);\n buf.append(' ');\n }\n }\n buf.append('\\n');\n text.add(buf.toString());\n Textifier t = createTextifier();\n text.add(t.getText());\n return t;\n}\n"
|
"private static ScenarioDefinition buildHistoricalScenarios(Map<LocalDate, Map<RateCurveId, Curve>> historicalCurves, List<LocalDate> scenarioDates) {\n CurveGroupName curveGroup = CurveGroupName.of(\"String_Node_Str\");\n DiscountCurveId discountCurveId = DiscountCurveId.of(Currency.USD, curveGroup);\n RateIndexCurveId libor3mCurveId = RateIndexCurveId.of(IborIndices.USD_LIBOR_3M, curveGroup);\n RateIndexCurveId libor6mCurveId = RateIndexCurveId.of(IborIndices.USD_LIBOR_6M, curveGroup);\n Set<RateCurveId> curveIds = ImmutableSet.of(discountCurveId, libor3mCurveId, libor6mCurveId);\n LocalDate firstScenarioDate = scenarioDates.get(0);\n Map<RateCurveId, Curve> previousCurves = historicalCurves.get(firstScenarioDate);\n List<Perturbation<Curve>> baseScenario = ImmutableList.of(Perturbation.none());\n Map<RateCurveId, List<Perturbation<Curve>>> curvePerturbations = previousCurves.keySet().stream().collect(toImmutableMap(id -> id, k -> Lists.newArrayList(baseScenario)));\n for (int i = 1; i < scenarioDates.size(); i++) {\n LocalDate scenarioDate = scenarioDates.get(i);\n Map<RateCurveId, Curve> curves = historicalCurves.get(scenarioDate);\n for (RateCurveId curveId : curveIds) {\n NodalCurve curve = (NodalCurve) curves.get(curveId);\n NodalCurve previousCurve = (NodalCurve) previousCurves.get(curveId);\n List<CurveParameterMetadata> curveNodeMetadata = curve.getMetadata().getParameters().get();\n CurvePointShiftBuilder shiftBuilder = CurvePointShift.builder(ShiftType.ABSOLUTE);\n for (int curveNodeIdx = 0; curveNodeIdx < curve.getParameterCount(); curveNodeIdx++) {\n double zeroRate = curve.getYValues()[curveNodeIdx];\n double previousZeroRate = previousCurve.getYValues()[curveNodeIdx];\n double shift = (zeroRate - previousZeroRate);\n shiftBuilder.addShift(curveNodeMetadata.get(curveNodeIdx).getIdentifier(), shift);\n }\n curvePerturbations.get(curveId).add(shiftBuilder.build());\n }\n previousCurves = curves;\n }\n PerturbationMapping<Curve> discountCurveMappings = PerturbationMapping.of(Curve.class, AnyDiscountCurveFilter.INSTANCE, curvePerturbations.get(discountCurveId));\n PerturbationMapping<Curve> libor3mMappings = PerturbationMapping.of(Curve.class, CurveRateIndexFilter.of(IborIndices.USD_LIBOR_3M), curvePerturbations.get(libor3mCurveId));\n PerturbationMapping<Curve> libor6mMappings = PerturbationMapping.of(Curve.class, CurveRateIndexFilter.of(IborIndices.USD_LIBOR_6M), curvePerturbations.get(libor6mCurveId));\n return ScenarioDefinition.ofMappings(discountCurveMappings, libor3mMappings, libor6mMappings);\n}\n"
|
"private Iterable<? extends ResponseObject> getAllVersions(final VersionLookupResult res, final Query query) {\n final ObjectType objectType = res.getObjectType();\n final List<ResponseObject> messages = Lists.newArrayList();\n messages.add(new MessageObject(QueryMessages.versionListHeader(objectType.getName().toUpperCase(), searchKey)));\n final VersionDateTime lastDeletionTimestamp = res.getLastDeletionTimestamp();\n final String pkey = res.getPkey();\n if (lastDeletionTimestamp != null) {\n messages.add(new DeletedVersionResponseObject(lastDeletionTimestamp, objectType, pkey));\n }\n final List<VersionInfo> versionInfos = res.getVersionInfos();\n int versionPadding = getPadding(versionInfos);\n messages.add(new MessageObject(String.format(\"String_Node_Str\" + versionPadding + \"String_Node_Str\", VERSION_HEADER, DATE_HEADER, OPERATION_HEADER)));\n for (int i = 0; i < versionInfos.size(); i++) {\n final VersionInfo versionInfo = versionInfos.get(i);\n messages.add(new VersionResponseObject(versionPadding, versionInfo.getOperation(), i + 1, versionInfo.getTimestamp(), objectType, pkey));\n }\n messages.add(new MessageObject(\"String_Node_Str\"));\n return messages;\n}\n"
|
"public void hyperlinkUpdate(HyperlinkEvent e) {\n if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {\n this.messagePanel.add(stackTraceScrollPane, BorderLayout.CENTER);\n this.messagePanel.revalidate();\n this.messagePanel.repaint();\n this.pack();\n }\n}\n"
|
"private void applyMapping(Attribute<?, ?> attribute, List<Object> mappingList, List<String> parameterMappingList, boolean[] featuresFound) {\n if (attribute.isSubquery()) {\n applySubqueryMapping((SubqueryAttribute<? super T, ?>) attribute, mappingList, parameterMappingList);\n } else {\n MappingAttribute<? super T, ?> mappingAttribute = (MappingAttribute<? super T, ?>) attribute;\n if (attribute.isCollection()) {\n PluralAttribute<?, ?, ?> pluralAttribute = (PluralAttribute<?, ?, ?>) attribute;\n boolean listKey = pluralAttribute.isIndexed() && attribute instanceof ListAttribute<?, ?>;\n boolean mapKey = pluralAttribute.isIndexed() && attribute instanceof MapAttribute<?, ?, ?>;\n int startIndex = tupleOffset + mappingList.size();\n if (listKey) {\n featuresFound[1] = true;\n applyCollectionKeyMapping(\"String_Node_Str\", mappingAttribute, attribute, mappingList);\n parameterMappingList.add(null);\n } else if (mapKey) {\n featuresFound[1] = true;\n applyCollectionKeyMapping(\"String_Node_Str\", mappingAttribute, attribute, mappingList);\n parameterMappingList.add(null);\n }\n if (attribute.isSubview()) {\n featuresFound[2] = true;\n int[] newIdPositions;\n if (listKey || mapKey) {\n newIdPositions = new int[idPositions.length + 1];\n System.arraycopy(idPositions, 0, newIdPositions, 0, idPositions.length);\n newIdPositions[idPositions.length] = mappingList.size();\n } else {\n newIdPositions = idPositions;\n }\n applySubviewMapping(attribute, newIdPositions, pluralAttribute.getElementType(), mappingAttribute, mappingList, parameterMappingList);\n } else {\n applyBasicMapping(mappingAttribute, attribute, mappingList, parameterMappingList);\n }\n if (listKey) {\n if (pluralAttribute.isSorted()) {\n throw new IllegalArgumentException(\"String_Node_Str\" + pluralAttribute + \"String_Node_Str\");\n } else {\n tupleTransformatorFactory.add(new IndexedListTupleListTransformer(idPositions, startIndex));\n }\n } else if (mapKey) {\n if (pluralAttribute.isSorted()) {\n tupleTransformator.add(new SortedMapTupleListTransformer(idPositions, startIndex, pluralAttribute.getComparator()));\n } else if (pluralAttribute.isOrdered()) {\n tupleTransformator.add(new OrderedMapTupleListTransformer(idPositions, startIndex));\n } else {\n tupleTransformator.add(new MapTupleListTransformer(idPositions, startIndex));\n }\n } else {\n switch(pluralAttribute.getCollectionType()) {\n case COLLECTION:\n if (pluralAttribute.isSorted()) {\n throw new IllegalArgumentException(\"String_Node_Str\" + pluralAttribute + \"String_Node_Str\");\n } else {\n tupleTransformator.add(new OrderedListTupleListTransformer(idPositions, startIndex));\n }\n break;\n case LIST:\n if (pluralAttribute.isSorted()) {\n throw new IllegalArgumentException(\"String_Node_Str\" + pluralAttribute + \"String_Node_Str\");\n } else {\n tupleTransformator.add(new OrderedListTupleListTransformer(idPositions, startIndex));\n }\n break;\n case SET:\n if (pluralAttribute.isSorted()) {\n tupleTransformator.add(new SortedSetTupleListTransformer(idPositions, startIndex, pluralAttribute.getComparator()));\n } else if (pluralAttribute.isOrdered()) {\n tupleTransformator.add(new OrderedSetTupleListTransformer(idPositions, startIndex));\n } else {\n tupleTransformator.add(new SetTupleListTransformer(idPositions, startIndex));\n }\n break;\n case MAP:\n throw new IllegalArgumentException(\"String_Node_Str\" + pluralAttribute + \"String_Node_Str\");\n }\n }\n } else if (((SingularAttribute) attribute).isQueryParameter()) {\n featuresFound[0] = true;\n applyQueryParameterMapping(mappingAttribute, mappingList, parameterMappingList);\n } else if (attribute.isSubview()) {\n featuresFound[2] = true;\n applySubviewMapping(attribute, idPositions, attribute.getJavaType(), mappingAttribute, mappingList, parameterMappingList);\n } else {\n applyBasicMapping(mappingAttribute, attribute, mappingList, parameterMappingList);\n }\n }\n}\n"
|
"public org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent convertImplementationGuideGlobalComponent(org.hl7.fhir.dstu3.model.ImplementationGuide.ImplementationGuideGlobalComponent src) throws FHIRException {\n if (src == null || src.isEmpty())\n return null;\n org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent();\n copyElement(src, tgt);\n tgt.setType(src.getType());\n tgt.setProfile(convertReference(src.getProfile()));\n return tgt;\n}\n"
|
"private void _backoffDone(int cnt) throws IllegalActionException {\n Token[] value = { new IntToken(BkDone), new IntToken(cnt) };\n BKDone.send(0, new RecordToken(BackoffDoneMsgFields, value));\n mBkIP = false;\n _state = No_Backoff;\n}\n"
|
"private static CigarElement binaryCigarToCigarElement(final int cigarette) {\n final int binaryOp = cigarette & 0xf;\n final int length = cigarette >>> 4;\n return new CigarElement(length, CigarOperator.binaryToEnum(binaryOp));\n}\n"
|
"private void loadAvatarData(Contact entry, Cursor cursor) {\n if (entry.mPersonId == 0 || entry.mAvatar != null) {\n return null;\n }\n Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, entry.mPersonId);\n InputStream avatarDataStream = Contacts.openContactPhotoInputStream(mContext.getContentResolver(), contactUri);\n try {\n if (avatarDataStream != null) {\n byte[] data = new byte[avatarDataStream.available()];\n avatarDataStream.read(data, 0, data.length);\n entry.mAvatarData = data;\n }\n } catch (IOException ex) {\n } finally {\n try {\n if (avatarDataStream != null) {\n avatarDataStream.close();\n }\n } catch (IOException e) {\n }\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.