content stringlengths 40 137k |
|---|
"private void refactorNonPackageFiles() {\n try {\n String[] extensions = { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n Iterator filesInMain = FileUtils.iterateFiles(new File(this.workBaseDir), extensions, true);\n while (filesInMain.hasNext()) {\n File f = (File) filesInMain.next();\n changePackageNamesInFile(f.getAbsolutePath(), RenamePackages.SAVE_FILE);\n }\n } catch (IOException ioex) {\n log.error(\"String_Node_Str\" + ioex.getMessage());\n }\n}\n"
|
"public final void remove(EntityMetadata metadata, Object entity, String key) {\n if (indexer != null) {\n if (indexer.getClass().isAssignableFrom(LuceneIndexer.class)) {\n ((com.impetus.kundera.index.lucene.Indexer) indexer).unindex(metadata, key);\n } else {\n indexer.unIndex(metadata.getEntityClazz(), entity);\n }\n }\n}\n"
|
"public void widgetSelected(SelectionEvent e) {\n if (columnList.remove(((IStructuredSelection) columnsElementViewer.getSelection()).getFirstElement())) {\n columnsElementViewer.setInput(columnList);\n enabledButtons(buttons, false);\n masterPage.setDirty(true);\n computeRefreshDataPreviewPart(isLeftPart, columnList, columnsElementViewer);\n }\n}\n"
|
"public static boolean isChainPureNonPolymer(Chain c) {\n for (Group g : c.getAtomGroups()) {\n ChemComp cc = g.getChemComp();\n ResidueType resType = cc.getResidueType();\n PolymerType polType = cc.getPolymerType();\n if ((resType == ResidueType.lPeptideLinking || PolymerType.PROTEIN_ONLY.contains(polType) || PolymerType.POLYNUCLEOTIDE_ONLY.contains(polType)) && !g.isHetAtomInFile()) {\n return false;\n }\n return true;\n}\n"
|
"public void run() {\n while (true) {\n synchronized (_notificationMsgs) {\n try {\n _notificationMsgs.wait(1000);\n } catch (InterruptedException e) {\n }\n }\n ClusterManagerMessage msg = null;\n while ((msg = getNextNotificationMessage()) != null) {\n try {\n switch(msg.getMessageType()) {\n case nodeAdded:\n if (msg.getNodes() != null && msg.getNodes().size() > 0) {\n Profiler profiler = new Profiler();\n profiler.start();\n notifyNodeJoined(msg.getNodes());\n profiler.stop();\n if (profiler.getDuration() > 1000) {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + profiler.getDuration() + \"String_Node_Str\");\n }\n } else {\n s_logger.warn(\"String_Node_Str\" + profiler.getDuration() + \"String_Node_Str\");\n }\n }\n break;\n case nodeRemoved:\n if (msg.getNodes() != null && msg.getNodes().size() > 0) {\n Profiler profiler = new Profiler();\n profiler.start();\n notifyNodeLeft(msg.getNodes());\n profiler.stop();\n if (profiler.getDuration() > 1000) {\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"String_Node_Str\" + profiler.getDuration() + \"String_Node_Str\");\n }\n } else {\n s_logger.warn(\"String_Node_Str\" + profiler.getDuration() + \"String_Node_Str\");\n }\n }\n break;\n case nodeIsolated:\n notifyNodeIsolated();\n break;\n default:\n assert (false);\n break;\n }\n } catch (Throwable e) {\n s_logger.warn(\"String_Node_Str\", e);\n }\n }\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n }\n }\n}\n"
|
"public String processSubmit(Customer customer, BindingResult result, SessionStatus status) {\n singUpValidator.validate(customer, result);\n if (result.hasErrors()) {\n return \"String_Node_Str\";\n } else {\n status.setComplete();\n try {\n String userName = customer.getFirstName().toLowerCase() + customer.getLastName().toLowerCase();\n DataStore dataStore = stormpathSDKService.getStormpathSDKClient().getDataStore();\n Directory directory = dataStore.load(stormpathSDKService.getRestURL(), Directory.class);\n Account account = dataStore.instantiate(Account.class);\n account.setEmail(customer.getEmail());\n account.setGivenName(customer.getFirstName());\n account.setSurname(customer.getLastName());\n account.setPassword(customer.getPassword());\n account.setUsername(userName);\n directory.createAccount(account);\n customer.setUserName(userName);\n customerDao.saveCustomer(customer);\n } catch (ResourceException re) {\n result.addError(new ObjectError(\"String_Node_Str\", re.getMessage()));\n re.printStackTrace();\n return \"String_Node_Str\";\n } catch (Exception e) {\n e.printStackTrace();\n }\n return \"String_Node_Str\";\n }\n}\n"
|
"public synchronized void setButtons(boolean visible) {\n if (_fillButton == null) {\n URL img = getClass().getResource(\"String_Node_Str\");\n ImageIcon fillIcon = new ImageIcon(img);\n _fillButton = new JButton(fillIcon);\n _fillButton.setBorderPainted(false);\n _fillButton.setPreferredSize(new Dimension(20, 20));\n _fillButton.setToolTipText(\"String_Node_Str\");\n _fillButton.addActionListener(new ButtonListener());\n add(_fillButton);\n }\n _fillButton.setVisible(visible);\n requestFocus();\n}\n"
|
"private String getSummaryStats(List<Integer> list) {\n double[] a = list.stream().mapToDouble(Integer::intValue).toArray();\n StringBuilder sb = new StringBuilder();\n sb.append(\"String_Node_Str\" + StatUtils.max(a) + \"String_Node_Str\");\n sb.append(\"String_Node_Str\" + StatUtils.min(a) + \"String_Node_Str\");\n sb.append(\"String_Node_Str\" + StatUtils.mean(a) + \"String_Node_Str\");\n sb.append(\"String_Node_Str\" + StatUtils.sum(a) + \"String_Node_Str\");\n sb.append(\"String_Node_Str\" + StatUtils.variance(a) + \"String_Node_Str\");\n sb.append(\"String_Node_Str\" + StatUtils.percentile(a, 5) + \"String_Node_Str\");\n sb.append(\"String_Node_Str\" + StatUtils.percentile(a, 25) + \"String_Node_Str\");\n sb.append(\"String_Node_Str\" + StatUtils.percentile(a, 50) + \"String_Node_Str\");\n sb.append(\"String_Node_Str\" + StatUtils.percentile(a, 75) + \"String_Node_Str\");\n sb.append(\"String_Node_Str\" + StatUtils.percentile(a, 95) + \"String_Node_Str\");\n int binCount = Math.min(DISTANCE_METRIC_BIN_COUNT, a.length);\n double scalingFactor = Math.max((double) a.length / MAX_BIN_CAPACITY, 1);\n EmpiricalDistribution distribution = new EmpiricalDistribution(binCount);\n distribution.load(a);\n sb.append(\"String_Node_Str\");\n for (int i = 0; i < binCount; i++) {\n sb.append(String.format(Locale.US, \"String_Node_Str\", distribution.getUpperBounds()[i]) + \"String_Node_Str\");\n for (double j = 0; j < distribution.getBinStats().get(i).getN() / scalingFactor; j++) {\n sb.append(\"String_Node_Str\");\n }\n sb.append(\"String_Node_Str\" + distribution.getBinStats().get(i).getN() + \"String_Node_Str\");\n }\n sb.append(\"String_Node_Str\" + a.length + \"String_Node_Str\");\n int[] counts = new int[3];\n for (Double i : a) {\n if (i.intValue() < counts.length) {\n counts[i.intValue()]++;\n }\n }\n sb.append(\"String_Node_Str\" + counts[0] + \"String_Node_Str\");\n sb.append(\"String_Node_Str\" + counts[1] + \"String_Node_Str\");\n sb.append(\"String_Node_Str\" + counts[2] + \"String_Node_Str\");\n return sb.toString();\n}\n"
|
"public int isValid() {\n if (name == null || name.trim().equals(\"String_Node_Str\")) {\n return NAME_NULL;\n }\n if (!namePattern.matcher(name).matches()) {\n return NAME_INVALID;\n }\n if (minVersion != null && !minVersion.trim().equals(\"String_Node_Str\")) {\n Matcher matcher = versionPattern.matcher(minVersion);\n if (!matcher.matches()) {\n return MIN_INVALID;\n }\n }\n if (maxVersion != null && !maxVersion.trim().equals(\"String_Node_Str\")) {\n Matcher matcher = versionPattern.matcher(maxVersion);\n if (!matcher.matches()) {\n return MAX_INVALID;\n }\n }\n if (!compareMinMax()) {\n return MIN_MAX_INVALID;\n }\n return OK;\n}\n"
|
"private CameraProxy getCameraProxy() {\n Drone drone = droneMgr.getDrone();\n Camera droneCamera = drone.getCamera();\n List<Footprint> footprints = droneCamera.getFootprints();\n final int printsCount = footprints.size();\n List<FootPrint> proxyPrints = new ArrayList<FootPrint>(footprints.size());\n for (Footprint footprint : footprints) {\n proxyPrints.add(getProxyCameraFootPrint(footprint));\n }\n return new CameraProxy(ProxyUtils.getCameraDetail(droneCamera.getCamera()), getProxyCameraFootPrint(droneCamera.getCurrentFieldOfView()), proxyPrints, getCameraDetails());\n}\n"
|
"private void editKey(long keyId) {\n Intent intent = new Intent(EditKeyActivity.ACTION_EDIT_KEY);\n intent.putExtra(EditKeyActivity.EXTRA_KEY_ID, keyId);\n startActivityForResult(intent, 0);\n}\n"
|
"public void run() {\n try {\n socket = new DatagramSocket();\n while (!canceled) {\n try {\n Thread.sleep(500L);\n byte[] data = NetworkConstants.Server.BROADCAST_MESSAGE.getBytes();\n broadcast(NetworkConstants.Server.BROADCAST_PORT, socket, data);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n }\n }\n } catch (SocketException e) {\n e.printStackTrace();\n } finally {\n if (socket != null)\n socket.close();\n }\n}\n"
|
"public void setBottomView(IBottomWrapper bottom, int height) {\n if (bottom == null)\n return;\n this.mBottomWrapper = bottom;\n this.mBottomView = bottom.getBottomView();\n this.childBottomHeight = height;\n addView((View) mBottomView);\n}\n"
|
"private void loadeggprices() {\n File folder = new File(\"String_Node_Str\");\n File configFile = new File(\"String_Node_Str\");\n if (configFile.exists()) {\n try {\n mobprice.clear();\n Properties theprices = new Properties();\n theprices.load(new FileInputStream(configFile));\n Iterator<Entry<Object, Object>> iprices = theprices.entrySet().iterator();\n while (iprices.hasNext()) {\n Entry<Object, Object> price = iprices.next();\n try {\n mobeggprice.put(price.getKey().toString().toLowerCase(), new Double(price.getValue().toString()));\n } catch (NumberFormatException ex) {\n System.out.println(\"String_Node_Str\" + price.getKey().toString() + \"String_Node_Str\");\n }\n }\n } catch (IOException e) {\n }\n if (mobprice.size() < CreatureTypes.values().length) {\n System.out.println(\"String_Node_Str\");\n createeggprices();\n }\n } else {\n System.out.println(\"String_Node_Str\");\n folder.mkdir();\n System.out.println(\"String_Node_Str\");\n createeggprices();\n }\n}\n"
|
"public void createModelIfNecessary(FormIndex index) {\n if (index.isInForm()) {\n IFormElement e = getForm().getChild(index);\n if (e instanceof GroupDef) {\n GroupDef g = (GroupDef) e;\n if (g.getRepeat() && g.getCountReference() != null) {\n IAnswerData count = getForm().getMainInstance().resolveReference(g.getConextualizedCountReference(index.getReference())).getValue();\n if (count != null) {\n int fullcount = -1;\n try {\n fullcount = ((Integer) new IntegerData().cast(count.uncast()).getValue()).intValue();\n } catch (IllegalArgumentException iae) {\n throw new RuntimeException(\"String_Node_Str\" + count.uncast().getString() + \"String_Node_Str\" + g.getConextualizedCountReference(index.getReference()).toString() + \"String_Node_Str\");\n }\n TreeReference ref = getForm().getChildInstanceRef(index);\n TreeElement element = getForm().getMainInstance().resolveReference(ref);\n if (element == null) {\n if (index.getInstanceIndex() < fullcount) {\n try {\n getForm().createNewRepeat(index);\n } catch (InvalidReferenceException ire) {\n ire.printStackTrace();\n throw new RuntimeException(\"String_Node_Str\" + ire.getMessage());\n }\n }\n }\n }\n }\n }\n }\n}\n"
|
"public void genHomeland() {\n for (int attempt = 0, placed = 0, amount = rand.nextInt(3) + 5; attempt < 170 && placed < amount; attempt++) {\n if (generateStructure(genGooLake))\n ++placed;\n }\n for (int cx = 0; cx < world.getChunkAmountX(); cx++) {\n for (int cz = 0; cz < world.getChunkAmountZ(); cz++) {\n if (rand.nextInt(5) <= 2) {\n int height = rand.nextInt(14) + (data.hasDeviation(IslandBiomeEnchantedIsland.TALL_PILES) ? 6 + rand.nextInt(8) : 4);\n int radius = rand.nextInt(2) + 1;\n int ox = cx * 16 + rand.nextInt(16), oz = cz * 16 + rand.nextInt(16), oy = world.getHighestY(ox, oz);\n if (oy > 0) {\n boolean generateObsidian = true;\n for (int xx = ox - radius; xx <= ox + radius && generateObsidian; ++xx) {\n for (int zz = oz - radius; zz <= oz + radius && generateObsidian; ++zz) {\n if (MathUtil.square(xx - ox) + MathUtil.square(zz - oz) <= radius * radius + 1) {\n if (Math.abs(world.getHighestY(xx, zz) - oy) > 2)\n generateObsidian = false;\n }\n }\n }\n if (generateObsidian) {\n for (int xx = ox - radius; xx <= ox + radius; ++xx) {\n for (int zz = oz - radius; zz <= oz + radius; ++zz) {\n for (int yy = world.getHighestY(xx, zz) + 1; yy < oy + height && yy < 128; ++yy) {\n if (MathUtil.square(xx - ox) + MathUtil.square(zz - oz) <= radius * radius + 0.5D + rand.nextGaussian() * 0.7D) {\n world.setBlock(xx, yy, zz, BlockList.obsidian_falling, 0, true);\n }\n }\n }\n }\n }\n }\n }\n }\n }\n for (int attempt = 0, placed = 0, placedMax = 8 + rand.nextInt(5); attempt < 36 && placed < placedMax; attempt++) {\n if (generateStructure(genRoads))\n ++placed;\n }\n TObjectIntHashMap<HomelandRole> map = new TObjectIntHashMap<>();\n for (int spawnAttempt = 0, spawnedTotal = 42 + rand.nextInt(24) + rand.nextInt(12); spawnAttempt < spawnedTotal; spawnAttempt++) {\n EntityMobHomelandEnderman enderman = new EntityMobHomelandEnderman(null);\n HomelandRole role = HomelandRole.WORKER;\n if (rand.nextInt(10) == 0)\n role = HomelandRole.OVERWORLD_EXPLORER;\n else if (rand.nextInt(6) == 0)\n role = HomelandRole.BUSINESSMAN;\n else if (rand.nextInt(4) == 0)\n role = HomelandRole.COLLECTOR;\n else if (rand.nextInt(4) == 0)\n role = HomelandRole.INTELLIGENCE;\n else if (rand.nextInt(3) == 0)\n role = HomelandRole.GUARD;\n enderman.setHomelandRole(role);\n map.adjustOrPutValue(role, 1, 1);\n for (int posAttempt = 0, xx, yy, zz; posAttempt < 20; posAttempt++) {\n xx = rand.nextInt(ComponentIsland.size - 40) + 20;\n zz = rand.nextInt(ComponentIsland.size - 40) + 20;\n yy = world.getHighestY(xx, zz);\n if (world.getBlock(xx, yy, zz) == topBlock) {\n enderman.setPosition(xx, yy + 1, zz);\n world.addEntity(enderman);\n break;\n }\n }\n }\n for (HomelandRole role : map.keySet()) System.out.println(\"String_Node_Str\" + role.name() + \"String_Node_Str\" + map.get(role));\n List<EntityMobHomelandEnderman> endermanList = world.getAllEntities(EntityMobHomelandEnderman.class);\n int size = endermanList.size();\n if (size > 0) {\n for (int leaders = 1 + rand.nextInt(3 + rand.nextInt(3)); leaders > 0 && size > 0; leaders--) {\n endermanList.remove(rand.nextInt(size--)).setHomelandRole(HomelandRole.ISLAND_LEADERS);\n }\n }\n for (int groupLeaders = rand.nextInt(3 + rand.nextInt(3) * rand.nextInt(2)); groupLeaders > 0 && size > 0; groupLeaders--) {\n long groupId = endermanList.remove(rand.nextInt(size--)).setNewGroupLeader();\n if (groupId == -1)\n continue;\n for (int state = rand.nextBoolean() ? rand.nextInt(1 + rand.nextInt(4 + rand.nextInt(8))) : 0; state > 0 && size > 0; state--) {\n endermanList.remove(rand.nextInt(size--)).setGroupMember(groupId, OvertakeGroupRole.getRandomMember(rand));\n }\n }\n}\n"
|
"public Object visitFreeFormItem(FreeFormItemDesign container, Object value) {\n BaseQueryDefinition query = createQuery(container, value);\n for (int i = 0; i < container.getItemCount(); i++) build(query, container.getItem(i));\n finishVisit(container, query);\n return getResultQuery(query, value);\n}\n"
|
"public void actionCurrentUserBookmarkedList(int page, int limit) {\n Session session = Session.getInstance(context);\n actionBookmarkList(session.getCurrentUser().getId(), page, limit);\n}\n"
|
"public static void addDataItem(CrosstabReportItemHandle crosstab, MeasureViewHandle measureView, String function, String rowDimension, String rowLevel, String colDimension, String colLevel) throws SemanticException {\n if (crosstab == null || measureView == null)\n return;\n AggregationCellHandle cell = measureView.getAggregationCell(rowDimension, rowLevel, colDimension, colLevel);\n if (cell == null) {\n cell = measureView.addAggregation(rowDimension, rowLevel, colDimension, colLevel);\n }\n if (cell != null && cell.getContents().size() == 0) {\n String name = CrosstabModelUtil.generateComputedColumnName(measureView, colLevel, rowLevel);\n ComputedColumn column = StructureFactory.newComputedColumn(crosstab.getModelHandle(), name);\n column.setExpression(ExpressionUtil.createJSMeasureExpression(measureView.getCubeMeasureName()));\n column.setAggregateFunction(function != null ? function : DEFAULT_MEASURE_FUNCTION);\n column.addAggregateOn(rowLevel);\n column.addAggregateOn(colLevel);\n ComputedColumnHandle columnHandle = ((ReportItemHandle) crosstab.getModelHandle()).addColumnBinding(column, false);\n DataItemHandle dataItem = crosstab.getModuleHandle().getElementFactory().newDataItem(null);\n dataItem.setResultSetColumn(columnHandle.getName());\n cell.addContent(dataItem);\n }\n}\n"
|
"public StateMachine<ServiceConfiguration, Component.State, Component.Transition> getStateMachine() {\n try {\n return this.lookupService().getStateMachine();\n } catch (NoSuchServiceException ex) {\n LOG.error(ex, ex);\n throw new IllegalStateException(\"String_Node_Str\" + this.getName(), ex);\n }\n}\n"
|
"private void onProgressComplete(NotificationBean notificationBean) {\n Notification notification = getNotification(notificationBean.getUuid());\n if (notification != null) {\n notification.getData().setTitle(notificationBean.getTitle());\n notification.getData().setMessage(notificationBean.getMessage());\n notification.getData().setMessageWidget(notificationBean.getMessageWidget());\n notification.getData().setType(NotificationType.notification);\n notification.getWidget().setNotificationTitle(notificationBean.getTitle());\n if (notificationBean.getBody() != null) {\n notification.getWidget().setNotificationMessage(notificationBean.getBody());\n } else {\n notification.getWidget().setNotificationMessage(notificationBean.getMessage(), NotificationType.notification);\n }\n notification.getWidget().removeStyleName(\"String_Node_Str\");\n notification.getWidget().addStyleName(\"String_Node_Str\");\n notification.getAliveTimer().schedule(5000);\n resizeNotification(notification.getIndex() + 1);\n }\n}\n"
|
"public <T> List<T> query(String query, Class<T> classOfT) {\n InputStream instream = null;\n List<T> result = new ArrayList<T>();\n try {\n Reader reader = new InputStreamReader(instream = queryForStream(query));\n JsonObject json = new JsonParser().parse(reader).getAsJsonObject();\n if (json.has(\"String_Node_Str\")) {\n if (!includeDocs) {\n log.warn(\"String_Node_Str\" + \"String_Node_Str\");\n }\n for (JsonElement e : json.getAsJsonArray(\"String_Node_Str\")) {\n result.add(JsonToObject(db.getGson(), e, \"String_Node_Str\", classOfT));\n }\n } else {\n log.warn(\"String_Node_Str\");\n }\n return result;\n } finally {\n close(instream);\n }\n}\n"
|
"public byte[] encodePacket() {\n byte[] buffer = new byte[6 + len + 2];\n int i = 0;\n buffer[i++] = (byte) MAVLINK_STX;\n buffer[i++] = (byte) len;\n buffer[i++] = (byte) seq;\n buffer[i++] = (byte) sysid;\n buffer[i++] = (byte) compid;\n buffer[i++] = (byte) msgid;\n for (int j = 0; j < payload.size(); j++) {\n buffer[i++] = payload.payload.get(j);\n }\n generateCRC();\n buffer[i++] = (byte) (crc.getLSB());\n buffer[i++] = (byte) (crc.getMSB());\n return buffer;\n}\n"
|
"public void stop(BundleContext bc) {\n storageManager.storeContactListAndStopStorageManager();\n bc.removeServiceListener(this);\n Iterator providers = this.currentlyInstalledProviders.values().iterator();\n while (providers.hasNext()) {\n ProtocolProviderService pp = (ProtocolProviderService) providers.next();\n OperationSetPersistentPresence opSetPersPresence = (OperationSetPersistentPresence) pp.getOperationSet(OperationSetPersistentPresence.class);\n if (opSetPersPresence != null) {\n opSetPersPresence.removeSubscriptionListener(clSubscriptionEventHandler);\n opSetPersPresence.removeServerStoredGroupChangeListener(clGroupEventHandler);\n } else {\n OperationSetPresence opSetPresence = (OperationSetPresence) pp.getOperationSet(OperationSetPresence.class);\n if (opSetPresence != null) {\n opSetPresence.removeSubscriptionListener(clSubscriptionEventHandler);\n }\n }\n }\n currentlyInstalledProviders.clear();\n if (storageManager != null) {\n storageManager.stop();\n }\n}\n"
|
"public void onChatChanged(ChatChangedEvent event) {\n if (event.isCreated()) {\n createChat(event.getChat(), Visibility.notFocused);\n }\n if (event.isOpened()) {\n final PairChatPage page = chatPages.get(event.getChat());\n if (page != null) {\n page.requestVisibility(Visibility.focused);\n } else {\n createChat(event.getChat(), Visibility.notFocused);\n }\n }\n if (event.isClosed()) {\n final PairChatPage page = chatPages.get(event.getChat());\n page.requestVisibility(Visibility.hidden);\n }\n}\n"
|
"public void actionPerformed(ActionEvent evt) {\n if (call != null) {\n if (isSelected()) {\n boolean startedRecording = false;\n try {\n startedRecording = startRecording();\n } finally {\n if (!startedRecording && (recorder != null)) {\n try {\n recorder.stop();\n } finally {\n recorder = null;\n }\n }\n setSelected(startedRecording);\n }\n } else if (recorder != null) {\n try {\n recorder.stop();\n NotificationManager.fireNotification(NotificationManager.CALL_SAVED, resources.getI18NString(\"String_Node_Str\"), resources.getI18NString(\"String_Node_Str\", new String[] { callFilename }));\n } finally {\n recorder = null;\n }\n }\n }\n}\n"
|
"public List<Object[]> subList(long fromIndex, long toIndex, Map<Long, K> indexMap, DataValidation dataValiator) {\n boolean stratToRecord = false;\n List<Object[]> returnList = new ArrayList<Object[]>();\n if (!checkIndex(fromIndex, toIndex)) {\n return returnList;\n }\n K fromKey = null;\n K toKey = null;\n if (indexMap != null) {\n fromKey = indexMap.get(fromIndex);\n toKey = indexMap.get(toIndex);\n }\n Iterator<K> iterator = null;\n long index = 0;\n if (fromKey == null) {\n iterator = this.iterator();\n } else if (toKey == null) {\n NavigableSet<K> tailSet = tailSet(fromKey, true);\n index = fromIndex;\n iterator = tailSet.iterator();\n } else {\n NavigableSet<K> tailSet = subSet(fromKey, toKey);\n index = fromIndex;\n iterator = tailSet.iterator();\n }\n while (iterator.hasNext()) {\n K next = iterator.next();\n if (dataValiator != null && !dataValiator.isValid(next)) {\n continue;\n }\n if (index == 0 && fromKey == null && indexMap != null) {\n indexMap.put(0l, next);\n }\n if (index == fromIndex) {\n stratToRecord = true;\n }\n if (index == toIndex) {\n if (toKey == null && indexMap != null) {\n indexMap.put(toIndex, next);\n }\n break;\n }\n if (stratToRecord == true) {\n returnList.add(new Object[] { next });\n }\n index++;\n }\n return returnList;\n}\n"
|
"void doAppendToDocument(Document doc, Element parent) {\n int mods = jclass.getModifiers();\n boolean is_annotation = false;\n Element e = doc.createElement(jclass.isInterface() && !jclass.isAnnotation() ? \"String_Node_Str\" : \"String_Node_Str\");\n if (!jclass.isInterface() || jclass.isAnnotation()) {\n Type t = jclass.getGenericSuperclass();\n if (t != null)\n e.setAttribute(\"String_Node_Str\", getGenericTypeName(t));\n Class t2 = jclass.getSuperclass();\n if (t2 != null)\n e.setAttribute(\"String_Node_Str\", getClassName(t2, true));\n }\n String className = getClassName(jclass, false);\n e.setAttribute(\"String_Node_Str\", className);\n e.setAttribute(\"String_Node_Str\", Modifier.isFinal(mods) ? \"String_Node_Str\" : \"String_Node_Str\");\n e.setAttribute(\"String_Node_Str\", Modifier.isStatic(mods) ? \"String_Node_Str\" : \"String_Node_Str\");\n e.setAttribute(\"String_Node_Str\", Modifier.isAbstract(mods) ? \"String_Node_Str\" : \"String_Node_Str\");\n e.setAttribute(\"String_Node_Str\", Modifier.isPublic(mods) ? \"String_Node_Str\" : Modifier.isProtected(mods) ? \"String_Node_Str\" : \"String_Node_Str\");\n if (is_obfuscated)\n e.setAttribute(\"String_Node_Str\", Boolean.toString(is_obfuscated));\n Element typeParameters = getTypeParametersNode(doc, jclass.getTypeParameters());\n if (typeParameters != null)\n e.appendChild(typeParameters);\n setDeprecatedAttr(e, jclass.getDeclaredAnnotations(), e.getAttribute(\"String_Node_Str\"));\n Type[] ifaces = jclass.getGenericInterfaces();\n sortTypes(ifaces);\n for (Type iface : ifaces) {\n Element iface_elem = doc.createElement(\"String_Node_Str\");\n if (iface instanceof Class)\n iface_elem.setAttribute(\"String_Node_Str\", getClassName((Class) iface, true));\n else if (iface instanceof ParameterizedType) {\n ParameterizedType pt = (ParameterizedType) iface;\n if (pt.getRawType() instanceof Class)\n iface_elem.setAttribute(\"String_Node_Str\", getClassName(((Class) pt.getRawType()), true));\n }\n iface_elem.setAttribute(\"String_Node_Str\", getGenericTypeName(iface));\n iface_elem.appendChild(doc.createTextNode(\"String_Node_Str\"));\n e.appendChild(iface_elem);\n if (iface_elem.getAttribute(\"String_Node_Str\").equals(\"String_Node_Str\"))\n is_annotation = true;\n }\n for (Constructor ctor : jclass.getDeclaredConstructors()) appendCtor(ctor, doc, e);\n Class base_class = jclass.getSuperclass();\n Map<String, Method> methods = new HashMap<String, Method>();\n for (Method method : jclass.getDeclaredMethods()) {\n int mmods = method.getModifiers();\n int rtmods = method.getReturnType().getModifiers();\n if (!Modifier.isPublic(rtmods) && !Modifier.isProtected(rtmods))\n continue;\n boolean nonPublic = false;\n Class[] ptypes = method.getParameterTypes();\n for (int pidx = 0; pidx < ptypes.length; pidx++) {\n int ptmods = ptypes[pidx].getModifiers();\n if (!Modifier.isPublic(ptmods) && !Modifier.isProtected(ptmods))\n nonPublic = true;\n }\n if (nonPublic)\n continue;\n if (base_class != null && !Modifier.isFinal(mmods)) {\n Method base_method = null;\n Class ancestor = base_class;\n while (ancestor != null && base_method == null) {\n try {\n base_method = ancestor.getDeclaredMethod(method.getName(), method.getParameterTypes());\n } catch (Exception ex) {\n }\n ancestor = ancestor.getSuperclass();\n }\n if (base_method != null) {\n int base_mods = base_method.getModifiers();\n int base_decl_class_mods = base_method.getDeclaringClass().getModifiers();\n if (!Modifier.isStatic(base_mods) && !Modifier.isAbstract(base_mods) && (Modifier.isPublic(mmods) == Modifier.isPublic(base_mods)) && Modifier.isPublic(base_decl_class_mods)) {\n if (!Modifier.isAbstract(mmods) || method.getName().equals(\"String_Node_Str\")) {\n if (!method.getName().equals(\"String_Node_Str\") || !jclass.getName().equals(\"String_Node_Str\"))\n continue;\n }\n }\n }\n }\n String key = getGenericSignature(method);\n if (methods.containsKey(key)) {\n Type method_type = method.getGenericReturnType();\n Method hashed = methods.get(key);\n Type hashed_type = hashed.getGenericReturnType();\n Class mret = method_type instanceof Class ? (Class) method_type : null;\n Class hret = hashed_type instanceof Class ? (Class) hashed_type : null;\n if (mret == null || (hret != null && hret.isAssignableFrom(mret)))\n methods.put(key, method);\n else if (hret != null && !mret.isAssignableFrom(hret)) {\n System.err.print(\"String_Node_Str\" + jclass.getName() + \"String_Node_Str\" + key);\n System.err.println(\"String_Node_Str\" + hashed.getGenericReturnType().toString() + \"String_Node_Str\" + method.getGenericReturnType().toString());\n }\n } else {\n methods.put(key, method);\n }\n }\n ArrayList<String> sigs = new ArrayList<String>(methods.keySet());\n java.util.Collections.sort(sigs);\n for (String sig : sigs) appendMethod(methods.get(sig), doc, e);\n Field[] fields = getDeclaredFields();\n sortFields(fields);\n for (Field field : fields) appendField(field, asmFields.get(field.getName()), doc, e);\n parent.appendChild(e);\n if (is_annotation)\n parent.appendChild(createAnnotationMock(doc, className));\n}\n"
|
"private boolean isEvictableHeapPercentage(final MapContainer mapContainer) {\n final long usedHeapSize = getUsedHeapSize(mapContainer);\n if (usedHeapSize == -1L) {\n return false;\n }\n final MaxSizeConfig maxSizeConfig = mapContainer.getMapConfig().getMaxSizeConfig();\n final double maxSize = getApproximateMaxSize(maxSizeConfig.getSize());\n final long total = getTotalMemory();\n return maxSize < (1D * ONE_HUNDRED_PERCENT * usedHeapSize / total);\n}\n"
|
"private static Path executeAvconv(Path input, Path output, String commandArguments, String outputArguments) throws CommandException, IOException, UnsupportedOperationException {\n String command = RodaCoreFactory.getRodaConfigurationAsString(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n command = command.replace(\"String_Node_Str\", input.toString());\n command = command.replace(\"String_Node_Str\", output.toString());\n command = command.replace(\"String_Node_Str\", commandArguments);\n command = command.replace(\"String_Node_Str\", outputArguments);\n List<String> commandList = Arrays.asList(command.split(\"String_Node_Str\"));\n return CommandUtility.execute(commandList);\n}\n"
|
"protected void createButtonsForButtonBar(Composite parent) {\n createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CLOSE_LABEL, true);\n}\n"
|
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_pull_to_zoom_list_view);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n listView = (PullToZoomListViewEx) findViewById(R.id.listview);\n String[] adapterData = new String[] { \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\" };\n listView.setAdapter(new ArrayAdapter<String>(PullToZoomListActivity.this, android.R.layout.simple_list_item_1, adapterData));\n}\n"
|
"public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext unmarshallingContext) {\n final String nodeName = reader.getNodeName();\n switch(nodeName) {\n case \"String_Node_Str\":\n while (reader.hasMoreChildren()) {\n reader.moveDown();\n final String nodeName0 = reader.getNodeName();\n if (!nodeName0.equals(\"String_Node_Str\"))\n throw new ConversionException(\"String_Node_Str\" + \"String_Node_Str\" + nodeName0);\n K k = null;\n V v = null;\n while (reader.hasMoreChildren()) {\n reader.moveDown();\n final String nodeName1 = reader.getNodeName();\n if (\"String_Node_Str\".equals(nodeName1))\n k = get(reader, unmarshallingContext, kClass);\n else if (\"String_Node_Str\".equals(nodeName1))\n v = get(reader, unmarshallingContext, vClass);\n else\n throw new ConversionException(\"String_Node_Str\");\n reader.moveUp();\n }\n if (k != null)\n VanillaChronicleMap.this.put(k, v);\n reader.moveUp();\n }\n break;\n case \"String_Node_Str\":\n if (kClass.getCanonicalName().startsWith(\"String_Node_Str\")) {\n return to$$Native(reader, vClass);\n } else {\n long keySize = keySizeMarshaller.readSize(buffer);\n ThreadLocalCopies copies = keyReaderProvider.getCopies(null);\n BytesReader<K> keyReader = keyReaderProvider.get(copies, originalKeyReader);\n return keyReader.read(buffer, keySize);\n }\n case \"String_Node_Str\":\n if (vClass.getCanonicalName().startsWith(\"String_Node_Str\")) {\n return toNative(reader, vClass);\n } else {\n long valueSize = valueSizeMarshaller.readSize(buffer);\n ThreadLocalCopies copies = valueReaderProvider.getCopies(null);\n BytesReader<V> valueReader = valueReaderProvider.get(copies, originalValueReader);\n return valueReader.read(buffer, valueSize);\n }\n }\n return null;\n}\n"
|
"public void testGetItem() throws InterruptedException, ExecutionException, TimeoutException {\n try {\n handler.getItem(2003, ItemData.CONSUME_ON_FULL).get(1, MINUTES);\n } catch (RequestException ex) {\n if (isNotServerside(ex))\n throw ex;\n }\n}\n"
|
"private void getHeadersFromFrame() {\n byte[] hbf = null;\n if (currentFrame.getFrameType() == FrameTypes.HEADERS) {\n hbf = ((FrameHeaders) currentFrame).getHeaderBlockFragment();\n } else if (currentFrame.getFrameType() == FrameTypes.CONTINUATION) {\n hbf = ((FrameContinuation) currentFrame).getHeaderBlockFragment();\n }\n if (hbf != null) {\n if (headerBlock == null) {\n headerBlock = new ArrayList<byte[]>();\n }\n }\n}\n"
|
"private void reloadAllIIDesc() throws IOException {\n ResourceStore store = getStore();\n logger.info(\"String_Node_Str\" + store.getReadableResourcePath(ResourceStore.II_DESC_RESOURCE_ROOT));\n iiDescMap.clear();\n List<String> paths = store.collectResourceRecursively(ResourceStore.II_DESC_RESOURCE_ROOT, MetadataConstances.FILE_SURFIX);\n for (String path : paths) {\n IIDesc desc;\n try {\n desc = loadIIDesc(path);\n } catch (Exception e) {\n logger.error(\"String_Node_Str\" + path, e);\n continue;\n }\n if (!path.equals(desc.getResourcePath())) {\n logger.error(\"String_Node_Str\" + path + \"String_Node_Str\" + desc + \"String_Node_Str\" + desc.getResourcePath());\n continue;\n }\n if (iiDescMap.containsKey(desc.getName())) {\n logger.error(\"String_Node_Str\" + desc.getName() + \"String_Node_Str\" + path);\n continue;\n }\n iiDescMap.putLocal(desc.getName(), desc);\n }\n logger.debug(\"String_Node_Str\" + iiDescMap.size() + \"String_Node_Str\");\n}\n"
|
"public void onMessageReceived(RemoteMessage remoteMessage) {\n super.onMessageReceived(remoteMessage);\n Map<String, String> data = remoteMessage.getData();\n String requestType = data.get(MESSAGE_TYPE);\n if (requestType == null) {\n return;\n }\n if (requestType.equals(CALL_REQUEST_TYPE)) {\n AnalyticsHelper analyticsHelper = new AnalyticsHelper(((AnalyticsApplication) getApplication()).getDefaultTracker());\n ConnectivityHelper connectivityHelper = ConnectivityHelper.get(this);\n if (!SipService.sipServiceActive && connectivityHelper.hasNetworkConnection() && connectivityHelper.hasFastData()) {\n String number = data.get(PHONE_NUMBER);\n if (number != null && (number.equalsIgnoreCase(SUPPRESSED) || number.toLowerCase().contains(\"String_Node_Str\"))) {\n number = getString(R.string.supressed_number);\n }\n startSipService(number, data.get(CALLER_ID) != null ? data.get(CALLER_ID) : \"String_Node_Str\", data.get(RESPONSE_URL) != null ? data.get(RESPONSE_URL) : \"String_Node_Str\", data.get(REQUEST_TOKEN) != null ? data.get(REQUEST_TOKEN) : \"String_Node_Str\", data.get(MESSAGE_START_TIME) != null ? data.get(MESSAGE_START_TIME) : \"String_Node_Str\");\n } else {\n String analyticsLabel = connectivityHelper.getAnalyticsLabel();\n analyticsHelper.sendEvent(getString(R.string.analytics_event_category_middleware), getString(R.string.analytics_event_action_middleware_rejected), analyticsLabel);\n replyServer(data.get(RESPONSE_URL) != null ? data.get(RESPONSE_URL) : \"String_Node_Str\", data.get(REQUEST_TOKEN) != null ? data.get(REQUEST_TOKEN) : \"String_Node_Str\", data.get(MESSAGE_START_TIME) != null ? data.get(MESSAGE_START_TIME) : \"String_Node_Str\", false);\n }\n } else if (requestType.equals(MESSAGE_REQUEST_TYPE)) {\n }\n}\n"
|
"public IPropertyValue evaluate(List<IPropertyValue> params) throws EvaluationException {\n return params.get(0);\n}\n"
|
"private void ensureDocumentSize() {\n if (document.getLength() > Constants.CHAT_BUFFER_SIZE) {\n int msgElementCount = 0;\n Element firstMsgElement = null;\n int firstMsgIndex = 0;\n Element rootElement = this.document.getDefaultRootElement();\n for (int i = 0; i < rootElement.getElementCount(); i++) {\n String idAttr = (String) rootElement.getElement(i).getAttributes().getAttribute(\"String_Node_Str\");\n if (idAttr != null && (idAttr.equals(\"String_Node_Str\") || idAttr.equals(\"String_Node_Str\") || idAttr.equals(\"String_Node_Str\"))) {\n if (firstMsgElement == null) {\n firstMsgElement = rootElement.getElement(i);\n firstMsgIndex = i;\n }\n msgElementCount++;\n }\n }\n if (firstMsgElement == null || msgElementCount < 2)\n return;\n try {\n if (firstElement != null)\n this.document.remove(firstElement.getStartOffset(), firstElement.getEndOffset() - firstElement.getStartOffset());\n String idAttr = (String) firstElement.getAttributes().getAttribute(\"String_Node_Str\");\n if (idAttr != null && idAttr.equals(\"String_Node_Str\")) {\n Element secondElement = this.document.getDefaultRootElement().getElement(0);\n this.document.remove(secondElement.getStartOffset(), secondElement.getEndOffset() - secondElement.getStartOffset());\n }\n } catch (BadLocationException e) {\n LOGGER.error(\"String_Node_Str\", e);\n }\n }\n}\n"
|
"private Set<Integer> getGreater(Object key, boolean includeKey) throws DataException {\n try {\n key = DataTypeUtil.convert(key, this.keyDataType);\n } catch (BirtException e1) {\n throw DataException.wrap(e1);\n }\n BTreeCursor bCursor = btree.createCursor();\n Set<Integer> result = new HashSet<Integer>();\n try {\n if (!bCursor.first())\n return result;\n if (bCursor.getKey() != null && ((Comparable) bCursor.getKey()).compareTo(key) > 0) {\n bCursor.beforeFirst();\n } else {\n bCursor.moveTo(key);\n int cr = ((Comparable) bCursor.getKey()).compareTo(key);\n if ((includeKey && cr == 0) || cr > 0) {\n result.addAll(bCursor.getValues());\n }\n }\n while (bCursor.next()) {\n result.addAll(bCursor.getValues());\n }\n } catch (IOException e) {\n throw new DataException(e.getLocalizedMessage(), e);\n }\n return result;\n}\n"
|
"public static void setThumbnailImageView(ImageView v, byte[] imgdata) {\n Bitmap thumbnailBm;\n if (null != imgdata && imgdata.length > 0)\n thumbnailBm = BitmapFactory.decodeByteArray(imgdata, 0, imgdata.length);\n else\n thumbnailBm = sBmIcUnknownImage;\n Drawable drawable = v.getDrawable();\n if (drawable instanceof BitmapDrawable) {\n BitmapDrawable bmd = (BitmapDrawable) drawable;\n Bitmap bitmap = bmd.getBitmap();\n bitmap.recycle();\n }\n v.setImageBitmap(thumbnailBm);\n}\n"
|
"static String addText(String text, String added, StringDirection from) {\n return from == FROM_START ? added + text : text + added;\n}\n"
|
"public void doPostExplode() {\n super.doPostExplode();\n if (!this.worldObj.isRemote) {\n if (this.canFocusBeam(this.worldObj, position) && this.thread.isComplete) {\n List<EntityLiving> livingEntities = worldObj.getEntitiesWithinAABB(EntityLiving.class, AxisAlignedBB.getBoundingBox(position.x - getRadius(), position.y - getRadius(), position.z - getRadius(), position.x + getRadius(), position.y + getRadius(), position.z + getRadius()));\n Iterator<EntityLiving> it = livingEntities.iterator();\n while (it.hasNext()) {\n EntityLiving entity = it.next();\n entity.addPotionEffect(new CustomPotionEffect(PoisonFrostBite.INSTANCE.getId(), 60 * 20, 1, null));\n entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 10 * 20, 2));\n entity.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 120 * 20, 2));\n entity.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 120 * 20, 4));\n }\n for (Vector3 targetPosition : this.thread.results) {\n double distance = Vector3.distance(targetPosition, position);\n double distanceFromCenter = position.distance(targetPosition);\n if (distanceFromCenter > this.getRadius())\n continue;\n double chance = this.getRadius() - (Math.random() * distanceFromCenter);\n if (chance > distanceFromCenter * 0.55) {\n int blockID = this.worldObj.getBlockId(targetPosition.intX(), targetPosition.intY(), targetPosition.intZ());\n if (blockID == Block.fire.blockID || blockID == Block.lavaMoving.blockID || blockID == Block.lavaStill.blockID) {\n this.worldObj.setBlock(targetPosition.intX(), targetPosition.intY(), targetPosition.intZ(), Block.snow.blockID, 0, 2);\n } else if (blockID == 0 && this.worldObj.getBlockId(targetPosition.intX(), targetPosition.intY() - 1, targetPosition.intZ()) != Block.ice.blockID && worldObj.getBlockId(targetPosition.intX(), targetPosition.intY() - 1, targetPosition.intZ()) != 0) {\n this.worldObj.setBlock(targetPosition.intX(), targetPosition.intY(), targetPosition.intZ(), Block.ice.blockID, 0, 2);\n }\n }\n }\n this.worldObj.playSoundEffect(position.x + 0.5D, position.y + 0.5D, position.z + 0.5D, Reference.PREFIX + \"String_Node_Str\", 6.0F, (1.0F + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2F) * 1F);\n }\n this.worldObj.setWorldTime(1200);\n }\n}\n"
|
"public static String getErrorMessage(final Context context, boolean suggestMediaOptimization, final MediaModel media, final MediaStore.MediaError error) {\n if (context == null || media == null || error == null) {\n return null;\n }\n switch(error.type) {\n case FS_READ_PERMISSION_DENIED:\n return context.getString(R.string.error_media_insufficient_fs_permissions);\n case NOT_FOUND:\n return context.getString(R.string.error_media_not_found);\n case AUTHORIZATION_REQUIRED:\n return context.getString(R.string.media_error_no_permission_upload);\n case REQUEST_TOO_LARGE:\n if (media.isVideo()) {\n return context.getString(R.string.media_error_http_too_large_video_upload);\n } else {\n if (isImageOptimizationEnabled) {\n return context.getString(R.string.media_error_http_too_large_photo_upload);\n } else {\n return context.getString(R.string.media_error_http_too_large_photo_upload) + \"String_Node_Str\" + context.getString(R.string.media_error_suggest_optimize_image);\n }\n }\n case SERVER_ERROR:\n return context.getString(R.string.media_error_internal_server_error);\n case TIMEOUT:\n return context.getString(R.string.media_error_timeout);\n case CONNECTION_ERROR:\n return context.getString(R.string.connection_error) + \"String_Node_Str\" + context.getString(R.string.media_error_generic_connection_error);\n case EXCEEDS_FILESIZE_LIMIT:\n return context.getString(R.string.media_error_exceeds_php_filesize);\n case EXCEEDS_MEMORY_LIMIT:\n return context.getString(R.string.media_error_exceeds_memory_limit);\n case PARSE_ERROR:\n return context.getString(R.string.error_media_parse_error);\n }\n return null;\n}\n"
|
"protected OCCChecksumMetadata getMetadata(String metadataIdentificationString, JavaType aspectName, PhysicalTypeMetadata governorPhysicalTypeMetadata, String itdFilename) {\n Path path = Path.SRC_MAIN_JAVA;\n JavaType entityType = governorPhysicalTypeMetadata.getMemberHoldingTypeDetails().getName();\n String entityMetadataKey = JpaActiveRecordMetadata.createIdentifier(entityType, LogicalPath.getInstance(path, \"String_Node_Str\"));\n JpaActiveRecordMetadata entityMetadata = (JpaActiveRecordMetadata) metadataService.get(entityMetadataKey);\n if (entityMetadata == null) {\n return null;\n }\n FieldMetadata versionField = persistenceMemberLocator.getVersionField(governorPhysicalTypeMetadata.getMemberHoldingTypeDetails().getName());\n if (versionField != null) {\n String declaredByType = entityMetadataKey.substring(entityMetadataKey.lastIndexOf('?') + 1);\n if (!versionField.getDeclaredByMetadataId().endsWith(declaredByType)) {\n throw new IllegalStateException(\"String_Node_Str\".concat(\"String_Node_Str\").concat(\"String_Node_Str\").concat(\"String_Node_Str\").concat(\"String_Node_Str\").concat(declaredByType));\n }\n }\n OCCChecksumMetadata metadata = new OCCChecksumMetadata(metadataIdentificationString, aspectName, governorPhysicalTypeMetadata, entityMetadata, memberDetailsScanner, typeManagementService, persistenceMemberLocator);\n return metadata;\n}\n"
|
"protected void showDeployStatus(IStatus status) {\n String prompt;\n if (status.getSeverity() < IStatus.ERROR) {\n prompt = Messages.bind(Messages.AbstractDeployAction_deployMessage, count);\n } else {\n prompt = Messages.bind(Messages.AbstractDeployAction_deployFailure, status.getChildren().length);\n }\n MultiStatusDialog dialog = new MultiStatusDialog(getShell(), prompt, status);\n dialog.open();\n}\n"
|
"public void rename(TestStructure testStructure, String newName) throws SystemException {\n if (testStructure instanceof TestScenario) {\n changedItems = renameScenario((TestScenario) testStructure, newName);\n } else if (testStructure instanceof TestSuite) {\n renameTestSuite((TestSuite) testStructure, newName);\n } else {\n renameTestCase(testStructure, newName);\n }\n if (eventBroker != null) {\n eventBroker.post(TestEditorCoreEventConstants.TESTSTRUCTURE_MODEL_CHANGED_UPDATE_BY_MODIFY, testStructure.getFullName());\n }\n}\n"
|
"private static double computeValue(int x, int y, int[] line, ArrayList<int[]> pixel, ArrayList<double[]> value) {\n final int leftYIdx = findLeftOfBracket(y, line);\n final int rightYIdx = (y == line[leftYIdx]) ? leftYIdx : leftYIdx + 1;\n double val = 0.0;\n checkBracket(leftYIdx, rightYIdx, line.length - 1);\n if (leftYIdx == rightYIdx) {\n if (y != line[leftYIdx]) {\n throw new OperatorException(\"String_Node_Str\" + y + \"String_Node_Str\" + leftYIdx);\n }\n } else if (y <= line[leftYIdx] || y >= line[rightYIdx]) {\n throw new OperatorException(\"String_Node_Str\" + y + \"String_Node_Str\" + leftYIdx + \"String_Node_Str\" + line[leftYIdx] + \"String_Node_Str\" + rightYIdx + \"String_Node_Str\" + line[rightYIdx]);\n }\n final double topVal = linearInterpolateAlongLine(x, leftYIdx, pixel, value);\n final double bottomVal = linearInterpolateAlongLine(x, rightYIdx, pixel, value);\n val = linearInterpolate(line[leftYIdx], line[rightYIdx], y, topVal, bottomVal);\n return val;\n}\n"
|
"private void startAsync(String procName, List<Variable> waitVars, List<Variable> usedVariables, List<Variable> containersToRegister, boolean shareWork) {\n List<String> args = new ArrayList<String>();\n args.add(Turbine.LOCAL_STACK_NAME);\n for (Variable v : toPassIn) {\n args.add(prefixVar(v.getName()));\n }\n Sequence constructProc = new Sequence();\n String uniqueName = uniqueTCLFunctionName(procName);\n Proc proc = new Proc(uniqueName, usedTclFunctionNames, args, constructProc);\n tree.add(proc);\n List<Value> inputs = new ArrayList<Value>();\n for (Variable w : waitVars) {\n inputs.add(varToExpr(w));\n }\n for (Variable c : containersToRegister) {\n pointStack.peek().add(Turbine.containerSlotCreate(varToExpr(c)));\n }\n TclList action = buildAction(uniqueName, usedVariables);\n pointStack.peek().add(Turbine.rule(uniqueName, inputs, action, shareWork));\n pointStack.push(constructProc);\n}\n"
|
"private void processImageOuter(ImageBase image) {\n long startTime = System.currentTimeMillis();\n processImage(image);\n if (!visualizeOnlyMostRecent || startTime > timeOfLastUpdated) {\n timeOfLastUpdated = startTime;\n if (showBitmap) {\n synchronized (bitmapLock) {\n ConvertBitmap.boofToBitmap(image, bitmap, bitmapTmp);\n }\n }\n runOnUiThread(() -> displayView.invalidate());\n }\n synchronized (imageLock) {\n if (imageType.isSameType(image.getImageType()))\n stackImages.add(image);\n }\n}\n"
|
"public boolean equals(Object obj) {\n if (this == obj)\n return true;\n if (obj == null)\n return false;\n if (getClass() != obj.getClass())\n return false;\n ResponseItem other = (ResponseItem) obj;\n if (content == null) {\n if (other.content != null)\n return false;\n } else if (!content.equals(other.content))\n return false;\n if (items == null) {\n if (other.items != null)\n return false;\n } else if (!items.equals(other.items))\n return false;\n if (name == null) {\n if (other.name != null)\n return false;\n } else if (!name.equals(other.name))\n return false;\n if (tagAttributes == null) {\n if (other.tagAttributes != null)\n return false;\n } else if (!tagParameters.equals(other.tagParameters))\n return false;\n return true;\n}\n"
|
"protected void onPause() {\n super.onPause();\n Contact.stopPresenceObserver();\n removeRecipientsListeners();\n}\n"
|
"private OModuleMetadata getModule(Element mainElement) {\n OModuleMetadata module = new OModuleMetadata();\n List<Element> elements = mainElement.elements();\n for (Element element : elements) {\n switch(element.getName()) {\n case ID:\n module.setId(Integer.valueOf(element.getText()));\n break;\n case INITIALIZER:\n module.setInitializerName(element.getText());\n break;\n case LOAD:\n module.setLoad(Boolean.valueOf(element.getText()));\n break;\n case MAVEN:\n Artifact mainDependency = getMavenDependency(element.element(MAIN_DEPENDENCY));\n List<Artifact> dependencies = getDependencies(element.element(DEPENDENCIES));\n module.setMainArtifact(mainDependency).setDependencies(dependencies);\n break;\n }\n }\n return module;\n}\n"
|
"protected void accessHeader(ListingDesign list, IContentEmitter emitter) {\n ITableContent tableContent = (ITableContent) context.getContent();\n TableBandDesign bandDesign = ((TableItemDesign) list).getHeader();\n if (bandDesign != null) {\n ITableBandContent header = report.createTableHeader();\n context.pushContent(header);\n initializeContent(tableContent, bandDesign, header);\n if (emitter != null) {\n emitter.startTableHeader(header);\n }\n accessTableBand(bandDesign, emitter, false);\n if (emitter != null) {\n emitter.endTableHeader(header);\n }\n context.popContent();\n }\n ITableBandContent body = report.createTableBody();\n initializeContent(tableContent, null, body);\n context.pushContent(body);\n if (emitter != null) {\n emitter.startTableBody(body);\n }\n}\n"
|
"public void testEven4ParityOnePointCrossover() {\n final int LOWER_SUCCESS = 50;\n final int UPPER_SUCCESS = 50;\n Evolver evolver = getEvolver();\n final EvenParity model = new EvenParity(evolver, 4);\n setupModel(model);\n model.setCrossover(new OnePointCrossover(evolver));\n final int noSuccess = getNoSuccesses(model, false, false);\n assertBetween(\"String_Node_Str\", LOWER_SUCCESS, UPPER_SUCCESS, noSuccess);\n}\n"
|
"public void writeTag(Tag tag, String openhabUri) {\n Log.i(TAG, \"String_Node_Str\");\n NdefRecord[] ndefRecords;\n ndefRecords = new NdefRecord[1];\n ndefRecords[0] = NdefRecord.createUri(openhabUri);\n NdefMessage message = new NdefMessage(ndefRecords);\n NdefFormatable ndefFormatable = NdefFormatable.get(tag);\n if (ndefFormatable != null) {\n Log.i(TAG, \"String_Node_Str\");\n try {\n NdefRecord[] ndefRecords;\n ndefRecords = new NdefRecord[1];\n ndefRecords[0] = NdefRecord.createUri(openhabUri);\n NdefMessage message = new NdefMessage(ndefRecords);\n Log.i(TAG, \"String_Node_Str\");\n ndef.connect();\n Log.i(TAG, \"String_Node_Str\");\n if (ndef.isWritable()) {\n ndef.writeNdefMessage(message);\n }\n Log.i(TAG, \"String_Node_Str\");\n ndef.close();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (FormatException e) {\n e.printStackTrace();\n }\n }\n}\n"
|
"public double doTask() {\n double sum = op.zeroDouble();\n if (x.allocationMode() == DataBuffer.AllocationMode.HEAP) {\n if (x.dataType() == DataBuffer.Type.FLOAT) {\n float[] xf = (float[]) x.array();\n if (incrX == 1) {\n for (int i = 0; i < n; i++) {\n sum += xf[offsetX + i];\n }\n } else {\n for (int i = 0; i < n; i++) {\n sum += xf[offsetX + i * incrX];\n }\n }\n } else {\n double[] xd = (double[]) x.array();\n if (incrX == 1) {\n for (int i = 0; i < n; i++) {\n sum += xd[offsetX + i];\n }\n } else {\n for (int i = 0; i < n; i++) {\n sum += xd[offsetX + i * incrX];\n }\n }\n }\n } else {\n ByteBuf nbbx = x.asNetty();\n if (x.dataType() == DataBuffer.Type.FLOAT) {\n int byteOffsetX = 4 * offsetX;\n if (incrX == 1) {\n for (int i = 0; i < 4 * n; i += 4) {\n sum += nbbx.getFloat(byteOffsetX + i);\n }\n } else {\n for (int i = 0; i < n; i += 4) {\n sum += nbbx.getFloat(byteOffsetX + i * incrX);\n }\n }\n } else {\n int byteOffsetX = 8 * offsetX;\n if (incrX == 1) {\n for (int i = 0; i < n; i += 8) {\n sum += nbbx.getDouble(byteOffsetX + i);\n }\n } else {\n for (int i = 0; i < n; i += 8) {\n sum += nbbx.getDouble(byteOffsetX + i * incrX);\n }\n }\n }\n }\n return (outerTask ? op.getAndSetFinalResult(sum) : sum);\n}\n"
|
"private synchronized void computeTerrainClusterCenters(final PolBandUtils.PolSourceBand srcBandList, final PolarimetricClassificationOp op) {\n if (clusterCentersComputed) {\n return;\n }\n category = new Categories[srcHeight][srcWidth];\n cluster = new int[srcHeight][srcWidth];\n final double[][] fdd = new double[srcHeight][srcWidth];\n final java.util.List<ClusterInfo> pvCenterList = new ArrayList<>(numInitialClusters);\n final java.util.List<ClusterInfo> pdCenterList = new ArrayList<>(numInitialClusters);\n final java.util.List<ClusterInfo> psCenterList = new ArrayList<>(numInitialClusters);\n maxClusterSize = 2 * srcHeight * srcWidth / numFinalClasses;\n final Dimension tileSize = new Dimension(256, 256);\n final Rectangle[] tileRectangles = OperatorUtils.getAllTileRectangles(op.getSourceProduct(), tileSize, 0);\n computeInitialTerrainClusterCenters(fdd, pvCenterList, pdCenterList, psCenterList, srcBandList, tileRectangles, op);\n computeFinalTerrainClusterCenters(fdd, pvCenterList, pdCenterList, psCenterList, srcBandList, tileRectangles, op);\n clusterCentersComputed = true;\n}\n"
|
"public Request withMethodPut() {\n return appendTemporaryMethodPlaceholderStoreMethod(HttpMethod.PUT.name());\n}\n"
|
"public static void createPopulationEPL(File path, PrgPopulation pop) {\n CreateEPLPopulationDialog dialog = new CreateEPLPopulationDialog();\n if (pop != null) {\n dialog.getPopulationSize().setValue(pop.size());\n for (String varName : pop.getContext().getDefinedVariables()) {\n dialog.getInputVariables().getModel().addElement(varName);\n }\n } else {\n dialog.getInputVariables().getModel().addElement(\"String_Node_Str\");\n dialog.getPopulationSize().setValue(1000);\n }\n if (dialog.process()) {\n int populationSize = dialog.getPopulationSize().getValue();\n int maxDepth = dialog.getMaxDepth().getValue();\n CalculateScore score = null;\n if (dialog.getTrainingSet() != null) {\n score = new TrainingSetScore(dialog.getTrainingSet());\n }\n EncogProgramContext context = new EncogProgramContext();\n for (int i = 0; i < dialog.getInputVariables().getModel().getSize(); i++) {\n String str = (String) dialog.getInputVariables().getModel().get(i);\n context.defineVariable(str);\n }\n StandardExtensions.createNumericOperators(context.getFunctions());\n if (pop == null) {\n pop = new PrgPopulation(context, populationSize);\n }\n (new PrgGrowGenerator(pop.getContext(), maxDepth)).generate(new Random(), pop, new ZeroEvalScoreFunction());\n if (path != null) {\n EncogWorkBench.getInstance().save(path, pop);\n EncogWorkBench.getInstance().refresh();\n }\n }\n}\n"
|
"public RayPixel castRay(SpaceVector cameraAt, SpaceVector cameraDir) {\n float closest_t = Float.POSITIVE_INFINITY;\n RayPixel hit = new RayPixel();\n float t;\n boolean inside;\n for (int i = 0; i < universe.rows; i++) {\n for (int j = 0; j < universe.cols; j++) {\n System.out.println(j);\n t = intersection_t(cameraAt, cameraDir, tiles[i][j]);\n System.out.println(t + \"String_Node_Str\" + i + \"String_Node_Str\" + j);\n if (t < 0)\n break;\n else if (t > closest_t)\n break;\n inside = inTile(cameraAt.plus(cameraDir.scale(t)), tiles[i][j]);\n if (!inside)\n break;\n else {\n closest_t = t;\n hit = new RayPixel(i, j);\n }\n }\n }\n return hit;\n}\n"
|
"public TerrariumDataProvider buildDataProvider() {\n int heightOrigin = this.properties.getInteger(HEIGHT_ORIGIN);\n SrtmHeightSource heightSource = new SrtmHeightSource(this.srtmRaster, \"String_Node_Str\");\n DataLayer<ShortRasterTile> heightSampler = new ShortTileSampleLayer(heightSource);\n DataLayer<ShortRasterTile> heightProducer = this.createHeightProducer(heightSampler);\n DataLayer<CoverRasterTile> coverProducer = this.createCoverProducer();\n DataLayer<OsmTile> osmProducer = this.createOsmProducer();\n DataLayer<ShortRasterTile> waterBankLayer = new WaterBankPopulatorLayer(coverProducer, heightProducer);\n waterBankLayer = new OsmCoastlineLayer(waterBankLayer, osmProducer, this.earthCoordinates);\n waterBankLayer = new OsmWaterBodyLayer(waterBankLayer, osmProducer, this.earthCoordinates);\n DataLayer<WaterRasterTile> waterProducer = new WaterProcessorLayer(waterBankLayer);\n return TerrariumDataProvider.builder().withComponent(RegionComponentType.HEIGHT, heightProducer).withComponent(RegionComponentType.SLOPE, this.createSlopeProducer(heightSampler)).withComponent(RegionComponentType.COVER, coverProducer).withComponent(EarthComponentTypes.OSM, osmProducer).withComponent(EarthComponentTypes.WATER, waterProducer).withAdapter(new WaterApplyAdapter(this.earthCoordinates, EarthComponentTypes.WATER, RegionComponentType.HEIGHT, RegionComponentType.COVER)).withAdapter(new OsmAreaCoverAdapter(this.earthCoordinates, EarthComponentTypes.OSM, RegionComponentType.COVER)).withAdapter(new HeightNoiseAdapter(this.world, RegionComponentType.HEIGHT, 2, 0.08, this.properties.getDouble(NOISE_SCALE))).withAdapter(new HeightTransformAdapter(this.world, RegionComponentType.HEIGHT, this.properties.getDouble(HEIGHT_SCALE) * this.worldScale, heightOrigin)).withAdapter(new WaterLevelingAdapter(EarthComponentTypes.WATER, RegionComponentType.HEIGHT, heightOrigin + 1)).withAdapter(new WaterCarveAdapter(EarthComponentTypes.WATER, RegionComponentType.HEIGHT, this.properties.getInteger(OCEAN_DEPTH))).withAdapter(new BeachAdapter(this.world, RegionComponentType.COVER, EarthComponentTypes.WATER, this.properties.getInteger(BEACH_SIZE), EarthCoverTypes.BEACH)).build();\n}\n"
|
"public boolean isWriteLocked() {\n return (lockImpl.isWriteLocked.get() != LockImpl.NONE);\n}\n"
|
"public void restore() {\n Preferences prefs = Preferences.userNodeForPackage(LoggerTableModel.class);\n prefs = prefs.node(\"String_Node_Str\");\n try {\n for (String loggerName : prefs.keys()) {\n Level level = Level.parse(prefs.get(loggerName, \"String_Node_Str\"));\n Logger createLogger = Logger.getLogger(loggerName);\n createLogger.setLevel(level);\n createdLoggers.add(createLogger);\n }\n } catch (BackingStoreException ex) {\n logger.log(Level.WARNING, \"String_Node_Str\", ex);\n }\n}\n"
|
"public DifferentialFunction<X> inversei() {\n throw new UnsupportedOperationException();\n}\n"
|
"public void run(final CommandSender cs, String label, String[] args) {\n if (!r.isPlayer(cs)) {\n return;\n }\n if (!r.perm(cs, \"String_Node_Str\", false, true)) {\n return;\n }\n if (!r.checkArgs(args, 0)) {\n r.sendMes(cs, \"String_Node_Str\");\n return;\n }\n if (!r.isFloat(args[0])) {\n if (r.checkArgs(args, 1) && r.isFloat(args[1])) {\n run(cs, label, new String[] { args[1], args[0] });\n return;\n }\n r.sendMes(cs, \"String_Node_Str\");\n return;\n }\n Player p = (Player) cs;\n Float d = Float.parseFloat(args[0]);\n if (d > 10 || d < 0) {\n r.sendMes(cs, \"String_Node_Str\");\n return;\n }\n if (r.checkArgs(args, 1) == false) {\n p.setFlySpeed(getSpeed(d, true));\n p.setWalkSpeed(getSpeed(d, false));\n r.sendMes(cs, \"String_Node_Str\", \"String_Node_Str\", args[0]);\n } else {\n Player t = r.searchPlayer(args[1]);\n if (t == null) {\n r.sendMes(cs, \"String_Node_Str\", \"String_Node_Str\", args[1]);\n return;\n }\n if (!r.perm(cs, \"String_Node_Str\", false, true)) {\n return;\n }\n t.setFlySpeed(getSpeed(d, true));\n t.setWalkSpeed(getSpeed(d, false));\n r.sendMes(cs, \"String_Node_Str\", \"String_Node_Str\", t.getName(), \"String_Node_Str\", args[0]);\n r.sendMes(cs, \"String_Node_Str\", \"String_Node_Str\", args[0]);\n }\n}\n"
|
"public void run() {\n List<KeyValue> list;\n lock.lock();\n try {\n list = recordsInMemory;\n recordsInMemory = new ArrayList<>();\n } finally {\n lock.unlock();\n }\n if (numOfBytesInMemory > maxBytesToKeepInMemory || recordsInMemory.size() > maxRecordsInMemory) {\n Collections.sort(list);\n int totalSize = FileLoader.saveKeyValues(list, bytesLength, numOfBytesInMemory, getSaveFileName(noOfFileWritten), keyType, kryoSerializer);\n filePartBytes.add(totalSize);\n recordsInMemory.clear();\n bytesLength.clear();\n noOfFileWritten++;\n numOfBytesInMemory = 0;\n }\n}\n"
|
"private List<Map<Integer, RegexpMatchingIndicator>> organizeTableInput() {\n List<Map<Integer, RegexpMatchingIndicator>> returnList = new ArrayList<Map<Integer, RegexpMatchingIndicator>>();\n AllMatchIndicatorImpl allMatchIndicator = this.selectPatternsWizard.getAllMatchIndicator();\n if (allMatchIndicator == null) {\n return returnList;\n }\n List<MetadataColumn> analysisColumns = this.selectPatternsWizard.getAllMatchIndicator().getAnalyzedColumns();\n List<RegexpMatchingIndicator> regexpMatchingIndicatorList = this.selectPatternsWizard.getAllMatchIndicator().getCompositeRegexMatchingIndicators();\n for (RegexpMatchingIndicator regexIndicator : regexpMatchingIndicatorList) {\n int index = analysisColumns.indexOf(regexIndicator.getAnalyzedElement());\n Map<Integer, RegexpMatchingIndicator> returnMap = getMapLocation(returnList, index);\n returnMap.put(index, regexIndicator);\n if (returnMap.size() == 1) {\n returnList.add(returnMap);\n }\n }\n return returnList;\n}\n"
|
"private static Link matchSpan(final List<Link> linkList, final SpanBo span) {\n if (CollectionUtils.isEmpty(linkList)) {\n return null;\n }\n linkList.sort(new Comparator<Link>() {\n public int compare(Link first, Link second) {\n return (int) (first.startTimeMillis - second.startTimeMillis);\n }\n });\n for (Link link : linkList) {\n if (link.startTimeMillis <= span.getStartTime()) {\n return link;\n }\n }\n return null;\n}\n"
|
"public void processArtifact(Model model, Artifact artifact, ArtifactReporter reporter, ArtifactRepository repository) throws ReportProcessorException {\n if (!\"String_Node_Str\".equals(repository.getProtocol())) {\n throw new UnsupportedOperationException(\"String_Node_Str\" + repository.getUrl() + \"String_Node_Str\");\n }\n modelArtifactLocation = repositoryUrl + model.getGroupId() + \"String_Node_Str\" + model.getArtifactId() + \"String_Node_Str\" + model.getVersion() + \"String_Node_Str\" + model.getArtifactId() + \"String_Node_Str\" + model.getVersion() + \"String_Node_Str\" + model.getPackaging();\n fsPomLocation = validateArtifactLocation(modelArtifactLocation);\n String artifactLocation = repositoryUrl + artifact.getGroupId() + \"String_Node_Str\" + artifact.getArtifactId() + \"String_Node_Str\" + artifact.getVersion() + \"String_Node_Str\" + artifact.getArtifactId() + \"String_Node_Str\" + artifact.getVersion() + \"String_Node_Str\" + artifact.getType();\n Model extractedModel = readArtifactModel(artifactLocation, artifact.getGroupId(), artifact.getArtifactId());\n if (extractedModel != null) {\n String pkgPomArtifactLocation = repositoryUrl + extractedModel.getGroupId() + \"String_Node_Str\" + extractedModel.getArtifactId() + \"String_Node_Str\" + extractedModel.getVersion() + \"String_Node_Str\" + extractedModel.getArtifactId() + \"String_Node_Str\" + extractedModel.getVersion() + \"String_Node_Str\" + extractedModel.getPackaging();\n pkgPomLocation = validateArtifactLocation(pkgPomArtifactLocation);\n if (fsPomLocation == true && pkgPomLocation == true) {\n reporter.addSuccess(artifact);\n } else if (fsPomLocation == false && pkgPomLocation == true) {\n reporter.addFailure(artifact, \"String_Node_Str\");\n } else if (fsPomLocation == true && pkgPomLocation == false) {\n reporter.addFailure(artifact, \"String_Node_Str\");\n } else if (fsPomLocation == false && pkgPomLocation == false) {\n reporter.addFailure(artifact, \"String_Node_Str\");\n }\n } else {\n if (fsPomLocation) {\n reporter.addSuccess(artifact);\n } else {\n reporter.addFailure(artifact, \"String_Node_Str\");\n }\n }\n}\n"
|
"private void initializeResultClass(DataEngineImpl dataEngine, Map appContext) throws DataException {\n try {\n IQueryResults left = getResultSetQuery(dataEngine, dataSet.getLeftDataSetDesignName(), appContext, dataSet.getJoinConditions(), true);\n IQueryResults right = getResultSetQuery(dataEngine, dataSet.getRightDataSetDesignName(), appContext, dataSet.getJoinConditions(), false);\n IResultMetaData rightMetaData = right.getResultMetaData();\n JointResultMetadata meta = getJointResultMetadata(leftMetaData, rightMetaData);\n resultClass = meta.getResultClass();\n } catch (BirtException be) {\n throw DataException.wrap(be);\n }\n}\n"
|
"private void playPrevious() {\n mVpPlayView.setCurrentItem(mVpPlayView.getCurrentItem() - 1, true);\n refreshFavoriteIcon();\n}\n"
|
"public void initData() {\n if (set == null)\n set = dataDomain.getSet();\n super.initData();\n bRenderOnlyContext = (glRemoteRenderingView != null && glRemoteRenderingView.getViewType().equals(\"String_Node_Str\"));\n initLists();\n}\n"
|
"protected void finishProcess() {\n if (processManagerStack.size() > 0) {\n ProcessManager pm = processManagerStack.pop();\n setContent(pm);\n pm.reloadTask();\n pm.setWindow(this);\n setCaption(pm.getLabel());\n processManager = pm;\n } else {\n if (processManager != null && processManager.getTaskManager() != null && StringUtils.isNotBlank(processManager.getTaskManager().getConfirmationMessage()))\n this.getParent().showNotification(processManager.getTaskManager().getConfirmationMessage());\n else\n this.getParent().showNotification(\"String_Node_Str\");\n this.close();\n }\n}\n"
|
"public void testREADLock() {\n if (isOnServer()) {\n return;\n }\n EntityManager em = createEntityManager(\"String_Node_Str\");\n beginTransaction(em);\n Employee employee = null;\n try {\n employee = new Employee();\n employee.setFirstName(\"String_Node_Str\");\n employee.setLastName(\"String_Node_Str\");\n em.persist(employee);\n commitTransaction(em);\n } catch (RuntimeException ex) {\n if (isTransactionActive(em)) {\n rollbackTransaction(em);\n }\n closeEntityManager(em);\n throw ex;\n }\n EntityManager em2 = createEntityManager(\"String_Node_Str\");\n Exception optimisticLockException = null;\n beginTransaction(em);\n try {\n employee = em.find(Employee.class, employee.getId());\n em.lock(employee, LockModeType.READ);\n em2.getTransaction().begin();\n try {\n Employee employee2 = em2.find(Employee.class, employee.getId());\n employee2.setFirstName(\"String_Node_Str\");\n em2.getTransaction().commit();\n em2.close();\n } catch (RuntimeException ex) {\n em2.getTransaction().rollback();\n em2.close();\n throw ex;\n }\n try {\n em.flush();\n } catch (PersistenceException exception) {\n if (exception.getCause() instanceof OptimisticLockException) {\n optimisticLockException = exception;\n } else {\n throw exception;\n }\n }\n rollbackTransaction(em);\n } catch (RuntimeException ex) {\n if (isTransactionActive(em)) {\n rollbackTransaction(em);\n }\n closeEntityManager(em);\n throw ex;\n }\n beginTransaction(em);\n try {\n employee = em.find(Employee.class, employee.getId());\n em.remove(employee);\n commitTransaction(em);\n } catch (RuntimeException ex) {\n if (isTransactionActive(em)) {\n rollbackTransaction(em);\n }\n closeEntityManager(em);\n throw ex;\n }\n if (optimisticLockException == null) {\n fail(\"String_Node_Str\");\n }\n}\n"
|
"public void getPruneInfo(HttpRequest request, HttpResponder responder, String regionName) {\n if (!initializePruningDebug(responder)) {\n return;\n }\n try {\n Method method = debugClazz.getMethod(\"String_Node_Str\", String.class);\n method.setAccessible(true);\n Object response = method.invoke(debugObject, regionName);\n if (response == null) {\n responder.sendString(HttpResponseStatus.NOT_FOUND, \"String_Node_Str\");\n return;\n }\n RegionPruneInfo pruneInfo = (RegionPruneInfo) response;\n responder.sendJson(HttpResponseStatus.OK, pruneInfo);\n } catch (Exception e) {\n responder.sendString(HttpResponseStatus.BAD_REQUEST, e.getMessage());\n LOG.debug(\"String_Node_Str\", e);\n }\n}\n"
|
"public int getWeaponPowerPoints() {\n int points = 1;\n for (InvItem item : inventory.getItems()) {\n ItemWieldableDef def = ItemAttributes.getWieldable(item.id);\n if (item.wielded && def != null) {\n points += def.getWeaponPowerPoints();\n }\n }\n points -= 1;\n return points < 1 ? 1 : points;\n}\n"
|
"private void writeValue(Object value, SerializeOpts serializeOpts) throws CoreException, IOException {\n if (value instanceof XValue) {\n XValue xv = (XValue) value;\n IXdmValueOutputStream dest = getStdout().asXdmValueOutputStream(serializeOpts);\n dest.write(xv.asXdmValue());\n } else {\n String svalue = value.toString();\n getStdout().asPrintStream(serializeOpts).print(svalue);\n }\n}\n"
|
"private Control addTextField(Composite composite, String label, String key, int textLimit, int indentation, boolean isNumber) {\n Label labelControl = new Label(composite, SWT.NONE);\n labelControl.setText(label);\n GridData gd = new GridData(32);\n gd.horizontalIndent = indentation;\n labelControl.setLayoutData(gd);\n Text textControl = new Text(composite, 2052);\n gd = new GridData(32);\n gd.widthHint = convertWidthInCharsToPixels(textLimit + 1);\n textControl.setLayoutData(gd);\n textControl.setTextLimit(textLimit);\n fTextFields.put(textControl, key);\n if (isNumber) {\n fNumberFields.add(textControl);\n textControl.addModifyListener(fNumberFieldListener);\n } else {\n textControl.addModifyListener(fTextFieldListener);\n }\n return textControl;\n}\n"
|
"public int initFromPage(long valueCount, byte[] page, int offset) throws IOException {\n if (DEBUG)\n LOG.debug(\"String_Node_Str\" + offset + \"String_Node_Str\" + (page.length - offset));\n this.in = new ByteArrayInputStream(page, offset, page.length - offset);\n int bitWidth = BytesUtils.readIntLittleEndianOnOneByte(in);\n if (DEBUG)\n LOG.debug(\"String_Node_Str\" + bitWidth);\n decoder = new RunLengthBitPackingHybridDecoder((int) valueCount, bitWidth, in);\n return page.length;\n}\n"
|
"public void renderTarget(Object layout, double length3D, GrayF32 image, List<Point2D_F64> points2D) {\n ConfigCircleHexagonalGrid config = (ConfigCircleHexagonalGrid) layout;\n double radiusPixels = 20;\n double centerDistancePixels = 2 * radiusPixels * config.centerDistance / config.circleDiameter;\n double borderPixels = 30;\n double spaceX = centerDistancePixels / 2.0;\n double spaceY = centerDistancePixels * Math.sin(UtilAngle.radian(60));\n int imageWidth = (int) (borderPixels * 2 + (config.numCols - 1) * spaceX + 2 * radiusPixels + 0.5);\n int imageHeight = (int) (borderPixels * 2 + (config.numRows - 1) * spaceY + 2 * radiusPixels + 0.5);\n double centerDistanceWorld = length3D * centerDistancePixels / (double) imageWidth;\n image.reshape(imageWidth, imageHeight);\n BufferedImage buffered = new BufferedImage(image.width, image.height, BufferedImage.TYPE_INT_BGR);\n Graphics2D g2 = buffered.createGraphics();\n g2.setColor(Color.WHITE);\n g2.fillRect(0, 0, buffered.getWidth(), buffered.getHeight());\n g2.setColor(Color.BLACK);\n g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n Ellipse2D.Double ellipse = new Ellipse2D.Double();\n for (int row = 0; row < config.numRows; row++) {\n double y = borderPixels + radiusPixels;\n y += (config.numRows - 1 - row) * spaceY;\n for (int col = 0; col < config.numCols; col++) {\n double x = borderPixels + radiusPixels + col * spaceX;\n if (row % 2 == 1 && col % 2 == 0)\n continue;\n if (row % 2 == 0 && col % 2 == 1)\n continue;\n ellipse.setFrame(x - radiusPixels, y - radiusPixels, 2 * radiusPixels, 2 * radiusPixels);\n g2.fill(ellipse);\n }\n }\n ConvertBufferedImage.convertFrom(buffered, image);\n points2D.clear();\n points2D.addAll(createLayout(config.numRows, config.numCols, centerDistanceWorld));\n}\n"
|
"public void relayout() {\n isLayoutDirty = true;\n}\n"
|
"public Time fireAt(Actor actor, Time time, int index) throws IllegalActionException {\n if (actor == this.getContainer()) {\n fireContainerAt(time);\n return time;\n }\n int newIndex = index;\n if (_currentLogicalTime != null) {\n if (_currentLogicalTime.compareTo(time) == 0 && index <= getIndex()) {\n if (!(actor instanceof CompositeActor) || ((CompositeActor) actor).getDirector().scheduleContainedActors()) {\n newIndex = Math.max(getIndex(), index) + 1;\n }\n }\n }\n if (_isInitializing) {\n _currentSourceTimestamp = time;\n }\n int depth = 1;\n if (!(actor instanceof ResourceScheduler)) {\n depth = _getDepthOfActor(actor);\n }\n _pureEvents.put(new PtidesEvent(actor, null, time, newIndex, depth, _zeroTime, _currentSourceTimestamp));\n _currentSourceTimestamp = null;\n Time environmentTime = super.getEnvironmentTime();\n if (environmentTime.compareTo(time) <= 0) {\n fireContainerAt(time, newIndex);\n }\n return time;\n}\n"
|
"public void shutdown() {\n if (!isInitialized) {\n return;\n }\n if (logger.isTraceEnabled())\n logger.trace(\"String_Node_Str\" + this.accountID.getUserID());\n closeConnection();\n if (isRegistered()) {\n try {\n unregister();\n } catch (OperationFailedException ex) {\n logger.error(\"String_Node_Str\" + getAccountID(), ex);\n }\n }\n isInitialized = false;\n}\n"
|
"public void muffleSounds(PlaySoundEvent event) {\n if (event.getName().contains(\"String_Node_Str\")) {\n float x = event.getSound().getXPosF();\n float y = event.getSound().getYPosF();\n float z = event.getSound().getZPosF();\n List<EntityLivingBase> entities = Minecraft.getMinecraft().player.world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(x - 0.5F, y - 0.5F, z - 0.5F, x + 0.5F, y + 0.5F, z + 0.5F));\n for (EntityLivingBase entity : entities) {\n if (isInstalled(entity)) {\n event.setResultSound(null);\n }\n }\n }\n}\n"
|
"public static String indexToAlpha(int index) {\n String reply = \"String_Node_Str\";\n if (index < 26) {\n char first = (char) (index + 65);\n reply = first + \"String_Node_Str\";\n } else {\n char last = (char) (index - ((index / 26) * 26) + 65);\n String rest = indexToAlpha((index / 26));\n reply = rest + last;\n }\n if (index != alphaToIndex(reply)) {\n System.out.println(\"String_Node_Str\" + index);\n System.out.println(\"String_Node_Str\" + reply);\n System.out.println(\"String_Node_Str\" + alphaToIndex(reply));\n int error = 1 / 0;\n }\n return reply;\n}\n"
|
"public void addPort(String name, String value) throws IllegalActionException, NameDuplicationException {\n _portHash.put(name, value);\n ConfigurableAttribute port = new ConfigurableAttribute(this, \"String_Node_Str\" + name);\n port.configure(null, null, value);\n}\n"
|
"private void onLoad() {\n immutableTags = ImmutableList.copyOf(tags != null ? tags.stream().map(t -> new InstanceTag() {\n private String key = t.getKey();\n private String value = t.getValue();\n public String getKey() {\n return this.key;\n }\n public void setKey(String key) {\n this.key = key;\n }\n public String getValue() {\n return this.value;\n }\n public void setValue(String value) {\n this.value = value;\n }\n }).collect(Collectors.<InstanceTag>toList()) : Lists.<InstanceTag>newArrayList());\n}\n"
|
"public SubHyperplane<Euclidean2D> apply(final SubHyperplane<Euclidean2D> sub, final Hyperplane<Euclidean3D> original, final Hyperplane<Euclidean3D> transformed) {\n if (original != cachedOriginal) {\n final Plane oPlane = (Plane) original;\n final Plane tPlane = (Plane) transformed;\n final Vector2D shift = tPlane.toSubSpace((Point<Euclidean3D>) apply(oPlane.getOrigin()));\n final AffineTransform at = AffineTransform.getTranslateInstance(shift.getX(), shift.getY());\n cachedOriginal = (Plane) original;\n cachedTransform = org.apache.commons.math3.geometry.euclidean.twod.Line.getTransform(at);\n }\n return ((SubLine) sub).applyTransform(cachedTransform);\n}\n"
|
"public long getCacheTime() {\n return Cache.EXPIRED;\n}\n"
|
"public void flush() throws IOException {\n throw new IOException(Messages.getString(ResourceConstants.READ_ONLY_ARCHIVE));\n}\n"
|
"public static VM_Address unwindNativeStackFrame(VM_Address currfp) throws VM_PragmaUninterruptible {\n VM_Address ip, callee_fp;\n VM_Address fp = VM_Magic.getCallerFramePointer(currfp);\n do {\n callee_fp = fp;\n ip = VM_Magic.getReturnAddress(fp);\n fp = VM_Magic.getCallerFramePointer(fp);\n } while (!MM_Interface.refInVM(ip) && fp.NE(STACKFRAME_SENTINEL_FP));\n if (VM.BuildForPowerPC) {\n if (VM.BuildForSVR4ABI) {\n if (MM_Interface.refInVM(ip)) {\n return fp;\n } else {\n return callee_fp;\n }\n } else {\n return callee_fp;\n }\n } else {\n return callee_fp;\n }\n}\n"
|
"private void extractData(Path p, Path outRoot, int resultLimit, int maxAmbigiousWordCount) throws IOException {\n List<Path> files = Files.walk(p, 1).filter(s -> s.toFile().isFile()).collect(Collectors.toList());\n BatchResult result = new BatchResult();\n int i = 0;\n for (Path file : files) {\n Log.info(\"String_Node_Str\", file);\n LinkedHashSet<String> sentences = getSentences(p);\n collect(result, sentences, maxAmbigiousWordCount, resultLimit);\n i++;\n Log.info(\"String_Node_Str\", i, files.size());\n if (resultLimit > 0 && result.results.size() > resultLimit) {\n break;\n }\n }\n String s = p.toFile().getName();\n Log.info(\"String_Node_Str\");\n Path out = outRoot.resolve(s + \"String_Node_Str\");\n Path amb = outRoot.resolve(s + \"String_Node_Str\");\n try (PrintWriter pwu = new PrintWriter(out.toFile(), \"String_Node_Str\");\n PrintWriter pwa = new PrintWriter(amb.toFile(), \"String_Node_Str\")) {\n for (ResultSentence sentence : result.results) {\n pwu.println(\"String_Node_Str\" + sentence.sentence);\n pwa.println(\"String_Node_Str\" + sentence.sentence);\n for (AmbiguityAnalysis analysis : sentence.results) {\n List<String> forTrain = analysis.getForTrainingOutput();\n forTrain.forEach(pwu::println);\n pwa.println(analysis.token);\n for (AnalysisDecision r : analysis.choices) {\n pwa.println(r.analysis.formatLong());\n }\n }\n pwu.println();\n pwa.println();\n }\n }\n}\n"
|
"public void onActionDown(MotionEvent event) {\n super.onActionDown(event);\n final int x = (int) event.getX();\n final int y = (int) event.getY();\n if (mTweetFlow.elementAt(mEditorView.scaledX(x), mEditorView.scaledY(y))) {\n mTweetFlow.setTouchElementModeMarked();\n mEditorView.setState(EDITOR_STATE.TOUCH_ELEMENT);\n mEditorView.redraw();\n } else if (rasterGridHelper.getRasterOn() && rasterGridHelper.getSnapMode() == SnapMode.GRID && rasterGridHelper.isTouchOnGrid(mEditorView.scaledX(x))) {\n mEditorView.setState(EDITOR_STATE.MOVE_GRID);\n mEditorView.redraw();\n } else {\n mEditorView.setState(EDITOR_STATE.TOUCH_VOID);\n }\n mEditorView.setLastTouch(x, y);\n}\n"
|
"public void close() {\n d1.unsubscribe();\n d2.unsubscribe();\n d3.unsubscribe();\n}\n"
|
"protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {\n Parser parser = new Parser(PATTERN, (String) msg);\n if (!parser.matches()) {\n return null;\n }\n Position position = new Position();\n position.setProtocol(getProtocolName());\n DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next());\n if (deviceSession == null) {\n return null;\n }\n position.setDeviceId(deviceSession.getDeviceId());\n DateBuilder dateBuilder = new DateBuilder().setDateReverse(parser.nextInt(), parser.nextInt(), parser.nextInt()).setTime(parser.nextInt(), parser.nextInt(), parser.nextInt());\n position.setTime(dateBuilder.getDate());\n position.setValid(true);\n position.setLatitude(parser.nextCoordinate(Parser.CoordinateFormat.HEM_DEG_MIN_MIN));\n position.setLongitude(parser.nextCoordinate(Parser.CoordinateFormat.HEM_DEG_MIN_MIN));\n position.setSpeed(parser.nextDouble());\n position.setCourse(parser.nextDouble());\n position.set(Position.KEY_SATELLITES, parser.nextInt(16));\n position.set(Position.KEY_BATTERY, parser.next());\n position.set(Position.KEY_INPUT, parser.next());\n position.set(Position.KEY_OUTPUT, parser.next());\n position.set(Position.PREFIX_TEMP + 1, parser.next());\n return position;\n}\n"
|
"public static String slurp(final InputStream is, final Charset charSet) {\n final List<String> tokenOrEmpty = tokenSlurp(is, charSet, \"String_Node_Str\");\n return tokenOrEmpty.isEmpty() ? StringUtil.EMPTY_STRING : CollectionUtil.getSoleElement(tokenOrEmpty);\n}\n"
|
"static SetterData createHint(String hintName, Object value) {\n SetterData data = new SetterData(SetterType.HINT);\n data.string1 = hintName;\n data.object1 = value;\n return data;\n}\n"
|
"public void initialize() throws IllegalActionException {\n super.initialize();\n try {\n _generatingCode = true;\n if (_modelChanged()) {\n super.preinitialize();\n executeChangeRequests();\n _generateCode();\n }\n String className = CodeGeneratorAdapter.generateName(this);\n URL url = _codeGenerator.codeDirectory.asFile().toURI().toURL();\n if (((BooleanToken) _codeGenerator.generateInSubdirectory.getToken()).booleanValue()) {\n className = className + \"String_Node_Str\" + className;\n url = _codeGenerator.codeDirectory.asFile().getParentFile().toURI().toURL();\n }\n if (!url.getPath().endsWith(\"String_Node_Str\")) {\n url = new URL(url.toString() + \"String_Node_Str\");\n }\n URL[] urls = new URL[] { url };\n URLClassLoader classLoader = null;\n Class<?> classInstance = null;\n try {\n classLoader = new URLClassLoader(urls);\n classInstance = classLoader.loadClass(className);\n } catch (ClassNotFoundException ex) {\n _generateCode();\n try {\n classInstance = classLoader.loadClass(className);\n } catch (ClassNotFoundException ex) {\n _generateCode();\n try {\n classInstance = classLoader.loadClass(className);\n } catch (ClassNotFoundException ex2) {\n ex2.printStackTrace();\n throw new ClassNotFoundException(\"String_Node_Str\" + className + \"String_Node_Str\" + url + \"String_Node_Str\" + java.util.Arrays.deepToString(classLoader.getURLs()) + \"String_Node_Str\" + ex2);\n }\n }\n _objectWrapper = classInstance.newInstance();\n Method[] methods = classInstance.getMethods();\n Method initializeMethod = null;\n for (Method method : methods) {\n String name = method.getName();\n if (name.equals(\"String_Node_Str\")) {\n _fireMethod = method;\n }\n if (name.equals(\"String_Node_Str\")) {\n initializeMethod = method;\n }\n }\n if (_fireMethod == null) {\n throw new IllegalActionException(this, \"String_Node_Str\" + \"String_Node_Str\");\n }\n if (initializeMethod == null) {\n throw new IllegalActionException(this, \"String_Node_Str\" + \"String_Node_Str\");\n }\n initializeMethod.invoke(_objectWrapper, (Object[]) null);\n if (_debugging) {\n _debug(\"String_Node_Str\");\n }\n } finally {\n if (classLoader != null) {\n try {\n classLoader.close();\n } catch (IOException ex) {\n throw new IllegalActionException(this, ex, \"String_Node_Str\" + (url == null ? \"String_Node_Str\" : url) + \"String_Node_Str\");\n }\n }\n }\n _objectWrapper = classInstance.newInstance();\n Method[] methods = classInstance.getMethods();\n Method initializeMethod = null;\n for (Method method : methods) {\n String name = method.getName();\n if (name.equals(\"String_Node_Str\")) {\n _fireMethod = method;\n }\n if (name.equals(\"String_Node_Str\")) {\n initializeMethod = method;\n }\n }\n if (_fireMethod == null) {\n throw new IllegalActionException(this, \"String_Node_Str\" + \"String_Node_Str\");\n }\n if (initializeMethod == null) {\n throw new IllegalActionException(this, \"String_Node_Str\" + \"String_Node_Str\");\n }\n initializeMethod.invoke(_objectWrapper, (Object[]) null);\n if (_debugging) {\n _debug(\"String_Node_Str\");\n }\n recompileThisLevel.setToken(new BooleanToken(false));\n recompileHierarchy.setToken(new BooleanToken(false));\n _compiled = true;\n } catch (Throwable throwable) {\n _objectWrapper = null;\n _fireMethod = null;\n throw new IllegalActionException(this, throwable, \"String_Node_Str\");\n } finally {\n _generatingCode = false;\n }\n}\n"
|
"public static byte[] cryptoPwhashScrypt(byte[] passwd, byte[] salt) throws SodiumLibraryException {\n NativeLong salt_length = sodium().crypto_pwhash_scryptsalsa208sha256_saltbytes();\n if (salt.length != salt_length.intValue()) {\n throw new SodiumLibraryException(\"String_Node_Str\" + salt.length + \"String_Node_Str\" + salt_length + \"String_Node_Str\");\n }\n byte[] key = new byte[(int) sodium().crypto_box_seedbytes()];\n int rc = sodium().crypto_pwhash_scryptsalsa208sha256(key, key.length, passwd, passwd.length, salt, sodium().crypto_pwhash_opslimit_interactive(), sodium().crypto_pwhash_memlimit_interactive());\n logger.info(\"String_Node_Str\" + rc);\n if (rc != 0) {\n throw new SodiumLibraryException(\"String_Node_Str\" + rc + \"String_Node_Str\");\n }\n return key;\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.