content
stringlengths
40
137k
"public void testProperties() throws IOException {\n Assert.assertEquals(400, addProperties(application).getResponseCode());\n Map<String, String> appProperties = ImmutableMap.of(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n Assert.assertEquals(200, addProperties(application, appProperties).getResponseCode());\n Assert.assertEquals(400, addProperties(pingService).getResponseCode());\n Map<String, String> serviceProperties = ImmutableMap.of(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n Assert.assertEquals(200, addProperties(pingService, serviceProperties).getResponseCode());\n Assert.assertEquals(400, addProperties(myds).getResponseCode());\n Map<String, String> datasetProperties = ImmutableMap.of(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n Assert.assertEquals(200, addProperties(myds, datasetProperties).getResponseCode());\n Assert.assertEquals(400, addProperties(mystream).getResponseCode());\n Map<String, String> streamProperties = ImmutableMap.of(\"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\", \"String_Node_Str\");\n Assert.assertEquals(200, addProperties(mystream, streamProperties).getResponseCode());\n Map<String, String> properties = getProperties(application);\n Assert.assertEquals(appProperties, properties);\n properties = getProperties(pingService);\n Assert.assertEquals(serviceProperties, properties);\n properties = getProperties(myds);\n Assert.assertEquals(datasetProperties, properties);\n properties = getProperties(mystream);\n Assert.assertEquals(streamProperties, properties);\n Set<MetadataSearchResultRecord> searchProperties = searchMetadata(Id.Namespace.DEFAULT.getId(), \"String_Node_Str\", \"String_Node_Str\");\n Set<MetadataSearchResultRecord> expected = ImmutableSet.of(new MetadataSearchResultRecord(mystream, MetadataSearchTargetType.STREAM));\n Assert.assertEquals(expected, searchProperties);\n searchProperties = searchMetadata(Id.Namespace.DEFAULT.getId(), \"String_Node_Str\", \"String_Node_Str\");\n expected = ImmutableSet.of(new MetadataSearchResultRecord(pingService, MetadataSearchTargetType.PROGRAM));\n Assert.assertEquals(expected, searchProperties);\n searchProperties = searchMetadata(Id.Namespace.DEFAULT.getId(), \"String_Node_Str\", null);\n Assert.assertEquals(expected, searchProperties);\n searchProperties = searchMetadata(Id.Namespace.DEFAULT.getId(), \"String_Node_Str\", null);\n Assert.assertTrue(searchProperties.size() == 0);\n searchProperties = searchMetadata(Id.Namespace.DEFAULT.getId(), \"String_Node_Str\", null);\n Assert.assertTrue(searchProperties.size() == 0);\n searchProperties = searchMetadata(Id.Namespace.DEFAULT.getId(), \"String_Node_Str\", null);\n Assert.assertEquals(ImmutableSet.<MetadataSearchResultRecord>of(), searchProperties);\n removeProperties(application);\n Assert.assertTrue(getProperties(application).isEmpty());\n removeProperties(pingService, \"String_Node_Str\");\n removeProperties(pingService, \"String_Node_Str\");\n Assert.assertTrue(getProperties(pingService).isEmpty());\n removeProperties(myds, \"String_Node_Str\");\n Assert.assertEquals(ImmutableMap.of(\"String_Node_Str\", \"String_Node_Str\"), getProperties(myds));\n removeProperties(mystream, \"String_Node_Str\");\n Assert.assertEquals(ImmutableMap.of(\"String_Node_Str\", \"String_Node_Str\"), getProperties(mystream));\n removeProperties(application);\n removeProperties(pingService);\n removeProperties(myds);\n removeProperties(mystream);\n Assert.assertTrue(getProperties(application).isEmpty());\n Assert.assertTrue(getProperties(pingService).isEmpty());\n Assert.assertTrue(getProperties(myds).isEmpty());\n Assert.assertTrue(getProperties(mystream).isEmpty());\n Assert.assertEquals(404, addProperties(nonExistingApp, appProperties).getResponseCode());\n Assert.assertEquals(404, addProperties(nonExistingService, serviceProperties).getResponseCode());\n Assert.assertEquals(404, addProperties(nonExistingDataset, datasetProperties).getResponseCode());\n Assert.assertEquals(404, addProperties(nonExistingStream, streamProperties).getResponseCode());\n}\n"
"private void createAppModule(File projectFolder, File exportFolder, String buildToolsVer) throws SketchException, IOException {\n File moduleFolder = mkdirs(exportFolder, \"String_Node_Str\");\n String minSdk;\n String tmplFile;\n if (appComponent == VR) {\n minSdk = min_sdk_gvr;\n tmplFile = VR_GRADLE_BUILD_TEMPLATE;\n } else {\n minSdk = min_sdk_fragment;\n tmplFile = APP_GRADLE_BUILD_TEMPLATE;\n }\n File appBuildTemplate = mode.getContentFile(\"String_Node_Str\" + tmplFile);\n File appBuildFile = new File(moduleFolder, \"String_Node_Str\");\n HashMap<String, String> replaceMap = new HashMap<String, String>();\n replaceMap.put(\"String_Node_Str\", Base.getToolsFolder().getPath().replace('\\\\', '/'));\n replaceMap.put(\"String_Node_Str\", sdk.getTargetPlatform().getPath().replace('\\\\', '/'));\n replaceMap.put(\"String_Node_Str\", buildToolsVer);\n replaceMap.put(\"String_Node_Str\", getPackageName());\n replaceMap.put(\"String_Node_Str\", minSdk);\n replaceMap.put(\"String_Node_Str\", target_sdk);\n replaceMap.put(\"String_Node_Str\", support_version);\n replaceMap.put(\"String_Node_Str\", wear_version);\n replaceMap.put(\"String_Node_Str\", gvr_sdk_version);\n replaceMap.put(\"String_Node_Str\", manifest.getVersionCode());\n replaceMap.put(\"String_Node_Str\", manifest.getVersionName());\n AndroidMode.createFileFromTemplate(appBuildTemplate, appBuildFile, replaceMap);\n writeFile(new File(moduleFolder, \"String_Node_Str\"), new String[] { \"String_Node_Str\" });\n File coreFile = new File(projectFolder, \"String_Node_Str\");\n File libsFolder = mkdirs(moduleFolder, \"String_Node_Str\");\n Util.copyFile(coreFile, new File(libsFolder, \"String_Node_Str\"));\n if (appComponent == VR) {\n File vrFile = new File(projectFolder, \"String_Node_Str\");\n Util.copyFile(vrFile, new File(libsFolder, \"String_Node_Str\"));\n }\n File mainFolder = mkdirs(moduleFolder, \"String_Node_Str\");\n File javaFolder = mkdirs(mainFolder, \"String_Node_Str\");\n File resFolder = mkdirs(mainFolder, \"String_Node_Str\");\n File assetsFolder = mkdirs(mainFolder, \"String_Node_Str\");\n Util.copyFile(new File(projectFolder, \"String_Node_Str\"), new File(mainFolder, \"String_Node_Str\"));\n Util.copyDir(new File(projectFolder, \"String_Node_Str\"), resFolder);\n Util.copyDir(new File(projectFolder, \"String_Node_Str\"), javaFolder);\n Util.copyDir(new File(projectFolder, \"String_Node_Str\"), assetsFolder);\n}\n"
"public boolean matches(final CgmIdentifier cgmIdentifier) {\n return (cgmIdentifier.getClassIdentifier() == cgmIdent.getClassIdentifier()) && (cgmIdentifier.getElementIdentifier() == cgmIdent.getElementIdentifier());\n}\n"
"protected OExtractedItem fetchNext() throws IOException, ParseException {\n if (!jsonReader.hasNext())\n return null;\n String value = jsonReader.readString(new char[] { '}', ']' }, true);\n if (first != null) {\n value = first + value;\n first = null;\n }\n if (total == 1 && jsonReader.lastChar() == '}') {\n jsonReader = null;\n } else if (total != 1 && jsonReader.lastChar() == ']') {\n if (!value.isEmpty())\n value = value.substring(0, value.length() - 1);\n jsonReader = null;\n } else {\n jsonReader.readNext(OJSONReader.NEXT_IN_ARRAY);\n if (jsonReader.lastChar() == ']')\n jsonReader = null;\n }\n value = value.trim();\n if (value.isEmpty())\n return null;\n return new OExtractedItem(current++, new ODocument().fromJSON(value));\n}\n"
"public void testCookie() throws Exception {\n Ion ion = Ion.getDefault(getContext());\n ion.getCookieMiddleware().clear();\n ion.build(getContext()).load(\"String_Node_Str\").asString().get();\n for (HttpCookie cookie : ion.getCookieMiddleware().getCookieStore().get(URI.create(\"String_Node_Str\"))) {\n Log.i(\"String_Node_Str\", cookie.getName() + \"String_Node_Str\" + cookie.getValue());\n }\n assertTrue(ion.getCookieMiddleware().getCookieManager().get(URI.create(\"String_Node_Str\"), new Multimap()).size() > 0);\n CookieMiddleware deserialize = new CookieMiddleware(ion);\n assertTrue(deserialize.getCookieManager().get(URI.create(\"String_Node_Str\"), new Multimap()).size() > 0);\n}\n"
"public UrlFields getResourceUrlSubstitutions() {\n UrlFields aggregateUrlFields = new UrlFields();\n for (Method method : _methods.values()) {\n UrlFields fields = method.getMethodSpecificUrlSubstitutions();\n aggregateUrlFields.getFields().putAll(fields.getFields());\n }\n return aggregateUrlFields;\n}\n"
"private Circle getControlPrimitive(double x, double y) {\n return new Circle(m_ctrlSize).setX(x).setY(y).setFillColor(ColorName.DARKRED).setFillAlpha(0.8).setStrokeAlpha(0).setDraggable(true).setDragMode(DragMode.SAME_LAYER);\n}\n"
"public void onUpdate() {\n super.onUpdate();\n if (!this.world.isRemote && this.ticksExisted % 20 == 0) {\n this.syncMRS();\n }\n List<Entity> entitiesWithin = world.getEntitiesWithinAABB(Entity.class, this.getCollisionBoundingBox());\n for (Entity entity : entitiesWithin) {\n if (entity instanceof EntityMoveableRollingStock) {\n continue;\n }\n if (entity.getRidingEntity() instanceof EntityMoveableRollingStock) {\n continue;\n }\n entity.motionX = this.motionX * 2;\n entity.motionY = 0;\n entity.motionZ = this.motionZ * 2;\n entity.onUpdate();\n double speedDamage = this.getCurrentSpeed().metric() / Config.entitySpeedDamage;\n if (speedDamage > 1) {\n entity.attackEntityFrom((new DamageSource(\"String_Node_Str\")).setDamageBypassesArmor(), (float) speedDamage);\n }\n }\n AxisAlignedBB bb = this.getCollisionBoundingBox();\n bb = bb.offset(0, this.getDefinition().getHeight() + 1, 0);\n List<Entity> entitiesAbove = world.getEntitiesWithinAABB(Entity.class, bb);\n for (Entity entity : entitiesAbove) {\n if (entity instanceof EntityMoveableRollingStock) {\n continue;\n }\n if (this.isPassenger(entity)) {\n continue;\n }\n Vec3d pos = entity.getPositionVector();\n pos = pos.addVector(this.motionX, this.motionY, this.motionZ);\n entity.setPosition(pos.x, pos.y, pos.z);\n }\n}\n"
"public void init(Config cfg, DataFlowOperation op, Map<Integer, List<Integer>> expectedIds) {\n executor = op.getTaskPlan().getThisExecutor();\n sendPendingMax = MPIContext.sendPendingMax(cfg);\n LOG.fine(String.format(\"String_Node_Str\", executor, expectedIds));\n for (Map.Entry<Integer, List<Integer>> e : expectedIds.entrySet()) {\n Map<Integer, Queue<Object>> messagesPerTask = new HashMap<>();\n Map<Integer, Boolean> finishedPerTask = new HashMap<>();\n Map<Integer, Integer> countsPerTask = new HashMap<>();\n for (int i : e.getValue()) {\n messagesPerTask.put(i, new ArrayList<Object>());\n finishedPerTask.put(i, false);\n countsPerTask.put(i, 0);\n }\n messages.put(e.getKey(), messagesPerTask);\n finished.put(e.getKey(), finishedPerTask);\n counts.put(e.getKey(), countsPerTask);\n batchDone.put(e.getKey(), false);\n }\n this.dataFlowOperation = op;\n this.executor = dataFlowOperation.getTaskPlan().getThisExecutor();\n}\n"
"public boolean dragAdjust(final Point2D dxy) {\n int x = (int) (m_startX + dxy.getX());\n int y = (int) (m_startY + dxy.getY());\n String colorKey = BackingColorMapUtils.findColorAtPoint(m_shapesBacking, x, y);\n if (m_colorKey != null && colorKey != null && !colorKey.equals(m_colorKey)) {\n if (null != m_magnets) {\n m_magnets.hide();\n }\n m_magnets = null;\n m_colorKey = null;\n }\n boolean isAllowed = true;\n if (m_magnets == null) {\n isAllowed = checkAllowAndShowMagnets(colorKey);\n }\n m_connector.updateForSpecialConnections(false);\n if (isAllowed) {\n if (null != m_magnets) {\n String magnetColorKey = BackingColorMapUtils.findColorAtPoint(m_magnetsBacking, x, y);\n if (magnetColorKey == null) {\n if (null != m_magnets) {\n m_magnets.hide();\n }\n m_magnets = null;\n m_colorKey = null;\n m_current_magnet = null;\n } else {\n WiresMagnet potentialMagnet = m_magnet_color_map.get(magnetColorKey);\n if (m_connector.getHeadConnection().getMagnet() != potentialMagnet && m_connector.getTailConnection().getMagnet() != potentialMagnet) {\n m_current_magnet = potentialMagnet;\n } else if (potentialMagnet == null) {\n m_current_magnet = null;\n }\n }\n }\n if (null != m_current_magnet) {\n Shape<?> control = m_current_magnet.getControl().asShape();\n if (control != null) {\n Point2D absControl = control.getComputedLocation();\n double targetX = absControl.getX();\n double targetY = absControl.getY();\n double dx = targetX - m_startX - dxy.getX();\n double dy = targetY - m_startY - dxy.getY();\n if (dx != 0 || dy != 0) {\n dxy.setX(dxy.getX() + dx).setY(dxy.getY() + dy);\n }\n }\n }\n return true;\n }\n return false;\n}\n"
"private void switchDataSet(String datasetName) throws ChartException {\n if (isCubeMode()) {\n return;\n }\n try {\n tablePreview.clearContents();\n tableViewerColumns.setInput(null);\n if (datasetName == null) {\n datasetName = getDataServiceProvider().getInheritedDataSet();\n }\n tablePreview.createDummyTable();\n tablePreview.layout();\n } catch (Throwable t) {\n throw new ChartException(ChartEnginePlugin.ID, ChartException.DATA_BINDING, t);\n }\n DataDefinitionTextManager.getInstance().refreshAll();\n fireEvent(tablePreview, EVENT_PREVIEW);\n}\n"
"private List<ScmRepository> getRepositoriesFor(ITask task) throws CoreException {\n Set<ScmRepository> repos = new HashSet<ScmRepository>();\n List<IProject> projects = configuration.getProjectsForTaskRepository(task.getConnectorKind(), task.getRepositoryUrl());\n for (IProject p : projects) {\n ScmRepository repository = getRepositoryForProject(p);\n repos.add(repository);\n }\n return repos;\n}\n"
"public int compareTo(Object other) {\n return deliveryTag.compareTo(((RealTimeEvent) other).deliveryTag);\n}\n"
"public void exportMoveLineTypeSelect7FILE1(MoveLineReport moveLineReport, boolean replay) throws AxelorException, IOException {\n LOG.info(\"String_Node_Str\");\n Company company = moveLineReport.getCompany();\n String dateQueryStr = String.format(\"String_Node_Str\", company.getId());\n JournalType journalType = moveLineReportService.getJournalType(moveLineReport);\n if (moveLineReport.getJournal() != null) {\n dateQueryStr += String.format(\"String_Node_Str\", moveLineReport.getJournal().getId());\n } else {\n dateQueryStr += String.format(\"String_Node_Str\", journalType.getId());\n }\n if (moveLineReport.getPeriod() != null) {\n dateQueryStr += String.format(\"String_Node_Str\", moveLineReport.getPeriod().getId());\n }\n if (replay) {\n dateQueryStr += String.format(\"String_Node_Str\", moveLineReport.getId());\n } else {\n dateQueryStr += \"String_Node_Str\";\n }\n dateQueryStr += \"String_Node_Str\";\n Query dateQuery = JPA.em().createQuery(\"String_Node_Str\" + dateQueryStr + \"String_Node_Str\");\n List<LocalDate> allDates = new ArrayList<LocalDate>();\n allDates = dateQuery.getResultList();\n LOG.debug(\"String_Node_Str\", allDates);\n List<String[]> allMoveData = new ArrayList<String[]>();\n String companyCode = \"String_Node_Str\";\n String reference = \"String_Node_Str\";\n String moveQueryStr = \"String_Node_Str\";\n String moveLineQueryStr = \"String_Node_Str\";\n if (moveLineReport.getRef() != null) {\n reference = moveLineReport.getRef();\n }\n if (moveLineReport.getCompany() != null) {\n companyCode = moveLineReport.getCompany().getCode();\n moveQueryStr += String.format(\"String_Node_Str\", moveLineReport.getCompany().getId());\n }\n if (moveLineReport.getPeriod() != null) {\n moveQueryStr += String.format(\"String_Node_Str\", moveLineReport.getPeriod().getId());\n }\n if (moveLineReport.getDateFrom() != null) {\n moveLineQueryStr += String.format(\"String_Node_Str\", moveLineReport.getDateFrom().toString());\n }\n if (moveLineReport.getDateTo() != null) {\n moveLineQueryStr += String.format(\"String_Node_Str\", moveLineReport.getDateTo().toString());\n }\n if (moveLineReport.getDate() != null) {\n moveLineQueryStr += String.format(\"String_Node_Str\", moveLineReport.getDate().toString());\n }\n if (replay) {\n moveQueryStr += String.format(\"String_Node_Str\", moveLineReport.getId());\n } else {\n moveQueryStr += \"String_Node_Str\";\n }\n LocalDate interfaceDate = moveLineReport.getDate();\n for (LocalDate dt : allDates) {\n List<? extends Journal> journalList = Journal.filter(\"String_Node_Str\", journalType).fetch();\n if (moveLineReport.getJournal() != null) {\n journalList = new ArrayList<Journal>();\n journalList.add(moveLineReport.getJournal());\n }\n for (Journal journal : journalList) {\n List<Move> moveList = Move.filter(\"String_Node_Str\" + moveQueryStr, dt, journal).fetch();\n String journalCode = journal.getExportCode();\n if (moveList.size() > 0) {\n BigDecimal sumCredit = this.getSumCredit(\"String_Node_Str\" + moveLineQueryStr, moveList);\n if (sumCredit.compareTo(BigDecimal.ZERO) == 1) {\n String exportNumber = this.getSaleExportNumber(company);\n Move firstMove = moveList.get(0);\n String periodCode = firstMove.getPeriod().getFromDate().toString(\"String_Node_Str\");\n this.updateMoveList(moveList, moveLineReport, interfaceDate, exportNumber);\n String[] items = new String[8];\n items[0] = companyCode;\n items[1] = journalCode;\n items[2] = exportNumber;\n items[3] = interfaceDate.toString(\"String_Node_Str\");\n items[4] = sumCredit.toString();\n items[5] = reference;\n items[6] = dt.toString(\"String_Node_Str\");\n items[7] = periodCode;\n allMoveData.add(items);\n }\n }\n }\n }\n String fileName = \"String_Node_Str\" + todayTime.toString(\"String_Node_Str\") + \"String_Node_Str\";\n String filePath = accountConfigService.getExportPath(accountConfigService.getAccountConfig(company));\n new File(filePath).mkdirs();\n LOG.debug(\"String_Node_Str\", filePath, fileName);\n CsvTool.csvWriter(filePath, fileName, '|', null, allMoveData);\n}\n"
"public void setScreenOrientation(String orientation) {\n if (orientation.equals(\"String_Node_Str\"))\n getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);\n else if (orientation.equals(\"String_Node_Str\"))\n getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n else if (orientation.equals(\"String_Node_Str\"))\n getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n else if (orientation.equals(\"String_Node_Str\"))\n getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE);\n else if (orientation.equals(\"String_Node_Str\"))\n getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT);\n}\n"
"public void testUnencryptedCreate() throws Exception {\n Utils.rollMockClock(0);\n ECKey key = new ECKey();\n long time = key.getCreationTimeSeconds();\n assertNotEquals(0, time);\n assertTrue(!key.isEncrypted());\n byte[] originalPrivateKeyBytes = key.getPrivKeyBytes();\n ECKey encryptedKey = key.encrypt(keyCrypter, keyCrypter.deriveKey(PASSWORD1));\n assertEquals(time, encryptedKey.getCreationTimeSeconds());\n assertTrue(encryptedKey.isEncrypted());\n assertNull(encryptedKey.getPrivKeyBytes());\n key = encryptedKey.decrypt(keyCrypter, keyCrypter.deriveKey(PASSWORD1));\n assertTrue(!key.isEncrypted());\n assertArrayEquals(originalPrivateKeyBytes, key.getPrivKeyBytes());\n}\n"
"public void newProperties(PropertySheet ps) throws PropertyException {\n languageWeightAdjustment = ps.getFloat(PROP_LANGUAGE_WEIGHT_ADJUSTMENT);\n dumpLattice = ps.getBoolean(PROP_DUMP_LATTICE);\n dumpSausage = ps.getBoolean(PROP_DUMP_SAUSAGE);\n}\n"
"public void load(CompoundTag tag) {\n String id = ((StringTag) tag.getTag(\"String_Node_Str\")).getValue();\n LongTag uuidMost = tag.getTagAs(\"String_Node_Str\");\n LongTag uuidLeast = tag.getTagAs(\"String_Node_Str\");\n List<NBTTag> pos = ((ListTag) tag.getTagAs(\"String_Node_Str\")).listTags();\n List<NBTTag> motion = ((ListTag) tag.getTagAs(\"String_Node_Str\")).listTags();\n List<NBTTag> rotation = ((ListTag) tag.getTagAs(\"String_Node_Str\")).listTags();\n FloatTag fallDistance = tag.getTagAs(\"String_Node_Str\");\n ShortTag fireTicks = tag.getTagAs(\"String_Node_Str\");\n ShortTag airTicks = tag.getTagAs(\"String_Node_Str\");\n ByteTag onGround = tag.getTagAs(\"String_Node_Str\");\n ByteTag invulnerable = tag.getTagAs(\"String_Node_Str\");\n IntTag dimension = tag.getTagAs(\"String_Node_Str\");\n IntTag portalCooldown = tag.getTagAs(\"String_Node_Str\");\n StringTag displayName = (tag.containsTag(\"String_Node_Str\")) ? (StringTag) tag.getTag(\"String_Node_Str\") : new StringTag(\"String_Node_Str\").setValue(\"String_Node_Str\");\n ByteTag dnVisible = (tag.containsTag(\"String_Node_Str\")) ? (ByteTag) tag.getTag(\"String_Node_Str\") : new ByteTag(\"String_Node_Str\").setValue((byte) 0);\n ByteTag silent = (tag.containsTag(\"String_Node_Str\")) ? (ByteTag) tag.getTag(\"String_Node_Str\") : new ByteTag(\"String_Node_Str\").setValue((byte) 0);\n NBTTag riding = tag.getTagAs(\"String_Node_Str\");\n NBTTag commandStats = tag.getTagAs(\"String_Node_Str\");\n this.id = Integer.parseInt(id);\n if (this.id >= counter.get()) {\n counter.incrementAndGet();\n }\n this.uniqueId = new UUID(uuidMost.getValue(), uuidLeast.getValue());\n int[] location = new int[3];\n for (int i = 0; i < 3; i += 1) {\n location[i] = ((IntTag) pos.get(i)).getValue();\n }\n loc.setX(location[0]);\n loc.setY(location[1]);\n loc.setZ(location[2]);\n int[] velocity = new int[3];\n for (int i = 0; i < 3; i += 1) {\n velocity[i] = ((IntTag) motion.get(i)).getValue();\n }\n this.velocity.setX(velocity[0]);\n this.velocity.setY(velocity[1]);\n this.velocity.setZ(velocity[2]);\n loc.setYaw(((IntTag) rotation.get(0)).getValue());\n loc.setPitch(((IntTag) rotation.get(0)).getValue());\n this.fallDistance.set((long) fallDistance.getValue());\n this.fireTicks.set(fireTicks.getValue());\n this.airTicks.set(airTicks.getValue());\n this.portalCooldown.set(portalCooldown.getValue());\n this.onGround = onGround.getValue() == 1;\n this.godMode = invulnerable.getValue() == 1;\n this.nameVisible = dnVisible.getValue() == 1;\n this.silent = silent.getValue() == 1;\n this.displayName = displayName.getValue();\n}\n"
"public void run() {\n observer.notifyObserver(true);\n}\n"
"protected JsonToken _handleNextEntry() throws IOException, JsonParseException {\n String next = _reader.nextString();\n if (next == null) {\n _parsingContext = _parsingContext.getParent();\n if (!_reader.startNewLine()) {\n _state = STATE_DOC_END;\n } else {\n _state = STATE_RECORD_START;\n }\n return JsonToken.END_OBJECT;\n }\n _state = STATE_NAMED_VALUE;\n _currentValue = next;\n if (_columnIndex >= _columnCount) {\n _reportError(\"String_Node_Str\" + _columnCount + \"String_Node_Str\" + next.length() + \"String_Node_Str\" + next + \"String_Node_Str\");\n }\n _currentName = _schema.column(_columnIndex).getName();\n return JsonToken.FIELD_NAME;\n}\n"
"public void doSave(IProgressMonitor monitor) {\n monitor.beginTask(\"String_Node_Str\", 100);\n monitor.worked(10);\n savePreviewPictures();\n try {\n if (getEditorInput() instanceof JobEditorInput) {\n boolean saved = ((JobEditorInput) getEditorInput()).saveProcess(new SubProgressMonitor(monitor, 80), null);\n if (!saved) {\n monitor.setCanceled(true);\n throw new InterruptedException();\n }\n }\n getCommandStack().markSaveLocation();\n setDirty(false);\n boolean isneedReload = false;\n for (int i = 0; i < getProcess().getGraphicalNodes().size(); i++) {\n Node node = (Node) getProcess().getGraphicalNodes().get(i);\n if (node.isNeedloadLib()) {\n isneedReload = true;\n node.setNeedLoadLib(false);\n }\n }\n if (isneedReload) {\n ((ILibrariesService) GlobalServiceRegister.getDefault().getService(ILibrariesService.class)).updateModulesNeededForCurrentJob(getProcess());\n monitor.worked(10);\n } catch (Exception e) {\n ExceptionHandler.process(e);\n monitor.setCanceled(true);\n } finally {\n monitor.done();\n }\n}\n"
"public static double[][] calculateImagemapStatistics(int cornerx, int cornery, int width, int height, int[] bands, int[][] data, KDistributionEstimation kdist) {\n int numberofbands = bands.length;\n double[][] imagestat = new double[numberofbands][5];\n for (int i = 0; i < numberofbands; i++) {\n int band = bands[i];\n kdist.setImageData(cornerx, cornery, width, height, row, col, band);\n kdist.estimate(null, data[i]);\n double[] thresh = kdist.getDetectThresh();\n imagestat[i][0] = thresh[0];\n imagestat[i][1] = thresh[1] / thresh[5];\n imagestat[i][2] = thresh[2] / thresh[5];\n imagestat[i][3] = thresh[3] / thresh[5];\n imagestat[i][4] = thresh[4] / thresh[5];\n }\n return imagestat;\n}\n"
"private NodeList selectNodes(Node contextNode, XPathFragment xPathFragment, XMLNamespaceResolver xmlNamespaceResolver) {\n NodeList resultNodes = getNodes(contextNode, xPathFragment, xmlNamespaceResolver);\n if (xPathFragment.getNextFragment() != null) {\n Node resultNode;\n XMLNodeList result = new XMLNodeList();\n int numberOfResultNodes = resultNodes.getLength();\n for (int x = 0; x < numberOfResultNodes; x++) {\n resultNode = resultNodes.item(x);\n result.addAll(selectNodes(resultNode, xPathFragment.getNextFragment(), xmlNamespaceResolver, nullPolicy));\n }\n return result;\n }\n return resultNodes;\n}\n"
"private IcqStatusEnum icqStatusLongToPresenceStatus(long icqStatus) {\n if (icqStatus == -1) {\n return IcqStatusEnum.OFFLINE;\n } else if ((icqStatus & FullUserInfo.ICQSTATUS_INVISIBLE) != 0) {\n return IcqStatusEnum.INVISIBLE;\n } else if ((icqStatus & FullUserInfo.ICQSTATUS_DND) != 0) {\n return IcqStatusEnum.DO_NOT_DISTURB;\n } else if ((icqStatus & FullUserInfo.ICQSTATUS_OCCUPIED) != 0) {\n return IcqStatusEnum.OCCUPIED;\n } else if ((icqStatus & FullUserInfo.ICQSTATUS_NA) != 0) {\n return IcqStatusEnum.NOT_AVAILABLE;\n } else if ((icqStatus & FullUserInfo.ICQSTATUS_AWAY) != 0) {\n return IcqStatusEnum.AWAY;\n } else if ((icqStatus & FullUserInfo.ICQSTATUS_FFC) != 0) {\n return IcqStatusEnum.FREE_FOR_CHAT;\n }\n return IcqStatusEnum.ONLINE;\n}\n"
"public void onAfterUpdateTransaction(ViewPdf viewPdf) {\n super.onAfterUpdateTransaction(viewPdf);\n viewPdf.render();\n}\n"
"public MyTriangle getTriangle(MyPoint aPoint) {\n MyTriangle foundTriangle = null;\n if (this.trianglesQuadTrees.canBeUsed()) {\n foundTriangle = this.trianglesQuadTrees.search(aPoint);\n } else {\n ListIterator<MyTriangle> iterTriangle = triangles.listIterator();\n while ((iterTriangle.hasNext()) && (foundTriangle == null)) {\n MyTriangle aTriangle = iterTriangle.next();\n if (aTriangle.isInside(aPoint)) {\n foundTriangle = aTriangle;\n }\n }\n }\n return foundTriangle;\n}\n"
"public void test() throws Exception {\n Schema schema = new Schema.Parser().parse(Resources.getResource(\"String_Node_Str\").openStream());\n File tmp = File.createTempFile(getClass().getSimpleName(), \"String_Node_Str\");\n tmp.deleteOnExit();\n tmp.delete();\n Path file = new Path(tmp.getPath());\n AvroParquetWriter<GenericRecord> writer = new AvroParquetWriter<GenericRecord>(file, schema);\n GenericData.Record nestedRecord = new GenericRecordBuilder(schema.getField(\"String_Node_Str\").schema()).set(\"String_Node_Str\", 1).build();\n List<Integer> integerArray = Arrays.asList(1, 2, 3);\n GenericData.Array<Integer> genericIntegerArray = new GenericData.Array<Integer>(Schema.createArray(Schema.create(Schema.Type.INT)), integerArray);\n GenericData.Record record = new GenericRecordBuilder(schema).set(\"String_Node_Str\", null).set(\"String_Node_Str\", true).set(\"String_Node_Str\", 1).set(\"String_Node_Str\", 2L).set(\"String_Node_Str\", 3.1f).set(\"String_Node_Str\", 4.1).set(\"String_Node_Str\", ByteBuffer.wrap(\"String_Node_Str\".getBytes(Charsets.UTF_8))).set(\"String_Node_Str\", \"String_Node_Str\").set(\"String_Node_Str\", nestedRecord).set(\"String_Node_Str\", \"String_Node_Str\").set(\"String_Node_Str\", genericIntegerArray).set(\"String_Node_Str\", genericIntegerArray).set(\"String_Node_Str\", ImmutableMap.of(\"String_Node_Str\", 1, \"String_Node_Str\", 2)).build();\n writer.write(record);\n writer.close();\n AvroParquetReader<GenericRecord> reader = new AvroParquetReader<GenericRecord>(file);\n GenericRecord nextRecord = reader.read();\n assertNotNull(nextRecord);\n assertEquals(null, nextRecord.get(\"String_Node_Str\"));\n assertEquals(true, nextRecord.get(\"String_Node_Str\"));\n assertEquals(1, nextRecord.get(\"String_Node_Str\"));\n assertEquals(2L, nextRecord.get(\"String_Node_Str\"));\n assertEquals(3.1f, nextRecord.get(\"String_Node_Str\"));\n assertEquals(4.1, nextRecord.get(\"String_Node_Str\"));\n assertEquals(ByteBuffer.wrap(\"String_Node_Str\".getBytes(Charsets.UTF_8)), nextRecord.get(\"String_Node_Str\"));\n assertEquals(\"String_Node_Str\", nextRecord.get(\"String_Node_Str\"));\n assertEquals(\"String_Node_Str\", nextRecord.get(\"String_Node_Str\"));\n assertEquals(nestedRecord, nextRecord.get(\"String_Node_Str\"));\n assertEquals(Arrays.asList(1, 2), nextRecord.get(\"String_Node_Str\"));\n assertEquals(ImmutableMap.of(\"String_Node_Str\", 1, \"String_Node_Str\", 2), nextRecord.get(\"String_Node_Str\"));\n}\n"
"static WadlGenerator loadWadlGeneratorDescriptions(List<WadlGeneratorDescription> wadlGeneratorDescriptions) throws Exception {\n WadlGenerator wadlGenerator = new WadlGeneratorImpl();\n final CallbackList callbacks = new CallbackList();\n try {\n if (wadlGeneratorDescriptions != null && !wadlGeneratorDescriptions.isEmpty()) {\n for (WadlGeneratorDescription wadlGeneratorDescription : wadlGeneratorDescriptions) {\n final WadlGeneratorControl control = loadWadlGenerator(wadlGeneratorDescription, wadlGenerator);\n wadlGenerator = control.wadlGenerator;\n callbacks.add(control.callback);\n }\n }\n }\n wadlGenerator.init();\n return wadlGenerator;\n}\n"
"private void createSeparator(Composite composite, int span) {\n Label separator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.verticalIndent = 5;\n gd.horizontalSpan = span;\n separator.setLayoutData(gd);\n}\n"
"public void start() throws SlickException {\n try {\n setup();\n ErrorHandler.setGlString();\n getDelta();\n while (running()) gameLoop();\n } catch (Exception e) {\n this.e = e;\n }\n try {\n close_sub();\n destroy();\n if (e != null) {\n ErrorHandler.error(null, e, true);\n e = null;\n }\n }\n if (forceExit) {\n Opsu.close();\n System.exit(0);\n }\n}\n"
"public ItemStack getStack() {\n if (!this.isSlotEnabled()) {\n return ItemStack.EMPTY;\n }\n if (this.inventory.getSizeInventory() <= this.getSlotIndex()) {\n return ItemStack.EMPTY;\n }\n if (this.isDisplay()) {\n this.setDisplay(false);\n return this.getDisplayStack();\n }\n return super.getStack();\n}\n"
"public void finishConfiguration(RailsRoot root) throws ConfigurationException {\n for (MapHex hex : hexes.values()) {\n hex.finishConfiguration(root);\n }\n for (MapHex hex : hexes.values()) {\n for (HexSide side : HexSide.all()) {\n MapHex neighbour = hexes.get(mapOrientation.getAdjacentCoordinates(hex.getCoordinates(), side));\n if (neighbour != null) {\n if (hex.isValidNeighbour(neighbour, side)) {\n hexTable.put(hex, side, neighbour);\n } else {\n hex.addInvalidSide(side);\n if (hex.isImpassableNeighbour(neighbour)) {\n hex.addImpassableSide(side);\n neighbour.addImpassableSide(side.opposite());\n }\n }\n } else {\n hex.addInvalidSide(side);\n }\n }\n }\n for (PublicCompany company : root.getCompanyManager().getAllPublicCompanies()) {\n List<MapHex> homeHexes = company.getHomeHexes();\n if (homeHexes != null) {\n for (MapHex homeHex : homeHexes) {\n int homeNumber = company.getHomeCityNumber();\n Stop home = homeHex.getRelatedStop(homeNumber);\n if (home == null && homeNumber != 0) {\n throw new ConfigurationException(\"String_Node_Str\" + homeNumber + \"String_Node_Str\" + homeHex + \"String_Node_Str\" + homeHex.getStops().size() + \"String_Node_Str\");\n } else {\n homeHex.addHome(company, home);\n }\n }\n }\n MapHex hex = company.getDestinationHex();\n if (hex != null) {\n hex.addDestination(company);\n }\n }\n mapImageUsed = net.sf.rails.util.Util.hasValue(mapImageFilename) && \"String_Node_Str\".equalsIgnoreCase(Config.get(\"String_Node_Str\"));\n if (mapImageUsed) {\n String rootDirectory = Config.get(\"String_Node_Str\");\n if (!net.sf.rails.util.Util.hasValue(rootDirectory)) {\n rootDirectory = \"String_Node_Str\";\n }\n mapImageFilepath = \"String_Node_Str\" + rootDirectory + \"String_Node_Str\" + mapImageFilename;\n }\n}\n"
"public void refreshCurrentPage() {\n webDriver.navigate().refresh();\n}\n"
"public void testSignUp() throws Exception {\n clockService.setMockTime(LocalTime.of(10, 0));\n final LocalDateTime now = clockService.getCurrentDateTime();\n final LocalTime nowTime = now.toLocalTime();\n LocalDateTime endOfRaid = now.plusMinutes(45);\n final Gym gym = gymRepository.findByName(\"String_Node_Str\", uppsalaRegion);\n Raid enteiRaid = new Raid(pokemonRepository.getByName(\"String_Node_Str\"), endOfRaid, gym, new LocaleService(), uppsalaRegion);\n String raidCreatorName = \"String_Node_Str\";\n try {\n repo.newRaid(raidCreatorName, enteiRaid);\n } catch (RuntimeException e) {\n System.err.println(e.getMessage());\n }\n Raid raid = repo.getActiveRaidOrFallbackToExRaid(gym, uppsalaRegion);\n assertThat(raid, is(enteiRaid));\n String userName = \"String_Node_Str\";\n int howManyPeople = 3;\n LocalTime arrivalTime = nowTime.plusMinutes(30);\n raid.signUp(userName, howManyPeople, arrivalTime, repo);\n assertThat(raid.getSignUps().size(), is(1));\n assertThat(raid.getNumberOfPeopleSignedUp(), is(howManyPeople));\n final Raid raidFromDb = repo.getActiveRaidOrFallbackToExRaid(gym, uppsalaRegion);\n assertThat(raidFromDb, is(raid));\n assertThat(raidFromDb.getSignUps().size(), is(1));\n}\n"
"public boolean isPageComplete() {\n boolean isComplete = super.isPageComplete();\n if (isComplete) {\n isComplete = getSelectedCloudSpace() != null && (status == null || status.isOK());\n }\n return isComplete;\n}\n"
"public void setActiveContact(MetaContact metaContact, boolean isActive) {\n ContactNode contactNode = treeModel.findContactNodeByMetaContact(metaContact);\n if (contactNode != null) {\n contactNode.setActive(isActive);\n if (isActive) {\n activeContacts.add(contactNode);\n } else\n activeContacts.remove(contactNode);\n}\n"
"private Operation initBackupOperation(int replicaIndex) {\n Operation backupOp = backupAwareOp.getBackupOperation();\n if (backupOp == null) {\n throw new IllegalArgumentException(\"String_Node_Str\");\n }\n Operation op = (Operation) backupAwareOp;\n backupOp.setPartitionId(op.getPartitionId()).setReplicaIndex(replicaIndex).setServiceName(op.getServiceName());\n return backupOp;\n}\n"
"private Set<ReferenceChange> getDELOriginValueOnContainmentRefSingle(Comparison comparison, ReferenceChange sourceDifference) {\n Set<ReferenceChange> result = new HashSet<ReferenceChange>();\n if (!sourceDifference.getReference().isMany()) {\n EObject originContainer = MatchUtil.getOriginContainer(comparison, sourceDifference);\n if (originContainer != null) {\n Object originValue = originContainer.eGet(sourceDifference.getReference());\n if (originValue instanceof EObject) {\n result = getDifferenceOnGivenObject((EObject) originValue, DifferenceKind.DELETE);\n }\n }\n }\n return result;\n}\n"
"private static void findTransitiveClosure(Collection<? extends DAGNode> nodes) {\n HashSet<DAGNode> activeTopDownNodes = new HashSet<>();\n for (DAGNode node : nodes) {\n if (node.directSuperNodes.isEmpty()) {\n for (DAGNode sub : node.directSubNodes) {\n activeTopDownNodes.add(sub);\n }\n }\n }\n while (!activeTopDownNodes.isEmpty()) {\n HashSet<DAGNode> activeTopDownNodesNext = new HashSet<>(activeTopDownNodes.size());\n for (DAGNode node : activeTopDownNodes) {\n boolean changed = node.allSuperNodes.addAll(node.directSuperNodes);\n for (DAGNode superNode : node.directSuperNodes) {\n changed |= node.allSuperNodes.addAll(superNode.allSuperNodes);\n }\n if (changed) {\n for (DAGNode subNode : node.directSubNodes) {\n activeTopDownNodesNext.add(subNode);\n }\n }\n }\n activeTopDownNodes = activeTopDownNodesNext;\n }\n HashSet<DAGNode> activeBottomUpNodes = new HashSet<>();\n for (DAGNode node : nodes) {\n if (node.directSubNodes.isEmpty()) {\n activeBottomUpNodes.add(node);\n }\n }\n while (!activeBottomUpNodes.isEmpty()) {\n HashSet<DAGNode> activeBottomUpNodesNext = new HashSet<>(activeBottomUpNodes.size());\n for (DAGNode node : activeBottomUpNodes) {\n boolean changed = node.allSubNodes.addAll(node.directSubNodes);\n for (DAGNode subNode : node.directSubNodes) {\n changed |= node.allSubNodes.addAll(subNode.allSubNodes);\n }\n if (changed) {\n for (DAGNode superNode : node.directSuperNodes) {\n activeBottomUpNodesNext.add(superNode);\n }\n }\n }\n activeBottomUpNodes = activeBottomUpNodesNext;\n }\n}\n"
"public void writeEndElement() throws SAXException {\n processStartElement();\n final QName qName = elementStack.remove();\n transformer.endElement(qName.uri, qName.localName, qName.prefix);\n if (qName.newMapping) {\n transformer.endPrefixMapping(qName.prefix);\n }\n}\n"
"public void onSelectAllEvent(SelectAllEvent event) {\n DataGrid dataGrid = SSDataGrid.this.dataGrid;\n Range rows = dataGrid.getVisibleRange();\n int end = rows.getStart() + rows.getLength();\n int numRecordsDisplayed = rows.getLength();\n if (end > dataGrid.getRowCount()) {\n end = dataGrid.getRowCount();\n numRecordsDisplayed = end % numRecordsDisplayed;\n }\n boolean allSelected = true;\n for (int i = rows.getStart(); i < end; i++) {\n if (!dataProvider.getList().get(i).isSelected()) {\n allSelected = false;\n break;\n }\n }\n for (int i = rows.getStart(); i < end; i++) {\n dataProvider.getList().get(i).setSelected(!allSelected);\n }\n refresh();\n}\n"
"public Rowset readRowset(ResultSet aResultSet, int aPageSize) throws SQLException {\n try {\n if (aResultSet != null) {\n ResultSetMetaData lowLevelJdbcFields = aResultSet.getMetaData();\n Fields jdbcFields = new Fields();\n for (int i = 1; i <= lowLevelJdbcFields.getColumnCount(); i++) {\n Field field = new Field();\n field.setName(lowLevelJdbcFields.getColumnName(i));\n field.setDescription(lowLevelJdbcFields.getColumnLabel(i));\n field.setNullable(lowLevelJdbcFields.isNullable(i) == ResultSetMetaData.columnNullable);\n DataTypeInfo typeInfo = new DataTypeInfo();\n typeInfo.setSqlType(lowLevelJdbcFields.getColumnType(i));\n typeInfo.setSqlTypeName(lowLevelJdbcFields.getColumnTypeName(i));\n typeInfo.setJavaClassName(lowLevelJdbcFields.getColumnClassName(i));\n field.setTypeInfo(typeInfo);\n field.setSize(lowLevelJdbcFields.getColumnDisplaySize(i));\n field.setPrecision(lowLevelJdbcFields.getPrecision(i));\n field.setScale(lowLevelJdbcFields.getScale(i));\n field.setSigned(lowLevelJdbcFields.isSigned(i));\n field.setTableName(lowLevelJdbcFields.getTableName(i));\n field.setSchemaName(lowLevelJdbcFields.getSchemaName(i));\n jdbcFields.add(field);\n }\n Rowset rowset = new Rowset(expectedFields != null && !expectedFields.isEmpty() ? expectedFields : jdbcFields);\n List<Row> rows = readRows(rowset.getFields(), jdbcFields, aResultSet, aPageSize, converter);\n rowset.setCurrent(rows);\n rowset.currentToOriginal();\n return rowset;\n } else {\n throw new SQLException(ROWSET_MISSING_EXCEPTION_MSG);\n }\n } catch (Exception ex) {\n if (ex instanceof SQLException) {\n throw (SQLException) ex;\n } else {\n throw new SQLException(ex);\n }\n }\n}\n"
"public void testFailXMLStreamReaderWithNullType() throws Exception {\n try {\n InputStream stream = ClassLoader.getSystemResourceAsStream(DOUBLE_ERROR_XML);\n XMLStreamReader xmlStreamReader = XML_INPUT_FACTORY.createXMLStreamReader(stream);\n unmarshaller.unmarshal(xmlStreamReader, (Type) null);\n } catch (IllegalArgumentException e) {\n return;\n }\n fail(\"String_Node_Str\");\n}\n"
"public void handleEvent(Event event) {\n if (!event.widget.getClass().getSimpleName().equals(\"String_Node_Str\")) {\n return;\n MenuItem clickedMenuItem = ((MenuItem) event.widget);\n if (((MenuItem) event.widget).getText().equals(\"String_Node_Str\")) {\n refPathwayGraphViewRep.showRelationEdges(clickedMenuItem.getSelection());\n } else if (((MenuItem) event.widget).getText().equals(\"String_Node_Str\")) {\n System.out.println(\"String_Node_Str\" + clickedMenuItem.getSelection());\n refPathwayGraphViewRep.showReactionEdges(clickedMenuItem.getSelection());\n }\n}\n"
"protected void updateObserver() {\n final int viewDistance = getViewDistance() >> Chunk.BLOCKS.BITS;\n World w = getWorld();\n int cx = getChunkLive().getX();\n int cy = getChunkLive().getY();\n int cz = getChunkLive().getZ();\n HashSet<SpoutChunk> observing = new HashSet<SpoutChunk>((viewDistance * viewDistance * viewDistance * 3) / 2);\n OutwardIterator oi = new OutwardIterator(cx, cy, cz, viewDistance);\n while (oi.hasNext()) {\n IntVector3 v = oi.next();\n Chunk chunk = w.getChunk(v.getX(), v.getY(), v.getZ(), LoadOption.LOAD_GEN);\n chunk.refreshObserver(this);\n observing.add((SpoutChunk) chunk);\n }\n observingChunks.removeAll(observing);\n for (SpoutChunk chunk : observingChunks) {\n if (chunk.isLoaded()) {\n chunk.removeObserver(this);\n }\n }\n observingChunks.clear();\n observingChunks.addAll(observing);\n}\n"
"public void deallocate() {\n try {\n scorer.deallocate();\n pruner.deallocate();\n linguist.deallocate();\n } catch (IOException e) {\n throw new RuntimeException(\"String_Node_Str\", e);\n }\n}\n"
"public static DateTimeFormat getLongDateFormat() {\n if (cachedLongDateFormat == null) {\n String pattern = getDefaultDateTimeConstants().dateFormats()[LONG_DATE_FORMAT];\n cachedLongDateFormat = new DateTimeFormat(pattern);\n }\n return cachedLongDateFormat;\n}\n"
"public void testMultipleNamespaces() throws Exception {\n populateStore();\n String ns = \"String_Node_Str\";\n secureStoreManager.putSecureData(ns, KEY1, VALUE1, DESCRIPTION1, PROPERTIES_1);\n List<SecureStoreMetadata> expectedList = ImmutableList.of(secureStore.getSecureData(NAMESPACE1, KEY2).getMetadata(), secureStore.getSecureData(NAMESPACE1, KEY1).getMetadata());\n Assert.assertEquals(expectedList, secureStore.listSecureData(NAMESPACE1));\n Assert.assertNotEquals(expectedList, secureStore.listSecureData(NAMESPACE2));\n List<SecureStoreMetadata> expectedList2 = ImmutableList.of(secureStore.getSecureData(NAMESPACE2, KEY1).getMetadata());\n Assert.assertEquals(expectedList2, secureStore.listSecureData(NAMESPACE2));\n Assert.assertNotEquals(expectedList2, secureStore.listSecureData(NAMESPACE1));\n}\n"
"public void allocate(int cores, int ram) {\n this.cores = this.cores - cores;\n this.memory = this.memory - ram;\n}\n"
"private void doSaveChanges() {\n List<BGRightsRow> options = tableDataModel.getObjects();\n List<Group> groups = getAllBaseGroups();\n List<BGRights> currentRights = rightManager.findBGRights(groups, courseEntry.getOlatResource());\n Map<Group, BGRights> tutorToRightsMap = new HashMap<>();\n Map<Group, BGRights> participantToRightsMap = new HashMap<>();\n for (BGRights right : currentRights) {\n if (right.getRole() == BGRightsRole.tutor) {\n tutorToRightsMap.put(right.getBaseGroup(), right);\n } else if (right.getRole() == BGRightsRole.participant) {\n participantToRightsMap.put(right.getBaseGroup(), right);\n }\n }\n for (BGRightsOption option : options) {\n List<String> newPermissions = option.getSelectedPermissions();\n BGRights rights = null;\n if (option.getRole() == BGRightsRole.tutor) {\n rights = tutorToRightsMap.get(option.getBaseGroup());\n } else if (option.getRole() == BGRightsRole.participant) {\n rights = participantToRightsMap.get(option.getBaseGroup());\n }\n if (rights == null && newPermissions.isEmpty()) {\n continue;\n }\n List<String> currentPermissions = (rights == null ? Collections.<String>emptyList() : rights.getRights());\n if (newPermissions.containsAll(currentPermissions) && currentPermissions.containsAll(newPermissions)) {\n continue;\n }\n List<String> newPermissionsTmp = new ArrayList<>(newPermissions);\n newPermissionsTmp.removeAll(currentPermissions);\n for (String newPermission : newPermissionsTmp) {\n rightManager.addBGRight(newPermission, option.getBaseGroup(), courseEntry.getOlatResource(), option.getRole());\n }\n currentPermissions.removeAll(newPermissions);\n for (String currentPermission : currentPermissions) {\n rightManager.removeBGRight(currentPermission, option.getBaseGroup(), courseEntry.getOlatResource(), option.getRole());\n }\n }\n}\n"
"public void run() {\n ScrapeResult r = ScrapeResult.COMPLETE;\n try {\n TelusReportFetcher.retriveUsageSummaryData(appWidgetId);\n subscribers = ReportParser.subscribers(appWidgetId);\n } catch (TelusReportFetcher.InvalidCredentialsException e) {\n r = SCRAPE_ERROR;\n errorMessageId = R.string.invalid_credentials;\n } catch (TelusReportFetcher.NetworkErrorException e) {\n r = SCRAPE_ERROR;\n errorMessageId = R.string.network_error;\n } catch (ReportParser.ServiceUnavailableException e) {\n r = SCRAPE_ERROR;\n errorMessageId = R.string.widget_service_unavailable;\n } catch (ReportParser.ParsingError e) {\n r = SCRAPE_PARSING_ERROR;\n }\n result = r;\n Handler handler = scraperCompletedHandler;\n if (handler != null)\n handler.sendEmptyMessage(0);\n}\n"
"private static boolean eliminateIter(Logger logger, Function f) {\n HashSet<Var> removeCandidates = new HashSet<Var>();\n HashSet<Var> needed = new HashSet<Var>();\n MultiMap<Var, Var> dependencyGraph = new MultiMap<Var, Var>();\n walkFunction(logger, f, removeCandidates, needed, dependencyGraph);\n if (logger.isTraceEnabled()) {\n logger.trace(\"String_Node_Str\" + f.getName() + \"String_Node_Str\" + \"String_Node_Str\" + removeCandidates + \"String_Node_Str\" + \"String_Node_Str\" + needed + \"String_Node_Str\" + \"String_Node_Str\" + printDepGraph(dependencyGraph));\n }\n ArrayDeque<Var> workStack = new ArrayDeque<Var>();\n workStack.addAll(needed);\n while (!workStack.isEmpty()) {\n Var neededVar = workStack.pop();\n List<Var> deps = dependencyGraph.remove(neededVar);\n if (deps != null) {\n needed.addAll(deps);\n workStack.addAll(deps);\n }\n }\n removeCandidates.removeAll(needed);\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\" + removeCandidates);\n }\n if (removeCandidates.isEmpty()) {\n return false;\n } else {\n f.getMainblock().removeVars(removeCandidates);\n return true;\n }\n}\n"
"public void standaloneVirtSubPoolUpdateNoChanges() {\n when(configMock.getBoolean(ConfigProperties.STANDALONE)).thenReturn(true);\n Pool p = createVirtLimitPool(\"String_Node_Str\", 10, 10);\n List<Pool> pools = poolRules.createAndEnrichPools(p, new LinkedList<Pool>());\n assertEquals(2, pools.size());\n Entitlement ent = mock(Entitlement.class);\n when(ent.getQuantity()).thenReturn(1);\n Pool consumerSpecificPool = TestUtil.clone(p);\n consumerSpecificPool.setAttribute(\"String_Node_Str\", \"String_Node_Str\");\n consumerSpecificPool.setAttribute(\"String_Node_Str\", \"String_Node_Str\");\n consumerSpecificPool.setAttribute(\"String_Node_Str\", \"String_Node_Str\");\n consumerSpecificPool.setQuantity(10L);\n consumerSpecificPool.setSourceEntitlement(ent);\n pools.add(consumerSpecificPool);\n List<PoolUpdate> updates = poolRules.updatePools(p, pools, p.getQuantity(), new HashSet<Product>());\n assertEquals(0, updates.size());\n}\n"
"protected IRemoteConnection getRemoteConnection(String host) {\n IRemoteServicesManager remoteManager = getService(IRemoteServicesManager.class);\n IRemoteConnection connection = null;\n if (remoteManager != null) {\n IRemoteConnectionType connectionType = remoteManager.getRemoteConnectionTypes().get(0);\n if (connectionType != null) {\n try {\n for (IRemoteConnection c : connectionType.getConnections()) {\n String connectionHost = c.getService(IRemoteConnectionHostService.class).getHostname();\n if (InetAddress.getByName(host).getHostAddress().equals(InetAddress.getByName(connectionHost).getHostAddress())) {\n connection = c;\n break;\n }\n }\n }\n } catch (UnknownHostException e) {\n logger.error(getClass().getName() + \"String_Node_Str\", e);\n }\n }\n return connection;\n}\n"
"private float[] readProbabilitiesTable(DataInputStream stream, boolean bigEndian) throws IOException {\n int numProbs = readInt(stream, bigEndian);\n if (numProbs <= 0 || numProbs > 65536) {\n throw new Error(\"String_Node_Str\" + numProbs);\n }\n float[] probTable = new float[numProbs];\n for (int i = 0; i < numProbs; i++) {\n probTable[i] = logMath.log10ToLog(readFloat(stream, bigEndian));\n }\n return probTable;\n}\n"
"public void execute(UUID playerId) {\n CardsView cardsView = new CardsView(abilities, game);\n getGameSession(playerId).target(question, cardsView, null, required, options);\n}\n"
"public void configure(URL base, String source, String text) throws Exception {\n Parameter immediate = (Parameter) getAttribute(\"String_Node_Str\");\n boolean isImmediate = immediate != null && ((BooleanToken) immediate.getToken()).booleanValue();\n if (isImmediate) {\n Effigy masterEffigy = Configuration.findEffigy(toplevel());\n PtolemyEffigy effigy = new PtolemyEffigy(masterEffigy, masterEffigy.uniqueName(\"String_Node_Str\"));\n MoMLParser parser = new MoMLParser(workspace());\n final ERGModalModel transformer = (ERGModalModel) parser.parse(base, source, new StringReader(text));\n final Manager manager = new Manager(transformer.workspace(), \"String_Node_Str\");\n final CompositeEntity context = (CompositeEntity) getContainer();\n effigy.setModel(transformer);\n transformer.setManager(manager);\n manager.addExecutionListener(new ExecutionListener() {\nprotected void _execute() throws Exception {\n try {\n _executeTransformation(base, source, text);\n } finally {\n setContainer(null);\n }\n }\n }\n });\n List<ParserAttribute> parsers = context.attributeList(ParserAttribute.class);\n ParserAttribute parserAttribute = parsers.size() > 0 ? parsers.get(0) : new ParserAttribute(context, context.uniqueName(\"String_Node_Str\"));\n MoMLParser oldParser = parsers.size() > 0 ? parserAttribute.getParser() : null;\n parserAttribute.setParser(new MoMLParser());\n try {\n manager.execute();\n } finally {\n if (oldParser == null) {\n parserAttribute.setContainer(null);\n } else {\n parserAttribute.setParser(oldParser);\n }\n }\n setContainer(null);\n } else {\n _configureSource = source;\n text = text.trim();\n if (!text.equals(\"String_Node_Str\")) {\n MoMLParser parser = new MoMLParser(workspace());\n _configurer.removeAllEntities();\n parser.setContext(_configurer);\n parser.parse(base, source, new StringReader(text));\n _modelUpdater = (ERGModalModel) _configurer.entityList().get(0);\n _clearURI(_modelUpdater);\n }\n }\n}\n"
"private boolean default_network_rules_for_systemvm(Connect conn, String vmName) {\n if (!_can_bridge_firewall) {\n return false;\n }\n List<InterfaceDef> intfs = getInterfaces(conn, vmName);\n if (intfs.size() < 1) {\n return false;\n }\n String brname = null;\n if (vmName.startsWith(\"String_Node_Str\")) {\n InterfaceDef intf = intfs.get(0);\n brname = intf.getBrName();\n } else {\n InterfaceDef intf = intfs.get(intfs.size() - 1);\n brname = intf.getBrName();\n }\n Script cmd = new Script(_securityGroupPath, _timeout, s_logger);\n cmd.add(\"String_Node_Str\");\n cmd.add(\"String_Node_Str\", vmName);\n cmd.add(\"String_Node_Str\", brname);\n String result = cmd.execute();\n if (result != null) {\n return false;\n }\n return true;\n}\n"
"public void onCameraClick() {\n if (getActivity() != null && EffortlessPermissions.hasPermissions(getActivity(), PERMISSIONS_CAMERA)) {\n videoOn = !videoOn;\n if (videoOn) {\n cameraControlButton.getFrontImageView().setImageResource(R.drawable.ic_videocam_white_24px);\n if (cameraEnumerator.getDeviceNames().length > 1) {\n cameraSwitchButton.setVisibility(View.VISIBLE);\n }\n } else {\n cameraControlButton.getFrontImageView().setImageResource(R.drawable.ic_videocam_off_white_24px);\n cameraSwitchButton.setVisibility(View.GONE);\n }\n toggleMedia(videoOn, true);\n } else if (getActivity() != null && EffortlessPermissions.somePermissionPermanentlyDenied(getActivity(), PERMISSIONS_CAMERA)) {\n OpenAppDetailsDialogFragment.show(R.string.nc_camera_permission_permanently_denied, R.string.nc_permissions_settings, (AppCompatActivity) getActivity());\n } else {\n requestPermissions(PERMISSIONS_CAMERA, 100);\n }\n}\n"
"public BeanSerializerBase withFilterId(Object object) {\n return null;\n}\n"
"public BufferedImage toImage(int frame, List<Tag> tags, RECT displayRect, HashMap<Integer, CharacterTag> characters, Stack<Integer> visited) {\n RECT bound = getBounds();\n BufferedImage ret = new BufferedImage(bound.Xmax / 20, bound.Ymax / 20, BufferedImage.TYPE_INT_ARGB);\n Color textColor = new Color(0, 0, 0);\n FontTag font = null;\n int textHeight = 12;\n int x = bound.Xmin;\n int y = 0;\n Graphics2D g = (Graphics2D) ret.getGraphics();\n g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n g.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n List<SHAPE> glyphs = new ArrayList<>();\n for (TEXTRECORD rec : textRecords) {\n if (rec.styleFlagsHasColor) {\n textColor = rec.textColorA.toColor();\n }\n if (rec.styleFlagsHasFont) {\n font = (FontTag) characters.get(rec.fontId);\n glyphs = font.getGlyphShapeTable();\n textHeight = rec.textHeight;\n }\n if (rec.styleFlagsHasXOffset) {\n x = rec.xOffset * 1024 / textHeight;\n }\n if (rec.styleFlagsHasYOffset) {\n y = rec.yOffset * 1000 / textHeight;\n }\n for (GLYPHENTRY entry : rec.glyphEntries) {\n RECT rect = SHAPERECORD.getBounds(glyphs.get(entry.glyphIndex).shapeRecords);\n rect.Xmax /= font.getDivider();\n rect.Xmin /= font.getDivider();\n rect.Ymax /= font.getDivider();\n rect.Ymin /= font.getDivider();\n BufferedImage img = SHAPERECORD.shapeToImage(tags, 4, null, null, glyphs.get(entry.glyphIndex).shapeRecords, textColor);\n AffineTransform tr = new AffineTransform();\n tr.setToIdentity();\n float rat = textHeight / 1000f;\n tr.translate(rat * x / 20, rat * (y + rect.Ymin) / 20);\n tr.scale(rat / font.getDivider(), rat / font.getDivider());\n g.drawImage(img, tr, null);\n x += entry.glyphAdvance * 1000 / textHeight;\n }\n }\n return ret;\n}\n"
"public Tx updateOutHDAccountId(Tx tx) {\n List<String> addressList = tx.getOutAddressList();\n if (addressList != null && addressList.size() > 0) {\n HashSet<String> set = new HashSet<String>();\n set.addAll(addressList);\n StringBuilder strBuilder = new StringBuilder();\n for (String str : set) {\n strBuilder.append(\"String_Node_Str\").append(str).append(\"String_Node_Str\");\n }\n if (strBuilder.length() > 0) {\n strBuilder.substring(0, strBuilder.length() - 1);\n }\n SQLiteDatabase db = this.mDb.getReadableDatabase();\n String sql = Utils.format(\"String_Node_Str\", strBuilder.toString());\n Cursor c = db.rawQuery(sql, null);\n while (c.moveToNext()) {\n String address = c.getString(0);\n int hdAccountId = c.getInt(1);\n for (Out out : tx.getOuts()) {\n if (Utils.compareString(out.getOutAddress(), address)) {\n out.setHDAccountId(hdAccountId);\n }\n }\n }\n c.close();\n }\n return tx;\n}\n"
"public int compare(Pair o1, Pair o2) {\n return Double.compare(o2.value.getRms(), o1.value.getRms());\n}\n"
"private void createLabel(Composite parent, String content, int width) {\n Label label = new Label(parent, SWT.NONE);\n if (content != null) {\n label.setText(content);\n }\n setLabelLayoutData(label);\n}\n"
"public void destroy() {\n nutMvc.destroy();\n}\n"
"public Optional<Integer> sequential() {\n return integerList.stream().filter(l -> {\n Blackhole.consumeCPU(Q);\n return false;\n }).findFirst();\n}\n"
"private Collection getParameterSelectionListForCascadingGroup(IViewerReportDesignHandle design, IViewerReportService service, Map paramValues, InputOptions options) throws ReportServiceException {\n ParameterGroupDefinition group = (ParameterGroupDefinition) parameter.getGroup();\n int index = group.getParameters().indexOf(parameter);\n Object[] groupKeys = new Object[index];\n for (int i = 0; i < index; i++) {\n ParameterDefinition def = (ParameterDefinition) group.getParameters().get(i);\n String parameterName = def.getName();\n groupKeys[i] = paramValues.get(parameterName);\n if (def.isRequired() && DataUtil.trimString((String) groupKeys[i]).length() <= 0) {\n groupKeys[i] = service.getParameterDefaultValue(design, parameterName, options);\n }\n }\n return service.getSelectionListForCascadingGroup(design, group.getName(), groupKeys, options);\n}\n"
"public static <T extends RestrictedType> T allocate(String identifier, Long quantity, Supplier<T> allocator) throws AuthException, IllegalContextAccessException, NoSuchElementException, PersistenceException {\n Context ctx = Contexts.lookup();\n if (ctx.hasAdministrativePrivileges()) {\n return allocator.get();\n } else {\n Class<? extends BaseMessage> msgType = ctx.getRequest().getClass();\n List<Class<?>> lookupTypes = Classes.genericsToClasses(allocator);\n if (lookupTypes.isEmpty()) {\n throw new IllegalArgumentException(\"String_Node_Str\" + allocator.getClass() + \"String_Node_Str\" + allocator + \"String_Node_Str\");\n } else {\n Class<?> rscType;\n try {\n rscType = Iterables.find(lookupTypes, new Predicate<Class<?>>() {\n public boolean apply(Class<?> arg0) {\n return RestrictedType.class.isAssignableFrom(arg0);\n }\n });\n } catch (NoSuchElementException ex1) {\n LOG.error(ex1, ex1);\n throw ex1;\n }\n Ats ats = Ats.inClassHierarchy(rscType);\n Ats msgAts = Ats.inClassHierarchy(msgType);\n if (!ats.has(PolicyVendor.class) && !msgAts.has(PolicyVendor.class)) {\n throw new IllegalArgumentException(\"String_Node_Str\" + rscType.getCanonicalName() + \"String_Node_Str\" + rscType.getCanonicalName() + \"String_Node_Str\" + msgType.getCanonicalName());\n } else if (!ats.has(PolicyResourceType.class) && !msgAts.has(PolicyResourceType.class)) {\n throw new IllegalArgumentException(\"String_Node_Str\" + rscType.getCanonicalName() + \"String_Node_Str\" + rscType.getCanonicalName() + \"String_Node_Str\" + msgType.getCanonicalName());\n } else {\n PolicyVendor vendor = ats.get(PolicyVendor.class);\n PolicyResourceType type = ats.get(PolicyResourceType.class);\n String action = PolicySpec.requestToAction(ctx.getRequest());\n if (action == null) {\n action = getIamActionByMessageType(ctx.getRequest());\n }\n User requestUser = ctx.getUser();\n try {\n if (!Permissions.isAuthorized(vendor.value(), type.value(), identifier, null, action, requestUser)) {\n throw new AuthException(\"String_Node_Str\" + type + \"String_Node_Str\" + ctx.getUserFullName());\n } else if (!Permissions.canAllocate(vendor.value(), type.value(), identifier, action, ctx.getUser(), quantity)) {\n throw new AuthException(\"String_Node_Str\" + type + \"String_Node_Str\" + ctx.getUserFullName());\n } else {\n return allocator.get();\n }\n } catch (AuthException ex) {\n throw ex;\n }\n }\n }\n }\n}\n"
"public void addChildPlot(PlotInfo childPlot) {\n childPlot.setVisible(this.expanded);\n this.children.add(childPlot);\n if (this.plot.isAutoValidate())\n this.plot.validateLayout();\n}\n"
"private void outputViews(File viewsFile, HddObjectListReader<Sign> views, tectonicus.configuration.Map map, ImageFormat imageFormat) {\n System.out.println(\"String_Node_Str\");\n if (viewsFile.exists())\n viewsFile.delete();\n JsArrayWriter jsWriter = null;\n try {\n jsWriter = new JsArrayWriter(viewsFile, map.getId() + \"String_Node_Str\");\n Sign sign = new Sign();\n while (views.hasNext()) {\n views.read(sign);\n HashMap<String, String> args = new HashMap<String, String>();\n final float worldX = sign.getX() + 0.5f;\n final float worldY = sign.getY();\n final float worldZ = sign.getZ() + 0.5f;\n String posStr = \"String_Node_Str\" + worldX + \"String_Node_Str\" + worldY + \"String_Node_Str\" + worldZ + \"String_Node_Str\";\n args.put(\"String_Node_Str\", posStr);\n String text = \"String_Node_Str\";\n for (int i = 1; i < 4; i++) {\n if (!sign.getText(i).startsWith(\"String_Node_Str\")) {\n text = text + sign.getText(i);\n }\n }\n text = text.trim();\n args.put(\"String_Node_Str\", \"String_Node_Str\" + jsEscape(text) + \"String_Node_Str\");\n String filename = map.getId() + \"String_Node_Str\" + sign.getX() + \"String_Node_Str\" + sign.getY() + \"String_Node_Str\" + sign.getZ() + \"String_Node_Str\" + imageFormat.getExtension();\n args.put(\"String_Node_Str\", \"String_Node_Str\" + filename + \"String_Node_Str\");\n jsWriter.write(args);\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (jsWriter != null)\n jsWriter.close();\n }\n}\n"
"private void writeFont(String fontName, Integer size, String bold, String italic, String strikeThrough, String underline, String color) {\n writer.openTag(\"String_Node_Str\");\n if (isValid(fontName)) {\n writer.attribute(\"String_Node_Str\", fontName);\n }\n if (size != null) {\n writer.attribute(\"String_Node_Str\", size);\n }\n if (bold != null && bold) {\n writer.attribute(\"String_Node_Str\", 1);\n }\n if (isValid(italic)) {\n writer.attribute(\"String_Node_Str\", italic);\n }\n if (isValid(strikeThrough)) {\n writer.attribute(\"String_Node_Str\", strikeThrough);\n }\n if (isValid(underline) && !\"String_Node_Str\".equalsIgnoreCase(underline)) {\n writer.attribute(\"String_Node_Str\", \"String_Node_Str\");\n }\n if (isValid(color)) {\n writer.attribute(\"String_Node_Str\", color);\n }\n writer.closeTag(\"String_Node_Str\");\n}\n"
"public boolean matchesSafely(Node item) {\n try {\n Object result = compiledXPath.evaluate(item, evaluationMode);\n if (result == null) {\n return false;\n } else if (valueMatcher == null) {\n return !result.equals(\"String_Node_Str\");\n } else {\n return valueMatcher.matches(result);\n }\n } catch (XPathExpressionException e) {\n return false;\n }\n}\n"
"protected void tearDown() throws Exception {\n super.tearDown();\n FileStore fileStore = (FileStore) getStore();\n try {\n fileStore.closeAndDeleteFiles();\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n}\n"
"public IProcess getProcessFromItem(Item item, boolean loadScreenshots) {\n if (ProcessItemImpl.class == item.getClass()) {\n Process process = null;\n process = new Process(item.getProperty());\n process.loadXmlFile(loadScreenshots);\n return process;\n }\n return null;\n}\n"
"public static void startVideoStream(Drone drone, int udpPort, String appId, String videoTag, Surface videoSurface, ICommandListener listener) {\n if (!(drone instanceof GenericMavLinkDrone)) {\n postErrorEvent(CommandExecutionError.COMMAND_UNSUPPORTED, listener);\n return;\n }\n final GenericMavLinkDrone mavLinkDrone = (GenericMavLinkDrone) drone;\n mavLinkDrone.startVideoStream(videoProps, appId, videoTag, videoSurface, listener);\n}\n"
"public void shouldNotFetch_withAmazonServiceException() throws Exception {\n final AttributeQuery query = mock(AttributeQuery.class);\n final Condition mockCondition = mock(Condition.class);\n when(mockCondition.getComparisonOperator()).thenReturn(Operators.EQUALS);\n final String stringProperty = randomString(10);\n final Set<String> stringPropertyValues = new HashSet<>(Arrays.asList(stringProperty));\n when(mockCondition.getValues()).thenReturn(stringPropertyValues);\n when(mockCondition.hasMissingComparisonValues()).thenReturn(false);\n when(query.getAttributeName()).thenReturn(\"String_Node_Str\");\n when(query.getCondition()).thenReturn(mockCondition);\n final ItemConfiguration itemConfiguration = new ItemConfiguration(StubItem.class, tableName);\n final Collection<ItemConfiguration> itemConfigurations = Arrays.asList(itemConfiguration);\n when(mockDatabaseSchemaHolder.itemConfigurations()).thenReturn(itemConfigurations);\n when(mockAmazonDynamoDbClient.query(any(QueryRequest.class))).thenThrow(AmazonServiceException.class);\n final DynamoDbTemplate dynamoDbTemplate = new DynamoDbTemplate(mockDatabaseSchemaHolder);\n dynamoDbTemplate.initialize(mockAmazonDynamoDbClient);\n PersistenceResourceFailureException actualException = null;\n try {\n dynamoDbTemplate.fetch(query, StubItem.class);\n } catch (final PersistenceResourceFailureException e) {\n actualException = e;\n }\n assertNotNull(actualException);\n final ArgumentCaptor<QueryRequest> queryRequestArgumentCaptor = ArgumentCaptor.forClass(QueryRequest.class);\n verify(mockAmazonDynamoDbClient).query(queryRequestArgumentCaptor.capture());\n final QueryRequest queryRequest = queryRequestArgumentCaptor.getValue();\n assertEquals(schemaName + \"String_Node_Str\" + tableName, queryRequest.getTableName());\n assertNull(queryRequest.getIndexName());\n assertEquals(1, queryRequest.getKeyConditions().size());\n assertEquals(\"String_Node_Str\", queryRequest.getKeyConditions().get(\"String_Node_Str\").getComparisonOperator());\n assertEquals(1, queryRequest.getKeyConditions().get(\"String_Node_Str\").getAttributeValueList().size());\n assertEquals(new AttributeValue(stringProperty), queryRequest.getKeyConditions().get(\"String_Node_Str\").getAttributeValueList().get(0));\n}\n"
"public static void fixParents(IndexService index, ModelService model, Optional<String> jobId, Optional<String> computedSearchScope, String updatedBy) throws GenericException, RequestNotValidException, AuthorizationDeniedException, NotFoundException {\n Map<String, List<String>> aipIdToGhost = new HashMap<>();\n Map<String, List<String>> sipIdToGhost = new HashMap<>();\n Filter ghostsFilter = new Filter(new SimpleFilterParameter(RodaConstants.AIP_GHOST, Boolean.TRUE.toString()));\n jobId.ifPresent(id -> ghostsFilter.add(new SimpleFilterParameter(RodaConstants.INGEST_JOB_ID, id)));\n IterableIndexResult<IndexedAIP> ghosts = index.findAll(IndexedAIP.class, ghostsFilter, Arrays.asList(RodaConstants.INDEX_UUID, RodaConstants.INGEST_SIP_IDS, RodaConstants.AIP_GHOST));\n for (IndexedAIP aip : ghosts) {\n if (aip.getIngestSIPIds() != null && !aip.getIngestSIPIds().isEmpty()) {\n List<String> temp = new ArrayList<>();\n String firstIngestSIPId = aip.getIngestSIPIds().get(0);\n if (sipIdToGhost.containsKey(firstIngestSIPId)) {\n temp = sipIdToGhost.get(firstIngestSIPId);\n }\n temp.add(aip.getId());\n sipIdToGhost.put(firstIngestSIPId, temp);\n } else {\n List<String> temp = new ArrayList<>();\n if (aipIdToGhost.containsKey(aip.getId())) {\n temp = aipIdToGhost.get(aip.getId());\n }\n temp.add(aip.getId());\n aipIdToGhost.put(aip.getId(), temp);\n }\n }\n for (Map.Entry<String, List<String>> entry : sipIdToGhost.entrySet()) {\n Filter nonGhostsFilter = new Filter(new SimpleFilterParameter(RodaConstants.INGEST_SIP_IDS, entry.getKey()), new SimpleFilterParameter(RodaConstants.AIP_GHOST, Boolean.FALSE.toString()));\n computedSearchScope.ifPresent(id -> nonGhostsFilter.add(new SimpleFilterParameter(RodaConstants.AIP_ANCESTORS, id)));\n IndexResult<IndexedAIP> result = index.find(IndexedAIP.class, nonGhostsFilter, Sorter.NONE, new Sublist(0, 1), Arrays.asList(RodaConstants.INDEX_UUID));\n if (result.getTotalCount() > 1) {\n LOGGER.debug(\"String_Node_Str\", entry.getKey());\n } else if (result.getTotalCount() == 1) {\n IndexedAIP newParentIAIP = result.getResults().get(0);\n for (String id : entry.getValue()) {\n moveChildrenAIPsAndDelete(index, model, id, newParentIAIP.getId(), computedSearchScope, updatedBy);\n }\n } else if (result.getTotalCount() == 0) {\n String ghostIdToKeep = entry.getValue().get(0);\n AIP ghostToKeep = model.retrieveAIP(ghostIdToKeep);\n ghostToKeep.setGhost(false);\n model.updateAIP(ghostToKeep, \"String_Node_Str\");\n if (entry.getValue().size() > 1) {\n for (int i = 1; i < entry.getValue().size(); i++) {\n updateParent(index, model, entry.getValue().get(i), ghostIdToKeep, computedSearchScope);\n }\n }\n }\n }\n}\n"
"public List<CorridorComponent> getOffsetComponents(int offsetFrom, int offsetTo, MapCoordinates coords, boolean fw) {\n List<CorridorComponent> comps = new LinkedList<CorridorComponent>();\n Point2D fPoint = new Point2D.Double(x1(), y1()), tPoint = new Point2D.Double(x2(), y2());\n if (offsetFrom != 0 || offsetTo != 0)\n applyOffsets(fPoint, tPoint, offsetFrom, offsetTo, coords);\n double x1 = fPoint.getX(), y1 = fPoint.getY();\n double x2 = tPoint.getX(), y2 = tPoint.getY();\n if (isStraight()) {\n Point2D mid = new Point2D.Double((fPoint.getX() + tPoint.getX()) / 2, (fPoint.getY() + tPoint.getY()) / 2);\n if (fw) {\n comps.add(new SegmentComponent(fPoint, mid));\n comps.add(new SegmentComponent(mid, tPoint));\n } else {\n comps.add(new SegmentComponent(tPoint, mid));\n comps.add(new SegmentComponent(mid, fPoint));\n }\n } else if (offsetFrom == 0 && offsetTo == 0) {\n comps.add(new SegmentComponent(fw ? fPoint : tPoint, fw ? defaultArcFW_.getStartPoint() : defaultArcBW_.getStartPoint()));\n comps.add(new ArcComponent(fw ? defaultArcFW_ : defaultArcBW_));\n comps.add(new SegmentComponent(fw ? defaultArcFW_.getEndPoint() : defaultArcBW_.getEndPoint(), fw ? tPoint : fPoint));\n } else {\n Point2D.Double e = constructElbow(x1, y1, x2, y2);\n int ccw = Line2D.relativeCCW(x1, y1, e.x, e.y, x2, y2);\n double combinedOffset = (offsetFrom + offsetTo) / 2;\n double rw = radiusW_ - ccw * coords.dxToWorld(combinedOffset - this.avgOffset_);\n double halfTheta = thetaR_ / 2;\n double l = radiusW_ / Math.tan(halfTheta);\n double shortest = Math.min(FPUtil.magnitude(x1, y1, e.x, e.y), FPUtil.magnitude(x2, y2, e.x, e.y));\n if (shortest < l) {\n l = shortest;\n rw = l * Math.tan(thetaR_ / 2);\n }\n Arc2D arc = fw ? constructArcFW(x1, y1, x2, y2, e, l, rw) : constructArcBW(x1, y1, x2, y2, e, l, rw);\n comps.add(new SegmentComponent(fw ? fPoint : tPoint, fw ? arc.getStartPoint() : arc.getStartPoint()));\n comps.add(new ArcComponent(arc));\n comps.add(new SegmentComponent(fw ? arc.getEndPoint() : arc.getEndPoint(), fw ? tPoint : fPoint));\n }\n return comps;\n}\n"
"public void updateACLEntries(StorageManager sMan, FileMetadata file, long parentId, Map<String, Object> entries, AtomicDBUpdate update) throws MRCException, UserException {\n DatabaseResultSet<ACLEntry> acl = null;\n try {\n Map<String, Object> aclMap = null;\n acl = sMan.getACL(file.getId());\n if (!acl.hasNext())\n aclMap = convertToACL(file.getPerms());\n else {\n aclMap = new HashMap<String, Object>();\n while (acl.hasNext()) {\n ACLEntry next = acl.next();\n aclMap.put(next.getEntity(), next.getRights());\n }\n }\n for (Entry<String, Object> entry : entries.entrySet()) {\n String entity = entry.getKey();\n String rwx = (String) entry.getValue();\n if (rwx != null) {\n int rights = 0;\n if (rwx.length() == 1 && rwx.charAt(0) >= '0' && rwx.charAt(0) <= '7') {\n rights = Integer.parseInt(rwx, 8);\n else {\n if (rwx.indexOf('r') != -1)\n rights |= PERM_READ;\n if (rwx.indexOf('w') != -1)\n rights |= PERM_WRITE;\n if (rwx.indexOf('x') != -1)\n rights |= PERM_EXECUTE;\n }\n aclMap.put(entity, rights);\n } else\n aclMap.put(entity, null);\n }\n for (Entry<String, Object> entry : aclMap.entrySet()) {\n Number rights = (Number) entry.getValue();\n sMan.setACLEntry(file.getId(), entry.getKey(), rights == null ? null : rights.shortValue(), update);\n }\n int owner = ((Number) aclMap.get(OWNER)).intValue();\n Integer group = aclMap.get(MASK) != null ? ((Number) aclMap.get(MASK)).intValue() : null;\n if (group == null)\n group = ((Number) aclMap.get(OWNER_GROUP)).intValue();\n int other = ((Number) aclMap.get(OTHER)).intValue();\n int posixRights = ((owner & PERM_SUID_SGID) > 0 ? POSIX_SUID : 0) | ((group & PERM_SUID_SGID) > 0 ? POSIX_SGID : 0) | (file.getPerms() & POSIX_STICKY) | ((owner & PERM_READ) > 0 ? POSIX_OWNER_READ : 0) | ((owner & PERM_WRITE) > 0 ? POSIX_OWNER_WRITE : 0) | ((owner & PERM_EXECUTE) > 0 ? POSIX_OWNER_EXEC : 0) | ((group & PERM_READ) > 0 ? POSIX_GROUP_READ : 0) | ((group & PERM_WRITE) > 0 ? POSIX_GROUP_WRITE : 0) | ((group & PERM_EXECUTE) > 0 ? POSIX_GROUP_EXEC : 0) | ((other & PERM_READ) > 0 ? POSIX_OTHER_READ : 0) | ((other & PERM_WRITE) > 0 ? POSIX_OTHER_WRITE : 0) | ((other & PERM_EXECUTE) > 0 ? POSIX_OTHER_EXEC : 0);\n file.setPerms(posixRights);\n sMan.setMetadata(file, FileMetadata.RC_METADATA, update);\n } catch (Exception exc) {\n throw new MRCException(exc);\n } finally {\n if (acl != null)\n acl.destroy();\n }\n}\n"
"public CommonBTNode getCatalogNode(long nodeNumber) {\n CatalogInitProcedure init = new CatalogInitProcedure();\n long currentNodeNumber;\n if (nodeNumber < 0) {\n currentNodeNumber = init.bthr.getRootNodeNumber();\n else\n currentNodeNumber = nodeNumber;\n final int nodeSize = init.bthr.getNodeSize();\n byte[] currentNodeData = new byte[nodeSize];\n try {\n init.catalogFile.seek(currentNodeNumber * nodeSize);\n init.catalogFile.readFully(currentNodeData);\n } catch (RuntimeException e) {\n System.err.println(\"String_Node_Str\");\n System.err.println(\"String_Node_Str\" + nodeNumber);\n System.err.println(\"String_Node_Str\" + currentNodeNumber);\n System.err.println(\"String_Node_Str\" + nodeSize);\n System.err.println(\"String_Node_Str\" + init.catalogFile.length());\n System.err.println(\"String_Node_Str\" + (currentNodeNumber * nodeSize));\n throw e;\n }\n CommonBTNodeDescriptor nodeDescriptor = createCommonBTNodeDescriptor(currentNodeData, 0);\n if (nodeDescriptor.getNodeType() == NodeType.HEADER)\n return createCommonBTHeaderNode(currentNodeData, 0, init.bthr.getNodeSize());\n if (nodeDescriptor.getNodeType() == NodeType.INDEX)\n return catOps.newCatalogIndexNode(currentNodeData, 0, init.bthr.getNodeSize(), init.bthr);\n else if (nodeDescriptor.getNodeType() == NodeType.LEAF)\n return catOps.newCatalogLeafNode(currentNodeData, 0, init.bthr.getNodeSize(), init.bthr);\n else\n return null;\n}\n"
"public Figure render(Object n) {\n Locatable location = (Locatable) n;\n final NamedObj object = location.getContainer();\n Figure result = null;\n try {\n List iconList = object.attributeList(EditorIcon.class);\n if (iconList.size() == 0) {\n XMLIcon alreadyCreated = (XMLIcon) _iconsPendingContainer.get(object);\n if (alreadyCreated != null) {\n iconList.add(alreadyCreated);\n }\n }\n if (iconList.size() == 0) {\n final EditorIcon icon = new XMLIcon(object.workspace(), \"String_Node_Str\");\n icon.setContainerToBe(object);\n icon.setPersistent(false);\n result = icon.createFigure();\n _iconsPendingContainer.put(object, icon);\n GraphController controller = IconController.this.getController();\n GraphModel graphModel = controller.getGraphModel();\n ChangeRequest request = new ChangeRequest(graphModel, \"String_Node_Str\") {\n protected void _execute() throws KernelException {\n _iconsPendingContainer.remove(object);\n if (icon.getContainer() != null) {\n return;\n }\n if (object.getAttribute(\"String_Node_Str\") != null) {\n return;\n }\n icon.setContainer(object);\n }\n };\n request.setPersistent(false);\n object.requestChange(request);\n } else if (iconList.size() >= 1) {\n EditorIcon icon = (EditorIcon) iconList.get(iconList.size() - 1);\n result = icon.createFigure();\n }\n } catch (KernelException ex) {\n throw new InternalErrorException(null, ex, \"String_Node_Str\" + \"String_Node_Str\" + object + \"String_Node_Str\" + \"String_Node_Str\");\n }\n result.setToolTipText(object.getClassName());\n if (object instanceof ComponentEntity) {\n ComponentEntity ce = (ComponentEntity) object;\n StringAttribute _colorAttr = (StringAttribute) (ce.getAttribute(\"String_Node_Str\"));\n if (_colorAttr != null) {\n String _color = _colorAttr.getExpression();\n AnimationRenderer _animationRenderer = new AnimationRenderer(SVGUtilities.getColor(_color));\n _animationRenderer.renderSelected(result);\n }\n StringAttribute _explAttr = (StringAttribute) (ce.getAttribute(\"String_Node_Str\"));\n if (_explAttr != null) {\n result.setToolTipText(_explAttr.getExpression());\n }\n }\n return result;\n}\n"
"public String getImageName() {\n return this.name;\n}\n"
"public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {\n _name = name;\n ComponentLocator locator = ComponentLocator.getCurrentLocator();\n ConfigurationDao configDao = locator.getDao(ConfigurationDao.class);\n if (configDao == null) {\n s_logger.error(\"String_Node_Str\");\n return false;\n }\n Map<String, String> configs = configDao.getConfiguration(\"String_Node_Str\", params);\n String overProvisioningFactorStr = configs.get(\"String_Node_Str\");\n if (overProvisioningFactorStr != null) {\n _overProvisioningFactor = Float.parseFloat(overProvisioningFactorStr);\n }\n _retry = NumbersUtil.parseInt(configs.get(Config.StartRetry.key()), 10);\n _pingInterval = NumbersUtil.parseInt(configs.get(\"String_Node_Str\"), 60);\n _hostRetry = NumbersUtil.parseInt(configs.get(\"String_Node_Str\"), 2);\n _snapshotTimeout = NumbersUtil.parseInt(Config.CmdsWait.key(), 2 * 60 * 60 * 1000);\n _storagePoolAcquisitionWaitSeconds = NumbersUtil.parseInt(configs.get(\"String_Node_Str\"), 1800);\n s_logger.info(\"String_Node_Str\" + _storagePoolAcquisitionWaitSeconds + \"String_Node_Str\");\n _agentMgr.registerForHostEvents(new StoragePoolMonitor(this, _storagePoolDao), true, false, true);\n String storageCleanupEnabled = configs.get(\"String_Node_Str\");\n _storageCleanupEnabled = (storageCleanupEnabled == null) ? true : Boolean.parseBoolean(storageCleanupEnabled);\n String time = configs.get(\"String_Node_Str\");\n _storageCleanupInterval = NumbersUtil.parseInt(time, 86400);\n String workers = configs.get(\"String_Node_Str\");\n int wrks = NumbersUtil.parseInt(workers, 10);\n _executor = Executors.newScheduledThreadPool(wrks, new NamedThreadFactory(\"String_Node_Str\"));\n boolean localStorage = Boolean.parseBoolean(configs.get(Config.UseLocalStorage.key()));\n if (localStorage) {\n _agentMgr.registerForHostEvents(ComponentLocator.inject(LocalStoragePoolListener.class), true, false, false);\n }\n String maxVolumeSizeInGbString = configDao.getValue(\"String_Node_Str\");\n _maxVolumeSizeInGb = NumbersUtil.parseInt(maxVolumeSizeInGbString, 2000);\n HostTemplateStatesSearch = _vmTemplateHostDao.createSearchBuilder();\n HostTemplateStatesSearch.and(\"String_Node_Str\", HostTemplateStatesSearch.entity().getTemplateId(), SearchCriteria.Op.EQ);\n HostTemplateStatesSearch.and(\"String_Node_Str\", HostTemplateStatesSearch.entity().getDownloadState(), SearchCriteria.Op.EQ);\n SearchBuilder<HostVO> HostSearch = _hostDao.createSearchBuilder();\n HostSearch.and(\"String_Node_Str\", HostSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ);\n HostTemplateStatesSearch.join(\"String_Node_Str\", HostSearch, HostSearch.entity().getId(), HostTemplateStatesSearch.entity().getHostId(), JoinBuilder.JoinType.INNER);\n HostSearch.done();\n HostTemplateStatesSearch.done();\n _serverId = ((ManagementServer) ComponentLocator.getComponent(ManagementServer.Name)).getId();\n UpHostsInPoolSearch = _storagePoolHostDao.createSearchBuilder(Long.class);\n UpHostsInPoolSearch.selectField(UpHostsInPoolSearch.entity().getHostId());\n SearchBuilder<HostVO> hostSearch = _hostDao.createSearchBuilder();\n hostSearch.and(\"String_Node_Str\", hostSearch.entity().getStatus(), Op.EQ);\n UpHostsInPoolSearch.join(\"String_Node_Str\", hostSearch, hostSearch.entity().getId(), UpHostsInPoolSearch.entity().getHostId(), JoinType.INNER);\n UpHostsInPoolSearch.and(\"String_Node_Str\", UpHostsInPoolSearch.entity().getPoolId(), Op.EQ);\n UpHostsInPoolSearch.done();\n return true;\n}\n"
"protected NamedObj _getDestination(String name) throws IllegalActionException {\n Transition transition = (Transition) getContainer();\n if (transition == null) {\n throw new IllegalActionException(this, \"String_Node_Str\");\n }\n Entity fsm = (Entity) transition.getContainer();\n if (fsm == null) {\n throw new IllegalActionException(this, transition, \"String_Node_Str\");\n }\n IOPort port = (IOPort) fsm.getPort(name);\n if (port == null) {\n Attribute var = fsm.getAttribute(name);\n if (var == null) {\n int period = name.indexOf(\"String_Node_Str\");\n if (period > 0) {\n String refinementName = name.substring(0, period);\n String entryName = name.substring(period + 1);\n Nameable fsmContainer = fsm.getContainer();\n if (fsmContainer instanceof CompositeEntity) {\n Entity refinement = ((CompositeEntity) fsmContainer).getEntity(refinementName);\n if (refinement != null) {\n Attribute entry = refinement.getAttribute(entryName);\n if (entry instanceof Variable) {\n return entry;\n }\n }\n }\n }\n throw new IllegalActionException(fsm, this, \"String_Node_Str\" + name);\n } else {\n if (!(var instanceof Variable)) {\n throw new IllegalActionException(fsm, this, \"String_Node_Str\" + name + \"String_Node_Str\" + \"String_Node_Str\");\n }\n return var;\n }\n } else {\n if (!port.isOutput()) {\n throw new IllegalActionException(fsm, this, \"String_Node_Str\" + name);\n }\n return port;\n }\n}\n"
"private boolean isIgnoreable(Throwable ex, final String message) {\n if (\"String_Node_Str\".equals(ex.getClass().getName()))\n return true;\n if (message == null)\n return false;\n final String msg = message.toLowerCase();\n if (scan(msg, 1784, \"String_Node_Str\"))\n return true;\n if (scan(msg, 10053, \"String_Node_Str\"))\n return true;\n if (scan(msg, 10054, \"String_Node_Str\"))\n return true;\n if (scan(msg, 10061, \"String_Node_Str\"))\n return true;\n if (scan(msg, 10064, \"String_Node_Str\"))\n return true;\n if (scan(msg, 10065, \"String_Node_Str\"))\n return true;\n if (scan(msg, 10004, \"String_Node_Str\"))\n return true;\n if (scan(msg, 10050, \"String_Node_Str\"))\n return true;\n if (scan(msg, 10052, \"String_Node_Str\"))\n return true;\n if (scan(msg, 10051, \"String_Node_Str\"))\n return true;\n if (scan(msg, 10055, \"String_Node_Str\"))\n return true;\n if (scan(msg, 10060, \"String_Node_Str\"))\n return true;\n if (scan(msg, 10035, \"String_Node_Str\"))\n return true;\n if (scan(msg, 11001, \"String_Node_Str\"))\n return true;\n if (scan(msg, 10091, \"String_Node_Str\"))\n return true;\n if (scan(msg, 10107, null))\n return true;\n if (scan(msg, -1, \"String_Node_Str\"))\n return true;\n if (scan(msg, -1, \"String_Node_Str\"))\n return true;\n if (scan(msg, -1, \"String_Node_Str\"))\n return true;\n if (scan(msg, -1, \"String_Node_Str\"))\n return true;\n if (msg.indexOf(\"String_Node_Str\") > -1)\n return true;\n return false;\n}\n"
"public WalkInfo buildTreeWalk() {\n WalkInfo info = new WalkInfo();\n info.fullSchema = resolveFullSchema();\n info.nativeFilter = resolveNativeFilter();\n info.requiredProperties = resolveRequiredProperties(info.nativeFilter);\n final ObjectId featureTypeId = typeRef.getMetadataId();\n final ObjectId oldFeatureTypeTree;\n final ObjectId newFeatureTypeTree;\n final ObjectStore treeSource;\n {\n final String nativeTypeName = nativeSchema.getTypeName();\n final GeometryDescriptor geometryAttribute = nativeSchema.getGeometryDescriptor();\n final Optional<Index> oldHeadIndex;\n final Optional<Index> headIndex;\n final Optional<NodeRef> oldCanonicalTree = resolveCanonicalTree(oldHeadRef, nativeTypeName);\n final Optional<NodeRef> newCanonicalTree = resolveCanonicalTree(headRef, nativeTypeName);\n final ObjectId oldCanonicalTreeId = oldCanonicalTree.isPresent() ? oldCanonicalTree.get().getObjectId() : RevTree.EMPTY_TREE_ID;\n final ObjectId newCanonicalTreeId = newCanonicalTree.isPresent() ? newCanonicalTree.get().getObjectId() : RevTree.EMPTY_TREE_ID;\n Optional<Index>[] indexes;\n final boolean ignoreIndex = geometryAttribute == null || this.ignoreIndex || info.nativeFilter instanceof Id;\n if (ignoreIndex) {\n indexes = NO_INDEX;\n } else {\n indexes = resolveIndex(oldCanonicalTreeId, newCanonicalTreeId, nativeTypeName, geometryAttribute.getLocalName());\n }\n oldHeadIndex = indexes[0];\n headIndex = indexes[1];\n checkState(!(oldHeadIndex.isPresent() || headIndex.isPresent()) || headIndex.get().info().equals(oldHeadIndex.get().info()));\n if (oldHeadIndex.isPresent()) {\n oldFeatureTypeTree = oldHeadIndex.get().indexTreeId();\n newFeatureTypeTree = headIndex.get().indexTreeId();\n } else {\n oldFeatureTypeTree = oldCanonicalTreeId;\n newFeatureTypeTree = newCanonicalTreeId;\n }\n info.materializedIndexProperties = resolveMaterializedProperties(headIndex);\n PrePostFilterSplitter filterSplitter;\n filterSplitter = new PrePostFilterSplitter().extraAttributes(info.materializedIndexProperties).filter(info.nativeFilter).build();\n info.preFilter = filterSplitter.getPreFilter();\n info.postFilter = filterSplitter.getPostFilter();\n info.indexContainsAllRequiredProperties = info.materializedIndexProperties.containsAll(info.requiredProperties);\n info.filterIsFullySupportedByIndex = Filter.INCLUDE.equals(info.postFilter);\n treeSource = headIndex.isPresent() ? repo.indexDatabase() : repo.objectDatabase();\n }\n info.diffOp = repo.command(DiffTree.class);\n info.diffOp.setDefaultMetadataId(featureTypeId).setPreserveIterationOrder(shallPreserveIterationOrder()).setPathFilter(createFidFilter(info.nativeFilter)).setCustomFilter(createIndexPreFilter(info.preFilter, info.filterIsFullySupportedByIndex)).setChangeTypeFilter(resolveChangeType()).setOldTree(oldFeatureTypeTree).setNewTree(newFeatureTypeTree).setLeftSource(treeSource).setRightSource(treeSource).recordStats();\n return info;\n}\n"
"protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {\n requestListsIfNeeded();\n populatePlayers();\n enableButtons();\n long currentRF = GenericEnergyStorageTileEntity.getCurrentRF();\n energyBar.setValue(currentRF);\n tileEntity.requestRfFromServer(RFTools.MODID);\n drawWindow();\n}\n"
"public void after() {\n try {\n server.stopServer();\n } catch (final Exception e) {\n throw new TestUtilRuntimeException(e);\n }\n}\n"
"private void fillDimensionIDTypeCombo() {\n ArrayList<IDType> tempIDTypes = dimensionIDCategory.getIdTypes();\n dimensionIDTypes.clear();\n for (IDType idType : tempIDTypes) {\n if (!idType.isInternalType())\n dimensionIDTypes.add(idType);\n }\n String[] idTypesAsString = new String[dimensionIDTypes.size()];\n int index = 0;\n for (IDType idType : dimensionIDTypes) {\n idTypesAsString[index] = idType.getTypeName();\n index++;\n }\n dimensionIDCombo.setItems(idTypesAsString);\n dimensionIDCombo.setEnabled(true);\n dimensionIDCombo.select(0);\n}\n"
"private void writeOut(List<String[]> list, OutputStream os) throws IOException {\n BufferedWriter writer = null;\n try {\n writer = new BufferedWriter(new OutputStreamWriter(os));\n for (String[] s : list) {\n writer.write(StrArray.Join(s, delimiter));\n writer.write(System.lineSeparator());\n }\n writer.flush();\n } catch (IOException io) {\n log.log(Level.SEVERE, \"String_Node_Str\" + os.toString(), io);\n } finally {\n if (writer != null) {\n try {\n writer.close();\n } catch (Exception e) {\n }\n }\n }\n}\n"
"protected void setupForm() {\n String line1 = \"String_Node_Str\";\n String line2 = \"String_Node_Str\";\n String line3 = \"String_Node_Str\";\n String line4 = \"String_Node_Str\";\n String line5 = \"String_Node_Str\";\n String allLines = line1 + line2 + line3 + line4 + line5;\n ByteArrayInputStream stream = new ByteArrayInputStream(allLines.getBytes());\n super.setupForm();\n DataComponent paramComponent = new DataComponent();\n paramComponent.setDescription(\"String_Node_Str\");\n paramComponent.setName(\"String_Node_Str\");\n paramComponent.setId(paramsCompId);\n form.addComponent(paramComponent);\n Entry fileEntry = new Entry() {\n protected void setup() {\n allowedValueType = AllowedValueType.File;\n return;\n }\n };\n fileEntry.setId(1);\n fileEntry.setName(WaveEntryName);\n fileEntry.setDescription(\"String_Node_Str\");\n paramComponent.addEntry(fileEntry);\n Entry numLayersEntry = new Entry() {\n protected void setup() {\n allowedValueType = AllowedValueType.Continuous;\n allowedValues.add(\"String_Node_Str\");\n allowedValues.add(\"String_Node_Str\");\n return;\n }\n };\n numLayersEntry.setId(2);\n numLayersEntry.setName(RoughnessEntryName);\n numLayersEntry.setDescription(\"String_Node_Str\" + \"String_Node_Str\");\n paramComponent.addEntry(numLayersEntry);\n Entry deltaQ0Entry = new Entry() {\n protected void setup() {\n allowedValueType = AllowedValueType.Continuous;\n allowedValues.add(\"String_Node_Str\");\n allowedValues.add(\"String_Node_Str\");\n return;\n }\n };\n deltaQ0Entry.setId(3);\n deltaQ0Entry.setName(deltaQ0EntryName);\n deltaQ0Entry.setDescription(\"String_Node_Str\");\n paramComponent.addEntry(deltaQ0Entry);\n Entry deltaQ1Entry = new Entry() {\n protected void setup() {\n allowedValueType = AllowedValueType.Continuous;\n allowedValues.add(\"String_Node_Str\");\n allowedValues.add(\"String_Node_Str\");\n return;\n }\n };\n deltaQ1Entry.setId(4);\n deltaQ1Entry.setName(deltaQ1ByQEntryName);\n deltaQ1Entry.setDescription(\"String_Node_Str\");\n paramComponent.addEntry(deltaQ1Entry);\n Entry waveEntry = new Entry() {\n protected void setup() {\n allowedValueType = AllowedValueType.Continuous;\n allowedValues.add(\"String_Node_Str\");\n allowedValues.add(\"String_Node_Str\");\n return;\n }\n };\n waveEntry.setId(5);\n waveEntry.setName(WaveLengthEntryName);\n waveEntry.setDescription(\"String_Node_Str\");\n paramComponent.addEntry(waveEntry);\n ArrayList<String> names = new ArrayList<String>();\n names.add(\"String_Node_Str\");\n names.add(\"String_Node_Str\");\n names.add(\"String_Node_Str\");\n names.add(Material.SCAT_LENGTH_DENSITY);\n names.add(Material.MASS_ABS_COHERENT);\n names.add(Material.MASS_ABS_INCOHERENT);\n MaterialWritableTableFormat format = new MaterialWritableTableFormat(names);\n ListComponent<Material> matList = new ListComponent<Material>();\n matList.setId(matListId);\n matList.setName(\"String_Node_Str\");\n matList.setDescription(\"String_Node_Str\");\n matList.setTableFormat(format);\n fillMaterialList(matList);\n form.addComponent(matList);\n ResourceComponent resources = new ResourceComponent();\n resources.setName(\"String_Node_Str\");\n resources.setDescription(\"String_Node_Str\");\n resources.setId(resourceCompId);\n form.addComponent(resources);\n if (project != null) {\n String basename = \"String_Node_Str\" + getId() + \"String_Node_Str\";\n IFile reflectivityFile = project.getFile(basename + \"String_Node_Str\");\n IFile scatteringFile = project.getFile(basename + \"String_Node_Str\");\n try {\n if (!reflectivityFile.exists()) {\n reflectivityFile.create(stream, true, null);\n stream.reset();\n }\n reflectivityFile.create(stream, true, null);\n if (scatteringFile.exists()) {\n scatteringFile.delete(true, null);\n }\n stream.reset();\n scatteringFile.create(stream, true, null);\n VizResource reflectivitySource = new VizResource(reflectivityFile.getLocation().toFile());\n reflectivitySource.setName(\"String_Node_Str\");\n reflectivitySource.setId(1);\n reflectivitySource.setDescription(\"String_Node_Str\");\n VizResource scatDensitySource = new VizResource(scatteringFile.getLocation().toFile());\n scatDensitySource.setName(\"String_Node_Str\");\n scatDensitySource.setId(2);\n scatDensitySource.setDescription(\"String_Node_Str\" + \"String_Node_Str\");\n resources.addResource(reflectivitySource);\n resources.addResource(scatDensitySource);\n } catch (CoreException | IOException e) {\n System.err.println(\"String_Node_Str\" + \"String_Node_Str\");\n e.printStackTrace();\n }\n }\n allowedActions.add(0, processActionName);\n return;\n}\n"
"public void start() {\n if (isGooglePlayServicesValid()) {\n initializeDriverThread();\n initializeBgHandler();\n } else {\n Log.e(TAG, \"String_Node_Str\");\n }\n}\n"
"private IntrinsicModel modelOf(CharSequence seq, String preferredColumn) throws ParserException {\n lexer.setContent(seq);\n p.parseExpr(lexer, ast);\n return e.extract(new AliasTranslator() {\n public CharSequence translateAlias(CharSequence column) {\n return column;\n }\n }, ast.poll(), w.getMetadata(), preferredColumn, w.getMetadata().getTimestampIndex());\n}\n"
"public void setup() {\n expected = new QrCodeEncoder().setVersion(2).setError(QrCode.ErrorLevel.H).setMask(QrCodeMaskPattern.M010).numeric(message).fixate();\n}\n"
"public void testLifeCycleNew() throws Exception {\n Content content = mock(Content.class);\n when(sequenceIterator.hasNext()).thenReturn(true).thenReturn(true).thenReturn(false);\n when(sequenceIterator.next()).thenReturn(optional).thenReturn(optional).thenReturn(null);\n when(channelUtils.getLatestSequence(URL)).thenReturn(Optional.<Long>absent());\n replicator.verifyRemoteChannel();\n replicator.runWithLock();\n verify(channelService).createChannel(configuration);\n verify(channelService, new Times(2)).insert(CHANNEL, content);\n}\n"
"public static List<GraphTargetItem> actionsPartToTree(HashMap<Integer, String> registerNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions, Stack<GraphTargetItem> stack, List<Action> actions, int start, int end, int version, int staticOperation, String path) {\n if (start < actions.size() && (end > 0) && (start > 0)) {\n log(\"String_Node_Str\" + start + \"String_Node_Str\" + end + (actions.size() > 0 ? (\"String_Node_Str\" + actions.get(start).toString() + \"String_Node_Str\" + actions.get(end == actions.size() ? end - 1 : end) + \"String_Node_Str\") : \"String_Node_Str\"));\n }\n List<Object> localData = new ArrayList<>();\n localData.add(registerNames);\n localData.add(variables);\n localData.add(functions);\n List<GraphTargetItem> output = new ArrayList<>();\n int ip = start;\n boolean isWhile = false;\n boolean isForIn = false;\n GraphTargetItem inItem = null;\n int loopStart = 0;\n loopip: while (ip <= end) {\n long addr = ip2adr(actions, ip, version);\n if (ip > end) {\n break;\n }\n if (ip >= actions.size()) {\n output.add(new ScriptEndItem());\n break;\n }\n Action action = actions.get(ip);\n if (action.isIgnored()) {\n ip++;\n continue;\n }\n if (action instanceof GraphSourceItemContainer) {\n GraphSourceItemContainer cnt = (GraphSourceItemContainer) action;\n long endAddr = action.getAddress() + cnt.getHeaderSize();\n String cntName = cnt.getName();\n List<List<GraphTargetItem>> outs = new ArrayList<>();\n for (long size : cnt.getContainerSizes()) {\n if (size == 0) {\n outs.add(new ArrayList<GraphTargetItem>());\n continue;\n }\n List<GraphTargetItem> out;\n try {\n out = ActionGraph.translateViaGraph(cnt.getRegNames(), variables2, functions, actions.subList(adr2ip(actions, endAddr, version), adr2ip(actions, endAddr + size, version)), version, staticOperation, path + (cntName == null ? \"String_Node_Str\" : \"String_Node_Str\" + cntName));\n } catch (Exception | OutOfMemoryError | StackOverflowError ex2) {\n Logger.getLogger(Action.class.getName()).log(Level.SEVERE, \"String_Node_Str\", ex2);\n if (ex2 instanceof OutOfMemoryError) {\n System.gc();\n }\n out = new ArrayList<>();\n out.add(new CommentItem(\"String_Node_Str\" + ex2.getClass().getSimpleName() + \"String_Node_Str\"));\n }\n outs.add(out);\n endAddr += size;\n }\n ((GraphSourceItemContainer) action).translateContainer(outs, stack, output, registerNames, variables, functions);\n ip = adr2ip(actions, endAddr, version);\n continue;\n }\n if ((action instanceof ActionPush) && (((ActionPush) action).values.size() == 1) && (((ActionPush) action).values.get(0) instanceof Null)) {\n if (ip + 3 <= end) {\n if ((actions.get(ip + 1) instanceof ActionEquals) || (actions.get(ip + 1) instanceof ActionEquals2)) {\n if (actions.get(ip + 2) instanceof ActionNot) {\n if (actions.get(ip + 3) instanceof ActionIf) {\n ActionIf aif = (ActionIf) actions.get(ip + 3);\n if (adr2ip(actions, ip2adr(actions, ip + 4, version) + aif.getJumpOffset(), version) == ip) {\n ip += 4;\n continue;\n }\n }\n }\n }\n }\n }\n if (false) {\n } else {\n try {\n action.translate(localData, stack, output, staticOperation, path);\n } catch (EmptyStackException ese) {\n Logger.getLogger(Action.class.getName()).log(Level.SEVERE, null, ese);\n output.add(new UnsupportedActionItem(action, \"String_Node_Str\"));\n }\n }\n ip++;\n }\n log(\"String_Node_Str\" + start + \"String_Node_Str\" + end);\n return output;\n}\n"
"private View initFragment(LayoutInflater inflater, ViewGroup container) {\n if (mViewDataBinding == null) {\n mContext = getActivity();\n mViewDataBinding = DataBindingUtil.inflate(inflater, getLayoutId(), container, false);\n mViewModel = TUtil.getT(this, 0);\n M model = TUtil.getT(this, 1);\n if (mViewModel != null) {\n mViewModel.setModel(model);\n mViewModel.setContext(mContext);\n try {\n Method setModel = mViewModel.getClass().getDeclaredMethod(\"String_Node_Str\", model.getClass().getSuperclass());\n Method attachView = mViewModel.getClass().getDeclaredMethod(\"String_Node_Str\", this.getClass().getInterfaces());\n setModel.invoke(mViewModel, model);\n attachView.invoke(mViewModel, this);\n } catch (Exception e) {\n }\n }\n if (model != null) {\n model.attachViewModel(mViewModel);\n }\n mViewDataBinding.setVariable(getBR(), mViewModel);\n initView();\n } else {\n if (mViewDataBinding.getRoot().getParent() != null) {\n ((ViewGroup) mViewDataBinding.getRoot().getParent()).removeView(mViewDataBinding.getRoot());\n }\n }\n return mViewDataBinding.getRoot();\n}\n"
"public IComplexNDArray get(NDArrayIndex... indexes) {\n return (IComplexNDArray) super.get(indexes);\n}\n"
"public void getTicketsById() throws Exception {\n createClientWithTokenOrPassword();\n long count = 24;\n for (Ticket t : instance.getTickets(24, 26, 28)) {\n assertThat(t.getSubject(), notNullValue());\n assertThat(t.getId(), is(count));\n count += 2;\n }\n assertThat(count, is(28L));\n}\n"
"public static SolrInputDocument riskToSolrDocument(Risk risk, int incidences) {\n SolrInputDocument doc = new SolrInputDocument();\n doc.addField(RodaConstants.INDEX_UUID, risk.getId());\n doc.addField(RodaConstants.RISK_ID, risk.getId());\n doc.addField(RodaConstants.RISK_NAME, risk.getName());\n doc.addField(RodaConstants.RISK_DESCRIPTION, risk.getDescription());\n doc.addField(RodaConstants.RISK_IDENTIFIED_ON, risk.getIdentifiedOn());\n doc.addField(RodaConstants.RISK_IDENTIFIED_BY, risk.getIdentifiedBy());\n doc.addField(RodaConstants.RISK_CATEGORY, risk.getCategory());\n doc.addField(RodaConstants.RISK_NOTES, risk.getNotes());\n doc.addField(RodaConstants.RISK_PRE_MITIGATION_PROBABILITY, risk.getPreMitigationProbability());\n doc.addField(RodaConstants.RISK_PRE_MITIGATION_IMPACT, risk.getPreMitigationImpact());\n doc.addField(RodaConstants.RISK_PRE_MITIGATION_SEVERITY, risk.getPreMitigationSeverity());\n doc.addField(RodaConstants.RISK_PRE_MITIGATION_SEVERITY_LEVEL, risk.getPreMitigationSeverityLevel().toString());\n doc.addField(RodaConstants.RISK_PRE_MITIGATION_NOTES, risk.getPreMitigationNotes());\n doc.addField(RodaConstants.RISK_POST_MITIGATION_PROBABILITY, risk.getPostMitigationProbability());\n doc.addField(RodaConstants.RISK_POST_MITIGATION_IMPACT, risk.getPostMitigationImpact());\n doc.addField(RodaConstants.RISK_POST_MITIGATION_SEVERITY, risk.getPostMitigationSeverity());\n if (risk.getPostMitigationSeverityLevel() != null) {\n doc.addField(RodaConstants.RISK_POST_MITIGATION_SEVERITY_LEVEL, risk.getPostMitigationSeverityLevel().toString());\n }\n doc.addField(RodaConstants.RISK_CURRENT_SEVERITY_LEVEL, risk.getCurrentSeverityLevel().toString());\n doc.addField(RodaConstants.RISK_POST_MITIGATION_NOTES, risk.getPostMitigationNotes());\n doc.addField(RodaConstants.RISK_MITIGATION_STRATEGY, risk.getMitigationStrategy());\n doc.addField(RodaConstants.RISK_MITIGATION_OWNER_TYPE, risk.getMitigationOwnerType());\n doc.addField(RodaConstants.RISK_MITIGATION_OWNER, risk.getMitigationOwner());\n doc.addField(RodaConstants.RISK_MITIGATION_RELATED_EVENT_IDENTIFIER_TYPE, risk.getMitigationRelatedEventIdentifierType());\n doc.addField(RodaConstants.RISK_MITIGATION_RELATED_EVENT_IDENTIFIER_VALUE, risk.getMitigationRelatedEventIdentifierValue());\n doc.addField(RodaConstants.RISK_CREATED_ON, risk.getCreatedOn());\n doc.addField(RodaConstants.RISK_CREATED_BY, risk.getCreatedBy());\n doc.addField(RodaConstants.RISK_UPDATED_ON, risk.getUpdatedOn());\n doc.addField(RodaConstants.RISK_UPDATED_BY, risk.getUpdatedBy());\n if (risk instanceof IndexedRisk) {\n doc.addField(RodaConstants.RISK_INCIDENCES_COUNT, ((IndexedRisk) risk).getIncidencesCount());\n doc.addField(RodaConstants.RISK_UNMITIGATED_INCIDENCES_COUNT, ((IndexedRisk) risk).getUnmitigatedIncidencesCount());\n } else {\n doc.addField(RodaConstants.RISK_INCIDENCES_COUNT, incidences);\n doc.addField(RodaConstants.RISK_UNMITIGATED_INCIDENCES_COUNT, incidences);\n }\n return doc;\n}\n"