content
stringlengths
40
137k
"int _getThenIncrementCurrentSharedMemoryAddress(TypedIOPort port) throws IllegalActionException {\n String type = targetType(port.getType());\n int portWidth = port.getWidth();\n int offset = 0;\n if (type.equals(\"String_Node_Str\") || type.equals(\"String_Node_Str\") || type.equals(\"String_Node_Str\") || type.equals(\"String_Node_Str\")) {\n offset = 4 * portWidth;\n } else if (type.equals(\"String_Node_Str\") || type.equals(\"String_Node_Str\")) {\n offset = 8 * portWidth;\n } else if (type.equals(\"String_Node_Str\")) {\n offset = 1 * portWidth;\n } else if (type.equals(\"String_Node_Str\")) {\n offset = 2 * portWidth;\n } else {\n offset = 8 * portWidth;\n }\n int currentSharedMemoryAddress = (nextSharedMemoryAddress + offset - 1) / offset * offset;\n nextSharedMemoryAddress = currentSharedMemoryAddress + offset;\n if (nextSharedMemoryAddress >= 0x40000000) {\n throw new IllegalActionException(\"String_Node_Str\");\n }\n return currentSharedMemoryAddress;\n}\n"
"public static void update(Marker marker, PolygonPoint wp) {\n marker.setPosition(wp.coord);\n marker.setTitle(\"String_Node_Str\");\n marker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));\n}\n"
"public boolean start(ApplicationContext startupContext) throws Exception {\n DeploymentContext dc = (DeploymentContext) startupContext;\n final DeployCommandParameters deployParams = dc.getCommandParameters(DeployCommandParameters.class);\n if (deployParams.origin == OpsParams.Origin.deploy || deployParams.origin == OpsParams.Origin.deploy_instance) {\n resourcesDeployer.deployResources(applicationName, true);\n } else if (deployParams.origin == OpsParams.Origin.load || deployParams.origin == OpsParams.Origin.create_application_ref) {\n asrManager.deployResources(applicationName);\n }\n return true;\n}\n"
"private ClusterLevelNetworkPartitionContext addPartition(ClusterInstance clusterInstance, Cluster cluster, ClusterLevelNetworkPartitionContext clusterLevelNetworkPartitionContext, ChildLevelPartition childLevelPartition) throws PolicyValidationException, PartitionValidationException {\n if (clusterLevelNetworkPartitionContext == null) {\n String msg = \"String_Node_Str\" + deploymentPolicy.getId();\n log.error(msg);\n throw new PolicyValidationException(msg);\n }\n String nPartitionId = clusterLevelNetworkPartitionContext.getId();\n if (clusterInstance.getPartitionId() == null && childLevelPartition == null) {\n String msg = \"String_Node_Str\" + clusterInstance.getPartitionId() + \"String_Node_Str\" + clusterInstance.getNetworkPartitionId() + \"String_Node_Str\" + \"String_Node_Str\" + deploymentPolicy.getId();\n log.error(msg);\n throw new PolicyValidationException(msg);\n }\n ClusterInstanceContext clusterInstanceContext = clusterLevelNetworkPartitionContext.getClusterInstanceContext(clusterInstance.getInstanceId());\n int maxInstances = 2;\n if (clusterInstanceContext == null) {\n int minInstances = 2;\n ApplicationHolder.acquireReadLock();\n try {\n Application application = ApplicationHolder.getApplications().getApplication(cluster.getAppId());\n ClusterDataHolder dataHolder = application.getClusterData(AutoscalerUtil.getAliasFromClusterId(clusterId));\n } finally {\n ApplicationHolder.releaseReadLock();\n }\n clusterInstanceContext = new ClusterInstanceContext(clusterInstance.getInstanceId(), clusterLevelNetworkPartitionContext.getPartitionAlgorithm(), minInstances, maxInstances, nPartitionId);\n }\n String partitionId;\n if (childLevelPartition != null) {\n partitionId = childLevelPartition.getPartitionId();\n maxInstances = childLevelPartition.getMax();\n } else {\n partitionId = clusterInstance.getPartitionId();\n }\n Partition appPartition = deploymentPolicy.getApplicationLevelNetworkPartition(nPartitionId).getPartition(partitionId);\n org.apache.stratos.cloud.controller.stub.domain.Partition partition = convertTOCCPartition(appPartition);\n CloudControllerClient.getInstance().validatePartition(partition);\n ClusterLevelPartitionContext clusterLevelPartitionContext = new ClusterLevelPartitionContext(maxInstances, partition, clusterInstance.getNetworkPartitionId());\n clusterLevelPartitionContext.setServiceName(cluster.getServiceName());\n clusterLevelPartitionContext.setProperties(cluster.getProperties());\n addMembersFromTopology(cluster, partition, clusterLevelPartitionContext);\n clusterInstanceContext.addPartitionCtxt(clusterLevelPartitionContext);\n clusterLevelNetworkPartitionContext.addClusterInstanceContext(clusterInstanceContext);\n if (log.isInfoEnabled()) {\n log.info(String.format(\"String_Node_Str\", clusterLevelPartitionContext.getPartitionId()));\n }\n return clusterLevelNetworkPartitionContext;\n}\n"
"protected void addNodePassthruExceptionConstraints(CGNode node, IR ir) {\n List<ProgramCounter> peis = SSAPropagationCallGraphBuilder.getIncomingPEIs(ir, ir.getExitBlock());\n PointerKey exception = heapModel.getPointerKeyForExceptionalReturnValue(node);\n IClass c = node.getClassHierarchy().lookupClass(TypeReference.JavaLangThrowable);\n addExceptionDefConstraints(ir, node, peis, exception, Collections.singleton(c));\n}\n"
"private final void updateBattery(Intent intent) {\n mBatteryData.iconId = intent.getIntExtra(\"String_Node_Str\", 0);\n mBatteryData.iconLevel = intent.getIntExtra(\"String_Node_Str\", 0);\n mService.updateIcon(mBatteryIcon, mBatteryData, null);\n int plugged = intent.getIntExtra(\"String_Node_Str\", 0);\n int level = intent.getIntExtra(\"String_Node_Str\", -1);\n if (false) {\n Log.d(TAG, \"String_Node_Str\" + level + \"String_Node_Str\" + plugged + \"String_Node_Str\" + mBatteryPlugged + \"String_Node_Str\" + mBatteryLevel + \"String_Node_Str\" + mBatteryThreshold + \"String_Node_Str\" + mBatteryFirst);\n }\n int oldPlugged = mBatteryPlugged;\n int oldThreshold = mBatteryThreshold;\n pickNextBatteryLevel(level);\n mBatteryPlugged = plugged;\n mBatteryLevel = level;\n if (mBatteryFirst) {\n mBatteryFirst = false;\n }\n if (false) {\n Log.d(TAG, \"String_Node_Str\" + plugged + \"String_Node_Str\" + oldPlugged + \"String_Node_Str\" + level + \"String_Node_Str\" + mBatteryThreshold + \"String_Node_Str\" + oldThreshold);\n }\n if (plugged == 0 && ((oldPlugged != 0 && level < mBatteryThresholds[BATTERY_THRESHOLD_WARNING]) || (mBatteryThreshold > oldThreshold && mBatteryThreshold > BATTERY_THRESHOLD_WARNING))) {\n mSentLowBatteryBroadcast = true;\n Intent batIntent = new Intent(Intent.ACTION_BATTERY_LOW);\n batIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);\n mContext.sendBroadcast(batIntent);\n if (SHOW_LOW_BATTERY_WARNING) {\n if (false) {\n Log.d(TAG, \"String_Node_Str\" + mPhoneState + \"String_Node_Str\" + mLowBatteryDialog + \"String_Node_Str\" + mBatteryShowLowOnEndCall);\n }\n if (mPhoneState == TelephonyManager.CALL_STATE_IDLE) {\n showLowBatteryWarning();\n } else {\n mBatteryShowLowOnEndCall = true;\n }\n }\n } else if (mBatteryThreshold < BATTERY_THRESHOLD_WARNING) {\n if (mSentLowBatteryBroadcast == true) {\n mSentLowBatteryBroadcast = false;\n mContext.sendBroadcast(new Intent(Intent.ACTION_BATTERY_OKAY));\n }\n if (SHOW_LOW_BATTERY_WARNING) {\n if (mLowBatteryDialog != null) {\n mLowBatteryDialog.dismiss();\n mBatteryShowLowOnEndCall = false;\n }\n }\n }\n}\n"
"public void schedulJob(ExecutionGraph executionGraph) throws SchedulingException {\n final Map<InstanceType, InstanceTypeDescription> availableInstances = getInstanceManager().getMapOfAvailableInstanceTypes();\n for (int i = 0; i < executionGraph.getNumberOfStages(); i++) {\n final Map<InstanceType, Integer> requiredInstanceTypes = new HashMap<InstanceType, Integer>();\n final ExecutionStage stage = executionGraph.getStage(i);\n stage.collectRequiredInstanceTypes(requiredInstanceTypes, ExecutionState.CREATED);\n final Iterator<Map.Entry<InstanceType, Integer>> it = requiredInstanceTypes.entrySet().iterator();\n while (it.hasNext()) {\n final Map.Entry<InstanceType, Integer> entry = it.next();\n final InstanceTypeDescription descr = availableInstances.get(entry.getKey());\n if (descr == null) {\n throw new SchedulingException(\"String_Node_Str\" + entry.getKey() + \"String_Node_Str\");\n }\n if (descr.getMaximumNumberOfAvailableInstances() != -1 && descr.getMaximumNumberOfAvailableInstances() < entry.getValue().intValue()) {\n throw new SchedulingException(\"String_Node_Str\" + entry.getValue().intValue() + \"String_Node_Str\" + entry.getKey() + \"String_Node_Str\" + descr.getMaximumNumberOfAvailableInstances() + \"String_Node_Str\");\n }\n }\n }\n executionGraph.registerJobStatusListener(this);\n final ExecutionGraphIterator it2 = new ExecutionGraphIterator(executionGraph, true);\n while (it2.hasNext()) {\n final ExecutionVertex vertex = it2.next();\n if (vertex.getExecutionState() != ExecutionState.CREATED) {\n LOG.error(\"String_Node_Str\" + vertex + \"String_Node_Str\" + vertex.getExecutionState() + \"String_Node_Str\" + ExecutionState.CREATED);\n }\n vertex.getEnvironment().registerExecutionListener(new LocalExecutionListener(this, vertex));\n vertex.setExecutionState(ExecutionState.SCHEDULED);\n }\n executionGraph.registerExecutionStageListener(this);\n synchronized (this.jobQueue) {\n this.jobQueue.add(executionGraph);\n final ExecutionStage executionStage = executionGraph.getCurrentExecutionStage();\n try {\n requestInstances(executionStage);\n } catch (InstanceException e) {\n LOG.error(StringUtils.stringifyException(e));\n }\n }\n}\n"
"public void run() {\n File groupFolder = groupsDir;\n if (!groupFolder.exists()) {\n groupFolder.mkdir();\n }\n File[] groupFiles = groupFolder.listFiles();\n if (groupFiles == null || groupFiles.length == 0) {\n groups.clear();\n return;\n }\n groups.clear();\n int numGroups = 0;\n for (File group : groupFiles) {\n String data = FileUtils.readFromSD(group);\n if (!data.equalsIgnoreCase(\"String_Node_Str\")) {\n String[] groupData = data.split(\"String_Node_Str\");\n String name = groupData[0];\n ArrayList<String> users = new ArrayList<>(Arrays.asList(groupData));\n users.remove(0);\n Group currentGroup = new Group(name, users);\n if (numGroups == 3 && Preferences.getLicence() == 0) {\n NotificationUtils.showMessage(\"String_Node_Str\", Color.RED, NotificationUtils.LENGTH_SHORT, HookMethods.classLoader);\n return;\n }\n if (Preferences.getLicence() != 0 && !Preferences.getBool(Preferences.Prefs.UNLIM_GROUPS) && numGroups > 3) {\n NotificationUtils.showMessage(\"String_Node_Str\", Color.RED, NotificationUtils.LENGTH_SHORT, HookMethods.classLoader);\n return;\n }\n if (!groups.add(currentGroup))\n numGroups++;\n }\n }\n }\n Collections.sort(groups, new Groups.groupComparator());\n}\n"
"public void handleSelection(ControlSelectionEvent event) {\n handleValidatedValue(event);\n notifyValidValueSet(event.getControlDescriptor(), event.getSelectionData());\n}\n"
"public void componentResized(ComponentEvent e) {\n adjustSize();\n}\n"
"private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {\n accepted = false;\n setVisible(false);\n}\n"
"protected void onHandleIntent(Intent i) {\n Log.i(TAG, \"String_Node_Str\");\n if (i.hasExtra(PERIODIC_BACKGROUND_PROCESSING_REQUEST)) {\n processTasks();\n } else if (i.hasExtra(UI_REQUEST)) {\n String uiRequest = i.getStringExtra(UI_REQUEST);\n TaskController taskController = new TaskController();\n if (uiRequest.equals(UI_REQUEST_SEND_MESSAGE)) {\n Log.i(TAG, \"String_Node_Str\");\n Bundle extras = i.getExtras();\n long messageID = extras.getLong(MESSAGE_ID);\n Message messageToSend = null;\n try {\n MessageProvider msgProv = MessageProvider.get(getApplicationContext());\n messageToSend = msgProv.searchForSingleRecord(messageID);\n } catch (RuntimeException e) {\n Log.i(TAG, \"String_Node_Str\" + UI_REQUEST_SEND_MESSAGE + \"String_Node_Str\" + \"String_Node_Str\");\n return;\n }\n QueueRecordProcessor queueProc = new QueueRecordProcessor();\n QueueRecord queueRecord = queueProc.createAndSaveQueueRecord(TASK_SEND_MESSAGE, 0, 0, messageToSend, null);\n long currentTime = System.currentTimeMillis() / 1000;\n queueProc.createAndSaveQueueRecord(TASK_SEND_MESSAGE, currentTime + FIRST_ATTEMPT_TTL, 1, messageToSend, null);\n if (NetworkHelper.checkInternetAvailability() == true) {\n taskController.sendMessage(queueRecord, messageToSend, DO_POW, FIRST_ATTEMPT_TTL, FIRST_ATTEMPT_TTL);\n }\n } else if (uiRequest.equals(UI_REQUEST_CREATE_IDENTITY)) {\n Log.i(TAG, \"String_Node_Str\");\n Bundle extras = i.getExtras();\n long addressId = extras.getLong(ADDRESS_ID);\n Address address = null;\n try {\n AddressProvider addProv = AddressProvider.get(getApplicationContext());\n address = addProv.searchForSingleRecord(addressId);\n } catch (RuntimeException e) {\n Log.i(TAG, \"String_Node_Str\" + UI_REQUEST_CREATE_IDENTITY + \"String_Node_Str\" + \"String_Node_Str\");\n return;\n }\n QueueRecordProcessor queueProc = new QueueRecordProcessor();\n QueueRecord queueRecord = queueProc.createAndSaveQueueRecord(TASK_CREATE_IDENTITY, 0, 0, address, null);\n taskController.createIdentity(queueRecord, DO_POW);\n }\n } else {\n Log.e(TAG, \"String_Node_Str\");\n }\n Intent intent = new Intent(getApplicationContext(), BackgroundService.class);\n intent.putExtra(BackgroundService.PERIODIC_BACKGROUND_PROCESSING_REQUEST, BackgroundService.BACKGROUND_PROCESSING_REQUEST);\n PendingIntent pendingIntent = PendingIntent.getService(getApplicationContext(), 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);\n Calendar cal = Calendar.getInstance();\n cal.add(Calendar.SECOND, BACKGROUND_SERVICE_NORMAL_START_INTERVAL);\n Log.i(TAG, \"String_Node_Str\" + BACKGROUND_SERVICE_NORMAL_START_INTERVAL + \"String_Node_Str\");\n AlarmManager am = (AlarmManager) getApplicationContext().getSystemService(Context.ALARM_SERVICE);\n am.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), pendingIntent);\n}\n"
"public void scheduleTask() {\n if (status != PetState.Despawned && getOwner().isOnline()) {\n if (skills.getSkills().size() > 0) {\n for (MyPetGenericSkill skill : skills.getSkills()) {\n skill.schedule();\n }\n }\n if (status == PetState.Dead) {\n respawnTime--;\n if (respawnTime <= 0) {\n respawnPet();\n }\n }\n if (MyPetConfig.hungerSystem && hunger > 1 && --hungerTime <= 0) {\n hunger--;\n hungerTime = MyPetConfig.hungerSystemTime;\n }\n }\n}\n"
"private void updateCaptures(int index, long cycles) {\n int low = 0;\n int hi = noCompare;\n if (index != -1) {\n low = index;\n hi = index + 1;\n }\n for (int i = 0, n = hi; i < n; i++) {\n int divisor = 1;\n int frqClk = 1;\n if (clockSource == SRC_SMCLK) {\n frqClk = core.smclkFrq / inputDivider;\n } else if (clockSource == SRC_ACLK) {\n frqClk = core.aclkFrq / inputDivider;\n }\n if (captureOn[i]) {\n if (inputSrc[i] == SRC_ACLK) {\n divisor = core.aclkFrq;\n }\n if (DEBUG) {\n System.out.println(getName() + \"String_Node_Str\" + i + \"String_Node_Str\" + frqClk + \"String_Node_Str\" + divisor);\n }\n expCapInterval[i] = frqClk / divisor;\n expCompare[i] = (counter + expCapInterval[i]) & 0xffff;\n expCaptureTime[i] = cycles + (long) (expCapInterval[i] * cyclesMultiplicator);\n if (DEBUG) {\n System.out.println(getName() + \"String_Node_Str\" + i + \"String_Node_Str\" + expCompare[i]);\n System.out.println(getName() + \"String_Node_Str\" + expCaptureTime[i]);\n System.out.println(\"String_Node_Str\" + captureOn[i]);\n }\n }\n }\n}\n"
"private void doDownloadFile(UserRequest ureq) {\n VFSContainer container = getFileContainer();\n VFSItem item = container.resolve(checkbox.getFilename());\n if (item instanceof VFSLeaf) {\n VFSMediaResource rsrc = new VFSMediaResource((VFSLeaf) item);\n rsrc.setDownloadable(true);\n ureq.getDispatchResult().setResultingMediaResource(rsrc);\n }\n}\n"
"public byte[] toBinary() throws IOException {\n SharedStreetsProto.SharedStreetsIntersection.Builder intersection = SharedStreetsProto.SharedStreetsIntersection.newBuilder();\n intersection.setId(this.getId());\n intersection.setNodeId(this.osmNodeId);\n intersection.setLon((float) this.point.getX());\n intersection.setLat((float) this.point.getY());\n for (UniqueId inboundId : this.inboundSegmentIds) {\n intersection.addInboundReferenceIds(inboundId.toString());\n }\n for (UniqueId outboundId : this.outboundSegmentIds) {\n intersection.addOutboundReferenceIds(outboundId.toString());\n }\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n intersection.build().writeDelimitedTo(bytes);\n return bytes.toByteArray();\n}\n"
"public static void main(String[] args) throws Exception {\n Logging.setLoggingDefaults(Level.WARN);\n CommandLineParser parser = new PosixParser();\n Options options = createCommandLineOptions();\n String deviceType = null;\n String port = null;\n Map<String, String> configuration = newHashMap();\n DeviceMacReferenceMap deviceMacReferenceMap = null;\n boolean use16BitMode = true;\n try {\n CommandLine line = parser.parse(options, args, true);\n if (line.hasOption('h')) {\n printUsageAndExit(DeviceMacReaderCLI.class, options, 0);\n }\n if (line.hasOption('v')) {\n org.apache.log4j.Logger.getRootLogger().setLevel(Level.DEBUG);\n }\n if (line.hasOption('l')) {\n Level level = Level.toLevel(line.getOptionValue('l'));\n org.apache.log4j.Logger.getRootLogger().setLevel(level);\n }\n if (line.hasOption('c')) {\n final String configurationFileString = line.getOptionValue('c');\n final File configurationFile = new File(configurationFileString);\n final Properties configurationProperties = new Properties();\n configurationProperties.load(new FileReader(configurationFile));\n for (Map.Entry<Object, Object> entry : configurationProperties.entrySet()) {\n configuration.put((String) entry.getKey(), (String) entry.getValue());\n }\n }\n if (line.hasOption('r')) {\n deviceMacReferenceMap = readDeviceMacReferenceMap(line.getOptionValue('r'));\n }\n assertParametersPresent(line, 't', 'p');\n deviceType = line.getOptionValue('t');\n port = line.getOptionValue('p');\n use16BitMode = !line.hasOption('x');\n } catch (Exception e) {\n log.error(\"String_Node_Str\" + e);\n printUsageAndExit(DeviceMacReaderCLI.class, options, EXIT_CODE_INVALID_ARGUMENTS);\n }\n ExecutorService executorService = Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat(\"String_Node_Str\").build());\n final Injector injector = Guice.createInjector(new DeviceFactoryModule(), new DeviceMacReaderModule(executorService, deviceMacReferenceMap, use16BitMode));\n final DeviceMacReader deviceMacReader = injector.getInstance(DeviceMacReader.class);\n String reference = null;\n if (deviceMacReferenceMap != null) {\n final DeviceObserver deviceObserver = injector.getInstance(DeviceObserver.class);\n final ImmutableList<DeviceEvent> events = deviceObserver.getEvents(null);\n for (DeviceEvent event : events) {\n final boolean samePort = port.equals(event.getDeviceInfo().getPort());\n if (samePort) {\n reference = event.getDeviceInfo().getReference();\n }\n }\n }\n try {\n final MacAddress macAddress = deviceMacReader.readMac(port, deviceType, configuration, reference);\n log.info(\"String_Node_Str\", new Object[] { deviceType, port, macAddress });\n System.out.println(macAddress.toHexString());\n System.exit(0);\n } catch (Exception e) {\n log.error(\"String_Node_Str\" + e, e);\n System.exit(1);\n }\n}\n"
"public boolean execute(ICommandSender sender, String[] args) throws Exception {\n if (args.length < 2 && args.length >= 3) {\n throw new BadUsageException(getUsage());\n }\n if (args[1].length() > 16 || !validUserPattern.matcher(args[1]).matches()) {\n throw new IllegalArgumentException(C(\"String_Node_Str\"));\n }\n if (\"String_Node_Str\".equals(args[1]) && plugin.getConfig().getBoolean(\"String_Node_Str\")) {\n sender.sendMessage(\"String_Node_Str\");\n return true;\n }\n IPlayer player = (IPlayer) sender;\n if (player.hasPermission(PermissionNames.ADMIN_ADD) || player.hasPermission(PermissionNames.USER_ADD)) {\n IWorld world = player.getWorld();\n if (manager.isPlotWorld(player)) {\n PlotMapInfo pmi = manager.getMap(world);\n Plot plot = manager.getPlot(player);\n if (plot != null) {\n IOfflinePlayer allowed = resolvePlayerByName(args[1]);\n if (player.getUniqueId().equals(plot.getOwnerId()) || player.hasPermission(PermissionNames.ADMIN_ADD)) {\n if (plot.isAllowedConsulting(allowed.getUniqueId())) {\n player.sendMessage(C(\"String_Node_Str\") + \"String_Node_Str\" + allowed + \"String_Node_Str\" + C(\"String_Node_Str\"));\n } else {\n PlotAddAllowedEvent event = new PlotAddAllowedEvent(world, plot, player, allowed);\n serverBridge.getEventBus().post(event);\n double price = 0.0;\n if (manager.isEconomyEnabled(pmi)) {\n price = pmi.getAddPlayerPrice();\n if (serverBridge.has(player, pmi.getAddPlayerPrice())) {\n player.sendMessage(\"String_Node_Str\" + serverBridge.getEconomy().get().format(price) + \"String_Node_Str\" + \"String_Node_Str\");\n return true;\n } else if (!event.isCancelled()) {\n EconomyResponse er = serverBridge.withdrawPlayer(player, price);\n if (!er.transactionSuccess()) {\n player.sendMessage(er.errorMessage);\n serverBridge.getLogger().warning(er.errorMessage);\n return true;\n }\n }\n }\n if (!event.isCancelled()) {\n IPlayer allowed2 = plugin.getServerBridge().getPlayer(allowed);\n if (allowed2 != null) {\n plot.addAllowed(allowed2.getUniqueId().toString());\n plot.removeDenied(allowed2.getUniqueId().toString());\n } else {\n plot.addAllowed(allowed);\n plot.removeDenied(allowed);\n }\n player.sendMessage(C(\"String_Node_Str\") + \"String_Node_Str\" + allowed + \"String_Node_Str\" + C(\"String_Node_Str\"));\n if (isAdvancedLogging()) {\n if (price == 0) {\n serverBridge.getLogger().info(player.getName() + \"String_Node_Str\" + C(\"String_Node_Str\") + \"String_Node_Str\" + allowed + \"String_Node_Str\" + C(\"String_Node_Str\") + \"String_Node_Str\" + plot.getId());\n } else {\n serverBridge.getLogger().info(player.getName() + \"String_Node_Str\" + C(\"String_Node_Str\") + \"String_Node_Str\" + allowed + \"String_Node_Str\" + C(\"String_Node_Str\") + \"String_Node_Str\" + plot.getId() + (\"String_Node_Str\" + C(\"String_Node_Str\") + \"String_Node_Str\" + price));\n }\n }\n }\n }\n } else {\n player.sendMessage(C(\"String_Node_Str\") + \"String_Node_Str\" + plot.getId() + \"String_Node_Str\" + C(\"String_Node_Str\"));\n }\n } else {\n player.sendMessage(C(\"String_Node_Str\") + \"String_Node_Str\" + plot.getId() + \"String_Node_Str\" + C(\"String_Node_Str\"));\n }\n } else {\n player.sendMessage(C(\"String_Node_Str\"));\n return true;\n }\n } else {\n return false;\n }\n return true;\n}\n"
"public void onViewCreated(View view, Bundle savedInstanceState) {\n Uri uri = getArguments().getParcelable(EXTRA_URI);\n GLSImporter importer = new GLSImporter();\n importer.totalObservable().subscribe(total -> {\n if (getActivity() != null)\n getActivity().runOnUiThread(() -> {\n totalText.setText(String.valueOf(total));\n progressBar.setMax(total);\n });\n });\n importer.progressObservable().subscribe(progress -> {\n if (getActivity() != null)\n getActivity().runOnUiThread(() -> {\n counterText.setText(String.valueOf(progress));\n progressBar.setProgress(progress);\n if (curAction == ACTION_EXTRACTING_AUDIO && progressBar.getMax() == progress) {\n loadLanguageListFragment();\n }\n });\n });\n importer.fileNameSubject().subscribe(filename -> {\n if (getActivity() != null)\n getActivity().runOnUiThread(() -> {\n fileNameText.setVisibility(View.VISIBLE);\n fileNameText.setText(filename);\n });\n });\n importer.actionSubject().subscribe(actionId -> {\n if (getActivity() != null)\n getActivity().runOnUiThread(() -> {\n curAction = actionId;\n switch(actionId) {\n case ACTION_OPENING_FILE:\n openFile();\n break;\n case ACTION_COUNTING_SENTENCES:\n countSentences();\n break;\n case ACTION_READING_SENTENCES:\n readSentences();\n break;\n case ACTION_EXTRACTING_TEXT:\n extractText();\n break;\n case ACTION_EXTRACTING_AUDIO:\n extractAudio();\n break;\n case ACTION_EXIT:\n loadLanguageListFragment();\n break;\n }\n });\n });\n importer.importPack(getContext(), uri);\n}\n"
"public String getTicketValue() {\n return (ticket == null) ? \"String_Node_Str\" : ticket.getTicketValue();\n}\n"
"private void writeFile(String contents, String filePath) {\n try {\n fos = new FileOutputStream(filePath, false);\n fos.write(contents.getBytes());\n fos.close();\n } catch (IOException ioe) {\n Ajde.getDefault().getErrorHandler().handleError(\"String_Node_Str\" + filePath, ioe);\n }\n}\n"
"public void getComponent(Composite parent) {\n init();\n cmpContent = new Composite(parent, SWT.NONE);\n {\n GridLayout glContent = new GridLayout(2, false);\n cmpContent.setLayout(glContent);\n GridData gd = new GridData(GridData.FILL_BOTH);\n cmpContent.setLayoutData(gd);\n }\n Composite cmpBasic = new Composite(cmpContent, SWT.NONE);\n {\n cmpBasic.setLayout(new GridLayout(3, false));\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n cmpBasic.setLayoutData(gd);\n }\n new Label(cmpBasic, SWT.NONE).setText(Messages.getString(\"String_Node_Str\"));\n List keys = null;\n if (getContext().getUIServiceProvider() != null) {\n keys = getContext().getUIServiceProvider().getRegisteredKeys();\n }\n txtTitle = new ExternalizedTextEditorComposite(cmpBasic, SWT.BORDER, -1, -1, keys, getContext().getUIServiceProvider(), getChart().getLegend().getTitle().getCaption().getValue());\n {\n GridData gd = new GridData();\n gd.widthHint = 200;\n txtTitle.setLayoutData(gd);\n txtTitle.addListener(this);\n txtTitle.setEnabled(getChart().getLegend().getTitle().isVisible());\n }\n btnTitleVisible = new Button(cmpBasic, SWT.CHECK);\n {\n btnTitleVisible.setText(Messages.getString(\"String_Node_Str\"));\n btnTitleVisible.addSelectionListener(this);\n btnTitleVisible.setSelection(getChart().getLegend().getTitle().isVisible());\n }\n new Label(cmpBasic, SWT.NONE).setText(Messages.getString(\"String_Node_Str\"));\n cmbBackgroundColor = new FillChooserComposite(cmpBasic, SWT.DROP_DOWN | SWT.READ_ONLY, getChart().getLegend().getClientArea().getBackground(), true, true);\n {\n GridData gridData = new GridData();\n gridData.widthHint = 200;\n gridData.horizontalSpan = 2;\n cmbBackgroundColor.setLayoutData(gridData);\n cmbBackgroundColor.addListener(this);\n }\n if (getChart().getLegend().getItemType() == LegendItemType.SERIES_LITERAL) {\n new Label(cmpBasic, SWT.NONE).setText(Messages.getString(\"String_Node_Str\"));\n btnShowValue = new Button(cmpBasic, SWT.CHECK);\n {\n GridData gridData = new GridData();\n gridData.horizontalSpan = 2;\n btnShowValue.setLayoutData(gridData);\n btnShowValue.setText(Messages.getString(\"String_Node_Str\"));\n btnShowValue.setToolTipText(Messages.getString(\"String_Node_Str\"));\n btnShowValue.addSelectionListener(this);\n btnShowValue.setSelection(getChart().getLegend().isShowValue());\n }\n }\n createButtonGroup(cmpContent);\n}\n"
"public void populateInputs(String line, boolean lenient) throws CommandLineParserException {\n CommandLine commandLine = getParser().parse(line, lenient);\n this.commandLineUtil.populateUIInputs(commandLine, inputs);\n}\n"
"public List<WorkflowModel> findAllWorkflowModels(String pWorkspaceId) {\n TypedQuery<WorkflowModel> query = em.createQuery(\"String_Node_Str\", WorkflowModel.class);\n return query.setParameter(\"String_Node_Str\", pWorkspaceId).getResultList();\n}\n"
"private static void functionString(ASTNode root, StringBuilder buf) {\n if (findNodeByPath(root, KW_CASE) != null) {\n buf.append(\"String_Node_Str\");\n toInfixString((ASTNode) root.getChild(1), buf);\n ArrayList<Node> caseChildren = root.getChildren();\n int from = 2;\n int nchildren = caseChildren.size();\n int to = nchildren % 2 == 1 ? nchildren - 1 : nchildren;\n for (int i = from; i < to; i += 2) {\n buf.append(\"String_Node_Str\");\n toInfixString((ASTNode) caseChildren.get(i), buf);\n buf.append(\"String_Node_Str\");\n toInfixString((ASTNode) caseChildren.get(i + 1), buf);\n }\n if (nchildren % 2 == 1) {\n buf.append(\"String_Node_Str\");\n toInfixString((ASTNode) caseChildren.get(nchildren - 1), buf);\n }\n buf.append(\"String_Node_Str\");\n } else if (findNodeByPath(root, KW_WHEN) != null) {\n buf.append(\"String_Node_Str\");\n ArrayList<Node> caseChildren = root.getChildren();\n int from = 1;\n int nchildren = caseChildren.size();\n int to = nchildren % 2 == 1 ? nchildren : nchildren - 1;\n for (int i = from; i < to; i += 2) {\n buf.append(\"String_Node_Str\");\n toInfixString((ASTNode) caseChildren.get(i), buf);\n buf.append(\"String_Node_Str\");\n toInfixString((ASTNode) caseChildren.get(i + 1), buf);\n }\n if (nchildren % 2 == 0) {\n buf.append(\"String_Node_Str\");\n toInfixString((ASTNode) caseChildren.get(nchildren - 1), buf);\n }\n buf.append(\"String_Node_Str\");\n } else if (findNodeByPath(root, TOK_ISNULL) != null) {\n toInfixString((ASTNode) root.getChild(1), buf);\n buf.append(\"String_Node_Str\");\n } else if (findNodeByPath(root, TOK_ISNOTNULL) != null) {\n toInfixString((ASTNode) root.getChild(1), buf);\n buf.append(\"String_Node_Str\");\n } else if (((ASTNode) root.getChild(0)).getToken().getType() == Identifier && ((ASTNode) root.getChild(0)).getToken().getText().equalsIgnoreCase(\"String_Node_Str\")) {\n ASTNode tokTrue = findNodeByPath(root, KW_TRUE);\n ASTNode tokFalse = findNodeByPath(root, KW_FALSE);\n if (tokTrue != null) {\n toInfixString((ASTNode) root.getChild(2), buf);\n buf.append(\"String_Node_Str\");\n toInfixString((ASTNode) root.getChild(3), buf);\n buf.append(\"String_Node_Str\");\n toInfixString((ASTNode) root.getChild(4), buf);\n } else if (tokFalse != null) {\n toInfixString((ASTNode) root.getChild(2), buf);\n buf.append(\"String_Node_Str\");\n toInfixString((ASTNode) root.getChild(3), buf);\n buf.append(\"String_Node_Str\");\n toInfixString((ASTNode) root.getChild(4), buf);\n }\n } else if (findNodeByPath(root, KW_IN) != null) {\n toInfixString((ASTNode) root.getChild(1), buf);\n ASTNode rootParent = (ASTNode) root.getParent();\n if (rootParent != null && rootParent.getToken().getType() == KW_NOT) {\n buf.append(\"String_Node_Str\");\n }\n buf.append(\"String_Node_Str\");\n for (int i = 2; i < root.getChildCount(); i++) {\n toInfixString((ASTNode) root.getChild(i), buf);\n if (i < root.getChildCount() - 1) {\n buf.append(\"String_Node_Str\");\n }\n }\n buf.append(\"String_Node_Str\");\n } else {\n int rootType = ((ASTNode) root.getChild(0)).getToken().getType();\n if (PRIMITIVE_TYPES.contains(rootType)) {\n buf.append(\"String_Node_Str\");\n toInfixString((ASTNode) root.getChild(1), buf);\n buf.append(\"String_Node_Str\");\n toInfixString((ASTNode) root.getChild(0), buf);\n buf.append(\"String_Node_Str\");\n } else {\n String fname = ((ASTNode) root.getChild(0)).getText();\n buf.append(fname.toLowerCase()).append(\"String_Node_Str\");\n for (int i = 1; i < root.getChildCount(); i++) {\n toInfixString((ASTNode) root.getChild(i), buf);\n if (i != root.getChildCount() - 1) {\n buf.append(\"String_Node_Str\");\n }\n }\n }\n buf.append(\"String_Node_Str\");\n }\n}\n"
"public LoopBound dfaLoopBound(BasicBlock headOfLoopBlock, ExecutionContext eCtx, LoopBound annotatedBound) {\n LoopBounds lbAnalysis = project.getDfaLoopBounds();\n if (lbAnalysis == null)\n return annotatedBound;\n MethodInfo methodInfo = headOfLoopBlock.getMethodInfo();\n int dfaUpperBound;\n try {\n dfaUpperBound = lbAnalysis.getBound(headOfLoopBlock.getLastInstruction(), eCtx.getCallString());\n } catch (NullPointerException ex) {\n logger.error(\"String_Node_Str\", ex);\n dfaUpperBound = -1;\n }\n if (dfaUpperBound < 0) {\n if (!printedLoopBoundInfoMessage.contains(headOfLoopBlock)) {\n logger.info(\"String_Node_Str\" + methodInfo + \"String_Node_Str\" + headOfLoopBlock + \"String_Node_Str\" + annotatedBound);\n printedLoopBoundInfoMessage.add(headOfLoopBlock);\n }\n return annotatedBound;\n }\n LoopBound loopBound;\n if (annotatedBound == null) {\n loopBound = LoopBound.boundedAbove(dfaUpperBound);\n logger.debug(\"String_Node_Str\" + methodInfo + \"String_Node_Str\");\n } else {\n loopBound = annotatedBound.clone();\n loopBound.addBound(LoopBoundExpr.numUpperBound(dfaUpperBound), SymbolicMarker.LOOP_ENTRY);\n long loopUb = annotatedBound.getSimpleLoopBound().upperBound(eCtx);\n if (dfaUpperBound < loopUb) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\" + dfaUpperBound + \"String_Node_Str\" + loopUb + \"String_Node_Str\" + methodInfo + \"String_Node_Str\" + headOfLoopBlock);\n }\n } else if (dfaUpperBound > loopUb) {\n logger.warn(\"String_Node_Str\" + dfaUpperBound + \"String_Node_Str\" + loopUb + \"String_Node_Str\" + methodInfo);\n } else {\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\" + methodInfo);\n }\n }\n }\n if (!printedLoopBoundInfoMessage.contains(headOfLoopBlock)) {\n logger.info(\"String_Node_Str\" + methodInfo + \"String_Node_Str\" + headOfLoopBlock + \"String_Node_Str\" + loopBound + \"String_Node_Str\" + annotatedBound);\n printedLoopBoundInfoMessage.add(headOfLoopBlock);\n }\n return loopBound;\n}\n"
"private static boolean containsCalculatedMember(Member[] members) {\n for (int i = 0; i < members.length; i++) {\n if (members[i].isCalculated()) {\n return true;\n }\n }\n return false;\n}\n"
"protected String getLoginURL() throws XPathExpressionException {\n return UrlGenerationUtil.getLoginURL(publisherContext.getInstance());\n}\n"
"public URI fromString(String header) {\n try {\n return new URI(header);\n } catch (URISyntaxException e) {\n throw new IllegalArgumentException(\"String_Node_Str\" + header + \"String_Node_Str\", e);\n }\n}\n"
"public void testPreLaunchAsyncWithDebugUserAborts() throws Exception {\n ILaunchConfiguration configuration = mock(ILaunchConfiguration.class);\n String mode = ILaunchManager.RUN_MODE;\n IProgressMonitor monitor = mock(IProgressMonitor.class);\n RunTestsView runTestsView = mock(RunTestsView.class);\n IProject project = mock(IProject.class);\n Display display = mock(Display.class);\n when(mockedDelegate.preLaunchCheck(configuration, mode, monitor)).thenCallRealMethod();\n doNothing().when(mockedDelegate).checkMode(mode);\n when(mockedDelegate.getRunTestView()).thenReturn(runTestsView);\n when(runTestsView.canRun()).thenReturn(true);\n when(mockedDelegate.materializeForceProject(configuration)).thenReturn(project);\n when(mockedDelegate.getTestMode(configuration)).thenReturn(true);\n when(mockedDelegate.isProjectDebugging(project)).thenReturn(true);\n when(runTestsView.confirmAsyncTestRunWhileDebugging()).thenReturn(false);\n when(mockedDelegate.getDisplay()).thenReturn(display);\n doNothing().when(display).asyncExec(any(Runnable.class));\n boolean prelaunchResult = mockedDelegate.preLaunchCheck(configuration, mode, monitor);\n verify(mockedDelegate, times(1)).checkMode(mode);\n verify(mockedDelegate, times(1)).getRunTestView();\n verify(mockedDelegate, times(1)).materializeForceProject(configuration);\n verify(mockedDelegate, times(1)).getTestMode(configuration);\n verify(mockedDelegate, times(1)).isProjectDebugging(project);\n verify(runTestsView, times(1)).confirmAsyncTestRunWhileDebugging();\n verify(mockedDelegate, times(1)).getDisplay();\n verify(display, times(1)).asyncExec(any(Runnable.class));\n assertFalse(prelaunchResult);\n}\n"
"private void updateVertices() {\n clearVertices();\n final int bandPower = 6;\n final int bandPoints = (int) Math.pow(2, bandPower);\n final int bandMask = bandPoints - 2;\n final int sectionsInBand = (bandPoints / 2) - 1;\n final int totalPoints = sectionsInBand * bandPoints;\n final float sectionArc = 6.28f / sectionsInBand;\n final float diameter = -(2 * this.radius);\n float xAngle;\n float yAngle;\n for (int i = 0; i < totalPoints; i++) {\n xAngle = (float) (i & 1) + (i >> bandPower);\n yAngle = (float) ((i & bandMask) >> 1) + ((i >> bandPower) * sectionsInBand);\n xAngle *= sectionArc / 2f;\n yAngle *= sectionArc * -1;\n float x = (float) (radius * Math.sin(xAngle) * Math.sin(yAngle));\n float y = (float) (radius * Math.cos(xAngle));\n float z = (float) (radius * Math.sin(xAngle) * Math.cos(yAngle));\n addVertex(new Vector3(x, y, z));\n }\n}\n"
"public boolean handle(Object receive) throws Exception {\n if (receive instanceof HttpResponse) {\n HttpResponse response = (HttpResponse) receive;\n if (NettyUtil.isSuccessful(response.getStatus())) {\n Location location = to(response);\n if (location != null) {\n copied.setLocation(location);\n handler.handle(RestRiakOperations.this.support.newResponse(copied));\n return true;\n }\n }\n }\n return false;\n}\n"
"public void run(HttpResponse<JsonNode> response) {\n try {\n JSONObject respObject = response.getBody().getObject();\n if (respObject.has(\"String_Node_Str\") && respObject.getString(\"String_Node_Str\").equals(THING_TYPE_ACCOUNT)) {\n Topic account = parseAccount(respObject, thingTypes, tm);\n associateAccount(tm, comment, account, thingTypes);\n }\n } catch (JSONException | TopicMapException e) {\n log(e.getMessage());\n }\n}\n"
"public void onCreate(Bundle savedInstanceState) {\n if (enableLog)\n Log.d(TAG, \"String_Node_Str\");\n super.onCreate(savedInstanceState);\n setContentView(R.layout.punch_pair_editor);\n Spinner taskSpinnerIn = (Spinner) findViewById(R.id.taskSpinnerIn);\n Spinner taskSpinnerOut = (Spinner) findViewById(R.id.taskSpinnerOut);\n if (savedInstanceState != null) {\n jobID = savedInstanceState.getLong(\"String_Node_Str\");\n date = new DateTime(savedInstanceState.getLong(\"String_Node_Str\"));\n } else {\n jobID = getIntent().getExtras().getLong(\"String_Node_Str\");\n date = new DateTime(getIntent().getExtras().getLong(\"String_Node_Str\"));\n }\n Chronos chron = new Chronos(this);\n tasks = chron.getAllTasks();\n ArrayAdapter spinnerAdapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item, tasks);\n spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n taskSpinnerIn.setAdapter(spinnerAdapter);\n taskSpinnerOut.setAdapter(spinnerAdapter);\n boolean twentyFourHourTime = DateFormat.is24HourFormat(this);\n TimePicker inTime = (TimePicker) findViewById(R.id.TimePicker1);\n inTime.setIs24HourView(twentyFourHourTime);\n TimePicker outTime = (TimePicker) findViewById(R.id.TimePicker2);\n outTime.setIs24HourView(twentyFourHourTime);\n DateTime now = new DateTime();\n Log.d(TAG, \"String_Node_Str\" + now.getHourOfDay());\n Log.d(TAG, \"String_Node_Str\" + now.getMinuteOfHour());\n inTime.setCurrentHour(now.getHourOfDay());\n inTime.setCurrentMinute(now.getMinuteOfHour());\n taskSpinnerIn.setSelection(0);\n findViewById(R.id.outLayout).setVisibility(View.GONE);\n chron.close();\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n BitmapDrawable bg = (BitmapDrawable) getResources().getDrawable(R.drawable.bg_striped);\n bg.setTileModeXY(Shader.TileMode.REPEAT, Shader.TileMode.REPEAT);\n getSupportActionBar().setBackgroundDrawable(bg);\n BitmapDrawable bgSplit = (BitmapDrawable) getResources().getDrawable(R.drawable.bg_striped_split_img);\n bgSplit.setTileModeXY(Shader.TileMode.REPEAT, Shader.TileMode.REPEAT);\n getSupportActionBar().setSplitBackgroundDrawable(bgSplit);\n }\n}\n"
"protected RestResult handleRequest(RestRequest restRequest) {\n RestResult result = null;\n if (restRequest != null) {\n RestOperation operation = restRequest.getOperation();\n Filter filter = restRequest.getFilter();\n Object item = restRequest.getContent();\n Uri uri = filter.buildUri(contentScheme, authority);\n if (Utils.notEmpty(uri)) {\n if (operation == RestOperation.GET && !delegatedRequests.contains(restRequest)) {\n result = delegate(operation, uri, item);\n delegatedRequests.add(restRequest);\n super.enqueue(restRequest);\n } else {\n delegatedRequests.remove(restRequest);\n result = super.handleRequest(restRequest);\n if (result.isSuccess() && operation != RestOperation.AUTHORIZE) {\n if (operation == RestOperation.GET) {\n result = delegate(RestOperation.POST, uri, result.item());\n } else {\n result = delegate(operation, uri, item);\n }\n }\n if (result.isSuccess() && operation != RestOperation.AUTHORIZE) {\n result = delegate(RestOperation.GET, uri, item);\n }\n }\n }\n }\n return result != null ? result : new RestResult(false, null, null);\n}\n"
"public void initialiseClassView() throws Exception {\n list = new OWLFrameList2<OWLClass>(getOWLEditorKit(), new ButtonList(getOWLEditorKit()));\n setLayout(new BorderLayout());\n JScrollPane dlLearner = new JScrollPane(list);\n add(dlLearner);\n}\n"
"public int runMainWithExitCode(BuildId buildId, Path projectRoot, Optional<NGContext> context, ImmutableMap<String, String> clientEnvironment, String... args) throws IOException, InterruptedException {\n Verbosity verbosity = VerbosityParser.parse(args);\n Optional<String> color;\n if (context.isPresent() && (context.get().getEnv() != null)) {\n String colorString = context.get().getEnv().getProperty(BUCKD_COLOR_DEFAULT_ENV_VAR);\n color = Optional.fromNullable(colorString);\n } else {\n color = Optional.absent();\n }\n BuckCommand command = new BuckCommand();\n AdditionalOptionsCmdLineParser cmdLineParser = new AdditionalOptionsCmdLineParser(command);\n try {\n cmdLineParser.parseArgument(args);\n } catch (CmdLineException e) {\n stdErr.println(e.getLocalizedMessage());\n return 1;\n }\n ImmutableMap<String, ImmutableMap<String, String>> configOverrides = command.getConfigOverrides();\n Path canonicalRootPath = projectRoot.toRealPath().normalize();\n Config rawConfig = Config.createDefaultConfig(canonicalRootPath, configOverrides);\n ProjectFilesystem filesystem = new ProjectFilesystem(canonicalRootPath, rawConfig);\n BuckConfig buckConfig = new BuckConfig(rawConfig, filesystem, architecture, platform, clientEnvironment);\n final Console console = new Console(verbosity, stdOut, stdErr, buckConfig.createAnsi(color));\n boolean commandSemaphoreAcquired = false;\n if (!command.isReadOnly()) {\n commandSemaphoreAcquired = commandSemaphore.tryAcquire();\n if (!commandSemaphoreAcquired) {\n return BUSY_EXIT_CODE;\n }\n }\n PropertyFinder propertyFinder = new DefaultPropertyFinder(filesystem, clientEnvironment);\n AndroidBuckConfig androidBuckConfig = new AndroidBuckConfig(buckConfig, platform);\n AndroidDirectoryResolver androidDirectoryResolver = new DefaultAndroidDirectoryResolver(filesystem, androidBuckConfig.getNdkVersion(), propertyFinder);\n ProcessExecutor processExecutor = new ProcessExecutor(console);\n Optional<Path> testTempDirOverride = getTestTempDirOverride(buckConfig, clientEnvironment, \"String_Node_Str\" + buildId.toString());\n if (testTempDirOverride.isPresent()) {\n LOG.debug(\"String_Node_Str\", testTempDirOverride.get());\n }\n Clock clock;\n if (BUCKD_LAUNCH_TIME_NANOS.isPresent()) {\n long nanosEpoch = Long.parseLong(BUCKD_LAUNCH_TIME_NANOS.get(), 10);\n LOG.verbose(\"String_Node_Str\", nanosEpoch);\n clock = new NanosAdjustedClock(nanosEpoch);\n } else {\n clock = new DefaultClock();\n }\n ParserConfig parserConfig = new ParserConfig(buckConfig);\n Watchman watchman;\n ParserConfig.GlobHandler globHandler;\n if (context.isPresent() || parserConfig.getGlobHandler() == ParserConfig.GlobHandler.WATCHMAN) {\n watchman = Watchman.build(projectRoot, clientEnvironment, console, clock);\n if (parserConfig.getGlobHandler() == ParserConfig.GlobHandler.WATCHMAN && watchman.hasWildmatchGlob()) {\n globHandler = ParserConfig.GlobHandler.WATCHMAN;\n } else {\n globHandler = ParserConfig.GlobHandler.PYTHON;\n }\n LOG.debug(\"String_Node_Str\" + \"String_Node_Str\", watchman.getCapabilities(), watchman.getWatchRoot(), watchman.getProjectPrefix(), parserConfig.getGlobHandler(), globHandler);\n } else {\n watchman = Watchman.NULL_WATCHMAN;\n globHandler = ParserConfig.GlobHandler.PYTHON;\n }\n final boolean isDaemon = context.isPresent() && (watchman != Watchman.NULL_WATCHMAN);\n KnownBuildRuleTypesFactory factory = new KnownBuildRuleTypesFactory(processExecutor, androidDirectoryResolver, testTempDirOverride);\n Cell rootCell = new Cell(filesystem, console, watchman, buckConfig, factory, androidDirectoryResolver, clock);\n int exitCode;\n ImmutableList<BuckEventListener> eventListeners = ImmutableList.of();\n ExecutionEnvironment executionEnvironment = new DefaultExecutionEnvironment(processExecutor, clientEnvironment, System.getProperties());\n ParserConfig.AllowSymlinks allowSymlinks = parserConfig.getAllowSymlinks();\n ProjectFileHashCache cellHashCache;\n ProjectFileHashCache buckOutHashCache;\n if (isDaemon) {\n cellHashCache = getFileHashCacheFromDaemon(rootCell, globHandler, allowSymlinks);\n buckOutHashCache = getBuckOutFileHashCacheFromDaemon(rootCell, globHandler, allowSymlinks);\n } else {\n cellHashCache = new DefaultFileHashCache(rootCell.getFilesystem());\n buckOutHashCache = new DefaultFileHashCache(new ProjectFilesystem(rootCell.getFilesystem().getRootPath(), Optional.of(ImmutableSet.of(BuckConstant.BUCK_OUTPUT_PATH)), ImmutableSet.<Path>of()));\n }\n FileHashCache fileHashCache = new StackedFileHashCache(ImmutableList.of(cellHashCache, buckOutHashCache, new DefaultFileHashCache(new ProjectFilesystem(rootCell.getFilesystem().getRootPath())), new DefaultFileHashCache(new ProjectFilesystem(Paths.get(\"String_Node_Str\")))));\n Optional<WebServer> webServer = getWebServerIfDaemon(context, rootCell, globHandler, allowSymlinks);\n TestConfig testConfig = new TestConfig(buckConfig);\n ArtifactCacheBuckConfig cacheBuckConfig = new ArtifactCacheBuckConfig(buckConfig);\n ExecutorService diskIoExecutorService = MoreExecutors.newSingleThreadExecutor(\"String_Node_Str\");\n VersionControlStatsGenerator vcStatsGenerator = null;\n try (ConsoleLogLevelOverrider consoleLogLevelOverrider = new ConsoleLogLevelOverrider(buildId.toString(), verbosity);\n ConsoleHandlerRedirector consoleHandlerRedirector = new ConsoleHandlerRedirector(buildId.toString(), console.getStdErr(), Optional.<OutputStream>of(stdErr));\n AbstractConsoleEventBusListener consoleListener = createConsoleEventListener(clock, console, testConfig.getResultSummaryVerbosity(), executionEnvironment, webServer);\n TempDirectoryCreator tempDirectoryCreator = new TempDirectoryCreator(testTempDirOverride);\n AsyncCloseable asyncCloseable = new AsyncCloseable(diskIoExecutorService);\n BuckEventBus buildEventBus = new BuckEventBus(clock, buildId)) {\n ArtifactCache artifactCache = asyncCloseable.closeAsync(ArtifactCaches.newInstance(cacheBuckConfig, buildEventBus, filesystem, executionEnvironment.getWifiSsid()));\n ProgressEstimator progressEstimator = new ProgressEstimator(filesystem.getRootPath(), buildEventBus);\n consoleListener.setProgressEstimator(progressEstimator);\n eventListeners = addEventListeners(buildEventBus, rootCell.getFilesystem(), buildId, rootCell.getBuckConfig(), webServer, clock, executionEnvironment, console, consoleListener, rootCell.getKnownBuildRuleTypes(), clientEnvironment);\n VersionControlBuckConfig vcBuckConfig = new VersionControlBuckConfig(buckConfig);\n if (vcBuckConfig.shouldGenerateStatistics()) {\n vcStatsGenerator = new VersionControlStatsGenerator(diskIoExecutorService, new DefaultVersionControlCmdLineInterfaceFactory(rootCell.getFilesystem().getRootPath(), new PrintStreamProcessExecutorFactory(), vcBuckConfig), buildEventBus);\n vcStatsGenerator.generateStatsAsync();\n }\n ImmutableList<String> remainingArgs = args.length > 1 ? ImmutableList.copyOf(Arrays.copyOfRange(args, 1, args.length)) : ImmutableList.<String>of();\n CommandEvent.Started startedEvent = CommandEvent.started(args.length > 0 ? args[0] : \"String_Node_Str\", remainingArgs, isDaemon);\n buildEventBus.post(startedEvent);\n Parser parser = null;\n if (isDaemon && watchman != Watchman.NULL_WATCHMAN) {\n try {\n Daemon daemon = getDaemon(rootCell, globHandler, allowSymlinks, objectMapper);\n WatchmanWatcher watchmanWatcher = new WatchmanWatcher(watchman.getWatchRoot().or(canonicalRootPath.toString()), daemon.getFileEventBus(), clock, objectMapper, processExecutor, filesystem.getIgnorePaths(), DEFAULT_IGNORE_GLOBS, watchman, daemon.getWatchmanQueryUUID());\n parser = getParserFromDaemon(context, rootCell, startedEvent, buildEventBus, watchmanWatcher, globHandler, allowSymlinks);\n } catch (WatchmanWatcherException | IOException e) {\n buildEventBus.post(ConsoleEvent.warning(\"String_Node_Str\", e.getMessage()));\n }\n }\n if (parser == null) {\n parser = Parser.createBuildFileParser(rootCell, globHandler == ParserConfig.GlobHandler.WATCHMAN, allowSymlinks);\n }\n JavaUtilsLoggingBuildListener.ensureLogFileIsWritten(rootCell.getFilesystem());\n Optional<ProcessManager> processManager;\n if (platform == Platform.WINDOWS) {\n processManager = Optional.absent();\n } else {\n processManager = Optional.<ProcessManager>of(new PkillProcessManager(processExecutor));\n }\n Supplier<AndroidPlatformTarget> androidPlatformTargetSupplier = createAndroidPlatformTargetSupplier(androidDirectoryResolver, androidBuckConfig, buildEventBus);\n if (command.subcommand instanceof AbstractCommand) {\n AbstractCommand subcommand = (AbstractCommand) command.subcommand;\n Optional<Path> eventsOutputPath = subcommand.getEventsOutputPath();\n if (eventsOutputPath.isPresent()) {\n BuckEventListener listener = new FileSerializationEventBusListener(eventsOutputPath.get());\n buildEventBus.register(listener);\n }\n }\n exitCode = command.run(new CommandRunnerParams(console, rootCell, androidPlatformTargetSupplier, artifactCache, buildEventBus, parser, platform, clientEnvironment, rootCell.getBuckConfig().createDefaultJavaPackageFinder(), objectMapper, clock, processManager, webServer, buckConfig, fileHashCache));\n parser.cleanCache();\n buildEventBus.post(CommandEvent.finished(startedEvent, exitCode));\n } catch (Throwable t) {\n LOG.debug(t, \"String_Node_Str\");\n closeDiskIoExecutorService(diskIoExecutorService);\n flushEventListeners(console, buildId, eventListeners);\n throw t;\n } finally {\n if (commandSemaphoreAcquired) {\n commandSemaphore.release();\n }\n }\n if (context.isPresent() && !rootCell.getBuckConfig().getFlushEventsBeforeExit()) {\n context.get().in.close();\n context.get().exit(exitCode);\n }\n closeDiskIoExecutorService(diskIoExecutorService);\n flushEventListeners(console, buildId, eventListeners);\n return exitCode;\n}\n"
"public long getSeekOffset() {\n return (long) (seekOffset * playbackSpeed);\n}\n"
"private <T, E> T getResponse(final HttpResponse response, final Class<T> responseClass, final Class<E> dependentClass) {\n T obj = null;\n try {\n LOGGER.info(\"String_Node_Str\" + response.getStatusLine().getStatusCode());\n if (response.getStatusLine().getStatusCode() != HttpStatus.NO_CONTENT.value()) {\n String responseEntity = IoUtils.toString(response.getEntity().getContent());\n _log.info(\"String_Node_Str\" + responseEntity);\n if (!(HttpStatus.valueOf(response.getStatusLine().getStatusCode()).is2xxSuccessful() && response.getEntity() != null)) {\n String errorMessage = null;\n try {\n if (responseEntity.startsWith(\"String_Node_Str\")) {\n responseEntity = responseEntity.replaceFirst(\"String_Node_Str\", \"String_Node_Str\").trim();\n }\n if (responseEntity.endsWith(\"String_Node_Str\")) {\n responseEntity = responseEntity.replace(\"String_Node_Str\", \"String_Node_Str\").trim();\n }\n errorMessage = mapper.readValue(responseEntity, ErrorMessage.class).getMessage();\n } catch (Exception e) {\n if (response.getStatusLine().getStatusCode() == HttpStatus.UNAUTHORIZED.value()) {\n throw new UnauthorizedException(HttpError.UNAUTHORIZED.getMessage());\n }\n _log.error(\"String_Node_Str\", e);\n errorMessage = authPropertyService.getError(IAuthConstants.Code.RESPONSE_PARSING_FAIL_ERROR).getMessage();\n throw new RestCallFailedException(errorMessage);\n }\n _log.error(\"String_Node_Str\" + responseEntity);\n throw new ExternalSystemException(response.getStatusLine().getStatusCode(), errorMessage);\n } else {\n if (dependentClass == null) {\n obj = mapper.readValue(responseEntity, responseClass);\n } else {\n obj = mapper.readValue(responseEntity, TypeFactory.defaultInstance().constructCollectionLikeType(responseClass, dependentClass));\n }\n }\n }\n } catch (IOException e) {\n throw new RestCallFailedException(e.getMessage());\n }\n return obj;\n}\n"
"private void _commitSave(boolean isNew, String id, ArrayList<String> parentsMaintainOldVersion, String newVersionName) throws Exception {\n String newName = _attributesListPanel.getModelName();\n _modelToSave.setName(newName);\n _updateDisplayedModel();\n if (isNew || id == null) {\n if (_modelToSave.getAttribute(XMLDBModel.DB_MODEL_ID_ATTR) != null) {\n _modelToSave.getAttribute(XMLDBModel.DB_MODEL_ID_ATTR).setContainer(null);\n try {\n MoMLChangeRequest change = new MoMLChangeRequest(this, null, _modelToSave.exportMoML());\n change.setUndoable(true);\n _modelToSave.requestChange(change);\n } catch (Exception e) {\n _resetValues();\n throw e;\n }\n }\n }\n if (_xmlModel == null) {\n _xmlModel = new XMLDBModel(_modelToSave.getName());\n }\n _xmlModel.setModelName(_modelToSave.getName());\n _xmlModel.setModel(_modelToSave.exportMoML());\n _xmlModel.setIsNew(isNew);\n _xmlModel.setModelId(id);\n XMLDBModelWithReferenceChanges xmlDBModelWithReferenceChanges = new XMLDBModelWithReferenceChanges(_xmlModel, parentsMaintainOldVersion, newVersionName);\n try {\n String modelId = _saveModelManager.saveWithParents(xmlDBModelWithReferenceChanges);\n if (modelId != null) {\n JOptionPane.showMessageDialog(this, \"String_Node_Str\", \"String_Node_Str\", JOptionPane.INFORMATION_MESSAGE, null);\n if (_modelToSave.getAttribute(XMLDBModel.DB_MODEL_ID_ATTR) == null) {\n StringConstantParameter dbModelParam = new StringConstantParameter(_modelToSave, XMLDBModel.DB_MODEL_ID_ATTR);\n dbModelParam.setExpression(modelId);\n dbModelParam.setContainer(_modelToSave);\n } else if (!((StringParameter) _modelToSave.getAttribute(XMLDBModel.DB_MODEL_ID_ATTR)).getExpression().equals(modelId)) {\n ((StringParameter) _modelToSave.getAttribute(XMLDBModel.DB_MODEL_ID_ATTR)).setExpression(modelId);\n }\n try {\n MoMLChangeRequest change = new MoMLChangeRequest(this, null, _modelToSave.exportMoML());\n change.setUndoable(true);\n _modelToSave.requestChange(change);\n _source.setTitle(_xmlModel.getModelName());\n try {\n _source.updateDBModelHistory(_xmlModel.getModelName(), false);\n } catch (IOException e) {\n }\n } catch (Exception e) {\n throw e;\n }\n ArrayList<String> openedParents = null;\n if (_parentValidateFrame != null) {\n openedParents = new ArrayList<String>();\n for (String openedParentModelName : _parentValidateFrame._getOpenedParents()) {\n openedParents.add(openedParentModelName);\n }\n }\n _source.setModified(false);\n if (_parentValidateFrame != null) {\n _parentValidateFrame.dispose();\n }\n dispose();\n if (openedParents != null) {\n for (String openedParentModelName : openedParents) {\n PtolemyEffigy parentModelEffigy = (PtolemyEffigy) _source.getConfiguration().getDirectory().getEffigy(openedParentModelName);\n parentModelEffigy.closeTableaux();\n parentModelEffigy.setContainer(null);\n PtolemyEffigy updatedParentModelEffigy = LoadManager.loadModel(openedParentModelName, _source.getConfiguration());\n if (updatedParentModelEffigy != null) {\n updatedParentModelEffigy.showTableaux();\n }\n }\n }\n if (_source.getConfiguration().getDirectory().getEffigy(_xmlModel.getModelName()) != null) {\n _source.getConfiguration().getDirectory().getEffigy(_xmlModel.getModelName()).showTableaux();\n }\n } else {\n JOptionPane.showMessageDialog(this, \"String_Node_Str\", \"String_Node_Str\", JOptionPane.INFORMATION_MESSAGE, null);\n }\n } catch (DBConnectionException exception) {\n _resetValues();\n throw exception;\n } catch (DBExecutionException exception) {\n _resetValues();\n throw exception;\n } catch (IllegalArgumentException exception) {\n _resetValues();\n throw exception;\n } catch (ModelAlreadyExistException exception) {\n _resetValues();\n JOptionPane.showMessageDialog(this, \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n _rollbackModel();\n }\n}\n"
"public void run() {\n fireLabelProviderChanged(new LabelProviderChangedEvent(ProblemLabelDecorator.this, updateElements));\n}\n"
"private void redistributeGlobalBuffers() {\n final int totalNumberOfBuffers = GlobalBufferPool.getInstance().getTotalNumberOfBuffers();\n synchronized (this.taskMap) {\n if (this.taskMap.isEmpty()) {\n return;\n }\n final int numberOfTasks = this.taskMap.size() + (this.multicastEnabled ? 1 : 0);\n final int buffersPerTask = (int) Math.ceil((double) totalNumberOfBuffers / (double) numberOfTasks);\n System.out.println(\"String_Node_Str\" + buffersPerTask);\n final Iterator<TaskContext> it = this.taskMap.values().iterator();\n while (it.hasNext()) {\n it.next().setBufferLimit(buffersPerTask);\n }\n }\n}\n"
"public void selectMenuItem(String namePath, final String operator) {\n String[] menuItems = MenuUtilBase.splitPath(namePath);\n if (menuItems.length == 0) {\n throw new StepExecutionException(\"String_Node_Str\", EventFactory.createActionError());\n }\n IMenuItemComponent item = navigateToMenuItem(getAndCheckMenu(), menuItems, operator);\n if (item == null || item.getRealComponent() == null) {\n try {\n closeMenu(getAndCheckMenu(), menuItems, operator);\n } catch (StepExecutionException see) {\n getLog().info(\"String_Node_Str\");\n }\n throw new StepExecutionException(\"String_Node_Str\", EventFactory.createActionError(TestErrorEvent.NOT_FOUND));\n }\n item.selectMenuItem();\n}\n"
"private Bitmap doParse(NetworkResponse response) {\n byte[] data = response.data;\n BitmapFactory.Options decodeOptions = new BitmapFactory.Options();\n Bitmap bitmap = null;\n if (mMaxWidth == 0 && mMaxHeight == 0) {\n decodeOptions.inPreferredConfig = mDecodeConfig;\n bitmap = BitmapFactory.decodeByteArray(data, 0, data.length, decodeOptions);\n } else {\n decodeOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeByteArray(data, 0, data.length, decodeOptions);\n int actualWidth = decodeOptions.outWidth;\n int actualHeight = decodeOptions.outHeight;\n int desiredWidth = getResizedDimension(mMaxWidth, mMaxHeight, actualWidth, actualHeight);\n int desiredHeight = getResizedDimension(mMaxHeight, mMaxWidth, actualHeight, actualWidth);\n decodeOptions.inJustDecodeBounds = false;\n decodeOptions.inSampleSize = findBestSampleSize(actualWidth, actualHeight, desiredWidth, desiredHeight);\n Bitmap tempBitmap = BitmapFactory.decodeByteArray(data, 0, data.length, decodeOptions);\n if (tempBitmap != null && (tempBitmap.getWidth() > desiredWidth || tempBitmap.getHeight() > desiredHeight)) {\n tempBitmap2 = Bitmap.createScaledBitmap(tempBitmap, desiredWidth, desiredHeight, true);\n tempBitmap.recycle();\n } else {\n bitmap = tempBitmap;\n }\n }\n return bitmap;\n}\n"
"public void onClick(View v) {\n resetOptStatus();\n}\n"
"String getPassword() {\n String password = null;\n try {\n database = myDatabaseHelper.getReadableDatabase();\n String[] columns = new String[] { \"String_Node_Str\", \"String_Node_Str\" };\n System.out.println(\"String_Node_Str\");\n cursor = database.query(\"String_Node_Str\", columns, null, null, null, null, null);\n int indexUsername = cursor.getColumnIndex(\"String_Node_Str\");\n cursor.moveToLast();\n password = cursor.getString(1);\n } catch (Exception e) {\n System.out.println(\"String_Node_Str\");\n e.printStackTrace();\n }\n database.close();\n return password;\n}\n"
"public final void transformation(AST _t) throws RecognitionException, PtalonRuntimeException {\n PtalonAST transformation_AST_in = (_t == ASTNULL) ? null : (PtalonAST) _t;\n returnAST = null;\n ASTPair currentAST = new ASTPair();\n PtalonAST transformation_AST = null;\n boolean emptyStart = true;\n AST __t83 = _t;\n PtalonAST tmp40_AST = null;\n PtalonAST tmp40_AST_in = null;\n tmp40_AST = (PtalonAST) astFactory.create((PtalonAST) _t);\n tmp40_AST_in = (PtalonAST) _t;\n astFactory.addASTChild(currentAST, tmp40_AST);\n ASTPair __currentAST83 = currentAST.copy();\n currentAST.root = currentAST.child;\n currentAST.child = null;\n match(_t, TRANSFORMATION);\n _t = _t.getFirstChild();\n {\n if (_t == null)\n _t = ASTNULL;\n switch(_t.getType()) {\n case PLUS:\n {\n PtalonAST tmp41_AST = null;\n PtalonAST tmp41_AST_in = null;\n tmp41_AST = (PtalonAST) astFactory.create((PtalonAST) _t);\n tmp41_AST_in = (PtalonAST) _t;\n astFactory.addASTChild(currentAST, tmp41_AST);\n match(_t, STAR);\n _t = _t.getNextSibling();\n emptyStart = false;\n break;\n }\n case 3:\n case PORT:\n case INPORT:\n case OUTPORT:\n case PARAMETER:\n case ACTOR:\n case ITERATE:\n case RELATION:\n case TRANSPARENT:\n case IF:\n case FOR:\n case ACTOR_DECLARATION:\n case MULTIPORT:\n case MULTIINPORT:\n case MULTIOUTPORT:\n case PARAM_EQUALS:\n case ACTOR_EQUALS:\n {\n break;\n }\n default:\n {\n throw new NoViableAltException(_t);\n }\n }\n }\n info.enterTransformation(emptyStart);\n {\n _loop86: do {\n if (_t == null)\n _t = ASTNULL;\n switch(_t.getType()) {\n case PORT:\n case INPORT:\n case OUTPORT:\n case PARAMETER:\n case ACTOR:\n case ITERATE:\n case RELATION:\n case TRANSPARENT:\n case ACTOR_DECLARATION:\n case MULTIPORT:\n case MULTIINPORT:\n case MULTIOUTPORT:\n case PARAM_EQUALS:\n case ACTOR_EQUALS:\n {\n atomic_statement(_t);\n _t = _retTree;\n astFactory.addASTChild(currentAST, returnAST);\n break;\n }\n case IF:\n {\n conditional_statement(_t);\n _t = _retTree;\n astFactory.addASTChild(currentAST, returnAST);\n break;\n }\n case FOR:\n {\n iterative_statement(_t);\n _t = _retTree;\n astFactory.addASTChild(currentAST, returnAST);\n break;\n }\n default:\n {\n break _loop86;\n }\n }\n } while (true);\n }\n currentAST = __currentAST83;\n _t = __t83;\n _t = _t.getNextSibling();\n info.exitTransformation();\n transformation_AST = (PtalonAST) currentAST.root;\n returnAST = transformation_AST;\n _retTree = _t;\n}\n"
"public void testTagsInOperations(String type) {\n ValidatableResponse vr = callEndpoint(type);\n vr.body(\"String_Node_Str\", containsInAnyOrder(\"String_Node_Str\", \"String_Node_Str\"));\n vr.body(\"String_Node_Str\", containsInAnyOrder(\"String_Node_Str\"));\n}\n"
"private boolean isSharedScale() {\n return rtc.getSharedScale() != null && rtc.getSharedScale().isShared();\n}\n"
"public void moveMember(final Node source, LibraryNode destination) {\n if (source == null || source.getModelObject() == null || source.getTLModelObject() == null)\n throw new IllegalArgumentException(\"String_Node_Str\");\n if (destination == null)\n throw new IllegalArgumentException(\"String_Node_Str\");\n if (!(destination.getTLaLib() instanceof TLLibrary))\n throw new IllegalArgumentException(\"String_Node_Str\");\n if (source.isService() && destination.hasService())\n return;\n ContextController cc = OtmRegistry.getMainController().getContextController();\n cc.copyContext(source, destination);\n source.unlinkNode();\n source.getLibrary().getTLLibrary().moveNamedMember((LibraryMember) source.getTLModelObject(), destination.getLibrary().getTLLibrary());\n destination.linkMember(source);\n if (destination.isInChain()) {\n destination.getChain().add((ComponentNode) source);\n }\n}\n"
"public static TextFileChange calculateTextChanges(IFile file, Collection<PathPair> pathPairs) throws Exception {\n File nativeFile = ModelUtil.getLocation(file).makeAbsolute().toFile();\n if (nativeFile == null || !nativeFile.exists())\n throw new Exception(getString(\"String_Node_Str\", file.getFullPath()));\n TextFileChange textFileChange = new TextFileChange(file.getName(), file);\n TextEdit fileChangeRootEdit = setRootEdit(textFileChange);\n if (pathPairs.isEmpty()) {\n return textFileChange;\n }\n BufferedReader reader = null;\n String line;\n int docOffset = 0;\n try {\n reader = new BufferedReader(new FileReader(nativeFile));\n while ((line = reader.readLine()) != null) {\n if (!line.contains(MODEL_IMPORTS_ELEMENT_START)) {\n for (PathPair pathPair : pathPairs) {\n if (pathPair.getSourcePath().equals(pathPair.getTargetPath())) {\n continue;\n }\n int lineOffset = line.indexOf(pathPair.getSourcePath().replace('\\\\', '/'));\n if (lineOffset < 0)\n continue;\n int offset = docOffset + lineOffset;\n ReplaceEdit edit = new ReplaceEdit(offset, pathPair.getSourcePath().length(), pathPair.getTargetPath());\n fileChangeRootEdit.addChild(edit);\n }\n }\n docOffset += line.length() + 1;\n if (Platform.getOS().equalsIgnoreCase(Platform.WS_WIN32)) {\n docOffset++;\n }\n }\n } finally {\n if (reader != null)\n reader.close();\n }\n return textFileChange;\n}\n"
"public boolean Kick(User user) {\n if (isOwner(user)) {\n return false;\n }\n if (isMod(user)) {\n return false;\n }\n if (isOnline(user) != null) {\n user.leaveChannel();\n user.sendMessage(ChatColor.RED + \"String_Node_Str\");\n return true;\n } else {\n return false;\n }\n}\n"
"public void setStreamVolume(int streamType, int index, int flags) {\n ensureValidStreamType(streamType);\n syncRingerAndNotificationStreamVolume(streamType, index, false);\n setStreamVolumeInt(streamType, index, false, true);\n mVolumePanel.postVolumeChanged(streamType, flags);\n sendVolumeUpdate(streamType);\n}\n"
"private Optional<String> determineCollectionFromId(final Optional<String> id) {\n return id.map(i -> MetadataUtils.determineCollectionFromId(i));\n}\n"
"public void loadSource() throws IOException {\n if (_source == null) {\n _source = AbsentTreeNode.instance;\n String fileName = fullName('.');\n if (SearchPath.systemClassSet.contains(fileName) || SearchPath.ptolemyCoreClassSet.contains(fileName)) {\n if (StaticResolution.traceLoading) {\n System.out.println(\"String_Node_Str\" + \"String_Node_Str\" + fileName + \"String_Node_Str\");\n }\n StaticResolution.loadClassName(fileName, 0);\n if (_source == AbsentTreeNode.instance) {\n throw new RuntimeException(\"String_Node_Str\" + fullName());\n }\n } else {\n if (StaticResolution.traceLoading)\n System.out.println(\"String_Node_Str\" + fullName());\n Class loadedClass = null;\n if (StaticResolution.shallowLoadingEnabled() && StaticResolution.enableDeepUserASTs) {\n try {\n loadedClass = Class.forName(fullName());\n } catch (Exception exception) {\n }\n if (loadedClass == null) {\n JavaClassLoader classLoader = new JavaClassLoader();\n if (StaticResolution.traceLoading)\n System.out.println(\"String_Node_Str\" + \"String_Node_Str\" + fullName() + \"String_Node_Str\" + \"String_Node_Str\");\n try {\n loadedClass = classLoader.loadClass(fullName());\n } catch (ClassNotFoundException exception) {\n System.out.println(\"String_Node_Str\");\n }\n }\n if (loadedClass != null) {\n CompileUnitNode loadedAST = ASTReflect.ASTCompileUnitNode(loadedClass);\n _source = NodeUtil.getDefinedType(loadedAST);\n if (loadedAST == null)\n throw new NullPointerException(\"String_Node_Str\" + \"String_Node_Str\" + fullName() + \"String_Node_Str\" + \"String_Node_Str\" + loadedClass.getClass().getName() + \"String_Node_Str\");\n else {\n _source = NodeUtil.getSingleDefinedType(loadedAST);\n loadedAST.setProperty(IDENT_KEY, fullName());\n JavaParserManip.allParsedMap.put(fullName(), loadedAST);\n StaticResolution.loadCompileUnit(loadedAST, 0);\n }\n }\n }\n if (loadedClass == null) {\n if (StaticResolution.traceLoading)\n System.out.println(\"String_Node_Str\" + \"String_Node_Str\" + fullName());\n File file = _pickLibrary(_container).openSource(fileName);\n StaticResolution.loadFile(file, 0, fullName());\n }\n if ((_source == null) || (_source == AbsentTreeNode.instance)) {\n throw new RuntimeException(\"String_Node_Str\" + fileName + \"String_Node_Str\" + fullName());\n }\n }\n if (StaticResolution.traceLoading)\n System.out.println(\"String_Node_Str\" + fullName());\n }\n}\n"
"private static boolean isValidFileStore(String path) {\n File store = new File(path);\n if (!store.isDirectory()) {\n return false;\n }\n for (String f : store.list()) {\n if (\"String_Node_Str\".equals(f)) {\n return true;\n }\n }\n return false;\n}\n"
"public boolean hasPermission(Player player, String permission) {\n return nation.getPermissionsResolver().hasPermission(player, permission);\n}\n"
"public Message getFilteredMessage(final Properties props) {\n if (pattern != null) {\n final Message m = MessageFactory.getMessage();\n String text = this.getMessage().getPayload().toString();\n text = Utils.filterProperties(text, getMatcher(), new DefaultPropertyGetter(props));\n m.setPayload(text);\n return m;\n } else {\n return message;\n }\n}\n"
"public void destroyChatSession(UUID chatId) {\n if (chatId != null) {\n ChatSession chatSession = chatSessions.get(chatId);\n if (chatSession != null) {\n synchronized (chatSession) {\n if (chatSessions.containsKey(chatId)) {\n chatSessions.remove(chatId);\n logger.debug(\"String_Node_Str\" + chatId);\n } else {\n logger.trace(\"String_Node_Str\" + chatId);\n }\n }\n }\n }\n}\n"
"public void testMultiNameClass() {\n test(\"String_Node_Str\", \"String_Node_Str\");\n test(\"String_Node_Str\", \"String_Node_Str\");\n}\n"
"static PasteBufferImpl create() {\n PasteBufferImpl pasteBuffer;\n if (UserAgent.isSafari() || QuirksConstants.FIREFOX_GREATER_THAN_VER_15) {\n pasteBuffer = new PasteBufferImplSafariAndNewFirefox();\n } else if (UserAgent.isFirefox() && !QuirksConstants.SANITIZES_PASTED_CONTENT) {\n pasteBuffer = new PasteBufferImplFirefox();\n } else {\n pasteBuffer = new PasteBufferImpl();\n }\n pasteBuffer.setupDom();\n return pasteBuffer;\n}\n"
"public static void startDiscovery(InetAddress addr) throws IOException {\n INSTANCE.doStartDiscovery(addr);\n}\n"
"public static String[] getAggFunParameters(SeriesDefinition orthSD, SeriesDefinition baseSD, Query orthQuery) {\n if (baseSD.getGrouping() != null && baseSD.getGrouping().isEnabled()) {\n SeriesGrouping grouping = orthSD.getGrouping();\n if (grouping != null && grouping.isEnabled()) {\n return grouping.getAggregateParameters().toArray(new String[0]);\n } else if (orthQuery != null && orthQuery.getGrouping() != null && orthQuery.getGrouping().isEnabled()) {\n return orthQuery.getGrouping().getAggregateParameters().toArray(new String[0]);\n }\n return baseSD.getGrouping().getAggregateParameters().toArray(new String[0]);\n } else {\n if (orthQuery != null && orthQuery.getGrouping() != null && orthQuery.getGrouping().isEnabled()) {\n return orthQuery.getGrouping().getAggregateParameters().toArray(new String[0]);\n }\n return orthSD.getGrouping().getAggregateParameters().toArray(new String[0]);\n }\n}\n"
"public void simulationTest() {\n Simulation s = new Simulation();\n ELDescriptionTree tree1 = new ELDescriptionTree(rs);\n ELDescriptionTree tree2 = new ELDescriptionTree(rs);\n ELDescriptionNode t1 = new ELDescriptionNode(tree1);\n ELDescriptionNode t2 = new ELDescriptionNode(tree2);\n TreeTuple tuple1 = new TreeTuple(t1, t2);\n s.addTuple(tuple1);\n assertTrue(s.in(t2).size() == 1);\n ObjectProperty p = new ObjectProperty(\"String_Node_Str\");\n TreeSet<NamedClass> l3 = new TreeSet<NamedClass>();\n ELDescriptionNode t3 = new ELDescriptionNode(t1, p, l3);\n assertTrue(t3.getLevel() == 2);\n assertTrue(tree1.getMaxLevel() == 2);\n}\n"
"public X509Certificate[] getAcceptedIssuers() {\n synchronized (mIssuersLock) {\n if (mIssuers == null) {\n Set<TrustAnchor> anchors = mNetworkSecurityConfig.getTrustAnchors();\n X509Certificate[] issuers = new X509Certificate[anchors.size()];\n int i = 0;\n for (TrustAnchor anchor : anchors) {\n issuers[i++] = anchor.certificate;\n }\n mIssuers = issuers;\n }\n return mIssuers.clone();\n }\n}\n"
"public void testLoadMultipleXmlFilesViaSamePackage() {\n outputResolver = generateSchema(new Class[] { Employee.class, Address.class }, CONTEXT_PATH, PATH, 1);\n String src = PATH + \"String_Node_Str\";\n String result = validateAgainstSchema(src, null, outputResolver);\n assertTrue(\"String_Node_Str\", result != null);\n src = PATH + \"String_Node_Str\";\n result = validateAgainstSchema(src, EMPTY_NAMESPACE, outputResolver);\n assertTrue(\"String_Node_Str\" + result, result == null);\n}\n"
"private void execute(Player player, ParsedCommand cmd) throws SMSException {\n if (cmd.isRestricted()) {\n cmd.setStatus(ReturnStatus.CMD_OK);\n return;\n Cost.chargePlayer(player, cmd.getCosts());\n if (cmd.getCommand() == null || cmd.getCommand().isEmpty())\n return;\n StringBuilder sb = new StringBuilder(cmd.getCommand()).append(\"String_Node_Str\");\n for (String a : cmd.getArgs()) {\n sb.append(a).append(\"String_Node_Str\");\n }\n String command = sb.toString().trim();\n if (cmd.isMacro()) {\n String macroName = cmd.getCommand();\n if (macroHistory.contains(macroName)) {\n MiscUtil.log(Level.WARNING, \"String_Node_Str\" + macroName);\n cmd.setStatus(ReturnStatus.WOULD_RECURSE);\n return;\n } else if (SMSMacro.hasMacro(macroName)) {\n macroHistory.add(macroName);\n ParsedCommand cmd2 = null;\n for (String c : SMSMacro.getCommands(macroName)) {\n for (int i = 0; i < cmd.getArgs().size(); i++) {\n c = c.replace(\"String_Node_Str\" + (i + 1) + \"String_Node_Str\", cmd.arg(i));\n }\n cmd2 = handleCommandString(player, c, RunMode.EXECUTE);\n if (cmd2.isMacroStopped())\n break;\n }\n cmd.setStatus(cmd2 == null ? ReturnStatus.BAD_MACRO : cmd2.getStatus());\n if (!cmd2.isAffordable())\n cmd.setStatus(ReturnStatus.CANT_AFFORD);\n return;\n } else {\n cmd.setStatus(ReturnStatus.BAD_MACRO);\n return;\n }\n } else if (cmd.isWhisper()) {\n MiscUtil.alertMessage(player, command);\n } else if (cmd.isConsole()) {\n if (!PermissionsUtils.isAllowedTo(player, \"String_Node_Str\")) {\n cmd.setStatus(ReturnStatus.NO_PERMS);\n return;\n }\n Debugger.getDebugger().debug(\"String_Node_Str\" + sb.toString());\n ConsoleCommandSender cs = Bukkit.getServer().getConsoleSender();\n if (!Bukkit.getServer().dispatchCommand(cs, sb.toString())) {\n cmd.setStatus(ReturnStatus.CMD_FAILED);\n }\n } else if (cmd.isElevated()) {\n if (!PermissionsUtils.isAllowedTo(player, \"String_Node_Str\")) {\n cmd.setStatus(ReturnStatus.NO_PERMS);\n return;\n }\n Debugger.getDebugger().debug(\"String_Node_Str\" + sb.toString());\n List<PermissionAttachment> attachments = new ArrayList<PermissionAttachment>();\n boolean tempOp = false;\n try {\n ScrollingMenuSign plugin = ScrollingMenuSign.getInstance();\n List<String> nodes = (List<String>) SMSConfig.getConfig().getList(\"String_Node_Str\");\n for (String node : nodes) {\n if (!node.isEmpty() && !player.hasPermission(node)) {\n attachments.add(player.addAttachment(plugin, node, true));\n }\n }\n if (SMSConfig.getConfig().getBoolean(\"String_Node_Str\", false) && !player.isOp()) {\n tempOp = true;\n player.setOp(true);\n }\n if (command.startsWith(\"String_Node_Str\")) {\n if (!Bukkit.getServer().dispatchCommand(player, command.substring(1))) {\n cmd.setStatus(ReturnStatus.CMD_FAILED);\n }\n } else {\n player.chat(command);\n }\n } finally {\n for (PermissionAttachment att : attachments) {\n player.removeAttachment(att);\n }\n if (tempOp) {\n player.setOp(false);\n }\n }\n } else {\n Debugger.getDebugger().debug(\"String_Node_Str\" + sb.toString());\n if (command.startsWith(\"String_Node_Str\")) {\n if (!Bukkit.getServer().dispatchCommand(player, command.substring(1))) {\n cmd.setStatus(ReturnStatus.CMD_FAILED);\n }\n } else {\n player.chat(command);\n }\n }\n}\n"
"public void feedTheNinja() throws Exception {\n Tortoise michelangelo = new Tortoise();\n michelangelo.likesTopping(Topping.Pepperoni);\n Pizza pizza = new Pizza();\n pizza.addTopping(_________);\n boolean likedIt = michealangelo.eatPizza(pizza);\n Assert.assertTrue(\"String_Node_Str\", likedIt);\n}\n"
"protected void onInitialLineParsed(HttpHeader httpHeader, FilterChainContext ctx) {\n super.onInitialLineParsed(httpHeader, ctx);\n if (httpHeader.isSkipRemainder()) {\n return;\n }\n final HttpTransactionContext context = provider.getHttpTransactionContext(ctx.getConnection());\n final int status = ((HttpResponsePacket) httpHeader).getStatus();\n if (HttpStatus.CONINTUE_100.statusMatches(status)) {\n ctx.notifyUpstream(new ContinueEvent(context));\n return;\n }\n if (context.statusHandler != null && !context.statusHandler.handlesStatus(status)) {\n context.statusHandler = null;\n context.invocationStatus = StatusHandler.InvocationStatus.CONTINUE;\n } else {\n context.statusHandler = null;\n }\n if (context.invocationStatus == StatusHandler.InvocationStatus.CONTINUE) {\n if (HANDLER_MAP.containsKey(status)) {\n context.statusHandler = HANDLER_MAP.get(status);\n }\n if (context.statusHandler instanceof RedirectHandler) {\n if (!isRedirectAllowed(context)) {\n context.statusHandler = null;\n }\n }\n }\n if (isRedirectAllowed(context)) {\n if (isRedirect(status)) {\n if (context.statusHandler == null) {\n context.statusHandler = RedirectHandler.INSTANCE;\n }\n context.redirectCount.incrementAndGet();\n if (redirectCountExceeded(context)) {\n httpHeader.setSkipRemainder(true);\n context.abort(new MaxRedirectException());\n }\n } else {\n if (context.redirectCount.get() > 0) {\n context.redirectCount.set(0);\n }\n }\n }\n final GrizzlyResponseStatus responseStatus = new GrizzlyResponseStatus((HttpResponsePacket) httpHeader, getURI(context.requestUrl), provider);\n context.responseStatus = responseStatus;\n if (context.statusHandler != null) {\n return;\n }\n if (context.currentState != AsyncHandler.STATE.ABORT) {\n try {\n final AsyncHandler handler = context.handler;\n if (handler != null) {\n context.currentState = handler.onStatusReceived(responseStatus);\n }\n } catch (Exception e) {\n httpHeader.setSkipRemainder(true);\n context.abort(e);\n }\n }\n}\n"
"public void start() {\n startupHealthCheck();\n validateConfiguration();\n startDatabase();\n startWebServer();\n try {\n startRoundRobinDB();\n startOsgiContainer();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n}\n"
"public Object execute(ExecutionEvent event) throws ExecutionException {\n ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();\n if (manager != null) {\n IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();\n IProject productProject = root.getProject(\"String_Node_Str\");\n if (productProject != null) {\n ArrayList<String> currentPlugins = new ArrayList<String>();\n ArrayList<String> notIncludedProjects = new ArrayList<String>();\n String fileName = \"String_Node_Str\", currentPluginsStr = \"String_Node_Str\", key = \"String_Node_Str\";\n String vmArgs = \"String_Node_Str\", vmArgsKey = \"String_Node_Str\";\n String[] plugins;\n if (SystemUtils.IS_OS_WINDOWS) {\n fileName = \"String_Node_Str\";\n } else if (SystemUtils.IS_OS_MAC_OSX) {\n fileName = \"String_Node_Str\";\n } else if (SystemUtils.IS_OS_LINUX) {\n fileName = \"String_Node_Str\";\n } else {\n throw new ExecutionException(\"String_Node_Str\");\n }\n IFile launchICE = productProject.getFile(\"String_Node_Str\" + fileName);\n if (!launchICE.exists()) {\n IFile tempCopy = productProject.getFile(fileName);\n try {\n launchICE.create(tempCopy.getContents(), true, null);\n } catch (CoreException e1) {\n e1.printStackTrace();\n logger.error(\"String_Node_Str\" + fileName, e1);\n }\n }\n ILaunchConfiguration launchConfig = manager.getLaunchConfiguration(launchICE);\n try {\n currentPluginsStr = launchConfig.getAttribute(key, \"String_Node_Str\");\n vmArgs = launchConfig.getAttribute(vmArgsKey, \"String_Node_Str\");\n vmArgs = vmArgs.replace(\"String_Node_Str\", \"String_Node_Str\");\n plugins = currentPluginsStr.split(\"String_Node_Str\");\n for (String s : plugins) {\n currentPlugins.add(s.split(\"String_Node_Str\")[0]);\n }\n List<String> pluginsToIgnore = Arrays.asList(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n for (IProject p : root.getProjects()) {\n String name = p.getName();\n if (!currentPlugins.contains(p.getName()) && !name.endsWith(\"String_Node_Str\") && !name.contains(\"String_Node_Str\") && !name.contains(\"String_Node_Str\") && !name.contains(\"String_Node_Str\") && !pluginsToIgnore.contains(name)) {\n notIncludedProjects.add(p.getName());\n }\n }\n ListSelectionDialog dialog = new ListSelectionDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(), notIncludedProjects.toArray(), ArrayContentProvider.getInstance(), new LabelProvider(), \"String_Node_Str\");\n dialog.setTitle(\"String_Node_Str\");\n int ok = dialog.open();\n if (ok == Window.OK) {\n Object[] results = dialog.getResult();\n for (Object s : results) {\n currentPluginsStr = s.toString() + \"String_Node_Str\" + currentPluginsStr;\n }\n ILaunchConfigurationWorkingCopy wc = launchConfig.getWorkingCopy();\n wc.setAttribute(key, currentPluginsStr);\n wc.setAttribute(vmArgsKey, vmArgs);\n ILaunchConfiguration config = wc.doSave();\n Job job = new WorkspaceJob(\"String_Node_Str\") {\n public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {\n config.launch(ILaunchManager.RUN_MODE, monitor);\n return Status.OK_STATUS;\n }\n };\n job.schedule();\n }\n } catch (CoreException e) {\n e.printStackTrace();\n logger.error(\"String_Node_Str\", e);\n }\n }\n }\n return null;\n}\n"
"public void newIndex(Comparable newValue, QueryableEntry record) {\n takeWriteLock();\n try {\n Data indexKey = record.getIndexKey();\n ConcurrentMap<Data, QueryableEntry> records = mapRecords.get(newValue);\n if (records == null) {\n records = new ConcurrentHashMap<Data, QueryableEntry>();\n ConcurrentMap<Data, QueryableEntry> existing = mapRecords.putIfAbsent(newValue, records);\n if (existing != null) {\n records = existing;\n }\n }\n records.put(indexKey, record);\n } finally {\n releaseLock();\n }\n}\n"
"private void goToDiggablePosition() {\n super.getGrid().setMarked(movable.getPos(), false);\n ShortPoint2D diggablePos = getDiggablePosition();\n if (diggablePos != null) {\n if (super.goToPos(diggablePos)) {\n state = EDiggerState.GOING_TO_POS;\n super.getGrid().setMarked(diggablePos, true);\n } else {\n reportJobless();\n }\n } else if (allPositionsFlattened()) {\n reportJobless();\n }\n}\n"
"protected void requestProgressUpdate() {\n if (SearchGeocacheService.getInstance() != null && !SearchGeocacheService.getInstance().isCanceled()) {\n SearchGeocacheService.getInstance().sendProgressUpdate();\n}\n"
"protected void okPressed() {\n if (form.isCallAfterFormFinish()) {\n try {\n componentService.afterFormFinish(form.getName(), form.getComponentProperties());\n } catch (Throwable e) {\n ExceptionHandler.process(e);\n }\n }\n super.okPressed();\n}\n"
"public void updateMenuEntry(final String origMenuText, final String newMenuText, final SystemTrayMenuAction newCallback) {\n SwingUtil.invokeAndWait(new Runnable() {\n\n public void run() {\n Map<String, JMenuItem> menuEntries2 = GtkSystemTray.this.menuEntries;\n synchronized (menuEntries2) {\n JMenuItem menuEntry = menuEntries2.get(origMenuText);\n if (menuEntry != null) {\n ActionListener[] actionListeners = menuEntry.getActionListeners();\n for (ActionListener l : actionListeners) {\n menuEntry.removeActionListener(l);\n }\n menuEntry.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n GtkSystemTray.this.callbackExecutor.execute(new Runnable() {\n public void run() {\n newCallback.onClick(GtkSystemTray.this);\n }\n });\n }\n });\n menuEntry.setText(newMenuText);\n menuEntry.revalidate();\n } else {\n addMenuEntry(origMenuText, newCallback);\n }\n }\n }\n };\n if (SwingUtilities.isEventDispatchThread()) {\n doRun.run();\n } else {\n try {\n SwingUtilities.invokeAndWait(doRun);\n } catch (InvocationTargetException e) {\n logger.error(\"String_Node_Str\", e);\n } catch (InterruptedException e) {\n logger.error(\"String_Node_Str\", e);\n }\n }\n}\n"
"protected boolean isTileStale(Tile tile, TileBitmap bitmap) {\n if (bitmap.isExpired())\n return true;\n return cacheTimeToLive != 0 && ((bitmap.getTimestamp() + cacheTimeToLive) < System.currentTimeMillis());\n}\n"
"public boolean replaceEvent(GameEvent event, Ability source, Game game) {\n game.informPlayers(\"String_Node_Str\");\n for (UUID playerId : game.getPlayerList()) {\n Player player = game.getPlayer(playerId);\n if (player != null) {\n TargetControlledPermanent target = new TargetControlledPermanent();\n List<Permanent> liste = game.getBattlefield().getActivePermanents(new FilterControlledPermanent(), playerId, game);\n if (!liste.isEmpty()) {\n while (!player.choose(Outcome.ReturnToHand, target, source.getSourceId(), game)) {\n if (!player.isInGame()) {\n return false;\n }\n }\n Permanent permanent = game.getPermanent(target.getFirstTarget());\n if (permanent != null) {\n permanent.moveToZone(Zone.HAND, source.getSourceId(), game, false);\n }\n }\n }\n }\n discard();\n return true;\n}\n"
"public boolean onOptionsItemSelected(MenuItem item) {\n switch(item.getItemId()) {\n case R.id.actionToggleLineValues:\n {\n for (DataSet<?> set : mChart.getData().getDataSets()) {\n if (set instanceof LineDataSet)\n set.setDrawValues(!set.isDrawValuesEnabled());\n }\n mChart.invalidate();\n break;\n }\n case R.id.actionToggleBarValues:\n {\n CombinedData data = new CombinedData(mMonths);\n data.setData(generateLineData());\n mChart.setData(data);\n mChart.invalidate();\n break;\n }\n }\n return true;\n}\n"
"public void receive(SimulcastStream simStream) {\n if (simStream == null) {\n this.state = new State(null, null);\n return;\n }\n State oldState = this.state;\n SimulcastStream current = oldState.getCurrent();\n SimulcastStream next = oldState.getNext();\n if (current == simStream) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\" + simStream.getOrder() + \"String_Node_Str\");\n }\n return;\n }\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\" + simStream.getOrder() + \"String_Node_Str\" + getSimulcastSender().getSimulcastReceiver().getSimulcastEngine().getVideoChannel().getEndpoint().getID() + \"String_Node_Str\");\n }\n simStream.askForKeyframe();\n if (current == null) {\n this.state = new State(new WeakReference<>(simStream), oldState.weakNext);\n } else {\n this.state = new State(oldState.weakCurrent, new WeakReference<>(simStream));\n }\n}\n"
"public static void addExperience(EntityPlayer player, PlayerInformation playerInfo, EntityLivingBase enemy) {\n int experience = 0;\n EnemyInfo enemyInfo = (EnemyInfo) enemy.getCapability(CapabilityEnemyInfo.ENEMY_INFO, null);\n if (enemyInfo != null) {\n int enemyLevel = enemyInfo.getEnemyLevel();\n int enemyTier = enemyInfo.getEnemyTier();\n int rarity = 1;\n if (enemy instanceof EntityMonster) {\n rarity = EntityMonster.rarity;\n }\n double baseFactor = Configs.monsterLevelTierCategory.experienceBaseFactor;\n double tierMultiplier = (Math.pow(enemyTier, Configs.monsterLevelTierCategory.experienceTierPower) / Configs.monsterLevelTierCategory.experienceTierDivisor + 1) + 0.5;\n double rarityMultiplier = (Math.pow(rarity, Configs.monsterLevelTierCategory.experienceRarityPower) / Configs.monsterLevelTierCategory.experienceRarityDivisor + 1) + 0.5;\n int multiplier = (int) ((tierMultiplier * rarityMultiplier + 1) / Configs.monsterLevelTierCategory.experienceDivisor);\n experience = (int) (Math.pow(baseFactor, enemyLevel + 1) * (Configs.monsterLevelTierCategory.baseExperience + multiplier));\n }\n playerInfo.setPlayerExperience(playerInfo.getPlayerExperience() + experience);\n SPacketTitle packetActionbar = new SPacketTitle(SPacketTitle.Type.ACTIONBAR, new TextComponentString(\"String_Node_Str\" + enemy.getName() + \"String_Node_Str\" + experience + \"String_Node_Str\"), -1, -1, -1);\n ((EntityPlayerMP) player).connection.sendPacket(packetActionbar);\n while (playerInfo.getPlayerExperience() > getLevelUpExperience(playerInfo.getPlayerLevel())) {\n int leftOverExperience = playerInfo.getPlayerExperience() - getLevelUpExperience(playerInfo.getPlayerLevel());\n int skillPoints = 0;\n playerInfo.setPlayerLevel(playerInfo.getPlayerLevel() + 1);\n playerInfo.setPlayerExperience(leftOverExperience);\n if (Configs.playerCategory.useTieredSkillPointDistribution) {\n if (playerInfo.getPlayerLevel() % 10 == 0)\n skillPoints = Configs.playerCategory.skillPointsPer10Levels;\n else if (playerInfo.getPlayerLevel() % 5 == 0)\n skillPoints = Configs.playerCategory.skillPointsPer5Levels;\n else\n skillPoints = Configs.playerCategory.skillPointsPerLevel;\n } else {\n skillPoints = Configs.playerCategory.skillPointsPerLevel;\n }\n SPacketTitle packetTitle = new SPacketTitle(SPacketTitle.Type.TITLE, new TextComponentString(\"String_Node_Str\" + playerInfo.getPlayerLevel()));\n SPacketTitle packetSubtitle = new SPacketTitle(SPacketTitle.Type.SUBTITLE, new TextComponentString(\"String_Node_Str\" + skillPoints + \"String_Node_Str\"));\n ((EntityPlayerMP) player).connection.sendPacket(packetTitle);\n ((EntityPlayerMP) player).connection.sendPacket(packetSubtitle);\n if (Configs.playerCategory.spawnLevelUpParticles) {\n spawnLevelUpParticles(player.getEntityWorld(), player, playerInfo.getPlayerLevel());\n }\n playerInfo.setSkillPoints(playerInfo.getSkillPoints() + skillPoints);\n }\n LootSlashConquer.network.sendTo(new PacketUpdatePlayerInformation(playerInfo), (EntityPlayerMP) player);\n}\n"
"public HE_Mesh createBase() {\n final HE_Mesh result = new HE_Mesh();\n if ((source == null) || (source.getNumberOfFaces() < 3)) {\n return result;\n }\n final HashMap<Long, Long> faceVertexCorrelation = new HashMap<Long, Long>();\n final Iterator<HE_Face> fItr = source.fItr();\n HE_Face f;\n while (fItr.hasNext()) {\n f = fItr.next();\n final HE_Vertex cv = new HE_Vertex(f.getFaceCenter());\n faceVertexCorrelation.put(f.key(), cv.key());\n result.add(cv);\n }\n HE_Halfedge he;\n if (keepBoundary) {\n final Iterator<HE_Halfedge> heItr = source.heItr();\n while (heItr.hasNext()) {\n he = heItr.next();\n if (he.isOuterBoundary()) {\n HE_Vertex cv = new HE_Vertex(he.getEdgeCenter());\n faceVertexCorrelation.put(he.key(), cv.key());\n result.add(cv);\n cv = new HE_Vertex(he.getVertex());\n faceVertexCorrelation.put(he.getVertex().key(), cv.key());\n result.add(cv);\n }\n }\n }\n final Iterator<HE_Vertex> vItr = source.vItr();\n HE_Vertex v;\n final List<WB_Point> centers = new ArrayList<WB_Point>();\n while (vItr.hasNext()) {\n v = vItr.next();\n if (!v.isBoundary()) {\n he = v.getHalfedge();\n final List<HE_Halfedge> faceHalfedges = new ArrayList<HE_Halfedge>();\n final HE_Face nf = new HE_Face();\n final WB_Point p = new WB_Point();\n int n = 0;\n do {\n final HE_Halfedge hen = new HE_Halfedge();\n faceHalfedges.add(hen);\n result.setFace(hen, nf);\n final Long key = faceVertexCorrelation.get(he.getFace().key());\n result.setVertex(hen, result.getVertexWithKey(key));\n p.addSelf(hen.getVertex());\n n++;\n if (hen.getVertex().getHalfedge() == null) {\n result.setHalfedge(hen.getVertex(), hen);\n }\n if (nf.getHalfedge() == null) {\n result.setHalfedge(nf, hen);\n }\n he = he.getNextInVertex();\n } while (he != v.getHalfedge());\n p.divSelf(n);\n centers.add(p);\n result.cycleHalfedges(faceHalfedges);\n result.addHalfedges(faceHalfedges);\n result.add(nf);\n } else if (keepBoundary) {\n he = v.getHalfedge();\n while (!he.isOuterBoundary()) {\n he = he.getNextInVertex();\n }\n HE_Halfedge start = he;\n final List<HE_Halfedge> faceHalfedges = new ArrayList<HE_Halfedge>();\n final HE_Face nf = new HE_Face();\n final WB_Point p = new WB_Point();\n int n = 0;\n HE_Halfedge hen = new HE_Halfedge();\n faceHalfedges.add(hen);\n result.setFace(hen, nf);\n Long key = faceVertexCorrelation.get(v.key());\n result.setVertex(hen, result.getVertexWithKey(key));\n p.addSelf(hen.getVertex());\n n++;\n hen = new HE_Halfedge();\n faceHalfedges.add(hen);\n result.setFace(hen, nf);\n key = faceVertexCorrelation.get(he.key());\n result.setVertex(hen, result.getVertexWithKey(key));\n p.addSelf(hen.getVertex());\n n++;\n result.setHalfedge(hen.getVertex(), hen);\n result.setHalfedge(nf, hen);\n he = he.getNextInVertex();\n do {\n hen = new HE_Halfedge();\n faceHalfedges.add(hen);\n result.setFace(hen, nf);\n key = (he.isOuterBoundary()) ? faceVertexCorrelation.get(he.key()) : faceVertexCorrelation.get(he.getFace().key());\n result.setVertex(hen, result.getVertexWithKey(key));\n p.addSelf(hen.getVertex());\n n++;\n he = he.getNextInVertex();\n } while (he != start);\n he = he.getPrevInVertex();\n hen = new HE_Halfedge();\n faceHalfedges.add(hen);\n result.setFace(hen, nf);\n key = faceVertexCorrelation.get(he.getPair().key());\n result.setVertex(hen, result.getVertexWithKey(key));\n p.addSelf(hen.getVertex());\n n++;\n p.divSelf(n);\n centers.add(p);\n result.cycleHalfedges(faceHalfedges);\n result.addHalfedges(faceHalfedges);\n result.add(nf);\n }\n }\n result.pairHalfedges();\n result.capHalfedges();\n if (setCenter) {\n result.moveTo(source.getCenter());\n }\n result.flipFaces();\n final List<HE_Face> faces = result.getFaces();\n final int fs = faces.size();\n for (int i = 0; i < fs; i++) {\n if (!faces.get(i).isPlanar() && fixNonPlanarFaces) {\n HEM_TriSplit.splitFaceTri(result, faces.get(i), centers.get(i));\n }\n }\n return result;\n}\n"
"private Model createModel(File pomFile) {\n FileInputStream fileInputStream = null;\n Exception ex = null;\n Model model = null;\n try {\n MavenXpp3Reader reader = new MavenXpp3Reader();\n fileInputStream = new FileInputStream(pomFile);\n model = reader.read(fileInputStream);\n if (model.getGroupId() == null)\n model.setGroupId(model.getParent().getGroupId());\n if (model.getVersion() == null)\n model.setVersion(model.getParent().getVersion());\n model.setPomFile(pomFile);\n } catch (Exception e) {\n ex = e;\n String exceptionMessage = String.format(\"String_Node_Str\", pomFile.getAbsolutePath());\n throw new TransformationUtilityException(exceptionMessage, ex);\n } finally {\n if (fileInputStream != null)\n try {\n fileInputStream.close();\n } catch (IOException e) {\n if (ex != null)\n ex.addSuppressed(e);\n }\n }\n return model;\n}\n"
"public void paintContent(PaintTarget target) throws PaintException {\n super.paintContent(target);\n target.startTag(\"String_Node_Str\");\n target.addAttribute(\"String_Node_Str\", filtersVisible);\n target.addAttribute(\"String_Node_Str\", reRenderFilterFields);\n reRenderFilterFields = false;\n if (filtersVisible) {\n for (Object key : getColumnIdToFilterMap().keySet()) {\n if (columnIdToFilterMap.get(key) != null && columnIdToFilterMap.get(key).getParent() == null) {\n continue;\n }\n System.err.println(\"String_Node_Str\" + key);\n target.startTag(\"String_Node_Str\" + columnIdMap.key(key));\n target.addAttribute(\"String_Node_Str\", columnIdMap.key(key));\n Component c = getColumnIdToFilterMap().get(key);\n LegacyPaint.paint(c, target);\n target.endTag(\"String_Node_Str\" + columnIdMap.key(key));\n }\n }\n target.endTag(\"String_Node_Str\");\n}\n"
"static public Class loadClass(Properties properties) throws ClassNotFoundException, IOException {\n String className = properties.getProperty(\"String_Node_Str\");\n if (className == null) {\n throw new IOException(\"String_Node_Str\");\n }\n Class<?> clazz = null;\n ClassLoader loader = Thread.currentThread().getContextClassLoader();\n if (loader != null) {\n try {\n clazz = loader.loadClass(className);\n } catch (ClassNotFoundException e) {\n }\n }\n if (clazz == null) {\n clazz = FactoryFinder.class.getClassLoader().loadClass(className);\n }\n return clazz;\n}\n"
"public boolean isUnauthorized() {\n return entity != null && entity.isUnauthorized();\n}\n"
"private static Date toDateISO8601(String source) throws BirtException {\n Date resultDate = null;\n try {\n resultDate = DateFormatISO8601.parse(source, timeZone);\n return resultDate;\n } catch (ParseException e1) {\n throw new CoreException(ResourceConstants.CONVERT_FAILS, new Object[] { source.toString(), \"String_Node_Str\" });\n }\n}\n"
"public void execute(final CommandSender sender, final CommandArgs args) {\n float amount = 0;\n Player target = null;\n boolean self = false;\n if (0 < args.length && args.length < 2) {\n if (Utils.isPlayer(sender, true)) {\n target = (Player) sender;\n self = true;\n if (!args.hasFlag('t'))\n try {\n amount = args.getFloat(0);\n } catch (final NumberFormatException e) {\n final HashMap<String, String> replace = new HashMap<String, String>();\n replace.put(\"String_Node_Str\", args.getString(0));\n Utils.I18n(\"String_Node_Str\", replace);\n return;\n }\n } else\n return;\n } else {\n target = Utils.getPlayer(args.getString(0));\n if (!args.hasFlag('t'))\n try {\n amount = args.getFloat(1);\n } catch (final NumberFormatException e) {\n final HashMap<String, String> replace = new HashMap<String, String>();\n replace.put(\"String_Node_Str\", args.getString(0));\n Utils.I18n(\"String_Node_Str\", replace);\n return;\n }\n }\n if (target == null)\n return;\n final HashMap<String, String> replace = new HashMap<String, String>();\n replace.put(\"String_Node_Str\", String.valueOf(amount));\n final Player taskTarget = target;\n final float amountXp = amount;\n if (args.hasFlag('d')) {\n final Location loc = target.getLocation();\n loc.setX(loc.getX() + 2);\n ACPluginManager.scheduleSyncTask(new Runnable() {\n public void run() {\n taskTarget.getLocation().getWorld().spawn(loc, ExperienceOrb.class).setExperience((int) amountXp);\n }\n });\n if (self) {\n target.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n } else {\n replace.put(\"String_Node_Str\", Utils.getPlayerName(target));\n target.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n sender.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n }\n } else if (args.hasFlag('a')) {\n ACPluginManager.scheduleSyncTask(new Runnable() {\n public void run() {\n taskTarget.giveExp((int) amountXp);\n }\n });\n if (self) {\n target.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n } else {\n replace.put(\"String_Node_Str\", Utils.getPlayerName(target));\n sender.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n target.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n }\n } else if (args.hasFlag('p')) {\n final float exp = (amount > 1 ? 1 : amount);\n ACPluginManager.scheduleSyncTask(new Runnable() {\n public void run() {\n taskTarget.setExp(exp);\n }\n });\n replace.put(\"String_Node_Str\", String.valueOf(exp * 100.0F));\n if (self) {\n target.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n } else {\n replace.put(\"String_Node_Str\", Utils.getPlayerName(target));\n target.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n sender.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n }\n } else if (args.hasFlag('l')) {\n ACPluginManager.scheduleSyncTask(new Runnable() {\n public void run() {\n taskTarget.setLevel((int) amountXp);\n }\n });\n if (self) {\n target.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n } else {\n replace.put(\"String_Node_Str\", Utils.getPlayerName(target));\n target.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n sender.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n }\n } else if (args.hasFlag('t')) {\n replace.put(\"String_Node_Str\", String.valueOf(target.getTotalExperience()));\n if (self) {\n sender.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n } else {\n replace.put(\"String_Node_Str\", Utils.getPlayerName(target));\n sender.sendMessage(Utils.I18n(\"String_Node_Str\", replace));\n }\n }\n}\n"
"public void testSimpleTypeWithUnionTypes() {\n String f = \"String_Node_Str\";\n String xmlSchema = getSchema(f);\n List types = xsdHelper.define(xmlSchema);\n this.assertEquals(3, types.size());\n for (int i = 0; i < types.size(); i++) {\n Type type = (Type) types.get(i);\n if (type.getName().equals(\"String_Node_Str\")) {\n assertEquals(type.getName(), \"String_Node_Str\");\n assertFalse(type.isAbstract());\n assertEquals(ClassConstants.BIGDECIMAL, type.getInstanceClass());\n assertEquals(0, type.getBaseTypes().size());\n assertTrue(type.isDataType());\n assertEquals(type.getURI(), \"String_Node_Str\");\n }\n }\n for (int i = 0; i < types.size(); i++) {\n Type type = (Type) types.get(0);\n if (type.getName().equals(\"String_Node_Str\")) {\n assertEquals(type.getName(), \"String_Node_Str\");\n assertFalse(type.isAbstract());\n assertEquals(ClassConstants.BIGDECIMAL, type.getInstanceClass());\n assertEquals(1, type.getBaseTypes().size());\n assertTrue(type.isDataType());\n assertEquals(type.getURI(), \"String_Node_Str\");\n }\n }\n for (int i = 0; i < types.size(); i++) {\n Type type = (Type) types.get(0);\n if (type.getName().equals(\"String_Node_Str\")) {\n assertEquals(type.getName(), \"String_Node_Str\");\n assertFalse(type.isAbstract());\n assertEquals(1, type.getDeclaredProperties().size());\n assertEquals(type.getURI(), \"String_Node_Str\");\n SDOProperty prop = (SDOProperty) type.getDeclaredProperties().get(0);\n assertEquals(\"String_Node_Str\", prop.getName());\n assertEquals(\"String_Node_Str\", prop.getType().getName());\n assertEquals(BigInteger.class, prop.getType().getInstanceClass());\n }\n }\n}\n"
"public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, final int i) {\n if (i == VIEW_TYPES.HEADER && mHeader != null) {\n return new ViewHolder(mHeader);\n if (i == VIEW_TYPES.FIRST_VIEW && mHeader != null && mRecyclerView != null) {\n final RecyclerView.ViewHolder holder = mRecyclerView.findViewHolderForAdapterPosition(0);\n if (holder != null) {\n translateHeader(-holder.itemView.getTop());\n }\n }\n final RecyclerView.ViewHolder holder = onCreateViewHolderImpl(viewGroup, this, i);\n if (mOnClickEvent != null) {\n holder.itemView.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n mOnClickEvent.onClick(v, holder.getAdapterPosition() - (mHeader == null ? 0 : 1));\n }\n });\n }\n return holder;\n}\n"
"private void doCalculate(int functionIndex) throws DataException {\n for (int i = 0; i < currentRowList.size(); i++) {\n if (!getFilterResult(currentRowList.get(i), functionIndex))\n continue;\n while (currentRowList.get(i).nextMeasures()) {\n Object[] para = getAccumulatorParameter(currentRowList.get(i), functionIndex);\n for (int j = 0; j < currentFilterList[functionIndex].size(); j++) {\n this.accumulators[currentFilterList[functionIndex].get(j).cellPosition][functionIndex].onRow(para);\n }\n }\n }\n}\n"
"private IStatus handleException(IProgressMonitor monitor, Exception e, String message) {\n monitor.done();\n System.out.println(message);\n e.printStackTrace();\n TacitFormComposite.updateStatusMessage(getViewSite(), message + e.getMessage(), IStatus.ERROR, form);\n return Status.CANCEL_STATUS;\n}\n"
"public static void initSessionAttributes() {\n Logger logger = GuiUtil.getLogger();\n if (logger.isLoggable(Level.INFO)) {\n logger.log(Level.INFO, GuiUtil.getCommonMessage(\"String_Node_Str\"));\n }\n ExternalContext externalCtx = FacesContext.getCurrentInstance().getExternalContext();\n Map<String, Object> sessionMap = externalCtx.getSessionMap();\n if (logger.isLoggable(Level.FINE)) {\n logger.log(Level.INFO, \"String_Node_Str\" + sessionMap.toString());\n }\n Object request = externalCtx.getRequest();\n if (request instanceof javax.servlet.ServletRequest) {\n ServletRequest srequest = (ServletRequest) request;\n sessionMap.put(\"String_Node_Str\", srequest.getServerName());\n String restServerName = (String) sessionMap.get(AdminConsoleAuthModule.REST_SERVER_NAME);\n if (restServerName == null) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n int port = (Integer) sessionMap.get(AdminConsoleAuthModule.REST_SERVER_PORT);\n sessionMap.put(\"String_Node_Str\", srequest.isSecure());\n sessionMap.put(\"String_Node_Str\", \"String_Node_Str\" + (srequest.isSecure() ? \"String_Node_Str\" : \"String_Node_Str\") + \"String_Node_Str\" + restServerName + \"String_Node_Str\" + port + \"String_Node_Str\");\n sessionMap.put(\"String_Node_Str\", \"String_Node_Str\" + (srequest.isSecure() ? \"String_Node_Str\" : \"String_Node_Str\") + \"String_Node_Str\" + restServerName + \"String_Node_Str\" + port + \"String_Node_Str\");\n } else {\n sessionMap.put(\"String_Node_Str\", \"String_Node_Str\");\n }\n final String domainName = RestUtil.getPropValue((String) (sessionMap.get(\"String_Node_Str\")), \"String_Node_Str\", null);\n sessionMap.put(\"String_Node_Str\", domainName);\n sessionMap.put(\"String_Node_Str\", \"String_Node_Str\" + domainName);\n sessionMap.put(\"String_Node_Str\", (System.getProperty(\"String_Node_Str\", \"String_Node_Str\").equals(\"String_Node_Str\")) ? Boolean.TRUE : Boolean.FALSE);\n sessionMap.put(\"String_Node_Str\", Boolean.FALSE);\n Map version = RestUtil.restRequest(sessionMap.get(\"String_Node_Str\") + \"String_Node_Str\", null, \"String_Node_Str\", null, false);\n sessionMap.put(\"String_Node_Str\", ((Map) version.get(\"String_Node_Str\")).get(\"String_Node_Str\"));\n Map locations = RestUtil.restRequest(sessionMap.get(\"String_Node_Str\") + \"String_Node_Str\", null, \"String_Node_Str\", null, false);\n final String installDir = (String) ((Map) ((Map) locations.get(\"String_Node_Str\")).get(\"String_Node_Str\")).get(\"String_Node_Str\");\n sessionMap.put(\"String_Node_Str\", installDir);\n sessionMap.put(\"String_Node_Str\", (new File(installDir)).getParent());\n Map runtimeInfoMap = RestUtil.restRequest(sessionMap.get(\"String_Node_Str\") + \"String_Node_Str\", null, \"String_Node_Str\", null, false);\n String debugFlag = (String) ((Map) ((Map) runtimeInfoMap.get(\"String_Node_Str\")).get(\"String_Node_Str\")).get(\"String_Node_Str\");\n if (\"String_Node_Str\".equals(debugFlag)) {\n String debugPort = (String) ((Map) ((Map) runtimeInfoMap.get(\"String_Node_Str\")).get(\"String_Node_Str\")).get(\"String_Node_Str\");\n sessionMap.put(\"String_Node_Str\", GuiUtil.getMessage(\"String_Node_Str\") + debugPort);\n } else {\n sessionMap.put(\"String_Node_Str\", GuiUtil.getMessage(\"String_Node_Str\"));\n }\n try {\n Map secureAdminAttrs = RestUtil.getAttributesMap(sessionMap.get(\"String_Node_Str\") + \"String_Node_Str\");\n if (Boolean.parseBoolean((String) secureAdminAttrs.get(\"String_Node_Str\"))) {\n sessionMap.put(\"String_Node_Str\", \"String_Node_Str\");\n } else {\n sessionMap.put(\"String_Node_Str\", \"String_Node_Str\");\n }\n } catch (Exception ex) {\n sessionMap.put(\"String_Node_Str\", \"String_Node_Str\");\n }\n Map asadminRecorderEnabled = RestUtil.restRequest(sessionMap.get(\"String_Node_Str\") + \"String_Node_Str\", null, \"String_Node_Str\", null, false);\n sessionMap.put(\"String_Node_Str\", !(boolean) ((Map) ((Map) asadminRecorderEnabled.get(\"String_Node_Str\")).get(\"String_Node_Str\")).get(\"String_Node_Str\"));\n sessionMap.put(\"String_Node_Str\", (boolean) ((Map) ((Map) asadminRecorderEnabled.get(\"String_Node_Str\")).get(\"String_Node_Str\")).get(\"String_Node_Str\"));\n sessionMap.put(\"String_Node_Str\", GuiUtil.getMessage(\"String_Node_Str\"));\n sessionMap.put(\"String_Node_Str\", GuiUtil.getMessage(\"String_Node_Str\"));\n sessionMap.put(\"String_Node_Str\", GuiUtil.getMessage(\"String_Node_Str\"));\n sessionMap.put(\"String_Node_Str\", GuiUtil.getMessage(\"String_Node_Str\"));\n sessionMap.put(\"String_Node_Str\", GuiUtil.getMessage(\"String_Node_Str\"));\n sessionMap.put(\"String_Node_Str\", \"String_Node_Str\");\n sessionMap.put(\"String_Node_Str\", Boolean.FALSE);\n try {\n Map result = RestUtil.restRequest(GuiUtil.getSessionValue(\"String_Node_Str\") + \"String_Node_Str\", null, \"String_Node_Str\", null, false);\n String timeOut = (String) ((Map) ((Map) ((Map) result.get(\"String_Node_Str\")).get(\"String_Node_Str\")).get(\"String_Node_Str\")).get(\"String_Node_Str\");\n if ((timeOut != null) && (!timeOut.equals(\"String_Node_Str\"))) {\n int time = Integer.parseInt(timeOut);\n if (time == 0) {\n ((HttpServletRequest) request).getSession().setMaxInactiveInterval(-1);\n } else {\n ((HttpServletRequest) request).getSession().setMaxInactiveInterval(time * 60);\n }\n }\n } catch (Exception nfe) {\n ((HttpServletRequest) request).getSession().setMaxInactiveInterval(-1);\n GuiUtil.getLogger().info(GuiUtil.getCommonMessage(\"String_Node_Str\") + nfe.getLocalizedMessage());\n if (GuiUtil.getLogger().isLoggable(Level.FINE)) {\n nfe.printStackTrace();\n }\n }\n try {\n setTimeStamp();\n } catch (Exception ex) {\n logger.log(Level.FINE, ex.getMessage());\n }\n}\n"
"public void visit(NodeTraversal t, Node n, Node parent) {\n if (n.isName()) {\n Var dep = jsScope.getVar(n.getString());\n if (dep == null) {\n def.unknownDependencies = true;\n } else {\n def.depends.add(dep);\n }\n }\n}\n"
"public void fetchstock(String stockName, boolean inBackground) {\n if (!inBackground)\n stockView.showLoading();\n fetchSubsciption = stockDataRepository.getStock(stockName).observeOn(AndroidSchedulers.mainThread(), true).subscribe(stock -> {\n stockView.onStockFetched(stock);\n }, throwable -> {\n throwable.printStackTrace();\n }));\n}\n"
"public Duration getSpeed() {\n Duration speed = Duration.valueOf(getString(\"String_Node_Str\", null));\n if (speed == null)\n speed = new Duration(((double) Settings.InteractDelayInTicks() / 20));\n return speed;\n}\n"
"protected SaveImageInBackgroundData doInBackground(SaveImageInBackgroundData... params) {\n if (params.length != 1)\n return null;\n if (isCancelled()) {\n params[0].clearImage();\n params[0].clearContext();\n return null;\n }\n Process.setThreadPriority(Process.THREAD_PRIORITY_FOREGROUND);\n Context context = params[0].context;\n Bitmap image = params[0].image;\n Resources r = context.getResources();\n try {\n mScreenshotDir.mkdirs();\n ContentValues values = new ContentValues();\n ContentResolver resolver = context.getContentResolver();\n values.put(MediaStore.Images.ImageColumns.DATA, mImageFilePath);\n values.put(MediaStore.Images.ImageColumns.TITLE, mImageFileName);\n values.put(MediaStore.Images.ImageColumns.DISPLAY_NAME, mImageFileName);\n values.put(MediaStore.Images.ImageColumns.DATE_TAKEN, mImageTime);\n values.put(MediaStore.Images.ImageColumns.DATE_ADDED, mImageTime);\n values.put(MediaStore.Images.ImageColumns.DATE_MODIFIED, mImageTime);\n values.put(MediaStore.Images.ImageColumns.MIME_TYPE, \"String_Node_Str\");\n values.put(MediaStore.Images.ImageColumns.WIDTH, mImageWidth);\n values.put(MediaStore.Images.ImageColumns.HEIGHT, mImageHeight);\n Uri uri = resolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);\n String subjectDate = new SimpleDateFormat(\"String_Node_Str\").format(new Date(mImageTime));\n String subject = String.format(SCREENSHOT_SHARE_SUBJECT_TEMPLATE, subjectDate);\n Intent sharingIntent = new Intent(Intent.ACTION_SEND);\n sharingIntent.setType(\"String_Node_Str\");\n sharingIntent.putExtra(Intent.EXTRA_STREAM, uri);\n sharingIntent.putExtra(Intent.EXTRA_SUBJECT, subject);\n Intent chooserIntent = Intent.createChooser(sharingIntent, null);\n chooserIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);\n mNotificationBuilder.addAction(R.drawable.ic_menu_share, r.getString(com.android.internal.R.string.share), PendingIntent.getActivity(context, 0, chooserIntent, PendingIntent.FLAG_CANCEL_CURRENT));\n OutputStream out = resolver.openOutputStream(uri);\n image.compress(Bitmap.CompressFormat.PNG, 100, out);\n out.flush();\n out.close();\n values.clear();\n values.put(MediaStore.Images.ImageColumns.SIZE, new File(mImageFilePath).length());\n resolver.update(uri, values, null, null);\n params[0].imageUri = uri;\n params[0].image = null;\n params[0].result = 0;\n } catch (Exception e) {\n params[0].clearImage();\n params[0].result = 1;\n Log.d(TAG, \"String_Node_Str\");\n }\n if (image != null) {\n image.recycle();\n }\n Log.d(TAG, \"String_Node_Str\");\n return params[0];\n}\n"
"private void handleExceptions(Stack stack, List<ResourceRequestResult> failedResourceRequestResult) {\n for (ResourceRequestResult exception : failedResourceRequestResult) {\n List<Resource> resourceList = new ArrayList<>();\n LOGGER.error(\"String_Node_Str\", exception.getException().orNull().getMessage());\n resourceList.addAll(collectFailedResources(stack.getId(), exception.getResources()));\n resourceList.addAll(collectFailedResources(stack.getId(), exception.getBuiltResources()));\n if (!resourceList.isEmpty()) {\n LOGGER.info(\"String_Node_Str\", stack.getId(), resourceList.size());\n doRollback(stack, resourceList);\n }\n }\n}\n"
"private List<BoundedSource<ResultOutputType>> split(long regionSize, long desiredBundleSizeBytes, byte[] startKey, byte[] stopKey) {\n Preconditions.checkState(desiredBundleSizeBytes > 0);\n int splitCount = (int) Math.ceil((double) (regionSize) / (double) (desiredBundleSizeBytes));\n if (splitCount < 2 || stopKey.length == 0) {\n return Collections.singletonList(createSourceWithKeys(startKey, stopKey, regionSize));\n } else {\n Preconditions.checkState(desiredBundleSizeBytes > 0);\n if (stopKey.length > 0) {\n Preconditions.checkState(Bytes.compareTo(startKey, stopKey) <= 0, \"String_Node_Str\", Bytes.toStringBinary(startKey), Bytes.toStringBinary(stopKey));\n Preconditions.checkState(regionSize > 0, \"String_Node_Str\", regionSize);\n }\n int splitCount = (int) Math.ceil((double) (regionSize) / (double) (desiredBundleSizeBytes));\n byte[][] splitKeys = Bytes.split(startKey, stopKey, splitCount - 1);\n Preconditions.checkState(splitCount + 1 == splitKeys.length);\n List<BoundedSource<ResultOutputType>> result = new ArrayList<>();\n for (int i = 0; i < splitCount; i++) {\n result.add(createSourceWithKeys(splitKeys[i], splitKeys[i + 1], regionSize));\n }\n return result;\n }\n}\n"
"public void validateCustomParameters(ServiceOfferingVO serviceOffering, Map<String, String> customParameters) {\n if (customParameters.size() != 0) {\n if (serviceOffering.getCpu() == null) {\n String cpuNumber = customParameters.get(UsageEventVO.DynamicParameters.cpuNumber.name());\n if ((cpuNumber == null) || (NumbersUtil.parseInt(cpuNumber, -1) <= 0)) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n } else if (customParameters.containsKey(UsageEventVO.DynamicParameters.cpuNumber.name())) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + serviceOffering.getId() + \"String_Node_Str\");\n }\n if (serviceOffering.getSpeed() == null) {\n String cpuSpeed = customParameters.get(UsageEventVO.DynamicParameters.cpuSpeed.name());\n if ((cpuSpeed == null) || (NumbersUtil.parseInt(cpuSpeed, -1) <= 0 || NumbersUtil.parseInt(cpuSpeed, -1) > 2147483647)) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n } else if (customParameters.containsKey(UsageEventVO.DynamicParameters.cpuSpeed.name())) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + serviceOffering.getId() + \"String_Node_Str\");\n }\n if (serviceOffering.getRamSize() == null) {\n String memory = customParameters.get(UsageEventVO.DynamicParameters.memory.name());\n if (memory == null || (NumbersUtil.parseInt(memory, -1) < 32 || NumbersUtil.parseInt(memory, -1) > 2147483647)) {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n } else if (customParameters.containsKey(UsageEventVO.DynamicParameters.memory.name())) {\n throw new InvalidParameterValueException(\"String_Node_Str\" + serviceOffering.getId() + \"String_Node_Str\");\n }\n } else {\n throw new InvalidParameterValueException(\"String_Node_Str\");\n }\n}\n"