content
stringlengths 40
137k
|
---|
"private void except(Tree tree) {\n if (tree.is(Tree.Kind.EMPTY_STATEMENT)) {\n exceptedStatements.add((EmptyStatementTree) tree);\n }\n}\n"
|
"public boolean createCatalogSubcategory(Selenium browser, String path, String name, String description) {\n if (!functionalUtil.openSite(browser, FunctionalUtil.OlatSite.LEARNING_RESOURCES)) {\n return (false);\n }\n if (!openActionByMenuTree(browser, RepositorySiteAction.CATALOG)) {\n return (false);\n }\n String[] selectors = createCatalogSelectors(path);\n if (selectors != null) {\n for (String currentSelector : selectors) {\n functionalUtil.waitForPageToLoadElement(browser, currentSelector);\n browser.click(currentSelector);\n }\n functionalUtil.waitForPageToUnloadElement(browser, selectors[selectors.length - 1]);\n }\n functionalUtil.waitForPageToUnloadElement(browser, selectors[selectors.length - 1]);\n StringBuffer selectorBuffer = new StringBuffer();\n selectorBuffer.append(\"String_Node_Str\").append(getCatalogAddSubcategoryCss()).append(\"String_Node_Str\");\n browser.click(selectorBuffer.toString());\n selectorBuffer = new StringBuffer();\n selectorBuffer.append(\"String_Node_Str\").append(getCatalogAddSubcategoryPopupCss()).append(\"String_Node_Str\");\n functionalUtil.waitForPageToLoadElement(browser, selectorBuffer.toString());\n browser.type(selectorBuffer.toString(), name);\n selectorBuffer = new StringBuffer();\n selectorBuffer.append(\"String_Node_Str\").append(getCatalogAddSubcategoryPopupCss()).append(\"String_Node_Str\");\n browser.type(selectorBuffer.toString(), description);\n selectorBuffer = new StringBuffer();\n selectorBuffer.append(\"String_Node_Str\").append(getCatalogAddSubcategoryPopupCss()).append(\"String_Node_Str\").append(functionalUtil.getButtonDirtyCss()).append(\"String_Node_Str\");\n browser.click(selectorBuffer.toString());\n functionalUtil.waitForPageToUnloadElement(browser, selectorBuffer.toString());\n return (true);\n}\n"
|
"public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n Log.d(TAG, \"String_Node_Str\" + oldVersion + \"String_Node_Str\" + newVersion);\n if ((oldVersion < 2) && (newVersion >= 2)) {\n db.execSQL(StoryMakerDB.Schema.Projects.UPDATE_TABLE_PROJECTS);\n }\n if ((oldVersion < 3) && (newVersion == 3)) {\n db.execSQL(StoryMakerDB.Schema.Media.UPDATE_TABLE_MEDIA_ADD_TRIM_START);\n db.execSQL(StoryMakerDB.Schema.Media.UPDATE_TABLE_MEDIA_ADD_TRIM_END);\n db.execSQL(StoryMakerDB.Schema.Media.UPDATE_TABLE_MEDIA_ADD_DURATION);\n }\n if ((oldVersion < 6) && (newVersion >= 6)) {\n db.execSQL(StoryMakerDB.Schema.Auth.UPDATE_TABLE_AUTH);\n db.execSQL(StoryMakerDB.Schema.Projects.UPDATE_TABLE_PROJECTS_ADD_CREATED_AT);\n db.execSQL(StoryMakerDB.Schema.Projects.UPDATE_TABLE_PROJECTS_ADD_UPDATED_AT);\n db.execSQL(StoryMakerDB.Schema.Scenes.UPDATE_TABLE_SCENES_ADD_CREATED_AT);\n db.execSQL(StoryMakerDB.Schema.Scenes.UPDATE_TABLE_SCENES_ADD_UPDATED_AT);\n db.execSQL(StoryMakerDB.Schema.Media.UPDATE_TABLE_MEDIA_ADD_CREATED_AT);\n db.execSQL(StoryMakerDB.Schema.Media.UPDATE_TABLE_MEDIA_ADD_UPDATED_AT);\n db.execSQL(StoryMakerDB.Schema.Projects.UPDATE_TABLE_PROJECTS_ADD_SECTION);\n db.execSQL(StoryMakerDB.Schema.Projects.UPDATE_TABLE_PROJECTS_ADD_LOCATION);\n db.execSQL(StoryMakerDB.Schema.Tags.UPDATE_TABLE_TAGS);\n Auth.migrate(mContext, db);\n Project.migrate(mContext, db);\n }\n}\n"
|
"public void scanAndTranslateStacksToWorld(NBTTagCompound nbt) throws MappingNotFoundException {\n if (isStackLayout(nbt)) {\n stackToWorld(nbt);\n }\n for (Object keyO : new HashSet(nbt.func_150296_c())) {\n String key = (String) keyO;\n if (nbt.getTag(key) instanceof NBTTagCompound) {\n try {\n scanAndTranslateStacksToWorld(nbt.getCompoundTag(key));\n } catch (MappingNotFoundException e) {\n nbt.removeTag(key);\n }\n }\n if (nbt.getTag(key) instanceof NBTTagList) {\n NBTTagList list = (NBTTagList) nbt.getTag(key);\n if (list.func_150303_d() == Constants.NBT.TAG_COMPOUND) {\n for (int i = list.tagCount() - 1; i >= 0; --i) {\n try {\n scanAndTranslateStacksToWorld(list.getCompoundTagAt(i));\n } catch (MappingNotFoundException e) {\n list.removeTag(i);\n }\n }\n }\n }\n }\n}\n"
|
"Entry<K, V> nextSegmentEntry() {\n while (segmentIndex >= 0) {\n Segment segment = segments[segmentIndex];\n Entry<K, V> entry = segment.getNextEntry(lastSegmentKey);\n if (entry == null) {\n segmentIndex--;\n lastSegmentKeyBytes = null;\n } else {\n lastSegmentKeyBytes = getKeyAsBytes(entry.getKey());\n return entry;\n }\n }\n return null;\n}\n"
|
"public static boolean canOpen(final Configuration conf, final String name, final Properties providerProperties) throws IOException {\n try {\n Path p = determineResourcePath(conf, name);\n FileSystem fs = HadoopFileUtils.getFileSystem(conf, p);\n return fs.exists(p);\n } catch (URISyntaxException e) {\n }\n return false;\n}\n"
|
"public String getSparqlQueryAsString(TestCase testCase) {\n return getSparqlQuery(testCase).toString();\n}\n"
|
"public String getText(Object element) {\n if (element instanceof IFile) {\n IFile file = (IFile) element;\n Pattern pattern = PatternResourceFileHelper.getInstance().findPattern(file);\n if (pattern != null) {\n return pattern.getName();\n }\n }\n if (element instanceof IFolder) {\n return ((IFolder) element).getName();\n }\n return \"String_Node_Str\";\n}\n"
|
"protected IStatus run(IProgressMonitor monitor) {\n assert (!this.jobs.isEmpty());\n monitor.beginTask(getName(), getJobs().size());\n try {\n for (PreviewVdbJob previewJob : this.jobs) {\n assert (previewJob instanceof Job);\n Job job = (Job) previewJob;\n job.setProgressGroup(monitor, 1);\n if (this.listener != null)\n job.addJobChangeListener(this.listener);\n job.schedule();\n if (this.runInSequence) {\n job.join();\n }\n if (monitor.isCanceled()) {\n throw new OperationCanceledException();\n }\n }\n } catch (OperationCanceledException e) {\n Util.log(new Status(IStatus.CANCEL, PLUGIN_ID, NLS.bind(Messages.JobCanceled, getName())));\n } catch (InterruptedException e) {\n Util.log(e);\n } finally {\n monitor.done();\n }\n return Status.OK_STATUS;\n}\n"
|
"public String[] getMethods() {\n return new String[] { METHOD_PASSWORD };\n}\n"
|
"public MetaAction build(ActionBuilder builder) {\n if (builder.getTypeSelect() < 2 && (builder.getLines() == null || builder.getLines().isEmpty())) {\n return null;\n }\n inflector = Inflector.getInstance();\n MetaAction metaAction = null;\n String xml = null;\n if (builder.getTypeSelect() == 3) {\n String[] val = buildActionView(builder);\n xml = val[1];\n metaAction = metaService.updateMetaAction(builder.getName(), \"String_Node_Str\", xml, val[0]);\n } else {\n xml = buildActionScript(builder);\n metaAction = metaService.updateMetaAction(builder.getName(), \"String_Node_Str\", xml, null);\n }\n log.debug(\"String_Node_Str\", builder.getName(), builder.getTypeSelect());\n MetaStore.clear();\n return metaAction;\n}\n"
|
"public Location teleport(Entity e) {\n if (this.counterpart != null) {\n if (!this.counterpart.isValid()) {\n PortalUtil.removePortal(this.counterpart);\n this.counterpart = null;\n PortalUtil.getCounterpartPortalFor(this);\n }\n } else {\n PortalUtil.getCounterpartPortalFor(this);\n }\n if (this.counterpart == null) {\n return null;\n }\n double destX, destY, destZ;\n float destPitch, destYaw;\n int rotateVehicleVelocity = 0;\n Vector offset = interaction.toVector().subtract(this.keyBlock.getLocation().toVector());\n Vector finalOffset;\n if (this.facingNorth) {\n if (offset.getX() < .5) {\n offset.setX(offset.getX() + 1);\n } else {\n offset.setX(offset.getX() - 1);\n }\n if (this.counterpart.isFacingNorth()) {\n destYaw = e.getLocation().getYaw();\n finalOffset = offset;\n } else {\n destYaw = e.getLocation().getYaw() - 90;\n finalOffset = new Vector(offset.getZ(), offset.getY(), -offset.getX() + 1);\n rotateVehicleVelocity = 1;\n }\n } else {\n if (offset.getZ() < .5) {\n offset.setZ(offset.getZ() + 1);\n } else {\n offset.setZ(offset.getZ() - 1);\n }\n if (this.counterpart.isFacingNorth()) {\n destYaw = e.getLocation().getYaw() + 90;\n finalOffset = new Vector(-offset.getZ() + 1, offset.getY(), offset.getX());\n rotateVehicleVelocity = 2;\n } else {\n destYaw = e.getLocation().getYaw();\n finalOffset = offset;\n }\n }\n World destWorld = this.counterpart.getKeyBlock().getWorld();\n destX = this.counterpart.getKeyBlock().getX() + finalOffset.getX();\n destY = this.counterpart.getKeyBlock().getY() + finalOffset.getY();\n destZ = this.counterpart.getKeyBlock().getZ() + finalOffset.getZ();\n destPitch = e.getLocation().getPitch();\n if (e instanceof Player && ((Player) e).isInsideVehicle() || e instanceof Vehicle) {\n destY += 1.0;\n }\n Location dest;\n dest = new Location(destWorld, destX, destY, destZ, destYaw, destPitch);\n Chunk destChunk = dest.getBlock().getChunk();\n for (int dx = -1; dx <= 1; dx++) {\n for (int dz = -1; dz <= 1; dz++) {\n destWorld.loadChunk(destChunk.getX() + dx, destChunk.getZ() + dz);\n }\n }\n Vehicle oldV = null, newV = null;\n if (e instanceof Player) {\n if (((Player) e).isInsideVehicle()) {\n oldV = ((Player) e).getVehicle();\n ((Player) e).leaveVehicle();\n }\n } else if (e instanceof StorageMinecart || e instanceof Minecart || e instanceof Boat) {\n oldV = ((Vehicle) e);\n }\n if (oldV != null) {\n if (oldV instanceof StorageMinecart) {\n newV = destWorld.spawn(dest, StorageMinecart.class);\n ((StorageMinecart) newV).getInventory().setContents(((StorageMinecart) oldV).getInventory().getContents());\n } else if (oldV instanceof Minecart) {\n newV = destWorld.spawn(dest, Minecart.class);\n } else if (oldV instanceof Boat) {\n newV = destWorld.spawn(dest, Boat.class);\n } else {\n log.warning(\"String_Node_Str\");\n }\n Vector oldVelocity = oldV.getVelocity();\n Vector newVelocity;\n switch(rotateVehicleVelocity) {\n case 1:\n newVelocity = new Vector(oldVelocity.getZ(), oldVelocity.getY(), oldVelocity.getX() * -1);\n break;\n case 2:\n newVelocity = new Vector(oldVelocity.getZ() * -1, oldVelocity.getY(), oldVelocity.getX());\n break;\n default:\n newVelocity = oldVelocity;\n break;\n }\n final Location threadDest = dest;\n final Entity threadE = e;\n final Vehicle threadOldV = oldV;\n final Vehicle threadNewV = newV;\n final Vector threadNewVelocity = newVelocity;\n Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(PortalUtil.getPlugin(), new Runnable() {\n public void run() {\n if (threadE instanceof Player) {\n if (((Player) threadE).teleport(threadDest)) {\n World destWorld = threadE.getLocation().getWorld();\n Chunk destChunk = threadE.getLocation().getBlock().getChunk();\n int x = destChunk.getX(), z = destChunk.getZ();\n for (int dx = -1; dx <= 1; dx++) {\n for (int dz = -1; dz <= 1; dz++) {\n destWorld.refreshChunk(x + dx, z + dz);\n }\n }\n } else {\n return;\n }\n }\n if (threadNewV != null) {\n if (threadE instanceof Player) {\n threadNewV.setPassenger(threadE);\n }\n threadNewV.setVelocity(threadNewVelocity);\n }\n Bukkit.getServer().getPluginManager().callEvent(new NethrarVehicleTeleportEvent(threadOldV, threadNewV));\n threadOldV.remove();\n }\n });\n } else {\n final Location threadDest = dest;\n final Entity threadE = e;\n return dest;\n }\n return null;\n}\n"
|
"private void fillTestData(TestData xml, ITDManager po) {\n for (String uniqueId : po.getUniqueIds()) {\n xml.addUniqueIds(uniqueId);\n }\n int rowCnt = 1;\n for (IDataSetPO row : po.getDataSets()) {\n TestDataRow xmlRow = xml.addNewRow();\n xmlRow.setRowCount(rowCnt++);\n for (int col = 0; col < row.getColumnCount(); col++) {\n TestDataCell xmlCell = xmlRow.addNewData();\n xmlCell.setColumnCount(colCnt++);\n xmlCell.setValue(td);\n }\n }\n}\n"
|
"public void actionPerformed(ActionEvent actionEvent) {\n final Product product = virtualBand.getProduct();\n if (product != null && product.isMultiSize()) {\n virtualBand = null;\n final Product resampledProduct = MultiSizeIssue0.maybeResample(product);\n if (resampledProduct != null) {\n final Band band = resampledProduct.getBand(virtualBand.getName());\n if (band instanceof VirtualBand) {\n virtualBand = (VirtualBand) band;\n }\n }\n }\n if (virtualBand != null) {\n PropagateUncertaintyDialog dialog = new PropagateUncertaintyDialog(virtualBand);\n dialog.show();\n }\n}\n"
|
"public static void main(String[] args) throws Exception {\n File input = new File(\"String_Node_Str\");\n File output = new File(\"String_Node_Str\");\n Dataset dataset = GDALUtil.open(input);\n Insets insets = new Insets(408, 833, 14385 - 14376, 38159 - 37443);\n int tilesize = 512;\n String format = \"String_Node_Str\";\n int width = dataset.GetRasterXSize() - insets.left - insets.right;\n int height = dataset.GetRasterYSize() - insets.top - insets.bottom;\n int levels = levelCount(width, height, tilesize);\n System.out.println(\"String_Node_Str\" + levels);\n int printWidth = width, printHeight = height;\n for (int level = levels - 1; level >= 0; level--) {\n System.out.println(\"String_Node_Str\" + level + \"String_Node_Str\" + printWidth + \"String_Node_Str\" + printHeight);\n printWidth = (printWidth + 1) / 2;\n printHeight = (printHeight + 1) / 2;\n }\n File levelDir = new File(output, String.valueOf(levels - 1));\n int xStrips = Math.max(1, tilesize / width);\n int yStrips = Math.max(1, tilesize / height);\n int rows = (height - 1) / (tilesize * xStrips) + 1;\n int cols = (width - 1) / (tilesize * yStrips) + 1;\n for (int y = 0, row = 0; y < height; y += tilesize * xStrips, row++) {\n String rowPadded = Util.paddedInt(row, 4);\n File rowDir = new File(levelDir, rowPadded);\n rowDir.mkdirs();\n for (int x = 0, col = 0; x < width; x += tilesize * yStrips, col++) {\n int w = Math.min(tilesize * yStrips / xStrips, width - x);\n int h = Math.min(tilesize * xStrips / yStrips, height - y);\n Rectangle src = new Rectangle(x + insets.left, y + insets.top, w, h);\n GDALTileParameters parameters = new GDALTileParameters(dataset, src.getSize(), src);\n GDALTile tile = new GDALTile(parameters);\n BufferedImage image = tile.getAsImage();\n File imageFile = tileFile(levelDir, row, col, format);\n ImageIO.write(image, format, imageFile);\n }\n }\n for (int level = levels - 2; level >= 0; level--) {\n int lastRows = rows;\n int lastCols = cols;\n if (cols == 1) {\n xStrips <<= 1;\n rows = (rows + 1) / 2;\n }\n if (rows == 1) {\n yStrips <<= 1;\n cols = (cols + 1) / 2;\n }\n rows = (rows + 1) / 2;\n cols = (cols + 1) / 2;\n System.out.println(\"String_Node_Str\" + level);\n System.out.println(\"String_Node_Str\" + lastRows + \"String_Node_Str\" + lastCols);\n System.out.println(\"String_Node_Str\" + rows + \"String_Node_Str\" + cols);\n System.out.println(\"String_Node_Str\" + xStrips + \"String_Node_Str\" + yStrips);\n File lastLevelDir = levelDir;\n levelDir = new File(output, String.valueOf(level));\n levelDir.mkdirs();\n int rowMultiplier = lastRows == 1 ? 0 : 1;\n int rowDivisor = lastCols == 1 ? 1 : 2;\n int colMultiplier = lastCols == 1 ? 0 : 1;\n int colDelta = lastRows == 1 ? 2 : 0;\n for (int row = 0; row < rows; row++) {\n String rowPadded = Util.paddedInt(row, 4);\n File rowDir = new File(levelDir, rowPadded);\n rowDir.mkdirs();\n int firstRow = row * 4;\n int r0 = rowMultiplier * (firstRow + 0) / rowDivisor;\n int r1 = rowMultiplier * (firstRow + 1) / rowDivisor;\n int r2 = rowMultiplier * (firstRow + 2) / rowDivisor;\n int r3 = rowMultiplier * (firstRow + 3) / rowDivisor;\n for (int col = 0; col < cols; col++) {\n int firstCol = col * (lastRows == 1 ? 4 : 2);\n int c0 = colMultiplier * (firstCol);\n int c1 = colMultiplier * (firstCol + 1);\n int c2 = colMultiplier * (firstCol + colDelta);\n int c3 = colMultiplier * (firstCol + colDelta + 1);\n File src0 = tileFile(lastLevelDir, r0, c0, format);\n File src1 = tileFile(lastLevelDir, r1, c1, format);\n File src2 = tileFile(lastLevelDir, r2, c2, format);\n File src3 = tileFile(lastLevelDir, r3, c3, format);\n File imageFile = tileFile(levelDir, row, col, format);\n BufferedImage img0 = src0.exists() ? ImageIO.read(src0) : null;\n BufferedImage img1 = src1.exists() ? ImageIO.read(src1) : null;\n BufferedImage img2 = src2.exists() ? ImageIO.read(src2) : null;\n BufferedImage img3 = src3.exists() ? ImageIO.read(src3) : null;\n int w0 = img0 == null ? 0 : (img0.getWidth() + 1) / 2;\n int w1 = img1 == null ? 0 : (img1.getWidth() + 1) / 2;\n int w2 = img2 == null ? 0 : (img2.getWidth() + 1) / 2;\n int w3 = img3 == null ? 0 : (img3.getWidth() + 1) / 2;\n int h0 = img0 == null ? 0 : (img0.getHeight() + 1) / 2;\n int h1 = img1 == null ? 0 : (img1.getHeight() + 1) / 2;\n int h2 = img2 == null ? 0 : (img2.getHeight() + 1) / 2;\n int h3 = img3 == null ? 0 : (img3.getHeight() + 1) / 2;\n int w = w0 + (lastCols == 1 ? 0 : w1) + (lastRows == 1 ? w2 + w3 : 0);\n int h = h0 + (lastRows == 1 ? 0 : h2) + (lastCols == 1 ? h1 + h3 : 0);\n BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);\n Graphics2D g = image.createGraphics();\n g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n int x = 0, y = 0;\n if (img0 != null) {\n g.drawImage(img0, x, y, w0, h0, null);\n }\n if (img1 != null) {\n x += lastCols == 1 ? 0 : w0;\n y += lastCols == 1 ? h0 : 0;\n g.drawImage(img1, x, y, w1, h1, null);\n }\n if (img2 != null) {\n x += lastCols == 1 ? 0 : lastRows == 1 ? w1 : -w0;\n y += lastCols == 1 ? h1 : lastRows == 1 ? 0 : h0;\n g.drawImage(img2, x, y, w2, h2, null);\n }\n if (img3 != null) {\n x += lastCols == 1 ? 0 : w2;\n y += lastCols == 1 ? h2 : 0;\n g.drawImage(img3, x, y, w3, h3, null);\n }\n g.dispose();\n ImageIO.write(image, format, imageFile);\n }\n }\n }\n}\n"
|
"private boolean doProcess(String idOfComponent, String appId, String instanceId) {\n ParentComponent component;\n Map<String, Group> groups;\n Map<String, ClusterDataHolder> clusterData;\n if (log.isInfoEnabled()) {\n log.info(\"String_Node_Str\" + idOfComponent + \"String_Node_Str\");\n }\n try {\n ApplicationHolder.acquireWriteLock();\n if (idOfComponent.equals(appId)) {\n component = ApplicationHolder.getApplications().getApplication(appId);\n } else {\n component = ApplicationHolder.getApplications().getApplication(appId).getGroupRecursively(idOfComponent);\n }\n groups = component.getAliasToGroupMap();\n clusterData = component.getClusterDataMap();\n if (component.isGroupScalingEnabled()) {\n } else {\n if (groups.isEmpty() && getAllClusterInSameState(clusterData, ClusterStatus.Terminating, instanceId) || clusterData.isEmpty() && getAllGroupInSameState(groups, GroupStatus.Terminating, instanceId) || getAllClusterInSameState(clusterData, ClusterStatus.Terminating, instanceId) && getAllGroupInSameState(groups, GroupStatus.Terminating, instanceId)) {\n if (component instanceof Application) {\n log.info(\"String_Node_Str\" + appId + \"String_Node_Str\" + \"String_Node_Str\" + instanceId);\n ApplicationBuilder.handleApplicationInstanceTerminatedEvent(appId, instanceId);\n return true;\n } else if (component instanceof Group) {\n if (((Group) component).getStatus(null) != GroupStatus.Terminated) {\n log.info(\"String_Node_Str\" + component.getUniqueIdentifier());\n ApplicationBuilder.handleGroupTerminatingEvent(appId, component.getUniqueIdentifier(), instanceId);\n return true;\n }\n }\n }\n }\n } finally {\n ApplicationHolder.releaseWriteLock();\n }\n return false;\n}\n"
|
"private void openNewDrawingDialog() {\n MaterialDialog.Builder builder = new MaterialDialog.Builder(this);\n builder.title(R.string.action_new_drawing).callback(getMDCallback()).positiveText(R.string.action_ok).negativeText(R.string.action_cancel).content((R.string.action_new_q));\n builder.show();\n}\n"
|
"public Raster getTile(final long tx, final long ty) throws TileNotFoundException {\n if (tx < getMinTileX() || tx > getMaxTileX() || ty < getMinTileY() || ty > getMaxTileY()) {\n final String msg = String.format(\"String_Node_Str\", tx, ty, getMinTileX(), getMinTileY(), getMaxTileX(), getMaxTileY());\n throw new TileNotFoundException(msg);\n }\n if (reader == null) {\n openReader();\n }\n return reader.get(new TileIdWritable(TMSUtils.tileid(tx, ty, getZoomlevel())));\n}\n"
|
"protected void postTableCreate(TableDescriptor tableDescriptor, Iface client) {\n String name = tableDescriptor.getName();\n try {\n client.addColumnDefinition(name, new ColumnDefinition(TEST, ACL_READ, null, false, ACL_READ, null, false));\n client.addColumnDefinition(name, new ColumnDefinition(TEST, ACL_DISCOVER, null, false, ACL_DISCOVER, null, false));\n } catch (BlurException e) {\n throw new RuntimeException(e);\n } catch (TException e) {\n throw new RuntimeException(e);\n }\n}\n"
|
"private void formatLineWithSingleSegment(LineParser lineParser, LineCoverageData lineData) {\n formattedLine.append(lineData.isCovered() ? \"String_Node_Str\" : \"String_Node_Str\");\n List<CallPoint> callPoints = lineData.getCallPoints();\n if (listOfCallPoints != null && callPoints != null) {\n formattedLine.append(\"String_Node_Str\");\n }\n formattedLine.append(\"String_Node_Str\").append(lineParser.getNumber()).append(\"String_Node_Str\");\n formattedLine.append(lineParser.getInitialElement().toString()).append(\"String_Node_Str\");\n if (lineWithCallPoints) {\n listOfCallPoints.insertListOfCallPoints(callPoints);\n formattedLine.append(listOfCallPoints.getContents());\n }\n}\n"
|
"protected boolean readBufferData(final ReadableByteChannel readableByteChannel) throws IOException {\n final ByteBuffer tempBuffer = getTempBuffer();\n if (!this.bufferDataSerializationStarted) {\n tempBuffer.clear();\n this.bufferDataSerializationStarted = true;\n }\n readableByteChannel.read(tempBuffer);\n if (tempBuffer.hasRemaining()) {\n return true;\n }\n final long offset = byteBufferToLong(tempBuffer);\n final Buffer fileBuffer = BufferFactory.createFromCheckpoint(getSizeOfBuffer(), offset, this.ownerID, this.fileBufferManager, this.distributed);\n setBuffer(fileBuffer);\n this.bufferDataSerializationStarted = false;\n return false;\n}\n"
|
"protected String buildDrillAction(IAction action, IReportContext context) {\n if (action == null || context == null)\n return null;\n String baseURL = null;\n Object renderContext = getRenderContext(context);\n if (renderContext instanceof HTMLRenderContext) {\n baseURL = ((HTMLRenderContext) renderContext).getBaseURL();\n }\n if (renderContext instanceof PDFRenderContext) {\n baseURL = ((PDFRenderContext) renderContext).getBaseURL();\n }\n if (baseURL == null)\n baseURL = IBirtConstants.VIEWER_RUN;\n StringBuffer link = new StringBuffer();\n String reportName = getReportName(context, action);\n if (reportName != null && !reportName.equals(\"String_Node_Str\")) {\n link.append(baseURL);\n link.append(reportName.toLowerCase().endsWith(\"String_Node_Str\") ? \"String_Node_Str\" : \"String_Node_Str\");\n try {\n link.append(URLEncoder.encode(reportName, ParameterAccessor.UTF_8_ENCODE));\n } catch (UnsupportedEncodingException e1) {\n }\n String format = action.getFormat();\n if (format != null && format.length() > 0) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_FORMAT, format));\n }\n if (action.getParameterBindings() != null) {\n Iterator paramsIte = action.getParameterBindings().entrySet().iterator();\n while (paramsIte.hasNext()) {\n Map.Entry entry = (Map.Entry) paramsIte.next();\n try {\n String key = (String) entry.getKey();\n Object valueObj = entry.getValue();\n if (valueObj != null) {\n String value = DataUtil.getDisplayValue(valueObj);\n link.append(ParameterAccessor.getQueryParameterString(URLEncoder.encode(key, ParameterAccessor.UTF_8_ENCODE), URLEncoder.encode(value, ParameterAccessor.UTF_8_ENCODE)));\n }\n } catch (UnsupportedEncodingException e) {\n }\n }\n if (!reportName.toLowerCase().endsWith(ParameterAccessor.SUFFIX_REPORT_DOCUMENT) && baseURL.lastIndexOf(IBirtConstants.SERVLET_PATH_FRAMESET) > 0) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_OVERWRITE, String.valueOf(true)));\n }\n }\n if (locale != null) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_LOCALE, locale.toString()));\n }\n if (isRtl) {\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_RTL, String.valueOf(isRtl)));\n }\n link.append(ParameterAccessor.getQueryParameterString(ParameterAccessor.PARAM_MASTERPAGE, String.valueOf(this.isMasterPageContent)));\n if (action.getBookmark() != null) {\n try {\n if (baseURL.lastIndexOf(IBirtConstants.SERVLET_PATH_RUN) > 0 || IBirtConstants.PDF_RENDER_FORMAT.equalsIgnoreCase(format)) {\n link.append(\"String_Node_Str\");\n } else {\n link.append(\"String_Node_Str\");\n }\n link.append(URLEncoder.encode(action.getBookmark(), ParameterAccessor.UTF_8_ENCODE));\n } catch (UnsupportedEncodingException e) {\n }\n }\n }\n return link.toString();\n}\n"
|
"public static void triggerCaching(Image.StaticDiskImage imgInfo) {\n String[] parts = imgInfo.getManifestLocation().split(\"String_Node_Str\");\n CacheImageType cache = new CacheImageType().regarding(Contexts.lookup().getRequest());\n cache.setBucket(parts[0]);\n cache.setKey(parts[1]);\n ServiceDispatcher.lookupSingle(Components.lookup(\"String_Node_Str\")).dispatch(cache);\n}\n"
|
"protected boolean traverseChildren() {\n if (last != null) {\n parent.addArea(last);\n last = null;\n if (breakAfterRelayout) {\n breakAfterRelayout = false;\n return true;\n }\n }\n boolean childBreak = false;\n if (children.size() > 0) {\n Iterator iterLM = children.iterator();\n while (iterLM.hasNext()) {\n PDFAbstractLM childLM = (PDFAbstractLM) iterLM.next();\n child = childLM;\n boolean currentBreak = childLM.layout();\n if (currentBreak) {\n childBreak = true;\n } else {\n iterLM.remove();\n }\n }\n if (childBreak) {\n return true;\n } else {\n endLine();\n }\n }\n boolean childHasNext = false;\n while (executor.hasNextChild() || unfinishedExecutor != null) {\n IReportItemExecutor childExecutor = null;\n if (unfinishedExecutor != null) {\n childExecutor = unfinishedExecutor;\n unfinishedExecutor = null;\n } else {\n childExecutor = executor.getNextChild();\n }\n assert (childExecutor != null);\n childHasNext = handleChild(childExecutor) || childHasNext;\n if (childHasNext) {\n if (lineFinished) {\n return true;\n }\n }\n }\n return childHasNext;\n}\n"
|
"public void performTest(Database database) throws JDBCException {\n if (!database.supportsInitiallyDeferrableColumns()) {\n return;\n }\n String foreignKeyName = \"String_Node_Str\";\n ForeignKeyConstraint fkConstraint = new ForeignKeyConstraint(foreignKeyName, TABLE_NAME + \"String_Node_Str\");\n fkConstraint.setDeferrable(true);\n fkConstraint.setInitiallyDeferred(true);\n CreateTableStatement statement = new CreateTableStatement(TABLE_NAME).addPrimaryKeyColumn(\"String_Node_Str\", \"String_Node_Str\").addColumn(\"String_Node_Str\", \"String_Node_Str\").addColumn(\"String_Node_Str\", \"String_Node_Str\", fkConstraint);\n new JdbcTemplate(database).execute(statement);\n DatabaseSnapshot snapshot = new DatabaseSnapshot(database);\n Table table = snapshot.getTable(TABLE_NAME);\n assertEquals(TABLE_NAME.toUpperCase(), table.getName().toUpperCase());\n assertNotNull(table.getColumn(\"String_Node_Str\"));\n ForeignKey foundForeignKey = snapshot.getForeignKey(foreignKeyName);\n assertNotNull(foundForeignKey);\n assertEquals(TABLE_NAME, foundForeignKey.getPrimaryKeyTable().getName().toUpperCase());\n assertEquals(\"String_Node_Str\", foundForeignKey.getPrimaryKeyColumn().toUpperCase());\n assertEquals(TABLE_NAME, foundForeignKey.getForeignKeyTable().getName().toUpperCase());\n assertEquals(\"String_Node_Str\", foundForeignKey.getForeignKeyColumn().toUpperCase());\n assertTrue(foundForeignKey.isDeferrable());\n assertTrue(foundForeignKey.isInitiallyDeferred());\n}\n"
|
"public void setMarginsRelative(int start, int top, int end, int bottom) {\n startMargin = start;\n topMargin = top;\n endMargin = end;\n bottomMargin = bottom;\n mNeedResolution = true;\n}\n"
|
"public static void main(final String[] args) throws IOException, JDOMException, SpimDataException {\n final String projectFolder = \"String_Node_Str\";\n final String bdvFile = \"String_Node_Str\";\n final MamutProject project = new MamutProject(new File(projectFolder), new File(bdvFile));\n final Model model = new Model();\n model.loadRaw(project);\n final Context context = new Context(MamutFeatureComputerService.class);\n final MamutFeatureComputerService featureComputerService = context.getService(MamutFeatureComputerService.class);\n final Set<FeatureComputer<Model>> featureComputers = new HashSet<>(featureComputerService.getFeatureComputers());\n final ProgressListener pl = new ProgressListener() {\n public void showStatus(final String string) {\n System.out.println(\"String_Node_Str\" + string);\n }\n public void showProgress(final int current, final int total) {\n }\n public void clearStatus() {\n }\n };\n System.out.println(\"String_Node_Str\");\n final boolean computed = featureComputerService.compute(model, model.getFeatureModel(), featureComputers, pl);\n if (!computed) {\n System.err.println(\"String_Node_Str\");\n return;\n }\n final File target = new File(\"String_Node_Str\");\n MamutExporter.export(target, model, project);\n final Model importedModel = new Model();\n TrackMateImporter.importModel(target, importedModel);\n System.out.println(MastodonUtil.dump(importedModel));\n}\n"
|
"public static Result addPost(Long anyId, String target) {\n Account account = Component.currentAccount();\n Form<Post> filledForm = postForm.bindFromRequest();\n if (target.equals(Post.GROUP)) {\n Group group = Group.findById(anyId);\n if (Secured.isMemberOfGroup(group, account)) {\n if (filledForm.hasErrors()) {\n flash(\"String_Node_Str\", Messages.get(\"String_Node_Str\"));\n } else {\n final Post post = filledForm.get();\n post.owner = Component.currentAccount();\n post.group = group;\n post.create();\n NotificationService.getInstance().createNotification(post, Post.GROUP);\n }\n } else {\n flash(\"String_Node_Str\", Messages.get(\"String_Node_Str\"));\n }\n return redirect(controllers.routes.GroupController.view(group.id, PAGE));\n }\n if (target.equals(Post.PROFILE)) {\n Account profile = Account.findById(anyId);\n if (Secured.isFriend(profile) || profile.equals(account) || Secured.isAdmin()) {\n if (filledForm.hasErrors()) {\n flash(\"String_Node_Str\", Messages.get(\"String_Node_Str\"));\n } else {\n Post post = filledForm.get();\n post.account = profile;\n post.owner = account;\n post.create();\n if (!account.equals(profile)) {\n NotificationService.getInstance().createNotification(post, Post.PROFILE);\n }\n }\n return redirect(controllers.routes.ProfileController.stream(anyId, PAGE));\n }\n flash(\"String_Node_Str\", Messages.get(\"String_Node_Str\"));\n return redirect(controllers.routes.ProfileController.stream(anyId, PAGE));\n }\n if (target.equals(Post.STREAM)) {\n Account profile = Account.findById(anyId);\n if (profile.equals(account)) {\n if (filledForm.hasErrors()) {\n flash(\"String_Node_Str\", Messages.get(\"String_Node_Str\"));\n } else {\n Post post = filledForm.get();\n post.account = profile;\n post.owner = account;\n post.create();\n }\n return redirect(controllers.routes.Application.stream(PAGE));\n }\n flash(\"String_Node_Str\", Messages.get(\"String_Node_Str\"));\n return redirect(controllers.routes.Application.stream(PAGE));\n }\n return redirect(controllers.routes.Application.index());\n}\n"
|
"private Region3i clearLight(int x, int y, int z, int oldLightLevel, Block type) {\n int checkExtent = (oldLightLevel > 0) ? oldLightLevel - 1 : 0;\n List<Vector3i> lightSources = Lists.newArrayList();\n Region3i region = Region3i.createFromCenterExtents(new Vector3i(x, y, z), checkExtent);\n for (Vector3i pos : Diamond3iIterator.iterate(new Vector3i(x, y, z), checkExtent)) {\n byte lum = chunkView.getBlock(pos).getLuminance();\n chunkView.setLight(pos, lum);\n if (lum > 1) {\n lightSources.add(pos);\n }\n }\n for (Vector3i pos : lightSources) {\n byte lightLevel = chunkView.getLight(pos);\n if (lightLevel > 1) {\n region = Region3i.createEncompassing(region, pushLight(pos.x, pos.y, pos.z, lightLevel));\n }\n }\n for (Vector3i pos : Diamond3iIterator.iterateAtDistance(new Vector3i(x, y, z), checkExtent + 1)) {\n byte lightLevel = chunkView.getLight(pos);\n lightLevel = pullLight(pos.x, pos.y, pos.z, lightLevel, type);\n if (lightLevel > 1) {\n pushLight(pos.x, pos.y, pos.z, lightLevel);\n }\n }\n return region;\n}\n"
|
"public static void init() {\n crops = new ItemCrop();\n RegisterHelper.registerItem(crops, Names.Objects.crops + \"String_Node_Str\");\n journal = new ItemJournal();\n RegisterHelper.registerItem(journal, Names.Objects.journal);\n trowel = new ItemTrowel();\n RegisterHelper.registerItem(trowel, Names.Objects.trowel);\n magnifyingGlass = new ItemMagnifyingGlass();\n RegisterHelper.registerItem(magnifyingGlass, Names.Objects.magnifyingGlass);\n if (!ConfigurationHandler.disableIrrigation) {\n sprinkler = new ItemSprinkler();\n RegisterHelper.registerItem(sprinkler, Names.Objects.sprinkler + \"String_Node_Str\");\n }\n debugItem = new ItemDebugger();\n RegisterHelper.registerItem(debugItem, \"String_Node_Str\");\n if (ConfigurationHandler.enableHandRake) {\n handRake = new ItemHandRake();\n RegisterHelper.registerItem(handRake, Names.Objects.handRake);\n }\n LogHelper.debug(\"String_Node_Str\");\n}\n"
|
"void updateState() {\n if (children.size() == 0) {\n UIObject.setVisible(childSpanElem, false);\n images.treeLeaf().applyTo(statusImage);\n return;\n }\n if (open) {\n UIObject.setVisible(childSpanElem, true);\n DOM.setElementProperty(imgElem, \"String_Node_Str\", imgSrc(\"String_Node_Str\"));\n } else {\n UIObject.setVisible(childSpanElem, false);\n DOM.setElementProperty(imgElem, \"String_Node_Str\", imgSrc(\"String_Node_Str\"));\n }\n}\n"
|
"public boolean moveItemToSlots(EntityRef instigator, EntityRef fromInventory, int slotFrom, EntityRef toInventory, List<Integer> toSlots) {\n Collection<EntityRef> clientTempEntities = new HashSet<>();\n if (moveItemToSlotsFillClientTempEntities(instigator, fromInventory, slotFrom, toInventory, toSlots, clientTempEntities)) {\n return false;\n }\n MoveItemToSlotsRequest request = new MoveItemToSlotsRequest(instigator, fromInventory, slotFrom, toInventory, toSlots, changeId++);\n pendingMoves.put(request.getChangeId(), request);\n localPlayer.getClientEntity().send(request);\n return true;\n}\n"
|
"public void idle() {\n Preconditions.checkState(!executor.isShutdown());\n Future<?> possiblyIgnoredError = executor.schedule(() -> {\n try (AutoProfiler p = AutoProfiler.logged(\"String_Node_Str\", log)) {\n System.gc();\n }\n }, 10, TimeUnit.SECONDS);\n}\n"
|
"static Object invokeMatchingMethod(String methodName, List methods, Object target, Object[] args) throws Exception {\n Method m = null;\n Object[] boxedArgs = null;\n if (methods.isEmpty()) {\n throw new IllegalArgumentException(noMethodReport(methodName, target));\n } else if (methods.size() == 1) {\n m = (Method) methods.get(0);\n boxedArgs = boxArgs(m.getParameterTypes(), args);\n } else {\n Method foundm = null;\n for (Iterator i = methods.iterator(); i.hasNext(); ) {\n m = (Method) i.next();\n Class[] params = m.getParameterTypes();\n if (isCongruent(params, args)) {\n if (foundm == null || Compiler.subsumes(params, foundm.getParameterTypes())) {\n foundm = m;\n boxedArgs = boxArgs(params, args);\n }\n }\n }\n m = foundm;\n }\n if (m == null)\n throw new IllegalArgumentException(\"String_Node_Str\" + methodName + \"String_Node_Str\" + target.getClass());\n if (!Modifier.isPublic(m.getDeclaringClass().getModifiers())) {\n m = getAsMethodOfPublicBase(m.getDeclaringClass(), m);\n }\n if (m == null)\n throw new IllegalArgumentException(\"String_Node_Str\" + methodName + \"String_Node_Str\" + target.getClass());\n try {\n return prepRet(m.getReturnType(), m.invoke(target, boxedArgs));\n } catch (InvocationTargetException e) {\n if (e.getCause() instanceof Exception)\n throw (Exception) e.getCause();\n throw e;\n }\n}\n"
|
"private void hitScreenServer(EntityPlayer player, int x, int y, int module) {\n List<IScreenModule> screenModules = getScreenModules();\n IScreenModule<?> screenModule = screenModules.get(module);\n if (screenModule != null) {\n ItemStack itemStack = inventoryHelper.getStackInSlot(module);\n screenModule.mouseClick(getWorld(), x, y, true, player);\n if (screenModule instanceof IScreenModuleUpdater) {\n NBTTagCompound newCompound = ((IScreenModuleUpdater) screenModule).update(itemStack.getTagCompound(), getWorld(), player);\n if (newCompound != null) {\n itemStack.setTagCompound(newCompound);\n markDirtyClient();\n }\n }\n clickedModules.add(new ActivatedModule(module, 5, x, y));\n }\n}\n"
|
"public void surfaceCreated(SurfaceHolder surfaceHolder) {\n ExoplayerWrapper wrapper = layerManager.getExoplayerWrapper();\n if (wrapper != null) {\n wrapper.setSurface(surfaceHolder.getSurface());\n if (wrapper.getSurface().isValid() || wrapper.getStateForTrackType(ExoplayerWrapper.TYPE_VIDEO) == ExoplayerWrapper.DISABLED_TRACK) {\n wrapper.setPlayWhenReady(autoplay);\n }\n }\n}\n"
|
"public void addNode(IGridNode node, IGridHost machine) {\n if (machine instanceof PartP2PTunnel) {\n if (machine instanceof PartP2PTunnelME) {\n if (!node.hasFlag(GridFlags.REQUIRE_CHANNEL))\n return;\n }\n PartP2PTunnel t = (PartP2PTunnel) machine;\n if (t.output)\n outputs.put(t.freq, t);\n else\n inputs.put(t.freq, t);\n updateTunnel(t.freq, !t.output, false);\n }\n}\n"
|
"protected boolean isUniqueName(JavaFXHierarchyContainer parent, String name, JavaFXHierarchyContainer container) {\n if (name == null) {\n return false;\n }\n if (parent == null) {\n return true;\n }\n List<JavaFXHierarchyContainer> compIDs = parent.getContainerList();\n for (JavaFXHierarchyContainer childContainer : compIDs) {\n String childName = childContainer.getName();\n if (name.equals(childName) && childContainer != container) {\n return false;\n }\n }\n return true;\n}\n"
|
"public int compare(Viewer viewer, Object e1, Object e2) {\n if (e1 instanceof GitModelWorkingTree)\n return -1;\n if (e2 instanceof GitModelWorkingTree)\n return 1;\n if (e1 instanceof GitModelCache)\n return -2;\n if (e2 instanceof GitModelCache)\n return 2;\n if (e1 instanceof GitModelCommit && e2 instanceof GitModelCommit) {\n RevCommit rc1 = ((GitModelCommit) e1).getBaseCommit();\n RevCommit rc2 = ((GitModelCommit) e2).getBaseCommit();\n return rc2.getCommitTime() - rc1.getCommitTime();\n }\n return super.compare(viewer, e1, e2);\n}\n"
|
"public boolean matches(ResolvedTypeX matchType, ResolvedTypeX aspectType) {\n return isWithinType(matchType).alwaysTrue();\n}\n"
|
"public void onClick(View v) {\n boolean checked = !mQsDetailHeaderSwitch.isChecked();\n mQsDetailHeaderSwitch.setChecked(checked);\n detail.setToggleState(checked);\n}\n"
|
"protected void drawGuiContainerBackgroundLayer(float v, int x, int y) {\n drawWindow();\n long currentRF = GenericEnergyStorageTileEntity.getCurrentRF();\n energyBar.setValue(currentRF);\n tileEntity.requestRfFromServer(RFTools.MODID);\n drawGhostSlots();\n}\n"
|
"public static void main(String[] args) {\n try {\n if (!ap.parseParameters(args)) {\n System.err.print(Constants.MSG_ERROR_PARSE_ARGUMENTS);\n System.out.println();\n System.exit(0);\n }\n if (ap.getCommandLine().getOptions().length < Constants.ARGUMENTS_REQUIRED) {\n System.err.print(Constants.MSG_ERROR_NOT_ENOUGH_ARGUMENTS);\n System.out.println();\n System.out.println(\"String_Node_Str\");\n System.out.println(ap.listArguments());\n System.out.println(\"String_Node_Str\" + \"String_Node_Str\");\n System.out.println(\"String_Node_Str\" + \"String_Node_Str\");\n System.out.println(\"String_Node_Str\");\n System.out.println(\"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\" + \"String_Node_Str\");\n System.exit(0);\n }\n if (args.length > ap.options.getOptions().size()) {\n System.err.print(Constants.MSG_ERROR_TOO_MANY_ARGUMENTS);\n System.out.println();\n System.out.println(\"String_Node_Str\" + ap.options.getOptions().size() + \"String_Node_Str\");\n System.exit(0);\n }\n String itConfigFileName = ap.cmd.getOptionValue(Constants.ARG_CONFIG_FILE);\n String netarchiveSuiteFileName = ap.cmd.getOptionValue(Constants.ARG_NETARCHIVE_SUITE_FILE);\n String secPolicyFileName = ap.cmd.getOptionValue(Constants.ARG_SECURITY_FILE);\n String logPropFileName = ap.cmd.getOptionValue(Constants.ARG_LOG_PROPERTY_FILE);\n String outputDir = ap.cmd.getOptionValue(Constants.ARG_OUTPUT_DIRECTORY);\n String databaseFileName = ap.cmd.getOptionValue(Constants.ARG_DATABASE_FILE);\n String testArguments = ap.cmd.getOptionValue(Constants.ARG_TEST);\n String resetArgument = ap.cmd.getOptionValue(Constants.ARG_RESET);\n String evaluateArgument = ap.cmd.getOptionValue(Constants.ARG_EVALUATE);\n initConfigFile(itConfigFileName);\n initNetarchiveSuiteFile(netarchiveSuiteFileName);\n initSecPolicyFile(secPolicyFileName);\n initLogPropFile(logPropFileName);\n initDatabase(databaseFileName);\n initTestArguments(testArguments);\n initReset(resetArgument);\n initEvaluate(evaluateArgument);\n itConfig = new DeployConfiguration(itConfigFile, netarchiveSuiteFile, secPolicyFile, logPropFile, outputDir, dbFile, resetDirectory);\n itConfig.write();\n } catch (SecurityException e) {\n System.out.println(\"String_Node_Str\" + e);\n } catch (Exception e) {\n System.err.println(\"String_Node_Str\" + e);\n }\n}\n"
|
"public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\n if (Pref.KEY_SERVERS.equals(key)) {\n Timber.d(\"String_Node_Str\", key);\n String keyServers = sharedPreferences.getString(Pref.KEY_SERVERS, Defaults.KEY_SERVERS);\n String current = keyServers.substring(keyServers.indexOf(','));\n String coarseGranularityKeyserver;\n if (current.contains(\"String_Node_Str\")) {\n coarseGranularityKeyserver = \"String_Node_Str\";\n } else if (current.contains(\"String_Node_Str\")) {\n coarseGranularityKeyserver = \"String_Node_Str\";\n } else if (current.contains(\"String_Node_Str\")) {\n coarseGranularityKeyserver = \"String_Node_Str\";\n } else {\n coarseGranularityKeyserver = \"String_Node_Str\";\n }\n TrackHelper.track().interaction(\"String_Node_Str\" + Pref.KEY_SERVERS, coarseGranularityKeyserver).with(piwikTracker);\n return;\n }\n if (Pref.THEME.equals(key)) {\n String value = sharedPreferences.getString(Pref.THEME, \"String_Node_Str\");\n TrackHelper.track().interaction(\"String_Node_Str\" + Pref.THEME, value).with(piwikTracker);\n return;\n }\n if (Pref.ANALYTICS_PREFS.contains(key)) {\n Timber.d(\"String_Node_Str\", key);\n if (!sharedPreferences.contains(key)) {\n TrackHelper.track().interaction(\"String_Node_Str\" + key, \"String_Node_Str\").with(piwikTracker);\n return;\n }\n boolean value = sharedPreferences.getBoolean(key, false);\n TrackHelper.track().interaction(\"String_Node_Str\" + key, value ? \"String_Node_Str\" : \"String_Node_Str\").with(piwikTracker);\n }\n}\n"
|
"public Object getObjectType() {\n mainConnector = new NodeConnectorTool(nodePart).getConnector();\n if (mainConnector == null) {\n Node node = (Node) nodePart.getModel();\n mainConnector = node.getConnectorFromType(EConnectionType.ON_COMPONENT_OK);\n listArgs.set(1, mainConnector.getLinkName());\n } else {\n listArgs.set(1, null);\n }\n return mainConnector.getName();\n}\n"
|
"private static TemplateDescriptor createInstance(Class<? extends TemplateDescriptor> templateDescriptor) {\n try {\n return templateDescriptor.getConstructor().newInstance();\n } catch (Exception e) {\n throw new RuntimeException(\"String_Node_Str\" + templateDescriptor.getName() + \"String_Node_Str\", e);\n }\n return null;\n}\n"
|
"public ContentData getContentData(ContentVAType vaType) {\n ContentData contentData = hashContentData.get(vaType);\n if (contentData == null) {\n contentData = createContentData(vaType);\n hashContentData.put(vaType, contentData);\n }\n return contentData;\n}\n"
|
"private void _createGraph(Object composite, KNode hierarchicalLayoutNode, KNode boxLayoutNode) {\n _ptolemy2KielerNodes = new HashMap<Object, KNode>();\n _kieler2ptolemyDivaNodes = new HashMap<KNode, Object>();\n _kieler2ptolemyEntityNodes = new HashMap<KNode, NamedObj>();\n _ptolemyDiva2KielerEdges = new HashMap<Object, KEdge>();\n _kieler2PtolemyDivaEdges = new HashMap<KEdge, Object>();\n _ptolemy2KielerPorts = new HashMap<Port, List<KPort>>();\n _kieler2PtolemyPorts = new HashMap<KPort, Port>();\n _divaEdgeSource = new HashMap<Object, Object>();\n _divaEdgeTarget = new HashMap<Object, Object>();\n float globalX = Float.MAX_VALUE, globalY = Float.MAX_VALUE;\n LayoutTarget target = this.getLayoutTarget();\n GraphModel graph = target.getGraphModel();\n if (graph instanceof ActorGraphModel) {\n ActorGraphModel aGraph = (ActorGraphModel) graph;\n for (Iterator iterator = aGraph.nodes(composite); iterator.hasNext(); ) {\n Object node = iterator.next();\n Object semanticNode = aGraph.getSemanticObject(node);\n if (semanticNode instanceof Actor || semanticNode instanceof Attribute) {\n KNode knode = _createKNode(node, semanticNode);\n if (PtolemyModelUtil._isConnected((NamedObj) semanticNode)) {\n knode.setParent(hierarchicalLayoutNode);\n KShapeLayout layout = KimlLayoutUtil.getShapeLayout(knode);\n if (layout.getXpos() < globalX)\n globalX = layout.getXpos();\n if (layout.getYpos() < globalY)\n globalY = layout.getYpos();\n } else {\n knode.setParent(boxLayoutNode);\n }\n if (semanticNode instanceof Actor && semanticNode instanceof Entity) {\n Actor actor = (Actor) semanticNode;\n List<Port> inputs = actor.inputPortList();\n List<Port> outputs = actor.outputPortList();\n _createKPorts(knode, inputs, KPortType.INPUT);\n _createKPorts(knode, outputs, KPortType.OUTPUT);\n }\n } else if (semanticNode instanceof Relation) {\n KNode kVertexNode = _createKNodeForVertex((Vertex) node);\n kVertexNode.setParent(hierarchicalLayoutNode);\n _ptolemy2KielerNodes.put(node, kVertexNode);\n _kieler2ptolemyDivaNodes.put(kVertexNode, node);\n _kieler2ptolemyEntityNodes.put(kVertexNode, (NamedObj) semanticNode);\n } else if (semanticNode instanceof Port) {\n KNode kPortNode = _createKNodeForPort((Port) semanticNode);\n kPortNode.setParent(hierarchicalLayoutNode);\n _ptolemy2KielerNodes.put(node, kPortNode);\n _kieler2ptolemyDivaNodes.put(kPortNode, node);\n _kieler2ptolemyEntityNodes.put(kPortNode, (NamedObj) semanticNode);\n }\n Iterator portIter = null;\n if (semanticNode instanceof Relation) {\n portList.add(node);\n portIter = portList.iterator();\n } else if (semanticNode instanceof Actor) {\n portIter = aGraph.nodes(node);\n }\n if (portIter != null) {\n for (; portIter.hasNext(); ) {\n Object divaPort = portIter.next();\n for (Iterator iterator3 = aGraph.outEdges(divaPort); iterator3.hasNext(); ) {\n Object divaEdge = iterator3.next();\n _ptolemyDiva2KielerEdges.put(divaEdge, null);\n }\n }\n }\n }\n _storeEndpoints();\n for (Object divaEdge : _ptolemyDiva2KielerEdges.keySet()) {\n _createKEdge(divaEdge);\n }\n }\n KShapeLayout layout = KimlLayoutUtil.getShapeLayout(hierarchicalLayoutNode);\n layout.setXpos(globalX);\n layout.setYpos(globalY);\n}\n"
|
"public void finalizeProperties() {\n ArrayList<JavaClass> jClasses = getTypeInfoClasses();\n for (JavaClass jClass : jClasses) {\n TypeInfo tInfo = getTypeInfo().get(jClass.getQualifiedName());\n if (tInfo.isTransient()) {\n continue;\n }\n if (!jClass.isInterface() && !tInfo.isEnumerationType()) {\n if (tInfo.getFactoryMethodName() == null && tInfo.getObjectFactoryClassName() == null) {\n JavaConstructor zeroArgConstructor = jClass.getDeclaredConstructor(new JavaClass[] {});\n if (zeroArgConstructor == null) {\n if (tInfo.isSetXmlJavaTypeAdapter()) {\n tInfo.setTransient(true);\n } else {\n throw org.eclipse.persistence.exceptions.JAXBException.factoryMethodOrConstructorRequired(jClass.getName());\n }\n }\n }\n }\n if (tInfo.getXmlValueProperty() != null) {\n validateXmlValueFieldOrProperty(jClass, tInfo.getXmlValueProperty());\n }\n for (Property property : tInfo.getPropertyList()) {\n JavaClass typeClass = property.getActualType();\n TypeInfo targetInfo = typeInfo.get(typeClass.getQualifiedName());\n if (targetInfo != null && targetInfo.isTransient()) {\n throw JAXBException.invalidReferenceToTransientClass(jClass.getQualifiedName(), property.getPropertyName(), typeClass.getQualifiedName());\n }\n if (tInfo.isSetXmlValueProperty()) {\n if (property.isXmlValue() && !(tInfo.getXmlValueProperty().getPropertyName().equals(property.getPropertyName()))) {\n throw JAXBException.xmlValueAlreadySet(property.getPropertyName(), tInfo.getXmlValueProperty().getPropertyName(), jClass.getName());\n }\n if (!property.isXmlValue() && !property.isAttribute() && !property.isInverseReference() && !property.isTransient()) {\n throw JAXBException.propertyOrFieldShouldBeAnAttribute(property.getPropertyName());\n }\n }\n if (property.isXmlIdRef()) {\n if (targetInfo == null && !typeClass.getQualifiedName().equals(\"String_Node_Str\")) {\n throw JAXBException.invalidIDREFClass(jClass.getQualifiedName(), property.getPropertyName(), typeClass.getQualifiedName());\n }\n if (targetInfo != null && targetInfo.getIDProperty() == null) {\n throw JAXBException.invalidIdRef(property.getPropertyName(), typeClass.getQualifiedName());\n }\n }\n if (property.isXmlId() && tInfo.getIDProperty() != null && !(tInfo.getIDProperty().getPropertyName().equals(property.getPropertyName()))) {\n throw JAXBException.idAlreadySet(property.getPropertyName(), tInfo.getIDProperty().getPropertyName(), jClass.getName());\n }\n if (property.isAnyAttribute() && tInfo.isSetAnyAttributePropertyName() && !(tInfo.getAnyAttributePropertyName().equals(property.getPropertyName()))) {\n throw JAXBException.multipleAnyAttributeMapping(jClass.getName());\n }\n if (property.isAny() && tInfo.isSetAnyElementPropertyName() && !(tInfo.getAnyElementPropertyName().equals(property.getPropertyName()))) {\n throw JAXBException.xmlAnyElementAlreadySet(property.getPropertyName(), tInfo.getAnyElementPropertyName(), jClass.getName());\n }\n if (property.isSwaAttachmentRef() && !areEquals(property.getActualType(), JAVAX_ACTIVATION_DATAHANDLER)) {\n throw JAXBException.invalidAttributeRef(property.getPropertyName(), jClass.getQualifiedName());\n }\n if (property.getXmlElementWrapper() != null) {\n if (!isCollectionType(property) && !property.getType().isArray()) {\n throw JAXBException.invalidElementWrapper(property.getPropertyName());\n }\n }\n if (property.isChoice()) {\n processChoiceProperty(property, tInfo, jClass, property.getActualType());\n }\n if (property.isReference()) {\n processReferenceProperty(property, tInfo, jClass);\n }\n if (property.isXmlTransformation()) {\n processXmlTransformationProperty(property);\n }\n if (property.isSetXmlJoinNodes()) {\n if (targetInfo == null) {\n throw JAXBException.invalidXmlJoinNodeReferencedClass(property.getPropertyName(), typeClass.getQualifiedName());\n }\n if (targetInfo.getIDProperty() == null && targetInfo.getXmlKeyProperties() == null) {\n throw JAXBException.noKeyOrIDPropertyOnJoinTarget(jClass.getQualifiedName(), property.getPropertyName(), typeClass.getQualifiedName());\n }\n for (org.eclipse.persistence.jaxb.xmlmodel.XmlJoinNodes.XmlJoinNode xmlJoinNode : property.getXmlJoinNodes().getXmlJoinNode()) {\n String refXPath = xmlJoinNode.getReferencedXmlPath();\n if (targetInfo.getIDProperty() != null && refXPath.equals(targetInfo.getIDProperty().getXmlPath())) {\n continue;\n }\n boolean matched = false;\n if (targetInfo.getXmlKeyProperties() != null) {\n for (Property xmlkeyProperty : targetInfo.getXmlKeyProperties()) {\n if (refXPath.equals(xmlkeyProperty.getXmlPath())) {\n matched = true;\n break;\n }\n }\n }\n if (!matched) {\n throw JAXBException.invalidReferencedXmlPathOnJoin(jClass.getQualifiedName(), property.getPropertyName(), typeClass.getQualifiedName(), refXPath);\n }\n }\n }\n }\n }\n}\n"
|
"public static CoNLL09Sentence fromSimpleAnnoSentence(SimpleAnnoSentence sent) {\n List<CoNLL09Token> toks = new ArrayList<CoNLL09Token>();\n for (int i = 0; i < sent.size(); i++) {\n CoNLL09Token tok = new CoNLL09Token();\n tok.setId(i + 1);\n tok.setForm(sent.getWord(i));\n tok.setPlemma(sent.getLemma(i));\n tok.setPpos(sent.getPosTag(i));\n if (sent.getFeats() != null) {\n tok.setPfeat(sent.getFeats(i));\n }\n tok.setPhead(sent.getParent(i) + 1);\n tok.setPdeprel(sent.getDeprel(i));\n tok.setLemma(sent.getLemma(i));\n tok.setPos(sent.getPosTag(i));\n tok.setFeat(sent.getFeats(i));\n tok.setHead(sent.getParent(i) + 1);\n tok.setDeprel(sent.getDeprel(i));\n toks.add(tok);\n }\n CoNLL09Sentence updatedSentence = new CoNLL09Sentence(toks);\n updatedSentence.setColsFromSrlGraph(sent.getSrlGraph(), false, true);\n return updatedSentence;\n}\n"
|
"File generateHTMLTransferReport(NodeRef transferNode) throws IOException {\n File report = TempFileProvider.createTempFile(REPORT_FILE_PREFIX, REPORT_FILE_SUFFIX);\n Writer writer = null;\n try {\n NodeRef[] itemsToTransfer = getTransferNodes(transferNode);\n if (logger.isDebugEnabled()) {\n logger.debug(\"String_Node_Str\" + itemsToTransfer.length + \"String_Node_Str\" + report.getAbsolutePath());\n }\n writer = new OutputStreamWriter(new FileOutputStream(report), Charset.forName(\"String_Node_Str\"));\n String dispositionAuthority = null;\n if (itemsToTransfer.length > 0) {\n DispositionSchedule ds = dispositionService.getDispositionSchedule(itemsToTransfer[0]);\n if (ds != null) {\n dispositionAuthority = ds.getDispositionAuthority();\n }\n }\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n Boolean isAccession = (Boolean) this.nodeService.getProperty(transferNode, PROP_TRANSFER_ACCESSION_INDICATOR);\n if (isAccession) {\n writer.write(\"String_Node_Str\");\n } else {\n writer.write(\"String_Node_Str\");\n }\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n if (isAccession) {\n writer.write(\"String_Node_Str\");\n } else {\n writer.write(\"String_Node_Str\");\n }\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n Date transferDate = (Date) this.nodeService.getProperty(transferNode, ContentModel.PROP_CREATED);\n writer.write(StringEscapeUtils.escapeHtml(transferDate.toString()));\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n if (isAccession) {\n writer.write(\"String_Node_Str\");\n } else {\n writer.write(StringEscapeUtils.escapeHtml((String) this.nodeService.getProperty(transferNode, RecordsManagementModel.PROP_TRANSFER_LOCATION)));\n }\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(StringEscapeUtils.escapeHtml((String) this.nodeService.getProperty(transferNode, ContentModel.PROP_CREATOR)));\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(dispositionAuthority != null ? StringEscapeUtils.escapeHtml(dispositionAuthority) : \"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n writer.write(\"String_Node_Str\");\n generateTransferItemsHTML(writer, itemsToTransfer);\n writer.write(\"String_Node_Str\");\n } finally {\n if (writer != null) {\n try {\n writer.close();\n } catch (IOException ioe) {\n }\n }\n }\n return report;\n}\n"
|
"private void moveImpl(final Object graphicsComponent, final Rectangle constraints, final int xPos, final boolean xAbsolute, final int yPos, final boolean yAbsolute, final ClickOptions clickOptions) throws StepExecutionException {\n Rectangle bounds = getComponentBounds(graphicsComponent, clickOptions);\n if (constraints != null) {\n bounds.x += constraints.x;\n bounds.y += constraints.y;\n bounds.height = constraints.height;\n bounds.width = constraints.width;\n }\n Point p = PointUtil.calculateAwtPointToGo(xPos, xAbsolute, yPos, yAbsolute, bounds);\n if (isMouseMoveRequired(p)) {\n if (log.isDebugEnabled()) {\n log.debug(\"String_Node_Str\" + p);\n }\n IRobotEventConfirmer confirmer = null;\n if (clickOptions.isConfirmClick()) {\n InterceptorOptions options = new InterceptorOptions(new long[] { AWTEvent.MOUSE_MOTION_EVENT_MASK });\n confirmer = m_interceptor.intercept(options);\n }\n Point startpoint = m_mouseMotionTracker.getLastMousePointOnScreen();\n if (startpoint == null) {\n if (graphicsComponent instanceof Stage) {\n Stage s = (Stage) graphicsComponent;\n Node root = s.getScene().getRoot();\n startpoint = (root != null) ? getLocation(root, null) : new Point(Rounding.round(s.getWidth() / 2), Rounding.round(s.getHeight() / 2));\n } else {\n Node node = (Node) graphicsComponent;\n Node root = node.getScene().getRoot();\n Node c = (root != null) ? root : node;\n startpoint = getLocation(c, null);\n }\n }\n final Point[] mouseMove = MouseMovementStrategy.getMovementPath(startpoint, p, clickOptions.getStepMovement(), clickOptions.getFirstHorizontal());\n Point currP = new Point(0, 0);\n for (int i = 0; i < mouseMove.length - 1; i++) {\n m_robot.mouseMove(mouseMove[i].x, mouseMove[i].y);\n currP.x = mouseMove[i].x;\n currP.y = mouseMove[i].y;\n if (!currP.equals(MouseInfo.getPointerInfo().getLocation())) {\n mouseMoveFallback(currP);\n }\n }\n if (confirmer != null) {\n confirmMove(confirmer, graphicsComponent);\n }\n }\n}\n"
|
"public void addTypeToElement(Class<? extends VertexFrame> kind, Element element) {\n Class<?> typeHoldingTypeField = typeRegistry.getTypeHoldingTypeField(kind);\n if (typeHoldingTypeField != null) {\n TypeValue typeValueAnnotation = kind.getAnnotation(TypeValue.class);\n if (typeValueAnnotation != null) {\n String typeFieldName = typeHoldingTypeField.getAnnotation(TypeField.class).value();\n String typeValue = typeValueAnnotation.value();\n if (typeValue.contains(DELIMITER)) {\n throw new IllegalArgumentException(\"String_Node_Str\" + kind.getCanonicalName() + \"String_Node_Str\" + typeValue + \"String_Node_Str\" + DELIMITER + \"String_Node_Str\");\n } else {\n for (int p = 0; p < typeValue.length(); p++) {\n if (!Character.isLetterOrDigit(typeValue.charAt(p))) {\n throw new IllegalArgumentException(\"String_Node_Str\" + kind.getCanonicalName() + \"String_Node_Str\" + typeValue + \"String_Node_Str\");\n }\n }\n }\n String currentPropertyValue = element.getProperty(typeFieldName);\n if (currentPropertyValue == null) {\n element.setProperty(typeFieldName, DELIMITER + typeValue + DELIMITER);\n } else if (!currentPropertyValue.contains(DELIMITER + typeValue + DELIMITER)) {\n element.setProperty(typeFieldName, currentPropertyValue + typeValue + DELIMITER);\n }\n }\n }\n}\n"
|
"public ItemStack onEaten(ItemStack itemStack, World world, EntityPlayer entityPlayer) {\n --itemStack.stackSize;\n if (world.isRemote)\n return itemStack;\n EnumMolecule molecule = getMolecule(itemStack);\n Pharm.triggerPlayerEffect(molecule, entityPlayer);\n world.playSoundAtEntity(entityPlayer, \"String_Node_Str\", 0.5F, world.rand.nextFloat() * 0.1F + 0.9F);\n return itemStack;\n}\n"
|
"public IDetailsPage getPage(Object key) {\n if (key.equals(IBundle.class)) {\n return BundleInformationMasterDetailsBlock.this.bundleDetailsPart;\n }\n return null;\n}\n"
|
"void parseResponse(JSONObject response) throws JSONException {\n ClicksModel model = new ClicksModel(123456, response);\n assertEquals(model.getTotalClicks(), 2);\n assertEquals(model.getOtherClicks(), 0);\n assertNotNull(model.getClickGroups());\n assertEquals(model.getClickGroups().size(), 2);\n ClickGroupModel first = model.getClickGroups().get(0);\n assertEquals(first.getIcon(), \"String_Node_Str\");\n assertEquals(first.getUrl(), \"String_Node_Str\");\n assertEquals(first.getName(), \"String_Node_Str\");\n assertEquals(first.getViews(), 1);\n assertNull(first.getClicks());\n ClickGroupModel second = model.getClickGroups().get(1);\n assertEquals(second.getIcon(), \"String_Node_Str\");\n assertEquals(second.getUrl(), \"String_Node_Str\");\n assertEquals(second.getName(), \"String_Node_Str\");\n assertEquals(second.getViews(), 1);\n assertNull(second.getClicks());\n}\n"
|
"private void ellipsoid(final SnipeData v, Location<World> targetBlock) {\n double xrads = this.xrad * this.xrad;\n double yrads = this.yrad * this.yrad;\n double zrads = this.zrad * this.zrad;\n int tx = targetBlock.getBlockX();\n int ty = targetBlock.getBlockY();\n int tz = targetBlock.getBlockZ();\n int minx = GenericMath.floor(targetBlock.getBlockX() - this.xrad);\n int maxx = GenericMath.floor(targetBlock.getBlockX() + this.xrad) + 1;\n int miny = Math.max(GenericMath.floor(targetBlock.getBlockY() - this.yrad), 0);\n int maxy = Math.min(GenericMath.floor(targetBlock.getBlockY() + this.yrad) + 1, WORLD_HEIGHT);\n int minz = GenericMath.floor(targetBlock.getBlockZ() - this.zrad);\n int maxz = GenericMath.floor(targetBlock.getBlockZ() + this.zrad) + 1;\n this.undo = new Undo(GenericMath.floor(4 * Math.PI * (this.xrad + 1) * (this.yrad + 1) * (this.zrad + 1) / 3));\n for (int x = maxx; x >= minx; x--) {\n double xs = (tx - x) * (tx - x);\n for (int y = miny; y <= maxy; y++) {\n double ys = (ty - y) * (ty - y);\n for (int z = minz; z <= maxz; z++) {\n double zs = (tz - z) * (tz - z);\n if (xs / xrads + ys / yrads + zs / zrads < 1) {\n perform(v, x, y, z);\n }\n }\n }\n }\n v.owner().storeUndo(this.undo);\n this.undo = null;\n}\n"
|
"public String getDomainName() {\n if (domainName == null) {\n return \"String_Node_Str\";\n }\n if (builtinMuscleCurve && currentModel.getCoordinateSet().contains(domainName)) {\n Coordinate coord = currentModel.getCoordinateSet().get(domainName);\n return (coord.getRelativePathName(currentModel) + \"String_Node_Str\");\n }\n return domainName;\n}\n"
|
"private void resetAllTreeSelections() {\n if (tree != null)\n resetAllTreeSelectionsRec(tree.getRoot());\n}\n"
|
"public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) {\n TileEntity tile = world.getTileEntity(x, y, z);\n if (!(tile instanceof TileDynamoBase)) {\n return false;\n }\n TileDynamoBase tile = (TileDynamoBase) te;\n return tile.facing == BlockHelper.SIDE_OPPOSITE[side.ordinal()];\n}\n"
|
"private CacheResult fetch(ArtifactCache artifactCache, RuleKey ruleKey, LazyPath outputPath) {\n CacheResult cacheResult = Futures.getUnchecked(artifactCache.fetchAsync(ruleKey, outputPath));\n if (cacheResult.getType() != CacheResultType.HIT) {\n return cacheResult;\n }\n for (String ruleKeyName : BuildInfo.RULE_KEY_NAMES) {\n if (!cacheResult.getMetadata().containsKey(ruleKeyName)) {\n continue;\n }\n String ruleKeyValue = cacheResult.getMetadata().get(ruleKeyName);\n try {\n verify(ruleKeyValue);\n } catch (IllegalArgumentException e) {\n throw new IllegalArgumentException(String.format(\"String_Node_Str\", ruleKeyName, ruleKey, artifactCache.getClass(), ruleKeyValue), e);\n }\n }\n return cacheResult;\n}\n"
|
"public Set<Service> getAll() {\n List<Row<String, Long, String>> result = HFactory.createRangeSlicesQuery(keyspace, StringSerializer.get(), LongSerializer.get(), StringSerializer.get()).setColumnFamily(COLUMN_FAMILY).setKeys(\"String_Node_Str\", \"String_Node_Str\").setRange(Long.MAX_VALUE, expirationCutoff().getMillis(), true, 1).execute().get().getList();\n ImmutableSet.Builder<Service> builder = new ImmutableSet.Builder<Service>();\n for (Row<String, Long, String> row : result) {\n List<HColumn<Long, String>> columns = row.getColumnSlice().getColumns();\n if (!columns.isEmpty()) {\n builder.addAll(codec.fromJson(columns.iterator().next().getValue()));\n }\n }\n return builder.build();\n}\n"
|
"public static ClusterCreate getSimpleClusterSpec(String specName) throws Exception {\n String json = TestPlacementUtil.readJson(specName);\n logger.info(json);\n ObjectMapper mapper = new ObjectMapper();\n try {\n return gson.fromJson(json, ClusterCreate.class);\n } catch (Exception e) {\n logger.error(e.getMessage());\n throw e;\n }\n}\n"
|
"private void prepareLevels(QueryDefinition query, TabularHierarchyHandle hierHandle, List metaList, String dimName) throws AdapterException {\n try {\n List levels = hierHandle.getContents(TabularHierarchyHandle.LEVELS_PROP);\n for (int j = 0; j < levels.size(); j++) {\n TabularLevelHandle level = (TabularLevelHandle) levels.get(j);\n ColumnMeta temp = null;\n String exprString = ExpressionUtil.createJSDataSetRowExpression(level.getColumnName());\n int type = DataAdapterUtil.adaptModelDataType(level.getDataType());\n if (type == DataType.UNKNOWN_TYPE || type == DataType.ANY_TYPE)\n type = DataType.STRING_TYPE;\n if (level.getDateTimeLevelType() != null) {\n temp = new ColumnMeta(createLevelName(dimName, level.getName()), new DataProcessorWrapper(GroupCalculatorFactory.getGroupCalculator(IGroupDefinition.NUMERIC_INTERVAL, DataType.INTEGER_TYPE, String.valueOf(getDefaultStartValue(level.getDateTimeLevelType(), level.getIntervalBase())), level.getIntervalRange())), ColumnMeta.LEVEL_KEY_TYPE);\n temp.setDataType(DataType.INTEGER_TYPE);\n exprString = this.createDateTransformerExpr(level.getDateTimeLevelType(), exprString);\n } else {\n IDataProcessor processor = null;\n if (DesignChoiceConstants.LEVEL_TYPE_DYNAMIC.equals(level.getLevelType())) {\n int interval = GroupAdapter.intervalFromModel(level.getInterval());\n if (interval != IGroupDefinition.NO_INTERVAL)\n processor = new DataProcessorWrapper(GroupCalculatorFactory.getGroupCalculator(interval, type, level.getIntervalBase(), level.getIntervalRange()));\n } else if (DesignChoiceConstants.LEVEL_TYPE_MIRRORED.equals(level.getLevelType())) {\n Iterator it = level.staticValuesIterator();\n List dispExpr = new ArrayList();\n List filterExpr = new ArrayList();\n while (it.hasNext()) {\n RuleHandle o = (RuleHandle) it.next();\n dispExpr.add(o.getDisplayExpression());\n filterExpr.add(o.getRuleExpression());\n }\n exprString = \"String_Node_Str\";\n for (int i = 0; i < dispExpr.size(); i++) {\n String disp = \"String_Node_Str\" + JavascriptEvalUtil.transformToJsConstants(String.valueOf(dispExpr.get(i))) + \"String_Node_Str\";\n String filter = String.valueOf(filterExpr.get(i));\n exprString += \"String_Node_Str\" + filter + \"String_Node_Str\" + disp + \"String_Node_Str\";\n }\n }\n temp = new ColumnMeta(createLevelName(dimName, level.getName()), processor, ColumnMeta.LEVEL_KEY_TYPE);\n temp.setDataType(type);\n }\n metaList.add(temp);\n Iterator it = level.attributesIterator();\n while (it.hasNext()) {\n LevelAttributeHandle levelAttr = (LevelAttributeHandle) it.next();\n IDataProcessor processor = null;\n String bindingExpr = null;\n if (level.getDateTimeLevelType() != null && DATE_TIME_ATTR_NAME.equals(levelAttr.getName())) {\n processor = new DateTimeAttributeProcessor(level.getDateTimeLevelType());\n bindingExpr = ExpressionUtil.createJSDataSetRowExpression(level.getColumnName());\n } else {\n bindingExpr = ExpressionUtil.createJSDataSetRowExpression(levelAttr.getName());\n }\n ColumnMeta meta = new ColumnMeta(createLevelName(dimName, OlapExpressionUtil.getAttributeColumnName(level.getName(), levelAttr.getName())), processor, ColumnMeta.UNKNOWN_TYPE);\n meta.setDataType(DataAdapterUtil.adaptModelDataType(levelAttr.getDataType()));\n metaList.add(meta);\n query.addBinding(new Binding(meta.getName(), new ScriptExpression(ExpressionUtil.createJSDataSetRowExpression(levelAttr.getName()))));\n }\n if (level.getDisplayColumnName() != null) {\n ColumnMeta meta = new ColumnMeta(createLevelName(dimName, OlapExpressionUtil.getDisplayColumnName(level.getName())), null, ColumnMeta.UNKNOWN_TYPE);\n meta.setDataType(DataType.STRING_TYPE);\n metaList.add(meta);\n query.addBinding(new Binding(meta.getName(), new ScriptExpression(level.getDisplayColumnName())));\n }\n String levelName = createLevelName(dimName, level.getName());\n query.addBinding(new Binding(levelName, new ScriptExpression(exprString)));\n GroupDefinition gd = new GroupDefinition(String.valueOf(query.getGroups().size()));\n gd.setKeyExpression(ExpressionUtil.createJSRowExpression(levelName));\n if (level.getLevelType() != null && level.getDateTimeLevelType() == null) {\n gd.setIntervalRange(level.getIntervalRange());\n gd.setIntervalStart(level.getIntervalBase());\n gd.setInterval(GroupAdapter.intervalFromModel(level.getInterval()));\n }\n if (level.getDateTimeLevelType() != null) {\n gd.setIntervalRange(level.getIntervalRange() == 0 ? 1 : level.getIntervalRange());\n gd.setIntervalStart(String.valueOf(getDefaultStartValue(level.getDateTimeLevelType(), level.getIntervalBase())));\n gd.setInterval(IGroupDefinition.NUMERIC_INTERVAL);\n }\n query.addGroup(gd);\n }\n } catch (DataException e) {\n throw new AdapterException(e.getLocalizedMessage());\n }\n}\n"
|
"public void bulkInstall(ActionRequest request, ActionResponse response) {\n Context context = request.getContext();\n Set<Map<String, Object>> apps = new HashSet<Map<String, Object>>();\n Collection<Map<String, Object>> appsSet = (Collection<Map<String, Object>>) context.get(\"String_Node_Str\");\n if (appsSet != null) {\n apps.addAll(appsSet);\n }\n Boolean importDemo = (Boolean) context.get(\"String_Node_Str\");\n String language = (String) context.get(\"String_Node_Str\");\n List<App> appList = new ArrayList<App>();\n for (Map<String, Object> appData : apps) {\n App app = appRepo.find(Long.parseLong(appData.get(\"String_Node_Str\").toString()));\n app = appService.updateLanguage(app, language);\n appList.add(app);\n }\n appList = appService.sortApps(appList);\n for (App app : appList) {\n app = appRepo.find(app.getId());\n app = appService.installApp(app, importDemo);\n }\n response.setFlash(I18n.get(IAppExceptionMessages.BULK_INSTALL_SUCCESS));\n response.setSignal(\"String_Node_Str\", true);\n}\n"
|
"protected void handleChannelEvent(IChannelEvent event) {\n if (event instanceof IChannelMessageEvent) {\n final IChannelMessageEvent cme = (IChannelMessageEvent) event;\n handleMessage(cme.getFromContainerID(), cme.getData());\n } else if (event instanceof IChannelConnectEvent) {\n IChannelConnectEvent cce = (IChannelConnectEvent) event;\n handleConnectEvent(cce);\n } else if (event instanceof IChannelDisconnectEvent) {\n IChannelDisconnectEvent cde = (IChannelDisconnectEvent) event;\n handleDisconnectEvent(cde);\n }\n}\n"
|
"public boolean accept(File dir, String name) {\n return name.endsWith(inputSuffix) && !name.equals(indexFilename) && !name.equals(indexFilenameTopLevel);\n}\n"
|
"protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_record_detail);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n recordMonth = getIntent().getIntExtra(IntentConstant.RECORD_MONTH, 0);\n recordYear = getIntent().getIntExtra(IntentConstant.RECORD_YEAR, 2016);\n recordTypeID = getIntent().getLongExtra(IntentConstant.RECORD_TYPE_ID, 0);\n recordDesc = getIntent().getStringExtra(IntentConstant.RECORD_DESC);\n getSupportActionBar().setTitle(\"String_Node_Str\" + recordDesc + \"String_Node_Str\" + \"String_Node_Str\");\n recordManager = new RecordManager(this);\n initWidget();\n}\n"
|
"public IBlob getBlob(int index) throws OdaException {\n assertNotNull(rs);\n try {\n java.sql.Blob blob = rs.getBlob(index);\n return new Blob(blob);\n } catch (Exception e) {\n Exception e1 = null;\n if (e.getClass().getName().equals(\"String_Node_Str\")) {\n Class cls = e.getClass();\n Method meth = null;\n try {\n meth = cls.getMethod(\"String_Node_Str\", null);\n e1 = (Exception) meth.invoke(e, null);\n } catch (Exception e2) {\n }\n logger.log(Level.WARNING, e.getLocalizedMessage());\n return null;\n }\n } catch (SQLException e) {\n try {\n byte[] bytes = rs.getBytes(index);\n if (bytes == null)\n return null;\n return new Blob(SqlBlobUtil.newBlob(new ByteArrayInputStream(bytes)));\n } catch (SQLException e2) {\n try {\n Object value = rs.getObject(index);\n if (value instanceof IBlob)\n return (IBlob) value;\n } catch (SQLException ex) {\n }\n logger.log(Level.WARNING, e.getLocalizedMessage());\n return null;\n }\n }\n}\n"
|
"public final synchronized void notifySuccess(final T object) {\n Validate.notNull(object, \"String_Node_Str\");\n if (getRemainingNotificationsCount() == 0) {\n throw new IllegalStateException(\"String_Node_Str\");\n }\n succededObjects.add(object);\n onSuccessNotification(object);\n notificationHandler();\n}\n"
|
"private static void initializeCaches() {\n HazelcastClientCachingProvider cachingProvider1 = HazelcastClientCachingProvider.createCachingProvider(c1);\n HazelcastClientCachingProvider cachingProvider2 = HazelcastClientCachingProvider.createCachingProvider(c2);\n HazelcastClientCachingProvider cachingProvider3 = HazelcastClientCachingProvider.createCachingProvider(c3);\n HazelcastClientCachingProvider cachingProvider4 = HazelcastClientCachingProvider.createCachingProvider(c4);\n HazelcastClientCachingProvider cachingProvider5 = HazelcastClientCachingProvider.createCachingProvider(c5);\n String cacheName = CACHE_NAME_PREFIX + randomString();\n cache1 = (ICache) cachingProvider1.getCacheManager().getCache(cacheName);\n cache2 = (ICache) cachingProvider2.getCacheManager().getCache(cacheName);\n cache3 = (ICache) cachingProvider3.getCacheManager().getCache(cacheName);\n cache4 = (ICache) cachingProvider4.getCacheManager().getCache(cacheName);\n cache5 = (ICache) cachingProvider5.getCacheManager().getCache(cacheName);\n}\n"
|
"public Scope getScope() {\n StoragePoolVO vo = dataStoreDao.findById(this.pdsv.getId());\n if (vo.getScope() == ScopeType.CLUSTER) {\n return new ClusterScope(vo.getClusterId(), vo.getPodId(), vo.getDataCenterId());\n } else if (vo.getScope() == ScopeType.ZONE) {\n return new ZoneScope(vo.getDataCenterId());\n } else if (vo.getScope() == ScopeType.HOST) {\n List<StoragePoolHostVO> poolHosts = poolHostDao.listByPoolId(vo.getId());\n if (poolHosts.size() > 0) {\n return new HostScope(poolHosts.get(0).getHostId(), vo.getDataCenterId());\n }\n s_logger.debug(\"String_Node_Str\" + vo.getId());\n }\n return null;\n}\n"
|
"public synchronized void flush(Session session) {\n if (session == null || !database.isSysTableLocked()) {\n Session sysSession = database.getSystemSession();\n synchronized (sysSession) {\n flushInternal(sysSession, flushValueWithMargin);\n sysSession.commit(false);\n }\n } else {\n synchronized (session) {\n flushInternal(session);\n }\n }\n}\n"
|
"public void removeDestination(IEnderDestination theAttuned) {\n String channel = theAttuned.getChannelString();\n TIntObjectHashMap<EnderDestination> map = outputTeleport.get(channel);\n if (map == null) {\n return;\n }\n EnderDestination dest = map.get(theAttuned.getFrequency());\n if (dest == null) {\n return;\n }\n if (dest.dimension == theAttuned.dimension()) {\n if (dest.x == theAttuned.x() && dest.y == theAttuned.y() && dest.z == theAttuned.z()) {\n int freq = theAttuned.getFrequency();\n map.remove(freq);\n linkConf.getCategory(channel).remove(String.valueOf(freq));\n }\n }\n}\n"
|
"public CAstNode visitFunctionCall(FunctionCall n, WalkContext context) {\n if (!isPrimitiveCall(context, n)) {\n CAstNode base = Ast.makeNode(CAstNode.VAR, Ast.makeConstant(baseVarName));\n AstNode callee = n.getTarget();\n WalkContext child = new BaseCollectingContext(context, callee, base);\n CAstNode fun = visit(callee, child);\n CAstNode[] args = gatherCallArguments(n, context);\n if (child.foundBase(callee))\n return Ast.makeNode(CAstNode.LOCAL_SCOPE, Ast.makeNode(CAstNode.BLOCK_EXPR, Ast.makeNode(CAstNode.DECL_STMT, Ast.makeConstant(new CAstSymbolImpl(\"String_Node_Str\")), Ast.makeConstant(null)), makeCall(fun, base, args, context)));\n else\n return makeCall(fun, makeVarRef(JSSSAPropagationCallGraphBuilder.GLOBAL_OBJ_VAR_NAME), args, context);\n } else {\n return Ast.makeNode(CAstNode.PRIMITIVE, gatherCallArguments(n, context));\n }\n}\n"
|
"private List<RackInfo> readRackInfoFromFile(String filePath) throws IOException, FileNotFoundException, CliException {\n FileReader fileReader = null;\n BufferedReader reader = null;\n List<RackInfo> racksInfo = new ArrayList<RackInfo>();\n try {\n File f = new File(filePath);\n fileReader = new FileReader(f);\n reader = new BufferedReader(fileReader);\n String line = \"String_Node_Str\";\n int lineNum = 1;\n while ((line = reader.readLine()) != null) {\n line = line.trim();\n if (line.isEmpty()) {\n lineNum++;\n continue;\n } else {\n String[] rackHosts = line.split(\"String_Node_Str\");\n if (rackHosts.length != 2 || rackHosts[0].trim().isEmpty() || rackHosts[1].trim().isEmpty()) {\n throw new CliException(\"String_Node_Str\" + lineNum + \"String_Node_Str\" + Constants.TOPLOGY_FORMAT);\n } else {\n String[] hosts = rackHosts[1].split(\"String_Node_Str\");\n for (int i = 0; i < hosts.length; i++) {\n hosts[i] = hosts[i].trim();\n }\n RackInfo rackInfo = new RackInfo();\n rackInfo.setName(rackHosts[0].trim());\n rackInfo.setHosts(Arrays.asList(hosts));\n racksInfo.add(rackInfo);\n }\n }\n }\n } finally {\n if (reader != null) {\n reader.close();\n }\n if (fileReader != null) {\n fileReader.close();\n }\n }\n return racksInfo;\n}\n"
|
"private void convertConfig() {\n getConfig().set(\"String_Node_Str\", getConfig().getString(\"String_Node_Str\", \"String_Node_Str\"));\n getConfig().set(\"String_Node_Str\", getConfig().getInt(\"String_Node_Str\", 3));\n getConfig().set(\"String_Node_Str\", getConfig().getBoolean(\"String_Node_Str\", false));\n getConfig().set(\"String_Node_Str\", null);\n getConfig().set(\"String_Node_Str\", null);\n getConfig().set(\"String_Node_Str\", null);\n}\n"
|
"public void updateEngineVersion(File projectPath) throws FileNotFoundException, IOException {\n Properties prop = getGradleProperties(projectPath);\n prop.setProperty(Config.BLADE_ENGINE_VERSION_PROP, Versions.getVersion());\n prop.setProperty(\"String_Node_Str\", Versions.getLibgdxVersion());\n prop.setProperty(\"String_Node_Str\", Versions.getRoboVMVersion());\n prop.setProperty(\"String_Node_Str\", Versions.getROBOVMGradlePluginVersion());\n prop.setProperty(\"String_Node_Str\", Versions.getAndroidGradlePluginVersion());\n prop.setProperty(\"String_Node_Str\", Versions.getBladeInkVersion());\n saveGradleProperties(prop, projectPath);\n}\n"
|
"public void actionPerformed(ActionEvent e) {\n if (e.getSource() == btnOK) {\n captchaText = textField.getText();\n this.dispose();\n }\n if (e.getSource() == btnBAD) {\n captchaText = null;\n setVisible(false);\n dispose();\n }\n if (countdownThread != null && countdownThread.isAlive())\n this.countdownThread.interrupt();\n if (jacThread != null && jacThread.isAlive())\n this.jacThread.interrupt();\n}\n"
|
"private static int countDaysFromMinDay(int toYear, int toMonth, int toDay) {\n if (toYear < MIN_YEAR || toYear > MAX_YEAR || toMonth < 1 || toMonth > 12 || toDay < 1 || toDay > NEPALI_YEAR_MONTHS.get(toYear)[toMonth]) {\n throw new RuntimeException(\"String_Node_Str\");\n }\n int daysFromMinDay = -1;\n for (int year = MIN_YEAR; year <= toYear; year++) {\n int[] monthsInYear = NEPALI_YEAR_MONTHS.get(year);\n for (int month = 1; month <= 12; month++) {\n int daysInMonth = monthsInYear[month];\n for (int day = 1; day <= daysInMonth; day++) {\n daysFromMinDay++;\n if (year == toYear && month == toMonth && day == toDay) {\n return daysFromMinDay;\n }\n }\n }\n }\n throw new RuntimeException(\"String_Node_Str\");\n}\n"
|
"public void testEmployeeSchemaGenMissingRequiredElement() throws Exception {\n boolean exception = false;\n String src = \"String_Node_Str\";\n String tmpdir = System.getenv(\"String_Node_Str\");\n String msg = \"String_Node_Str\";\n try {\n Class[] jClasses = new Class[] { Address.class, Employee.class, PhoneNumber.class, Department.class };\n Generator gen = new Generator(new JavaModelInputImpl(jClasses, new JavaModelImpl(Thread.currentThread().getContextClassLoader())));\n gen.generateSchemaFiles(tmpdir, null);\n SchemaFactory sFact = SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI);\n Schema theSchema = sFact.newSchema(new File(tmpdir + \"String_Node_Str\"));\n Validator validator = theSchema.newValidator();\n StreamSource ss = new StreamSource(new File(src));\n validator.validate(ss);\n } catch (Exception ex) {\n exception = true;\n msg = ex.getLocalizedMessage();\n }\n assertTrue(\"String_Node_Str\", exception);\n assertTrue(\"String_Node_Str\" + msg, msg.contains(\"String_Node_Str\"));\n}\n"
|
"public Number remove(Keyword recordName) {\n List<Record> records = recordsFor(recordName);\n int count = records.size();\n memory.remove(recordName);\n return count;\n}\n"
|
"void changeBackgroundAlpha() {\n Drawable background = getBackground();\n if (background != null) {\n int newAlpha = (int) (ONE_HUNDRED * (1 - getVerticalDragOffset()));\n background.setAlpha(newAlpha);\n }\n}\n"
|
"State visitBlock(State startState, BlockNode node, String blockName, Checkpoint checkpoint) {\n try {\n visitChildren(node);\n } catch (AbortParsingBlockError abortProcessingError) {\n switch(startState) {\n case AFTER_ATTRIBUTE_NAME:\n case AFTER_TAG_NAME_OR_ATTRIBUTE:\n case BEFORE_ATTRIBUTE_NAME:\n case BEFORE_ATTRIBUTE_VALUE:\n case SINGLE_QUOTED_ATTRIBUTE_VALUE:\n case DOUBLE_QUOTED_ATTRIBUTE_VALUE:\n case UNQUOTED_ATTRIBUTE_VALUE:\n case HTML_TAG_NAME:\n context.resetAttribute();\n context.setState(State.BEFORE_ATTRIBUTE_NAME, node.getSourceLocation().getEndPoint());\n break;\n case CDATA:\n case DOUBLE_QUOTED_XML_ATTRIBUTE_VALUE:\n case HTML_COMMENT:\n case NONE:\n case PCDATA:\n case RCDATA_SCRIPT:\n case RCDATA_STYLE:\n case RCDATA_TEXTAREA:\n case RCDATA_TITLE:\n case SINGLE_QUOTED_XML_ATTRIBUTE_VALUE:\n case XML_DECLARATION:\n context.reset();\n context.setState(startState, node.getSourceLocation().getEndPoint());\n break;\n }\n }\n context.finishBlock();\n State finalState = context.getState();\n SourceLocation.Point finalStateTransitionPoint = context.getStateTransitionPoint();\n if (finalState.isInvalidForEndOfBlock()) {\n errorReporter.report(node.getSourceLocation(), BLOCK_ENDS_IN_INVALID_STATE, blockName, finalState);\n finalState = startState;\n }\n if (!errorReporter.errorsSince(checkpoint)) {\n State reconciled = startState.reconcile(finalState);\n if (reconciled == null) {\n String suggestion = reconciliationFailureHint(startState, finalState);\n errorReporter.report(finalStateTransitionPoint.asLocation(filePath), BLOCK_CHANGES_CONTEXT, blockName, startState, finalState, suggestion != null ? \"String_Node_Str\" + suggestion : \"String_Node_Str\");\n } else {\n finalState = reconciled;\n reparentNodes(node, context, finalState);\n }\n } else {\n finalState = startState;\n }\n context.setState(finalState, node.getSourceLocation().getEndPoint());\n return finalState;\n}\n"
|
"public void close() throws IOException {\n os.closeEntry();\n if (Files.exists(zipFilePath)) {\n try (ZipFile zipFile = new ZipFile(zipFilePath)) {\n Enumeration<? extends ZipEntry> e = zipFile.entries();\n while (e.hasMoreElements()) {\n ZipEntry zipEntry = e.nextElement();\n if (!zipEntry.getName().equals(fileName)) {\n os.putNextEntry(zipEntry);\n try (InputStream zis = zipFile.getInputStream(zipEntry.getName())) {\n ByteStreams.copy(zis, zos);\n }\n zos.closeEntry();\n }\n }\n }\n }\n zos.close();\n Files.copy(tmpZipFilePath, zipFilePath, StandardCopyOption.REPLACE_EXISTING);\n Files.delete(tmpZipFilePath);\n}\n"
|
"private BlurIndex openShard(String table, String shard) throws IOException {\n LOG.info(\"String_Node_Str\", shard, table);\n TableContext tableContext = getTableContext(table);\n Path tablePath = tableContext.getTablePath();\n Path hdfsDirPath = new Path(tablePath, shard);\n BlurLockFactory lockFactory = new BlurLockFactory(_configuration, hdfsDirPath, _nodeName, BlurUtil.getPid());\n HdfsDirectory longTermStorage = new HdfsDirectory(_configuration, hdfsDirPath);\n longTermStorage.setLockFactory(lockFactory);\n Directory directory;\n URI uri = hdfsDirPath.toUri();\n String scheme = uri.getScheme();\n if (scheme != null && scheme.equals(\"String_Node_Str\")) {\n LOG.info(\"String_Node_Str\", shard, table);\n FastHdfsKeyValueDirectory shortTermStorage = new FastHdfsKeyValueDirectory(_configuration, new Path(hdfsDirPath, \"String_Node_Str\"));\n directory = new JoinDirectory(longTermStorage, shortTermStorage);\n } else {\n directory = longTermStorage;\n }\n ShardContext shardContext = ShardContext.create(tableContext, shard);\n Directory dir;\n TableDescriptor descriptor = tableContext.getDescriptor();\n boolean blockCacheEnabled = descriptor.isBlockCaching();\n if (blockCacheEnabled) {\n Set<String> blockCacheFileTypes = descriptor.getBlockCachingFileTypes();\n directory = _blockCacheDirectoryFactory.newDirectory(table, shard, directory, blockCacheFileTypes);\n }\n BlurIndex index = tableContext.newInstanceBlurIndex(shardContext, dir, _mergeScheduler, _gc, _searchExecutor, _indexCloser, _refresher, _warmup);\n if (_clusterStatus.isReadOnly(true, _cluster, table)) {\n index = new BlurIndexReadOnly(index);\n }\n _filterCache.opening(table, shard, index);\n TableDescriptor tableDescriptor = _clusterStatus.getTableDescriptor(true, _cluster, table);\n warmUp(index, tableDescriptor, shard);\n return index;\n}\n"
|
"private void setupTabs() {\n tabDescription = addTab(getString(R.string.tab_description));\n tabRelated = addTab(getString(R.string.tab_related));\n tabListenerDisabled = selectedTabIndex != 0;\n bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);\n tabListenerDisabled = false;\n if (savedSelectedTabIndex != 0) {\n bar.setSelectedNavigationItem(savedSelectedTabIndex);\n }\n}\n"
|
"protected String buildDrillAction(IAction action, Object context) {\n String baseURL = null;\n if (context != null && context instanceof HTMLRenderContext) {\n baseURL = ((HTMLRenderContext) context).getBaseURL();\n }\n StringBuffer link = new StringBuffer();\n String reportName = action.getReportName();\n if (reportName != null && !reportName.equals(\"String_Node_Str\")) {\n link.append(baseURL);\n appendReportDesignName(link, reportName);\n String format = action.getFormat();\n if (format != null && format.length() > 0) {\n link.append(\"String_Node_Str\" + format);\n }\n if (action.getParameterBindings() != null) {\n Iterator paramsIte = action.getParameterBindings().entrySet().iterator();\n while (paramsIte.hasNext()) {\n Map.Entry entry = (Map.Entry) paramsIte.next();\n try {\n link.append(\"String_Node_Str\" + URLEncoder.encode((String) entry.getKey(), \"String_Node_Str\") + \"String_Node_Str\" + URLEncoder.encode((String) entry.getValue(), \"String_Node_Str\"));\n } catch (UnsupportedEncodingException e) {\n }\n }\n }\n }\n if (action.getBookmark() != null) {\n link.append(\"String_Node_Str\");\n link.append(action.getBookmark());\n }\n return link.toString();\n}\n"
|
"private SerialPipes createPipes() {\n List<Pipe> pipes = new ArrayList<Pipe>();\n pipes.add(new CharSequenceLowercase());\n pipes.add(new CharSequence2TokenSequence(CharSequenceLexer.LEX_WORDS));\n pipes.add(new TokenSequence2PorterStems());\n return new SerialPipes(pipes);\n}\n"
|
"public void testUpdateCourseGroup() throws IOException, URISyntaxException {\n assertTrue(conn.login(\"String_Node_Str\", \"String_Node_Str\"));\n GroupVO vo = new GroupVO();\n vo.setKey(g1.getKey());\n vo.setName(\"String_Node_Str\");\n vo.setDescription(\"String_Node_Str\");\n vo.setMinParticipants(g1.getMinParticipants());\n vo.setMaxParticipants(g1.getMaxParticipants());\n vo.setType(g1.getType());\n URI request = UriBuilder.fromUri(getContextURI()).path(\"String_Node_Str\" + courseRepoEntry.getOlatResource().getResourceableId() + \"String_Node_Str\" + g1.getKey()).build();\n HttpPost method = conn.createPost(request, MediaType.APPLICATION_JSON, true);\n conn.addJsonEntity(method, vo);\n HttpResponse response = conn.execute(method);\n EntityUtils.consume(response.getEntity());\n assertTrue(response.getStatusLine().getStatusCode() == 200 || response.getStatusLine().getStatusCode() == 201);\n BusinessGroup bg = businessGroupService.loadBusinessGroup(g1.getKey());\n assertNotNull(bg);\n assertEquals(bg.getKey(), vo.getKey());\n assertEquals(\"String_Node_Str\", bg.getName());\n assertEquals(\"String_Node_Str\", bg.getDescription());\n}\n"
|
"public void handleForeignSelectionCommand(String dataDomainType, IDCategory idCategory, SelectionCommand selectionCommand) {\n if (CLINICAL_DATADOMAIN_TYPE.equals(dataDomainType) && dimensionIDCategory.equals(idCategory)) {\n SelectionCommandEvent newCommandEvent = new SelectionCommandEvent();\n newCommandEvent.setSelectionCommand(selectionCommand);\n newCommandEvent.setIDCategory(idCategory);\n newCommandEvent.setEventSpace(dataDomainType);\n eventPublisher.triggerEvent(newCommandEvent);\n }\n}\n"
|
"public static boolean isValidDesign(SessionHandle sessionHandle, String fileName, InputStream is) {\n ReportDesign design = null;\n try {\n ModuleOption options = new ModuleOption();\n options.setSemanticCheck(false);\n design = DesignReader.getInstance().read(sessionHandle.getSession(), fileName, is, options);\n return design != null;\n } catch (DesignFileException e) {\n return false;\n }\n}\n"
|
"public void actionPerformed(ActionEvent e) {\n JButton button = (JButton) e.getSource();\n String buttonName = button.getName();\n if (buttonName.equals(CALL_BUTTON)) {\n callButtonPressed();\n } else if (buttonName.equals(CONF_CALL_BUTTON)) {\n mergeCallButtonPressed();\n } else if (buttonName.equals(VIDEO_CALL_BUTTON)) {\n videoCallButtonPressed();\n } else if (buttonName.equals(HANGUP_BUTTON)) {\n hangupButtonPressed();\n }\n dispose();\n}\n"
|
"public boolean inGroup(String player, String group) {\n return PermissionUser.matchUserIgnoreCase(player).inGroup(getPermissionManager().getGroupFile().getGroup(group));\n}\n"
|
"public int compareTo(Configurator o) {\n if (o == null) {\n return -1;\n }\n int ipCompare = getUrl().getHost().compareTo(o.getUrl().getHost());\n if (ipCompare == 0) {\n int i = getUrl().getParameter(Constants.PRIORITY_KEY, 0), j = o.getUrl().getParameter(Constants.PRIORITY_KEY, 0);\n if (i < j) {\n return -1;\n } else if (i > j) {\n return 1;\n } else {\n return 0;\n }\n } else {\n return ipCompare;\n }\n}\n"
|
"public void generateMappings(TypeInfo info, XMLDescriptor descriptor, NamespaceInfo namespaceInfo) {\n List<Property> propertiesInOrder = info.getNonTransientPropertiesInPropOrder();\n for (int i = 0; i < propertiesInOrder.size(); i++) {\n Property next = propertiesInOrder.get(i);\n if (next != null) {\n generateMapping(next, descriptor, namespaceInfo);\n }\n } else {\n for (int i = 0; i < propOrder.length; i++) {\n Property next = info.getProperties().get(propOrder[i]);\n if (next != null) {\n generateMapping(next, descriptor, namespaceInfo);\n }\n }\n }\n}\n"
|
"public int[] getAccessibleSlotsFromSide(int var1) {\n if (var1 == 1) {\n return this.kInput;\n }\n return this.kInput;\n}\n"
|
"protected Injector getInjector() {\n return Guice.createInjector(getModule());\n}\n"
|
"public void openStartElement(XPathFragment xPathFragment, NamespaceResolver namespaceResolver) {\n this.addPositionalNodes(xPathFragment, namespaceResolver);\n if (isStartElementOpen) {\n outputStreamWrite(CLOSE_ELEMENT);\n }\n if (!isLastEventText) {\n if (numberOfTabs > 0) {\n outputStreamWrite(CR);\n }\n outputStreamWriteTab();\n }\n isStartElementOpen = true;\n outputStreamWrite(OPEN_START_ELEMENT);\n outputStreamWrite(getNameForFragmentBytes(xPathFragment));\n numberOfTabs++;\n isLastEventText = false;\n}\n"
|
"public IContributionItem[] getContributionsForService(IServiceInfo serviceInfo) {\n IServiceID serviceID = serviceInfo.getServiceID();\n List serviceTypes = Arrays.asList(serviceID.getServiceTypeID().getServices());\n String protocol = null;\n if (serviceTypes.size() == 1 && serviceTypes.contains(\"String_Node_Str\"))\n protocol = \"String_Node_Str\";\n else if (serviceTypes.size() == 1 && serviceTypes.contains(\"String_Node_Str\"))\n protocol = \"String_Node_Str\";\n else if (serviceTypes.size() == 1 && serviceTypes.contains(\"String_Node_Str\"))\n protocol = \"String_Node_Str\";\n if (protocol == null)\n return EMPTY_CONTRIBUTION;\n URI location = serviceInfo.getLocation();\n StringBuffer buf = new StringBuffer(protocol);\n buf.append(\"String_Node_Str\").append(location.getHost());\n if (location.getPort() != -1)\n buf.append(\"String_Node_Str\").append(location.getPort());\n IServiceProperties svcProps = serviceInfo.getServiceProperties();\n final String path = svcProps.getPropertyString(RFC2782_PATH);\n if (path != null) {\n if (!path.startsWith(\"String_Node_Str\"))\n buf.append(\"String_Node_Str\");\n buf.append(path);\n }\n final String urlString = buf.toString();\n Action action = new Action() {\n public void run() {\n openBrowser(urlString);\n }\n };\n action.setText(NLS.bind(Messages.HttpServiceAccessHandler_MENU_TEXT, urlString));\n return new IContributionItem[] { new ActionContributionItem(action) };\n}\n"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.