auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void initialize( ConfigurableApplicationContext configurableApplicationContext) { TestPropertyValues .of("spring.redis.host=" + redisContainer.getContainerIpAddress(), <START> "spring.redis.port=" + redisContainer.getMappedPort(6379)) <END> .applyTo(configurableApplicationContext.getEnvironment()); }</code><technical_language>getFirstMappedPort() 1.4 :)</technical_language>

Target:
public void initialize( ConfigurableApplicationContext configurableApplicationContext) { TestPropertyValues .of("spring.redis.host=" + redisContainer.getContainerIpAddress(), "spring.redis.port=" + redisContainer.getFirstMappedPort()) .applyTo(configurableApplicationContext.getEnvironment()); }
Source:
<code>private static void sortInstructorResultList(List<InstructorAttributes> instructorList) { instructorList.sort(Comparator.comparing((InstructorAttributes instructor) -> instructor.courseId) .thenComparing(instructor -> SanitizationHelper.desanitizeIfHtmlSanitized(instructor.role)) .thenComparing(instructor -> SanitizationHelper.desanitizeIfHtmlSanitized(instructor.name)) <START> .thenComparing(instructor -> SanitizationHelper.desanitizeIfHtmlSanitized(instructor.email))); <END> }</code><technical_language>email is here</technical_language>

Target:
private static void sortInstructorResultList(List<InstructorAttributes> instructorList) { instructorList.sort(Comparator.comparing((InstructorAttributes instructor) -> instructor.courseId) .thenComparing(instructor -> SanitizationHelper.desanitizeIfHtmlSanitized(instructor.role)) .thenComparing(instructor -> SanitizationHelper.desanitizeIfHtmlSanitized(instructor.name)) .thenComparing(instructor -> instructor.email)); }
Source:
<code>public void executeCommand() { if (!pauseGeoReplicationSessions(georepSessions)) { return; } if (!stopSlaveVolumes(georepSessions)) { return; } if (!restoreSlaveVolumesToSnapshot(georepSessions, getParameters().getSnapshotName())) { return; } if (!stopVolume(getGlusterVolumeId())) { return; <START> } <END> if (!restoreVolumeToSnapshot(upServer.getId(), getGlusterVolumeId(), getParameters().getSnapshotName())) { return; } if (!startSlaveVolumes(georepSessions)) { return; } if (!startVolume(getGlusterVolumeId())) { return; } if (!resumeGeoRepSessions(georepSessions)) { return; } setSucceeded(true); }</code><technical_language>if fails in between? is, slave volumes restored fails restore master volume</technical_language>

Target:
public void executeCommand() { Boolean tranRetVal = TransactionSupport.executeInNewTransaction(new TransactionMethod<Boolean>() { @Override public Boolean runInTransaction() { if (!stopGeoReplicationSessions(georepSessions)) { return false; } if (!stopSlaveVolumes(georepSessions)) { return false; } if (!restoreSlaveVolumesToSnapshot(georepSessions, getParameters().getSnapshotName())) { return false; } return true; } }); if (!tranRetVal) { return; } if (!stopVolume(getGlusterVolumeId())) { if (!georepSessions.isEmpty()) { handleVdsError(AuditLogType.GLUSTER_MASTER_VOLUME_STOP_FAILED_DURING_SNAPSHOT_RESTORE, "Failed to stop the master volume while restoring the snapshot, " + "whereas slave volume(s) are restored to older state. " + "Admin should manually inetrevene and set the stime in master to proper value and resume the geo-replication session"); } return; } if (!restoreVolumeToSnapshot(upServer.getId(), getGlusterVolumeId(), getParameters().getSnapshotName())) { if (!georepSessions.isEmpty()) { handleVdsError(AuditLogType.GLUSTER_MASTER_VOLUME_SNAPSHOT_RESTORE_FAILED, "Failed to restore the master volume, whereas slave volume(s) are restored to older state. " + "Admin should manually inetrevene and set the stime in master to proper value and resume the geo-replication session"); } return; } List<GlusterGeoRepSession> updatedGeoRepSessions = getDbFacade().getGlusterGeoRepDao().getGeoRepSessions(getGlusterVolumeId()); if (!startSlaveVolumes(updatedGeoRepSessions)) { return; } if (!startVolume(getGlusterVolumeId())) { return; } if (!startGeoRepSessions(updatedGeoRepSessions)) { return; } if (!resumeGeoRepSessions(updatedGeoRepSessions)) { return; } setSucceeded(true); }
Source:
<code>public ViewExtensionDescription convert() { TransformationCache cache = new TransformationCache(); IDescriptionPreprocessor vedPreprocessor = SiriusPropertiesCorePlugin.getPlugin().getDescriptionPreprocessor(originalDescription); EObject viewExtensionDescription = vedPreprocessor.convert(originalDescription, cache); List<IDescriptionLinkResolver> linkResolvers = SiriusPropertiesCorePlugin.getPlugin().getDescriptionPreprocessorLinkResolvers(); <START> for (IDescriptionLinkResolver linkResolver : linkResolvers) { linkResolver.resolve(viewExtensionDescription, cache); } <END> return (ViewExtensionDescription) viewExtensionDescription; }</code><technical_language>java8-isation [forEach]</technical_language>

Target:
public Optional<ViewExtensionDescription> convert() { TransformationCache cache = new TransformationCache(); Optional<IDescriptionPreprocessor> vedPreprocessor = SiriusPropertiesCorePlugin.getPlugin().getDescriptionPreprocessor(originalDescription); if (vedPreprocessor.isPresent()) { EObject viewExtensionDescription = vedPreprocessor.get().convert(originalDescription, cache); List<IDescriptionLinkResolver> linkResolvers = SiriusPropertiesCorePlugin.getPlugin().getDescriptionPreprocessorLinkResolvers(); linkResolvers.forEach(linkResolver -> linkResolver.resolve(viewExtensionDescription, cache)); return Optional.ofNullable((ViewExtensionDescription) viewExtensionDescription); } return Optional.empty(); }
Source:
<code>protected final void doGet(final HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException { String path = request.getPathInfo(); String fullPath = getFullPath(path); if (fullPath != null) { File file = new File(fullPath); <START> if (file == null || !file.exists() || !file.canRead() <END> || file.isDirectory()) { log.error("Unable to locate file, will send a " + "404 error response."); response.sendError(HttpServletResponse.SC_NOT_FOUND); } else { String etag = generateEtag(file); if (etag.equals(request.getHeader(GwtDynamicHostPageServlet. IF_NONE_MATCH_HEADER))) { response.setStatus(HttpServletResponse.SC_NOT_MODIFIED); } else { String mime = ServletUtils.getMimeMap(). getContentType(file); response.addHeader(GwtDynamicHostPageServlet.ETAG_HEADER, etag); ServletUtils.sendFile(request, response, file, mime); } } } else { response.sendError(HttpServletResponse.SC_NOT_FOUND); } }</code><technical_language>"file == null" condition</technical_language>

Target:
protected final void doGet(final HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException { String path = request.getPathInfo(); String fullPath = getFullPath(path); if (fullPath != null) { File file = new File(fullPath); if (!file.exists() || !file.canRead() || file.isDirectory()) { log.error("Unable to locate file, will send a 404 error response."); response.sendError(HttpServletResponse.SC_NOT_FOUND); } else { String etag = generateEtag(file); if (etag.equals(request.getHeader(GwtDynamicHostPageServlet. IF_NONE_MATCH_HEADER))) { response.setStatus(HttpServletResponse.SC_NOT_MODIFIED); } else { String mime = ServletUtils.getMimeMap(). getContentType(file); response.addHeader(GwtDynamicHostPageServlet.ETAG_HEADER, etag); ServletUtils.sendFile(request, response, file, mime); } } } else { response.sendError(HttpServletResponse.SC_NOT_FOUND); } }
Source:
<code>public void before() { assertThat(simpleMeterRegistry).isNotNull(); meter = simpleMeterRegistry.find("jvm.memory.committed").meter(); assertThat(meter).isNotNull().withFailMessage( <START> "The jvm.memory.committed meter mast be present in SpringBoot apps!"); <END> }</code><technical_language>mast I must</technical_language>

Target:
public void before() { Metrics.globalRegistry.getMeters().forEach(Metrics.globalRegistry::remove); assertThat(simpleMeterRegistry).isNotNull(); meter = simpleMeterRegistry.find("spring.integration.handlers").meter(); assertThat(meter).isNotNull().withFailMessage( "The spring.integration.handlers meter must be present in SpringBoot apps!"); }
Source:
<code>public void auditFinished(AuditEvent event) { fileMessages.forEach((fileName, messages) -> { <START> writeFileOpeningTag(fileName); <END> for (AuditEvent fileEvent : messages.getErrors()) { writeFileError(fileEvent); } for (Throwable throwable : messages.getExceptions()) { writeException(throwable); } }); fileMessages.clear(); writer.println("</checkstyle>"); if (closeStream) { writer.close(); } else { writer.flush(); } }</code><technical_language>need call writeFileClosingTag in this method? message file closing tag mean, wrong file processing</technical_language>

Target:
public void auditFinished(AuditEvent event) { fileMessages.forEach(this::writeFileMessages); fileMessages.clear(); writer.println("</checkstyle>"); if (closeStream) { writer.close(); } else { writer.flush(); } }
Source:
<code>public String toString() { if (!preferences.get(UserPreference.Receipts.OnlyIncludeReimbursable) && !totals.getGrandTotalPrice().equals(totals.getReimbursableGrandTotalPrice())) { return string .replace(REPORT_NAME, trip.getName()) .replace(USER_ID, preferences.get(UserPreference.ReportOutput.UserId)) .replace(REPORT_START, dateFormatter.getFormattedDate(trip.getStartDisplayableDate())) .replace(REPORT_END, dateFormatter.getFormattedDate(trip.getEndDisplayableDate())) .replace(REPORT_GROSS_TOTAL, totals.getReimbursableGrandTotalPrice().getCurrencyFormattedPrice()); } else { return string .replace(REPORT_NAME, trip.getName()) .replace(USER_ID, preferences.get(UserPreference.ReportOutput.UserId)) .replace(REPORT_START, dateFormatter.getFormattedDate(trip.getStartDisplayableDate())) .replace(REPORT_END, dateFormatter.getFormattedDate(trip.getEndDisplayableDate())) <START> .replace(REPORT_GROSS_TOTAL, totals.getGrandTotalPrice().getCurrencyFormattedPrice()); <END> } }</code><technical_language>getGrandTotalPrice() include details of this if/else check: if (!preferences.get(UserPreference.Receipts.OnlyIncludeReimbursable) && !totals.getGrandTotalPrice().equals(totals.getReimbursableGrandTotalPrice())) {</technical_language>

Target:
public String toString() { return string .replace(REPORT_NAME, trip.getName()) .replace(USER_ID, preferences.get(UserPreference.ReportOutput.UserId)) .replace(REPORT_START, dateFormatter.getFormattedDate(trip.getStartDisplayableDate())) .replace(REPORT_END, dateFormatter.getFormattedDate(trip.getEndDisplayableDate())) .replace(REPORT_GROSS_TOTAL, totals.getGrandTotalPrice().getCurrencyFormattedPrice()); }
Source:
<code>public void notSet() throws Exception { final GuidedDecisionTableApplicationPreferencesLoader loader = new GuidedDecisionTableApplicationPreferencesLoader(); <START> assertNull( new GuidedDecisionTableApplicationPreferencesLoader().load().get( GuidedDecisionTableEditorService.DTABLE_VERIFICATION_ENABLED ) ); <END> }</code><technical_language>OK.. a test for null handle null elsewhere.... find I scroll more..</technical_language>

Target:
public void notSet() throws Exception { assertEquals( "true", new GuidedDecisionTableApplicationPreferencesLoader().load().get( GuidedDecisionTableEditorService.DTABLE_VERIFICATION_ENABLED ) ); }
Source:
<code>private void updateTrackablesList() { final TrackableLog[] trackablesArray = getSortedTrackables().toArray(new TrackableLog[trackables.size()]); final ListView inventoryList = ButterKnife.findById(this, R.id.inventory); inventoryList.setAdapter(new TrackableLogAdapter(this, R.layout.logcache_trackable_item, trackablesArray)); ViewUtils.setListViewHeightBasedOnItems(inventoryList); <START> final LinearLayout inventoryBox = ButterKnife.findById(this, R.id.inventory_box); <END> inventoryBox.setVisibility(trackables.isEmpty() ? View.GONE : View.VISIBLE); final LinearLayout inventoryChangeAllView = ButterKnife.findById(this, R.id.inventory_changeall); inventoryChangeAllView.setVisibility(trackables.size() > 1 ? View.VISIBLE : View.GONE); final Button changeButton = ButterKnife.findById(inventoryChangeAllView, R.id.changebutton); changeButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(final View view) { selectAllTrackablesAction(); } }); }</code><technical_language>introducing a temp variable here</technical_language>

Target:
private void updateTrackablesList() { final TrackableLog[] trackablesArray = getSortedTrackables().toArray(new TrackableLog[trackables.size()]); final ListView inventoryList = ButterKnife.findById(this, R.id.inventory); inventoryList.setAdapter(new TrackableLogAdapter(this, R.layout.logcache_trackable_item, trackablesArray)); ViewUtils.setListViewHeightBasedOnItems(inventoryList); ButterKnife.findById(this, R.id.inventory_box).setVisibility(trackables.isEmpty() ? View.GONE : View.VISIBLE); final LinearLayout inventoryChangeAllView = ButterKnife.findById(this, R.id.inventory_changeall); inventoryChangeAllView.setVisibility(trackables.size() > 1 ? View.VISIBLE : View.GONE); final Button changeButton = ButterKnife.findById(inventoryChangeAllView, R.id.changebutton); changeButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(final View view) { selectAllTrackablesAction(); } }); }
Source:
<code>public void checkoutRemoteBranchToExistingLocalBranchTest() throws Exception { String projectName = "testRepo"; String localBranch = "master"; String remoteBranch = "origin/master"; <START> String gitMessage = "Ref master already exists"; <END> projectExplorer.waitProjectExplorer(); git.importJavaApp(testRepo.getHtmlUrl(), projectName, BLANK); projectExplorer.waitAndSelectItem(projectName); menu.runCommand(GIT, BRANCHES); git.waitBranchInTheList(localBranch); git.waitBranchInTheList(remoteBranch); git.waitBranchInTheListWithCoState(localBranch); git.selectBranchAndClickCheckoutBtn(remoteBranch); git.closeBranchesForm(); git.waitGitStatusBarWithMess(gitMessage); eventsPanel.clickEventLogBtn(); eventsPanel.waitExpectedMessage(gitMessage); }</code><technical_language>turn variables constants, declare in this place public class CheckoutToRemoteBranchWhichAlreadyHasLinkedLocalBranchTest in 33-d row</technical_language>

Target:
public void checkoutRemoteBranchToExistingLocalBranchTest() throws Exception { projectExplorer.waitProjectExplorer(); git.importJavaApp(testRepo.getHtmlUrl(), PROJECT_NAME, BLANK); projectExplorer.waitAndSelectItem(PROJECT_NAME); menu.runCommand(GIT, BRANCHES); git.waitBranchInTheList(LOCAL_BRANCH); git.waitBranchInTheList(REMOTE_BRANCH); git.waitBranchInTheListWithCoState(LOCAL_BRANCH); git.selectBranchAndClickCheckoutBtn(REMOTE_BRANCH); git.closeBranchesForm(); git.waitGitStatusBarWithMess(GIT_MESSAGE); eventsPanel.clickEventLogBtn(); eventsPanel.waitExpectedMessage(GIT_MESSAGE); }
Source:
<code>public static PathContext jsonApiCommonSyntax(Object input, String pathSpec) { try { Matcher matcher = JSON_PATH_BASE.matcher(pathSpec); if (!matcher.matches()) { <START> throw new RuntimeException("illegal patch spec, missing mode declaration"); <END> } PathMode mode = PathMode.valueOf(matcher.group(1).toUpperCase(Locale.ENGLISH)); String pathWff = matcher.group(2); DocumentContext ctx; switch (mode) { case STRICT: if (input instanceof Exception) { return PathContext.withStrictException((Exception) input); } ctx = JsonPath.parse(input, Configuration .builder() .jsonProvider(JSON_PATH_JSON_PROVIDER) .mappingProvider(JSON_PATH_MAPPING_PROVIDER) .build() ); break; case LAX: if (input instanceof Exception) { return PathContext.withReturned(PathMode.LAX, null); } ctx = JsonPath.parse(input, Configuration .builder() .options(Option.SUPPRESS_EXCEPTIONS) .jsonProvider(JSON_PATH_JSON_PROVIDER) .mappingProvider(JSON_PATH_MAPPING_PROVIDER) .build() ); break; default: throw new RuntimeException("illegal mode: " + mode); } try { return PathContext.withReturned(mode, ctx.read(pathWff)); } catch (Exception e) { return PathContext.withStrictException(e); } } catch (Exception e) { return PathContext.withUnknownException(e); } }</code><technical_language>error message start a capital include pathSpec in question</technical_language>

Target:
public static PathContext jsonApiCommonSyntax(Object input, String pathSpec) { try { Matcher matcher = JSON_PATH_BASE.matcher(pathSpec); if (!matcher.matches()) { throw RESOURCE.illegalJsonPathSpec(pathSpec).ex(); } PathMode mode = PathMode.valueOf(matcher.group(1).toUpperCase(Locale.ENGLISH)); String pathWff = matcher.group(2); DocumentContext ctx; switch (mode) { case STRICT: if (input instanceof Exception) { return PathContext.withStrictException((Exception) input); } ctx = JsonPath.parse(input, Configuration .builder() .jsonProvider(JSON_PATH_JSON_PROVIDER) .mappingProvider(JSON_PATH_MAPPING_PROVIDER) .build() ); break; case LAX: if (input instanceof Exception) { return PathContext.withReturned(PathMode.LAX, null); } ctx = JsonPath.parse(input, Configuration .builder() .options(Option.SUPPRESS_EXCEPTIONS) .jsonProvider(JSON_PATH_JSON_PROVIDER) .mappingProvider(JSON_PATH_MAPPING_PROVIDER) .build() ); break; default: throw RESOURCE.illegalJsonPathModeInPathSpec(mode.toString(), pathSpec).ex(); } try { return PathContext.withReturned(mode, ctx.read(pathWff)); } catch (Exception e) { return PathContext.withStrictException(e); } } catch (Exception e) { return PathContext.withUnknownException(e); } }
Source:
<code>public void createDb() { InputStream is = null; try { HttpConnection connection = HttpConnectionManager.connect("PUT", "application/json", this.uriHelper.getRootUri()); is = this.executeToInputStream(connection); DBOperationResponse res = jsonHelper.fromJson(new InputStreamReader(is), DBOperationResponse.class); if (!res.getOk()) { <START> throw new ServerException("Response from couch db server: " + res.toString()); <END> } } finally { closeQuietly(is); } }</code><technical_language>This unchecked exception, changed checked</technical_language>

Target:
public void createDb() { HttpConnection connection = Http.PUT(this.uriHelper.getRootUri(), "application/json"); DBOperationResponse res = executeToJsonObject(connection, DBOperationResponse.class); if (!res.getOk()) { throw new ServerException("Response from couch db server: " + res.toString()); } }
Source:
<code>public int setTabIndexes(int nextTabIndex) { <START> nextTabIndex = super.setTabIndexes(nextTabIndex); <END> nextTabIndex = createSubnetEditor.setTabIndexes(nextTabIndex); nextTabIndex = this.subnetWidget.setTabIndexes(nextTabIndex); return nextTabIndex; }</code><technical_language>Nit-pick: need call super [1] effectively a no-op call, simply skip line above. [1] AbstractModelBoundPopupView#setTabIndexes (If this View extended some other View override setTabIndexes method, super called in case.)</technical_language>

Target:
public int setTabIndexes(int nextTabIndex) { nextTabIndex = createSubnetEditor.setTabIndexes(nextTabIndex); nextTabIndex = this.subnetWidget.setTabIndexes(nextTabIndex); return nextTabIndex; }
Source:
<code>private boolean addTrace(@Nullable IProgressMonitor monitor) { boolean fetchTreeIsComplete = true; ITmfTrace trace = getTrace(); String traceName = Objects.requireNonNull(trace.getName()); EntryModelBuilder entry = fEntryBuilder.get(-1L, traceName); TraceEntryModel.Builder traceEntry; if (entry != null && entry instanceof TraceEntryModel.Builder) { traceEntry = (TraceEntryModel.Builder) entry; } else { long newId = ENTRY_ID.getAndIncrement(); traceEntry = new TraceEntryModel.Builder(newId, -1, Objects.requireNonNull(trace.getName()), trace.getStartTime().toNanos(), trace); fEntryBuilder.put(-1L, traceName, traceEntry); } long rootId = traceEntry.getId(); for (Entry<ITmfAnalysisModuleWithStateSystems, Boolean> moduleWithStatus : fModulesToStatus.entrySet()) { if (monitor != null) { if (monitor.isCanceled()) { return false; } } ITmfAnalysisModuleWithStateSystems module = Objects.requireNonNull(moduleWithStatus.getKey()); Boolean analysisIsDone = Objects.requireNonNull(moduleWithStatus.getValue()); if (!analysisIsDone || fStartedAnalysis.contains(module)) { fetchTreeIsComplete &= addModule(monitor, module, rootId, trace.getStartTime().toNanos()); fStartedAnalysis.remove(module); } } <START> long traceEnd = traceEntry.getStartTime(); <END> for (ModuleEntryModel moduleEntryModel : moduleEntryModelList) { if (monitor != null) { if (monitor.isCanceled()) { return false; } } traceEnd = Long.max(traceEnd, moduleEntryModel.getEndTime()); } traceEntry.setEndTime(traceEnd); fEntryBuilder.put(-1L, traceName, traceEntry); return fetchTreeIsComplete; }</code><technical_language>set starting trace.getEndTime()</technical_language>

Target:
private boolean addTrace(@Nullable IProgressMonitor monitor) { boolean fetchTreeIsComplete = true; ITmfTrace trace = getTrace(); String traceName = Objects.requireNonNull(trace.getName()); EntryModelBuilder entry = fEntryBuilder.get(-1L, traceName); TraceEntryModel.Builder traceEntry; if (entry != null && entry instanceof TraceEntryModel.Builder) { traceEntry = (TraceEntryModel.Builder) entry; } else { long newId = ENTRY_ID.getAndIncrement(); traceEntry = new TraceEntryModel.Builder(newId, -1, traceName, trace.getStartTime().toNanos(), trace); fEntryBuilder.put(-1L, traceName, traceEntry); } long rootId = traceEntry.getId(); for (Entry<ITmfAnalysisModuleWithStateSystems, Boolean> moduleWithStatus : fModulesToStatus.entrySet()) { if (monitor != null) { if (monitor.isCanceled()) { return false; } } ITmfAnalysisModuleWithStateSystems module = Objects.requireNonNull(moduleWithStatus.getKey()); Boolean analysisIsDone = Objects.requireNonNull(moduleWithStatus.getValue()); if (!analysisIsDone || fStartedAnalysis.contains(module)) { fetchTreeIsComplete &= addModule(monitor, module, rootId, trace.getStartTime().toNanos()); fStartedAnalysis.remove(module); } } long traceEnd = traceEntry.getEndTime(); for (ModuleEntryModel moduleEntryModel : fModuleEntryModelList) { if (monitor != null) { if (monitor.isCanceled()) { return false; } } traceEnd = Long.max(traceEnd, moduleEntryModel.getEndTime()); } traceEntry.setEndTime(traceEnd); return fetchTreeIsComplete; }
Source:
<code>public <T> T getMojoParameterValue(final MavenProject project, final MojoExecution mojoExecution, final String parameter, final Class<T> asType, final IProgressMonitor monitor) throws CoreException { <START> return context().execute(project, new ICallable<T>() { <END> public T call(IMavenExecutionContext context, IProgressMonitor monitor) throws CoreException { return getMojoParameterValue(context.getSession(), mojoExecution, parameter, asType); } }, monitor); }</code><technical_language>unnecessary change</technical_language>

Target:
public <T> T getMojoParameterValue(final MavenProject project, final MojoExecution mojoExecution, final String parameter, final Class<T> asType, final IProgressMonitor monitor) throws CoreException { return context().execute(project, (context, pm) -> getMojoParameterValue(context.getSession(), mojoExecution, parameter, asType), monitor); }
Source:
<code><START> public Optional<?> getLowValue() <END> { return lowValue; }</code><technical_language>class names in JSON serialization. serialized permanently in file metastore rely current implementation details Java class name. a security hole. Anytime a remote exploit for Java possibly happen, some deserialization feature involving class names. a small, fixed set of classes, @JsonSubTypes logical type names work</technical_language>

Target:
public Optional<? extends Comparable<?>> getLowValue() { return lowValue; }
Source:
<code>public void beforeToProto() { throw new ZoomConvert.ConvertException("Conversion of an object of " + "class: " + <START> this.getClass() <END> + " to a protocol buffer is not " + "supported"); }</code><technical_language>Nit: needed</technical_language>

Target:
public void beforeToProto() { throw new ZoomConvert.ConvertException("Conversion of an object of " + "class: " + getClass() + " to a protocol buffer is not " + "supported"); }
Source:
<code>public static void createRejoinNodeIndicator(ZooKeeper zk, String node) { try { <START> System.out.println("start create znode" + node); <END> zk.create(node, null, Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL); System.out.println("finshed create znode" + node); } catch (KeeperException e) { if (e.code() != KeeperException.Code.NODEEXISTS) { VoltDB.crashLocalVoltDB("Unable to create rejoin node Indicator", true, e); } } catch (InterruptedException e) { VoltDB.crashLocalVoltDB("Unable to create rejoin node Indicator", true, e); } }</code><technical_language>remove</technical_language>

Target:
public static void createRejoinNodeIndicator(ZooKeeper zk, String node) { try { zk.create(node, null, Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL); } catch (KeeperException e) { if (e.code() != KeeperException.Code.NODEEXISTS) { VoltDB.crashLocalVoltDB("Unable to create rejoin node Indicator", true, e); } } catch (InterruptedException e) { VoltDB.crashLocalVoltDB("Unable to create rejoin node Indicator", true, e); } }
Source:
<code>public <START> long <END> getAtsSearchUuid() { if (iWorldEditorProvider instanceof WorldEditorParameterSearchItemProvider) { WorldSearchItem worldSearchItem = ((WorldEditorParameterSearchItemProvider) iWorldEditorProvider).getWorldSearchItem(); if (worldSearchItem instanceof AtsSearchWorkflowSearchItem) { return ((AtsSearchWorkflowSearchItem) worldSearchItem).getSearchUuid(); } } return 0L; }</code><technical_language>long Long in this case? discussion making this consistent in code base. Is change now</technical_language>

Target:
public Long getAtsSearchUuid() { if (iWorldEditorProvider instanceof WorldEditorParameterSearchItemProvider) { WorldSearchItem worldSearchItem = ((WorldEditorParameterSearchItemProvider) iWorldEditorProvider).getWorldSearchItem(); if (worldSearchItem instanceof AtsSearchWorkflowSearchItem) { return ((AtsSearchWorkflowSearchItem) worldSearchItem).getSearchUuid(); } } return 0L; }
Source:
<code>public void testUpdateVirtualMachine() throws SecurityException, NoSuchMethodException, IOException { Invokable<?, ?> method = method(VirtualMachineApi.class, "updateVirtualMachine", String.class, UpdateVirtualMachineOptions.class); GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of("5", <START> UpdateVirtualMachineOptions.Builder.group("test"))); <END> assertRequestLineEquals(httpRequest, "GET http://localhost:8080/client/api?response=json&command=updateVirtualMachine&id=5&group=test HTTP/1.1"); assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n"); assertPayloadEquals(httpRequest, null, null, false); assertResponseParserClassEquals(method, httpRequest, ParseFirstJsonValueNamed.class); assertSaxResponseParserClassEquals(method, null); assertFallbackClassEquals(method, MapHttp4xxCodesToExceptions.class); checkFilters(httpRequest); }</code><technical_language>Add other properties too</technical_language>

Target:
public void testUpdateVirtualMachine() throws SecurityException, NoSuchMethodException, IOException { Invokable<?, ?> method = method(VirtualMachineApi.class, "updateVirtualMachine", String.class, UpdateVirtualMachineOptions.class); byte[] unencodedData = "userData".getBytes(Charset.forName("utf-8")); UpdateVirtualMachineOptions options = UpdateVirtualMachineOptions.Builder .displayName("disp").group("test").haEnable(true).osTypeId("osid").userData(unencodedData); GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of("5", options)); String base64UrlEncodedData = URLEncoder.encode(base64().encode(unencodedData), "utf-8"); assertRequestLineEquals(httpRequest, "GET http://localhost:8080/client/api?response=json&command=updateVirtualMachine" + "&id=5&displayname=disp&group=test&haenable=true&ostypeid=osid&userdata=" + base64UrlEncodedData + " HTTP/1.1"); assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n"); assertPayloadEquals(httpRequest, null, null, false); assertResponseParserClassEquals(method, httpRequest, ParseFirstJsonValueNamed.class); assertSaxResponseParserClassEquals(method, null); assertFallbackClassEquals(method, MapHttp4xxCodesToExceptions.class); checkFilters(httpRequest); }
Source:
<code>protected String getLocaleStringFromPath(final String path) { String result = null; <START> if (null != path) { <END> if (!path.startsWith("/")) { throw new IllegalArgumentException("Path should start with a '/'"); } String[] pathElements = path.substring(1).split("/"); File localeFile = new File(base, pathElements[0]); if (!localeFile.exists() || localeFile.isDirectory()) { result = pathElements[0]; } } return result; }</code><technical_language>Please "something <operator> null" convention</technical_language>

Target:
protected String getLocaleStringFromPath(final String path) { String result = null; if (path != null) { if (!path.startsWith("/")) { log.warn("Path should start with a '/'"); return null; } String[] pathElements = path.substring(1).split("/"); File localeFile = new File(base, pathElements[0]); if (!localeFile.exists() || localeFile.isDirectory()) { result = pathElements[0]; } } return result; }
Source:
<code>private void runAddOATag(final File inputSam, final File output, final File intervalList) throws IOException { final ArrayList<String> args = new ArrayList<String>(){ <START> { <END> add("INPUT=" + inputSam); add("OUTPUT=" + output); } }; if (intervalList != null) { args.add("INTERVAL_LIST=" + intervalList); } AddOATag addOATag = new AddOATag(); Assert.assertEquals(addOATag.instanceMain(args.toArray(new String[args.size()])), 0, "Running addOATag did not succeed"); }</code><technical_language>{{ .. add(...) ... }} is a pretty obscure initialize array. I currently done in picard code base. Instead I write: final List<String> args = new ArrayList<>(Arrays.asList("INPUT=" + inputSam, "OUTPUT=" + output));</technical_language>

Target:
private static void runAddOATag(final File inputSam, final File output, final File intervalList) throws IOException { final List<String> args = new ArrayList<>(Arrays.asList( "INPUT=" + inputSam, "OUTPUT=" + output )); if (intervalList != null) { args.add("INTERVAL_LIST=" + intervalList); } AddOATag addOATag = new AddOATag(); Assert.assertEquals(addOATag.instanceMain(args.toArray(new String[0])), 0, "Running addOATag did not succeed"); }
Source:
<code>protected void compensate() { try { if (isQuotaDependant()) { rollbackQuota(); } } catch (NullPointerException e) { log.debug("RollbackQuota: failed (may be because quota is disabled)", e); } if (!commandId.equals(getCompensationContext().getCommandId())) { return; } try { compensator.compensate(commandId, getClass().getName(), getCompensationContext()); } catch (Throwable t) { <START> log.error("Unable to compensate command {}: {}", commandId, ExceptionUtils.getRootCauseMessage(t)); <END> } }</code><technical_language>please log stack trace, if get this case, type of exception other RuntimeException - this is caught compensator.compensate(), unexpected exception lead this severe failure</technical_language>

Target:
protected void compensate() { try { if (isQuotaDependant()) { rollbackQuota(); } } catch (NullPointerException e) { log.debug("RollbackQuota: failed (may be because quota is disabled)", e); } if (!commandId.equals(getCompensationContext().getCommandId())) { return; } try { compensator.compensate(commandId, getClass().getName(), getCompensationContext()); } catch (Throwable t) { log.error("Unable to compensate command {}: {}", commandId, ExceptionUtils.getRootCauseMessage(t)); log.debug("Exception", t); } }
Source:
<code>public static MachineProvisioningLocation<? extends SshMachineLocation> createLocation(ManagementContext mgmt) { Location bestLocation = mgmt.getLocationRegistry().resolveIfPossible("named:ChefTests"); if (bestLocation==null) { log.info("using AWS for chef tests because named:ChefTests does not exist"); <START> bestLocation = mgmt.getLocationRegistry().resolveIfPossible("jclouds:aws-ec2"); <END> } if (bestLocation==null) { throw new IllegalStateException("Need a location called named:ChefTests or AWS configured for these tests"); } return (MachineProvisioningLocation<? extends SshMachineLocation>)bestLocation; }</code><technical_language>suggest explicit region (us-east-1)</technical_language>

Target:
public static MachineProvisioningLocation<? extends SshMachineLocation> createLocation(ManagementContext mgmt) { Location bestLocation = mgmt.getLocationRegistry().resolveIfPossible("named:ChefTests"); if (bestLocation==null) { log.info("using AWS for chef tests because named:ChefTests does not exist"); bestLocation = mgmt.getLocationRegistry().resolveIfPossible("jclouds:aws-ec2:us-east-1"); } if (bestLocation==null) { throw new IllegalStateException("Need a location called named:ChefTests or AWS configured for these tests"); } return (MachineProvisioningLocation<? extends SshMachineLocation>)bestLocation; }
Source:
<code>private TimeLockServices createNewClient(String client) { Preconditions.checkArgument(!client.equals(PaxosTimeLockConstants.LEADER_ELECTION_NAMESPACE), "The client name '%s' is reserved for the leader election service, and may not be " + "used.", PaxosTimeLockConstants.LEADER_ELECTION_NAMESPACE); if (servicesByClient.size() >= maxNumberOfClients.get()) { log.error( "Unable to create timelock services for client {}, as it would exceed the maximum number of " <START> + "allowed clients ({}).", <END> SafeArg.of("client", client), SafeArg.of("maxNumberOfClients", maxNumberOfClients)); throw new IllegalStateException("Maximum number of clients exceeded"); } return clientServicesFactory.apply(client); }</code><technical_language>nit: good include a bit of advice do if encounters this (e.g. "If this is intentional, please increase max-number-of-clients in runtime config.")</technical_language>

Target:
private TimeLockServices createNewClient(String client) { Preconditions.checkArgument(!client.equals(PaxosTimeLockConstants.LEADER_ELECTION_NAMESPACE), "The client name '%s' is reserved for the leader election service, and may not be " + "used.", PaxosTimeLockConstants.LEADER_ELECTION_NAMESPACE); if (servicesByClient.size() >= maxNumberOfClients.get()) { log.error( "Unable to create timelock services for client {}, as it would exceed the maximum number of " + "allowed clients ({}). If this is intentional, the maximum number of clients can be " + "increased via the maximum-number-of-clients runtime config property.", SafeArg.of("client", client), SafeArg.of("maxNumberOfClients", maxNumberOfClients)); throw new IllegalStateException("Maximum number of clients exceeded"); } return clientServicesFactory.apply(client); }
Source:
<code>private void analyzeTables() { if (Thread.holdsLock(database.isPersistent() ? this : database) <START> && tablesToAnalyze != null) { <END> HashSet<Table> tablesToAnalyzeLocal = tablesToAnalyze; tablesToAnalyze = null; int rowCount = getDatabase().getSettings().analyzeSample / 10; for (Table table : tablesToAnalyzeLocal) { Analyze.analyzeTable(this, table, rowCount, false); } database.unlockMeta(this); if (database.isMVStore()) { commit(true); } } }</code><technical_language>I cheaper tablesToAnalyze checked first. I understand isPersistent() is instead of isMVStore()</technical_language>

Target:
private void analyzeTables() { if (tablesToAnalyze != null && Thread.holdsLock(database.isMVStore() ? this : database)) { HashSet<Table> tablesToAnalyzeLocal = tablesToAnalyze; tablesToAnalyze = null; int rowCount = getDatabase().getSettings().analyzeSample / 10; for (Table table : tablesToAnalyzeLocal) { Analyze.analyzeTable(this, table, rowCount, false); } database.unlockMeta(this); if (database.isMVStore()) { commit(true); } } }
Source:
<code>public List<Artifact> uploadArtifactsBySpec(String uploadSpec, int numberOfThreads, File workspace, Multimap<String, String> buildProperties, ArtifactoryBuildInfoClientBuilder clientBuilder) throws Exception { Spec spec = this.getDownloadUploadSpec(uploadSpec, new UploadSpecValidator()); <START> try ( buildInfoClientsArray clients = new buildInfoClientsArray(numberOfThreads, clientBuilder) ) <END> { clients.buildBuildInfoClients(); ProducerRunnableBase[] producerRunnable = new ProducerRunnableBase[]{new SpecDeploymentProducer(spec, workspace, buildProperties)}; ConsumerRunnableBase[] consumerRunnables = new ConsumerRunnableBase[numberOfThreads]; for (int i = 0; i < clients.buildInfoClients.length; i++) { consumerRunnables[i] = new SpecDeploymentConsumer(clients.buildInfoClients[i]); } ProducerConsumerExecutor deploymentExecutor = new ProducerConsumerExecutor(log, producerRunnable, consumerRunnables, 10); deploymentExecutor.start(); Set<DeployDetails> deployedArtifacts = ((SpecDeploymentProducer) producerRunnable[0]).getDeployedArtifacts(); return convertDeployDetailsToArtifacts(deployedArtifacts); } }</code><technical_language>suggestion try (buildInfoClientsArray clients = new buildInfoClientsArray(numberOfThreads, clientBuilder)) {</technical_language>

Target:
public List<Artifact> uploadArtifactsBySpec(String uploadSpec, int numberOfThreads, File workspace, Multimap<String, String> buildProperties, ArtifactoryBuildInfoClientBuilder clientBuilder) throws Exception { Spec spec = this.getDownloadUploadSpec(uploadSpec, new UploadSpecValidator()); try (BuildInfoClientsArray clients = new BuildInfoClientsArray(numberOfThreads, clientBuilder)) { clients.buildBuildInfoClients(); ProducerRunnableBase[] producerRunnable = new ProducerRunnableBase[]{new SpecDeploymentProducer(spec, workspace, buildProperties)}; ConsumerRunnableBase[] consumerRunnables = new ConsumerRunnableBase[numberOfThreads]; for (int i = 0; i < clients.buildInfoClients.length; i++) { consumerRunnables[i] = new SpecDeploymentConsumer(clients.buildInfoClients[i]); } ProducerConsumerExecutor deploymentExecutor = new ProducerConsumerExecutor(log, producerRunnable, consumerRunnables, 10); deploymentExecutor.start(); Set<DeployDetails> deployedArtifacts = ((SpecDeploymentProducer) producerRunnable[0]).getDeployedArtifacts(); return convertDeployDetailsToArtifacts(deployedArtifacts); } }
Source:
<code>private void parseSecondArgWithoutDash(String arg, boolean passFileExists) { int delimiterIndex = arg.indexOf("="); if (isSetOrMergeAction() && delimiterIndex == -1 && !passFileExists) { <START> throw new IllegalArgumentException("Argument for set/concat action must be in format of key=value."); <END> } String key = getStringBeforeEqualChar(arg, delimiterIndex); String value = getStringAfterEqualChar(arg, delimiterIndex); if (!key.isEmpty()) { if (!value.isEmpty()) { parseSecondArgWithKeyValue(arg, key, value); } else if (isSetOrMergeAction() && getKey() == null) { engineConfigMap.setKey(key); engineConfigMap.setValue(value); } else if ((getConfigAction().equals(ConfigActionType.ACTION_GET) || getConfigAction().equals(ConfigActionType.ACTION_HELP)) && getKey() == null) { engineConfigMap.setKey(arg); } else { log.debug("parsing error: illegal argument " + arg + ". Skipping argument."); } } else { log.debug("parsing error: illegal argument " + arg + ", starts with '='. Skipping argument."); } }</code><technical_language>s/concat/merge</technical_language>

Target:
private void parseSecondArgWithoutDash(String arg, boolean passFileExists) { int delimiterIndex = arg.indexOf("="); if (isSetOrMergeAction() && delimiterIndex == -1 && !passFileExists) { throw new IllegalArgumentException("Argument for set/merge action must be in format of key=value."); } String key = getStringBeforeEqualChar(arg, delimiterIndex); String value = getStringAfterEqualChar(arg, delimiterIndex); if (!key.isEmpty()) { if (!value.isEmpty()) { parseSecondArgWithKeyValue(arg, key, value); } else if (isSetOrMergeAction() && getKey() == null) { engineConfigMap.setKey(key); engineConfigMap.setValue(value); } else if ((getConfigAction().equals(ConfigActionType.ACTION_GET) || getConfigAction().equals(ConfigActionType.ACTION_HELP)) && getKey() == null) { engineConfigMap.setKey(arg); } else { log.debug("parsing error: illegal argument " + arg + ". Skipping argument."); } } else { log.debug("parsing error: illegal argument " + arg + ", starts with '='. Skipping argument."); } }
Source:
<code>private String determineErrorMessage(final ProtocolResponseMessage message) { final String errorMessage; if (message.getOsgpException() == null) { <START> errorMessage = ""; <END> } else if (message.getOsgpException().getCause() == null) { errorMessage = message.getOsgpException().getMessage(); } else { errorMessage = message.getOsgpException().getCause().getMessage(); } return errorMessage; }</code><technical_language>return "" is</technical_language>

Target:
private String determineErrorMessage(final ProtocolResponseMessage message) { if (message.getOsgpException() == null) { return ""; } else if (message.getOsgpException().getCause() == null) { return message.getOsgpException().getMessage(); } else { return message.getOsgpException().getCause().getMessage(); } }
Source:
<code>public void destroy() { <START> if (runner != null) { <END> runner.close(); } runner = null; determinismChecker = null; }</code><technical_language>closeQuietly Airlift Closeables. handles null</technical_language>

Target:
public void destroy() { closeAllRuntimeException(runner); runner = null; determinismChecker = null; }
Source:
<code>private String getPropertyValue(final String envVariable, final Properties properties, final String defaultValue, final String property) { final String valueInEnvironment = System.getenv(envVariable); <START> if (Strings.isNullOrEmpty(valueInEnvironment)) { <END> return getPropertyValue(properties, defaultValue, property); } return valueInEnvironment; }</code><technical_language>simplified as: return Strings.isNullOrEmpty(valueInEnvironment)? getPropertyValue(properties, defaultValue, property) : valueInEnvironment;</technical_language>

Target:
private String getPropertyValue(final String envVariable, final Properties properties, final String defaultValue, final String property) { final String valueInEnvironment = System.getenv(envVariable); return (Strings.isNullOrEmpty(valueInEnvironment)) ? getPropertyValue(properties, defaultValue, property) : valueInEnvironment; }
Source:
<code>public boolean resolveConflictsOnMerge() { EntryMergePolicy policy = mergePolicy(); <START> return (policy instanceof MergePolicy && policy != MergePolicy.NONE) || policy != null; <END> }</code><technical_language>afraid this is equivalent policy != null, return false if policy == NONE. I suggest if (policy == NONE) return false; else return policy != null</technical_language>

Target:
public boolean resolveConflictsOnMerge() { EntryMergePolicy policy = mergePolicy(); if (policy == MergePolicy.NONE) return false; return policy != null; }
Source:
<code>public void init() { if (!executorStarted) { if (maxRunningTime > -1) { requeue(maxRunningTime); } try { executor.init(); this.executorStarted = true; <START> ServiceRegistry.get().register(org.kie.api.executor.ExecutorService.class.getSimpleName(), this); <END> } catch (ExecutorNotStartedException e) { this.executorStarted = false; } } }</code><technical_language>newly added ServiceRegistry.EXECUTOR_SERVICE here</technical_language>

Target:
public void init() { if (!executorStarted) { if (maxRunningTime > -1) { requeue(maxRunningTime); } try { executor.init(); this.executorStarted = true; ServiceRegistry.get().register(ServiceRegistry.EXECUTOR_SERVICE, this); } catch (ExecutorNotStartedException e) { this.executorStarted = false; } } }
Source:
<code>protected FixedLengthCharsetTransformingDecompressorStream(InputStream in, FixedLengthCharset fixedLengthCharset, long start, long end) throws IOException { super(in, new FixedLengthCharsetTransformingDecompressor(fixedLengthCharset)); <START> long skippedBytes = in.skip(start); <END> this.start = start; this.end = end; }</code><technical_language>unused</technical_language>

Target:
public FixedLengthCharsetTransformingDecompressorStream(InputStream in, FixedLengthCharset fixedLengthCharset, long start, long end) throws IOException { super(in, new FixedLengthCharsetTransformingDecompressor(fixedLengthCharset), 4096); ((Seekable) in).seek(start); this.start = start; this.end = end; }
Source:
<code>public double yieldFromPrice(double price, LocalDate settlementDate) { double accrualFactor = dayCount.relativeYearFraction(settlementDate, notional.getDate()); <START> if (yieldConvention.equals(DISCOUNT)) { <END> return (1.0d - price) / accrualFactor; } if (yieldConvention.equals(INTEREST_AT_MATURITY) || yieldConvention.equals(FRANCE_CD) || yieldConvention.equals(JAPAN_BILLS)) { return (1.0d / price - 1) / accrualFactor; } throw new UnsupportedOperationException("The convention " + yieldConvention.name() + " is not supported."); }</code><technical_language>Logic convention</technical_language>

Target:
public double yieldFromPrice(double price, LocalDate settlementDate) { double accrualFactor = dayCount.relativeYearFraction(settlementDate, notional.getDate()); return yieldConvention.yieldFromPrice(price, accrualFactor); }
Source:
<code>private static boolean isAttemptToRemovePermissionFromAnyoneOnPrivateComponent(GroupPermissionChange change, ProjectId projectId) { return projectId.isPrivate() && change.getOperation() == REMOVE <START> && ProjectPermissions.PUBLIC_PERMISSIONS.contains(change.getPermission()); <END> }</code><technical_language>current implementation, this method called isAttemptToRemovePublicPermissionToPrivateComponent. :exclamation: Change && ProjectPermissions.PUBLIC_PERMISSIONS.contains(change.getPermission()); && change.getGroupIdOrAnyone().isAnyone();</technical_language>

Target:
private static boolean isAttemptToRemovePermissionFromAnyoneOnPrivateComponent(GroupPermissionChange change, ProjectId projectId) { return projectId.isPrivate() && change.getOperation() == REMOVE && change.getGroupIdOrAnyone().isAnyone(); }
Source:
<code>private Map<User,UserInfo> getUserInfo(Collection<? extends Item> items) { Map<User,UserInfo> users = new HashMap<User,UserInfo>(); for (Item item : items) { for (Job<?, ?> job : item.getAllJobs()) { <START> if (job instanceof SCMTriggerItem) { <END> RunList<? extends Run<?, ?>> runs = job.getBuilds(); for (Run<?, ?> r : runs) { if (r instanceof RunWithSCM) { RunWithSCM<?,?> runWithSCM = (RunWithSCM<?,?>) r; for (ChangeLogSet<? extends Entry> c : runWithSCM.getChangeSets()) { for (Entry entry : c) { User user = entry.getAuthor(); UserInfo info = users.get(user); if (info == null) users.put(user, new UserInfo(user, job, r.getTimestamp())); else if (info.getLastChange().before(r.getTimestamp())) { info.project = job; info.lastChange = r.getTimestamp(); } } } } } } } } return users; }</code><technical_language>Why? do fact is a SCMTriggerItem</technical_language>

Target:
private Map<User,UserInfo> getUserInfo(Collection<? extends Item> items) { Map<User,UserInfo> users = new HashMap<User,UserInfo>(); for (Item item : items) { for (Job<?, ?> job : item.getAllJobs()) { RunList<? extends Run<?, ?>> runs = job.getBuilds(); for (Run<?, ?> r : runs) { if (r instanceof RunWithSCM) { RunWithSCM<?,?> runWithSCM = (RunWithSCM<?,?>) r; for (ChangeLogSet<? extends Entry> c : runWithSCM.getChangeSets()) { for (Entry entry : c) { User user = entry.getAuthor(); UserInfo info = users.get(user); if (info == null) users.put(user, new UserInfo(user, job, r.getTimestamp())); else if (info.getLastChange().before(r.getTimestamp())) { info.project = job; info.lastChange = r.getTimestamp(); } } } } } } } return users; }
Source:
<code>FileCommentPanel(SideBySide2 host, DiffTable table, String path, Side side) { this.parent = host; this.table = table; this.path = path; this.side = side; boxes = new ArrayList<CommentBox>(); <START> initWidget(body = new HTMLPanel("")); <END> }</code><technical_language>a FlowPanel</technical_language>

Target:
FileCommentPanel(SideBySide2 host, DiffTable table, String path, Side side) { this.parent = host; this.table = table; this.path = path; this.side = side; boxes = new ArrayList<CommentBox>(); initWidget(body = new FlowPanel()); }