auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public File getMainApk() { Set<File> testedApkFiles = new HashSet<File>(testedConfiguration.getFiles()); if (testedApkFiles.size() > 1) { File metadataFile = testedMetadata.getSingleFile(); FilterDataPersistence persistence = new FilterDataPersistence(); List<FilterDataPersistence.Record> filterDatas; try { filterDatas = <START> persistence .load(new <END> FileReader(metadataFile)); } catch (IOException e) { throw new RuntimeException(e); } for (FilterDataPersistence.Record filterData : filterDatas) { File splitFile = findSplitFile(testedApkFiles, filterData.splitFileName); if (splitFile != null) { testedApkFiles.remove(splitFile); } else { throw new RuntimeException( String.format("Internal Error : %1$s is not in the list of published files", filterData.splitFileName)); } } if (testedApkFiles.size() != 1) { throw new RuntimeException( String.format("Internal Error : %1$s files are not in the variant metadata", Joiner.on(",").join(testedApkFiles))); } } if (testedApkFiles.isEmpty()) { throw new RuntimeException("Cannot retrieve tested APKs"); } return testedApkFiles.iterator().next(); }</code><technical_language>fit a single line</technical_language>

Target:
public File getMainApk() { Set<File> testedApkFiles = new HashSet<File>(testedConfiguration.getFiles()); if (testedApkFiles.size() > 1) { File metadataFile = testedMetadata.getSingleFile(); FilterDataPersistence persistence = new FilterDataPersistence(); List<FilterDataPersistence.Record> filterDatas; try { filterDatas = persistence.load(new FileReader(metadataFile)); } catch (IOException e) { throw new RuntimeException(e); } for (FilterDataPersistence.Record filterData : filterDatas) { File splitFile = findSplitFile(testedApkFiles, filterData.splitFileName); if (splitFile != null) { testedApkFiles.remove(splitFile); } else { throw new RuntimeException( String.format("Internal Error : %1$s is not in the list of published files", filterData.splitFileName)); } } if (testedApkFiles.size() != 1) { throw new RuntimeException( String.format("Internal Error : %1$s files are not in the variant metadata", Joiner.on(",").join(testedApkFiles))); } } if (testedApkFiles.isEmpty()) { throw new RuntimeException("Cannot retrieve tested APKs"); } return Iterables.getOnlyElement(testedApkFiles); }
Source:
<code>protected void executeVmCommand() { <START> initEffectiveCompatibilityVersion(); <END> try { addVmToDb(); addVmToAffinityGroups(); addVmToAffinityLabels(); addPermissionsToDB(); processImages(); vmHandler.addVmInitToDB(getVm().getStaticData().getVmInit()); discardHelper.logIfDisksWithIllegalPassDiscardExist(getVmId()); Cluster cluster = clusterDao.get(getParameters().getClusterId()); if (getVm().getClusterCompatibilityVersionOrigin().less(cluster.getCompatibilityVersion())) { updateVm(); } } catch (RuntimeException e) { macPool.freeMacs(macsAdded); throw e; } setSucceeded(true); getReturnValue().setActionReturnValue(getVm()); }</code><technical_language>This change risky. means effective compatibility version set validate(). do need this</technical_language>

Target:
protected void executeVmCommand() { try { addVmToDb(); addVmToAffinityGroups(); addVmToAffinityLabels(); addPermissionsToDB(); processImages(); vmHandler.addVmInitToDB(getVm().getStaticData().getVmInit()); discardHelper.logIfDisksWithIllegalPassDiscardExist(getVmId()); Cluster cluster = clusterDao.get(getParameters().getClusterId()); if (getVm() != null && getVm().getClusterCompatibilityVersionOrigin() != null && getVm().getClusterCompatibilityVersionOrigin().less(cluster.getCompatibilityVersion())) { updateVm(); } } catch (RuntimeException e) { macPool.freeMacs(macsAdded); throw e; } setSucceeded(true); getReturnValue().setActionReturnValue(getVm()); }
Source:
<code>public List<E> findSpecificRule(Map<String, String> filterMap) { Criteria criteria = createDistinctRootEntityCriteria(); for (Entry<String, String> filter : filterMap.entrySet()) { <START> if (StringUtils.isNoneEmpty(filter.getValue())) { <END> criteria.add(Restrictions.like(filter.getKey(), filter.getValue())); } else { criteria.add(Restrictions.isNull(filter.getKey())); } } List<E> result = criteria.list(); return result; }</code><technical_language>isNotEmpty()</technical_language>

Target:
public List<E> findSpecificRule(Map<String, String> filterMap) { Criteria criteria = createDistinctRootEntityCriteria(); for (Entry<String, String> filter : filterMap.entrySet()) { if (StringUtils.isNotEmpty(filter.getValue())) { criteria.add(Restrictions.eq(filter.getKey(), filter.getValue()).ignoreCase()); } else { criteria.add(Restrictions.isNull(filter.getKey())); } } List<E> result = criteria.list(); return result; }
Source:
<code>private Command createCommandFromString(Item item, String commandAsString) throws BindingConfigParseException { if (CHANGED_COMMAND_KEY.equals(commandAsString)) { return CHANGED_COMMAND_KEY; } else if (WILDCARD_COMMAND_KEY.equals(commandAsString)) { return WILDCARD_COMMAND_KEY; } else { Command command = TypeParser.parseCommand(item.getAcceptedCommandTypes(), commandAsString); if (command == null) { throw new BindingConfigParseException("couldn't create Command from '" + commandAsString + "' "); <START> } <END> return command; } }</code><technical_language>Eclipse formatter? project owners pretty strict changes easier track</technical_language>

Target:
private Command createCommandFromString(Item item, String commandAsString) throws BindingConfigParseException { if (WILDCARD_COMMAND_KEY.equals(commandAsString)) { return WILDCARD_COMMAND_KEY; } else { Command command = TypeParser.parseCommand(item.getAcceptedCommandTypes(), commandAsString); if (command == null) { throw new BindingConfigParseException("couldn't create Command from '" + commandAsString + "' "); } return command; } }
Source:
<code>public void restart(String uiCommand) { final UIConstants constants = ConstantsManager.getInstance().getConstants(); final UIMessages messages = ConstantsManager.getInstance().getMessages(); HostRestartConfirmationModel model = new HostRestartConfirmationModel(); setConfirmWindow(model); model.setTitle(constants.restartHostsTitle()); model.setHelpTag(HelpTag.restart_host); model.setHashName("restart_host"); model.setMessage(constants.areYouSureYouWantToRestartTheFollowingHostsMsg()); ArrayList<String> items = new ArrayList<>(); for (Object item : getSelectedItems()) { VDS vds = (VDS) item; int runningVms = vds.getVmCount(); if (runningVms > 0) { items.add(messages.hostNumberOfRunningVms(vds.getName(), runningVms)); } else { items.add(vds.getName()); } } model.setItems(items); <START> model.setForceToMaintenanceLabel(ConstantsManager.getInstance().getConstants().forceToMaintenance()); <END> model.getForceToMaintenance().setEntity(false); model.getForceToMaintenance().setIsAvailable(true); model.getForceToMaintenance().setIsChangeable(true); UICommand tempVar = new UICommand(uiCommand, this); tempVar.setTitle(constants.ok()); tempVar.setIsDefault(true); model.getCommands().add(tempVar); UICommand tempVar2 = new UICommand("Cancel", this); tempVar2.setTitle(constants.cancel()); tempVar2.setIsCancel(true); model.getCommands().add(tempVar2); }</code><technical_language>other places this confirmation called? If not, leave label setting defined in HostRestartConfirmationPopupView</technical_language>

Target:
public void restart(String uiCommand) { final UIConstants constants = ConstantsManager.getInstance().getConstants(); final UIMessages messages = ConstantsManager.getInstance().getMessages(); HostRestartConfirmationModel model = new HostRestartConfirmationModel(); setConfirmWindow(model); model.setTitle(constants.restartHostsTitle()); model.setHelpTag(HelpTag.restart_host); model.setHashName("restart_host"); model.setMessage(constants.areYouSureYouWantToRestartTheFollowingHostsMsg()); ArrayList<String> items = new ArrayList<>(); for (Object item : getSelectedItems()) { VDS vds = (VDS) item; int runningVms = vds.getVmCount(); if (runningVms > 0) { items.add(messages.hostNumberOfRunningVms(vds.getName(), runningVms)); } else { items.add(vds.getName()); } } model.setItems(items); UICommand tempVar = new UICommand(uiCommand, this); tempVar.setTitle(constants.ok()); tempVar.setIsDefault(true); model.getCommands().add(tempVar); UICommand tempVar2 = new UICommand("Cancel", this); tempVar2.setTitle(constants.cancel()); tempVar2.setIsCancel(true); model.getCommands().add(tempVar2); }
Source:
<code>public static void incrementAttributeInt(ITmfStateSystemBuilder ssb, long t, int attributeQuark, int increment) throws StateValueTypeException, AttributeNotFoundException { Object stateValue = ssb.queryOngoing(attributeQuark); int prevValue = 0; if <START> (stateValue != null && stateValue <END> instanceof Integer) { prevValue = (int) stateValue; } ssb.modifyAttribute(t, prevValue + increment, attributeQuark); }</code><technical_language>remove this</technical_language>

Target:
public static void incrementAttributeInt(ITmfStateSystemBuilder ssb, long t, int attributeQuark, int increment) { Object stateValue = ssb.queryOngoing(attributeQuark); int prevValue = 0; if (stateValue instanceof Integer) { prevValue = (int) stateValue; } ssb.modifyAttribute(t, prevValue + increment, attributeQuark); }
Source:
<code>public void recordTravelTimesForTarget (int target, int[] times) { int[] percentileTravelTimesMinutes = new int[nPercentiles]; if (times.length == 1) { Arrays.fill(percentileTravelTimesMinutes, times[0]); } else if (times.length == timesPerDestination) { Arrays.sort(times); for (int p = 0; p < nPercentiles; p++) { int timeSeconds = times[percentileIndexes[p]]; if (timeSeconds == FastRaptorWorker.UNREACHED) { percentileTravelTimesMinutes[p] = FastRaptorWorker.UNREACHED; } else { int timeMinutes = timeSeconds / 60; percentileTravelTimesMinutes[p] = timeMinutes; } } } else { <START> throw new ParameterException("Must supply expected number of times or only one time."); <END> } if (retainTravelTimes) timeGrid.setTarget(target, percentileTravelTimesMinutes); if (calculateAccessibility) { Grid grid = accessibilityResult.grids[0]; int x = target % grid.width; int y = target / grid.width; double amount = grid.grid[x][y]; for (int p = 0; p < nPercentiles; p++) { if (percentileTravelTimesMinutes[p] < task.maxTripDurationMinutes) { accessibilityResult.incrementAccessibility(0, 0, p, amount); } } } }</code><technical_language>I "travel time values" instead of "times". written, error message is missing a word "Must supply X expected number of times..."</technical_language>

Target:
public void recordTravelTimesForTarget (int target, int[] times) { int[] percentileTravelTimesMinutes = new int[nPercentiles]; if (times.length == 1) { Arrays.fill(percentileTravelTimesMinutes, times[0]); } else if (times.length == timesPerDestination) { Arrays.sort(times); for (int p = 0; p < nPercentiles; p++) { int timeSeconds = times[percentileIndexes[p]]; if (timeSeconds == FastRaptorWorker.UNREACHED) { percentileTravelTimesMinutes[p] = FastRaptorWorker.UNREACHED; } else { int timeMinutes = timeSeconds / 60; percentileTravelTimesMinutes[p] = timeMinutes; } } } else { throw new ParameterException("You must supply the expected number of travel time values (or only one value)."); } if (retainTravelTimes) timeGrid.setTarget(target, percentileTravelTimesMinutes); if (calculateAccessibility) { Grid grid = accessibilityResult.grids[0]; int x = target % grid.width; int y = target / grid.width; double amount = grid.grid[x][y]; for (int p = 0; p < nPercentiles; p++) { if (percentileTravelTimesMinutes[p] < task.maxTripDurationMinutes) { accessibilityResult.incrementAccessibility(0, 0, p, amount); } } } }
Source:
<code>public void setVisible (boolean visible) { super.setVisible (visible); <START> if (visible) { <END> showItem (pendingShowItem); } }</code><technical_language>user selection, 'pendingShowItem' null, add a null check in if</technical_language>

Target:
public void setVisible (boolean visible) { super.setVisible (visible); if ((visible) && (pendingShowItem != null)) { showItem (pendingShowItem); pendingShowItem = null; } }
Source:
<code>protected abstract void runAutonomous() throws InterruptedException, AutonomousModeOverException; public void loadSettings(TuningContext context) { <START> context.getFloat("autonomous-encoder", 0.1f); <END> }</code><technical_language>this snippet do</technical_language>

Target:
protected abstract void runAutonomous() throws InterruptedException, AutonomousModeOverException; public void loadSettings(TuningContext context) { this.driveSpeed = context.getFloat("auto-main-driveSpeed", 1.0f); this.rotateSpeed = context.getFloat("auto-main-rotateSpeed", 1.0f); }
Source:
<code>Result(final SearchResult sr) throws NamingException { if (returnAttributes != null) { for (final String attName : returnAttributes) { final Attribute a = sr.getAttributes().get(attName); if (a != null && a.size() > 0) { atts.put(attName, a); attsSingle.put(attName, String.valueOf(a.get(0))); } } } else { NamingEnumeration<? extends Attribute> e = sr.getAttributes().getAll(); while (e.hasMoreElements()) { final Attribute a = e.nextElement(); if (a.size() == 1) { <START> atts.put(a.getID(), a); <END> attsSingle.put(a.getID(), String.valueOf(a.get(0))); } } } atts.put("dn", new BasicAttribute("dn", sr.getNameInNamespace())); attsSingle.put("dn", sr.getNameInNamespace()); }</code><technical_language>this line of if a.size() == 1 Attribute object hold multiple values fine</technical_language>

Target:
Result(final SearchResult sr) throws NamingException { if (returnAttributes != null) { for (final String attName : returnAttributes) { final Attribute a = sr.getAttributes().get(attName); if (a != null && a.size() > 0) { atts.put(attName, a); attsSingle.put(attName, String.valueOf(a.get(0))); } } } else { NamingEnumeration<? extends Attribute> e = sr.getAttributes().getAll(); while (e.hasMoreElements()) { final Attribute a = e.nextElement(); atts.put(a.getID(), a); if (a.size() == 1) { attsSingle.put(a.getID(), String.valueOf(a.get(0))); } } } atts.put("dn", new BasicAttribute("dn", sr.getNameInNamespace())); attsSingle.put("dn", sr.getNameInNamespace()); }
Source:
<code>protected void closeWatchRequest() { if (this.watchRequest == null) { return; } <START> WatchCancelRequest watchCancelRequest = <END> WatchCancelRequest.newBuilder().setWatchId(watchId).build(); WatchRequest cancelRequest = WatchRequest.newBuilder() .setCancelRequest(watchCancelRequest).build(); watchRequest.onNext(cancelRequest); this.watchRequest = null; }</code><technical_language>change : java protected void closeWatchRequest() { if (this.watchRequest == null) { return; } try{ WatchCancelRequest watchCancelRequest = WatchCancelRequest.newBuilder().setWatchId(watchId).build(); WatchRequest cancelRequest = WatchRequest.newBuilder() .setCancelRequest(watchCancelRequest).build(); watchRequest.onNext(cancelRequest); }finally { this.watchRequest.onCompleted(); this.watchRequest = null; } }</technical_language>

Target:
protected void closeWatchRequest() { if (this.watchRequest == null) { return; } try { WatchCancelRequest watchCancelRequest = WatchCancelRequest.newBuilder().setWatchId(watchId).build(); WatchRequest cancelRequest = WatchRequest.newBuilder() .setCancelRequest(watchCancelRequest).build(); watchRequest.onNext(cancelRequest); } finally { this.watchRequest.onCompleted(); this.watchRequest = null; } }
Source:
<code>private boolean matchesExtensions(LanguageDescription language, String path) { if (language.getFileExtensions() != null) { for (String extension : language.getFileExtensions()) { if (path.endsWith(extension)) { return true; } } } <START> return false; <END> }</code><technical_language>return Optional.ofNullable(language.getFileExtensions()).map(Collection::stream).orElse(Stream.empty()).anyMatch(extension -> path.endsWith(extension));</technical_language>

Target:
private boolean matchesExtensions(LanguageDescription language, String path) { return language.getFileExtensions().stream().anyMatch(extension->path.endsWith(extension)); }
Source:
<code>public StorageTraversal resolveLocalModel(IResource start, IProgressMonitor monitor) throws InterruptedException { if (!(start instanceof IFile)) { return new StorageTraversal(new LinkedHashSet<IStorage>()); } lock.lockInterruptibly(); try { while (!currentlyResolving.isEmpty()) { notResolving.await(); } resolvedResources = new LinkedHashSet<URI>(); diagnostic = new BasicDiagnostic(); if (getResolutionScope() != CrossReferenceResolutionScope.SELF) { final SynchronizedResourceSet resourceSet = new SynchronizedResourceSet(); updateDependencies(resourceSet, (IFile)start, monitor); updateChangedResources(resourceSet, monitor); } while (!currentlyResolving.isEmpty()) { resolutionEnd.await(); } final Set<IStorage> traversalSet = resolveTraversal((IFile)start, Collections.<URI> emptySet(), monitor); StorageTraversal traversal = new StorageTraversal(traversalSet, diagnostic); diagnostic = null; <START> resolvedResources = null; <END> return traversal; } finally { notResolving.signal(); lock.unlock(); } }</code><technical_language>Please move "cleanup" statements "notResolving.signal()" finally clause</technical_language>

Target:
public StorageTraversal resolveLocalModel(IResource start, IProgressMonitor monitor) throws InterruptedException { if (!(start instanceof IFile)) { return new StorageTraversal(new LinkedHashSet<IStorage>()); } lock.lockInterruptibly(); try { while (!currentlyResolving.isEmpty()) { notResolving.await(); } resolvedResources = new LinkedHashSet<URI>(); diagnostic = new BasicDiagnostic(); if (getResolutionScope() != CrossReferenceResolutionScope.SELF) { final SynchronizedResourceSet resourceSet = new SynchronizedResourceSet(); updateDependencies(resourceSet, (IFile)start, monitor); updateChangedResources(resourceSet, monitor); } while (!currentlyResolving.isEmpty()) { resolutionEnd.await(); } final Set<IStorage> traversalSet = resolveTraversal((IFile)start, Collections.<URI> emptySet()); StorageTraversal traversal = new StorageTraversal(traversalSet, diagnostic); return traversal; } finally { diagnostic = null; resolvedResources = null; notResolving.signal(); lock.unlock(); } }
Source:
<code>public long getCapacity() { long capacity; if (configuredCapacity < 0L) { long remaining; if (cachedCapacity > 0L) { remaining = cachedCapacity - getReserved(); } else { remaining = usage.getCapacity() - getReserved(); } capacity = Math.max(remaining, 0L); } else { capacity = configuredCapacity; } if (enableSameDiskArchival) { <START> double reservedForArchival = conf.getDouble( <END> DFSConfigKeys.DFS_DATANODE_RESERVE_FOR_ARCHIVE_PERCENTAGE, DFSConfigKeys.DFS_DATANODE_RESERVE_FOR_ARCHIVE_PERCENTAGE_DEFAULT); if (storageType == StorageType.ARCHIVE) { capacity = (long) (capacity * reservedForArchival); } else { capacity = (long) (capacity * (1 - reservedForArchival)); } } return capacity; }</code><technical_language>reservedForArchival is this.reservedForArchival init</technical_language>

Target:
public long getCapacity() { long capacity; if (configuredCapacity < 0L) { long remaining; if (cachedCapacity > 0L) { remaining = cachedCapacity - getReserved(); } else { remaining = usage.getCapacity() - getReserved(); } capacity = Math.max(remaining, 0L); } else { capacity = configuredCapacity; } if (enableSameDiskTiering && dataset.getMountVolumeMap() != null) { double capacityRatio = dataset.getMountVolumeMap() .getCapacityRatioByMountAndStorageType(mount, storageType); capacity = (long) (capacity * capacityRatio); } return capacity; }
Source:
<code>public boolean canExecute() { return <START> null != fbnElement.getType(); <END> }</code><technical_language>this breaks replace untyped subapp extracted type feature I did. I problem code is entry is null for update type null for change type. a fix put in constructor else{ entry = fbnElement.getTypeEntry(); //or correct method is } Withthat canexecute work. some other ifs removed that</technical_language>

Target:
public boolean canExecute() { return (null != entry) && (null != fbnElement) && (null != network); }
Source:
<code>public static void decorateTrees(World world, Random rand, int worldX, int worldZ) { <START> if (!Config.isValidTreeDim(world.provider.getDimension())) { <END> return; } if (biomeCache.isEmpty()) { generateBiomeCache(world, rand); } for (int tries = 0; tries < 4 + rand.nextInt(2); tries++) { int x = worldX + rand.nextInt(16); int z = worldZ + rand.nextInt(16); BlockPos pos = new BlockPos(x, 0, z); Biome biome = world.getBiome(pos); Set<ITree> trees = biomeCache.computeIfAbsent(biome.getRegistryName(), k -> new HashSet<>()); for (ITree tree : trees) { IAlleleTreeSpecies species = tree.getGenome().getPrimary(); if (species.getRarity() * Config.generateTreesAmount >= rand.nextFloat()) { pos = getValidPos(world, x, z, tree); if (pos == null) { continue; } if (species.getGrowthProvider().canSpawn(tree, world, pos)) { if (TreeGenHelper.generateTree(tree, world, pos)) { return; } } } } } }</code><technical_language>If add || Config.generateTreesAmount == 0 efficiently skip decorating trees</technical_language>

Target:
public static void decorateTrees(World world, Random rand, int worldX, int worldZ) { if (!Config.isValidTreeDim(world.provider.getDimension()) || Config.generateTreesAmount == 0) { return; } if (biomeCache.isEmpty()) { generateBiomeCache(world, rand); } for (int tries = 0; tries < 4 + rand.nextInt(2); tries++) { int x = worldX + rand.nextInt(16); int z = worldZ + rand.nextInt(16); BlockPos pos = new BlockPos(x, 0, z); Biome biome = world.getBiome(pos); Set<ITree> trees = biomeCache.computeIfAbsent(biome.getRegistryName(), k -> new HashSet<>()); for (ITree tree : trees) { IAlleleTreeSpecies species = tree.getGenome().getPrimary(); if (species.getRarity() * Config.generateTreesAmount >= rand.nextFloat()) { pos = getValidPos(world, x, z, tree); if (pos == null) { continue; } if (species.getGrowthProvider().canSpawn(tree, world, pos)) { if (TreeGenHelper.generateTree(tree, world, pos)) { return; } } } } } }
Source:
<code>public void clickOnAllPinTypes() { driver.switchTo().defaultContent(); driver.switchTo().frame(mapFrame); waitForElementByElement(allPinTypes); allPinTypes.click(); <START> PageObjectLogging.log("clickOnAllCategories", "All categories was clicked", true); <END> driver.switchTo().activeElement(); }</code><technical_language>correct "All categories clicked" "was"</technical_language>

Target:
public void clickOnAllPinTypes() { driver.switchTo().defaultContent(); driver.switchTo().frame(mapFrame); waitForElementByElement(allPinTypes); allPinTypes.click(); PageObjectLogging.log("clickOnAllCategories", "All categories were clicked", true); driver.switchTo().activeElement(); }
Source:
<code>protected List<ComparableEvent> index(List<Event> events, Map<String,Integer> predicateIndex) { <START> Map<String,Integer> omap = new HashMap<String,Integer>(); <END> int numEvents = events.size(); int outcomeCount = 0; List<ComparableEvent> eventsToCompare = new ArrayList<>(numEvents); List<Integer> indexedContext = new ArrayList<>(); for (Event ev:events) { String[] econtext = ev.getContext(); ComparableEvent ce; int ocID; String oc = ev.getOutcome(); if (omap.containsKey(oc)) { ocID = omap.get(oc); } else { ocID = outcomeCount++; omap.put(oc, ocID); } for (String pred : econtext) { if (predicateIndex.containsKey(pred)) { indexedContext.add(predicateIndex.get(pred)); } } if (indexedContext.size() > 0) { int[] cons = new int[indexedContext.size()]; for (int ci=0;ci<cons.length;ci++) { cons[ci] = indexedContext.get(ci); } ce = new ComparableEvent(ocID, cons, ev.getValues()); eventsToCompare.add(ce); } else { System.err.println("Dropped event "+ev.getOutcome()+":"+Arrays.asList(ev.getContext())); } indexedContext.clear(); } outcomeLabels = toIndexedStringArray(omap); predLabels = toIndexedStringArray(predicateIndex); return eventsToCompare; }</code><technical_language>need types RHS - i fix this this PR</technical_language>

Target:
protected List<ComparableEvent> index(List<Event> events, Map<String,Integer> predicateIndex) { Map<String,Integer> omap = new HashMap<>(); int numEvents = events.size(); int outcomeCount = 0; List<ComparableEvent> eventsToCompare = new ArrayList<>(numEvents); List<Integer> indexedContext = new ArrayList<>(); for (Event ev:events) { String[] econtext = ev.getContext(); ComparableEvent ce; int ocID; String oc = ev.getOutcome(); if (omap.containsKey(oc)) { ocID = omap.get(oc); } else { ocID = outcomeCount++; omap.put(oc, ocID); } for (String pred : econtext) { if (predicateIndex.containsKey(pred)) { indexedContext.add(predicateIndex.get(pred)); } } if (indexedContext.size() > 0) { int[] cons = new int[indexedContext.size()]; for (int ci = 0; ci < cons.length; ci++) { cons[ci] = indexedContext.get(ci); } ce = new ComparableEvent(ocID, cons, ev.getValues()); eventsToCompare.add(ce); } else { System.err.println("Dropped event " + ev.getOutcome() + ":" + Arrays.asList(ev.getContext())); } indexedContext.clear(); } outcomeLabels = toIndexedStringArray(omap); predLabels = toIndexedStringArray(predicateIndex); return eventsToCompare; }
Source:
<code>public void limit(Actor actor, LocalSession session, @Arg(desc = "The limit to set", def = "") Integer limit) { LocalConfiguration config = worldEdit.getConfiguration(); boolean mayDisable = actor.hasPermission("worldedit.limit.unrestricted"); limit = limit == null ? config.defaultChangeLimit : Math.max(-1, limit); if (!mayDisable && config.maxChangeLimit > -1) { if (limit > config.maxChangeLimit) { actor.printError(TranslatableComponent.of("worldedit.limit.too-high", TextComponent.of(config.maxChangeLimit))); return; } } session.setBlockChangeLimit(limit); Component component = TextComponent.empty().append(TranslatableComponent.of("worldedit.limit.set", TextComponent.of(limit))); if (limit != config.defaultChangeLimit) { <START> component.append(TranslatableComponent.of("worldedit.limit.return-to-default", TextColor.GRAY)); <END> } actor.printInfo(component); }</code><technical_language>Do need add a space here</technical_language>

Target:
public void limit(Actor actor, LocalSession session, @Arg(desc = "The limit to set", def = "") Integer limit) { LocalConfiguration config = worldEdit.getConfiguration(); boolean mayDisable = actor.hasPermission("worldedit.limit.unrestricted"); limit = limit == null ? config.defaultChangeLimit : Math.max(-1, limit); if (!mayDisable && config.maxChangeLimit > -1) { if (limit > config.maxChangeLimit) { actor.printError(TranslatableComponent.of("worldedit.limit.too-high", TextComponent.of(config.maxChangeLimit))); return; } } session.setBlockChangeLimit(limit); Component component = TextComponent.empty().append(TranslatableComponent.of("worldedit.limit.set", TextComponent.of(limit))); if (limit != config.defaultChangeLimit) { component.append(TextComponent.space()).append(TranslatableComponent.of("worldedit.limit.return-to-default", TextColor.GRAY)); } actor.printInfo(component); }
Source:
<code>public void setSlaveConnectTimeoutStr(String slaveConnectTimeoutStr) { if (StringUtils.isBlank(slaveConnectTimeoutStr)) { <START> setSlaveConnectTimeout(100); END> } else { setSlaveConnectTimeout(Integer.parseInt(slaveConnectTimeoutStr)); } }</code><technical_language>a constant instead of 100</technical_language>

Target:
public void setSlaveConnectTimeoutStr(String slaveConnectTimeoutStr) { if (StringUtils.isBlank(slaveConnectTimeoutStr)) { setSlaveConnectTimeout(DEFAULT_SLAVE_JENKINS_CONNECTION_TIMEOUT); } else { setSlaveConnectTimeout(Integer.parseInt(slaveConnectTimeoutStr)); } }
Source:
<code>synchronized EndpointContext getFollowUpEndpointContext(EndpointContext blockContext) { if (followUpEndpointContext == null || !followUpEndpointContext.getPeerAddress().equals(blockContext.getPeerAddress())) { EndpointContext context = exchange.getRequest().getDestinationContext(); String mode = context.get(DtlsEndpointContext.KEY_HANDSHAKE_MODE); if (mode != null && mode.equals(DtlsEndpointContext.HANDSHAKE_MODE_NONE)) { blockContext = MapBasedEndpointContext.addEntries(blockContext, DtlsEndpointContext.KEY_HANDSHAKE_MODE, DtlsEndpointContext.HANDSHAKE_MODE_NONE); } <START> followUpEndpointContext = blockContext; <END> } return followUpEndpointContext; }</code><technical_language>a details ? java if (mode != null && mode.equals(DtlsEndpointContext.HANDSHAKE_MODE_NONE)) { // restore handshake-mode "none" followUpEndpointContext = MapBasedEndpointContext.addEntries(blockContext, DtlsEndpointContext.KEY_HANDSHAKE_MODE, DtlsEndpointContext.HANDSHAKE_MODE_NONE); } else { followUpEndpointContext = blockContext; }</technical_language>

Target:
synchronized EndpointContext getFollowUpEndpointContext(EndpointContext blockContext) { if (followUpEndpointContext == null || !followUpEndpointContext.getPeerAddress().equals(blockContext.getPeerAddress())) { EndpointContext context = exchange.getRequest().getDestinationContext(); String mode = context.get(DtlsEndpointContext.KEY_HANDSHAKE_MODE); if (mode != null && mode.equals(DtlsEndpointContext.HANDSHAKE_MODE_NONE)) { followUpEndpointContext = MapBasedEndpointContext.addEntries(blockContext, DtlsEndpointContext.KEY_HANDSHAKE_MODE, DtlsEndpointContext.HANDSHAKE_MODE_NONE); } else { followUpEndpointContext = blockContext; } } return followUpEndpointContext; }
Source:
<code>public <T extends IEvaluation> T[] doEvaluation(JavaRDD<DataSet> data, int evalBatchSize, T... emptyEvaluations) { IEvaluateFlatMapFunction<T> evalFn = new IEvaluateFlatMapFunction<>(false, sc.broadcast(conf.toJson()), sc.broadcast(network.params()), evalBatchSize, emptyEvaluations); JavaRDD<T[]> evaluations = data.mapPartitions(evalFn); <START> return evaluations.reduce(new IEvaluationReduceFunction<T>()); <END> }</code><technical_language>reduce(mapPartitions) is RDD.aggregate(), If reformulate this in terms, get perf goodies treeAggregate for free: def aggregate[U](zeroValue: U)(seqOp: (U, T) U, combOp: (U, U) U): U a thought, dunno if worth this stage</technical_language>

Target:
public <T extends IEvaluation> T[] doEvaluation(JavaRDD<DataSet> data, int evalBatchSize, T... emptyEvaluations) { IEvaluateFlatMapFunction<T> evalFn = new IEvaluateFlatMapFunction<>(false, sc.broadcast(conf.toJson()), sc.broadcast(network.params()), evalBatchSize, emptyEvaluations); JavaRDD<T[]> evaluations = data.mapPartitions(evalFn); return evaluations.treeAggregate(null, new IEvaluateAggregateFunction<T>(), new IEvaluationReduceFunction<T>()); }
Source:
<code>public Adapter getContentAdapter() { if <START> (adapter == null) { <END> adapter = new EContentAdapter() { @Override public void notifyChanged(final Notification notification) { int type = notification.getEventType(); switch (type) { case Notification.ADD: case Notification.ADD_MANY: case Notification.REMOVE: case Notification.REMOVE_MANY: Display.getDefault().asyncExec(() -> refreshChildren()); break; case Notification.SET: break; default: break; } } }; } return adapter; }</code><technical_language>null == adapter</technical_language>

Target:
public Adapter getContentAdapter() { if (null == adapter) { adapter = new EContentAdapter() { @Override public void notifyChanged(final Notification notification) { int type = notification.getEventType(); switch (type) { case Notification.ADD: case Notification.ADD_MANY: case Notification.REMOVE: case Notification.REMOVE_MANY: Display.getDefault().asyncExec(() -> refreshChildren()); break; case Notification.SET: break; default: break; } } }; } return adapter; }
Source:
<code>public void parseOptionMap(Map<String, String[]> parameters) throws CmdLineException { <START> parseOptionMap(parameters, new ArrayList<String>()); <END> }</code><technical_language>Collections.<String> emptySet()</technical_language>

Target:
public void parseOptionMap(Map<String, String[]> parameters) throws CmdLineException { parseOptionMap(parameters, Collections.<String>emptySet()); }
Source:
<code>private void cancelQuery(String sql) throws InterruptedException { long endTime = System.currentTimeMillis() + SECONDS.toMillis(30); while (System.currentTimeMillis() < endTime) { String findQuerySql = "SELECT query_id from system.runtime.queries WHERE query = '%s' and state = 'RUNNING' LIMIT 2"; QueryResult queryResult = query(format(findQuerySql, sql)); checkState(queryResult.getRowsCount() < 2, "Query is executed multiple times"); if (queryResult.getRowsCount() == 1) { String queryId = (String) queryResult.row(0).get(0); Response response = queryCanceller.cancel(queryId); if (response.getStatusCode() != HttpStatus.OK.code() && response.getStatusCode() != HttpStatus.ACCEPTED.code() <START> && response.getStatusCode() != HttpStatus.NO_CONTENT.code()) { <END> fail(String.format("Unexpected error code %s; reason=%s", response.getStatusCode(), response.getStatusMessage())); } return; } TimeUnit.MILLISECONDS.sleep(100L); } throw new IllegalStateException("Query did not reach running state or maybe it was too quick."); }</code><technical_language>I single expected HttpStatus here. testing query cancellation do query cancellation REST api is supposed return</technical_language>

Target:
private void cancelQuery(String sql) throws InterruptedException { Stopwatch stopwatch = Stopwatch.createStarted(); while (stopwatch.elapsed(SECONDS) < 30) { String findQuerySql = "SELECT query_id from system.runtime.queries WHERE query = '%s' and state = 'RUNNING' LIMIT 2"; QueryResult queryResult = query(format(findQuerySql, sql)); checkState(queryResult.getRowsCount() < 2, "Query is executed multiple times"); if (queryResult.getRowsCount() == 1) { String queryId = (String) queryResult.row(0).get(0); Response response = queryCanceller.cancel(queryId); Assertions.assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NO_CONTENT.code()); return; } MILLISECONDS.sleep(100L); } throw new IllegalStateException("Query did not reach running state or maybe it was too quick."); }
Source:
<code>public static void GetVmsRunningOnOrMigratingToVds(AsyncQuery aQuery, Guid id) { aQuery.converterCallback = new IAsyncConverter() { @Override public Object Convert(Object source, AsyncQuery _asyncQuery) <START> { <END> ArrayList<VM> vms = (ArrayList<VM>) source; return vms; } }; Frontend.RunQuery(VdcQueryType.GetVmsRunningOnOrMigratingToVds, new GetVmsRunningOnOrMigratingToVdsParameters(id), aQuery); }</code><technical_language>this convert do some logic (e.g. if source is null return emtpy list this). enough "return source;" converter all</technical_language>

Target:
public static void GetVmsRunningOnOrMigratingToVds(AsyncQuery aQuery, Guid id) { aQuery.converterCallback = new IAsyncConverter() { @Override public Object Convert(Object source, AsyncQuery _asyncQuery) { if (source == null) { return new ArrayList<VM>(); } return source; } }; Frontend.RunQuery(VdcQueryType.GetVmsRunningOnOrMigratingToVds, new GetVmsRunningOnOrMigratingToVdsParameters(id), aQuery); }
Source:
<code>public void testSuccessfulSessionId() { VdcQueryParametersBase params = new VdcQueryParametersBase();; params.setHttpSessionId("good_session_id"); ValidateSessionQuery<VdcQueryParametersBase> query = spy(new ValidateSessionQuery<VdcQueryParametersBase>(params)); when(query.getSessionUser("good_session_id")).thenReturn(new VdcUser(Guid.NewGuid(), "myUser", "myDomain")); query.Execute(); <START> Assert.assertTrue(query.getQueryReturnValue().getSucceeded()); <END> Assert.assertTrue(query.getQueryReturnValue().getReturnValue() instanceof VdcUser); VdcUser user = (VdcUser) query.getQueryReturnValue().getReturnValue(); Assert.assertTrue(user.getDomainControler().equals("myDomain")); Assert.assertTrue(user.getUserName().equals("myUser")); }</code><technical_language>import static Assert</technical_language>

Target:
public void testSuccessfulSessionId() { VdcQueryParametersBase params = new VdcQueryParametersBase();; params.setHttpSessionId("good_session_id"); ValidateSessionQuery<VdcQueryParametersBase> query = spy(new ValidateSessionQuery<VdcQueryParametersBase>(params)); when(query.getSessionUser("good_session_id")).thenReturn(new VdcUser(Guid.NewGuid(), "myUser", "myDomain")); query.Execute(); assertTrue(query.getQueryReturnValue().getSucceeded()); assertTrue(query.getQueryReturnValue().getReturnValue() instanceof VdcUser); VdcUser user = (VdcUser) query.getQueryReturnValue().getReturnValue(); assertTrue(user.getDomainControler().equals("myDomain")); assertTrue(user.getUserName().equals("myUser")); }
Source:
<code><START> public ANetApiResponse TestGetAccountUpdaterJobDetails() throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException <END> { return GetAccountUpdaterJobDetails.run(apiLoginId, transactionKey); }</code><technical_language>throws part is there. This part exist</technical_language>

Target:
public ANetApiResponse TestGetAccountUpdaterJobDetails() { return GetAccountUpdaterJobDetails.run(apiLoginId, transactionKey); }
Source:
<code>private void finalizeMetadataChunk() { finalBlobProperties = new BlobProperties(getBlobSize(), passedInBlobProperties.getServiceId(), passedInBlobProperties.getOwnerId(), passedInBlobProperties.getContentType(), passedInBlobProperties.isPrivate(), passedInBlobProperties.getTimeToLiveInSeconds(), passedInBlobProperties.getCreationTimeInMs(), passedInBlobProperties.getAccountId(), passedInBlobProperties.getContainerId(), passedInBlobProperties.isEncrypted(), passedInBlobProperties.getExternalAssetTag()); if (isStitchOperation() || getNumDataChunks() > 1) { List<Pair<StoreKey, Long>> orderedChunkIdList = indexToChunkIds.values().stream().collect( <START> Collectors.toList()); <END> buf = MetadataContentSerDe.serializeMetadataContentV3(getBlobSize(), orderedChunkIdList); onFillComplete(false); } else { blobId = (BlobId) indexToChunkIds.get(0).getFirst(); state = ChunkState.Complete; operationCompleted = true; } }</code><technical_language>Format this file. new ArrayList<>(indexToChunkIds.values()), specific reason indexToChunkIds.values().stream().collect(Collectors.toList()) here</technical_language>

Target:
private void finalizeMetadataChunk() { finalBlobProperties = new BlobProperties(getBlobSize(), passedInBlobProperties.getServiceId(), passedInBlobProperties.getOwnerId(), passedInBlobProperties.getContentType(), passedInBlobProperties.isPrivate(), passedInBlobProperties.getTimeToLiveInSeconds(), passedInBlobProperties.getCreationTimeInMs(), passedInBlobProperties.getAccountId(), passedInBlobProperties.getContainerId(), passedInBlobProperties.isEncrypted(), passedInBlobProperties.getExternalAssetTag()); if (isStitchOperation() || getNumDataChunks() > 1) { if (routerConfig.routerMetadataContentVersion == MessageFormatRecord.Metadata_Content_Version_V2) { buf = MetadataContentSerDe.serializeMetadataContentV2(intermediateChunkSize, getBlobSize(), getSuccessfullyPutChunkIds()); } else if (routerConfig.routerMetadataContentVersion == MessageFormatRecord.Metadata_Content_Version_V3) { List<Pair<StoreKey, Long>> orderedChunkIdList = new ArrayList<>(indexToChunkIdsAndChunkSizes.values()); buf = MetadataContentSerDe.serializeMetadataContentV3(getBlobSize(), orderedChunkIdList); } else { throw new IllegalStateException( "Unexpected metadata content version: " + routerConfig.routerMetadataContentVersion); } onFillComplete(false); } else { blobId = (BlobId) indexToChunkIdsAndChunkSizes.get(0).getFirst(); state = ChunkState.Complete; operationCompleted = true; } }
Source:
<code>long getThreadDelayTimeInSecond(int daemonThreadIntervalSeconds) { OffsetDateTime now = OffsetDateTime.now(ZoneOffset.UTC); <START> long roundOfTimeStamp = OffsetDateTime.of(now.getYear(), now.getMonthValue(), now.getDayOfMonth(), now.getHour(), 0, 0, 0, ZoneOffset.UTC).toEpochSecond(); <END> long initialDelay = Math.min(INITIAL_THREAD_DELAY, daemonThreadIntervalSeconds); while ((roundOfTimeStamp - now.toEpochSecond()) < initialDelay) { roundOfTimeStamp += daemonThreadIntervalSeconds; } return roundOfTimeStamp - now.toEpochSecond(); }</code><technical_language>Nit: Consider now.truncatedTo(ChronoUnit.HOURS) instead</technical_language>

Target:
long getThreadDelayTimeInSecond(int daemonThreadIntervalSeconds) { OffsetDateTime now = OffsetDateTime.now(ZoneOffset.UTC); long truncatedTimestamp = now.truncatedTo(ChronoUnit.HOURS).toEpochSecond(); long minDelay = Math.min(MIN_INITIAL_DELAY, daemonThreadIntervalSeconds); while ((truncatedTimestamp - now.toEpochSecond()) < minDelay) { truncatedTimestamp += daemonThreadIntervalSeconds; } return truncatedTimestamp - now.toEpochSecond(); }
Source:
<code>public boolean parseOptions(final PrintStream messageStream, final String[] args) { this.argv = args; this.messageStream = messageStream; if (prefix.isEmpty()) { commandLine = callerOptions.getClass().getName(); } for (int i = 0; i < args.length; ++i) { final String arg = args[i]; if (arg.equals("-h") || arg.equals("--help")) { usage(messageStream, false); return false; } if (arg.equals("-H") || arg.equals("--stdhelp")) { usage(messageStream, true); return false; } if (arg.equals("--version")) { messageStream.println(getVersion()); return false; } final String[] pair = arg.split("=", 2); <START> if (pair.length == 2 && pair[1].isEmpty() && i < args.length - 1) { <END> pair[1] = args[++i]; } if (pair.length == 2) { if (!parseOption(pair[0], pair[1], false)) { messageStream.println(); usage(messageStream, true); return false; } } else if (!parsePositionalArgument(arg)) { messageStream.println(); usage(messageStream, false); return false; } } if (!checkNumArguments()) { messageStream.println(); usage(messageStream, false); return false; } if (!parseChildOptions()) { messageStream.println(); usage(messageStream, false); return false; } return true; }</code><technical_language>more sense merge if (pair.length == 2) a single if statements: if (pair.length == 2) { if (pair[1].isEmpty() && i < args.length - 1) { pair[1] = args[++i]; } if (!parseOption(pair[0], pair[1], false)) { messageStream.println(); usage(messageStream, true); return false; } } if changing code</technical_language>

Target:
public boolean parseOptions(final PrintStream messageStream, final String[] args) { this.argv = args; this.messageStream = messageStream; if (prefix.isEmpty()) { commandLine = callerOptions.getClass().getName(); } for (int i = 0; i < args.length; ++i) { final String arg = args[i]; if (arg.equals("-h") || arg.equals("--help")) { usage(messageStream, false); return false; } if (arg.equals("-H") || arg.equals("--stdhelp")) { usage(messageStream, true); return false; } if (arg.equals("--version")) { messageStream.println(getVersion()); return false; } final String[] pair = arg.split("=", 2); if (pair.length == 2) { if (pair[1].isEmpty() && i < args.length - 1) { pair[1] = args[++i]; } if (!parseOption(pair[0], pair[1], false)) { messageStream.println(); usage(messageStream, true); return false; } } else if (!parsePositionalArgument(arg)) { messageStream.println(); usage(messageStream, false); return false; } } if (!checkNumArguments()) { messageStream.println(); usage(messageStream, false); return false; } if (!parseChildOptions()) { messageStream.println(); usage(messageStream, false); return false; } return true; }
Source:
<code>public ClassOrInterfaceDeclaration visit(ClassOrInterfaceDeclaration cid, Void arg) { <START> if (cid.isInterface()) { <END> return cid; } super.visit(cid, arg); removeIfPrivateOrPkgPrivate(cid); return cid; }</code><technical_language>I add this; otherwise, interface java files removed. Methods in interfaces public if marked such. interface a default method body removed, want fix this some other way</technical_language>

Target:
public ClassOrInterfaceDeclaration visit(ClassOrInterfaceDeclaration cid, Void arg) { boolean prevIP = implicitlyPublic; if (cid.isInterface()) { implicitlyPublic = true; } super.visit(cid, arg); if (cid.isInterface()) { implicitlyPublic = prevIP; } return cid; }
Source:
<code><START> public Set<DatastreamTask> findOldUnusedTasks(Map<String, Set<DatastreamTask>> previousAssignmentByInstance, <END> Map<String, List<DatastreamTask>> newAssignmentsByInstance) { Set<DatastreamTask> newTasks = newAssignmentsByInstance.values().stream().flatMap(Collection::stream).collect(Collectors.toSet()); Set<DatastreamTask> oldTasks = previousAssignmentByInstance.values().stream().flatMap(Collection::stream).collect(Collectors.toSet()); Set<DatastreamTask> unusedTasks = oldTasks.stream().filter(x -> !newTasks.contains(x)).collect(Collectors.toSet()); LOG.info("Unused tasks to be deleted: ", unusedTasks); return unusedTasks; }</code><technical_language>Update java docs this finds unused tasks. Update java doc add @returns well, indicating returns a list of unused DatastreamTasks</technical_language>

Target:
private Set<DatastreamTask> findOldUnusedTasks(Map<String, Set<DatastreamTask>> previousAssignmentByInstance, Map<String, List<DatastreamTask>> newAssignmentsByInstance) { Set<DatastreamTask> newTasks = newAssignmentsByInstance.values().stream().flatMap(Collection::stream).collect(Collectors.toSet()); Set<DatastreamTask> oldTasks = previousAssignmentByInstance.values().stream().flatMap(Collection::stream).collect(Collectors.toSet()); Set<DatastreamTask> unusedTasks = oldTasks.stream().filter(x -> !newTasks.contains(x)).collect(Collectors.toSet()); LOG.info("Unused tasks to be deleted: {}", unusedTasks); return unusedTasks; }
Source:
<code>public long getElapsedDays(int numDays) { long elapsed = getElapsedToday(); <START> if (numDays > 0) { <END> elapsed += numDays * MS_PER_DAY; } return elapsed; }</code><technical_language>This if check useful</technical_language>

Target:
public long getElapsedDays(int numDays) { long elapsed = getElapsedToday(); elapsed += numDays * MS_PER_DAY; return elapsed; }
Source:
<code>public static IncrementalIndex getNoBitmapIncrementalTestIndex() { synchronized (log) { if (noBitmapRealtimeIndex != null) { return noBitmapRealtimeIndex; } <START> } <END> return noBitmapRealtimeIndex = makeRealtimeIndex("druid.sample.numeric.tsv", false, false); }</code><technical_language>I this synchronization pattern change, confused accomplish? ie, if noBitmapRealtimeIndex is created threads initialize noBitmapRealtimeIndex simultaneously, strange</technical_language>

Target:
public static IncrementalIndex getNoBitmapIncrementalTestIndex() { return noBitmapRealtimeIndex.get(); }
Source:
<code>public void onGroupJoinCompletion() { <START> if ("DONE".equals(getStatus())) { <END> try { openSystemSession(); fireThreeDConversionsDoneEvent(session.getDocument(new IdRef(docId))); } finally { cleanUp(true, null); } } }</code><technical_language>status is supposed for human information, for code logic is a bit dangerous. I a setStatus("Done"), "DONE", shows this is brittle. a constant in places show commonality. do need check status, onGroupJoinCompletion() called if work ended successfully</technical_language>

Target:
public void onGroupJoinCompletion() { if (STATUS_DONE.equals(getStatus())) { try { openSystemSession(); fireThreeDConversionsDoneEvent(session.getDocument(new IdRef(docId))); } finally { cleanUp(true, null); } } }
Source:
<code>public String getValue() { <START> final StringBuilder val = new StringBuilder(); <END> if (this.major > -1) val.append(this.major); appendVersionComponent(val, this.minor); appendVersionComponent(val, this.build); appendVersionComponent(val, this.revision); return val.toString(); }</code><technical_language>making final</technical_language>

Target:
public String getValue() { final StringBuilder val = new StringBuilder(); if (this.major > -1) { val.append(this.major); } appendVersionComponent(val, this.minor); appendVersionComponent(val, this.build); appendVersionComponent(val, this.revision); return val.toString(); }