content stringlengths 40 137k |
|---|
"public void init(TreeViewer viewer, IStructuredSelection selection) {\n boolean canWork = !selection.isEmpty() && selection.size() == 1;\n if (canWork) {\n Object o = selection.getFirstElement();\n repositoryNode = (RepositoryNode) o;\n switch(repositoryNode.getType()) {\n case REPOSITORY_ELEMENT:\n if (repositoryNode.getObject().getRepositoryStatus() == ERepositoryStatus.DELETED) {\n canWork = false;\n }\n if (repositoryNode.getObjectType() != ERepositoryObjectType.METADATA_CONNECTIONS && repositoryNode.getObjectType() != ERepositoryObjectType.METADATA_CON_QUERY) {\n canWork = false;\n }\n if (canWork) {\n if (isUnderDBConnection(repositoryNode)) {\n DatabaseConnectionItem item = (DatabaseConnectionItem) repositoryNode.getObject().getProperty().getItem();\n DatabaseConnection dbConn = (DatabaseConnection) item.getConnection();\n String dbType = dbConn.getDatabaseType();\n if (EDatabaseTypeName.HIVE.getXmlName().equalsIgnoreCase(dbType) || EDatabaseTypeName.HBASE.getXmlName().equalsIgnoreCase(dbType) || EDatabaseTypeName.IMPALA.getXmlName().equalsIgnoreCase(dbType)) {\n canWork = false;\n break;\n }\n }\n }\n break;\n default:\n canWork = false;\n }\n if (canWork && !isLastVersion(repositoryNode)) {\n canWork = false;\n }\n }\n setEnabled(canWork);\n}\n"
|
"public static boolean findProjectFiles(final Collection<File> files, final File directory, final Set<String> visistedDirs, final IProgressMonitor monitor) {\n if (directory == null)\n return false;\n IProgressMonitor pm = monitor;\n if (pm == null)\n pm = new NullProgressMonitor();\n else if (pm.isCanceled())\n return false;\n pm.subTask(NLS.bind(CoreText.ProjectUtil_taskCheckingDirectory, directory.getPath()));\n final File[] contents = directory.listFiles();\n if (contents == null || contents.length == 0)\n return false;\n Set<String> directoriesVisited;\n if (visistedDirs == null) {\n directoriesVisited = new HashSet<String>();\n try {\n directoriesVisited.add(directory.getCanonicalPath());\n } catch (IOException exception) {\n Activator.logError(exception.getLocalizedMessage(), exception);\n }\n } else\n directoriesVisited = visistedDirs;\n final String dotProject = IProjectDescription.DESCRIPTION_FILE_NAME;\n for (int i = 0; i < contents.length; i++) {\n File file = contents[i];\n if (file.isFile() && file.getName().equals(dotProject)) {\n files.add(file);\n return true;\n }\n }\n for (int i = 0; i < contents.length; i++) {\n if (!contents[i].isDirectory())\n continue;\n if (contents[i].getName().equals(METADATA_FOLDER))\n continue;\n try {\n String canonicalPath = contents[i].getCanonicalPath();\n if (!directoriesVisited.add(canonicalPath)) {\n continue;\n }\n } catch (IOException exception) {\n Activator.logError(exception.getLocalizedMessage(), exception);\n }\n findProjectFiles(files, contents[i], directoriesVisited, pm);\n }\n return true;\n}\n"
|
"public void onError(Throwable e) {\n Log.d(TAG, e.getMessage());\n}\n"
|
"public void shouldValidateToTrueWhenEmptyAuthor() {\n String username = \"String_Node_Str\";\n String expid = \"String_Node_Str\";\n String processtype = \"String_Node_Str\";\n String parameters = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n String metadata = \"String_Node_Str\";\n String genomeRelease = \"String_Node_Str\";\n String author = \"String_Node_Str\";\n CommandFactory cmdf = new CommandFactory();\n String json = \"String_Node_Str\" + \"String_Node_Str\" + expid + \"String_Node_Str\" + \"String_Node_Str\" + processtype + \"String_Node_Str\" + \"String_Node_Str\" + parameters + \"String_Node_Str\" + \"String_Node_Str\" + metadata + \"String_Node_Str\" + \"String_Node_Str\" + genomeRelease + \"String_Node_Str\" + \"String_Node_Str\" + author + \"String_Node_Str\";\n ProcessCommand processCommand = (ProcessCommand) cmdf.createProcessCommand(json, username, \"String_Node_Str\");\n assertTrue(processCommand.validate());\n}\n"
|
"public List getContainerValues() {\n return xPathObjectBuilder.getContainerValues();\n}\n"
|
"public void testHistoryDeletion() throws Exception {\n ApplicationSpecification spec = Specifications.from(new AllProgramsApp());\n NamespaceId namespaceId = new NamespaceId(\"String_Node_Str\");\n ApplicationId appId1 = namespaceId.app(spec.getName());\n store.addApplication(appId1, spec);\n spec = Specifications.from(new WordCountApp());\n ApplicationId appId2 = namespaceId.app(spec.getName());\n store.addApplication(appId2, spec);\n ProgramId flowProgramId1 = appId1.flow(\"String_Node_Str\");\n ProgramId mapreduceProgramId1 = appId1.mr(\"String_Node_Str\");\n ProgramId workflowProgramId1 = appId1.workflow(\"String_Node_Str\");\n ProgramId flowProgramId2 = appId2.flow(\"String_Node_Str\");\n Assert.assertNotNull(store.getApplication(appId1));\n Assert.assertNotNull(store.getApplication(appId2));\n long now = System.currentTimeMillis();\n String runId = RunIds.generate().getId();\n setStartAndRunning(flowProgramId1, runId, now - 1000);\n store.setStop(flowProgramId1, runId, now, ProgramController.State.COMPLETED.getRunStatus(), AppFabricTestHelper.createSourceId(++sourceId));\n runId = RunIds.generate().getId();\n setStartAndRunning(mapreduceProgramId1, runId, now - 1000);\n store.setStop(mapreduceProgramId1, runId, now, ProgramController.State.COMPLETED.getRunStatus(), AppFabricTestHelper.createSourceId(++sourceId));\n runId = RunIds.generate(System.currentTimeMillis() - TimeUnit.SECONDS.toMillis(1000)).getId();\n setStartAndRunning(workflowProgramId1, runId, now - 1000);\n store.setStop(workflowProgramId1, runId, now, ProgramController.State.COMPLETED.getRunStatus(), AppFabricTestHelper.createSourceId(++sourceId));\n runId = RunIds.generate().getId();\n setStartAndRunning(flowProgramId2, runId, now - 1000);\n store.setStop(flowProgramId2, runId, now, ProgramController.State.COMPLETED.getRunStatus(), AppFabricTestHelper.createSourceId(++sourceId));\n verifyRunHistory(flowProgramId1, 1);\n verifyRunHistory(mapreduceProgramId1, 1);\n verifyRunHistory(workflowProgramId1, 1);\n verifyRunHistory(flowProgramId2, 1);\n store.removeApplication(appId1);\n Assert.assertNull(store.getApplication(appId1));\n Assert.assertNotNull(store.getApplication(appId2));\n verifyRunHistory(flowProgramId1, 0);\n verifyRunHistory(mapreduceProgramId1, 0);\n verifyRunHistory(workflowProgramId1, 0);\n verifyRunHistory(flowProgramId2, 1);\n store.removeAll(namespaceId);\n verifyRunHistory(flowProgramId2, 0);\n}\n"
|
"public String[] constructProgramArguments() throws CoreException {\n Vector arguments = new Vector();\n ILaunchConfiguration config = launch.getLaunchConfiguration();\n boolean checkDeadlock = config.getAttribute(IModelConfigurationConstants.MODEL_CORRECTNESS_CHECK_DEADLOCK, IModelConfigurationDefaults.MODEL_CORRECTNESS_CHECK_DEADLOCK_DEFAULT);\n if (!checkDeadlock) {\n arguments.add(\"String_Node_Str\");\n }\n arguments.add(\"String_Node_Str\");\n arguments.add(String.valueOf(CHECKPOINT_INTERVAL));\n boolean runAsModelCheck = config.getAttribute(IModelConfigurationConstants.LAUNCH_MC_MODE, IModelConfigurationDefaults.LAUNCH_MC_MODE_DEFAULT);\n if (runAsModelCheck) {\n boolean isDepthFirst = config.getAttribute(IModelConfigurationConstants.LAUNCH_DFID_MODE, IModelConfigurationDefaults.LAUNCH_DFID_MODE_DEFAULT);\n if (isDepthFirst) {\n int dfidDepth = config.getAttribute(IModelConfigurationConstants.LAUNCH_DFID_DEPTH, IModelConfigurationDefaults.LAUNCH_DFID_DEPTH_DEFAULT);\n arguments.add(\"String_Node_Str\");\n arguments.add(String.valueOf(dfidDepth));\n }\n } else {\n arguments.add(\"String_Node_Str\");\n int traceDepth = config.getAttribute(IModelConfigurationConstants.LAUNCH_SIMU_DEPTH, IModelConfigurationDefaults.LAUNCH_SIMU_DEPTH_DEFAULT);\n if (traceDepth != IModelConfigurationDefaults.LAUNCH_SIMU_DEPTH_DEFAULT) {\n arguments.add(\"String_Node_Str\");\n arguments.add(String.valueOf(traceDepth));\n }\n int aril = config.getAttribute(IModelConfigurationConstants.LAUNCH_SIMU_ARIL, IModelConfigurationDefaults.LAUNCH_SIMU_ARIL_DEFAULT);\n int seed = config.getAttribute(IModelConfigurationConstants.LAUNCH_SIMU_SEED, IModelConfigurationDefaults.LAUNCH_SIMU_SEED_DEFAULT);\n if (aril != IModelConfigurationDefaults.LAUNCH_SIMU_ARIL_DEFAULT) {\n arguments.add(\"String_Node_Str\");\n arguments.add(String.valueOf(aril));\n }\n if (seed != IModelConfigurationDefaults.LAUNCH_SIMU_SEED_DEFAULT) {\n arguments.add(\"String_Node_Str\");\n arguments.add(String.valueOf(seed));\n }\n }\n boolean recover = config.getAttribute(IModelConfigurationConstants.LAUNCH_RECOVER, IModelConfigurationDefaults.LAUNCH_RECOVER_DEFAULT);\n if (recover) {\n IResource[] checkpoints = ModelHelper.getCheckpoints(config, false);\n if (checkpoints.length > 0) {\n arguments.add(\"String_Node_Str\");\n arguments.add(checkpoints[0].getName());\n }\n }\n arguments.add(\"String_Node_Str\");\n arguments.add(cfgFile.getName());\n if (config.getAttribute(MODEL_BEHAVIOR_SPEC_TYPE, MODEL_BEHAVIOR_TYPE_DEFAULT) != MODEL_BEHAVIOR_TYPE_NO_SPEC) {\n arguments.add(\"String_Node_Str\");\n arguments.add(String.valueOf(COVERAGE_INTERVAL));\n }\n arguments.add(\"String_Node_Str\");\n arguments.add(String.valueOf(workers));\n arguments.add(\"String_Node_Str\");\n arguments.add(\"String_Node_Str\");\n arguments.add(launchDir.getLocation().toOSString());\n arguments.add(ResourceHelper.getModuleName(rootModule));\n return (String[]) arguments.toArray(new String[arguments.size()]);\n}\n"
|
"public void doDownload() {\n readHeader();\n try {\n if (_sizeOfFile != -1) {\n SettingsManager set = SettingsManager.instance();\n _downloadDir = set.getSaveDirectory();\n String pathname = _downloadDir + \"String_Node_Str\" + _filename;\n System.out.println(\"String_Node_Str\" + pathname);\n int c = -1;\n _bis = new BufferedInputStream(_istream);\n FileOutputStream fos = new FileOutputStream(pathname);\n byte[] buf = new byte[1024];\n while (true) {\n c = _istream.read(buf);\n if (c == -1)\n break;\n fos.write(buf, 0, c);\n _amountRead += c;\n }\n fos.close();\n System.out.println(\"String_Node_Str\" + _sizeOfFile);\n }\n } catch (Exception e) {\n _callback.error(ActivityCallback.ERROR_8);\n System.out.println(\"String_Node_Str\" + e + \"String_Node_Str\");\n }\n}\n"
|
"public void handlePublishedItems(ItemPublishEvent<Item> items) {\n PayloadItem<SimplePayload> item = (PayloadItem<SimplePayload>) items.getItems().get(0);\n SimplePayload payload = item.getPayload();\n _currentValue = payload.toXML();\n System.out.println(\"String_Node_Str\");\n try {\n getDirector().fireAtCurrentTime(this);\n } catch (IllegalActionException e) {\n e.printStackTrace();\n }\n}\n"
|
"public static boolean createMetricsTables(Connection connection, DBType type) {\n if (type != DBUtils.DBType.HSQLDB) {\n return true;\n }\n String metricsTableCreateDDL = \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\";\n try {\n stmt = connection.prepareStatement(\"String_Node_Str\" + \"String_Node_Str\");\n stmt.execute();\n connection.prepareStatement(metricsTableCreateDDL).execute();\n } catch (SQLException e) {\n if (!e.getSQLState().equalsIgnoreCase(\"String_Node_Str\")) {\n Log.warn(\"String_Node_Str\", e.getMessage());\n return false;\n }\n }\n return true;\n}\n"
|
"private void checkBeforeEncoding(final DataHandle handle, final ARXConfiguration config) {\n if (handle == null) {\n throw new NullPointerException(\"String_Node_Str\");\n }\n if (config.isPrivacyModelSpecified(LDiversity.class) || config.isPrivacyModelSpecified(TCloseness.class) || config.isPrivacyModelSpecified(DDisclosurePrivacy.class) || config.isPrivacyModelSpecified(BasicBLikeness.class) || config.isPrivacyModelSpecified(EnhancedBLikeness.class)) {\n if (handle.getDefinition().getSensitiveAttributes().size() == 0) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n }\n if (config.getQualityModel() instanceof MetricSDClassification) {\n for (String attribute : ((MetricSDClassification) config.getQualityModel()).getClassAttributes()) {\n if (!(handle.getDefinition().getSensitiveAttributes().contains(attribute) || handle.getDefinition().getInsensitiveAttributes().contains(attribute))) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n }\n }\n for (String attribute : handle.getDefinition().getQuasiIdentifiersWithGeneralization()) {\n if (handle.getDefinition().getHierarchy(attribute) == null) {\n throw new IllegalStateException(\"String_Node_Str\" + attribute + \"String_Node_Str\");\n }\n }\n for (String attr : handle.getDefinition().getSensitiveAttributes()) {\n boolean found = false;\n for (LDiversity c : config.getPrivacyModels(LDiversity.class)) {\n if (c.getAttribute().equals(attr)) {\n found = true;\n break;\n }\n }\n if (!found) {\n for (TCloseness c : config.getPrivacyModels(TCloseness.class)) {\n if (c.getAttribute().equals(attr)) {\n found = true;\n break;\n }\n }\n }\n if (!found) {\n for (DDisclosurePrivacy c : config.getPrivacyModels(DDisclosurePrivacy.class)) {\n if (c.getAttribute().equals(attr)) {\n found = true;\n break;\n }\n }\n }\n if (!found) {\n for (BasicBLikeness c : config.getPrivacyModels(BasicBLikeness.class)) {\n if (c.getAttribute().equals(attr)) {\n found = true;\n break;\n }\n }\n }\n if (!found) {\n for (EnhancedBLikeness c : config.getPrivacyModels(EnhancedBLikeness.class)) {\n if (c.getAttribute().equals(attr)) {\n found = true;\n break;\n }\n }\n }\n if (!found) {\n throw new IllegalArgumentException(\"String_Node_Str\" + attr + \"String_Node_Str\");\n }\n }\n for (LDiversity c : config.getPrivacyModels(LDiversity.class)) {\n if (handle.getDefinition().getAttributeType(c.getAttribute()) != AttributeType.SENSITIVE_ATTRIBUTE) {\n throw new RuntimeException(\"String_Node_Str\" + c.getAttribute() + \"String_Node_Str\");\n }\n }\n for (TCloseness c : config.getPrivacyModels(TCloseness.class)) {\n if (handle.getDefinition().getAttributeType(c.getAttribute()) != AttributeType.SENSITIVE_ATTRIBUTE) {\n throw new RuntimeException(\"String_Node_Str\" + c.getAttribute() + \"String_Node_Str\");\n }\n }\n for (DDisclosurePrivacy c : config.getPrivacyModels(DDisclosurePrivacy.class)) {\n if (handle.getDefinition().getAttributeType(c.getAttribute()) != AttributeType.SENSITIVE_ATTRIBUTE) {\n throw new RuntimeException(\"String_Node_Str\" + c.getAttribute() + \"String_Node_Str\");\n }\n }\n for (BasicBLikeness c : config.getPrivacyModels(BasicBLikeness.class)) {\n if (handle.getDefinition().getAttributeType(c.getAttribute()) != AttributeType.SENSITIVE_ATTRIBUTE) {\n throw new RuntimeException(\"String_Node_Str\" + c.getAttribute() + \"String_Node_Str\");\n }\n }\n for (EnhancedBLikeness c : config.getPrivacyModels(EnhancedBLikeness.class)) {\n if (handle.getDefinition().getAttributeType(c.getAttribute()) != AttributeType.SENSITIVE_ATTRIBUTE) {\n throw new RuntimeException(\"String_Node_Str\" + c.getAttribute() + \"String_Node_Str\");\n }\n }\n if (!(handle instanceof DataHandleInput)) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n DataDefinition definition = handle.getDefinition();\n Set<String> attributes = new HashSet<String>();\n for (int i = 0; i < handle.getNumColumns(); i++) {\n attributes.add(handle.getAttributeName(i));\n }\n for (String attribute : handle.getDefinition().getSensitiveAttributes()) {\n if (!attributes.contains(attribute)) {\n throw new IllegalArgumentException(\"String_Node_Str\" + attribute + \"String_Node_Str\");\n }\n }\n for (String attribute : handle.getDefinition().getInsensitiveAttributes()) {\n if (!attributes.contains(attribute)) {\n throw new IllegalArgumentException(\"String_Node_Str\" + attribute + \"String_Node_Str\");\n }\n }\n for (String attribute : handle.getDefinition().getIdentifyingAttributes()) {\n if (!attributes.contains(attribute)) {\n throw new IllegalArgumentException(\"String_Node_Str\" + attribute + \"String_Node_Str\");\n }\n }\n for (String attribute : handle.getDefinition().getQuasiIdentifyingAttributes()) {\n if (!attributes.contains(attribute)) {\n throw new IllegalArgumentException(\"String_Node_Str\" + attribute + \"String_Node_Str\");\n }\n }\n for (String attribute : handle.getDefinition().getQuasiIdentifiersWithMicroaggregation()) {\n if (handle.getDefinition().getMicroAggregationFunction(attribute) == null) {\n throw new IllegalArgumentException(\"String_Node_Str\" + attribute + \"String_Node_Str\");\n }\n MicroAggregationFunction f = (MicroAggregationFunction) definition.getMicroAggregationFunction(attribute);\n DataType<?> t = definition.getDataType(attribute);\n if (!t.getDescription().getScale().provides(f.getRequiredScale())) {\n throw new IllegalArgumentException(\"String_Node_Str\" + attribute + \"String_Node_Str\" + f.getRequiredScale());\n }\n }\n if (config.isPrivacyModelSpecified(EDDifferentialPrivacy.class)) {\n if (!definition.getQuasiIdentifiersWithMicroaggregation().isEmpty()) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n }\n Set<String> genQis = definition.getQuasiIdentifiersWithGeneralization();\n if ((config.getMaxOutliers() < 0d) || (config.getMaxOutliers() > 1d)) {\n throw new IllegalArgumentException(\"String_Node_Str\" + config.getMaxOutliers() + \"String_Node_Str\");\n }\n if ((genQis.size() + clusterQis.size()) == 0) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (genQis.size() > maxQuasiIdentifiers) {\n throw new IllegalArgumentException(\"String_Node_Str\" + genQis.size() + \"String_Node_Str\");\n }\n}\n"
|
"public void onClick(View v) {\n Spinner reportType = (Spinner) findViewById(R.id.reportType);\n Spinner reportInterval = (Spinner) findViewById(R.id.reportInterval);\n final String type = parseType(reportType.getSelectedItemPosition());\n final int interval = parseInterval(reportInterval.getSelectedItemPosition());\n final String apiKey = WordPress.currentBlog.getApi_key();\n final String apiBlogID = WordPress.currentBlog.getApi_blogid();\n if (!isFinishing())\n showDialog(ID_DIALOG_GET_STATS);\n Thread action = new Thread() {\n public void run() {\n getStatsData(apiKey, apiBlogID, type, interval);\n }\n };\n action.start();\n}\n"
|
"public void testTriggerCaching() throws Exception {\n FormParseInit fpi = new FormParseInit(\"String_Node_Str\");\n FormEntryController fec = initFormEntry(fpi);\n stepThroughEntireForm(fec);\n EvaluationContext evalCtx = fpi.getFormDef().getEvaluationContext();\n ExprEvalUtils.assertEqualsXpathEval(\"String_Node_Str\", 400.0, \"String_Node_Str\", evalCtx);\n ExprEvalUtils.assertEqualsXpathEval(\"String_Node_Str\", 100.0, \"String_Node_Str\", evalCtx);\n ExprEvalUtils.assertEqualsXpathEval(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", evalCtx);\n Object weighTimeResult = ExprEvalUtils.xpathEval(evalCtx, \"String_Node_Str\");\n if (\"String_Node_Str\".equals(weighTimeResult) || \"String_Node_Str\".equals(weighTimeResult)) {\n fail(\"String_Node_Str\");\n }\n ExprEvalUtils.assertEqualsXpathEval(\"String_Node_Str\", 1.0, \"String_Node_Str\", evalCtx);\n ExprEvalUtils.assertEqualsXpathEval(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", evalCtx);\n ExprEvalUtils.assertEqualsXpathEval(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", evalCtx);\n ExprEvalUtils.assertEqualsXpathEval(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", evalCtx);\n}\n"
|
"private List<NetworkVO> listDomainLevelNetworks(SearchCriteria<NetworkVO> sc, Filter searchFilter, long domainId) {\n List<Long> networkIds = new ArrayList<Long>();\n Set<Long> allowedDomains = _domainMgr.getDomainParentIds(domainId);\n List<NetworkDomainVO> maps = _networkDomainDao.listDomainNetworkMapByDomain(allowedDomains.toArray());\n for (NetworkDomainVO map : maps) {\n boolean subdomainAccess = (map.isSubdomainAccess() != null) ? map.isSubdomainAccess() : getAllowSubdomainAccessGlobal();\n if (map.getDomainId() == domainId || subdomainAccess) {\n networkIds.add(map.getNetworkId());\n }\n }\n if (!networkIds.isEmpty()) {\n SearchCriteria<NetworkVO> domainSC = _networksDao.createSearchCriteria();\n domainSC.addAnd(\"String_Node_Str\", SearchCriteria.Op.IN, networkIds.toArray());\n domainSC.addAnd(\"String_Node_Str\", SearchCriteria.Op.EQ, ACLType.Domain.toString());\n sc.addAnd(\"String_Node_Str\", SearchCriteria.Op.SC, domainSC);\n return _networksDao.search(sc, searchFilter);\n } else {\n return new ArrayList<NetworkVO>();\n }\n}\n"
|
"private int changeAdminPasswordLocally(String domainDir, String domainName) throws CommandException {\n if (!isLocalHost(programOpts.getHost())) {\n throw new CommandException(strings.get(\"String_Node_Str\"));\n }\n GFLauncher launcher = null;\n try {\n launcher = GFLauncherFactory.getInstance(RuntimeType.DAS);\n GFLauncherInfo info = launcher.getInfo();\n info.setDomainName(domainName);\n info.setDomainParentDir(domainDir);\n launcher.setup();\n if (launcher.isSecureAdminEnabled()) {\n if ((newpassword == null) || (newpassword.isEmpty())) {\n throw new CommandException(strings.get(\"String_Node_Str\"));\n }\n }\n String adminKeyFile = launcher.getAdminRealmKeyFile();\n if (adminKeyFile != null) {\n FileRealmHelper helper = new FileRealmHelper(adminKeyFile);\n String[] groups = helper.authenticate(programOpts.getUser(), ((String) passwords.get(oldpwName)).toCharArray());\n if (groups == null) {\n throw new CommandException(strings.get(\"String_Node_Str\", programOpts.getUser()));\n }\n helper.updateUser(programOpts.getUser(), programOpts.getUser(), ((String) passwords.get(newpwName)).toCharArray(), null);\n helper.persist();\n return SUCCESS;\n } else {\n throw new CommandException(strings.get(\"String_Node_Str\"));\n }\n } catch (MiniXmlParserException ex) {\n throw new CommandException(ex);\n } catch (GFLauncherException ex) {\n throw new CommandException(ex);\n } catch (IOException ex) {\n throw new CommandException(ex);\n }\n}\n"
|
"public static Number[] getMaxCombination(Map<VarAccessWrapper, List<CtVariable>> mappedVars, List<VarAccessWrapper> varsNamesToCombine) {\n int maxNumberCombinations = ConfigurationProperties.getPropertyInt(\"String_Node_Str\");\n int max = -1;\n long numberTotalComb = 1;\n int nrVarsWithMorethan1Possibilities = 0;\n Set<String> vars = new HashSet<>();\n for (VarAccessWrapper currentVar : varsNamesToCombine) {\n if (vars.contains(currentVar.getVar().getVariable().getSimpleName())) {\n continue;\n }\n vars.add(currentVar.getVar().getVariable().getSimpleName());\n List<CtVariable> mapped = mappedVars.get(currentVar);\n int numberCompVar = mapped.size();\n if (numberCompVar > max)\n max = numberCompVar;\n if (numberCompVar > 1)\n nrVarsWithMorethan1Possibilities++;\n logger.debug(String.format(\"String_Node_Str\", currentVar.getVar().getVariable().getSimpleName(), numberCompVar));\n if (numberTotalComb < Integer.MAX_VALUE) {\n long mult = (long) numberTotalComb * numberCompVar;\n if (mult > Integer.MAX_VALUE || mult < Integer.MIN_VALUE) {\n logger.debug(\"String_Node_Str\" + Integer.MAX_VALUE);\n numberTotalComb = Integer.MAX_VALUE;\n } else\n numberTotalComb *= numberCompVar;\n }\n }\n logger.debug(\"String_Node_Str\" + numberTotalComb);\n double maxPerVarLimit = 0;\n if (numberTotalComb < maxNumberCombinations || !ConfigurationProperties.getPropertyBool(\"String_Node_Str\")) {\n maxPerVarLimit = max;\n } else {\n maxPerVarLimit = Math.pow(maxNumberCombinations, 1.0 / nrVarsWithMorethan1Possibilities);\n }\n logger.debug(String.format(\"String_Node_Str\", maxPerVarLimit, numberTotalComb));\n return new Number[] { numberTotalComb, maxPerVarLimit };\n}\n"
|
"public String[] generateHeaders() {\n List<String> strings = new ArrayList<String>();\n int i = 0;\n for (ConstructorParameter cp : constructorDefinition.getParameters()) {\n String prefix = nameGenerator.name(i);\n ClassMeta<?> classMeta = reflectionService.getClassMeta(cp.getResolvedType(), false);\n if (classMeta != null) {\n for (String prop : classMeta.generateHeaders()) {\n strings.add(prefix + \"String_Node_Str\" + prop);\n }\n } else {\n strings.add(prefix);\n }\n i++;\n }\n return strings.toArray(EMPTY_STRING_ARRAY);\n}\n"
|
"public IType getType() {\n return dyvil.tools.compiler.ast.type.Types.STRING;\n}\n"
|
"public void deleteNetwork() {\n new Expectations() {\n {\n resService.isNetworkExistInVc(anyString);\n result = true;\n }\n };\n networkSvc.setResService(resService);\n networkSvc.setNetworkDao(networkDao);\n networkSvc.setClusterDAO(clusterDAO);\n networkSvc.addDhcpNetwork(\"String_Node_Str\", \"String_Node_Str\");\n new Verifications() {\n {\n networkDao.insert(withAny(new NetworkEntity()));\n }\n };\n new Expectations() {\n {\n NetworkEntity network = new NetworkEntity();\n network.setIpBlocks(new ArrayList<IpBlockEntity>());\n networkDao.findNetworkByName(\"String_Node_Str\");\n result = network;\n networkDao.delete(withAny(network));\n }\n };\n networkSvc.removeNetwork(\"String_Node_Str\");\n}\n"
|
"private SearchResult matchRegex(Object value, SearchOptions searchOptions, int rowIndex, int columnIndex) {\n boolean found;\n String str = value != null ? value.toString() : \"String_Node_Str\";\n Matcher matcher = searchOptions.getRegexPattern().matcher(str);\n if (searchOptions.getRegionStart() >= str.length()) {\n return null;\n }\n if (searchOptions.isOnlyMatchWholeAttributeValue()) {\n found = matcher.matches();\n } else {\n matcher.region(searchOptions.getRegionStart(), str.length());\n found = matcher.find();\n }\n if (found) {\n searchOptions.setStartingRow(rowIndex);\n searchOptions.setStartingColumn(columnIndex);\n searchOptions.setRegionStart(matcher.end());\n return new SearchResult(searchOptions, null, null, rowIndex, columnIndex, matcher.start(), matcher.end());\n } else {\n return null;\n }\n}\n"
|
"public boolean load(File file) {\n EObject documentRoot = null;\n if (xmlProcessor != null) {\n try {\n xmlResource = (XMLResource) xmlProcessor.load(new FileInputStream(file), null);\n } catch (IOException e) {\n logger.error(getClass().getName() + \"String_Node_Str\", e);\n return false;\n }\n }\n if (xmlResource != null && xmlResource.getContents().size() > 0) {\n documentRoot = xmlResource.getContents().get(0);\n } else {\n System.out.println(\"String_Node_Str\" + file.getAbsolutePath());\n return false;\n }\n if (documentRoot != null) {\n iceEMFTree = new EMFTreeComposite(documentRoot);\n HashMap<EObject, EMFTreeComposite> map = new HashMap<EObject, EMFTreeComposite>();\n map.put(documentRoot, iceEMFTree);\n TreeIterator<EObject> tree = documentRoot.eAllContents();\n while (tree.hasNext()) {\n id++;\n obj = tree.next();\n tempTree = new EMFTreeComposite(obj);\n tempTree.setId(id);\n map.put(obj, tempTree);\n }\n for (EObject o : map.keySet()) {\n EObject parent = o.eContainer();\n if (parent != null) {\n map.get(parent).setNextChild(map.get(o));\n }\n }\n } else {\n return false;\n }\n return true;\n}\n"
|
"public String toString() {\n return new ToStringBuilder(this, SpoutToStringStyle.INSTANCE).append(\"String_Node_Str\", entityId).append(\"String_Node_Str\", type).append(\"String_Node_Str\", worldUid).append(\"String_Node_Str\", pos).append(\"String_Node_Str\", scale).append(\"String_Node_Str\", rotation).toString();\n}\n"
|
"public String getInvalidStateInfo() {\n String errorMessage = \"String_Node_Str\";\n if (!Common.isValidGoogleId(id)) {\n errorMessage += ERROR_FIELD_ID;\n }\n if (this.name == null || this.name == \"String_Node_Str\") {\n errorMessage += \"String_Node_Str\";\n }\n if (this.email == null || this.email == \"String_Node_Str\") {\n errorMessage += \"String_Node_Str\";\n }\n return errorMessage;\n}\n"
|
"protected static DBCursor getCollectionDBCursor(DBCollection coll, Deque<String> sortBy, Deque<String> filters) throws JSONParseException {\n DBObject sort = new BasicDBObject();\n if (sortBy == null || sortBy.isEmpty()) {\n sort.put(\"String_Node_Str\", -1);\n } else {\n sortBy.stream().forEach((s) -> {\n String _s = s.trim();\n _s = _s.replaceAll(\"String_Node_Str\", \"String_Node_Str\");\n if (_s.startsWith(\"String_Node_Str\")) {\n sort.put(_s.substring(1), -1);\n } else if (_s.startsWith(\"String_Node_Str\")) {\n sort.put(_s.substring(1), 1);\n } else {\n sort.put(_s, 1);\n }\n });\n }\n final BasicDBObject query = new BasicDBObject(DOCUMENTS_QUERY);\n if (filters != null) {\n filters.stream().forEach((String f) -> {\n BSONObject filterQuery = (BSONObject) JSON.parse(f);\n HALUtils.replaceStringsWithObjectIds(filterQuery);\n query.putAll(filterQuery);\n });\n }\n return coll.find(query).sort(sort);\n}\n"
|
"public int timerEvent() {\n if (health <= 0) {\n return -1;\n }\n switch(state) {\n case GOING_SINGLE_STEP:\n case PLAYING_ACTION:\n case TAKE:\n case DROP:\n case PATHING:\n case WAITING:\n int remainingAnimationTime = animationStartTime + animationDuration - MatchConstants.clock().getTime();\n if (remainingAnimationTime > 0) {\n return remainingAnimationTime;\n }\n break;\n default:\n break;\n }\n switch(state) {\n case TAKE:\n case DROP:\n if (this.movableAction != EAction.RAISE_UP) {\n break;\n }\n case WAITING:\n case GOING_SINGLE_STEP:\n case PLAYING_ACTION:\n state = EMovableState.DOING_NOTHING;\n movableAction = EAction.NO_ACTION;\n break;\n default:\n break;\n }\n if (moveToRequest != null) {\n switch(state) {\n case PATHING:\n setState(EMovableState.DOING_NOTHING);\n this.movableAction = EAction.NO_ACTION;\n this.path = null;\n case DOING_NOTHING:\n ShortPoint2D oldTargetPos = path != null ? path.getTargetPos() : null;\n ShortPoint2D oldPos = position;\n boolean foundPath = goToPos(moveToRequest);\n moveToRequest = null;\n if (foundPath) {\n this.strategy.moveToPathSet(oldPos, oldTargetPos, path.getTargetPos());\n return animationDuration;\n } else {\n break;\n }\n default:\n break;\n }\n }\n switch(state) {\n case GOING_SINGLE_STEP:\n case PLAYING_ACTION:\n setState(EMovableState.DOING_NOTHING);\n this.movableAction = EAction.NO_ACTION;\n break;\n case PATHING:\n pathingAction();\n break;\n case TAKE:\n grid.takeMaterial(position, takeDropMaterial);\n setMaterial(takeDropMaterial);\n playAnimation(EAction.RAISE_UP, Constants.MOVABLE_BEND_DURATION);\n break;\n case DROP:\n if (takeDropMaterial != null && takeDropMaterial != EMaterialType.NO_MATERIAL) {\n boolean offerMaterial = strategy.beforeDroppingMaterial();\n grid.dropMaterial(position, takeDropMaterial, offerMaterial);\n }\n setMaterial(EMaterialType.NO_MATERIAL);\n playAnimation(EAction.RAISE_UP, Constants.MOVABLE_BEND_DURATION);\n break;\n default:\n break;\n }\n if (state == EMovableState.DOING_NOTHING) {\n strategy.action();\n if (state == EMovableState.DOING_NOTHING) {\n if (visible && enableNothingToDo) {\n return doingNothingAction();\n } else {\n return Constants.MOVABLE_INTERRUPT_PERIOD;\n }\n }\n }\n return animationDuration;\n}\n"
|
"public void notifySet(final Spot spot) {\n spot.modelGraph.notifyRadiusChanged(spot);\n}\n"
|
"public EnumRarity getRarity(ItemStack me) {\n if (me.hasTagCompound() && me.getTagCompound().hasKey(\"String_Node_Str\")) {\n return EnumRarity.EPIC;\n }\n return super.getRarity(me);\n}\n"
|
"private static TypeI normalizeClassType(TypeI type) {\n if (type == null || type.isUnknownType()) {\n return type;\n } else if (type.isConstructor() || type.isInterface()) {\n return type.toMaybeFunctionType().getInstanceType();\n } else {\n ObjectTypeI obj = type.toMaybeObjectType();\n if (obj != null) {\n return obj.normalizeObjectForCheckAccessControls();\n }\n }\n return type;\n}\n"
|
"public JsonNode convert(StringNode from) {\n JsonNode jsonNode = new JsonNode(from.getBaseUrl(), (String) null);\n jsonNode.setModel(Lists.transform(from.createOrGetModel(), new Function<String, JSON>() {\n public JSON apply(String input) {\n return (JSON) JSON.parse(input);\n }\n }));\n return jsonNode;\n}\n"
|
"public static void checkReplace(boolean blockPerBlock) {\n Date now = new Date();\n Iterator<CreeperExplosion> iter = explosionList.iterator();\n while (iter.hasNext()) {\n CreeperExplosion cEx = iter.next();\n Date time = cEx.getTime();\n List<Replaceable> blockList = cEx.getBlockList();\n Date after = new Date(time.getTime() + CreeperConfig.waitBeforeHeal * 1000);\n if (after.before(now)) {\n if (!blockPerBlock) {\n BlockManager.replace_blocks(blockList);\n iter.remove();\n } else {\n if (!blockList.isEmpty())\n BlockManager.replace_one_block(blockList);\n if (blockList.isEmpty()) {\n if (!CreeperConfig.lightweightMode)\n explosionIndex.removeElement(cEx, cEx.getLocation().getX(), cEx.getLocation().getZ());\n iter.remove();\n }\n }\n } else\n break;\n }\n PaintingsManager.replacePaintings(now);\n}\n"
|
"public void check(final Node hazelcastNode, final String version, final boolean isEnterprise) {\n ILogger logger = hazelcastNode.getLogger(PhoneHome.class);\n if (!hazelcastNode.getProperties().getBoolean(GroupProperty.VERSION_CHECK_ENABLED)) {\n logger.warning(GroupProperty.VERSION_CHECK_ENABLED.getName() + \"String_Node_Str\" + GroupProperty.PHONE_HOME_ENABLED.getName() + \"String_Node_Str\");\n return;\n }\n if (!hazelcastNode.getProperties().getBoolean(GroupProperty.PHONE_HOME_ENABLED)) {\n return;\n }\n if (FALSE.equals(getenv(\"String_Node_Str\"))) {\n return;\n }\n try {\n phoneHomeFuture = hazelcastNode.nodeEngine.getExecutionService().scheduleWithRepetition(\"String_Node_Str\", new Runnable() {\n\n public void run() {\n phoneHome(hazelcastNode, version, isEnterprise);\n }\n }, 0, 1, TimeUnit.DAYS);\n } catch (RejectedExecutionException e) {\n logger.warning(\"String_Node_Str\");\n }\n}\n"
|
"private static Object getDatabaseValue(DatabaseConnection connection, String value) {\n String databaseType = connection.getDatabaseType();\n if (value.equals(\"String_Node_Str\")) {\n String typeByProduct = getStandardDbTypeFromConnection(databaseType);\n if (databaseType.equals(EDatabaseTypeName.ORACLEFORSID.getDisplayName())) {\n return EDatabaseTypeName.ORACLEFORSID.getXmlName();\n } else if (databaseType.equals(EDatabaseTypeName.ORACLESN.getDisplayName())) {\n return EDatabaseTypeName.ORACLESN.getXmlName();\n } else if (databaseType.equals(EDatabaseTypeName.ORACLE_OCI.getDisplayName())) {\n return EDatabaseTypeName.ORACLE_OCI.getXmlName();\n } else if (databaseType.equals(EDatabaseTypeName.ORACLE_RAC.getDisplayName())) {\n return EDatabaseTypeName.ORACLE_RAC.getXmlName();\n } else if (databaseType.equals(EDatabaseTypeName.MSSQL.getDisplayName())) {\n return EDatabaseTypeName.MSSQL.getXMLType();\n } else {\n return typeByProduct;\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n if (isContextMode(connection, databaseType)) {\n if (databaseType.equals(\"String_Node_Str\")) {\n return \"String_Node_Str\";\n }\n if (databaseType.equals(\"String_Node_Str\")) {\n return \"String_Node_Str\";\n }\n if (databaseType.equals(\"String_Node_Str\")) {\n return \"String_Node_Str\";\n }\n } else {\n if (databaseType.equals(\"String_Node_Str\")) {\n return \"String_Node_Str\";\n }\n if (databaseType.equals(\"String_Node_Str\")) {\n return \"String_Node_Str\";\n }\n if (databaseType.equals(\"String_Node_Str\")) {\n return \"String_Node_Str\";\n }\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n if (isContextMode(connection, connection.getServerName())) {\n return connection.getServerName();\n } else {\n return TalendQuoteUtils.addQuotes(connection.getServerName());\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n if (isContextMode(connection, connection.getPort())) {\n return connection.getPort();\n } else {\n return TalendQuoteUtils.addQuotes(connection.getPort());\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n if ((\"String_Node_Str\").equals(connection.getSID()) || connection.getSID() == null) {\n if (isContextMode(connection, connection.getDatasourceName())) {\n return connection.getDatasourceName();\n } else {\n return TalendQuoteUtils.addQuotes(connection.getDatasourceName());\n }\n } else {\n if (isContextMode(connection, connection.getSID())) {\n return connection.getSID();\n } else {\n return TalendQuoteUtils.addQuotes(connection.getSID());\n }\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n if (isContextMode(connection, connection.getDatasourceName())) {\n return connection.getDatasourceName();\n } else {\n return TalendQuoteUtils.addQuotes(connection.getDatasourceName());\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n if (isContextMode(connection, connection.getUsername())) {\n return connection.getUsername();\n } else {\n return TalendQuoteUtils.addQuotes(connection.getUsername());\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n if (isContextMode(connection, connection.getPassword())) {\n return connection.getPassword();\n } else {\n return TalendQuoteUtils.addQuotes(connection.getPassword());\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n if (isContextMode(connection, connection.getNullChar())) {\n return connection.getNullChar();\n } else {\n return TalendQuoteUtils.addQuotes(connection.getNullChar());\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n if (isContextMode(connection, connection.getUiSchema())) {\n return connection.getUiSchema();\n } else {\n return TalendQuoteUtils.addQuotes(connection.getUiSchema());\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n if (isContextMode(connection, connection.getFileFieldName())) {\n return connection.getFileFieldName();\n } else {\n return TalendQuoteUtils.addQuotes(connection.getFileFieldName());\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n if (isContextMode(connection, connection.getAdditionalParams())) {\n return connection.getAdditionalParams();\n } else {\n return TalendQuoteUtils.addQuotes(connection.getAdditionalParams());\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n String dbVersionString = connection.getDbVersionString();\n if (EDatabaseConnTemplate.ACCESS.getDBDisplayName().equals(databaseType) || EDatabaseConnTemplate.MYSQL.getDBDisplayName().equals(databaseType)) {\n return dbVersionString;\n } else {\n String driverValue = EDatabaseVersion4Drivers.getDriversStr(databaseType, dbVersionString);\n if (isContextMode(connection, dbVersionString)) {\n return dbVersionString;\n } else if (EDatabaseTypeName.VERTICA.getXmlName().equals(databaseType) && EDatabaseVersion4Drivers.VERTICA_6.getVersionValue().equals(dbVersionString)) {\n return \"String_Node_Str\";\n } else {\n return driverValue;\n }\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n if (isContextMode(connection, databaseType)) {\n if (databaseType.equals(EDatabaseTypeName.ORACLEFORSID.getDisplayName())) {\n return \"String_Node_Str\";\n } else if (databaseType.equals(EDatabaseTypeName.ORACLESN.getDisplayName())) {\n return \"String_Node_Str\";\n } else if (databaseType.equals(EDatabaseTypeName.ORACLE_OCI.getDisplayName())) {\n return \"String_Node_Str\";\n } else if (databaseType.equals(EDatabaseTypeName.ORACLE_RAC.getDisplayName())) {\n return \"String_Node_Str\";\n }\n } else {\n if (databaseType.equals(EDatabaseTypeName.ORACLEFORSID.getDisplayName())) {\n return \"String_Node_Str\";\n } else if (databaseType.equals(EDatabaseTypeName.ORACLESN.getDisplayName())) {\n return \"String_Node_Str\";\n } else if (databaseType.equals(EDatabaseTypeName.ORACLE_OCI.getDisplayName())) {\n return \"String_Node_Str\";\n } else if (databaseType.equals(EDatabaseTypeName.ORACLE_RAC.getDisplayName())) {\n return \"String_Node_Str\";\n }\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n if (isContextMode(connection, connection.getDriverClass())) {\n return connection.getDriverClass();\n } else {\n return TalendQuoteUtils.addQuotes(connection.getDriverClass());\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n String url = connection.getURL();\n if (isContextMode(connection, url)) {\n return url;\n } else {\n if (url != null) {\n String h2Prefix = \"String_Node_Str\";\n if (url.startsWith(h2Prefix)) {\n String path = url.substring(h2Prefix.length(), url.length());\n path = PathUtils.getPortablePath(path);\n url = h2Prefix + path;\n }\n return TalendQuoteUtils.addQuotes(url);\n }\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n List<Map<String, Object>> value2 = new ArrayList<Map<String, Object>>();\n if (isContextMode(connection, connection.getDriverJarPath())) {\n Map<String, Object> line = new HashMap<String, Object>();\n line.put(\"String_Node_Str\", connection.getDriverJarPath());\n value2.add(line);\n } else {\n String userDir = System.getProperty(\"String_Node_Str\");\n String pathSeparator = System.getProperty(\"String_Node_Str\");\n String defaultPath = userDir + pathSeparator + \"String_Node_Str\" + pathSeparator + \"String_Node_Str\";\n String jarPath = connection.getDriverJarPath();\n if (jarPath == null) {\n return null;\n }\n try {\n Character comma = ';';\n String[] jars = jarPath.split(comma.toString());\n boolean deployed = false;\n if (jars != null) {\n for (String jar : jars) {\n File file = Path.fromOSString(jar).toFile();\n if (file.exists() && file.isFile()) {\n String fileName = file.getName();\n Map<String, Object> line = new HashMap<String, Object>();\n line.put(\"String_Node_Str\", fileName);\n value2.add(line);\n if (!new File(defaultPath + pathSeparator + fileName).exists()) {\n try {\n CoreRuntimePlugin.getInstance().getLibrariesService().deployLibrary(file.toURL());\n deployed = true;\n } catch (IOException e) {\n ExceptionHandler.process(e);\n return null;\n }\n }\n }\n }\n if (deployed) {\n CoreRuntimePlugin.getInstance().getLibrariesService().resetModulesNeeded();\n }\n }\n } catch (Exception e) {\n return null;\n }\n }\n return value2;\n }\n if (value.equals(\"String_Node_Str\")) {\n return new Boolean(CDCTypeMode.LOG_MODE.getName().equals(connection.getCdcTypeMode()));\n }\n if (value.equals(\"String_Node_Str\")) {\n if (isContextMode(connection, connection.getDBRootPath())) {\n return connection.getDBRootPath();\n } else {\n return TalendQuoteUtils.addQuotes(connection.getDBRootPath());\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n String runningMode = \"String_Node_Str\";\n if (EDatabaseTypeName.HSQLDB_IN_PROGRESS.getXmlName().equals(databaseType)) {\n runningMode = \"String_Node_Str\";\n } else if (EDatabaseTypeName.HSQLDB_SERVER.getXmlName().equals(databaseType)) {\n runningMode = \"String_Node_Str\";\n } else if (EDatabaseTypeName.HSQLDB_WEBSERVER.getXmlName().equals(databaseType)) {\n runningMode = \"String_Node_Str\";\n }\n return runningMode;\n }\n if (value.equals(\"String_Node_Str\")) {\n if (isContextMode(connection, connection.getDBRootPath())) {\n return connection.getDBRootPath();\n } else {\n return TalendQuoteUtils.addQuotes(connection.getDBRootPath());\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n if (isContextMode(connection, connection.getDatasourceName())) {\n return connection.getDatasourceName();\n } else {\n return TalendQuoteUtils.addQuotes(connection.getDatasourceName());\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n if (isContextMode(connection, connection.getServerName())) {\n return connection.getServerName();\n } else {\n return TalendQuoteUtils.addQuotes(connection.getServerName());\n }\n }\n if (value.equals(\"String_Node_Str\")) {\n return connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_DISTRIBUTION);\n }\n if (value.equals(\"String_Node_Str\")) {\n return connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_VERSION);\n }\n if (value.equals(\"String_Node_Str\")) {\n return connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_MODE);\n }\n if (value.equals(\"String_Node_Str\")) {\n return connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HBASE_DISTRIBUTION);\n }\n if (value.equals(\"String_Node_Str\")) {\n return connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HBASE_VERSION);\n }\n return null;\n}\n"
|
"private static void executeCheckSig(Transaction txContainingThis, int index, Script script, LinkedList<byte[]> stack, int lastCodeSepLocation, int opcode) throws ScriptException {\n if (stack.size() < 2)\n throw new ScriptException(\"String_Node_Str\");\n byte[] pubKey = stack.pollLast();\n byte[] sigBytes = stack.pollLast();\n if (sigBytes.length == 0 || pubKey.length == 0) {\n if (opcode == OP_CHECKSIG)\n stack.add(new byte[] { 0 });\n else if (opcode == OP_CHECKSIGVERIFY)\n throw new ScriptException(\"String_Node_Str\");\n return;\n }\n byte[] prog = script.getProgram();\n byte[] connectedScript = Arrays.copyOfRange(prog, lastCodeSepLocation, prog.length);\n UnsafeByteArrayOutputStream outStream = new UnsafeByteArrayOutputStream(sigBytes.length + 1);\n try {\n writeBytes(outStream, sigBytes);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n connectedScript = removeAllInstancesOf(connectedScript, outStream.toByteArray());\n boolean sigValid = false;\n try {\n TransactionSignature sig = TransactionSignature.decodeFromBitcoin(sigBytes, false);\n Sha256Hash hash = txContainingThis.hashForSignature(index, connectedScript, (byte) sig.sighashFlags);\n sigValid = ECKey.verify(hash.getBytes(), sig, pubKey);\n } catch (Exception e1) {\n log.warn(e1.toString());\n }\n if (opcode == OP_CHECKSIG)\n stack.add(sigValid ? new byte[] { 1 } : new byte[] { 0 });\n else if (opcode == OP_CHECKSIGVERIFY)\n if (!sigValid)\n throw new ScriptException(\"String_Node_Str\");\n}\n"
|
"final int getInt(int column) throws SqlException {\n switch(jdbcTypes_[column - 1]) {\n case java.sql.Types.BOOLEAN:\n return agent_.crossConverters_.getIntFromBoolean(get_BOOLEAN(column));\n case java.sql.Types.SMALLINT:\n return (int) get_SMALLINT(column);\n case java.sql.Types.INTEGER:\n return get_INTEGER(column);\n case java.sql.Types.BIGINT:\n return agent_.crossConverters_.getIntFromLong(get_BIGINT(column));\n case java.sql.Types.REAL:\n return agent_.crossConverters_.getIntFromFloat(get_FLOAT(column));\n case java.sql.Types.DOUBLE:\n return agent_.crossConverters_.getIntFromDouble(get_DOUBLE(column));\n case java.sql.Types.DECIMAL:\n return agent_.crossConverters_.getIntFromLong(getLongFromDECIMAL(column));\n case java.sql.Types.CHAR:\n return agent_.crossConverters_.getIntFromString(getCHAR(column));\n case java.sql.Types.VARCHAR:\n case java.sql.Types.LONGVARCHAR:\n return agent_.crossConverters_.getIntFromString(getVARCHAR(column));\n default:\n throw coercionError(\"String_Node_Str\", column);\n }\n}\n"
|
"private ColumnSlice[] getPagedColumnSlices(DecoratedKey dk, Collection<IndexEntry> entries, int pageSize) {\n ColumnSlice[] columnSlices = new ColumnSlice[Math.min(entries.size(), pageSize)];\n int i = 0;\n for (IndexEntry entry : entries) {\n CellName cellName = entry.clusteringKey;\n if (!filter.columnFilter(dk.getKey()).maySelectPrefix(tableMapper.table.getComparator(), cellName.start())) {\n continue;\n }\n Composite start = tableMapper.start(cellName);\n Composite end = tableMapper.end(start);\n ColumnSlice columnSlice = new ColumnSlice(start, end);\n columnSlices[i++] = columnSlice;\n if (i >= pageSize) {\n break;\n }\n }\n return columnSlices;\n}\n"
|
"public void testFromSimpleCypherResult() throws Exception {\n final CypherQueryExecutor.CypherResult result = result(\"String_Node_Str\", aNode);\n final SubGraph graph = SubGraph.from(gdb, result);\n assertRefNodeGraph(graph);\n}\n"
|
"protected void onDataSetupComplete(AsyncResult ar) {\n String reason = null;\n if (ar.userObj instanceof String) {\n reason = (String) ar.userObj;\n }\n if (ar.exception == null) {\n if (isApnTypeActive(Phone.APN_TYPE_DEFAULT)) {\n SystemProperties.set(\"String_Node_Str\", \"String_Node_Str\");\n if (canSetPreferApn && preferredApn == null) {\n Log.d(LOG_TAG, \"String_Node_Str\");\n preferredApn = mActiveApn;\n setPreferredApn(preferredApn.id);\n }\n } else {\n SystemProperties.set(\"String_Node_Str\", \"String_Node_Str\");\n }\n notifyDefaultData(reason);\n } else {\n GsmDataConnection.FailCause cause;\n cause = (GsmDataConnection.FailCause) (ar.result);\n if (DBG)\n log(\"String_Node_Str\" + cause);\n if (cause.isEventLoggable()) {\n GsmCellLocation loc = ((GsmCellLocation) phone.getCellLocation());\n EventLog.writeEvent(EventLogTags.PDP_SETUP_FAIL, cause.ordinal(), loc != null ? loc.getCid() : -1, TelephonyManager.getDefault().getNetworkType());\n }\n if (cause.isPermanentFail()) {\n notifyNoData(cause);\n phone.notifyDataConnection(Phone.REASON_APN_FAILED);\n onEnableApn(apnTypeToId(mRequestedApnType), DISABLED);\n return;\n }\n waitingApns.remove(0);\n if (waitingApns.isEmpty()) {\n startDelayedRetry(cause, reason);\n } else {\n setState(State.SCANNING);\n sendMessageDelayed(obtainMessage(EVENT_TRY_SETUP_DATA, reason), APN_DELAY_MILLIS);\n }\n }\n}\n"
|
"private boolean addDataExpOfBaseSeries(String dataExp) {\n boolean result = addDataExp(dataExp, \"String_Node_Str\");\n if (result) {\n addDataExpForAggregate(dataExp, \"String_Node_Str\");\n }\n return result;\n}\n"
|
"public Iterable<BusinessMetadataRecord> apply(BusinessMetadataDataset input) throws Exception {\n if (searchQuery.contains(BusinessMetadataDataset.KEYVALUE_SEPARATOR)) {\n return input.findBusinessMetadataOnKeyValue(namespaceId, searchQuery, type);\n }\n return input.findBusinessMetadataOnValue(searchQuery, type);\n}\n"
|
"public void exportTopology(OutputStream os) throws IOException {\n Graph g = new Graph().id(\"String_Node_Str\" + NodeBreakerVoltageLevel.this.id + \"String_Node_Str\");\n Map<Integer, Node> intToNode = new HashMap<>();\n Multimap<String, Integer> busToNodes = ArrayListMultimap.create();\n for (int n = 0; n < graph.getVertexCount(); n++) {\n Node node = new Node().id(Integer.toString(n));\n intToNode.put(n, node);\n Bus bus = getCalculatedBusBreakerTopology().getBus(n);\n if (bus != null) {\n busToNodes.put(bus.getId(), n);\n } else {\n TerminalExt terminal = graph.getVertexObject(n);\n if (terminal != null) {\n AbstractConnectable connectable = terminal.getConnectable();\n String label = n + \"String_Node_Str\" + connectable.getType().toString() + \"String_Node_Str\" + connectable.getId();\n node.attr(LABEL_ATTRIBUTE, label);\n g.node(node);\n }\n }\n }\n String[] colors = Colors.generateColorScale(busToNodes.asMap().keySet().size());\n int i = 0;\n for (String key : busToNodes.asMap().keySet()) {\n Graph newBus = new Graph().id(\"String_Node_Str\" + key + \"String_Node_Str\");\n newBus.attr(\"String_Node_Str\", key);\n for (int nodeInt : busToNodes.get(key)) {\n Node node = intToNode.get(nodeInt);\n TerminalExt terminal = graph.getVertexObject(nodeInt);\n if (terminal != null) {\n AbstractConnectable connectable = terminal.getConnectable();\n String label = nodeInt + \"String_Node_Str\" + connectable.getType().toString() + \"String_Node_Str\" + connectable.getId();\n node.attr(\"String_Node_Str\", label);\n }\n node.attr(\"String_Node_Str\", \"String_Node_Str\").attr(\"String_Node_Str\", colors[i]);\n newBus.node(node);\n }\n g.subGraph(newBus);\n i++;\n }\n boolean drawSwitchId = true;\n for (int e = 0; e < graph.getEdgeCount(); e++) {\n Edge edge = new Edge(intToNode.get(graph.getEdgeVertex1(e)), intToNode.get(graph.getEdgeVertex2(e))).id(Integer.toString(e));\n SwitchImpl aSwitch = graph.getEdgeObject(e);\n if (aSwitch != null) {\n if (drawSwitchId) {\n edge.attr(\"String_Node_Str\", aSwitch.getKind().toString() + \"String_Node_Str\" + aSwitch.getId()).attr(\"String_Node_Str\", \"String_Node_Str\");\n }\n edge.attr(\"String_Node_Str\", aSwitch.isOpen() ? \"String_Node_Str\" : \"String_Node_Str\");\n }\n g.edge(edge);\n }\n g.writeTo(os);\n}\n"
|
"public void stopCluster(final String clusterName, final String nodeGroupName, final String nodeName) {\n Map<String, String> queryStrings = new HashMap<String, String>();\n queryStrings.put(Constants.QUERY_ACTION_KEY, Constants.QUERY_ACTION_STOP);\n try {\n if (!validateNodeGroupName(nodeGroupName)) {\n CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_NODES_IN_CLUSTER, clusterName, Constants.OUTPUT_OP_STOP, Constants.OUTPUT_OP_RESULT_FAIL, \"String_Node_Str\");\n return;\n }\n if (!validateNodeName(clusterName, nodeGroupName, nodeName)) {\n CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_NODES_IN_CLUSTER, clusterName, Constants.OUTPUT_OP_STOP, Constants.OUTPUT_OP_RESULT_FAIL, \"String_Node_Str\");\n return;\n }\n String groupName = nodeGroupName;\n String fullNodeName = nodeName;\n if (nodeName != null) {\n if (nodeGroupName == null) {\n groupName = extractNodeGroupName(nodeName);\n if (groupName == null) {\n CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_NODES_IN_CLUSTER, clusterName, Constants.OUTPUT_OP_STOP, Constants.OUTPUT_OP_RESULT_FAIL, \"String_Node_Str\");\n return;\n }\n } else {\n fullNodeName = autoCompleteNodeName(clusterName, nodeGroupName, nodeName);\n }\n }\n String resource = getClusterResourceName(clusterName, groupName, fullNodeName);\n if (resource != null) {\n restClient.actionOps(resource, clusterName, queryStrings);\n CommandsUtils.printCmdSuccess(Constants.OUTPUT_OBJECT_NODES_IN_CLUSTER, clusterName, Constants.OUTPUT_OP_RESULT_STOP);\n }\n } catch (CliRestException e) {\n CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_NODES_IN_CLUSTER, clusterName, Constants.OUTPUT_OP_STOP, Constants.OUTPUT_OP_RESULT_FAIL, e.getMessage());\n }\n}\n"
|
"public void finishTask(TaskInstance task, boolean b, Map<String, Object> pVars, Map<String, Object> aVars, Map<AttachmentInstance, byte[]> attachments) throws TaskNotFoundException, IllegalTaskStateException, InstanceNotFoundException, VariableNotFoundException, Exception {\n logger.debug(\"String_Node_Str\");\n initContext();\n if (task.isTaskAssigned() == false && task.getTaskCandidates().contains(currentUserUID)) {\n LightTaskInstance lightTaskInstance = getQueryRuntimeAPI().getLightTaskInstance(task.getUUID());\n if (lightTaskInstance.getState() != ActivityState.EXECUTING)\n getRuntimeAPI().startTask(task.getUUID(), true);\n }\n setProcessAndActivityInstanceVariables(task, pVars, aVars);\n if (attachments != null) {\n for (AttachmentInstance a : attachments.keySet()) {\n logger.debug(a.getProcessInstanceUUID() + \"String_Node_Str\" + a.getName() + \"String_Node_Str\" + a.getFileName() + \"String_Node_Str\" + attachments.get(a).length);\n }\n getRuntimeAPI().addAttachments(attachments);\n }\n getRuntimeAPI().finishTask(task.getUUID(), false);\n}\n"
|
"public void paintComponent(Graphics g) {\n g = g.create();\n try {\n internalPaintComponent(g);\n } finally {\n g.dispose();\n }\n}\n"
|
"private FileInputSplit createTempFile(String content) throws IOException {\n this.tempFile = File.createTempFile(\"String_Node_Str\", \"String_Node_Str\");\n this.tempFile.deleteOnExit();\n DataOutputStream dos = new DataOutputStream(new FileOutputStream(tempFile));\n dos.writeBytes(content);\n dos.close();\n return new FileInputSplit(0, new Path(this.tempFile.toURI().toString()), 0, this.tempFile.length(), new String[] { \"String_Node_Str\" });\n}\n"
|
"private Class<?> injectToBootstrapClassLoader(String className) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, ClassNotFoundException {\n synchronized (lock) {\n if (this.injectedToRoot == false) {\n this.injectedToRoot = true;\n instrumentation.appendToBootstrapClassLoaderSearch(pluginJar);\n classPool.appendToBootstrapClassPath(pluginJar.getName());\n }\n }\n return Class.forName(className, false, null);\n}\n"
|
"protected Object getPropertyRelatedToContainer(Module module, ElementPropertyDefn prop) {\n return null;\n}\n"
|
"public static String getErrorMessageFromPostError(Context context, PostModel post, PostError error) {\n switch(error.type) {\n case UNKNOWN_POST:\n return post.isPage() ? context.getString(R.string.error_unknown_page) : context.getString(R.string.error_unknown_post);\n case UNKNOWN_POST_TYPE:\n return context.getString(R.string.error_unknown_post_type);\n case UNAUTHORIZED:\n return post.isPage() ? context.getString(R.string.error_refresh_unauthorized_pages) : context.getString(R.string.error_refresh_unauthorized_posts);\n }\n return TextUtils.isEmpty(error.message) ? error.type.toString() : error.message;\n}\n"
|
"public static Map<String, ObjectName> toObjectNameMap(final Map<String, ? extends AMXProxy> amxMap) {\n final Map<String, ObjectName> m = new HashMap<String, ObjectName>();\n for (final Map.Entry<String, ? extends AMXProxy> e : amxMap.entrySet()) {\n final AMXProxy value = e.getValue();\n m.put(e.getKey(), value.objectName());\n }\n return (Collections.checkedMap(m, String.class, ObjectName.class));\n}\n"
|
"public KubernetesClient createClient() throws NoSuchAlgorithmException, UnrecoverableKeyException, KeyStoreException, IOException, CertificateEncodingException {\n ConfigBuilder builder = new ConfigBuilder().withMasterUrl(serviceAddress).withRequestTimeout(readTimeout * 1000).withConnectionTimeout(connectTimeout * 1000);\n if (!StringUtils.isBlank(namespace)) {\n builder.withNamespace(namespace);\n }\n if (credentials instanceof TokenProducer) {\n final String token = ((TokenProducer) credentials).getToken(serviceAddress, caCertData, skipTlsVerify);\n builder.withOauthToken(token);\n } else if (credentials instanceof UsernamePasswordCredentials) {\n UsernamePasswordCredentials usernamePassword = (UsernamePasswordCredentials) credentials;\n builder.withUsername(usernamePassword.getUsername()).withPassword(Secret.toString(usernamePassword.getPassword()));\n } else if (credentials instanceof StandardCertificateCredentials) {\n StandardCertificateCredentials certificateCredentials = (StandardCertificateCredentials) credentials;\n KeyStore keyStore = certificateCredentials.getKeyStore();\n String alias = keyStore.aliases().nextElement();\n X509Certificate certificate = (X509Certificate) keyStore.getCertificate(alias);\n Key key = keyStore.getKey(alias, Secret.toString(certificateCredentials.getPassword()).toCharArray());\n builder.withClientCertData(Base64.encodeBase64String(certificate.getEncoded())).withClientKeyData(pemEncodeKey(key)).withClientKeyPassphrase(Secret.toString(certificateCredentials.getPassword()));\n }\n if (skipTlsVerify) {\n builder.withTrustCerts(true);\n }\n if (caCertData != null) {\n builder.withCaCertData(Base64.encodeBase64String(caCertData.getBytes(UTF_8)));\n }\n LOGGER.log(Level.FINE, \"String_Node_Str\", this.toString());\n return new DefaultKubernetesClient(builder.build());\n}\n"
|
"public boolean run(VerbRunner cb) {\n VerbRunner v = null;\n if (verb == null) {\n v = (VerbRunner) cb;\n }\n if (v == null && actor != null) {\n BaseActor a = w.getCurrentScene().getActor(actor, true);\n v = ((InteractiveActor) a).getVerb(verb, target);\n }\n if (v == null) {\n v = World.getInstance().getCurrentScene().getVerb(verb);\n }\n if (v == null) {\n v = World.getInstance().getVerbManager().getVerb(verb, null, null);\n }\n if (v != null) {\n v.cancel();\n World.getInstance().getCurrentScene().getTimers().removeTimerWithCb(v);\n } else\n EngineLogger.error(\"String_Node_Str\" + verb + \"String_Node_Str\" + actor);\n return false;\n}\n"
|
"public void openStartElement(XPathFragment xPathFragment, NamespaceResolver namespaceResolver) {\n super.openStartElement(xPathFragment, namespaceResolver);\n try {\n String namespaceURI = resolveNamespacePrefix(xPathFragment, namespaceResolver);\n if (namespaceURI == null) {\n xmlStreamWriter.writeStartElement(\"String_Node_Str\", xPathFragment.getLocalName(), \"String_Node_Str\");\n String defaultNamespace = xmlStreamWriter.getNamespaceContext().getNamespaceURI(\"String_Node_Str\");\n if (defaultNamespace != null && !defaultNamespace.equals(\"String_Node_Str\")) {\n xmlStreamWriter.writeDefaultNamespace(\"String_Node_Str\");\n }\n } else {\n String prefix = xPathFragment.getPrefix();\n if (prefix == null) {\n prefix = \"String_Node_Str\";\n }\n xmlStreamWriter.writeStartElement(prefix, xPathFragment.getLocalName(), namespaceURI);\n }\n writePrefixMappings();\n } catch (XMLStreamException e) {\n throw XMLMarshalException.marshalException(e);\n }\n}\n"
|
"public boolean equals(Object obj) {\n if (this == obj)\n return true;\n if (obj == null)\n return false;\n if (!(obj instanceof RecCV))\n throw new STCRuntimeError(\"String_Node_Str\" + this.getClass().getName() + \"String_Node_Str\" + obj.getClass().getName());\n RecCV other = (RecCV) obj;\n if (arg == null) {\n if (other.arg != null)\n return false;\n } else if (!arg.equals(other.arg))\n return false;\n if (cv == null) {\n if (other.cv != null)\n return false;\n } else if (!cv.equals(other.cv))\n return false;\n return true;\n}\n"
|
"public int DR() {\n int effectiveTier = armorTier;\n if (glyph != null)\n effectiveTier += glyph.tierDRAdjust();\n effectiveTier = Math.max(0, effectiveTier);\n return effectiveTier * (2 + level());\n}\n"
|
"public void onResume() {\n EventBus.getDefault().register(this);\n SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(getActivity());\n if (mPrefs.getBoolean(SettingsActivity.CB_MARK_AS_READ_WHILE_SCROLLING_STRING, false)) {\n getListView().setOnScrollListener(ListScrollListener);\n }\n if (reloadCursorOnStartUp)\n UpdateCurrentRssView(getActivity(), true);\n else\n UpdateCurrentRssView(getActivity(), false);\n super.onResume();\n}\n"
|
"public boolean apply(Game game, Ability source) {\n boolean conditionApplies = false;\n switch(this.type) {\n case FEWER_THAN:\n conditionApplies = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game) < this.count;\n break;\n case MORE_THAN:\n conditionApplies = game.getBattlefield().countAll(filter, source.getControllerId(), game) > this.count;\n break;\n case EQUAL_TO:\n conditionApplies = game.getBattlefield().countAll(filter, source.getControllerId(), game) == this.count;\n break;\n }\n if (this.condition != null) {\n conditionApplies = conditionApplies && this.condition.apply(game, source);\n }\n return conditionApplies;\n}\n"
|
"private InputStream getFileInputStream(String path) throws FileNotFoundException {\n InputStream ret = null;\n File f = new File(path);\n if (f.exists()) {\n ret = new FileInputStream(f);\n } else {\n ret = PolicyMgrUserGroupBuilder.class.getResourceAsStream(path);\n if (ret == null) {\n if (!path.startsWith(\"String_Node_Str\")) {\n ret = getClass().getResourceAsStream(\"String_Node_Str\" + path);\n }\n }\n if (ret == null) {\n ret = ClassLoader.getSystemClassLoader().getResourceAsStream(path);\n if (ret == null) {\n if (!path.startsWith(\"String_Node_Str\")) {\n ret = ClassLoader.getSystemResourceAsStream(\"String_Node_Str\" + path);\n }\n }\n }\n }\n return ret;\n}\n"
|
"public void populateDatatable(HttpServletResponse response, HttpServletRequest request, Feature[] features, int datasetSize) throws IOException {\n JSONObject jsonResponse = new JSONObject();\n jsonResponse.put(\"String_Node_Str\", Integer.parseInt(request.getParameter(\"String_Node_Str\")));\n jsonResponse.put(\"String_Node_Str\", datasetSize);\n jsonResponse.put(\"String_Node_Str\", datasetSize);\n for (Feature feature : features) {\n JSONArray jsonArray = new JSONArray();\n jsonArray.put(\"String_Node_Str\" + feature.getFieldName() + \"String_Node_Str\");\n jsonArray.put(buildInputCheckBox(feature.isInputSpecified()));\n jsonArray.put(buildSectionBox(new String[] { \"String_Node_Str\", \"String_Node_Str\" }, feature.getType().getFeatureName(), \"String_Node_Str\"));\n jsonArray.put(feature.getSummaryStats());\n jsonArray.put(buildSectionBox(new String[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" }, feature.getImputeOperation().getImputeOptionName(), \"String_Node_Str\"));\n jsonResponse.append(\"String_Node_Str\", jsonArray);\n }\n response.resetBuffer();\n response.reset();\n response.setContentType(\"String_Node_Str\");\n response.getWriter().print(jsonResponse.toString().trim());\n}\n"
|
"public IClass lookupClass(final TypeReference typeRef) {\n final TypeName name = typeRef.getName();\n if (isClassAlreadyDefinedOrCurrentlyLoaded(typeRef)) {\n return ensureIsNotNull(clazzes.get(name));\n }\n if (typeRef.isArrayType()) {\n final ArrayClassLoader arrayClassLoader = scope.getArrayClassLoader();\n final IClass lookupClass = arrayClassLoader.lookupClass(name, appLoader, this);\n if (lookupClass == null) {\n System.err.println(\"String_Node_Str\" + name);\n }\n return lookupClass;\n }\n try {\n if (typeRef.getClassLoader().equals(SYNTETIC)) {\n return ensureIsNotNull(loadSynteticType(typeRef));\n }\n final IType type = findEclipseHandle(typeRef);\n if (type instanceof BinaryType) {\n return ensureIsNotNull(loadBinaryClass((BinaryType) type));\n } else if (type instanceof SourceType) {\n return loadFromProjectOutputLocation((SourceType) type);\n }\n } catch (final JavaModelException e) {\n throwUnhandledException(e);\n }\n return null;\n}\n"
|
"public void run() {\n File imageFile = menuItem.getImage();\n if (imageFile != null) {\n ImageIcon origIcon = new ImageIcon(imageFile.getAbsolutePath());\n _native.setIcon(origIcon);\n } else {\n _native.setIcon(transparentIcon);\n }\n}\n"
|
"private static void setNodeTypeProperties(Resource nodeTypeResource, TNodeType nodeType) {\n PropertiesDefinition nodeTypeProperties = objFactory.createTEntityTypePropertiesDefinition();\n String nodeTypeNameSpace = getXMLNamespace(nodeTypeResource);\n QName propertiesReference;\n try {\n propertiesReference = new QName(nodeTypeNameSpace, getNodeTypePropertiesName(nodeTypeResource), getNSPrefix(nodeTypeResource));\n } catch (NoPrefixMappingFoundException e) {\n propertiesReference = new QName(nodeTypeNameSpace, getNodeTypePropertiesName(nodeTypeResource));\n }\n nodeTypeProperties.setElement(propertiesReference);\n nodeType.setPropertiesDefinition(nodeTypeProperties);\n}\n"
|
"public DeclaredFunctionType toDeclaredFunctionType() {\n if (isQmarkFunction()) {\n return FunctionTypeBuilder.qmarkFunctionBuilder().buildDeclaration();\n }\n Preconditions.checkState(!isLoose(), \"String_Node_Str\", this);\n if (isGeneric()) {\n return null;\n }\n if (nominalType != null) {\n return null;\n }\n FunctionTypeBuilder builder = new FunctionTypeBuilder();\n for (JSType type : requiredFormals) {\n builder.addReqFormal(type);\n }\n for (JSType type : optionalFormals) {\n builder.addOptFormal(type);\n }\n builder.addRestFormals(restFormals);\n builder.addRetType(returnType);\n builder.addNominalType(nominalType);\n builder.addReceiverType(receiverType);\n return builder.buildDeclaration();\n}\n"
|
"public void onBackPressed() {\n if (currentFragment instanceof ColorPref) {\n if (((ColorPref) currentFragment).onBackPressed())\n return;\n }\n if (selectedItem != START_PREFERENCE && restartActivity) {\n restartActivity(this);\n } else if (selectedItem != START_PREFERENCE) {\n selectItem(START_PREFERENCE);\n } else {\n Intent in = new Intent(PreferencesActivity.this, MainActivity.class);\n in.setAction(Intent.ACTION_MAIN);\n in.setAction(Intent.CATEGORY_LAUNCHER);\n this.startActivity(in);\n this.finish();\n }\n}\n"
|
"private synchronized void lostShieldedClientSupernodeConnection() {\n if (_connections.size() == 0 && _keepAlive > 0) {\n setKeepAlive(SettingsManager.instance().getKeepAlive());\n }\n}\n"
|
"private MapReduceExecutable createInvertedIndexStep(IISegment seg, String intermediateHiveTable, String iiOutputTempPath) {\n MapReduceExecutable buildIIStep = new MapReduceExecutable();\n StringBuilder cmd = new StringBuilder();\n appendMapReduceParameters(cmd, engineConfig);\n buildIIStep.setName(ExecutableConstants.STEP_NAME_BUILD_II);\n appendExecCmdParameters(cmd, \"String_Node_Str\", seg.getIIInstance().getName());\n appendExecCmdParameters(cmd, \"String_Node_Str\", intermediateHiveTable);\n appendExecCmdParameters(cmd, \"String_Node_Str\", iiOutputTempPath);\n appendExecCmdParameters(cmd, \"String_Node_Str\", ExecutableConstants.STEP_NAME_BUILD_II);\n buildIIStep.setMapReduceParams(cmd.toString());\n buildIIStep.setMapReduceJobClass(InvertedIndexJob.class);\n return buildIIStep;\n}\n"
|
"public void doWork() throws Exception {\n boolean exit = false;\n logger.info(\"String_Node_Str\" + targetName);\n OperationStatusWithDetail detailedStatus = null;\n SoftwareManagementClient monitorClient = new SoftwareManagementClient();\n monitorClient.init();\n while (!exit) {\n try {\n Thread.sleep(queryInterval);\n } catch (InterruptedException e) {\n logger.info(\"String_Node_Str\");\n stop = true;\n }\n if (stop) {\n logger.info(\"String_Node_Str\");\n exit = true;\n }\n logger.info(\"String_Node_Str\");\n detailedStatus = monitorClient.getOperationStatusWithDetail(targetName);\n if (null == detailedStatus) {\n logger.error(\"String_Node_Str\");\n break;\n }\n logger.info(\"String_Node_Str\" + detailedStatus.getOperationStatus().isFinished());\n logger.debug(detailedStatus.toString());\n logger.info(\"String_Node_Str\");\n if (detailedStatus.getOperationStatus().getProgress() < 100) {\n int progress = detailedStatus.getOperationStatus().getProgress();\n statusUpdater.setProgress(((double) progress) / 100);\n }\n setLastErrorMsg(detailedStatus.getOperationStatus().getErrorMsg());\n clusterEntityMgr.handleOperationStatus(targetName.split(\"String_Node_Str\")[0], detailedStatus, exit);\n if (queryInterval == QUERY_INTERVAL_DEFAULT) {\n int size = detailedStatus.getClusterData().getClusterSize();\n if (size > BIG_CLUSTER_NODES_COUNT) {\n queryInterval = Math.min(QUERY_INTERVAL_MAX, QUERY_INTERVAL_LONG * (size / BIG_CLUSTER_NODES_COUNT));\n logger.info(\"String_Node_Str\" + queryInterval / 1000 + \"String_Node_Str\" + size + \"String_Node_Str\");\n }\n }\n }\n if (monitorClient != null) {\n monitorClient.close();\n }\n}\n"
|
"protected void onDraw(Canvas canvas) {\n int startX = getScrollX() + (iconLeftBitmaps == null ? 0 : (iconOuterWidth + iconPadding));\n int endX = getScrollX() + (iconRightBitmaps == null ? getWidth() : getWidth() - iconOuterWidth - iconPadding);\n int lineStartY = getScrollY() + getHeight() - getPaddingBottom();\n paint.setAlpha(255);\n if (iconLeftBitmaps != null) {\n Bitmap icon = iconLeftBitmaps[!isInternalValid() ? 3 : !isEnabled() ? 2 : hasFocus() ? 1 : 0];\n int iconLeft = startX - iconPadding - iconOuterWidth + (iconOuterWidth - icon.getWidth()) / 2;\n int iconTop = lineStartY + bottomSpacing - iconOuterHeight + (iconOuterHeight - icon.getHeight()) / 2;\n canvas.drawBitmap(icon, iconLeft, iconTop, paint);\n }\n if (iconRightBitmaps != null) {\n Bitmap icon = iconRightBitmaps[!isInternalValid() ? 3 : !isEnabled() ? 2 : hasFocus() ? 1 : 0];\n int iconRight = endX + iconPadding + (iconOuterWidth - icon.getWidth()) / 2;\n int iconTop = lineStartY + bottomSpacing - iconOuterHeight + (iconOuterHeight - icon.getHeight()) / 2;\n canvas.drawBitmap(icon, iconRight, iconTop, paint);\n }\n if (!hideUnderline) {\n lineStartY += bottomSpacing;\n if (!isInternalValid()) {\n paint.setColor(errorColor);\n canvas.drawRect(startX, lineStartY, endX, lineStartY + getPixel(2), paint);\n } else if (!isEnabled()) {\n paint.setColor(baseColor & 0x00ffffff | 0x44000000);\n float interval = getPixel(1);\n for (float xOffset = 0; xOffset < getWidth(); xOffset += interval * 3) {\n canvas.drawRect(startX + xOffset, lineStartY, startX + xOffset + interval, lineStartY + getPixel(1), paint);\n }\n } else if (hasFocus()) {\n paint.setColor(primaryColor);\n canvas.drawRect(startX, lineStartY, endX, lineStartY + getPixel(2), paint);\n } else {\n paint.setColor(baseColor & 0x00ffffff | 0x1E000000);\n canvas.drawRect(startX, lineStartY, endX, lineStartY + getPixel(1), paint);\n }\n }\n textPaint.setTextSize(bottomTextSize);\n Paint.FontMetrics textMetrics = textPaint.getFontMetrics();\n float relativeHeight = -textMetrics.ascent - textMetrics.descent;\n float bottomTextPadding = bottomTextSize + textMetrics.ascent + textMetrics.descent;\n if ((hasFocus() && hasCharatersCounter()) || !isCharactersCountValid()) {\n textPaint.setColor(isCharactersCountValid() ? getCurrentHintTextColor() : errorColor);\n String text;\n if (minCharacters <= 0) {\n text = isRTL() ? maxCharacters + \"String_Node_Str\" + getText().length() : getText().length() + \"String_Node_Str\" + maxCharacters;\n } else if (maxCharacters <= 0) {\n text = isRTL() ? \"String_Node_Str\" + minCharacters + \"String_Node_Str\" + getText().length() : getText().length() + \"String_Node_Str\" + minCharacters + \"String_Node_Str\";\n } else {\n text = isRTL() ? maxCharacters + \"String_Node_Str\" + minCharacters + \"String_Node_Str\" + getText().length() : getText().length() + \"String_Node_Str\" + minCharacters + \"String_Node_Str\" + maxCharacters;\n }\n canvas.drawText(text, isRTL() ? startX : endX - textPaint.measureText(text), lineStartY + bottomSpacing + relativeHeight, textPaint);\n }\n if (textLayout != null) {\n if (tempErrorText != null || (hasFocus() && !TextUtils.isEmpty(helperText))) {\n textPaint.setColor(tempErrorText != null ? errorColor : helperTextColor != -1 ? helperTextColor : getCurrentHintTextColor());\n canvas.save();\n canvas.translate(startX + getBottomTextLeftOffset(), lineStartY + bottomSpacing - bottomTextPadding);\n textLayout.draw(canvas);\n canvas.restore();\n }\n }\n if (floatingLabelEnabled && !TextUtils.isEmpty(floatingLabelText)) {\n textPaint.setTextSize(floatingLabelTextSize);\n textPaint.setColor((Integer) focusEvaluator.evaluate(focusFraction, getCurrentHintTextColor(), primaryColor));\n float floatingLabelWidth = textPaint.measureText(floatingLabelText.toString());\n int floatingLabelStartX;\n if ((getGravity() & Gravity.RIGHT) == Gravity.RIGHT || isRTL()) {\n floatingLabelStartX = (int) (endX - floatingLabelWidth);\n } else if ((getGravity() & Gravity.LEFT) == Gravity.LEFT) {\n floatingLabelStartX = startX;\n } else {\n floatingLabelStartX = startX + (int) (getInnerPaddingLeft() + (getWidth() - getInnerPaddingLeft() - getInnerPaddingRight() - floatingLabelWidth) / 2);\n }\n int floatingLabelStartY = innerPaddingTop + floatingLabelTextSize + floatingLabelSpacing;\n int distance = floatingLabelSpacing;\n int position = (int) (floatingLabelStartY - distance * floatingLabelFraction);\n int alpha = (int) (floatingLabelFraction * 0xff * (0.74f * focusFraction + 0.26f));\n textPaint.setAlpha(alpha);\n canvas.drawText(floatingLabelText.toString(), floatingLabelStartX, position, textPaint);\n }\n if (hasFocus() && singleLineEllipsis && getScrollX() != 0) {\n paint.setColor(primaryColor);\n float startY = lineStartY + bottomSpacing;\n int ellipsisStartX;\n if (isRTL()) {\n ellipsisStartX = endX;\n } else {\n ellipsisStartX = startX;\n }\n int signum = isRTL() ? -1 : 1;\n canvas.drawCircle(ellipsisStartX + signum * bottomEllipsisSize / 2, startY + bottomEllipsisSize / 2, bottomEllipsisSize / 2, paint);\n canvas.drawCircle(ellipsisStartX + signum * bottomEllipsisSize * 5 / 2, startY + bottomEllipsisSize / 2, bottomEllipsisSize / 2, paint);\n canvas.drawCircle(ellipsisStartX + signum * bottomEllipsisSize * 9 / 2, startY + bottomEllipsisSize / 2, bottomEllipsisSize / 2, paint);\n }\n super.onDraw(canvas);\n}\n"
|
"public boolean validate(CreditCard12 creditCard) {\n Character lastDigit = creditCard.getNumber().charAt(creditCard.getNumber().length() - 1);\n if (Integer.parseInt(lastDigit.toString()) % 2 == 0) {\n return true;\n } else {\n return false;\n }\n}\n"
|
"public void render(Entity entity, float rotation, float brightness, float invRender, float f3, float f4, float f5) {\n GlStateManager.pushMatrix();\n this.basePlate.render(f5);\n GL11.glRotatef(rotation, 0F, 0F, 1F);\n this.hub1.render(f5);\n GL11.glRotatef(rotation * 2F, 0F, 0F, -1F);\n this.hub2.render(f5);\n float lastBrightnessX = OpenGlHelper.lastBrightnessX;\n float lastBrightnessY = OpenGlHelper.lastBrightnessY;\n float b = brightness * 200F;\n float colour = Math.min(2F, (brightness * 2F) + 0.1F);\n OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, Math.min(200F, lastBrightnessX + b), Math.min(200F, lastBrightnessY + b));\n if (brightness > 0F && invRender == 0) {\n GL11.glDisable(GL11.GL_LIGHTING);\n }\n GL11.glColor4f(colour, colour, colour, 1F);\n this.rotor2R.render(f5);\n GL11.glRotatef(rotation * 2F, 0F, 0F, 1F);\n this.rotor1R.render(f5);\n GL11.glColor4f(1F, 1F, 1F, 1F);\n OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lastBrightnessX, lastBrightnessY);\n if (brightness > 0F && invRender == 0) {\n GL11.glEnable(GL11.GL_LIGHTING);\n }\n GL11.glPopMatrix();\n}\n"
|
"protected boolean checkRequiredWords(Multiset<String> reasonsForRejection, List<String> requiredWords, SearchResultItem item) {\n if (!requiredWords.isEmpty()) {\n List<String> titleWords = getTitleWords(item);\n for (String requiredWord : requiredWords) {\n if (requiredWord.contains(\"String_Node_Str\") || requiredWord.contains(\"String_Node_Str\")) {\n if (item.getTitle().contains(requiredWord)) {\n return true;\n }\n } else {\n if (titleWords.contains(requiredWord)) {\n return true;\n }\n }\n }\n logger.debug(MARKER, \"String_Node_Str\", item.getTitle());\n reasonsForRejection.add(\"String_Node_Str\");\n return false;\n }\n return true;\n}\n"
|
"private void generalizationCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {\n updateGeneralizationGUIEnabledState();\n model.setGeneralizing(generalizationCheckBox.isSelected());\n if (generalizationCheckBox.isSelected()) {\n generalizeAndRender();\n }\n}\n"
|
"public static void finalizeStaticSpaceMap() {\n Address startAddress = Space.getDiscontigStart();\n int first = hashAddress(startAddress);\n int last = hashAddress(Space.getDiscontigEnd().minus(1));\n int pages = (1 + last - first) * Space.PAGES_IN_CHUNK + 1;\n globalPageMap.resizeFreeList(pages, pages);\n for (int pr = 0; pr < sharedDiscontigFLCount; pr++) sharedFLMap[pr].resizeFreeList(startAddress);\n regionMap.alloc(start);\n for (int chunk = start; chunk < end; chunk++) regionMap.alloc(1);\n regionMap.alloc(Space.MAX_CHUNKS - end);\n int firstPage = 0;\n for (int chunk = start; chunk < end; chunk++) {\n if (VM.VERIFY_ASSERTIONS)\n VM.assertions._assert(spaceMap[chunk] == null);\n totalAvailableDiscontiguousChunks++;\n regionMap.free(chunk);\n globalPageMap.setUncoalescable(firstPage);\n int tmp = globalPageMap.alloc(Space.PAGES_IN_CHUNK);\n if (VM.VERIFY_ASSERTIONS)\n VM.assertions._assert(tmp == firstPage);\n firstPage += Space.PAGES_IN_CHUNK;\n }\n}\n"
|
"public NestedSet<ResourceContainer> filterDependencyContainers(NestedSet<ResourceContainer> resourceContainers) {\n if (isEmpty) {\n return resourceContainers;\n }\n NestedSetBuilder<ResourceContainer> builder = new NestedSetBuilder<>(resourceContainers.getOrder());\n for (ResourceContainer container : resourceContainers) {\n builder.add(container.filter(errorConsumer, this, true));\n }\n return builder.build();\n}\n"
|
"public void switchBlock(ScriptEntry scriptEntry, Location interactLocation, SwitchState switchState, Player player) {\n World world = interactLocation.getWorld();\n boolean currentState = (interactLocation.getBlock().getData() & 0x8) > 0;\n String state = switchState.toString();\n CraftPlayer craftPlayer = (CraftPlayer) player;\n if (craftPlayer == null && Bukkit.getOnlinePlayers().size() > 0) {\n if (Bukkit.getOnlinePlayers().size() > 0) {\n craftPlayer = (CraftPlayer) Bukkit.getOnlinePlayers().toArray()[0];\n } else if (Depends.citizens != null) {\n for (NPC npc : CitizensAPI.getNPCRegistry()) {\n if (npc.isSpawned() && npc.getEntity() instanceof Player) {\n craftPlayer = (CraftPlayer) npc.getEntity();\n break;\n }\n }\n }\n }\n if ((state.equals(\"String_Node_Str\") && !currentState) || (state.equals(\"String_Node_Str\") && currentState) || state.equals(\"String_Node_Str\")) {\n try {\n if (interactLocation.getBlock().getType() == Material.IRON_DOOR_BLOCK) {\n interactLocation.getBlock().setData((byte) (interactLocation.getBlock().getData() ^ 4));\n Location block = null;\n if (interactLocation.clone().add(0, 1, 0).getBlock().getType() == Material.IRON_DOOR_BLOCK)\n block = interactLocation.clone().add(0, 1, 0);\n else if (interactLocation.clone().add(0, -1, 0).getBlock().getType() == Material.IRON_DOOR_BLOCK)\n block = interactLocation.clone().add(0, -1, 0);\n if (block != null)\n block.getBlock().setData((byte) (block.getBlock().getData() ^ 4));\n } else {\n Block.getById(interactLocation.getBlock().getType().getId()).interact(((CraftWorld) world).getHandle(), interactLocation.getBlockX(), interactLocation.getBlockY(), interactLocation.getBlockZ(), craftPlayer != null ? craftPlayer.getHandle() : null, 0, 0f, 0f, 0f);\n }\n dB.echoDebug(scriptEntry, \"String_Node_Str\" + interactLocation.getBlock().getType().toString() + \"String_Node_Str\" + ((interactLocation.getBlock().getData() & 0x8) > 0 ? \"String_Node_Str\" : \"String_Node_Str\"));\n } catch (NullPointerException e) {\n dB.echoError(\"String_Node_Str\" + interactLocation.getBlock().getType().toString() + \"String_Node_Str\");\n }\n }\n}\n"
|
"private void configureHateoasObjectMapper(ObjectMapper mapper, boolean indentJson) {\n mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);\n if (indentJson) {\n mapper.configure(SerializationFeature.INDENT_OUTPUT, true);\n }\n SimpleFilterProvider filterProvider = new SimpleFilterProvider();\n String[] filters = { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n for (String filterName : filters) {\n filterProvider = filterProvider.addFilter(filterName, new MultiFilter(new HateoasBeanPropertyFilter(), new DynamicPropertyFilter()));\n }\n filterProvider.setDefaultFilter(new DynamicPropertyFilter());\n filterProvider.setFailOnUnknownId(false);\n mapper.setFilters(filterProvider);\n AnnotationIntrospector primary = new JacksonAnnotationIntrospector();\n AnnotationIntrospector secondary = new JaxbAnnotationIntrospector(mapper.getTypeFactory());\n AnnotationIntrospector pair = new AnnotationIntrospectorPair(primary, secondary);\n mapper.setAnnotationIntrospector(pair);\n}\n"
|
"protected String getFileExtension() {\n return \"String_Node_Str\";\n}\n"
|
"public Builder onPatch(final Patch patch) {\n startTime = patch.getStartTime().getMillis();\n endTime = patch.getEndTime() == null ? System.currentTimeMillis() : patch.getEndTime().getMillis();\n return this;\n}\n"
|
"public long length() throws IOException {\n timeStart();\n try {\n return file.length();\n } finally {\n timeEnd();\n }\n}\n"
|
"private void updateFitConfiguration(FitEngineConfiguration config) {\n FitConfiguration fitConfig = config.getFitConfiguration();\n fitConfig.setComputeResiduals(config.getResidualsThreshold() < 1);\n logger = (resultsSettings.logProgress) ? new IJLogger() : null;\n fitConfig.setLog(logger);\n fitConfig.setComputeDeviations(resultsSettings.showDeviations);\n fitConfig.setFitValidation(!fitConfig.isSmartFilter());\n fitConfig.setNmPerPixel(calibration.nmPerPixel);\n fitConfig.setGain(calibration.gain);\n fitConfig.setBias(calibration.bias);\n fitConfig.setEmCCD(calibration.emCCD);\n}\n"
|
"public String getCauseDetails() {\n int causeRef = ei.getReferenceField(\"String_Node_Str\").getValue();\n if (causeRef != MJIEnv.NULL) {\n ElementInfo eiCause = ti.getElementInfo(causeRef);\n int msgRef = eiCause.getReferenceField(\"String_Node_Str\").getValue();\n if (msgRef != MJIEnv.NULL) {\n ElementInfo eiMsg = ti.getElementInfo(msgRef);\n return eiMsg.asString().getValue();\n }\n });\n}\n"
|
"public void declareToMaster(MasterConfig conf) throws NotEnoughAvailableSlavesException, IOException, ONCRPCException, InterruptedException {\n if (dispatcher.isMaster)\n return;\n Map<InetSocketAddress, LSN> states = stopAll(conf.getSlaves());\n if (states.size() < conf.getSyncN())\n throw new NotEnoughAvailableSlavesException(\"String_Node_Str\");\n List<LSN> values = new LinkedList<LSN>(states.values());\n Collections.sort(values);\n LSN latest = values.get(values.size() - 1);\n String backupDir = new File(conf.getBaseDir()).getParent() + File.separator + \"String_Node_Str\";\n DispatcherState state = stop();\n if (state.requestQueue != null)\n for (StageRequest rq : state.requestQueue) rq.free();\n if (latest.compareTo(state.latest) > 0) {\n for (Entry<InetSocketAddress, LSN> entry : states.entrySet()) {\n if (entry.getValue().equals(latest)) {\n changeConfiguration(new SlaveConfig(conf, entry.getKey(), backupDir));\n StateClient c = new StateClient(dispatcher.rpcClient, entry.getKey());\n c.toMaster(conf.getMaster()).get();\n ((SlaveRequestDispatcher) dispatcher).synchronize(latest);\n c.remoteStop().get();\n break;\n }\n }\n state = stop();\n }\n allToSlaves(conf.getSlaves(), conf.getSyncN(), conf.getMaster());\n set(conf, state);\n}\n"
|
"public void initializeRuleClasses(ConfiguredRuleClassProvider.Builder builder) {\n for (Entry<String, RepositoryFunction> handler : repositoryHandlers.entrySet()) {\n RuleDefinition ruleDefinition;\n try {\n ruleDefinition = handler.getValue().getRuleDefinition().getDeclaredConstructor().newInstance();\n } catch (IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException e) {\n throw new IllegalStateException(e);\n }\n builder.addRuleDefinition(ruleDefinition);\n }\n builder.addSkylarkModule(SkylarkRepositoryModule.class);\n}\n"
|
"public String getMoml(NamedObj object, String name) {\n CompositeEntity group = (CompositeEntity) object;\n Attribute before = object.getAttribute(\"String_Node_Str\");\n Attribute after = object.getAttribute(\"String_Node_Str\");\n StringWriter buffer = new StringWriter();\n int extraIndent = 0;\n try {\n buffer.write(\"String_Node_Str\");\n before = object.getAttribute(\"String_Node_Str\");\n if (before != null) {\n new Parameter(before, \"String_Node_Str\").setToken(BooleanToken.TRUE);\n buffer.write(StringUtilities.getIndentPrefix(1) + \"String_Node_Str\");\n before.exportMoML(buffer, 2);\n buffer.write(StringUtilities.getIndentPrefix(1) + \"String_Node_Str\");\n }\n after = object.getAttribute(\"String_Node_Str\");\n if (after != null) {\n new Parameter(after, \"String_Node_Str\").setToken(BooleanToken.TRUE);\n }\n if (after != null || before != null) {\n extraIndent++;\n buffer.write(StringUtilities.getIndentPrefix(extraIndent) + \"String_Node_Str\");\n }\n List<Attribute> attributes = group.attributeList();\n for (Attribute attribute : attributes) {\n if (!_IGNORED_ATTRIBUTES.contains(attribute.getName()) && (after == null || attribute != after) && (before == null || attribute != before)) {\n attribute.exportMoML(buffer, extraIndent + 1);\n }\n }\n List<Port> ports = group.portList();\n for (Port port : ports) {\n buffer.write(StringUtilities.getIndentPrefix(extraIndent + 1) + \"String_Node_Str\" + port.getName() + \"String_Node_Str\");\n if (port instanceof IOPort) {\n IOPort ioPort = (IOPort) port;\n boolean isInput = ioPort.isInput();\n boolean isOutput = ioPort.isOutput();\n if (isInput) {\n buffer.write(StringUtilities.getIndentPrefix(extraIndent + 2) + \"String_Node_Str\");\n }\n if (isOutput) {\n buffer.write(StringUtilities.getIndentPrefix(extraIndent + 2) + \"String_Node_Str\");\n }\n if (ioPort.isMultiport()) {\n buffer.write(StringUtilities.getIndentPrefix(extraIndent + 2) + \"String_Node_Str\");\n }\n }\n attributes = port.attributeList();\n for (Attribute attribute : attributes) {\n if (!_IGNORED_ATTRIBUTES.contains(attribute.getName())) {\n attribute.exportMoML(buffer, extraIndent + 2);\n }\n }\n buffer.write(StringUtilities.getIndentPrefix(extraIndent + 1) + \"String_Node_Str\");\n }\n buffer.write(StringUtilities.getIndentPrefix(extraIndent + 1) + \"String_Node_Str\");\n List<ComponentEntity> classes = group.classDefinitionList();\n for (ComponentEntity entity : classes) {\n entity.exportMoML(buffer, extraIndent + 2);\n }\n List<ComponentEntity> entities = group.entityList();\n for (ComponentEntity entity : entities) {\n entity.exportMoML(buffer, extraIndent + 2);\n }\n List<ComponentRelation> relations = group.relationList();\n for (ComponentRelation relation : relations) {\n relation.exportMoML(buffer, extraIndent + 2);\n }\n buffer.write(group.exportLinks(extraIndent + 2, null));\n buffer.write(StringUtilities.getIndentPrefix(extraIndent + 1) + \"String_Node_Str\");\n if (after != null || before != null) {\n buffer.write(StringUtilities.getIndentPrefix(extraIndent) + \"String_Node_Str\");\n }\n if (after != null) {\n buffer.write(StringUtilities.getIndentPrefix(1) + \"String_Node_Str\");\n after.exportMoML(buffer, 2);\n buffer.write(StringUtilities.getIndentPrefix(1) + \"String_Node_Str\");\n }\n buffer.write(\"String_Node_Str\");\n return buffer.toString();\n } catch (Exception e) {\n throw new InternalErrorException(null, e, \"String_Node_Str\" + \"String_Node_Str\" + group.getName() + \"String_Node_Str\");\n } finally {\n if (before != null) {\n Attribute attribute = before.getAttribute(\"String_Node_Str\");\n if (attribute != null) {\n try {\n attribute.setContainer(null);\n } catch (Throwable t) {\n }\n }\n }\n if (after != null) {\n Attribute attribute = after.getAttribute(\"String_Node_Str\");\n if (attribute != null) {\n try {\n attribute.setContainer(null);\n } catch (Throwable t) {\n }\n }\n }\n }\n}\n"
|
"public void action(List<String> children) {\n for (String cluster : new HashSet<String>(_distributedLayoutFactoryMap.keySet())) {\n if (!children.contains(cluster)) {\n _distributedLayoutFactoryMap.remove(cluster);\n }\n }\n for (String cluster : children) {\n try {\n watchForLayoutChangeEvents(cluster);\n } catch (KeeperException e) {\n LOG.error(\"String_Node_Str\", e);\n throw new RuntimeException(e);\n } catch (InterruptedException e) {\n LOG.error(\"String_Node_Str\", e);\n throw new RuntimeException(e);\n }\n }\n}\n"
|
"public void testLagRecovery() throws Exception {\n JournalWriter<Quote> origin = factory.writer(Quote.class, \"String_Node_Str\");\n TestUtils.generateQuoteData(origin, 100000, new Interval(\"String_Node_Str\", \"String_Node_Str\"));\n try (Journal<Quote> r = factory.reader(Quote.class, \"String_Node_Str\")) {\n Assert.assertEquals(100000, r.size());\n }\n long ts;\n try (JournalWriter<Quote> w = factory.writer(Quote.class)) {\n w.disableCommitOnClose();\n w.append(origin.query().all().asResultSet().subset(0, 15000));\n w.mergeAppend(origin.query().all().asResultSet().subset(15000, 17000));\n w.commit();\n ts = w.getMaxTimestamp();\n w.mergeAppend(origin.query().all().asResultSet().subset(16000, 27000));\n w.mergeAppend(origin.query().all().asResultSet().subset(23000, 37000));\n Assert.assertTrue(ts < w.getMaxTimestamp());\n Assert.assertEquals(37672, w.size());\n }\n try (Journal<Quote> w = factory.reader(Quote.class)) {\n Assert.assertEquals(ts, w.getMaxTimestamp());\n Assert.assertEquals(17000, w.size());\n }\n try (JournalWriter<Quote> w = factory.writer(Quote.class)) {\n Assert.assertEquals(ts, w.getMaxTimestamp());\n Assert.assertEquals(17000, w.size());\n }\n}\n"
|
"public void readInstance(ServerContext context, String resourceId, ReadRequest request, ResultHandler<Resource> handler) {\n try {\n Authentication.setAuthenticatedUserId(context.asContext(SecurityContext.class).getAuthenticationId());\n String processDefinitionId = ((RouterContext) context).getUriTemplateVariables().get(\"String_Node_Str\");\n ProcessDefinitionEntity procdef = (ProcessDefinitionEntity) ((RepositoryServiceImpl) processEngine.getRepositoryService()).getDeployedProcessDefinition(processDefinitionId);\n TaskDefinition taskDefinition = procdef.getTaskDefinitions().get(resourceId);\n if (taskDefinition != null) {\n Map value = mapper.convertValue(taskDefinition, HashMap.class);\n Resource r = new Resource(taskDefinition.getKey(), null, new JsonValue(value));\n FormService formService = processEngine.getFormService();\n String taskFormKey = formService.getTaskFormKey(processDefinitionId, resourceId);\n if (taskFormKey != null) {\n r.getContent().add(ActivitiConstants.ACTIVITI_FORMRESOURCEKEY, taskFormKey);\n ByteArrayInputStream startForm = (ByteArrayInputStream) ((RepositoryServiceImpl) processEngine.getRepositoryService()).getResourceAsStream(procdef.getDeploymentId(), taskFormKey);\n Reader reader = new InputStreamReader(startForm);\n try {\n Scanner s = new Scanner(reader).useDelimiter(\"String_Node_Str\");\n String formTemplate = s.hasNext() ? s.next() : \"String_Node_Str\";\n r.getContent().add(ActivitiConstants.ACTIVITI_FORMGENERATIONTEMPLATE, formTemplate);\n } finally {\n reader.close();\n }\n }\n }\n handler.handleResult(r);\n } catch (ActivitiObjectNotFoundException ex) {\n handler.handleError(new NotFoundException(ex.getMessage()));\n } catch (IllegalArgumentException ex) {\n handler.handleError(new InternalServerErrorException(ex.getMessage(), ex));\n } catch (Exception ex) {\n handler.handleError(new InternalServerErrorException(ex.getMessage(), ex));\n }\n}\n"
|
"public long getValvedCount() {\n return getValvedCount(getReadableDatabase());\n}\n"
|
"protected void onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect) {\n super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);\n if (!isVisible()) {\n return;\n }\n if (gainFocus) {\n if (mRollo != null && mRollo.mHasSurface) {\n gainFocus();\n } else {\n mShouldGainFocus = true;\n }\n } else {\n if (mRollo != null) {\n if (mArrowNavigation) {\n mRollo.clearSelectedIcon();\n mRollo.setHomeSelected(SELECTED_NONE);\n mRollo.mState.save();\n mArrowNavigation = false;\n }\n } else {\n mShouldGainFocus = false;\n }\n }\n}\n"
|
"private Set<Element> parseChildElements(ComplexType ctype, org.w3c.dom.Element element, XSDDocument xsdDocument) throws ParserException {\n logger.log(Level.FINER, \"String_Node_Str\", new Object[] { ctype, ctypes, element, xsdDocument });\n Set<Element> elements = new TreeSet<Element>();\n NodeList domElements = element.getElementsByTagNameNS(\"String_Node_Str\", \"String_Node_Str\");\n int noOfDomElements = domElements.getLength();\n for (int i = 0; i < noOfDomElements; i++) {\n org.w3c.dom.Element obj = (org.w3c.dom.Element) domElements.item(i);\n String name = obj.getAttribute(\"String_Node_Str\");\n String type = obj.getAttribute(\"String_Node_Str\");\n String[] typeParts = type.split(\"String_Node_Str\");\n if (typeParts != null && typeParts.length > 1)\n type = typeParts[1];\n Element elem = Context.getContext().getNewElement();\n elem.setName(name);\n elem.setType(type);\n elem.setContainerComplexType(ctype);\n String prevComment = Utils.getPreviousComment(obj);\n String nextComment = Utils.getNextComment(obj);\n if (prevComment != null || nextComment != null) {\n Comment comment = new Comment();\n comment.setNextComment(nextComment);\n comment.setPreviousComment(prevComment);\n elem.setComment(comment);\n }\n NamedNodeMap nameNodeMap = obj.getAttributes();\n int size = nameNodeMap.getLength();\n for (int j = 0; j < size; j++) {\n Attr attr = (Attr) nameNodeMap.item(j);\n if (attr != null) {\n Attribute attribute = new Attribute();\n attribute.setName(attr.getName());\n attribute.setValue(attr.getValue());\n elem.getAttributes().add(attribute);\n }\n }\n elem.setAnnotationInfo(parseAnnotation(obj));\n elements.add(elem);\n postProcessElement(elem, obj);\n xsdDocument.addIndependentElement(elem);\n }\n NodeList attributeNodes = element.getElementsByTagNameNS(\"String_Node_Str\", \"String_Node_Str\");\n if (attributeNodes != null) {\n int count = attributeNodes.getLength();\n for (int j = 0; j < count; j++) {\n org.w3c.dom.Element attrElem = (org.w3c.dom.Element) attributeNodes.item(j);\n AttributeElement attr = Context.getContext().getNewAttribute();\n String name = attrElem.getAttribute(\"String_Node_Str\");\n if (Utils.isEmpty(name)) {\n for (int k = 0; k < count; k++) {\n org.w3c.dom.Element ref = (org.w3c.dom.Element) attributeNodes.item(k);\n name = ref.getAttribute(\"String_Node_Str\");\n }\n }\n String type = attrElem.getAttribute(\"String_Node_Str\");\n attr.setContainerComplexType(ctype);\n String prevComment = Utils.getPreviousComment(attrElem);\n String nextComment = Utils.getNextComment(attrElem);\n if (prevComment != null || nextComment != null) {\n Comment comment = new Comment();\n comment.setNextComment(nextComment);\n comment.setPreviousComment(prevComment);\n attr.setComment(comment);\n }\n if (Utils.isEmpty(type)) {\n NodeList simpleTypes = attrElem.getElementsByTagNameNS(\"String_Node_Str\", \"String_Node_Str\");\n if (simpleTypes.getLength() > 0) {\n org.w3c.dom.Element elem = (org.w3c.dom.Element) simpleTypes.item(0);\n SimpleType simpleType = populateSimpleType(xsdDocument, elem, true);\n if (Utils.isEmpty(simpleType.getName())) {\n simpleType.setName(ctype.getName() + name + \"String_Node_Str\");\n }\n if (simpleType.getEnums() != null) {\n for (EnumElement enumE : simpleType.getEnums()) {\n enumE.setType(simpleType.getName());\n xsdDocument.addEnum(enumE);\n }\n }\n xsdDocument.addSimpleType(simpleType);\n attr.setType(simpleType.getName());\n attr.setBaseType(simpleType.getName());\n }\n } else {\n attr.setType(type);\n }\n attr.setName(name);\n org.w3c.dom.Element parent = (org.w3c.dom.Element) attrElem.getParentNode();\n if (parent.getTagName().endsWith(\"String_Node_Str\")) {\n String baseType = parent.getAttribute(\"String_Node_Str\");\n attr.setBaseType(baseType);\n }\n NamedNodeMap nameNodeMap = attrElem.getAttributes();\n int size = nameNodeMap.getLength();\n for (int k = 0; k < size; k++) {\n Attr attri = (Attr) nameNodeMap.item(k);\n if (attri != null) {\n Attribute attribute = new Attribute();\n attribute.setName(attri.getName());\n attribute.setValue(attri.getValue());\n attr.getAttributes().add(attribute);\n }\n }\n attr.setAnnotationInfo(parseAnnotation(attrElem));\n postProcessAttribute(attr, attrElem);\n ctype.addSimpleAttributeContent(attr);\n }\n }\n NodeList extensibleElements = element.getElementsByTagNameNS(\"String_Node_Str\", \"String_Node_Str\");\n org.w3c.dom.Element extensionbaseElem = (org.w3c.dom.Element) extensibleElements.item(0);\n if (extensionbaseElem != null) {\n String attribute = extensionbaseElem.getAttribute(\"String_Node_Str\");\n String parentType = null;\n String[] strs = attribute.split(\"String_Node_Str\");\n if (strs != null && strs.length > 1)\n parentType = strs[1];\n else\n parentType = attribute;\n ctype.setParentType(parentType);\n if (!Utils.isEmpty(parentType)) {\n xsdDocument.addParentToComplexTypeMap(parentType, ctype.getName());\n }\n }\n logger.log(Level.FINER, \"String_Node_Str\", new Object[] { elements });\n return elements;\n}\n"
|
"public List<DomainVO> findAllChildren(String path) {\n SearchCriteria<DomainVO> sc = FindAllChildrenSearch.create();\n sc.setParameters(\"String_Node_Str\", \"String_Node_Str\" + path + \"String_Node_Str\");\n sc.setParameters(\"String_Node_Str\", parentId);\n return listBy(sc);\n}\n"
|
"public View getView(int position, View convertView, ViewGroup parent) {\n View view = null;\n ViewHolder viewHolder;\n Contacts contacts = getItem(position);\n if (null == convertView) {\n view = LayoutInflater.from(mContext).inflate(mTextViewResourceId, null);\n viewHolder = new ViewHolder();\n viewHolder.mAlphabetTv = (TextView) view.findViewById(R.id.alphabet_text_view);\n viewHolder.mContactsMultiplePhoneOperationPromptIv = (ImageView) view.findViewById(R.id.contacts_multiple_phone_operation_prompt_image_view);\n viewHolder.mSelectContactsCB = (CheckBox) view.findViewById(R.id.select_contacts_check_box);\n viewHolder.mNameTv = (TextView) view.findViewById(R.id.name_text_view);\n viewHolder.mPhoneNumber = (TextView) view.findViewById(R.id.phone_number_text_view);\n viewHolder.mOperationViewIv = (ImageView) view.findViewById(R.id.operation_view_image_view);\n viewHolder.mOperationViewLayout = (View) view.findViewById(R.id.operation_view_layout);\n viewHolder.mCallIv = (ImageView) view.findViewById(R.id.call_image_view);\n viewHolder.mSmsIv = (ImageView) view.findViewById(R.id.sms_image_view);\n view.setTag(viewHolder);\n } else {\n view = convertView;\n viewHolder = (ViewHolder) view.getTag();\n }\n showAlphabetIndex(viewHolder.mAlphabetTv, position, contacts);\n switch(contacts.getSearchByType()) {\n case SearchByNull:\n ViewUtil.showTextNormal(viewHolder.mNameTv, contacts.getName());\n if (false == contacts.isBelongMultipleContactsPhone()) {\n ViewUtil.hideView(viewHolder.mContactsMultiplePhoneOperationPromptIv);\n ViewUtil.showTextNormal(viewHolder.mPhoneNumber, contacts.getPhoneNumber());\n } else {\n if (true == contacts.getNextContacts().isHideMultipleContacts()) {\n ViewUtil.hideView(viewHolder.mContactsMultiplePhoneOperationPromptIv);\n ViewUtil.showTextNormal(viewHolder.mPhoneNumber, contacts.getPhoneNumber() + mContext.getString(R.string.phone_number_count, multipleNumbersContactsCount(contacts) + 1));\n } else {\n ViewUtil.showView(viewHolder.mContactsMultiplePhoneOperationPromptIv);\n ViewUtil.showTextNormal(viewHolder.mPhoneNumber, contacts.getPhoneNumber() + \"String_Node_Str\" + mContext.getString(R.string.click_to_hide) + \"String_Node_Str\");\n }\n }\n break;\n case SearchByPhoneNumber:\n ViewUtil.hideView(viewHolder.mContactsMultiplePhoneOperationPromptIv);\n ViewUtil.showTextNormal(viewHolder.mNameTv, contacts.getName());\n ViewUtil.showTextHighlight(viewHolder.mPhoneNumber, contacts.getPhoneNumber(), contacts.getMatchKeywords().toString());\n break;\n case SearchByName:\n ViewUtil.hideView(viewHolder.mContactsMultiplePhoneOperationPromptIv);\n ViewUtil.showTextHighlight(viewHolder.mNameTv, contacts.getName(), contacts.getMatchKeywords().toString());\n ViewUtil.showTextNormal(viewHolder.mPhoneNumber, contacts.getPhoneNumber());\n break;\n default:\n break;\n }\n viewHolder.mSelectContactsCB.setTag(position);\n viewHolder.mSelectContactsCB.setChecked(contacts.isSelected());\n viewHolder.mSelectContactsCB.setOnCheckedChangeListener(new OnCheckedChangeListener() {\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n int position = (Integer) buttonView.getTag();\n Contacts contacts = getItem(position);\n if ((true == isChecked) && (false == contacts.isSelected())) {\n contacts.setSelected(isChecked);\n addSelectedContacts(contacts);\n } else if ((false == isChecked) && (true == contacts.isSelected())) {\n contacts.setSelected(isChecked);\n removeSelectedContacts(contacts);\n } else {\n return;\n }\n }\n });\n viewHolder.mOperationViewIv.setTag(position);\n int resid = (true == contacts.isHideOperationView()) ? (R.drawable.arrow_down) : (R.drawable.arrow_up);\n viewHolder.mOperationViewIv.setBackgroundResource(resid);\n if (true == contacts.isHideOperationView()) {\n ViewUtil.hideView(viewHolder.mOperationViewLayout);\n } else {\n ViewUtil.showView(viewHolder.mOperationViewLayout);\n }\n viewHolder.mOperationViewIv.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n int position = (Integer) v.getTag();\n Contacts contacts = getItem(position);\n contacts.setHideOperationView(!contacts.isHideOperationView());\n if (null != mOnContactsAdapter) {\n mOnContactsAdapter.onContactsRefreshView();\n }\n }\n });\n viewHolder.mCallIv.setTag(position);\n viewHolder.mCallIv.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n int position = (Integer) v.getTag();\n Contacts contacts = getItem(position);\n if (null != mOnContactsAdapter) {\n mOnContactsAdapter.onContactsCall(contacts);\n }\n }\n });\n viewHolder.mSmsIv.setTag(position);\n viewHolder.mSmsIv.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n int position = (Integer) v.getTag();\n Contacts contacts = getItem(position);\n if (null != mOnContactsAdapter) {\n mOnContactsAdapter.onContactsSms(contacts);\n }\n }\n });\n return view;\n}\n"
|
"private double binaryObj(int clusterIndex, int classIndex) {\n String type = CBM.getBinaryClassifierType();\n switch(type) {\n case \"String_Node_Str\":\n return binaryLRObj(clusterIndex, classIndex);\n case \"String_Node_Str\":\n return binaryBoostObj(clusterIndex, classIndex);\n default:\n throw new IllegalArgumentException(\"String_Node_Str\" + type);\n }\n}\n"
|
"public static Document addUsageCols(final Document doc, final InstanceUsageArtEntity entity, final Units units) throws IOException {\n doc.addValCol((long) entity.getInstanceCnt());\n doc.addValCol(UnitUtil.convertTime(entity.getDurationMs(), TimeUnit.MS, units.getTimeUnit()));\n if (entity.getDurationMs() > 0) {\n doc.addValCol(entity.getCpuUtilizationMs() == null ? null : ((double) entity.getCpuUtilizationMs() / (double) entity.getDurationMs()));\n } else {\n doc.addValCol(0d);\n }\n doc.addValCol(UnitUtil.convertSize(entity.getNetTotalInMegs(), SizeUnit.MB, units.getSizeUnit()));\n doc.addValCol(UnitUtil.convertSize(entity.getNetTotalOutMegs(), SizeUnit.MB, units.getSizeUnit()));\n doc.addValCol(UnitUtil.convertSize(entity.getDiskReadMegs(), SizeUnit.MB, units.getSizeUnit()));\n doc.addValCol(UnitUtil.convertSize(entity.getDiskWriteMegs(), SizeUnit.MB, units.getSizeUnit()));\n doc.addValCol(entity.getDiskReadOps() == null ? null : ((double) entity.getDiskReadOps() / 1000000d));\n doc.addValCol(entity.getDiskWriteOps() == null ? null : ((double) entity.getDiskWriteOps() / 1000000d));\n doc.addValCol(UnitUtil.convertTime(entity.getDiskReadTime(), TimeUnit.MS, TimeUnit.values()[units.getTimeUnit().ordinal() - 1]));\n doc.addValCol(UnitUtil.convertTime(entity.getDiskWriteTime(), TimeUnit.MS, TimeUnit.values()[units.getTimeUnit().ordinal() - 1]));\n return doc;\n}\n"
|
"public void addWidgetForAttributeType(Collection<IAttributeType> attributeTypes) throws OseeCoreException {\n Artifact artifact = editor.getEditorInput().getArtifact();\n boolean isEditable = !artifact.isReadOnly();\n for (IAttributeType attributeType : attributeTypes) {\n Composite internalComposite;\n if (DefaultAttributeXWidgetProvider.useMultiLineWidget(attributeType) || DslGrammarManager.isDslAttributeType(attributeType)) {\n internalComposite = createAttributeTypeControlsInSection(composite, attributeType, isEditable, 15);\n } else {\n internalComposite = createAttributeTypeControls(composite, artifact, attributeType, isEditable, false, 20);\n }\n setLabelFonts(internalComposite, FontManager.getDefaultLabelFont());\n HelpUtil.setHelp(internalComposite, OseeHelpContext.ARTIFACT_EDITOR__ATTRIBUTES);\n xWidgetsMap.put(attributeType, internalComposite);\n }\n decorator.refresh();\n getManagedForm().getForm().getBody().layout(true, true);\n}\n"
|
"protected Long convertObjectToLong(Object sourceObject) throws ConversionException {\n if (sourceObject instanceof String) {\n String sourceString = (String) sourceObject;\n if (sourceString.length() == 0) {\n return 0l;\n } else if (sourceString.charAt(0) == PLUS) {\n return super.convertObjectToLong(sourceString.substring(1));\n }\n }\n return super.convertObjectToLong(sourceObject);\n}\n"
|
"public final void forwardQueryRequestToLeaves(QueryRequest query, ReplyHandler handler) {\n if (!RouterService.isSupernode())\n return;\n List list = _manager.getInitializedClientConnections2();\n List hitConnections = new ArrayList();\n for (int i = 0; i < list.size(); i++) {\n ManagedConnection mc = (ManagedConnection) list.get(i);\n if (mc == handler)\n continue;\n if (mc.hitsQueryRouteTable(query)) {\n hitConnections.add(mc);\n }\n }\n if (list.size() > 8 && (double) hitConnections.size() / (double) list.size() > .8) {\n hitConnections = hitConnections.subList(0, hitConnections.size() / 4);\n }\n int notSent = list.size() - hitConnections.size();\n RoutedQueryStat.LEAF_DROP.addData(notSent);\n for (int i = 0; i < hitConnections.size(); i++) {\n ManagedConnection mc = (ManagedConnection) hitConnections.get(i);\n sendQueryRequest(query, mc, handler);\n RoutedQueryStat.LEAF_SEND.incrementStat();\n }\n}\n"
|
"void showLeafImage(TreeItem treeItem) {\n if (useLeafImages || treeItem.isFullNode()) {\n showImage(treeItem, images.treeLeaf());\n } else {\n DOM.setStyleAttribute(treeItem.getElement(), \"String_Node_Str\", indentValue);\n }\n}\n"
|
"public void requestPipeExtension(ItemStack stack, World world, BlockPos pos, EnumFacing o, IStripesActivator h) {\n if (world.isRemote) {\n return;\n }\n if (!requests.containsKey(world)) {\n requests.put(world, new HashSet<PipeExtensionRequest>());\n }\n PipeExtensionRequest r = new PipeExtensionRequest();\n r.stack = stack;\n r.pos = pos;\n r.o = o;\n r.h = h;\n requests.get(world).add(r);\n}\n"
|
"private synchronized int getCount(Calendar timestamp) {\n if ((timestamp.get(Calendar.YEAR) == lastTimeStamp.get(Calendar.YEAR)) && (timestamp.get(Calendar.DAY_OF_YEAR) == lastTimeStamp.get(Calendar.DAY_OF_YEAR))) {\n return count++;\n } else {\n lastTimeStamp.set(Calendar.DAY_OF_MONTH, timestamp.get(Calendar.DAY_OF_MONTH));\n lastTimeStamp.set(Calendar.MONTH, timestamp.get(Calendar.MONTH));\n lastTimeStamp.set(Calendar.YEAR, timestamp.get(Calendar.YEAR));\n count = 1;\n return 0;\n }\n}\n"
|
"public boolean add(E o) {\n return map.put(o, Boolean.FALSE) == null;\n}\n"
|
"protected void drawGuiContainerForegroundLayer(int par1, int par2) {\n String s = \"String_Node_Str\";\n fontRenderer.drawString(s, -10 + xSize / 2 - fontRenderer.getStringWidth(s) / 2, -10, 0xffffff);\n fontRenderer.drawString(I18n.getString(\"String_Node_Str\"), 0, ySize - 20 + 2, 0xffffff);\n this.buttonList.clear();\n int k = (width - xSize) / 2;\n int l = (height - ySize) / 2;\n if (tile.needPower()) {\n fontRenderer.drawString(\"String_Node_Str\", 50, 20, 0xffffff);\n return;\n }\n if (name) {\n if (!tile.isInRange(choosenTarget)) {\n name = false;\n text = null;\n choosenTarget = 0;\n return;\n }\n BlockPosition pos = tile.getTarget(choosenTarget);\n ItemStack stack = pos.getAsBlockStack().getPicketBlock(pos, tile.getSideFromPlayer(mc.thePlayer.username));\n this.renderItem(stack, 60, 20);\n if (text == null) {\n text = new GuiTextField(fontRenderer, 20, 40, 100, 10);\n text.setCanLoseFocus(true);\n text.setFocused(true);\n if (tile.hasCustomName(pos.getAsList())) {\n text.setText(tile.getCustomName(pos.getAsList()));\n }\n return;\n }\n text.drawTextBox();\n buttonList.add(new GuiButton(8, k + 10, l + 70, 50, 20, \"String_Node_Str\"));\n buttonList.add(new GuiButton(9, k + 70, l + 70, 50, 20, \"String_Node_Str\"));\n } else {\n fontRenderer.drawString(\"String_Node_Str\" + page, 72, 7, 0xffffff);\n buttonList.add(new GuiButton(6, k + 90, l, 20, 20, \"String_Node_Str\"));\n buttonList.add(new GuiButton(7, k + 40, l, 20, 20, \"String_Node_Str\"));\n for (int i = 0; i < 6; i++) {\n if (!tile.isInRange((page * 6) + i)) {\n return;\n }\n BlockPosition pos = tile.getTarget((page * 6) + i);\n String name = pos.getAsBlockStack().getDroppedBlockDisplayName();\n if (name.equalsIgnoreCase(\"String_Node_Str\")) {\n name = pos.getAsBlockStack().getDroppedBlockDisplayName(pos);\n }\n if (name.equalsIgnoreCase(\"String_Node_Str\")) {\n name = pos.getAsBlockStack().getBlockDisplayName();\n }\n if (tile.hasCustomName(pos.getAsList())) {\n name = tile.getCustomName(pos.getAsList());\n }\n buttonList.add(new GuiButton(i, k, l + 25 + 20 * i, 145, 20, name));\n ItemStack stack = pos.getAsBlockStack().getAsDroppedStack();\n if (stack == null) {\n stack = pos.getAsBlockStack().getAsDroppedStack(pos);\n }\n if (stack == null) {\n stack = pos.getAsBlockStack().asItemStack();\n }\n this.renderItem(stack, -17, 28 + (20 * i));\n }\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.