content
stringlengths
40
137k
"public ConfigurationNode addChild(ConfigurationNode node) {\n ConfigurationNode ret = children.put(node.getPathElements()[node.getPathElements().length - 1], node);\n node.setAttached(true);\n node.setParent(this);\n return ret;\n}\n"
"private void pushFrameIP(ObjectReference code, int verbosity) {\n if (prevFp.isZero()) {\n if (verbosity >= 3) {\n Log.write(\"String_Node_Str\");\n Log.writeln(thread.getContextRegisters().ip);\n Log.write(\"String_Node_Str\");\n Log.writeln(thread.getContextRegisters().getIPLocation().loadAddress());\n }\n if (compiledMethodType != CompiledMethod.JNI)\n processCodeLocation(code, initialIPLoc);\n else if (verbosity >= 3) {\n Log.writeln(\"String_Node_Str\");\n }\n } else {\n Address returnAddressLoc = Magic.getReturnAddressLocation(prevFp);\n Address returnAddress = returnAddressLoc.loadAddress();\n if (verbosity >= 3) {\n Log.write(\"String_Node_Str\");\n Log.write(returnAddress);\n Log.write(\"String_Node_Str\");\n Log.writeln(returnAddressLoc);\n }\n if (!DebugUtil.addrInBootImage(returnAddress))\n processCodeLocation(code, returnAddressLoc);\n }\n}\n"
"public void initGui() {\n xSize = 176;\n ySize = 227;\n super.initGui();\n recipeList = Lists.newArrayList(new ProjectTableRecipe(new ItemStack(ModBlock.blockSteel, 1), new ItemStack(ModItem.ingotSteel, 15)), new ProjectTableRecipe(new ItemStack(Items.diamond, 10), new ItemStack(Blocks.dirt, 64), new ItemStack(Blocks.dirt, 64), new ItemStack(Blocks.dirt, 64)), new ProjectTableRecipe(new ItemStack(Items.gold_nugget, 1), new ItemStack(Blocks.gold_block, 64), new ItemStack(Blocks.gold_ore, 64), new ItemStack(Blocks.beacon, 64), new ItemStack(Blocks.brown_mushroom_block, 64)), new ProjectTableRecipe(new ItemStack(Items.diamond, 1), new ItemStack(Blocks.dirt, 64), new ItemStack(Blocks.dirt, 64)), new ProjectTableRecipe(new ItemStack(Items.diamond, 1), new ItemStack(Blocks.dirt, 64), new ItemStack(Blocks.dirt, 64)), new ProjectTableRecipe(new ItemStack(Items.diamond, 1), new ItemStack(Blocks.dirt, 64), new ItemStack(Blocks.dirt, 64)), new ProjectTableRecipe(new ItemStack(Items.diamond, 1), new ItemStack(Blocks.dirt, 64), new ItemStack(Blocks.dirt, 64)));\n filteredList = Lists.newArrayList(recipeList);\n searchField = new GuiTextField(0, fontRendererObj, guiLeft + 9, guiTop + 9, 151, fontRendererObj.FONT_HEIGHT);\n searchField.setMaxStringLength(60);\n searchField.setEnableBackgroundDrawing(false);\n searchField.setVisible(true);\n searchField.setTextColor(16777215);\n searchField.setFocused(true);\n createComponents();\n processPlayerInventory();\n setRecipeRenderText();\n}\n"
"public void doWith(Field field) throws IllegalArgumentException, IllegalAccessException {\n ReflectionUtils.makeAccessible(field);\n if (!isTemporaryField(field)) {\n allFields.add(field);\n if (isIgoreSignField(field)) {\n ignoreSignFieldNames.add(field.getName());\n }\n }\n}\n"
"public void collectFields() throws ValidationException {\n switch(list.getSelectedIndex()) {\n case 0:\n this.theType = NeuralNetworkType.Automatic;\n break;\n case 1:\n this.type = NeuralNetworkType.ADALINE;\n break;\n case 2:\n this.type = NeuralNetworkType.ART1;\n break;\n case 3:\n this.type = NeuralNetworkType.BAM;\n break;\n case 4:\n this.type = NeuralNetworkType.Boltzmann;\n break;\n case 5:\n this.type = NeuralNetworkType.CPN;\n break;\n case 6:\n this.type = NeuralNetworkType.Feedforward;\n break;\n case 7:\n this.type = NeuralNetworkType.RBF;\n break;\n case 8:\n this.type = NeuralNetworkType.SOM;\n break;\n case 9:\n this.type = NeuralNetworkType.Hopfield;\n break;\n case 10:\n this.type = NeuralNetworkType.PNN;\n break;\n case 11:\n this.type = NeuralNetworkType.Elman;\n break;\n case 12:\n this.type = NeuralNetworkType.Jordan;\n break;\n case 13:\n this.type = NeuralNetworkType.SVM;\n break;\n }\n}\n"
"public static TestSuite getConnectionCloseAfterTxnTestSuite() {\n TestSuite suite = new TestSuite();\n suite.setName(\"String_Node_Str\");\n suite.setDescription(\"String_Node_Str\");\n suite.addTest(new CloseConnAfterDatabaseSessionTxnTest());\n return suite;\n}\n"
"void createAnalysisColumnsSection(final ScrolledForm form, Composite anasisDataComp) {\n Section section = createSection(form, anasisDataComp, \"String_Node_Str\", false, null);\n Composite topComp = toolkit.createComposite(section);\n topComp.setLayout(new GridLayout());\n Hyperlink clmnBtn = toolkit.createHyperlink(topComp, \"String_Node_Str\", SWT.NONE);\n GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP).applyTo(clmnBtn);\n clmnBtn.addHyperlinkListener(new HyperlinkAdapter() {\n public void linkActivated(HyperlinkEvent e) {\n openColumnsSelectionDialog();\n }\n });\n Hyperlink indcBtn = toolkit.createHyperlink(topComp, \"String_Node_Str\", SWT.NONE);\n GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP).applyTo(indcBtn);\n indcBtn.addHyperlinkListener(new HyperlinkAdapter() {\n public void linkActivated(HyperlinkEvent e) {\n treeViewer.openIndicatorSelectDialog(null);\n }\n });\n Composite tree = toolkit.createComposite(topComp, SWT.NONE);\n GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(tree);\n tree.setLayout(new GridLayout());\n ((GridData) tree.getLayoutData()).heightHint = TREE_MAX_LENGTH;\n treeViewer = new AnalysisColumnTreeViewer(tree, this);\n treeViewer.setDirty(false);\n treeViewer.addPropertyChangeListener(this);\n section.setClient(topComp);\n}\n"
"String getUsername() {\n String username = null;\n try {\n database = myDatabaseHelper.getReadableDatabase();\n String[] columns = new String[] { \"String_Node_Str\", \"String_Node_Str\" };\n cursor = database.query(\"String_Node_Str\", columns, null, null, null, null, null);\n int indexUsername = cursor.getColumnIndex(\"String_Node_Str\");\n cursor.moveToLast();\n username = cursor.getString(0);\n } catch (Exception e) {\n System.out.println(\"String_Node_Str\");\n e.printStackTrace();\n }\n database.close();\n return username;\n}\n"
"private static JsonParser collectServerHoldingBinElementsRecursively(Project project, int depth, ProgressStatus progressStatus) throws ServerException, IOException, URISyntaxException {\n String holdingBinId = MDKConstants.HOLDING_BIN_ID_PREFIX + Converters.getIProjectToIdConverter().apply(project.getPrimaryProject());\n return MMSUtils.getElementRecursively(project, holdingBinId, depth, progressStatus);\n}\n"
"public void testSystemServicesStatus() throws Exception {\n Type token = new TypeToken<Map<String, String>>() {\n }.getType();\n HttpURLConnection urlConn = openURL(\"String_Node_Str\", HttpMethod.GET);\n Assert.assertEquals(HttpResponseStatus.OK.getCode(), urlConn.getResponseCode());\n Map<String, String> result = GSON.fromJson(new String(ByteStreams.toByteArray(urlConn.getInputStream()), Charsets.UTF_8), token);\n Assert.assertEquals(9, result.size());\n urlConn.disconnect();\n Assert.assertEquals(\"String_Node_Str\", result.get(Constants.Service.APP_FABRIC_HTTP));\n}\n"
"public void tick() {\n ARBITRARY_POOL.execute(() -> {\n this.inhabited.add(this.occupants.size());\n if (this.world.getTime() == 0) {\n this.checkValidForGc();\n }\n });\n}\n"
"public int getCpu() {\n return nodeGroup.getCpuNum() == null ? 0 : nodeGroup.getCpuNum();\n}\n"
"public void move(double deltaX, double deltaY, double deltaZ) {\n View view = getView();\n if (view != null) {\n Vec4 forward = view.getForwardVector();\n Vec4 up = view.getUpVector();\n Vec4 side = up.cross3(forward);\n Vec4 eyePoint = view.getCurrentEyePoint();\n Position eyePosition = view.getGlobe().computePositionFromPoint(eyePoint);\n double scale = getScaleValueElevation(eyePosition);\n side = side.multiply3(deltaX * scale);\n up = up.multiply3(deltaY * scale);\n forward = forward.multiply3(deltaZ * scale);\n Vec4 eyePoint = view.getCurrentEyePoint();\n eyePoint = eyePoint.add3(forward.add3(up.add3(side)));\n Position newPosition = view.getGlobe().computePositionFromPoint(eyePoint);\n view.setEyePosition(newPosition);\n view.firePropertyChange(AVKey.VIEW, null, view);\n }\n}\n"
"public boolean onDeleteCluster(ClusterBlueprint clusterBlueprint, ClusterReportQueue reports) throws SoftwareManagementPluginException {\n try {\n String clusterName = clusterBlueprint.getName();\n AmClusterDef clusterDef = new AmClusterDef(clusterBlueprint, null);\n if (isProvisioned(clusterName) && isClusterProvisionedByBDE(clusterDef)) {\n if (!onStopCluster(clusterBlueprint, reports)) {\n logger.error(\"String_Node_Str\");\n }\n }\n List<ApiHost> hosts = apiManager.getHostsSummaryInfo(clusterName).getApiHosts();\n if (hosts != null && !hosts.isEmpty()) {\n for (ApiHost host : hosts) {\n String hostName = host.getApiHostInfo().getHostName();\n ApiRequest deleteHost = apiManager.deleteHost(clusterName, hostName);\n }\n }\n ApiRequest deleteCluster = apiManager.deleteCluster(clusterBlueprint.getName());\n ApiRequest deleteBlueprint = apiManager.deleteBlueprint(clusterBlueprint.getName());\n return true;\n } catch (Exception e) {\n logger.error(\"String_Node_Str\", e);\n throw SoftwareManagementPluginException.DELETE_CLUSTER_FAILED(clusterBlueprint.getName(), e);\n }\n}\n"
"public static void main(String[] args) {\n hwm = new HWMethTest();\n hwm.Prepare_Noisy_Vector(hwm.max_test_size);\n m = mac_coprocessor.getInstance();\n measure();\n}\n"
"public void initialize(DataManager manager) {\n if (subset != null && this.manager == null) {\n this.manager = manager;\n return;\n }\n if (subset != null && this.manager == manager) {\n return;\n }\n Random random;\n if (deterministic) {\n random = new Random(0xDEADBEEF);\n } else {\n random = new SecureRandom();\n }\n int records = manager.getDataGeneralized().getDataLength();\n for (int i = 0; i < records; ++i) {\n if (random.nextDouble() < beta) {\n subsetIndices.add(i);\n }\n }\n this.subset = DataSubset.create(records, subsetIndices);\n this.manager = manager;\n}\n"
"public void before() throws Exception {\n fsMerger = new FSKeyedSortedMerger(1000, 100, \"String_Node_Str\", \"String_Node_Str\", MessageType.INTEGER, MessageType.OBJECT, new KeyComparator(), 0);\n random = new Random();\n serializer = new KryoSerializer();\n}\n"
"public static void map(final File readsFile, final File soapIndexDir, final File outputFile, final File unmapFile, final String soapArgs, final int nbSoapThreads) throws IOException {\n if (soapPath == null) {\n synchronized (SYNC) {\n soapPath = BinariesInstaller.install(\"String_Node_Str\");\n }\n }\n FileUtils.checkExistingDirectoryFile(soapIndexDir, \"String_Node_Str\");\n final File[] indexFiles = FileUtils.listFilesByExtension(soapIndexDir, \"String_Node_Str\");\n if (indexFiles == null || indexFiles.length != 1) {\n throw new IOException(\"String_Node_Str\");\n }\n final String ambFile = indexFiles[0].getAbsolutePath();\n final String cmd = soapPath + \"String_Node_Str\" + soapArgs + \"String_Node_Str\" + nbSoapThreads + \"String_Node_Str\" + readsFile.getAbsolutePath() + \"String_Node_Str\" + ambFile.substring(0, ambFile.length() - 4) + \"String_Node_Str\" + outputFile.getAbsolutePath() + \"String_Node_Str\" + unmapFile.getAbsolutePath() + \"String_Node_Str\";\n LOGGER.info(cmd);\n final int exitValue = ProcessUtils.sh(cmd);\n if (exitValue != 0) {\n throw new IOException(\"String_Node_Str\" + exitValue);\n }\n}\n"
"private void migrateCategories(OldConfig oldConfig) {\n CategoriesConfig newCategories = configProvider.getBaseConfig().getCategoriesConfig();\n Categories oldCategories = oldConfig.getCategories();\n newCategories.setEnableCategorySizes(oldCategories.isEnableCategorySizes());\n for (Category newCategory : newCategories.getCategories()) {\n if (oldCategories.getCategories().containsKey(newCategory.getName().replace(\"String_Node_Str\", \"String_Node_Str\").toLowerCase())) {\n org.nzbhydra.migration.configmapping.Category oldCat = oldCategories.getCategories().get(newCategory.getName().replace(\"String_Node_Str\", \"String_Node_Str\").toLowerCase());\n switch(oldCat.getApplyRestrictions()) {\n case \"String_Node_Str\":\n newCategory.setApplyRestrictionsType(SearchSourceRestriction.INTERNAL);\n break;\n case \"String_Node_Str\":\n newCategory.setApplyRestrictionsType(SearchSourceRestriction.API);\n break;\n case \"String_Node_Str\":\n newCategory.setApplyRestrictionsType(SearchSourceRestriction.BOTH);\n break;\n }\n newCategory.setForbiddenRegex(oldCat.getForbiddenRegex());\n newCategory.setForbiddenWords(oldCat.getForbiddenWords());\n newCategory.setMinSizePreset(oldCat.getMin());\n newCategory.setMaxSizePreset(oldCat.getMax());\n newCategory.setNewznabCategories(oldCat.getNewznabCategories());\n newCategory.setRequiredRegex(oldCat.getRequiredRegex());\n newCategory.setRequiredWords(oldCat.getRequiredWords());\n switch(oldCat.getIgnoreResults()) {\n case \"String_Node_Str\":\n newCategory.setIgnoreResultsFrom(SearchSourceRestriction.INTERNAL);\n break;\n case \"String_Node_Str\":\n newCategory.setIgnoreResultsFrom(SearchSourceRestriction.API);\n break;\n case \"String_Node_Str\":\n newCategory.setIgnoreResultsFrom(SearchSourceRestriction.BOTH);\n break;\n default:\n newCategory.setIgnoreResultsFrom(SearchSourceRestriction.NONE);\n break;\n }\n }\n }\n}\n"
"public void rotateLogAndPushToSlaves() throws IOException {\n if (slaveList.size() == 0) {\n return;\n }\n List<HandleSlaveConnection> newList = new CopyOnWriteArrayList<HandleSlaveConnection>();\n for (HandleSlaveConnection slave : slaveList) {\n XaDataSource xaDs = xaDsMgr.getXaDataSource(slave.getXaDsName());\n if (xaDs != null) {\n long version = xaDs.getCurrentLogVersion();\n xaDs.rotateLogicalLog();\n if (!slave.offerLogToSlave(version)) {\n System.out.println(\"String_Node_Str\" + slave);\n } else {\n newList.add(slave);\n }\n }\n }\n slaveList = newList;\n}\n"
"private static SyncedIdentityImpl createSyncedIdentity(Authorizable auth) throws RepositoryException {\n ExternalIdentityRef ref = (auth == null) ? null : getIdentityRef(auth);\n if (ref == null) {\n return null;\n } else {\n Value[] lmValues = auth.getProperty(REP_LAST_SYNCED);\n long lastModified = -1;\n if (lmValues != null && lmValues.length > 0) {\n lastModified = lmValues[0].getLong();\n }\n return new SyncedIdentityImpl(auth.getID(), ref, auth.isGroup(), lastModified);\n }\n}\n"
"public void send(int channelIndex, Token[] tokenArray, int vectorLength) throws IllegalActionException, NoRoomException {\n if (isOutput() && channelIndex == 0 && vectorLength == 1) {\n Token token = tokenArray[0];\n _checkType(token);\n ToplevelTransformer transformer = (ToplevelTransformer) getContainer();\n if (transformer._outputToken == null) {\n transformer._outputToken = (ActorToken) token;\n }\n }\n}\n"
"public static void moveFile(String sourceFile, String destFile) throws IOException {\n FileUtils.copy(sourceFile, destFile);\n FileUtils.deleteFile(new File(sourceFile));\n}\n"
"public void addData(double data) {\n if (Double.isInfinite(data) || Double.isNaN(data) || Math.abs(data) > threshold) {\n log.warn(\"String_Node_Str\" + data);\n return;\n }\n validElementCnt += frequency;\n max = Math.max(max, data);\n min = Math.min(min, data);\n sum += data;\n squaredSum += data * data;\n}\n"
"public boolean onItemClick(View view, int position) {\n Mention mention = new Mention();\n MentionAutocompleteItem mentionAutocompleteItem = (MentionAutocompleteItem) adapter.getItem(position);\n if (mentionAutocompleteItem != null) {\n mention.setId(mentionAutocompleteItem.getUserId());\n mention.setLabel(mentionAutocompleteItem.getDisplayName());\n mention.setSource(\"String_Node_Str\");\n dispatchClick(mention);\n }\n return true;\n}\n"
"public CreateAccountResponseType createAccount(CreateAccountType request) throws EucalyptusCloudException {\n CreateAccountResponseType reply = request.getReply();\n reply.getResponseMetadata().setRequestId(reply.getCorrelationId());\n Context ctx = Contexts.lookup();\n User requestUser = ctx.getUser();\n try {\n Account newAccount = Privileged.createAccount(ctx.hasAdministrativePrivileges(), request.getAccountName(), null, null, true);\n AccountType account = reply.getCreateAccountResult().getAccount();\n account.setAccountName(newAccount.getName());\n account.setAccountId(newAccount.getAccountNumber());\n } catch (Exception e) {\n LOG.error(e, e);\n if (e instanceof AuthException) {\n if (AuthException.ACCESS_DENIED.equals(e.getMessage())) {\n throw new EuareException(HttpResponseStatus.FORBIDDEN, EuareException.NOT_AUTHORIZED, \"String_Node_Str\" + requestUser.getName());\n } else if (AuthException.ACCOUNT_ALREADY_EXISTS.equals(e.getMessage())) {\n throw new EuareException(HttpResponseStatus.CONFLICT, EuareException.ENTITY_ALREADY_EXISTS, \"String_Node_Str\" + request.getAccountName() + \"String_Node_Str\");\n } else if (AuthException.INVALID_NAME.equals(e.getMessage())) {\n throw new EuareException(HttpResponseStatus.BAD_REQUEST, EuareException.INVALID_NAME, \"String_Node_Str\" + request.getAccountName());\n }\n }\n throw new EucalyptusCloudException(e);\n }\n return reply;\n}\n"
"private void animateY2() {\n if (this.animate.getRepeatDur() <= (System.currentTimeMillis() - repeatDuration)) {\n stopAnimation();\n }\n if (from_xml >= to_xml) {\n if (this.animate.getRepeatCount() == count) {\n stopAnimation();\n } else {\n count++;\n from_xml = Float.parseFloat(this.animate.getFrom());\n info.setY2(from_xml);\n }\n } else {\n from_xml++;\n info.setY2(from_xml);\n ruicontrol.relayout();\n }\n}\n"
"private ArrayList<Object> readList(final boolean tag, final ListOrArrayType constraint) throws IOException {\n if (tag)\n ensureTypeTag(null, TAG_LIST, readTypeTag());\n return readElements(false, constraint != null ? constraint.elementType() : null);\n}\n"
"public String getUnlocalizedName(ItemStack is) {\n CurseType type = CurseType.getFromDamage(is.getItemDamage());\n return \"String_Node_Str\" + (type == null ? \"String_Node_Str\" : type.name().toLowerCase(Locale.ENGLISH).replaceAll(\"String_Node_Str\", \"String_Node_Str\"));\n}\n"
"private ConfigBean getActualParent(final ConfigBean configBean) {\n ConfigBean parent = asConfigBean(configBean.parent());\n if (parent == null) {\n if (!configBean.getProxyType().getName().endsWith(\"String_Node_Str\")) {\n throw new IllegalStateException(\"String_Node_Str\" + configBean.getProxyType().getName() + \"String_Node_Str\");\n }\n }\n return parent;\n}\n"
"public static void main(String[] args) {\n ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"String_Node_Str\");\n NetworkDiscoverer discoverer = applicationContext.getBean(NetworkDiscoverer.class);\n ConnectionDetails connectionDetails = new ConnectionDetails();\n connectionDetails.setConnectionType(\"String_Node_Str\");\n Map<String, String> params = new HashMap<String, String>();\n connectionDetails.put(\"String_Node_Str\", \"String_Node_Str\");\n connectionDetails.put(\"String_Node_Str\", \"String_Node_Str\");\n connectionDetails.put(\"String_Node_Str\", \"String_Node_Str\");\n connectionDetails.put(\"String_Node_Str\", \"String_Node_Str\");\n connectionDetails.put(\"String_Node_Str\", \"String_Node_Str\");\n connectionDetails.put(\"String_Node_Str\", \"String_Node_Str\");\n connectionDetails.put(\"String_Node_Str\", \"String_Node_Str\");\n connectionDetails.put(\"String_Node_Str\", \"String_Node_Str\");\n Map<String, Node> result = discoverer.discoverNodes(Arrays.asList(connectionDetails));\n System.out.println(result);\n}\n"
"public void testGetNodeFromEntity() {\n Actor actor = new Actor();\n actor.setId(1);\n actor.setName(\"String_Node_Str\");\n Transaction tx = graphDb.beginTx();\n Node node = mapper.getNodeFromEntity(actor, 1, graphDb, KunderaMetadataManager.getEntityMetadata(Actor.class), false);\n Assert.assertNotNull(node);\n Assert.assertEquals(1, node.getProperty(\"String_Node_Str\"));\n Assert.assertEquals(\"String_Node_Str\", node.getProperty(\"String_Node_Str\"));\n node.delete();\n tx.success();\n tx.finish();\n}\n"
"public Entity getPassenger() {\n return getHandle().getPassenger().isPresent() ? PoreEntity.of(getHandle().getPassenger().get()) : null;\n}\n"
"private void addMessageToCurrentMessagesAndVC(UserRequest ureq, Message m, VelocityContainer vcContainer, List<Map<String, Object>> allList, int msgCount, Map<String, Mark> marks, Map<String, MarkResourceStat> stats) {\n Map<String, Object> map = new HashMap<String, Object>();\n map.put(\"String_Node_Str\", m.getKey());\n if (rms.contains(m.getKey())) {\n map.put(\"String_Node_Str\", Boolean.FALSE);\n } else {\n markRead(m, ureq.getIdentity());\n map.put(\"String_Node_Str\", Boolean.TRUE);\n }\n Date creationDate = m.getCreationDate();\n Identity modifier = m.getModifier();\n if (modifier != null) {\n map.put(\"String_Node_Str\", Boolean.TRUE);\n map.put(\"String_Node_Str\", modifier.getUser().getProperty(UserConstants.FIRSTNAME, ureq.getLocale()));\n map.put(\"String_Node_Str\", modifier.getUser().getProperty(UserConstants.LASTNAME, ureq.getLocale()));\n } else {\n map.put(\"String_Node_Str\", Boolean.FALSE);\n }\n map.put(\"String_Node_Str\", m.getTitle());\n map.put(\"String_Node_Str\", m.getBody());\n map.put(\"String_Node_Str\", f.formatDateAndTime(creationDate));\n Identity creator = m.getCreator();\n map.put(\"String_Node_Str\", creator.getKey());\n map.put(\"String_Node_Str\", Formatter.truncate(creator.getUser().getProperty(UserConstants.FIRSTNAME, ureq.getLocale()), 18));\n map.put(\"String_Node_Str\", Formatter.truncate(creator.getUser().getProperty(UserConstants.LASTNAME, ureq.getLocale()), 18));\n map.put(\"String_Node_Str\", f.formatDateAndTime(m.getLastModified()));\n OlatRootFolderImpl msgContainer = fm.getMessageContainer(forum.getKey(), m.getKey());\n map.put(\"String_Node_Str\", msgContainer);\n final List<VFSItem> attachments = new ArrayList<VFSItem>(msgContainer.getItems(new VFSItemExcludePrefixFilter(MessageEditController.ATTACHMENT_EXCLUDE_PREFIXES)));\n map.put(\"String_Node_Str\", attachments);\n if (attachments == null || attachments.size() == 0)\n map.put(\"String_Node_Str\", Boolean.FALSE);\n else\n map.put(\"String_Node_Str\", Boolean.TRUE);\n int numOfChildren;\n numOfChildren = countNumOfChildren(m, threadMsgs);\n Integer nOfCh = new Integer(numOfChildren);\n map.put(\"String_Node_Str\", nOfCh);\n boolean userIsMsgCreator = ureq.getIdentity().getKey().equals(creator.getKey());\n Boolean uIsMsgC = new Boolean(userIsMsgCreator);\n map.put(\"String_Node_Str\", uIsMsgC);\n boolean isThreadtop = m.getThreadtop() == null;\n map.put(\"String_Node_Str\", Boolean.valueOf(isThreadtop));\n boolean isThreadClosed = Status.getStatus(m.getStatusCode()).isClosed();\n if (!isThreadtop) {\n isThreadClosed = Status.getStatus(m.getThreadtop().getStatusCode()).isClosed();\n }\n map.put(\"String_Node_Str\", isThreadClosed);\n if (!isGuestOnly(ureq)) {\n DisplayPortraitController portrait = new DisplayPortraitController(ureq, getWindowControl(), m.getCreator(), true, true, false, true);\n map.put(\"String_Node_Str\", portrait);\n String portraitComponentVCName = m.getKey().toString();\n map.put(\"String_Node_Str\", portraitComponentVCName);\n vcContainer.put(portraitComponentVCName, portrait.getInitialComponent());\n Link vcLink = LinkFactory.createCustomLink(\"String_Node_Str\" + msgCount, \"String_Node_Str\" + msgCount, UserManager.getInstance().getUserDisplayName(creator), Link.LINK_CUSTOM_CSS + Link.NONTRANSLATED, vcThreadView, this);\n vcLink.setUserObject(msgCount);\n LinkPopupSettings settings = new LinkPopupSettings(800, 600, \"String_Node_Str\");\n vcLink.setPopup(settings);\n }\n allList.add(map);\n Link dlLink = LinkFactory.createCustomLink(\"String_Node_Str\" + msgCount, \"String_Node_Str\" + msgCount, \"String_Node_Str\", Link.BUTTON_SMALL, vcThreadView, this);\n dlLink.setIconLeftCSS(\"String_Node_Str\");\n Link edLink = LinkFactory.createCustomLink(\"String_Node_Str\" + msgCount, \"String_Node_Str\" + msgCount, \"String_Node_Str\", Link.BUTTON_SMALL, vcThreadView, this);\n edLink.setIconLeftCSS(\"String_Node_Str\");\n Link qtLink = LinkFactory.createCustomLink(\"String_Node_Str\" + msgCount, \"String_Node_Str\" + msgCount, \"String_Node_Str\", Link.BUTTON_SMALL, vcThreadView, this);\n qtLink.setIconLeftCSS(\"String_Node_Str\");\n Link rpLink = LinkFactory.createCustomLink(\"String_Node_Str\" + msgCount, \"String_Node_Str\" + msgCount, \"String_Node_Str\", Link.BUTTON_SMALL, vcThreadView, this);\n rpLink.setIconLeftCSS(\"String_Node_Str\");\n Link splitLink = LinkFactory.createCustomLink(\"String_Node_Str\" + msgCount, \"String_Node_Str\" + msgCount, \"String_Node_Str\", Link.LINK, vcThreadView, this);\n splitLink.setIconLeftCSS(\"String_Node_Str\");\n Link moveLink = LinkFactory.createCustomLink(\"String_Node_Str\" + msgCount, \"String_Node_Str\" + msgCount, \"String_Node_Str\", Link.LINK, vcThreadView, this);\n moveLink.setIconLeftCSS(\"String_Node_Str\");\n String subPath = m.getKey().toString();\n Mark currentMark = marks.get(subPath);\n MarkResourceStat stat = stats.get(subPath);\n MarkingService markingService = (MarkingService) CoreSpringFactory.getBean(MarkingService.class);\n if (!ureq.getUserSession().getRoles().isGuestOnly()) {\n String businessPath = currentMark == null ? getWindowControl().getBusinessControl().getAsString() + \"String_Node_Str\" + m.getKey() + \"String_Node_Str\" : currentMark.getBusinessPath();\n Controller markCtrl = markingService.getMarkController(ureq, getWindowControl(), currentMark, stat, forumOres, subPath, businessPath);\n vcThreadView.put(\"String_Node_Str\" + msgCount, markCtrl.getInitialComponent());\n }\n if (uIsMsgC) {\n OLATResourceable messageOres = OresHelper.createOLATResourceableInstance(\"String_Node_Str\", m.getKey());\n String businessPath = BusinessControlFactory.getInstance().getAsString(getWindowControl().getBusinessControl()) + \"String_Node_Str\" + m.getKey() + \"String_Node_Str\";\n Controller ePFCollCtrl = EPUIFactory.createArtefactCollectWizzardController(ureq, getWindowControl(), messageOres, businessPath);\n if (ePFCollCtrl != null) {\n String ePFAddComponentName = \"String_Node_Str\" + msgCount;\n map.put(\"String_Node_Str\", ePFCollCtrl);\n map.put(\"String_Node_Str\", ePFAddComponentName);\n vcThreadView.put(ePFAddComponentName, ePFCollCtrl.getInitialComponent());\n }\n }\n}\n"
"public boolean addFieldDelete(DynamicComposite composite, Object instance) {\n Object original = ProxyUtils.getRemoved(instance);\n if (original != null) {\n getSerializationStrategy().addToComponent(composite, original);\n return true;\n }\n original = ProxyUtils.getChanged(instance);\n if (original != null) {\n serializer.addToComponent(composite, original);\n return true;\n }\n Object current = ProxyUtils.getAdded(instance);\n serializer.addToComponent(composite, current);\n return false;\n}\n"
"private boolean onModifiedTouchEvent(MotionEvent me) {\n int touchX = (int) me.getX() - mPaddingLeft;\n int touchY = (int) me.getY() + mVerticalCorrection - mPaddingTop;\n int action = me.getAction();\n long eventTime = me.getEventTime();\n int keyIndex = getKeyIndices(touchX, touchY, null);\n if (mGestureDetector.onTouchEvent(me)) {\n showPreview(NOT_A_KEY);\n mHandler.removeMessages(MSG_REPEAT);\n mHandler.removeMessages(MSG_LONGPRESS);\n return true;\n }\n if (mMiniKeyboardOnScreen) {\n return true;\n }\n switch(action) {\n case MotionEvent.ACTION_DOWN:\n mAbortKey = false;\n mStartX = touchX;\n mStartY = touchY;\n mLastCodeX = touchX;\n mLastCodeY = touchY;\n mLastKeyTime = 0;\n mCurrentKeyTime = 0;\n mLastKey = NOT_A_KEY;\n mCurrentKey = keyIndex;\n mDownTime = me.getEventTime();\n mLastMoveTime = mDownTime;\n checkMultiTap(eventTime, keyIndex);\n mKeyboardActionListener.onPress(keyIndex != NOT_A_KEY ? mKeys[keyIndex].codes[0] : 0);\n if (mCurrentKey >= 0 && mKeys[mCurrentKey].repeatable) {\n mRepeatKeyIndex = mCurrentKey;\n repeatKey();\n Message msg = mHandler.obtainMessage(MSG_REPEAT);\n mHandler.sendMessageDelayed(msg, REPEAT_START_DELAY);\n }\n if (mCurrentKey != NOT_A_KEY) {\n Message msg = mHandler.obtainMessage(MSG_LONGPRESS, me);\n mHandler.sendMessageDelayed(msg, LONGPRESS_TIMEOUT);\n }\n showPreview(keyIndex);\n break;\n case MotionEvent.ACTION_MOVE:\n boolean continueLongPress = false;\n if (keyIndex != NOT_A_KEY) {\n if (mCurrentKey == NOT_A_KEY) {\n mCurrentKey = keyIndex;\n mCurrentKeyTime = eventTime - mDownTime;\n } else {\n if (keyIndex == mCurrentKey) {\n mCurrentKeyTime += eventTime - mLastMoveTime;\n continueLongPress = true;\n } else if (mRepeatKeyIndex == NOT_A_KEY) {\n resetMultiTap();\n mLastKey = mCurrentKey;\n mLastCodeX = mLastX;\n mLastCodeY = mLastY;\n mLastKeyTime = mCurrentKeyTime + eventTime - mLastMoveTime;\n mCurrentKey = keyIndex;\n mCurrentKeyTime = 0;\n }\n }\n if (keyIndex != mRepeatKeyIndex) {\n mHandler.removeMessages(MSG_REPEAT);\n mRepeatKeyIndex = NOT_A_KEY;\n }\n }\n if (!continueLongPress) {\n mHandler.removeMessages(MSG_LONGPRESS);\n if (keyIndex != NOT_A_KEY) {\n Message msg = mHandler.obtainMessage(MSG_LONGPRESS, me);\n mHandler.sendMessageDelayed(msg, LONGPRESS_TIMEOUT);\n }\n }\n showPreview(keyIndex);\n break;\n case MotionEvent.ACTION_UP:\n mHandler.removeMessages(MSG_SHOW_PREVIEW);\n mHandler.removeMessages(MSG_REPEAT);\n mHandler.removeMessages(MSG_LONGPRESS);\n if (keyIndex == mCurrentKey) {\n mCurrentKeyTime += eventTime - mLastMoveTime;\n } else {\n resetMultiTap();\n mLastKey = mCurrentKey;\n mLastKeyTime = mCurrentKeyTime + eventTime - mLastMoveTime;\n mCurrentKey = keyIndex;\n mCurrentKeyTime = 0;\n }\n if (mCurrentKeyTime < mLastKeyTime && mLastKey != NOT_A_KEY) {\n mCurrentKey = mLastKey;\n touchX = mLastCodeX;\n touchY = mLastCodeY;\n }\n showPreview(NOT_A_KEY);\n Arrays.fill(mKeyIndices, NOT_A_KEY);\n if (mRepeatKeyIndex == NOT_A_KEY && !mMiniKeyboardOnScreen && !mAbortKey) {\n detectAndSendKey(touchX, touchY, eventTime);\n }\n invalidateKey(keyIndex);\n mRepeatKeyIndex = NOT_A_KEY;\n break;\n }\n mLastX = touchX;\n mLastY = touchY;\n return true;\n}\n"
"public Result check(WebServiceEndpoint descriptor) {\n Result result = getInitializedResult();\n ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();\n boolean pass = true;\n if (descriptor.hasHandlers()) {\n Collection allPortNames = getAllPortNamesInService(descriptor);\n List<WebServiceHandlerChain> handlerChains = descriptor.getHandlerChain();\n for (WebServiceHandlerChain handlerChain : handlerChains) {\n Collection c = new HashSet();\n for (WebServiceHandler wsh : handlerChain.getHandlers()) {\n c.addAll(wsh.getPortNames());\n }\n Collection invalid = getInvalidHandlerPortNames(c, allPortNames);\n if (invalid.size() > 0) {\n result.addErrorDetails(smh.getLocalString(\"String_Node_Str\", \"String_Node_Str\", new Object[] { compName.toString() }));\n result.failed(smh.getLocalString(\"String_Node_Str\", \"String_Node_Str\", new Object[] { \"String_Node_Str\" }));\n pass = false;\n } else {\n result.addGoodDetails(smh.getLocalString(\"String_Node_Str\", \"String_Node_Str\", new Object[] { compName.toString() }));\n result.passed(smh.getLocalString(\"String_Node_Str\", \"String_Node_Str\", new Object[] { \"String_Node_Str\" }));\n }\n }\n } else {\n result.addNaDetails(smh.getLocalString(\"String_Node_Str\", \"String_Node_Str\", new Object[] { compName.toString() }));\n result.notApplicable(smh.getLocalString(\"String_Node_Str\", \"String_Node_Str\", new Object[] { \"String_Node_Str\" }));\n }\n return result;\n}\n"
"private String request(String api, Map<String, Object> param) {\n String url = String.format(\"String_Node_Str\", rbacShiroUrl, api);\n try {\n Connection.Response response = Jsoup.connect(url).method(Connection.Method.POST).timeout(300).data(ImmutableMap.of(\"String_Node_Str\", URLEncoder.encode(RSAUtil.encrypt(param, publicKey), \"String_Node_Str\"), \"String_Node_Str\", uuid, \"String_Node_Str\", licenseKey)).ignoreContentType(true).execute();\n JSONObject object = JSONObject.parseObject(response.body(), JSONObject.class);\n if (!object.getBoolean(\"String_Node_Str\")) {\n throw new AuthenticationException(response.body());\n }\n byte[] jsonBytes = RSAUtil.decrypt(Base64.getDecoder().decode(object.getString(\"String_Node_Str\")), publicKey);\n return new String(jsonBytes, \"String_Node_Str\");\n } catch (Exception e) {\n throw new AuthenticationException(\"String_Node_Str\", e);\n }\n}\n"
"public void setResultSets(IBaseResultSet[] rsets) {\n if (this.rsets == rsets) {\n return;\n }\n if (rsets != null) {\n this.rsets = rsets;\n if (rsets[0] != null) {\n Scriptable scope = getScriptContext().getRootScope();\n DataAdapterUtil.registerJSObject(scope, new ResultIteratorTree(rsets[0]), this.getScriptContext());\n }\n } else {\n this.rsets = null;\n }\n}\n"
"public static PathInfoImpl buildODataPathInfo(final SubLocatorParameter param) throws ODataException {\n final UriInfo uriInfo = param.getUriInfo();\n PathInfoImpl pathInfo = splitPath(param);\n pathInfo.setServiceRoot(buildBaseUri(param.getServletRequest(), pathInfo.getPrecedingSegments()));\n pathInfo.setRequestUri(buildRequestUri(param.getServletRequest()));\n return pathInfo;\n}\n"
"public boolean startElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts) {\n try {\n unmarshalRecord.removeNullCapableValue(this);\n Descriptor xmlDescriptor = (Descriptor) xmlCompositeObjectMapping.getReferenceDescriptor();\n if (null == xmlDescriptor) {\n xmlDescriptor = findReferenceDescriptor(xPathFragment, unmarshalRecord, atts, xmlCompositeObjectMapping, xmlCompositeObjectMapping.getKeepAsElementPolicy());\n if (xmlDescriptor == null) {\n if (xmlCompositeObjectMapping.getField() != null) {\n QName leafType = ((Field) xmlCompositeObjectMapping.getField()).getLastXPathFragment().getLeafElementType();\n if (leafType != null) {\n XPathFragment frag = new XPathFragment();\n frag.setNamespaceAware(unmarshalRecord.isNamespaceAware());\n String xpath = leafType.getLocalPart();\n String uri = leafType.getNamespaceURI();\n if (uri != null && uri.length() > 0) {\n frag.setNamespaceURI(uri);\n String prefix = ((Descriptor) xmlCompositeObjectMapping.getDescriptor()).getNonNullNamespaceResolver().resolveNamespaceURI(uri);\n if (prefix != null && prefix.length() > 0) {\n xpath = prefix + Constants.COLON + xpath;\n }\n }\n frag.setXPath(xpath);\n Context xmlContext = unmarshalRecord.getUnmarshaller().getContext();\n xmlDescriptor = xmlContext.getDescriptorByGlobalType(frag);\n }\n }\n }\n UnmarshalKeepAsElementPolicy policy = xmlCompositeObjectMapping.getKeepAsElementPolicy();\n if (null != policy && ((xmlDescriptor == null && policy.isKeepUnknownAsElement()) || policy.isKeepAllAsElement())) {\n QName schemaType = unmarshalRecord.getTypeQName();\n if (schemaType == null) {\n schemaType = ((Field) xmlCompositeObjectMapping.getField()).getSchemaType();\n unmarshalRecord.setTypeQName(schemaType);\n }\n if (schemaType != null) {\n Class theClass = (Class) XMLConversionManager.getDefaultXMLTypes().get(schemaType);\n if (theClass == null) {\n setupHandlerForKeepAsElementPolicy(unmarshalRecord, xPathFragment, atts);\n return true;\n }\n } else {\n setupHandlerForKeepAsElementPolicy(unmarshalRecord, xPathFragment, atts);\n return true;\n }\n }\n }\n AbstractNullPolicy nullPolicy = xmlCompositeObjectMapping.getNullPolicy();\n if (nullPolicy.isNullRepresentedByEmptyNode()) {\n String qnameString = xPathFragment.getLocalName();\n if (xPathFragment.getPrefix() != null) {\n qnameString = xPathFragment.getPrefix() + Constants.COLON + qnameString;\n }\n if (null != xmlDescriptor) {\n CompositeObjectMappingContentHandler aHandler = new CompositeObjectMappingContentHandler(unmarshalRecord, this, xmlCompositeObjectMapping, atts, xPathFragment, xmlDescriptor);\n aHandler.startElement(xPathFragment.getNamespaceURI(), xPathFragment.getLocalName(), qnameString, atts);\n XMLReader xmlReader = unmarshalRecord.getXMLReader();\n xmlReader.setContentHandler(aHandler);\n xmlReader.setLexicalHandler(aHandler);\n }\n } else {\n if (unmarshalRecord.getXMLReader().isNullRepresentedByXsiNil(nullPolicy) && unmarshalRecord.isNil()) {\n xmlCompositeObjectMapping.setAttributeValueInObject(unmarshalRecord.getCurrentObject(), null);\n } else {\n Field xmlFld = (Field) this.xmlCompositeObjectMapping.getField();\n if (xmlFld.hasLastXPathFragment()) {\n unmarshalRecord.setLeafElementType(xmlFld.getLastXPathFragment().getLeafElementType());\n }\n processChild(xPathFragment, unmarshalRecord, atts, xmlDescriptor, xmlCompositeObjectMapping);\n }\n }\n } catch (SAXException e) {\n throw XMLMarshalException.unmarshalException(e);\n }\n return true;\n}\n"
"public DownloadLink getDownloadLinkByFileOutput(File file, Integer Linkstatus) {\n ArrayList<DownloadLink> links = JDUtilities.getDownloadController().getAllDownloadLinks();\n try {\n Iterator<FilePackage> iterator = packages.iterator();\n FilePackage fp = null;\n DownloadLink nextDownloadLink;\n while (iterator.hasNext()) {\n fp = iterator.next();\n Iterator<DownloadLink> it2 = fp.getDownloadLinkList().iterator();\n while (it2.hasNext()) {\n nextDownloadLink = it2.next();\n if (new File(nextDownloadLink.getFileOutput()).getAbsoluteFile().equals(file.getAbsoluteFile())) {\n if (Linkstatus != null) {\n if (nextDownloadLink.getLinkStatus().hasStatus(Linkstatus))\n return nextDownloadLink;\n } else\n return nextDownloadLink;\n }\n }\n }\n } catch (Exception e) {\n JDLogger.exception(e);\n }\n return null;\n}\n"
"private void commonQueryExistDomain(String queryDomainName, String expectedLdhName, String expectedUnicodeName) throws Exception {\n mockMvc.perform(get(URI_DOMAIN_Q + StringUtil.urlEncode(queryDomainName)).accept(MediaType.parseMediaType(rdapJson))).andExpect(status().isOk()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath(\"String_Node_Str\").value(\"String_Node_Str\")).andExpect(jsonPath(\"String_Node_Str\").value(\"String_Node_Str\")).andExpect(jsonPath(\"String_Node_Str\").value(expectedLdhName)).andExpect(jsonPath(\"String_Node_Str\").value(expectedUnicodeName)).andExpect(jsonPath(\"String_Node_Str\").value(\"String_Node_Str\")).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").isArray()).andExpect(jsonPath(\"String_Node_Str\").value(CoreMatchers.hasItems(\"String_Node_Str\", \"String_Node_Str\"))).andExpect(jsonPath(\"String_Node_Str\").isArray()).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").isArray()).andExpect(jsonPath(\"String_Node_Str\").value(CoreMatchers.hasItems(\"String_Node_Str\", \"String_Node_Str\"))).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").isArray()).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").value(rdapJson)).andExpect(jsonPath(\"String_Node_Str\").value(CoreMatchers.hasItems(\"String_Node_Str\", \"String_Node_Str\"))).andExpect(jsonPath(\"String_Node_Str\").exists()).andExpect(jsonPath(\"String_Node_Str\").value(\"String_Node_Str\")).andExpect(jsonPath(\"String_Node_Str\").exists());\n}\n"
"public static FoodMoverUser getCurrentUser() {\n User currRawUser = UserServiceFactory.getUserService().getCurrentUser();\n if (currRawUser == null) {\n return null;\n }\n Objectify objectify = ObjectifyUtil.get();\n FoodMoverUser foodMoverUser = objectify.query(FoodMoverUser.class).filter(USER_VAR_NAME, keyOfUser(currRawUser)).get();\n if (foodMoverUser != null) {\n return foodMoverUser;\n }\n foodMoverUser = new FoodMoverUser();\n foodMoverUser.setUser(currRawUser);\n objectify.put(foodMoverUser);\n return foodMoverUser;\n}\n"
"public static void tearDown() throws Exception {\n if (searcher != null) {\n searcher.close();\n }\n}\n"
"public void fire(ArrayList<PostUpdateListener> listeners) {\n for (PostUpdateListener listener : listeners) listener.afterUpdate();\n}\n"
"public static void main(String[] args) throws IOException {\n if (args.length == 0) {\n System.err.println(\"String_Node_Str\");\n showUsage();\n System.exit(1);\n } else {\n String keyStoreFileName = args[0];\n File f = new File(keyStoreFileName);\n if (!f.exists()) {\n boolean ret = f.createNewFile();\n if (!ret) {\n System.err.println(\"String_Node_Str\" + args[0]);\n }\n }\n String keyStoreType = (args.length == 2 ? args[1] : DEFAULT_KEYSTORE_TYPE);\n try {\n KeyStore.getInstance(keyStoreType);\n } catch (KeyStoreException e) {\n System.err.println(\"String_Node_Str\" + keyStoreType + \"String_Node_Str\");\n showUsage();\n System.exit(1);\n }\n new Ranger2JKSUtil().doExportKeysFromJKS(keyStoreFileName, keyStoreType);\n System.out.println(\"String_Node_Str\" + keyStoreFileName);\n System.exit(0);\n }\n}\n"
"public MediaApiConfiguration mediaApiConfiguration() {\n MediaApiConfiguration config = new MediaApiConfiguration();\n config.setHandlerAddress(System.getProperty(\"String_Node_Str\", \"String_Node_Str\"));\n config.setHandlerPort(Integer.parseInt(PropertiesManager.getSystemProperty(\"String_Node_Str\", \"String_Node_Str\")));\n log.info(\"String_Node_Str\" + config.getHandlerAddress() + \"String_Node_Str\");\n log.info(\"String_Node_Str\" + config.getHandlerPort() + \"String_Node_Str\");\n return config;\n}\n"
"public <W extends AbstractSlider<T>> W setOrientation(Orientation orientation) {\n this.options.set(\"String_Node_Str\", orientation);\n return this;\n}\n"
"public void appendConditionToQuery(ConditionQueryBuilder conditionQueryBuilder) {\n conditionQueryBuilder.append(columnName()).append(operation());\n if (!Operation.IS_NOT_NULL.equals(operation()) && !Operation.IS_NULL.equals(operation())) {\n conditionQueryBuilder.append(conditionQueryBuilder.convertValueToString(value()));\n }\n if (postArgument() != null) {\n conditionQueryBuilder.appendSpace().append(postArgument());\n }\n}\n"
"public Connection connect(String url, Properties info) throws SQLException {\n if (!acceptsURL(url)) {\n LOG.debug(\"String_Node_Str\", url);\n return null;\n }\n Connection connection = super.connect(url, info);\n if (connection == null) {\n LOG.error(\"String_Node_Str\", url, info);\n return null;\n }\n Properties connectionProperties = parseConnectionProperties(url, info);\n if (connectionProperties.contains(VERBOSE_PROP))\n Logging.setLogLevel(connectionProperties.getProperty(VERBOSE_PROP, \"String_Node_Str\"));\n return factory.createConnection(connection, connectionProperties);\n}\n"
"public int doStartTag() throws JspException {\n evaluatePortletId();\n ServletContext servletContext = pageContext.getServletContext();\n DriverConfiguration driverConfig = (DriverConfiguration) servletContext.getAttribute(AttributeKeys.DRIVER_CONFIG);\n PortletWindowConfig windowConfig = driverConfig.getPortletWindowConfig(evaluatedPortletId);\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"String_Node_Str\" + windowConfig);\n }\n PortalRequestContext portalEnv = PortalRequestContext.getContext((HttpServletRequest) pageContext.getRequest());\n PortalURL portalURL = portalEnv.getRequestedPortalURL();\n PortletWindow window = new PortletWindowImpl(windowConfig, portalURL);\n Map windowStates = portalURL.getWindowStates();\n for (Iterator it = windowStates.keySet().iterator(); it.hasNext(); ) {\n String windowId = (String) it.next();\n WindowState windowState = (WindowState) windowStates.get(windowId);\n if (WindowState.MAXIMIZED.equals(windowState) && !window.getId().getStringId().equals(windowId)) {\n return SKIP_BODY;\n }\n }\n PortalServletRequest portalRequest = new PortalServletRequest((HttpServletRequest) pageContext.getRequest(), window);\n PortalServletResponse portalResponse = new PortalServletResponse((HttpServletResponse) pageContext.getResponse());\n PortletContainer container = (PortletContainer) servletContext.getAttribute(AttributeKeys.PORTLET_CONTAINER);\n try {\n container.doRender(window, portalRequest, portalResponse);\n response = portalResponse;\n status = SUCCESS;\n } catch (Throwable th) {\n status = FAILED;\n throwable = th;\n }\n return EVAL_BODY_INCLUDE;\n}\n"
"private void _init_(String title, String s) {\n this.setBounds(100, 100, 400, 600);\n this.setTitle(title);\n JPanel contentPane = new JPanel();\n contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n contentPane.setLayout(new BorderLayout(5, 5));\n JPanel pageEnd = new JPanel();\n pageEnd.setLayout(new GridLayout(1, 6, 10, 10));\n contentPane.add(pageEnd, BorderLayout.PAGE_END);\n for (int i = 0; i < 4; i++) {\n pageEnd.add(new JPanel());\n }\n JButton close = new JButton(JByteMod.res != null ? JByteMod.res.getResource(\"String_Node_Str\") : \"String_Node_Str\");\n pageEnd.add(close);\n close.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n ErrorDisplay.this.dispose();\n }\n });\n String st = s + suffix;\n contentPane.add(new JScrollPane(new JTextArea(st)), BorderLayout.CENTER);\n this.add(contentPane);\n this.setVisible(true);\n}\n"
"public void onKill(player attacker, player defender, Location l) {\n super.onKill(attacker, defender, l);\n attacker.addPoints(5);\n defender.addPoints(-2);\n int s = scores.containsKey(attacker) ? scores.get(attacker) + 1 : 1;\n scores.put(attacker, s);\n if (scores.get(attacker) >= 20) {\n onWin(attacker, attacker, defender);\n }\n}\n"
"private void buildUI() {\n this.setSize(640, 480);\n final EventsTable table = new EventsTable(eventsTableModel);\n table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n public void valueChanged(ListSelectionEvent e) {\n if (e.getFirstIndex() >= 0) {\n Event event = eventsTableModel.getEventAt(table.getSelectedRow());\n showEventDetail(event);\n }\n }\n });\n table.setVisible(true);\n JButton btnShowChart = new JButton();\n btnShowChart.setActionCommand(\"String_Node_Str\");\n btnShowChart.setToolTipText(\"String_Node_Str\");\n try {\n ClassLoader cl = this.getClass().getClassLoader();\n btnShowChart.setIcon(new ImageIcon(cl.getResource(\"String_Node_Str\")));\n } catch (Exception e) {\n btnShowChart.setText(\"String_Node_Str\");\n }\n btnShowChart.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n createAndShowChart();\n }\n });\n JToolBar toolbar = new JToolBar();\n toolbar.setFloatable(false);\n toolbar.add(btnShowChart);\n JScrollPane eventsScrollPane = new JScrollPane(table);\n JSplitPane split = new JSplitPane();\n split.add(eventsScrollPane, JSplitPane.LEFT);\n split.add(getEventDetailPanel(), JSplitPane.RIGHT);\n split.setOneTouchExpandable(true);\n split.setOrientation(JSplitPane.HORIZONTAL_SPLIT);\n split.setDividerSize(10);\n split.setAutoscrolls(false);\n split.setDividerLocation(400);\n add(toolbar, BorderLayout.NORTH);\n add(split, BorderLayout.CENTER);\n}\n"
"public Graph getSummaryGraph() {\n Map<LocalDate, JacocoCoverageResultSummary> summaries;\n List<Job<?, ?>> jobs = (List) getDashboard().getJobs();\n summaries = JacocoLoadData.loadChartDataWithinRange(jobs, daysNumber);\n return createTrendChart(summaries, width, height);\n}\n"
"public Set<ActionSpec> getModuleActions() {\n Set<ActionSpec> actions = new HashSet<ActionSpec>();\n actions.add(new ActionSpec(\"String_Node_Str\", true));\n actions.add(new ActionSpec(\"String_Node_Str\", true));\n actions.add(new ActionSpec(\"String_Node_Str\", true));\n return actions;\n}\n"
"public void setDefaultFormat(String format) {\n if (TextUtils.isEmpty(format)) {\n mSettings.defaultPostFormat = STANDARD_POST_FORMAT_KEY;\n } else {\n mSettings.defaultPostFormat = format.toLowerCase(Locale.ROOT);\n }\n}\n"
"private void handleErrorResponse(XMPPError error, String packetID) {\n if (error != null && ((XMPPError.Type.CANCEL.equals(error.getType()) && (XMPPError.Condition.conflict.toString().equals(error.getCondition()) || XMPPError.Condition.forbidden.toString().equals(error.getCondition()))))) {\n if (XMPPError.Condition.forbidden.toString().equals(error.getCondition())) {\n logger.warn(\"String_Node_Str\" + \"String_Node_Str\");\n }\n String nodeName = pendingCreateRequests.get(packetID);\n if (nodeName != null) {\n nodes.add(nodeName);\n pendingCreateRequests.remove(packetID);\n fireResponseCreateEvent(Response.SUCCESS);\n return;\n }\n }\n String errorMessage = \"String_Node_Str\";\n if (pendingCreateRequests.remove(packetID) != null) {\n fireResponseCreateEvent(Response.FAIL);\n errorMessage += \"String_Node_Str\";\n } else if (pendingConfigureRequests.remove(packetID) != null) {\n errorMessage += \"String_Node_Str\";\n fireResponseCreateEvent(Response.SUCCESS);\n } else if (pendingPublishRequests.remove(packetID) != null) {\n errorMessage += \"String_Node_Str\";\n fireResponsePublishEvent(Response.FAIL);\n }\n if (error != null)\n errorMessage += \"String_Node_Str\" + error.getMessage() + \"String_Node_Str\" + error.getCondition() + \"String_Node_Str\" + packetID + \"String_Node_Str\";\n logger.error(errorMessage);\n}\n"
"public void processEvent(EventRequest req, EventResponse resp) throws PortletException, IOException {\n ArrayList<String> msgs = (ArrayList<String>) req.getPortletSession().getAttribute(ATTRIB_MSGS);\n if (msgs == null) {\n msgs = new ArrayList<String>();\n }\n String[] msg;\n int numMsgs = 0;\n try {\n numMsgs = Integer.parseInt(req.getRenderParameters().getValue(PARAM_NUM_MSGS));\n } catch (Exception e) {\n }\n if (numMsgs == 0) {\n msgs.clear();\n }\n logger.fine(\"String_Node_Str\" + msgs.size());\n try {\n String val = (String) req.getEvent().getValue();\n msg = val.split(DELIM);\n } catch (Exception e) {\n msg = new String[2];\n msg[0] = \"String_Node_Str\";\n msg[1] = \"String_Node_Str\";\n }\n String clr = req.getParameter(PARAM_COLOR);\n clr = (clr == null) ? \"String_Node_Str\" : clr;\n StringBuffer sb = new StringBuffer();\n sb.append(\"String_Node_Str\" + msg[1] + \"String_Node_Str\" + clr + \"String_Node_Str\");\n sb.append(\"String_Node_Str\" + (msgs.size() + 1) + \"String_Node_Str\" + msg[0]);\n sb.append(\"String_Node_Str\");\n msgs.add(sb.toString());\n logger.fine(\"String_Node_Str\" + sb.toString());\n resp.setRenderParameter(PARAM_NUM_MSGS, Integer.toString(msgs.size()));\n req.getPortletSession().setAttribute(ATTRIB_MSGS, msgs);\n}\n"
"private void setPlatfromTypeCombo(ILaunchConfigurationWorkingCopy configuration) throws CoreException {\n PlatformType selProjectPlatform = PlatformType.fromId(configuration.getAttribute(ConfigurationConstants.platforrmCfgAttribute, \"String_Node_Str\"));\n if (getLaunchConfigurationDialog().getMode().equals(ILaunchManager.DEBUG_MODE) && selProjectPlatform != PlatformType.eAndroid) {\n m_platformTypeCombo.setEnabled(false);\n m_platformTypeCombo.select(m_platformTypeCombo.indexOf(RunType.platformRhoSim));\n } else {\n String platformType = configuration.getAttribute(ConfigurationConstants.simulatorType, \"String_Node_Str\");\n m_platformTypeCombo.setEnabled(true);\n m_platformTypeCombo.select(m_platformTypeCombo.indexOf(platformType));\n }\n}\n"
"public void dispose() {\n disconnect();\n synchronized (remoteServiceListeners) {\n remoteServiceListeners.clear();\n }\n super.dispose();\n}\n"
"private void updateLayout(UIPortal uiPortal, PageNavigation formerNav, PageNavigation newNav, UIPortalApplication uiPortalApp) throws Exception {\n if (formerNav == null || newNav == null) {\n return;\n }\n String newOwnerType = newNav.getOwnerType();\n String newOwnerId = newNav.getOwnerId();\n String formerOwnerType = formerNav.getOwnerType();\n String formerOwnerId = formerNav.getOwnerId();\n if (newOwnerId.equals(formerOwnerId) && formerOwnerType.equals(newOwnerType)) {\n return;\n }\n DataStorage storage = uiPortalApp.getApplicationComponent(DataStorage.class);\n PortalConfig pConfig = storage.getPortalConfig(newOwnerType, newOwnerId);\n Container container = pConfig.getPortalLayout();\n if (container != null) {\n boolean showMaxWindow = false;\n try {\n PageNode selectedNode = uiPortal.getSelectedNode();\n Page displayedPage = storage.getPage(selectedNode.getPageReference());\n showMaxWindow = displayedPage.isShowMaxWindow();\n } catch (Exception ex) {\n }\n UserPortalConfig portalConfig = uiPortalApp.getUserPortalConfig();\n portalConfig.setPortal(pConfig);\n rebuildUIPortal(uiPortal, portalConfig);\n }\n}\n"
"public boolean performFinish(TaskDataModel model, ScopeItem scope) {\n String reviewer = model.getTaskRepository().getUserName();\n try {\n Review review = ReviewFactory.eINSTANCE.createReview();\n review.getScope().add(scope);\n TaskRepository taskRepository = model.getTaskRepository();\n ITask newTask = TasksUiUtil.createOutgoingNewTask(taskRepository.getConnectorKind(), taskRepository.getRepositoryUrl());\n ReviewsUtil.markAsReview(newTask);\n TaskMapper initializationData = new TaskMapper(model.getTaskData());\n TaskData taskData = TasksUiInternal.createTaskData(taskRepository, initializationData, null, new NullProgressMonitor());\n AbstractRepositoryConnector connector = TasksUiPlugin.getConnector(taskRepository.getConnectorKind());\n connector.getTaskDataHandler().initializeSubTaskData(taskRepository, taskData, model.getTaskData(), new NullProgressMonitor());\n taskData.getRoot().getMappedAttribute(TaskAttribute.SUMMARY).setValue(\"String_Node_Str\" + model.getTask().getSummary());\n taskData.getRoot().getMappedAttribute(TaskAttribute.USER_ASSIGNED).setValue(reviewer);\n taskData.getRoot().getMappedAttribute(TaskAttribute.DESCRIPTION).setValue(\"String_Node_Str\" + model.getTask().getSummary());\n ReviewsUiPlugin.getDataManager().storeOutgoingTask(newTask, review);\n TasksUiInternal.createAndOpenNewTask(newTask, taskData);\n } catch (CoreException e1) {\n throw new RuntimeException(e1);\n }\n return true;\n}\n"
"public boolean onDoubleTap(MotionEvent e) {\n OnChartGestureListener l = mChart.getOnChartGestureListener();\n if (l != null) {\n l.onChartDoubleTapped(e);\n return super.onDoubleTap(e);\n }\n if (mChart.isDoubleTapToZoomEnabled()) {\n PointF trans = getTrans(e.getX(), e.getY());\n mChart.zoom(1.4f, 1.4f, trans.x, trans.y);\n if (mChart.isLogEnabled())\n Log.i(\"String_Node_Str\", \"String_Node_Str\" + trans.x + \"String_Node_Str\" + trans.y);\n }\n return super.onDoubleTap(e);\n}\n"
"private boolean occursOnFirstLevel(OWLClassExpression description, OWLClassExpression cls) {\n if (cls.isOWLThing()) {\n return false;\n }\n return (description instanceof OWLNaryBooleanClassExpression && ((OWLNaryBooleanClassExpression) description).getOperands().contains(cls));\n}\n"
"public void updated(Object key, Object value) {\n if (_updateType != null) {\n Notification notification = new Notification(_updateType, this, _sequenceNumber++, value.toString());\n for (NotificationDetails n : _notificationDetails) {\n n.getListener().handleNotification(notification, n.getHandback());\n }\n }\n}\n"
"public void addBody(Body body) throws SAXException, WingException, UIException, SQLException, IOException, AuthorizeException {\n Collection collection = submission.getCollection();\n String actionURL = contextPath + \"String_Node_Str\" + collection.getHandle() + \"String_Node_Str\" + knot.getId() + \"String_Node_Str\";\n BitstreamFormat currentFormat = bitstream.getFormat();\n BitstreamFormat guessedFormat = FormatIdentifier.guessFormat(context, bitstream);\n BitstreamFormat[] bitstreamFormats = BitstreamFormat.findNonInternal(context);\n int itemID = submissionInfo.getSubmissionItem().getItem().getID();\n String fileUrl = contextPath + \"String_Node_Str\" + itemID + \"String_Node_Str\" + bitstream.getName();\n String fileName = bitstream.getName();\n Division div = body.addInteractiveDivision(\"String_Node_Str\", actionURL, Division.METHOD_POST, \"String_Node_Str\");\n div.setHead(T_submission_head);\n addSubmissionProgressList(div);\n List edit = div.addList(\"String_Node_Str\", List.TYPE_FORM);\n edit.setHead(T_head);\n edit.addLabel(T_file);\n edit.addItem().addXref(fileUrl, fileName);\n Text description = edit.addItem().addText(\"String_Node_Str\");\n description.setLabel(T_description);\n description.setHelp(T_description_help);\n description.setValue(bitstream.getDescription());\n edit.addItem(T_info1);\n if (guessedFormat != null) {\n edit.addLabel(T_format_detected);\n edit.addItem(guessedFormat.getShortDescription());\n }\n Select format = edit.addItem().addSelect(\"String_Node_Str\");\n format.setLabel(T_format_selected);\n format.addOption(-1, T_format_default);\n for (BitstreamFormat bitstreamFormat : bitstreamFormats) {\n String supportLevel = \"String_Node_Str\";\n if (bitstreamFormat.getSupportLevel() == BitstreamFormat.KNOWN)\n supportLevel = \"String_Node_Str\";\n else if (bitstreamFormat.getSupportLevel() == BitstreamFormat.SUPPORTED)\n supportLevel = \"String_Node_Str\";\n String name = bitstreamFormat.getShortDescription() + \"String_Node_Str\" + supportLevel + \"String_Node_Str\";\n int id = bitstreamFormat.getID();\n format.addOption(id, name);\n }\n if (currentFormat != null) {\n format.setOptionSelected(currentFormat.getID());\n } else if (guessedFormat != null) {\n format.setOptionSelected(guessedFormat.getID());\n } else {\n format.setOptionSelected(-1);\n }\n edit.addItem(T_info2);\n Text userFormat = edit.addItem().addText(\"String_Node_Str\");\n userFormat.setLabel(T_format_user);\n userFormat.setHelp(T_format_user_help);\n userFormat.setValue(bitstream.getUserFormatDescription());\n div.addHidden(\"String_Node_Str\").setValue(bitstream.getID());\n org.dspace.app.xmlui.wing.element.Item actions = edit.addItem();\n actions.addButton(\"String_Node_Str\").setValue(T_submit_save);\n actions.addButton(\"String_Node_Str\").setValue(T_submit_cancel);\n div.addHidden(\"String_Node_Str\").setValue(knot.getId());\n}\n"
"private static CategoryDataset createSummaryDataset(List<IndicatorUnit> indicatorUnitList, boolean isCreate) {\n DefaultBoxAndWhiskerCategoryDataset dataset = new DefaultBoxAndWhiskerCategoryDataset();\n if (isCreate) {\n Map<IndicatorEnum, Double> map = new HashMap<IndicatorEnum, Double>();\n for (IndicatorUnit indicatorUnit : indicatorUnitList) {\n Object object = null;\n try {\n IndicatorCommonUtil.compositeIndicatorMap(indicatorUnit);\n } catch (RuntimeException re) {\n isValide = false;\n }\n if (object != null) {\n String strValue = String.valueOf(object);\n double doubleValue = Double.valueOf(strValue);\n map.put(indicatorUnit.getType(), doubleValue);\n } else {\n map.put(indicatorUnit.getType(), Double.valueOf(0));\n }\n }\n if (map.size() != 6) {\n DefaultCategoryDataset barDataset = new DefaultCategoryDataset();\n if (map.get(IndicatorEnum.MinValueIndicatorEnum) != null) {\n barDataset.addValue(map.get(IndicatorEnum.MinValueIndicatorEnum), \"String_Node_Str\", IndicatorEnum.MinValueIndicatorEnum.getLabel());\n }\n if (map.get(IndicatorEnum.LowerQuartileIndicatorEnum) != null) {\n barDataset.addValue(map.get(IndicatorEnum.LowerQuartileIndicatorEnum), \"String_Node_Str\", IndicatorEnum.LowerQuartileIndicatorEnum.getLabel());\n }\n if (map.get(IndicatorEnum.MeanIndicatorEnum) != null) {\n barDataset.addValue(map.get(IndicatorEnum.MeanIndicatorEnum), \"String_Node_Str\", IndicatorEnum.MeanIndicatorEnum.getLabel());\n }\n if (map.get(IndicatorEnum.MedianIndicatorEnum) != null) {\n barDataset.addValue(map.get(IndicatorEnum.MedianIndicatorEnum), \"String_Node_Str\", IndicatorEnum.MedianIndicatorEnum.getLabel());\n }\n if (map.get(IndicatorEnum.UpperQuartileIndicatorEnum) != null) {\n barDataset.addValue(map.get(IndicatorEnum.UpperQuartileIndicatorEnum), \"String_Node_Str\", IndicatorEnum.UpperQuartileIndicatorEnum.getLabel());\n }\n if (map.get(IndicatorEnum.MaxValueIndicatorEnum) != null) {\n barDataset.addValue(map.get(IndicatorEnum.MaxValueIndicatorEnum), \"String_Node_Str\", IndicatorEnum.MaxValueIndicatorEnum.getLabel());\n }\n renderer3d.setSeriesPaint(0, Color.RED);\n return barDataset;\n }\n BoxAndWhiskerItem item = createBoxAndWhiskerItem(map.get(IndicatorEnum.MeanIndicatorEnum), map.get(IndicatorEnum.MedianIndicatorEnum), map.get(IndicatorEnum.LowerQuartileIndicatorEnum), map.get(IndicatorEnum.UpperQuartileIndicatorEnum), map.get(IndicatorEnum.MinValueIndicatorEnum), map.get(IndicatorEnum.MaxValueIndicatorEnum), null);\n dataset.add(item, \"String_Node_Str\", \"String_Node_Str\");\n } else {\n BoxAndWhiskerItem item = createBoxAndWhiskerItem(40.0, 45.0, 30.0, 60.0, 15.0, 75.0, null);\n dataset.add(item, \"String_Node_Str\", \"String_Node_Str\");\n }\n return dataset;\n}\n"
"public void testNoOpServiceStartStop() {\n RecordingListener listener = new RecordingListener();\n NoOpService service = new NoOpService();\n RecordingListener listener = RecordingListener.record(service);\n assertEquals(State.NEW, service.state());\n assertFalse(service.isRunning());\n assertFalse(service.running);\n service.start();\n assertEquals(State.RUNNING, service.state());\n assertTrue(service.isRunning());\n assertTrue(service.running);\n service.stop();\n assertEquals(State.TERMINATED, service.state());\n assertFalse(service.isRunning());\n assertFalse(service.running);\n assertEquals(Arrays.asList(State.STARTING, State.RUNNING, State.STOPPING, State.TERMINATED), listener.getStateHistory());\n}\n"
"public void remove(Node node, LinkedList<String> ids) throws RepositoryException {\n for (NodeIterator i = node.getNodes(); i.hasNext(); ) {\n Node child = i.nextNode();\n remove(child, ids);\n }\n for (PropertyIterator i = node.getReferences(); i.hasNext(); ) {\n Property property = i.nextProperty();\n property.setValue((Node) null);\n }\n for (PropertyIterator i = node.getProperties(); i.hasNext(); ) {\n Property property = i.nextProperty();\n if (property.getType() == PropertyType.REFERENCE) {\n linkMgrs[LinkType.REFERENCE.index].setReferenced(node, property.getName(), null);\n } else if (property.getType() == PropertyType.PATH) {\n linkMgrs[LinkType.PATH.index].setReferenced(node, property.getName(), null);\n }\n }\n String id = node.getUUID();\n node.remove();\n return ids.iterator();\n}\n"
"public Timestamp cast(String src, Class<?> toType, String... args) {\n if (Strings.isBlank(src))\n return null;\n try {\n Date d;\n if (src.length() > 10) {\n d = ((DateFormat) dateTimeFormat.clone()).parse(src);\n } else {\n d = ((DateFormat) dateFormat.clone()).parse(src);\n }\n return new java.sql.Timestamp(d.getTime());\n } catch (ParseException e) {\n throw Lang.wrapThrow(e);\n }\n}\n"
"public Object run(ServiceProvisioningEngines serviceProvisioningEngines) throws PropertyVetoException, TransactionFailure {\n ServiceProvisioningEngine serviceProvisioningEngine = serviceProvisioningEngines.createChild(ServiceProvisioningEngine.class);\n serviceProvisioningEngine.setClassName(className);\n serviceProvisioningEngine.setType(type.toUpperCase(locale));\n serviceProvisioningEngine.setDefault(defaultService);\n if (properties != null) {\n for (Map.Entry e : properties.entrySet()) {\n Property prop = serviceProvisioningEngine.createChild(Property.class);\n prop.setName((String) e.getKey());\n prop.setValue((String) e.getValue());\n serviceProvisioningEngine.getProperty().add(prop);\n }\n }\n serviceProvisioningEngines.getServiceProvisioningEngines().add(serviceProvisioningEngine);\n if (defaultService) {\n if (force) {\n for (final ServiceProvisioningEngine spe : serviceProvisioningEngines.getServiceProvisioningEngines()) {\n if (spe.getDefault() && type.equalsIgnoreCase(spe.getType())) {\n Transaction t = Transaction.getTransaction(serviceProvisioningEngines);\n ServiceProvisioningEngine spe_w = t.enroll(spe);\n spe_w.setDefault(false);\n break;\n }\n }\n }\n }\n return serviceProvisioningEngines;\n}\n"
"public int getVisibility() {\n return mVisibility != null ? mVisibility : View.VISIBLE;\n}\n"
"public CommandResult execute(GetOrgUnitModels cmd, User user) throws CommandException {\n final ArrayList<OrgUnitModelDTO> orgUnitModelDTOList;\n final ProjectModelStatus[] status = cmd.getStatus();\n Query query;\n if (status == null) {\n query = em.createQuery(\"String_Node_Str\");\n query.setParameter(\"String_Node_Str\", user.getOrganization().getId());\n orgUnitModelDTOList = queryModels(query, topModelId);\n } else {\n orgUnitModelDTOList = new ArrayList<OrgUnitModelDTO>();\n for (final ProjectModelStatus s : status) {\n query = em.createQuery(\"String_Node_Str\");\n query.setParameter(\"String_Node_Str\", user.getOrganization().getId());\n query.setParameter(\"String_Node_Str\", s);\n orgUnitModelDTOList.addAll(queryModels(query));\n }\n }\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + orgUnitModelDTOList.size() + \"String_Node_Str\");\n }\n return new OrgUnitModelListResult(orgUnitModelDTOList);\n}\n"
"public static HashMap<Action, IntMap> parseSign(Sign sign, Minecart cart, Direction direction) {\n log.info(\"String_Node_Str\");\n Bukkit.getServer().broadcastMessage(\"String_Node_Str\" + direction.toString());\n Action oldAction = Action.NULL;\n HashMap<Action, IntMap> returnData = new HashMap<Action, IntMap>();\n IntMap map;\n for (String line : sign.getLines()) {\n removeBrackets(line);\n Action newAction = SignParser.parseAction(line);\n log.info(newAction.toString());\n if (newAction == Action.NULL) {\n continue;\n } else if (newAction != Action.ITEM && newAction != Action.ALL) {\n oldAction = newAction;\n continue;\n } else if (oldAction != Action.NULL) {\n switch(oldAction) {\n case DEPOSIT:\n case COLLECT:\n log.info(\"String_Node_Str\" + oldAction.toString());\n log.info(\"String_Node_Str\" + line);\n switch(newAction) {\n case ALL:\n if (returnData.containsKey(oldAction)) {\n map = returnData.get(oldAction);\n map.fillAll();\n returnData.put(oldAction, map);\n } else {\n map = new IntMap();\n map.fillAll();\n returnData.put(oldAction, map);\n }\n break;\n case ITEM:\n IntMap parsed = buildIntMap(line, direction);\n if (parsed != null) {\n if (returnData.containsKey(oldAction)) {\n map = returnData.get(oldAction);\n map.combine(parsed);\n returnData.put(oldAction, map);\n } else {\n if (parsed != null)\n returnData.put(oldAction, parsed);\n }\n }\n break;\n default:\n break;\n }\n break;\n default:\n break;\n }\n } else {\n continue;\n }\n }\n return returnData;\n}\n"
"protected void drawText(String text, float textX, float textY, float baseline, float width, float height, TextStyle textStyle) {\n writer.drawText(text, textX, textY, width + 1f, height, textStyle.getFontInfo(), textStyle.getColor(), textStyle.isRtl());\n}\n"
"public boolean keyguardIsShowingTq() {\n return mKeyguardMediator.isShowingAndNotHidden();\n}\n"
"public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {\n mainActivity.runOnUiThread(new Runnable() {\n public void run() {\n mainActivity.showWebview();\n }\n });\n if (!mainActivity.isConnected()) {\n ((LeanWebView) view).loadUrlDirect(\"String_Node_Str\");\n }\n}\n"
"public Map<Integer, Float> toSignal2Noise(IIDTypeMapper<Integer, Integer> dim2primary) {\n LinkedHashMap<Integer, Float> r = new LinkedHashMap<>();\n List<Entry<Integer, Float>> entrySet = new ArrayList<>(correlation.entrySet());\n Collections.sort(entrySet, new Comparator<Entry<Integer, Float>>() {\n public int compare(Entry<Integer, Float> o1, Entry<Integer, Float> o2) {\n return -Float.compare(o1.getValue(), o2.getValue());\n }\n });\n for (Entry<Integer, Float> ri : entrySet) {\n final Integer id = ri.getKey();\n Set<Integer> keys = dim2primary.apply(id);\n if (keys == null) {\n continue;\n }\n for (Integer key : keys) r.put(key, ri.getValue());\n }\n return r;\n}\n"
"public void scheduleEvents() throws IllegalActionException {\n ERGController controller = (ERGController) getContainer();\n ERGDirector director = controller.director;\n List<SchedulingRelation> schedules = new LinkedList<SchedulingRelation>(preemptiveTransitionList());\n schedules.addAll(nonpreemptiveTransitionList());\n boolean lifo = ((BooleanToken) getController().LIFO.getToken()).booleanValue();\n List<SchedulingRelation> sortedSchedules = new LinkedList<SchedulingRelation>();\n for (SchedulingRelation relation : schedules) {\n int priority1 = ((IntToken) relation.priority.getToken()).intValue();\n ListIterator<SchedulingRelation> iterator = sortedSchedules.listIterator();\n while (true) {\n if (iterator.hasNext()) {\n SchedulingRelation next = iterator.next();\n int priority2 = ((IntToken) next.priority.getToken()).intValue();\n if (priority1 > priority2) {\n iterator.previous();\n iterator.add(relation);\n break;\n }\n } else {\n iterator.add(relation);\n break;\n }\n }\n }\n ParserScope scope = _getParserScope();\n for (SchedulingRelation schedule : sortedSchedules) {\n if (schedule.isEnabled(scope)) {\n double delay = schedule.getDelay(scope);\n Event nextEvent = (Event) schedule.destinationState();\n if (schedule.isCanceling()) {\n director.cancel(nextEvent);\n } else {\n ArrayToken edgeArguments = schedule.getArguments(scope);\n director.fireAt(nextEvent, director.getModelTime().add(delay), edgeArguments, schedule.getTriggers());\n }\n }\n }\n}\n"
"public DroneAttribute getAttribute(String attributeType) {\n if (drone == null)\n return null;\n switch(attributeType) {\n case AttributeType.FOLLOW_STATE:\n return CommonApiUtils.getFollowState(followMe);\n case AttributeType.CAMERA:\n return CommonApiUtils.getCameraProxy(drone, cameraDetails);\n default:\n return drone.getAttribute(attributeType);\n }\n}\n"
"public void run() {\n try {\n updatePostObject(false);\n } catch (IllegalEditorStateException e) {\n AppLog.e(T.EDITOR, \"String_Node_Str\");\n return;\n }\n savePostToDb();\n if (listener != null) {\n listener.onPostSave();\n }\n}\n"
"private void initLocation(ViewGroup rootView) {\n if (!mPost.supportsLocation())\n return;\n View locationRootView = ((ViewStub) rootView.findViewById(R.id.stub_post_location_settings)).inflate();\n TextView locationLabel = ((TextView) locationRootView.findViewById(R.id.locationLabel));\n locationLabel.setText(getResources().getString(R.string.location).toUpperCase());\n mLocationText = (TextView) locationRootView.findViewById(R.id.locationText);\n mLocationText.setOnClickListener(this);\n mLocationAddSection = locationRootView.findViewById(R.id.sectionLocationAdd);\n mLocationSearchSection = locationRootView.findViewById(R.id.sectionLocationSearch);\n mLocationViewSection = locationRootView.findViewById(R.id.sectionLocationView);\n Button addLocation = (Button) locationRootView.findViewById(R.id.addLocation);\n addLocation.setOnClickListener(this);\n mButtonSearchLocation = (Button) locationRootView.findViewById(R.id.searchLocation);\n mButtonSearchLocation.setOnClickListener(this);\n mLocationEditText = (EditText) locationRootView.findViewById(R.id.searchLocationText);\n mLocationEditText.setOnEditorActionListener(this);\n mLocationEditText.addTextChangedListener(mLocationEditTextWatcher);\n Button updateLocation = (Button) locationRootView.findViewById(R.id.updateLocation);\n Button removeLocation = (Button) locationRootView.findViewById(R.id.removeLocation);\n updateLocation.setOnClickListener(this);\n removeLocation.setOnClickListener(this);\n if (SiteSettingsInterface.getInterface(getActivity(), mSite, null).init(false).getLocation() && !checkForLocationPermission())\n return;\n if (mPost.hasLocation()) {\n showLocationView();\n PostLocation location = mPost.getLocation();\n setLocation(location.getLatitude(), location.getLongitude());\n } else {\n EditPostActivity activity = (EditPostActivity) getActivity();\n if (SiteSettingsInterface.getGeotagging(activity) && activity.isNewPost()) {\n searchLocation();\n } else {\n showLocationAdd();\n }\n }\n}\n"
"public void run() {\n CreatePatternWizard fileWizard = new CreatePatternWizard(folder, type) {\n\n public void dispose() {\n activeCount = 0;\n super.dispose();\n }\n };\n WizardDialog dialog = new WizardDialog(Display.getDefault().getActiveShell(), fileWizard) {\n public void openTray(DialogTray tray) throws IllegalStateException, UnsupportedOperationException {\n super.openTray(tray);\n if (tray instanceof HelpTray) {\n HelpTray helpTray = (HelpTray) tray;\n ReusableHelpPart helpPart = helpTray.getHelpPart();\n helpPart.getForm().getForm().notifyListeners(SWT.Activate, new Event());\n }\n }\n };\n fileWizard.setWindowTitle(getText());\n dialog.create();\n dialog.getShell().addShellListener(new ShellAdapter() {\n public void shellActivated(ShellEvent e) {\n if (activeCount < 2) {\n Point point = e.widget.getDisplay().getCursorLocation();\n IContext context = HelpSystem.getContext(HelpPlugin.PATTERN_CONTEXT_HELP_ID);\n IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem();\n helpSystem.displayContext(context, point.x + 15, point.y);\n activeCount++;\n ReusableHelpPart lastActiveInstance = ReusableHelpPart.getLastActiveInstance();\n if (lastActiveInstance != null) {\n IHelpResource[] relatedTopics = context.getRelatedTopics();\n String href = relatedTopics[0].getHref();\n lastActiveInstance.showURL(href);\n }\n }\n }\n });\n if (WizardDialog.OK == dialog.open()) {\n try {\n folder.refreshLocal(IResource.DEPTH_INFINITE, null);\n IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(fileWizard.getLocation());\n PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(new FileEditorInput(file), PluginConstant.PATTERN_EDITOR);\n } catch (CoreException e) {\n e.printStackTrace();\n }\n }\n}\n"
"public void onBlogChanged() {\n super.onBlogChanged();\n stopStatsService();\n FragmentManager fm = getSupportFragmentManager();\n FragmentTransaction ft = fm.beginTransaction();\n StatsAbsViewFragment fragment;\n fragment = StatsAbsViewFragment.newInstance(StatsViewType.VISITORS_AND_VIEWS);\n ft.replace(R.id.stats_visitors_and_views_container, fragment, StatsVisitorsAndViewsFragment.TAG);\n fragment = StatsAbsViewFragment.newInstance(StatsViewType.TOP_POSTS_AND_PAGES);\n ft.replace(R.id.stats_top_posts_container, fragment, StatsTopPostsAndPagesFragment.TAG);\n fragment = StatsAbsViewFragment.newInstance(StatsViewType.VIEWS_BY_COUNTRY);\n ft.replace(R.id.stats_geoviews_container, fragment, StatsGeoviewsFragment.TAG);\n fragment = StatsAbsViewFragment.newInstance(StatsViewType.CLICKS);\n ft.replace(R.id.stats_clicks_container, fragment, StatsClicksFragment.TAG);\n fragment = StatsAbsViewFragment.newInstance(StatsViewType.SEARCH_ENGINE_TERMS);\n ft.replace(R.id.stats_searchengine_container, fragment, StatsSearchEngineTermsFragment.TAG);\n fragment = StatsAbsViewFragment.newInstance(StatsViewType.TOTALS_FOLLOWERS_AND_SHARES);\n ft.replace(R.id.stats_totals_followers_shares_container, fragment, StatsTotalsFollowersAndSharesFragment.TAG);\n fragment = StatsReferrersFragment.newInstance(StatsViewType.REFERRERS);\n ft.replace(R.id.stats_referrers_container, fragment, StatsReferrersFragment.TAG);\n ft.commit();\n refreshStats();\n}\n"
"public static Range normalizeCaretPosition(Range oldCaretPosition) {\n Range newCaretPos = oldCaretPosition.cloneRange();\n if (oldCaretPosition.isCollapsed()) {\n newCaretPos = oldCaretPosition.cloneRange();\n if (isNonEmptyTextNode(oldCaretPosition.getStartContainer()) && oldCaretPosition.getStartOffset() > 0) {\n return oldCaretPosition;\n } else {\n Map<String, List<Text>> leftTextNodesInSameP = getLeftTextNodesInSameP(oldCaretPosition);\n List<Text> leftNonEmpty = leftTextNodesInSameP.get(NON__EMPTY);\n int leftSize = leftNonEmpty.size();\n if (leftSize > 0) {\n Text firstLeftTextNode = leftNonEmpty.get(leftSize - 1);\n newCaretPos.setStart(firstLeftTextNode, firstLeftTextNode.getLength());\n } else {\n Map<String, List<Text>> rightTextNodesInSameP = getRightTextNodesInSameP(oldCaretPosition);\n List<Text> rightNonEmpty = rightTextNodesInSameP.get(NON__EMPTY);\n if (rightNonEmpty.size() > 0) {\n Text firstRightTextNode = rightNonEmpty.get(0);\n newCaretPos.setStart(firstRightTextNode, 0);\n } else {\n List<Text> emptyTextNodes = leftTextNodesInSameP.get(EMPTY);\n Text emptyText = null;\n if (emptyTextNodes.size() > 0) {\n emptyText = emptyTextNodes.get(0);\n } else {\n emptyTextNodes = rightTextNodesInSameP.get(EMPTY);\n if (emptyTextNodes.size() > 0) {\n emptyText = emptyTextNodes.get(0);\n }\n }\n if (emptyText != null) {\n newCaretPos.setStart(emptyText, 0);\n }\n }\n }\n }\n newCaretPos.collapse(true);\n }\n return newCaretPos;\n}\n"
"public Metric<?> createInstance(MetricConfiguration config) {\n return createAmbiguityMetric();\n}\n"
"public CElement complexType(XSComplexType type) {\n CElement ci = allow(type, type.getName());\n if (ci != null)\n return ci;\n BindInfo bi = builder.getBindInfo(type);\n if (type.isGlobal()) {\n QName tagName = null;\n String className = deriveName(type);\n if (getGlobalBinding().isSimpleMode()) {\n XSElementDecl referer = getSoleElementReferer(type);\n if (referer != null && isCollapsable(referer)) {\n tagName = getName(referer);\n className = deriveName(referer);\n }\n }\n JPackage pkg = selector.getPackage(type.getTargetNamespace());\n return new CClassInfo(model, pkg, className, loc, getTypeName(type), tagName, type, bi.toCustomizationList());\n } else {\n XSElementDecl element = type.getScope();\n if (element.isGlobal() && isCollapsable(element)) {\n if (builder.getBindInfo(element).get(BIClass.class) != null)\n return null;\n return new CClassInfo(model, selector.getClassScope(), deriveName(element), element.getLocator(), null, getName(element), element, bi.toCustomizationList());\n }\n CElement parentType = selector.isBound(element, type);\n String className;\n CClassInfoParent scope;\n if (parentType != null && parentType instanceof CElementInfo && ((CElementInfo) parentType).hasClass()) {\n scope = (CElementInfo) parentType;\n className = \"String_Node_Str\";\n } else {\n className = builder.getNameConverter().toClassName(element.getName());\n BISchemaBinding sb = builder.getBindInfo(type.getOwnerSchema()).get(BISchemaBinding.class);\n if (sb != null)\n className = sb.mangleAnonymousTypeClassName(className);\n scope = selector.getClassScope();\n }\n return new CClassInfo(model, scope, className, type.getLocator(), null, null, type, bi.toCustomizationList());\n }\n}\n"
"public void testZSS441() {\n Book workbook = Util.loadBook(this, \"String_Node_Str\");\n Sheet sheet = workbook.getSheet(\"String_Node_Str\");\n Range sumResult = Ranges.range(sheet, \"String_Node_Str\");\n assertEquals(11, sumResult.getCellData().getDoubleValue().intValue());\n sumResult = Ranges.range(sheet, \"String_Node_Str\");\n assertEquals(22, sumResult.getCellData().getDoubleValue().intValue());\n sumResult = Ranges.range(sheet, \"String_Node_Str\");\n assertEquals(33, sumResult.getCellData().getDoubleValue().intValue());\n}\n"
"public boolean removeRole(String name) {\n return false;\n}\n"
"public String createURI(String iPattern) {\n String uri = iPattern;\n if (uri == null)\n uri = this.pattern;\n if (uri == null) {\n uri = IBirtConstants.VIEWER_FRAMESET;\n if (renderReportlet)\n uri = IBirtConstants.VIEWER_RUN;\n }\n }\n boolean usingFrameset = IBirtConstants.VIEWER_FRAMESET.equalsIgnoreCase(uri);\n boolean usingParameter = IBirtConstants.VIEWER_PARAMETER.equalsIgnoreCase(uri);\n if (baseURL != null)\n uri = baseURL + \"String_Node_Str\" + uri;\n if (format != null) {\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_FORMAT + \"String_Node_Str\" + urlParamValueEncode(format);\n } else {\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_FORMAT + \"String_Node_Str\" + ParameterAccessor.PARAM_FORMAT_HTML;\n }\n if (reportDesign != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_REPORT + \"String_Node_Str\" + urlParamValueEncode(reportDesign);\n if (reportDocument != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_REPORT_DOCUMENT + \"String_Node_Str\" + urlParamValueEncode(reportDocument);\n if (reportletId != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_INSTANCEID + \"String_Node_Str\" + urlParamValueEncode(reportletId);\n if (usingFrameset && id != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_ID + \"String_Node_Str\" + urlParamValueEncode(id);\n if (usingFrameset && title != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_TITLE + \"String_Node_Str\" + urlParamValueEncode(title);\n if (usingFrameset && showTitle != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_SHOW_TITLE + \"String_Node_Str\" + urlParamValueEncode(showTitle);\n if (usingParameter && !isCustom && pattern != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_SERVLET_PATTERN + \"String_Node_Str\" + urlParamValueEncode(pattern);\n if (usingParameter && !isCustom && target != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_TARGET + \"String_Node_Str\" + urlParamValueEncode(target);\n if (locale != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_LOCALE + \"String_Node_Str\" + urlParamValueEncode(locale);\n if (svg != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_SVG + \"String_Node_Str\" + urlParamValueEncode(svg);\n if (rtl != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_RTL + \"String_Node_Str\" + urlParamValueEncode(rtl);\n if (pageNum > 0)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_PAGE + \"String_Node_Str\" + pageNum;\n if (pageRange != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_PAGE_RANGE + \"String_Node_Str\" + pageRange;\n if (allowMasterPage != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_MASTERPAGE + \"String_Node_Str\" + urlParamValueEncode(allowMasterPage);\n if (resourceFolder != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_RESOURCE_FOLDER + \"String_Node_Str\" + urlParamValueEncode(resourceFolder);\n if (maxRowsOfRecords >= 0)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_MAXROWS + \"String_Node_Str\" + maxRowsOfRecords;\n if (forceOverwriteDocument != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_OVERWRITE + \"String_Node_Str\" + urlParamValueEncode(forceOverwriteDocument);\n if (usingFrameset && showToolBar != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_TOOLBAR + \"String_Node_Str\" + urlParamValueEncode(showToolBar);\n if (usingFrameset && showNavigationBar != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_NAVIGATIONBAR + \"String_Node_Str\" + urlParamValueEncode(showNavigationBar);\n if (showParameterPage != null)\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_PARAMETER_PAGE + \"String_Node_Str\" + urlParamValueEncode(showParameterPage);\n if (bookmark != null) {\n if (IBirtConstants.VIEWER_PREVIEW.equalsIgnoreCase(iPattern)) {\n uri += \"String_Node_Str\" + urlParamValueEncode(bookmark);\n } else {\n uri += \"String_Node_Str\" + ParameterAccessor.PARAM_BOOKMARK + \"String_Node_Str\" + urlParamValueEncode(bookmark);\n }\n }\n return uri;\n}\n"
"public static String getHadoopConfigurationValue(Loader loader, String hadoopConfigurationFile, String configurationToGet) {\n String hadoopConfDir = RemotingUtil.getHadoopConfigurationDirPath(loader);\n String destinationReceiveDir = copyAndGetConfigurationFilePath(loader, hadoopConfDir, hadoopConfigurationFile);\n return parseConfiguration(destinationReceiveDir + \"String_Node_Str\" + hadoopConfigurationFile, configurationToGet);\n}\n"
"public Location teleport(Entity entity, V10Location locTo, Vector vector) {\n if (entity == null || entity.isDead() || blockedEntities.contains(entity))\n return;\n Region regionTo = plugin.regionManager.getRegion(locTo);\n Portal portal = plugin.portalManager.insideBlocks.get(locTo);\n if (portal == null && ((Math.abs(vector.getX()) > 0.5 || (Math.abs(vector.getY()) > 1 || (Math.abs(vector.getZ()) > 0.5))) || entity instanceof Boat)) {\n portal = plugin.portalManager.awayBlocksGeneral.get(locTo);\n if (portal == null && (Math.abs(vector.getX()) > 0.5))\n portal = plugin.portalManager.awayBlocksX.get(locTo);\n if (portal == null && (Math.abs(vector.getY()) > 1))\n portal = plugin.portalManager.awayBlocksY.get(locTo);\n if (portal == null && (Math.abs(vector.getZ()) > 0.5))\n portal = plugin.portalManager.awayBlocksZ.get(locTo);\n }\n if (portal == null && (entity instanceof FallingBlock || entity instanceof TNTPrimed))\n portal = plugin.portalManager.awayBlocksY.get(locTo);\n if (portal == null || !portal.open || portal.disabled || (Math.abs(vector.getY()) > 1 && !portal.vertical))\n return null;\n double x, y, z;\n for (V10Location b : portal.inside) {\n x = b.x;\n y = b.y;\n z = b.z;\n if (!portal.vertical) {\n if (x + 0.5 < entity.getLocation().getX() && vector.getX() > 0)\n return null;\n else if (x - 0.5 > entity.getLocation().getX() && vector.getX() < 0)\n return null;\n else if (y + 0.5 < entity.getLocation().getZ() && vector.getZ() > 0)\n return null;\n else if (z - 0.5 > entity.getLocation().getZ() && vector.getZ() < 0)\n return null;\n } else {\n if (y + 0.5 < entity.getLocation().getY() && vector.getY() > 0)\n return null;\n if (y - 0.5 > entity.getLocation().getY() && vector.getY() < -0.1)\n return null;\n }\n }\n Portal destination = portal.getDestination();\n Location teleport = destination.teleport.getHandle();\n teleport.setX(teleport.getX() + 0.5D);\n teleport.setY(teleport.getY() + 0.5D);\n teleport.setZ(teleport.getZ() + 0.5D);\n float yaw = entity.getLocation().getYaw();\n float pitch = entity.getLocation().getPitch();\n float startyaw = yaw;\n switch(portal.teleportFace) {\n case EAST:\n yaw -= 90;\n break;\n case SOUTH:\n yaw -= 180;\n break;\n case WEST:\n yaw = -270;\n break;\n case DOWN:\n teleport.add(0, 1, 0);\n case UP:\n yaw = pitch;\n pitch = 0;\n break;\n }\n double momentum = 0.0;\n switch(portal.teleportFace) {\n case NORTH:\n case SOUTH:\n momentum = vector.getX();\n break;\n case EAST:\n case WEST:\n momentum = vector.getZ();\n break;\n case UP:\n case DOWN:\n momentum = vector.getY();\n break;\n }\n momentum = Math.abs(momentum);\n momentum *= regionTo.getDouble(RegionSetting.VELOCITY_MULTIPLIER);\n Vector outvector = entity.getVelocity().zero();\n switch(destination.teleportFace) {\n case NORTH:\n yaw += 180;\n outvector = outvector.setX(momentum);\n break;\n case EAST:\n yaw += 270;\n outvector = outvector.setZ(momentum);\n break;\n case SOUTH:\n yaw += 360;\n outvector = outvector.setX(-momentum);\n break;\n case WEST:\n yaw += 430;\n outvector = outvector.setZ(-momentum);\n break;\n case DOWN:\n if (portal.teleportFace != BlockFace.UP && portal.teleportFace != BlockFace.DOWN) {\n pitch = startyaw;\n yaw = 0;\n } else {\n pitch = yaw;\n yaw = startyaw;\n }\n outvector = outvector.setY(momentum);\n break;\n case UP:\n if (portal.teleportFace != BlockFace.UP && portal.teleportFace != BlockFace.DOWN) {\n pitch = startyaw + 180;\n yaw = 0;\n } else {\n pitch = yaw;\n yaw = startyaw;\n }\n outvector = outvector.setY(-momentum);\n break;\n }\n if (!(entity instanceof Player) && momentum < 0.5 && (portal.teleportFace == BlockFace.UP || portal.teleportFace == BlockFace.DOWN) && (destination.teleportFace == BlockFace.UP || destination.teleportFace == BlockFace.DOWN))\n return null;\n entity.setFallDistance(0);\n entity.setVelocity(entity.getVelocity().zero());\n teleport.setPitch(pitch);\n teleport.setYaw(yaw);\n if (entity instanceof Arrow) {\n teleport.setY(teleport.getY() + 0.5);\n entity.remove();\n teleport.getWorld().spawnArrow(teleport, outvector, (float) (momentum * 1.0f), 12.0f);\n } else if (entity instanceof FallingBlock) {\n FallingBlock sand = (FallingBlock) entity;\n sand = teleport.getWorld().spawnFallingBlock(teleport, sand.getBlockId(), sand.getBlockData());\n entity.remove();\n } else if (entity instanceof Item) {\n Item item = (Item) entity;\n item = teleport.getWorld().dropItem(teleport, item.getItemStack());\n entity.remove();\n } else if (entity instanceof Player || entity instanceof Vehicle) {\n blockedEntities.add(entity);\n final Location tploc = teleport;\n final Vector outVector = outvector;\n final Entity entity2 = entity;\n plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n entity2.teleport(tploc);\n entity2.setVelocity(outVector);\n plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n public void run() {\n blockedEntities.remove(entity2);\n }\n }, 1L);\n }\n }, 1L);\n } else {\n entity.teleport(teleport);\n entity.setVelocity(outvector);\n }\n destination.disabled = true;\n plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new enablePortal(destination), 10L);\n if (portal.orange)\n plugin.util.PlaySound(Sound.PORTAL_EXIT_ORANGE, entity instanceof Player ? (Player) entity : null, new V10Location(teleport));\n else\n plugin.util.PlaySound(Sound.PORTAL_EXIT_BLUE, entity instanceof Player ? (Player) entity : null, new V10Location(teleport));\n return teleport;\n}\n"
"public void afterComponentAttached(Component comp, Page page) {\n if (comp.getDesktop() != null) {\n final Binder selfBinder = BinderUtil.getBinder(comp);\n if (selfBinder == null) {\n final Binder binder = (Binder) comp.getAttribute(BinderImpl.BINDER, true);\n if (binder != null && (binder instanceof BinderImpl)) {\n comp.addEventListener(10000, BinderImpl.ON_BIND_INIT, new EventListener<Event>() {\n public void onEvent(Event event) throws Exception {\n final Component comp = event.getTarget();\n comp.removeEventListener(BinderImpl.ON_BIND_INIT, this);\n if (comp.getPage() == null) {\n return;\n }\n final Binder innerBinder = (Binder) comp.getAttribute(BinderImpl.BINDER);\n if (innerBinder != null) {\n return;\n }\n if (binder instanceof AnnotateBinder) {\n new AnnotateBinderHelper(binder).initComponentBindings(comp);\n }\n binder.loadComponent(comp, true);\n if (comp.getAttribute(BinderImpl.VAR) != null)\n comp.setAttribute(BinderImpl.BINDER, binder);\n }\n });\n Events.postEvent(new Event(BinderImpl.ON_BIND_INIT, comp));\n }\n }\n }\n}\n"
"public List<Route> list() {\n List<Route> routeList = new LinkedList<Route>();\n Route route = new Route();\n route.setTitle(\"String_Node_Str\");\n User user = new User();\n user.setUserName(\"String_Node_Str\");\n route.setCreatedBy(user);\n route.setDescription(\"String_Node_Str\");\n Place place1 = new Place();\n place1.setTitle(\"String_Node_Str\");\n place1.setDescription(\"String_Node_Str\");\n Place place2 = new Place();\n place2.setTitle(\"String_Node_Str\");\n place2.setDescription(\"String_Node_Str\");\n Place place3 = new Place();\n place3.setTitle(\"String_Node_Str\");\n place3.setDescription(\"String_Node_Str\");\n Place place4 = new Place();\n place4.setTitle(\"String_Node_Str\");\n place4.setDescription(\"String_Node_Str\");\n Location loc1 = new Location(\"String_Node_Str\");\n loc1.setLatitude(62.4007043202567);\n loc1.setLongitude(17.2577392061653);\n place1.setGeoLocation(loc1);\n Location loc2 = new Location(\"String_Node_Str\");\n loc2.setLatitude(62.394369903217);\n loc2.setLongitude(17.2816450479837);\n place2.setGeoLocation(loc2);\n Location loc3 = new Location(\"String_Node_Str\");\n loc3.setLatitude(62.3897829867526);\n loc3.setLongitude(17.2995418371631);\n place3.setGeoLocation(loc3);\n Location loc4 = new Location(\"String_Node_Str\");\n loc4.setLatitude(62.391178326117);\n loc4.setLongitude(17.3004228024664);\n place4.setGeoLocation(loc4);\n Map<Integer, Place> placeRecordMap = new HashMap<Integer, Place>();\n placeRecordMap.put(1, place1);\n placeRecordMap.put(2, place2);\n placeRecordMap.put(3, place3);\n placeRecordMap.put(4, place4);\n List<Record> placeRecords = new ArrayList<Record>();\n try {\n for (Integer i : placeRecordMap.keySet()) {\n String filename = String.format(\"String_Node_Str\", i);\n InputStream is = this.mAssetManager.open(filename);\n XMLPull pull = new XMLPull(is);\n placeRecordMap.get(i).setRecords(pull.parse());\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n List<Place> places = new LinkedList<Place>();\n places.add(place1);\n places.add(place2);\n places.add(place3);\n places.add(place4);\n route.setPlaces(places);\n routeList.add(route);\n return routeList;\n}\n"
"protected void removeRoomView(RoomWithAView roomView) {\n chatRooms.remove(roomView.getID());\n}\n"
"public void addOrUpdateItem(Item item, boolean fromMigration) {\n if (!loaded) {\n loadRelations();\n }\n ProcessType processType = null;\n if (item instanceof ProcessItem) {\n processType = ((ProcessItem) item).getProcess();\n }\n if (item instanceof JobletProcessItem) {\n processType = ((JobletProcessItem) item).getJobletProcess();\n }\n if (processType != null) {\n boolean relationsModified = true;\n Relation relation = new Relation();\n relation.setId(item.getProperty().getId());\n relation.setType(getTypeFromItem(item));\n relation.setVersion(item.getProperty().getVersion());\n Set<Relation> oldProjectRelations = null;\n if (currentProjectItemsRelations.containsKey(relation)) {\n oldProjectRelations = new HashSet<Relation>(currentProjectItemsRelations.get(relation));\n currentProjectItemsRelations.get(relation).clear();\n }\n clearItemsRelations(item);\n Boolean builtIn = null;\n String currentValue = null;\n String relationType = null;\n for (Object o : processType.getContext()) {\n ContextType context = (ContextType) o;\n for (Object o2 : context.getContextParameter()) {\n ContextParameterType contextParam = (ContextParameterType) o2;\n if (!StringUtils.isEmpty(contextParam.getRepositoryContextId())) {\n addRelationShip(item, contextParam.getRepositoryContextId(), LATEST_VERSION, CONTEXT_RELATION);\n }\n }\n }\n if (processType.getParameters() != null) {\n if (processType.getParameters().getRoutinesParameter() != null) {\n for (Object o : processType.getParameters().getRoutinesParameter()) {\n RoutinesParameterType itemInfor = (RoutinesParameterType) o;\n addRelationShip(item, itemInfor.getName(), LATEST_VERSION, ROUTINE_RELATION);\n }\n }\n for (Object o : processType.getParameters().getElementParameter()) {\n if (o instanceof ElementParameterType) {\n ElementParameterType param = (ElementParameterType) o;\n if (param.getName().startsWith(\"String_Node_Str\")) {\n relationType = SCHEMA_RELATION;\n } else if (param.getName().startsWith(\"String_Node_Str\") || param.getName().startsWith(\"String_Node_Str\")) {\n relationType = PROPERTY_RELATION;\n } else if (param.getName().startsWith(\"String_Node_Str\")) {\n relationType = VALIDATION_RULE_RELATION;\n } else {\n builtIn = null;\n currentValue = null;\n }\n if (param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\")) {\n builtIn = true;\n if (param.getValue().equals(\"String_Node_Str\")) {\n builtIn = false;\n }\n }\n if (param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\")) {\n currentValue = param.getValue();\n }\n if (builtIn != null && currentValue != null) {\n if (!builtIn) {\n addRelationShip(item, currentValue, LATEST_VERSION, relationType);\n }\n builtIn = null;\n currentValue = null;\n }\n }\n }\n }\n List<String> jobletsComponentsList = new ArrayList<String>();\n IComponentsService compService = (IComponentsService) GlobalServiceRegister.getDefault().getService(IComponentsService.class);\n for (IComponent component : compService.getComponentsFactory().getComponents()) {\n if (component.getComponentType() == EComponentType.JOBLET) {\n jobletsComponentsList.add(component.getName());\n }\n }\n builtIn = null;\n currentValue = null;\n for (Object o : processType.getNode()) {\n if (o instanceof NodeType) {\n NodeType currentNode = (NodeType) o;\n for (Object o2 : currentNode.getElementParameter()) {\n if (o2 instanceof ElementParameterType) {\n ElementParameterType param = (ElementParameterType) o2;\n if (param.getName().startsWith(\"String_Node_Str\")) {\n relationType = QUERY_RELATION;\n } else if (param.getName().startsWith(\"String_Node_Str\") || param.getName().startsWith(\"String_Node_Str\")) {\n relationType = SCHEMA_RELATION;\n } else if (param.getName().startsWith(\"String_Node_Str\")) {\n relationType = PROPERTY_RELATION;\n } else if (param.getName().startsWith(\"String_Node_Str\")) {\n relationType = VALIDATION_RULE_RELATION;\n } else {\n builtIn = null;\n currentValue = null;\n }\n if (param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\")) {\n builtIn = true;\n if (param.getValue().equals(\"String_Node_Str\")) {\n builtIn = false;\n }\n }\n if (param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\") || param.getName().endsWith(\"String_Node_Str\")) {\n currentValue = param.getValue();\n }\n if (builtIn != null && currentValue != null) {\n if (!builtIn) {\n addRelationShip(item, currentValue, LATEST_VERSION, relationType);\n if (PROPERTY_RELATION.equals(relationType)) {\n addHadoopClusterRelationShips(item, currentValue, LATEST_VERSION);\n }\n }\n builtIn = null;\n currentValue = null;\n }\n if (param.getName().equals(\"String_Node_Str\")) {\n for (Object o3 : param.getElementValue()) {\n if (o3 instanceof ElementValueType && \"String_Node_Str\".equals(((ElementValueType) o3).getElementRef())) {\n addRelationShip(item, ((ElementValueType) o3).getValue(), LATEST_VERSION, SQLPATTERN_RELATION);\n }\n }\n }\n if (param.getField() != null && param.getField().equals(EParameterFieldType.SURVIVOR_RELATION.getName())) {\n String relatedID = param.getValue();\n addRelationShip(item, relatedID, LATEST_VERSION, SURVIVOR_RELATION);\n }\n }\n }\n if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerMapperService.class)) {\n IDesignerMapperService service = (IDesignerMapperService) GlobalServiceRegister.getDefault().getService(IDesignerMapperService.class);\n AbstractExternalData nodeData = currentNode.getNodeData();\n List<String> schemaIds = service.getRepositorySchemaIds(nodeData);\n if (schemaIds.size() > 0) {\n for (String schemaId : schemaIds) {\n addRelationShip(item, schemaId, LATEST_VERSION, SCHEMA_RELATION);\n }\n }\n }\n if (jobletsComponentsList.contains(currentNode.getComponentName())) {\n String version = LATEST_VERSION;\n for (Object o2 : currentNode.getElementParameter()) {\n if (o2 instanceof ElementParameterType) {\n ElementParameterType param = (ElementParameterType) o2;\n if (param.getName().equals(\"String_Node_Str\")) {\n version = param.getValue();\n }\n }\n }\n IComponent cc = compService.getComponentsFactory().get(currentNode.getComponentName(), ComponentCategory.CATEGORY_4_DI.getName());\n IJobletProviderService service = null;\n if (PluginChecker.isJobLetPluginLoaded()) {\n service = (IJobletProviderService) GlobalServiceRegister.getDefault().getService(IJobletProviderService.class);\n }\n Property property = service.getJobletComponentItem(cc);\n if (property != null) {\n addRelationShip(item, property.getId(), version, JOBLET_RELATION);\n }\n }\n if (\"String_Node_Str\".equals(currentNode.getComponentName())) {\n String jobVersion = LATEST_VERSION;\n Set<String> jobIdSet = new HashSet<String>();\n for (Object o2 : currentNode.getElementParameter()) {\n if (o2 instanceof ElementParameterType) {\n ElementParameterType param = (ElementParameterType) o2;\n if (param.getName().equals(\"String_Node_Str\") || param.getName().equals(\"String_Node_Str\")) {\n String jobIds = param.getValue();\n String[] jobsArr = jobIds.split(RelationshipItemBuilder.COMMA);\n for (String jobId : jobsArr) {\n if (StringUtils.isNotEmpty(jobId)) {\n jobIdSet.add(jobId);\n }\n }\n }\n if (param.getName().equals(\"String_Node_Str\") || param.getName().equals(\"String_Node_Str\")) {\n jobVersion = param.getValue();\n }\n }\n }\n for (String jobId : jobIdSet) {\n addRelationShip(item, jobId, jobVersion, JOB_RELATION);\n }\n }\n }\n }\n if (oldProjectRelations != null) {\n Set<Relation> newProjectRelations = currentProjectItemsRelations.get(relation);\n if (oldProjectRelations.size() == newProjectRelations.size()) {\n relationsModified = false;\n for (Relation newRelation : newProjectRelations) {\n if (!oldProjectRelations.contains(newRelation)) {\n relationsModified = true;\n break;\n }\n }\n }\n if (!relationsModified) {\n currentProjectItemsRelations.get(relation).addAll(oldProjectRelations);\n }\n }\n if (relationsModified && !modified) {\n modified = true;\n }\n if (!fromMigration && modified) {\n saveRelations();\n }\n }\n}\n"
"public ArrayList<String[]> getSmbList() {\n SQLiteDatabase sqLiteDatabase = getReadableDatabase();\n Cursor cursor = sqLiteDatabase.query(getTableForOperation(Operation.SMB), null, null, null, null, null, null);\n boolean hasNext = cursor.moveToFirst();\n ArrayList<String[]> row = new ArrayList<>();\n try {\n while (cursor.moveToNext()) {\n try {\n row.add(new String[] { cursor.getString(cursor.getColumnIndex(COLUMN_NAME)), SmbUtil.getSmbDecryptedPath(context, cursor.getString(cursor.getColumnIndex(COLUMN_PATH))) });\n } catch (GeneralSecurityException | IOException e) {\n e.printStackTrace();\n Toast.makeText(context, context.getResources().getString(R.string.failed_smb_decrypt_path), Toast.LENGTH_LONG).show();\n removeSmbPath(cursor.getString(cursor.getColumnIndex(COLUMN_NAME)), \"String_Node_Str\");\n continue;\n }\n }\n } finally {\n cursor.close();\n }\n return row;\n}\n"
"private void saveData() {\n for (final EditorPage<?> editor : pages) {\n editor.saveData();\n }\n updatePageState();\n model.setCloseable(false);\n}\n"