auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Map<BoxedByteArray, byte[]> increment(Map<BoxedByteArray, T> writes) throws IOException, InterruptedException { ImmutableMap.Builder<BoxedByteArray, byte[]> successes = ImmutableMap.builder(); List<Row> increments = new ArrayList<>(); List<Map.Entry<BoxedByteArray, byte[]>> entries = writes.entrySet().stream() <START> .map(e -> new AbstractMap.SimpleEntry<BoxedByteArray, byte[]>(e.getKey(), e.getValue().serialize())) <END> .collect(Collectors.toList()); for (Map.Entry<BoxedByteArray, byte[]> entry : entries) { long amount = Bytes.toLong(entry.getValue()); Increment increment = new Increment(entry.getKey().bytes); increment.addColumn(cf, QUALIFIER, amount); incrementSize.update(amount); increments.add(increment); } Object[] objects = WithHTable.batch(pool, tableName, increments); for (int i = 0; i < objects.length; ++i) { if (objects[i] != null) { successes.put(entries.get(i)); } } return successes.build(); }</code><technical_language>nit: Maps.immutableEntry() a bit cleaner here</technical_language>

Target:
public Map<BoxedByteArray, byte[]> increment(Map<BoxedByteArray, T> writes) throws IOException, InterruptedException { ImmutableMap.Builder<BoxedByteArray, byte[]> successes = ImmutableMap.builder(); List<Row> increments = new ArrayList<>(); List<Map.Entry<BoxedByteArray, T>> entries = ImmutableList.copyOf(writes.entrySet()); for (Map.Entry<BoxedByteArray, T> entry : entries) { long amount = Bytes.toLong(entry.getValue().serialize()); Increment increment = new Increment(entry.getKey().bytes); increment.addColumn(cf, QUALIFIER, amount); incrementSize.update(amount); increments.add(increment); } Object[] objects = WithHTable.batch(pool, tableName, increments); for (int i = 0; i < objects.length; ++i) { if (objects[i] != null) { Result result = (Result) objects[i]; byte[] value = result.getValue(cf, QUALIFIER); successes.put(entries.get(i).getKey(), value); } } return successes.build(); }
Source:
<code>public Structure placeStructure(Structure structure) { Vector2D topLeftMapCoordinates = structure.getMapCoordinates(); <START> int range = 2; END> for (int x = 0; x < structure.getWidthInCells(); x++) { for (int y = 0; y < structure.getHeightInCells(); y++) { int cellX = topLeftMapCoordinates.getXAsInt() + x; int cellY = topLeftMapCoordinates.getYAsInt() + y; getCell(cellX, cellY).setEntity(structure); revealShroudFor(cellX, cellY, range); } } return structure; }</code><technical_language>if working this PR, I this TODO is part of it. range a property of Entity</technical_language>

Target:
public Structure placeStructure(Structure structure) { Vector2D topLeftMapCoordinates = structure.getMapCoordinates(); for (int x = 0; x < structure.getWidthInCells(); x++) { for (int y = 0; y < structure.getHeightInCells(); y++) { int cellX = topLeftMapCoordinates.getXAsInt() + x; int cellY = topLeftMapCoordinates.getYAsInt() + y; getCell(cellX, cellY).setEntity(structure); revealShroudFor(cellX, cellY, structure.getSight()); } } return structure; }
Source:
<code>public CacheTopology join(String cacheName, CacheJoinInfo joinInfo, CacheTopologyHandler stm, PartitionHandlingManager phm) throws Exception { log.debugf("Node %s joining cache %s", transport.getAddress(), cacheName); LocalCacheStatus cacheStatus = new LocalCacheStatus(joinInfo, stm, phm, stateTransferExecutor); runningCaches.put(cacheName, cacheStatus); long timeout = joinInfo.getTimeout(); long endTime = timeService.expectedEndTime(timeout, TimeUnit.MILLISECONDS); <START> cacheStatus.getTopologyUpdatesCompletionService().continueTaskInBackground(); <END> try { while (true) { int viewId = transport.getViewId(); try { ReplicableCommand command = new CacheTopologyControlCommand(cacheName, CacheTopologyControlCommand.Type.JOIN, transport.getAddress(), joinInfo, viewId); CacheStatusResponse initialStatus = (CacheStatusResponse) executeOnCoordinator(command, timeout); if (initialStatus != null) { doHandleTopologyUpdate(cacheName, initialStatus.getCacheTopology(), initialStatus.getAvailabilityMode(), viewId, transport.getCoordinator(), cacheStatus); doHandleStableTopologyUpdate(cacheName, initialStatus.getStableTopology(), viewId, cacheStatus); return initialStatus.getCacheTopology(); } } catch (Exception e) { log.debugf(e, "Error sending join request for cache %s to coordinator", cacheName); if (timeService.isTimeExpired(endTime)) { throw e; } Thread.sleep(100); } } } finally { cacheStatus.getTopologyUpdatesCompletionService().backgroundTaskFinished(null); } }</code><technical_language>is this here? join is processed SemaphoreCompletionService</technical_language>

Target:
public CacheTopology join(String cacheName, CacheJoinInfo joinInfo, CacheTopologyHandler stm, PartitionHandlingManager phm) throws Exception { log.debugf("Node %s joining cache %s", transport.getAddress(), cacheName); ExecutorService topologyUpdatesExecutor = joinInfo.isTotalOrder() ? withinThreadExecutor : asyncTransportExecutor; LocalCacheStatus cacheStatus = new LocalCacheStatus(joinInfo, stm, phm, topologyUpdatesExecutor); runningCaches.put(cacheName, cacheStatus); long timeout = joinInfo.getTimeout(); long endTime = timeService.expectedEndTime(timeout, TimeUnit.MILLISECONDS); cacheStatus.getTopologyUpdatesCompletionService().continueTaskInBackground(); try { while (true) { int viewId = transport.getViewId(); try { ReplicableCommand command = new CacheTopologyControlCommand(cacheName, CacheTopologyControlCommand.Type.JOIN, transport.getAddress(), joinInfo, viewId); CacheStatusResponse initialStatus = (CacheStatusResponse) executeOnCoordinator(command, timeout); if (initialStatus != null) { doHandleTopologyUpdate(cacheName, initialStatus.getCacheTopology(), initialStatus.getAvailabilityMode(), viewId, transport.getCoordinator(), cacheStatus); doHandleStableTopologyUpdate(cacheName, initialStatus.getStableTopology(), viewId, cacheStatus); return initialStatus.getCacheTopology(); } } catch (Exception e) { log.debugf(e, "Error sending join request for cache %s to coordinator", cacheName); if (timeService.isTimeExpired(endTime)) { throw e; } Thread.sleep(100); } } } finally { cacheStatus.getTopologyUpdatesCompletionService().backgroundTaskFinished(null); } }
Source:
<code>private JsonParser getParser(String data) throws IOException { <START> Character firstChar = data.charAt(0); <END> if (firstChar == '{' || firstChar == '[') { return this.jsonFactory.createParser(data); } else { return this.yamlFactory.createParser(data); } }</code><technical_language>Character "char" <LINK_0> This is returning a char (primitive type) is "=="test works I think, if returning Character (object wrapper for char) need ".equals"</technical_language>

Target:
private JsonParser getParser(String data) throws IOException { char firstChar = data.charAt(0); if (firstChar == '{' || firstChar == '[') { return this.jsonFactory.createParser(data); } else { return this.yamlFactory.createParser(data); } }
Source:
<code>public SerializableTransactionManager delegate() { if (!isInitialized) { <START> if (manager.getKeyValueService().isInitialized() <END> && manager.getTimelockService().isInitialized() && manager.getTimestampService().isInitialized() && manager.getCleaner().isInitialized() && prerequisite.isInitialized()) { isInitialized = true; } else { throw new NotInitializedException("TransactionManager"); } } return manager; }</code><technical_language>planning add isInitialized() method TransactionManager</technical_language>

Target:
public SerializableTransactionManager delegate() { if (!isInitialized()) { throw new NotInitializedException("TransactionManager"); } return manager; }
Source:
<code>private List<VM> getSelectedVms() { List<VM> vms = new ArrayList<VM>(); if (getSelectedItems() == null) { return vms; } for (Object selectedItem : getSelectedItems()) { UserPortalItemModel itemModel = (UserPortalItemModel) selectedItem; VM vm = itemModel.getVM(); if (vm == null) { <START> continue; <END> } vms.add(vm); } return vms; }</code><technical_language>avoid continue do: if (vm != null) { vms.add(vm); }</technical_language>

Target:
private List<VM> getSelectedVms() { List<VM> vms = new ArrayList<VM>(); if (getSelectedItems() == null) { return vms; } for (Object selectedItem : getSelectedItems()) { UserPortalItemModel itemModel = (UserPortalItemModel) selectedItem; VM vm = itemModel.getVM(); if (vm != null) { vms.add(vm); } } return vms; }
Source:
<code>public void setParticleEmitters(SolGame game, SolShip ship, Engine engine) { List<Drawable> drawables = ship.getDrawables(); if (!myParticleEmitters.isEmpty()) { <START> List<Drawable> peDrawables = new ArrayList<>(); <END> myParticleEmitters.forEach(pe -> peDrawables.addAll(pe.getDrawables())); drawables.removeAll(peDrawables); game.getDrawableManager().removeAll(peDrawables); myParticleEmitters.clear(); } if (engine != null) { config.getParticleEmitterList(). forEach(pes -> myParticleEmitters.add(new ParticleEmitter(game, engine, pes, ship))); List<Drawable> peDrawables = new ArrayList<>(); myParticleEmitters.forEach(pe -> peDrawables.addAll(pe.getDrawables())); drawables.addAll(peDrawables); game.getDrawableManager().addAll(peDrawables); } }</code><technical_language>renaming this particleEmitterDrawables? I verbose, I kinda peDrawables.. this though</technical_language>

Target:
public void setParticleEmitters(SolGame game, SolShip ship, Engine engine) { List<Drawable> drawables = ship.getDrawables(); if (!particleEmitters.isEmpty()) { List<Drawable> particleEmitterDrawables = new ArrayList<>(); particleEmitters.forEach(pe -> particleEmitterDrawables.addAll(pe.getDrawables())); drawables.removeAll(particleEmitterDrawables); game.getDrawableManager().removeAll(particleEmitterDrawables); particleEmitters.clear(); } if (engine != null) { config.getParticleEmitters().forEach(pes -> particleEmitters.add(new DSParticleEmitter(game, pes, ship))); List<Drawable> particleEmitterDrawables = new ArrayList<>(); particleEmitters.forEach(pe -> particleEmitterDrawables.addAll(pe.getDrawables())); drawables.addAll(particleEmitterDrawables); game.getDrawableManager().addAll(particleEmitterDrawables); } }
Source:
<code>private static <E> boolean deepEqualsList(List<E> l1, List<?> l2) { final Iterator<E> i1 = l1.iterator(); final Iterator<?> i2 = l2.iterator(); while (i1.hasNext() && i2.hasNext()) { final E o1 = i1.next(); final Object o2 = i2.next(); <START> if (!deepEqualsInternal(o1, o2)) { <END> return false; } } return !(i1.hasNext() || i2.hasNext()); }</code><technical_language>compare size first</technical_language>

Target:
private static <E> boolean deepEqualsList(List<E> l1, List<?> l2) { if (l1.size() != l2.size()) { return false; } final Iterator<E> i1 = l1.iterator(); final Iterator<?> i2 = l2.iterator(); while (i1.hasNext() && i2.hasNext()) { final E o1 = i1.next(); final Object o2 = i2.next(); if (!deepEqualsInternal(o1, o2)) { return false; } } return true; }
Source:
<code>private static <T> RuleApplication applyRule(Rule<T> rule, PlanNode planNode, Rule.Context context) { PlanNodeMatcher matcher = new PlanNodeMatcher(context.getLookup()); <START> Optional<Match<T>> match = matcher.match(rule.getPattern(), planNode).collect(toOptional()); <END> Rule.Result result; if (!rule.isEnabled(context.getSession()) || !match.isPresent()) { result = Rule.Result.empty(); } else { result = rule.apply(match.get().value(), match.get().captures(), context); } return new RuleApplication(context.getLookup(), context.getSymbolAllocator().getTypes(), result); }</code><technical_language>properly support stream here</technical_language>

Target:
private static <T> RuleApplication applyRule(Rule<T> rule, PlanNode planNode, Rule.Context context) { Capture<T> planNodeCapture = newCapture(); Pattern<T> pattern = rule.getPattern().capturedAs(planNodeCapture); Optional<Match> match = pattern.match(planNode, context.getLookup()) .collect(toOptional()); Rule.Result result; if (!rule.isEnabled(context.getSession()) || !match.isPresent()) { result = Rule.Result.empty(); } else { result = rule.apply(match.get().capture(planNodeCapture), match.get().captures(), context); } return new RuleApplication(context.getLookup(), context.getSymbolAllocator().getTypes(), result); }
Source:
<code>public String getValue() { <START> return identifier; <END> }</code><technical_language>getIdentifier() insteand (applies changed Enums)</technical_language>

Target:
public String getValue() { return getIdentifier(); }
Source:
<code>private void onCurrentGameEnded() { NotificationsPrefs notification = preferencesService.getPreferences().getNotification(); if (!notification.isAfterGameReviewEnabled() || !notification.getEventNotificationsEnabled()) { return; } synchronized (currentGame) { int id = currentGame.get().getId(); <START> notificationService.addNotification(new PersistentNotification(i18n.get("game.ended", currentGame.get().getTitle()), <END> Severity.INFO, singletonList(new Action(i18n.get("game.rate"), actionEvent -> replayService.findById(id) .thenAccept(replay -> Platform.runLater(() -> { if (replay.isPresent()) { eventBus.post(new ShowReplayEvent(replay.get())); } else { notificationService.addNotification(new ImmediateNotification(i18n.get("replay.notFoundTitle"), i18n.get("replay.replayNotFoundText", id), Severity.WARN)); } })))))); } }</code><technical_language>Is a unit test for this well</technical_language>

Target:
private void onCurrentGameEnded() { NotificationsPrefs notification = preferencesService.getPreferences().getNotification(); if (!notification.isAfterGameReviewEnabled() || !notification.isTransientNotificationsEnabled()) { return; } synchronized (currentGame) { int id = currentGame.get().getId(); notificationService.addNotification(new PersistentNotification(i18n.get("game.ended", currentGame.get().getTitle()), Severity.INFO, singletonList(new Action(i18n.get("game.rate"), actionEvent -> replayService.findById(id) .thenAccept(replay -> Platform.runLater(() -> { if (replay.isPresent()) { eventBus.post(new ShowReplayEvent(replay.get())); } else { notificationService.addNotification(new ImmediateNotification(i18n.get("replay.notFoundTitle"), i18n.get("replay.replayNotFoundText", id), Severity.WARN)); } })))))); } }
Source:
<code>public final String toString() { <START> return String.format("%s is %s(%s) and %s(%s)", getField(), isIncludeLower() ? "gte" : "gt", lower, isIncludeUpper() ? "lte" : "lt", upper); <END> }</code><technical_language>If this is intended for human consumption, {>=, >, <=, <} preferred {gte, gt, lte, lt}</technical_language>

Target:
public final String toString() { return String.format("%s %s %s and %s %s %s", getField(), isIncludeLower() ? GTE : GT, lower, getField(), isIncludeUpper() ? LTE : LT, upper); }
Source:
<code>private int insertInWaitingQueue(long ts, Request request) { ITmfStateValue statusState = request.getType() == IoOperationType.READ ? StateValues.READING_REQUEST_VALUE : StateValues.WRITING_REQUEST_VALUE; int slotQuark = fWaitingQueueAttrib.getAvailable(); try { fSs.modifyAttribute(ts, statusState.unboxValue(), slotQuark); int currentRequestQuark = fSs.getQuarkRelativeAndAdd(slotQuark, Attributes.CURRENT_REQUEST); fSs.modifyAttribute(ts, request.getSector(), currentRequestQuark); int requestSizeQuark = fSs.getQuarkRelativeAndAdd(slotQuark, Attributes.REQUEST_SIZE); fSs.modifyAttribute(ts, request.getNrSector(), requestSizeQuark); int mergedInQuark = fSs.getQuarkRelativeAndAdd(slotQuark, Attributes.MERGED_IN); fSs.modifyAttribute(ts, <START> TmfStateValue.nullValue().unboxValue(), mergedInQuark); <END> } catch (StateValueTypeException e) { Activator.getDefault().logError("Error inserting request", e); } fWaitingQueue.put(request.getSector(), new Pair<>(request, slotQuark)); return slotQuark; }</code><technical_language>nan</technical_language>

Target:
private int insertInWaitingQueue(long ts, Request request) { ITmfStateValue statusState = request.getType() == IoOperationType.READ ? StateValues.READING_REQUEST_VALUE : StateValues.WRITING_REQUEST_VALUE; int slotQuark = fWaitingQueueAttrib.getAvailable(); try { fSs.modifyAttribute(ts, statusState.unboxValue(), slotQuark); int currentRequestQuark = fSs.getQuarkRelativeAndAdd(slotQuark, Attributes.CURRENT_REQUEST); fSs.modifyAttribute(ts, request.getSector(), currentRequestQuark); int requestSizeQuark = fSs.getQuarkRelativeAndAdd(slotQuark, Attributes.REQUEST_SIZE); fSs.modifyAttribute(ts, request.getNrSector(), requestSizeQuark); int mergedInQuark = fSs.getQuarkRelativeAndAdd(slotQuark, Attributes.MERGED_IN); fSs.modifyAttribute(ts, (Object) null, mergedInQuark); } catch (StateValueTypeException e) { Activator.getDefault().logError("Error inserting request", e); } fWaitingQueue.put(request.getSector(), new Pair<>(request, slotQuark)); return slotQuark; }
Source:
<code>private static String getBaseDirectoryFallback() { String baseDirCandidate = System.getProperty("user.dir", "."); Path path = Paths.get(baseDirCandidate); if (path.toFile().isDirectory() && (path.resolve("pom.xml").toFile().exists() || path.resolve("build.gradle").toFile().exists())) { return path.toString(); } else { throw new IllegalStateException(String.format( "Failed to determine project directory for dev mode. " + "Directory '%s' does not look like a Maven or " + "Gradle project. Ensure that you have run the " <START> + "prepare-frontend Maven goal prior to deploying " <END> + "your application", path.toString())); } }</code><technical_language>I propose explicitly add mention of flow-build-info.json: "... prepare-frontend Maven goal generates 'flow-build-info.json' file prior deploying ..."</technical_language>

Target:
private static String getBaseDirectoryFallback() { String baseDirCandidate = System.getProperty("user.dir", "."); Path path = Paths.get(baseDirCandidate); if (path.toFile().isDirectory() && (path.resolve("pom.xml").toFile().exists() || path.resolve("build.gradle").toFile().exists())) { return path.toString(); } else { throw new IllegalStateException(String.format( "Failed to determine project directory for dev mode. " + "Directory '%s' does not look like a Maven or " + "Gradle project. Ensure that you have run the " + "prepare-frontend Maven goal, which generates " +"'flow-build-info.json', prior to deploying your " + "application", path.toString())); } }
Source:
<code>public static @CheckForNull Fingerprint load(@NonNull String id) throws IOException { long start=0; <START> if(logger.isLoggable(Level.FINE)) <END> start = System.currentTimeMillis(); Fingerprint loaded = FingerprintStorage.get().load(id); initFacets(loaded); if(logger.isLoggable(Level.FINE)) logger.fine("Loading fingerprint took "+(System.currentTimeMillis()-start)+"ms"); return loaded; }</code><technical_language>curlies split-line ifs</technical_language>

Target:
public static @CheckForNull Fingerprint load(@NonNull String id) throws IOException { long start=0; if(logger.isLoggable(Level.FINE)) { start = System.currentTimeMillis(); } Fingerprint loaded = FingerprintStorage.get().load(id); initFacets(loaded); if(logger.isLoggable(Level.FINE)) { logger.fine("Loading fingerprint took " + (System.currentTimeMillis() - start) + "ms"); } return loaded; }
Source:
<code>public void setIn(InputStream in) { this.in = in; <START> ThreadLocalInputStream tls = (ThreadLocalInputStream) System.in; <END> tls.init(in); }</code><technical_language>in case, I check instanceOf</technical_language>

Target:
public void setIn(InputStream in) { this.in = in; if (!(System.in instanceof ThreadLocalInputStream)) { throw new IllegalStateException("System.in should be set by nailgun."); } ThreadLocalInputStream tls = (ThreadLocalInputStream) System.in; tls.init(in); }
Source:
<code>private void runOperation(Ignite verifierNode, BiConsumer<String, T2<String, Integer>> c) { T2<String, Integer> entry = entry(); c.accept(CACHE_NAME, entry); <START> assertThat((Integer)(verifierNode.cache(CACHE_NAME).get(entry.getKey())), is(entry.getValue())); <END> }</code><technical_language>I cast here, parametrize cache directly: verifierNode.<String, Integer>cache(CACHE_NAME).get(entry.getKey())</technical_language>

Target:
private void runOperation(Ignite verifierNode, BiConsumer<String, T2<String, Integer>> c) { T2<String, Integer> entry = entry(); c.accept(CACHE_NAME, entry); assertThat(verifierNode.<String, Integer>cache(CACHE_NAME).get(entry.getKey()), is(entry.getValue())); }
Source:
<code>private void postProcess(Path tmpDir, GoGoDuckModule module) throws GoGoDuckException { File[] directoryListing = tmpDir.toFile().listFiles(); if (directoryListing != null) { for (File file : directoryListing) { try { <START> if (!module.hasPackedVariables()) { <END> return; } File tmpFile = File.createTempFile("ncpdq", ".nc"); List<String> command = new ArrayList<>(); command.add(goGoDuckConfig.getNcpdqPath()); command.add("-O"); command.add("-U"); command.add(file.getAbsolutePath()); command.add(tmpFile.getAbsolutePath()); logger.info(String.format("Unpacking file (ncpdq) '%s' to '%s'", file.toPath(), tmpFile.toPath())); GoGoDuck.execute(command); Files.delete(file.toPath()); Files.move(tmpFile.toPath(), file.toPath()); } catch (Exception e) { throw new GoGoDuckException(String.format("Could not run ncpdq on file '%s'", file.toPath())); } } } else { throw new GoGoDuckException("No files available for post processing"); } }</code><technical_language>do this start of method - this a directory listing</technical_language>

Target:
private void postProcess(Path tmpDir, GoGoDuckModule module) throws GoGoDuckException { File[] directoryListing = tmpDir.toFile().listFiles(); if (directoryListing != null) { for (File file : directoryListing) { try { if (!module.unpackNetcdf()) { return; } File tmpFile = File.createTempFile("ncpdq", ".nc"); List<String> command = new ArrayList<>(); command.add(goGoDuckConfig.getNcpdqPath()); command.add("-O"); command.add("-U"); command.add(file.getAbsolutePath()); command.add(tmpFile.getAbsolutePath()); logger.info(String.format("Unpacking file (ncpdq) '%s' to '%s'", file.toPath(), tmpFile.toPath())); GoGoDuck.execute(command); Files.delete(file.toPath()); Files.move(tmpFile.toPath(), file.toPath()); } catch (Exception e) { throw new GoGoDuckException(String.format("Could not run ncpdq on file '%s'", file.toPath())); } } } else { throw new GoGoDuckException("No files available for post processing"); } }
Source:
<code>public static List<String> getStartupPagePaths() { LoginScreenConfig config = getConfig(); if (config == null) { return Collections.emptyList(); } return config.getStartupPages() .values() .stream() .map(startupPage -> startupPage.getPath()) <START> .collect(Collectors.toList()); <END> }</code><technical_language>account LoginStartupPage#priority field order results here</technical_language>

Target:
public static List<String> getStartupPagePaths() { LoginScreenConfig config = getConfig(); if (config == null) { return Collections.emptyList(); } return config.getStartupPages() .values() .stream() .sorted((p1, p2) -> p2.compareTo(p1)) .map(startupPage -> startupPage.getPath()) .collect(Collectors.toList()); }
Source:
<code>public List<GroupModel> getGroups() { if (updated != null) return updated.getGroups(); List<GroupModel> groups = new ArrayList<>(); for (String id : cached.getGroups(modelSupplier)) { GroupModel groupModel = keycloakSession.realms().getGroupById(id, realm); if (groupModel == null) { getDelegateForUpdate(); return updated.getGroups(); } groups.add(groupModel); } <START> groups.sort(Comparator.comparing(GroupModel::getName)); <END> return groups; }</code><technical_language>Comparator customized</technical_language>

Target:
public Set<GroupModel> getGroups() { if (updated != null) return updated.getGroups(); Set<GroupModel> groups = new LinkedHashSet<>(); for (String id : cached.getGroups(modelSupplier)) { GroupModel groupModel = keycloakSession.realms().getGroupById(id, realm); if (groupModel == null) { getDelegateForUpdate(); return updated.getGroups(); } groups.add(groupModel); } return groups; }
Source:
<code>public void shutdownPublisherAndReportMetrics() throws Exception { reportMetrics(); <START> shutdownPublisher(); <END> }</code><technical_language>inline here</technical_language>

Target:
public void shutdownPublisherAndReportMetrics() throws Exception { reportMetrics(); publisher.stop(); }
Source:
<code>public ChangeStreamIterable<TResult> showMigrationEvents(final boolean showMigrationEvents) { <START> this.showMigrationEvents = notNull("showMigrationEvents", showMigrationEvents); <END> return this; }</code><technical_language>Remove this line. sense for a primitive value. happening is primitive boolean is auto-boxed a Boolean</technical_language>

Target:
public ChangeStreamIterable<TResult> showMigrationEvents(final boolean showMigrationEvents) { this.showMigrationEvents = showMigrationEvents; return this; }
Source:
<code>private void compare(Map<Integer, Boolean> dbexpected, List<JtsGeomEntity> list) { int cnt = 0; for ( Map.Entry<Integer, Boolean> entry : dbexpected.entrySet() ) { if ( entry.getValue() ) { cnt++; if ( !findInList( entry.getKey(), list ) ) { fail( String.format( "Expected object with id= %d, but not found in result", entry.getKey() ) ); } } } assertEquals( cnt, list.size() ); <START> LOG.info( String.format( "Found %d objects within testsuite-suite polygon.", cnt ) ); <END> }</code><technical_language>LOG.infof("Found %d objects testsuite-suite polygon.", cnt ) well</technical_language>

Target:
private void compare(Map<Integer, Boolean> dbexpected, List<JtsGeomEntity> list) { int cnt = dbexpected.entrySet() .stream() .filter( Map.Entry::getValue ) .reduce( 0, (accumulator, entry) -> { if ( !findInList( entry.getKey(), list ) ) { fail( String.format( "Expected object with id= %d, but not found in result", entry.getKey() ) ); } return accumulator + 1; }, Integer::sum ); assertEquals( cnt, list.size() ); LOG.infof( "Found %d objects within testsuite-suite polygon.", cnt ); }
Source:
<code><START> private Collection<Resource> getAssetFolders(Page page, ResourceResolver resolver) { <END> Map<String, Resource> allAssetFolders = new TreeMap<String, Resource>(); ValueMap properties = page.getProperties(); String[] configuredAssetFolderPaths = properties.get(damAssetProperty, String[].class); if (configuredAssetFolderPaths != null) { for (String configuredAssetFolderPath : configuredAssetFolderPaths) { if (StringUtils.isNotBlank(configuredAssetFolderPath)) { Resource configuredAssetFolder = resolver.getResource(configuredAssetFolderPath); if (configuredAssetFolder != null && configuredAssetFolder.isResourceType("sling:OrderedFolder")) { for (Resource assetFolder : getAssetFolders(configuredAssetFolder)) { if (!allAssetFolders.containsKey(assetFolder.getPath())) { allAssetFolders.put(assetFolder.getPath(), assetFolder); } } } } } } return allAssetFolders.values(); }</code><technical_language>i understand .. this is list of DAM Asset "folder" paths, traversing sub-trees, collecting folders them, (the folder list) is collect assets? WDYT forgoing this collection walk resource tree this list of root folders? <LINK_1> <LINK_0></technical_language>

Target:
private Collection<Resource> getAssetFolders(Page page, ResourceResolver resolver) { List<Resource> allAssetFolders = new ArrayList<Resource>(); ValueMap properties = page.getProperties(); String[] configuredAssetFolderPaths = properties.get(damAssetProperty, String[].class); if (configuredAssetFolderPaths != null) { Arrays.sort(configuredAssetFolderPaths); String prevPath = "#"; for (String configuredAssetFolderPath : configuredAssetFolderPaths) { if (StringUtils.isNotBlank(configuredAssetFolderPath)) { if (!configuredAssetFolderPath.equals(prevPath) && !StringUtils.startsWith(configuredAssetFolderPath, prevPath + "/")) { Resource assetFolder = resolver.getResource(configuredAssetFolderPath); if (assetFolder != null) { prevPath = configuredAssetFolderPath; allAssetFolders.add(assetFolder); } } } } } return allAssetFolders; }
Source:
<code>public FeatureFlag get(String key) { FeatureFlag featureFlag; if (cache != null) { featureFlag = cache.getUnchecked(key); } else { featureFlag = getRedis(key); } if (featureFlag == null) { logger.debug("[get] Key: " + key + " not found in feature store. Returning null"); return null; } <START> if (featureFlag.isDeleted()) { <END> logger.debug("[get] Key: " + key + " has been deleted. Returning null"); return null; } logger.debug("[get] Key: " + key + " with version: " + featureFlag.getVersion() + " found in feature store."); return featureFlag; }</code><technical_language>This trigger getRedis returns null already. memory cache a deleted key construction</technical_language>

Target:
public FeatureFlag get(String key) { FeatureFlag featureFlag; if (cache != null) { featureFlag = cache.getUnchecked(key); } else { featureFlag = getRedis(key); } if (featureFlag != null) { logger.debug("[get] Key: " + key + " with version: " + featureFlag.getVersion() + " found in feature store."); } return featureFlag; }
Source:
<code>public GroupBySubscriber( Func1<? super T, ? extends K> keySelector, Func1<? super T, ? extends R> elementSelector, Subscriber<? super GroupedObservable<K, R>> child) { super(); this.keySelector = keySelector; this.elementSelector = elementSelector; this.child = child; child.add(Subscriptions.create(new Action0() { @Override public void call() { <START> if (wipForUnsubscribe.decrementAndGet() == 0) { <END> self.unsubscribe(); } } })); }</code><technical_language>This entire class conflict #3428</technical_language>

Target:
public GroupBySubscriber( Func1<? super T, ? extends K> keySelector, Func1<? super T, ? extends R> elementSelector, Subscriber<? super GroupedObservable<K, R>> child) { super(); this.keySelector = keySelector; this.elementSelector = elementSelector; this.child = child; child.add(Subscriptions.create(new Action0() { @Override public void call() { if (WIP_FOR_UNSUBSCRIBE_UPDATER.decrementAndGet(self) == 0) { self.unsubscribe(); } } })); }
Source:
<code>public boolean isPageVisited(long pageId, String userId, String owner) { if (owner != null) { Object fields = new Object[3]; fields[0] = pageId; fields[1] = pageId; fields[2] = userId; List<String> ones = sqlService.dbRead("select 1 from lesson_builder_student_pages a, lesson_builder_log b where a.pageId=? and a.itemId = b.itemId and b.studentPageId=? and b.userId=?", fields, null); if (ones != null && ones.size() > 0) return true; } List<String> ones; Object[] fields; <START> if (userId==null){ <END> fields = new Object[1]; fields[0] = Long.toString(pageId); ones = sqlService.dbRead("select 1 from lesson_builder_items a, lesson_builder_log b where a.sakaiId=? and a.type=2 and a.id=b.itemId and b.userId=''", fields, null); } else { fields = new Object[2]; fields[0] = Long.toString(pageId); fields[1] = userId; ones = sqlService.dbRead("select 1 from lesson_builder_items a, lesson_builder_log b where a.sakaiId=? and a.type=2 and a.id=b.itemId and b.userId=?", fields, null); } if (ones != null && ones.size() > 0) return true; else return false; }</code><technical_language>is error do: fields[1] = (userId == null)?"":userId; do more</technical_language>

Target:
public boolean isPageVisited(long pageId, String userId, String owner) { if (owner != null) { Object fields = new Object[3]; fields[0] = pageId; fields[1] = pageId; fields[2] = userId; List<String> ones = sqlService.dbRead("select 1 from lesson_builder_student_pages a, lesson_builder_log b where a.pageId=? and a.itemId = b.itemId and b.studentPageId=? and b.userId=?", fields, null); if (ones != null && ones.size() > 0) return true; } Object fields = new Object[2]; fields[0] = Long.toString(pageId); fields[1] = (userId == null || userId.isEmpty())? ".anon" : userId; List<String> ones = sqlService.dbRead("select 1 from lesson_builder_items a, lesson_builder_log b where a.sakaiId=? and a.type=2 and a.id=b.itemId and b.userId=?", fields, null); if (ones != null && ones.size() > 0) return true; else return false; }
Source:
<code>public void reload() throws LoadBalancerExtensionException { <START> log.info("Configuration reloaded"); <END> }</code><technical_language>this method is used, logging 'Configuration reloaded' is misleading</technical_language>

Target:
public void reload() throws LoadBalancerExtensionException { }
Source:
<code>private String calculateCommitMessage(Collection<String> paths) { if (commitMessage != null) { return commitMessage; } if (amending) return previousCommitMessage; StringBuilder calculatedCommitMessage = new StringBuilder(); Set<IResource> resources = new HashSet<>(); for (String path : paths) { IFile file = findFile(path); if (file != null) resources.add(file.getProject()); } if (resources.size() == 0 && repository != null) { resources .addAll(Arrays.asList(ProjectUtil.getProjects(repository))); } try { List<ICommitMessageProvider> messageProviders = getCommitMessageProviders(); IResource[] resourcesArray = resources .toArray(new IResource[0]); String providedMessageSeparator = "\n\n"; for (ICommitMessageProvider messageProvider : messageProviders) { String message = messageProvider.getMessage(resourcesArray); <START> if ((message != null) && (!"".equals(message.trim()))) { END> calculatedCommitMessage.append(providedMessageSeparator) .append((message.trim())); } } if (calculatedCommitMessage.length() >= providedMessageSeparator .length()) { calculatedCommitMessage.delete(0, providedMessageSeparator.length()); } } catch (CoreException coreException) { Activator.logError(coreException.getLocalizedMessage(), coreException); } return calculatedCommitMessage.toString(); }</code><technical_language>if (message != null && !message.trim().isEmpty()) { ... need for extra parentheses code difficult read, need for "" either</technical_language>

Target:
private String calculateCommitMessage(Collection<String> paths) { if (commitMessage != null) { return commitMessage; } if (amending) return previousCommitMessage; StringBuilder calculatedCommitMessage = new StringBuilder(); Set<IResource> resources = new HashSet<>(); for (String path : paths) { IFile file = findFile(path); if (file != null) resources.add(file.getProject()); } if (resources.size() == 0 && repository != null) { resources .addAll(Arrays.asList(ProjectUtil.getProjects(repository))); } try { List<ICommitMessageProvider> messageProviders = getCommitMessageProviders(); IResource[] resourcesArray = resources .toArray(new IResource[0]); String providedMessageSeparator = "\n\n"; for (ICommitMessageProvider messageProvider : messageProviders) { String message = null; try { message = messageProvider.getMessage(resourcesArray); } catch (RuntimeException e) { Activator.logError(e.getMessage(), e); } if (message != null && !"".equals(message.trim())) { if (calculatedCommitMessage.length() > 0) { calculatedCommitMessage .append(providedMessageSeparator); } calculatedCommitMessage.append(providedMessageSeparator) .append((message.trim())); } } } catch (CoreException coreException) { Activator.logError(coreException.getLocalizedMessage(), coreException); } return calculatedCommitMessage.toString(); }
Source:
<code>public void connectToClient() throws IOException { if ( channel != null ) { throw new IllegalStateException( "already accepted TCP client connection" ); } <START> channel = server.accept(); <END> }</code><technical_language>calling this class TCPSurefireForkChannel ? is bound "tcp://127.0.0.1"...</technical_language>

Target:
public void connectToClient() throws IOException { if ( worker != null ) { throw new IllegalStateException( "already accepted TCP client connection" ); } try { worker = server.accept().get(); } catch ( InterruptedException e ) { throw new IOException( e.getLocalizedMessage(), e ); } catch ( ExecutionException e ) { throw new IOException( e.getLocalizedMessage(), e.getCause() ); } }
Source:
<code>public String getName() { if (title == null) { if (base == null) { title = MessageFormat.format(UIText.DiffEditorInput_Title1, <START> tip.getObjectId().abbreviate(7).name(), GitLabels.getPlainShortLabel(tip.getRepository())); } else { title = MessageFormat.format(UIText.DiffEditorInput_Title2, base.getObjectId().abbreviate(7).name(), tip.getObjectId().abbreviate(7).name(), <END> GitLabels.getPlainShortLabel(tip.getRepository())); } } return title; }</code><technical_language>Util.getShortObjectId() instead of putting 7 here</technical_language>

Target:
public String getName() { if (title == null) { if (base == null) { title = MessageFormat.format(UIText.DiffEditorInput_Title1, Utils.getShortObjectId(tip.getObjectId()), GitLabels.getPlainShortLabel(tip.getRepository())); } else { title = MessageFormat.format(UIText.DiffEditorInput_Title2, Utils.getShortObjectId(base.getObjectId()), Utils.getShortObjectId(tip.getObjectId()), GitLabels.getPlainShortLabel(tip.getRepository())); } } return title; }
Source:
<code>public static AdvancedConfig createDefault() { return new AdvancedConfig() <START> .setBlocksFactory(TeraSparseArray16Bit.class.getName()) <END> .setSunlightFactory(TeraDenseArray8Bit.class.getName()) .setLightFactory(TeraDenseArray8Bit.class.getName()) .setExtraFactory(TeraDenseArray8Bit.class.getName()) .setChunkDeflationEnabled(true) .setChunkDeflationLoggingEnabled(false) .setAdvancedMonitoringEnabled(false) .setAdvancedMonitorVisibleAtStartup(false); }</code><technical_language>I strongly recommend 16-bit dense array! problem is, world generation, block set some value, memory allocated anyway. a chunk generated world generators deflated array switched sparse implementation. Currently, deflation happen if is a sparse array</technical_language>

Target:
public static AdvancedConfig createDefault() { return new AdvancedConfig() .setBlocksFactory(TeraDenseArray16Bit.class.getName()) .setSunlightFactory(TeraDenseArray8Bit.class.getName()) .setLightFactory(TeraDenseArray8Bit.class.getName()) .setExtraFactory(TeraDenseArray8Bit.class.getName()) .setChunkDeflationEnabled(true) .setChunkDeflationLoggingEnabled(false) .setAdvancedMonitoringEnabled(false) .setAdvancedMonitorVisibleAtStartup(false); }
Source:
<code><START> public static boolean matchingColumn(final Cell left, final byte lFamLen, final int lQualLength, <END> final Cell right, final byte rFamLen, final int rQualLength) { if (!matchingFamily(left, lFamLen, right, rFamLen)) { return false; } return matchingQualifier(left, lQualLength, right, rQualLength); }</code><technical_language>public? in package comparator Cell types</technical_language>

Target:
private static boolean matchingColumn(final Cell left, final byte lFamLen, final int lQualLength, final Cell right, final byte rFamLen, final int rQualLength) { if (!matchingFamily(left, lFamLen, right, rFamLen)) { return false; } return matchingQualifier(left, lQualLength, right, rQualLength); }
Source:
<code>public CreateWsResponse create(CreateRequest project) { PostRequest request = new PostRequest(path(ACTION_CREATE)) .setParam(PARAM_ORGANIZATION, project.getOrganization()) .setParam(PARAM_PROJECT, project.getKey()) .setParam(PARAM_NAME, project.getName()) .setParam(PARAM_BRANCH, project.getBranch()) <START> .setParam("visibility", project.getVisibility()); <END> return call(request, CreateWsResponse.parser()); }</code><technical_language>please add constant</technical_language>

Target:
public CreateWsResponse create(CreateRequest project) { PostRequest request = new PostRequest(path(ACTION_CREATE)) .setParam(PARAM_ORGANIZATION, project.getOrganization()) .setParam(PARAM_PROJECT, project.getKey()) .setParam(PARAM_NAME, project.getName()) .setParam(PARAM_BRANCH, project.getBranch()) .setParam(PARAM_VISIBILITY, project.getVisibility()); return call(request, CreateWsResponse.parser()); }
Source:
<code>public Stream<InputSplit<List<WindowedSegmentId>>> createSplits( InputFormat inputFormat, @Nullable SplitHintSpec splitHintSpec ) { if (segmentIds == null) { return Streams.sequentialStreamFrom( createSplits( coordinatorClient, retryPolicyFactory, dataSource, interval, <START> splitHintSpec == null ? new SegmentsSplitHintSpec(null) : splitHintSpec <END> ) ); } else { return Stream.of(new InputSplit<>(segmentIds)); } }</code><technical_language>get converted a MaxSizeSplitHintSpec in createSplit, this create a MaxSizeSplitHintSpec directly? (Does this SegmentsSplitHintSpec is deprecated?)</technical_language>

Target:
public Stream<InputSplit<List<WindowedSegmentId>>> createSplits( InputFormat inputFormat, @Nullable SplitHintSpec splitHintSpec ) { if (segmentIds == null) { return Streams.sequentialStreamFrom( createSplits( coordinatorClient, retryPolicyFactory, dataSource, interval, splitHintSpec == null ? new MaxSizeSplitHintSpec(null) : splitHintSpec ) ); } else { return Stream.of(new InputSplit<>(segmentIds)); } }
Source:
<code><START> int getSpacing() { <END> return 1; }</code><technical_language>public</technical_language>

Target:
public int getSpacing() { return 1; }
Source:
<code>private MeasurementVariable createLocationNameVariable(final Integer locationId, final String locationAlias) { final MeasurementVariable locationNameVariable = new MeasurementVariable(); final Location location = this.locationDataManager.getLocationByID(locationId); final StandardVariable standardVariable = this.fieldbookService.getStandardVariable(TermId.TRIAL_LOCATION.getId()); locationNameVariable.setName(locationAlias); locationNameVariable.setDescription(standardVariable.getDescription()); locationNameVariable.setProperty(standardVariable.getProperty().getName()); locationNameVariable.setScale(standardVariable.getScale().getName()); locationNameVariable.setMethod(standardVariable.getMethod().getName()); locationNameVariable.setDataType(standardVariable.getDataType().getName()); locationNameVariable.setDataTypeId(standardVariable.getDataType().getId()); locationNameVariable.setValue(location.getLname()); locationNameVariable.setLabel("TRIAL"); <START> locationNameVariable.setTermId(8180); <END> return locationNameVariable; }</code><technical_language>@cuenyad enum in TermId</technical_language>

Target:
private MeasurementVariable createLocationNameVariable(final Integer locationId, final String locationAlias) { final MeasurementVariable locationNameVariable = new MeasurementVariable(); final Location location = this.locationDataManager.getLocationByID(locationId); final StandardVariable standardVariable = this.fieldbookService.getStandardVariable(TermId.TRIAL_LOCATION.getId()); locationNameVariable.setName(locationAlias); locationNameVariable.setDescription(standardVariable.getDescription()); locationNameVariable.setProperty(standardVariable.getProperty().getName()); locationNameVariable.setScale(standardVariable.getScale().getName()); locationNameVariable.setMethod(standardVariable.getMethod().getName()); locationNameVariable.setDataType(standardVariable.getDataType().getName()); locationNameVariable.setDataTypeId(standardVariable.getDataType().getId()); locationNameVariable.setValue(location.getLname()); locationNameVariable.setLabel("TRIAL"); locationNameVariable.setTermId(TermId.TRIAL_LOCATION.getId()); return locationNameVariable; }
Source:
<code><START> public Guid getUserIdIfExternal() { <END> return isInternalExecution() ? null : getUserId(); }</code><technical_language>Optional instead of returning null</technical_language>

Target:
public Optional<Guid> getUserIdIfExternal() { return isInternalExecution() ? Optional.empty() : Optional.ofNullable(getUserId()); }
Source:
<code>public static void SNAPSHOT_SCHEMA(String schemaName, String snapshotName) throws Exception { String sql1 = String.format( "select tablename,conglomeratenumber " + "from sys.sysschemas s, sys.systables t, sys.sysconglomerates c " + "where s.schemaid=t.schemaid and " + "c.tableid = t.tableid and " + "c.schemaid=s.schemaid and " + "s.schemaname='%s' and " + "isindex=false and " + "isconstraint=false", schemaName); String sql2 = String.format( "select conglomeratename, conglomeratenumber " + "from sys.sysschemas s, sys.systables t, sys.sysconglomerates c " + "where s.schemaid=t.schemaid and " + <START> "c.schemaid=s.schemaid and " + <END> "s.schemaname='%s' and " + "(isconstraint=true or isindex=true)", schemaName); ensureSnapshot(snapshotName, false); LanguageConnectionContext lcc = ConnectionUtil.getCurrentLCC(); TransactionController tc = lcc.getTransactionExecute(); DataDictionary dd = lcc.getDataDictionary(); SchemaDescriptor sd = dd.getSchemaDescriptor(schemaName, tc, true); if (sd == null) { throw StandardException.newException(SQLState.LANG_SCHEMA_DOES_NOT_EXIST, schemaName); } dd.startWriting(lcc); List<String> snapshotList = Lists.newArrayList(); try { ResultSet rs = getResultSet(sql1); snapshot(rs, snapshotName, schemaName, dd, tc, snapshotList); rs = getResultSet(sql2); snapshot(rs, snapshotName, schemaName, dd, tc, snapshotList); } catch (Exception e) { deleteSnapshots(snapshotList); throw e; } }</code><technical_language>systables is needed in this query</technical_language>

Target:
public static void SNAPSHOT_SCHEMA(String schemaName, String snapshotName) throws Exception { String sql1 = "select tablename,conglomeratenumber " + "from sys.sysschemas s, sys.systables t, sys.sysconglomerates c " + "where s.schemaid=t.schemaid and " + "c.tableid = t.tableid and " + "c.schemaid=s.schemaid and " + "s.schemaname=? and " + "(s.schemaname<>'SYS' or t.tablename<>'SYSSNAPSHOTS') and " + "isindex=false and " + "isconstraint=false"; String sql2 = "select conglomeratename, conglomeratenumber " + "from sys.sysschemas s, sys.systables t, sys.sysconglomerates c " + "where s.schemaid=t.schemaid and " + "c.schemaid=s.schemaid and " + "c.tableid = t.tableid and " + "s.schemaname=? and " + "(s.schemaname<>'SYS' or t.tablename<>'SYSSNAPSHOTS') and " + "(isconstraint=true or isindex=true)"; ensureSnapshot(snapshotName, false); LanguageConnectionContext lcc = ConnectionUtil.getCurrentLCC(); TransactionController tc = lcc.getTransactionExecute(); DataDictionary dd = lcc.getDataDictionary(); SchemaDescriptor sd = dd.getSchemaDescriptor(schemaName, tc, true); if (sd == null) { throw StandardException.newException(SQLState.LANG_SCHEMA_DOES_NOT_EXIST, schemaName); } dd.startWriting(lcc); List<String> snapshotList = Lists.newArrayList(); try { ResultSet rs = getResultSet(sql1, schemaName, null); snapshot(rs, snapshotName, schemaName, dd, tc, snapshotList); rs = getResultSet(sql2, schemaName, null); snapshot(rs, snapshotName, schemaName, dd, tc, snapshotList); } catch (Exception e) { deleteSnapshots(snapshotList); throw e; } }
Source:
<code>private void initializeTypeEstimates(ConstraintVariable2[] allConstraintVariables) { for (ConstraintVariable2 cv : allConstraintVariables) { TypeEquivalenceSet set= cv.getTypeEquivalenceSet(); if (set == null) { set= new TypeEquivalenceSet(cv); set.setTypeEstimate(createInitialEstimate(cv)); cv.setTypeEquivalenceSet(set); } else { TypeSet typeEstimate= (TypeSet) cv.getTypeEstimate(); if (typeEstimate == null) { ConstraintVariable2[] cvs= set.getContributingVariables(); typeEstimate= fTypeSetEnvironment.getUniverseTypeSet(); for (ConstraintVariable2 c : cvs) { <START> typeEstimate = typeEstimate.intersectedWith(createInitialEstimate(c)); <END> } set.setTypeEstimate(typeEstimate); } } } }</code><technical_language>fix =</technical_language>

Target:
private void initializeTypeEstimates(ConstraintVariable2[] allConstraintVariables) { for (ConstraintVariable2 cv : allConstraintVariables) { TypeEquivalenceSet set= cv.getTypeEquivalenceSet(); if (set == null) { set= new TypeEquivalenceSet(cv); set.setTypeEstimate(createInitialEstimate(cv)); cv.setTypeEquivalenceSet(set); } else { TypeSet typeEstimate= (TypeSet) cv.getTypeEstimate(); if (typeEstimate == null) { typeEstimate= fTypeSetEnvironment.getUniverseTypeSet(); for (ConstraintVariable2 c : set.getContributingVariables()) { typeEstimate= typeEstimate.intersectedWith(createInitialEstimate(c)); } set.setTypeEstimate(typeEstimate); } } } }
Source:
<code>RuleMemberValidator build() { <START> return new RuleMemberValidator(fAnnotation, fMethods, fValidatorStrategies); <END> }</code><technical_language>change to: return new RuleMemberValidator(this); (see Effective Java, 2nd edition)</technical_language>

Target:
RuleMemberValidator build() { return new RuleMemberValidator(this); }