auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private boolean addMissingLeaseInfoToVm() { if (getVm().getLeaseStorageDomainId() != null && getVm().getLeaseInfo() == null) { <START> if (!addVmLease(getVm().getLeaseStorageDomainId(), getVm().getId(), false)) { return false; } <END> if (getVm().getLeaseInfo() == null) { ActionReturnValue retVal = runInternalAction(ActionType.GetVmLeaseInfo, new VmLeaseParameters(getVm().getStoragePoolId(), getVm().getLeaseStorageDomainId(), getParameters().getVmId())); if (retVal == null || !retVal.getSucceeded()) { return false; } getVm().setLeaseInfo(retVal.getActionReturnValue()); vmDynamicDao.updateVmLeaseInfo(getParameters().getVmId(), getVm().getLeaseInfo()); } } return true; }</code><technical_language>This redundant - if reach this point, lease created already, right? issue another call add lease</technical_language>

Target:
private void addMissingLeaseInfoToVm() { if (getVm().getLeaseStorageDomainId() != null && getVm().getLeaseInfo() == null) { ActionReturnValue retVal = runInternalAction(ActionType.GetVmLeaseInfo, new VmLeaseParameters(getVm().getStoragePoolId(), getVm().getLeaseStorageDomainId(), getParameters().getVmId())); if (retVal == null || !retVal.getSucceeded()) { throw new EngineException(EngineError.INVALID_HA_VM_LEASE); } getVm().setLeaseInfo(retVal.getActionReturnValue()); vmDynamicDao.updateVmLeaseInfo(getParameters().getVmId(), getVm().getLeaseInfo()); } return; }
Source:
<code>public Integer getPublishedSequenceNumber() { <START> return systemProperties.getPublishedSequenceNumber(); <END> }</code><technical_language>I feel this a system property. hand, some sense semantically, other typically "broker owned" properties service controls sequence number is client controls. open suggestion here, though..</technical_language>

Target:
public Integer getPublishedSequenceNumber() { return publishedSequenceNumber; }
Source:
<code>private boolean checkAtNewTableRow(String line, int lineOffset) { if (lineOffset < line.length()) { <START> Matcher m = cellPattern.matcher(line.substring(lineOffset)); <END> return m.matches(); } return false; }</code><technical_language>a substring more sense Matcher.region() instead</technical_language>

Target:
private boolean checkAtNewTableRow(String line, int lineOffset) { if (lineOffset < line.length()) { Matcher m = cellPattern.matcher(line); m.region(lineOffset, line.length()); return m.matches(); } return false; }
Source:
<code>private void validateJsonSchemaConstraints(final Schema schema) throws InvalidEventTypeException { final List<SchemaIncompatibility> incompatibilities = schemaCompatibilityChecker.checkConstraints(schema); if (!incompatibilities.isEmpty()) { <START> final String erroMessage = incompatibilities.stream().map(Object::toString) <END> .collect(Collectors.joining(", ")); throw new InvalidEventTypeException("Invalid schema: " + erroMessage); } }</code><technical_language>erroR</technical_language>

Target:
private void validateJsonSchemaConstraints(final Schema schema) throws InvalidEventTypeException { final List<SchemaIncompatibility> incompatibilities = schemaCompatibilityChecker.checkConstraints(schema); if (!incompatibilities.isEmpty()) { final String errorMessage = incompatibilities.stream().map(Object::toString) .collect(Collectors.joining(", ")); throw new InvalidEventTypeException("Invalid schema: " + errorMessage); } }
Source:
<code>private List<Filter> getWorkspaceQueryFilters(String queryId) { List<Filter> filters = new ArrayList<>(); <START> filters.add(filterBuilder.attribute(Metacard.TAGS).is().text(WORKSPACE_TAG)); <END> filters.add(filterBuilder.attribute(QUERIES_ATTRIBUTE).like().text(queryId)); return filters; }</code><technical_language>Core.METACARD_TAGS. do filters.allOf(filterBuilder.attribute(Metacard.TAGS).is().text(WORKSPACE_TAG), filters.add(filterBuilder.attribute(QUERIES_ATTRIBUTE).like().text(queryId))); filterBuilder.attribute(QUERIES_ATTRIBUTE).is().text(queryId))</technical_language>

Target:
private Filter getWorkspaceQueryFilters(String queryId) { return filterBuilder.allOf( filterBuilder.attribute(Core.METACARD_TAGS).is().text(WorkspaceConstants.WORKSPACE_TAG), filterBuilder.attribute(WorkspaceConstants.WORKSPACE_QUERIES).like().text(queryId)); }
Source:
<code>public void invokeAction(ServerControllerActionCallBean bean) throws InvokeActionException { try { final Object controller = controllers.get(bean.getControllerId()); final Class controllerClass = controllerClassMapping.get(bean.getControllerId()); final Method actionMethod = getActionMethod(controller, controllerClass, bean.getActionName()); final List<String> paramNames = getParamNames(actionMethod); <START> final List<Object> args = getArgs(bean, paramNames); <END> ReflectionHelper.invokePrivileged(actionMethod, controller, args.toArray()); } catch (Exception e) { throw new InvokeActionException(e); } }</code><technical_language>getParamNames getArgs is called once. refactor this a getParamArguments method</technical_language>

Target:
public void invokeAction(ServerControllerActionCallBean bean) throws InvokeActionException { try { final Object controller = controllers.get(bean.getControllerId()); final Class controllerClass = controllerClassMapping.get(bean.getControllerId()); final Method actionMethod = getActionMethod(controller, controllerClass, bean.getActionName()); final List<Object> args = getArgs(actionMethod, bean); ReflectionHelper.invokePrivileged(actionMethod, controller, args.toArray()); } catch (Exception e) { throw new InvokeActionException(e); } }
Source:
<code>public static Predicate containsIgnoreCase(final Expression left, final Expression right) { return new BinaryPredicateSupport(left, right) { protected boolean matches(Exchange exchange, Object leftValue, Object rightValue) { if (leftValue == null && rightValue == null) { return true; } else if (leftValue == null || rightValue == null) { return false; } return ObjectHelper.containsIgnoreCase(leftValue, rightValue); } <START> protected String getOperationText() { <END> return "contains"; } }; }</code><technical_language>I if this ~~ contains ignore case</technical_language>

Target:
public static Predicate containsIgnoreCase(final Expression left, final Expression right) { return new BinaryPredicateSupport(left, right) { protected boolean matches(Exchange exchange, Object leftValue, Object rightValue) { if (leftValue == null && rightValue == null) { return true; } else if (leftValue == null || rightValue == null) { return false; } return ObjectHelper.containsIgnoreCase(leftValue, rightValue); } protected String getOperationText() { return "~~"; } }; }
Source:
<code>private TargetRoll getQualityMods(TargetRoll mods, Person tech) { int qualityMod = 0; switch(quality) { case QUALITY_A: qualityMod = 3; break; case QUALITY_B: qualityMod = 2; break; case QUALITY_C: qualityMod = 1; break; case QUALITY_D: qualityMod = 0; break; case QUALITY_E: qualityMod = -1; break; case QUALITY_F: qualityMod = -2; break; } mods.addModifier(qualityMod, getQualityName(quality, campaign.getCampaignOptions().reverseQualityNames())); <START> if(qualityMod > 0 && null != tech && tech.getOptions().booleanOption(PersonnelOptions.TECH_FIXER)) { <END> mods.addModifier(-1, "Mr/Ms Fix-it"); } return mods; }</code><technical_language>suggestion if ((qualityMod > 0) && (null != tech) && tech.getOptions().booleanOption(PersonnelOptions.TECH_FIXER)) {</technical_language>

Target:
private TargetRoll getQualityMods(TargetRoll mods, Person tech) { int qualityMod = 0; switch (quality) { case QUALITY_A: qualityMod = 3; break; case QUALITY_B: qualityMod = 2; break; case QUALITY_C: qualityMod = 1; break; case QUALITY_D: qualityMod = 0; break; case QUALITY_E: qualityMod = -1; break; case QUALITY_F: qualityMod = -2; break; } mods.addModifier(qualityMod, getQualityName(quality, campaign.getCampaignOptions().reverseQualityNames())); if ((qualityMod > 0) && (null != tech) && tech.getOptions().booleanOption(PersonnelOptions.TECH_FIXER)) { mods.addModifier(-1, "Mr/Ms Fix-it"); } return mods; }
Source:
<code>public void processEvent(Event event) { publishers.publishersMatchingType(PubsubSystem.GOOGLE) .stream() .map(p -> (GooglePubsubPublisher) p) <START> .forEach(p -> { <END> String jsonPayload; try { jsonPayload = mapper.writeValueAsString(event); } catch (JsonProcessingException jpe) { log.error("Could not serialize event message: {}", jpe); return; } Map<String, String> attributes = new HashMap<>(); if (event.getDetails() != null) { Metadata m = event.getDetails(); String rawType = m.getType(); if (StringUtils.isNotEmpty(rawType)) { attributes.put("rawType", rawType); String[] eventDetails = rawType.split(":"); if (eventDetails.length == 3) { attributes.put("source", eventDetails[0]); attributes.put("type", eventDetails[1]); attributes.put("status", eventDetails[2]); } } if (StringUtils.isNotEmpty(m.getApplication())) { attributes.put("application", m.getApplication()); } if (m.getAttributes() != null && !m.getAttributes().isEmpty()) { attributes.putAll(m.getAttributes()); } } if (event.getContent() != null && !event.getContent().isEmpty()) { Map content = event.getContent(); String name = content.getOrDefault("name", "").toString(); if (StringUtils.isNotEmpty(name)) { attributes.put("name", name); } String taskName = content.getOrDefault("taskName", "").toString(); if (StringUtils.isNotEmpty(taskName)) { attributes.put("taskName", taskName); } } p.publish(jsonPayload, attributes); }); }</code><technical_language>Consider breaking lambda a helper function</technical_language>

Target:
public void processEvent(Event event) { publishers.publishersMatchingType(PubsubSystem.GOOGLE) .stream() .map(p -> (GooglePubsubPublisher) p) .forEach(p -> publishEvent(p, event)); }
Source:
<code>static long getGeneration(String name) { if (name.isEmpty()) { throw new IllegalArgumentException("Name provided cannot be empty"); } <START> return Long.parseLong(name.substring(name.indexOf(BlobStore.SEPARATOR) + 1, name.length())); <END> }</code><technical_language>need 2nd param(name.length()) in subString</technical_language>

Target:
static long getGeneration(String name) { if (name.isEmpty()) { throw new IllegalArgumentException("Name provided cannot be empty"); } return Long.parseLong(name.substring(name.indexOf(BlobStore.SEPARATOR) + 1)); }
Source:
<code>private void flow(GlowBlock source, BlockFace direction) { BlockFromToEvent fromToEvent = new BlockFromToEvent(source, direction); if (fromToEvent.isCancelled()) { return; } byte strength = fromToEvent.getBlock().getState().getRawData(); if (DOWN != fromToEvent.getFace()) { if (Byte.compare(strength, isWater(fromToEvent.getBlock().getType()) || fromToEvent.getBlock().getBiome() == Biome.HELL ? STRENGTH_MIN_WATER : STRENGTH_MIN_LAVA) < 0) { strength += 1; } else { return; } } else { strength = STRENGTH_MAX; } GlowBlock toBlock = (GlowBlock) fromToEvent.getToBlock(); <START> toBlock.setType(fromToEvent.getBlock().getType(), strength, true); <END> toBlock.getWorld().requestPulse(toBlock); }</code><technical_language>Updating physics flows water. this a duplicate action</technical_language>

Target:
private void flow(GlowBlock source, BlockFace direction) { BlockFromToEvent fromToEvent = new BlockFromToEvent(source, direction); if (fromToEvent.isCancelled()) { return; } byte strength = fromToEvent.getBlock().getState().getRawData(); if (DOWN != fromToEvent.getFace()) { if (Byte.compare(strength, isWater(fromToEvent.getBlock().getType()) || fromToEvent.getBlock().getBiome() == Biome.HELL ? STRENGTH_MIN_WATER : STRENGTH_MIN_LAVA) < 0) { strength += 1; } else { return; } } else { strength = STRENGTH_MAX; } GlowBlock toBlock = (GlowBlock) fromToEvent.getToBlock(); toBlock.setType(fromToEvent.getBlock().getType(), strength, false); toBlock.getWorld().requestPulse(toBlock); }
Source:
<code>private void induceDeleteFailure(int count, ServerErrorCode errorCode) { List<Integer> hostPorts = (ArrayList<Integer>) exceptionHostPorts.clone(); <START> Random random = new Random(); <END> for (int i = 0; i < count; i++) { int nextRandom = random.nextInt(hostPorts.size()); MockDataNode mockDataNode = MockConnectionPool.mockCluster.getMockDataNode(host, hostPorts.get(nextRandom)); mockDataNode.setDeleteException(errorCode); hostPorts.remove(nextRandom); } }</code><technical_language>random a member variable of this class instead of constructed in methods</technical_language>

Target:
private void induceDeleteFailure(int count, ServerErrorCode errorCode) { List<Integer> hostPorts = (ArrayList<Integer>) exceptionHostPorts.clone(); for (int i = 0; i < count; i++) { int nextRandom = random.nextInt(hostPorts.size()); MockDataNode mockDataNode = MockConnectionPool.mockCluster.getMockDataNode(host, hostPorts.get(nextRandom)); mockDataNode.setDeleteException(errorCode); hostPorts.remove(nextRandom); } }
Source:
<code>public static FileLock tryLockFor(File fileToLock) throws IOException { if (!fileToLock.exists()) { <START> throw new FileNotFoundException("Unable to get lock for non-existent file: " + fileToLock.getAbsolutePath()); <END> } FileChannel channel = channelCache.get(fileToLock); if (channel == null) { @SuppressWarnings("resource") FileChannel newChannel = new RandomAccessFile(fileToLock, "rw").getChannel(); FileChannel original = channelCache.putIfAbsent(fileToLock, newChannel); if (original != null) { channel = original; try { newChannel.close(); } catch (IOException e) { } } else { channel = newChannel; } } FileLock lock = null; if (channel != null) { try { lock = channel.tryLock(); } catch (OverlappingFileLockException e) { } } return lock; }</code><technical_language>return null instead of this exception enough for method contract? in NioFileLocker, suppress exception way. So, a return null; here, add a @Nullable for method return on</technical_language>

Target:
public static FileLock tryLockFor(File fileToLock) throws IOException { FileChannel channel = channelCache.get(fileToLock); if (channel == null && fileToLock.exists()) { @SuppressWarnings("resource") FileChannel newChannel = new RandomAccessFile(fileToLock, "rw").getChannel(); FileChannel original = channelCache.putIfAbsent(fileToLock, newChannel); if (original != null) { channel = original; try { newChannel.close(); } catch (IOException e) { } } else { channel = newChannel; } } FileLock lock = null; if (channel != null) { try { lock = channel.tryLock(); } catch (OverlappingFileLockException e) { } } return lock; }
Source:
<code>public static JobContextImpl fromConfigWithDefaults(Config config) { JobConfig jobConfig = new JobConfig(config); <START> String jobName = jobConfig.getName().isDefined() ? jobConfig.getName().get() : null; <END> String jobId = jobConfig.getJobId(); return new JobContextImpl(config, jobName, jobId); }</code><technical_language>jobName is required null. prefer throw (option.get()) instead</technical_language>

Target:
public static JobContextImpl fromConfigWithDefaults(Config config) { JobConfig jobConfig = new JobConfig(config); Option<String> jobName = jobConfig.getName(); if (jobName.isEmpty()) { throw new IllegalArgumentException("Job name is not defined in configuration"); } String jobId = jobConfig.getJobId(); return new JobContextImpl(config, jobName.get(), jobId); }
Source:
<code>protected ISourceCodeParser createParser(IScanner scanner, IParserLogService log, IIndex index, boolean forCompletion, int options) { ParserMode mode; if (forCompletion) { mode= ParserMode.COMPLETION_PARSE; } else if ((options & OPTION_SKIP_FUNCTION_BODIES) != 0) { mode= ParserMode.STRUCTURAL_PARSE; } else { mode= ParserMode.COMPLETE_PARSE; } ISourceCodeParser parser = createParser(scanner, mode, log, index); <START> boolean allowSkipping = CCorePreferenceConstants.getPreference( <END> CCorePreferenceConstants.SCALABILITY_SKIP_TRIVIAL_EXPRESSIONS, null, true); if (allowSkipping && (options & OPTION_SKIP_TRIVIAL_EXPRESSIONS_IN_AGGREGATE_INITIALIZERS) != 0) { if (parser instanceof AbstractGNUSourceCodeParser) { int maximumTrivialExpressions = CCorePreferenceConstants.getPreference( CCorePreferenceConstants.SCALABILITY_MAXIMUM_TRIVIAL_EXPRESSIONS, null, DEFAULT_TRIVIAL_EXPRESSIONS_IN_AGGREGATE_INITIALIZERS); ((AbstractGNUSourceCodeParser) parser) .setMaximumTrivialExpressionsInAggregateInitializers(maximumTrivialExpressions); } } return parser; }</code><technical_language>Accessing preferences parser code is allowed IBM this code in a headless environment support Eclipse preferences. propagate additional preferences adding ExtendedScannerInfo class similar done for include export patterns (see getIncludeExportPatterns setIncludeExportPatterns methods)</technical_language>

Target:
protected ISourceCodeParser createParser(IScanner scanner, IParserLogService log, IIndex index, boolean forCompletion, int options) { ParserMode mode; if (forCompletion) { mode= ParserMode.COMPLETION_PARSE; } else if ((options & OPTION_SKIP_FUNCTION_BODIES) != 0) { mode= ParserMode.STRUCTURAL_PARSE; } else { mode= ParserMode.COMPLETE_PARSE; } return createParser(scanner, mode, log, index); }
Source:
<code>private boolean saveDataToModelSeries() { if(isSeriesUnique()) { model.setTitle(txtTitle.getText()); if(null != txtKey && txtKey.isEnabled()) model.setKey(txtKey.getText()); else model.setKey(null); model.setXSeries(cboXItem.getSelectionIndex()-1); int i, count; <START> for(i=1, count=1; i<cboYItems.length && 0 != cboYItems[i].getSelectionIndex(); i++) <END> count++; int[] ySeries = new int[count]; ySeries[0] = cboYItems[0].getSelectionIndex(); for(i=1; i<count; i++) ySeries[i] = cboYItems[i].getSelectionIndex()-1; model.setYSeries(ySeries); return true; } return false; }</code><technical_language>Please parenthesis for for statements</technical_language>

Target:
private boolean saveDataToModelSeries() { if(isSeriesUnique()) { model.setTitle(txtTitle.getText()); if(null != txtKey && txtKey.isEnabled()) model.setKey(txtKey.getText()); else model.setKey(null); model.setXSeries(cboXItem.getSelectionIndex()-1); int i, count; for(i=1, count=1; i<cboYItems.length && 0 != cboYItems[i].getSelectionIndex(); i++) { count++; } int[] ySeries = new int[count]; ySeries[0] = cboYItems[0].getSelectionIndex(); for(i=1; i<count; i++) { ySeries[i] = cboYItems[i].getSelectionIndex()-1; } model.setYSeries(ySeries); return true; } return false; }
Source:
<code>public void rabbitType(CommandContext args, CommandSender sender, NPC npc) throws CommandException { if (!(npc.getEntity().getType().name().equals("Rabbit"))) throw new RequirementMissingException(Messaging.tr(CommandMessages.REQUIREMENTS_INVALID_MOB_TYPE, npc.getEntity().getType().name().toLowerCase())); RabbitTypes type; try { <START> type = RabbitTypes.valueOf(args.getString(1).toUpperCase()); <END> } catch (IllegalArgumentException ex) { throw new CommandException(Messages.INVALID_RABBIT_TYPE); } npc.getTrait(RabbitType.class).setType(type); Messaging.sendTr(sender, Messages.RABBIT_TYPE_SET, npc.getName(), type); }</code><technical_language>Whitespace</technical_language>

Target:
public void rabbitType(CommandContext args, CommandSender sender, NPC npc) throws CommandException { if (Bukkit.getPluginManager().getPlugin("Carbon") == null) throw new RequirementMissingException(Messaging.tr(CommandMessages.UNKNOWN_COMMAND)); if (!(npc.getEntity().getType().name().equals("Rabbit"))) throw new RequirementMissingException(Messaging.tr(CommandMessages.REQUIREMENTS_INVALID_MOB_TYPE, npc.getEntity().getType().name().toLowerCase())); RabbitTypes type; try { type = RabbitTypes.valueOf(args.getString(1).toUpperCase()); } catch (IllegalArgumentException ex) { throw new CommandException(Messages.INVALID_RABBIT_TYPE); } npc.getTrait(RabbitType.class).setType(type); Messaging.sendTr(sender, Messages.RABBIT_TYPE_SET, npc.getName(), type); }
Source:
<code>public void testRegistryNamingExtended() throws Exception { assertEquals("docker.jolokia.org/org/jolokia/jolokia_demo:0.18", new ImageName("org/jolokia/jolokia_demo:0.18").getFullName("docker.jolokia.org")); assertEquals("docker.jolokia.org/org/jolokia/jolokia_demo:latest", new ImageName("org/jolokia/jolokia_demo").getFullName("docker.jolokia.org")); assertEquals("org/jolokia/jolokia_demo:latest", new ImageName("org/jolokia/jolokia_demo").getFullName(null)); assertEquals("docker.jolokia.org/org/jolokia/jolokia_demo:latest", new ImageName("docker.jolokia.org/org/jolokia/jolokia_demo").getFullName("another.registry.org")); assertEquals("docker.jolokia.org/org/jolokia/jolokia_demo:latest", new ImageName("docker.jolokia.org/org/jolokia/jolokia_demo").getFullName(null)); assertEquals("docker.jolokia.org/org/jolokia/jolokia_demo@sha256:2781907cc3ae9bb732076f14392128d4b84ff3ebb66379d268e563b10fbfb9da", <START> new ImageName("docker.jolokia.org/org/jolokia/jolokia_demo@sha256:2781907cc3ae9bb732076f14392128d4b84ff3ebb66379d268e563b10fbfb9da").getFullName(null)); <END> }</code><technical_language>add a check ImageName.getRegistry() returns docker.jolokia.org ? (i doubt that)</technical_language>

Target:
public void testRegistryNamingExtended() throws Exception { assertEquals("docker.jolokia.org/org/jolokia/jolokia_demo:0.18", new ImageName("org/jolokia/jolokia_demo:0.18").getFullName("docker.jolokia.org")); assertEquals("docker.jolokia.org/org/jolokia/jolokia_demo:latest", new ImageName("org/jolokia/jolokia_demo").getFullName("docker.jolokia.org")); assertEquals("org/jolokia/jolokia_demo:latest", new ImageName("org/jolokia/jolokia_demo").getFullName(null)); assertEquals("docker.jolokia.org/org/jolokia/jolokia_demo:latest", new ImageName("docker.jolokia.org/org/jolokia/jolokia_demo").getFullName("another.registry.org")); assertEquals("docker.jolokia.org/org/jolokia/jolokia_demo:latest", new ImageName("docker.jolokia.org/org/jolokia/jolokia_demo").getFullName(null)); assertEquals("docker.jolokia.org/org/jolokia/jolokia_demo@sha256:2781907cc3ae9bb732076f14392128d4b84ff3ebb66379d268e563b10fbfb9da", new ImageName("docker.jolokia.org/org/jolokia/jolokia_demo@sha256:2781907cc3ae9bb732076f14392128d4b84ff3ebb66379d268e563b10fbfb9da").getFullName(null)); assertEquals("docker.jolokia.org", new ImageName("docker.jolokia.org/org/jolokia/jolokia_demo@sha256:2781907cc3ae9bb732076f14392128d4b84ff3ebb66379d268e563b10fbfb9da").getRegistry()); }
Source:
<code>protected void onResume() { super.onResume(); <START> Subscription merlinSubscription = MerlinObservable.from(this).subscribe(new Action1<NetworkStatus.State>() { <END> @Override public void call(NetworkStatus.State state) { if (NetworkStatus.State.AVAILABLE == state) { networkStatusDisplayer.displayConnected(); } else { networkStatusDisplayer.displayDisconnected(); } } }); subscriptions.add(merlinSubscription); }</code><technical_language>Extracting this new Action1<NetworkStatus.State> a collaborating class highlight dependencies improve readability. static class NetworkAction implements Action1<NetworkStatus.State> { private final NetworkStatusDisplayer networkStatusDisplayer; NetworkAction(NetworkStatusDisplayer networkStatusDisplayer) { this.networkStatusDisplayer = networkStatusDisplayer; } @Override public void call(NetworkStatus.State state) { if (NetworkStatus.State.AVAILABLE == state) { networkStatusDisplayer.displayConnected(); } else { networkStatusDisplayer.displayDisconnected(); } } }</technical_language>

Target:
protected void onResume() { super.onResume(); Subscription merlinSubscription = MerlinObservable.from(this) .distinctUntilChanged() .subscribe(new NetworkAction(networkStatusDisplayer)); subscriptions.add(merlinSubscription); }
Source:
<code><START> public Map getService(String name) { <END> return sections.get(name); }</code><technical_language>this return unmodifiable copy</technical_language>

Target:
public Map<String, String> getService(String name) throws SQLException { if (sections.containsKey(name)) { return sections.get(name); } else { throw new SQLException(MessageFormat.format("Unknown service {0}.", name)); } }
Source:
<code>public SecurityGroup addIpPermission(IpPermission ipPermission, SecurityGroup group) { String zone = group.getLocation().getId(); String id = group.getId(); <START> Optional<? extends SecurityGroupApi> sgApi = client.getSecurityGroupExtensionForZone(zone); <END> if (!sgApi.isPresent()) { return null; } if (ipPermission.getCidrBlocks().size() > 0) { for (String cidr : ipPermission.getCidrBlocks()) { sgApi.get().createRuleAllowingCidrBlock(id, Ingress.builder() .ipProtocol(ipPermission.getIpProtocol()) .fromPort(ipPermission.getFromPort()) .toPort(ipPermission.getToPort()) .build(), cidr); } } if (ipPermission.getGroupIds().size() > 0) { for (String zoneAndGroupRaw : ipPermission.getGroupIds()) { ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(zoneAndGroupRaw); String groupId = zoneAndId.getId(); sgApi.get().createRuleAllowingSecurityGroupId(id, Ingress.builder() .ipProtocol(ipPermission.getIpProtocol()) .fromPort(ipPermission.getFromPort()) .toPort(ipPermission.getToPort()) .build(), groupId); } } return getSecurityGroupById(ZoneAndId.fromZoneAndId(zone, id).slashEncode()); }</code><technical_language>null check for zone here</technical_language>

Target:
public SecurityGroup addIpPermission(IpPermission ipPermission, SecurityGroup group) { String zone = group.getLocation().getId(); String id = group.getId(); Optional<? extends SecurityGroupApi> sgApi = api.getSecurityGroupExtensionForZone(zone); if (!sgApi.isPresent()) { return null; } if (ipPermission.getCidrBlocks().size() > 0) { for (String cidr : ipPermission.getCidrBlocks()) { sgApi.get().createRuleAllowingCidrBlock(id, Ingress.builder() .ipProtocol(ipPermission.getIpProtocol()) .fromPort(ipPermission.getFromPort()) .toPort(ipPermission.getToPort()) .build(), cidr); } } if (ipPermission.getGroupIds().size() > 0) { for (String zoneAndGroupRaw : ipPermission.getGroupIds()) { ZoneAndId zoneAndId = ZoneAndId.fromSlashEncoded(zoneAndGroupRaw); String groupId = zoneAndId.getId(); sgApi.get().createRuleAllowingSecurityGroupId(id, Ingress.builder() .ipProtocol(ipPermission.getIpProtocol()) .fromPort(ipPermission.getFromPort()) .toPort(ipPermission.getToPort()) .build(), groupId); } } return getSecurityGroupById(ZoneAndId.fromZoneAndId(zone, id).slashEncode()); }
Source:
<code>public void testUnhandledExceptionStoredOnCrashReportEnabled() { CrashReporter.storeUnhandledException(exception); <START> assertTrue(!sharedPreferences.getString(CrashReporter.EXCEPTION_FOR_REPORT, "").isEmpty()); <END> }</code><technical_language>This assertFalse(sharedPreferences.getString(CrashReporter.EXCEPTION_FOR_REPORT, "").isEmpty()); for readability. This is valid for occurrences</technical_language>

Target:
public void testUnhandledExceptionStoredOnCrashReportEnabled() { CrashReporter.storeUnhandledException(exception); assertFalse(sharedPreferences.getString(CrashReporter.EXCEPTION_FOR_REPORT, "").isEmpty()); }
Source:
<code>public SpotConfiguration(boolean useBidPrice) { this.useBidPrice = useBidPrice; this.spotMaxBidPrice = ""; <START> this.fallbackToOndemand = false; this.spotBlockReservationDuration = 0; <END> }</code><technical_language>default for bool int need clarify. suggestion</technical_language>

Target:
public SpotConfiguration(boolean useBidPrice) { this.useBidPrice = useBidPrice; this.spotMaxBidPrice = ""; }
Source:
<code>public void onShutdownRequest() { <START> log.info("Stopping the AM client on shutdown request."); lifecycle.onShutdown(SamzaApplicationState.SamzaAppStatus.FAILED); amClient.stop(); log.info("Stopping the NM client on shutdown request."); nmClientAsync.stop(); log.info("Stopping the SamzaYarnAppMasterService service on shutdown request."); service.onShutdown(); log.info("Stopping SamzaAppMasterMetrics on shutdown request."); metrics.stop(); <END> }</code><technical_language>leverage stop(SamzaAppStatus.FAILED) top? I some additional logs. modify stop(...) include this logs for debuggability</technical_language>

Target:
public void onShutdownRequest() { stop(SamzaApplicationState.SamzaAppStatus.FAILED); }
Source:
<code>public void run() { if(isTriggerExpired()) { <START> return ; <END> } boolean isTriggerConditionMet = triggerCondition.isMet(); if (isTriggerConditionMet) { logger.info("Condition " + triggerCondition.getExpression() + " met"); for (TriggerAction action : actions) { try { action.doAction(); } catch (Exception e) { logger.error("Failed to do action " + action.getDescription() + " for execution " + azkaban.execapp.Trigger.this.execId, e); } } this.isExpired = true; } else { updateNextCheckTime(); } }</code><technical_language>log</technical_language>

Target:
public void run() { if(isTriggerExpired()) { logger.info(this + " expired"); return ; } boolean isTriggerConditionMet = triggerCondition.isMet(); if (isTriggerConditionMet) { logger.info("Condition " + triggerCondition.getExpression() + " met"); for (TriggerAction action : actions) { try { action.doAction(); } catch (Exception e) { logger.error("Failed to do action " + action.getDescription() + " for execution " + azkaban.execapp.Trigger.this.execId, e); } } } }
Source:
<code>public void set( String value ) { <START> prefs.put( UserIdStorageFactory.key, value ); <END> }</code><technical_language>sense call flush() force updates persistent store</technical_language>

Target:
public void set( String value ) { prefs.put( UserIdStorageFactory.key, value ); try { prefs.flush(); } catch( BackingStoreException e ) { throw new RuntimeException( e ); } }
Source:
<code>public void writeObject(ObjectOutput output, IndexWorker worker) throws IOException { output.writeObject(worker.cacheName); if (worker.indexedTypes == null) { output.writeInt(0); } else { <START> Set<? extends Class<?>> types = worker.indexedTypes.stream().map(PojoIndexedTypeIdentifier::convertToLegacy).collect(Collectors.toSet()); <END> output.writeInt(types.size()); for (IndexedTypeIdentifier type : worker.indexedTypes) { output.writeObject(PojoIndexedTypeIdentifier.convertToLegacy(type)); } } output.writeBoolean(worker.flush); output.writeBoolean(worker.clean); output.writeBoolean(worker.primaryOwner); output.writeBoolean(worker.skipIndex); output.writeObject(worker.keys); }</code><technical_language>This types is count ? writeObject + convertToLegacy again? surely a mistake</technical_language>

Target:
public void writeObject(ObjectOutput output, IndexWorker worker) throws IOException { output.writeObject(worker.cacheName); if (worker.indexedTypes == null) { output.writeInt(0); } else { output.writeInt(worker.indexedTypes.size()); for (IndexedTypeIdentifier indexedTypeIdentifier : worker.indexedTypes) output.writeObject(PojoIndexedTypeIdentifier.convertToLegacy(indexedTypeIdentifier)); } output.writeBoolean(worker.flush); output.writeBoolean(worker.clean); output.writeBoolean(worker.primaryOwner); output.writeBoolean(worker.skipIndex); output.writeObject(worker.keys); }
Source:
<code>private boolean installationStartedCheck() { try { new WaitUntil(new ShellIsActive("Progress Information"), TimePeriod.LONG); <START> new WaitUntil(new ShellIsActive("Install New Software"), TimePeriod.LONG); <END> } catch (RedDeerException e) { return false; } new NoButton().click(); return true; }</code><technical_language>Instead of ShellIsActive, ShellIsAvailable - safer</technical_language>

Target:
private boolean installationStartedCheck() { try { new WaitUntil(new ShellIsAvailable("Progress Information"), TimePeriod.LONG); new WaitUntil(new ShellIsAvailable("Install New Software"), TimePeriod.LONG); } catch (RedDeerException e) { return false; } new NoButton().click(); return true; }
Source:
<code>private boolean checkBaseDBExist() { <START> File baseFile = mContext.getDatabasePath("base.sqlite3"); <END> return baseFile.isFile(); }</code><technical_language>Please chain expression. need create a variable here</technical_language>

Target:
private boolean checkBaseDBExist() { return mContext.getDatabasePath("base.sqlite3").isFile(); }
Source:
<code>private void setSecurityContext(UserDTO user) { <START> JWTAuthenticatedUser splitUser = new JWTAuthenticatedUser(); <END> splitUser.setFullName(user.getFullName()); splitUser.setId(user.getId()); splitUser.setFriendlyName(user.getFriendlyName()); splitUser.setSubjectName(user.getUsername()); splitUser.getPermissions().add(user.getPermission().getGrantedPermission()); SecurityContextHolder.getContext().setAuthentication(splitUser); SecurityContextHolder.setStrategyName(SecurityContextHolder.MODE_INHERITABLETHREADLOCAL); }</code><technical_language>This variable a copy/paste leftover split developer job</technical_language>

Target:
private void setSecurityContext(UserDTO user) { JWTAuthenticatedUser rwtUploadUser = new JWTAuthenticatedUser(); rwtUploadUser.setFullName(user.getFullName()); rwtUploadUser.setId(user.getId()); rwtUploadUser.setFriendlyName(user.getFriendlyName()); rwtUploadUser.setSubjectName(user.getUsername()); rwtUploadUser.getPermissions().add(user.getPermission().getGrantedPermission()); SecurityContextHolder.getContext().setAuthentication(rwtUploadUser); SecurityContextHolder.setStrategyName(SecurityContextHolder.MODE_INHERITABLETHREADLOCAL); }
Source:
<code>public synchronized boolean deleteMetadataStoreRealm(String realm) { if (_leaderElection.isLeader()) { if (_zkClient.isClosed()) { throw new IllegalStateException("ZkClient is closed!"); } return _zkClient.delete(MetadataStoreRoutingConstants.ROUTING_DATA_PATH + "/" + realm); } <START> String leaderHostName = _leaderElection.getCurrentLeaderInfo().getId(); String url = leaderHostName + "/admin/v2/namespaces/" + _namespace + "/metadata-store-realms/" + realm; <END> HttpDelete deleteRequest = new HttpDelete(url); try { HttpResponse response = _forwardHttpClient.execute(deleteRequest); if (response.getStatusLine().getStatusCode() != 200) { HttpEntity respEntity = response.getEntity(); LOG.error("the forwarded request to leader has failed for deleteMetadataStoreRealm: {}", respEntity != null ? EntityUtils.toString(respEntity) : ""); return false; } } catch (IOException e) { LOG.error("the forwarded request to leader raised an exception for deleteMetadataStoreRealm", e); return false; } return true; }</code><technical_language>refactor</technical_language>

Target:
public synchronized boolean deleteMetadataStoreRealm(String realm) { if (_leaderElection.isLeader()) { if (_zkClient.isClosed()) { throw new IllegalStateException("ZkClient is closed!"); } return deleteZkRealm(realm); } String urlSuffix = constructUrlSuffix(MetadataStoreRoutingConstants.MSDS_GET_ALL_REALMS_ENDPOINT, realm); return forwardRequestToLeader(urlSuffix, HttpConstants.RestVerbs.DELETE, Response.Status.OK.getStatusCode()); }
Source:
<code>public void testChunkedLengthSet() throws Exception { MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); connection.setRequestMethod("POST"); NetHttpRequest request = new NetHttpRequest(connection); InputStream is = NetHttpRequestTest.class.getClassLoader().getResourceAsStream("file.txt"); HttpContent content = new InputStreamContent("text/plain", is); request.setStreamingContent(content); request.setContentEncoding("gzip"); request.execute(); <START> assertEquals(connection.getChunkLength(), 4096); <END> assertNull(request.getRequestProperty("Content-Length")); }</code><technical_language>expected assertEquals(4096, connection.getChunkLength());</technical_language>

Target:
public void testChunkedLengthSet() throws Exception { MockHttpURLConnection connection = new MockHttpURLConnection(new URL(HttpTesting.SIMPLE_URL)); connection.setRequestMethod("POST"); NetHttpRequest request = new NetHttpRequest(connection); InputStream is = NetHttpRequestTest.class.getClassLoader().getResourceAsStream("file.txt"); HttpContent content = new InputStreamContent("text/plain", is); request.setStreamingContent(content); request.setContentEncoding("gzip"); request.execute(); assertEquals(4096, connection.getChunkLength()); assertNull(request.getRequestProperty("Content-Length")); }
Source:
<code>private void showErrorIfEmailInvalid() { <START> if (!mIsValidEmail && mEmailInput.getEditText().getText().length() > 0) { <END> showEmailError(R.string.email_invalid); } }</code><technical_language>@FernandaCG check length of EditText warning get shown activity is loaded? I tested this is behavior I saw. Good job this a bit utilize Boolean object wrapper initial null email validation is done if click next shows warning rotate screen warning disappears want happen</technical_language>

Target:
private void showErrorIfEmailInvalid() { if (mIsValidEmail != null && !mIsValidEmail) { showEmailError(R.string.email_invalid); } }
Source:
<code>public void addNewAuthorization() { <START> if (groups.get(0).getRule() != null) { <END> groups.add(0, new AuthorizationGroupBean()); } }</code><technical_language>if groups is empty this point</technical_language>

Target:
public void addNewAuthorization() { if ((!groups.isEmpty() && groups.get(0).getRule() != null) || groups.isEmpty()) { groups.add(0, new AuthorizationGroupBean()); } }
Source:
<code><START> public void setLevel(LogLevel level) throws IllegalStateException { <END> if(_config == null) { throw new IllegalStateException("Cannot set logging level without a configuration"); } if(level == null) { level = LogLevel.NONE; } if(_level.equals(level)) { return; } _level = level; C4Log.setBinaryFileLevel(level.getValue()); }</code><technical_language>For consistency, declared throw IllegalStateException for null checking. I remove for consistency</technical_language>

Target:
public void setLevel(LogLevel level) { if(_config == null) { throw new IllegalStateException("Cannot set logging level without a configuration"); } if(level == null) { level = LogLevel.NONE; } if(_level.equals(level)) { return; } _level = level; C4Log.setBinaryFileLevel(level.getValue()); }
Source:
<code>public Optional<Color> getUnitColor(final String playerName) { <START> if (unitColors.containsKey(playerName)) { <END> return Optional.ofNullable(unitColors.get(playerName)); } final Color color; try { color = getColorProperty(PROPERTY_UNITS_COLOR_PREFIX + playerName); } catch (final Exception e) { throw new IllegalStateException( "Unit colors must be a 6 digit hex number, eg FF0011: " + playerName); } unitColors.put(playerName, color); return Optional.ofNullable(color); }</code><technical_language>Properties store data in memory in map, is a benefit unitColors cache</technical_language>

Target:
public Optional<Color> getUnitColor(final String playerName) { if (unitColors.containsKey(playerName)) { return Optional.ofNullable(unitColors.get(playerName)); } final Color color = getColorProperty(PROPERTY_UNITS_TRANSFORM_COLOR_PREFIX + playerName); unitColors.put(playerName, color); return Optional.ofNullable(color); }
Source:
<code>private void forceUnlockForLeavingMembers(Set<Object> possibleOwners) { clusteredLockManager.execute(() -> { log.tracef("LOCK[%s] Call force unlock for %s from %s ", getName(), possibleOwners, originator); <START> viewChangeUnlockHappening.set(true); <END> unlock(null, possibleOwners) .whenComplete((unlockResult, ex) -> { log.tracef("LOCK[%s] Force unlock call completed for %s from %s ", getName(), possibleOwners, originator); viewChangeUnlockHappening.set(false); if (ex == null) { log.tracef("LOCK[%s] Force unlock result %b for %s from %s ", getName(), unlockResult, possibleOwners, originator); } else { log.errorf(ex, "LOCK[%s] Unlock failed from node %s", getName(), originator); } retryPendingUnlocks(); retryPendingRequests(); }); } ); }</code><technical_language>This a Log entry</technical_language>

Target:
private void forceUnlockForLeavingMembers(Set<Object> possibleOwners) { clusteredLockManager.execute(() -> { log.tracef("LOCK[%s] Call force unlock for %s from %s ", getName(), possibleOwners, originator); int viewChangeUnlockValue = viewChangeUnlockHappening.incrementAndGet(); log.tracef("LOCK[%s] viewChangeUnlockHappening value in %s ", getName(), viewChangeUnlockValue, originator); unlock(null, possibleOwners) .whenComplete((unlockResult, ex) -> { log.tracef("LOCK[%s] Force unlock call completed for %s from %s ", getName(), possibleOwners, originator); int viewChangeUnlockValueAfterUnlock = viewChangeUnlockHappening.decrementAndGet(); log.tracef("LOCK[%s] viewChangeUnlockHappening value in %s ", getName(), viewChangeUnlockValueAfterUnlock, originator); if (ex == null) { log.tracef("LOCK[%s] Force unlock result %b for %s from %s ", getName(), unlockResult, possibleOwners, originator); } else { log.error(ex, log.unlockFailed(getName(), getOriginator())); } retryPendingRequests(); }); } ); }
Source:
<code>public boolean equals(final Object that) { <START> return this == that || RequestOf.class.equals(that.getClass()); <END> }</code><technical_language>@fanifieiev more check if Requests equals, right</technical_language>

Target:
public boolean equals(final Object that) { return new Unchecked<>( new Or( () -> this == that, new And( () -> that != null, () -> RequestOf.class.equals(that.getClass()), () -> { final RequestOf other = (RequestOf) that; return new And( () -> { final Iterator<String> iter = other.head() .iterator(); return new And( (String hdr) -> hdr.equals(iter.next()), this.head() ).value(); }, () -> new Equality<>( new BytesOf(this.body()), new BytesOf(other.body()) ).value() == 0 ).value(); } ) ) ).value(); }
Source:
<code>public String propertyForUserName(Criteria item, boolean creator) { item.createAlias("creator", "creator"); <START> item.createAlias("lastModifier", "lastModifier"); <END> return creator ? "creator.loginName" : "lastModifier.loginName"; }</code><technical_language>Add "creator" "lastModifier" STANDARD_ALIASES list top of this class. get added criteria in PaginatedDataSource</technical_language>

Target:
public String propertyForUserName(Criteria item, boolean creator) { return creator ? "creator.loginName" : "lastModifier.loginName"; }
Source:
<code>public Operation operationDispatched(Request request, Operation operation) { <START> Name type = getFeatureTypeName(request); <END> FeatureTypeInfo typeInfo = catalog.getFeatureTypeByName(type); if (typeInfo != null) { try { RootBuilder root = JsonLdConfiguration.get() .getTemplate(typeInfo, typeInfo.getName() + ".json"); Map rawKvp = request.getRawKvp(); if (rawKvp.get("CQL_FILTER") != null && rawKvp.get("CQL_FILTER").toString().contains(".") && root != null) { GetFeatureRequest getFeature = GetFeatureRequest.adapt(operation.getParameters()[0]); if (getFeature != null && root != null) { getFeature.getTypeName(); List<Query> queries = getFeature.getQueries(); if (queries != null && queries.size() > 0) { JsonLdPathVisitor visitor = new JsonLdPathVisitor(); for (Query q : queries) { if (q.getFilter() != null) { Filter newFilter = (Filter) q.getFilter().accept(visitor, root); q.setFilter(newFilter); } } } } } } catch (Exception e) { throw new RuntimeException(e); } } return operation; }</code><technical_language>Problematic... check if service is a WFS a features API, request is a GetFeature equivalent in features API, chosen output format is JSON-LD one. check request object (mind for WFS OGC Features API case)</technical_language>

Target:
public Operation operationDispatched(Request request, Operation operation) { FeatureTypeInfo typeInfo = null; GetFeatureRequest getFeature = GetFeatureRequest.adapt(operation.getParameters()[0]); if (getFeature != null) { Map rawKvp = request.getRawKvp(); boolean jump = request.getHttpRequest().getMethod().equalsIgnoreCase("GET") && (rawKvp.get("CQL_FILTER") == null || !rawKvp.get("CQL_FILTER").toString().contains(".")); if (!jump) { for (int i = 0; i < getFeature.getQueries().size(); i++) { Query q = getFeature.getQueries().get(i); QName type = q.getTypeNames().get(0); typeInfo = catalog.getFeatureTypeByName( new NameImpl(type.getPrefix(), type.getLocalPart())); if (typeInfo != null) { try { RootBuilder root = configuration.getTemplate( typeInfo, typeInfo.getName() + ".json"); JsonLdPathVisitor visitor = new JsonLdPathVisitor(); if (q.getFilter() != null) { Filter newFilter = (Filter) q.getFilter().accept(visitor, root); q.setFilter(newFilter); getFeature.getQueries().set(i, q); } } catch (Exception e) { throw new RuntimeException(e); } } } } } return operation; }
Source:
<code>private boolean isRemoveCommandAvailable(List<DiskImage> disks) { <START> if (disks.stream().anyMatch(d -> d.getImageStatus() == ImageStatus.LOCKED)) { return false; } return true; <END> }</code><technical_language>return !disks.stream().anyMatch(d -> d.getImageStatus() == ImageStatus.LOCKED)</technical_language>

Target:
private boolean isRemoveCommandAvailable(List<DiskImage> disks) { return disks.stream().noneMatch(d -> d.getImageStatus() == ImageStatus.LOCKED); }
Source:
<code>public void testWithDefaultIndexCaches() throws Exception { withCacheManager(TestCacheManagerFactory::createClusteredCacheManager, cm -> { Configuration indexConfig = createAsyncIndexConfig(); cm.defineConfiguration(InfinispanIntegration.DEFAULT_INDEXESDATA_CACHENAME, indexConfig); cm.defineConfiguration(InfinispanIntegration.DEFAULT_LOCKING_CACHENAME, indexConfig); cm.defineConfiguration(InfinispanIntegration.DEFAULT_INDEXESMETADATA_CACHENAME, indexConfig); cm.defineConfiguration("userCache", createUserCacheConfig()); Cache<String, Person> userCache = cm.getCache("userCache"); <START> assertValidationExceptionThrown(op -> userCache.put("1", new Person())); <END> }); }</code><technical_language>Unused arg</technical_language>

Target:
public void testWithDefaultIndexCaches() throws Exception { withCacheManager(TestCacheManagerFactory::createClusteredCacheManager, cm -> { Configuration indexConfig = createAsyncIndexConfig(); cm.defineConfiguration(InfinispanIntegration.DEFAULT_INDEXESDATA_CACHENAME, indexConfig); cm.defineConfiguration(InfinispanIntegration.DEFAULT_LOCKING_CACHENAME, indexConfig); cm.defineConfiguration(InfinispanIntegration.DEFAULT_INDEXESMETADATA_CACHENAME, indexConfig); cm.defineConfiguration("userCache", createUserCacheConfig()); Cache<String, Person> userCache = cm.getCache("userCache"); assertValidationExceptionThrown(() -> userCache.put("1", new Person())); }); }
Source:
<code>void validate(final Id id) { if (id == null) { throw new IllegalArgumentException("id is null"); } try { FileValidator.validate(id, repo.src(id)); } catch (IOException e) { throw new OrchestrationException(e); } <START> snooze(); <END> }</code><technical_language>remove this line</technical_language>

Target:
void validate(final Id id) { if (id == null) { throw new IllegalArgumentException("id is null"); } try { DockerfileValidator.validate(id, repo.src(id)); } catch (IOException e) { throw new OrchestrationException(e); } }
Source:
<code>private List<Person> makeActors(Element cast) { List<Person> people = new ArrayList<>(); <START> Elements actors = cast.getChildElements("actor"); <END> for (int i = 0; i < actors.size(); i++) { Element actor = actors.get(i); people.add(makeActor(actor)); } return people; }</code><technical_language>ditto & code</technical_language>

Target:
private List<Person> makeActors(Element cast) { List<Person> people = Lists.newArrayList(); Elements actors = cast.getChildElements(ACTOR); for (int i = 0; i < actors.size(); i++) { Element actor = actors.get(i); people.add(makeActor(actor)); } return people; }
Source:
<code>public Subject createSubject(String sd) { <START> return delegator.createSubject(sd); <END> }</code><technical_language>Include TRACE changes 1.2 branch</technical_language>

Target:
public Subject createSubject(String sd) { Subject subject = delegator.createSubject(sd); if (trace) { log.trace("Subject=" + subject); log.trace("Subject identity=" + Integer.toHexString(System.identityHashCode(subject))); } return subject; }
Source:
<code>private static void checkConfiguration() { if (repositories.size() > 0 && !cfg.isHistoryEnabled()) { <START> System.out.println("Repositories were specified however history is off"); <END> System.exit(1); } }</code><technical_language>die()</technical_language>

Target:
private static void checkConfiguration() { if (repositories.size() > 0 && !cfg.isHistoryEnabled()) { die("Repositories were specified however history is off"); } }