content
stringlengths 40
137k
|
---|
"private void listPluginInfoForSender(ICommandSender sender, String[] arguments) {\n if (arguments.length < 3)\n throw new WrongUsageException(\"String_Node_Str\" + getCommandName() + \"String_Node_Str\");\n IPlugin found = null;\n for (IPlugin plugin : PluginManager.plugins) {\n PluginInfo info = plugin.getClass().getAnnotation(PluginInfo.class);\n if (info == null)\n continue;\n if ((info.pluginID().equalsIgnoreCase(arguments[2]) || info.name().equalsIgnoreCase(arguments[2]))) {\n found = plugin;\n break;\n }\n }\n if (found == null)\n throw new CommandException(StringUtil.localizeAndFormat(\"String_Node_Str\", arguments[2]));\n String entry = \"String_Node_Str\";\n if (found.isAvailable())\n entry = \"String_Node_Str\";\n PluginInfo info = found.getClass().getAnnotation(PluginInfo.class);\n if (info != null) {\n sendChatMessage(sender, entry + \"String_Node_Str\" + info.name());\n if (!info.version().isEmpty())\n sendChatMessage(sender, \"String_Node_Str\" + info.version());\n if (!info.author().isEmpty())\n sendChatMessage(sender, \"String_Node_Str\" + info.author());\n if (!info.url().isEmpty())\n sendChatMessage(sender, \"String_Node_Str\" + info.url());\n if (!info.description().isEmpty())\n sendChatMessage(sender, info.description());\n }\n}\n"
|
"private Set filterParticipatingUniqueNamesInRecoveredXids(Set uniqueNames) {\n Set recoveredUniqueNames = new HashSet();\n Iterator it = uniqueNames.iterator();\n while (it.hasNext()) {\n String uniqueName = (String) it.next();\n if (log.isDebugEnabled())\n log.debug(\"String_Node_Str\" + uniqueName);\n Set recoveredXids = (Set) recoveredXidSets.get(uniqueName);\n if (recoveredXids == null) {\n if (log.isDebugEnabled())\n log.debug(\"String_Node_Str\" + uniqueName + \"String_Node_Str\");\n } else {\n recoveredUniqueNames.add(uniqueName);\n }\n }\n return recoveredUniqueNames;\n}\n"
|
"public void apply() throws Exception {\n PartitionOutput partitionOutput = dataset.getPartitionOutput(PARTITION_KEY);\n ImmutableMap<String, String> originalEntries = ImmutableMap.of(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n partitionOutput.setMetadata(originalEntries);\n partitionOutput.addPartition();\n ImmutableMap<String, String> updatedMetadata = ImmutableMap.of(\"String_Node_Str\", \"String_Node_Str\");\n dataset.addMetadata(PARTITION_KEY, updatedMetadata);\n PartitionDetail partitionDetail = dataset.getPartition(PARTITION_KEY);\n Assert.assertNotNull(partitionDetail);\n HashMap<String, String> combinedEntries = Maps.newHashMap();\n combinedEntries.putAll(originalEntries);\n combinedEntries.putAll(updatedMetadata);\n Assert.assertEquals(combinedEntries, partitionDetail.getMetadata().asMap());\n dataset.setMetadata(PARTITION_KEY, Collections.singletonMap(\"String_Node_Str\", \"String_Node_Str\"));\n partitionDetail = dataset.getPartition(PARTITION_KEY);\n Assert.assertNotNull(partitionDetail);\n Assert.assertEquals(ImmutableMap.of(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"), partitionDetail.getMetadata().asMap());\n dataset.removeMetadata(PARTITION_KEY, ImmutableSet.of(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\"));\n partitionDetail = dataset.getPartition(PARTITION_KEY);\n Assert.assertNotNull(partitionDetail);\n Assert.assertEquals(ImmutableMap.of(\"String_Node_Str\", \"String_Node_Str\"), partitionDetail.getMetadata().asMap());\n try {\n PartitionKey nonexistentPartitionKey = PartitionKey.builder().addIntField(\"String_Node_Str\", 42).addLongField(\"String_Node_Str\", 17L).addStringField(\"String_Node_Str\", \"String_Node_Str\").build();\n dataset.addMetadata(nonexistentPartitionKey, \"String_Node_Str\", \"String_Node_Str\");\n Assert.fail(\"String_Node_Str\");\n } catch (DataSetException expected) {\n }\n}\n"
|
"public void update() {\n FormEditor editor = UIUtil.getActiveReportEditor();\n setEnabled(editor != null);\n if (editor != null && editor.getActivePageInstance() != null && editor.getActivePageInstance().getId() != null) {\n setChecked(editor.getActivePageInstance().getId().equals(pageId));\n }\n}\n"
|
"public boolean exists() {\n ModelClass model = toModel();\n return model != null && mModelAdapter.exists(model);\n}\n"
|
"public void onPlayerDeath(PlayerDeathEvent event) {\n if (event.getEntity().getKiller() == null) {\n return;\n }\n if (EarthArmor.instances.containsKey(event.getEntity())) {\n List<ItemStack> drops = event.getDrops();\n List<ItemStack> newdrops = new ArrayList<ItemStack>();\n for (int i = 0; i < drops.size(); i++) {\n if (!(drops.get(i).getType() == Material.LEATHER_BOOTS || drops.get(i).getType() == Material.LEATHER_CHESTPLATE || drops.get(i).getType() == Material.LEATHER_HELMET || drops.get(i).getType() == Material.LEATHER_LEGGINGS || drops.get(i).getType() == Material.AIR))\n newdrops.add((drops.get(i)));\n }\n if (EarthArmor.instances.get(event.getEntity()).oldarmor != null) {\n for (ItemStack is : EarthArmor.instances.get(event.getEntity()).oldarmor) {\n if (!(is.getType() == Material.AIR))\n newdrops.add(is);\n }\n }\n event.getDrops().clear();\n event.getDrops().addAll(newdrops);\n EarthArmor.removeEffect(event.getEntity());\n }\n if (MetalClips.instances.containsKey(event.getEntity())) {\n MetalClips.instances.get(event.getEntity()).remove();\n List<ItemStack> drops = event.getDrops();\n List<ItemStack> newdrops = new ArrayList<ItemStack>();\n for (int i = 0; i < drops.size(); i++) {\n if (!(drops.get(i).getType() == Material.IRON_HELMET || drops.get(i).getType() == Material.IRON_CHESTPLATE || drops.get(i).getType() == Material.IRON_LEGGINGS || drops.get(i).getType() == Material.IRON_BOOTS || drops.get(i).getType() == Material.AIR))\n newdrops.add((drops.get(i)));\n }\n event.getDrops().clear();\n event.getDrops().addAll(newdrops);\n }\n if (bendingDeathPlayer.containsKey(event.getEntity())) {\n String message = ConfigManager.deathMsgConfig.getConfig().getString(\"String_Node_Str\");\n String ability = bendingDeathPlayer.get(event.getEntity());\n String element = null;\n if (GeneralMethods.abilityExists(ability)) {\n element = GeneralMethods.getAbilityElement(ability).name();\n }\n if (ComboManager.checkForValidCombo(event.getEntity().getKiller()) != null) {\n String combo = ComboManager.checkForValidCombo(event.getEntity().getKiller()).getName();\n if (combo != null && !combo.isEmpty() && combo.equalsIgnoreCase(ability)) {\n element = GeneralMethods.getAbilityElement(GeneralMethods.getLastUsedAbility(event.getEntity().getKiller(), false)).name();\n ability = element + \"String_Node_Str\";\n }\n }\n if (ConfigManager.deathMsgConfig.getConfig().contains(element + \"String_Node_Str\" + ability)) {\n message = ConfigManager.deathMsgConfig.getConfig().getString(element + \"String_Node_Str\" + ability);\n }\n message = message.replace(\"String_Node_Str\", event.getEntity().getName()).replace(\"String_Node_Str\", event.getEntity().getKiller().getName()).replace(\"String_Node_Str\", GeneralMethods.getAbilityColor(GeneralMethods.getLastUsedAbility(event.getEntity().getKiller(), false)) + ability);\n event.setDeathMessage(message);\n bendingDeathPlayer.remove(event.getEntity());\n }\n}\n"
|
"private static boolean isRouterServiceRunning(Context context, boolean pingService) {\n if (context == null) {\n Log.e(TAG, \"String_Node_Str\");\n return false;\n }\n ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n if (runningBluetoothServicePackage == null) {\n runningBluetoothServicePackage = new Vector<ComponentName>();\n } else {\n runningBluetoothServicePackage.clear();\n }\n for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {\n if ((service.service.getClassName()).toLowerCase(Locale.US).contains(SDL_ROUTER_SERVICE_CLASS_NAME) && AndroidTools.isServiceExported(context, service.service)) {\n runningBluetoothServicePackage.add(service.service);\n if (pingService) {\n Intent intent = new Intent();\n intent.setClassName(service.service.getPackageName(), service.service.getClassName());\n intent.putExtra(TransportConstants.PING_ROUTER_SERVICE_EXTRA, pingService);\n context.startService(intent);\n }\n }\n }\n return runningBluetoothServicePackage.size() > 0;\n}\n"
|
"public void addResponse(String key, AuResponse response, int priority) {\n if (response == null)\n throw new IllegalArgumentException();\n if (_ending) {\n Object dps = response.getDepends();\n if (dps == null && _owner == null)\n return;\n if (dps instanceof Page && _pgRemoved != null && _pgRemoved.contains((Page) dps)) {\n return;\n }\n if (dps instanceof Component) {\n Component p = (Component) dps;\n if (p.getPage() == null || (_pgRemoved != null && _pgRemoved.contains(p.getPage()))) {\n return;\n }\n }\n }\n final Object depends = response.getDepends();\n if (depends instanceof Component && isCUDisabled((Component) depends))\n return;\n if (_responses == null)\n _responses = new HashMap<Object, ResponseInfo>();\n ResponseInfo ri = _responses.get(depends);\n if (ri == null)\n _responses.put(depends, ri = new ResponseInfo());\n final TimedValue tval = new TimedValue(_timed++, response, priority);\n if (key != null) {\n ri.values.put(key, tval);\n } else {\n ri.keyless.add(tval);\n }\n}\n"
|
"public void onInit(int status) {\n if (status == TextToSpeech.SUCCESS) {\n Locale ttsLanguage;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {\n ttsLanguage = tts.getDefaultLanguage();\n } else {\n ttsLanguage = tts.getLanguage();\n }\n if (ttsLanguage == null) {\n ttsLanguage = Locale.US;\n }\n int supportStatus = tts.setLanguage(ttsLanguage);\n switch(supportStatus) {\n case TextToSpeech.LANG_MISSING_DATA:\n case TextToSpeech.LANG_NOT_SUPPORTED:\n tts.shutdown();\n tts = null;\n Log.e(TAG, \"String_Node_Str\");\n Toast.makeText(context, \"String_Node_Str\", Toast.LENGTH_LONG).show();\n break;\n }\n } else {\n Log.e(TAG, \"String_Node_Str\");\n Toast.makeText(context, \"String_Node_Str\" + \"String_Node_Str\", Toast.LENGTH_LONG).show();\n }\n}\n"
|
"public void loadBasePanel(long squareId) {\n setContent(new BasePanel(this.getContentId(), squareId) {\npublic void onCancel(AjaxRequestTarget target) {\n }\n void onSelect(AjaxRequestTarget target, String selection) {\n setTitle(\"String_Node_Str\");\n MapModalWindow.this.onSelect(target, selection);\n }\n });\n}\n"
|
"public double predictedLogLikelihood(DataOnMemory<DataInstance> batch) {\n this.getPlateuStructure().getNonReplictedNodes().forEach(node -> node.setActive(false));\n double elbo = 0;\n elbo += this.updateModelOnBatchParallel(batch).getElbo();\n this.getPlateuStructure().getNonReplictedNodes().forEach(node -> node.setActive(true));\n return elbo;\n}\n"
|
"private String removeExtraParagraphs(String fullWordMl, String toInsert, ApplicabilityBlock applicabilityBlock) {\n int startInsertIndex = applicabilityBlock.getStartInsertIndex();\n if (!applicabilityBlock.isInTable() && (toInsert.isEmpty() || toInsert.startsWith(WordCoreUtil.WHOLE_END_PARAGRAPH))) {\n String findParagraphStart = fullWordMl.substring(0, startInsertIndex);\n int paragraphStartIndex = findParagraphStart.lastIndexOf(WordCoreUtil.START_PARAGRAPH);\n String beginningText = fullWordMl.substring(paragraphStartIndex, startInsertIndex);\n if (toInsert.isEmpty() && paragraphStartIndex >= 0 && !beginningText.matches(\"String_Node_Str\" + WordCoreUtil.BEGINFEATURE + \"String_Node_Str\" + WordCoreUtil.BEGINCONFIG + \"String_Node_Str\" + WordCoreUtil.ENDCONFIG + \"String_Node_Str\" + WordCoreUtil.ENDFEATURE + \"String_Node_Str\")) {\n int endInsertIndex = applicabilityBlock.getEndInsertIndex();\n String findParagraphEnd = fullWordMl.substring(endInsertIndex);\n int paragraphEndIndex = findParagraphEnd.indexOf(WordCoreUtil.END_PARAGRAPH) + endInsertIndex + 6;\n if (paragraphEndIndex >= 0) {\n String endText = fullWordMl.substring(endInsertIndex, paragraphEndIndex);\n if (paragraphEndIndex >= 0 && WordCoreUtil.textOnly(endText).isEmpty() && !endText.matches(\"String_Node_Str\" + WordCoreUtil.BEGINFEATURE + \"String_Node_Str\" + WordCoreUtil.BEGINCONFIG + \"String_Node_Str\" + WordCoreUtil.ENDCONFIG + \"String_Node_Str\" + WordCoreUtil.ENDFEATURE + \"String_Node_Str\")) {\n applicabilityBlock.setStartInsertIndex(paragraphStartIndex);\n applicabilityBlock.setStartTextIndex(paragraphStartIndex);\n applicabilityBlock.setEndInsertIndex(paragraphEndIndex);\n applicabilityBlock.setEndTextIndex(paragraphEndIndex);\n }\n }\n } else {\n String findParagraphEnd = fullWordMl.substring(startInsertIndex);\n int paragraphEndIndex = findParagraphEnd.indexOf(WordCoreUtil.END_PARAGRAPH) + startInsertIndex + 6;\n if (paragraphStartIndex >= 0 && paragraphEndIndex >= 0 && paragraphEndIndex > paragraphStartIndex) {\n String fullParagraph = fullWordMl.substring(paragraphStartIndex, paragraphEndIndex);\n fullParagraph = fullParagraph.replaceFirst(\"String_Node_Str\" + WordCoreUtil.BEGINFEATURE + \"String_Node_Str\" + WordCoreUtil.BEGINCONFIG, \"String_Node_Str\");\n if (WordCoreUtil.textOnly(fullParagraph).isEmpty()) {\n toInsert = toInsert.replaceFirst(WordCoreUtil.WHOLE_END_PARAGRAPH, \"String_Node_Str\");\n applicabilityBlock.setStartInsertIndex(paragraphStartIndex);\n applicabilityBlock.setStartTextIndex(paragraphEndIndex);\n }\n }\n }\n }\n if (!applicabilityBlock.isInTable() && toInsert.matches(\"String_Node_Str\")) {\n int origLength = toInsert.length();\n int lastParaIndex = toInsert.lastIndexOf(WordCoreUtil.START_PARAGRAPH);\n if (lastParaIndex >= 0) {\n toInsert = toInsert.substring(0, lastParaIndex);\n applicabilityBlock.setEndTextIndex(applicabilityBlock.getEndTextIndex() - (origLength - lastParaIndex));\n applicabilityBlock.setEndInsertIndex(applicabilityBlock.getEndInsertIndex() + WordCoreUtil.WHOLE_END_PARAGRAPH.length());\n }\n }\n return toInsert;\n}\n"
|
"public Object getValue(IResultIterator resultIterator) throws BirtException {\n Object value = resultIterator.getString(valueColumnName);\n return EngineTask.convertParameterType(value, valueType);\n}\n"
|
"private void setSocket(Socket s) throws SocketException {\n socket = s;\n if (s != null)\n addressPort = s.getLocalPort() + \"String_Node_Str\" + getHostNameForAddressWithoutLookup(s.getInetAddress()) + \"String_Node_Str\" + s.getPort();\n else\n addressPort = \"String_Node_Str\";\n}\n"
|
"public void testSameMemberAdded() throws Exception {\n HazelcastClient client = mock(HazelcastClient.class);\n InetSocketAddress inetSocketAddress = new InetSocketAddress(\"String_Node_Str\", 5701);\n final Connection connection = mock(Connection.class);\n final CountDownLatch latch = new CountDownLatch(2);\n final List<LifecycleState> lifecycleEvents = new ArrayList<LifecycleState>();\n final LifecycleServiceClientImpl lifecycleService = createLifecycleServiceClientImpl(client, lifecycleEvents);\n ClientConfig clientConfig = new ClientConfig();\n clientConfig.setCredentials(credentials).addInetSocketAddress(inetSocketAddress).setConnectionTimeout(60000);\n ConnectionManager connectionManager = new ConnectionManager(client, clientConfig, lifecycleService) {\n protected Connection getNextConnection() {\n latch.countDown();\n return connection;\n }\n };\n ClientBinder binder = mock(ClientBinder.class);\n connectionManager.setBinder(binder);\n Cluster cluster = mock(Cluster.class);\n Member member = mock(Member.class);\n when(member.getInetSocketAddress()).thenReturn(inetSocketAddress);\n MembershipEvent membershipEvent = new MembershipEvent(member, MembershipEvent.MEMBER_ADDED);\n connectionManager.memberAdded(membershipEvent);\n connectionManager.getClusterMembers().contains(inetSocketAddress);\n assertEquals(1, connectionManager.getClusterMembers().size());\n assertArrayEquals(new Object[0], lifecycleEvents.toArray());\n}\n"
|
"public String getName() {\n String label = \"String_Node_Str\";\n if (getHead() != null) {\n NamespaceHandler handler = getHead().getNsHandler();\n if (handler != null)\n label = head.getName() + \"String_Node_Str\" + handler.getNSVersion(head.getNamespace());\n }\n return label;\n}\n"
|
"protected void run() throws Exception {\n if (CookieHandler.getDefault() == null)\n CookieHandler.setDefault(new SimpleCookieManager());\n final URL ipzilla = new URL(url);\n if (username == null) {\n final PasswordAuthentication auth = Authenticator.requestPasswordAuthentication(ipzilla.getHost(), null, ipzilla.getPort(), ipzilla.getProtocol(), CLIText.get().IPZillaPasswordPrompt, ipzilla.getProtocol(), ipzilla, Authenticator.RequestorType.SERVER);\n username = auth.getUserName();\n password = new String(auth.getPassword());\n }\n if (output == null)\n output = new File(db.getWorkTree(), IpLogMeta.IPLOG_CONFIG_FILE);\n IpLogMeta meta = new IpLogMeta();\n meta.syncCQs(output, db.getFS(), ipzilla, username, password);\n}\n"
|
"public Resource createTempProjectResource() {\n URI uri = null;\n try {\n uri = URI.createPlatformResourceURI(Platform.getInstallLocation().getURL().getFile(), true);\n } catch (Exception e) {\n ExceptionHandler.process(e);\n }\n return resourceSet.createResource(uri);\n}\n"
|
"private static NumberRange parseRange(String dropString) {\n String[] dropParts = dropString.split(\"String_Node_Str\");\n String[] amountRange = dropParts[1].split(\"String_Node_Str\");\n double min = 0;\n double max;\n if (amountRange.length == 2) {\n min = Integer.parseInt(amountRange[0]);\n max = Integer.parseInt(amountRange[1]);\n } else {\n max = Integer.parseInt(dropParts[1]);\n }\n return new NumberRange(min, max);\n}\n"
|
"public void addTests() {\n if (getSession().getPlatform() instanceof Oracle9Platform) {\n Oracle9Platform platform = (Oracle9Platform) getSession().getPlatform();\n ((AbstractSession) getSession()).getAccessor().incrementCallCount((AbstractSession) getSession());\n String driverVersion = platform.getDriverVersion();\n TIMESTAMPTester.isTimestampInGmt = platform.isTimestampInGmt();\n TIMESTAMPTester.isLtzTimestampInGmt = platform.isLtzTimestampInGmt();\n ((AbstractSession) getSession()).getAccessor().decrementCallCount();\n if (driverVersion.indexOf(\"String_Node_Str\") == -1) {\n if (driverVersion.indexOf(\"String_Node_Str\") == -1 || getSession().getLogin().getDatabaseURL().indexOf(\"String_Node_Str\") == -1) {\n addTest(getTIMESTAMPTestSuite(true));\n addTest(getTIMESTAMPWithBindingTestSuite(true));\n addTest(getTIMESTAMPUsingNativeSQLTestSuite(true));\n addTest(getTIMESTAMPTestSuite(false));\n addTest(getTIMESTAMPWithBindingTestSuite(false));\n addTest(getTIMESTAMPUsingNativeSQLTestSuite(false));\n if (Helper.compareVersions(driverVersion, \"String_Node_Str\") >= 0) {\n addTest(getCalToTSTZWithBindingAndNoCalendarPrintingTestSuite());\n }\n if (!useAccessors) {\n if (driverVersion.indexOf(\"String_Node_Str\") == -1 || getSession().getLogin().getDatabaseURL().indexOf(\"String_Node_Str\") == -1) {\n addTest(getTIMESTAMPTCTestSuite(true));\n addTest(getTIMESTAMPTCWithBindingTestSuite(true));\n addTest(getTIMESTAMPTCUsingNativeSQLTestSuite(true));\n addTest(getTIMESTAMPTCTestSuite(false));\n addTest(getTIMESTAMPTCWithBindingTestSuite(false));\n addTest(getTIMESTAMPTCUsingNativeSQLTestSuite(false));\n }\n addTest(new SerializationOfValueHolderWithTIMESTAMPTZTest());\n }\n }\n } catch (java.sql.SQLException e) {\n }\n if (!useAccessors) {\n addTest(getCalToTSTZTestSuite());\n }\n }\n}\n"
|
"public Set<Annotation> run(Project project, Constraint constraint, Collection<? extends Element> elements) {\n Set<Annotation> result = new HashSet<Annotation>();\n Collection<DiagramPresentationElement> projectDiagrams = project.getDiagrams();\n for (DiagramPresentationElement currDiagram : projectDiagrams) {\n PresentationElement requester = locateTarget(currDiagram, project);\n if (requester == null) {\n continue;\n }\n Collection<DiagramPresentationElement> patternDiags = PatternLoaderUtils.getPatternDiagrams(requester);\n PatternSaver ps = new PatternSaver();\n ps.savePattern(project, patternDiags.iterator().next());\n JSONObject pattern = ps.getPattern();\n Diagram requesterDiagramElem = (Diagram) project.getElementByID(requester.getElement().getID());\n DiagramPresentationElement requesterDiag = project.getDiagram(requesterDiagramElem);\n String style = ViewSaver.save(project, requesterDiag, true);\n JSONParser parser = new JSONParser();\n Object parsedStyle = null;\n try {\n parsedStyle = parser.parse(style);\n } catch (ParseException e) {\n e.printStackTrace();\n return null;\n }\n JSONObject styleObj = (JSONObject) parsedStyle;\n HashSet<String> badElemTypes = new HashSet<String>();\n for (PresentationElement elem : requesterDiag.getPresentationElements()) {\n String unparsedElemStyle = (String) styleObj.get(elem.getID());\n String elemStyle = PatternLoaderUtils.removeUnnecessaryProperties(unparsedElemStyle);\n String elemType = elem.getHumanType();\n String patternStyle = (String) pattern.get(elemType);\n boolean styleMatch = elemStyle.equals(patternStyle);\n if (!styleMatch) {\n badElemTypes.add(elemType);\n }\n }\n if (!badElemTypes.isEmpty()) {\n NMAction patternMismatchSelect = new FixPatternMismatchSelect(project, requesterDiag, pattern, badElemTypes);\n NMAction patternMismatchAll = new FixPatternMismatchAll(requesterDiag, pattern);\n List<NMAction> actionList = new ArrayList<NMAction>();\n actionList.add(patternMismatchAll);\n actionList.add(patternMismatchSelect);\n Annotation annotation = new Annotation(requesterDiag, constraint, actionList);\n result.add(annotation);\n }\n }\n Application.getInstance().getGUILog().log(\"String_Node_Str\");\n return result;\n}\n"
|
"public void onClick(View v) {\n HitBuilders.EventBuilder eventBuilder = new HitBuilders.EventBuilder().setCategory(GAUtils.Category.FLIGHT_DATA_ACTION_BUTTON);\n switch(v.getId()) {\n case R.id.mc_planningBtn:\n listener.onPlanningSelected();\n eventBuilder.setAction(\"String_Node_Str\").setLabel(getString(R.string.mission_control_edit));\n break;\n case R.id.mc_joystickBtn:\n listener.onJoystickSelected();\n eventBuilder.setAction(\"String_Node_Str\").setLabel(getString(R.string.mission_control_control));\n break;\n case R.id.mc_land:\n drone.getState().changeFlightMode(ApmModes.ROTOR_LAND);\n eventBuilder.setAction(\"String_Node_Str\").setLabel(ApmModes.ROTOR_LAND.getName());\n break;\n case R.id.mc_takeoff:\n break;\n case R.id.mc_homeBtn:\n drone.getState().changeFlightMode(ApmModes.ROTOR_RTL);\n eventBuilder.setAction(\"String_Node_Str\").setLabel(ApmModes.ROTOR_RTL.getName());\n break;\n case R.id.mc_loiter:\n drone.getState().changeFlightMode(ApmModes.ROTOR_LOITER);\n eventBuilder.setAction(\"String_Node_Str\").setLabel(ApmModes.ROTOR_LOITER.getName());\n break;\n case R.id.mc_follow:\n final int result = followMe.toggleFollowMeState();\n String eventLabel = null;\n switch(result) {\n case Follow.FOLLOW_START:\n eventLabel = \"String_Node_Str\";\n break;\n case Follow.FOLLOW_END:\n eventLabel = \"String_Node_Str\";\n break;\n case Follow.FOLLOW_INVALID_STATE:\n eventLabel = \"String_Node_Str\";\n break;\n case Follow.FOLLOW_DRONE_DISCONNECTED:\n eventLabel = \"String_Node_Str\";\n break;\n case Follow.FOLLOW_DRONE_NOT_ARMED:\n eventLabel = \"String_Node_Str\";\n break;\n }\n if (eventLabel != null) {\n eventBuilder.setAction(\"String_Node_Str\").setLabel(eventLabel);\n Toast.makeText(getActivity(), eventLabel, Toast.LENGTH_SHORT).show();\n }\n break;\n default:\n eventBuilder = null;\n break;\n }\n if (eventBuilder != null) {\n GAUtils.sendEvent(eventBuilder);\n }\n}\n"
|
"private void findMetadata() throws IOException {\n String string = this.readFourChars();\n if (!\"String_Node_Str\".equals(string)) {\n throw new SoundTransformRuntimeException(new SoundTransformException(AudioInputStreamErrorCode.NO_MAGIC_NUMBER, new IllegalArgumentException()));\n }\n this.readInt();\n string = this.readFourChars();\n if (!\"String_Node_Str\".equals(string)) {\n throw new SoundTransformRuntimeException(new SoundTransformException(AudioInputStreamErrorCode.NO_WAVE_HEADER, new IllegalArgumentException()));\n }\n string = this.readFourChars();\n if (!\"String_Node_Str\".equals(string)) {\n throw new SoundTransformRuntimeException(new SoundTransformException(AudioInputStreamErrorCode.NO_WAVE_HEADER, new IllegalArgumentException()));\n }\n this.readInt();\n int typeOfEncoding = this.readShort();\n if (typeOfEncoding != 1) {\n throw new SoundTransformRuntimeException(new SoundTransformException(AudioInputStreamErrorCode.NON_PCM_WAV, new IllegalArgumentException()));\n }\n int channels = this.readShort();\n int sampleRate = (this.readInt() + 65536) % 65536;\n this.readInt();\n int frameSize = this.readShort();\n int sampleSize = this.readShort() / 8;\n string = this.readFourChars();\n if (\"String_Node_Str\".equals(string)) {\n int soundInfoSize = this.readInt();\n this.skip(soundInfoSize);\n string = this.readFourChars();\n }\n if (!\"String_Node_Str\".equals(string)) {\n throw new SoundTransformRuntimeException(new SoundTransformException(AudioInputStreamErrorCode.NO_DATA_SEPARATOR, new IllegalArgumentException()));\n }\n int dataSize = this.readInt();\n this.info = new InputStreamInfo(channels, dataSize / (frameSize), sampleSize, sampleRate, false, true);\n}\n"
|
"private void loadSection(int sectionX, int sectionY, int height, World world, int bigX, int bigY) {\n Sector s = null;\n try {\n String filename = \"String_Node_Str\" + height + \"String_Node_Str\" + sectionX + \"String_Node_Str\" + sectionY;\n ZipEntry e = tileArchive.getEntry(filename);\n if (e == null) {\n throw new Exception(\"String_Node_Str\" + filename);\n }\n ByteBuffer data = DataConversions.streamToBuffer(new BufferedInputStream(tileArchive.getInputStream(e)));\n s = Sector.unpack(data);\n } catch (Exception e) {\n Logger.error(e);\n }\n for (int y = 0; y < Sector.HEIGHT; y++) {\n for (int x = 0; x < Sector.WIDTH; x++) {\n int bx = bigX + x;\n int by = bigY + y;\n if (!world.withinWorld(bx, by)) {\n continue;\n }\n MutableTileValue t = new MutableTileValue(world.getTileValue(bx, by));\n t.overlay = s.getTile(x, y).groundOverlay;\n t.diagWallVal = s.getTile(x, y).diagonalWalls;\n t.horizontalWallVal = s.getTile(x, y).horizontalWall;\n t.verticalWallVal = s.getTile(x, y).verticalWall;\n t.elevation = s.getTile(x, y).groundElevation;\n if ((s.getTile(x, y).groundOverlay & 0xff) == 250) {\n s.getTile(x, y).groundOverlay = (byte) 2;\n }\n int groundOverlay = s.getTile(x, y).groundOverlay & 0xFF;\n if (groundOverlay > 0 && EntityHandler.getTileDef(groundOverlay - 1).getObjectType() != 0) {\n world.getTileValue(bx, by).mapValue |= 0x40;\n }\n int verticalWall = s.getTile(x, y).verticalWall & 0xFF;\n if (verticalWall > 0 && EntityHandler.getDoorDef(verticalWall - 1).getUnknown() == 0 && EntityHandler.getDoorDef(verticalWall - 1).getDoorType() != 0) {\n world.getTileValue(bx, by).mapValue |= 1;\n world.getTileValue(bx, by - 1).mapValue |= 4;\n }\n int horizontalWall = s.getTile(x, y).horizontalWall & 0xFF;\n if (horizontalWall > 0 && EntityHandler.getDoorDef(horizontalWall - 1).getUnknown() == 0 && EntityHandler.getDoorDef(horizontalWall - 1).getDoorType() != 0) {\n world.getTileValue(bx, by).mapValue |= 2;\n world.getTileValue(bx - 1, by).mapValue |= 8;\n }\n int diagonalWalls = s.getTile(x, y).diagonalWalls;\n if (diagonalWalls > 0 && diagonalWalls < 12000 && EntityHandler.getDoorDef(diagonalWalls - 1).getUnknown() == 0 && EntityHandler.getDoorDef(diagonalWalls - 1).getDoorType() != 0) {\n world.getTileValue(bx, by).mapValue |= 0x20;\n }\n if (diagonalWalls > 12000 && diagonalWalls < 24000 && EntityHandler.getDoorDef(diagonalWalls - 12001).getUnknown() == 0 && EntityHandler.getDoorDef(diagonalWalls - 12001).getDoorType() != 0) {\n world.getTileValue(bx, by).mapValue |= 0x10;\n }\n }\n }\n}\n"
|
"public synchronized TmfContext seekEvent(final double ratio) {\n if (fFile == null) {\n return new CustomTxtTraceContext(NULL_LOCATION, ITmfContext.UNKNOWN_RANK);\n }\n try {\n long pos = Math.round(ratio * fFile.length());\n while (pos > 0) {\n fFile.seek(pos - 1);\n if (fFile.read() == '\\n') {\n break;\n }\n pos--;\n }\n final ITmfLocation<?> location = new TmfLocation<Long>(pos);\n final TmfContext context = seekEvent(location);\n context.setRank(ITmfContext.UNKNOWN_RANK);\n return context;\n } catch (final IOException e) {\n Activator.getDefault().logError(\"String_Node_Str\" + getPath(), e);\n return new CustomTxtTraceContext(NULL_LOCATION, ITmfContext.UNKNOWN_RANK);\n }\n}\n"
|
"public Intent build() {\n Intent filePicker = new Intent(mContext, useMaterial ? FilePicker.class : FilePickerActivity.class);\n filePicker.putExtra(FilePicker.SCOPE, mScope);\n filePicker.putExtra(FilePicker.REQUEST, requestCode);\n filePicker.putExtra(FilePicker.INTENT_EXTRA_COLOR_ID, color);\n filePicker.putExtra(FilePicker.MIME_TYPE, mimeType);\n return filePicker;\n}\n"
|
"public void setGhostMode() {\n ghostMode = true;\n ghostTime = 0;\n}\n"
|
"public void doProcess(BasicServlet servlet, HttpServletRequest req, HttpServletResponse res, PrintWriter outExt) throws ServletException, IOException {\n ScreenModel screen = this.doProcessInput(servlet, req, res);\n this.doProcessOutput(servlet, req, res, outExt, screen, true);\n}\n"
|
"public void close() {\n if (haveSemaphore) {\n haveSemaphore = false;\n querySemaphore.leave();\n }\n if (resultSet != null) {\n try {\n resultSet.close();\n } catch (SQLException e) {\n throw Util.newError(message + \"String_Node_Str\" + sql + \"String_Node_Str\");\n } finally {\n resultSet = null;\n }\n }\n if (jdbcConnection != null) {\n try {\n jdbcConnection.close();\n } catch (SQLException e) {\n throw Util.newError(message + \"String_Node_Str\" + sql + \"String_Node_Str\");\n } finally {\n jdbcConnection = null;\n }\n }\n long time = System.currentTimeMillis();\n long totalMs = time - startTime;\n String status = \"String_Node_Str\" + totalMs + \"String_Node_Str\" + rowCount + \"String_Node_Str\";\n RolapUtil.SQL_LOGGER.debug(executeCount + \"String_Node_Str\" + status);\n if (RolapUtil.LOGGER.isDebugEnabled()) {\n RolapUtil.LOGGER.debug(component + \"String_Node_Str\" + sql + \"String_Node_Str\" + status);\n }\n}\n"
|
"public boolean implementsInterface(IClass c, TypeReference T) {\n IClass tClass = lookupClass(T);\n if (Assertions.verifyAssertions) {\n if (tClass == null) {\n Assertions._assert(false, \"String_Node_Str\" + T);\n }\n }\n if (!tClass.isInterface()) {\n return false;\n }\n Set impls = implementors.get(i);\n if (impls != null && impls.contains(c)) {\n return true;\n }\n return false;\n}\n"
|
"private void startFloatRangeLoop(String loopName, Var loopVar, Arg start, Arg end, Arg increment, int splitDegree, int leafDegree, List<PassedVar> passedVars, List<RefCount> perIterIncrs, ListMultimap<Var, RefCount> constIncrs) {\n assert (start.isImmFloat());\n assert (end.isImmFloat());\n assert (increment.isImmFloat());\n assert (Types.isFloatVal(loopVar));\n Expression startE = argToExpr(start);\n Expression endE = argToExpr(end);\n Expression incrE = argToExpr(increment);\n Value iterLimitVar = new Value(TCLTMP_FLOAT_RANGE_ITERMAX);\n pointAdd(new SetVariable(iterLimitVar.variable(), new TclExpr(TclExpr.exprFn(TclExpr.INT_CONV, TclExpr.group(TclExpr.exprFn(TclExpr.FLOOR, TclExpr.group(TclExpr.paren(endE, TclExpr.MINUS, startE, TclExpr.PLUS, incrE), TclExpr.DIV, incrE)))), TclExpr.MINUS, LiteralInt.ONE)));\n Value dummyLoopVar = new Value(TCLTMP_FLOAT_RANGE_ITER);\n List<PassedVar> passedVars2 = PassedVar.mergeLists(passedVars, PassedVar.fromArgs(false, start, increment));\n startIntRangeLoop2(loopName, dummyLoopVar.variable(), LiteralInt.ZERO, iterLimitVar, LiteralInt.ONE, splitDegree, leafDegree, passedVars2, perIterIncrs, constIncrs, perIterDecrs);\n pointAdd(new SetVariable(prefixVar(loopVar), new TclExpr(startE, TclExpr.PLUS, incrE, TclExpr.TIMES, dummyLoopVar)));\n}\n"
|
"public double[][] getScores(DmvProblemNode node) {\n if (scores == null) {\n idm = node.getIdm();\n scores = new double[idm.getNumConds()][];\n deltaSum = new double[idm.getNumConds()][][];\n numObserved = new int[idm.getNumConds()][][];\n for (int c = 0; c < idm.getNumConds(); c++) {\n scores[c] = new double[idm.getNumParams(c)];\n deltaSum[c] = new double[idm.getNumParams(c)][2];\n numObserved[c] = new int[idm.getNumParams(c)][2];\n }\n }\n CptBounds origBounds = node.getBounds();\n double parentBound = node.getOptimisticBound();\n for (int c = 0; c < idm.getNumConds(); c++) {\n for (int m = 0; m < idm.getNumParams(c); m++) {\n if (numObserved[c][m][0] < RELIABILITY_THRESHOLD || numObserved[c][m][1] < RELIABILITY_THRESHOLD) {\n node.setAsActiveNode();\n List<CptBoundsDeltaList> deltas = varSplitter.split(origBounds, new VariableId(c, m));\n List<ProblemNode> children = node.branch(deltas);\n assert (children.size() == 2);\n for (int lu = 0; lu < 2; lu++) {\n if (numObserved[c][m][lu] < RELIABILITY_THRESHOLD) {\n DmvProblemNode child = (DmvProblemNode) children.get(lu);\n assert (child.getDeltas().getPrimary().getLu().getAsInt() == lu);\n child.setAsActiveNode();\n double cBound = child.getOptimisticBound();\n double cDelta = parentBound - cBound;\n deltaSum[c][m][lu] += cDelta;\n numObserved[c][m][lu]++;\n String name = idm.getName(c, m);\n log.trace(String.format(\"String_Node_Str\", c, m, lu, name, cDelta));\n }\n }\n updateScore(c, m);\n node.setAsActiveNode();\n }\n }\n }\n CptBoundsDelta primaryDelta = node.getDeltas().getPrimary();\n if (primaryDelta != null) {\n int c = primaryDelta.getC();\n int m = primaryDelta.getM();\n int lu = primaryDelta.getLu().getAsInt();\n deltaSum[c][m][lu] += node.getParent().getOptimisticBound() - node.getOptimisticBound();\n numObserved[c][m][lu]++;\n updateScore(c, m);\n }\n return scores;\n}\n"
|
"public void actionPerformed(java.awt.event.ActionEvent e) {\n boolean configured = false;\n if (mode == 0)\n configured = ConfigurationDialogs.showSource(view, getDialogMode());\n else if (mode == 1)\n configured = ConfigurationDialogs.showJson(view, getDialogMode());\n boolean makeReqs = true;\n boolean completed = false;\n java.util.List<String> nodes = new ArrayList<>();\n if (configured) {\n if (BurpPropertiesManager.getBurpPropertiesManager().getConfigFile() != null)\n callbacks.loadConfigFromJson(getBurpConfigAsString());\n try {\n EndpointDecorator[] endpoints = getEndpoints(view);\n EndpointDecorator[] comparePoints = null;\n if (BurpPropertiesManager.getBurpPropertiesManager().getOldSourceFolder() != null && !BurpPropertiesManager.getBurpPropertiesManager().getOldSourceFolder().trim().isEmpty() && mode == 0)\n comparePoints = getComparePoints(view);\n else if (BurpPropertiesManager.getBurpPropertiesManager().getOldSerializationFile() != null && !BurpPropertiesManager.getBurpPropertiesManager().getOldSerializationFile().trim().isEmpty() && mode == 1)\n comparePoints = getComparePoints(view);\n if (endpoints.length == 0)\n JOptionPane.showMessageDialog(view, getNoEndpointsMessage(), \"String_Node_Str\", JOptionPane.WARNING_MESSAGE);\n else {\n if (comparePoints != null && comparePoints.length != 0)\n endpoints = compareEndpoints(endpoints, comparePoints, view);\n fillEndpointsToTable(endpoints);\n for (EndpointDecorator decorator : endpoints) {\n if (decorator != null) {\n Endpoint.Info endpoint = decorator.getEndpoint();\n String endpointPath = endpoint.getUrlPath();\n if (endpointPath.startsWith(\"String_Node_Str\"))\n endpointPath = endpointPath.substring(1);\n endpointPath = endpointPath.replaceAll(GENERIC_INT_SEGMENT, \"String_Node_Str\");\n nodes.add(endpointPath);\n for (Map.Entry<String, RouteParameter> parameter : endpoint.getParameters().entrySet()) nodes.add(endpointPath + \"String_Node_Str\" + parameter.getKey() + \"String_Node_Str\" + parameter.getValue());\n }\n }\n String url = UrlDialog.show(view);\n if (url != null) {\n try {\n if (!url.substring(url.length() - 1).equals(\"String_Node_Str\"))\n url = url + \"String_Node_Str\";\n for (String node : nodes) {\n URL nodeUrl = new URL(url + node);\n callbacks.includeInScope(nodeUrl);\n if (BurpPropertiesManager.getBurpPropertiesManager().getAutoSpider())\n callbacks.sendToSpider(nodeUrl);\n }\n buildRequests(view, callbacks, endpoints, url);\n completed = true;\n } catch (MalformedURLException e1) {\n JOptionPane.showMessageDialog(view, \"String_Node_Str\", \"String_Node_Str\", JOptionPane.WARNING_MESSAGE);\n }\n if (completed)\n JOptionPane.showMessageDialog(view, getCompletedMessage());\n } else\n makeReqs = false;\n }\n if (makeReqs) {\n if (BurpPropertiesManager.getBurpPropertiesManager().getAutoScan())\n sendToScanner(callbacks, UrlDialog.show(view));\n RequestMakerThread rmt = new RequestMakerThread(callbacks, view);\n new Thread(rmt).start();\n }\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(view, \"String_Node_Str\");\n }\n } else\n JOptionPane.showMessageDialog(view, \"String_Node_Str\", \"String_Node_Str\", JOptionPane.WARNING_MESSAGE);\n}\n"
|
"public Object handleChildResource(OTXMLElement parentElement, String childName, Object childObj, String relativeParentPath, XMLDataObject parent, int xmlType, String comment) throws HandleElementException {\n OTClassProperty otProperty = otClass.getProperty(childName);\n if (otProperty == null) {\n System.err.println(\"String_Node_Str\" + childName + \"String_Node_Str\" + getObjectName());\n return null;\n }\n OTType otType = otProperty.getType();\n XMLReferenceInfo resInfo = null;\n if (xmlDB.isTrackResourceInfo()) {\n resInfo = parent.getReferenceInfo(childName);\n if (resInfo == null) {\n resInfo = new XMLReferenceInfo();\n parent.setResourceInfo(childName, resInfo);\n }\n resInfo.type = xmlType;\n resInfo.comment = comment;\n }\n if (otType instanceof OTClass && childObj instanceof String) {\n String refid = (String) childObj;\n if (refid != null && refid.length() > 0) {\n return new XMLDataObjectRef(refid, parentElement);\n }\n }\n if (otType instanceof OTClass) {\n if (!(childObj instanceof OTXMLElement)) {\n System.err.println(\"String_Node_Str\");\n return null;\n }\n OTXMLElement child = (OTXMLElement) childObj;\n String childRefId = child.getAttributeValue(\"String_Node_Str\");\n if (childRefId == null) {\n List children = child.getChildren();\n if (children.size() < 1) {\n return null;\n }\n childObj = children.get(0);\n if (children.size() > 1) {\n System.err.println(\"String_Node_Str\" + TypeService.elementPath(child));\n }\n String childElementName = ((OTXMLElement) childObj).getName();\n if (childElementName.equals(\"String_Node_Str\")) {\n otType = OTrunkImpl.getOTClass(\"String_Node_Str\");\n } else {\n otType = OTrunkImpl.getOTClass(childElementName);\n if (otType == null) {\n otType = typeService.getClassByShortcut(childElementName);\n }\n if (otType == null) {\n throw new IllegalStateException(\"String_Node_Str\" + childElementName + \"String_Node_Str\");\n }\n }\n }\n }\n if (otType == null) {\n throw new IllegalStateException(\"String_Node_Str\" + otProperty.getName() + \"String_Node_Str\" + otClass.getInstanceClass().getName());\n }\n ResourceTypeHandler resHandler = typeService.getElementHandler(otType);\n if (resHandler == null) {\n System.err.println(\"String_Node_Str\" + otType.getInstanceClass());\n return null;\n }\n if (childObj instanceof String) {\n if (resHandler instanceof PrimitiveResourceTypeHandler) {\n return ((PrimitiveResourceTypeHandler) resHandler).handleElement((String) childObj);\n } else {\n throw new HandleElementException(\"String_Node_Str\");\n }\n } else {\n String childRelativePath = relativeParentPath + \"String_Node_Str\" + childName;\n return resHandler.handleElement((OTXMLElement) childObj, childRelativePath, parent);\n }\n}\n"
|
"public GameView getGameView() {\n Player player = game.getPlayer(playerId);\n player.setUserData(this.userData);\n GameView gameView = new GameView(game.getState(), game);\n gameView.setHand(new SimpleCardsView(player.getHand().getCards(game)));\n if (player.getPlayersUnderYourControl().size() > 0) {\n Map<String, SimpleCardsView> handCards = new HashMap<String, SimpleCardsView>();\n for (UUID controlledPlayerId : player.getPlayersUnderYourControl()) {\n Player opponent = game.getPlayer(controlledPlayerId);\n handCards.put(opponent.getName(), new SimpleCardsView(opponent.getHand().getCards(game)));\n }\n gameView.setOpponentHands(handCards);\n }\n List<LookedAtView> list = new ArrayList<LookedAtView>();\n for (Entry<String, Cards> entry : game.getState().getLookedAt(playerId).entrySet()) {\n list.add(new LookedAtView(entry.getKey(), entry.getValue(), game));\n }\n gameView.setLookedAt(list);\n game.getState().clearLookedAt(playerId);\n return gameView;\n}\n"
|
"public void registerEndpoint(IWebsocketEndpoint endpoint) {\n super.registerEndpoint(endpoint);\n endpointForms.put(endpoint, new ConcurrentHashMap<String, Pair<String, Boolean>>());\n}\n"
|
"protected void event(UserRequest ureq, Component source, Event event) {\n if (source == startLink) {\n doOpenImportWizard(ureq);\n }\n}\n"
|
"private boolean checkForV6Bridge(InetAddress addressOfBridge, String bridgeID) throws InterruptedException {\n QueuedSend queuedSend;\n try {\n queuedSend = new QueuedSend();\n Semaphore s = new Semaphore(0);\n MilightV6SessionManager session = new MilightV6SessionManager(queuedSend, bridgeID, scheduler, (SessionState state) -> {\n if (state == SessionState.SESSION_VALID) {\n s.release();\n }\n }, null);\n boolean success = s.tryAcquire(1, 1300, TimeUnit.MILLISECONDS);\n session.dispose();\n queuedSend.dispose();\n return success;\n } catch (SocketException e) {\n logger.debug(\"String_Node_Str\", e);\n }\n return false;\n}\n"
|
"private List<BGTableItem> search(SearchEvent event) {\n Long id = event.getId();\n String name = event.getName();\n String description = event.getDescription();\n String ownerName = event.getOwnerName();\n SearchBusinessGroupParams params = new SearchBusinessGroupParams();\n if (id != null) {\n params.setGroupKeys(Collections.singletonList(id));\n }\n params.setName(StringHelper.containsNonWhitespace(name) ? name : null);\n params.setDescription(StringHelper.containsNonWhitespace(description) ? description : null);\n params.setOwnerName(StringHelper.containsNonWhitespace(ownerName) ? ownerName : null);\n params.setOwner(event.isOwner());\n params.setAttendee(event.isAttendee());\n params.setWaiting(event.isWaiting());\n params.setPublicGroup(event.isPublicGroups());\n params.setIdentity(getIdentity());\n List<BusinessGroup> groups;\n if (admin) {\n if (event.isAttendee() || event.isOwner()) {\n params.setIdentity(getIdentity());\n }\n groups = businessGroupService.findBusinessGroups(params, null, 0, -1);\n } else {\n if (!event.isAttendee() && !event.isOwner() && !event.isWaiting() && !event.isPublicGroups()) {\n params.setPublicGroup(true);\n }\n groups = businessGroupService.findBusinessGroups(params, null, 0, -1);\n }\n List<Long> groupsWithMembership = businessGroupService.isIdentityInBusinessGroups(getIdentity(), groups);\n Set<Long> memberships = new HashSet<Long>(groupsWithMembership);\n List<Long> resourceKeys = new ArrayList<Long>();\n for (BusinessGroup group : groups) {\n resourceKeys.add(group.getResource().getKey());\n }\n List<BGRepositoryEntryRelation> resources = businessGroupService.findRelationToRepositoryEntries(groups, 0, -1);\n List<OLATResourceAccess> resourcesWithAC = acFrontendManager.getAccessMethodForResources(resourceKeys, true, new Date());\n List<BGTableItem> items = new ArrayList<BGTableItem>();\n for (BusinessGroup group : groups) {\n Long oresKey = group.getResource().getKey();\n List<PriceMethodBundle> accessMethods = null;\n for (OLATResourceAccess access : resourcesWithAC) {\n if (oresKey.equals(access.getResource().getKey())) {\n accessMethods = access.getMethods();\n break;\n }\n }\n Boolean allowLeave = memberships.contains(group.getKey()) ? Boolean.TRUE : null;\n Boolean allowDelete = admin ? Boolean.TRUE : null;\n boolean accessControl = (accessMethods != null);\n boolean member = memberships.contains(group.getKey());\n List<BGRepositoryEntryRelation> relations = new ArrayList<BGRepositoryEntryRelation>();\n for (BGRepositoryEntryRelation resource : resources) {\n if (group.getKey().equals(resource.getGroupKey())) {\n relations.add(resource);\n if (relations.size() >= 3) {\n break;\n }\n }\n }\n BGTableItem tableItem = new BGTableItem(group, member, allowLeave, allowDelete, accessControl, accessMethods);\n tableItem.setRelations(relations);\n items.add(tableItem);\n }\n return items;\n}\n"
|
"public void initialize() {\n super.initialize();\n tabModel = Model.of();\n tabsPanel = new TabsPanel<String>(\"String_Node_Str\", tabModel, new LoadableDetachableModel<List<String>>() {\n\n protected List<String> load() {\n return oClassIntrospector.listTabs(getDocument().getSchemaClass());\n }\n }) {\n private static final long serialVersionUID = 1L;\n public void onTabClick(AjaxRequestTarget target) {\n target.add(propertiesStructureTable);\n target.add(extendedPropertiesContainer);\n }\n };\n add(tabsPanel);\n Form<ODocument> form = new Form<ODocument>(\"String_Node_Str\", getModel());\n IModel<List<? extends OProperty>> propertiesModel = new LoadableDetachableModel<List<? extends OProperty>>() {\n protected List<? extends OProperty> load() {\n return oClassIntrospector.listProperties(getDocument().getSchemaClass(), tabModel.getObject(), false);\n }\n };\n propertiesStructureTable = new OrienteerStructureTable<ODocument, OProperty>(\"String_Node_Str\", getModel(), propertiesModel) {\n protected Component getValueComponent(String id, IModel<OProperty> rowModel) {\n return new ODocumentMetaPanel<Object>(id, displayMode, getDocumentModel(), rowModel);\n }\n };\n form.add(propertiesStructureTable);\n add(form);\n propertiesModel = new LoadableDetachableModel<List<? extends OProperty>>() {\n protected List<? extends OProperty> load() {\n return oClassIntrospector.listProperties(getDocument().getSchemaClass(), tabModel.getObject(), true);\n }\n };\n extendedPropertiesContainer = new WebMarkupContainer(\"String_Node_Str\");\n extendedPropertiesContainer.setOutputMarkupPlaceholderTag(true);\n ListView<OProperty> extendedPropertiesListView = new ListView<OProperty>(\"String_Node_Str\", propertiesModel) {\n protected void populateItem(ListItem<OProperty> item) {\n Form<?> form = new Form<Object>(\"String_Node_Str\");\n OProperty oProperty = item.getModelObject();\n String component = CustomAttributes.VISUALIZATION_TYPE.getValue(oProperty);\n form.add(OrienteerWebApplication.get().getUIVisualizersRegistry().getComponentFactory(oProperty.getType(), component).createComponent(\"String_Node_Str\", DisplayMode.VIEW, getDocumentModel(), item.getModel(), new DynamicPropertyValueModel<Object>(getDocumentModel(), item.getModel())));\n item.add(form);\n }\n };\n extendedPropertiesContainer.add(extendedPropertiesListView);\n add(extendedPropertiesContainer);\n}\n"
|
"public void init() {\n super.init();\n getContentPane().setLayout(new BorderLayout(5, 5));\n getContentPane().add(_createRunControls(2), BorderLayout.NORTH);\n constructPtolemyModel();\n _divaPanel = new JPanel(new BorderLayout());\n _divaPanel.setBorder(new TitledBorder(new LineBorder(Color.black), \"String_Node_Str\"));\n _divaPanel.setBackground(getBackground());\n _divaPanel.setSize(new Dimension(600, 350));\n _divaPanel.setBackground(getBackground());\n getContentPane().add(_divaPanel, BorderLayout.CENTER);\n _graph = constructDivaGraph();\n final MutableGraphModel finalGraphModel = _graph;\n final GraphController gc = new BusContentionGraphController();\n final GraphPane gp = new GraphPane(gc, _graph);\n _jgraph = new JGraph(gp);\n _divaPanel.add(_jgraph, BorderLayout.NORTH);\n _jgraph.setPreferredSize(new Dimension(600, 400));\n try {\n SwingUtilities.invokeAndWait(new Runnable() {\n public void run() {\n doLayout(finalGraphModel, gp);\n }\n });\n } catch (Exception ex) {\n ex.printStackTrace();\n System.exit(0);\n }\n _jgraph.setBackground(getBackground());\n StateListener listener = new StateListener((GraphPane) _jgraph.getCanvasPane());\n _processActor1.addListeners(listener);\n _processActor2.addListeners(listener);\n _processActor3.addListeners(listener);\n}\n"
|
"public void delete(HttpRequest httpRequest, HttpResponder httpResponder, String namespace, String name) throws Exception {\n secureStoreManager.deleteSecureData(namespace, name);\n httpResponder.sendStatus(HttpResponseStatus.OK);\n}\n"
|
"public synchronized int hashCode() {\n if (__hashCodeCalc) {\n return 0;\n }\n __hashCodeCalc = true;\n int _hashCode = 1;\n if (getBusinessPartnerId() != null) {\n _hashCode += getBusinessPartnerId().hashCode();\n }\n if (getClientId() != null) {\n _hashCode += getClientId().hashCode();\n }\n if (getEmail() != null) {\n _hashCode += getEmail().hashCode();\n }\n if (getFax() != null) {\n _hashCode += getFax().hashCode();\n }\n if (getFirstName() != null) {\n _hashCode += getFirstName().hashCode();\n }\n _hashCode += getId();\n if (getLastName() != null) {\n _hashCode += getLastName().hashCode();\n }\n if (getPhone() != null) {\n _hashCode += getPhone().hashCode();\n }\n if (getPhone2() != null) {\n _hashCode += getPhone2().hashCode();\n }\n __hashCodeCalc = false;\n return _hashCode;\n}\n"
|
"public double[] predictProbabilities(Instance instance) {\n if (w.length == 1) {\n double[] prob = new double[2];\n double pred = regress(intercept[0], w[0], instance);\n prob[0] = MathUtils.sigmoid(pred);\n prob[1] = 1 - prob[0];\n return prob;\n } else {\n double[] prob = new double[w.length];\n double[] pred = new double[w.length];\n double sum = 0;\n for (int i = 0; i < w.length; i++) {\n pred[i] = regress(intercept[i], w[i], instance);\n prob[i] = 1 / (1 + Math.exp(-pred[i]));\n sum += prob[i];\n }\n for (int i = 0; i < prob.length; i++) {\n prob[i] /= sum;\n }\n return prob;\n }\n}\n"
|
"public void executionError(Manager manager, Throwable throwable) {\n getFrame().report(throwable);\n if (throwable instanceof KernelException) {\n highlightError(((KernelException) throwable).getNameable1());\n highlightError(((KernelException) throwable).getNameable2());\n if (throwable instanceof TypeConflictException) {\n Iterator<?> inequalities = ((TypeConflictException) throwable).inequalityList().iterator();\n while (inequalities.hasNext()) {\n Object item = inequalities.next();\n if (item instanceof InequalityTerm) {\n Object object = ((InequalityTerm) item).getAssociatedObject();\n if (object instanceof Nameable) {\n highlightError((Nameable) object);\n }\n } else if (item instanceof Inequality) {\n Inequality inequality = (Inequality) item;\n InequalityTerm term = inequality.getGreaterTerm();\n if (term != null) {\n Object object = term.getAssociatedObject();\n if (object instanceof Nameable) {\n highlightError((Nameable) object);\n }\n }\n term = inequality.getLesserTerm();\n if (term != null) {\n Object object = term.getAssociatedObject();\n if (object instanceof Nameable) {\n highlightError((Nameable) object);\n }\n }\n }\n }\n }\n } else if (throwable instanceof KernelRuntimeException) {\n Iterator<?> causes = ((KernelRuntimeException) throwable).getNameables().iterator();\n while (causes.hasNext()) {\n highlightError((Nameable) causes.next());\n }\n }\n}\n"
|
"private void genAppFunctionBody(Context context, SwiftAST appBody, List<Var> outputs, boolean hasSideEffects, boolean deterministic) throws UserException {\n assert (appBody.getType() == ExMParser.APP_BODY);\n assert (appBody.getChildCount() >= 1);\n SwiftAST cmd = appBody.child(0);\n assert (cmd.getType() == ExMParser.COMMAND);\n assert (cmd.getChildCount() >= 1);\n SwiftAST appNameT = cmd.child(0);\n assert (appNameT.getType() == ExMParser.STRING);\n String appName = Literals.extractLiteralString(context, appNameT);\n List<Var> args = evalAppCmdArgs(context, cmd);\n Redirects<Var> redirFutures = processAppRedirects(context, appBody.children(1));\n checkAppOutputs(context, appName, outputs, args, redirFutures);\n Pair<Map<String, Var>, List<Var>> wait = selectAppWaitVars(context, args, redirFutures);\n Map<String, Var> fileNames = wait.val1;\n List<Var> waitVars = wait.val2;\n List<Var> passIn = new ArrayList<Var>();\n passIn.addAll(fileNames.values());\n passIn.addAll(args);\n String waitName = context.getFunctionContext().constructName(\"String_Node_Str\");\n backend.startWaitStatement(waitName, waitVars, passIn, Collections.<Var>emptyList(), null, WaitMode.TASK_DISPATCH, true, TaskMode.LEAF);\n Pair<List<Arg>, Redirects<Arg>> retrieved = retrieveAppArgs(context, args, redirFutures, fileNames);\n List<Arg> localArgs = retrieved.val1;\n Redirects<Arg> localRedirects = retrieved.val2;\n backend.runExternal(appName, localArgs, outputs, localRedirects, hasSideEffects, deterministic);\n backend.endWaitStatement(waitVars, passIn, Arrays.<Var>asList());\n}\n"
|
"private static void schedulerSetup(boolean enablePersistence) throws SchedulerException {\n JobStore js;\n if (enablePersistence) {\n CConfiguration conf = injector.getInstance(CConfiguration.class);\n tableUtil = new ScheduleStoreTableUtil(dsFramework, conf);\n datasetBasedTimeScheduleStore = new DatasetBasedTimeScheduleStore(factory, tableUtil, conf);\n js = datasetBasedTimeScheduleStore;\n } else {\n js = new RAMJobStore();\n }\n SimpleThreadPool threadPool = new SimpleThreadPool(10, Thread.NORM_PRIORITY);\n threadPool.initialize();\n DirectSchedulerFactory.getInstance().createScheduler(DUMMY_SCHEDULER_NAME, \"String_Node_Str\", threadPool, js);\n scheduler = DirectSchedulerFactory.getInstance().getScheduler(DUMMY_SCHEDULER_NAME);\n scheduler.start();\n}\n"
|
"public void fiveDividedByTwoEqualsToTwoPointFive() {\n int dividend = 5;\n int divider = 2;\n float result = divideUsingSubtraction.divideIterative(dividend, divider);\n assertEquals(2.5, result, DELTA);\n}\n"
|
"private static void printResults(List<List<DirichletCluster<Vector>>> clusters, int significant) {\n int row = 0;\n for (List<DirichletCluster<Vector>> r : clusters) {\n System.out.print(\"String_Node_Str\" + row++ + \"String_Node_Str\");\n for (int k = 0; k < r.size(); k++) {\n Model<Vector> model = r.get(k).model;\n if (model.count() > significant) {\n int total = (int) r.get(k).totalCount;\n System.out.print(\"String_Node_Str\" + k + '(' + total + ')' + model.toString() + \"String_Node_Str\");\n }\n }\n System.out.println();\n }\n System.out.println();\n}\n"
|
"protected Set<T> cacheData(Set<T> ids) {\n Map<T, File> filesFound = prepareCombine(ids);\n File resultFile = getCacheFile(ids);\n if (filesFound.size() == ids.size()) {\n combine(filesFound, ids);\n } else {\n FileUtils.remove(resultFile);\n }\n return filesFound.keySet();\n}\n"
|
"private void resetAction() {\n try {\n String message = \"String_Node_Str\";\n int result = JOptionPane.showConfirmDialog(null, message, \"String_Node_Str\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);\n if (result == JOptionPane.OK_OPTION) {\n Preferences userPrefs = Preferences.userRoot();\n userPrefs.clear();\n userPrefs.sync();\n userPrefs.flush();\n Assembler.kill();\n Simulator.kill();\n System.exit(0);\n }\n } catch (BackingStoreException ex) {\n Logger.getLogger(RopeFrame.class.getName()).log(Level.SEVERE, null, ex);\n }\n}\n"
|
"private Map<String, List<URL>> initUrlForRulesFiles(ExportFileResource[] process) throws PersistenceException, CoreException, MalformedURLException {\n Map<String, List<URL>> map = new HashMap<String, List<URL>>();\n List<URL> urlList = new ArrayList<URL>();\n String processLabelAndVersion = null;\n IFile file;\n Item item = null;\n ProcessItem pi = null;\n if (PluginChecker.isRulesPluginLoaded()) {\n IProxyRepositoryFactory factory = CorePlugin.getDefault().getProxyRepositoryFactory();\n IRulesProviderService rulesService = (IRulesProviderService) GlobalServiceRegister.getDefault().getService(IRulesProviderService.class);\n for (int i = 0; i < process.length; i++) {\n if (!urlList.isEmpty()) {\n urlList = new ArrayList<URL>();\n }\n item = (process[i]).getItem();\n if (item instanceof ProcessItem) {\n pi = (ProcessItem) item;\n processLabelAndVersion = JavaResourcesHelper.getJobFolderName(pi.getProperty().getLabel(), pi.getProperty().getVersion());\n }\n for (int j = 0; j < pi.getProcess().getNode().size(); j++) {\n if (pi.getProcess().getNode().get(j) instanceof NodeType) {\n NodeType node = (NodeType) pi.getProcess().getNode().get(j);\n if (rulesService.isRuleComponent(node)) {\n for (Object obj : node.getElementParameter()) {\n if (obj instanceof ElementParameterType) {\n ElementParameterType elementParameter = (ElementParameterType) obj;\n if (elementParameter.getName().equals(\"String_Node_Str\")) {\n String id = elementParameter.getValue();\n if (factory.getLastVersion(id).getProperty().getItem() != null) {\n if (factory.getLastVersion(id).getProperty().getItem() instanceof RulesItem) {\n RulesItem rulesItem = (RulesItem) factory.getLastVersion(id).getProperty().getItem();\n file = rulesService.getFinalRuleFile(rulesItem, processLabelAndVersion);\n URL url = file.getLocationURI().toURL();\n urlList.add(url);\n }\n }\n }\n }\n }\n }\n }\n }\n map.put(processLabelAndVersion, urlList);\n }\n }\n return map;\n}\n"
|
"public List<String> toErrors(HttpServletRequest request, Form form, Exception exception) {\n if (exception instanceof AuthenticationServiceException) {\n if (exception.getMessage() != null && exception.getMessage().contains(UNSUCCESSFUL_LOGIN_STORMPATH_ERROR)) {\n return Collections.singletonList(getInvalidLoginMessage(request));\n }\n }\n return null;\n}\n"
|
"public void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer player, World world, IBlockState blockState, IProbeHitData data) {\n super.addProbeInfo(mode, probeInfo, player, world, blockState, data);\n TileEntity te = world.getTileEntity(data.getPos());\n if (te instanceof BuilderTileEntity) {\n int scan = ((BuilderTileEntity) te).getCurrentLevel();\n probeInfo.text(TextFormatting.GREEN + \"String_Node_Str\" + (scan == -1 ? \"String_Node_Str\" : scan));\n }\n}\n"
|
"public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n } else if (!(obj instanceof LSAPR_POLICY_AUDIT_EVENTS_INFO)) {\n return false;\n }\n LSAPR_POLICY_AUDIT_EVENTS_INFO other = (LSAPR_POLICY_AUDIT_EVENTS_INFO) obj;\n return Objects.equals(isAuditingMode(), other.isAuditingMode()) && Arrays.equals(getEventAuditingOptions(), other.getEventAuditingOptions()) && Objects.equals(getMaximumAuditEventCount(), other.getMaximumAuditEventCount());\n}\n"
|
"protected void onChildRestoreInstanceState() {\n if (searchTask != null && searchTask.isActive())\n onPreSearchRecommendations();\n else if (getLastRecommendations() != null) {\n onRecommendationsAcquired(getLastRecommendations());\n onSearchRecommendationsFinally();\n } else\n onPrepareForSearch();\n}\n"
|
"public void running() {\n if (isActivelyConnected()) {\n log.info(\"String_Node_Str\", type.getName(), lastServerAddress);\n broadcastOnConnection();\n reschedule(connectionCheckTask, CONNECTION_STABILIZATION, TimeUnit.SECONDS);\n }\n}\n"
|
"private void focusEditTextAndOpenKeyboard() {\n getDialog().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);\n}\n"
|
"protected ConnectionPolicy processConnectionPolicyProperties() {\n ConnectionPolicy policy = serverSession.getDefaultConnectionPolicy();\n if (properties == null || properties.isEmpty()) {\n return policy;\n }\n ConnectionPolicy policyFromProperties = (ConnectionPolicy) properties.get(EntityManagerProperties.CONNECTION_POLICY);\n if (policyFromProperties != null) {\n policy = policyFromProperties;\n }\n ConnectionPolicy newPolicy = null;\n String isLazyString = EntityManagerFactoryProvider.getConfigPropertyAsStringLogDebug(EntityManagerProperties.EXCLUSIVE_CONNECTION_IS_LAZY, properties, serverSession, false);\n if (isLazyString != null) {\n boolean isLazy = Boolean.parseBoolean(isLazyString);\n if (policy.isLazy() != isLazy) {\n if (newPolicy == null) {\n newPolicy = (ConnectionPolicy) policy.clone();\n }\n newPolicy.setIsLazy(isLazy);\n }\n }\n ConnectionPolicy.ExclusiveMode exclusiveMode = EntityManagerSetupImpl.getConnectionPolicyExclusiveModeFromProperties(properties, serverSession, false);\n if (exclusiveMode != null) {\n if (!exclusiveMode.equals(policy.getExclusiveMode())) {\n if (newPolicy == null) {\n newPolicy = (ConnectionPolicy) policy.clone();\n }\n newPolicy.setExclusiveMode(exclusiveMode);\n }\n }\n String user = EntityManagerFactoryProvider.getConfigPropertyAsStringLogDebug(EntityManagerProperties.JDBC_USER, properties, serverSession, false);\n String password = EntityManagerFactoryProvider.getConfigPropertyAsStringLogDebug(EntityManagerProperties.JDBC_PASSWORD, properties, serverSession, false);\n String driver = EntityManagerFactoryProvider.getConfigPropertyAsStringLogDebug(EntityManagerProperties.JDBC_DRIVER, properties, serverSession, false);\n String connectionString = EntityManagerFactoryProvider.getConfigPropertyAsStringLogDebug(EntityManagerProperties.JDBC_URL, properties, serverSession, false);\n Object jtaDataSourceObj = EntityManagerFactoryProvider.getConfigPropertyLogDebug(EntityManagerProperties.JTA_DATASOURCE, properties, serverSession, false);\n DataSource jtaDataSource = null;\n String jtaDataSourceName = null;\n if (jtaDataSourceObj != null) {\n if (jtaDataSourceObj instanceof DataSource) {\n jtaDataSource = (DataSource) jtaDataSourceObj;\n } else if (jtaDataSourceObj instanceof String) {\n jtaDataSourceName = (String) jtaDataSourceObj;\n }\n }\n Object nonjtaDataSourceObj = EntityManagerFactoryProvider.getConfigPropertyLogDebug(EntityManagerProperties.NON_JTA_DATASOURCE, properties, serverSession, false);\n DataSource nonjtaDataSource = null;\n String nonjtaDataSourceName = null;\n if (nonjtaDataSourceObj != null) {\n if (nonjtaDataSourceObj instanceof DataSource) {\n nonjtaDataSource = (DataSource) nonjtaDataSourceObj;\n } else if (nonjtaDataSourceObj instanceof String) {\n nonjtaDataSourceName = (String) nonjtaDataSourceObj;\n }\n }\n if (user != null || password != null || driver != null || connectionString != null || jtaDataSourceObj != null || nonjtaDataSourceObj != null) {\n boolean isDefaultConnectorRequired = isPropertyToBeAdded(driver) || isPropertyToBeAdded(connectionString);\n boolean isJNDIConnectorRequired = isPropertyToBeAdded(jtaDataSource, jtaDataSourceName) || isPropertyToBeAdded(nonjtaDataSource, nonjtaDataSourceName);\n if (isDefaultConnectorRequired && isJNDIConnectorRequired) {\n throw new IllegalArgumentException(ExceptionLocalization.buildMessage(\"String_Node_Str\", new Object[] {}));\n }\n DatasourceLogin login = (DatasourceLogin) policy.getLogin();\n if (login == null) {\n if (policy.getPoolName() != null) {\n login = (DatasourceLogin) serverSession.getConnectionPool(policy.getPoolName()).getLogin();\n } else {\n login = (DatasourceLogin) serverSession.getDatasourceLogin();\n }\n }\n if (login.shouldUseExternalTransactionController() && isDefaultConnectorRequired) {\n throw new IllegalArgumentException(ExceptionLocalization.buildMessage(\"String_Node_Str\", new Object[] {}));\n }\n javax.sql.DataSource dataSource = null;\n String dataSourceName = null;\n if (isJNDIConnectorRequired) {\n if (login.shouldUseExternalTransactionController()) {\n if (isPropertyToBeAdded(jtaDataSource, jtaDataSourceName)) {\n dataSource = jtaDataSource;\n dataSourceName = jtaDataSourceName;\n }\n if (isPropertyToBeAdded(nonjtaDataSource, nonjtaDataSourceName)) {\n serverSession.log(SessionLog.WARNING, SessionLog.PROPERTIES, \"String_Node_Str\");\n }\n } else {\n if (isPropertyToBeAdded(nonjtaDataSource, nonjtaDataSourceName)) {\n dataSource = nonjtaDataSource;\n dataSourceName = nonjtaDataSourceName;\n }\n if (isPropertyToBeAdded(jtaDataSource, jtaDataSourceName)) {\n serverSession.log(SessionLog.WARNING, SessionLog.PROPERTIES, \"String_Node_Str\");\n }\n }\n }\n Boolean isNewUserRequired = isPropertyValueToBeUpdated(login.getUserName(), user);\n Boolean isNewPasswordRequired;\n if (isNewUserRequired != null && !isNewUserRequired) {\n isNewPasswordRequired = Boolean.FALSE;\n } else {\n isNewPasswordRequired = isPropertyValueToBeUpdated(login.getPassword(), password);\n }\n DefaultConnector oldDefaultConnector = null;\n if (login.getConnector() instanceof DefaultConnector) {\n oldDefaultConnector = (DefaultConnector) login.getConnector();\n }\n boolean isNewDefaultConnectorRequired = oldDefaultConnector == null && isDefaultConnectorRequired;\n JNDIConnector oldJNDIConnector = null;\n if (login.getConnector() instanceof JNDIConnector) {\n oldJNDIConnector = (JNDIConnector) login.getConnector();\n }\n boolean isNewJNDIConnectorRequired = oldJNDIConnector == null && isJNDIConnectorRequired;\n Boolean isNewDriverRequired = null;\n Boolean isNewConnectionStringRequired = null;\n if (isNewDefaultConnectorRequired) {\n isNewDriverRequired = isPropertyValueToBeUpdated(null, driver);\n isNewConnectionStringRequired = isPropertyValueToBeUpdated(null, connectionString);\n } else {\n if (oldDefaultConnector != null) {\n isNewDriverRequired = isPropertyValueToBeUpdated(oldDefaultConnector.getDriverClassName(), driver);\n isNewConnectionStringRequired = isPropertyValueToBeUpdated(oldDefaultConnector.getConnectionString(), connectionString);\n }\n }\n Boolean isNewDataSourceRequired = null;\n if (isNewJNDIConnectorRequired) {\n isNewDataSourceRequired = Boolean.TRUE;\n } else {\n if (oldJNDIConnector != null) {\n if (dataSource != null) {\n if (!dataSource.equals(oldJNDIConnector.getDataSource())) {\n isNewDataSourceRequired = Boolean.TRUE;\n }\n } else if (dataSourceName != null) {\n if (!dataSourceName.equals(oldJNDIConnector.getName())) {\n isNewDataSourceRequired = Boolean.TRUE;\n }\n }\n }\n }\n if (isNewUserRequired != null || isNewPasswordRequired != null || isNewDriverRequired != null || isNewConnectionStringRequired != null || isNewDataSourceRequired != null) {\n if (newPolicy == null) {\n newPolicy = (ConnectionPolicy) policy.clone();\n }\n DatasourceLogin newLogin = (DatasourceLogin) newPolicy.getLogin();\n if (newPolicy.getLogin() == null || newPolicy.getLogin() == policy.getLogin()) {\n newLogin = (DatasourceLogin) login.clone();\n newPolicy.setLogin(newLogin);\n }\n newPolicy.setPoolName(null);\n if (isNewUserRequired != null) {\n if (isNewUserRequired) {\n newLogin.setProperty(\"String_Node_Str\", user);\n } else {\n newLogin.getProperties().remove(\"String_Node_Str\");\n }\n }\n if (isNewPasswordRequired != null) {\n if (isNewPasswordRequired) {\n newLogin.setProperty(\"String_Node_Str\", password);\n } else {\n newLogin.getProperties().remove(\"String_Node_Str\");\n }\n }\n if (isNewDefaultConnectorRequired) {\n newLogin.setConnector(new DefaultConnector());\n newLogin.setUsesExternalConnectionPooling(false);\n } else if (isNewJNDIConnectorRequired) {\n newLogin.setConnector(new JNDIConnector());\n newLogin.setUsesExternalConnectionPooling(true);\n }\n if (isDefaultConnectorRequired) {\n DefaultConnector defaultConnector = (DefaultConnector) newLogin.getConnector();\n if (isNewDriverRequired != null) {\n if (isNewDriverRequired) {\n defaultConnector.setDriverClassName(driver);\n } else {\n defaultConnector.setDriverClassName(null);\n }\n }\n if (isNewConnectionStringRequired != null) {\n if (isNewConnectionStringRequired) {\n defaultConnector.setDatabaseURL(connectionString);\n } else {\n defaultConnector.setDatabaseURL(null);\n }\n }\n } else if (isNewDataSourceRequired != null) {\n JNDIConnector jndiConnector = (JNDIConnector) newLogin.getConnector();\n if (isNewDataSourceRequired) {\n if (dataSource != null) {\n jndiConnector.setDataSource(dataSource);\n } else {\n jndiConnector.setName(dataSourceName);\n }\n }\n }\n }\n }\n if (newPolicy != null) {\n return newPolicy;\n } else {\n return policy;\n }\n}\n"
|
"public Map<String, String> getDetails() {\n Map<String, String> customparameterMap = new HashMap<String, String>();\n if (details != null && details.size() != 0) {\n Collection parameterCollection = details.values();\n Iterator iter = parameterCollection.iterator();\n while (iter.hasNext()) {\n HashMap<String, String> value = (HashMap<String, String>) iter.next();\n for (String key : value.keySet()) {\n customparameterMap.put(key, value.get(key));\n }\n }\n }\n if (rootdisksize != null && !customparameterMap.containsKey(\"String_Node_Str\")) {\n customparameterMap.put(\"String_Node_Str\", rootdisksize.toString());\n }\n return customparameterMap;\n}\n"
|
"public void reset() {\n clearTable();\n SWTUtil.disable(root);\n}\n"
|
"static byte[] gunzip(byte[] input) throws IOException {\n GZIPInputStream in = new GZIPInputStream(new ByteArrayInputStream(input));\n try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream(input.length)) {\n while (!inflater.finished()) {\n int count = inflater.inflate(GZIP_BUFFER.get());\n outputStream.write(GZIP_BUFFER.get(), 0, count);\n }\n return outputStream.toByteArray();\n } catch (DataFormatException e) {\n throw new IOException(e.getMessage(), e);\n }\n}\n"
|
"public void getWorkersByApp(HttpRequest request, HttpResponder responder, String appId) {\n programLifecycleHttpHandler.getWorkersByApp(RESTMigrationUtils.rewriteV2RequestToV3(request), responder, Constants.DEFAULT_NAMESPACE, appId);\n}\n"
|
"public void testWrite() throws Exception {\n openDesign(\"String_Node_Str\");\n TextItemHandle text = (TextItemHandle) designHandle.findElement(\"String_Node_Str\");\n String contentType = text.getContentType();\n assertEquals(DesignChoiceConstants.TEXT_CONTENT_TYPE_HTML, contentType);\n text.setContentType(DesignChoiceConstants.TEXT_CONTENT_TYPE_HTML);\n text.setContent(\"String_Node_Str\");\n text.setHasExpression(false);\n text.setTagType(\"String_Node_Str\");\n text.setLanguage(\"String_Node_Str\");\n text.setAltText(\"String_Node_Str\");\n text.setOrder(1);\n text = (TextItemHandle) designHandle.findElement(\"String_Node_Str\");\n text.setContent(\"String_Node_Str\");\n assertEquals(\"String_Node_Str\", text.getProperty(TextItem.CONTENT_PROP));\n assertEquals(\"String_Node_Str\", text.getStringProperty(TextItem.CONTENT_PROP));\n text = (TextItemHandle) designHandle.findElement(\"String_Node_Str\");\n text.setContentKey(\"String_Node_Str\");\n save();\n assertTrue(compareFile(\"String_Node_Str\"));\n}\n"
|
"public Object load(Path path) {\n File file = locateFile(path);\n String msg;\n if (file == null) {\n return null;\n } else if (path.isIndex()) {\n Index idx = new Index();\n File[] files = file.listFiles();\n for (int i = 0; i < files.length; i++) {\n String name = files[i].getName();\n if (files[i].isDirectory()) {\n idx.addIndex(name);\n } else {\n idx.addObject(StringUtils.removeEnd(name, SUFFIX_PROPS));\n }\n }\n idx.updateLastModified(new Date(file.lastModified()));\n return idx;\n } else if (file.getName().endsWith(SUFFIX_PROPS)) {\n try {\n return PropertiesSerializer.read(file);\n } catch (FileNotFoundException e) {\n msg = \"String_Node_Str\" + file.toString();\n LOG.log(Level.SEVERE, msg, e);\n return null;\n } catch (IOException e) {\n msg = \"String_Node_Str\" + file.toString();\n LOG.log(Level.SEVERE, msg, e);\n return null;\n }\n } else {\n return file;\n }\n}\n"
|
"private void addFileToDirectory(WPBFile parentDirectory, WPBFile file, InputStream is) throws WPBException, IOException {\n String dirPath = \"String_Node_Str\";\n String filePath = null;\n if (parentDirectory != null) {\n dirPath = getDirectoryFullPath(parentDirectory.getExternalKey(), adminStorage);\n }\n if (dirPath.length() > 0) {\n filePath = dirPath + \"String_Node_Str\" + file.getFileName();\n } else {\n filePath = file.getFileName();\n }\n WPBFilePath cloudFile = new WPBFilePath(PUBLIC_BUCKET, filePath);\n cloudFileStorage.storeFile(is, cloudFile);\n cloudFileStorage.updateContentType(cloudFile, ContentTypeDetector.fileNameToContentType(file.getFileName()));\n WPBFileInfo fileInfo = cloudFileStorage.getFileInfo(cloudFile);\n file.setBlobKey(cloudFile.getPath());\n file.setHash(fileInfo.getCrc32());\n file.setSize(fileInfo.getSize());\n file.setContentType(fileInfo.getContentType());\n file.setAdjustedContentType(file.getContentType());\n file.setDirectoryFlag(0);\n if (parentDirectory != null) {\n file.setOwnerExtKey(parentDirectory.getExternalKey());\n } else {\n file.setOwnerExtKey(\"String_Node_Str\");\n }\n WPBResource resource = new WPBResource(file.getExternalKey(), file.getFileName(), WPBResource.FILE_TYPE);\n adminStorage.delete(file.getExternalKey(), WPBFile.class);\n adminStorage.addWithKey(file);\n try {\n adminStorage.delete(resource.getRkey(), WPBResource.class);\n adminStorage.addWithKey(resource);\n } catch (WPBException e) {\n }\n}\n"
|
"public Stream<? extends Arguments> arguments(ContainerExtensionContext context) throws Exception {\n return ResourcesReader.readJson(RESOURCES_DIRECTORY).map(ObjectArrayArguments::create);\n}\n"
|
"public void setConfiguration(long flags, EntityPlayerMP changer) {\n unregisterLabel();\n super.setConfiguration(flags, changer);\n flags = flags >> 3;\n Label = (int) (flags & 0xFFFFl);\n if ((flags & (1 << (Buttons.PRIVATE.ordinal()))) != 0) {\n Player = changer.getDisplayName();\n } else {\n Player = \"String_Node_Str\";\n }\n registerLabel();\n}\n"
|
"String replaceListRanges(Formula formula) {\n String codedFormula = formula.getFormula();\n Sheet sheet = formula.getSheet();\n StringBuilder appliedFormulaBuilder = new StringBuilder();\n String delimiter = formulaListRangeToken;\n int index = codedFormula.indexOf(delimiter);\n boolean isExpression = false;\n while (index >= 0) {\n String token = codedFormula.substring(0, index);\n if (isExpression) {\n if (sheet.getListRanges().containsKey(token)) {\n appliedFormula += ((ListRange) sheet.getListRanges().get(token)).toExcelCellRange();\n } else if (sheet.getNamedCells().containsKey(token)) {\n appliedFormula += ((Cell) sheet.getNamedCells().get(token)).toCellName();\n } else {\n log.warn(\"String_Node_Str\" + token);\n return null;\n }\n } else {\n appliedFormula += token;\n }\n codedFormula = codedFormula.substring(index + 1);\n index = codedFormula.indexOf(delimiter);\n isExpression = !isExpression;\n }\n appliedFormula += codedFormula;\n return appliedFormula;\n}\n"
|
"public void onReceive(Context context, Intent intent) {\n if (intent.getAction().equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {\n onBluetoothStateChanged(mLocalManager.getBluetoothState());\n } else if (intent.getAction().equals(BluetoothDevice.ACTION_BOND_STATE_CHANGED) && mScreenType == SCREEN_TYPE_DEVICEPICKER) {\n int bondState = intent.getIntExtra(BluetoothDevice.EXTRA_BOND_STATE, BluetoothDevice.ERROR);\n if (bondState == BluetoothDevice.BOND_BONDED) {\n BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n if (device.equals(mSelectedDevice)) {\n sendDevicePickedIntent(device);\n finish();\n }\n }\n }\n}\n"
|
"public void onEnable() {\n log.info(\"String_Node_Str\" + getDescription().getName() + \"String_Node_Str\" + getDescription().getFullName());\n getServer().getPluginManager().registerEvent(Type.REDSTONE_CHANGE, blockListener, Priority.Highest, this);\n}\n"
|
"private String getCopyValueOfUniqueField(final DataDefinition dataDefinition, final FieldDefinition fieldDefinition, final String value) {\n if (value == null) {\n return value;\n } else {\n Matcher matcher = Pattern.compile(\"String_Node_Str\").matcher(value);\n String oldValue = value;\n int index = 1;\n if (matcher.matches()) {\n oldValue = matcher.group(1);\n index = Integer.valueOf(matcher.group(2)) + 1;\n }\n while (true) {\n String newValue = oldValue + \"String_Node_Str\" + (index++) + \"String_Node_Str\";\n int matches = dataDefinition.find().setMaxResults(1).add(SearchRestrictions.eq(fieldDefinition.getName(), newValue)).list().getTotalNumberOfEntities();\n if (matches == 0) {\n return newValue;\n }\n }\n }\n}\n"
|
"public static String getLocalFileStorageUrl(String dir, String fileName) {\n if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {\n if (fileName == null) {\n return null;\n }\n if (dir == null || dir.equals(\"String_Node_Str\")) {\n return Environment.getExternalStorageDirectory() + ('/' + IMAGE_STORAGE_DEFAULT_DIR + '/' + fileName);\n } else {\n dir = dir + '/';\n }\n return Environment.getExternalStorageDirectory() + \"String_Node_Str\" + dir + fileName;\n } else {\n LogUtils.logD(\"String_Node_Str\");\n }\n return null;\n}\n"
|
"public FlowValidationDto validateFlow(final String flowId, final String correlationId) {\n Flow flow = pathComputer.getFlow(flowId);\n if (flow == null)\n return null;\n logger.debug(\"String_Node_Str\", flow);\n Set<String> switches = new HashSet<>();\n switches.add(flow.getSourceSwitch());\n if (flow.getFlowPath() == null) {\n throw new InvalidPathException(flowId, \"String_Node_Str\");\n }\n for (PathNode node : flow.getFlowPath().getPath()) {\n switches.add(node.getSwitchId());\n }\n switches.add(flow.getDestinationSwitch());\n Long ignoreCookie = 0L;\n int correlation_iter = 1;\n Map<String, SwitchFlowEntries> rules = new HashMap<>();\n for (String switchid : switches) {\n String corr_id = correlationId + \"String_Node_Str\" + correlation_iter++;\n rules.put(switchid, switchService.getRules(switchid, ignoreCookie, corr_id));\n }\n List<PathDiscrepancyDto> discrepencies = new ArrayList<>();\n for (String switchid : switches) {\n PathDiscrepancyDto disc = new PathDiscrepancyDto();\n disc.setField(\"String_Node_Str\" + switchid);\n disc.setExpectedValue(\"String_Node_Str\");\n int numRules = (rules.get(switchid) == null) ? 0 : rules.get(switchid).getFlowEntries().size();\n disc.setActualValue(\"String_Node_Str\" + numRules);\n disc.setNode(new PathNode());\n discrepencies.add(disc);\n }\n FlowValidationDto result = new FlowValidationDto();\n result.setFlow(flow);\n result.setFlowId(flowId);\n result.setDiscrepancies(discrepencies);\n result.setAsExpected(discrepencies.size() == 0);\n return result;\n}\n"
|
"static JavaRDD<Cells> doJoin(JavaRDD<Cells> leftRdd, JavaRDD<Cells> rightRdd, List<Relation> joinRelations) {\n List<ColumnName> leftTables = new ArrayList<>();\n List<ColumnName> rightTables = new ArrayList<>();\n for (Relation relation : joinRelations) {\n ColumnSelector selectorRight = (ColumnSelector) relation.getRightTerm();\n ColumnSelector selectorLeft = (ColumnSelector) relation.getLeftTerm();\n if (relation.getOperator().equals(Operator.EQ)) {\n leftTables.add(selectorLeft.getName());\n rightTables.add(selectorRight.getName());\n System.out.println(\"String_Node_Str\" + selectorRight.getName().getName() + \"String_Node_Str\" + selectorLeft.getName().getName());\n }\n }\n JavaPairRDD<List<Object>, Cells> rddLeft = leftRdd.mapToPair(new MapKeyForJoin(leftTables));\n JavaPairRDD<List<Object>, Cells> rddRight = rightRdd.mapToPair(new MapKeyForJoin(rightTables));\n JavaPairRDD<List<Object>, Tuple2<Cells, Cells>> joinRDD = rddLeft.join(rddRight);\n JavaRDD<Cells> joinedResult = joinRDD.map(new JoinCells());\n return joinedResult;\n}\n"
|
"private void updateSharedUserPerms(PackageSetting deletedPs) {\n if ((deletedPs == null) || (deletedPs.pkg == null)) {\n Log.i(TAG, \"String_Node_Str\");\n return;\n }\n if (deletedPs.sharedUser == null) {\n return;\n }\n SharedUserSetting sus = deletedPs.sharedUser;\n for (String eachPerm : deletedPs.pkg.requestedPermissions) {\n boolean used = false;\n if (!sus.grantedPermissions.contains(eachPerm)) {\n continue;\n }\n for (PackageSetting pkg : sus.packages) {\n if (pkg.pkg.requestedPermissions.contains(eachPerm)) {\n used = true;\n break;\n }\n }\n if (!used) {\n sus.grantedPermissions.remove(eachPerm);\n sus.loadedPermissions.remove(eachPerm);\n }\n }\n int[] newGids = null;\n for (PackageSetting pkg : sus.packages) {\n newGids = appendInts(newGids, pkg.gids);\n }\n sus.gids = newGids;\n}\n"
|
"public MatOfDouble getmProjectionCV() {\n if (mProjectionDirtyCV) {\n if (mProjectionCV == null) {\n mProjectionCV = new MatOfDouble();\n mProjectionCV.create(3, 3, CvType.CV_64FC1);\n }\n final float fovAspectRatio = mFOVX / mFOVY;\n double diagonalPx = Math.sqrt((Math.pow(mWidthPx, 2.0) + Math.pow(mWidthPx / fovAspectRatio, 2.0)));\n double diagonalFOV = Math.sqrt((Math.pow(mFOVX, 2.0) + Math.pow(mFOVY, 2.0)));\n double focalLengthPx = diagonalPx / (2.0 * Math.tan(0.5 * diagonalFOV * Math.PI / 180f));\n mProjectionCV.put(0, 0, focalLengthPx);\n mProjectionCV.put(0, 1, 0.0);\n mProjectionCV.put(0, 2, 0.5 * mWidthPx);\n mProjectionCV.put(1, 0, 0.0);\n mProjectionCV.put(1, 1, focalLengthPx);\n mProjectionCV.put(1, 2, 0.5 * mHeightPx);\n mProjectionCV.put(2, 0, 0.0);\n mProjectionCV.put(2, 1, 0.0);\n mProjectionCV.put(2, 2, 1.0);\n }\n return mProjectionCV;\n}\n"
|
"public void stop() {\n newScript(MutableMap.of(\"String_Node_Str\", false), STOPPING).body.append(CommonCommands.sudo(\"String_Node_Str\")).execute();\n}\n"
|
"private void validateAMXConfig(final AMXProxy proxy, final ProblemList problems) throws InstanceNotFoundException {\n if (!AMXConfigProxy.class.isAssignableFrom(proxy.extra().genericInterface())) {\n return;\n }\n final AMXConfigProxy config = proxy.as(AMXConfigProxy.class);\n if (!config.type().equals(\"String_Node_Str\")) {\n if (!AMXConfigProxy.class.isAssignableFrom(config.parent().extra().genericInterface())) {\n problems.add(\"String_Node_Str\" + config.objectName() + \"String_Node_Str\" + config.getParent());\n }\n }\n final Map<String, String> defaultValues = config.getDefaultValues(false);\n final Map<String, String> defaultValuesAMX = config.getDefaultValues(true);\n if (defaultValues.keySet().size() != defaultValuesAMX.keySet().size()) {\n problems.add(\"String_Node_Str\" + defaultValues.keySet().size() + \"String_Node_Str\" + defaultValuesAMX.keySet().size());\n }\n for (final Map.Entry<String, String> me : defaultValues.entrySet()) {\n final Object value = me.getValue();\n if (value == null) {\n problems.add(\"String_Node_Str\" + key);\n } else if (!(value instanceof String)) {\n problems.add(\"String_Node_Str\" + key);\n }\n }\n final String[] subTypes = config.extra().subTypes();\n if (subTypes != null) {\n for (final String subType : subTypes) {\n final Map<String, String> subTypeDefaults = config.getDefaultValues(subType, false);\n }\n }\n}\n"
|
"public void report(final MeasurementUnit mu) throws ReportingException {\n if (runInfo.isRunning()) {\n rwLock.readLock().lock();\n for (Reporter r : reporters) {\n r.report(mu);\n }\n rwLock.readLock().unlock();\n } else {\n log.debug(\"String_Node_Str\");\n }\n}\n"
|
"public synchronized void open() throws ResourceUnavailableException {\n int width = 0;\n int height = 0;\n if (opened)\n return;\n if (inputFormat == null)\n throw new ResourceUnavailableException(\"String_Node_Str\");\n if (outputFormat == null)\n throw new ResourceUnavailableException(\"String_Node_Str\");\n width = (int) ((VideoFormat) outputFormat).getSize().getWidth();\n height = (int) ((VideoFormat) outputFormat).getSize().getHeight();\n long avcodec = FFMPEG.avcodec_find_encoder(FFMPEG.CODEC_ID_H264);\n avcontext = FFMPEG.avcodec_alloc_context();\n FFMPEG.avcodeccontext_set_pix_fmt(avcontext, FFMPEG.PIX_FMT_YUV420P);\n FFMPEG.avcodeccontext_set_size(avcontext, width, height);\n FFMPEG.avcodeccontext_set_qcompress(avcontext, 0.6f);\n int _bitRate = 256000;\n FFMPEG.avcodeccontext_set_bit_rate(avcontext, _bitRate);\n FFMPEG.avcodeccontext_set_bit_rate_tolerance(avcontext, _bitRate);\n FFMPEG.avcodeccontext_set_rc_max_rate(avcontext, _bitRate);\n FFMPEG.avcodeccontext_set_sample_aspect_ratio(avcontext, 0, 0);\n FFMPEG.avcodeccontext_set_thread_count(avcontext, 0);\n FFMPEG.avcodeccontext_set_time_base(avcontext, 1000, 25500);\n FFMPEG.avcodeccontext_set_quantizer(avcontext, 10, 51, 4);\n FFMPEG.avcodeccontext_add_partitions(avcontext, 0x111);\n FFMPEG.avcodeccontext_set_mb_decision(avcontext, FFMPEG.FF_MB_DECISION_SIMPLE);\n FFMPEG.avcodeccontext_set_rc_eq(avcontext, \"String_Node_Str\");\n FFMPEG.avcodeccontext_add_flags(avcontext, FFMPEG.CODEC_FLAG_LOOP_FILTER);\n FFMPEG.avcodeccontext_set_me_method(avcontext, 1);\n FFMPEG.avcodeccontext_set_me_subpel_quality(avcontext, 6);\n FFMPEG.avcodeccontext_set_me_range(avcontext, 16);\n FFMPEG.avcodeccontext_set_me_cmp(avcontext, FFMPEG.FF_CMP_CHROMA);\n FFMPEG.avcodeccontext_set_scenechange_threshold(avcontext, 40);\n FFMPEG.avcodeccontext_set_crf(avcontext, 0);\n FFMPEG.avcodeccontext_set_rc_buffer_size(avcontext, 0);\n FFMPEG.avcodeccontext_set_gop_size(avcontext, IFRAME_INTERVAL);\n FFMPEG.avcodeccontext_set_i_quant_factor(avcontext, 1f / 1.4f);\n if (FFMPEG.avcodec_open(avcontext, avcodec) < 0)\n throw new RuntimeException(\"String_Node_Str\");\n encFrameLen = (width * height * 3) / 2;\n rawFrameBuffer = FFMPEG.av_malloc(encFrameLen);\n avframe = FFMPEG.avcodec_alloc_frame();\n int size = width * height;\n FFMPEG.avframe_set_data(avframe, rawFrameBuffer, size, size / 4);\n FFMPEG.avframe_set_linesize(avframe, width, width / 2, width / 2);\n encFrameBuffer = new byte[encFrameLen];\n opened = true;\n super.open();\n}\n"
|
"private Object getCellValue(HSSFCell cell, Object obj) {\n Object value = null;\n if (obj instanceof String) {\n value = cell.getStringCellValue() != null ? cell.getStringCellValue().trim() : null;\n } else if (obj instanceof Double) {\n value = new Double(cell.getNumericCellValue());\n } else if (obj instanceof BigDecimal) {\n value = new BigDecimal(cell.getNumericCellValue());\n } else if (obj instanceof Integer) {\n value = new Integer((int) cell.getNumericCellValue());\n } else if (obj instanceof Float) {\n value = new Float(cell.getNumericCellValue());\n } else if (obj instanceof Date) {\n value = cell.getDateCellValue();\n } else if (obj instanceof Calendar) {\n Calendar c = Calendar.getInstance();\n c.setTime(cell.getDateCellValue());\n value = c;\n } else if (obj instanceof Boolean) {\n if (cell.getCellType() == HSSFCell.CELL_TYPE_BOOLEAN) {\n value = (cell.getBooleanCellValue()) ? Boolean.TRUE : Boolean.FALSE;\n } else if (cell.getCellType() == HSSFCell.CELL_TYPE_STRING) {\n value = Boolean.valueOf(cell.getStringCellValue());\n } else {\n value = Boolean.FALSE;\n }\n }\n return value;\n}\n"
|
"public static double[] deserializeDouble(List<MPIBuffer> buffers, int byteLength) {\n int noOfDoubles = byteLength / 8;\n double[] returnDoubles = new double[noOfDoubles];\n int bufferIndex = 0;\n for (int i = 0; i < noOfDoubles; i++) {\n ByteBuffer byteBuffer = buffers.get(bufferIndex).getByteBuffer();\n int remaining = byteBuffer.remaining();\n if (remaining >= 8) {\n returnDoubles[i] = byteBuffer.getDouble();\n } else {\n bufferIndex = getReadBuffer(buffers, 8, bufferIndex);\n if (bufferIndex < 0) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n }\n }\n return returnDoubles;\n}\n"
|
"public Object visitDeclaratorNode(DeclaratorNode node, LinkedList args) {\n throw new RuntimeException(\"String_Node_Str\" + \"String_Node_Str\");\n}\n"
|
"protected Object putIfAbsentInternal(K key, V value, ExpiryPolicy expiryPolicy, boolean withCompletionEvent, boolean async) {\n long start = System.nanoTime();\n ensureOpen();\n validateNotNull(key, value);\n CacheProxyUtil.validateConfiguredTypes(cacheConfig, key, value);\n Data keyData = toData(key);\n Data valueData = toData(value);\n boolean marked = !cacheOnUpdate || keyStateMarker.markIfUnmarked(keyData);\n Data expiryPolicyData = toData(expiryPolicy);\n int completionId = withCompletionEvent ? nextCompletionId() : -1;\n ClientMessage request = CachePutIfAbsentCodec.encodeRequest(nameWithPrefix, keyData, valueData, expiryPolicyData, completionId);\n ClientInvocationFuture future;\n try {\n future = invoke(request, keyData, completionId);\n } catch (Exception e) {\n throw rethrow(e);\n }\n ClientDelegatingFuture<Boolean> delegatingFuture = new ClientDelegatingFuture<Boolean>(future, clientContext.getSerializationService(), PUT_IF_ABSENT_RESPONSE_DECODER);\n if (async) {\n return putIfAbsentInternalAsync(value, start, keyData, valueData, delegatingFuture, marked);\n }\n return putIfAbsentInternalSync(value, start, keyData, valueData, delegatingFuture, marked);\n}\n"
|
"private void showBottomBar() {\n if (!isBottomBarShowing() && canShowBottomBar()) {\n AniUtils.animateBottomBar(mBottomBar, true);\n }\n}\n"
|
"public static boolean checkSameOriginPolicy(URL url1, URL url2) {\n logger.debug(\"String_Node_Str\", url1, url2);\n String endpointProtocol = url1.getProtocol();\n String subjectProtocol = url2.getProtocol();\n if (!endpointProtocol.equalsIgnoreCase(subjectProtocol)) {\n logger.error(\"String_Node_Str\");\n return false;\n }\n String endpointHost = url1.getHost();\n String subjectHost = url2.getHost();\n if (!endpointHost.equals(subjectHost)) {\n logger.error(\"String_Node_Str\");\n return false;\n }\n int endpointPort = url1.getPort();\n if (endpointPort == -1) {\n endpointPort = url1.getDefaultPort();\n }\n int subjectPort = url2.getPort();\n if (subjectPort == -1) {\n subjectPort = url2.getDefaultPort();\n }\n if (!(endpointPort == subjectPort)) {\n logger.error(\"String_Node_Str\");\n return false;\n }\n return true;\n}\n"
|
"public int isInside(int x, int y, int z) {\n blockState = null;\n x -= thisCoord.getX();\n y -= thisCoord.getY();\n z -= thisCoord.getZ();\n int ok = 0;\n for (int i = 0; i < formulas.size(); i++) {\n IFormula formula = formulas.get(i);\n Bounds bounds = this.bounds.get(i);\n ShapeModifier modifier = modifiers.get(i);\n int inside = 0;\n if (bounds.in(x, y, z)) {\n int tx = x;\n int ty = y;\n int tz = z;\n BlockPos o = bounds.getOffset();\n switch(modifier.getRotation()) {\n default:\n case NONE:\n break;\n case X:\n tx = x;\n ty = (z - o.getZ()) + o.getY();\n tz = (y - o.getY()) + o.getZ();\n break;\n case Y:\n tx = (z - o.getZ()) + o.getX();\n ;\n ty = y;\n tz = (x - o.getX()) + o.getZ();\n break;\n case Z:\n tx = (y - o.getY()) + o.getX();\n ;\n ty = (x - o.getX()) + o.getY();\n tz = z;\n break;\n }\n if (modifier.isFlipY()) {\n ty = o.getY() - (ty - o.getY());\n }\n inside = formula.isInside(tx + thisCoord.getX(), ty + thisCoord.getY(), tz + thisCoord.getZ());\n }\n switch(modifier.getOperation()) {\n case UNION:\n if (inside == 1) {\n ok = 1;\n blockState = blockStates.get(i);\n if (blockState == null) {\n blockState = formula.getLastState();\n }\n }\n break;\n case SUBTRACT:\n if (inside == 1) {\n ok = 0;\n }\n break;\n case INTERSECT:\n if (inside == 1 && ok == 1) {\n ok = 1;\n blockState = blockStates.get(i);\n if (blockState == null) {\n blockState = blockStates.get(i);\n if (blockState == null) {\n blockState = formula.getLastState();\n }\n }\n } else {\n ok = 0;\n }\n break;\n }\n }\n return ok;\n}\n"
|
"public int compareTo(Object o) {\n if (!(o instanceof ContestContestant)) {\n throw new ClassCastException(\"String_Node_Str\");\n }\n ContestContestant occ = (ContestContestant) o;\n if (occ.getScore() == this.score) {\n return this.time < occ.getTime() ? -1 : 1;\n }\n return this.score - occ.getScore();\n}\n"
|
"public void createHandler() {\n mHandler = new Handler(getLooper()) {\n public void handleMessage(Message msg) {\n if (msg.what == MESSAGE_DOWNLOAD) {\n StockChartView token = (StockChartView) msg.obj;\n handleRequest(token);\n }\n }\n });\n}\n"
|
"public static void main(String[] args) throws MalformedURLException {\n logger.debug(\"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n System.setProperty(\"String_Node_Str\", \"String_Node_Str\");\n Options options = new Options();\n Option projectPathOption = new Option(\"String_Node_Str\", \"String_Node_Str\", true, \"String_Node_Str\");\n projectPathOption.setRequired(true);\n options.addOption(projectPathOption);\n Option newProjectOption = new Option(\"String_Node_Str\", \"String_Node_Str\", true, \"String_Node_Str\");\n newProjectOption.setRequired(false);\n options.addOption(newProjectOption);\n Option deleteProject = new Option(\"String_Node_Str\", \"String_Node_Str\", true, \"String_Node_Str\");\n newProjectOption.setRequired(false);\n options.addOption(deleteProject);\n CommandLineParser parser = new DefaultParser();\n HelpFormatter formatter = new HelpFormatter();\n CommandLine cmd;\n try {\n cmd = parser.parse(options, args);\n } catch (ParseException e) {\n System.out.println(e.getMessage());\n String usage = \"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 ;\n formatter.printHelp(200, \"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\", options, usage);\n System.exit(1);\n return;\n }\n String newProjectFlag = cmd.getOptionValue(\"String_Node_Str\");\n String projectPath = cmd.getOptionValue(\"String_Node_Str\");\n String deleteProject1 = cmd.getOptionValue(\"String_Node_Str\");\n GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();\n ctx.load(\"String_Node_Str\");\n ctx.refresh();\n ctx.load(\"String_Node_Str\");\n FileBasedProjectManagerFactory fileBasedProjectManagerFactory = ctx.getBean(\"String_Node_Str\", FileBasedProjectManagerFactory.class);\n String baseDir = System.getProperty(\"String_Node_Str\");\n if (baseDir == null) {\n baseDir = \"String_Node_Str\";\n System.setProperty(\"String_Node_Str\", baseDir);\n }\n Map<String, String> parameters = new HashMap<>();\n parameters.put(\"String_Node_Str\", baseDir);\n FileBasedProjectManager projectManager = fileBasedProjectManagerFactory.createProjectManager(parameters);\n if (newProjectFlag != null) {\n if (projectPath == null) {\n System.out.println(\"String_Node_Str\");\n return;\n }\n File project = new File(projectPath);\n if (project.exists()) {\n System.out.println(\"String_Node_Str\");\n return;\n } else {\n logger.info(\"String_Node_Str\" + projectPath + \"String_Node_Str\");\n project.mkdir();\n }\n projectManager.createProject(\"String_Node_Str\", new File(projectPath).getAbsolutePath());\n }\n if (deleteProject1 != null) {\n if (projectPath == null) {\n System.out.println(\"String_Node_Str\");\n return;\n }\n projectManager.deleteProject(new File(projectPath).getAbsolutePath());\n return;\n }\n if (projectPath == null) {\n File cwd = new File(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\" + cwd.getAbsolutePath());\n projectPath = cwd.getAbsolutePath();\n }\n System.setProperty(\"String_Node_Str\", new File(projectPath).getAbsolutePath());\n System.out.println(\"String_Node_Str\" + System.getProperty(\"String_Node_Str\") + \"String_Node_Str\");\n NetworkDiscovererFactory discovererFactory = ctx.getBean(\"String_Node_Str\", NetworkDiscovererFactory.class);\n VersionManagerFactory versionManagerFactory = ctx.getBean(\"String_Node_Str\", VersionManagerFactory.class);\n Map<String, String> props = new HashMap<>();\n props.put(\"String_Node_Str\", projectPath);\n VersionManager versionManager = versionManagerFactory.createVersionManager(\"String_Node_Str\", props);\n String version = versionManager.createVersion();\n props.put(\"String_Node_Str\", version);\n NetworkDiscoverer networkDiscoverer = discovererFactory.createNetworkDiscoverer(\"String_Node_Str\", props);\n networkDiscoverer.addNetworkDiscoveryListeners(result -> {\n Map<String, Node> nodes = result.getNodes();\n for (String node : nodes.keySet()) {\n System.out.println(\"String_Node_Str\" + node);\n }\n });\n ConnectionDetailsManagerFactory factory = ctx.getBean(\"String_Node_Str\", ConnectionDetailsManagerFactory.class);\n ConnectionDetailsManager connectionDetailsManager = factory.createConnectionDetailsManager(\"String_Node_Str\", props);\n Map<String, ConnectionDetails> connectionDetails = connectionDetailsManager.getConnections();\n networkDiscoverer.startDiscovery(new HashSet<>(connectionDetails.values()));\n}\n"
|
"public void initGui() {\n super.initGui();\n int maxEnergyStored = tileEntity.getMaxEnergyStored();\n energyBar = new EnergyBar(mc, this).setVertical().setMaxValue(maxEnergyStored).setLayoutHint(new PositionalLayout.PositionalHint(10, 7, 8, 54)).setShowText(false);\n energyBar.setValue(GenericEnergyStorageTileEntity.getCurrentRF());\n Panel toplevel = new Panel(mc, this).setBackground(iconLocation).setLayout(new PositionalLayout()).addChild(energyBar);\n toplevel.setBounds(new Rectangle(guiLeft, guiTop, xSize, ySize));\n window = new Window(this, toplevel);\n tileEntity.requestRfFromServer(RFTools.MODID);\n}\n"
|
"public void enable() {\n settings.getInstance().loadSettings();\n log.log(Level.INFO, \"String_Node_Str\");\n}\n"
|
"private void reloadConfiguration() {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);\n mVibrateOnKeyPress = sp.getBoolean(\"String_Node_Str\", false);\n mSoundOnKeyPress = sp.getBoolean(\"String_Node_Str\", false);\n mKeyboardChangeNotification = sp.getBoolean(\"String_Node_Str\", true);\n if (mSoundOnKeyPress) {\n Log.i(\"String_Node_Str\", \"String_Node_Str\");\n ((AudioManager) getSystemService(Context.AUDIO_SERVICE)).loadSoundEffects();\n mAutoCaps = sp.getBoolean(\"String_Node_Str\", true);\n mShowCandidates = sp.getBoolean(\"String_Node_Str\", true);\n mChangeKeysMode = sp.getString(\"String_Node_Str\", \"String_Node_Str\");\n Log.d(\"String_Node_Str\", \"String_Node_Str\" + \"String_Node_Str\" + mVibrateOnKeyPress + \"String_Node_Str\" + mSoundOnKeyPress + \"String_Node_Str\" + mKeyboardChangeNotification + \"String_Node_Str\" + mAutoCaps + \"String_Node_Str\" + mShowCandidates + \"String_Node_Str\" + mChangeKeysMode);\n}\n"
|
"public Address growDiscontiguousSpace(int chunks) {\n return headDiscontiguousRegion = Map.allocateContiguousChunks(descriptor, this, chunks, headDiscontiguousRegion);\n}\n"
|
"public ConstructorReportItem translate() {\n ConstructorReportItem item = new ConstructorReportItem(this.getAlias());\n item.setResultType(this.getJavaType());\n for (Selection selection : this.getCompoundSelectionItems()) {\n if (((SelectionImpl) selection).isCompoundSelection()) {\n item.addItem(((ConstructorSelectionImpl) selection).translate());\n } else {\n ReportItem reportItem = new ReportItem(item.getName() + item.getReportItems().size(), ((SelectionImpl) selection).getCurrentNode());\n reportItem.setResultType(selection.getJavaType());\n item.addItem(reportItem);\n }\n }\n return item;\n}\n"
|
"private synchronized void createFakeSendStreamIfNecessary() {\n if (CREATE_FAKE_SEND_STREAM_IF_NECESSARY && (fakeSendStream == null) && sendStreams.isEmpty() && (streamRTPManagers.size() > 1)) {\n Format supportedFormat = null;\n for (StreamRTPManagerDesc s : streamRTPManagers) {\n Format[] formats = s.getFormats();\n if ((formats != null) && (formats.length > 0)) {\n for (Format f : formats) {\n if (f != null) {\n supportedFormat = f;\n break;\n }\n }\n if (supportedFormat != null)\n break;\n }\n }\n if (supportedFormat != null) {\n try {\n fakeSendStream = manager.createSendStream(new FakePushBufferDataSource(supportedFormat), 0);\n } catch (Throwable t) {\n if (t instanceof ThreadDeath)\n throw (ThreadDeath) t;\n else {\n logger.error(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\", t);\n }\n }\n }\n }\n}\n"
|
"public void shouldDelete() {\n repo.deleteById(\"String_Node_Str\", \"String_Node_Str\");\n try {\n assertNull(repo.findById(\"String_Node_Str\"));\n fail();\n } catch (EntityNotFoundException expected) {\n }\n}\n"
|
"public RestfulResponse suspendJobRecovery(JobQueueReq request) {\n if (StringUtils.isEmpty(request.getJobId())) {\n return Builder.build(false, \"String_Node_Str\");\n }\n JobPo jobPo = appContext.getSuspendJobQueue().getJob(request.getJobId());\n if (jobPo == null) {\n return Builder.build(false, \"String_Node_Str\");\n }\n if (jobPo.isCron()) {\n Date nextTriggerTime = CronExpressionUtils.getNextTriggerTime(jobPo.getCronExpression());\n if (nextTriggerTime != null) {\n jobPo.setGmtModified(SystemClock.now());\n try {\n appContext.getCronJobQueue().add(jobPo);\n } catch (DupEntryException e) {\n return Builder.build(false, \"String_Node_Str\");\n } catch (Exception e) {\n return Builder.build(false, \"String_Node_Str\" + e.getMessage());\n }\n if (jobPo.getRelyOnPrevCycle()) {\n try {\n jobPo.setTriggerTime(nextTriggerTime.getTime());\n appContext.getExecutableJobQueue().add(jobPo);\n } catch (DupEntryException e) {\n return Builder.build(false, \"String_Node_Str\");\n } catch (Exception e) {\n return Builder.build(false, \"String_Node_Str\" + e.getMessage());\n }\n } else {\n Long lastGenerateTriggerTime = jobPo.getLastGenerateTriggerTime();\n if (lastGenerateTriggerTime == null || lastGenerateTriggerTime == 0) {\n lastGenerateTriggerTime = SystemClock.now();\n }\n appContext.getNoRelyJobGenerator().generateCronJobForInterval(jobPo, new Date(lastGenerateTriggerTime));\n }\n } else {\n return Builder.build(false, \"String_Node_Str\");\n }\n } else if (jobPo.isRepeatable()) {\n if (jobPo.getRepeatCount() == -1 || jobPo.getRepeatedCount() < jobPo.getRepeatCount()) {\n jobPo.setGmtModified(SystemClock.now());\n try {\n appContext.getRepeatJobQueue().add(jobPo);\n } catch (DupEntryException e) {\n return Builder.build(false, \"String_Node_Str\");\n } catch (Exception e) {\n return Builder.build(false, \"String_Node_Str\" + e.getMessage());\n }\n if (jobPo.getRelyOnPrevCycle()) {\n try {\n JobPo repeatJob = appContext.getRepeatJobQueue().getJob(request.getJobId());\n long nextTriggerTime = JobUtils.getRepeatNextTriggerTime(repeatJob);\n jobPo.setTriggerTime(nextTriggerTime);\n appContext.getExecutableJobQueue().add(jobPo);\n } catch (DupEntryException e) {\n return Builder.build(false, \"String_Node_Str\");\n } catch (Exception e) {\n return Builder.build(false, \"String_Node_Str\" + e.getMessage());\n }\n } else {\n Long lastGenerateTriggerTime = jobPo.getLastGenerateTriggerTime();\n if (lastGenerateTriggerTime == null || lastGenerateTriggerTime == 0) {\n lastGenerateTriggerTime = SystemClock.now();\n }\n appContext.getNoRelyJobGenerator().generateRepeatJobForInterval(jobPo, new Date(lastGenerateTriggerTime));\n }\n } else {\n return Builder.build(false, \"String_Node_Str\");\n }\n }\n if (!appContext.getSuspendJobQueue().remove(request.getJobId())) {\n return Builder.build(false, \"String_Node_Str\");\n }\n JobLogUtils.log(LogType.RESUME, jobPo, appContext.getJobLogger());\n return Builder.build(true);\n}\n"
|
"public void renderReportlet(String docName, String objectId, InputOptions renderOptions, List activeIds, OutputStream out) throws ReportServiceException {\n IReportDocument doc = ReportEngineService.getInstance().openReportDocument(getReportDesignName(renderOptions), docName, getModuleOptions(renderOptions));\n HttpServletRequest request = (HttpServletRequest) renderOptions.getOption(InputOptions.OPT_REQUEST);\n Locale locale = (Locale) renderOptions.getOption(InputOptions.OPT_LOCALE);\n String format = (String) renderOptions.getOption(InputOptions.OPT_FORMAT);\n Boolean isMasterPageContent = (Boolean) renderOptions.getOption(InputOptions.OPT_IS_MASTER_PAGE_CONTENT);\n boolean isMasterPage = isMasterPageContent == null ? false : isMasterPageContent.booleanValue();\n Boolean svgFlag = (Boolean) renderOptions.getOption(InputOptions.OPT_IS_MASTER_PAGE_CONTENT);\n boolean isSvg = svgFlag == null ? false : svgFlag.booleanValue();\n Boolean isRtl = (Boolean) renderOptions.getOption(InputOptions.OPT_RTL);\n String servletPath = (String) renderOptions.getOption(InputOptions.OPT_SERVLET_PATH);\n try {\n ReportEngineService.getInstance().renderReportlet(out, request, doc, objectId, format, isMasterPage, isSvg, null, locale, isRtl.booleanValue(), servletPath);\n } catch (RemoteException e) {\n throw new ReportServiceException(e.getLocalizedMessage(), e.getCause());\n } finally {\n if (doc != null)\n doc.close();\n }\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.