content stringlengths 40 137k |
|---|
"public void testPackage(String pkg) throws IOException {\n File dir;\n try {\n dir = cabalUnpack(pkg);\n } catch (ExecutionError e) {\n String msg = e.getCause() == null ? \"String_Node_Str\" : e.getCause().getMessage();\n System.out.println(\"String_Node_Str\" + pkg + \"String_Node_Str\" + \"String_Node_Str\" + msg);\n return;\n }\n testFiles(dir, pkg);\n logResult(pkg);\n addAllFailures(fileTester.getFailures());\n addOks(fileTester.getOkCount());\n addOkFails(fileTester.getOkFailCount());\n addNoParses(fileTester.getNoParseCount());\n addAmbInfix(fileTester.getAmbInfixCount());\n addTimeout(fileTester.getTimeout());\n addComparisonFailures(fileTester.getComparisonFailures());\n fileTester.reset();\n}\n"
|
"public void changed(Database.ChangeEvent event) {\n List<DocumentChange> changes = event.getChanges();\n for (DocumentChange change : changes) {\n RevisionInternal rev = change.getAddedRevision();\n assertNotNull(rev);\n assertNotNull(rev.getDocId());\n assertNotNull(rev.getRevId());\n assertEquals(rev.getDocId(), rev.getProperties().get(\"String_Node_Str\"));\n assertEquals(rev.getRevId(), rev.getProperties().get(\"String_Node_Str\"));\n }\n}\n"
|
"public void onEvent(SoarEvent event) {\n inputReady = false;\n}\n"
|
"public void setUp() throws MojoExecutionException, MojoFailureException {\n if (locales == null || locales.length == 0) {\n locales = new String[] { \"String_Node_Str\" };\n }\n if (sourcePaths == null) {\n sourcePaths = MavenUtils.getSourcePaths(build);\n if (mergeResourceBundle != null && mergeResourceBundle) {\n List<File> paths = new ArrayList<File>(Arrays.asList(sourcePaths));\n for (String locale : locales) {\n File localeResourcePath = MavenUtils.getLocaleResourcePath(resourceBundlePath, locale);\n paths.add(localeResourcePath);\n }\n sourcePaths = paths.toArray(new File[paths.size()]);\n }\n }\n if (outputFile == null) {\n if (output == null) {\n outputFile = new File(build.getDirectory(), build.getFinalName() + \"String_Node_Str\" + project.getPackaging());\n } else {\n outputFile = new File(build.getDirectory(), output);\n }\n }\n if (configFile == null) {\n List<Resource> resources = build.getResources();\n for (Resource resource : resources) {\n File cfg = new File(resource.getDirectory(), \"String_Node_Str\");\n if (cfg.exists()) {\n configFile = cfg;\n break;\n }\n }\n }\n if (configFile == null) {\n getLog().debug(\"String_Node_Str\");\n configFile = MavenUtils.getConfigFile(build);\n }\n if (!configFile.exists()) {\n throw new MojoExecutionException(\"String_Node_Str\" + configFile);\n } else {\n getLog().info(\"String_Node_Str\" + configFile);\n }\n if (services == null) {\n List<Resource> resources = build.getResources();\n for (Resource resource : resources) {\n File cfg = new File(resource.getDirectory(), \"String_Node_Str\");\n if (cfg.exists()) {\n services = cfg;\n break;\n }\n }\n }\n if (rslUrls == null) {\n rslUrls = new String[] { \"String_Node_Str\" };\n }\n if (policyFileUrls == null) {\n policyFileUrls = new String[] { \"String_Node_Str\" };\n }\n if (metadata == null) {\n metadata = new Metadata();\n if (project.getContributors() != null && !project.getContributors().isEmpty()) {\n List<Contributor> contributors = project.getContributors();\n for (Contributor c : contributors) {\n metadata.addContributor(c.getName());\n }\n metadata.addCreator(contributors.get(0).getName());\n }\n metadata.setDate(DateFormat.getDateInstance().format(new Date()));\n metadata.setDescription(project.getDescription());\n metadata.setLanguages(Arrays.asList(locales));\n metadata.setTitle(project.getName());\n }\n configuration = builder.getDefaultConfiguration();\n configure();\n compilationData = new File(build.getDirectory(), project.getArtifactId() + \"String_Node_Str\" + project.getVersion() + \"String_Node_Str\");\n}\n"
|
"public void deleteObjects(long schemaOid, ArrayList<PersistenceCapableImpl> objects) {\n PagedPosIndex oi = schemaIndex.getSchema(schemaOid).getObjectIndex();\n for (PersistenceCapableImpl co : objects) {\n long oid = co.jdoZooGetOid();\n long pos = oidIndex.removeOidNoFail(oid, -1);\n if (pos == -1) {\n throw new JDOObjectNotFoundException(\"String_Node_Str\" + Util.oidToString(oid));\n }\n do {\n long nextPos = oi.removePosLongAndCheck(pos, freeIndex);\n nextPos = nextPos | PagedPosIndex.MARK_SECONDARY;\n pos = nextPos;\n } while (pos != PagedPosIndex.MARK_SECONDARY);\n }\n ZooClassDef clsDef = schemaIndex.getSchema(schemaOid).getClassDef();\n for (ZooFieldDef field : clsDef.getAllFields()) {\n if (!field.isIndexed()) {\n continue;\n }\n SchemaIndexEntry schemaTop = schemaIndex.getSchema(field.getDeclaringType().getOid());\n LongLongIndex fieldInd = (LongLongIndex) schemaTop.getIndex(field);\n try {\n Field jField = field.getJavaField();\n if (field.isString()) {\n for (PersistenceCapableImpl co : objects) {\n String str = (String) jField.get(co);\n long l = (str != null ? BitTools.toSortableLong(str) : DataDeSerializerNoClass.NULL);\n fieldInd.removeLong(l, co.jdoZooGetOid());\n }\n } else {\n switch(field.getPrimitiveType()) {\n case BOOLEAN:\n for (PersistenceCapableImpl co : objects) {\n fieldInd.removeLong(jField.getBoolean(co) ? 1 : 0, co.jdoZooGetOid());\n }\n break;\n case BYTE:\n for (PersistenceCapableImpl co : objects) {\n fieldInd.removeLong(jField.getByte(co), co.jdoZooGetOid());\n }\n break;\n case DOUBLE:\n System.out.println(\"String_Node_Str\");\n break;\n case FLOAT:\n System.out.println(\"String_Node_Str\");\n break;\n case INT:\n for (PersistenceCapableImpl co : objects) {\n fieldInd.removeLong(jField.getInt(co), co.jdoZooGetOid());\n }\n break;\n case LONG:\n for (PersistenceCapableImpl co : objects) {\n fieldInd.removeLong(jField.getLong(co), co.jdoZooGetOid());\n }\n break;\n case SHORT:\n for (PersistenceCapableImpl co : objects) {\n fieldInd.removeLong(jField.getShort(co), co.jdoZooGetOid());\n }\n break;\n default:\n throw new IllegalArgumentException(\"String_Node_Str\" + field.getPrimitiveType());\n }\n }\n } catch (SecurityException e) {\n throw new JDOFatalDataStoreException(\"String_Node_Str\" + field.getName(), e);\n } catch (IllegalArgumentException e) {\n throw new JDOFatalDataStoreException(\"String_Node_Str\" + field.getName(), e);\n } catch (IllegalAccessException e) {\n throw new JDOFatalDataStoreException(\"String_Node_Str\" + field.getName(), e);\n }\n }\n}\n"
|
"private void copyResponse(String response, JSONObject internalResp) {\n try {\n if (internalResp != null) {\n if (response != null) {\n logger.fine(\"String_Node_Str\");\n JSONObject respObj = (JSONObject) JSONSerializer.toJSON(response);\n internalResp.accumulateAll((Map) respObj);\n } else {\n logger.fine(\"String_Node_Str\");\n }\n } else {\n logger.fine(\"String_Node_Str\");\n }\n } catch (Exception e) {\n logger.log(Level.WARNING, \"String_Node_Str\", e);\n }\n}\n"
|
"public void finished() throws Throwable {\n if (state == FINISHED)\n return;\n if (state != STARTED)\n throw new IllegalStateException(\"String_Node_Str\" + state);\n state = FINISHED;\n Throwable lastThrownException = null;\n if (beforeStepsWereExecuted) {\n for (StageState stage : reverse(newArrayList(stages.values()))) {\n try {\n executeAnnotatedMethods(stage.instance, AfterScenario.class);\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n lastThrownException = e;\n }\n }\n }\n for (Object rule : Lists.reverse(scenarioRules)) {\n try {\n invokeRuleMethod(rule, \"String_Node_Str\");\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n lastThrownException = e;\n }\n }\n if (lastThrownException != null) {\n throw lastThrownException;\n }\n}\n"
|
"public void setUp() {\n MockitoAnnotations.initMocks(this);\n factory = new AttributeDataProxyFactory(proxyProvider, null, attributeTypeCache);\n}\n"
|
"private void updateModelCollaborators(CountDownLatch latch, String repoId) {\n if (model.getRepoId().generateId().equals(repoId)) {\n List<User> collaborators = collaboratorUpdateService.getUpdatedItems(RepositoryId.createFromId(repoId));\n if (collaborators.size() > 0) {\n model.updateCollabsETag(collaboratorUpdateService.getUpdatedETag());\n model.updateCachedCollaborators(latch, collaborators, repoId);\n } else {\n logger.info(\"String_Node_Str\");\n latch.countDown();\n HTStatusBar.addProgress(0.25);\n }\n }\n}\n"
|
"public List<CubeInstance> listAllCubes(String project) {\n project = ProjectInstance.getNormalizedProjectName(project);\n HashSet<CubeInstance> ret = new HashSet<CubeInstance>();\n for (String cubeName : projectInstance.getCubes()) {\n CubeInstance cube = CubeManager.getInstance(config).getCube(cubeName);\n if (null != cube) {\n ret.add(cube);\n } else {\n logger.error(\"String_Node_Str\" + cubeName);\n }\n }\n return new ArrayList<CubeInstance>(ret);\n}\n"
|
"private void incrementTagCounters(String tag, String weight) {\n if (tag == null || weight == null) {\n log.warn(\"String_Node_Str\" + tag + \"String_Node_Str\" + weight);\n return;\n }\n double dWeight = 1;\n if (weight.length() != 0) {\n dWeight = NumberFormatUtils.getDouble(weight, 1);\n }\n long weightLong = (long) (dWeight * Constants.EVAL_COUNTER_WEIGHT_SCALE);\n if (isPigEnabled(Constants.SHIFU_GROUP_COUNTER, Constants.COUNTER_RECORDS)) {\n PigStatusReporter.getInstance().getCounter(Constants.SHIFU_GROUP_COUNTER, Constants.COUNTER_RECORDS).increment(1);\n }\n if (posTagSet.contains(tag)) {\n if (isPigEnabled(Constants.SHIFU_GROUP_COUNTER, Constants.COUNTER_POSTAGS)) {\n PigStatusReporter.getInstance().getCounter(Constants.SHIFU_GROUP_COUNTER, Constants.COUNTER_POSTAGS).increment(1);\n }\n if (isPigEnabled(Constants.SHIFU_GROUP_COUNTER, Constants.COUNTER_WPOSTAGS)) {\n PigStatusReporter.getInstance().getCounter(Constants.SHIFU_GROUP_COUNTER, Constants.COUNTER_WPOSTAGS).increment(weightLong);\n }\n }\n if (negTagSet.contains(tag)) {\n if (isPigEnabled(Constants.SHIFU_GROUP_COUNTER, Constants.COUNTER_NEGTAGS)) {\n PigStatusReporter.getInstance().getCounter(Constants.SHIFU_GROUP_COUNTER, Constants.COUNTER_NEGTAGS).increment(1);\n }\n if (isPigEnabled(Constants.SHIFU_GROUP_COUNTER, Constants.COUNTER_WNEGTAGS)) {\n PigStatusReporter.getInstance().getCounter(Constants.SHIFU_GROUP_COUNTER, Constants.COUNTER_WNEGTAGS).increment(weightLong);\n }\n }\n}\n"
|
"protected Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buffer, StateEnum stateEnumValue) throws Exception {\n if (stateEnumValue != null) {\n try {\n State state = stateEnumValue.getState();\n LOG.debug(\"String_Node_Str\" + state + ']');\n state.onEntry(buffer, this);\n StateReturnValue returnValue = state.execute(buffer, this);\n LOG.debug(\"String_Node_Str\" + state + \"String_Node_Str\" + returnValue + \"String_Node_Str\");\n StateEnum nextState = state.onExit(buffer, this, returnValue.getDecisionInformation());\n LOG.debug(\"String_Node_Str\" + nextState + \"String_Node_Str\");\n if (nextState != null) {\n checkpoint(nextState);\n } else {\n reset();\n }\n if (returnValue.isRelevant()) {\n return returnValue.getValue();\n }\n } catch (DecodingException e) {\n reset();\n throw e;\n }\n }\n return null;\n}\n"
|
"public static String createTempFile(String contents) throws IOException {\n File f = File.createTempFile(FILE_PREFIX, FILE_SUFFIX);\n f.deleteOnExit();\n BufferedWriter out = new BufferedWriter(new FileWriter(f));\n try {\n out.write(contents);\n } finally {\n out.close();\n }\n return f.toURI().toString();\n}\n"
|
"public void watch(GameEvent event, Game game) {\n if (event.getType() == GameEvent.EventType.LAND_PLAYED) {\n Permanent permanent = game.getPermanentOrLKIBattlefield(event.getTargetId());\n if (permanent != null && permanent.isLand() && !playerPlayedLand.contains(event.getPlayerId())) {\n playerPlayedLand.add(event.getPlayerId());\n }\n }\n}\n"
|
"boolean cancelAllNotificationsInt(int callingUid, int callingPid, String pkg, int mustHaveFlags, int mustNotHaveFlags, boolean doit, int userId, int reason, ManagedServiceInfo listener) {\n String listenerName = listener == null ? null : listener.component.toShortString();\n EventLogTags.writeNotificationCancelAll(callingUid, callingPid, pkg, userId, mustHaveFlags, mustNotHaveFlags, reason, listenerName);\n synchronized (mNotificationList) {\n final int N = mNotificationList.size();\n ArrayList<NotificationRecord> canceledNotifications = null;\n for (int i = N - 1; i >= 0; --i) {\n NotificationRecord r = mNotificationList.get(i);\n if (!notificationMatchesUserId(r, userId)) {\n continue;\n }\n if (r.getUserId() == UserHandle.USER_ALL && pkg == null) {\n continue;\n }\n if ((r.getFlags() & mustHaveFlags) != mustHaveFlags) {\n continue;\n }\n if ((r.getFlags() & mustNotHaveFlags) != 0) {\n continue;\n }\n if (pkg != null && !r.sbn.getPackageName().equals(pkg)) {\n continue;\n }\n if (canceledNotifications == null) {\n canceledNotifications = new ArrayList<>();\n }\n canceledNotifications.add(r);\n if (!doit) {\n return true;\n }\n mNotificationList.remove(i);\n cancelNotificationLocked(r, false, reason);\n }\n if (doit && canceledNotifications != null) {\n final int M = canceledNotifications.size();\n for (int i = 0; i < M; i++) {\n cancelGroupChildrenLocked(canceledNotifications.get(i), callingUid, callingPid, listenerName, REASON_GROUP_SUMMARY_CANCELED, false);\n }\n }\n if (canceledNotifications != null) {\n updateLightsLocked();\n }\n return canceledNotifications != null;\n }\n}\n"
|
"Group lookupResidue(String chainId, String seqId) {\n try {\n Chain chain = structure.getChainByPDB(chainId);\n if (null != chain) {\n try {\n ResidueNumber resNum = null;\n if (Character.isAlphabetic(seqId.charAt(seqId.length() - 1))) {\n resNum = new ResidueNumber(chainId, Integer.parseInt(seqId.substring(0, seqId.length() - 1)), seqId.charAt(seqId.length() - 1));\n } else {\n resNum = new ResidueNumber(chainId, Integer.parseInt(seqId), ' ');\n }\n return chain.getGroupByPDB(resNum);\n } catch (NumberFormatException e) {\n logger.warn(\"String_Node_Str\" + chainId + seqId);\n }\n }\n } catch (StructureException e) {\n logger.warn(\"String_Node_Str\" + chainId + seqId + \"String_Node_Str\" + e.getMessage(), e.getMessage());\n }\n return null;\n}\n"
|
"static public String wktGeometryFixer(String wktGeometry) {\n String regex = \"String_Node_Str\";\n String[] geometryArray = wktGeometry.split(regex);\n StringBuilder fixedGeometry = new StringBuilder();\n String regex = \"String_Node_Str\";\n String[] ga = wktGeometry.split(regex, 2);\n if (ga.length > 1) {\n String geometryType = ga[0].trim().toLowerCase();\n if (geometryType.equals(\"String_Node_Str\")) {\n String[] points = ga[1].split(\"String_Node_Str\");\n if (points.length == 4) {\n fixedGeometry.append(\"String_Node_Str\");\n fixedGeometry.append(points[0]).append(\"String_Node_Str\").append(points[1]).append(\"String_Node_Str\");\n fixedGeometry.append(points[2]).append(\"String_Node_Str\").append(points[1]).append(\"String_Node_Str\");\n fixedGeometry.append(points[2]).append(\"String_Node_Str\").append(points[3]).append(\"String_Node_Str\");\n fixedGeometry.append(points[0]).append(\"String_Node_Str\").append(points[3]).append(\"String_Node_Str\");\n fixedGeometry.append(points[0]).append(\"String_Node_Str\").append(points[1]);\n fixedGeometry.append(\"String_Node_Str\");\n return fixedGeometry.toString();\n }\n } else {\n int parenthesesCount = 0;\n for (int i = 1; i < geometryArray.length; i++) {\n String tmpGeom = geometryArray[i];\n if (!tmpGeom.isEmpty() && !tmpGeom.equals(\"String_Node_Str\")) {\n if (fixedGeometry.length() > 0) {\n fixedGeometry.append(\"String_Node_Str\");\n }\n StringBuilder tmpFixed = new StringBuilder(parsePoints(geometryArray[i], geometryType));\n for (int j = 0; j < parenthesesCount; j++) {\n tmpFixed = new StringBuilder(\"String_Node_Str\" + tmpFixed + \"String_Node_Str\");\n }\n fixedGeometry.append(tmpFixed);\n }\n if (tmpGeom.isEmpty() && fixedGeometry.length() == 0) {\n parenthesesCount++;\n }\n }\n }\n }\n if (!geometryType.isEmpty() && fixedGeometry.length() != 0) {\n return geometryType + \"String_Node_Str\" + fixedGeometry + \"String_Node_Str\";\n }\n return wktGeometry;\n}\n"
|
"public void run() {\n try {\n TreeParent xobject = (TreeParent) selection;\n serverObject = xobject.getServerRoot();\n if (xobject == null)\n return;\n String server = (String) xobject.getServerRoot().getWsKey();\n ObjectRetriever retriever = new ObjectRetriever((TreeParent) xobject, server, serverObject.getUsername(), serverObject.getPassword(), serverObject.getUser().getUniverse());\n retriever.run(new NullProgressMonitor());\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n}\n"
|
"public Map<String, String> getFidMappings(String tableName) throws SQLException {\n String fidTable = tableName + \"String_Node_Str\";\n Map<String, String> mappings = new HashMap<String, String>();\n try (Statement st = cx.createStatement()) {\n try (ResultSet rs = st.executeQuery(sql)) {\n while (rs.next()) {\n String gpkg_fid = rs.getString(1);\n String geogig_fid = rs.getString(2);\n mappings.put(gpkg_fid, geogig_fid);\n }\n }\n }\n return mappings;\n}\n"
|
"private void checkRead() throws IOException {\n if (columnsStore == null || current == total) {\n if (columnsStore != null) {\n long timeAssembling = System.currentTimeMillis() - startedReadingCurrentBlockAt;\n totalTimeSpentProcessingRecords += timeAssembling;\n LOG.info(\"String_Node_Str\" + currentBlockRecordCount + \"String_Node_Str\" + timeAssembling + \"String_Node_Str\" + ((float) currentBlockRecordCount / timeAssembling) + \"String_Node_Str\");\n long totalTime = totalTimeSpentProcessingRecords + totalTimeSpentReadingBytes;\n long percentReading = 100 * totalTimeSpentReadingBytes / totalTime;\n long percentProcessing = 100 * totalTimeSpentProcessingRecords / totalTime;\n LOG.info(\"String_Node_Str\" + percentReading + \"String_Node_Str\" + totalTimeSpentReadingBytes + \"String_Node_Str\" + percentProcessing + \"String_Node_Str\" + totalTimeSpentProcessingRecords + \"String_Node_Str\");\n }\n final MemPageStore memPageStore = new MemPageStore();\n columnsStore = new MemColumnsStore(0, memPageStore, 8 * 1024);\n LOG.info(\"String_Node_Str\");\n long t0 = System.currentTimeMillis();\n long count = reader.readColumns(new PageConsumer() {\n public void consumePage(String[] path, int valueCount, InputStream is, int pageSize) {\n PageWriter pageWriter = memPageStore.getPageWriter(requestedSchema.getColumnDescription(path));\n pageWriter.writePage(BytesInput.from(is, pageSize), valueCount);\n }\n });\n if (count == 0) {\n return;\n }\n long timeSpentReading = System.currentTimeMillis() - t0;\n totalTimeSpentReadingBytes += timeSpentReading;\n LOG.info(\"String_Node_Str\" + timeSpentReading + \"String_Node_Str\" + count);\n MessageColumnIO columnIO = columnIOFactory.getColumnIO(requestedSchema);\n recordReader = columnIO.getRecordReader(columnsStore, readSupport.newRecordConsumer());\n startedReadingCurrentBlockAt = System.currentTimeMillis();\n currentBlockRecordCount = count;\n }\n}\n"
|
"public Subject authenticate(Object credentials) {\n String user = \"String_Node_Str\", password = \"String_Node_Str\";\n String host = null;\n if (credentials instanceof String[]) {\n String[] up = (String[]) credentials;\n if (up.length == 1) {\n user = up[0];\n } else if (up.length >= 2) {\n user = up[0];\n password = up[1];\n if (password == null)\n password = \"String_Node_Str\";\n }\n if (up.length > 2) {\n host = up[2];\n } else {\n try {\n host = RemoteServer.getClientHost();\n } catch (ServerNotActiveException ex) {\n throw new RuntimeException(ex);\n }\n }\n }\n String realm = as.getSystemJmxConnector().getAuthRealmName();\n if (realm == null)\n realm = as.getAuthRealmName();\n try {\n loginAsAdmin(user, password, realm, host);\n return null;\n } catch (LoginException e) {\n if (ADMSEC_LOGGER.isLoggable(Level.FINE)) {\n ADMSEC_LOGGER.log(Level.FINE, \"String_Node_Str\", new Object[] { user, host, realm });\n }\n throw new SecurityException(e);\n }\n}\n"
|
"private AudioInputStream toStream(Sound[] channels, AudioFormat audioFormat) {\n int length = channels.length * audioFormat.getFrameSize() * channels[0].getSamples().length;\n byte[] data = new byte[length];\n for (int i = 0; i < data.length; i++) {\n int currentFrameByte = i % audioFormat.getFrameSize();\n int currentChannel = (i / audioFormat.getFrameSize()) % channels.length;\n int currentFrame = i / (audioFormat.getFrameSize() * channels.length);\n if (audioFormat.isBigEndian()) {\n data[i] = (byte) ((int) (channels[currentChannel].getSamples()[currentFrame]) >> (8 * currentFrameByte));\n } else {\n data[i] = (byte) ((int) (channels[currentChannel].getSamples()[currentFrame]) >> (8 * (audioFormat.getFrameSize() - 1 - currentFrameByte)));\n }\n }\n this.notifyAll(\"String_Node_Str\");\n ByteArrayInputStream bais = new ByteArrayInputStream(data);\n return new AudioInputStream(bais, audioFormat, length / audioFormat.getFrameSize());\n}\n"
|
"private Map<String, TypeInfo> buildTypeInfo(JavaClass[] allClasses) {\n for (JavaClass javaClass : allClasses) {\n if (javaClass == null) {\n continue;\n }\n TypeInfo info = typeInfo.get(javaClass.getQualifiedName());\n if (info == null || info.isPostBuilt()) {\n continue;\n }\n info.setPostBuilt(true);\n processFactoryMethods(javaClass, info);\n NamespaceInfo packageNamespace = getNamespaceInfoForPackage(javaClass);\n postProcessXmlAccessorType(info, packageNamespace);\n postProcessXmlType(javaClass, info, packageNamespace);\n if (info.isEnumerationType()) {\n addEnumTypeInfo(javaClass, ((EnumTypeInfo) info));\n continue;\n }\n processTypeQName(javaClass, info, packageNamespace);\n JavaClass superClass = (JavaClass) javaClass.getSuperclass();\n if (shouldGenerateTypeInfo(superClass)) {\n JavaClass[] jClassArray = new JavaClass[] { superClass };\n buildNewTypeInfo(jClassArray);\n }\n info.setProperties(getPropertiesForClass(javaClass, info));\n processTypeInfoProperties(javaClass, info);\n postProcessXmlAccessorOrder(info, packageNamespace);\n if (!javaClass.isInterface()) {\n if (info.getFactoryMethodName() == null && info.getObjectFactoryClassName() == null) {\n JavaConstructor zeroArgConstructor = javaClass.getDeclaredConstructor(new JavaClass[] {});\n if (zeroArgConstructor == null) {\n throw org.eclipse.persistence.exceptions.JAXBException.factoryMethodOrConstructorRequired(javaClass.getName());\n }\n }\n }\n validatePropOrderForInfo(info);\n }\n return typeInfo;\n}\n"
|
"protected void sendKeyEvent(int keyCode, boolean isPressed) {\n assertRunOnServiceThread();\n List<SendKeyAction> action = getActions(SendKeyAction.class);\n if (!action.isEmpty()) {\n action.get(0).processKeyEvent(keyCode, isPressed);\n } else {\n if (isPressed && getActiveSource().isValid()) {\n int logicalAddress = getActiveSource().logicalAddress;\n addAndStartAction(new SendKeyAction(this, logicalAddress, keyCode));\n } else {\n Slog.w(TAG, \"String_Node_Str\");\n }\n }\n}\n"
|
"public static boolean mightBeTIB(ObjectReference obj) throws InlinePragma, UninterruptiblePragma {\n return !obj.isNull() && Space.isMappedObject(obj) && Space.isImmortal(obj) && Space.isMappedObject(ObjectReference.fromObject(VM_ObjectModel.getTIB(obj)));\n}\n"
|
"public List getReferableBindings(String targetLevel, ICubeQueryDefinition cubeDefn, boolean isSort) throws AdapterException {\n try {\n List bindings = cubeDefn.getBindings();\n if (bindings == null)\n return new ArrayList();\n DimLevel target = OlapExpressionUtil.getTargetDimLevel(targetLevel);\n List result = new ArrayList();\n for (int i = 0; i < bindings.size(); i++) {\n IBinding binding = (IBinding) bindings.get(i);\n Set refDimLevel = OlapExpressionCompiler.getReferencedDimLevel(binding.getExpression(), bindings, isSort);\n if (refDimLevel.size() > 1)\n continue;\n if (!refDimLevel.contains(target)) {\n List aggrOns = binding.getAggregatOns();\n if (aggrOns.size() == 0) {\n if (this.getReferencedMeasureName(binding.getExpression()) != null && this.isLeafLevel(cubeDefn, target)) {\n result.add(new BindingMetaInfo(binding.getBindingName(), IBindingMetaInfo.MEASURE_TYPE));\n continue;\n }\n }\n for (int j = 0; j < aggrOns.size(); j++) {\n DimLevel dimLevel = OlapExpressionUtil.getTargetDimLevel(aggrOns.get(j).toString());\n if (dimLevel.equals(target)) {\n if (j == aggrOns.size() - 1)\n result.add(binding);\n else {\n DimLevel next = OlapExpressionUtil.getTargetDimLevel(aggrOns.get(j + 1).toString());\n if (getAxisQualifierLevel(next, cubeDefn.getEdge(getAxisQualifierEdgeType(dimLevel, cubeDefn))) == null)\n continue;\n else\n result.add(binding);\n }\n break;\n }\n }\n continue;\n }\n result.add(binding);\n }\n return result;\n } catch (DataException e) {\n throw new AdapterException(e.getLocalizedMessage(), e);\n }\n}\n"
|
"private boolean maybeBucketHostedStyle(String fullHostHeader) {\n if (!Strings.isNullOrEmpty(fullHostHeader))\n try {\n final String host = Iterables.getFirst(hostSplitter.split(fullHostHeader), fullHostHeader);\n final Name hostDnsName = Name.fromString(host, Name.root);\n return DomainNames.systemDomainFor(ObjectStorage.class, hostDnsName).isPresent();\n } catch (Exception e) {\n LOG.error(\"String_Node_Str\" + fullHostHeader, e);\n }\n return false;\n}\n"
|
"protected void evolve() {\n boolean[] flamable = Dungeon.level.flamable;\n int cell;\n int fire;\n Freezing freeze = (Freezing) Dungeon.level.blobs.get(Freezing.class);\n boolean observe = false;\n for (int i = area.left - 1; i <= area.right; i++) {\n for (int j = area.top - 1; j <= area.bottom; j++) {\n cell = i + j * Dungeon.level.width();\n if (cur[cell] > 0) {\n if (freeze != null && freeze.volume > 0 && freeze.cur[cell] > 0) {\n freeze.clear(cell);\n off[cell] = cur[cell] = 0;\n continue;\n }\n burn(cell);\n fire = cur[cell] - 1;\n if (fire <= 0 && flamable[cell]) {\n Dungeon.level.destroy(cell);\n observe = true;\n GameScene.updateMap(cell);\n }\n } else if (freeze == null || freeze.volume <= 0 || freeze.cur[cell] <= 0) {\n if (flamable[cell] && (cur[cell - 1] > 0 || cur[cell + 1] > 0 || cur[cell - Dungeon.level.width()] > 0 || cur[cell + Dungeon.level.width()] > 0)) {\n fire = 4;\n burn(cell);\n area.union(i, j);\n } else {\n fire = 0;\n }\n } else {\n fire = 0;\n }\n volume += (off[cell] = fire);\n }\n }\n if (observe) {\n Dungeon.observe();\n }\n}\n"
|
"protected void triggerShutdown() {\n runThread.interrupt();\n}\n"
|
"private StackedRankColumnModel createUnBound(RankTableModel table, final int column, final String label, Color color, Color bgColor) {\n StackedRankColumnModel stacked = new StackedRankColumnModel();\n stacked.setTitle(label);\n table.add(stacked);\n for (TumorType type : TumorType.values()) {\n stacked.add(ucol(type, column, label, color, bgColor));\n }\n stacked.setWidth(150);\n return stacked;\n}\n"
|
"protected void onDownloadNecessary() {\n AndroidApi.UI_THREAD_HANDLER.post(new Runnable() {\n\n public void run() {\n progressBar.setVisibility(View.VISIBLE);\n progressBar.setIndeterminate(true);\n }\n });\n}\n"
|
"public ApplicationDetail getAppDetail(ApplicationId appId) throws Exception {\n ApplicationSpecification appSpec = store.getApplication(appId);\n if (appSpec == null) {\n throw new ApplicationNotFoundException(appId);\n }\n ensureAccess(appId);\n String ownerPrincipal = ownerAdmin.getOwnerPrincipal(appId);\n return ApplicationDetail.fromSpec(appSpec, ownerPrincipal);\n}\n"
|
"protected void initData(Composite dataComposite) {\n Label label = new Label(dataComposite, SWT.NONE);\n label.setText(RedisClient.i18nFile.getText(I18nFile.VALUE));\n text_value = new Text(dataComposite, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI);\n text_value.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));\n}\n"
|
"public void testNamedQuery() {\n QueryResource resource = new QueryResource();\n resource.setPersistenceFactory(factory);\n PersistenceContext context = getAuctionPersistenceContext(null);\n DynamicEntity entity1 = (DynamicEntity) context.newEntity(\"String_Node_Str\");\n entity1.set(\"String_Node_Str\", \"String_Node_Str\");\n context.create(null, entity1);\n DynamicEntity entity2 = (DynamicEntity) context.newEntity(\"String_Node_Str\");\n entity2.set(\"String_Node_Str\", \"String_Node_Str\");\n context.create(null, entity2);\n TestHttpHeaders headers = new TestHttpHeaders();\n headers.getAcceptableMediaTypes().add(MediaType.APPLICATION_JSON_TYPE);\n List<String> mediaTypes = new ArrayList<String>();\n mediaTypes.add(MediaType.APPLICATION_JSON);\n TestURIInfo ui = new TestURIInfo();\n StreamingOutput output = (StreamingOutput) resource.namedQuery(\"String_Node_Str\", \"String_Node_Str\", headers, ui).getEntity();\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n try {\n output.write(outputStream);\n } catch (IOException ex) {\n fail(ex.toString());\n }\n String resultString = outputStream.toString();\n assertTrue(\"String_Node_Str\", resultString.contains(\"String_Node_Str\"));\n assertTrue(\"String_Node_Str\", resultString.contains(\"String_Node_Str\"));\n clearData();\n}\n"
|
"private void cmbGenderFilterActionPerformed(java.awt.event.ActionEvent evt) {\n if (filterListenersActive)\n filterDict();\n}\n"
|
"public void assignSequenceNumber(Object object, ClassDescriptor descriptor) throws DatabaseException {\n if (descriptor.usesSequenceNumbers() && !descriptor.getSequence().shouldAcquireValueAfterInsert()) {\n startOperationProfile(SessionProfiler.AssignSequence);\n ObjectBuilder builder = descriptor.getObjectBuilder();\n try {\n value = builder.assignSequenceNumber(object, this);\n } catch (RuntimeException exception) {\n handleException(exception);\n } finally {\n endOperationProfile(SessionProfiler.AssignSequence);\n }\n }\n}\n"
|
"public void run() {\n IChatRoomManager[] managers = new IChatRoomManager[accounts.size()];\n int j = 0;\n for (Iterator i = accounts.values().iterator(); i.hasNext(); ) {\n UserAccount ua = (UserAccount) i.next();\n managers[j++] = ua.getContainer().getChatRoomManager();\n }\n ChatRoomSelectionDialog dialog = new ChatRoomSelectionDialog(RosterView.this.getViewSite().getShell(), managers);\n dialog.setBlockOnOpen(true);\n dialog.open();\n if (dialog.getReturnCode() != Window.OK) {\n return;\n }\n ChatRoomSelectionDialog.Room room = dialog.getSelectedRoom();\n IChatRoomManager selectedManager = room.getManager();\n IRoomInfo selectedInfo = room.getRoomInfo();\n if (room == null || selectedManager == null || selectedInfo == null) {\n MessageDialog.openInformation(RosterView.this.getViewSite().getShell(), \"String_Node_Str\", \"String_Node_Str\");\n return;\n }\n String secondaryID = getChatRoomSecondaryID(selectedInfo.getRoomID());\n if (secondaryID == null) {\n MessageDialog.openError(RosterView.this.getViewSite().getShell(), \"String_Node_Str\", \"String_Node_Str\" + selectedInfo.getRoomID());\n return;\n }\n IWorkbenchWindow ww = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\n IWorkbenchPage wp = ww.getActivePage();\n RoomWithAView roomView = getRoomView(secondaryID);\n if (roomView != null) {\n ChatRoomView view = roomView.getView();\n wp.activate(view);\n return;\n }\n IChatRoomContainer chatRoom = null;\n try {\n chatRoom = selectedManager.makeChatRoomContainer();\n } catch (ContainerInstantiationException e1) {\n MessageDialog.openError(RosterView.this.getViewSite().getShell(), \"String_Node_Str\", \"String_Node_Str\");\n }\n IChatMessageSender sender = chatRoom.getChatMessageSender();\n IViewPart view = null;\n try {\n IViewReference ref = wp.findViewReference(CHAT_ROOM_VIEW_CLASS, secondaryID);\n if (ref == null) {\n view = wp.showView(CHAT_ROOM_VIEW_CLASS, secondaryID, IWorkbenchPage.VIEW_ACTIVATE);\n } else {\n view = ref.getView(true);\n }\n final ChatRoomView chatroomview = (ChatRoomView) view;\n chatroomview.initialize(RosterView.this, secondaryID, chatRoom, selectedInfo, sender);\n chatRoom.addMessageListener(new IMessageListener() {\n public void handleMessage(ID fromID, ID toID, Type type, String subject, String messageBody) {\n chatroomview.handleMessage(fromID, toID, type, subject, messageBody);\n }\n });\n chatRoom.addChatParticipantListener(new IChatParticipantListener() {\n public void handlePresence(ID fromID, IPresence presence) {\n chatroomview.handlePresence(fromID, presence);\n }\n public void joined(ID user) {\n chatroomview.handleJoin(user);\n }\n public void left(ID user) {\n chatroomview.handleLeave(user);\n }\n });\n chatRoom.addInvitationListener(new IInvitationListener() {\n public void handleInvitationReceived(ID roomID, ID from, ID toID, String subject, String body) {\n chatroomview.handleInvitationReceived(roomID, from, toID, subject, body);\n }\n });\n } catch (PartInitException e) {\n UiPlugin.log(\"String_Node_Str\" + selectedInfo.getRoomID(), e);\n MessageDialog.openError(getViewSite().getShell(), \"String_Node_Str\", \"String_Node_Str\" + selectedInfo.getName() + \"String_Node_Str\");\n return;\n }\n try {\n chatRoom.connect(selectedInfo.getRoomID(), getChatJoinContext(\"String_Node_Str\" + selectedInfo.getName()));\n } catch (ContainerConnectException e1) {\n UiPlugin.log(\"String_Node_Str\" + selectedInfo.getRoomID(), e1);\n MessageDialog.openError(RosterView.this.getViewSite().getShell(), \"String_Node_Str\", \"String_Node_Str\" + selectedInfo.getName() + \"String_Node_Str\" + e1.getMessage());\n return;\n }\n addRoomView(new RoomWithAView(selectedManager, chatRoom, (ChatRoomView) view, secondaryID));\n}\n"
|
"private void reloadChildren() {\n InGetVariable igv = Main.getDebugHandler().getVariable(parentId, thisVar.name, true);\n childs = new ArrayList<>();\n childTraits = new ArrayList<>();\n if (thisVar.vType != VariableType.FUNCTION || ((thisVar.flags & VariableFlags.HAS_GETTER) > 0)) {\n if (parentId != 0) {\n thisVar = igv.parent;\n }\n }\n Variable curTrait = null;\n for (int i = 0; i < igv.childs.size(); i++) {\n if (!isTraits(igv.childs.get(i))) {\n childs.add(igv.childs.get(i));\n childTraits.add(curTrait);\n } else {\n curTrait = igv.childs.get(i);\n }\n }\n}\n"
|
"public void tickStart(TickEvent.ClientTickEvent event) {\n wasInUse = inUse;\n inUse = false;\n if (event.side == Side.CLIENT && Minecraft.getMinecraft().thePlayer != null) {\n EntityPlayer player = Minecraft.getMinecraft().thePlayer;\n if (SteamcraftEventHandler.hasPower(player, 1) && player.getEquipmentInSlot(2) != null && player.getEquipmentInSlot(2).getItem() instanceof ItemExosuitArmor) {\n ItemExosuitArmor chest = (ItemExosuitArmor) player.getEquipmentInSlot(2).getItem();\n if (player.worldObj.isRemote && chest.hasUpgrade(player.getEquipmentInSlot(2), SteamcraftItems.thrusters)) {\n if (!player.onGround && Math.abs(player.motionX) + Math.abs(player.motionZ) > 0.0F && !player.isInWater() && !(player.capabilities.isFlying)) {\n double rotation = Math.toRadians(player.renderYawOffset + 90.0F);\n double rotation2 = Math.toRadians(player.renderYawOffset + 270.0F);\n player.worldObj.spawnParticle(\"String_Node_Str\", player.posX + 0.5 * Math.sin(rotation), player.posY - 1F, player.posZ - 0.5 * Math.cos(rotation), player.motionX * -0.1F, 0, player.motionZ * -0.1F);\n player.worldObj.spawnParticle(\"String_Node_Str\", player.posX + 0.5 * Math.sin(rotation2), player.posY - 1F, player.posZ - 0.5 * Math.cos(rotation2), player.motionX * -0.1F, 0, player.motionZ * -0.1F);\n }\n }\n }\n if (Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed()) {\n SteamcraftClientPacketHandler.sendSpacePacket(player);\n if (player != null) {\n ItemStack armor = player.getCurrentArmor(2);\n if (armor != null && armor.getItem() == SteamcraftItems.exoArmorBody) {\n ItemExosuitArmor item = (ItemExosuitArmor) armor.getItem();\n if (item.hasUpgrade(armor, SteamcraftItems.jetpack) && SteamcraftEventHandler.hasPower(player, 5)) {\n if (!player.onGround && !player.capabilities.isFlying) {\n player.motionY = player.motionY + 0.06D;\n double rotation = Math.toRadians(player.renderYawOffset);\n player.worldObj.spawnParticle(\"String_Node_Str\", player.posX + 0.4 * Math.sin(rotation + 0.9F), player.posY - 1F, player.posZ - 0.4 * Math.cos(rotation + 0.9F), 0.0F, -1.0F, 0.0F);\n player.worldObj.spawnParticle(\"String_Node_Str\", player.posX + 0.4 * Math.sin(rotation - 0.9F), player.posY - 1F, player.posZ - 0.4 * Math.cos(rotation - 0.9F), 0.0F, -1.0F, 0.0F);\n }\n }\n }\n }\n } else {\n }\n ItemStack item = player.inventory.getStackInSlot(player.inventory.currentItem);\n if (item != null && item.getItem() == SteamcraftItems.spyglass) {\n if (Minecraft.getMinecraft().gameSettings.thirdPersonView == 0) {\n inUse = true;\n this.renderTelescopeOverlay();\n }\n }\n if (!wasInUse && item != null && item.getItem() == SteamcraftItems.musket && UtilEnhancements.getEnhancementFromItem(item) == SteamcraftItems.spyglass) {\n boolean isShooting = false;\n if (item.stackTagCompound != null) {\n NBTTagCompound nbt = item.getTagCompound();\n if (nbt.getInteger(\"String_Node_Str\") > 0) {\n isShooting = true;\n }\n }\n if (isShooting && Minecraft.getMinecraft().gameSettings.thirdPersonView == 0) {\n inUse = true;\n Minecraft.getMinecraft().gameSettings.fovSetting = -0.85F;\n Minecraft.getMinecraft().gameSettings.mouseSensitivity -= 0.3F;\n this.renderTelescopeOverlay();\n }\n }\n }\n if (!inUse && !wasInUse) {\n fov = Minecraft.getMinecraft().gameSettings.fovSetting;\n sensitivity = Minecraft.getMinecraft().gameSettings.mouseSensitivity;\n }\n if (!inUse && wasInUse) {\n Minecraft.getMinecraft().gameSettings.fovSetting = fov;\n Minecraft.getMinecraft().gameSettings.mouseSensitivity = sensitivity;\n }\n if (inUse && !wasInUse) {\n this.zoom = 0.0F;\n }\n if (inUse && Minecraft.getMinecraft().gameSettings.keyBindAttack.getIsKeyPressed() && zoom > 0F) {\n this.zoom -= 1.0F;\n Minecraft.getMinecraft().gameSettings.fovSetting += 0.05F;\n Minecraft.getMinecraft().gameSettings.mouseSensitivity += 0.01F;\n }\n if (inUse && Minecraft.getMinecraft().gameSettings.keyBindUseItem.getIsKeyPressed() && zoom < 34F) {\n this.zoom += 1.0F;\n Minecraft.getMinecraft().gameSettings.fovSetting -= 0.05F;\n Minecraft.getMinecraft().gameSettings.mouseSensitivity -= 0.01F;\n }\n}\n"
|
"public void run() {\n Path out = new Path(context.getProps().getProperty(CommonConstants.GUAGUA_OUTPUT));\n if (!context.getMasterResult().isHalt() && context.getCurrentIteration() != context.getTotalIteration()) {\n writeModelToFileSystem(context.getMasterResult().getTrees(), out);\n }\n saveTmpModelToHDFS(context.getCurrentIteration(), context.getMasterResult().getTrees());\n}\n"
|
"public void reduce(TextPairWC termFile, Iterable<TermInfo> termInfos, Context context) throws IOException, InterruptedException {\n ArrayList<TermInfo> termInfos_lst = new ArrayList<TermInfo>();\n for (TermInfo termInfo : termInfos) termInfos_lst.add((TermInfo) WritableUtils.clone(termInfo, context.getConfiguration()));\n TermInfo[] termInfos_Array = termInfos_lst.toArray(new TermInfo[termInfos_lst.size()]);\n IntWritable df = new IntWritable(termInfos_Array.length);\n context.write(new TextIntWC(termFile.getFirst(), df), new TermInfoArray(termInfos_Array));\n}\n"
|
"public ModelNode buildRequestWithoutHeaders(CommandContext ctx) throws CommandFormatException {\n final ModelNode composite = new ModelNode();\n composite.get(Util.OPERATION).set(Util.COMPOSITE);\n composite.get(Util.ADDRESS).setEmptyList();\n final ModelNode steps = composite.get(Util.STEPS);\n final ParsedCommandLine args = ctx.getParsedCommandLine();\n final String name = this.name.getValue(args);\n boolean keepContent = this.keepContent.isPresent(args);\n final boolean allRelevantServerGroups = this.allRelevantServerGroups.isPresent(args);\n final String serverGroupsStr = this.serverGroups.getValue(args);\n final String path = this.path.getValue(args);\n final File f;\n if (path != null) {\n f = new File(path);\n if (!f.exists()) {\n throw new OperationFormatException(\"String_Node_Str\" + f.getAbsolutePath() + \"String_Node_Str\");\n }\n if (!isCliArchive(f)) {\n throw new OperationFormatException(\"String_Node_Str\" + f.getAbsolutePath() + \"String_Node_Str\");\n }\n } else {\n f = null;\n }\n if (isCliArchive(f)) {\n if (name != null) {\n throw new OperationFormatException(this.name.getFullName() + \"String_Node_Str\");\n }\n if (serverGroupsStr != null || allRelevantServerGroups) {\n throw new OperationFormatException(this.serverGroups.getFullName() + \"String_Node_Str\" + this.allRelevantServerGroups.getFullName() + \"String_Node_Str\");\n }\n if (keepContent) {\n throw new OperationFormatException(this.keepContent.getFullName() + \"String_Node_Str\");\n }\n TempFileProvider tempFileProvider;\n MountHandle root;\n try {\n tempFileProvider = TempFileProvider.create(\"String_Node_Str\", Executors.newSingleThreadScheduledExecutor(), true);\n root = extractArchive(f, tempFileProvider);\n } catch (IOException e) {\n throw new OperationFormatException(\"String_Node_Str\" + f.getAbsolutePath() + \"String_Node_Str\");\n }\n final File currentDir = ctx.getCurrentDir();\n ctx.setCurrentDir(root.getMountSource());\n String holdbackBatch = activateNewBatch(ctx);\n try {\n String script = this.script.getValue(args);\n if (script == null) {\n script = \"String_Node_Str\";\n }\n File scriptFile = new File(ctx.getCurrentDir(), script);\n if (!scriptFile.exists()) {\n throw new CommandFormatException(\"String_Node_Str\" + script + \"String_Node_Str\" + f.getAbsolutePath() + \"String_Node_Str\");\n }\n try (BufferedReader reader = new BufferedReader(new FileReader(scriptFile))) {\n String line = reader.readLine();\n while (!ctx.isTerminated() && line != null) {\n ctx.handle(line);\n line = reader.readLine();\n }\n } catch (FileNotFoundException e) {\n throw new CommandFormatException(\"String_Node_Str\" + script + \"String_Node_Str\" + f.getAbsolutePath() + \"String_Node_Str\");\n } catch (IOException e) {\n throw new CommandFormatException(\"String_Node_Str\" + scriptFile.getName() + \"String_Node_Str\" + e.getMessage(), e);\n } catch (CommandLineException e) {\n throw new CommandFormatException(e.getMessage(), e);\n } finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) {\n }\n }\n }\n return ctx.getBatchManager().getActiveBatch().toRequest();\n } finally {\n ctx.setCurrentDir(currentDir);\n discardBatch(ctx, holdbackBatch);\n VFSUtils.safeClose(root, tempFileProvider);\n }\n }\n if (name == null) {\n throw new OperationFormatException(\"String_Node_Str\");\n }\n final ModelControllerClient client = ctx.getModelControllerClient();\n DefaultOperationRequestBuilder builder;\n final List<String> deploymentNames;\n if (name.indexOf('*') < 0) {\n deploymentNames = Collections.singletonList(name);\n } else {\n deploymentNames = Util.getMatchingDeployments(client, name, null);\n if (deploymentNames.isEmpty()) {\n throw new CommandFormatException(\"String_Node_Str\" + name);\n }\n }\n for (String deploymentName : deploymentNames) {\n final List<String> serverGroups;\n if (ctx.isDomainMode()) {\n if (allRelevantServerGroups) {\n if (keepContent) {\n serverGroups = Util.getAllEnabledServerGroups(deploymentName, client);\n } else {\n try {\n serverGroups = Util.getServerGroupsReferencingDeployment(deploymentName, client);\n } catch (CommandLineException e) {\n throw new CommandFormatException(\"String_Node_Str\", e);\n }\n }\n } else {\n if (serverGroupsStr == null) {\n serverGroups = Collections.emptyList();\n } else {\n serverGroups = Arrays.asList(serverGroupsStr.split(\"String_Node_Str\"));\n }\n }\n if (serverGroups.isEmpty()) {\n if (keepContent) {\n throw new OperationFormatException(\"String_Node_Str\");\n }\n } else {\n if (!keepContent) {\n try {\n List<String> sg = Util.getServerGroupsReferencingDeployment(deploymentName, client);\n keepContent = !serverGroups.containsAll(sg);\n } catch (CommandLineException e) {\n throw new CommandFormatException(\"String_Node_Str\", e);\n }\n }\n for (String group : serverGroups) {\n ModelNode groupStep = Util.configureDeploymentOperation(Util.UNDEPLOY, deploymentName, group);\n steps.add(groupStep);\n if (!keepContent) {\n groupStep = Util.configureDeploymentOperation(Util.REMOVE, deploymentName, group);\n steps.add(groupStep);\n }\n }\n }\n } else {\n if (Util.isDeployedAndEnabledInStandalone(deploymentName, client)) {\n builder = new DefaultOperationRequestBuilder();\n builder.setOperationName(Util.UNDEPLOY);\n builder.addNode(Util.DEPLOYMENT, deploymentName);\n steps.add(builder.buildRequest());\n }\n }\n }\n if (!keepContent) {\n for (String deploymentName : deploymentNames) {\n builder = new DefaultOperationRequestBuilder();\n builder.setOperationName(Util.REMOVE);\n builder.addNode(Util.DEPLOYMENT, deploymentName);\n steps.add(builder.buildRequest());\n }\n }\n return composite;\n}\n"
|
"public List<BusinessGroup> findBusinessGroupsOfAreaKeys(List<Long> areaKeys) {\n if (areaKeys == null || areaKeys.isEmpty())\n return Collections.emptyList();\n StringBuilder sb = new StringBuilder();\n sb.append(\"String_Node_Str\").append(BGtoAreaRelationImpl.class.getName()).append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_Node_Str\").append(\"String_Node_Str\");\n List<BusinessGroup> result = DBFactory.getInstance().getCurrentEntityManager().createQuery(sb.toString(), BusinessGroup.class).setParameter(\"String_Node_Str\", areaKeys).getResultList();\n return result;\n}\n"
|
"public void thingRemoved(DiscoveryService source, ThingUID thingUID) {\n if (thingUID.equals(this.getThing().getUID())) {\n logger.debug(\"String_Node_Str\", getThing().getUID());\n getThing().setStatus(ThingStatus.OFFLINE);\n }\n}\n"
|
"private void readConfiguration(final String prefix, final boolean output, final Map<String, ARXNode> map, final ZipFile zip) throws IOException, ClassNotFoundException, SAXException {\n final ZipEntry entry = zip.getEntry(prefix + \"String_Node_Str\");\n if (entry == null) {\n return;\n }\n final ObjectInputStream oos = new ObjectInputStream(zip.getInputStream(entry));\n final ModelConfiguration config = (ModelConfiguration) oos.readObject();\n config.setMetric(Metric.createMetric(config.getMetric(), ARXLattice.getDeserializationContext().minLevel, ARXLattice.getDeserializationContext().maxLevel));\n config.getConfig().setMetric(Metric.createMetric(config.getConfig().getMetric(), ARXLattice.getDeserializationContext().minLevel, ARXLattice.getDeserializationContext().maxLevel));\n oos.close();\n if (!output) {\n readInput(config, zip);\n model.setInputConfig(config);\n readDefinition(config, model.getInputDefinition(), prefix, zip);\n } else {\n config.setInput(model.getInputConfig().getInput());\n model.setOutputConfig(config);\n DataDefinition definition = new DataDefinition();\n readDefinition(config, definition, prefix, zip);\n final int historySize = model.getHistorySize();\n final double snapshotSizeSnapshot = model.getSnapshotSizeSnapshot();\n final double snapshotSizeDataset = model.getSnapshotSizeDataset();\n final Metric<?> metric = config.getMetric();\n final long time = model.getTime();\n final ARXNode optimalNode;\n final ARXNode outputNode;\n if (model.getOptimalNodeAsString() != null) {\n optimalNode = map.get(model.getOptimalNodeAsString());\n } else {\n optimalNode = null;\n }\n if (model.getOutputNodeAsString() != null) {\n outputNode = map.get(model.getOutputNodeAsString());\n } else {\n outputNode = null;\n }\n model.setSelectedNode(outputNode);\n model.setResult(new ARXResult(config.getInput().getHandle(), definition, lattice, historySize, snapshotSizeSnapshot, snapshotSizeDataset, metric, model.getOutputConfig().getConfig(), optimalNode, time));\n final ARXAnonymizer f = new ARXAnonymizer();\n model.setAnonymizer(f);\n f.setHistorySize(historySize);\n f.setMaximumSnapshotSizeSnapshot(snapshotSizeSnapshot);\n f.setMaximumSnapshotSizeDataset(snapshotSizeDataset);\n }\n}\n"
|
"protected WizardDialog getPredefinedDialog() {\n CreateNewAnalysisWizard wizard = new CreateNewAnalysisWizard(true, AnalysisType.MULTIPLE_COLUMN);\n wizard.setForcePreviousAndNextButtons(true);\n TimeSliceOptionPage page = new TimeSliceOptionPage();\n wizard.setOtherPages(new WizardPage[] { page });\n return new OpeningHelpWizardDialog(null, wizard, FormEnum.TimeSlicesForm.getHelpHref(), page);\n}\n"
|
"public <S> GraphTraversal<S, S> of() {\n final GraphTraversal<S, S> traversal = new DefaultGraphTraversal<>();\n traversal.getStrategies().register(SqlGGraphStepStrategy.instance());\n traversal.addStep(new StartStep<>(traversal));\n traversal.sideEffects().setGraph(this);\n return traversal;\n}\n"
|
"public void testGlobalSearch() throws Exception {\n this.testUtils.rest().delete(this.reference);\n this.testUtils.rest().savePage(this.reference);\n this.solrUtils.waitEmpyQueue();\n String query = String.format(\"String_Node_Str\", this.pageName, buildURI(WikisSearchQueryResource.class, getWiki()));\n GetMethod getMethod = executeGet(URIUtil.encodeQuery(query));\n Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_OK, getMethod.getStatusCode());\n SearchResults searchResults = (SearchResults) unmarshaller.unmarshal(getMethod.getResponseBodyAsStream());\n int resultSize = searchResults.getSearchResults().size();\n assertEquals(1, resultSize);\n assertEquals(this.fullName, searchResults.getSearchResults().get(0).getPageFullName());\n}\n"
|
"public static Program optimize(Logger logger, PrintStream icOutput, Program prog) throws UserException {\n boolean logIC = icOutput != null;\n if (logIC) {\n prog.log(icOutput, \"String_Node_Str\");\n }\n long nIterations;\n try {\n nIterations = Settings.getLong(Settings.OPT_MAX_ITERATIONS);\n } catch (InvalidOptionException ex) {\n throw new STCRuntimeError(ex.getMessage());\n }\n preprocess(icOutput, logger, prog);\n iterate(icOutput, logger, prog, nIterations);\n postprocess(icOutput, logger, prog, nIterations);\n if (logIC) {\n prog.log(icOutput, \"String_Node_Str\");\n }\n return prog;\n}\n"
|
"private void handleIssueClick(TurboIssue issue, IssueCard card) {\n issuepickerQueryField.setDisable(true);\n state.updateSelectedIssues(issue);\n populateSelectedIssues(state.getSelectedIssues(), state.getCurrentSuggestion());\n}\n"
|
"public void add(int id, int db, String key, List<String> values, boolean headTail, boolean exist, int ttl) {\n AddList command = new AddList(id, db, key, values, headTail, exist);\n command.execute();\n if (ttl != -1) {\n Expire command1 = new Expire(id, db, key, ttl);\n command1.execute();\n }\n}\n"
|
"public MessageInfo buildMessageInfo(NotificationMessage message) {\n MessageInfo messageInfo = new MessageInfo();\n messageInfo.setFrom(getFrom(message)).setTo(getTo(message));\n Provider provider = providerService.getProvider(message.getProviderType());\n String language = getLanguage(message);\n String body = getTemplate(provider, language);\n String subject = getSubject(provider, language);\n PROVIDER_TYPE type = PROVIDER_TYPE.valueOf(message.getProviderType());\n switch(type) {\n case ActivityMentionProvider:\n {\n String activityId = message.getOwnerParameter().get(ACTIVITY_ID);\n ExoSocialActivity activity = activityManager.getActivity(activityId);\n Identity identity = identityManager.getIdentity(activity.getPosterId(), true);\n messageInfo.setSubject(subject.replace(\"String_Node_Str\", identity.getProfile().getFullName())).setBody(body.replace(\"String_Node_Str\", identity.getProfile().getFullName()).replace(\"String_Node_Str\", activity.getTitle()).replace(\"String_Node_Str\", LinkProviderUtils.getReplyActivityUrl(activity.getId(), Util.getPortalRequestContext().getRemoteUser())).replace(\"String_Node_Str\", LinkProviderUtils.getViewFullDiscussionUrl(activity.getId(), Util.getPortalRequestContext().getRemoteUser())));\n break;\n }\n case ActivityCommentProvider:\n {\n String activityId = message.getOwnerParameter().get(ACTIVITY_ID);\n ExoSocialActivity activity = activityManager.getActivity(activityId);\n ExoSocialActivity parentActivity = activityManager.getParentActivity(activity);\n Identity identity = identityManager.getOrCreateIdentity(OrganizationIdentityProvider.NAME, activity.getPosterId(), true);\n messageInfo.setSubject(subject.replace(\"String_Node_Str\", identity.getProfile().getFullName())).setBody(body.replace(\"String_Node_Str\", identity.getProfile().getFullName()).replace(\"String_Node_Str\", activity.getTitle()).replace(\"String_Node_Str\", parentActivity.getTitle()).replace(\"String_Node_Str\", LinkProviderUtils.getReplyActivityUrl(activity.getId(), Util.getPortalRequestContext().getRemoteUser())).replace(\"String_Node_Str\", LinkProviderUtils.getReplyActivityUrl(activity.getId(), Util.getPortalRequestContext().getRemoteUser())));\n break;\n }\n case ActivityPostProvider:\n {\n String activityId = message.getOwnerParameter().get(ACTIVITY_ID);\n ExoSocialActivity activity = activityManager.getActivity(activityId);\n Identity identity = identityManager.getOrCreateIdentity(OrganizationIdentityProvider.NAME, activity.getPosterId(), true);\n messageInfo.setSubject(subject.replace(\"String_Node_Str\", identity.getProfile().getFullName())).setBody(body.replace(\"String_Node_Str\", identity.getProfile().getFullName()).replace(\"String_Node_Str\", activity.getTitle()).replace(\"String_Node_Str\", LinkProviderUtils.getReplyActivityUrl(activity.getId(), Util.getPortalRequestContext().getRemoteUser())).replace(\"String_Node_Str\", LinkProviderUtils.getReplyActivityUrl(activity.getId(), Util.getPortalRequestContext().getRemoteUser())));\n break;\n }\n case ActivityPostSpaceProvider:\n {\n String activityId = message.getOwnerParameter().get(ACTIVITY_ID);\n ExoSocialActivity activity = activityManager.getActivity(activityId);\n Identity identity = identityManager.getOrCreateIdentity(OrganizationIdentityProvider.NAME, activity.getPosterId(), true);\n Identity spaceIdentity = identityManager.getOrCreateIdentity(SpaceIdentityProvider.NAME, activity.getStreamOwner(), true);\n messageInfo.setSubject(subject.replace(\"String_Node_Str\", identity.getProfile().getFullName()).replace(\"String_Node_Str\", spaceIdentity.getProfile().getFullName())).setBody(body.replace(\"String_Node_Str\", identity.getProfile().getFullName()).replace(\"String_Node_Str\", activity.getTitle()).replace(\"String_Node_Str\", spaceIdentity.getProfile().getFullName()).replace(\"String_Node_Str\", LinkProviderUtils.getReplyActivityUrl(activity.getId(), Util.getPortalRequestContext().getRemoteUser())).replace(\"String_Node_Str\", LinkProviderUtils.getReplyActivityUrl(activity.getId(), Util.getPortalRequestContext().getRemoteUser())));\n break;\n }\n case InvitedJoinSpace:\n {\n String spaceId = message.getOwnerParameter().get(SPACE_ID);\n Space space = spaceService.getSpaceById(spaceId);\n messageInfo.setSubject(subject.replace(\"String_Node_Str\", space.getPrettyName())).setBody(body.replace(\"String_Node_Str\", space.getPrettyName()).replace(\"String_Node_Str\", space.getAvatarUrl()).replace(\"String_Node_Str\", LinkProviderUtils.getAcceptInvitationToJoinSpaceUrl(space.getId(), getTo(message))).replace(\"String_Node_Str\", LinkProviderUtils.getIgnoreInvitationToJoinSpaceUrl(space.getId(), getTo(message))));\n break;\n }\n case RequestJoinSpace:\n {\n String spaceId = message.getOwnerParameter().get(SPACE_ID);\n Space space = spaceService.getSpaceById(spaceId);\n Identity identity = identityManager.getOrCreateIdentity(OrganizationIdentityProvider.NAME, getFrom(message), true);\n Profile userProfile = identity.getProfile();\n messageInfo.setSubject(subject.replace(\"String_Node_Str\", space.getPrettyName()).replace(\"String_Node_Str\", userProfile.getFullName())).setBody(body.replace(\"String_Node_Str\", space.getPrettyName()).replace(\"String_Node_Str\", userProfile.getFullName()).replace(\"String_Node_Str\", userProfile.getAvatarUrl()).replace(\"String_Node_Str\", LinkProviderUtils.getValidateRequestToJoinSpaceUrl(space.getId(), identity.getRemoteId())));\n break;\n }\n case NewUserJoinSocialIntranet:\n {\n break;\n }\n case ReceiceConnectionRequest:\n {\n Identity identity = identityManager.getOrCreateIdentity(OrganizationIdentityProvider.NAME, getFrom(message), true);\n Profile userProfile = identity.getProfile();\n messageInfo.setSubject(subject.replace(\"String_Node_Str\", userProfile.getFullName())).setBody(body.replace(\"String_Node_Str\", userProfile.getFullName()).replace(\"String_Node_Str\", userProfile.getAvatarUrl()).replace(\"String_Node_Str\", LinkProviderUtils.getConfirmInvitationToConnectUrl(getFrom(message), getTo(message))).replace(\"String_Node_Str\", LinkProviderUtils.getIgnoreInvitationToConnectUrl(getFrom(message), getTo(message))));\n break;\n }\n }\n return messageInfo;\n}\n"
|
"public boolean isInitialized(Node node) throws NodeNotAccessible, Exception {\n SshUtil ssh = new SshUtil(node.getIp(), node.getUser(), node.getPrivateKeyFile());\n while (!ssh.isAccessible()) {\n System.out.println(\"String_Node_Str\" + node.getIp() + \"String_Node_Str\" + node.getUser() + \"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n try {\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n }\n }\n String createdFile = \"String_Node_Str\";\n String returnText = null;\n returnText = ssh.runCommand(\"String_Node_Str\" + createdFile, true);\n System.out.println(\"String_Node_Str\" + returnText.trim() + \"String_Node_Str\");\n return returnText.trim().equals(createdFile);\n}\n"
|
"public void exportClusterData(final String name, final String specFileName, final String type, final String topology, final String delimeter, final String output) {\n String path = null;\n if (!CommandsUtils.isBlank(specFileName)) {\n if (!CommandsUtils.isBlank(type)) {\n System.out.println(Constants.TYPE_SPECFILE_CONFLICT);\n return;\n }\n path = specFileName;\n } else if (!CommandsUtils.isBlank((type))) {\n if (!CommandsUtils.isBlank(output)) {\n path = output;\n }\n }\n if (topology != null && validateTopologyValue(name, topology) == null) {\n return;\n }\n try {\n if ((CommandsUtils.isBlank(specFileName) && CommandsUtils.isBlank(type)) || !CommandsUtils.isBlank(specFileName) || Constants.EXPORT_TYPE_SPEC.equalsIgnoreCase(type)) {\n ClusterCreate cluster = restClient.getSpec(name);\n CommandsUtils.prettyJsonOutput(cluster, path);\n } else if (type.equalsIgnoreCase(Constants.EXPORT_TYPE_RACK)) {\n Map<String, String> rackTopology = restClient.getRackTopology(name, topology);\n CommandsUtils.gracefulRackTopologyOutput(rackTopology, path, delimeter);\n } else if (type.equalsIgnoreCase(Constants.EXPORT_TYPE_IP)) {\n ClusterRead cluster = restClient.get(name, true);\n prettyOutputClusterIPs(cluster, path, delimeter);\n } else {\n System.out.println(Constants.UNKNOWN_EXPORT_TYPE);\n }\n } catch (Exception e) {\n CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_CLUSTER, name, Constants.OUTPUT_OP_EXPORT, Constants.OUTPUT_OP_RESULT_FAIL, e.getMessage());\n }\n}\n"
|
"private ApplicationClusterContext createApplicationClusterContext(String appId, String groupName, CartridgeInfo cartridgeInfo, String subscriptionKey, int tenantId, String repoUrl, String alias, String clusterId, String hostname, String deploymentPolicy, boolean isLBCluster, boolean isKubernetesCluster, String[] dependencyAliases, Properties properties) throws ApplicationDefinitionException {\n String textPayload = ApplicationUtils.createPayload(appId, groupName, cartridgeInfo, subscriptionKey, tenantId, clusterId, hostname, repoUrl, alias, null, dependencyAliases).toString();\n return new ApplicationClusterContext(cartridgeInfo.getType(), clusterId, hostname, textPayload, deploymentPolicy, isLB);\n}\n"
|
"public void widgetSelected(SelectionEvent e) {\n boolean success = false;\n String email = emailText.getText().trim();\n String password = passwordText.getText().trim();\n String pseudonym = userNameText.getText().trim();\n try {\n success = RegisterManagement.getInstance().createUser(email, pseudonym, password, \"String_Node_Str\", \"String_Node_Str\", countryCombo.getText(), isProxyEnable, proxyHost, proxyPort, proxyUser, proxyPassword);\n if (success) {\n IPreferenceStore prefStore = PlatformUI.getPreferenceStore();\n String connectionEmail = project.getAuthor().getLogin();\n prefStore.setValue(connectionEmail, email + \"String_Node_Str\" + pseudonym + \"String_Node_Str\" + password);\n }\n } catch (BusinessException e1) {\n ExceptionHandler.process(e1);\n } finally {\n if (success) {\n MessageDialog.openInformation(getShell(), Messages.getString(\"String_Node_Str\"), Messages.getString(\"String_Node_Str\"));\n okPressed();\n }\n }\n}\n"
|
"public static <T extends ImageBase, D extends ImageBase> FeaturePyramid<T, D> hessianPyramid(int featureRadius, float cornerThreshold, int maxFeatures, Class<T> imageType, Class<D> derivType) {\n GeneralFeatureIntensity<T, D> intensity = new WrapperLaplacianBlobIntensity<T, D>(HessianBlobIntensity.Type.DETERMINANT, derivType);\n FeatureExtractor extractor = createExtractor(featureRadius, cornerThreshold, intensity);\n GeneralFeatureDetector<T, D> detector = new GeneralFeatureDetector<T, D>(intensity, extractor, maxFeatures);\n AnyImageDerivative<T, D> deriv = UtilScaleSpace.createDerivatives(imageType, FactoryImageGenerator.create(derivType));\n return new FeaturePyramid<T, D>(detector, deriv, 0);\n}\n"
|
"protected int internalCompare(final int row1, final int row2, final int[] columns, final boolean ascending) {\n checkRegistry();\n try {\n for (int i = 0; i < columns.length; i++) {\n int index = columns[i];\n int cmp = dataTypes[0][index].compare(internalGetValue(row1, index), internalGetValue(row2, index));\n if (cmp != 0) {\n return ascending ? cmp : -cmp;\n }\n }\n return 0;\n } catch (final Exception e) {\n throw new RuntimeException(e);\n }\n}\n"
|
"private void setLastSourceStat(SourceStatus sourceStat) {\n StreamStatus myStreamStat = null;\n for (StreamStatus streamStat : sourceStat.getSsList()) {\n if (streamStat.getStreamId().equals(sid))\n this.lastStreamStat = streamStat;\n }\n}\n"
|
"public static final void checkNamespacePrefix(String prefix, Locator loc) {\n if (prefix == null || prefix.length() == 0)\n return;\n String reason = null;\n char first = prefix.charAt(0);\n if (isXMLDigit(first)) {\n reason = \"String_Node_Str\";\n } else if (first == '$') {\n reason = \"String_Node_Str\";\n } else if (first == '-') {\n reason = \"String_Node_Str\";\n } else if (first == '.') {\n reason = \"String_Node_Str\";\n } else {\n final String s = prefix.toLowerCase(java.util.Locale.ENGLISH);\n if (s.startsWith(\"String_Node_Str\") && !s.equals(\"String_Node_Str\"))\n reason = \"String_Node_Str\";\n }\n if (reason != null)\n throw new DOMException(DOMException.INVALID_CHARACTER_ERR, \"String_Node_Str\" + prefix + \"String_Node_Str\" + reason, loc);\n for (int j = 0, len = prefix.length(); j < len; j++) if (!isXMLNameCharacter(prefix.charAt(j))) {\n StringBuffer sb = new StringBuffer(\"String_Node_Str\");\n throw new DOMException(DOMException.INVALID_CHARACTER_ERR, appendAsHex(sb, prefix.charAt(j)).toString(), loc);\n }\n if (prefix.indexOf(\"String_Node_Str\") >= 0)\n throw new DOMException(DOMException.INVALID_CHARACTER_ERR, \"String_Node_Str\", loc);\n}\n"
|
"public static void jsLoad(String aResourceName, final JavaScriptObject onSuccess, final JavaScriptObject onFailure, final boolean text) throws Exception {\n SafeUri uri = AppClient.getInstance().getResourceUri(aResourceName);\n if (onSuccess != null) {\n AppClient.getInstance().startRequest(uri, text ? ResponseType.Default : ResponseType.ArrayBuffer, new Callback<XMLHttpRequest>() {\n\n public void run(XMLHttpRequest aResult) throws Exception {\n if (aResult.getStatus() == Response.SC_OK) {\n if (onSuccess != null)\n Utils.executeScriptEventVoid(onSuccess, onSuccess, text ? Utils.toJs(aResult.getResponseText()) : aResult.<XMLHttpRequest2>cast().getResponse());\n } else {\n if (onFailure != null)\n Utils.executeScriptEventVoid(onFailure, onFailure, Utils.toJs(aResult.getStatusText()));\n }\n }\n public void cancel() {\n }\n }, new Callback<XMLHttpRequest>() {\n public void run(XMLHttpRequest aResult) throws Exception {\n if (onFailure != null)\n Utils.executeScriptEventVoid(onFailure, onFailure, Utils.toJs(aResult.getStatusText()));\n }\n public void cancel() {\n }\n });\n}\n"
|
"static void handleStyle(Element ele, Map cssStyles, IContent content) {\n String tagName = ele.getTagName();\n StyleDeclaration style = new StyleDeclaration(content.getCSSEngine());\n if (\"String_Node_Str\".equals(tagName)) {\n String attr = ele.getAttribute(\"String_Node_Str\");\n if (null != attr && !\"String_Node_Str\".equals(attr)) {\n style.setFontSize(attr);\n }\n attr = ele.getAttribute(\"String_Node_Str\");\n if (null != attr && !\"String_Node_Str\".equals(attr)) {\n style.setColor(attr);\n }\n attr = ele.getAttribute(\"String_Node_Str\");\n if (null != attr && !\"String_Node_Str\".equals(attr)) {\n style.setFontFamily(attr);\n }\n }\n if (htmlDisplayMode.contains(tagName)) {\n style.setDisplay(\"String_Node_Str\");\n } else {\n style.setDisplay(\"String_Node_Str\");\n }\n IStyle inlineStyle = (IStyle) cssStyles.get(ele);\n if (inlineStyle != null) {\n style.setProperties(inlineStyle);\n }\n StyleProcessor tag2Style = StyleProcessor.getStyleProcess(tagName);\n if (tag2Style != null) {\n tag2Style.process(style);\n }\n content.setInlineStyle(style);\n}\n"
|
"private void authorizeRequest(String url, Map<String, String> params) throws PodioException {\n RequestFuture<String> future = RequestFuture.newFuture();\n StringRequest request = new RefreshRequest(url, params, future);\n requestQueue.add(request);\n String resultJson = getBlockingResponse(future);\n session = new Session(resultJson);\n}\n"
|
"protected SQLCall buildSimple(AbstractSession session) {\n SQLCall call = new SQLCall();\n call.returnNothing();\n Writer writer = new CharArrayWriter(100);\n ExpressionSQLPrinter printer = new ExpressionSQLPrinter(session, getTranslationRow(), call, false, getBuilder());\n printer.setWriter(writer);\n try {\n writer.write(\"String_Node_Str\");\n if (getHintString() != null) {\n writer.write(getHintString());\n writer.write(\"String_Node_Str\");\n }\n writer.write(getTable().getQualifiedName());\n writer.write(\"String_Node_Str\");\n Iterator i = m_updateClauses.keySet().iterator();\n boolean commaNeeded = false;\n while (i.hasNext()) {\n if (commaNeeded) {\n writer.write(\"String_Node_Str\");\n }\n DatabaseField field = (DatabaseField) i.next();\n Object value = m_updateClauses.get(field);\n writer.write(field.getName());\n writer.write(\"String_Node_Str\");\n if (value instanceof Expression) {\n printer.printExpression((Expression) value);\n } else {\n SQLCall selCall = (SQLCall) value;\n String tableAlias = (String) getDatabaseFieldsToTableAliases().get(field);\n writer.write(\"String_Node_Str\");\n writeSelect(writer, selCall, tableAlias, call);\n writer.write(\"String_Node_Str\");\n }\n commaNeeded = true;\n }\n if (getWhereClause() != null) {\n writer.write(\"String_Node_Str\");\n printer.printExpression(getWhereClause());\n }\n call.setSQLString(writer.toString());\n return call;\n } catch (IOException exception) {\n throw ValidationException.fileError(exception);\n }\n}\n"
|
"public static void limitDataPointLabelLocation(Chart cm, IDisplayServer xs, Label laDataPoint, double dScale, Location lo) throws ChartException {\n if (lo == null || cm instanceof ChartWithoutAxes) {\n return;\n }\n ChartWithAxes cwa = (ChartWithAxes) cm;\n Plot p = cwa.getPlot();\n BoundingBox bb = Methods.computeBox(xs, IConstants.ABOVE, laDataPoint, 0, 0);\n Bounds boCa = p.getBounds().scaledInstance(dScale);\n double rotation = laDataPoint.getCaption().getFont().getRotation();\n int state = 0;\n switch(lp.getValue()) {\n case Position.ABOVE:\n if (rotation > 0 && rotation < 90) {\n state = 8;\n } else if (rotation < 0 && rotation > -90) {\n state = 2;\n } else {\n state = 1;\n }\n break;\n case Position.RIGHT:\n if (rotation > 0 && rotation < 90) {\n state = 8;\n } else if (rotation < 0 && rotation > -90) {\n state = 6;\n } else {\n state = 7;\n }\n break;\n case Position.BELOW:\n if (rotation > 0 && rotation < 90) {\n state = 4;\n } else if (rotation < 0 && rotation > -90) {\n state = 6;\n } else {\n state = 5;\n }\n break;\n case Position.LEFT:\n if (rotation > 0 && rotation < 90) {\n state = 4;\n } else if (rotation < 0 && rotation > -90) {\n state = 2;\n } else {\n state = 3;\n }\n break;\n }\n double dYmin, dYmax, dXmin, dXmax;\n switch(state) {\n case 1:\n dYmin = boCa.getTop() + bb.getHeight();\n dYmax = boCa.getTop() + boCa.getHeight();\n dXmin = boCa.getLeft() + bb.getWidth() / 2;\n dXmax = boCa.getLeft() + boCa.getWidth() - bb.getWidth() / 2;\n break;\n case 2:\n dYmin = boCa.getTop() + bb.getHeight();\n dYmax = boCa.getTop() + boCa.getHeight();\n dXmin = boCa.getLeft() + bb.getWidth();\n dXmax = boCa.getLeft() + boCa.getWidth();\n break;\n case 3:\n dYmin = boCa.getTop() + bb.getHeight() / 2;\n dYmax = boCa.getTop() + boCa.getHeight() - bb.getHeight() / 2;\n dXmin = boCa.getLeft() + bb.getWidth();\n dXmax = boCa.getLeft() + boCa.getWidth();\n break;\n case 4:\n dYmin = boCa.getTop();\n dYmax = boCa.getTop() + boCa.getHeight() - bb.getHeight();\n dXmin = boCa.getLeft() + bb.getWidth();\n dXmax = boCa.getLeft() + boCa.getWidth();\n break;\n case 5:\n dYmin = boCa.getTop();\n dYmax = boCa.getTop() + boCa.getHeight() - bb.getHeight();\n dXmin = boCa.getLeft() + bb.getWidth() / 2;\n dXmax = boCa.getLeft() + boCa.getWidth() - bb.getWidth() / 2;\n break;\n case 6:\n dYmin = boCa.getTop();\n dYmax = boCa.getTop() + boCa.getHeight() - bb.getHeight();\n dXmin = boCa.getLeft();\n dXmax = boCa.getLeft() + boCa.getWidth() - bb.getWidth();\n break;\n case 7:\n dYmin = boCa.getTop() + bb.getHeight() / 2;\n dYmax = boCa.getTop() + boCa.getHeight() - bb.getHeight() / 2;\n dXmin = boCa.getLeft();\n dXmax = boCa.getLeft() + boCa.getWidth() - bb.getWidth();\n break;\n case 8:\n dYmin = boCa.getTop() + bb.getHeight();\n dYmax = boCa.getTop() + boCa.getHeight();\n dXmin = boCa.getLeft();\n dXmax = boCa.getLeft() + boCa.getWidth() - bb.getWidth();\n break;\n default:\n dYmin = lo.getY();\n dYmax = lo.getY();\n dXmin = lo.getX();\n dXmax = lo.getX();\n break;\n }\n if (lo.getY() < dYmin) {\n lo.setY(dYmin);\n }\n if (lo.getY() > dYmax) {\n lo.setY(dYmax);\n }\n if (lo.getX() < dXmin) {\n lo.setX(dXmin);\n }\n if (lo.getX() > dXmax) {\n lo.setX(dXmax);\n }\n}\n"
|
"public QualityControl getQualityControl(CallPeer peer) {\n if (peer instanceof CallPeerJabberImpl)\n return ((CallPeerJabberImpl) peer).getMediaHandler().getQualityControl();\n else\n return null;\n}\n"
|
"public MedicationAdministrationDosageComponent setRate(Type value) throws FHIRFormatError {\n if (value != null && !(value instanceof Ratio || value instanceof Quantity))\n throw new FHIRFormatError(\"String_Node_Str\" + value.fhirType());\n this.rate = value;\n return this;\n}\n"
|
"private void createList(Composite container, final ListingParameter listParam) {\n boolean isRequired = listParam.getHandle().isRequired();\n boolean isStringType = listParam.getHandle().getDataType().equals(DesignChoiceConstants.PARAM_TYPE_STRING);\n Object value = null;\n try {\n value = listParam.converToDataType(listParam.getDefaultValues() == null ? new Object[0] : listParam.getDefaultValues().toArray());\n } catch (BirtException e) {\n }\n if (paramValues.containsKey(listParam.getHandle().getName())) {\n value = paramValues.get(listParam.getHandle().getName());\n if (value != null) {\n listParam.setSelectionValue(value);\n }\n }\n ListViewer listViewer = new ListViewer(container);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.heightHint = 70;\n listViewer.getList().setLayoutData(gd);\n List list = new ArrayList();\n if (isStringType && !isRequired) {\n list.add(blankValueChoice);\n }\n list.addAll(listParam.getValueList());\n try {\n checkParam(listParam.converToDataType(listParam.getDefaultValue()), list);\n } catch (BirtException e1) {\n }\n if (!isRequired) {\n list.add(InputParameterDialog.nullValueChoice);\n }\n for (Iterator iterator = list.iterator(); iterator.hasNext(); ) {\n IParameterSelectionChoice choice = (IParameterSelectionChoice) iterator.next();\n String label = (choice.getLabel() == null ? String.valueOf(choice.getValue()) : choice.getLabel());\n if (label != null) {\n listViewer.getList().add(label);\n listViewer.getList().setData(label, choice.getValue());\n }\n }\n if (value == null && !isRequired) {\n listViewer.getList().select(listViewer.getList().getItemCount() - 1);\n } else {\n List newValueList = new ArrayList();\n List oldvalueList = new ArrayList();\n if (value instanceof Object[]) {\n oldvalueList = Arrays.asList((Object[]) value);\n } else {\n oldvalueList.add(value);\n }\n for (int i = 0; i < listViewer.getList().getItemCount(); i++) {\n Object item = listViewer.getList().getData(listViewer.getList().getItem(i));\n if (oldvalueList.indexOf(item) >= 0) {\n listViewer.getList().select(i);\n newValueList.add(listViewer.getList().getData(listViewer.getList().getItem(i)));\n }\n }\n paramValues.put(listParam.getHandle().getName(), newValueList.toArray(new Object[newValueList.size()]));\n }\n if (listParam.getParentGroup() instanceof CascadingParameterGroup) {\n CascadingParameterGroup group = (CascadingParameterGroup) listParam.getParentGroup();\n if (group.getPreParameter(listParam) != null) {\n postParamLists.put(group.getPreParameter(listParam), listViewer.getList());\n }\n }\n listViewer.getList().addSelectionListener(new SelectionListener() {\n public void widgetDefaultSelected(SelectionEvent e) {\n }\n public void widgetSelected(SelectionEvent e) {\n org.eclipse.swt.widgets.List list = (org.eclipse.swt.widgets.List) e.getSource();\n String[] strs = list.getSelection();\n if (strs != null && strs.length > 0) {\n List array = new ArrayList();\n for (int i = 0; i < strs.length; i++) {\n Object obj = list.getData(strs[i]);\n array.add(obj);\n }\n Object[] objs = new Object[array.size()];\n array.toArray(objs);\n paramValues.put(listParam.getHandle().getName(), objs);\n } else {\n paramValues.remove(listParam.getHandle().getName());\n }\n if (listParam.getParentGroup() instanceof CascadingParameterGroup) {\n CascadingParameterGroup group = (CascadingParameterGroup) listParam.getParentGroup();\n if (group.getPostParameter(listParam) != null) {\n cascadingParamValueChanged(group, listParam);\n }\n }\n }\n });\n}\n"
|
"public void mouseMove(MouseEvent e) {\n String tooltip = null;\n TableItem item = ((Table) e.widget).getItem(new Point(e.x, e.y));\n if (item != null) {\n List<Object[]> data = (List<Object[]>) tableViewerColumns.getData(KEY_PREVIEW_DATA);\n if (data != null) {\n StringBuilder sb = new StringBuilder();\n int index = ((Table) e.widget).indexOf(item);\n int i = 0;\n for (; i < data.size(); i++) {\n if (sb.length() > 45) {\n break;\n }\n if (data.get(i)[index] != null) {\n if (i != 0)\n sb.append(\"String_Node_Str\");\n sb.append(String.valueOf(data.get(i)[index]));\n }\n }\n if (data.get(i)[index] != null) {\n if (i != 0)\n sb.append(\"String_Node_Str\");\n sb.append(String.valueOf(data.get(i)[index]));\n }\n }\n if (i < data.size()) {\n sb.append(\"String_Node_Str\");\n }\n tooltip = sb.toString();\n }\n table.setToolTipText(tooltip);\n}\n"
|
"protected List<Afl> extractAfl(final byte[] pGpo) {\n List<Afl> list = new ArrayList<Afl>();\n ByteArrayInputStream bai = new ByteArrayInputStream(pAfl);\n while (bai.available() >= 4) {\n Afl afl = new Afl();\n afl.setSfi(bai.read() >> 3);\n afl.setFirstRecord(bai.read());\n afl.setLastRecord(bai.read());\n afl.setOfflineAuthentication(bai.read() == 1);\n list.add(afl);\n }\n return list;\n}\n"
|
"private ValidatorInfo parseValidator(ComponentCtrl compCtrl, Annotation anno) {\n ValidatorInfo info = new ValidatorInfo();\n for (final Iterator<Entry<String, Object>> it = anno.getAttributes().entrySet().iterator(); it.hasNext(); ) {\n final Entry<String, Object> entry = it.next();\n final String tag = (String) entry.getKey();\n final Object tagExpr = entry.getValue();\n if (\"String_Node_Str\".equals(tag)) {\n info.expr = (String) tagExpr;\n } else {\n if (info.args == null) {\n info.args = new HashMap<String, Object>();\n }\n info.args.put(tag, tagExpr);\n }\n }\n if (Strings.isBlank(info.expr)) {\n throw new UiException(\"String_Node_Str\");\n }\n info.args = info.args == null ? null : parsedArgs(info.args);\n return info;\n}\n"
|
"public static void initialize() {\n blockMachine = addBlock(new BlockMachine());\n blockDevice = addBlock(new BlockDevice());\n blockDynamo = addBlock(new BlockDynamo());\n blockCell = addBlock(new BlockCell());\n blockTank = addBlock(new BlockTank());\n blockStrongbox = addBlock(new BlockStrongbox());\n blockCache = addBlock(new BlockCache());\n blockTesseract = addBlock(new BlockTesseract());\n blockLamp = addBlock(new BlockLamp());\n blockGlass = addBlock(new BlockGlass());\n blockRockwool = addBlock(new BlockRockwool());\n GameRegistry.registerBlock(blockMachine, ItemBlockMachine.class, \"String_Node_Str\");\n GameRegistry.registerBlock(blockDevice, ItemBlockDevice.class, \"String_Node_Str\");\n GameRegistry.registerBlock(blockDynamo, ItemBlockDynamo.class, \"String_Node_Str\");\n GameRegistry.registerBlock(blockEnergyCell, ItemBlockEnergyCell.class, \"String_Node_Str\");\n GameRegistry.registerBlock(blockTank, ItemBlockTank.class, \"String_Node_Str\");\n GameRegistry.registerBlock(blockStrongbox, ItemBlockStrongbox.class, \"String_Node_Str\");\n GameRegistry.registerBlock(blockCache, ItemBlockCache.class, \"String_Node_Str\");\n GameRegistry.registerBlock(blockTesseract, ItemBlockTesseract.class, \"String_Node_Str\");\n GameRegistry.registerBlock(blockLamp, ItemBlockLamp.class, \"String_Node_Str\");\n GameRegistry.registerBlock(blockGlass, ItemBlockGlass.class, \"String_Node_Str\");\n GameRegistry.registerBlock(blockRockwool, ItemBlockRockwool.class, \"String_Node_Str\");\n for (IInitializer initializer : blockList) {\n initializer.initialize();\n }\n}\n"
|
"public void addTextValue(String appendValue) {\n isNullValue = false;\n if (appendValue != null) {\n value = value + appendValue;\n }\n}\n"
|
"public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n } else if (id == R.id.action_normal) {\n listView.setParallax(false);\n return true;\n } else if (id == R.id.action_parallax) {\n listView.setParallax(true);\n return true;\n } else if (id == R.id.action_show_head) {\n listView.setHideHeader(false);\n return true;\n } else if (id == R.id.action_hide_head) {\n listView.hideHeadView();\n return true;\n } else if (id == R.id.action_disable_zoom) {\n listView.setEnableZoom(false);\n return true;\n } else if (id == R.id.action_enable_zoom) {\n listView.setEnableZoom(true);\n return true;\n }\n return super.onOptionsItemSelected(item);\n}\n"
|
"public Date getFieldDate() {\n return realmGetter$fieldDate();\n}\n"
|
"public Alignments.AlignmentEntry next() {\n if (!alignmentEntryReader.hasNext(collection, numberOfEntries())) {\n throw new NoSuchElementException();\n }\n return collection.getAlignmentEntries(alignmentEntryReader.incrementEntryIndex());\n}\n"
|
"public void deserialize(ReusableBuffer buf) {\n object_data = new ObjectData();\n object_data.deserialize(buf);\n}\n"
|
"public void zoomFit() {\n try {\n Rectangle2D content = dataset().bounds();\n if (content == null) {\n return;\n }\n double w = getWidth() / content.getWidth();\n double h = getHeight() / content.getHeight();\n double scale = Math.min(w, h);\n scale = scale / getScale();\n Point2D center = new Point2D.Double(content.getCenterX(), content.getCenterY());\n zoomAbs(center, scale);\n panToAbs(center);\n } catch (Exception e) {\n }\n}\n"
|
"private String getTimestamp() {\n Calendar calendar = new GregorianCalendar();\n StringBuilder timestamp = new StringBuilder();\n timestamp.append(calendar.get(Calendar.YEAR));\n timestamp.append((\"String_Node_Str\"));\n timestamp.append(StringUtils.pad(calendar.get(Calendar.MONTH)));\n timestamp.append((\"String_Node_Str\"));\n timestamp.append(StringUtils.pad(calendar.get(Calendar.DAY_OF_MONTH)));\n timestamp.append((\"String_Node_Str\"));\n timestamp.append(StringUtils.pad(calendar.get(Calendar.HOUR_OF_DAY)));\n timestamp.append((\"String_Node_Str\"));\n timestamp.append(StringUtils.pad(calendar.get(Calendar.MINUTE)));\n timestamp.append((\"String_Node_Str\"));\n timestamp.append(StringUtils.pad(calendar.get(Calendar.SECOND)));\n return timestamp.toString();\n}\n"
|
"private void generateInstanceStream(PartUsageLink usageLink, double tx, double ty, double tz, double rx, double ry, double rz, List<Integer> filteredPath) throws JAXBException, IOException {\n PartMaster pm = usageLink.getComponent();\n PartRevision partR = pm.getLastRevision();\n PartIteration partI = partR.getLastIteration();\n String partIterationId = new StringBuilder().append(pm.getNumber()).append(\"String_Node_Str\").append(partR.getVersion()).append(\"String_Node_Str\").append(partI.getIteration()).toString();\n List<GeometryDTO> files = new ArrayList<GeometryDTO>();\n List<InstanceAttributeDTO> attributes = new ArrayList<InstanceAttributeDTO>();\n for (Geometry geometry : partI.getGeometries()) {\n files.add(mapper.map(geometry, GeometryDTO.class));\n }\n for (InstanceAttribute attr : partI.getInstanceAttributes().values()) {\n attributes.add(mapper.map(attr, InstanceAttributeDTO.class));\n }\n for (CADInstance instance : usageLink.getCadInstances()) {\n double atx = tx + getRelativeTxAfterParentRotation(rx, ry, rz, instance.getTx(), instance.getTy(), instance.getTz());\n double aty = ty + getRelativeTyAfterParentRotation(rx, ry, rz, instance.getTx(), instance.getTy(), instance.getTz());\n double atz = tz + getRelativeTzAfterParentRotation(rx, ry, rz, instance.getTx(), instance.getTy(), instance.getTz());\n double arx = rx + instance.getRx();\n double ary = ry + instance.getRy();\n double arz = rz + instance.getRz();\n if (partI.getGeometries().size() > 0 && filteredPath.isEmpty()) {\n if (getAddComma())\n getEntityStream().write(getComma());\n getMarshaller().marshallToJSON(new InstanceDTO(partIterationId, atx, aty, atz, arx, ary, arz, files, attributes), getEntityStream());\n setAddComma(true);\n } else {\n for (PartUsageLink component : partI.getComponents()) {\n if (filteredPath.isEmpty()) {\n generateInstanceStream(component, atx, aty, atz, arx, ary, arz, filteredPath);\n } else if (component.getId() == filteredPath.get(0)) {\n ArrayList<Integer> copyWithoutCurrentId = new ArrayList<Integer>(filteredPath);\n copyWithoutCurrentId.remove(0);\n generateInstanceStream(component, atx, aty, atz, arx, ary, arz, copyWithoutCurrentId);\n }\n }\n }\n }\n}\n"
|
"private int addCuts(IloCplex cplex, int cut) throws UnknownObjectException, IloException {\n List<Integer> rows = sto.projectModelParamsAndAddCuts();\n return rows.size() + mp.rlt.addRowsAsFactors(rows);\n}\n"
|
"public MethodBody convertMethodBody(String path, boolean isStatic, int scriptIndex, int classIndex, ABC abc, Trait trait, AVM2ConstantPool constants, List<MethodInfo> method_info, ScopeStack scopeStack, boolean isStaticInitializer, List<String> fullyQualifiedNames, Traits initTraits) throws InterruptedException {\n MethodBody body = clone();\n AVM2Code code = body.getCode();\n code.markMappedOffsets();\n code.fixJumps(path, body);\n if (Configuration.autoDeobfuscate.get()) {\n try {\n code.removeTraps(constants, trait, method_info.get(this.method_info), body, abc, scriptIndex, classIndex, isStatic, path);\n } catch (ThreadDeath | InterruptedException ex) {\n throw ex;\n } catch (Throwable ex) {\n return this;\n }\n }\n return body;\n}\n"
|
"public AFPChain alignOptimal(Atom[] ca1, Atom[] ca2, Object param, AFPChain[] alignments) throws StructureException {\n long startTime = System.currentTimeMillis();\n if (alignments.length != ca2.length) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n Atom[] ca2p = StructureTools.cloneCAArray(ca2);\n AFPChain unaligned = super.align(ca1, ca2, param);\n AFPChain bestAlignment = unaligned;\n if (debug) {\n System.out.print(\"String_Node_Str\");\n }\n if (alignments != null) {\n alignments[0] = unaligned;\n }\n for (int cp = 1; cp < ca2.length; cp++) {\n Atom[] ca2p = StructureTools.cloneCAArray(ca2);\n AFPChain currentAlignment = alignPermuted(ca1, ca2p, param, cp);\n if (debug)\n System.out.print(\"String_Node_Str\");\n try {\n currentAlignment.setName2(ca2[0].getGroup().getChain().getParent().getName() + \"String_Node_Str\" + cp);\n } catch (Exception e) {\n }\n double currentScore = currentAlignment.getAlignScore();\n if (alignments != null) {\n alignments[cp] = currentAlignment;\n }\n if (currentScore > bestAlignment.getAlignScore()) {\n bestAlignment = currentAlignment;\n }\n }\n if (debug) {\n long elapsedTime = System.currentTimeMillis() - startTime;\n System.out.println();\n System.out.format(\"String_Node_Str\", ca2.length, elapsedTime / 1000., (double) elapsedTime / ca2.length);\n }\n return bestAlignment;\n}\n"
|
"public synchronized void init(String connStr, String path, BoardSettings info) throws BoardInitException {\n this.table = info.getTable();\n if (this.insertQuery == null) {\n this.insertQuery = String.format(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", this.table, this.table);\n }\n this.updateQuery = String.format(\"String_Node_Str\" + \"String_Node_Str\", table);\n String selectMediaQuery = String.format(\"String_Node_Str\", table);\n try {\n conn = DriverManager.getConnection(connStr);\n conn.setAutoCommit(false);\n conn.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);\n this.createTables();\n insertStmt = conn.prepareStatement(insertQuery);\n updateStmt = conn.prepareStatement(updateQuery);\n selectMediaStmt = conn.prepareStatement(selectMediaQuery);\n } catch (SQLException e) {\n throw new BoardInitException(e);\n }\n}\n"
|
"public void doFree(DownloadLink downloadLink) throws Exception, PluginException {\n boolean resumable = true;\n int maxchunks = 0;\n Form freeform = null;\n Form[] allForms = br.getForms();\n if (allForms == null || allForms.length == 0)\n throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);\n for (Form singleForm : allForms) {\n if (singleForm.containsHTML(\"String_Node_Str\")) {\n freeform = singleForm;\n break;\n }\n }\n if (freeform != null) {\n freeform.remove(null);\n freeform.remove(\"String_Node_Str\");\n freeform.put(\"String_Node_Str\", \"String_Node_Str\");\n br.submitForm(freeform);\n }\n checkErrors(downloadLink);\n String md5hash = br.getRegex(\"String_Node_Str\").getMatch(0);\n if (md5hash != null) {\n md5hash = md5hash.trim();\n logger.info(\"String_Node_Str\" + md5hash);\n downloadLink.setMD5Hash(md5hash);\n }\n br.setFollowRedirects(false);\n Form DLForm = br.getFormbyProperty(\"String_Node_Str\", \"String_Node_Str\");\n if (DLForm == null)\n throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);\n DLForm.remove(null);\n DLForm.remove(\"String_Node_Str\");\n String ttt = br.getRegex(\"String_Node_Str\").getMatch(0);\n if (ttt == null)\n ttt = br.getRegex(\"String_Node_Str\").getMatch(0);\n if (ttt != null) {\n logger.info(\"String_Node_Str\" + ttt.trim() + \"String_Node_Str\");\n int tt = Integer.parseInt(ttt);\n sleep(tt * 1001, downloadLink);\n }\n String passCode = null;\n boolean password = false;\n boolean recaptcha = false;\n if (br.containsHTML(\"String_Node_Str\")) {\n password = true;\n logger.info(\"String_Node_Str\");\n }\n if (br.containsHTML(\"String_Node_Str\")) {\n logger.info(\"String_Node_Str\");\n String[][] letters = new Regex(Encoding.htmlDecode(br.toString()), \"String_Node_Str\").getMatches();\n if (letters == null || letters.length == 0) {\n logger.warning(\"String_Node_Str\");\n throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);\n }\n SortedMap<Integer, String> capMap = new TreeMap<Integer, String>();\n for (String[] letter : letters) {\n capMap.put(Integer.parseInt(letter[0]), letter[1]);\n }\n StringBuilder code = new StringBuilder();\n for (String value : capMap.values()) {\n code.append(value);\n }\n DLForm.put(\"String_Node_Str\", code.toString());\n logger.info(\"String_Node_Str\" + code.toString() + \"String_Node_Str\");\n } else if (br.containsHTML(\"String_Node_Str\")) {\n logger.info(\"String_Node_Str\");\n String[] sitelinks = HTMLParser.getHttpLinks(br.toString(), null);\n String captchaurl = null;\n if (sitelinks == null || sitelinks.length == 0) {\n logger.warning(\"String_Node_Str\");\n throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);\n }\n for (String link : sitelinks) {\n if (link.contains(\"String_Node_Str\")) {\n captchaurl = link;\n break;\n }\n }\n if (captchaurl == null) {\n logger.warning(\"String_Node_Str\");\n throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);\n }\n String code = getCaptchaCode(captchaurl, downloadLink);\n DLForm.put(\"String_Node_Str\", code);\n logger.info(\"String_Node_Str\" + code + \"String_Node_Str\");\n } else if (br.containsHTML(\"String_Node_Str\")) {\n logger.info(\"String_Node_Str\");\n PluginForHost recplug = JDUtilities.getPluginForHost(\"String_Node_Str\");\n jd.plugins.hoster.DirectHTTP.Recaptcha rc = ((DirectHTTP) recplug).getReCaptcha(br);\n rc.parse();\n rc.load();\n File cf = rc.downloadCaptcha(getLocalCaptchaFile());\n String c = getCaptchaCode(cf, downloadLink);\n if (password == true) {\n if (downloadLink.getStringProperty(\"String_Node_Str\", null) == null) {\n passCode = getUserInput(null, downloadLink);\n } else {\n passCode = downloadLink.getStringProperty(\"String_Node_Str\", null);\n }\n rc.getForm().put(\"String_Node_Str\", passCode);\n logger.info(\"String_Node_Str\" + passCode + \"String_Node_Str\");\n password = false;\n }\n recaptcha = true;\n rc.setCode(c);\n logger.info(\"String_Node_Str\" + c + \"String_Node_Str\");\n }\n if (recaptcha == false) {\n if (password == true) {\n if (downloadLink.getStringProperty(\"String_Node_Str\", null) == null) {\n passCode = getUserInput(null, downloadLink);\n } else {\n passCode = downloadLink.getStringProperty(\"String_Node_Str\", null);\n }\n DLForm.put(\"String_Node_Str\", passCode);\n logger.info(\"String_Node_Str\" + passCode + \"String_Node_Str\");\n }\n jd.plugins.BrowserAdapter.openDownload(br, downloadLink, DLForm, resumable, maxchunks);\n logger.info(\"String_Node_Str\");\n }\n if (!(dl.getConnection().isContentDisposition())) {\n br.followConnection();\n logger.info(\"String_Node_Str\");\n String dllink = br.getRedirectLocation();\n if (dllink == null) {\n checkErrors(downloadLink);\n if (br.containsHTML(\"String_Node_Str\"))\n throw new PluginException(LinkStatus.ERROR_IP_BLOCKED, null, 10 * 60 * 1001l);\n if (br.containsHTML(\"String_Node_Str\")) {\n logger.warning(\"String_Node_Str\" + passCode + \"String_Node_Str\");\n downloadLink.setProperty(\"String_Node_Str\", null);\n throw new PluginException(LinkStatus.ERROR_RETRY);\n }\n if (br.containsHTML(\"String_Node_Str\")) {\n logger.warning(\"String_Node_Str\");\n throw new PluginException(LinkStatus.ERROR_CAPTCHA);\n }\n if (dllink == null) {\n dllink = br.getRegex(\"String_Node_Str\").getMatch(0);\n if (dllink == null) {\n dllink = br.getRegex(\"String_Node_Str\").getMatch(0);\n if (dllink == null) {\n dllink = br.getRegex(\"String_Node_Str\").getMatch(0);\n if (dllink == null) {\n dllink = br.getRegex(\"String_Node_Str\").getMatch(0);\n if (dllink == null)\n dllink = br.getRegex(\"String_Node_Str\").getMatch(0);\n }\n }\n }\n }\n }\n if (dllink == null) {\n logger.warning(\"String_Node_Str\");\n throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);\n }\n logger.info(\"String_Node_Str\" + dllink + \"String_Node_Str\");\n dl = jd.plugins.BrowserAdapter.openDownload(br, downloadLink, dllink, resumable, maxchunks);\n }\n if (passCode != null) {\n downloadLink.setProperty(\"String_Node_Str\", passCode);\n }\n boolean error2 = false;\n try {\n if (dl.getConnection().getContentType().contains(\"String_Node_Str\")) {\n error2 = true;\n }\n } catch (Exception e) {\n error2 = true;\n }\n if (error2 == true) {\n logger.warning(\"String_Node_Str\");\n br.followConnection();\n checkServerErrors();\n throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);\n }\n dl.startDownload();\n}\n"
|
"protected void setupHandlerForKeepAsElementPolicy(UnmarshalRecord unmarshalRecord, XPathFragment xPathFragment, Attributes atts) {\n SAXFragmentBuilder builder = unmarshalRecord.getFragmentBuilder();\n builder.setOwningRecord(unmarshalRecord);\n try {\n String namespaceURI = XMLConstants.EMPTY_STRING;\n if (xPathFragment.getNamespaceURI() != null) {\n namespaceURI = xPathFragment.getNamespaceURI();\n }\n String qName = xPathFragment.getLocalName();\n if (xPathFragment.getPrefix() != null) {\n qName = xPathFragment.getPrefix() + unmarshalRecord.getNamespaceSeparator() + qName;\n }\n if (!(unmarshalRecord.getPrefixesForFragment().isEmpty())) {\n for (Entry<String, String> next : unmarshalRecord.getPrefixesForFragment().entrySet()) {\n builder.startPrefixMapping(next.getKey(), next.getValue());\n }\n }\n builder.startElement(namespaceURI, xPathFragment.getLocalName(), qName, atts);\n XMLReader xmlReader = unmarshalRecord.getXMLReader();\n xmlReader.setContentHandler(builder);\n xmlReader.setLexicalHandler(null);\n } catch (SAXException ex) {\n }\n}\n"
|
"public void clear() {\n bits.clear();\n}\n"
|
"public static ConsumerEndpoint findMatch(String serviceId, Map<String, ConsumerEndpoint> endpoints) {\n if (endpoints.containsKey(serviceId)) {\n logger.debug(\"String_Node_Str\", serviceId);\n return endpoints.get(serviceId);\n }\n for (Map.Entry<String, ConsumerEndpoint> entry : endpoints.entrySet()) {\n String key = entry.getKey();\n String keyMod = key.replaceAll(\"String_Node_Str\" + Constants.PARAM_RESOURCE_ID + \"String_Node_Str\", \"String_Node_Str\");\n logger.trace(\"String_Node_Str\", keyMod);\n if (serviceId.matches(keyMod)) {\n logger.debug(\"String_Node_Str\", serviceId, key);\n ConsumerEndpoint endpoint = endpoints.get(key);\n int index = key.indexOf(\"String_Node_Str\");\n if (index != -1) {\n String resourceId = serviceId.substring(index);\n if (resourceId.endsWith(\"String_Node_Str\")) {\n resourceId = resourceId.substring(0, resourceId.length() - 1);\n }\n endpoint.setResourceId(resourceId);\n logger.trace(\"String_Node_Str\", resourceId);\n }\n return endpoint;\n }\n }\n logger.debug(\"String_Node_Str\", serviceId);\n return null;\n}\n"
|
"public static double adjustedRandError(ImageProcessor label, ImageProcessor proposal, double binaryThreshold) {\n ByteProcessor binaryLabel = new ByteProcessor(label.getWidth(), label.getHeight());\n ByteProcessor binaryProposal = new ByteProcessor(proposal.getWidth(), proposal.getHeight());\n for (int x = 0; x < label.getWidth(); x++) for (int y = 0; y < label.getHeight(); y++) {\n binaryLabel.set(x, y, label.get(x, y) > 0 ? 255 : 0);\n binaryProposal.set(x, y, proposal.get(x, y) > 0 ? 255 : 0);\n }\n ShortProcessor components1 = (ShortProcessor) connectedComponents(new ImagePlus(\"String_Node_Str\", binaryLabel), 4).allRegions.getProcessor();\n ShortProcessor components2 = (ShortProcessor) connectedComponents(new ImagePlus(\"String_Node_Str\", binaryProposal), 4).allRegions.getProcessor();\n return 1 - adjustedRandIndex(components1, components2);\n}\n"
|
"public String getResult() {\n if (myResult != null) {\n return myResult;\n } else {\n return topDebugger().getResult();\n }\n}\n"
|
"private int parseDecimal(int bufferIndex, Context context) {\n double d = 0.0;\n long part = 0;\n boolean neg = (byteBuffer[bufferIndex] == '-');\n if (neg) {\n ++bufferIndex;\n }\n int limit = bufferLimit;\n long shift = 0;\n outer1: while (true) {\n try {\n for (final byte[] buffer = byteBuffer; bufferIndex < limit; bufferIndex++) {\n final int b = buffer[bufferIndex];\n if (b >= '0' && b <= '9') {\n shift *= 10;\n part = part * 10 + (b - '0');\n } else if (b == '.') {\n shift = 1;\n } else {\n break outer1;\n }\n }\n } finally {\n if (bufferIndex == limit && ((bufferIndex = fillBuffer()) == -1)) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n }\n }\n if (neg) {\n part *= -1;\n }\n d = shift != 0 ? (double) part / (double) shift : part;\n if (byteBuffer[bufferIndex] == 'e' || byteBuffer[bufferIndex] == 'E') {\n ++bufferIndex;\n part = 0;\n neg = byteBuffer[bufferIndex] == '-';\n bufferIndex = neg ? ++bufferIndex : bufferIndex;\n outer1: while (true) {\n for (final byte[] buffer = byteBuffer; bufferIndex < limit; bufferIndex++) {\n final int b = buffer[bufferIndex];\n if (b >= '0' && b <= '9') {\n part = part * 10 + (b - '0');\n continue;\n }\n break outer1;\n }\n }\n d = (neg) ? d / (double) Math.pow(10, part) : d * (double) Math.pow(10, part);\n }\n context.doubleHolder = d;\n return bufferIndex;\n}\n"
|
"protected void onInitialize() {\n super.onInitialize();\n Form<OClass> form = new Form<OClass>(\"String_Node_Str\");\n structureTable = new OrienteerStructureTable<OClass, String>(\"String_Node_Str\", getModel(), OClassMetaPanel.OCLASS_ATTRS) {\n protected Component getValueComponent(String id, final IModel<String> rowModel) {\n return new OClassMetaPanel<Object>(id, modeModel, OClassPage.this.getModel(), rowModel);\n }\n };\n structureTable.addCommand(new EditSchemaCommand<OClass>(structureTable, modeModel));\n structureTable.addCommand(new SaveSchemaCommand<OClass>(structureTable, modeModel, getModel()));\n form.add(structureTable);\n List<IColumn<OProperty, String>> pColumns = new ArrayList<IColumn<OProperty, String>>();\n pColumns.add(new CheckBoxColumn<OProperty, String, String>(null, OPropertyFullNameConverter.INSTANCE));\n pColumns.add(new OPropertyDefinitionColumn<OProperty>(new ResourceModel(\"String_Node_Str\"), \"String_Node_Str\", \"String_Node_Str\"));\n pColumns.add(new OPropertyMetaColumn(OPropertyPrototyper.TYPE));\n pColumns.add(new OPropertyMetaColumn(OPropertyPrototyper.LINKED_TYPE));\n pColumns.add(new OPropertyMetaColumn(OPropertyPrototyper.LINKED_CLASS));\n pColumns.add(new OPropertyMetaColumn(OPropertyPrototyper.NOT_NULL));\n pColumns.add(new OPropertyMetaColumn(OPropertyPrototyper.MANDATORY));\n pColumns.add(new OPropertyMetaColumn(OPropertyPrototyper.READONLY));\n pColumns.add(new OPropertyMetaColumn(CustomAttributes.DISPLAYABLE.getName()));\n pColumns.add(new OPropertyMetaColumn(CustomAttributes.CALCULABLE.getName()));\n pColumns.add(new OPropertyMetaColumn(OPropertyPrototyper.MIN));\n pColumns.add(new OPropertyMetaColumn(OPropertyPrototyper.MAX));\n OPropertiesDataProvider pProvider = new OPropertiesDataProvider(getModel(), showParentPropertiesModel);\n pProvider.setSort(\"String_Node_Str\", SortOrder.ASCENDING);\n pTable = new OrienteerDataTable<OProperty, String>(\"String_Node_Str\", pColumns, pProvider, 20);\n pTable.addCommand(new CreateOPropertyCommand(pTable, getModel()));\n pTable.addCommand(new ShowHideParentsCommand<OProperty>(getModel(), pTable, showParentPropertiesModel));\n pTable.addCommand(new DeleteOPropertyCommand(pTable));\n pTable.addCommand(new CreateOIndexFromOPropertiesCommand(pTable, getModel()));\n pTable.setCaptionModel(new ResourceModel(\"String_Node_Str\"));\n form.add(pTable);\n List<IColumn<OIndex<?>, String>> iColumns = new ArrayList<IColumn<OIndex<?>, String>>();\n iColumns.add(new CheckBoxColumn<OIndex<?>, String, String>(null, OIndexNameConverter.INSTANCE));\n iColumns.add(new OIndexDefinitionColumn<OIndex<?>>(new ResourceModel(\"String_Node_Str\"), \"String_Node_Str\", \"String_Node_Str\"));\n iColumns.add(new OIndexMetaColumn(OIndexPrototyper.TYPE));\n iColumns.add(new OIndexMetaColumn(OIndexPrototyper.DEF_FIELDS));\n iColumns.add(new OIndexMetaColumn(OIndexPrototyper.DEF_COLLATE));\n iColumns.add(new OIndexMetaColumn(OIndexPrototyper.DEF_NULLS_IGNORED));\n iColumns.add(new OIndexMetaColumn(OIndexPrototyper.SIZE));\n iColumns.add(new OIndexMetaColumn(OIndexPrototyper.KEY_SIZE));\n OIndexiesDataProvider iProvider = new OIndexiesDataProvider(getModel(), showParentIndexesModel);\n iProvider.setSort(\"String_Node_Str\", SortOrder.ASCENDING);\n OrienteerDataTable<OIndex<?>, String> iTable = new OrienteerDataTable<OIndex<?>, String>(\"String_Node_Str\", iColumns, iProvider, 20);\n iTable.addCommand(new ShowHideParentsCommand<OIndex<?>>(getModel(), iTable, showParentIndexesModel));\n iTable.addCommand(new DeleteOIndexCommand(iTable));\n iTable.setCaptionModel(new ResourceModel(\"String_Node_Str\"));\n form.add(iTable);\n add(form);\n Form<OClass> sForm = new Form<OClass>(\"String_Node_Str\");\n List<IColumn<ORole, String>> sColumns = new ArrayList<IColumn<ORole, String>>();\n sColumns.add(new OEntityColumn<ORole>(\"String_Node_Str\", \"String_Node_Str\"));\n sColumns.add(new SecurityRightsColumn(OrientPermission.CREATE));\n sColumns.add(new SecurityRightsColumn(OrientPermission.READ));\n sColumns.add(new SecurityRightsColumn(OrientPermission.UPDATE));\n sColumns.add(new SecurityRightsColumn(OrientPermission.DELETE));\n OQueryDataProvider<ORole> sProvider = new OQueryDataProvider<ORole>(\"String_Node_Str\", ORole.class);\n sProvider.setSort(\"String_Node_Str\", SortOrder.ASCENDING);\n OrienteerDataTable<ORole, String> sTable = new OrienteerDataTable<ORole, String>(\"String_Node_Str\", sColumns, sProvider, 20);\n Command<ORole> saveCommand = new AbstractSaveCommand<ORole>(sTable, null);\n OSecurityHelper.secureComponent(saveCommand, OSecurityHelper.requireOClass(\"String_Node_Str\", OrientPermission.UPDATE));\n sTable.addCommand(saveCommand);\n sTable.setCaptionModel(new ResourceModel(\"String_Node_Str\"));\n sForm.add(sTable);\n add(sForm);\n}\n"
|
"public void acceptSearchMatch(final SearchMatch match) throws CoreException {\n IType element = (IType) match.getElement();\n if (toRecType(element).equals(recType)) {\n res[0] = element;\n }\n}\n"
|
"public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {\n super.getWailaBody(itemStack, currenttip, accessor, config);\n TileEntity tileEntity = accessor.getTileEntity();\n if (tileEntity instanceof PowerCellTileEntity) {\n PowerCellTileEntity powerCellTileEntity = (PowerCellTileEntity) tileEntity;\n int id = powerCellTileEntity.getNetworkId();\n if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {\n if (id != -1) {\n currenttip.add(TextFormatting.GREEN + \"String_Node_Str\" + new DecimalFormat(\"String_Node_Str\").format(id));\n } else {\n currenttip.add(TextFormatting.GREEN + \"String_Node_Str\");\n }\n }\n if (System.currentTimeMillis() - lastTime > 250) {\n lastTime = System.currentTimeMillis();\n RFToolsMessages.INSTANCE.sendToServer(new PacketGetInfoFromServer(RFTools.MODID, new PowerCellInfoPacketServer(powerCellTileEntity)));\n }\n long total = (PowerCellInfoPacketClient.tooltipBlocks - PowerCellInfoPacketClient.tooltipAdvancedBlocks - (long) PowerCellInfoPacketClient.tooltipSimpleBlocks) * PowerCellConfiguration.rfPerNormalCell;\n total += (long) PowerCellInfoPacketClient.tooltipAdvancedBlocks * PowerCellConfiguration.rfPerNormalCell * advancedFactor;\n total += (long) PowerCellInfoPacketClient.tooltipSimpleBlocks * PowerCellConfiguration.rfPerNormalCell / PowerCellConfiguration.simpleFactor;\n if (total > 2000000000) {\n total = 2000000000;\n }\n currenttip.add(TextFormatting.GREEN + \"String_Node_Str\" + PowerCellInfoPacketClient.tooltipEnergy + \"String_Node_Str\" + total + \"String_Node_Str\" + PowerCellInfoPacketClient.tooltipRfPerTick + \"String_Node_Str\");\n PowerCellTileEntity.Mode mode = powerCellTileEntity.getMode(accessor.getSide());\n if (mode == PowerCellTileEntity.Mode.MODE_INPUT) {\n currenttip.add(TextFormatting.YELLOW + \"String_Node_Str\");\n } else if (mode == PowerCellTileEntity.Mode.MODE_OUTPUT) {\n int cost = (int) ((PowerCellInfoPacketClient.tooltipCostFactor - 1.0f) * 1000.0f);\n currenttip.add(TextFormatting.YELLOW + \"String_Node_Str\" + cost / 10 + \"String_Node_Str\" + cost % 10 + \"String_Node_Str\");\n }\n }\n return currenttip;\n}\n"
|
"private boolean setupConnector(final INode node, List<ElementParameter> listParam, String paramName, SchemaProperty schemaProperty, boolean isOutput) {\n ComponentProperties rootProperty = node.getComponentProperties();\n boolean found = false;\n for (Connector connector : rootProperty.getPossibleConnectors(isOutput)) {\n if (!(schemaProperty.getValue() instanceof Schema)) {\n continue;\n }\n Schema schema = schemaProperty.getValue();\n if (connector instanceof PropertyPathConnector) {\n String linkedSchema = ((PropertyPathConnector) connector).getPropertyPath() + \"String_Node_Str\";\n if (paramName.equals(linkedSchema)) {\n found = true;\n ElementParameter param = new ElementParameter(node);\n param.setName(paramName);\n param.setFieldType(EParameterFieldType.SCHEMA_REFERENCE);\n if (!isOutput) {\n param.setContext(EConnectionType.FLOW_MAIN.getName());\n } else {\n param.setContext(connector.getName());\n }\n param.setCategory(EComponentCategory.TECHNICAL);\n IElementParameterDefaultValue defaultValue = new ElementParameterDefaultValue();\n defaultValue.setDefaultValue(new Schema.Parser().parse(schema.toString()));\n param.getDefaultValues().add(defaultValue);\n listParam.add(param);\n }\n }\n }\n return found;\n}\n"
|
"public Vector getTriggers() {\n Vector relTriggers = expr.getTriggers();\n Vector absTriggers = new Vector();\n for (int i = 0; i < relTriggers.size(); i++) {\n absTriggers.addElement(((TreeReference) relTriggers.elementAt(i)).anchor(originalContextRef));\n }\n return absTriggers;\n}\n"
|
"private void colorNodeLabelBorder(NodeLabelBorderImpl nodeLabelBorder) {\n if (nodeLabelBorder != null) {\n nodeLabelBorderColorizer.color(nodeLabelBorder);\n }\n}\n"
|
"private String conceptId() throws FHIRException {\n StringBuffer res = new StringBuffer(Utilities.padLeft(\"String_Node_Str\", ' ', 18));\n int i = 0;\n while (peek() >= '0' && peek() <= '9') {\n res.setCharAt(i, next());\n i++;\n }\n rule(i > 0, \"String_Node_Str\" + peekDisp() + \"String_Node_Str\" + source + \"String_Node_Str\");\n return res.substring(0, i);\n}\n"
|
"private static Claim dbAuthenticate(PasswordCredentials creds, String domainName) {\n Domain domain = null;\n User user = null;\n debug(\"String_Node_Str\");\n try {\n Domains domains = domainStore.getDomains(domainName);\n List<Domain> domainList = domains.getDomains();\n if (domainList.size() == 0) {\n throw new AuthenticationException(\"String_Node_Str\" + domainName + \"String_Node_Str\");\n }\n domain = domainList.get(0);\n } catch (StoreException se) {\n throw new AuthenticationException(\"String_Node_Str\" + se.toString() + se);\n }\n try {\n debug(\"String_Node_Str\");\n Users users = userStore.getUsers(creds.username());\n List<User> userList = users.getUsers();\n if (userList.size() == 0) {\n throw new AuthenticationException(\"String_Node_Str\" + creds.username() + \"String_Node_Str\");\n }\n user = userList.get(0);\n if (!SHA256Calculator.getSHA256(creds.password(), user.getSalt()).equals(user.getPassword())) {\n throw new AuthenticationException(\"String_Node_Str\");\n }\n debug(\"String_Node_Str\");\n List<String> roles = new ArrayList<String>();\n Grants grants = grantStore.getGrants(domain.getDomainid(), user.getUserid());\n List<Grant> grantList = grants.getGrants();\n for (int z = 0; z < grantList.size(); z++) {\n Grant grant = grantList.get(z);\n Role role = roleStore.getRole(grant.getRoleid());\n roles.add(role.getName());\n }\n debug(\"String_Node_Str\");\n ClaimBuilder claim = new ClaimBuilder();\n claim.setUserId(user.getUserid().toString());\n claim.setUser(creds.username());\n claim.setDomain(domainName);\n for (int z = 0; z < roles.size(); z++) {\n claim.addRole(roles.get(z));\n }\n return claim.build();\n } catch (StoreException se) {\n throw new AuthenticationException(\"String_Node_Str\" + se.toString() + se);\n }\n}\n"
|
"public void stop(CoprocessorEnvironment e) {\n topicMetadataCacheSupplier.release();\n if (compactionState != null) {\n compactionState.stop();\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.