auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> public Map getGuestOsInto(){ <END> Map resultMap = map(); resultMap.put("kernel","2.6.32-642.el6.x86_64"); resultMap.put("type", "linux"); resultMap.put("version", "6.7"); resultMap.put("arch", "x86_64"); resultMap.put("codename", "Santiago"); resultMap.put("distribution", "Red Hat Enterprise Linux Server"); return resultMap; }</code><technical_language>is ok private please generic types for map</technical_language>

Target:
private <T, U> Map<T, U> getGuestOsInto(){ Map resultMap = map(); resultMap.put("kernel","2.6.32-642.el6.x86_64"); resultMap.put("type", "linux"); resultMap.put("version", "6.7"); resultMap.put("arch", "x86_64"); resultMap.put("codename", "Santiago"); resultMap.put("distribution", "Red Hat Enterprise Linux Server"); return resultMap; }
Source:
<code>public void testValidateOverlapWithOtherPools( String range1From, String range1To, String range2From, String range2To, boolean overlapping) { MacRange range1 = new MacRange(); range1.setMacFrom(range1From); range1.setMacTo(range1To); MacRange range2 = new MacRange(); range2.setMacFrom(range2From); range2.setMacTo(range2To); <START> command.getParameters().getMacPool().setId(Guid.newGuid()); command.getParameters().getMacPool().setName("p1"); <END> command.getParameters().getMacPool().setRanges(Collections.singletonList(range1)); MacPool macPool2 = new MacPool(); macPool2.setId(Guid.newGuid()); macPool2.setName("p2"); macPool2.setRanges(Collections.singletonList(range2)); when(macPoolDao.getAll()).thenReturn(Collections.singletonList(macPool2)); MacPool oldMacPool = new MacPool(); oldMacPool.setId(Guid.newGuid()); when(macPoolDao.get(any())).thenReturn(oldMacPool); when(macPoolPerCluster.isDuplicateMacAddressesAllowed(any())).thenReturn(false); assertEquals(!overlapping, command.validate()); }</code><technical_language>I this lines required, mind</technical_language>

Target:
public void testValidateOverlapWithOtherPools( String range1From, String range1To, String range2From, String range2To, boolean overlapping) { MacRange range1 = new MacRange(); range1.setMacFrom(range1From); range1.setMacTo(range1To); MacRange range2 = new MacRange(); range2.setMacFrom(range2From); range2.setMacTo(range2To); command.getParameters().getMacPool().setRanges(Collections.singletonList(range1)); MacPool macPool2 = new MacPool(); macPool2.setId(Guid.newGuid()); macPool2.setName("p2"); macPool2.setRanges(Collections.singletonList(range2)); when(macPoolDao.getAll()).thenReturn(Collections.singletonList(macPool2)); MacPool oldMacPool = new MacPool(); oldMacPool.setId(Guid.newGuid()); when(macPoolDao.get(any())).thenReturn(oldMacPool); when(macPoolPerCluster.isDuplicateMacAddressesAllowed(any())).thenReturn(false); assertEquals(!overlapping, command.validate()); }
Source:
<code>protected boolean shouldSkip() { if (super.shouldSkip()) { return true; } String principal = null; <START> InstancedConfiguration conf = InstancedConfiguration.defaults(); <END> if (conf.isSet(mPrincipalProperty)) { principal = conf.get(mPrincipalProperty); } if (principal == null || principal.isEmpty()) { System.out.format("Skip validation for secure HDFS. %s is not specified.%n", PRINCIPAL_MAP.get(mProcess).getName()); return true; } return false; }</code><technical_language>pass in conf object</technical_language>

Target:
protected boolean shouldSkip() { if (super.shouldSkip()) { return true; } String principal = null; if (mConf.isSet(mPrincipalProperty)) { principal = mConf.get(mPrincipalProperty); } if (principal == null || principal.isEmpty()) { System.out.format("Skip validation for secure HDFS. %s is not specified.%n", PRINCIPAL_MAP.get(mProcess).getName()); return true; } return false; }
Source:
<code>private void parseAndInitializeRegkeyFromRequest() { <START> String regkeyFromRequest = getRequestParamValue(Const.ParamsNames.REGKEY); <END> if (regkeyFromRequest != null && regkeyFromRequest.contains("${amp}" + Const.ParamsNames.NEXT_URL + "=")) { String[] split = regkeyFromRequest.split("\\$\\{amp\\}" + Const.ParamsNames.NEXT_URL + "="); regkey = split[0]; nextUrlFromRegkey = SanitizationHelper.desanitizeFromNextUrl(split[1]); } else { regkey = regkeyFromRequest; nextUrlFromRegkey = null; } }</code><technical_language>getRegKeyFromRequest here</technical_language>

Target:
private void parseAndInitializeRegkeyFromRequest() { String regkeyFromRequest = getRegkeyFromRequest(); boolean isNextParamInRegkey = regkeyFromRequest != null && regkeyFromRequest.contains("${amp}" + Const.ParamsNames.NEXT_URL + "="); if (isNextParamInRegkey) { String[] split = regkeyFromRequest.split("\\$\\{amp\\}" + Const.ParamsNames.NEXT_URL + "="); regkey = split[0]; nextUrlFromRegkey = SanitizationHelper.desanitizeFromNextUrl(split[1]); } else { regkey = regkeyFromRequest; nextUrlFromRegkey = null; } }
Source:
<code>public void loadsFromDbOnCacheMissTest() throws Exception { EventTypeCache etc = new EventTypeCache(dbRepo, client); EventType et = buildEventType(); Mockito .doReturn(et) .when(dbRepo) .findByName(et.getName()); <START> etc.get(et.getName()); <END> etc.get(et.getName()); verify(dbRepo, times(1)).findByName(et.getName()); }</code><technical_language>I check cache returned correct event type (first time time)</technical_language>

Target:
public void loadsFromDbOnCacheMissTest() throws Exception { final EventTypeCache etc = new EventTypeCache(dbRepo, client); final EventType et = buildEventType(); Mockito .doReturn(et) .when(dbRepo) .findByName(et.getName()); assertThat(etc.get(et.getName()), equalTo(et)); assertThat(etc.get(et.getName()), equalTo(et)); verify(dbRepo, times(1)).findByName(et.getName()); }
Source:
<code>private String getBody() throws IOException { String jobID = jobState.getId().value(); String status = jobState.getStatus().toString(); String hostname = "UNKNOWN"; List<TaskState> tasks = jobState.getTasks(); String allTaskStatusesString = String.join(System.lineSeparator(), tasks.stream() .map(task -> task.getId().getReadableName() + " (" + task.getId().toString() + ") Status: " + task.getStatus().toString()) .collect(Collectors.toList())); try { hostname = InetAddress.getLocalHost().getCanonicalHostName(); } catch (UnknownHostException e) { logger.debug("Could not get hostname", e); } final Properties properties = EmailConfiguration.getConfiguration().getProperties(); String templatePath = properties.getProperty(EmailConfiguration.TEMPLATE_PATH); <START> String bodyTemplate = new String(Files.readAllBytes(Paths.get(PASchedulerProperties.getAbsolutePath(templatePath)))); <END> return String.format(bodyTemplate, jobID, status, allTaskStatusesString, hostname); }</code><technical_language>Files.toString(file, Charset.defaultCharset())</technical_language>

Target:
private String getBody() throws IOException { String jobID = jobState.getId().value(); String status = jobState.getStatus().toString(); String hostname = "UNKNOWN"; List<TaskState> tasks = jobState.getTasks(); String allTaskStatusesString = String.join(System.lineSeparator(), tasks.stream() .map(task -> task.getId().getReadableName() + " (" + task.getId().toString() + ") Status: " + task.getStatus().toString()) .collect(Collectors.toList())); try { hostname = InetAddress.getLocalHost().getCanonicalHostName(); } catch (UnknownHostException e) { logger.debug("Could not get hostname", e); } final Properties properties = EmailConfiguration.getConfiguration().getProperties(); String templatePath = properties.getProperty(EmailConfiguration.TEMPLATE_PATH); String bodyTemplate = Files.toString(new File(PASchedulerProperties.getAbsolutePath(templatePath)), Charset.defaultCharset()); Map<String, String> values = new HashMap<>(); values.put("JOB_ID", jobID); values.put("JOB_STATUS", status); values.put("JOB_TASKS", allTaskStatusesString); values.put("HOST_NAME", hostname); String emailBody = StrSubstitutor.replace(bodyTemplate, values, "%", "%"); return emailBody; }
Source:
<code>private void writeRecordsToFile ( final List<SAMRecord> recs, final File targetFile, final File referenceFile, <START> final SAMFileHeader samHeader) throws IOException { <END> try (final SAMFileWriter writer = new SAMFileWriterFactory() .makeWriter(samHeader, true, targetFile, referenceFile)) { for (SAMRecord rec : recs) { writer.addAlignment(rec); } } }</code><technical_language>remove 'throws IOException'</technical_language>

Target:
private void writeRecordsToFile ( final List<SAMRecord> recs, final File targetFile, final File referenceFile, final SAMFileHeader samHeader) { try (final SAMFileWriter writer = new SAMFileWriterFactory() .makeWriter(samHeader, true, targetFile, referenceFile)) { for (SAMRecord rec : recs) { writer.addAlignment(rec); } } }
Source:
<code>public boolean mightContain(Write write) { Locks.lockIfCondition(pageLock.readLock(), this == currentPage); try { <START> boolean mightContain; <END> Type valueType = write.getValue().getType(); if (filter.mightContain(write.getRecord(), write.getKey(), write.getValue())) { mightContain = true; } else if (valueType == Type.STRING) { mightContain = filter.mightContain( write.getRecord(), write.getKey(), Value.wrap(Convert.javaToThrift(Tag .create((String) write.getValue() .getObject())))); } else if (valueType == Type.TAG) { mightContain = filter.mightContain( write.getRecord(), write.getKey(), Value.wrap(Convert.javaToThrift(write .getValue().getObject().toString()))); } else { mightContain = false; } return mightContain; } finally { Locks.unlockIfCondition(pageLock.readLock(), this == currentPage); } }</code><technical_language>note returning inline</technical_language>

Target:
public boolean mightContain(Write write) { Locks.lockIfCondition(pageLock.readLock(), this == currentPage); try { Type valueType = write.getValue().getType(); if (filter.mightContain(write.getRecord(), write.getKey(), write.getValue())) { return true; } else if (valueType == Type.STRING) { return filter.mightContain( write.getRecord(), write.getKey(), Value.wrap(Convert.javaToThrift(Tag .create((String) write.getValue() .getObject())))); } else if (valueType == Type.TAG) { return filter.mightContain( write.getRecord(), write.getKey(), Value.wrap(Convert.javaToThrift(write .getValue().getObject().toString()))); } else { return false; } } finally { Locks.unlockIfCondition(pageLock.readLock(), this == currentPage); } }
Source:
<code><START> public UUID getUniqueId() { <END> Entity spongeEntity = (Entity)this; net.minecraft.entity.Entity thisEntity = (net.minecraft.entity.Entity)spongeEntity; return thisEntity.getUniqueID(); }</code><technical_language>@Override this method implement method interface obfuscation get srg name. Please consult [the mixin examples](<LINK_0> for deal conflicting methods **same** signature/name. _EDIT: mind, I noticed MCP name uppercase "ID" while sponge method Pascal-cased "Id" fine._</technical_language>

Target:
public UUID getUniqueId() { return this.getUniqueID(); }
Source:
<code>private FutureVDSCall<VDSReturnValue> invokeSetupNetworksCommand(int timeout) { final HostSetupNetworksVdsCommandParameters parameters = createSetupNetworksParameters(timeout); FutureVDSCall<VDSReturnValue> setupNetworksTask = getVdsBroker().runFutureVdsCommand(FutureVDSCommandType.HostSetupNetworks, parameters); if (parameters.isRollbackOnFailure()) { HostSetupNetworkPoller poller = new HostSetupNetworkPoller(); <START> boolean taskCompleted = poller.pollWhileWaitingForTaskCompletionWithDefaultTimeout(setupNetworksTask, getVdsId()); <END> if (!taskCompleted) { throw new RuntimeException("Give up waiting for task to complete"); } } return setupNetworksTask; }</code><technical_language>'DefaultTimeout' means wait max 2 minutes. regular ConfigValues.vdsTimeout timeout is 180 seconds. decided 120 seconds (2 minutes)? Dan solution is ConfigValues.setupNetworksTimeout default 180 seconds adding capability configure engine config (there some users asked for it). engine config change done in a separate patch</technical_language>

Target:
private FutureVDSCall<VDSReturnValue> invokeSetupNetworksCommand(int timeout) { final HostSetupNetworksVdsCommandParameters parameters = createSetupNetworksParameters(timeout); FutureVDSCall<VDSReturnValue> setupNetworksTask = getVdsBroker().runFutureVdsCommand(FutureVDSCommandType.HostSetupNetworks, parameters); if (parameters.isRollbackOnFailure()) { HostSetupNetworkPoller poller = new HostSetupNetworkPoller(); boolean taskCompleted = poller.pollWhileWaitingForTaskCompletion(setupNetworksTask, getVdsId(), TimeUnit.MINUTES.toMillis(3)); if (!taskCompleted) { throw new RuntimeException("Give up waiting for task to complete"); } } return setupNetworksTask; }
Source:
<code><START> public long getIgnoredPlayerTimeout(UUID uuid) { <END> return ignoredPlayerTimeouts.get(uuid); }</code><technical_language>Style fix suggestion public long getIgnoredPlayerTimeout(UUID uuid) {</technical_language>

Target:
public Long getIgnoredPlayerTimeout(UUID uuid) { return ignoredPlayerTimeouts.get(uuid); }
Source:
<code>public static void main(String[] args) throws Exception { <START> String mode = args[0]; <END> Map<String,Object> configMap = Util.createConfig(args); TStream<Bargain> bargains = createVwapTopology(); bargains.print(); StreamsContext<?> sc = StreamsContextFactory.getStreamsContext(mode); sc.submit(bargains.topology(), configMap).get(); }</code><technical_language>context type is a 'type', a 'mode'</technical_language>

Target:
public static void main(String[] args) throws Exception { String type = args[0]; Map<String,Object> configMap = Util.createConfig(args); TStream<Bargain> bargains = createVwapTopology(); bargains.print(); StreamsContext<?> sc = StreamsContextFactory.getStreamsContext(type); sc.submit(bargains.topology(), configMap).get(); }
Source:
<code>public void run() { try { while (isOpen.get()) { List<RequestInfo> requestInfoList = pollForRequests(); List<ResponseInfo> responseInfoList = networkClient.sendAndPoll(requestInfoList); onResponse(responseInfoList); } } catch (Exception e) { logger.error("RequestResponseHandlerThread received exception: ", e); } finally { networkClient.close(); shutDownLatch.countDown(); <START> cleanup(); <END> } }</code><technical_language>If is possible, try restructure this a bit is a more intuitive</technical_language>

Target:
public void run() { try { while (isOpen.get()) { List<RequestInfo> requestInfoList = pollForRequests(); List<ResponseInfo> responseInfoList = networkClient.sendAndPoll(requestInfoList); onResponse(responseInfoList); } } catch (Exception e) { logger.error("Aborting, as requestResponseHandlerThread received an exception: ", e); } finally { networkClient.close(); shutDownLatch.countDown(); doClose(); } }
Source:
<code>public Format getFormat(String formatName) { <START> for (FormatType mFormatType : mFormatTypes) { <END> for (Format format : mFormatType.getFormatList()) { if(format.getName().equals(formatName)) { return format; } } } return null; }</code><technical_language>mFormatType is a member variable btw</technical_language>

Target:
public Format getFormat(String formatName) { for (FormatType formatType : mFormatTypes) { for (Format format : formatType.getFormatList()) { if(format.getName().equals(formatName)) { return format; } } } return null; }
Source:
<code>public int markAsAuthoritative(final Path dest, final BulkOperationState operationState) throws IOException { if (operationState == null) { return 0; } <START> AncestorState state = (AncestorState)operationState; <END> final String simpleDestKey = pathToParentKey(dest); final String destPathKey = simpleDestKey + "/"; final String opId = AncestorState.stateAsString(state); LOG.debug("{}: marking directories under as authoritative", opId, destPathKey); final List<DDBPathMetadata> dirsToUpdate = new ArrayList<>(); synchronized (state) { for (Map.Entry<Path, DDBPathMetadata> entry : state.getAncestry().entrySet()) { final Path path = entry.getKey(); final DDBPathMetadata md = entry.getValue(); final String key = pathToParentKey(path); if (md.getFileStatus().isDirectory() && (key.equals(simpleDestKey) || key.startsWith(destPathKey))) { md.setAuthoritativeDir(true); md.setLastUpdated(ttlTimeProvider.getNow()); LOG.debug("{}: added {}", opId, key); dirsToUpdate.add(md); } } processBatchWriteRequest(state, null, pathMetadataToItem(dirsToUpdate)); } return dirsToUpdate.size(); }</code><technical_language>nit:space</technical_language>

Target:
public int markAsAuthoritative( final Path dest, final BulkOperationState operationState) throws IOException { if (operationState == null) { return 0; } Preconditions.checkArgument(operationState instanceof AncestorState, "Not an AncestorState %s", operationState); final AncestorState state = (AncestorState)operationState; final String simpleDestKey = pathToParentKey(dest); final String destPathKey = simpleDestKey + "/"; final String opId = AncestorState.stateAsString(state); LOG.debug("{}: marking directories under as authoritative", opId, destPathKey); final List<DDBPathMetadata> dirsToUpdate = new ArrayList<>(); synchronized (state) { for (Map.Entry<Path, DDBPathMetadata> entry : state.getAncestry().entrySet()) { final Path path = entry.getKey(); final DDBPathMetadata md = entry.getValue(); final String key = pathToParentKey(path); if (md.getFileStatus().isDirectory() && (key.equals(simpleDestKey) || key.startsWith(destPathKey))) { md.setAuthoritativeDir(true); md.setLastUpdated(ttlTimeProvider.getNow()); LOG.debug("{}: added {}", opId, key); dirsToUpdate.add(md); } } processBatchWriteRequest(state, null, pathMetadataToItem(dirsToUpdate)); } return dirsToUpdate.size(); }
Source:
<code>public Signature getCoercion(Type fromType, Type toType) { try { return globalFunctionNamespace.getCoercion(fromType, toType); } <START> catch (PrestoException e) { <END> if (!(e instanceof OperatorNotFoundException)) { throw e; } } throw new OperatorNotFoundException(OperatorType.CAST, ImmutableList.of(fromType.getTypeSignature()), toType.getTypeSignature()); }</code><technical_language>I this simplified java catch (OperatorNotFoundException e) { throw new OperatorNotFoundException(...); }</technical_language>

Target:
public Signature getCoercion(Type fromType, Type toType) { return getCoercion(fromType.getTypeSignature(), toType.getTypeSignature()); }
Source:
<code>private void holdExistingPartialPools(final Collection<Run> runs, final Collection<Pool<LibraryDilution>> pools) throws IOException { for (Run newRun : runs) { if (newRun.getSequencerPartitionContainers().size() != 1) { throw new IOException(String.format("Migrating run %s has unexpected number of sequencerPartitionContainers (%d)", newRun.getAlias(), newRun.getSequencerPartitionContainers().size())); } Run existingRun = serviceManager.getRunDao().getByAlias(newRun.getAlias()); if (existingRun != null) { if (existingRun.getSequencerPartitionContainers().size() != 1) { throw new IOException(String.format("Existing run %s has unexpected number of sequencerPartitionContainers (%d)", existingRun.getAlias(), existingRun.getSequencerPartitionContainers().size())); } SequencerPartitionContainer<SequencerPoolPartition> existingLanes = existingRun.getSequencerPartitionContainers().get(0); for (SequencerPoolPartition newLane : newRun.getSequencerPartitionContainers().get(0).getPartitions()) { Pool<?> existingPool = null; <START> for (SequencerPoolPartition lane : existingLanes.getPartitions()) { <END> if (lane.getPartitionNumber() == newLane.getPartitionNumber()) { existingPool = lane.getPool(); } } if (newLane.getPool() != null && existingPool != null) { log.debug(String.format("Holding pool %s from run %s lane %d to merge with existing pool", newLane.getPool().getAlias(), newRun.getAlias(), newLane.getPartitionNumber())); pools.remove(newLane.getPool()); } } } } }</code><technical_language>this existingLane symmetry of names</technical_language>

Target:
private void holdExistingPartialPools(final Collection<Run> runs, final Collection<Pool<LibraryDilution>> pools) throws IOException { for (Run newRun : runs) { if (newRun.getSequencerPartitionContainers().size() != 1) { throw new IOException(String.format("Migrating run %s has unexpected number of sequencerPartitionContainers (%d)", newRun.getAlias(), newRun.getSequencerPartitionContainers().size())); } Run existingRun = serviceManager.getRunDao().getByAlias(newRun.getAlias()); if (existingRun != null) { if (existingRun.getSequencerPartitionContainers().size() != 1) { throw new IOException(String.format("Existing run %s has unexpected number of sequencerPartitionContainers (%d)", existingRun.getAlias(), existingRun.getSequencerPartitionContainers().size())); } SequencerPartitionContainer<SequencerPoolPartition> existingLanes = existingRun.getSequencerPartitionContainers().get(0); for (SequencerPoolPartition newLane : newRun.getSequencerPartitionContainers().get(0).getPartitions()) { Pool<?> existingPool = null; for (SequencerPoolPartition existingLane : existingLanes.getPartitions()) { if (existingLane.getPartitionNumber() == newLane.getPartitionNumber()) { existingPool = existingLane.getPool(); } } if (newLane.getPool() != null && existingPool != null) { log.debug(String.format("Holding pool %s from run %s lane %d to merge with existing pool", newLane.getPool().getAlias(), newRun.getAlias(), newLane.getPartitionNumber())); pools.remove(newLane.getPool()); } } } } }
Source:
<code>public void testGetJobOutput() throws IOException { <START> assertThat(ByteSources.asByteSource(api.getJobOutput(VAULT_NAME, archiveRetrievalJob).openStream())) <END> .hasSameContentAs(buildData(PART_SIZE * 2 * MiB)); }</code><technical_language>ByteSources.asByteSource is kind of a dangerous method I remove it. breaks contract of ByteSource specifies openStream produce multiple independent streams. rewrite this assertThat(InputStream).hasSameContentAs instead? This require some verbosity close InputStream move Java 7 this read well</technical_language>

Target:
public void testGetJobOutput() throws IOException { Closer closer = Closer.create(); try { InputStream inputStream = closer.register(api.getJobOutput(VAULT_NAME, archiveRetrievalJob).openStream()); InputStream expectedInputStream = closer.register(buildData(PART_SIZE * 2 * MiB).openStream()); assertThat(inputStream).hasContentEqualTo(expectedInputStream); } finally { closer.close(); } }
Source:
<code>void fetchReplies(Long topicId2, final long start, final long count) { ForumService service = ServiceCreator.createForumService(); final GetRepliesRequest input = new GetRepliesRequest(); input.accessCode = ACCESS_CODE; input.session = SessionController.get().getSessionForApiCall(); input.topic = new Topic(); input.topic.id = topicId; final Pager pager = new Pager(); pager.count = count; <START> pager.start = start == 0 ? 0 : start - 1; <END> pager.sortDirection = SortDirectionType.SortDirectionTypeAscending; pager.sortBy = "created"; input.pager = pager; service.getReplies(input, new AsyncCallback<GetRepliesResponse>() { @Override public void onSuccess(GetRepliesResponse output) { if (output.status == StatusType.StatusTypeSuccess) { if (output.replies != null) { replies.addAll(output.replies); long i = start == 0 ? 1 : start; for (Reply reply : output.replies) { Topic topic = input.topic; int replyId = reply.id.intValue(); addForumMessage((int) i, reply, topic, replyId); i++; } } } EventController.get().fireEventFromSource(new GetRepliesSuccess(input, output), replyController); } @Override public void onFailure(Throwable caught) { EventController.get().fireEventFromSource(new GetRepliesFailure(input, caught), replyController); } }); }</code><technical_language>rely auto-boxing</technical_language>

Target:
void fetchReplies(Long topicId2, final long start, final long count) { ForumService service = ServiceCreator.createForumService(); final GetRepliesRequest input = new GetRepliesRequest(); input.accessCode = ACCESS_CODE; input.session = SessionController.get().getSessionForApiCall(); input.topic = new Topic(); input.topic.id = topicId; final Pager pager = new Pager(); pager.count = count; pager.start = start == 0 ? Long.valueOf(0) : Long.valueOf(start - 1); pager.sortDirection = SortDirectionType.SortDirectionTypeAscending; pager.sortBy = "created"; input.pager = pager; service.getReplies(input, new AsyncCallback<GetRepliesResponse>() { @Override public void onSuccess(GetRepliesResponse output) { if (output.status == StatusType.StatusTypeSuccess) { if (output.replies != null) { replies.addAll(output.replies); long i = start == 0 ? Long.valueOf(1) : Long.valueOf(start); for (Reply reply : output.replies) { Topic topic = input.topic; int replyId = reply.id.intValue(); addForumMessage((int) i, reply, topic, replyId); i++; } } } EventController.get().fireEventFromSource(new GetRepliesSuccess(input, output), replyController); } @Override public void onFailure(Throwable caught) { EventController.get().fireEventFromSource(new GetRepliesFailure(input, caught), replyController); } }); }
Source:
<code>BundleContext getBundleContext() { Bundle bundle = FrameworkUtil.getBundle(CatalogServiceImpl.class); <START> return bundle.getBundleContext(); <END> }</code><technical_language>I this copied original endpoint bundle null (although unlikely)</technical_language>

Target:
BundleContext getBundleContext() { Bundle bundle = FrameworkUtil.getBundle(CatalogServiceImpl.class); return bundle == null ? null : bundle.getBundleContext(); }
Source:
<code><START> static List<EntryElement> makeEntryElementList(Object... value) { <END> List<EntryElement> valueElements = new ArrayList<EntryElement>(); for (Object o : value) { Class<?> type = ClassUtils.primitiveToWrapper(o.getClass()); EntryElement entryElement = new EntryElement(type.getName(), o.toString()); valueElements.add(entryElement); } return valueElements; }</code><technical_language>public</technical_language>

Target:
public static List<EntryElement> makeEntryElementList(Object... value) { List<EntryElement> valueElements = new ArrayList<EntryElement>(); for (Object o : value) { Class<?> type = ClassUtils.primitiveToWrapper(o.getClass()); EntryElement entryElement = new EntryElement(type.getName(), o.toString()); valueElements.add(entryElement); } return valueElements; }
Source:
<code>public String getDescription() { final String desc = getGenericFieldValue("Description"); <START> return ( StringUtil.isBlank(desc) ? getID() : desc ); <END> }</code><technical_language>I this logic in htsjdk. getDescription() return null blank if decription. user choose do information</technical_language>

Target:
public String getDescription() { return getGenericFieldValue("Description"); }
Source:
<code>public void break_in_try_finally() { final CFG cfg = buildCFG("void fun() { while (foo()) {\n" + " try {\n" + " bar(\"try\");\n" + " break;\n" + " } finally {\n" + " qix(\"finally\");\n" + " }\n" + " }}"); final CFGChecker cfgChecker = checker( block( element(IDENTIFIER, "foo"), element(METHOD_INVOCATION) ).terminator(WHILE_STATEMENT).successors(0, 4), block(element(TRY_STATEMENT)).successors(3), block( element(Tree.Kind.IDENTIFIER, "bar"), element(STRING_LITERAL, "try"), element(METHOD_INVOCATION) ).successors(2).exceptions(1), <START> new BlockChecker(BREAK_STATEMENT, 1).hasNoExitBlock(), <END> block(element(IDENTIFIER, "qix"), element(STRING_LITERAL, "finally"), element(METHOD_INVOCATION) ).successors(0) ); cfgChecker.check(cfg); }</code><technical_language>I prefer terminator(BREAK_STATEMENT, 1).hasNoExitBlock() instead, in order stay closer syntax in other tests</technical_language>

Target:
public void break_in_try_finally() { final CFG cfg = buildCFG("void fun() { while (foo()) {\n" + " try {\n" + " bar(\"try\");\n" + " break;\n" + " } finally {\n" + " qix(\"finally\");\n" + " }\n" + " }}"); final CFGChecker cfgChecker = checker( block( element(IDENTIFIER, "foo"), element(METHOD_INVOCATION) ).terminator(WHILE_STATEMENT).successors(0, 4), block(element(TRY_STATEMENT)).successors(3), block( element(Tree.Kind.IDENTIFIER, "bar"), element(STRING_LITERAL, "try"), element(METHOD_INVOCATION) ).successors(2).exceptions(1), terminator(BREAK_STATEMENT, 1).hasNoExitBlock(), block(element(IDENTIFIER, "qix"), element(STRING_LITERAL, "finally"), element(METHOD_INVOCATION) ).successors(0) ); cfgChecker.check(cfg); }
Source:
<code><START> public String fileName() { <END> return null; }</code><technical_language>@Override this line</technical_language>

Target:
@Override public String fileName() { return null; }
Source:
<code>public Dialog onCreateDialog(Bundle savedInstanceState) { StringBuilder message = new StringBuilder(); String regionName = Application.get().getCurrentRegion().getName(); message.append(getResources().getString(R.string.region_dialog_Message2, regionName)).append("?"); AlertDialog dialog = new AlertDialog.Builder(getActivity()) .setMessage(message.toString()) .setPositiveButton("YES", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { ((ReportActivity) getActivity()).createIssueTypeListFragment(); } }) .setNegativeButton("NO", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { closeSuperActivity(); <START> ((ReportActivity) getActivity()).createPreferencesActivity(); <END> } }).create(); dialog.setCanceledOnTouchOutside(false); return dialog; }</code><technical_language>@cagryInside This transition is currently a abrupt for users if answer "no". For example, assume I physically in Seattle. I tap "Send feedback", app asks (for a reason unknown user) "Are in Tampa Bay?" I tap "No", suddenly Preferences. I why. I tap submitting issue, this again. add a dialog in PreferenceActivity is shown if user is directed PreferencesActivity this screen (we pass a variable Intent trigger this). title of "Check Region", a single "Ok" button, text "Your region is currently set (regionName), located in (regionName). Please tap 'Your Region" change correct region"</technical_language>

Target:
public Dialog onCreateDialog(Bundle savedInstanceState) { StringBuilder message = new StringBuilder(); String regionName = Application.get().getCurrentRegion().getName(); message.append(getResources().getString(R.string.region_dialog_message, regionName)).append("?"); AlertDialog dialog = new AlertDialog.Builder(getActivity()) .setMessage(message.toString()) .setPositiveButton("YES", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { ((ReportActivity) getActivity()).createIssueTypeListFragment(); } }) .setNegativeButton("NO", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { closeSuperActivity(); ((ReportActivity) getActivity()).createPreferencesActivity(); } }).create(); dialog.setCanceledOnTouchOutside(false); return dialog; }
Source:
<code>private Blob getBlobFromMCCIIN000002UV01(final MCCIIN000002UV01 ack) { Blob asyncMessage = null; try { final JAXBContextHandler oHandler = new JAXBContextHandler(); final JAXBContext jc = oHandler.getJAXBContext("org.hl7.v3"); final Marshaller marshaller = jc.createMarshaller(); final ByteArrayOutputStream baOutStrm = new ByteArrayOutputStream(); baOutStrm.reset(); final org.hl7.v3.ObjectFactory factory = new org.hl7.v3.ObjectFactory(); final PIXConsumerMCCIIN000002UV01RequestType request = factory .createPIXConsumerMCCIIN000002UV01RequestType(); request.setMCCIIN000002UV01(ack); final JAXBElement<PIXConsumerMCCIIN000002UV01RequestType> oJaxbElement = factory .createPIXConsumerMCCIIN000002UV01Request(request); baOutStrm.close(); marshaller.marshal(oJaxbElement, baOutStrm); final byte[] buffer = baOutStrm.toByteArray(); <START> asyncMessage = getSession().getLobHelper().createBlob(buffer); <END> } catch (final Exception e) { LOG.error("Exception during Blob conversion :" + e.getMessage(), e); } return asyncMessage; }</code><technical_language>Do need release session</technical_language>

Target:
private Blob getBlobFromMCCIIN000002UV01(final MCCIIN000002UV01 ack) { Blob asyncMessage = null; try { final JAXBContextHandler oHandler = new JAXBContextHandler(); final JAXBContext jc = oHandler.getJAXBContext("org.hl7.v3"); final Marshaller marshaller = jc.createMarshaller(); final ByteArrayOutputStream baOutStrm = new ByteArrayOutputStream(); baOutStrm.reset(); final org.hl7.v3.ObjectFactory factory = new org.hl7.v3.ObjectFactory(); final PIXConsumerMCCIIN000002UV01RequestType request = factory .createPIXConsumerMCCIIN000002UV01RequestType(); request.setMCCIIN000002UV01(ack); final JAXBElement<PIXConsumerMCCIIN000002UV01RequestType> oJaxbElement = factory .createPIXConsumerMCCIIN000002UV01Request(request); baOutStrm.close(); marshaller.marshal(oJaxbElement, baOutStrm); final byte[] buffer = baOutStrm.toByteArray(); asyncMessage = getSession().getLobHelper().createBlob(buffer); getSession().close(); } catch (final Exception e) { LOG.error("Exception during Blob conversion :" + e.getMessage(), e); } return asyncMessage; }
Source:
<code>public OffsetDateTime getExpiresOn() { <START> if (this.expiresOn == null) { <END> return null; } return this.expiresOn; }</code><technical_language>If want return null, if is null, need this check</technical_language>

Target:
public OffsetDateTime getExpiresOn() { return this.expiresOn; }
Source:
<code>public Authentication getGerritAuthentication() { <START> return new Authentication(gerritAuthKeyFile, gerritUserName, Secret.toString(gerritAuthKeyFilePassword)); <END> }</code><technical_language>I guess simplified getGerritAuthKeyFilePassword() here</technical_language>

Target:
public Authentication getGerritAuthentication() { return new Authentication(gerritAuthKeyFile, gerritUserName, getGerritAuthKeyFilePassword()); }
Source:
<code>public void shouldBeCaseInSensitiveOfColumnAndPropertyNames() throws Exception { expect(resultSetMetaData.getColumnCount()).andReturn(1).anyTimes(); expect(resultSetMetaData.getColumnLabel(1)).andReturn("LoNgfielD"); replay(resultSetMetaData); expect(ctx.columnMapperFor(Long.class)).andReturn(LongColumnMapper.WRAPPER); replay(ctx); expect(resultSet.getMetaData()).andReturn(resultSetMetaData); Long aLongVal = 100l; expect(resultSet.getLong(1)).andReturn(aLongVal); expect(resultSet.wasNull()).andReturn(false); replay(resultSet); SampleBean sampleBean = mapper.map(0, resultSet, ctx); <START> assertSame(aLongVal, sampleBean.getLongField()); <END> }</code><technical_language>assertSame unintentionally tests Long cache, if mistaken... is assertEquals better</technical_language>

Target:
public void shouldBeCaseInSensitiveOfColumnAndPropertyNames() throws Exception { expect(resultSetMetaData.getColumnCount()).andReturn(1).anyTimes(); expect(resultSetMetaData.getColumnLabel(1)).andReturn("LoNgfielD"); replay(resultSetMetaData); expect(ctx.columnMapperFor(Long.class)).andReturn(LongColumnMapper.WRAPPER); replay(ctx); expect(resultSet.getMetaData()).andReturn(resultSetMetaData); Long aLongVal = 100l; expect(resultSet.getLong(1)).andReturn(aLongVal); expect(resultSet.wasNull()).andReturn(false); replay(resultSet); SampleBean sampleBean = mapper.map(0, resultSet, ctx); assertEquals(aLongVal, sampleBean.getLongField()); }
Source:
<code>public int revokeAllEntitlements(Consumer consumer) { List<Entitlement> entsToDelete = entitlementCurator.listByConsumer(consumer); revokeEntitlements(entsToDelete); <START> return entsToDelete.size(); <END> }</code><technical_language>is needed compute consumer compliance more? is a valid reason, kick asynchronous consumer compliance job #1073 ? APIs remove entitlements of a consumer, compliance check other without, this explicit decision some point, question</technical_language>

Target:
public int revokeAllEntitlements(Consumer consumer) { return revokeAllEntitlements(consumer, true); }
Source:
<code>public B2ResponseException(HttpCommand command, HttpResponse response, B2Error error) { super("request " + command.getCurrentRequest().getRequestLine() + " failed with code " + response.getStatusCode() + ", error: " + error.toString(), command, response); <START> this.error = checkNotNull(error, "error"); <END> }</code><technical_language>This check performed _before_ calling toString() method</technical_language>

Target:
public B2ResponseException(HttpCommand command, HttpResponse response, B2Error error) { super("request " + command.getCurrentRequest().getRequestLine() + " failed with code " + response.getStatusCode() + ", error: " + Preconditions.checkNotNull(error, "error").toString(), command, response); this.error = error; }
Source:
<code>public Object run(){ RequestContext ctx = RequestContext.getCurrentContext(); HttpServletResponse response = ctx.getResponse(); HttpServletRequest request = ctx.getRequest(); Policy policy = findRequestPolicy(request); String key = findKey(request); Rate rate = limiter.consume(policy, key); response.setHeader(Headers.LIMIT, rate.getLimit().toString()); response.setHeader(Headers.REMAINING, Math.max(rate.getRemaining(), 0) + ""); response.setHeader(Headers.RESET, rate.getReset().toString()); if (rate.getRemaining() <= 0) { ctx.setResponseStatusCode(429); ctx.put("warning","on"); <START> throw new RuntimeException(""); <END> } return null; }</code><technical_language>remove "" put some information in it</technical_language>

Target:
public Object run(){ RequestContext ctx = RequestContext.getCurrentContext(); HttpServletResponse response = ctx.getResponse(); HttpServletRequest request = ctx.getRequest(); Policy policy = findRequestPolicy(request); String key = findKey(request); Rate rate = limiter.consume(policy, key); response.setHeader(Headers.LIMIT, rate.getLimit().toString()); response.setHeader(Headers.REMAINING, String.valueOf(Math.max(rate.getRemaining(), 0))); response.setHeader(Headers.RESET, rate.getReset().toString()); if (rate.getRemaining() <= 0) { ctx.setResponseStatusCode(429); ctx.put("rateLimitExceeded","true"); throw new RuntimeException(""); } return null; }
Source:
<code>public WorkflowStepPrompt getStep(int stepNumber) { <START> if (stepNumber == 0) { <END> return stockStep.getPrompt(); } else if (stepNumber == 1) { return qcStep.getPrompt(); } else if (stepNumber == 2) { return stockBoxStep.getPrompt(); } else if (stepNumber == 3) { return stockBoxPositionStep.getPrompt(); } else if (stepNumber == 4) { return aliquotStep.getPrompt(); } else if (stepNumber == 5) { return aliquotBoxStep.getPrompt(); } else { return aliquotHandlingSteps.get(asAliquotIndex(stepNumber)).getPrompt(); } }</code><technical_language>This clearer a switch</technical_language>

Target:
public WorkflowStepPrompt getStep(int stepNumber) { switch (stepNumber) { case 0: return stockStep.getPrompt(); case 1: return qcStep.getPrompt(); case 2: return stockBoxStep.getPrompt(); case 3: return stockBoxPositionStep.getPrompt(); case 4: return aliquotStep.getPrompt(); case 5: return aliquotBoxStep.getPrompt(); default: return aliquotHandlingSteps.get(asAliquotIndex(stepNumber)).getPrompt(); } }
Source:
<code>public VDS activate() { VDS vds = null; try { log.debugFormat( "Trying to activate host {0} , meanwhile setting status to Unassigned.", getVdsId()); vds = DbFacade.getInstance().getVdsDao().get(getVdsId()); VDSStatus newStatus = refreshCapabilities(new AtomicBoolean(), vds, true); if (log.isDebugEnabled()) { log.debugFormat( "Succeeded to refreshCapabilities for host {0} , new status will be {1} ", getVdsId(), newStatus); } <START> if (vds.getTrustedService()){ <END> List <String> hosts = new ArrayList<String> (); hosts.add(vds.getHostName()); AttestationValue value = AttestationService.getInstance().attestHosts(hosts).get(0); AttestationCacheManager.getInstance().updateCache(value); if (value.getTrustLevel() == AttestationResultEnum.TRUSTED) { vds.setStatus(VDSStatus.Up); } else { vds.setStatus(VDSStatus.NonOperational); } } } catch (java.lang.Exception e) { log.infoFormat("Failed to activate VDS = {0} with error: {1}.", getVdsId(), e.getMessage()); } finally { if (vds != null) { UpdateDynamicData(vds.getDynamicData()); monitoringStrategy.processHardwareCapabilities(vds); ResourceManager.getInstance().getEventListener().handleVdsVersion(vds.getId()); } } return vds; }</code><technical_language>Compilation error: method getTrustedService() exist</technical_language>

Target:
public VDS activate() { VDS vds = null; try { log.debugFormat( "Trying to activate host {0} , meanwhile setting status to Unassigned.", getVdsId()); vds = DbFacade.getInstance().getVdsDao().get(getVdsId()); VDSStatus newStatus = refreshCapabilities(new AtomicBoolean(), vds, true); if (log.isDebugEnabled()) { log.debugFormat( "Succeeded to refreshCapabilities for host {0} , new status will be {1} ", getVdsId(), newStatus); } } catch (java.lang.Exception e) { log.infoFormat("Failed to activate VDS = {0} with error: {1}.", getVdsId(), e.getMessage()); } finally { if (vds != null) { UpdateDynamicData(vds.getDynamicData()); monitoringStrategy.processHardwareCapabilities(vds); ResourceManager.getInstance().getEventListener().handleVdsVersion(vds.getId()); } } return vds; }
Source:
<code>private Tuple2<Integer, Set<String>> deleteBundleByIdentifier(final DeleteBundlesByIdentifierForm deleteBundlesByIdentifierForm, final InitDataObject initData) throws DotDataException { int successCount = 0; final Set<String> fails = new LinkedHashSet<>(); for (final String bundleId : deleteBundlesByIdentifierForm.getIdentifiers()) { try { this.bundleAPI.deleteBundleAndDependencies(bundleId, initData.getUser()); successCount++; } catch (Exception e) { <START> <END> fails.add(bundleId); } } return Tuple.of(successCount, fails); }</code><technical_language>log here</technical_language>

Target:
private Tuple2<Integer, Set<String>> deleteBundleByIdentifier(final DeleteBundlesByIdentifierForm deleteBundlesByIdentifierForm, final InitDataObject initData) throws DotDataException { int successCount = 0; final Set<String> fails = new LinkedHashSet<>(); for (final String bundleId : deleteBundlesByIdentifierForm.getIdentifiers()) { try { this.bundleAPI.deleteBundleAndDependencies(bundleId, initData.getUser()); successCount++; } catch (Exception e) { Logger.debug(this,"Exception on deleting bundle with id: " + bundleId,e); fails.add(bundleId); } } return Tuple.of(successCount, fails); }
Source:
<code>public void apply() { clickButton("Apply"); elasticSleep(1000); <START> assertThat(driver, hasContent("Saved")); <END> }</code><technical_language>Is this splash appears disappears? wait for explicitly check happen soon late</technical_language>

Target:
public void apply() { clickButton("Apply"); waitFor(driver, hasContent("Saved"), 5); }
Source:
<code>public TDHttpClient(TDClientConfig config) { this.config = config; ClientConfig httpConfig = new ClientConfig(); httpConfig.connectorProvider(new JettyConnectorProvider()); httpConfig .property(ClientProperties.CONNECT_TIMEOUT, config.getConnectTimeoutMillis()) .property(ClientProperties.READ_TIMEOUT, config.getConnectTimeoutMillis()); httpConfig.property(JettyClientProperties.DISABLE_COOKIES, true); httpConfig.property(ClientProperties.ASYNC_THREADPOOL_SIZE, config.getConnectionPoolSize()); if (config.getProxy().isPresent()) { ProxyConfig proxyConfig = config.getProxy().get(); logger.trace("proxy configuration: " + proxyConfig); <START> httpConfig.property(ClientProperties.PROXY_URI, proxyConfig.getUri()); <END> } this.objectMapper = new ObjectMapper() .registerModule(new JsonOrgModule()) .registerModule(new GuavaModule()) .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); this.httpClient = ClientBuilder.newClient(httpConfig); }</code><technical_language>supports HTTPS proxy server</technical_language>

Target:
public TDHttpClient(TDClientConfig config) { this.config = config; this.httpClient = config.isUseSSL() ? new HttpClient(new SslContextFactory()) : new HttpClient(); httpClient.setConnectTimeout(config.getConnectTimeoutMillis()); httpClient.setIdleTimeout(config.getIdleTimeoutMillis()); httpClient.setTCPNoDelay(true); httpClient.setExecutor(new QueuedThreadPool(config.getConnectionPoolSize(), 2)); httpClient.setCookieStore(new HttpCookieStore.Empty()); httpClient.setUserAgentField(new HttpField(HttpHeader.USER_AGENT, "td-client-java-" + TDClient.getVersion())); if (config.getProxy().isPresent()) { final ProxyConfig proxyConfig = config.getProxy().get(); logger.trace("proxy configuration: " + proxyConfig); HttpProxy httpProxy = new HttpProxy(new Origin.Address(proxyConfig.getHost(), proxyConfig.getPort()), proxyConfig.useSSL()); httpProxy.getExcludedAddresses().add(proxyConfig.getHost() + ":" + proxyConfig.getPort()); httpClient.getProxyConfiguration().getProxies().add(httpProxy); if (proxyConfig.requireAuthentication()) { httpClient.getAuthenticationStore().addAuthenticationResult(new ProxyAuthResult(proxyConfig)); } } this.objectMapper = new ObjectMapper() .registerModule(new JsonOrgModule()) .registerModule(new GuavaModule()) .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); try { httpClient.start(); } catch (Exception e) { logger.error("Failed to initialize Jetty client", e); throw Throwables.propagate(e); } }
Source:
<code>public FluxSink<CoreEvent> get() { final FluxSinkRecorder<CoreEvent> sinkRef = new FluxSinkRecorder<>(); Flux<CoreEvent> onErrorFlux = Flux.create(sinkRef) .map(beforeRouting()) <START> .concatMap(route()) <END> .onErrorContinue(MessagingException.class, onRoutingError()) .map(afterRouting()) .doOnNext(result -> fireEndNotification(getOriginalEvent(result), result, getException(result))) .doOnNext(TemplateOnErrorHandler.this::resolveHandling); onErrorFlux.subscribe(); return sinkRef.getFluxSink(); }</code><technical_language>this is bad flatMap, need this in a next iteration</technical_language>

Target:
public FluxSink<CoreEvent> get() { final FluxSinkRecorder<CoreEvent> sinkRef = new FluxSinkRecorder<>(); Flux<CoreEvent> onErrorFlux = Flux.create(sinkRef).map(beforeRouting()); if (!getMessageProcessors().isEmpty()) { onErrorFlux = onErrorFlux.compose(TemplateOnErrorHandler.this::route); } onErrorFlux = onErrorFlux .onErrorContinue(MessagingException.class, onRoutingError()) .map(afterRouting()) .doOnNext(result -> fireEndNotification(getOriginalEvent(result), result, getException(result))) .doOnNext(TemplateOnErrorHandler.this::resolveHandling); onErrorFlux.subscribe(); return sinkRef.getFluxSink(); }
Source:
<code>public List<CssMetaData<? extends Styleable, ?>> getCssMetaData() { try { Class<?> clazz = Class.forName("javafx.scene.text.Text$StyleableProperties"); Field styleablesField = clazz.getDeclaredField("STYLEABLES"); styleablesField.setAccessible(true); <START> List<CssMetaData<? extends Styleable, ?>> styleables = (List<CssMetaData<? extends Styleable, ?>>) styleablesField.get(null); <END> styleables = new ArrayList<>(styleables); styleables.add(StyleableProperties.BACKGROUND_COLOR); return styleables; } catch (ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) { e.printStackTrace(); } return null; }</code><technical_language>reflection instead of styleables = Text.getClassCssMetaData()</technical_language>

Target:
public List<CssMetaData<? extends Styleable, ?>> getCssMetaData() { List<CssMetaData<? extends Styleable, ?>> styleables = new ArrayList<>(super.getCssMetaData()); styleables.add(StyleableProperties.BACKGROUND_FILL); return styleables; }
Source:
<code><START> public Boolean delete( ProjectName projectName ) <END> { return callWithContext( () -> { final Boolean result = doDelete( projectName ); LOG.info( "Project deleted: " + projectName ); return result; } ); }</code><technical_language>boolean instead of Boolean</technical_language>

Target:
public boolean delete( ProjectName projectName ) { return callWithContext( () -> { final boolean result = doDelete( projectName ); LOG.info( "Project deleted: " + projectName ); return result; } ); }
Source:
<code>public void clear() { <START> clearInternal(); <END> }</code><technical_language>Hmm, is this missing .incrementVersion() call</technical_language>

Target:
public void clear() { clearInternal().incrementVersion(); }
Source:
<code>public ItemInfo(String itemType, String itemName) { <START> super(); <END> this.itemType = itemType; this.itemName = itemName; }</code><technical_language>is personal meaning, drop call default constructor of parent</technical_language>

Target:
public ItemInfo(String itemType, String itemName) { this.itemType = itemType; this.itemName = itemName; }