content stringlengths 40 137k |
|---|
"public String[] getExcludedCommitMessagesNormalized() {\n return (excludedCommitMessages == null || excludedCommitMessages.trim().equals(\"String_Node_Str\")) ? new String[0] : excludedCommitMessages.split(\"String_Node_Str\");\n}\n"
|
"private int getPriority(IConfigurationElement configElement, String warning, String protocol) {\n final String priorityString = configElement.getAttribute(PRIORITY_ATTR);\n int priority = DEFAULT_PRIORITY;\n if (priorityString != null) {\n try {\n priority = new Integer(priorityString).intValue();\n priority = (priority < 0) ? 0 : priority;\n } catch (NumberFormatException e) {\n Activator.getDefault().log(new Status(IStatus.WARNING, PLUGIN_ID, IStatus.WARNING, NLS.bind(\"String_Node_Str\", new Object[] { warning, protocol, configElement.getDeclaringExtension().getContributor().getName(), priorityString, String.valueOf(DEFAULT_PRIORITY) }), null));\n }\n }\n return priority;\n}\n"
|
"private static Object toValue(String value) {\n if (value.equals(\"String_Node_Str\") || value.equals(\"String_Node_Str\")) {\n return Boolean.valueOf(value);\n } else if (value.length() > 0 && StringUtils.isNumeric(value)) {\n return Integer.valueOf(value);\n } else if (value.startsWith(\"String_Node_Str\") && StringUtils.isNumeric(value.substring(1))) {\n return new Date(Long.parseLong(value.substring(1)));\n } else {\n return value;\n }\n}\n"
|
"public void testGetChampions() throws Exception {\n try {\n handler.getChampions(ChampData.ALL);\n } catch (RequestException ex) {\n System.out.println(\"String_Node_Str\");\n ex.printStackTrace();\n }\n}\n"
|
"public static WebArchive deploy() {\n return ShrinkWrap.create(WebArchive.class, \"String_Node_Str\").addPackage(JsfMessageBackingBean.class.getPackage()).addAsResource(\"String_Node_Str\").addAsResource(\"String_Node_Str\").addAsLibraries(ArchiveUtils.getDeltaSpikeCoreAndJsfArchive()).addAsWebInfResource(\"String_Node_Str\", \"String_Node_Str\").addAsWebResource(\"String_Node_Str\", \"String_Node_Str\").addAsWebInfResource(EmptyAsset.INSTANCE, \"String_Node_Str\");\n}\n"
|
"protected void enqueueOperation(int stageOp, Object[] args, OSDRequest request, Object callback) {\n if (!q.offer(new StageRequest(stageOp, args, request, callback))) {\n if (request != null) {\n Logging.logMessage(Logging.LEVEL_WARN, this, \"String_Node_Str\", request.getRequestId(), request.getFileId());\n request.sendInternalServerError(new IllegalStateException(\"String_Node_Str\"));\n }\n }\n}\n"
|
"public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {\n int rKwInspectreport = 0;\n String FS;\n if (!launcher.isUnix()) {\n FS = \"String_Node_Str\";\n } else {\n FS = \"String_Node_Str\";\n }\n if (kloConfig.getWebAPI().getUseWebAPI()) {\n String queryEncrypted = kloConfig.getWebAPI().getwebAPIQuery();\n rKwInspectreport = KloXMLGenerator.GenerateXMLFromIssues(kloConfig.getHost(), kloConfig.getPort(), kloConfig.getUseSSL(), UserAxisConverter.AxeConverter(build, kloConfig.getProject()), build.getWorkspace().getRemote() + FS + \"String_Node_Str\", listener, queryEncrypted.replace(\"String_Node_Str\", \"String_Node_Str\"));\n }\n if (this.canContinue(build.getResult())) {\n listener.getLogger().println(\"String_Node_Str\");\n KloResult result = null;\n KloReport kloReport = null;\n KloSourceContainer kloSourceContainer = null;\n KloParserResult parser = new KloParserResult(listener, kloConfig.getKlocworkReportPattern());\n try {\n kloReport = build.getWorkspace().act(parser);\n } catch (Exception e) {\n listener.getLogger().println(\"String_Node_Str\" + e);\n build.setResult(Result.FAILURE);\n return false;\n }\n if (kloReport == null) {\n build.setResult(Result.FAILURE);\n return false;\n }\n kloSourceContainer = new KloSourceContainer(listener, build.getWorkspace(), kloReport.getAllSeverities());\n result = new KloResult(kloReport, kloSourceContainer, build);\n Result buildResult = new KloBuildResultEvaluator().evaluateBuildResult(listener, result.getNumberErrorsAccordingConfiguration(kloConfig, false), result.getNumberErrorsAccordingConfiguration(kloConfig, true), kloConfig);\n if (buildResult != Result.SUCCESS) {\n build.setResult(buildResult);\n }\n build.addAction(new KloBuildGraph(build, kloConfig, result.getReport()));\n build.addAction(new KloBuildAction(build, result, kloConfig));\n if (kloConfig.getLinkReview()) {\n String host = null, port = null, project = null;\n if (kloReport.getNumberTotal() != 0) {\n if (kloReport.getAllSeverities().get(0) != null) {\n String url = kloReport.getAllSeverities().get(0).get(\"String_Node_Str\");\n if (url != null) {\n Pattern p = Pattern.compile(\"String_Node_Str\");\n Matcher m = p.matcher(url);\n if (m.matches()) {\n host = m.group(1);\n port = m.group(2);\n project = m.group(3);\n }\n }\n }\n }\n build.addAction(new KloBuildReviewLink(build, host, port, project));\n }\n if (kloConfig.getLinkBuildLog()) {\n build.addAction(new KloBuildLog(build));\n }\n if (kloConfig.getLinkParseLog()) {\n build.addAction(new KloParseErrorsLog(build));\n }\n if (build.getWorkspace().isRemote()) {\n copyFilesFromSlaveToMaster(build.getRootDir(), launcher.getChannel(), kloSourceContainer.getInternalMap().values());\n }\n listener.getLogger().println(\"String_Node_Str\");\n }\n return true;\n}\n"
|
"public Object getAdapter(Class targetAdapterClass, Object objectToAdapt) {\n IComponent returnvalue = null;\n if (targetAdapterClass.isAssignableFrom(IComponent.class)) {\n returnvalue = getComponentAdapter(objectToAdapt);\n }\n if (returnvalue == null && targetAdapterClass.isAssignableFrom(IContainerAdapter.class)) {\n returnvalue = getContainerAdapter(objectToAdapt);\n }\n if (returnvalue == null && targetAdapterClass.isAssignableFrom(IComponent.class) && objectToAdapt instanceof Node) {\n return new JavaFXComponentAdapter<Node>((Node) objectToAdapt);\n }\n return returnvalue;\n}\n"
|
"private void preparModuleInit() {\n SalesforceSchemaConnection connection = temConnection;\n endPoint = connection.getWebServiceUrl();\n username = connection.getUserName();\n pwd = connection.getPassword();\n batchSize = connection.getBatchSize();\n timeOut = connection.getTimeOut();\n useHttpProxy = connection.isUseHttpProxy();\n if (useHttpProxy && endPoint.startsWith(\"String_Node_Str\")) {\n useHttpsProxy = true;\n }\n useSocketProxy = connection.isUseProxy();\n proxyHost = connection.getProxyHost();\n proxyPort = connection.getProxyPort();\n proxyUsername = connection.getProxyUsername();\n proxyPassword = connection.getProxyPassword();\n}\n"
|
"public static void setSystemProcess() {\n try {\n ActivityManagerService m = mSelf;\n ServiceManager.addService(\"String_Node_Str\", m);\n ServiceManager.addService(\"String_Node_Str\", new MemBinder(m));\n if (MONITOR_CPU_USAGE) {\n ServiceManager.addService(\"String_Node_Str\", new CpuBinder(m));\n }\n ServiceManager.addService(\"String_Node_Str\", new BroadcastsBinder(m));\n ServiceManager.addService(\"String_Node_Str\", new ServicesBinder(m));\n ServiceManager.addService(\"String_Node_Str\", new SendersBinder(m));\n ServiceManager.addService(\"String_Node_Str\", new ProvidersBinder(m));\n ServiceManager.addService(\"String_Node_Str\", new PermissionController(m));\n ApplicationInfo info = mSelf.mContext.getPackageManager().getApplicationInfo(\"String_Node_Str\", STOCK_PM_FLAGS);\n synchronized (mSelf) {\n ProcessRecord app = mSelf.newProcessRecordLocked(mSystemThread.getApplicationThread(), info, info.processName);\n app.persistent = true;\n app.pid = Process.myPid();\n app.maxAdj = SYSTEM_ADJ;\n mSelf.mProcessNames.put(app.processName, app.info.uid, app);\n synchronized (mSelf.mPidsSelfLocked) {\n mSelf.mPidsSelfLocked.put(app.pid, app);\n }\n mSelf.updateLRUListLocked(app, true);\n }\n } catch (PackageManager.NameNotFoundException e) {\n throw new RuntimeException(\"String_Node_Str\", e);\n }\n}\n"
|
"public void testUseCache1() throws BirtException, Exception {\n this.dataSet.setCacheRowCount(100);\n DataEngineImpl myDataEngine = newDataEngine();\n assertFalse(getDataSetCacheManager(myDataEngine).doesLoadFromCache());\n assertFalse(getDataSetCacheManager(myDataEngine).doesSaveToCache());\n executeQuery(myDataEngine);\n}\n"
|
"private List<SourceFile> createExternInputs(List<String> files) throws FlagUsageException, IOException {\n if (files.isEmpty()) {\n return ImmutableList.of(SourceFile.fromCode(\"String_Node_Str\", \"String_Node_Str\"));\n }\n try {\n return createInputs(externFiles, false);\n } catch (FlagUsageException e) {\n throw new FlagUsageException(\"String_Node_Str\" + e.getMessage());\n }\n}\n"
|
"public static CellList getWFSChildren(String root, String canonicalName) {\n try {\n URL url = getURL(WFS_PREFIX + root + \"String_Node_Str\" + canonicalName);\n return CellList.decode(canonicalName, url.openStream());\n } catch (java.lang.Exception excp) {\n return null;\n }\n}\n"
|
"public String viewSystems() {\n Long userId = AuthUtil.getUserId(servletRequest.getSession());\n String userType = AuthUtil.getUserType(servletRequest.getSession());\n List<String> ec2RegionList = EC2KeyDB.getEC2Regions();\n List<String> instanceIdList = new ArrayList<String>();\n if (sortedSet.getFilterMap().get(FILTER_BY_INSTANCE_STATE) == null) {\n sortedSet.getFilterMap().put(FILTER_BY_INSTANCE_STATE, AppConfig.getProperty(\"String_Node_Str\"));\n }\n try {\n Map<String, HostSystem> hostSystemList = new HashMap<String, HostSystem>();\n List<Profile> profileList = UserProfileDB.getProfilesByUser(userId);\n if (profileList.size() > 0 || Auth.MANAGER.equals(userType)) {\n List<String> profileTags = new ArrayList<>();\n for (Profile profile : profileList) {\n profileTags.add(profile.getTag());\n }\n Map<String, List<String>> profileTagMap = parseTags(profileTags);\n Map<String, List<String>> filterTags = fetchInputFilterTags(userType, profileTagMap);\n List<String> securityGroupList = new ArrayList<>();\n if (StringUtils.isNotEmpty(sortedSet.getFilterMap().get(FILTER_BY_SECURITY_GROUP))) {\n securityGroupList = Arrays.asList(sortedSet.getFilterMap().get(FILTER_BY_SECURITY_GROUP).split(\"String_Node_Str\"));\n }\n for (AWSCred awsCred : AWSCredDB.getAWSCredList()) {\n if (awsCred != null) {\n BasicAWSCredentials awsCredentials = new BasicAWSCredentials(awsCred.getAccessKey(), awsCred.getSecretKey());\n for (String ec2Region : ec2RegionList) {\n AmazonEC2 service = new AmazonEC2Client(awsCredentials, AWSClientConfig.getClientConfig());\n service.setEndpoint(ec2Region);\n List<String> keyValueList = new ArrayList<String>();\n for (EC2Key ec2Key : EC2KeyDB.getEC2KeyByRegion(ec2Region, awsCred.getId())) {\n keyValueList.add(ec2Key.getKeyNm());\n }\n DescribeInstancesRequest describeInstancesRequest = new DescribeInstancesRequest();\n Filter keyNmFilter = new Filter(\"String_Node_Str\", keyValueList);\n describeInstancesRequest.withFilters(keyNmFilter);\n if (StringUtils.isNotEmpty(sortedSet.getFilterMap().get(FILTER_BY_INSTANCE_STATE))) {\n List<String> instanceStateList = new ArrayList<String>();\n instanceStateList.add(sortedSet.getFilterMap().get(FILTER_BY_INSTANCE_STATE));\n Filter instanceStateFilter = new Filter(\"String_Node_Str\", instanceStateList);\n describeInstancesRequest.withFilters(instanceStateFilter);\n }\n if (securityGroupList.size() > 0) {\n Filter groupFilter = new Filter(\"String_Node_Str\", securityGroupList);\n describeInstancesRequest.withFilters(groupFilter);\n }\n List<String> tagList = new ArrayList<String>();\n for (String tag : tagMap.keySet()) {\n if (tagMap.get(tag) != null) {\n Filter tagValueFilter = new Filter(\"String_Node_Str\" + tag, tagMap.get(tag));\n describeInstancesRequest.withFilters(tagValueFilter);\n } else {\n tagList.add(tag);\n }\n }\n if (tagList.size() > 0) {\n Filter tagFilter = new Filter(\"String_Node_Str\", tagList);\n describeInstancesRequest.withFilters(tagFilter);\n }\n DescribeInstancesResult describeInstancesResult = service.describeInstances(describeInstancesRequest);\n for (Reservation res : describeInstancesResult.getReservations()) {\n for (Instance instance : res.getInstances()) {\n HostSystem hostSystem = new HostSystem();\n hostSystem.setInstance(instance.getInstanceId());\n if (!\"String_Node_Str\".equals(AppConfig.getProperty(\"String_Node_Str\")) && StringUtils.isNotEmpty(instance.getPublicDnsName())) {\n hostSystem.setHost(instance.getPublicDnsName());\n } else if (!\"String_Node_Str\".equals(AppConfig.getProperty(\"String_Node_Str\")) && StringUtils.isNotEmpty(instance.getPublicIpAddress())) {\n hostSystem.setHost(instance.getPublicIpAddress());\n } else if (StringUtils.isNotEmpty(instance.getPrivateDnsName())) {\n hostSystem.setHost(instance.getPrivateDnsName());\n } else {\n hostSystem.setHost(instance.getPrivateIpAddress());\n }\n hostSystem.setKeyId(EC2KeyDB.getEC2KeyByNmRegion(instance.getKeyName(), ec2Region, awsCred.getId()).getId());\n hostSystem.setEc2Region(ec2Region);\n hostSystem.setState(instance.getState().getName());\n for (Tag tag : instance.getTags()) {\n if (\"String_Node_Str\".equals(tag.getKey())) {\n hostSystem.setDisplayNm(tag.getValue());\n }\n }\n instanceIdList.add(hostSystem.getInstance());\n hostSystemList.put(hostSystem.getInstance(), hostSystem);\n }\n }\n if (instanceIdList.size() > 0) {\n servletRequest.getSession().setAttribute(\"String_Node_Str\", new ArrayList<String>(instanceIdList));\n if (showStatus) {\n int i = 0;\n List<String> idCallList = new ArrayList<String>();\n while (!instanceIdList.isEmpty()) {\n idCallList.add(instanceIdList.remove(0));\n i++;\n if (i >= 100 || instanceIdList.isEmpty()) {\n DescribeInstanceStatusRequest describeInstanceStatusRequest = new DescribeInstanceStatusRequest();\n describeInstanceStatusRequest.withInstanceIds(idCallList);\n DescribeInstanceStatusResult describeInstanceStatusResult = service.describeInstanceStatus(describeInstanceStatusRequest);\n for (InstanceStatus instanceStatus : describeInstanceStatusResult.getInstanceStatuses()) {\n HostSystem hostSystem = hostSystemList.remove(instanceStatus.getInstanceId());\n hostSystem.setSystemStatus(instanceStatus.getSystemStatus().getStatus());\n hostSystem.setInstanceStatus(instanceStatus.getInstanceStatus().getStatus());\n if ((StringUtils.isEmpty(sortedSet.getFilterMap().get(FILTER_BY_INSTANCE_STATUS)) && StringUtils.isEmpty(sortedSet.getFilterMap().get(FILTER_BY_SYSTEM_STATUS))) || (hostSystem.getInstanceStatus().equals(sortedSet.getFilterMap().get(FILTER_BY_INSTANCE_STATUS)) && StringUtils.isEmpty(sortedSet.getFilterMap().get(FILTER_BY_SYSTEM_STATUS))) || (hostSystem.getInstanceStatus().equals(sortedSet.getFilterMap().get(FILTER_BY_SYSTEM_STATUS)) && StringUtils.isEmpty(sortedSet.getFilterMap().get(FILTER_BY_INSTANCE_STATUS))) || (hostSystem.getInstanceStatus().equals(sortedSet.getFilterMap().get(FILTER_BY_SYSTEM_STATUS)) && hostSystem.getInstanceStatus().equals(sortedSet.getFilterMap().get(FILTER_BY_INSTANCE_STATUS)))) {\n hostSystemList.put(hostSystem.getInstance(), hostSystem);\n }\n }\n i = 0;\n idCallList.clear();\n }\n }\n AmazonCloudWatchClient cloudWatchClient = new AmazonCloudWatchClient(awsCredentials, AWSClientConfig.getClientConfig());\n cloudWatchClient.setEndpoint(ec2Region.replace(\"String_Node_Str\", \"String_Node_Str\"));\n DescribeAlarmsResult describeAlarmsResult = cloudWatchClient.describeAlarms();\n for (MetricAlarm metricAlarm : describeAlarmsResult.getMetricAlarms()) {\n for (Dimension dim : metricAlarm.getDimensions()) {\n if (dim.getName().equals(\"String_Node_Str\")) {\n HostSystem hostSystem = hostSystemList.remove(dim.getValue());\n if (hostSystem != null) {\n if (\"String_Node_Str\".equals(metricAlarm.getStateValue())) {\n hostSystem.setMonitorAlarm(hostSystem.getMonitorAlarm() + 1);\n } else if (\"String_Node_Str\".equals(metricAlarm.getStateValue())) {\n hostSystem.setMonitorInsufficientData(hostSystem.getMonitorInsufficientData() + 1);\n } else {\n hostSystem.setMonitorOk(hostSystem.getMonitorOk() + 1);\n }\n if (StringUtils.isEmpty(sortedSet.getFilterMap().get(FILTER_BY_ALARM_STATE))) {\n hostSystemList.put(hostSystem.getInstance(), hostSystem);\n } else if (\"String_Node_Str\".equals(sortedSet.getFilterMap().get(FILTER_BY_ALARM_STATE)) && hostSystem.getMonitorAlarm() > 0) {\n hostSystemList.put(hostSystem.getInstance(), hostSystem);\n } else if (\"String_Node_Str\".equals(sortedSet.getFilterMap().get(FILTER_BY_ALARM_STATE)) && hostSystem.getMonitorInsufficientData() > 0) {\n hostSystemList.put(hostSystem.getInstance(), hostSystem);\n } else if (\"String_Node_Str\".equals(sortedSet.getFilterMap().get(FILTER_BY_ALARM_STATE)) && hostSystem.getMonitorOk() > 0 && hostSystem.getMonitorInsufficientData() <= 0 && hostSystem.getMonitorAlarm() <= 0) {\n hostSystemList.put(hostSystem.getInstance(), hostSystem);\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n SystemDB.setSystems(hostSystemList.values());\n sortedSet = SystemDB.getSystemSet(sortedSet, new ArrayList<String>(hostSystemList.keySet()));\n }\n } catch (AmazonServiceException ex) {\n log.error(ex.toString(), ex);\n }\n if (script != null && script.getId() != null) {\n script = ScriptDB.getScript(script.getId(), userId);\n }\n return SUCCESS;\n}\n"
|
"private Map<String, Map<String, ClusterDataHolder>> parseLeafLevelSubscriptions(String appId, int tenantId, String key, String groupName, List<CartridgeContext> cartridgeContextList, Set<StartupOrder> dependencyOrder) throws ApplicationDefinitionException, CartridgeNotFoundException {\n Map<String, Map<String, ClusterDataHolder>> completeDataHolder = new HashMap<String, Map<String, ClusterDataHolder>>();\n Map<String, ClusterDataHolder> clusterDataMap = new HashMap<String, ClusterDataHolder>();\n Map<String, ClusterDataHolder> clusterDataMapByType = new HashMap<String, ClusterDataHolder>();\n createClusterDataMap(appId, cartridgeContextList, clusterDataMap, clusterDataMapByType, tenantId);\n for (CartridgeContext cartridgeContext : cartridgeContextList) {\n List<String> dependencyClusterIDs = new ArrayList<String>();\n List<String> exportMetadataKeys = new ArrayList<String>();\n List<String> importMetadataKeys = new ArrayList<String>();\n String cartridgeType = cartridgeContext.getType();\n SubscribableInfoContext subscribableInfoContext = cartridgeContext.getSubscribableInfoContext();\n String subscriptionAlias = subscribableInfoContext.getAlias();\n Cartridge cartridge = getCartridgeByTenant(cartridgeType, tenantId);\n if (cartridge == null) {\n throw new CartridgeNotFoundException(String.format(\"String_Node_Str\" + \"String_Node_Str\", cartridgeContext.getUuid(), cartridgeType));\n }\n String[] metadataKeys = cartridge.getMetadataKeys();\n if (metadataKeys != null) {\n for (String str : metadataKeys) {\n if (!StringUtils.isBlank(str)) {\n exportMetadataKeys.add(cartridgeContext.getSubscribableInfoContext().getAlias() + METADATA_APPENDER + str);\n }\n }\n }\n ClusterInformation clusterInfo;\n if (cartridge.getMultiTenant()) {\n clusterInfo = new MTClusterInformation();\n } else {\n clusterInfo = new STClusterInformation();\n }\n String hostname = clusterInfo.getHostName(appId, subscriptionAlias, cartridge.getHostName());\n String clusterId = clusterInfo.getClusterId(appId, subscriptionAlias, cartridgeType);\n String repoUrl = null;\n if (subscribableInfoContext.getArtifactRepositoryContext() != null) {\n repoUrl = subscribableInfoContext.getArtifactRepositoryContext().getRepoUrl();\n }\n if (dependencyOrder != null) {\n for (StartupOrder startupOrder : dependencyOrder) {\n for (String startupOrderComponent : startupOrder.getStartupOrderComponentList()) {\n String[] arrStartUp = startupOrderComponent.split(\"String_Node_Str\");\n if (arrStartUp[0].equals(\"String_Node_Str\")) {\n String cartridgeAlias = arrStartUp[1];\n String dependentCartridgeUuid = getCartridgeUuid(cartridgeContextList, cartridgeAlias);\n if (StringUtils.isBlank(dependentCartridgeUuid)) {\n throw new CartridgeNotFoundException(String.format(\"String_Node_Str\" + \"String_Node_Str\", appId, cartridgeAlias));\n }\n Cartridge dependencyCartridge = getCartridgeByTenant(dependentCartridgeType, tenantId);\n ClusterDataHolder dataHolder = clusterDataMapByType.get(dependentCartridgeType);\n if (dataHolder != null) {\n if (!dataHolder.getClusterId().equals(clusterId)) {\n dependencyClusterIDs.add(dataHolder.getClusterId());\n if (dependencyCartridge.getMetadataKeys() != null) {\n for (String str : dependencyCartridge.getMetadataKeys()) {\n if (!StringUtils.isBlank(str)) {\n importMetadataKeys.add(dataHolder.getClusterId().split(\"String_Node_Str\")[0] + METADATA_APPENDER + str);\n }\n }\n }\n if (!dataHolder.getClusterId().equals(clusterId)) {\n if (startupOrderComponent.equals(\"String_Node_Str\".concat(cartridgeType))) {\n break;\n }\n }\n }\n }\n }\n }\n }\n }\n String[] arrDependencyClusterIDs = new String[dependencyClusterIDs.size()];\n arrDependencyClusterIDs = dependencyClusterIDs.toArray(arrDependencyClusterIDs);\n String[] arrExportMetadata = new String[exportMetadataKeys.size()];\n arrExportMetadata = exportMetadataKeys.toArray(arrExportMetadata);\n String[] arrImportMetadata = new String[importMetadataKeys.size()];\n arrImportMetadata = importMetadataKeys.toArray(arrImportMetadata);\n String tenantRange = AutoscalerUtil.findTenantRange(tenantId, cartridge.getTenantPartitions());\n Boolean isLB = false;\n if (cartridge.getCategory().equals(LOAD_BALANCER)) {\n isLB = true;\n }\n ApplicationClusterContext appClusterCtxt = createApplicationClusterContext(appId, groupName, cartridge, key, tenantId, repoUrl, subscriptionAlias, clusterId, hostname, subscribableInfoContext.getDeploymentPolicyUuid(), isLB, tenantRange, subscribableInfoContext.getDependencyAliases(), subscribableInfoContext.getProperties(), arrDependencyClusterIDs, arrExportMetadata, arrImportMetadata);\n appClusterCtxt.setAutoscalePolicyName(subscribableInfoContext.getAutoscalingPolicyUuid());\n appClusterCtxt.setProperties(subscribableInfoContext.getProperties());\n if (subscribableInfoContext.getPersistenceContext() != null) {\n appClusterCtxt.setPersistenceContext(subscribableInfoContext.getPersistenceContext());\n }\n this.applicationClusterContexts.add(appClusterCtxt);\n }\n completeDataHolder.put(CARTRIDGE_TYPE, clusterDataMapByType);\n completeDataHolder.put(ALIAS, clusterDataMap);\n return completeDataHolder;\n}\n"
|
"private FlowScope narrowScope(FlowScope scope, Node node, JSType narrowed) {\n scope = scope.createChildFlowScope();\n if (node.getType() == Token.GETPROP) {\n scope.inferQualifiedSlot(node.getQualifiedName(), getJSType(node), narrowed);\n } else {\n redeclareSimpleVar(scope, node, narrowed);\n }\n return scope;\n}\n"
|
"private void applyHeight(State state) {\n boolean expanded = !state.forceCollapsed && (state.isKeyguardShowingAndNotOccluded() || state.statusBarExpanded || state.keyguardFadingAway || state.bouncerShowing || state.headsUpShowing);\n if (expanded) {\n mLpChanged.height = ViewGroup.LayoutParams.MATCH_PARENT;\n } else {\n mLpChanged.height = mBarHeight;\n }\n}\n"
|
"Transaction suspendOtherAndResumeThis(SlaveContext txId) {\n try {\n TransactionManager txManager = graphDbConfig.getTxModule().getTxManager();\n Transaction otherTx = txManager.getTransaction();\n Transaction transaction = getTx(txId);\n if (otherTx != null && otherTx == transaction) {\n return null;\n } else {\n if (otherTx != null) {\n txManager.suspend();\n System.out.println(\"String_Node_Str\");\n }\n if (transaction == null) {\n beginTx(txId);\n } else {\n System.out.println(Thread.currentThread() + \"String_Node_Str\" + txId);\n txManager.resume(transaction);\n }\n return otherTx;\n }\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n}\n"
|
"public static boolean generate() {\n OS os = OS.getOS();\n String path = os.getCUDALib();\n if (path == null) {\n System.out.println(\"String_Node_Str\");\n return false;\n }\n CUDA cudalib = null;\n try {\n cudalib = (CUDA) Native.loadLibrary(path, CUDA.class);\n } catch (java.lang.UnsatisfiedLinkError e) {\n System.out.println(\"String_Node_Str\");\n return false;\n } catch (java.lang.ExceptionInInitializerError e) {\n System.out.println(\"String_Node_Str\" + e);\n return false;\n } catch (Exception e) {\n System.out.println(\"String_Node_Str\" + e);\n return false;\n }\n int result = CUresult.CUDA_ERROR_UNKNOWN;\n result = cudalib.cuInit(0);\n if (result != CUresult.CUDA_SUCCESS) {\n return false;\n }\n if (result == CUresult.CUDA_ERROR_NO_DEVICE) {\n System.out.println(\"String_Node_Str\");\n return false;\n }\n int[] count = new int[1];\n result = cudalib.cuDeviceGetCount(count);\n if (result != CUresult.CUDA_SUCCESS) {\n System.out.println(\"String_Node_Str\" + CUresult.stringFor(result) + \"String_Node_Str\");\n return false;\n }\n devices = new LinkedList<GPUDevice>();\n for (int num = 0; num < count[0]; num++) {\n byte[] name = new byte[256];\n result = cudalib.cuDeviceGetName(name, 256, num);\n if (result != CUresult.CUDA_SUCCESS) {\n System.out.println(\"String_Node_Str\" + CUresult.stringFor(result) + \"String_Node_Str\");\n continue;\n }\n long[] ram = new long[1];\n result = cudalib.cuDeviceTotalMem(ram, num);\n if (result != CUresult.CUDA_SUCCESS) {\n System.out.println(\"String_Node_Str\" + CUresult.stringFor(result) + \"String_Node_Str\");\n return false;\n }\n devices.add(new GPUDevice(new String(name).trim(), ram[0].longValue(), \"String_Node_Str\" + Integer.toString(num)));\n }\n return true;\n}\n"
|
"public void testCheckItem() throws Exception {\n ImportBasicHandler basicHandler = new ImportBasicHandler();\n ImportItem ImportItem = new ImportItem(processPropPath1);\n ImportItem.setItemName(processPropPath1.lastSegment());\n Property property = mock(Property.class);\n itemRecord.setProperty(property);\n ProcessItem item = PropertiesFactory.eINSTANCE.createProcessItem();\n when(property.getItem()).thenReturn(item);\n ResourcesManager resManager = mock(ResourcesManager.class);\n Set<IPath> pathes = new HashSet<IPath>();\n IPath projPath = new Path(\"String_Node_Str\" + FileConstants.LOCAL_PROJECT_FILENAME);\n pathes.add(projPath);\n pathes.add(processPropPath1);\n pathes.add(processItemPath1);\n Assert.assertFalse(basicHandler.checkItem(resManager, itemRecord, false));\n Assert.assertFalse(itemRecord.getErrors().isEmpty());\n ItemState itemState = PropertiesFactory.eINSTANCE.createItemState();\n item.setState(itemState);\n Assert.assertTrue(basicHandler.checkItem(resManager, itemRecord, false));\n itemRecord.setState(State.NAME_AND_ID_EXISTED);\n Assert.assertTrue(basicHandler.checkItem(resManager, itemRecord, true));\n Assert.assertTrue(basicHandler.checkItem(resManager, itemRecord, true));\n Assert.assertTrue(itemRecord.getErrors().size() == 1);\n}\n"
|
"public void testReadMissing_TempIndex() throws Exception {\n final File idx = new File(db.getDirectory(), \"String_Node_Str\");\n assertFalse(idx.exists());\n final DirCache dc = DirCache.read(idx, db.getFS());\n assertNotNull(dc);\n assertEquals(0, dc.getEntryCount());\n}\n"
|
"public void initialize(MibLoaderLog log) throws MibException {\n if (type != null) {\n try {\n type = type.initialize(this, log);\n } catch (MibException e) {\n log.addError(e.getLocation(), e.getMessage());\n type = null;\n }\n }\n}\n"
|
"private NamedObj _createEntity(String className, String entityName, String source) throws Exception {\n if ((_current != null) && !(_current instanceof CompositeEntity)) {\n throw new XmlException(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + _current + \"String_Node_Str\", _currentExternalEntity(), _getLineNumber(), _getColumnNumber());\n }\n CompositeEntity container = (CompositeEntity) _current;\n ComponentEntity previous = _searchForEntity(entityName, _current);\n Class newClass = null;\n ComponentEntity reference = null;\n if (className != null) {\n reference = searchForClass(className, source);\n if ((reference == null) && (source == null)) {\n reference = _searchForClassInContext(className, null);\n }\n if (reference == null || !reference.isClassDefinition()) {\n try {\n newClass = Class.forName(className, true, _classLoader);\n } catch (Exception ex) {\n try {\n reference = _attemptToFindMoMLClass(className, source);\n } catch (Exception ex2) {\n throw new IllegalActionException(null, ex2, \"String_Node_Str\" + className);\n }\n } catch (Error error) {\n StringBuffer errorMessage = new StringBuffer();\n if (error instanceof ExceptionInInitializerError) {\n Throwable staticThrowable = ((ExceptionInInitializerError) error).getCause();\n errorMessage.append(\"String_Node_Str\" + \"String_Node_Str\" + KernelException.stackTraceToString(staticThrowable));\n } else {\n errorMessage.append(className + \"String_Node_Str\" + error.toString() + \"String_Node_Str\");\n }\n try {\n reference = _attemptToFindMoMLClass(className, source);\n } catch (XmlException ex2) {\n throw new Exception(\"String_Node_Str\" + errorMessage.toString() + className + \"String_Node_Str\" + ex2.getMessage());\n } catch (ClassFormatError ex3) {\n throw new Exception(\"String_Node_Str\" + errorMessage.toString() + className + \"String_Node_Str\" + \"String_Node_Str\" + ex3.getMessage());\n } catch (Exception ex4) {\n throw new Exception(\"String_Node_Str\" + errorMessage.toString() + className + \"String_Node_Str\" + ex4.getMessage());\n }\n }\n }\n }\n if (previous != null) {\n if (newClass != null) {\n _checkClass(previous, newClass, \"String_Node_Str\" + entityName + \"String_Node_Str\" + className);\n }\n return previous;\n }\n _checkForNull(className, \"String_Node_Str\");\n if (reference == null) {\n if (_current != null) {\n List derivedList = container.getDerivedList();\n Iterator derivedObjects = derivedList.iterator();\n while (derivedObjects.hasNext()) {\n CompositeEntity derived = (CompositeEntity) derivedObjects.next();\n if (derived.getEntity(entityName) != null) {\n throw new IllegalActionException(container, \"String_Node_Str\" + \"String_Node_Str\" + derived.getEntity(entityName).getFullName());\n }\n }\n _checkClass(_current, CompositeEntity.class, \"String_Node_Str\" + \"String_Node_Str\" + _current);\n Object[] arguments = new Object[2];\n arguments[0] = _current;\n arguments[1] = entityName;\n NamedObj newEntity = _createInstance(newClass, arguments);\n newEntity.propagateExistence();\n _loadIconForClass(className, newEntity);\n _addParamsToParamsToParse(newEntity);\n return newEntity;\n } else {\n Object[] arguments = new Object[1];\n arguments[0] = _workspace;\n NamedObj result = _createInstance(newClass, arguments);\n result.setName(entityName);\n _loadIconForClass(className, result);\n return result;\n }\n } else {\n if (!reference.isClassDefinition()) {\n throw new MissingClassException(\"String_Node_Str\" + \"String_Node_Str\" + reference.getFullName(), reference.getFullName(), _currentExternalEntity(), _getLineNumber(), _getColumnNumber());\n }\n List derivedList = null;\n if (container != null) {\n derivedList = container.getDerivedList();\n Iterator derivedObjects = derivedList.iterator();\n while (derivedObjects.hasNext()) {\n CompositeEntity derived = (CompositeEntity) derivedObjects.next();\n if (derived.getEntity(entityName) != null) {\n throw new IllegalActionException(container, \"String_Node_Str\" + \"String_Node_Str\" + derived.getEntity(entityName).getFullName());\n }\n }\n }\n ComponentEntity newEntity = (ComponentEntity) reference.instantiate(container, entityName);\n if ((_topObjectsCreated != null) && (container == _originalContext)) {\n _topObjectsCreated.add(newEntity);\n }\n URIAttribute modelURI = (URIAttribute) newEntity.getAttribute(\"String_Node_Str\", URIAttribute.class);\n if (modelURI != null) {\n modelURI.setContainer(null);\n }\n _markParametersToParse(newEntity);\n newEntity.setClassName(className);\n Iterator propagatedInstances = newEntity.propagateExistence().iterator();\n while (propagatedInstances.hasNext()) {\n ComponentEntity propagatedEntity = (ComponentEntity) propagatedInstances.next();\n URIAttribute propagatedURI = (URIAttribute) propagatedEntity.getAttribute(\"String_Node_Str\", URIAttribute.class);\n if (propagatedURI != null) {\n propagatedURI.setContainer(null);\n }\n }\n return newEntity;\n }\n}\n"
|
"public boolean inQueryContext() {\n return hasScope() && getScope().getQueries().size() > 0;\n}\n"
|
"public boolean performFinish() {\n boolean formIsPerformed;\n if (ldifFileWizardPage3 == null) {\n formIsPerformed = ldifFileWizardPage2.isPageComplete();\n } else {\n formIsPerformed = ldifFileWizardPage3.isPageComplete();\n }\n if (formIsPerformed) {\n IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();\n try {\n if (creation) {\n String nextId = factory.getNextId();\n connectionProperty.setId(nextId);\n connectionProperty.setLabel(connectionProperty.getDisplayName());\n factory.create(connectionItem, ldifFileWizardPage0.getDestinationPath());\n } else {\n connectionProperty.setLabel(connectionProperty.getDisplayName());\n RepositoryUpdateManager.updateFileConnection(connectionItem);\n updateConnectionItem();\n }\n ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());\n } catch (PersistenceException e) {\n String detailError = e.toString();\n new ErrorDialogWidthDetailArea(getShell(), PID, Messages.getString(\"String_Node_Str\"), detailError);\n log.error(Messages.getString(\"String_Node_Str\") + \"String_Node_Str\" + detailError);\n return false;\n }\n return true;\n } else {\n return false;\n }\n}\n"
|
"public void doAction(Side to) {\n if (this.getNetmask() == 8) {\n UpdaterPassStationEvent event = new UpdaterPassStationEvent(this, this.getSignAddress());\n Bukkit.getServer().getPluginManager().callEvent(event);\n }\n if (this.getStart().empty() ^ this.getEnd().empty())\n return;\n int start;\n if (to.Value() != Side.RIGHT.Value() && this.getNetmask() < 8) {\n if (this.isExactSubnet((start = this.getFirstStationNumber()), this.getNetmask())) {\n if (!this.getSignAddress().isValid()) {\n this.getSignAddress().setAddress(buildAddress(start));\n this.getSignAddress().finalizeAddress();\n this.getContent().updateTimestamp();\n }\n this.leaveSubnet();\n this.save();\n }\n return;\n }\n int length = (256 >> this.getNetmask());\n if (!getSignAddress().isValid() || this.needUpdate()) {\n Address old = this.getSignAddress();\n if ((start = this.getFreeSubnet(getNetmask())) != -1) {\n String address = buildAddress(start);\n this.getSignAddress().setAddress(address);\n this.getSignAddress().finalizeAddress();\n Address reloadAddress = AddressFactory.getAddress(address);\n this.setSignAddress(reloadAddress);\n this.getContent().updateTimestamp();\n if (length > 1) {\n UpdaterSetSubnetEvent event = new UpdaterSetSubnetEvent(this, old, reloadAddress, length);\n Bukkit.getServer().getPluginManager().callEvent(event);\n } else {\n UpdaterSetStationEvent event = new UpdaterSetStationEvent(this, old, reloadAddress);\n Bukkit.getServer().getPluginManager().callEvent(event);\n }\n if (ByteCart.debug)\n ByteCart.log.info(\"String_Node_Str\" + address + \"String_Node_Str\" + this.getSignAddress().toString() + \"String_Node_Str\");\n }\n }\n int stationfield = -1;\n if (getSignAddress().isValid())\n stationfield = this.getSignAddress().getStation().getAmount();\n if (length != 1) {\n if (!this.isInSubnet(stationfield, this.getNetmask()))\n leaveSubnet();\n if (stationfield != -1) {\n Stack<Integer> startstack = this.getStart();\n Stack<Integer> endstack = this.getEnd();\n Integer oldstart = startstack.peek();\n Integer oldend = endstack.peek();\n startstack.push(stationfield);\n endstack.push(stationfield + length);\n UpdaterEnterSubnetEvent event = new UpdaterEnterSubnetEvent(this, getSignAddress(), length, AddressFactory.getAddress(buildAddress(oldstart)), oldend - oldstart);\n Bukkit.getServer().getPluginManager().callEvent(event);\n }\n } else if (stationfield != -1)\n this.getCounter().incrementCount(stationfield, 64);\n save();\n}\n"
|
"public static int[] createTable(ITableContent table, int tableWidth) {\n int columnCount = table.getColumnCount();\n int[] columns = new int[columnCount];\n int unassignedCount = 0;\n int totalAssigned = 0;\n for (int i = 0; i < columnCount; i++) {\n DimensionType value = table.getColumn(i).getWidth();\n if (value == null) {\n columns[i] = -1;\n unassignedCount++;\n } else {\n columns[i] = ExcelUtil.covertDimensionType(value, tableWidth);\n totalAssigned += columns[i];\n }\n }\n int leftWidth = tableWidth - totalAssigned;\n if (leftWidth != 0 && unassignedCount == 0) {\n for (int i = 0; i < columnCount; i++) {\n columns[i] = resize(columns[i], totalAssigned, leftWidth);\n }\n } else if (leftWidth < 0 && unassignedCount > 0) {\n for (int i = 0; i < columnCount; i++) {\n if (columns[i] == -1)\n columns[1] = 0;\n else\n columns[i] = resize(columns[i], totalAssigned, leftWidth);\n }\n } else if (leftWidth >= 0 && unassignedCount > 0) {\n int per = (int) leftWidth / unassignedCount;\n int index = 0;\n for (int i = 0; i < columns.length; i++) {\n if (columns[i] == -1) {\n columns[i] = per;\n index = i;\n }\n }\n columns[index] = leftWidth - per * (unassignedCount - 1);\n }\n return EmitterUtil.resizeTableColumn(tableWidth, columns, unassignedCount, totalAssigned);\n}\n"
|
"public TypeComparator<T> duplicate() {\n return new TupleLeadingFieldComparator<T, K>(comparator.duplicate());\n}\n"
|
"public synchronized boolean isVideoWithinH264LevelLimits(InputFile f, RendererConfiguration mediaRenderer) {\n if (!h264_parsed) {\n if (isH264()) {\n if (getContainer() != null && (getContainer().equals(\"String_Node_Str\") || getContainer().equals(\"String_Node_Str\") || getContainer().equals(\"String_Node_Str\") || getContainer().equals(\"String_Node_Str\"))) {\n byte[][] headers = getAnnexBFrameHeader(f);\n if (ffmpeg_annexb_failure) {\n LOGGER.info(\"String_Node_Str\" + f.getFilename());\n }\n if (headers != null) {\n setH264AnnexB(headers[1]);\n if (getH264AnnexB() != null) {\n int skip = 5;\n if (getH264AnnexB()[2] == 1) {\n skip = 4;\n }\n byte[] header = new byte[getH264AnnexB().length - skip];\n System.arraycopy(getH264AnnexB(), skip, header, 0, header.length);\n if (getReferenceFrameCount() > -1 && (\"String_Node_Str\".equals(getAvcLevel()) || \"String_Node_Str\".equals(getAvcLevel()) || \"String_Node_Str\".equals(getAvcLevel()) || \"String_Node_Str\".equals(getAvcLevel()) || \"String_Node_Str\".equals(getAvcLevel()) || \"String_Node_Str\".equals(getAvcLevel())) && getWidth() > 0 && getHeight() > 0) {\n int maxref;\n if (mediaRenderer == null || mediaRenderer.isPS3()) {\n maxref = (int) Math.floor(10252743 / (double) (getWidth() * getHeight()));\n } else {\n maxref = (int) Math.floor(8388608 / (double) (getWidth() * getHeight()));\n }\n if (getReferenceFrameCount() > maxref) {\n LOGGER.debug(\"String_Node_Str\" + f.getFilename() + \"String_Node_Str\" + maxref + \"String_Node_Str\" + getReferenceFrameCount() + \"String_Node_Str\");\n return false;\n } else if (getReferenceFrameCount() == -1) {\n LOGGER.debug(\"String_Node_Str\" + f.getFilename() + \"String_Node_Str\");\n return false;\n }\n }\n } else {\n LOGGER.debug(\"String_Node_Str\" + f.getFilename());\n return false;\n }\n } else {\n return false;\n }\n }\n }\n h264_parsed = true;\n }\n return true;\n}\n"
|
"private void doRun() {\n while (true) {\n Packet task;\n try {\n task = workQueue.take();\n } catch (InterruptedException e) {\n if (isShutdown) {\n return;\n }\n continue;\n }\n if (isShutdown) {\n return;\n }\n process(task);\n }\n}\n"
|
"private File getMetaCacheFile() {\n File file = new File(context.getTmpdir() + CACHED_FILE_PREFIX + queryResultID + \"String_Node_Str\");\n return file;\n}\n"
|
"protected void generateMethodImplementation(String className, int access, String name, String desc, String signature, String[] exceptions) {\n if (signature != null && mockedTypeInfo != null) {\n signature = mockedTypeInfo.genericTypeMap.resolveSignature(className, signature);\n }\n mw = cw.visitMethod(ACC_PUBLIC, name, desc, signature, exceptions);\n if (ObjectMethods.isMethodFromObject(name, desc)) {\n generateEmptyImplementation(desc);\n } else {\n generateDirectCallToHandler(mw, className, access, name, desc, signature);\n generateReturnWithObjectAtTopOfTheStack(desc);\n mw.visitMaxs(1, 0);\n }\n}\n"
|
"public boolean shouldOverrideUrlLoading(WebView view, String url) {\n Log.d(\"String_Node_Str\", \"String_Node_Str\" + url);\n boolean completed = false;\n if (url.contains(PaymentArguments.EXT_AUTH_SUCCESS_URI)) {\n completed = true;\n webView.setVisibility(View.GONE);\n proceed();\n } else if (url.contains(PaymentArguments.EXT_AUTH_FAIL_URI)) {\n completed = true;\n showError(Error.AUTHORIZATION_REJECT, null);\n }\n if (completed) {\n hideProgressBar();\n }\n return completed || super.shouldOverrideUrlLoading(view, url);\n}\n"
|
"public List<MappableItem> getTargetItems() {\n List<MappableItem> list = new ArrayList<MappableItem>();\n for (MappableItem item : cdmItems) list.add(item);\n return list;\n}\n"
|
"private static boolean doExecuteUpdates(final List<UpdateResult> results, final boolean updateAllJobs) {\n if (results == null || results.isEmpty()) {\n return false;\n }\n try {\n IWorkspaceRunnable op = new IWorkspaceRunnable() {\n public void run(IProgressMonitor monitor) throws CoreException {\n monitor.setCanceled(false);\n int size = (results.size() * 2 + 1) * UpdatesConstants.SCALE;\n monitor.beginTask(Messages.getString(\"String_Node_Str\"), size);\n ProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();\n Map<String, Set<String>> jobIdToVersion = new HashMap<String, Set<String>>();\n Map<String, Boolean> jobIdClosed = new HashMap<String, Boolean>();\n for (UpdateResult result : results) {\n String id = result.getObjectId();\n String version = result.getObjectVersion();\n if (id == null) {\n if (result.getJob() != null && result.getJob() instanceof IProcess) {\n IProcess process = (IProcess) result.getJob();\n if (process instanceof IProcess2 && ERepositoryStatus.LOCK_BY_OTHER.equals(factory.getStatus(((IProcess2) process).getProperty().getItem()))) {\n continue;\n }\n id = process.getId();\n version = process.getVersion();\n result.setObjectId(id);\n result.setObjectVersion(version);\n } else {\n continue;\n }\n }\n Set<String> versionList;\n if (!jobIdToVersion.containsKey(id)) {\n versionList = new HashSet<String>();\n jobIdToVersion.put(id, versionList);\n } else {\n versionList = jobIdToVersion.get(id);\n }\n versionList.add(version);\n jobIdClosed.put(id + \"String_Node_Str\" + version, result.isFromItem());\n }\n for (String currentId : jobIdToVersion.keySet()) {\n for (String version : jobIdToVersion.get(currentId)) {\n IRepositoryViewObject currentObj = null;\n boolean closedItem = jobIdClosed.get(currentId + \"String_Node_Str\" + version);\n IProcess process = null;\n Item item = null;\n if (closedItem) {\n boolean checkOnlyLastVersion = Boolean.parseBoolean(DesignerPlugin.getDefault().getPreferenceStore().getString(\"String_Node_Str\"));\n try {\n if (checkOnlyLastVersion || version == null) {\n currentObj = factory.getLastVersion(currentId);\n } else {\n List<IRepositoryViewObject> allVersion = factory.getAllVersion(currentId);\n for (IRepositoryViewObject obj : allVersion) {\n if (obj.getVersion().equals(version)) {\n currentObj = obj;\n }\n }\n }\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n }\n if (currentObj == null) {\n continue;\n }\n item = currentObj.getProperty().getItem();\n IDesignerCoreService designerCoreService = CorePlugin.getDefault().getDesignerCoreService();\n if (item instanceof ProcessItem) {\n process = designerCoreService.getProcessFromProcessItem((ProcessItem) item);\n } else if (item instanceof JobletProcessItem) {\n process = designerCoreService.getProcessFromJobletProcessItem((JobletProcessItem) item);\n }\n }\n for (UpdateResult result : results) {\n if (!StringUtils.equals(currentId, result.getObjectId())) {\n continue;\n }\n if (closedItem) {\n if (result.getJob() == null) {\n result.setJob(process);\n } else {\n process = (IProcess) result.getJob();\n }\n IUpdateItemType jobletContextType = UpdateManagerProviderDetector.INSTANCE.getUpdateItemType(UpdateManagerHelper.TYPE_JOBLET_CONTEXT);\n if (process != null && jobletContextType != null && (jobletContextType.equals(result.getUpdateType()))) {\n if ((result.getParameter() instanceof List) && process.getContextManager() != null) {\n process.getContextManager().setListContext((List<IContext>) result.getParameter());\n }\n }\n }\n executeUpdate(result, monitor, updateAllJobs);\n if (closedItem) {\n result.setJob(null);\n }\n }\n boolean isTestContainer = false;\n ITestContainerProviderService testContainerService = null;\n if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {\n testContainerService = (ITestContainerProviderService) GlobalServiceRegister.getDefault().getService(ITestContainerProviderService.class);\n if (testContainerService != null) {\n isTestContainer = testContainerService.isTestContainerItem(item);\n }\n }\n if (closedItem && process instanceof IProcess2) {\n IProcess2 process2 = (IProcess2) process;\n ProcessType processType;\n try {\n processType = process2.saveXmlFile(false);\n if (isTestContainer) {\n testContainerService.setTestContainerProcess(processType, item);\n } else if (item instanceof JobletProcessItem) {\n ((JobletProcessItem) item).setJobletProcess((JobletProcess) processType);\n } else {\n ((ProcessItem) item).setProcess(processType);\n }\n factory.save(item);\n } catch (IOException e) {\n ExceptionHandler.process(e);\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n }\n }\n if (closedItem && !ERepositoryStatus.LOCK_BY_USER.equals(factory.getStatus(item))) {\n try {\n factory.unloadResources(item.getProperty());\n } catch (PersistenceException e) {\n ExceptionHandler.process(e);\n }\n }\n }\n }\n UpdateManagerProviderDetector.INSTANCE.postUpdate(results);\n upadateJobletReferenceInfor();\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n refreshRelatedViewers(results);\n checkandRefreshProcess(results);\n }\n });\n monitor.worked(1 * UpdatesConstants.SCALE);\n monitor.done();\n }\n };\n IRunnableWithProgress iRunnableWithProgress = new IRunnableWithProgress() {\n public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n try {\n ISchedulingRule schedulingRule = workspace.getRoot();\n workspace.run(op, schedulingRule, IWorkspace.AVOID_UPDATE, monitor);\n } catch (CoreException e) {\n throw new InvocationTargetException(e);\n }\n }\n };\n try {\n new ProgressMonitorDialog(null).run(true, true, iRunnableWithProgress);\n } catch (InvocationTargetException e) {\n ExceptionHandler.process(e);\n } catch (InterruptedException e) {\n }\n return !results.isEmpty();\n } finally {\n results.clear();\n }\n}\n"
|
"public void run() {\n Map<String, byte[]> map = hazelcast.getMap(\"String_Node_Str\");\n while (running) {\n try {\n int key = (int) (Math.random() * entryCount);\n int operation = random(10);\n if (operation < 4) {\n map.put(String.valueOf(key), new byte[valueSize]);\n stats.mapPuts.incrementAndGet();\n } else if (operation < 8) {\n map.get(String.valueOf(key));\n stats.mapGets.incrementAndGet();\n } else {\n map.remove(String.valueOf(key));\n stats.mapRemoves.incrementAndGet();\n }\n } catch (HazelcastInstanceNotActiveException ignored) {\n } catch (Throwable e) {\n e.printStackTrace();\n }\n }\n}\n"
|
"private boolean memoryHeuristic(long idleMillis) {\n if (idleMillis < FIVE_MIN_MILLIS) {\n return true;\n }\n ProcMeminfoParser memInfo = null;\n try {\n memInfo = new ProcMeminfoParser();\n } catch (IOException e) {\n log.info(\"String_Node_Str\" + e);\n return true;\n }\n long totalPhysical, totalFree;\n try {\n totalPhysical = memInfo.getTotalKb();\n totalFree = memInfo.getFreeRamKb();\n } catch (IllegalArgumentException e) {\n LoggingUtil.logToRemote(Level.WARNING, \"String_Node_Str\", e);\n return true;\n }\n double fractionFree = (double) totalFree / totalPhysical;\n if (fractionFree < .1) {\n LOG.info(\"String_Node_Str\");\n LOG.info(String.format(\"String_Node_Str\", totalPhysical, totalFree));\n return false;\n }\n return true;\n}\n"
|
"public void old_mode_nrtm_test() {\n given(OLD_MODE, OBJ_EXISTS_WITH_CHANGED).when(NRTM___, EVENT_, NOT_APPLIC__).then(SUCCESS, OBJ_EXISTS_WITH_CHANGED).run();\n given(OLD_MODE, OBJ_EXISTS_NO_CHANGED__).when(NRTM___, EVENT_, NOT_APPLIC__).then(SUCCESS, OBJ_EXISTS_NO_CHANGED__).run();\n}\n"
|
"private void eatFuel() {\n ItemStack is = getStackInSlot(0);\n if (is != null) {\n int newBurnTime = TileEntityFurnace.getItemBurnTime(is);\n if (newBurnTime > 0 && is.stackSize > 0) {\n burnTime += newBurnTime;\n maxBurnTime = burnTime;\n is.stackSize--;\n if (is.stackSize <= 0) {\n ItemStack container = null;\n if (is.getItem().hasContainerItem(is))\n container = is.getItem().getContainerItem(is);\n setInventorySlotContents(0, container);\n } else\n setInventorySlotContents(0, is);\n }\n }\n if (burnTime > 0) {\n try {\n gridProxy.getTick().wakeDevice(gridProxy.getNode());\n } catch (GridAccessException e) {\n }\n }\n if ((!isOn && burnTime > 0) || (isOn && burnTime <= 0)) {\n isOn = burnTime > 0;\n markForUpdate();\n }\n}\n"
|
"protected Collection<IdeDependency> getDependencies(IdeDependency[] ideDependencies) throws MojoExecutionException {\n List<IdeDependency> dependencies = new ArrayList<IdeDependency>(Arrays.asList(ideDependencies));\n List<IdeDependency> extraRbs = resolveResourceBundles(dependencies);\n for (IdeDependency ideDependency : dependencies) {\n if (ideDependency.isReferencedProject()) {\n String template = IdeUtils.PROJECT_NAME_DEFAULT_TEMPLATE;\n String projectName = IdeUtils.getProjectName(template, ideDependency);\n ideDependency.setFile(new File(\"String_Node_Str\" + projectName + \"String_Node_Str\" + projectName + \"String_Node_Str\"));\n ideDependency.setSourceAttachment(new File(\"String_Node_Str\" + projectName + \"String_Node_Str\"));\n } else {\n String ideDependencyScope = null;\n if (ideDependency.isSystemScoped()) {\n ideDependencyScope = Artifact.SCOPE_SYSTEM;\n } else if (ideDependency.isTestDependency()) {\n ideDependencyScope = Artifact.SCOPE_TEST;\n } else if (ideDependency.isProvided()) {\n ideDependencyScope = Artifact.SCOPE_PROVIDED;\n }\n Artifact art = artifactFactory.createArtifact(ideDependency.getGroupId(), ideDependency.getArtifactId(), ideDependency.getVersion(), ideDependencyScope, ideDependency.getType());\n art = MavenUtils.resolveArtifact(project, art, resolver, localRepository, remoteRepositories);\n if (useM2Home) {\n ideDependency.setFile(new File(ideDependency.getFile().getPath().replace(localRepository.getBasedir(), \"String_Node_Str\")));\n } else {\n ideDependency.setFile(ideDependency.getFile().getAbsoluteFile());\n }\n if (Arrays.binarySearch(SDK_SOURCES, ideDependency.getArtifactId()) >= 0) {\n ideDependency.setSourceAttachment(new File(\"String_Node_Str\" + ideDependency.getArtifactId() + \"String_Node_Str\"));\n }\n }\n }\n Set<IdeDependency> result = new HashSet<IdeDependency>();\n result.addAll(dependencies);\n result.addAll(extraRbs);\n return result;\n}\n"
|
"public V getAndReplace(K key, V value) {\n ensureOpen();\n if (value == null) {\n throw new NullPointerException(\"String_Node_Str\" + key);\n }\n long now = System.currentTimeMillis();\n V result;\n lockManager.lock(key);\n try {\n Object internalKey = keyConverter.toInternal(key);\n RICachedValue cachedValue = entries.get(internalKey);\n if (cachedValue == null || cachedValue.isExpiredAt(now)) {\n result = null;\n } else {\n V oldValue = valueConverter.fromInternal(cachedValue.getInternalValue(now));\n RIEntry<K, V> entry = new RIEntry<K, V>(key, value, oldValue);\n writeCacheEntry(entry);\n try {\n Duration duration = expiryPolicy.getExpiryForUpdate();\n if (duration != null) {\n long expiryTime = duration.getAdjustedTime(now);\n cachedValue.setExpiryTime(expiryTime);\n }\n } catch (Throwable t) {\n }\n Object internalValue = valueConverter.toInternal(value);\n cachedValue.setInternalValue(internalValue, now);\n RICacheEventDispatcher<K, V> dispatcher = new RICacheEventDispatcher<K, V>();\n dispatcher.addEvent(CacheEntryUpdatedListener.class, new RICacheEntryEvent<K, V>(this, key, value, oldValue, UPDATED));\n dispatcher.dispatch(listenerRegistrations);\n result = oldValue;\n }\n } finally {\n lockManager.unLock(key);\n }\n if (statisticsEnabled()) {\n if (result != null) {\n statistics.increaseCacheHits(1);\n statistics.increaseCachePuts(1);\n } else {\n statistics.increaseCacheMisses(1);\n }\n }\n return result;\n}\n"
|
"public void run() {\n MapService mapService = getService();\n if (mapService.getMapContainer(mapName).isNearCacheEnabled()) {\n mapService.invalidateNearCache(mapName, key);\n } else {\n getLogger().warning(\"String_Node_Str\" + mapName + \"String_Node_Str\");\n }\n}\n"
|
"public int getNumberOfCoveredSegments() {\n if (noBranchesYet()) {\n return executionCount > 0 ? 1 : 0;\n }\n return getSegmentsCovered();\n}\n"
|
"public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {\n if (cause instanceof WriteTimeoutException) {\n }\n this.oneNetClientContext.closeDirectly(clientSession);\n ctx.close();\n}\n"
|
"public void modifyText(ModifyEvent e) {\n displayNameKey = tx.getText().trim();\n validateSyntax();\n}\n"
|
"public final void setResponse(Response response, MediaType contentType) {\n responseSet = true;\n if (contentType == null)\n contentType = APPLICATION_OCTET_STREAM;\n response = (response != null) ? response : Responses.noContent().build();\n this.status = response.getStatus();\n this.entity = response.getEntity();\n if (request.getHttpMethod().equals(\"String_Node_Str\"))\n this.entity = null;\n else if (this.entity == null) {\n contentType = null;\n }\n if (response instanceof ResponseImpl) {\n this.headers = setResponseOptimal((ResponseImpl) response, contentType);\n } else {\n this.headers = setResponseNonOptimal(response, contentType);\n }\n}\n"
|
"private List<Map<Integer, RegexpMatchingIndicator>> organizeTableInput() {\n List<Map<Integer, RegexpMatchingIndicator>> returnList = new ArrayList<Map<Integer, RegexpMatchingIndicator>>();\n AllMatchIndicatorImpl allMatchIndicator = this.selectPatternsWizard.getAllMatchIndicator();\n if (allMatchIndicator == null) {\n return returnList;\n }\n List<ModelElement> analysisColumns = this.selectPatternsWizard.getAllMatchIndicator().getAnalyzedColumns();\n List<RegexpMatchingIndicator> regexpMatchingIndicatorList = this.selectPatternsWizard.getAllMatchIndicator().getCompositeRegexMatchingIndicators();\n for (RegexpMatchingIndicator regexIndicator : regexpMatchingIndicatorList) {\n int index = analysisColumns.indexOf(regexIndicator.getAnalyzedElement());\n Map<Integer, RegexpMatchingIndicator> returnMap = getMapLocation(returnList, index);\n returnMap.put(index, regexIndicator);\n if (returnMap.size() == 1) {\n returnList.add(returnMap);\n }\n }\n return returnList;\n}\n"
|
"private VMTemplateVO createTemplateOrIso(long userId, Long accountId, Long zoneId, String name, String displayText, boolean isPublic, boolean featured, boolean isExtractable, String format, String diskType, String url, String chksum, boolean requiresHvm, int bits, boolean enablePassword, long guestOSId, boolean bootable, HypervisorType hypervisorType) throws IllegalArgumentException, ResourceAllocationException {\n try {\n if (name.length() > 32) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n ImageFormat imgfmt = ImageFormat.valueOf(format.toUpperCase());\n if (imgfmt == null) {\n throw new IllegalArgumentException(\"String_Node_Str\" + format + \"String_Node_Str\" + EnumUtils.listValues(ImageFormat.values()));\n }\n URI uri = new URI(url);\n if ((uri.getScheme() == null) || (!uri.getScheme().equalsIgnoreCase(\"String_Node_Str\") && !uri.getScheme().equalsIgnoreCase(\"String_Node_Str\") && !uri.getScheme().equalsIgnoreCase(\"String_Node_Str\"))) {\n throw new IllegalArgumentException(\"String_Node_Str\" + url);\n }\n int port = uri.getPort();\n if (!(port == 80 || port == 443 || port == -1)) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n String host = uri.getHost();\n try {\n InetAddress hostAddr = InetAddress.getByName(host);\n if (hostAddr.isAnyLocalAddress() || hostAddr.isLinkLocalAddress() || hostAddr.isLoopbackAddress() || hostAddr.isMulticastAddress()) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n if (hostAddr instanceof Inet6Address) {\n throw new IllegalArgumentException(\"String_Node_Str\" + hostAddr.getHostAddress() + \"String_Node_Str\");\n }\n } catch (UnknownHostException uhe) {\n throw new IllegalArgumentException(\"String_Node_Str\" + host);\n }\n UserVO user = _userDao.findById(userId);\n if (user == null) {\n throw new IllegalArgumentException(\"String_Node_Str\" + userId);\n }\n AccountVO account = _accountDao.findById(accountId);\n if (_accountMgr.resourceLimitExceeded(account, ResourceType.template)) {\n ResourceAllocationException rae = new ResourceAllocationException(\"String_Node_Str\" + account.getAccountName() + \"String_Node_Str\");\n rae.setResourceType(\"String_Node_Str\");\n throw rae;\n }\n if (zoneId != null) {\n if (_dcDao.findById(zoneId) == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n }\n VMTemplateVO systemvmTmplt = _tmpltDao.findRoutingTemplate();\n if (systemvmTmplt.getName().equalsIgnoreCase(name) || systemvmTmplt.getDisplayText().equalsIgnoreCase(displayText)) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n return create(userId, accountId, zoneId, name, displayText, isPublic, featured, isExtractable, imgfmt, diskType, uri, chksum, requiresHvm, bits, enablePassword, guestOSId, bootable, hypervisorType);\n } catch (URISyntaxException e) {\n throw new IllegalArgumentException(\"String_Node_Str\" + url);\n }\n}\n"
|
"private void parse(Tree tree) throws SAXException {\n if (tree == null) {\n return;\n }\n switch(tree.getType()) {\n case JSONLexer.PAIR:\n {\n Tree valueTree = tree.getChild(1);\n if (valueTree.getType() == JSONLexer.ARRAY) {\n parse(valueTree);\n } else {\n Tree stringTree = tree.getChild(0);\n String qualifiedName = stringTree.getText().substring(1, stringTree.getText().length() - 1);\n String localName = qualifiedName;\n if (attributePrefix != null && qualifiedName.startsWith(attributePrefix)) {\n break;\n }\n String uri = XMLConstants.EMPTY_STRING;\n if (namespaceAware && namespaces != null) {\n if (localName.length() > 2) {\n int nsIndex = localName.indexOf(namespaceSeparator, 1);\n String prefix = XMLConstants.EMPTY_STRING;\n if (nsIndex > -1) {\n prefix = localName.substring(0, nsIndex);\n }\n uri = namespaces.resolveNamespacePrefix(prefix);\n if (uri == null) {\n uri = namespaces.getDefaultNamespaceURI();\n } else {\n localName = localName.substring(nsIndex + 1);\n }\n if (localName.equals(XMLConstants.SCHEMA_TYPE_ATTRIBUTE) && uri.equals(XMLConstants.SCHEMA_INSTANCE_URL)) {\n break;\n }\n } else {\n uri = namespaces.getDefaultNamespaceURI();\n }\n if (localName.equals(XMLConstants.SCHEMA_TYPE_ATTRIBUTE) && uri.equals(XMLConstants.SCHEMA_INSTANCE_URL)) {\n break;\n }\n }\n if (contentHandler instanceof XMLRootRecord || contentHandler instanceof DeferredContentHandler) {\n if (!namespaceAware && localName.equals(XMLConstants.SCHEMA_TYPE_ATTRIBUTE)) {\n break;\n }\n if (textWrapper != null && textWrapper.equals(localName)) {\n parse(valueTree);\n break;\n }\n } else if (contentHandler instanceof UnmarshalRecord && ((UnmarshalRecord) contentHandler).getXPathNode() != null) {\n if (!namespaceAware && localName.equals(XMLConstants.SCHEMA_TYPE_ATTRIBUTE) && !((UnmarshalRecord) contentHandler).getXPathNode().hasTypeChild()) {\n break;\n }\n boolean isTextValue = isTextValue(localName);\n if (isTextValue) {\n parse(valueTree);\n break;\n }\n }\n contentHandler.startElement(uri, localName, localName, attributes.setTree(valueTree, attributePrefix, namespaces, namespaceSeparator, namespaceAware));\n parse(valueTree);\n contentHandler.endElement(uri, localName, localName);\n }\n break;\n }\n case JSONLexer.STRING:\n {\n String string = string(tree.getChild(0).getText());\n contentHandler.characters(string);\n break;\n }\n case JSONLexer.NUMBER:\n {\n contentHandler.characters(tree.getChild(0).getText());\n break;\n }\n case JSONLexer.TRUE:\n {\n contentHandler.characters(TRUE);\n break;\n }\n case JSONLexer.FALSE:\n {\n contentHandler.characters(FALSE);\n break;\n }\n case JSONLexer.NULL:\n {\n break;\n }\n case JSONLexer.ARRAY:\n {\n Tree parentStringTree = tree.getParent().getChild(0);\n String parentLocalName = parentStringTree.getText().substring(1, parentStringTree.getText().length() - 1);\n if (attributePrefix != null && parentLocalName.startsWith(attributePrefix)) {\n break;\n }\n String uri = XMLConstants.EMPTY_STRING;\n if (namespaceAware && namespaces != null) {\n int nsIndex = parentLocalName.indexOf(namespaceSeparator);\n if (nsIndex > -1) {\n String prefix = parentLocalName.substring(0, nsIndex);\n parentLocalName = parentLocalName.substring(nsIndex + 1);\n uri = namespaces.resolveNamespacePrefix(prefix);\n }\n }\n boolean isTextValue = isTextValue(parentLocalName);\n int size = tree.getChildCount();\n if (size == 0) {\n if (contentHandler instanceof UnmarshalRecord) {\n UnmarshalRecord ur = (UnmarshalRecord) contentHandler;\n XPathNode node = ur.getNonAttributeXPathNode(uri, parentLocalName, parentLocalName, null);\n if (node != null) {\n NodeValue nv = node.getNodeValue();\n if (nv == null && node.getTextNode() != null) {\n nv = node.getTextNode().getUnmarshalNodeValue();\n }\n if (nv != null && nv.isContainerValue()) {\n ur.getContainerInstance(((ContainerValue) nv));\n }\n }\n }\n }\n for (int x = 0; x < size; x++) {\n CommonTree nextChildTree = (CommonTree) tree.getChild(x);\n if (!isTextValue) {\n contentHandler.startElement(uri, parentLocalName, parentLocalName, attributes.setTree(nextChildTree, attributePrefix, namespaces, namespaceSeparator, namespaceAware));\n }\n parse(nextChildTree);\n if (!isTextValue) {\n contentHandler.endElement(uri, parentLocalName, parentLocalName);\n }\n }\n break;\n }\n default:\n {\n for (int x = 0, size = tree.getChildCount(); x < size; x++) {\n parse((CommonTree) tree.getChild(x));\n }\n }\n }\n}\n"
|
"public ResourceLimitResponse createResourceLimitResponse(ResourceLimit limit) {\n ResourceLimitResponse resourceLimitResponse = new ResourceLimitResponse();\n if (limit.getResourceOwnerType() == ResourceOwnerType.Domain) {\n populateDomain(resourceLimitResponse, limit.getOwnerId());\n } else if (limit.getResourceOwnerType() == ResourceOwnerType.Account) {\n Account accountTemp = ApiDBUtils.findAccountById(limit.getOwnerId());\n populateAccount(resourceLimitResponse, limit.getOwnerId());\n populateDomain(resourceLimitResponse, accountTemp.getDomainId());\n }\n resourceLimitResponse.setResourceType(Integer.toString(limit.getType().getOrdinal()));\n if ((limit.getType() == ResourceType.primary_storage || limit.getType() == ResourceType.secondary_storage) && limit.getMax() >= 0) {\n resourceLimitResponse.setMax((long) Math.ceil((double) limit.getMax() / ResourceType.bytesToGiB));\n } else {\n resourceLimitResponse.setMax(limit.getMax());\n }\n resourceLimitResponse.setObjectName(\"String_Node_Str\");\n return resourceLimitResponse;\n}\n"
|
"protected void prepareBarHighlight(float x, float y1, float y2, float barWidthHalf, Transformer trans) {\n float top = x - barWidthHalf;\n float bottom = x + barWidthHalf;\n float left = y1;\n float right = y2;\n mBarRect.set(left, top, right, bottom);\n trans.rectToPixelPhaseHorizontal(mBarRect, mAnimator.getPhaseY());\n}\n"
|
"protected final boolean match(IElementType type, String error) {\n final boolean matched = !isEof() && tokenType() == type;\n if (matched) {\n advanceLexer();\n } else {\n error(error);\n }\n return match;\n}\n"
|
"public PrivateKey loadPrivateKey(String filePath) throws IllegalActionException {\n if (!filePath.endsWith(\"String_Node_Str\")) {\n throw new IllegalArgumentException(\"String_Node_Str\" + filePath);\n }\n PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(_readBinaryFile(filePath));\n KeyFactory keyFactory;\n try {\n keyFactory = KeyFactory.getInstance(\"String_Node_Str\");\n return keyFactory.generatePrivate(keySpec);\n } catch (NoSuchAlgorithmException | InvalidKeySpecException e) {\n throw new IllegalArgumentException(\"String_Node_Str\" + filePath, e);\n }\n}\n"
|
"public boolean approveReview(String id, ApproveState state, String description) throws Exception {\n if (id == null || id.isEmpty()) {\n p4.log(\"String_Node_Str\");\n return false;\n }\n if (\"String_Node_Str\".equalsIgnoreCase(id)) {\n p4.log(\"String_Node_Str\");\n return false;\n }\n String url = getApiUrl() + \"String_Node_Str\" + id + \"String_Node_Str\";\n Map<String, Object> parameters = new HashedMap();\n parameters.put(\"String_Node_Str\", state.getId());\n if (state.isCommit()) {\n parameters.put(\"String_Node_Str\", true);\n }\n if (description != null && !description.isEmpty()) {\n parameters.put(\"String_Node_Str\", description);\n }\n HttpResponse<JsonNode> res = Unirest.patch(url).basicAuth(user, ticket).fields(parameters).asJson();\n if (res.getStatus() == 200) {\n p4.log(\"String_Node_Str\" + id + \"String_Node_Str\" + state.getDescription());\n return true;\n } else {\n p4.log(\"String_Node_Str\" + url + \"String_Node_Str\" + res.getStatus());\n String error = res.getBody().getObject().getString(\"String_Node_Str\");\n p4.log(\"String_Node_Str\" + error);\n throw new SwarmException(res);\n }\n}\n"
|
"public Perspective getStratification() {\n return clinical.getRecordPerspective();\n}\n"
|
"public void readFromNBT(NBTTagCompound nbttagcompound) {\n super.readFromNBT(nbttagcompound);\n if (nbttagcompound.hasKey(\"String_Node_Str\")) {\n fluidType = FluidStack.loadFluidStackFromNBT(nbttagcompound.getCompoundTag(\"String_Node_Str\"));\n } else {\n fluidType = null;\n }\n for (ForgeDirection direction : orientations) {\n if (nbttagcompound.hasKey(\"String_Node_Str\" + direction.ordinal() + \"String_Node_Str\")) {\n NBTTagCompound compound = nbttagcompound.getCompoundTag(\"String_Node_Str\" + direction.ordinal() + \"String_Node_Str\");\n if (compound.hasKey(\"String_Node_Str\")) {\n FluidStack stack = FluidStack.loadFluidStackFromNBT(compound);\n if (fluidType == null) {\n fluidType = stack;\n }\n if (stack.isFluidEqual(fluidType)) {\n sections[direction.ordinal()].readFromNBT(compound);\n }\n } else {\n sections[direction.ordinal()].readFromNBT(nbttagcompound);\n }\n }\n if (direction != ForgeDirection.UNKNOWN) {\n transferState[direction.ordinal()] = TransferState.values()[nbttagcompound.getShort(\"String_Node_Str\" + direction.ordinal() + \"String_Node_Str\")];\n }\n }\n}\n"
|
"private HttpResponseEntity executeInternal(String baseUrl, HttpRequestEntity requestEntity) throws ArangoException, SocketException {\n String url = buildUrl(baseUrl, requestEntity);\n if (logger.isDebugEnabled()) {\n if (requestEntity.type == RequestType.POST || requestEntity.type == RequestType.PUT || requestEntity.type == RequestType.PATCH) {\n logger.debug(\"String_Node_Str\", new Object[] { requestEntity.type, url, requestEntity.headers, requestEntity.bodyText });\n } else {\n logger.debug(\"String_Node_Str\", new Object[] { requestEntity.type, url, requestEntity.headers });\n }\n }\n HttpRequestBase request;\n switch(requestEntity.type) {\n case GET:\n request = new HttpGet(url);\n break;\n case POST:\n HttpPost post = new HttpPost(url);\n configureBodyParams(requestEntity, post);\n request = post;\n break;\n case PUT:\n HttpPut put = new HttpPut(url);\n configureBodyParams(requestEntity, put);\n request = put;\n break;\n case PATCH:\n HttpPatch patch = new HttpPatch(url);\n configureBodyParams(requestEntity, patch);\n request = patch;\n break;\n case HEAD:\n request = new HttpHead(url);\n break;\n case DELETE:\n request = new HttpDelete(url);\n break;\n }\n String userAgent = \"String_Node_Str\";\n request.setHeader(\"String_Node_Str\", userAgent);\n if (requestEntity.headers != null) {\n for (Entry<String, Object> keyValue : requestEntity.headers.entrySet()) {\n request.setHeader(keyValue.getKey(), keyValue.getValue().toString());\n }\n }\n Credentials credentials = null;\n if (requestEntity.username != null && requestEntity.password != null) {\n credentials = new UsernamePasswordCredentials(requestEntity.username, requestEntity.password);\n } else if (configure.getUser() != null && configure.getPassword() != null) {\n credentials = new UsernamePasswordCredentials(configure.getUser(), configure.getPassword());\n }\n if (credentials != null) {\n BasicScheme basicScheme = new BasicScheme();\n try {\n request.addHeader(basicScheme.authenticate(credentials, request, null));\n } catch (AuthenticationException e) {\n throw new ArangoException(e);\n }\n }\n if (this.getHttpMode().equals(HttpMode.ASYNC)) {\n request.addHeader(\"String_Node_Str\", \"String_Node_Str\");\n } else if (this.getHttpMode().equals(HttpMode.FIREANDFORGET)) {\n request.addHeader(\"String_Node_Str\", \"String_Node_Str\");\n }\n if (configure.isEnableCURLLogger()) {\n CURLLogger.log(url, requestEntity, userAgent, credentials);\n }\n HttpResponse response = null;\n if (preDefinedResponse != null) {\n return preDefinedResponse;\n }\n try {\n response = client.execute(request);\n if (response == null) {\n return null;\n }\n HttpResponseEntity responseEntity = new HttpResponseEntity();\n StatusLine status = response.getStatusLine();\n responseEntity.statusCode = status.getStatusCode();\n responseEntity.statusPhrase = status.getReasonPhrase();\n logger.debug(\"String_Node_Str\", requestEntity.type, responseEntity.statusCode);\n Header etagHeader = response.getLastHeader(\"String_Node_Str\");\n if (etagHeader != null) {\n responseEntity.etag = Long.parseLong(etagHeader.getValue().replace(\"String_Node_Str\", \"String_Node_Str\"));\n }\n responseEntity.headers = new TreeMap<String, String>();\n for (Header header : response.getAllHeaders()) {\n responseEntity.headers.put(header.getName(), header.getValue());\n }\n HttpEntity entity = response.getEntity();\n if (entity != null) {\n Header contentType = entity.getContentType();\n if (contentType != null) {\n responseEntity.contentType = contentType.getValue();\n if (responseEntity.isDumpResponse()) {\n responseEntity.stream = entity.getContent();\n logger.debug(\"String_Node_Str\", requestEntity.type, contentType.getValue());\n }\n }\n if (responseEntity.stream == null) {\n responseEntity.text = IOUtils.toString(entity.getContent());\n logger.debug(\"String_Node_Str\", requestEntity.type, responseEntity.text);\n }\n }\n if (this.getHttpMode().equals(HttpMode.ASYNC)) {\n Map<String, String> map = responseEntity.getHeaders();\n this.addJob(map.get(\"String_Node_Str\"), this.getCurrentObject());\n } else if (this.getHttpMode().equals(HttpMode.FIREANDFORGET)) {\n return null;\n }\n return responseEntity;\n } catch (SocketException ex) {\n throw ex;\n } catch (ClientProtocolException e) {\n throw new ArangoException(e);\n } catch (IOException e) {\n throw new ArangoException(e);\n }\n}\n"
|
"public MrGeoRaster applyColorScale(final MrGeoRaster raster, ColorScale colorScale, final double[] extrema, final double[] defaultValues, final double[][] quantiles) throws ColorScale.ColorScaleException {\n try {\n MrGeoRaster colored = MrGeoRaster.createEmptyRaster(raster.width(), raster.height(), getBands(raster.bands()), DataBuffer.TYPE_BYTE);\n colored.fill(RasterUtils.getDefaultNoDataForType(DataBuffer.TYPE_BYTE));\n setupExtrema(colorScale, extrema, defaultValues[0], (quantiles == null || quantiles.length == 0) ? null : quantiles[0]);\n apply(raster, colored, colorScale);\n return colored;\n } catch (MrGeoRaster.MrGeoRasterException e) {\n throw new ColorScale.ColorScaleException(e);\n }\n}\n"
|
"public String getAlphaSortKey() {\n String name = element.getName();\n return name != null ? name : \"String_Node_Str\";\n}\n"
|
"public static SerializableImage frameToImageGet(Timeline timeline, int frame, int time, DepthState stateUnderCursor, int mouseButton, RECT displayRect, Matrix transformation, ColorTransform colorTransform, Color backGroundColor, boolean useCache, double zoom) {\n String key = \"String_Node_Str\" + frame + \"String_Node_Str\" + timeline.id + \"String_Node_Str\" + timeline.swf.hashCode() + \"String_Node_Str\" + zoom;\n SerializableImage image;\n if (useCache) {\n image = getFromCache(key);\n if (image != null) {\n return image;\n }\n }\n if (timeline.getFrameCount() == 0) {\n return new SerializableImage(1, 1, SerializableImage.TYPE_INT_ARGB);\n }\n RECT rect = displayRect;\n image = new SerializableImage((int) (rect.getWidth() * zoom / SWF.unitDivisor) + 1, (int) (rect.getHeight() * zoom / SWF.unitDivisor) + 1, SerializableImage.TYPE_INT_ARGB);\n if (backGroundColor == null) {\n image.fillTransparent();\n } else {\n Graphics2D g = (Graphics2D) image.getBufferedImage().getGraphics();\n g.setComposite(AlphaComposite.Src);\n g.setColor(backGroundColor);\n g.fill(new Rectangle(image.getWidth(), image.getHeight()));\n }\n Matrix m = transformation.clone();\n m.translate(-rect.Xmin * zoom, -rect.Ymin * zoom);\n m.scale(zoom);\n RenderContext renderContext = new RenderContext();\n renderContext.stateUnderCursor = stateUnderCursor;\n renderContext.mouseButton = mouseButton;\n frameToImage(timeline, frame, time, renderContext, image, m, colorTransform);\n if (useCache) {\n putToCache(key, image);\n }\n return image;\n}\n"
|
"public List<Package> fillSchemas(Connection dbConn, DatabaseMetaData dbJDBCMetadata, IMetadataConnection metaConnection, List<String> schemaFilter) {\n List<Schema> returnSchemas = new ArrayList<Schema>();\n if (dbJDBCMetadata == null || (dbConn != null && ConnectionHelper.getCatalogs(dbConn).size() > 0) || ConnectionUtils.isSybase(dbJDBCMetadata)) {\n return null;\n }\n ResultSet schemas = null;\n if (dbConn != null && EDatabaseTypeName.TERADATA.getProduct().equals(((DatabaseConnection) dbConn).getProductId())) {\n if (!dbConn.isContextMode()) {\n String sid = ((DatabaseConnection) dbConn).getSID();\n if (sid != null && sid.length() > 0) {\n schemaFilter.add(sid);\n }\n } else {\n IMetadataConnection iMetadataCon = metaConnection;\n if (iMetadataCon == null) {\n iMetadataCon = ConvertionHelper.convert(dbConn);\n }\n String sid = iMetadataCon.getDatabase();\n if (sid != null && sid.length() > 0) {\n schemaFilter.add(sid);\n }\n }\n }\n if (dbConn != null && dbConn.isContextMode()) {\n if (EDatabaseTypeName.ORACLEFORSID.getProduct().equals(((DatabaseConnection) dbConn).getProductId()) || EDatabaseTypeName.IBMDB2.getProduct().equals(((DatabaseConnection) dbConn).getProductId())) {\n IMetadataConnection iMetadataCon = metaConnection;\n if (iMetadataCon == null) {\n iMetadataCon = ConvertionHelper.convert(dbConn);\n }\n if (iMetadataCon != null) {\n String schemaTemp = iMetadataCon.getSchema();\n if (\"String_Node_Str\".equals(schemaTemp)) {\n schemaFilter.clear();\n }\n }\n }\n }\n try {\n if (dbConn != null && EDatabaseTypeName.ACCESS.getProduct().equals(((DatabaseConnection) dbConn).getProductId())) {\n return null;\n }\n schemas = dbJDBCMetadata.getSchemas();\n } catch (SQLException e) {\n log.warn(\"String_Node_Str\");\n }\n boolean hasSchema = false;\n try {\n boolean isHive2 = HiveConnectionManager.getInstance().isHive2(metaConnection);\n if (schemas != null && !ConnectionUtils.isOdbcHyperFileSQL(dbJDBCMetadata)) {\n String schemaName = null;\n while (schemas.next()) {\n if (!ConnectionUtils.isOdbcTeradata(dbJDBCMetadata) && !isHive2) {\n schemaName = schemas.getString(MetaDataConstants.TABLE_SCHEM.name());\n if (schemaName == null) {\n schemaName = schemas.getString(DatabaseConstant.ODBC_ORACLE_SCHEMA_NAME);\n }\n if (schemaName == null) {\n schemaName = schemas.getString(1);\n }\n } else {\n schemaName = schemas.getString(1);\n }\n hasSchema = true;\n String uiSchemaOnConnWizard = null;\n if (dbConn != null) {\n uiSchemaOnConnWizard = ((DatabaseConnection) dbConn).getUiSchema();\n if (isHive2) {\n uiSchemaOnConnWizard = ((DatabaseConnection) dbConn).getSID();\n }\n }\n if ((!isEmptyString(uiSchemaOnConnWizard) || !isNullUiSchema(dbConn)) && dbConn != null) {\n Schema schema = SchemaHelper.createSchema(TalendCWMService.getReadableName(dbConn, uiSchemaOnConnWizard));\n returnSchemas.add(schema);\n break;\n } else if (isCreateElement(schemaFilter, schemaName)) {\n Schema schema = SchemaHelper.createSchema(schemaName);\n returnSchemas.add(schema);\n }\n }\n schemas.close();\n }\n } catch (SQLException e) {\n log.error(e, e);\n }\n if (!hasSchema) {\n Schema schema = SchemaHelper.createSchema(\"String_Node_Str\");\n returnSchemas.add(schema);\n }\n Set<MetadataTable> tableSet = new HashSet<MetadataTable>();\n if (dbConn != null) {\n tableSet.addAll(ConnectionHelper.getTables(dbConn));\n }\n List<Schema> oldSchemas = new ArrayList<Schema>();\n for (MetadataTable table : tableSet) {\n EObject eContainer = table.eContainer();\n if (eContainer != null && eContainer instanceof Schema && !oldSchemas.contains(eContainer)) {\n oldSchemas.add((Schema) eContainer);\n }\n }\n if (isLinked() && !returnSchemas.isEmpty()) {\n ConnectionHelper.addSchemas(returnSchemas, dbConn);\n }\n for (Schema schema : oldSchemas) {\n List<Schema> list = new ArrayList<Schema>();\n String name = schema.getName();\n Schema s = (Schema) ConnectionHelper.getPackage(name, dbConn, Schema.class);\n if (s != null) {\n list.add(s);\n ConnectionHelper.removeSchemas(list, dbConn);\n ConnectionHelper.addSchema(schema, dbConn);\n } else {\n ConnectionHelper.addSchema(schema, dbConn);\n }\n }\n return ListUtils.castList(Package.class, returnSchemas);\n}\n"
|
"private void scanZipEntry(ZipEntry zipEntry, ZipFile zipFile, ZipInputStream zipInputStream) throws IOException {\n LOGGER.debug(\"String_Node_Str\" + zipEntry.getName());\n if (!zipEntry.isDirectory()) {\n String path = zipEntry.getName();\n if (path.endsWith(\"String_Node_Str\") || path.endsWith(\"String_Node_Str\")) {\n InputStream inputStream = zipFile.getInputStream(zipEntry);\n if (inputStream != null) {\n zipInputStream = new ZipInputStream(inputStream);\n } else {\n scanZipEntry(nestedPath, entry, zipFile, zipInputStream);\n }\n }\n boolean scanFile = false;\n for (String pathToScan : classPaths) {\n if (path.startsWith(pathToScan)) {\n scanFile = true;\n break;\n }\n }\n if (scanFile && path.endsWith(\"String_Node_Str\")) {\n if (zipInputStream == null) {\n try (InputStream inputStream = zipFile.getInputStream(zipEntry)) {\n processor.process(inputStream);\n }\n } else {\n processor.process(zipInputStream);\n zipInputStream.closeEntry();\n }\n }\n }\n}\n"
|
"public GetBucketTaggingResponseType getBucketTagging(GetBucketTaggingType request) throws S3Exception {\n GetBucketTaggingResponseType reply = (GetBucketTaggingResponseType) request.getReply();\n Bucket bucket = getBucketAndCheckAuthorization(request);\n try {\n TaggingConfiguration tagging = new TaggingConfiguration();\n List<BucketTag> bucketTagList = new ArrayList<>();\n List<BucketTags> bucketTagsList = BucketTaggingManagers.getInstance().getBucketTagging(bucket.getBucketUuid());\n if (bucketTagList.isEmpty()) {\n throw new NoSuchTagSetException(bucket.getBucketName());\n }\n for (BucketTags bucketTags : bucketTagsList) {\n BucketTag bucketTag = new BucketTag();\n bucketTag.setKey(bucketTags.getKey());\n bucketTag.setValue(bucketTags.getValue());\n bucketTagList.add(bucketTag);\n }\n BucketTagSet tagSet = new BucketTagSet();\n tagSet.setBucketTags(bucketTagList);\n tagging.setBucketTagSet(tagSet);\n reply.setTaggingConfiguration(tagging);\n } catch (Exception ex) {\n if (ex instanceof NoSuchTagSetException) {\n throw new NoSuchTagSetException(bucket.getBucketName());\n } else {\n LOG.error(\"String_Node_Str\" + bucket.getBucketName() + \"String_Node_Str\", ex);\n InternalErrorException e = new InternalErrorException(bucket.getBucketName() + \"String_Node_Str\");\n e.setMessage(\"String_Node_Str\" + bucket.getBucketName());\n throw e;\n }\n }\n return reply;\n}\n"
|
"public void draw(Canvas canvas, float posx, float posy) {\n posx += getXOffset(posx);\n posy += getYOffset(posy);\n canvas.translate(posx, posy);\n draw(canvas);\n canvas.translate(-posx, -posy);\n}\n"
|
"public void updatePostSettings() {\n if (!isAdded() || mPost == null) {\n return;\n }\n String password = EditTextUtils.getText(mPasswordEditText);\n String pubDate = EditTextUtils.getText(mPubDateText);\n String excerpt = EditTextUtils.getText(mExcerptEditText);\n long pubDateTimestamp = 0;\n if (mIsCustomPubDate && pubDate.equals(getResources().getText(R.string.immediately)) && !mPost.isLocalDraft()) {\n Date d = new Date();\n pubDateTimestamp = d.getTime();\n } else if (!pubDate.equals(getResources().getText(R.string.immediately))) {\n if (mIsCustomPubDate)\n pubDateTimestamp = mCustomPubDate;\n else if (mPost.getDate_created_gmt() > 0)\n pubDateTimestamp = mPost.getDate_created_gmt();\n } else if (pubDate.equals(getResources().getText(R.string.immediately)) && mPost.isLocalDraft()) {\n mPost.setDate_created_gmt(0);\n mPost.setDateCreated(0);\n }\n String tags = \"String_Node_Str\", postFormat = \"String_Node_Str\";\n if (!mPost.isPage()) {\n tags = (mTagsEditText.getText() != null) ? mTagsEditText.getText().toString() : \"String_Node_Str\";\n if (mPostFormats != null && mPostFormatSpinner != null && mPostFormatSpinner.getSelectedItemPosition() < mPostFormats.length) {\n postFormat = mPostFormats[mPostFormatSpinner.getSelectedItemPosition()];\n }\n }\n String status = getPostStatusForSpinnerPosition(mStatusSpinner.getSelectedItemPosition());\n if (mPost.isUploaded() && mPost.getPostStatus().equals(PostStatus.toString(PostStatus.DRAFT)) && status.equals(PostStatus.toString(PostStatus.PUBLISHED))) {\n mPost.setChangedFromLocalDraftToPublished(true);\n }\n if (mPost.supportsLocation()) {\n mPost.setLocation(mPostLocation);\n }\n mPost.setPostExcerpt(excerpt);\n mPost.setDate_created_gmt(pubDateTimestamp);\n mPost.setJSONCategories(new JSONArray(mCategories));\n mPost.setKeywords(tags);\n mPost.setPostStatus(status);\n mPost.setPassword(password);\n mPost.setPostFormat(postFormat);\n}\n"
|
"private static String createStandardNumber(Object input) {\n return NumberFormat.getInstance(Locale.US).format(input);\n}\n"
|
"public Throwable esToCrateException(Throwable e) {\n e = Exceptions.unwrap(e);\n if (e instanceof IllegalArgumentException || e instanceof ParsingException) {\n return new SQLParseException(e.getMessage(), (Exception) e);\n } else if (e instanceof UnsupportedOperationException) {\n return new UnsupportedFeatureException(e.getMessage(), (Exception) e);\n } else if (e instanceof DocumentAlreadyExistsException) {\n return new DuplicateKeyException(\"String_Node_Str\", e);\n } else if (e instanceof IndexAlreadyExistsException) {\n return new TableAlreadyExistsException(((IndexAlreadyExistsException) e).index().name(), e);\n } else if ((e instanceof InvalidIndexNameException)) {\n if (e.getMessage().contains(\"String_Node_Str\")) {\n return new TableAlreadyExistsException(((InvalidIndexNameException) e).index().getName(), e);\n }\n return new InvalidTableNameException(((InvalidIndexNameException) e).index().getName(), e);\n } else if (e instanceof IndexMissingException) {\n return new TableUnknownException(((IndexMissingException) e).index().name(), e);\n } else if (e instanceof ReduceSearchPhaseException && e.getCause() instanceof VersionConflictException) {\n return e.getCause();\n }\n return e;\n}\n"
|
"public void endElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord) {\n SAXFragmentBuilder builder = unmarshalRecord.getFragmentBuilder();\n Object value = builder.getNodes().pop();\n unmarshalRecord.addAttributeValue(this, value);\n}\n"
|
"private boolean getMessage() {\n if (!acquireReadBuffer()) {\n return false;\n }\n try {\n buffer.limit(17);\n int read = connection.read();\n if (read == 17) {\n buffer.flip();\n byte request = buffer.get();\n if (request != HeaderConstants.OFFER_LOG) {\n log(\"String_Node_Str\" + request);\n close();\n return true;\n }\n long version = buffer.getLong();\n if (version < xaDs.getCurrentLogVersion()) {\n log(\"String_Node_Str\" + version + \"String_Node_Str\");\n setStatus(Status.SETUP_NOT_OK);\n return true;\n }\n logLength = buffer.getLong();\n log(\"String_Node_Str\" + version + \"String_Node_Str\" + logLength);\n if (!xaDs.hasLogicalLog(version)) {\n try {\n logVersionWriting = version;\n tempFile = new File(xaDs.getName() + \"String_Node_Str\" + Long.toString(version));\n if (tempFile.exists()) {\n log(tempFile.getName() + \"String_Node_Str\");\n tempFile.delete();\n }\n logToWrite = new RandomAccessFile(tempFile, \"String_Node_Str\").getChannel();\n logToWrite.truncate(0);\n } catch (IOException e) {\n close();\n throw new SocketException(\"String_Node_Str\" + version + \"String_Node_Str\", e);\n }\n setStatus(Status.SETUP_OK);\n } else {\n log(\"String_Node_Str\" + version + \"String_Node_Str\");\n setStatus(Status.SETUP_NOT_OK);\n }\n retries = 0;\n return true;\n } else {\n if (read > 0) {\n connection.pushBackAllReadData();\n }\n return false;\n }\n } finally {\n releaseReadBuffer();\n }\n}\n"
|
"public Reader getDataStream() {\n try {\n ZipEntry xmlMetaDataEntry = null;\n Enumeration entries = zipFile.entries();\n while (entries.hasMoreElements()) {\n ZipEntry entry = (ZipEntry) entries.nextElement();\n if (!entry.isDirectory()) {\n if (entry.getName().endsWith(\"String_Node_Str\")) {\n dataStream = zipFile.getInputStream(entry);\n }\n }\n }\n if (dataStream == null) {\n throw new ImporterException(\"String_Node_Str\");\n }\n Reader inputReader = (dataFileEncoding == null) ? new InputStreamReader(dataStream) : new InputStreamReader(dataStream, dataFileEncoding);\n return new BufferedReader(inputReader);\n } catch (UnsupportedEncodingException e) {\n throw new ImporterException(\"String_Node_Str\" + dataFileEncoding + \"String_Node_Str\");\n } catch (IOException e) {\n throw new ImporterException(\"String_Node_Str\" + e.getMessage());\n }\n}\n"
|
"public void renderEquipped(ItemStack item, RenderBlocks render, EntityLivingBase entity, ItemRenderType type) {\n super.renderEquipped(item, render, entity, type);\n if (entity instanceof EntityPlayer) {\n EntityPlayer player = (EntityPlayer) entity;\n if (player.getCurrentEquippedItem() == item) {\n InfWeapon inf = WMInformation.instance.getInformation(player);\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.5F);\n RendererBulletWeapon.renderMuzzleflashIn2d(Tessellator.instance, ClientProps.EGON_MUZZLE, 0.0F, -0.12F, -0.2F);\n }\n }\n}\n"
|
"public SAFA<P, S, E> negate(BooleanAlgebra<P, S> ba, BooleanExpressionFactory<E> boolexpr) {\n class DeMorgan extends BooleanExpressionFactory<E> {\n public DeMorgan() {\n }\n public E MkAnd(E p, E q) {\n return boolexpr.MkOr(p, q);\n }\n public E MkOr(E p, E q) {\n return boolexpr.MkAnd(p, q);\n }\n public E True() {\n return boolexpr.False();\n }\n public E False() {\n return boolexpr.True();\n }\n public E MkState(int i) {\n return boolexpr.MkState(i);\n }\n }\n Collection<SAFAInputMove<P, S, E>> transitions = new ArrayList<SAFAInputMove<P, S, E>>();\n BooleanExpressionMorphism<E> demorganize = new BooleanExpressionMorphism<E>((x) -> boolexpr.MkState(x), new DeMorgan());\n boolean addAccept = false;\n for (int state = 0; state <= maxStateId; state++) {\n P residual = ba.True();\n if (inputMovesFrom.containsKey(state)) {\n for (SAFAInputMove<P, S, E> transition : inputMovesFrom.get(state)) {\n transitions.add(new SAFAInputMove<>(state, demorganize.apply(transition.to), transition.guard));\n residual = ba.MkAnd(ba.MkNot(transition.guard), residual);\n }\n }\n for (SAFAInputMove<P, S, E> transition : inputMovesFrom.get(state)) {\n transitions.add(new SAFAInputMove<>(state, demorganize.apply(transition.to), transition.guard));\n }\n }\n Set<Integer> nonFinal = new HashSet<>();\n for (int state = 0; state < maxStateId; state++) {\n if (!finalStates.contains(state)) {\n nonFinal.add(state);\n }\n }\n return MkSAFA(transitions, initialState, nonFinal, ba, boolexpr, true);\n}\n"
|
"public static StoreFactoryFamilySpi findStoreFamily(final Map<String, String> configOptions) {\n final Object storeHint = configOptions.get(STORE_HINT_KEY);\n if (storeHint != null) {\n final StoreFactoryFamilySpi factory = factories.get(storeHint.toString());\n if (factory != null) {\n final List<String> missingOptions = getMissingRequiredOptions(factory, configOptions);\n if (missingOptions.isEmpty()) {\n return factory;\n }\n LOGGER.error(\"String_Node_Str\" + storeHint.toString() + \"String_Node_Str\" + ConfigUtils.getOptions(missingOptions));\n return null;\n } else {\n LOGGER.error(\"String_Node_Str\" + storeHint.toString() + \"String_Node_Str\");\n return null;\n }\n }\n int matchingFactoryOptionCount = -1;\n StoreFactoryFamilySpi matchingFactory = null;\n boolean matchingFactoriesHaveSameOptionCount = false;\n for (final Entry<String, StoreFactoryFamilySpi> entry : registeredStoreFactoryFamilies.entrySet()) {\n final StoreFactoryFamilySpi factory = entry.getValue();\n final List<String> missingOptions = getMissingRequiredOptions(factory, configOptions);\n ConfigOption[] factoryOptions = ConfigUtils.createConfigOptionsFromJCommander(factory.getDataStoreFactory().createOptionsInstance());\n if (missingOptions.isEmpty() && ((matchingFactory == null) || (factoryOptions.length >= matchingFactoryOptionCount))) {\n matchingFactory = factory;\n matchingFactoriesHaveSameOptionCount = (factoryOptions.length == matchingFactoryOptionCount);\n matchingFactoryOptionCount = factoryOptions.length;\n }\n }\n if (matchingFactory == null) {\n LOGGER.error(\"String_Node_Str\");\n } else if (matchingFactoriesHaveSameOptionCount) {\n LOGGER.warn(\"String_Node_Str\");\n LOGGER.warn(matchingFactory.getName() + \"String_Node_Str\");\n }\n return matchingFactory;\n}\n"
|
"public static RemoteStorageTileEntity getRemoteStorage(World world, int id) {\n RemoteStorageIdRegistry registry = RemoteStorageIdRegistry.getRegistry(world);\n if (registry == null) {\n return null;\n }\n GlobalCoordinate coordinate = registry.getStorage(id);\n if (coordinate == null) {\n return null;\n }\n World w = DimensionManager.getWorld(coordinate.getDimension());\n if (w == null) {\n return null;\n }\n BlockPos c = coordinate.getCoordinate();\n boolean exists = w.getChunkProvider().getLoadedChunk(c.getX() >> 4, c.getZ() >> 4) != null;\n if (!exists) {\n return null;\n }\n TileEntity te = w.getTileEntity(c);\n if (te instanceof RemoteStorageTileEntity) {\n RemoteStorageTileEntity remoteStorageTileEntity = (RemoteStorageTileEntity) te;\n int index = remoteStorageTileEntity.findRemoteIndex(id);\n if (index == -1) {\n return null;\n }\n if (remoteStorageTileEntity.isGlobal(index) || world.provider.getDimensionId() == coordinate.getDimension()) {\n return remoteStorageTileEntity;\n } else {\n return null;\n }\n } else {\n return null;\n }\n}\n"
|
"private void doSubscribe() throws Exception, JMSException {\n MqttClient mqttClient = MQTTConnector.getMQTTSubClient(Util.getRandomString(5));\n try {\n mqttClient.connect();\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + topicName + \"String_Node_Str\" + mqttClient.getServerURI());\n }\n mqttClient.subscribe(topicName);\n mqttClient.setCallback(messageListener);\n subscribed = true;\n } finally {\n mqttClient.disconnect();\n }\n}\n"
|
"public void visitFreeForm(FreeFormHandle handle) {\n FreeFormItemDesign container = new FreeFormItemDesign();\n setupReportItem(container, handle);\n SlotHandle slot = handle.getReportItems();\n for (int i = 0; i < slot.getCount(); i++) {\n apply(slot.get(i));\n if (currentElement != null) {\n container.addItem((ReportItemDesign) currentElement);\n }\n }\n setCurrentElement(container);\n}\n"
|
"public void doDraw(long elapsed, Canvas canvas) {\n canvas.drawColor(Color.BLACK);\n synchronized (mSprites) {\n for (Sprite sprite : mSprites) {\n sprite.doDraw(canvas);\n }\n }\n canvas.drawText(\"String_Node_Str\" + Math.round(1000f / elapsed) + \"String_Node_Str\" + mElementNumber, 10, 10, mPaint);\n}\n"
|
"public void bindItemView(MenuItemImpl item, MenuView.ItemView itemView) {\n itemView.initialize(item, 0);\n final ActionMenuView menuView = (ActionMenuView) mMenuView;\n final ActionMenuItemView actionItemView = (ActionMenuItemView) itemView;\n actionItemView.setItemInvoker(menuView);\n}\n"
|
"public int compareTo(final GenomicInterval e) {\n if (e == null) {\n return -1;\n }\n if (!getChromosome().equals(e.getChromosome())) {\n return getChromosome().compareTo(e.getChromosome());\n }\n final int startComp = Integer.compare(this.start, e.getStart());\n if (startComp != 0) {\n return startComp;\n }\n return ((Integer) this.end).compareTo(e.getEnd());\n}\n"
|
"public static void write(String str, DataOutputStream stream) throws IOException {\n if (str == null) {\n stream.writeInt(-1);\n } else {\n byte[] data = str.getBytes(\"String_Node_Str\");\n stream.writeInt(data.length);\n stream.write(data);\n }\n}\n"
|
"public void before() throws Exception {\n databaseHelper.addObject(MNTNER);\n databaseHelper.addObjectToSource(\"String_Node_Str\", MNTNER);\n databaseHelper.addObjectToSource(\"String_Node_Str\", MNTNER);\n databaseHelper.addObjectToSource(\"String_Node_Str\", MNTNER);\n nrtmServer.start();\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", Integer.toString(NrtmServer.getPort()));\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", Integer.toString(NrtmServer.port));\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", Integer.toString(NrtmServer.port));\n nrtmImporter.start();\n}\n"
|
"private InputAttemptIdentifier[] copyMapOutput(MapHost host, DataInputStream input) {\n MapOutput mapOutput = null;\n InputAttemptIdentifier srcAttemptId = null;\n long decompressedLength = -1;\n long compressedLength = -1;\n try {\n long startTime = System.currentTimeMillis();\n int forReduce = -1;\n try {\n ShuffleHeader header = new ShuffleHeader();\n header.readFields(input);\n if (!header.mapId.startsWith(InputAttemptIdentifier.PATH_PREFIX)) {\n throw new IllegalArgumentException(\"String_Node_Str\" + header.mapId + \"String_Node_Str\" + header.forReduce);\n }\n srcAttemptId = scheduler.getIdentifierForFetchedOutput(header.mapId, header.forReduce);\n compressedLength = header.compressedLength;\n decompressedLength = header.uncompressedLength;\n forReduce = header.forReduce;\n } catch (IllegalArgumentException e) {\n badIdErrs.increment(1);\n LOG.warn(\"String_Node_Str\", e);\n return new InputAttemptIdentifier[] { getNextRemainingAttempt() };\n }\n if (!verifySanity(compressedLength, decompressedLength, forReduce, remaining, srcAttemptId)) {\n if (srcAttemptId == null) {\n LOG.warn(\"String_Node_Str\" + getNextRemainingAttempt() + \"String_Node_Str\");\n srcAttemptId = getNextRemainingAttempt();\n }\n assert (srcAttemptId != null);\n return new InputAttemptIdentifier[] { srcAttemptId };\n }\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\" + srcAttemptId + \"String_Node_Str\" + compressedLength + \"String_Node_Str\" + decompressedLength);\n }\n mapOutput = merger.reserve(srcAttemptId, decompressedLength, id);\n if (mapOutput.getType() == Type.WAIT) {\n LOG.info(\"String_Node_Str\" + id + \"String_Node_Str\");\n return EMPTY_ATTEMPT_ID_ARRAY;\n }\n LOG.info(\"String_Node_Str\" + id + \"String_Node_Str\" + mapOutput.getAttemptIdentifier() + \"String_Node_Str\" + decompressedLength + \"String_Node_Str\" + compressedLength + \"String_Node_Str\" + mapOutput.getType());\n if (mapOutput.getType() == Type.MEMORY) {\n shuffleToMemory(host, mapOutput, input, (int) decompressedLength, (int) compressedLength);\n } else {\n shuffleToDisk(host, mapOutput, input, compressedLength);\n }\n long endTime = System.currentTimeMillis();\n scheduler.copySucceeded(srcAttemptId, host, compressedLength, decompressedLength, endTime - startTime, mapOutput);\n remaining.remove(srcAttemptId);\n metrics.successFetch();\n return null;\n } catch (IOException ioe) {\n ioErrs.increment(1);\n if (srcAttemptId == null || mapOutput == null) {\n LOG.info(\"String_Node_Str\" + id + \"String_Node_Str\" + srcAttemptId + \"String_Node_Str\" + decompressedLength + \"String_Node_Str\" + compressedLength, ioe);\n if (srcAttemptId == null) {\n return remaining.toArray(new InputAttemptIdentifier[remaining.size()]);\n } else {\n return new InputAttemptIdentifier[] { srcAttemptId };\n }\n }\n LOG.warn(\"String_Node_Str\" + srcAttemptId + \"String_Node_Str\" + host.getHostName(), ioe);\n mapOutput.abort();\n metrics.failedFetch();\n return new InputAttemptIdentifier[] { srcAttemptId };\n }\n}\n"
|
"private void tryCreateConnection(String driverClassName, String connectionString, String userId, String password) throws SQLException, OdaException {\n Connection testConn = this.getConnection(driverClassName, connectionString, userId, password, null);\n assert (testConn != null);\n closeConnection(testConn);\n}\n"
|
"public void movePrepackagedDB(String databaseName, String prepackagedName) {\n final File dbPath = FlowManager.getContext().getDatabasePath(databaseName);\n if (dbPath.exists() && (!getDatabaseDefinition().areConsistencyChecksEnabled() || (getDatabaseDefinition().areConsistencyChecksEnabled() && isDatabaseIntegrityOk(databaseWrapper)))) {\n return;\n }\n dbPath.getParentFile().mkdirs();\n try {\n File existingDb = FlowManager.getContext().getDatabasePath(getTempDbFileName());\n InputStream inputStream;\n if (existingDb.exists() && (!getDatabaseDefinition().backupEnabled() || getDatabaseDefinition().backupEnabled() && FlowManager.isDatabaseIntegrityOk(backupHelper))) {\n inputStream = new FileInputStream(existingDb);\n } else {\n inputStream = FlowManager.getContext().getAssets().open(prepackagedName);\n }\n writeDB(dbPath, inputStream);\n } catch (IOException e) {\n FlowLog.log(FlowLog.Level.W, \"String_Node_Str\", e);\n }\n}\n"
|
"public URL getResource(String name) {\n return resourceAcceptor.apply(name) ? super.getResource(name) : null;\n}\n"
|
"private void filterResources() throws MojoExecutionException {\n try {\n MavenResourcesExecution execution = new MavenResourcesExecution(getResources(), getFilteredAppDirectory(), project, encoding, filters, Collections.EMPTY_LIST, session);\n execution.setEscapeWindowsPaths(escapeWindowsPaths);\n execution.setSupportMultiLineFiltering(supportMultiLineFiltering);\n if (nonFilteredFileExtensions != null) {\n execution.setNonFilteredFileExtensions(nonFilteredFileExtensions);\n }\n resourceFilter.filterResources(execution);\n } catch (MavenFilteringException e) {\n throw new MojoExecutionException(\"String_Node_Str\", e);\n }\n}\n"
|
"public static boolean isValid(BlockPos offset) {\n if (offset.getX() < 0 || offset.getX() >= 16)\n return false;\n if (offset.getY() < 0 | offset.getY() >= 16)\n return false;\n if (offset.getZ() < 0 | offset.getZ() >= 16)\n return false;\n return true;\n}\n"
|
"private void flushMergedElementsBefore(String moduleElement) {\n if (options.isMerge() && context.size() == 1 && \"String_Node_Str\".equals(context.peek()) && !(mergedConfigurations && mergedDependencies)) {\n int position = moduleElement == null ? MODULE_ELEMENTS.size() : MODULE_ELEMENTS.indexOf(moduleElement);\n ModuleDescriptor merged = options.getMergedDescriptor();\n if (!mergedConfigurations && position > CONFIGURATIONS_POSITION && merged.getConfigurations().length > 0) {\n mergedConfigurations = true;\n writeInheritedItems(merged, merged.getConfigurations(), ConfigurationPrinter.INSTANCE, \"String_Node_Str\", true);\n }\n if (!mergedDependencies && position > DEPENDENCIES_POSITION && merged.getDependencies().length > 0) {\n mergedDependencies = true;\n writeInheritedItems(merged, merged.getDependencies(), DependencyPrinter.INSTANCE, \"String_Node_Str\", true);\n }\n }\n}\n"
|
"public ApiRequest deleteBlueprint(String blueprintName) throws AmbariApiException {\n logger.info(\"String_Node_Str\" + blueprintName);\n Response response = apiResourceRootV1.getBlueprintsResource().deleteBlueprint(blueprintName);\n handleAmbariResponse(response);\n return true;\n}\n"
|
"public V getAndPut(K key, V value) {\n checkStatusStarted();\n if (value == null) {\n throw new NullPointerException(\"String_Node_Str\" + key);\n }\n long start = statisticsEnabled() ? System.nanoTime() : 0;\n long now = System.currentTimeMillis();\n V result;\n lockManager.lock(key);\n try {\n RIEntry<K, V> entry = new RIEntry<K, V>(key, value);\n writeCacheEntry(entry);\n RICacheEventEventDispatcher<K, V> dispatcher = new RICacheEventEventDispatcher<K, V>();\n Object internalKey = keyConverter.toInternal(key);\n Object internalValue = valueConverter.toInternal(value);\n RICachedValue cachedValue = entries.get(internalKey);\n boolean isExpired = cachedValue != null && cachedValue.isExpiredAt(now);\n if (cachedValue == null || isExpired) {\n if (isExpired) {\n V expiredValue = valueConverter.fromInternal(cachedValue.get());\n dispatcher.addEvent(CacheEntryExpiredListener.class, new RICacheEntryEvent<K, V>(this, key, expiredValue));\n }\n Duration duration;\n try {\n duration = expiryPolicy.getTTLForCreatedEntry(entry);\n } catch (Throwable t) {\n duration = getDefaultDuration();\n }\n long expiryTime = duration.getAdjustedTime(now);\n cachedValue = new RICachedValue(internalValue, now, expiryTime);\n entries.put(internalKey, cachedValue);\n result = null;\n dispatcher.addEvent(CacheEntryCreatedListener.class, new RICacheEntryEvent<K, V>(this, key, value));\n } else {\n V oldValue = valueConverter.fromInternal(cachedValue.getInternalValue(now));\n Duration duration;\n try {\n Duration duration = expiryPolicy.getTTLForModifiedEntry(entry, new Duration(now, cachedValue.getExpiryTime()));\n long expiryTime = duration.getAdjustedTime(now);\n cachedValue.setExpiryTime(expiryTime);\n } catch (Throwable t) {\n duration = getDefaultDuration();\n }\n long expiryTime = duration.getAdjustedTime(now);\n cachedValue.setInternalValue(internalValue, now);\n cachedValue.setExpiryTime(expiryTime);\n result = oldValue;\n dispatcher.addEvent(CacheEntryUpdatedListener.class, new RICacheEntryEvent<K, V>(this, key, value, oldValue));\n }\n dispatcher.dispatch(cacheEntryListenerRegistrations.values());\n } finally {\n lockManager.unLock(key);\n }\n if (statisticsEnabled()) {\n statistics.increaseCachePuts(1);\n statistics.addPutTimeNano(System.nanoTime() - start);\n }\n if (result != null) {\n statistics.increaseCacheHits(1);\n statistics.addGetTimeNano(System.nanoTime() - start);\n }\n return result;\n}\n"
|
"public void postAcquireConnection(SessionEvent event) {\n Connection conn = ((DatabaseAccessor) event.getResult()).getConnection();\n Statement stmt1 = null;\n Statement stmt2 = null;\n ResultSet result = null;\n Integer isolationLevel;\n try {\n stmt1 = conn.createStatement();\n result = stmt1.executeQuery(\"String_Node_Str\");\n result.next();\n isolationLevel = result.getInt(1);\n if (isolationLevel > 0) {\n stmt2 = conn.createStatement();\n stmt2.execute(\"String_Node_Str\");\n stmt2.close();\n connections.put(conn, isolationLevel);\n }\n } catch (SQLException sqlException) {\n throw new TestProblemException(\"String_Node_Str\", sqlException);\n } finally {\n if (result != null) {\n try {\n result.close();\n } catch (SQLException ex) {\n }\n }\n if (stmt1 != null) {\n try {\n stmt1.close();\n } catch (SQLException ex) {\n }\n }\n if (stmt2 != null) {\n try {\n stmt2.close();\n } catch (SQLException ex) {\n }\n }\n }\n}\n"
|
"private boolean grade4Red() {\n ColorWheel.removeAllColors();\n quiz.question4();\n return Colors.Reds.Red.equals(getSafeColor());\n}\n"
|
"void parseResponse(JSONObject response) throws JSONException {\n ReferrersModel model = new ReferrersModel(123456, response);\n assertEquals(model.getTotalViews(), 2161);\n assertEquals(model.getOtherViews(), 938);\n assertNotNull(model.getGroups());\n assertEquals(model.getGroups().size(), 10);\n ReferrerGroupModel gModel = model.getGroups().get(0);\n assertEquals(gModel.getName(), \"String_Node_Str\");\n assertEquals(gModel.getGroupId(), \"String_Node_Str\");\n assertEquals(gModel.getIcon(), \"String_Node_Str\");\n assertEquals(gModel.getTotal(), 480);\n assertNotNull(gModel.getResults());\n assertEquals(gModel.getResults().size(), 7);\n ReferrerResultModel refResultModel = gModel.getResults().get(0);\n assertEquals(refResultModel.getName(), \"String_Node_Str\");\n assertEquals(refResultModel.getIcon(), \"String_Node_Str\");\n assertEquals(refResultModel.getViews(), 461);\n assertNotNull(refResultModel.getChildren());\n assertNull(refResultModel.getUrl());\n SingleItemModel child = refResultModel.getChildren().get(0);\n assertEquals(child.getUrl(), \"String_Node_Str\");\n assertEquals(child.getTitle(), \"String_Node_Str\");\n assertEquals(child.getIcon(), \"String_Node_Str\");\n assertEquals(child.getTotals(), 176);\n child = refResultModel.getChildren().get(10);\n assertEquals(child.getUrl(), \"String_Node_Str\");\n assertEquals(child.getTitle(), \"String_Node_Str\");\n assertEquals(child.getIcon(), \"String_Node_Str\");\n assertEquals(child.getTotals(), 6);\n gModel = model.getGroups().get(6);\n assertEquals(gModel.getName(), \"String_Node_Str\");\n assertEquals(gModel.getGroupId(), \"String_Node_Str\");\n assertEquals(gModel.getIcon(), \"String_Node_Str\");\n assertEquals(gModel.getTotal(), 56);\n assertNotNull(gModel.getResults());\n assertEquals(gModel.getResults().size(), 11);\n refResultModel = gModel.getResults().get(0);\n assertEquals(refResultModel.getName(), \"String_Node_Str\");\n assertEquals(refResultModel.getUrl(), \"String_Node_Str\");\n assertEquals(refResultModel.getIcon(), \"String_Node_Str\");\n assertEquals(refResultModel.getViews(), 34);\n}\n"
|
"private void updateLockedSlots(ItemStack stack) {\n SkinPointer skinPointer = SkinNBTHelper.getSkinPointerFromStack(stack);\n ISkinDye dye = skinPointer.getSkinDye();\n for (int i = 0; i < 8; i++) {\n if (dye.haveDyeInSlot(i)) {\n ModLogger.log(\"String_Node_Str\" + i);\n ((SlotDyeBottle) getSlot(37 + i)).setLocked(true);\n } else {\n ((SlotDyeBottle) getSlot(37 + i)).setLocked(false);\n }\n }\n}\n"
|
"public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n final Ipam that = (Ipam) o;\n return Objects.equals(this.driver, that.driver) && Objects.equals(this.config, that.config);\n}\n"
|
"public void testJoin() throws Exception {\n final String expected = \"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 AsOfJoinRecordSource source = new AsOfJoinRecordSource(compiler.compileSource(\"String_Node_Str\"), 0, compiler.compileSource(\"String_Node_Str\"), 0, new ObjList<CharSequence>() {\n {\n add(\"String_Node_Str\");\n }\n }, 512);\n printer.printCursor(source.prepareCursor(factory));\n TestUtils.assertEquals(expected, sink);\n}\n"
|
"public void onSame(String id) {\n try {\n String transactions = getString(\"String_Node_Str\");\n if (transactions.isEmpty()) {\n downloadTransactions(new Call() {\n public void onDone(JSONObject o) {\n try {\n ListView l = findViewById(R.id.historylisttransactions);\n sortArrayAndPutInList(o.getJSONArray(\"String_Node_Str\"), (ListView) findViewById(R.id.historylisttransactions));\n Handler h = new Handler(instance.getMainLooper());\n h.post(new Runnable() {\n public void run() {\n findViewById(R.id.progressBar).setVisibility(GONE);\n }\n });\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n return;\n }\n final JSONObject p = new JSONObject(transactions);\n JSONArray a = p.getJSONArray(\"String_Node_Str\");\n if (a.length() < 11) {\n downloadTransactions(new Call() {\n public void onDone(final JSONObject o) {\n try {\n sortArrayAndPutInList(o.getJSONArray(\"String_Node_Str\"), (ListView) findViewById(R.id.historylisttransactions));\n Handler h = new Handler(instance.getMainLooper());\n h.post(new Runnable() {\n public void run() {\n findViewById(R.id.progressBar).setVisibility(GONE);\n }\n });\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n } else {\n String currentID = getString(\"String_Node_Str\");\n if (currentID != ((JSONObject) a.get(0)).get(\"String_Node_Str\")) {\n downloadTransactions(new Call() {\n public void onDone(final JSONObject o) {\n try {\n sortArrayAndPutInList(o.getJSONArray(\"String_Node_Str\"), (ListView) findViewById(R.id.historylisttransactions));\n Handler h = new Handler(instance.getMainLooper());\n h.post(new Runnable() {\n public void run() {\n findViewById(R.id.progressBar).setVisibility(GONE);\n }\n });\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n } else {\n sortArrayAndPutInList(p.getJSONArray(\"String_Node_Str\"), (ListView) findViewById(R.id.historylisttransactions));\n Handler h = new Handler(instance.getMainLooper());\n h.post(new Runnable() {\npublic void run() {\n findViewById(R.id.progressBar).setVisibility(GONE);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n}\n"
|
"protected OperationRequestAddress getAddress(CommandContext ctx) throws CommandFormatException {\n final ParsedCommandLine args = ctx.getParsedCommandLine();\n final OperationRequestAddress address;\n if (node.isPresent(args) && node.isValueComplete(args)) {\n address = new DefaultOperationRequestAddress(ctx.getCurrentNodePath());\n CommandLineParser.CallbackHandler handler = new DefaultCallbackHandler(address);\n String nodePath = args.getSubstitutedLine();\n int nodeArgInd = nodePath.indexOf(\"String_Node_Str\");\n if (nodeArgInd < 0) {\n throw new CommandFormatException(\"String_Node_Str\" + nodePath + \"String_Node_Str\");\n }\n int nodeArgEndInd = nodeArgInd + 8;\n do {\n nodeArgEndInd = nodePath.indexOf(' ', nodeArgEndInd);\n if (nodeArgEndInd < 0) {\n nodeArgEndInd = nodePath.length();\n } else if (nodePath.charAt(nodeArgEndInd - 1) == '\\\\') {\n ++nodeArgEndInd;\n } else {\n break;\n }\n } while (nodeArgEndInd < nodePath.length());\n nodePath = nodePath.substring(nodeArgInd + 8, nodeArgEndInd);\n ctx.getCommandLineParser().parse(nodePath, handler);\n } else {\n address = new DefaultOperationRequestAddress(ctx.getCurrentNodePath());\n }\n return address;\n}\n"
|
"public boolean uninit() {\n if (sessions != null && sessions.isEmpty()) {\n for (Map.Entry<String, JireconSession> e : sessions.entrySet()) {\n e.getValue().terminateSession();\n }\n }\n disconnect();\n LibJitsi.stop();\n}\n"
|
"public Schema getSchema() {\n return this.xmlBinder.getSchema();\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.