content stringlengths 40 137k |
|---|
"public void fetchObject(String fileID, long objectNo, XLocations xLoc, Capability capability, CowPolicy cow, final StageRequest rq) {\n ReplicatingFile file = this.filesInProgress.get(fileID);\n if (file == null) {\n file = this.lastCompletedFilesCache.get(fileID);\n if (file == null || (file != null && file.hasXLocChanged(xLoc))) {\n file = new ReplicatingFile(fileID, xLoc, capability, cow, master);\n }\n this.filesInProgress.put(fileID, file);\n ReplicatingFile.setMaxObjectsInProgressPerFile(MAX_OBJECTS_IN_PROGRESS_OVERALL / filesInProgress.size());\n if (Logging.isDebug())\n Logging.logMessage(Logging.LEVEL_DEBUG, Category.replication, this, \"String_Node_Str\", fileID);\n }\n file.update(capability, xLoc, cow);\n if (file.isObjectInProgress(objectNo)) {\n file.addObjectForReplication(objectNo, rq);\n } else {\n file.addObjectForReplication(objectNo, rq);\n try {\n file.replicate();\n } catch (TransferStrategyException e) {\n if (e.getErrorCode() == TransferStrategyException.ErrorCode.NO_OSD_FOUND)\n file.reportError(ErrorUtils.getErrorResponse(ErrorType.ERRNO, POSIXErrno.POSIX_ERROR_EIO, \"String_Node_Str\", e));\n else if (e.getErrorCode() == TransferStrategyException.ErrorCode.NO_OSD_REACHABLE)\n file.reportError(ErrorUtils.getErrorResponse(ErrorType.ERRNO, POSIXErrno.POSIX_ERROR_EIO, \"String_Node_Str\", e.getStackTrace().toString()));\n }\n if (!file.isReplicating())\n fileCompleted(file.fileID);\n }\n}\n"
|
"private void changeTowerSoldiers(ChangeTowerSoldiersGuiTask soldierTask) {\n ShortPoint2D buildingPosition = soldierTask.getBuildingPos();\n OccupyingBuilding occupyingBuilding = (OccupyingBuilding) grid.getBuildingAt(buildingPosition.x, buildingPosition.y);\n switch(soldierTask.getTaskType()) {\n case FULL:\n occupyingBuilding.requestFullSoldiers();\n break;\n case MORE:\n occupyingBuilding.requestSoldier(soldierTask.getSoldierType());\n break;\n case ONE:\n occupyingBuilding.releaseSoldiers();\n break;\n case LESS:\n occupyingBuilding.releaseSoldier(soldierTask.getSoldierType());\n break;\n }\n}\n"
|
"private Object getHCatalogRepositoryValue(HCatalogConnection connection, String value, IMetadataTable table) {\n HadoopClusterConnection hcConnection = HCRepositoryUtil.getRelativeHadoopClusterConnection(connection);\n if (hcConnection == null) {\n return null;\n }\n if (EHCatalogRepositoryToComponent.DISTRIBUTION.getRepositoryValue().equals(value)) {\n return hcConnection.getDistribution();\n } else if (EHCatalogRepositoryToComponent.HCAT_VERSION.getRepositoryValue().equals(value)) {\n return hcConnection.getDfVersion();\n } else if (EHCatalogRepositoryToComponent.TEMPLETON_HOST.getRepositoryValue().equals(value)) {\n return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(connection.getHostName()));\n } else if (EHCatalogRepositoryToComponent.TEMPLETON_PORT.getRepositoryValue().equals(value)) {\n return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(connection.getPort()));\n } else if (EHCatalogRepositoryToComponent.USE_KRB.getRepositoryValue().equals(value)) {\n return hcConnection.isEnableKerberos();\n } else if (EHCatalogRepositoryToComponent.KRB_PRINC.getRepositoryValue().equals(value)) {\n return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(connection.getKrbPrincipal()));\n } else if (EHCatalogRepositoryToComponent.KRB_REALM.getRepositoryValue().equals(value)) {\n return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(connection.getKrbRealm()));\n } else if (EHCatalogRepositoryToComponent.NAMENODE_PRINCIPAL.getRepositoryValue().equals(value)) {\n return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getPrincipal()));\n } else if (EHCatalogRepositoryToComponent.DATABASE_NAME.getRepositoryValue().equals(value)) {\n return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(connection.getDatabase()));\n } else if (EHCatalogRepositoryToComponent.TABLE_NAME.getRepositoryValue().equals(value)) {\n } else if (EHCatalogRepositoryToComponent.PARTITION_NAME.getRepositoryValue().equals(value)) {\n } else if (EHCatalogRepositoryToComponent.USERNAME.getRepositoryValue().equals(value)) {\n return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(connection.getUserName()));\n } else if (EHCatalogRepositoryToComponent.LOCAL.getRepositoryValue().equals(value)) {\n return false;\n } else if (EHCatalogRepositoryToComponent.MAPREDUCE.getRepositoryValue().equals(value)) {\n return true;\n } else if (EHCatalogRepositoryToComponent.PIG_VERSION.getRepositoryValue().equals(value)) {\n return hcConnection.getDfVersion();\n } else if (EHCatalogRepositoryToComponent.MAPRED_JOB_TRACKER.getRepositoryValue().equals(value)) {\n return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getJobTrackerURI()));\n } else if (EHCatalogRepositoryToComponent.FS_DEFAULT_NAME.getRepositoryValue().equals(value)) {\n return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(hcConnection.getNameNodeURI()));\n } else if (EHCatalogRepositoryToComponent.JOBTRACKER_PRINCIPAL.getRepositoryValue().equals(value)) {\n return TalendQuoteUtils.addQuotesIfNotExist(StringUtils.trimToNull(connection.getKrbPrincipal()));\n } else if (EHCatalogRepositoryToComponent.LOAD.getRepositoryValue().equals(value)) {\n return \"String_Node_Str\";\n }\n return null;\n}\n"
|
"private static Map<String, String> parseParameters(final String parameters) {\n Map<String, String> parameterMap = new HashMap<String, String>();\n if (parameters != null) {\n String[] splittedParameters = parameters.split(PARAMETER_SEPARATOR);\n for (String parameter : splittedParameters) {\n String[] keyValue = parameter.split(\"String_Node_Str\");\n String key = keyValue[0].trim().toLowerCase(Locale.ENGLISH);\n if (isParameterAllowed(key)) {\n String value = keyValue.length > 1 ? keyValue[1] : null;\n if (value != null && isLws(value.charAt(0))) {\n throw new IllegalArgumentException(\"String_Node_Str\" + key + \"String_Node_Str\" + parameters + \"String_Node_Str\");\n }\n parameterMap.put(key, value);\n }\n }\n }\n return parameterMap;\n}\n"
|
"public void setRouting(int mode, int routes, int mask) {\n int incallMask = 0;\n int ringtoneMask = 0;\n int normalMask = 0;\n if (!checkAudioSettingsPermission(\"String_Node_Str\")) {\n return;\n }\n synchronized (mSettingsLock) {\n if (mode == AudioSystem.MODE_INVALID) {\n switch(mask) {\n case AudioSystem.ROUTE_SPEAKER:\n if (routes != 0 && !mSpeakerIsOn) {\n mSpeakerIsOn = true;\n mRoutes[AudioSystem.MODE_IN_CALL] = AudioSystem.ROUTE_SPEAKER;\n incallMask = AudioSystem.ROUTE_ALL;\n } else if (routes == 0 && mSpeakerIsOn) {\n mSpeakerIsOn = false;\n if (mBluetoothScoIsConnected) {\n mRoutes[AudioSystem.MODE_IN_CALL] = AudioSystem.ROUTE_BLUETOOTH_SCO;\n } else if (mHeadsetIsConnected) {\n mRoutes[AudioSystem.MODE_IN_CALL] = AudioSystem.ROUTE_HEADSET;\n } else {\n mRoutes[AudioSystem.MODE_IN_CALL] = AudioSystem.ROUTE_EARPIECE;\n }\n incallMask = AudioSystem.ROUTE_ALL;\n }\n break;\n case AudioSystem.ROUTE_BLUETOOTH_SCO:\n if (routes != 0 && !mBluetoothScoIsConnected) {\n mBluetoothScoIsConnected = true;\n mRoutes[AudioSystem.MODE_IN_CALL] = AudioSystem.ROUTE_BLUETOOTH_SCO;\n mRoutes[AudioSystem.MODE_RINGTONE] = (mRoutes[AudioSystem.MODE_RINGTONE] & AudioSystem.ROUTE_BLUETOOTH_A2DP) | AudioSystem.ROUTE_BLUETOOTH_SCO;\n mRoutes[AudioSystem.MODE_NORMAL] = (mRoutes[AudioSystem.MODE_NORMAL] & AudioSystem.ROUTE_BLUETOOTH_A2DP) | AudioSystem.ROUTE_BLUETOOTH_SCO;\n incallMask = AudioSystem.ROUTE_ALL;\n ringtoneMask = AudioSystem.ROUTE_ALL & ~AudioSystem.ROUTE_BLUETOOTH_A2DP;\n normalMask = AudioSystem.ROUTE_ALL & ~AudioSystem.ROUTE_BLUETOOTH_A2DP;\n } else if (mBluetoothScoIsConnected) {\n mBluetoothScoIsConnected = false;\n if (mHeadsetIsConnected) {\n mRoutes[AudioSystem.MODE_IN_CALL] = AudioSystem.ROUTE_HEADSET;\n mRoutes[AudioSystem.MODE_RINGTONE] = (mRoutes[AudioSystem.MODE_RINGTONE] & AudioSystem.ROUTE_BLUETOOTH_A2DP) | (AudioSystem.ROUTE_HEADSET | AudioSystem.ROUTE_SPEAKER);\n mRoutes[AudioSystem.MODE_NORMAL] = (mRoutes[AudioSystem.MODE_NORMAL] & AudioSystem.ROUTE_BLUETOOTH_A2DP) | AudioSystem.ROUTE_HEADSET;\n } else {\n if (mSpeakerIsOn) {\n mRoutes[AudioSystem.MODE_IN_CALL] = AudioSystem.ROUTE_SPEAKER;\n } else {\n mRoutes[AudioSystem.MODE_IN_CALL] = AudioSystem.ROUTE_EARPIECE;\n }\n mRoutes[AudioSystem.MODE_RINGTONE] = (mRoutes[AudioSystem.MODE_RINGTONE] & AudioSystem.ROUTE_BLUETOOTH_A2DP) | AudioSystem.ROUTE_SPEAKER;\n mRoutes[AudioSystem.MODE_NORMAL] = (mRoutes[AudioSystem.MODE_NORMAL] & AudioSystem.ROUTE_BLUETOOTH_A2DP) | AudioSystem.ROUTE_SPEAKER;\n }\n incallMask = AudioSystem.ROUTE_ALL;\n ringtoneMask = AudioSystem.ROUTE_ALL & ~AudioSystem.ROUTE_BLUETOOTH_A2DP;\n normalMask = AudioSystem.ROUTE_ALL & ~AudioSystem.ROUTE_BLUETOOTH_A2DP;\n }\n break;\n case AudioSystem.ROUTE_HEADSET:\n if (routes != 0 && !mHeadsetIsConnected) {\n mHeadsetIsConnected = true;\n if (!mBluetoothScoIsConnected) {\n mRoutes[AudioSystem.MODE_IN_CALL] = AudioSystem.ROUTE_HEADSET;\n mRoutes[AudioSystem.MODE_RINGTONE] = (mRoutes[AudioSystem.MODE_RINGTONE] & AudioSystem.ROUTE_BLUETOOTH_A2DP) | (AudioSystem.ROUTE_HEADSET | AudioSystem.ROUTE_SPEAKER);\n mRoutes[AudioSystem.MODE_NORMAL] = (mRoutes[AudioSystem.MODE_NORMAL] & AudioSystem.ROUTE_BLUETOOTH_A2DP) | AudioSystem.ROUTE_HEADSET;\n incallMask = AudioSystem.ROUTE_ALL;\n ringtoneMask = AudioSystem.ROUTE_ALL & ~AudioSystem.ROUTE_BLUETOOTH_A2DP;\n normalMask = AudioSystem.ROUTE_ALL & ~AudioSystem.ROUTE_BLUETOOTH_A2DP;\n }\n } else if (mHeadsetIsConnected) {\n mHeadsetIsConnected = false;\n if (!mBluetoothScoIsConnected) {\n if (mSpeakerIsOn) {\n mRoutes[AudioSystem.MODE_IN_CALL] = AudioSystem.ROUTE_SPEAKER;\n } else {\n mRoutes[AudioSystem.MODE_IN_CALL] = AudioSystem.ROUTE_EARPIECE;\n }\n mRoutes[AudioSystem.MODE_RINGTONE] = (mRoutes[AudioSystem.MODE_RINGTONE] & AudioSystem.ROUTE_BLUETOOTH_A2DP) | AudioSystem.ROUTE_SPEAKER;\n mRoutes[AudioSystem.MODE_NORMAL] = (mRoutes[AudioSystem.MODE_NORMAL] & AudioSystem.ROUTE_BLUETOOTH_A2DP) | AudioSystem.ROUTE_SPEAKER;\n incallMask = AudioSystem.ROUTE_ALL;\n ringtoneMask = AudioSystem.ROUTE_ALL & ~AudioSystem.ROUTE_BLUETOOTH_A2DP;\n normalMask = AudioSystem.ROUTE_ALL & ~AudioSystem.ROUTE_BLUETOOTH_A2DP;\n }\n }\n break;\n case AudioSystem.ROUTE_BLUETOOTH_A2DP:\n if (routes != 0 && !mBluetoothA2dpIsConnected) {\n mBluetoothA2dpIsConnected = true;\n mRoutes[AudioSystem.MODE_RINGTONE] |= AudioSystem.ROUTE_BLUETOOTH_A2DP;\n mRoutes[AudioSystem.MODE_NORMAL] |= AudioSystem.ROUTE_BLUETOOTH_A2DP;\n ringtoneMask = AudioSystem.ROUTE_BLUETOOTH_A2DP;\n normalMask = AudioSystem.ROUTE_BLUETOOTH_A2DP;\n } else if (mBluetoothA2dpIsConnected) {\n mBluetoothA2dpIsConnected = false;\n mRoutes[AudioSystem.MODE_RINGTONE] &= ~AudioSystem.ROUTE_BLUETOOTH_A2DP;\n mRoutes[AudioSystem.MODE_NORMAL] &= ~AudioSystem.ROUTE_BLUETOOTH_A2DP;\n ringtoneMask = AudioSystem.ROUTE_BLUETOOTH_A2DP;\n normalMask = AudioSystem.ROUTE_BLUETOOTH_A2DP;\n }\n break;\n }\n if (incallMask != 0) {\n AudioSystem.setRouting(AudioSystem.MODE_IN_CALL, mRoutes[AudioSystem.MODE_IN_CALL], incallMask);\n }\n if (ringtoneMask != 0) {\n AudioSystem.setRouting(AudioSystem.MODE_RINGTONE, mRoutes[AudioSystem.MODE_RINGTONE], ringtoneMask);\n }\n if (normalMask != 0) {\n AudioSystem.setRouting(AudioSystem.MODE_NORMAL, mRoutes[AudioSystem.MODE_NORMAL], normalMask);\n }\n int streamType = getActiveStreamType(AudioManager.USE_DEFAULT_STREAM_TYPE);\n int index = mStreamStates[streamType].mIndex;\n syncRingerAndNotificationStreamVolume(streamType, index, true);\n setStreamVolumeInt(streamType, index, true, true);\n }\n }\n}\n"
|
"public Void call() throws Exception {\n SegmentCacheIndex index = cacheMgr.getIndexRegistry().getIndex(segmentWithData.getStar());\n boolean added = index.add(segmentWithData.getHeader(), true, response.converterMap.get(SegmentCacheIndexImpl.makeConverterKey(segmentWithData.getHeader())));\n if (added) {\n ((SlotFuture<SegmentBody>) index.getFuture(segmentWithData.getHeader())).put(body);\n }\n return null;\n}\n"
|
"public Resource getItemResource(Item item, boolean forceLoad) {\n if (item == null)\n return null;\n URI itemResourceURI = null;\n if (item.getFileExtension() != null) {\n itemResourceURI = getItemResourceURI(getItemURI(item), item.getFileExtension());\n } else if (item instanceof TDQItem) {\n IPath fileName = new Path(((TDQItem) item).getFilename());\n itemResourceURI = getItemResourceURI(getItemURI(item), fileName.getFileExtension());\n } else {\n itemResourceURI = getItemResourceURI(getItemURI(item));\n }\n Resource itemResource = resourceSet.getResource(itemResourceURI, false);\n if (forceLoad && itemResource == null) {\n if (item instanceof FileItem) {\n itemResource = new ByteArrayResource(itemResourceURI);\n getResourceSet().getResources().add(itemResource);\n }\n itemResource = getResourceSet().getResource(itemResourceURI, true);\n }\n return itemResource;\n}\n"
|
"public DeleteKeyringParcel createOperationInput() {\n return new DeleteKeyringParcel(mMasterKeyIds, mHasSecret);\n}\n"
|
"public synchronized void clearSnapshot() {\n this.snapshot.clear();\n}\n"
|
"public IndicatorParameters getParameters() {\n if (null == super.getParameters()) {\n setParameters(IndicatorsFactory.eINSTANCE.createIndicatorParameters());\n }\n if (null == parameters.getTextParameter()) {\n parameters.setTextParameter(IndicatorsFactory.eINSTANCE.createTextParameters());\n }\n return parameters;\n}\n"
|
"public long stepMicros(long jumpMicros, long executeMicros) throws EmulationException {\n if (isRunning()) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n if (jumpMicros < 0) {\n throw new IllegalArgumentException(\"String_Node_Str\" + jumpMicros);\n }\n if (!microClockReady) {\n lastMicrosCycles = maxCycles;\n }\n lastMicrosDelta += jumpMicros;\n if (microClockReady) {\n maxCycles = lastMicrosCycles + (lastMicrosDelta * dcoFrq) / 1000000;\n if (cpuOff) {\n if (maxCycles > nextEventCycles) {\n lastMicrosDelta -= jumpMicros;\n printEventQueues(System.out);\n throw new IllegalArgumentException(\"String_Node_Str\" + maxCycles + \"String_Node_Str\" + cycles + \"String_Node_Str\" + nextEventCycles);\n }\n } else if (maxCycles > cycles) {\n lastMicrosDelta -= jumpMicros;\n throw new IllegalArgumentException(\"String_Node_Str\" + maxCycles + \"String_Node_Str\" + cycles);\n }\n }\n microClockReady = true;\n maxCycles = lastMicrosCycles + ((lastMicrosDelta + executeMicros) * dcoFrq) / 1000000;\n if (debug) {\n if (servicedInterrupt >= 0) {\n disAsm.disassemble(reg[PC], memory, reg, servicedInterrupt);\n } else {\n disAsm.disassemble(reg[PC], memory, reg);\n }\n }\n while (cycles < maxCycles || (cpuOff && (nextEventCycles < cycles))) {\n if ((pc = emulateOP(maxCycles)) >= 0) {\n if (execCounter != null) {\n execCounter[reg[PC]]++;\n }\n if (trace != null) {\n if (tracePos > trace.length) {\n tracePos = 0;\n }\n trace[tracePos++] = reg[PC];\n }\n }\n }\n if (cpuOff && !(interruptsEnabled && servicedInterrupt == -1 && interruptMax >= 0)) {\n lastReturnedMicros = (1000000 * (nextEventCycles - cycles)) / dcoFrq;\n } else {\n lastReturnedMicros = 0;\n }\n if (cycles < maxCycles) {\n throw new RuntimeException(\"String_Node_Str\" + cycles + \"String_Node_Str\" + maxCycles);\n }\n if (lastReturnedMicros < 0) {\n throw new RuntimeException(\"String_Node_Str\" + lastReturnedMicros);\n }\n return lastReturnedMicros;\n}\n"
|
"public boolean prefire() throws IllegalActionException {\n if (!_sortValid) {\n _computeDepth();\n }\n return super.prefire();\n}\n"
|
"public DateModel<Calendar> createModel(Calendar value) {\n return new UtilCalendarModel(value);\n}\n"
|
"public void setStyleName(int row, String styleName) {\n UIObject.setStyleName(ensureElement(row), styleName);\n}\n"
|
"protected Control createDialogArea(Composite parent) {\n parent.getShell().setText(this.title);\n Composite composite = (Composite) super.createDialogArea(parent);\n builder = new SchematronExpressBuilder(composite, value, conceptName, isAbsoluteXPath, isSchematron);\n builder.setTreeParent(treeParent);\n return composite;\n}\n"
|
"private void updateVersionPart(IHDistribution distribution) {\n if (distribution == null) {\n return;\n }\n GridData distriData = (GridData) hadoopDistributionCombo.getCombo().getLayoutData();\n if (distribution.useCustom()) {\n hadoopVersionCombo.setHideWidgets(true);\n distriData.horizontalSpan = 1;\n hideControl(customButton, false);\n hideControl(useYarnButton, false);\n hideControl(customGroup, false);\n } else {\n hadoopVersionCombo.setHideWidgets(false);\n distriData.horizontalSpan = 2;\n hideControl(customButton, true);\n hideControl(useYarnButton, true);\n hideControl(customGroup, true);\n List<String> items = getDistributionVersions(distribution);\n Iterator<String> iter = items.iterator();\n while (iter.hasNext()) {\n String version = iter.next();\n IHDistributionVersion distributionVersion = distribution.getHDVersion(version, true);\n if (!distributionVersion.doSupportOozie()) {\n iter.remove();\n }\n }\n String[] versions = new String[items.size()];\n items.toArray(versions);\n hadoopVersionCombo.getCombo().setItems(versions);\n if (versions.length > 0) {\n hadoopVersionCombo.getCombo().select(0);\n }\n }\n}\n"
|
"private void solveSubProblem(int subProblemIndex, int[] variableIndexes, Vector variableCopiesSum) {\n Vector variables = variableCopies.get(subProblemIndex);\n Vector multipliers = lagrangeMultipliers.get(subProblemIndex);\n Vector consensusVariables = Vectors.build(variableIndexes.length, currentPoint.type());\n consensusVariables.set(0, variableIndexes.length - 1, currentPoint.get(variableIndexes));\n multipliers.addInPlace(variables.sub(consensusVariables).mult(augmentedLagrangianParameter));\n variables.set(0, variables.size() - 1, consensusVariables.sub(multipliers.div(augmentedLagrangianParameter)));\n if (objective.getValue(variables, subProblemIndex) > 0) {\n variables.set(0, variables.size() - 1, new NewtonSolver.Builder(new SubProblemObjectiveFunction(objective.getTerm(subProblemIndex), consensusVariables, multipliers), variables).build().solve());\n if (objective.getValue(variables, subProblemIndex) < 0) {\n variables = ((LinearFunction) objective.getTerm(subProblemIndex)).projectToHyperplane(consensusVariables);\n }\n }\n Vector termPoint = Vectors.build(currentPoint.size(), currentPoint.type());\n termPoint.set(variableIndexes, variables.add(multipliers.div(augmentedLagrangianParameter)));\n variableCopiesSum.addInPlace(termPoint);\n}\n"
|
"protected void updateBindConnection(AbstractAnalysisMetadataPage masterPage, List<TableViewer> tableViewerPosStack) {\n boolean isEmpty1 = tableViewerPosStack.get(0) == null || tableViewerPosStack.get(0).getInput() == null || ((List) tableViewerPosStack.get(0).getInput()).size() == 0;\n boolean isEmpty2 = tableViewerPosStack.get(1) == null || tableViewerPosStack.get(1).getInput() == null || ((List) tableViewerPosStack.get(1).getInput()).size() == 0;\n if (isEmpty1 && isEmpty2) {\n return;\n } else {\n TableViewer columnsElementViewer = null;\n if (!isEmpty1) {\n columnsElementViewer = tableViewerPosStack.get(0);\n } else {\n columnsElementViewer = tableViewerPosStack.get(1);\n }\n Connection tdProvider = null;\n Object input = columnsElementViewer.getInput();\n List<DBColumnRepNode> columnSet = (List<DBColumnRepNode>) input;\n if (columnSet != null && columnSet.size() != 0) {\n TdColumn column = (TdColumn) ((MetadataColumnRepositoryObject) columnSet.get(0).getObject()).getTdColumn();\n if (column != null && column.eIsProxy()) {\n column = (TdColumn) EObjectHelper.resolveObject(column);\n }\n tdProvider = ConnectionHelper.getTdDataProvider(column);\n setConnectionState(masterPage, tdProvider);\n }\n }\n}\n"
|
"public Graph createGraph(Object semanticObject) {\n Graph g = new BasicGraph();\n g.setSemanticObject(semanticObject);\n if (semanticObject instanceof CompositeEntity) {\n CompositeEntity toplevel = (CompositeEntity) semanticObject;\n Iterator entities = toplevel.entityList().iterator();\n while (entities.hasNext()) {\n Entity entity = (Entity) entities.next();\n Icon icon = (Icon) entity.getAttribute(\"String_Node_Str\");\n if (icon == null) {\n try {\n icon = new EditorIcon(entity);\n } catch (Exception e) {\n throw new InternalErrorException(\"String_Node_Str\" + \"String_Node_Str\" + e.getMessage());\n }\n }\n addNode(createCompositeNode(icon), g);\n }\n Iterator relations = toplevel.relationList().iterator();\n while (relations.hasNext()) {\n Relation relation = (Relation) relations.next();\n Iterator attributes = relation.attributeList().iterator();\n Node rootVertex = null;\n while (attributes.hasNext()) {\n Attribute a = (Attribute) attributes.next();\n if (a instanceof Vertex) {\n Node n = createNode(a);\n if (((Vertex) a).getLinkedVertex() == null) {\n rootVertex = n;\n }\n addNode(n, g);\n }\n }\n int count = 0;\n Enumeration links = relation.linkedPorts();\n while (links.hasMoreElements()) {\n links.nextElement();\n count++;\n }\n if (rootVertex == null && count == 2) {\n links = relation.linkedPorts();\n Port port1 = (Port) links.nextElement();\n Port port2 = (Port) links.nextElement();\n Node node1 = _findNode(g, port1);\n Node node2 = _findNode(g, port2);\n Edge newEdge = createEdge(relation);\n super.setEdgeHead(newEdge, node1);\n super.setEdgeTail(newEdge, node2);\n } else {\n if (rootVertex == null) {\n try {\n Vertex v = new Vertex(relation, relation.uniqueName(\"String_Node_Str\"));\n rootVertex = createNode(v);\n } catch (Exception e) {\n throw new InternalErrorException(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + e.getMessage());\n }\n addNode(rootVertex, g);\n }\n links = relation.linkedPorts();\n while (links.hasMoreElements()) {\n Port port = (Port) links.nextElement();\n Node foundNode = _findNode(g, port);\n Edge newEdge = createEdge(null);\n super.setEdgeHead(newEdge, foundNode);\n super.setEdgeTail(newEdge, rootVertex);\n }\n }\n }\n }\n return g;\n}\n"
|
"protected void recalculateIfRequired(DrawContext dc, double alpha) {\n boolean followTerrainRecalculationRequired = false;\n if (followTerrain) {\n long currentTime = System.currentTimeMillis();\n if (currentTime - lastFollowTerrainUpdateTime > getFollowTerrainUpdateFrequency()) {\n lastFollowTerrainUpdateTime = currentTime;\n followTerrainRecalculationRequired = true;\n }\n }\n boolean recalculateVertices = followTerrainRecalculationRequired || elevationChanged || verticesDirty || lastGlobe != dc.getGlobe() || VerticalExaggerationAccessor.isVerticalExaggerationChanged(this, dc);\n if (recalculateVertices) {\n lastGlobe = dc.getGlobe();\n DrawContextDelegateVerticalExaggerationOverride dcve = new DrawContextDelegateVerticalExaggerationOverride(dc);\n dcve.overrideVerticalExaggeration(dc.getVerticalExaggeration());\n recalculateVertices(dcve, false);\n verticesDirty = false;\n }\n Vec4 eyePoint = dc.getView().getEyePoint();\n boolean recalculateIndices = (forceSortedPrimitives || (sortTransparentPrimitives && alpha < 1.0)) && (mode == GL.GL_TRIANGLES || mode == GL.GL_POINTS) && !eyePoint.equals(lastEyePoint);\n if (recalculateIndices) {\n lastEyePoint = eyePoint;\n resortIndices(dc, lastEyePoint);\n }\n}\n"
|
"private BasicDBList filterMissingOptionalAndNullNullableConditions(BasicDBList conditions, DBObject content) {\n Set<String> nullPaths = new HashSet<>();\n BasicDBList ret = new BasicDBList();\n conditions.stream().forEach((Object condition) -> {\n if (condition instanceof BasicDBObject) {\n Boolean nullable = false;\n Object _nullable = ((BasicDBObject) condition).get(\"String_Node_Str\");\n if (_nullable != null && _nullable instanceof Boolean) {\n nullable = (Boolean) _nullable;\n }\n Boolean optional = false;\n Object _optional = ((BasicDBObject) condition).get(\"String_Node_Str\");\n if (_optional != null && _optional instanceof Boolean) {\n optional = (Boolean) _optional;\n }\n if (nullable) {\n Object _path = ((BasicDBObject) condition).get(\"String_Node_Str\");\n if (_path != null && _path instanceof String) {\n String path = (String) _path;\n List<Optional<Object>> props;\n try {\n props = JsonUtils.getPropsFromPath(content, path);\n if (props != null && props.stream().allMatch((Optional<Object> prop) -> {\n return prop != null && !prop.isPresent();\n })) {\n nullPaths.add(path);\n }\n } catch (IllegalArgumentException ex) {\n nullPaths.add(path);\n }\n }\n }\n if (optional || patching) {\n Object _path = ((BasicDBObject) condition).get(\"String_Node_Str\");\n if (_path != null && _path instanceof String) {\n String path = (String) _path;\n List<Optional<Object>> props;\n try {\n props = JsonUtils.getPropsFromPath(content, path);\n if (props == null || props.stream().allMatch((Optional<Object> prop) -> {\n return prop == null;\n })) {\n nullPaths.add(path);\n }\n } catch (IllegalArgumentException ex) {\n nullPaths.add(path);\n }\n }\n }\n }\n });\n conditions.stream().forEach(condition -> {\n if (condition instanceof BasicDBObject) {\n Object _path = ((BasicDBObject) condition).get(\"String_Node_Str\");\n if (_path != null && _path instanceof String) {\n String path = (String) _path;\n boolean hasNullParent = nullPaths.stream().anyMatch(nullPath -> {\n return JsonUtils.isAncestorPath(nullPath, path);\n });\n if (!hasNullParent) {\n ret.add(condition);\n }\n }\n }\n });\n return ret;\n}\n"
|
"public void saveState(IMemento memento) {\n super.saveState(memento);\n if (commitTrans != null || sourceBranch != null || destBranch != null || transactionId != null) {\n try {\n IMemento childMemento = memento.createChild(INPUT);\n if (commitTrans != null) {\n childMemento.putInteger(COMMIT_NUMBER, commitTrans.getId());\n }\n if (sourceBranch != null) {\n childMemento.putInteger(SOURCE_BRANCH_ID, sourceBranch.getId());\n }\n if (destBranch != null) {\n childMemento.putInteger(DEST_BRANCH_ID, destBranch.getId());\n }\n if (transactionId != null) {\n childMemento.putInteger(TRANSACTION_NUMBER, transactionId.getId());\n }\n SkynetViews.addDatabaseSourceId(childMemento);\n } catch (Exception ex) {\n OseeLog.log(Activator.class, Level.WARNING, \"String_Node_Str\", ex);\n }\n }\n}\n"
|
"public void render(final Radio item, final Object data, final int index) throws Exception {\n final Radiogroup radiogroup = item.getRadiogroup();\n final int size = radiogroup.getModel().getSize();\n final Template tm = resoloveTemplate(radiogroup, item, data, index, size, \"String_Node_Str\");\n if (tm == null) {\n item.setLabel(Objects.toString(data));\n item.setValue(data);\n } else {\n final ForEachStatus iterStatus = new AbstractForEachStatus() {\n private static final long serialVersionUID = 1L;\n public int getIndex() {\n return index;\n }\n public Object getEach() {\n return data;\n }\n public Integer getEnd() {\n return size;\n }\n };\n final String var = (String) tm.getParameters().get(EACH_ATTR);\n final String varnm = var == null ? EACH_VAR : var;\n final String itervar = (String) tm.getParameters().get(STATUS_ATTR);\n final String itervarnm = itervar == null ? (var == null ? EACH_STATUS_VAR : varnm + STATUS_POST_VAR) : itervar;\n Object oldVar = radiogroup.getAttribute(varnm);\n Object oldIter = radiogroup.getAttribute(itervarnm);\n radiogroup.setAttribute(varnm, data);\n radiogroup.setAttribute(itervarnm, iterStatus);\n final Component[] items = tm.create(radiogroup, item, null, null);\n radiogroup.setAttribute(varnm, oldVar);\n radiogroup.setAttribute(itervarnm, oldIter);\n if (items.length != 1)\n throw new UiException(\"String_Node_Str\" + items.length);\n final Radio nr = (Radio) items[0];\n nr.setAttribute(BinderImpl.VAR, varnm);\n addItemReference(radiogroup, nr, index, varnm);\n nr.setAttribute(itervarnm, iterStatus);\n addTemplateTracking(radiogroup, nr, data, index, size);\n if (nr.getValue() == null && data instanceof String)\n nr.setValue((String) data);\n item.setAttribute(\"String_Node_Str\", nr);\n item.detach();\n }\n}\n"
|
"public void onTimeSet(TimePicker view, int hour, int minute) {\n mHour = hour;\n mMinute = minute;\n Date d = new Date(mYear - 1900, mMonth, mDay, mHour, mMinute);\n long timestamp = d.getTime();\n try {\n int flags = 0;\n flags |= android.text.format.DateUtils.FORMAT_SHOW_DATE;\n flags |= android.text.format.DateUtils.FORMAT_ABBREV_MONTH;\n flags |= android.text.format.DateUtils.FORMAT_SHOW_YEAR;\n flags |= android.text.format.DateUtils.FORMAT_SHOW_TIME;\n customPubDate = timestamp + TimeZone.getDefault().getOffset(timestamp);\n String formattedDate = DateUtils.formatDateTime(EditPost.this, customPubDate, flags);\n TextView tvPubDate = (TextView) findViewById(R.id.pubDate);\n tvPubDate.setText(formattedDate);\n isCustomPubDate = true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n TextView pubDate = (TextView) findViewById(R.id.pubDate);\n String[] shortMonths = new DateFormatSymbols().getShortMonths();\n pubDate.setText(shortMonths[mMonth] + \"String_Node_Str\" + String.format(\"String_Node_Str\", mDay) + \"String_Node_Str\" + mYear + \"String_Node_Str\" + String.format(\"String_Node_Str\", mHour) + \"String_Node_Str\" + String.format(\"String_Node_Str\", mMinute) + \"String_Node_Str\" + AMPM);\n isCustomPubDate = true;\n}\n"
|
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 0) {\n if (resultCode == RESULT_OK) {\n mThreadPresenter.addPost(data.getStringExtra(\"String_Node_Str\"), forumId, topicId);\n } else {\n }\n fab.show();\n }\n}\n"
|
"public boolean execute(final PlotPlayer plr, final String... args) {\n final Location loc = plr.getLocationFull();\n final Plot plot = MainUtil.getPlot(loc);\n if (plot == null) {\n return !sendMessage(plr, C.NOT_IN_PLOT);\n }\n if ((plot == null) || !plot.hasOwner()) {\n MainUtil.sendMessage(plr, C.PLOT_UNOWNED);\n return false;\n }\n final boolean admin = Permissions.hasPermission(plr, \"String_Node_Str\");\n if (!plot.isOwner(plr.getUUID()) && !admin) {\n MainUtil.sendMessage(plr, C.NO_PLOT_PERMS);\n return false;\n }\n if (args.length < 1) {\n MainUtil.sendMessage(plr, C.SUBCOMMAND_SET_OPTIONS_HEADER.s() + StringUtils.join(values, C.BLOCK_LIST_SEPARATER.s()));\n MainUtil.sendMessage(plr, C.DIRECTION.s().replaceAll(\"String_Node_Str\", direction(loc.getYaw())));\n return false;\n }\n int direction = -1;\n for (int i = 0; i < values.length; i++) {\n if (args[0].equalsIgnoreCase(values[i]) || args[0].equalsIgnoreCase(aliases[i])) {\n direction = i;\n break;\n }\n }\n if (direction == -1) {\n MainUtil.sendMessage(plr, C.SUBCOMMAND_SET_OPTIONS_HEADER.s() + StringUtils.join(values, C.BLOCK_LIST_SEPARATER.s()));\n MainUtil.sendMessage(plr, C.DIRECTION.s().replaceAll(\"String_Node_Str\", direction(loc.getYaw())));\n return false;\n }\n PlotId bot = MainUtil.getBottomPlot(plot).id;\n PlotId top = MainUtil.getTopPlot(plot).id;\n ArrayList<PlotId> selPlots;\n final String world = loc.getWorld();\n switch(direction) {\n case 0:\n selPlots = MainUtil.getMaxPlotSelectionIds(world, new PlotId(bot.x, bot.y - 1), new PlotId(top.x, top.y));\n break;\n case 1:\n selPlots = MainUtil.getMaxPlotSelectionIds(world, new PlotId(bot.x, bot.y), new PlotId(top.x + 1, top.y));\n break;\n case 2:\n selPlots = MainUtil.getMaxPlotSelectionIds(world, new PlotId(bot.x, bot.y), new PlotId(top.x, top.y + 1));\n break;\n case 3:\n selPlots = MainUtil.getMaxPlotSelectionIds(world, new PlotId(bot.x - 1, bot.y), new PlotId(top.x, top.y));\n break;\n default:\n return false;\n }\n final PlotId botId = selPlots.get(0);\n final PlotId topId = selPlots.get(selPlots.size() - 1);\n final PlotId bot1 = MainUtil.getBottomPlot(MainUtil.getPlot(world, botId)).id;\n final PlotId bot2 = MainUtil.getBottomPlot(MainUtil.getPlot(world, topId)).id;\n final PlotId top1 = MainUtil.getTopPlot(MainUtil.getPlot(world, topId)).id;\n final PlotId top2 = MainUtil.getTopPlot(MainUtil.getPlot(world, botId)).id;\n bot = new PlotId(Math.min(bot1.x, bot2.x), Math.min(bot1.y, bot2.y));\n top = new PlotId(Math.max(top1.x, top2.x), Math.max(top1.y, top2.y));\n final ArrayList<PlotId> plots = MainUtil.getMaxPlotSelectionIds(world, bot, top);\n boolean multiMerge = false;\n final HashSet<UUID> multiUUID = new HashSet<UUID>();\n HashSet<PlotId> multiPlots = new HashSet<>();\n final UUID u1 = plot.getOwner();\n for (final PlotId myid : plots) {\n final Plot myplot = PlotSquared.getPlots(world).get(myid);\n UUID u2 = myplot.getOwner();\n if (myplot == null || u2 == null) {\n MainUtil.sendMessage(plr, C.NO_PERM_MERGE.s().replaceAll(\"String_Node_Str\", myid.toString()));\n return false;\n }\n if (u2.equals(u1)) {\n continue;\n }\n PlotPlayer p2 = UUIDHandler.getPlayer(u2);\n if (p2 == null) {\n MainUtil.sendMessage(plr, C.NO_PERM_MERGE.s().replaceAll(\"String_Node_Str\", myid.toString()));\n return false;\n }\n multiMerge = true;\n multiPlots.add(myid);\n }\n if (multiMerge) {\n for (final UUID uuid : multiUUID) {\n CmdConfirm.addPending(UUIDHandler.getPlayer(uuid), \"String_Node_Str\", new Runnable() {\n public void run() {\n PlotPlayer accepter = UUIDHandler.getPlayer(uuid);\n multiUUID.remove(uuid);\n if (multiUUID.size() == 0) {\n PlotPlayer pp = UUIDHandler.getPlayer(u1);\n if (pp == null) {\n sendMessage(plr, C.MERGE_NOT_VALID);\n return;\n }\n final PlotWorld plotWorld = PlotSquared.getPlotWorld(world);\n if ((PlotSquared.economy != null) && plotWorld.USE_ECONOMY) {\n double cost = plotWorld.MERGE_PRICE;\n cost = plots.size() * cost;\n if (cost > 0d) {\n if (EconHandler.getBalance(plr) < cost) {\n sendMessage(plr, C.CANNOT_AFFORD_MERGE, cost + \"String_Node_Str\");\n return;\n }\n EconHandler.withdrawPlayer(plr, cost);\n sendMessage(plr, C.REMOVED_BALANCE, cost + \"String_Node_Str\");\n }\n }\n final boolean result = EventUtil.manager.callMerge(world, plot, plots);\n if (!result) {\n MainUtil.sendMessage(plr, \"String_Node_Str\");\n return;\n }\n MainUtil.sendMessage(plr, C.SUCCESS_MERGE);\n MainUtil.mergePlots(world, plots, true);\n MainUtil.setSign(UUIDHandler.getName(plot.owner), plot);\n MainUtil.update(loc);\n }\n MainUtil.sendMessage(accepter, C.MERGE_ACCEPTED);\n }\n });\n }\n return true;\n }\n final PlotWorld plotWorld = PlotSquared.getPlotWorld(world);\n if ((PlotSquared.economy != null) && plotWorld.USE_ECONOMY) {\n double cost = plotWorld.MERGE_PRICE;\n cost = plots.size() * cost;\n if (cost > 0d) {\n if (EconHandler.getBalance(plr) < cost) {\n sendMessage(plr, C.CANNOT_AFFORD_MERGE, cost + \"String_Node_Str\");\n return false;\n }\n EconHandler.withdrawPlayer(plr, cost);\n sendMessage(plr, C.REMOVED_BALANCE, cost + \"String_Node_Str\");\n }\n }\n final boolean result = EventUtil.manager.callMerge(world, plot, plots);\n if (!result) {\n MainUtil.sendMessage(plr, \"String_Node_Str\");\n return false;\n }\n MainUtil.sendMessage(plr, C.SUCCESS_MERGE);\n MainUtil.mergePlots(world, plots, true);\n MainUtil.setSign(UUIDHandler.getName(plot.owner), plot);\n MainUtil.update(loc);\n return true;\n}\n"
|
"public void fire() throws IllegalActionException {\n try {\n _workspace.getReadAccess();\n for (Object parameterObject : attributeList()) {\n if (parameterObject instanceof PortParameter) {\n ((PortParameter) parameterObject).update();\n }\n }\n } finally {\n _workspace.doneReading();\n }\n TransformationMode.Mode modeValue = (TransformationMode.Mode) mode.getChosenValue();\n if (modelInput.hasToken(0)) {\n ActorToken token = (ActorToken) modelInput.get(0);\n _lastModel = (CompositeEntity) token.getEntity(new Workspace());\n _lastModel.setDeferringChangeRequests(false);\n _lastResults.clear();\n TransformationRule workingCopy = mode.getWorkingCopy(this);\n for (Object parameterObject : attributeList()) {\n if (parameterObject instanceof PortParameter) {\n PortParameter param = (PortParameter) parameterObject;\n Token paramToken = param.getToken();\n PortParameter paramCopy = (PortParameter) workingCopy.getAttribute(param.getName());\n while (paramCopy.getToken() == null && paramToken != null || paramCopy.getToken() != null && paramToken == null) {\n paramCopy.setToken(paramToken);\n }\n }\n }\n if (modeValue == null) {\n _lastResults = mode.findAllMatches(workingCopy, _lastModel);\n } else {\n boolean untilFixpoint = ((BooleanToken) repeatUntilFixpoint.getToken()).booleanValue();\n long count = LongToken.convert(repeatCount.getToken()).longValue();\n boolean matchOnly = mode.isMatchOnly();\n boolean foundMatch = count > 0;\n try {\n while (foundMatch) {\n foundMatch = mode.transform(workingCopy, _lastModel);\n if (matchOnly || !untilFixpoint && --count <= 0) {\n break;\n }\n }\n } catch (Throwable t) {\n throw new IllegalActionException(this, t, \"String_Node_Str\" + \"String_Node_Str\" + getFullName() + \"String_Node_Str\");\n }\n if (!matchOnly) {\n modelOutput.send(0, new ActorToken(_lastModel));\n }\n matched.send(0, BooleanToken.getInstance(foundMatch));\n }\n }\n if (modeValue != null) {\n return;\n }\n if (matchInput.isOutsideConnected() && matchInput.hasToken(0) && _lastModel != null) {\n ObjectToken token = (ObjectToken) matchInput.get(0);\n MatchResult match = (MatchResult) token.getValue();\n if (match != null) {\n TransformationRule workingCopy = mode.getWorkingCopy(this);\n CompositeEntity host = (CompositeEntity) match.get(workingCopy.getPattern());\n if (_lastModel != host && !_lastModel.deepContains(host)) {\n throw new IllegalActionException(this, \"String_Node_Str\" + \"String_Node_Str\");\n }\n try {\n GraphTransformer.transform(workingCopy, match);\n } catch (Throwable t) {\n throw new IllegalActionException(this, t, \"String_Node_Str\" + \"String_Node_Str\" + getFullName() + \"String_Node_Str\");\n }\n modelOutput.send(0, new ActorToken(_lastModel));\n }\n }\n if (trigger.isOutsideConnected() && trigger.hasToken(0) && !_lastResults.isEmpty()) {\n trigger.get(0);\n _removeFirst = true;\n MatchResult result = _lastResults.get(0);\n matchOutput.send(0, new ObjectToken(result));\n }\n remaining.send(0, new IntToken(_lastResults.size()));\n}\n"
|
"public void chartMouseClicked(ChartMouseEvent event) {\n boolean flag = event.getTrigger().getButton() != MouseEvent.BUTTON3;\n chartComp.setDomainZoomable(flag);\n chartComp.setRangeZoomable(flag);\n if (flag) {\n return;\n }\n final ExecutionLanguage currentEngine = analysis.getParameters().getExecutionLanguage();\n if (ExecutionLanguage.JAVA == currentEngine && !analysis.getParameters().isStoreData()) {\n return;\n }\n ChartEntity chartEntity = event.getEntity();\n if (chartEntity != null && chartEntity instanceof CategoryItemEntity) {\n CategoryItemEntity cateEntity = (CategoryItemEntity) chartEntity;\n ICustomerDataset dataEntity = (ICustomerDataset) cateEntity.getDataset();\n final ChartDataEntity currentDataEntity = getCurrentChartDateEntity(cateEntity, dataEntity);\n if (currentDataEntity != null) {\n final Indicator currentIndicator = currentDataEntity.getIndicator();\n if (!currentIndicator.isUsedMapDBMode()) {\n if (ExecutionLanguage.JAVA == currentEngine && 0 == analysis.getResults().getIndicToRowMap().size()) {\n return;\n }\n if (currentIndicator instanceof DatePatternFreqIndicator && null == analysis.getResults().getIndicToRowMap().get(currentIndicator).getFrequencyData()) {\n return;\n }\n }\n Menu menu = new Menu(chartComp.getShell(), SWT.POP_UP);\n chartComp.setMenu(menu);\n int createPatternFlag = 0;\n MenuItemEntity[] itemEntities = ChartTableMenuGenerator.generate(explorer, analysis, currentDataEntity);\n for (final MenuItemEntity itemEntity : itemEntities) {\n MenuItem item = new MenuItem(menu, SWT.PUSH);\n item.setText(itemEntity.getLabel());\n item.setImage(itemEntity.getIcon());\n item.setEnabled(DrillDownUtils.isMenuItemEnable(currentDataEntity, itemEntity, analysis));\n item.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n if (ExecutionLanguage.JAVA == currentEngine) {\n try {\n DrillDownEditorInput input = new DrillDownEditorInput(analysis, currentDataEntity, itemEntity);\n if (input.computeColumnValueLength(input.filterAdaptDataList())) {\n CorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, \"String_Node_Str\");\n } else {\n MessageDialog.openWarning(null, Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"));\n }\n } catch (PartInitException e1) {\n log.error(e1, e1);\n }\n } else {\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n Connection tdDataProvider = SwitchHelpers.CONNECTION_SWITCH.doSwitch(analysis.getContext().getConnection());\n String query = itemEntity.getQuery();\n String editorName = currentIndicator.getName();\n SqlExplorerUtils.getDefault().runInDQViewer(tdDataProvider, query, editorName);\n }\n });\n }\n }\n });\n if ((currentIndicator instanceof PatternFreqIndicator || currentIndicator instanceof PatternLowFreqIndicator) && createPatternFlag == 0) {\n MenuItem itemCreatePatt = new MenuItem(menu, SWT.PUSH);\n itemCreatePatt.setText(DefaultMessagesImpl.getString(\"String_Node_Str\"));\n final PatternTransformer pattTransformer = new PatternTransformer(DbmsLanguageFactory.createDbmsLanguage(analysis));\n itemCreatePatt.addSelectionListener(new SelectionAdapter() {\n public void widgetSelected(SelectionEvent e) {\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n ChartTableFactory.createPattern(analysis, itemEntity, pattTransformer);\n }\n });\n }\n });\n }\n createPatternFlag++;\n }\n ChartTableFactory.addJobGenerationMenu(menu, analysis, currentIndicator);\n menu.setVisible(true);\n }\n }\n}\n"
|
"protected boolean refreshNewJob() {\n if (alreadyEditedByUser) {\n return false;\n }\n StructuredSelection selection = (StructuredSelection) mainPage.getSelection();\n if (selection != null && !selection.isEmpty()) {\n RepositoryNode node = (RepositoryNode) selection.getFirstElement();\n lastVersion = node.getObject().getVersion().equals(originalVersion);\n if (!lastVersion) {\n originalVersion = node.getObject().getVersion();\n String newVersion = processObject.getVersion();\n processObject = node.getObject();\n processObject.getProperty().setVersion(newVersion);\n }\n }\n IProxyRepositoryFactory repositoryFactory = CorePlugin.getDefault().getRepositoryService().getProxyRepositoryFactory();\n try {\n repositoryFactory.save(getProperty(), this.originaleObjectLabel, this.originalVersion);\n ExpressionPersistance.getInstance().jobNameChanged(originaleObjectLabel, processObject.getLabel());\n ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());\n return true;\n } catch (PersistenceException e) {\n MessageBoxExceptionHandler.process(e);\n return false;\n }\n}\n"
|
"public void callArtifactPluginMethod(HttpRequest request, HttpResponder responder, String namespaceId, String artifactName, String artifactVersion, String pluginName, String pluginType, String methodName, String scope) throws Exception {\n String requestBody = request.getContent().toString(Charsets.UTF_8);\n NamespaceId namespace = Ids.namespace(namespaceId);\n NamespaceId artifactNamespace = validateAndGetScopedNamespace(namespace, scope);\n Id.Artifact artifactId = validateAndGetArtifactId(artifactNamespace, artifactName, artifactVersion);\n if (requestBody.isEmpty()) {\n throw new BadRequestException(\"String_Node_Str\" + \"String_Node_Str\");\n }\n try {\n PluginEndpoint pluginEndpoint = pluginService.getPluginEndpoint(namespace, artifactId, pluginType, pluginName, methodName);\n Object response = pluginEndpoint.invoke(GSON.fromJson(requestBody, pluginEndpoint.getMethodParameterType()));\n responder.sendString(HttpResponseStatus.OK, GSON.toJson(response));\n } catch (JsonSyntaxException e) {\n responder.sendString(HttpResponseStatus.BAD_REQUEST, \"String_Node_Str\");\n } catch (InvocationTargetException e) {\n if (e.getCause() instanceof javax.ws.rs.NotFoundException) {\n throw new NotFoundException(e.getCause());\n } else if (e.getCause() instanceof javax.ws.rs.BadRequestException) {\n throw new BadRequestException(e.getCause());\n } else if (e.getCause() instanceof IllegalArgumentException && e.getCause() != null) {\n responder.sendString(HttpResponseStatus.BAD_REQUEST, e.getCause().getMessage());\n } else {\n Throwable rootCause = Throwables.getRootCause(e);\n String message = \"String_Node_Str\";\n if (rootCause != null && rootCause.getMessage() != null) {\n message = String.format(\"String_Node_Str\", message, rootCause.getMessage());\n }\n responder.sendString(HttpResponseStatus.INTERNAL_SERVER_ERROR, message);\n }\n }\n}\n"
|
"public static void main(String[] args) throws Exception {\n String propsPath;\n String testFile = null;\n if (args.length == 0) {\n System.out.println(\"String_Node_Str\" + \"String_Node_Str\");\n }\n propsPath = args[0];\n if (args.length == 2) {\n testFile = args[1];\n }\n SphinxProperties.initContext(\"String_Node_Str\", new URL(propsPath));\n LargeTrigramModel lm = new LargeTrigramModel(\"String_Node_Str\");\n Timer.dumpAll();\n LogMath logMath = LogMath.getLogMath(\"String_Node_Str\");\n InputStream stream = new FileInputStream(testFile);\n BufferedReader reader = new BufferedReader(new InputStreamReader(stream));\n Timer timer = Timer.getTimer(\"String_Node_Str\", \"String_Node_Str\");\n String input;\n List wordSequences = new LinkedList();\n while ((input = reader.readLine()) != null) {\n StringTokenizer st = new StringTokenizer(input);\n List list = new ArrayList();\n while (st.hasMoreTokens()) {\n String tok = (String) st.nextToken();\n list.add(tok);\n }\n WordSequence wordSequence = new WordSequence(list);\n wordSequences.add(wordSequence);\n }\n for (Iterator i = wordSequences.iterator(); i.hasNext(); ) {\n WordSequence ws = (WordSequence) i.next();\n timer.start();\n lm.start();\n WordSequence ws = (WordSequence) i.next();\n logScores[s++] = (int) lm.getProbability(ws);\n lm.stop();\n }\n Timer.dumpAll(\"String_Node_Str\");\n}\n"
|
"protected VoltageLevel readRootElementAttributes(VoltageLevelAdder adder, XMLStreamReader reader, List<Runnable> endTasks) {\n DateTime date = DateTime.parse(reader.getAttributeValue(null, \"String_Node_Str\"));\n Horizon horizon = Horizon.valueOf(reader.getAttributeValue(null, \"String_Node_Str\"));\n int forecastDistance = readIntAttribute(reader, \"String_Node_Str\");\n float nominalV = readFloatAttribute(reader, \"String_Node_Str\");\n float lowVoltageLimit = readOptionalFloatAttribute(reader, \"String_Node_Str\");\n float highVoltageLimit = readOptionalFloatAttribute(reader, \"String_Node_Str\");\n TopologyKind topologyKind = TopologyKind.valueOf(reader.getAttributeValue(null, \"String_Node_Str\"));\n return adder.setDate(date).setHorizon(horizon).setForecastDistance(forecastDistance).setNominalV(nominalV).setLowVoltageLimit(lowVoltageLimit).setHighVoltageLimit(highVoltageLimit).setTopologyKind(topologyKind).add();\n}\n"
|
"protected ListResult<ContactDTO> execute(CheckContactDuplication command, UserDispatch.UserExecutionContext context) throws CommandException {\n List<Contact> contacts = contactDAO.findContactsByEmailOrSimilarName(context.getUser().getOrganization().getId(), command.getContactId(), command.getEmail(), command.getFirstName(), command.getName());\n List<ContactDTO> contactDTOs = new ArrayList<>();\n for (Contact contact : contacts) {\n if (!contact.isDeleted() && contact.getContactModel().getId() == command.getContactModelDTO().getId()) {\n contactDTOs.add(mapper().map(contact, ContactDTO.class));\n }\n }\n return new ListResult<>(contactDTOs);\n}\n"
|
"private static String escapeStr(String s) {\n String s1 = s.replaceAll(\"String_Node_Str\", \"String_Node_Str\").replaceAll(\"String_Node_Str\", \"String_Node_Str\").replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n if (SYMBOLS_TO_WRAP.matcher(s1).find()) {\n s1 = \"String_Node_Str\".concat(s1).concat(\"String_Node_Str\");\n }\n return s1;\n}\n"
|
"public void endContainer(IContainerContent container) {\n _endContainer(container);\n}\n"
|
"public boolean checkAscension(Player player, double y1, double y2) {\n if (!isMovingExempt(player) && player.getLocation().getBlock().getType() != Material.WATER && player.getLocation().getBlock().getType() != Material.STATIONARY_WATER && !Utilities.isOnLadder(player) && !player.isInsideVehicle()) {\n String name = player.getName();\n if (y1 < y2) {\n increment(player, ascensionCount, ASCENSION_COUNT_MAX);\n if (ascensionCount.get(name) >= ASCENSION_COUNT_MAX) {\n return true;\n }\n } else {\n ascensionCount.put(name, 0);\n }\n }\n return false;\n}\n"
|
"public void setAutoJoin(boolean value) {\n autoJoin = value;\n if (!isPersistent())\n return;\n if (value) {\n ConfigurationManager.updateChatRoomProperty(getParentProvider().getProtocolProvider(), chatRoomID, AUTOJOIN_PROPERTY_NAME, Boolean.toString(autoJoin));\n } else {\n ConfigurationManager.updateChatRoomProperty(getParentProvider().getProtocolProvider(), chatRoomID, AUTOJOIN_PROPERTY_NAME, null);\n }\n}\n"
|
"public static boolean isUseData(final ElementParameterType param, final String name) {\n if (param == null || name == null) {\n return false;\n }\n if (param.getField().equals(EParameterFieldType.TABLE.getName())) {\n EList elementValue = param.getElementValue();\n if (elementValue != null) {\n for (ElementValueType valueType : (List<ElementValueType>) elementValue) {\n if (valueType.getValue() != null) {\n if (ParameterValueUtil.valueContains(valueType.getValue(), name)) {\n return true;\n }\n }\n }\n }\n } else {\n String value = param.getValue();\n if (value != null && ParameterValueUtil.valueContains(value, name)) {\n return true;\n }\n }\n return false;\n}\n"
|
"public void handleEvent(Object eventObject) {\n if (eventObject instanceof CacheInvalidationMessage) {\n CacheInvalidationMessage message = (CacheInvalidationMessage) eventObject;\n ClientMessage eventMessage = CacheAddInvalidationListenerCodec.encodeCacheInvalidationEvent(message.getName(), message.getKey(), message.getSourceUuid());\n sendClientMessage(message.getKey(), eventMessage);\n }\n}\n"
|
"private ComponentModifier retrieveComponentModifier(String className) {\n Log.d(TAG_DEX_SAMPLE, \"String_Node_Str\");\n ComponentModifier retComponentModifier = null;\n final String jarContainerPath = Environment.getExternalStorageDirectory().getAbsolutePath() + \"String_Node_Str\";\n File dexOutputDir = getDir(\"String_Node_Str\", MODE_PRIVATE);\n DexClassLoader mDexClassLoader = new DexClassLoader(jarContainerPath, dexOutputDir.getAbsolutePath(), null, getClass().getClassLoader());\n try {\n Class<?> loadedClass = mDexClassLoader.loadClass(className);\n retComponentModifier = (ComponentModifier) loadedClass.newInstance();\n } catch (ClassNotFoundException e) {\n Log.e(TAG_DEX_SAMPLE, \"String_Node_Str\");\n e.printStackTrace();\n } catch (InstantiationException e) {\n Log.e(TAG_DEX_SAMPLE, \"String_Node_Str\");\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n Log.e(TAG_DEX_SAMPLE, \"String_Node_Str\");\n e.printStackTrace();\n }\n if (retComponentModifier != null) {\n final String shortClassName = retComponentModifier.getClass().getSimpleName();\n Log.i(TAG_DEX_SAMPLE, \"String_Node_Str\" + shortClassName + \"String_Node_Str\" + jarContainerPath);\n toastHandler.post(new Runnable() {\n public void run() {\n Toast.makeText(DexClassSampleActivity.this, \"String_Node_Str\" + shortClassName + \"String_Node_Str\" + jarContainerPath, Toast.LENGTH_LONG).show();\n }\n });\n } else {\n toastHandler.post(new Runnable() {\n public void run() {\n Toast.makeText(DexClassSampleActivity.this, \"String_Node_Str\", Toast.LENGTH_SHORT).show();\n }\n });\n finish();\n }\n return retComponentModifier;\n}\n"
|
"private QueryHandle createFromSchemaProperty(DatasetSpecification spec, Id.DatasetInstance datasetID, Map<String, String> serdeProperties) throws ExploreException, SQLException, UnsupportedTypeException {\n String schemaStr = spec.getProperty(DatasetProperties.SCHEMA);\n if (schemaStr == null) {\n if (shouldErrorOnMissingSchema) {\n throw new IllegalArgumentException(String.format(\"String_Node_Str\", datasetID.getId(), DatasetProperties.SCHEMA));\n } else {\n return QueryHandle.NO_OP;\n }\n }\n try {\n Schema schema = Schema.parseJson(schemaStr);\n String createStatement = new CreateStatementBuilder(datasetID.getId(), getDatasetTableName(datasetID)).setSchema(schema).setTableComment(\"String_Node_Str\").buildWithStorageHandler(Constants.Explore.DATASET_STORAGE_HANDLER_CLASS, serdeProperties);\n return exploreService.execute(datasetID.getNamespace(), createStatement);\n } catch (IOException e) {\n throw new IllegalArgumentException(\"String_Node_Str\" + datasetID);\n }\n}\n"
|
"private String downloadContainerIntoFolder(String urlPath, File resOutputDir) {\n if (urlPath == null)\n return null;\n if (resOutputDir == null || !resOutputDir.exists())\n return null;\n if (!resOutputDir.isDirectory() || !resOutputDir.canRead() || !resOutputDir.canWrite())\n return null;\n URL url;\n try {\n url = new URL(urlPath);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n return null;\n }\n if (!url.getProtocol().equals(\"String_Node_Str\") && !url.getProtocol().equals(\"String_Node_Str\"))\n return null;\n int finalSeparatorIndex = url.getPath().lastIndexOf(\"String_Node_Str\");\n String containerName = url.getPath().substring(finalSeparatorIndex);\n if (containerName == null || containerName.isEmpty())\n return null;\n int extensionIndex = containerName.lastIndexOf(\"String_Node_Str\");\n String extension = containerName.substring(extensionIndex);\n if (!extension.equals(\"String_Node_Str\") && !extension.equals(\"String_Node_Str\"))\n return null;\n File checkFile = new File(resOutputDir.getAbsolutePath() + \"String_Node_Str\" + containerName);\n String finalContainerName;\n if (checkFile.exists()) {\n int currentIndex = 0;\n do {\n currentIndex++;\n finalContainerName = containerName.substring(0, extensionIndex) + currentIndex + extension;\n checkFile = new File(resOutputDir.getAbsolutePath() + \"String_Node_Str\" + finalContainerName);\n } while (checkFile.exists());\n } else {\n finalContainerName = containerName;\n }\n URLConnection urlConnection = null;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n String localContainerPath = resOutputDir.getAbsolutePath() + \"String_Node_Str\" + finalContainerName;\n activeNetworkInfo = mConnectivityManager.getActiveNetworkInfo();\n if (activeNetworkInfo != null && activeNetworkInfo.isConnected()) {\n try {\n if (url.getProtocol() != \"String_Node_Str\") {\n urlConnection = (HttpsURLConnection) url.openConnection();\n } else {\n urlConnection = (HttpURLConnection) url.openConnection();\n }\n urlConnection.connect();\n Log.i(TAG_SECURE_FACTORY, \"String_Node_Str\" + url.toString());\n inputStream = urlConnection.getInputStream();\n outputStream = new FileOutputStream(localContainerPath);\n int read = 0;\n byte[] bytes = new byte[1024];\n while ((read = inputStream.read(bytes)) != -1) {\n outputStream.write(bytes, 0, read);\n }\n Log.i(TAG_SECURE_FACTORY, \"String_Node_Str\" + localContainerPath);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } finally {\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (outputStream != null) {\n try {\n outputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (urlConnection != null)\n ((HttpURLConnection) urlConnection).disconnect();\n Log.i(TAG_SECURE_FACTORY, \"String_Node_Str\");\n }\n return localContainerPath;\n }\n Log.i(TAG_SECURE_FACTORY, \"String_Node_Str\");\n return null;\n}\n"
|
"public void startLoadedGame() {\n gameUIInit(false);\n processOnServer(new NullAction(NullAction.START_GAME));\n statusWindow.setGameActions();\n}\n"
|
"public CommonBTNode getExtentsOverflowNode(long nodeNumber) {\n ExtentsInitProcedure init = new ExtentsInitProcedure();\n long currentNodeNumber;\n if (nodeNumber < 0) {\n currentNodeNumber = init.bthr.getRootNodeNumber();\n else\n currentNodeNumber = nodeNumber;\n final int nodeSize = init.bthr.getNodeSize();\n byte[] currentNodeData = new byte[nodeSize];\n try {\n init.extentsFile.seek(currentNodeNumber * nodeSize);\n init.extentsFile.readFully(currentNodeData);\n } catch (RuntimeException e) {\n System.err.println(\"String_Node_Str\");\n System.err.println(\"String_Node_Str\" + nodeNumber);\n System.err.println(\"String_Node_Str\" + currentNodeNumber);\n System.err.println(\"String_Node_Str\" + nodeSize);\n System.err.println(\"String_Node_Str\" + init.extentsFile.length());\n System.err.println(\"String_Node_Str\" + (currentNodeNumber * nodeSize));\n throw e;\n }\n CommonBTNodeDescriptor nodeDescriptor = createCommonBTNodeDescriptor(currentNodeData, 0);\n if (nodeDescriptor.getNodeType() == NodeType.HEADER)\n return createCommonBTHeaderNode(currentNodeData, 0, nodeSize);\n if (nodeDescriptor.getNodeType() == NodeType.INDEX)\n return createCommonHFSExtentIndexNode(currentNodeData, 0, nodeSize);\n else if (nodeDescriptor.getNodeType() == NodeType.LEAF)\n return createCommonHFSExtentLeafNode(currentNodeData, 0, nodeSize);\n else\n return null;\n}\n"
|
"private String getStylePath(File cache, String styleResourceName) throws IOException {\n File style = new File(cache, styleResourceName);\n FileUtil.copy(XmlReportOutputter.class.getResourceAsStream(styleResourceName), style, null);\n return style;\n}\n"
|
"public void actionPerformed(final ActionEvent e) {\n final File file = fileList.getSelectedFile();\n if (file.isDirectory()) {\n updateCurrentFolder(file, UpdateSource.list);\n }\n}\n"
|
"public static byte[] outPointToBytes(OutPoint outPoint) {\n byte[] bytes = new byte[34];\n System.arraycopy(outPoint.txid.getBytes(), 0, bytes, 0, Sha256Hash.HASH_LENGTH);\n bytes[32] = (byte) (outPoint.index & 0xFF);\n bytes[33] = (byte) ((outPoint.index >> 8) & 0xFF);\n return bytes;\n}\n"
|
"private static SrlFgExampleBuilderPrm getSrlFgExampleBuilderPrm() {\n SrlFgExampleBuilderPrm prm = new SrlFgExampleBuilderPrm();\n prm.fgPrm.linkVarType = linkVarType;\n prm.fgPrm.makeUnknownPredRolesLatent = makeUnknownPredRolesLatent;\n prm.fgPrm.roleStructure = roleStructure;\n prm.fgPrm.useProjDepTreeFactor = useProjDepTreeFactor;\n prm.fgPrm.allowPredArgSelfLoops = allowPredArgSelfLoops;\n prm.fgPrm.unaryFactors = unaryFactors;\n prm.fgPrm.alwaysIncludeLinkVars = alwaysIncludeLinkVars;\n prm.fgPrm.predictSense = predictSense;\n prm.fePrm.biasOnly = biasOnly;\n prm.fePrm.useSimpleFeats = useSimpleFeats;\n prm.fePrm.useNaradFeats = useNaradFeats;\n prm.fePrm.useZhaoFeats = useZhaoFeats;\n prm.fePrm.useBjorkelundFeats = useBjorkelundFeats;\n prm.fePrm.useDepPathFeats = useDepPathFeats;\n prm.exPrm.featCountCutoff = featCountCutoff;\n prm.exPrm.cacheType = cacheType;\n prm.exPrm.gzipped = true;\n prm.exPrm.maxEntriesInMemory = maxEntriesInMemory;\n prm.srlFePrm.featureHashMod = featureHashMod;\n return prm;\n}\n"
|
"public boolean isCompatible(final Config config) {\n if (config == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (!this.groupConfig.getName().equals(config.getGroupConfig().getName())) {\n return false;\n }\n if (checkCompatibility) {\n checkMapConfigCompatible(config);\n checkQueueConfigCompatible(config);\n checkTopicConfigCompatible(config);\n }\n return true;\n}\n"
|
"public void onUpdate(AbstractBytes entry) {\n if (!canReplicate)\n throw new IllegalStateException(\"String_Node_Str\");\n final long keyLen = entry.readStopBit();\n final Bytes keyBytes = entry.createSlice(0, keyLen);\n entry.skip(keyLen);\n final long timeStamp = entry.readLong();\n final byte identifier = entry.readByte();\n final boolean isDeleted = entry.readBoolean();\n long hash = Hasher.hash(keyBytes);\n int segmentNum = hasher.getSegment(hash);\n int segmentHash = hasher.segmentHash(hash);\n if (isDeleted)\n segment(segmentNum).remoteRemove(keyBytes, segmentHash, timeStamp, identifier);\n else {\n long valueLen = entry.readStopBit();\n final Bytes value = entry.createSlice(0, valueLen);\n segment(segmentNum).replicatingPut(keyBytes, value, segmentHash, identifier, timeStamp);\n }\n}\n"
|
"public byte getPlayerIdAt(int x, int y) {\n return grid.getPlayerIdAt(x, y);\n}\n"
|
"public static OutputTreeNodeEditPart getParentLoopNodeEditPart(OutputTreeNodeEditPart nodePart) {\n if (nodePart != null && nodePart instanceof OutputTreeNodeEditPart) {\n OutputTreeNodeEditPart nodePartTemp = (OutputTreeNodeEditPart) nodePart;\n TreeNode model = (TreeNode) nodePartTemp.getModel();\n if (model.isLoop()) {\n return nodePartTemp;\n } else {\n if (nodePartTemp.getParent() != null && nodePartTemp.getParent() instanceof OutputTreeNodeEditPart) {\n return getParentLoopNodeEditPart((OutputTreeNodeEditPart) nodePartTemp.getParent());\n }\n }\n }\n return null;\n}\n"
|
"private double _doFunction(double in1, double in2) {\n double result;\n switch(_function) {\n case EXP:\n result = Math.exp(input1);\n break;\n case LOG:\n result = Math.log(in1);\n break;\n case SQUARE:\n result = in1 * in1;\n break;\n case SQRT:\n result = Math.sqrt(in1);\n break;\n case REMAINDER:\n result = in1 % in2;\n break;\n default:\n throw new InternalErrorException(\"String_Node_Str\" + \"String_Node_Str\" + getFullName() + \"String_Node_Str\");\n }\n return result;\n}\n"
|
"public void testGetChallenger() throws Exception {\n try {\n handler.getChallenger(QueueType.RANKED_SOLO_5x5).get(1, MINUTES);\n } catch (RequestException ex) {\n if (isNotServerside(ex))\n throw ex;\n }\n}\n"
|
"public Set<Area> overlaps(Area area) {\n DimensionConfig dim = get(area.start.dimension());\n if (dim != null) {\n return dim.areas.overlaps(area);\n }\n return new HashSet<Area>(0);\n}\n"
|
"public void setConfig(HttpRequest request, HttpResponder responder, String namespaceId, String stream) throws Exception {\n StreamId streamId = validateAndGetStreamId(namespaceId, stream);\n checkStreamExists(streamId);\n StreamProperties properties = getAndValidateConfig(request);\n streamAdmin.updateConfig(streamId, properties);\n responder.sendStatus(HttpResponseStatus.OK);\n}\n"
|
"private int find(int p) {\n if (p < 0 || p >= parent.length)\n throw new IllegalArgumentException(\"String_Node_Str\");\n if (p != parent[p])\n parent[p] = find(parent[p]);\n return parent[p];\n}\n"
|
"public boolean checkStatus(SwarmContext swarmContext) {\n LOGGER.info(\"String_Node_Str\");\n try {\n List<Object> driverStatus = swarmContext.getDockerClient().infoCmd().exec().getDriverStatuses();\n LOGGER.debug(\"String_Node_Str\");\n for (Object element : driverStatus) {\n try {\n List objects = (ArrayList) element;\n if (objects.get(0).toString().endsWith(\"String_Node_Str\") && Integer.valueOf(objects.get(1).toString()) == swarmContext.getNodeCount()) {\n return true;\n }\n } catch (Exception e) {\n LOGGER.error(String.format(\"String_Node_Str\", element), e);\n }\n }\n } catch (Throwable t) {\n return false;\n }\n return false;\n}\n"
|
"public final void parameters(final String[] par, final com.thevoxelbox.voxelsniper.SnipeData v) {\n for (int i = 0; i < par.length; i++) {\n final String parameter = par[i];\n if (parameter.equalsIgnoreCase(\"String_Node_Str\")) {\n v.sendMessage(TextColors.GOLD, \"String_Node_Str\");\n v.sendMessage(TextColors.AQUA, \"String_Node_Str\");\n v.sendMessage(TextColors.AQUA, \"String_Node_Str\");\n return;\n } else if (parameter.startsWith(\"String_Node_Str\")) {\n try {\n double val = Double.parseDouble(parameter.replace(\"String_Node_Str\", \"String_Node_Str\"));\n if (val <= 0) {\n v.sendMessage(TextColors.RED, \"String_Node_Str\");\n } else {\n this.xrad = val;\n v.sendMessage(TextColors.GREEN, \"String_Node_Str\" + this.xrad);\n }\n } catch (NumberFormatException e) {\n v.sendMessage(TextColors.RED, \"String_Node_Str\");\n }\n } else if (parameter.startsWith(\"String_Node_Str\")) {\n try {\n double val = Double.parseDouble(parameter.replace(\"String_Node_Str\", \"String_Node_Str\"));\n if (val <= 0) {\n v.sendMessage(TextColors.RED, \"String_Node_Str\");\n } else {\n this.yrad = val;\n v.sendMessage(TextColors.GREEN, \"String_Node_Str\" + this.yrad);\n }\n } catch (NumberFormatException e) {\n v.sendMessage(TextColors.RED, \"String_Node_Str\");\n }\n } else {\n v.sendMessage(TextColors.RED + \"String_Node_Str\");\n }\n }\n if (this.xrad <= 0) {\n this.xrad = v.getBrushSize();\n v.sendMessage(TextColors.GREEN, \"String_Node_Str\" + this.xrad);\n }\n if (this.yrad <= 0) {\n this.yrad = v.getBrushSize();\n v.sendMessage(TextColors.GREEN, \"String_Node_Str\" + this.yrad);\n }\n}\n"
|
"public boolean replaceEvent(GameEvent event, Ability source, Game game) {\n PreventionEffectData preventionData = preventDamageAction(event, source, game);\n this.used = true;\n this.discard();\n if (preventionData.getPreventedDamage() > 0) {\n UUID damageTarget = getTargetPointer().getFirst(game, source);\n Permanent permanent = game.getPermanent(damageTarget);\n if (permanent != null) {\n game.informPlayers(\"String_Node_Str\" + preventionData.getPreventedDamage() + \"String_Node_Str\" + permanent.getLogName());\n permanent.damage(preventionData.getPreventedDamage(), source.getSourceId(), game, false, true);\n }\n if (prevented > 0) {\n UUID damageTarget = source.getTargets().get(1).getFirstTarget();\n Permanent target = game.getPermanent(damageTarget);\n if (target != null) {\n game.informPlayers(\"String_Node_Str\" + prevented + \"String_Node_Str\" + target.getName());\n target.damage(prevented, source.getSourceId(), game, false, true);\n }\n Player player = game.getPlayer(damageTarget);\n if (player != null) {\n game.informPlayers(\"String_Node_Str\" + prevented + \"String_Node_Str\" + player.getLogName());\n player.damage(prevented, source.getSourceId(), game, true, false);\n }\n }\n }\n return false;\n}\n"
|
"protected synchronized TransactionOutputChanges connectTransactions(StoredBlock newBlock) throws VerificationException, BlockStoreException, PrunedException {\n checkState(lock.isHeldByCurrentThread());\n if (!params.passesCheckpoint(newBlock.getHeight(), newBlock.getHeader().getHash()))\n throw new VerificationException(\"String_Node_Str\" + newBlock.getHeight());\n blockStore.beginDatabaseBatchWrite();\n StoredUndoableBlock block = blockStore.getUndoBlock(newBlock.getHeader().getHash());\n if (block == null) {\n blockStore.abortDatabaseBatchWrite();\n throw new PrunedException(newBlock.getHeader().getHash());\n }\n TransactionOutputChanges txOutChanges;\n try {\n List<Transaction> transactions = block.getTransactions();\n if (transactions != null) {\n LinkedList<StoredTransactionOutput> txOutsSpent = new LinkedList<StoredTransactionOutput>();\n LinkedList<StoredTransactionOutput> txOutsCreated = new LinkedList<StoredTransactionOutput>();\n long sigOps = 0;\n final boolean enforcePayToScriptHash = newBlock.getHeader().getTimeSeconds() >= NetworkParameters.BIP16_ENFORCE_TIME;\n if (!params.isCheckpoint(newBlock.getHeight())) {\n for (Transaction tx : transactions) {\n Sha256Hash hash = tx.getHash();\n if (blockStore.hasUnspentOutputs(hash, tx.getOutputs().size()))\n throw new VerificationException(\"String_Node_Str\");\n }\n }\n BigInteger totalFees = BigInteger.ZERO;\n BigInteger coinbaseValue = null;\n if (scriptVerificationExecutor.isShutdown())\n scriptVerificationExecutor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());\n List<Future<VerificationException>> listScriptVerificationResults = new ArrayList<Future<VerificationException>>(transactions.size());\n for (final Transaction tx : transactions) {\n boolean isCoinBase = tx.isCoinBase();\n BigInteger valueIn = BigInteger.ZERO;\n BigInteger valueOut = BigInteger.ZERO;\n final List<Script> prevOutScripts = new LinkedList<Script>();\n if (!isCoinBase) {\n for (int index = 0; index < tx.getInputs().size(); index++) {\n final TransactionInput in = tx.getInputs().get(index);\n final StoredTransactionOutput prevOut = blockStore.getTransactionOutput(in.getOutpoint().getHash(), in.getOutpoint().getIndex());\n if (prevOut == null)\n throw new VerificationException(\"String_Node_Str\");\n if (newBlock.getHeight() - prevOut.getHeight() < params.getSpendableCoinbaseDepth())\n throw new VerificationException(\"String_Node_Str\" + (newBlock.getHeight() - prevOut.getHeight()));\n valueIn = valueIn.add(prevOut.getValue());\n if (enforcePayToScriptHash) {\n Script script = new Script(prevOut.getScriptBytes());\n if (script.isPayToScriptHash())\n sigOps += Script.getP2SHSigOpCount(in.getScriptBytes());\n if (sigOps > Block.MAX_BLOCK_SIGOPS)\n throw new VerificationException(\"String_Node_Str\");\n }\n prevOutScripts.add(new Script(prevOut.getScriptBytes()));\n blockStore.removeUnspentTransactionOutput(prevOut);\n txOutsSpent.add(prevOut);\n }\n }\n Sha256Hash hash = tx.getHash();\n for (TransactionOutput out : tx.getOutputs()) {\n valueOut = valueOut.add(out.getValue());\n StoredTransactionOutput newOut = new StoredTransactionOutput(hash, out.getIndex(), out.getValue(), newBlock.getHeight(), isCoinBase, out.getScriptBytes());\n blockStore.addUnspentTransactionOutput(newOut);\n txOutsCreated.add(newOut);\n }\n if (valueOut.compareTo(BigInteger.ZERO) < 0 || valueOut.compareTo(params.MAX_MONEY) > 0)\n throw new VerificationException(\"String_Node_Str\");\n if (isCoinBase) {\n coinbaseValue = valueOut;\n } else {\n if (valueIn.compareTo(valueOut) < 0 || valueIn.compareTo(params.MAX_MONEY) > 0)\n throw new VerificationException(\"String_Node_Str\");\n totalFees = totalFees.add(valueIn.subtract(valueOut));\n }\n if (!isCoinBase) {\n FutureTask<VerificationException> future = new FutureTask<VerificationException>(new Verifier(tx, prevOutScripts, enforcePayToScriptHash));\n scriptVerificationExecutor.execute(future);\n listScriptVerificationResults.add(future);\n }\n }\n if (totalFees.compareTo(params.MAX_MONEY) > 0 || newBlock.getHeader().getBlockInflation(newBlock.getHeight()).add(totalFees).compareTo(coinbaseValue) < 0)\n throw new VerificationException(\"String_Node_Str\");\n txOutChanges = new TransactionOutputChanges(txOutsCreated, txOutsSpent);\n for (Future<VerificationException> future : listScriptVerificationResults) {\n VerificationException e;\n try {\n e = future.get();\n } catch (InterruptedException thrownE) {\n throw new RuntimeException(thrownE);\n } catch (ExecutionException thrownE) {\n log.error(\"String_Node_Str\" + thrownE.getCause());\n throw new VerificationException(\"String_Node_Str\", thrownE);\n }\n if (e != null)\n throw e;\n }\n } else {\n txOutChanges = block.getTxOutChanges();\n if (!params.isCheckpoint(newBlock.getHeight()))\n for (StoredTransactionOutput out : txOutChanges.txOutsCreated) {\n Sha256Hash hash = out.getHash();\n if (blockStore.getTransactionOutput(hash, out.getIndex()) != null)\n throw new VerificationException(\"String_Node_Str\");\n }\n for (StoredTransactionOutput out : txOutChanges.txOutsCreated) blockStore.addUnspentTransactionOutput(out);\n for (StoredTransactionOutput out : txOutChanges.txOutsSpent) blockStore.removeUnspentTransactionOutput(out);\n }\n } catch (VerificationException e) {\n scriptVerificationExecutor.shutdownNow();\n blockStore.abortDatabaseBatchWrite();\n throw e;\n } catch (BlockStoreException e) {\n scriptVerificationExecutor.shutdownNow();\n blockStore.abortDatabaseBatchWrite();\n throw e;\n }\n return txOutChanges;\n}\n"
|
"public static String getCurrentVersion(RepositoryNode repositoryNode) {\n try {\n if (repositoryNode.getObject() != null && !repositoryNode.getObject().getRepositoryObjectType().equals(ERepositoryObjectType.FOLDER)) {\n return ProxyRepositoryFactory.getInstance().getLastVersion(repositoryNode.getId()).getVersion();\n }\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n }\n return \"String_Node_Str\";\n}\n"
|
"public void validate(UIFormInput uiInput) throws Exception {\n if (uiInput.getValue() == null || ((String) uiInput.getValue()).trim().length() == 0)\n return;\n UIComponent uiComponent = (UIComponent) uiInput;\n UIForm uiForm = uiComponent.getAncestorOfType(UIForm.class);\n String label;\n try {\n label = uiForm.getLabel(uiInput.getName());\n } catch (Exception e) {\n label = uiInput.getName();\n label = label.trim();\n if (label.charAt(label.length() - 1) == ':')\n label = label.substring(0, label.length() - 1);\n String s = (String) uiInput.getValue();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (Character.isLetter(c) || Character.isDigit(c) || c == '_' || c == '-' || Character.isSpaceChar(c)) {\n continue;\n }\n Object[] args = { label, uiInput.getBindingField() };\n throw new MessageException(new ApplicationMessage(\"String_Node_Str\", args, ApplicationMessage.WARNING));\n }\n}\n"
|
"public boolean varEquals(Operand operand) {\n if (this instanceof Register && operand instanceof Register)\n return this.physicalRegister() != null && this.physicalRegister() == operand.physicalRegister();\n if (operand instanceof Memory)\n return varEquals(((Memory) operand).baseReg()) || varEquals(((Memory) operand).indexReg());\n return this == operand;\n}\n"
|
"protected ThucydidesListeners getThucydidesListeners() {\n if (thucydidesListenersThreadLocal.get() == null) {\n ThucydidesListeners listeners = ThucydidesReports.setupListeners(systemConfiguration);\n thucydidesListenersThreadLocal.set(listeners);\n synchronized (baseStepListeners) {\n baseStepListeners.add(listeners.getBaseStepListener());\n }\n System.out.println(\"String_Node_Str\");\n }\n return thucydidesListenersThreadLocal.get();\n}\n"
|
"protected void outputImg(Element ele, HashMap cssStyles, IContent content) {\n String src = ele.getAttribute(\"String_Node_Str\");\n if (src != null) {\n IImageContent image = new ImageContent(content);\n addChild(content, image);\n handleStyle(ele, cssStyles, image);\n if (!FileUtil.isLocalResource(src)) {\n image.setImageSource(IImageContent.IMAGE_URL);\n image.setURI(src);\n } else {\n ReportDesignHandle handle = content.getReportContent().getDesign().getReportDesign();\n URL url = handle.findResource(src, IResourceLocator.IMAGE);\n if (url != null) {\n src = url.getFile();\n }\n image.setImageSource(IImageContent.IMAGE_FILE);\n image.setURI(src);\n }\n if (null != ele.getAttribute(\"String_Node_Str\") && !\"String_Node_Str\".equals(ele.getAttribute(\"String_Node_Str\"))) {\n image.setWidth(DimensionType.parserUnit(ele.getAttribute(\"String_Node_Str\")));\n }\n if (ele.getAttribute(\"String_Node_Str\") != null && !\"String_Node_Str\".equals(ele.getAttribute(\"String_Node_Str\"))) {\n image.setWidth(DimensionType.parserUnit(ele.getAttribute(\"String_Node_Str\")));\n }\n if (ele.getAttribute(\"String_Node_Str\") != null && !\"String_Node_Str\".equals(ele.getAttribute(\"String_Node_Str\"))) {\n image.setAltText(ele.getAttribute(\"String_Node_Str\"));\n }\n }\n}\n"
|
"protected void init() throws BirtException {\n if (PropertyUtil.isInlineElement(image)) {\n root = new ImageInlineContainer(parent, context, image);\n } else {\n root = new ImageBlockContainer(parent, context, image);\n }\n root.initialize();\n root.setAllocatedWidth(parent.getMaxAvaWidth());\n root.setMaxAvaWidth(root.getContentWidth());\n Dimension contentDimension = getSpecifiedDimension(image, root.getContentWidth(), true);\n ImageArea imageArea = createImageArea(image);\n int maxHeight = root.getMaxAvaHeight();\n int maxWidth = root.getMaxAvaWidth();\n int cHeight = contentDimension.getHeight();\n int cWidth = contentDimension.getWidth();\n int actualHeight = cHeight;\n int actualWidth = cWidth;\n if (cHeight > maxHeight || cWidth > maxWidth) {\n if (fitToContainer) {\n float rh = ((float) maxHeight) / cHeight;\n float rw = ((float) maxWidth) / cWidth;\n if (rh > rw) {\n actualHeight = (int) ((float) cHeight * maxWidth / cWidth);\n actualWidth = maxWidth;\n } else {\n actualHeight = maxHeight;\n actualWidth = (int) ((float) cWidth * maxHeight / cHeight);\n }\n imageArea.setWidth(actualWidth);\n imageArea.setHeight(actualHeight);\n root.setContentWidth(imageArea.getWidth());\n root.setContentHeight(imageArea.getHeight());\n } else {\n if (context.getPageOverflow() == IPDFRenderOption.FIT_TO_PAGE_SIZE || context.getPageOverflow() == IPDFRenderOption.ENLARGE_PAGE_SIZE) {\n imageArea.setWidth(actualWidth);\n imageArea.setHeight(actualHeight);\n root.setContentHeight(actualHeight);\n root.setContentWidth(actualWidth);\n } else {\n imageArea.setWidth(actualWidth);\n imageArea.setHeight(actualHeight);\n root.setNeedClip(true);\n root.setAllocatedHeight(Math.min(maxHeight, cHeight));\n root.setAllocatedWidth(Math.min(maxWidth, cWidth));\n }\n }\n } else {\n imageArea.setWidth(actualWidth);\n imageArea.setHeight(actualHeight);\n root.setContentWidth(imageArea.getWidth());\n root.setContentHeight(imageArea.getHeight());\n }\n root.addChild(imageArea);\n imageArea.setPosition(root.getContentX(), root.getContentY());\n processChartLegend(image, imageArea);\n root.finished = false;\n}\n"
|
"public String toString() {\n String someText = this.text;\n int length = someText.length();\n if (someText.length() > 32) {\n someText = someText.substring(0, 29) + \"String_Node_Str\";\n }\n return this.getNodeName() + \"String_Node_Str\" + length + \"String_Node_Str\" + someText + \"String_Node_Str\";\n}\n"
|
"public void testRegisterService() throws Exception {\n final IRemoteServiceContainerAdapter[] adapters = getRemoteServiceAdapters();\n final IRemoteServiceRegistration reg = registerService(adapters[0], IConcatService.class.getName(), createService(), 1500);\n assertNotNull(reg);\n assertNotNull(reg.getContainerID());\n}\n"
|
"protected Do<?> visitOverrideForDo(InteractionSeq<?> parent, Do<?> child) throws ScribbleException {\n if (!isCycle()) {\n JobContext jc = getJobContext();\n ModuleContext mc = getModuleContext();\n ProtocolDecl<? extends ProtocolKind> pd = child.getTargetProtocolDecl(jc, mc);\n ScribNode seq = applySubstitutions(pd.def.block.seq.clone());\n seq = seq.accept(this);\n pushEnv(popEnv().setTranslation(((InlineProtocolEnv) seq.del().env()).getTranslation()));\n return child;\n }\n return (child instanceof GDo) ? ((GDoDel) child.del()).visitForSubprotocolInlining(this, (GDo) child) : ((LDoDel) child.del()).visitForSubprotocolInlining(this, (LDo) child);\n}\n"
|
"public void writeBody(PrintWriter out) throws IOException {\n out.print(\"String_Node_Str\");\n super.writeBody(out);\n out.println(\"String_Node_Str\");\n out.println(\"String_Node_Str\");\n out.println(\"String_Node_Str\");\n out.println(\"String_Node_Str\");\n out.println(\"String_Node_Str\");\n out.println(\"String_Node_Str\" + relativeLinkToTop + \"String_Node_Str\");\n out.println(\"String_Node_Str\");\n}\n"
|
"public void actionPerformed(ActionEvent e) {\n if (e.getSource() == reconnectBox) {\n HTTPReconnect.setEnabled(reconnectBox.getSelectedObjects() != null);\n ExternReconnect.setEnabled(reconnectBox.getSelectedObjects() != null);\n JDUtilities.getConfiguration().setProperty(Configuration.PARAM_DISABLE_RECONNECT, reconnectBox.getSelectedObjects() != null);\n fireUIEvent(new UIEvent(this, UIEvent.UI_SAVE_CONFIG));\n return;\n }\n switch(e.getID()) {\n case JDAction.ITEMS_MOVE_UP:\n case JDAction.ITEMS_MOVE_DOWN:\n case JDAction.ITEMS_MOVE_TOP:\n case JDAction.ITEMS_MOVE_BOTTOM:\n tabDownloadTable.moveSelectedItems(e.getID());\n break;\n case JDAction.APP_PAUSE_DOWNLOADS:\n fireUIEvent(new UIEvent(this, UIEvent.UI_PAUSE_DOWNLOADS, btnPause.isSelected()));\n break;\n case JDAction.APP_TESTER:\n logger.finer(\"String_Node_Str\");\n Interaction.handleInteraction(Interaction.INTERACTION_TESTTRIGGER, false);\n break;\n case JDAction.APP_START_STOP_DOWNLOADS:\n this.startStopDownloads();\n break;\n case JDAction.APP_SAVE_DLC:\n JFileChooser fc = new JFileChooser();\n fc.setFileFilter(new JDFileFilter(null, \"String_Node_Str\", true));\n fc.showSaveDialog(frame);\n File ret = fc.getSelectedFile();\n if (JDUtilities.getFileExtension(ret) == null || !JDUtilities.getFileExtension(ret).equalsIgnoreCase(\"String_Node_Str\")) {\n ret = new File(ret.getAbsolutePath() + \"String_Node_Str\");\n }\n if (ret != null) {\n fireUIEvent(new UIEvent(this, UIEvent.UI_SAVE_LINKS, ret));\n }\n break;\n case JDAction.APP_LOAD_DLC:\n fc = new JFileChooser();\n fc.setFileFilter(new JDFileFilter(null, \"String_Node_Str\", true));\n fc.showOpenDialog(frame);\n ret = fc.getSelectedFile();\n if (ret != null) {\n fireUIEvent(new UIEvent(this, UIEvent.UI_LOAD_LINKS, ret));\n }\n break;\n case JDAction.APP_LOAD_CONTAINER:\n fc = new JFileChooser();\n fc.showOpenDialog(frame);\n File file = fc.getSelectedFile();\n if (file != null && file.exists()) {\n fireUIEvent(new UIEvent(this, UIEvent.UI_LOAD_CONTAINER, file));\n }\n break;\n case JDAction.APP_EXIT:\n frame.setVisible(false);\n frame.dispose();\n fireUIEvent(new UIEvent(this, UIEvent.UI_EXIT));\n break;\n case JDAction.APP_LOG:\n logDialog.setVisible(!logDialog.isVisible());\n menViewLog.setSelected(!logDialog.isVisible());\n break;\n case JDAction.APP_RECONNECT:\n this.doReconnect();\n break;\n case JDAction.APP_UPDATE:\n fireUIEvent(new UIEvent(this, UIEvent.UI_INTERACT_UPDATE));\n break;\n case JDAction.ITEMS_REMOVE:\n if (!JDUtilities.getConfiguration().getBooleanProperty(Configuration.PARAM_DISABLE_CONFIRM_DIALOGS, false)) {\n if (this.showConfirmDialog(\"String_Node_Str\")) {\n tabDownloadTable.removeSelectedLinks();\n fireUIEvent(new UIEvent(this, UIEvent.UI_LINKS_CHANGED, this.getDownloadLinks()));\n }\n } else {\n tabDownloadTable.removeSelectedLinks();\n fireUIEvent(new UIEvent(this, UIEvent.UI_LINKS_CHANGED, null));\n }\n break;\n case JDAction.ITEMS_DND:\n this.toggleDnD();\n break;\n case JDAction.ITEMS_ADD:\n Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();\n String cb = \"String_Node_Str\";\n try {\n cb = (String) clipboard.getData(DataFlavor.stringFlavor);\n } catch (UnsupportedFlavorException e1) {\n } catch (IOException e1) {\n }\n String data = JOptionPane.showInputDialog(frame, \"String_Node_Str\", cb);\n if (data != null) {\n fireUIEvent(new UIEvent(this, UIEvent.UI_LINKS_TO_PROCESS, data));\n }\n break;\n case JDAction.APP_SEARCH:\n SearchDialog s = new SearchDialog(this.getFrame());\n data = s.getText();\n if (!data.endsWith(\"String_Node_Str\")) {\n logger.info(data);\n if (data != null) {\n fireUIEvent(new UIEvent(this, UIEvent.UI_LINKS_TO_PROCESS, data));\n }\n }\n break;\n case JDAction.APP_CONFIGURATION:\n boolean configChanged = ConfigurationDialog.showConfig(frame, this);\n if (configChanged)\n fireUIEvent(new UIEvent(this, UIEvent.UI_SAVE_CONFIG));\n break;\n }\n}\n"
|
"public void pick(Pick pick) {\n leftToolTip.pick(pick);\n onLinePicked(pick, true);\n }\n });\n final IPickingListener rightToolTip = context.getSWTLayer().createTooltip(new IPickingLabelProvider() {\n public String getLabel(Pick pick) {\n return HistogramElement.this.getLabel(pick, false);\n}\n"
|
"public File getStoreFile(String path) {\n if (path.startsWith(\"String_Node_Str\")) {\n return new File(path);\n } else {\n String basePath = settings.recorderBasePath();\n return new File(basePath + \"String_Node_Str\" + path);\n }\n}\n"
|
"protected void postSubmit() throws Exception {\n compareResultsByLinesInMemoryWithStrictOrder(this.sortedRecords, this.resultPath);\n}\n"
|
"public final Object getObject(int column) throws SqlException {\n switch(jdbcTypes_[column - 1]) {\n case java.sql.Types.BOOLEAN:\n return new Boolean(get_BOOLEAN(column));\n case java.sql.Types.SMALLINT:\n return new Integer(get_SMALLINT(column));\n case java.sql.Types.INTEGER:\n return new Integer(get_INTEGER(column));\n case java.sql.Types.BIGINT:\n return new Long(get_BIGINT(column));\n case java.sql.Types.REAL:\n return new Float(get_FLOAT(column));\n case java.sql.Types.DOUBLE:\n return new Double(get_DOUBLE(column));\n case java.sql.Types.DECIMAL:\n return get_DECIMAL(column);\n case java.sql.Types.DATE:\n return getDATE(column, getRecyclableCalendar());\n case java.sql.Types.TIME:\n return getTIME(column, getRecyclableCalendar());\n case java.sql.Types.TIMESTAMP:\n return getTIMESTAMP(column, getRecyclableCalendar());\n case java.sql.Types.CHAR:\n return getCHAR(column);\n case java.sql.Types.VARCHAR:\n case java.sql.Types.LONGVARCHAR:\n return getVARCHAR(column);\n case Types.BINARY:\n return get_CHAR_FOR_BIT_DATA(column);\n case java.sql.Types.VARBINARY:\n case java.sql.Types.LONGVARBINARY:\n return get_VARCHAR_FOR_BIT_DATA(column);\n case java.sql.Types.JAVA_OBJECT:\n return get_UDT(column);\n case java.sql.Types.BLOB:\n return getBlobColumn_(column, agent_, true);\n case java.sql.Types.CLOB:\n return getClobColumn_(column, agent_, true);\n default:\n throw coercionError(\"String_Node_Str\", column);\n }\n}\n"
|
"public void createSalesforceModuleWizard(RepositoryNode node, final boolean forceReadOnly) {\n SalesforceSchemaConnection connection = null;\n MetadataTable metadataTable = null;\n boolean creation = false;\n if (node.getType() == ENodeType.REPOSITORY_ELEMENT) {\n ERepositoryObjectType nodeType = (ERepositoryObjectType) node.getProperties(EProperties.CONTENT_TYPE);\n String tableLabel = (String) node.getProperties(EProperties.LABEL);\n SalesforceSchemaConnectionItem item = null;\n if (nodeType == ERepositoryObjectType.METADATA_CON_TABLE) {\n item = (SalesforceSchemaConnectionItem) node.getParent().getObject().getProperty().getItem();\n connection = (SalesforceSchemaConnection) item.getConnection();\n metadataTable = TableHelper.findByLabel(connection, tableLabel);\n creation = false;\n } else if (nodeType == ERepositoryObjectType.METADATA_SALESFORCE_SCHEMA) {\n item = (SalesforceSchemaConnectionItem) node.getObject().getProperty().getItem();\n connection = (SalesforceSchemaConnection) item.getConnection();\n metadataTable = ConnectionFactory.eINSTANCE.createMetadataTable();\n String nextId = ProxyRepositoryFactory.getInstance().getNextId();\n metadataTable.setId(nextId);\n metadataTable.setLabel(getStringIndexed(metadataTable.getLabel()));\n creation = false;\n } else if (nodeType == ERepositoryObjectType.METADATA_SALESFORCE_MODULE) {\n item = (SalesforceSchemaConnectionItem) node.getObject().getProperty().getItem();\n connection = (SalesforceSchemaConnection) item.getConnection();\n metadataTable = ConnectionFactory.eINSTANCE.createMetadataTable();\n String nextId = ProxyRepositoryFactory.getInstance().getNextId();\n metadataTable.setId(nextId);\n metadataTable.setLabel(getStringIndexed(metadataTable.getLabel()));\n creation = false;\n } else {\n return;\n }\n initContextMode(item);\n SalesforceModulesWizard salesforceSchemaWizard = new SalesforceModulesWizard(PlatformUI.getWorkbench(), creation, node.getObject(), metadataTable, getExistingNames(), forceReadOnly, null, null);\n WizardDialog wizardDialog = new WizardDialog(Display.getCurrent().getActiveShell(), salesforceSchemaWizard);\n handleWizard(node, wizardDialog);\n }\n}\n"
|
"public boolean tryAdvance(Consumer<? super DataOnMemory<T>> action) {\n if (!advance)\n return false;\n final HoldingConsumer<T> holder = new HoldingConsumer<>();\n final DataOnMemoryListContainer<T> container = new DataOnMemoryListContainer(dataStream.getAttributes());\n if (tailInstance == null) {\n if (spliterator.tryAdvance(holder)) {\n tailInstance = holder.value;\n container.add(tailInstance);\n } else {\n return false;\n }\n } else {\n container.add(tailInstance);\n }\n int count = 0;\n while (count < this.batchSize && advance) {\n while ((advance = spliterator.tryAdvance(holder)) && getSequenceID(holder.value) == getSequenceID(tailInstance)) {\n tailInstance = holder.value;\n container.add(tailInstance);\n }\n ;\n tailInstance = holder.value;\n container.add(tailInstance);\n }\n ;\n tailInstance = holder.value;\n if (est != Long.MAX_VALUE)\n est -= container.getNumberOfDataInstances();\n if (container.getNumberOfDataInstances() > 0) {\n action.accept(container);\n return true;\n } else {\n return false;\n }\n}\n"
|
"public void testGetShortcuts() {\n setCaller(CALLING_PACKAGE_1);\n final ShortcutInfo s1_1 = makeShortcutWithTimestamp(\"String_Node_Str\", 5000);\n final ShortcutInfo s1_2 = makeShortcutWithTimestamp(\"String_Node_Str\", 1000);\n assertTrue(mManager.setDynamicShortcuts(list(s1_1, s1_2)));\n setCaller(CALLING_PACKAGE_2);\n final ShortcutInfo s2_2 = makeShortcutWithTimestamp(\"String_Node_Str\", 1500);\n final ShortcutInfo s2_3 = makeShortcutWithTimestampWithActivity(\"String_Node_Str\", 3000, makeComponent(ShortcutActivity2.class));\n final ShortcutInfo s2_4 = makeShortcutWithTimestampWithActivity(\"String_Node_Str\", 500, makeComponent(ShortcutActivity.class));\n assertTrue(mManager.setDynamicShortcuts(list(s2_2, s2_3, s2_4)));\n setCaller(CALLING_PACKAGE_3);\n final ShortcutInfo s3_2 = makeShortcutWithTimestamp(\"String_Node_Str\", START_TIME + 5000);\n assertTrue(mManager.setDynamicShortcuts(list(s3_2)));\n setCaller(LAUNCHER_1);\n assertAllDynamic(assertAllHaveTitle(assertAllNotHaveIntents(assertShortcutIds(assertAllNotKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(0, CALLING_PACKAGE_1, null, ShortcutQuery.FLAG_GET_DYNAMIC), getCallingUser())), \"String_Node_Str\", \"String_Node_Str\"))));\n assertShortcutIds(mLauncherApps.getShortcuts(buildQuery(0, CALLING_PACKAGE_1, null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser()));\n assertAllDynamic(assertAllHaveTitle(assertAllNotHaveIntents(assertShortcutIds(assertAllNotKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(1000, CALLING_PACKAGE_2, null, ShortcutQuery.FLAG_GET_PINNED | ShortcutQuery.FLAG_GET_DYNAMIC), getCallingUser())), \"String_Node_Str\", \"String_Node_Str\"))));\n assertAllDynamic(assertAllNotHaveTitle(assertAllNotHaveIntents(assertShortcutIds(assertAllKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(1000, CALLING_PACKAGE_2, null, ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_KEY_FIELDS_ONLY), getCallingUser())), \"String_Node_Str\", \"String_Node_Str\"))));\n assertAllDynamic(assertAllNotHaveTitle(assertAllNotHaveIntents(assertShortcutIds(assertAllKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(1000, CALLING_PACKAGE_2, list(\"String_Node_Str\"), null, ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_KEY_FIELDS_ONLY), getCallingUser())), \"String_Node_Str\"))));\n assertAllDynamic(assertAllNotHaveTitle(assertAllNotHaveIntents(assertShortcutIds(assertAllKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(1000, CALLING_PACKAGE_2, list(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), null, ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_KEY_FIELDS_ONLY), getCallingUser())), \"String_Node_Str\", \"String_Node_Str\"))));\n assertAllDynamic(assertAllNotHaveTitle(assertAllNotHaveIntents(assertShortcutIds(assertAllKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(1000, CALLING_PACKAGE_2, list(\"String_Node_Str\", \"String_Node_Str\"), null, ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_KEY_FIELDS_ONLY), getCallingUser()))))));\n assertAllDynamic(assertAllNotHaveTitle(assertAllNotHaveIntents(assertShortcutIds(assertAllKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(1000, CALLING_PACKAGE_2, list(), null, ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_KEY_FIELDS_ONLY), getCallingUser()))))));\n mLauncherApps.pinShortcuts(CALLING_PACKAGE_2, list(\"String_Node_Str\", \"String_Node_Str\"), getCallingUser());\n assertAllPinned(assertAllHaveTitle(assertAllNotHaveIntents(assertShortcutIds(assertAllNotKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(1000, CALLING_PACKAGE_2, null, ShortcutQuery.FLAG_GET_PINNED), getCallingUser())), \"String_Node_Str\"))));\n assertShortcutIds(assertAllNotKeyFieldsOnly(mLauncherApps.getShortcuts(buildQuery(5000, null, null, ShortcutQuery.FLAG_GET_DYNAMIC | ShortcutQuery.FLAG_GET_PINNED), getCallingUser())), \"String_Node_Str\", \"String_Node_Str\");\n assertExpectException(IllegalArgumentException.class, \"String_Node_Str\", () -> {\n mLauncherApps.getShortcuts(buildQuery(0, null, list(\"String_Node_Str\"), null, 0), getCallingUser());\n });\n}\n"
|
"Chunk getChunk() {\n Chunk chunk = reclaimedChunks.poll();\n if (chunk != null) {\n chunk.reset();\n reusedChunkCount.incrementAndGet();\n } else {\n while (true) {\n long created = this.chunkCount.get();\n if (created < this.maxCount) {\n if (this.chunkCount.compareAndSet(created, created + 1)) {\n chunk = createChunk(true, CompactingMemStore.IndexType.ARRAY_MAP);\n break;\n }\n } else {\n break;\n }\n }\n }\n return chunk;\n}\n"
|
"LocalMapStatsImpl getLocalMapStats() {\n LocalMapStatsImpl localMapStats = new LocalMapStatsImpl();\n long now = System.currentTimeMillis();\n int ownedEntryCount = 0;\n int backupEntryCount = 0;\n int markedAsRemovedEntryCount = 0;\n int ownedEntryMemoryCost = 0;\n int backupEntryMemoryCost = 0;\n int markedAsRemovedMemoryCost = 0;\n int hits = 0;\n int lockedEntryCount = 0;\n int lockWaitCount = 0;\n ClusterImpl clusterImpl = node.getClusterImpl();\n final Collection<Record> records = mapRecords.values();\n final PartitionServiceImpl partitionService = concurrentMapManager.partitionManager.partitionServiceImpl;\n for (Record record : records) {\n if (!record.isActive() || !record.isValid(now)) {\n markedAsRemovedEntryCount++;\n markedAsRemovedMemoryCost += record.getCost();\n } else {\n PartitionServiceImpl.PartitionProxy partition = partitionService.getPartition(record.getBlockId());\n Member owner = partition.getOwner();\n if (owner != null && !partition.isMigrating()) {\n boolean owned = owner.localMember();\n if (owned) {\n ownedEntryCount += record.valueCount();\n ownedEntryMemoryCost += record.getCost();\n localMapStats.setLastAccessTime(record.getLastAccessTime());\n localMapStats.setLastUpdateTime(record.getLastUpdateTime());\n hits += record.getHits();\n if (record.isLocked()) {\n lockedEntryCount++;\n lockWaitCount += record.getScheduledActionCount();\n }\n } else {\n Member ownerEventual = partition.getEventualOwner();\n boolean backup = false;\n if (ownerEventual != null && !owner.localMember()) {\n int distance = node.getClusterImpl().getDistanceFrom(ownerEventual, true);\n backup = (distance != -1 && distance <= getBackupCount());\n }\n if (backup && !shouldPurgeRecord(record, now)) {\n backupEntryCount += record.valueCount();\n backupEntryMemoryCost += record.getCost();\n } else {\n markedAsRemovedEntryCount++;\n markedAsRemovedMemoryCost += record.getCost();\n }\n }\n }\n }\n }\n localMapStats.setMarkedAsRemovedEntryCount(zeroOrPositive(markedAsRemovedEntryCount));\n localMapStats.setMarkedAsRemovedMemoryCost(zeroOrPositive(markedAsRemovedMemoryCost));\n localMapStats.setLockWaitCount(zeroOrPositive(lockWaitCount));\n localMapStats.setLockedEntryCount(zeroOrPositive(lockedEntryCount));\n localMapStats.setHits(zeroOrPositive(hits));\n localMapStats.setOwnedEntryCount(zeroOrPositive(ownedEntryCount));\n localMapStats.setBackupEntryCount(zeroOrPositive(backupEntryCount));\n localMapStats.setOwnedEntryMemoryCost(zeroOrPositive(ownedEntryMemoryCost));\n localMapStats.setBackupEntryMemoryCost(zeroOrPositive(backupEntryMemoryCost));\n localMapStats.setLastEvictionTime(zeroOrPositive(clusterImpl.getClusterTimeFor(lastEvictionTime)));\n localMapStats.setCreationTime(zeroOrPositive(clusterImpl.getClusterTimeFor(creationTime)));\n return localMapStats;\n}\n"
|
"private String getKeyName(KeyEvent e) {\n String text = KeyEvent.getKeyText(e.getKeyCode());\n if (text == null || text.length() != 1) {\n switch(e.getKeyCode()) {\n case KeyEvent.VK_LEFT:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_RIGHT:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_DOWN:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_UP:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_PAUSE:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_F1:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_F2:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_F3:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_F4:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_F5:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_F6:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_F7:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_F8:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_F9:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_F10:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_F11:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_F12:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_PLUS:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_MINUS:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_DELETE:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_SPACE:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_ESCAPE:\n text = \"String_Node_Str\";\n break;\n case KeyEvent.VK_BACK_SPACE:\n text = \"String_Node_Str\";\n break;\n default:\n text = \"String_Node_Str\" + e.getKeyChar();\n }\n }\n return text;\n}\n"
|
"public void testParseNetworkErrorRequeue() throws VolleyError {\n when(requeuePolicy.shouldRequeue(any(NetworkResponse.class))).thenReturn(Boolean.TRUE);\n final RetryPolicy retryPolicy = mock(RetryPolicy.class);\n when(request.getRetryPolicy()).thenReturn(retryPolicy);\n final RequestQueue queue = mock(RequestQueue.class);\n decorator.setRequestQueue(queue);\n final VolleyError error = mock(VolleyError.class);\n decorator.parseNetworkError(error);\n verify(retryPolicy).retry(any(VolleyError.class));\n final ArgumentCaptor<Listener> listener = ArgumentCaptor.forClass(Listener.class);\n final ArgumentCaptor<ErrorListener> errorListener = ArgumentCaptor.forClass(ErrorListener.class);\n verify(requeuePolicy).executeBeforeRequeueing(listener.capture(), errorListener.capture());\n errorListener.getValue().onErrorResponse(error);\n verify(queue, never()).add(decorator);\n listener.getValue().onResponse(new Object());\n verify(queue).add(decorator);\n}\n"
|
"public static StreamProcessorExtensionHolder getInstance(ExecutionPlanContext executionPlanContext) {\n ConcurrentHashMap<Class, AbstractExtensionHolder> extensionHolderMap = executionPlanContext.getSiddhiContext().getExtensionHolderMap();\n AbstractExtensionHolder abstractExtensionHolder = extensionHolderMap.get(clazz);\n if (abstractExtensionHolder == null) {\n abstractExtensionHolder = new StreamProcessorExtensionHolder(executionPlanContext);\n extensionHolderMap.putIfAbsent(clazz, abstractExtensionHolder);\n }\n return instance;\n}\n"
|
"public void delete(Object entity, Object pKey) {\n Session s = getStatefulSession();\n Transaction tx = s.beginTransaction();\n s.delete(entity);\n tx.commit();\n s.close();\n EntityMetadata metadata = KunderaMetadataManager.getEntityMetadata(entity.getClass());\n if (!MetadataUtils.useSecondryIndex(getPersistenceUnit())) {\n getIndexManager().remove(metadata, entity, pKey.toString());\n }\n}\n"
|
"private void triggerAccessViolation(String reason) {\n if (DEBUG)\n log(\"String_Node_Str\" + reason + \"String_Node_Str\" + Utils.hex16(cpu.readRegister(MSP430.PC)));\n statusreg |= ACCVIFG;\n if (cpu.getSFR().isIEBitsSet(SFR.IE1, ACCVIE)) {\n cpu.flagInterrupt(NMI_VECTOR, this, true);\n }\n}\n"
|
"public List<Permanent> getAvailableManaProducersWithCost(Game game) {\n List<Permanent> result = new ArrayList<>();\n for (Permanent permanent : game.getBattlefield().getAllActivePermanents(playerId)) {\n for (ManaAbility ability : permanent.getAbilities().getManaAbilities(Zone.BATTLEFIELD)) {\n if (canUse == null) {\n canUse = permanent.canUseActivatedAbilities(game);\n }\n if (canUse && ability.canActivate(playerId, game) && !ability.getManaCosts().isEmpty()) {\n result.add(permanent);\n break;\n }\n }\n }\n return result;\n}\n"
|
"public void mouseClicked(MouseEvent e) {\n if (e.getClickCount() == 2) {\n if (constantTypeList.getSelectedIndex() == 7) {\n int rowIndex = constantTable.getSelectedRow();\n if (rowIndex == -1) {\n return;\n }\n int multinameIndex = constantTable.convertRowIndexToModel(rowIndex);\n if (multinameIndex > 0) {\n UsageFrame usageFrame = new UsageFrame(t.swf.abcList, abc, multinameIndex, t);\n usageFrame.setVisible(true);\n }\n }\n }\n}\n"
|
"public void endTransaction() {\n ActivityUnit au = _activityUnit.get();\n if (LOG.isLoggable(Level.FINEST)) {\n LOG.finest(\"String_Node_Str\");\n }\n}\n"
|
"public void drawInfo(Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) {\n flame.draw(minecraft, 1, 0);\n minecraft.fontRenderer.drawString(smeltCountString, 24, 8, Color.gray.getRGB());\n minecraft.fontRenderer.drawString(burnTimeString, 24, 18, Color.gray.getRGB());\n}\n"
|
"protected void internalTransform(String phase, Map<String, String> options) {\n int size;\n do {\n size = vulnerabilities.size();\n for (Analyser analyser : analysers) {\n analyser.analyse();\n }\n } while (size != vulnerabilities.size());\n}\n"
|
"boolean isValidWith(SourceChecker checker) throws IOException {\n return !primary.valueEquals(overwritten) && !checker.checkEquality(primary.source(), overwritten.source());\n}\n"
|
"static java.sql.Date parseSqlDate(final String value) {\n try {\n return new java.sql.Date(getSqlDateFormat().parse(value).getTime());\n } catch (ParseException e) {\n return throwRuntimeParseException(value, e, sqlDateFormat);\n }\n}\n"
|
"private void pushPropInfo(String elementName) {\n ProcessingInfo parentPI = peek(processingStack);\n if ((elementName != null) && (parentPI != null) && (parentPI.lastUnderlyingPI != null) && (elementName.equals(parentPI.lastUnderlyingPI.elementName))) {\n processingStack.add(new ProcessingInfo(parentPI.lastUnderlyingPI));\n return;\n }\n final XMLSerializer xs = XMLSerializer.getInstance();\n final Property cp = (xs == null) ? null : xs.getCurrentProperty();\n final RuntimePropertyInfo ri = (cp == null) ? null : cp.getInfo();\n final Type rt = (ri == null) ? null : ri.getRawType();\n final String dn = (ri == null) ? null : ri.getName();\n if (null == rt) {\n if (writingAttr) {\n processingStack.add(new ProcessingInfo(elementName, ri, false, null));\n return;\n } else {\n processingStack.add(new ProcessingInfo(elementName, ri, false, null));\n return;\n }\n }\n if (primitiveTypes.contains(rt)) {\n processingStack.add(new ProcessingInfo(elementName, ri, false, rt));\n return;\n }\n if (ri.isCollection() && !isWildcardElement(ri)) {\n if (!((parentPI != null) && (parentPI.isArray) && (parentPI.rpi == ri))) {\n processingStack.add(new ProcessingInfo(elementName, ri, true, rt));\n return;\n }\n }\n processingStack.add(new ProcessingInfo(elementName, ri, false, rt));\n return;\n}\n"
|
"public ChannelPipeline getPipeline() throws Exception {\n final ChannelPipeline pipeline = Channels.pipeline();\n for (Map.Entry<String, ChannelHandler> e : Handlers.channelMonitors(TimeUnit.SECONDS, StackConfiguration.CLIENT_INTERNAL_TIMEOUT_SECS).entrySet()) {\n pipeline.addLast(e.getKey(), e.getValue());\n }\n pipeline.addLast(\"String_Node_Str\", Handlers.newHttpResponseDecoder());\n pipeline.addLast(\"String_Node_Str\", Handlers.newHttpChunkAggregator());\n pipeline.addLast(\"String_Node_Str\", Handlers.httpRequestEncoder());\n pipeline.addLast(\"String_Node_Str\", Handlers.soapMarshalling());\n pipeline.addLast(\"String_Node_Str\", InternalClientPipeline.wssecHandler);\n pipeline.addLast(\"String_Node_Str\", Handlers.addressingHandler());\n pipeline.addLast(\"String_Node_Str\", Handlers.soapHandler());\n pipeline.addLast(\"String_Node_Str\", Handlers.bindingHandler());\n return pipeline;\n}\n"
|
"private void createErrorsList(Composite top) {\n Group errorGroup = new Group(top, SWT.NONE);\n errorGroup.setLayout(new GridLayout());\n errorGroup.setText(\"String_Node_Str\");\n GridData gridData = new GridData(GridData.FILL_HORIZONTAL);\n gridData.heightHint = 150;\n errorGroup.setLayoutData(gridData);\n removeInvalidBTN = new Button(errorGroup, SWT.CHECK);\n removeInvalidBTN.setText(\"String_Node_Str\");\n errorsList = new TableViewer(errorGroup, SWT.BORDER);\n errorsList.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));\n errorsList.setContentProvider(new IStructuredContentProvider() {\n public void dispose() {\n }\n public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {\n }\n public Object[] getElements(Object inputElement) {\n return errors.toArray();\n }\n });\n errorsList.setLabelProvider(new LabelProvider() {\n public String getText(Object element) {\n return element.toString();\n }\n public Image getImage(Object element) {\n return ImageLib.getImage(ImageLib.ICON_ERROR_INFO);\n }\n });\n errorsList.setInput(this);\n errorsList.setSorter(new ViewerSorter());\n}\n"
|
"public int getTag() {\n return 2009120141;\n}\n"
|
"public void onClick(ClickEvent event) {\n Integer start = getStart() - MAXIMUM_ITEMS;\n if (start < 0)\n start = 0;\n setStart(start);\n ElementReceiver.get().queryPage();\n}\n"
|
"public void onLogout(HttpServletRequest request, HttpServletResponse response, SSOToken ssoToken) throws AuthenticationException {\n try {\n final String ssOutEnabled = ssoToken.getProperty(SAML2Constants.SINGLE_LOGOUT);\n if (Boolean.parseBoolean(ssOutEnabled)) {\n final XUIState xuiState = InjectorHolder.getInstance(XUIState.class);\n final StringBuilder logoutLocation = new StringBuilder();\n logoutLocation.append(ssoToken.getProperty(SLO_SESSION_LOCATION));\n if (xuiState.isXUIEnabled()) {\n logoutLocation.append(ESAPI.encoder().encodeForURL(ssoToken.getProperty(SLO_SESSION_REFERENCE)));\n } else {\n logoutLocation.append(ssoToken.getProperty(SLO_SESSION_REFERENCE));\n }\n request.setAttribute(AMPostAuthProcessInterface.POST_PROCESS_LOGOUT_URL, logoutLocation.toString());\n }\n } catch (EncodingException | SSOException e) {\n DEBUG.warning(\"String_Node_Str\");\n }\n}\n"
|
"public boolean finalizeCommandsOnStart(Commands cmds, VirtualMachineProfile<DomainRouterVO> profile) {\n DomainRouterVO router = profile.getVirtualMachine();\n NicProfile controlNic = null;\n for (NicProfile nic : profile.getNics()) {\n if (nic.getTrafficType() == TrafficType.Control && nic.getIp4Address() != null) {\n controlNic = nic;\n }\n }\n if (controlNic == null) {\n s_logger.error(\"String_Node_Str\" + router);\n return false;\n }\n cmds.addCommand(\"String_Node_Str\", new CheckSshCommand(profile.getInstanceName(), controlNic.getIp4Address(), 3922, 5, 20));\n boolean restartNetwork = true;\n if (profile.getParameter(Param.RestartNetwork) != null && (Boolean) profile.getParameter(Param.RestartNetwork) == false) {\n restartNetwork = false;\n }\n if (router.getRole() == VirtualRouter.Role.DHCP_FIREWALL_LB_PASSWD_USERDATA && restartNetwork) {\n s_logger.debug(\"String_Node_Str\");\n long networkId = router.getNetworkId();\n long ownerId = router.getAccountId();\n long zoneId = router.getDataCenterId();\n final List<IPAddressVO> userIps = _networkMgr.listPublicIpAddressesInVirtualNetwork(ownerId, zoneId, null, null);\n List<PublicIpAddress> publicIps = new ArrayList<PublicIpAddress>();\n if (userIps != null && !userIps.isEmpty()) {\n for (IPAddressVO userIp : userIps) {\n PublicIp publicIp = new PublicIp(userIp, _vlanDao.findById(userIp.getVlanId()), NetUtils.createSequenceBasedMacAddress(userIp.getMacAddress()));\n publicIps.add(publicIp);\n }\n }\n s_logger.debug(\"String_Node_Str\" + publicIps.size() + \"String_Node_Str\" + router + \"String_Node_Str\");\n if (!publicIps.isEmpty()) {\n createAssociateIPCommands(router, publicIps, cmds, 0);\n List<RemoteAccessVpn> vpns = new ArrayList<RemoteAccessVpn>();\n List<PortForwardingRule> pfRules = new ArrayList<PortForwardingRule>();\n List<FirewallRule> staticNatFirewallRules = new ArrayList<FirewallRule>();\n for (PublicIpAddress ip : publicIps) {\n pfRules.addAll(_pfRulesDao.listForApplication(ip.getId()));\n staticNatFirewallRules.addAll(_rulesDao.listByIpAndPurpose(ip.getId(), Purpose.StaticNat));\n RemoteAccessVpn vpn = _vpnDao.findById(ip.getId());\n if (vpn != null) {\n vpns.add(vpn);\n }\n }\n s_logger.debug(\"String_Node_Str\" + pfRules.size() + \"String_Node_Str\" + router + \"String_Node_Str\");\n if (!pfRules.isEmpty()) {\n createApplyPortForwardingRulesCommands(pfRules, router, cmds);\n }\n s_logger.debug(\"String_Node_Str\" + staticNatFirewallRules.size() + \"String_Node_Str\" + router + \"String_Node_Str\");\n if (!staticNatFirewallRules.isEmpty()) {\n List<StaticNatRule> staticNatRules = new ArrayList<StaticNatRule>();\n for (FirewallRule rule : staticNatFirewallRules) {\n staticNatRules.add(_rulesMgr.buildStaticNatRule(rule));\n }\n createApplyStaticNatRulesCommands(staticNatRules, router, cmds);\n }\n s_logger.debug(\"String_Node_Str\" + vpns.size() + \"String_Node_Str\" + router + \"String_Node_Str\");\n if (!vpns.isEmpty()) {\n for (RemoteAccessVpn vpn : vpns) {\n createApplyVpnCommands(vpn, router, cmds);\n }\n }\n List<LoadBalancerVO> lbs = _loadBalancerDao.listByNetworkId(networkId);\n List<LoadBalancingRule> lbRules = new ArrayList<LoadBalancingRule>();\n for (LoadBalancerVO lb : lbs) {\n List<LbDestination> dstList = _lbMgr.getExistingDestinations(lb.getId());\n LoadBalancingRule loadBalancing = new LoadBalancingRule(lb, dstList);\n lbRules.add(loadBalancing);\n }\n s_logger.debug(\"String_Node_Str\" + lbRules.size() + \"String_Node_Str\" + router + \"String_Node_Str\");\n if (!lbRules.isEmpty()) {\n createApplyLoadBalancingRulesCommands(lbRules, router, cmds);\n }\n }\n }\n s_logger.debug(\"String_Node_Str\" + router + \"String_Node_Str\");\n createDhcpEntriesCommands(router, cmds);\n s_logger.debug(\"String_Node_Str\" + router + \"String_Node_Str\");\n createVmDataCommands(router, cmds);\n cmds.addCommand(\"String_Node_Str\", new NetworkUsageCommand(controlNic.getIp4Address(), router.getName(), \"String_Node_Str\"));\n return true;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.