auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void highlightSelectedText(String pageText) { if (this.selectionStart != this.selectionEnd) { int i = Math.min(this.selectionEnd, this.selectionStart); int j = Math.max(this.selectionEnd, this.selectionStart); String s = pageText.substring(i, j); int k = this.font.func_216863_a(pageText, 1, j, true); String s1 = pageText.substring(i, k); Point point = this.func_214194_c(pageText, i); <START> Point point1 = new Point(point.x, point.y + 9); <END> while(!s.isEmpty()) { int l = this.func_214216_b(s1, 114 - point.x); if (s.length() <= l) { point1.x = point.x + this.getTextWidth(s); this.drawSelectionBox(point, point1); break; } l = Math.min(l, s.length() - 1); String s2 = s.substring(0, l); char c0 = s.charAt(l); boolean flag = c0 == ' ' || c0 == '\n'; s = TextFormatting.getFormatString(s2) + s.substring(l + (flag ? 1 : 0)); s1 = TextFormatting.getFormatString(s2) + s1.substring(l + (flag ? 1 : 0)); point1.x = point.x + this.getTextWidth(s2 + " "); this.drawSelectionBox(point, point1); point.x = 0; point.y = point.y + 9; point1.y = point1.y + 9; } } }</code><technical_language>suggest more explanatory parameter names</technical_language>

Target:
private void highlightSelectedText(String pageText) { if (this.selectionStart != this.selectionEnd) { int i = Math.min(this.selectionEnd, this.selectionStart); int j = Math.max(this.selectionEnd, this.selectionStart); String s = pageText.substring(i, j); int k = this.font.func_216863_a(pageText, 1, j, true); String s1 = pageText.substring(i, k); Point point = StoneTabletUtils.createPointer(font, pageText, i); Point point1 = new Point(point.x, point.y + 9); while(!s.isEmpty()) { int l = StoneTabletUtils.sizeStringToWidth(font, s1, 114 - point.x); if (s.length() <= l) { point1.x = point.x + this.getTextWidth(s); this.drawSelectionBox(point, point1); break; } l = Math.min(l, s.length() - 1); String s2 = s.substring(0, l); char c0 = s.charAt(l); boolean flag = c0 == ' ' || c0 == '\n'; s = TextFormatting.getFormatString(s2) + s.substring(l + (flag ? 1 : 0)); s1 = TextFormatting.getFormatString(s2) + s1.substring(l + (flag ? 1 : 0)); point1.x = point.x + this.getTextWidth(s2 + " "); this.drawSelectionBox(point, point1); point.x = 0; point.y = point.y + 9; point1.y = point1.y + 9; } } }
Source:
<code>private boolean solrSpellcheckHasResults(QueryResponse solrResponse) { return solrResponse.getSpellCheckResponse() != null && solrResponse.getResults().size() == 0 <START> && solrResponse.getSpellCheckResponse().getCollatedResults().size() > 0; <END> }</code><technical_language>CollectionUtils.isNotEmpty. null-check size-check</technical_language>

Target:
private boolean solrSpellcheckHasResults(QueryResponse solrResponse) { return solrResponse.getSpellCheckResponse() != null && solrResponse.getResults().size() == 0 && CollectionUtils.isNotEmpty(solrResponse.getSpellCheckResponse().getCollatedResults()); }
Source:
<code>public CliFunctionResult executeFunction(FunctionContext<Object[]> context) { Object[] arguments = context.getArguments(); String[] includeRegions = (String[]) arguments[0]; Set<String> includeRegionsSet = null; if (includeRegions != null) { includeRegionsSet = new HashSet<>(Arrays.asList(includeRegions)); } String[] excludeRegions = (String[]) arguments[1]; Set<String> excludeRegionsSet = null; if (excludeRegions != null) { excludeRegionsSet = new HashSet<>(Arrays.asList(excludeRegions)); } boolean shouldReassignPrimaries = (boolean) arguments[2]; boolean isStatusCommand = false; if (arguments.length > 3) { isStatusCommand = (boolean) arguments[3]; } RestoreRedundancyResults results; try { RestoreRedundancyOperation redundancyOperation = context.getCache().getResourceManager().createRestoreRedundancyOperation(); redundancyOperation.includeRegions(includeRegionsSet); redundancyOperation.excludeRegions(excludeRegionsSet); if (isStatusCommand) { results = redundancyOperation.redundancyStatus(); } else { redundancyOperation.shouldReassignPrimaries(shouldReassignPrimaries); results = redundancyOperation.start().get(); } <START> } catch (Exception ex) { <END> return new CliFunctionResult(context.getMemberName(), CliFunctionResult.StatusState.ERROR, ex.toString()); } if (results.getStatus().equals(ERROR)) { return new CliFunctionResult(context.getMemberName(), CliFunctionResult.StatusState.ERROR, results.getMessage()); } return new CliFunctionResult(context.getMemberName(), results); }</code><technical_language>consider get rid of try/catch block, CliFunction handles exception thrown child in a uniform way</technical_language>

Target:
public CliFunctionResult executeFunction(FunctionContext<Object[]> context) { Object[] arguments = context.getArguments(); String[] includeRegions = (String[]) arguments[0]; Set<String> includeRegionsSet = null; if (includeRegions != null) { includeRegionsSet = new HashSet<>(Arrays.asList(includeRegions)); } String[] excludeRegions = (String[]) arguments[1]; Set<String> excludeRegionsSet = null; if (excludeRegions != null) { excludeRegionsSet = new HashSet<>(Arrays.asList(excludeRegions)); } boolean shouldReassignPrimaries = (boolean) arguments[2]; boolean isStatusCommand = (boolean) arguments[3]; RestoreRedundancyResults results; RestoreRedundancyOperation redundancyOperation = context.getCache().getResourceManager().createRestoreRedundancyOperation(); redundancyOperation.includeRegions(includeRegionsSet); redundancyOperation.excludeRegions(excludeRegionsSet); if (isStatusCommand) { results = redundancyOperation.redundancyStatus(); } else { redundancyOperation.shouldReassignPrimaries(shouldReassignPrimaries); results = redundancyOperation.start().join(); } if (results.getStatus().equals(ERROR)) { return new CliFunctionResult(context.getMemberName(), CliFunctionResult.StatusState.ERROR, results.getMessage()); } return new CliFunctionResult(context.getMemberName(), results); }
Source:
<code><START> protected int <END> getFontSize(String fontSizeExpression, EAttribute eAttribute, FontData defaultFontData) { int fontSize = defaultFontData.getHeight(); if (fontSizeExpression != null && !fontSizeExpression.isEmpty()) { Eval eval = new Eval(interpreter, variableManager); Integer fontSizeValue = eval.get(eAttribute, fontSizeExpression, Integer.class); if (fontSizeValue != null && fontSizeValue.intValue() != fontSize) { fontSize = fontSizeValue; } } return fontSize; }</code><technical_language>useful, this method of AbstractEEFLifecycleManager</technical_language>

Target:
private int getFontSize(String fontSizeExpression, EAttribute eAttribute, FontData defaultFontData) { int fontSize = defaultFontData.getHeight(); if (fontSizeExpression != null && !fontSizeExpression.isEmpty()) { Eval eval = new Eval(interpreter, variableManager); Integer fontSizeValue = eval.get(eAttribute, fontSizeExpression, Integer.class); if (fontSizeValue != null && fontSizeValue.intValue() != fontSize) { fontSize = fontSizeValue; } } return fontSize; }
Source:
<code>public int getWrapIndex (Array<Glyph> glyphs, int start) { int i = start - 1; for (; i >= 1; i--) if (!isWhitespace((char)glyphs.get(i).id)) break; for (; i >= 1; i--) { char ch = (char)glyphs.get(i).id; if (isWhitespace(ch) || isBreakChar(ch)) return i + 1; } for (i=0; i<start; i++) { char ch = (char)glyphs.get(i).id; if (!isWhitespace(ch)) return i; <START> } <END> return 0; }</code><technical_language>This fishy. code in this method: 1) start - 1 non-whitespace character. I remember why. 2) there, continues whitespace break character. If found, returns index of character whitespace break character. 3) new code starts 0 returns non-whitespace character. However, new code is encountered if whitespace break characters in step 2. is new code useful</technical_language>

Target:
public int getWrapIndex (Array<Glyph> glyphs, int start) { int i = start - 1; for (; i >= 1; i--) if (!isWhitespace((char)glyphs.get(i).id)) break; for (; i >= 1; i--) { char ch = (char)glyphs.get(i).id; if (isWhitespace(ch) || isBreakChar(ch)) return i + 1; } return 0; }
Source:
<code>public AgentRequestsStatus getRequestsStatus(BaragonRequest request, AgentRequestType requestType) { final Collection<BaragonAgentMetadata> agentMetadatas = loadBalancerDatastore.getAgentMetadata(request.getLoadBalancerService().getLoadBalancerGroups()); boolean success = true; for (BaragonAgentMetadata agentMetadata : agentMetadatas) { final String baseUrl = agentMetadata.getBaseAgentUri(); Optional<Long> maybePendingRequestTime = agentResponseDatastore.getPendingRequest(request.getLoadBalancerRequestId(), baseUrl); if (maybePendingRequestTime.isPresent()) { if ((System.currentTimeMillis() - maybePendingRequestTime.get()) > baragonMaxRequestTime) { <START> return AgentRequestsStatus.FAILURE; <END> } else { return AgentRequestsStatus.WAITING; } } final Optional<AgentResponseId> maybeAgentResponseId = agentResponseDatastore.getLastAgentResponseId(request.getLoadBalancerRequestId(), requestType, baseUrl); if (!maybeAgentResponseId.isPresent()) { return AgentRequestsStatus.WAITING; } final AgentResponseId agentResponseId = maybeAgentResponseId.get(); if ((agentResponseId.getAttempt() < baragonAgentMaxAttempts - 1) && !agentResponseId.isSuccess()) { return AgentRequestsStatus.RETRY; } else { success = success && agentResponseId.isSuccess(); } } return success ? AgentRequestsStatus.SUCCESS : AgentRequestsStatus.FAILURE; }</code><technical_language>good log this failed</technical_language>

Target:
public AgentRequestsStatus getRequestsStatus(BaragonRequest request, AgentRequestType requestType) { final Collection<BaragonAgentMetadata> agentMetadatas = loadBalancerDatastore.getAgentMetadata(request.getLoadBalancerService().getLoadBalancerGroups()); boolean success = true; for (BaragonAgentMetadata agentMetadata : agentMetadatas) { final String baseUrl = agentMetadata.getBaseAgentUri(); Optional<Long> maybePendingRequestTime = agentResponseDatastore.getPendingRequest(request.getLoadBalancerRequestId(), baseUrl); if (maybePendingRequestTime.isPresent()) { if ((System.currentTimeMillis() - maybePendingRequestTime.get()) > baragonAgentRequestTimeout) { LOG.info(String.format("Request %s reached maximum pending request time", request.getLoadBalancerRequestId())); return AgentRequestsStatus.FAILURE; } else { return AgentRequestsStatus.WAITING; } } final Optional<AgentResponseId> maybeAgentResponseId = agentResponseDatastore.getLastAgentResponseId(request.getLoadBalancerRequestId(), requestType, baseUrl); if (!maybeAgentResponseId.isPresent()) { return AgentRequestsStatus.WAITING; } final AgentResponseId agentResponseId = maybeAgentResponseId.get(); if ((agentResponseId.getAttempt() < baragonAgentMaxAttempts - 1) && !agentResponseId.isSuccess()) { return AgentRequestsStatus.RETRY; } else { success = success && agentResponseId.isSuccess(); } } return success ? AgentRequestsStatus.SUCCESS : AgentRequestsStatus.FAILURE; }
Source:
<code>public Set<InstanceConfig> getInstances(String state, String resourceTag) { <START> ResourceInfo resourceInfo = tagResourceInfoMap.get(resourceTag); <END> if (resourceInfo != null) { return resourceInfo.getInstances(state); } return null; }</code><technical_language>if multiple resources tag</technical_language>

Target:
public Set<InstanceConfig> getInstances(String state, String resourceTag) { ResourceInfo resourceInfo = tagToResourceMap.get(resourceTag); if (resourceInfo != null) { return resourceInfo.getInstances(state); } return null; }
Source:
<code>public void testVmPassesCpuSocketValidation() { setVmCpuValues(1, 1, 1); <START> assertThat(validator.validateCpuSockets(vm.getStaticData(), <END> COMPAT_VERSION_FOR_CPU_SOCKET_TEST), isValid()); }</code><technical_language>static :)</technical_language>

Target:
public void testVmPassesCpuSocketValidation() { setVmCpuValues(1, 1, 1); assertThat(VmValidator.validateCpuSockets(vm.getStaticData(), COMPAT_VERSION_FOR_CPU_SOCKET_TEST), isValid()); }
Source:
<code>private boolean isVariableHeight(int lineIndex) { if (styledText.wordWrap || styledText.visualWrap) { return true; } StyleRange[] styles = getStylesForLine(lineIndex); if (styles != null) { for (StyleRange style : styles) { <START> if (style.font != null <END> || (style.metrics != null && (style.metrics.ascent != 0 || style.metrics.descent != 0)) || style.rise != 0) { return true; } } } return false; }</code><technical_language>stick if (style.isVariableHeight()) { return true; } for this patch</technical_language>

Target:
private boolean isVariableHeight(int lineIndex) { if (styledText.wordWrap || styledText.visualWrap) { return true; } boolean variableHeight = false; StyleRange[] styles = getStylesForLine(lineIndex); if (styles != null) { for (StyleRange style : styles) variableHeight |= style.isVariableHeight(); } return variableHeight; }
Source:
<code>private EpochResult buildEpochResult(final double trainingLoss, final double testLoss) { <START> modelAccessor.getAndResetMetrics(); <END> return EpochResult.newBuilder() .addAppMetric(MetricKeys.TRAINING_LOSS, trainingLoss) .addAppMetric(MetricKeys.TEST_LOSS, testLoss) .build(); }</code><technical_language>move resetTracer()</technical_language>

Target:
private EpochResult buildEpochResult(final double trainingLoss, final double testLoss) { return EpochResult.newBuilder() .addAppMetric(MetricKeys.TRAINING_LOSS, trainingLoss) .addAppMetric(MetricKeys.TEST_LOSS, testLoss) .build(); }
Source:
<code>public PrimitiveField(Type type, int repetitionLevel, int definitionLevel, boolean required, RichColumnDescriptor descriptor, int id) { super(type, repetitionLevel, definitionLevel, required); <START> this.descriptor = descriptor; <END> this.id = id; }</code><technical_language>Please add requireNonNull for descriptor</technical_language>

Target:
public PrimitiveField(Type type, int repetitionLevel, int definitionLevel, boolean required, RichColumnDescriptor descriptor, int id) { super(type, repetitionLevel, definitionLevel, required); this.descriptor = requireNonNull(descriptor, "descriptor is required"); this.id = id; }
Source:
<code>private void init(Map<String, Object> properties) { if (properties == null || properties.isEmpty() || !properties.containsKey(ATLAS_CONFIG_DIR)) { <START> return; <END> } String atlasConfigDir = (String) properties.get(ATLAS_CONFIG_DIR); log.info("Atlas config dir is configured with: ", atlasConfigDir); try { File file = Files.createFile(Paths.get(atlasConfigDir, "atlas-application.properties")).toFile(); file.deleteOnExit(); try (BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file));) { for (Map.Entry<String, Object> entry : properties.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); log.info("Atlas property key:[{}] value:[{}]", key, value); bufferedWriter.write(key); bufferedWriter.write("="); bufferedWriter.write(value.toString()); bufferedWriter.newLine(); } } } catch (IOException e) { throw new RuntimeException(e); } System.setProperty(ATLAS_CONF, atlasConfigDir); log.info("System property is set as [{}]", ATLAS_CONF, atlasConfigDir); }</code><technical_language>throw exception IlleagalState</technical_language>

Target:
private void init(Map<String, Object> properties) { if (properties == null || properties.isEmpty() || !properties.containsKey(ATLAS_CONFIG_DIR)) { return; } String atlasConfigDir = (String) properties.get(ATLAS_CONFIG_DIR); LOG.info("Atlas config dir is configured with: ", atlasConfigDir); try { File file = Files.createFile(Paths.get(atlasConfigDir, "atlas-application.properties")).toFile(); file.deleteOnExit(); try (BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file));) { for (Map.Entry<String, Object> entry : properties.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); LOG.info("Atlas property key:[{}] value:[{}]", key, value); bufferedWriter.write(key); bufferedWriter.write("="); bufferedWriter.write(value.toString()); bufferedWriter.newLine(); } } } catch (IOException e) { throw new RuntimeException(e); } System.setProperty(ATLAS_CONF, atlasConfigDir); LOG.info("System property is set as [{}]", ATLAS_CONF, atlasConfigDir); }
Source:
<code>protected void validate() { boolean remote = fInfo.getSessionType() == SessionType.REMOTE; StringBuilder sb = new StringBuilder(); String hostBinary = fHostBinaryText.getText().trim(); if ( hostBinary.isEmpty() ) { sb.append( ( remote ) ? Messages.GdbDebugNewExecutableCommand_Host_binary_must_be_specified : Messages.GdbDebugNewExecutableCommand_Binary_must_be_specified ); } else { File file = new File( hostBinary ); if ( !file.exists() ) { sb.append( ( remote ) ? Messages.GdbDebugNewExecutableCommand_Host_binary_file_does_not_exist : Messages.GdbDebugNewExecutableCommand_Binary_file_does_not_exist ); } else if ( file.isDirectory() ) { sb.append( ( remote ) ? Messages.GdbDebugNewExecutableCommand_Invalid_host_binary : Messages.GdbDebugNewExecutableCommand_Invalid_binary ); } } if ( fTargetBinaryText != null ) { if ( fTargetBinaryText.getText().trim().length() == 0 ) { if ( sb.length() != 0 ) { sb.append( "\n " ); } sb.append( Messages.GdbDebugNewExecutableCommand_Binary_on_target_must_be_specified ); } } if (fStopInMain != null && fStopInMainSymbol != null) { String mainSymbol = fStopInMainSymbol.getText().trim(); if (fStopInMain.getSelection() && mainSymbol.length() == 0) { <START> sb.append("\n "); END> sb.append(LaunchMessages.getString("CDebuggerTab.Stop_on_startup_at_can_not_be_empty")); } } setErrorMessage( ( sb.length() != 0 ) ? sb.toString() : null ); getButton( IDialogConstants.OK_ID ).setEnabled( getErrorMessage() == null ); }</code><technical_language>is a if ( sb.length() != 0 ) { missing this newline insertion. Test case is if executable is set, symbol is empty</technical_language>

Target:
protected void validate() { boolean remote = fInfo.getSessionType() == SessionType.REMOTE; StringBuilder sb = new StringBuilder(); String hostBinary = fHostBinaryText.getText().trim(); if ( hostBinary.isEmpty() ) { sb.append( ( remote ) ? Messages.GdbDebugNewExecutableCommand_Host_binary_must_be_specified : Messages.GdbDebugNewExecutableCommand_Binary_must_be_specified ); } else { File file = new File( hostBinary ); if ( !file.exists() ) { sb.append( ( remote ) ? Messages.GdbDebugNewExecutableCommand_Host_binary_file_does_not_exist : Messages.GdbDebugNewExecutableCommand_Binary_file_does_not_exist ); } else if ( file.isDirectory() ) { sb.append( ( remote ) ? Messages.GdbDebugNewExecutableCommand_Invalid_host_binary : Messages.GdbDebugNewExecutableCommand_Invalid_binary ); } } if ( fTargetBinaryText != null ) { if ( fTargetBinaryText.getText().trim().length() == 0 ) { if ( sb.length() != 0 ) { sb.append( "\n " ); } sb.append( Messages.GdbDebugNewExecutableCommand_Binary_on_target_must_be_specified ); } } if (fStopInMain != null && fStopInMainSymbol != null) { String mainSymbol = fStopInMainSymbol.getText().trim(); if (fStopInMain.getSelection() && mainSymbol.length() == 0) { if (sb.length() > 0) { sb.append("\n "); } sb.append(LaunchMessages.getString("CDebuggerTab.Stop_on_startup_at_can_not_be_empty")); } } setErrorMessage( ( sb.length() != 0 ) ? sb.toString() : null ); getButton( IDialogConstants.OK_ID ).setEnabled( getErrorMessage() == null ); }
Source:
<code>public void getCapabilitiesGetRequestWorksWithCORS() throws IOException { String url = wpsUrl + "?Service=WPS&Request=GetCapabilities"; method = new GetMethod(url); method.addRequestHeader("Origin", randomOrigin); int code = client.executeMethod(method); assertThat(code, is(equalTo(200))); Header acaoHeader = method.getResponseHeader("Access-Control-Allow-Origin"); <START> assertThat(acaoHeader.toString(), containsString(randomOrigin.toString())); <END> }</code><technical_language>If CORS is activated, this throws a NPE. I recommend add assertNotNull statement</technical_language>

Target:
public void getCapabilitiesGetRequestWorksWithCORS() throws IOException { String url = wpsUrl + "?Service=WPS&Request=GetCapabilities"; method = new GetMethod(url); method.addRequestHeader("Origin", randomOrigin); int code = client.executeMethod(method); assertThat(code, is(equalTo(200))); Header acaoHeader = method.getResponseHeader("Access-Control-Allow-Origin"); assertNotNull(acaoHeader); assertThat(acaoHeader.toString(), containsString(randomOrigin.toString())); }
Source:
<code>private void stopBackgroundFetch() { if (fetchStarted.compareAndSet(true, false)) { <START> log.info( <END> "Stopping scheduled fetch for stream[%s] partition[%s]", streamPartition.getStream(), streamPartition.getPartitionId() ); } }</code><technical_language>worth canceling a ScheduledFuture for fetchRecords() called in assign()</technical_language>

Target:
private void stopBackgroundFetch() { if (fetchStarted.compareAndSet(true, false)) { log.debug( "Stopping scheduled fetch for stream[%s] partition[%s]", streamPartition.getStream(), streamPartition.getPartitionId() ); if (currentFetch != null && !currentFetch.isDone()) { currentFetch.cancel(true); } } }
Source:
<code><START> Id getDuplicateMetricId(MessageDescription messageDescription) { <END> return registry.createId("echo.pubsub.duplicateMessages") .withTag("subscription", messageDescription.getSubscriptionName()) .withTag("pubsubSystem", messageDescription.getPubsubSystem().toString()); }</code><technical_language>a fan of this, more metrics for other paths here, number of messages nacked, etc. give confidence inefficient anywhere</technical_language>

Target:
private Id getDuplicateMetricId(MessageDescription messageDescription) { return registry.createId("echo.pubsub.duplicateMessages") .withTag("subscription", messageDescription.getSubscriptionName()) .withTag("pubsubSystem", messageDescription.getPubsubSystem().toString()); }
Source:
<code>public final void actionPerformed(final AnActionEvent e) { MainWindow mainWindow = new MainWindow(); Project project = e.getProject(); if (project != null) { ToolWindowManager.getInstance(e.getProject()). <START> getToolWindow(mainWindow.KODEBEAGLE).show(new Runnable() { <END> @Override public void run() { try { new RefreshAction().init(); } catch (IOException ioe) { ioe.printStackTrace(); } } }); } }</code><technical_language>access static variables MainWindow.KODEBEAGLE</technical_language>

Target:
public final void actionPerformed(final AnActionEvent e) { Project project = e.getProject(); if (project != null) { ToolWindowManager.getInstance(e.getProject()). getToolWindow(MainWindow.KODEBEAGLE).show(new Runnable() { @Override public void run() { try { new RefreshAction().init(); } catch (IOException ioe) { ioe.printStackTrace(); } } }); } }
Source:
<code>public void setBlog(@Nullable final Blog blog) { mBlogLocalId = BlogUtils.getBlogLocalId(blog); refreshBlogDetails(blog); <START> PlansUtils.downloadAvailablePlansForSite(false, blog, null); <END> }</code><technical_language>avoid downloading plan data user clicks Plan item</technical_language>

Target:
public void setBlog(@Nullable final Blog blog) { mBlogLocalId = BlogUtils.getBlogLocalId(blog); refreshBlogDetails(blog); }
Source:
<code>private SchedulerBase createSchedulerAndEnableCheckpointing( CheckpointIDCounter counter, CompletedCheckpointStore store) throws Exception { final Time timeout = Time.days(1L); JobVertex jobVertex = new JobVertex("MockVertex"); jobVertex.setInvokableClass(AbstractInvokable.class); final SchedulerBase scheduler = SchedulerTestingUtils.newSchedulerBuilder(new JobGraph(jobVertex)) .setRpcTimeout(timeout) .build(); scheduler.start(ComponentMainThreadExecutorServiceAdapter.forMainThread()); CheckpointCoordinatorConfiguration chkConfig = new CheckpointCoordinatorConfiguration( 100, 100, 100, 1, CheckpointRetentionPolicy.NEVER_RETAIN_AFTER_TERMINATION, true, false, false, 0); <START> scheduler.getExecutionGraph().enableCheckpointing( <END> chkConfig, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), counter, store, new MemoryStateBackend(), CheckpointStatsTrackerTest.createTestTracker()); return scheduler; }</code><technical_language>do want call enableCheckpointing EG? JobCheckpointingSettings in JobGraph instead in ArchivedExecutionGraphTest</technical_language>

Target:
private SchedulerBase createSchedulerAndEnableCheckpointing( CheckpointIDCounter counter, CompletedCheckpointStore store) throws Exception { final Time timeout = Time.days(1L); final JobVertex jobVertex = new JobVertex("MockVertex"); jobVertex.setInvokableClass(AbstractInvokable.class); final JobGraph jobGraph = new JobGraph(jobVertex); final CheckpointCoordinatorConfiguration chkConfig = new CheckpointCoordinatorConfiguration( 100, 100, 100, 1, CheckpointRetentionPolicy.NEVER_RETAIN_AFTER_TERMINATION, true, false, false, 0); final JobCheckpointingSettings checkpointingSettings = new JobCheckpointingSettings( Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), chkConfig, null); jobGraph.setSnapshotSettings(checkpointingSettings); final SchedulerBase scheduler = SchedulerTestingUtils.newSchedulerBuilder(jobGraph) .setCheckpointRecoveryFactory(new TestingCheckpointRecoveryFactory(store, counter)) .setRpcTimeout(timeout) .build(); scheduler.initialize(ComponentMainThreadExecutorServiceAdapter.forMainThread()); return scheduler; }
Source:
<code>void recipeFuelBurnerItem() { addRecipe(findItemStack("Small Fuel Burner"), " ", " Cc", " ", Character.valueOf('C'), findItemStack("Combustion Chamber"), Character.valueOf('c'), findItemStack("Copper Thermal Cable")); addRecipe(findItemStack("Medium Fuel Burner"), " ", " Cc", " ", <START> Character.valueOf('C'), findItemStack("Combustion Chamber", 2), <END> Character.valueOf('c'), findItemStack("Copper Thermal Cable")); addRecipe(findItemStack("Medium Fuel Burner"), " ", " Cc", " ", Character.valueOf('C'), findItemStack("Combustion Chamber", 4), Character.valueOf('c'), findItemStack("Copper Thermal Cable")); }</code><technical_language>This work; require multiple chambers in slot. Try spreading out</technical_language>

Target:
void recipeFuelBurnerItem() { addRecipe(findItemStack("Small Fuel Burner"), " ", " Cc", " ", Character.valueOf('C'), findItemStack("Combustion Chamber"), Character.valueOf('c'), findItemStack("Copper Thermal Cable")); addRecipe(findItemStack("Medium Fuel Burner"), " ", " Cc", " C ", Character.valueOf('C'), findItemStack("Combustion Chamber"), Character.valueOf('c'), findItemStack("Copper Thermal Cable")); addRecipe(findItemStack("Medium Fuel Burner"), " ", "CCc", "CC ", Character.valueOf('C'), findItemStack("Combustion Chamber"), Character.valueOf('c'), findItemStack("Copper Thermal Cable")); }
Source:
<code>void testCloserCallOneClose() throws IOException, InterruptedException { Injector i = createInjector(); final Closer closer = i.getInstance(Closer.class); <START> assert closer.getState() == Closer.State.OPEN; <END> Closeable closeable = EasyMock.createMock(Closeable.class); closeable.close(); EasyMock.expectLastCall().times(1); EasyMock.replay(closeable); closer.addToClose(closeable); Runnable close = new Runnable() { @Override public void run() { try { closer.close(); } catch (IOException e) { assert false; } } }; Thread thread1 = new Thread(close); Thread thread2 = new Thread(close); thread1.start(); thread2.start(); thread1.join(); thread2.join(); EasyMock.verify(closeable); assert closer.getState() == Closer.State.CLOSED; }</code><technical_language>This assert is necessary, other tests verify closer starts in state OPEN. I final is needed either</technical_language>

Target:
void testCloserCallOneClose() throws IOException, InterruptedException { Injector i = createInjector(); final Closer closer = i.getInstance(Closer.class); Closeable closeable = createStrictMock(Closeable.class); closeable.close(); expectLastCall(); replay(closeable); closer.addToClose(closeable); Runnable closeContext = new Runnable() { @Override public void run() { try { closer.close(); } catch (IOException e) { assert false : e.getMessage(); } } }; Thread thread1 = new Thread(closeContext); Thread thread2 = new Thread(closeContext); thread1.start(); thread2.start(); thread1.join(); thread2.join(); verify(closeable); assert closer.getState() == Closer.State.DONE; }
Source:
<code><START> private String tagsUrl(ListRefsRequest<TagInfo> lrr) { <END> if (lrr.getLimit() != 0) { query = UrlUtils.appendToUrlQuery(query, "n=" + lrr.getLimit()); } if (lrr.getStart() != 0) { query = UrlUtils.appendToUrlQuery(query, "s=" + lrr.getStart()); } if (!Strings.isNullOrEmpty(lrr.getSubstring()) || !Strings.isNullOrEmpty(lrr.getRegex())) { throw new NotImplementedException(); } String url = "/tags"; if (!Strings.isNullOrEmpty(query)) { url += '?' + query; } return url; }</code><technical_language>This wrong</technical_language>

Target:
private String tagsUrl(ListRefsRequest<TagInfo> lrr) { String query = ""; if (lrr.getLimit() != 0) { query = UrlUtils.appendToUrlQuery(query, "n=" + lrr.getLimit()); } if (lrr.getStart() != 0) { query = UrlUtils.appendToUrlQuery(query, "s=" + lrr.getStart()); } if (!Strings.isNullOrEmpty(lrr.getSubstring()) || !Strings.isNullOrEmpty(lrr.getRegex())) { throw new NotImplementedException(); } String url = "/tags"; if (!Strings.isNullOrEmpty(query)) { url += '?' + query; } return url; }
Source:
<code>public String getNetworkId (ClaudiaData claudiaData, NetworkInstance network, String region) { String networkId = null; try { List<NetworkInstance> loadAllNetworks = this.loadAllNetwork(claudiaData, region); for (NetworkInstance net : loadAllNetworks) { if (net.getNetworkName().equals(network.getNetworkName())) { if (net.getShared()) { networkId = net.getIdNetwork(); } else if (net.getTenantId().equals(claudiaData.getVdc())){ <START> networkId = net.getIdNetwork(); <END> } } } } catch (InfrastructureException e) { return networkId; } return networkId; }</code><technical_language>executing code previous conditional sentence _(if)_. Is correct? Is a **OR** clause</technical_language>

Target:
public String getNetworkId (ClaudiaData claudiaData, NetworkInstance network, String region) { String networkId = null; try { List<NetworkInstance> loadAllNetworks = this.loadAllNetwork(claudiaData, region); for (NetworkInstance net : loadAllNetworks) { if (net.getNetworkName().equals(network.getNetworkName()) && (net.getShared() || net.getTenantId().equals(claudiaData.getVdc()))) { networkId = net.getIdNetwork(); } } } catch (InfrastructureException e) { return networkId; } return networkId; }
Source:
<code>private void mergeValue() throws Exception { String key = parser.getKey(); String value = parser.getValue(); if(!keysConfig.getBoolean(key + "/" + MERGABLE_TOKEN, false)) { console.writeFormat(MERGE_NOT_SUPPORTED_MSG, key); console.writeLine(); return; } String version = parser.getVersion(); if (version == null) { version = startVersionDialog(key); } ConfigKey configKey = fetchConfigKey(key, version); if (configKey != null && configKey.getKey() != null && configKey.getDisplayValue().trim().length() > 0) { String valueInDb = configKey.getDisplayValue().trim(); String delimiter = keysConfig.getString(key + "/" + DELIMITER_TOKEN, ";"); value = concatenatedValues(value, valueInDb, delimiter); if(valueInDb.equals(value)) { console.writeFormat(MERGE_SAME_VALUE_MSG); console.writeLine(); return; } } if (!persist(key, value, version)) { <START> log.debug("setValue: <END> error concatenating " + key + "'s value. No such entry" + (version == null ? "" : " with version " + version) + "."); throw new IllegalArgumentException("Error setting " + key + "'s value. No such entry" + (version == null ? "" : " with version " + version) + "."); } }</code><technical_language>Message declared other messages teh relevant place holders for parameters debugFormat instead save '+' concatenations ? Yes, I exists in code , for new code (and I submit a separate patch issuing pushing this in...)</technical_language>

Target:
private void mergeValue() throws Exception { String key = parser.getKey(); String value = parser.getValue(); if(!keysConfig.getBoolean(key + "/" + MERGABLE_TOKEN, false)) { console.writeFormat(MERGE_NOT_SUPPORTED_MSG, key); console.writeLine(); return; } String version = parser.getVersion(); if (version == null) { version = startVersionDialog(key); } ConfigKey configKey = fetchConfigKey(key, version); if (configKey != null && configKey.getKey() != null && configKey.getDisplayValue().trim().length() > 0) { String valueInDb = configKey.getDisplayValue().trim(); String delimiter = keysConfig.getString(key + "/" + DELIMITER_TOKEN, ";"); value = concatenatedValues(value, valueInDb, delimiter); if(valueInDb.equals(value)) { console.writeFormat(MERGE_SAME_VALUE_MSG); console.writeLine(); return; } } if (!persist(key, value, version)) { String msg = MessageFormat.format(MERGE_PERSIST_ERR_MSG, key, (version == null ? "" : " with version " + version) + "."); log.debug(msg); throw new IllegalArgumentException(msg); } }
Source:
<code>public Kompile(KompileOptions kompileOptions, FileUtil files, KExceptionManager kem, boolean cacheParses) { <START> this.files = files; <END> this.kem = kem; this.kompileOptions = kompileOptions; this.parser = new ParserUtils(files, kem, kompileOptions.global); this.cacheParses = cacheParses; this.loader = new BinaryLoader(kem); this.sw = new Stopwatch(kompileOptions.global); }</code><technical_language>this constructor this() above</technical_language>

Target:
public Kompile(KompileOptions kompileOptions, FileUtil files, KExceptionManager kem, boolean cacheParses) { this(kompileOptions, files, kem, new Stopwatch(kompileOptions.global), cacheParses); }
Source:
<code>private boolean isValidLink(final String link) { try { final long starTime = System.currentTimeMillis(); if (!CACHE_ANALYZED_LINKS.containsKey(link)) { final URL url = new URL(link); final HttpURLConnection urlConn = (HttpURLConnection) url.openConnection(); urlConn.setConnectTimeout(Integer.getInteger("sun.net.client.defaultConnectTimeout", 5000)); int attempt = 0; <START> while (true) <END> { try { urlConn.connect(); CACHE_ANALYZED_LINKS.put(link, urlConn.getResponseCode()); break; } catch (IOException e) { LOG.warn(String.format("Attempt [%s/%s]: '%s' exception connecting to %s", ++attempt, RETRY_ATTEMPTS_NUM, e.getMessage(), link)); if (attempt == RETRY_ATTEMPTS_NUM) throw e; } finally { urlConn.disconnect(); } } } final boolean validLink = ACCEPTED_RESPONSE_CODE.contains(CACHE_ANALYZED_LINKS.get(link)); if (validLink) LOG.debug(String.format("Response code %d for %s [%dms]", CACHE_ANALYZED_LINKS.get(link), link, System.currentTimeMillis() - starTime)); else LOG.error(String.format("Response code %d for %s [%dms]", CACHE_ANALYZED_LINKS.get(link), link, System.currentTimeMillis() - starTime)); return validLink; } catch (IOException e) { LOG.error(String.format("'%s' exception connecting to %s", e.getMessage(), link)); return false; } }</code><technical_language>I recommend this infinite loops. delay calls, this is over-kill. [Awaitily](<LINK_1> do this kind of checks a max time max retries consider a process Success, define delay attempts. in xavier-integration/EndToEndTests : <LINK_2></technical_language>

Target:
private boolean isValidLink(final String link) { try { final long starTime = System.currentTimeMillis(); if (!CACHE_ANALYZED_LINKS.containsKey(link)) { final URL url = new URL(link); final HttpURLConnection urlConn = (HttpURLConnection) url.openConnection(); urlConn.setConnectTimeout(Integer.getInteger("sun.net.client.defaultConnectTimeout", 5000)); with() .pollDelay(Duration.ZERO) .pollInterval(LINK_POLL_INTERVAL_DURATION) .await() .atMost(LINK_POLL_AT_MOST_DURATION) .until(() -> { try { urlConn.connect(); return true; } catch (IOException e) { LOG.warn(String.format("'%s' exception connecting to %s", e.getMessage(), link)); return false; } finally { urlConn.disconnect(); } }); CACHE_ANALYZED_LINKS.put(link, urlConn.getResponseCode()); } final boolean validLink = ACCEPTED_RESPONSE_CODE.contains(CACHE_ANALYZED_LINKS.get(link)); if (validLink) LOG.debug(String.format("Response code %d for %s [%dms]", CACHE_ANALYZED_LINKS.get(link), link, System.currentTimeMillis() - starTime)); else LOG.error(String.format("Response code %d for %s [%dms]", CACHE_ANALYZED_LINKS.get(link), link, System.currentTimeMillis() - starTime)); return validLink; } catch (IOException | ConditionTimeoutException e) { LOG.error(String.format("'%s' exception connecting to %s", e.getMessage(), link)); return false; } }
Source:
<code>private BinaryContent writeWorkbook(Workbook workbook) { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); try { workbook.write(byteArrayOutputStream); } catch (IOException e) { <START> LOGGER.warn("There was a problem writing the XLSX file.", e); <END> } return new BinaryContentImpl( new ByteArrayInputStream(byteArrayOutputStream.toByteArray()), mimeType); }</code><technical_language>logging level for this is more debug</technical_language>

Target:
private static BinaryContent writeWorkbook(Workbook workbook) { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); try { workbook.write(byteArrayOutputStream); } catch (IOException e) { LOGGER.debug("There was a problem writing the XLSX file.", e); } return new BinaryContentImpl( new ByteArrayInputStream(byteArrayOutputStream.toByteArray()), mimeType); }
Source:
<code><START> public void setEndTime_afterComputeAggregates_resetsAreAggregatesComputed() <END> { DayActivity dayActivityMock = mock(DayActivity.class); Activity activity = createActivity("21:30", "21:31"); activity.setDayActivity(dayActivityMock); activity.setEndTime(activity.getEndTime().plusMinutes(5)); verify(dayActivityMock, atLeastOnce()).resetAggregatesComputed(); }</code><technical_language>method afterComputeAggregates, computeAggregates is called. safer do so, some day call resetAggregatesComputed if aggregates computed</technical_language>

Target:
public void setEndTime_afterComputeAggregates_resetsAreAggregatesComputed() { DayActivity dayActivityMock = mock(DayActivity.class); Activity activity = createActivity("21:30", "21:31"); activity.setDayActivity(dayActivityMock); dayActivityMock.computeAggregates(); activity.setEndTime(activity.getEndTime().plusMinutes(5)); verify(dayActivityMock, atLeastOnce()).resetAggregatesComputed(); }
Source:
<code>StackView(final List<Long> quantities, final double width, final Long max) { double rectangleWidth = width * SPACING_SCALE; Rectangle reference = new Rectangle(); reference.setHeight(VERTICAL_SCALE); reference.setWidth(rectangleWidth); <START> reference.setStyle(FX_FILL + ColorUtils.webCode(defaultColor)); <END> Rectangle insertion = new Rectangle(); insertion.setHeight(VERTICAL_SCALE * quantities.get(1) / max); insertion.setWidth(rectangleWidth); insertion.setStyle(FX_FILL + ColorUtils.webCode(Mutation.INSERTION.getColor())); Rectangle deletion = new Rectangle(); deletion.setLayoutY(insertion.getHeight()); deletion.setHeight(VERTICAL_SCALE * quantities.get(2) / max); deletion.setWidth(rectangleWidth); deletion.setStyle(FX_FILL + ColorUtils.webCode(Mutation.DELETION.getColor())); Rectangle polymorphism = new Rectangle(); polymorphism.setLayoutY(insertion.getHeight() + deletion.getHeight()); polymorphism.setHeight(VERTICAL_SCALE * quantities.get(3) / max); polymorphism.setWidth(rectangleWidth); polymorphism.setStyle(FX_FILL + ColorUtils.webCode(Mutation.POLYMORPHISM.getColor())); getChildren().addAll(reference, insertion, deletion, polymorphism); }</code><technical_language>setFill</technical_language>

Target:
StackView(final List<Long> quantities, final double width, final Long max) { rectangleWidth = width * SPACING_SCALE; getChildren().add(drawPart(VERTICAL_SCALE, 0.0, defaultColor)); List<Paint> colors = Arrays.asList(Mutation.INSERTION.getColor(), Mutation.DELETION.getColor(), Mutation.POLYMORPHISM.getColor()); double offset = 0.0; for (int index = 1; index <= 3; index++) { double height = VERTICAL_SCALE * quantities.get(index) / max; getChildren().add(drawPart(height, offset, colors.get(index - 1))); offset += height; } }
Source:
<code>private Header readHeaders() throws IOException { Header h = new Header(); String line; while ((line = in.readString()) != PacketLineIn.END) { if (line.startsWith("restart ")) h.restartToken = line.substring("restart ".length()); else if (line.startsWith("last-pack-number ")) <START> h.lastPackId = line.substring("last-pack-number ".length()); <END> } return h; }</code><technical_language>this "last-pack-id"</technical_language>

Target:
private Header readHeaders() throws IOException { Header h = new Header(); String line; while ((line = in.readString()) != PacketLineIn.END) { if (line.startsWith("restart ")) h.restartToken = line.substring("restart ".length()); else if (line.startsWith("last-pack-id ")) h.lastPackId = line.substring("last-pack-id ".length()); } return h; }
Source:
<code>public boolean isElementInViewPort(WebElement element) { int offset = getOffset(); try { return (Boolean) js.executeScript( "return ($(window).scrollTop() + " + offset + " < $(arguments[0]).offset().top) && ($(window).scrollTop() " + "+ $(window).height() > $(arguments[0]).offset().top + $(arguments[0]).height() + " + offset + ")", element); <START> } catch (Exception e) { <END> String windowScrollTop = "((window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement " + "|| document.body.parentNode || document.body).scrollTop)"; String elementOffsetTop = "(arguments[0]).offsetTop"; String windowHeight = "(window.innerHeight)"; String elementOuterHeight = "(arguments[0]).clientHeight"; return (boolean) js.executeScript("return (" + windowScrollTop + " + " + offset + " < " + elementOffsetTop + " && " + windowScrollTop + " + " + windowHeight + " > " + elementOffsetTop + " + " + elementOuterHeight + " + " + offset + ")", element); } }</code><technical_language>WebDriverException</technical_language>

Target:
public boolean isElementInViewPort(WebElement element) { int offset = getOffset(); try { return (Boolean) js.executeScript( "return ($(window).scrollTop() + " + offset + " < $(arguments[0]).offset().top) && ($(window).scrollTop() " + "+ $(window).height() > $(arguments[0]).offset().top + $(arguments[0]).height() + " + offset + ")", element); } catch (WebDriverException e) { String windowScrollTop = "((window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement " + "|| document.body.parentNode || document.body).scrollTop)"; String elementOffsetTop = "(arguments[0]).offsetTop"; String windowHeight = "(window.innerHeight)"; String elementOuterHeight = "(arguments[0]).clientHeight"; return (boolean) js.executeScript("return (" + windowScrollTop + " + " + offset + " < " + elementOffsetTop + " && " + windowScrollTop + " + " + windowHeight + " > " + elementOffsetTop + " + " + elementOuterHeight + " + " + offset + ")", element); } }
Source:
<code>public void testContainerWithHostConfig() throws Exception { assumeTrue("Docker API should be at least v1.18 to support Container Creation with HostConfig, got " <START> + sut.version().apiVersion(), versionCompare(sut.version().apiVersion(), "1.18") >= 0); <END> sut.pull("busybox"); final boolean privileged = true; final boolean publishAllPorts = true; final String dns = "1.2.3.4"; final HostConfig expected = HostConfig.builder() .privileged(privileged) .publishAllPorts(publishAllPorts) .dns(dns) .cpuShares((long) 4096) .build(); final ContainerConfig config = ContainerConfig.builder() .image("busybox") .hostConfig(expected) .build(); final String name = randomName(); final ContainerCreation creation = sut.createContainer(config, name); final String id = creation.id(); sut.startContainer(id); final HostConfig actual = sut.inspectContainer(id).hostConfig(); assertThat(actual.privileged(), equalTo(expected.privileged())); assertThat(actual.publishAllPorts(), equalTo(expected.publishAllPorts())); assertThat(actual.dns(), equalTo(expected.dns())); }</code><technical_language>nitpick: line + " above</technical_language>

Target:
public void testContainerWithHostConfig() throws Exception { assumeTrue("Docker API should be at least v1.18 to support Container Creation with " + "HostConfig, got " + sut.version().apiVersion(), versionCompare(sut.version().apiVersion(),"1.18") >= 0); sut.pull("busybox"); final boolean privileged = true; final boolean publishAllPorts = true; final String dns = "1.2.3.4"; final HostConfig expected = HostConfig.builder() .privileged(privileged) .publishAllPorts(publishAllPorts) .dns(dns) .cpuShares((long) 4096) .build(); final ContainerConfig config = ContainerConfig.builder() .image("busybox") .hostConfig(expected) .build(); final String name = randomName(); final ContainerCreation creation = sut.createContainer(config, name); final String id = creation.id(); sut.startContainer(id); final HostConfig actual = sut.inspectContainer(id).hostConfig(); assertThat(actual.privileged(), equalTo(expected.privileged())); assertThat(actual.publishAllPorts(), equalTo(expected.publishAllPorts())); assertThat(actual.dns(), equalTo(expected.dns())); }
Source:
<code>private void setVolumeSync(float volumeLeft, float volumeRight) { playerLock.lock(); <START> if (media != null && media.getMediaType() == MediaType.AUDIO) { <END> Playable playable = getPlayable(); if (playable instanceof FeedMedia) { FeedMedia feedMedia = (FeedMedia) playable; FeedPreferences preferences = feedMedia.getItem().getFeed().getPreferences(); float reductionFactor = feedVolumeReduction.getReductionFactor(preferences); volumeLeft *= reductionFactor; volumeRight *= reductionFactor; } mediaPlayer.setVolume(volumeLeft, volumeRight); Log.d(TAG, "Media player volume was set to " + volumeLeft + " " + volumeRight); } playerLock.unlock(); }</code><technical_language>video feeds? previous volume</technical_language>

Target:
private void setVolumeSync(float volumeLeft, float volumeRight) { playerLock.lock(); Playable playable = getPlayable(); if (playable instanceof FeedMedia) { FeedMedia feedMedia = (FeedMedia) playable; FeedPreferences preferences = feedMedia.getItem().getFeed().getPreferences(); VolumeAdaptionSetting volumeAdaptionSetting = preferences.getVolumeAdaptionSetting(); float adaptionFactor = volumeAdaptionSetting.getAdaptionFactor(); volumeLeft *= adaptionFactor; volumeRight *= adaptionFactor; } mediaPlayer.setVolume(volumeLeft, volumeRight); Log.d(TAG, "Media player volume was set to " + volumeLeft + " " + volumeRight); playerLock.unlock(); }
Source:
<code>public void testStitchCommandEquals() { Sprite sprite = new Sprite("firstSprite"); StitchCommand command1 = new DSTStitchCommand(0, 0, 0, sprite); StitchCommand command2 = new DSTStitchCommand(0, 1, 0, sprite); StitchCommand command3 = new DSTStitchCommand(0, 0, 1, sprite); StitchCommand command4 = new DSTStitchCommand(0, 0, 0, new Sprite("secondSprite")); <START> StitchCommand command5 = command1; <END> assertEquals(command1, command5); assertNotEquals(command1, command2); assertNotEquals(command1, command3); assertNotEquals(command1, command4); }</code><technical_language>new DSTStitchCommand(0, 0, 0, sprite);</technical_language>

Target:
public void testStitchCommandEquals() { Sprite sprite = new Sprite("firstSprite"); StitchCommand command1 = new DSTStitchCommand(0, 0, 0, sprite); StitchCommand command2 = new DSTStitchCommand(0, 1, 0, sprite); StitchCommand command3 = new DSTStitchCommand(0, 0, 1, sprite); StitchCommand command4 = new DSTStitchCommand(0, 0, 0, new Sprite("secondSprite")); StitchCommand command5 = new DSTStitchCommand(0, 0, 0, sprite); assertEquals(command1, command5); assertNotEquals(command1, command2); assertNotEquals(command1, command3); assertNotEquals(command1, command4); }
Source:
<code><START> public ImapMailInboundChannelAdapterSpec() { <END> this.receiver = new ImapMailReceiver(); }</code><technical_language>Specs public ctors: access factory methods</technical_language>

Target:
ImapMailInboundChannelAdapterSpec() { this.receiver = new ImapMailReceiver(); }