auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void executeVdsBrokerCommand() { GlusterVolumeSnapshotEntity snapshot = new GlusterVolumeSnapshotEntity(); String volumeName = getParameters().getVolumeName(); String snapshotName = getParameters().getSnapshotName(); String description = getParameters().getDescription() == null ? "" : getParameters().getDescription(); boolean force = getParameters().getForce() ? true : false; uuidReturn = getBroker().glusterSnapshotCreate(volumeName, snapshotName, description, force); proceedProxyReturnValue(); if (getVDSReturnValue().getSucceeded()) { snapshot.setId(Guid.createGuidFromStringDefaultEmpty(uuidReturn.mUuid)); <START> setReturnValue(snapshot); <END> } }</code><technical_language>setReturnValue Guid? snapshot entity is populated Id, is need in returning this</technical_language>

Target:
protected void executeVdsBrokerCommand() { String volumeName = getParameters().getVolumeName(); String snapshotName = getParameters().getSnapshotName(); String description = getParameters().getDescription() == null ? "" : getParameters().getDescription(); boolean force = getParameters().getForce() ? true : false; uuidReturn = getBroker().glusterSnapshotCreate(volumeName, snapshotName, description, force); proceedProxyReturnValue(); if (getVDSReturnValue().getSucceeded()) { setReturnValue(Guid.createGuidFromStringDefaultEmpty(uuidReturn.mUuid)); } }
Source:
<code>final void tag(Object span, I input, @Nullable TraceContext context) { String value; try { value = parseValue(input, context); } catch (Throwable e) { propagateIfFatal(e); Platform.get().log("Error parsing tag value of input %s", input, e); return; } if (value == null) return; if (span instanceof SpanCustomizer) { ((SpanCustomizer) span).tag(key, value); <START> } else if (span instanceof ScopedSpan) { <END> ((ScopedSpan) span).tag(key, value); } else if (span instanceof MutableSpan) { ((MutableSpan) span).tag(key, value); } }</code><technical_language>thought need for detail - thoughts a shared interface</technical_language>

Target:
final void tag(Object span, I input, @Nullable TraceContext context) { String value; try { value = parseValue(input, context); } catch (Throwable e) { propagateIfFatal(e); Platform.get().log("Error parsing tag value of input %s", input, e); return; } if (value == null) return; if (span instanceof SpanCustomizer) { ((SpanCustomizer) span).tag(key, value); } else if (span instanceof MutableSpan) { ((MutableSpan) span).tag(key, value); } }
Source:
<code>public ResponseEntity getRolesMapping() { if (!springSecurityLdapInternalsSupplier.isLdapAuthenticationEnabled()) { <START> return toResponseEntityError(LdapConstants.LdapMessages.NOT_CONFIGURED, HttpStatus.BAD_REQUEST); <END> } return ResponseEntity.ok(springSecurityLdapInternalsSupplier.getAuthoritiesMapper()); }</code><technical_language>* If a separate class for messages, public, a nested class. * Also, need this way. I understand -- this before... some point consider implementing internationalization, revisit this well</technical_language>

Target:
public ResponseEntity getRolesMapping() { if (!springSecurityLdapInternalsSupplier.isLdapAuthenticationEnabled()) { return toResponseEntityError(LdapMessages.NOT_CONFIGURED, HttpStatus.BAD_REQUEST); } return ResponseEntity.ok(springSecurityLdapInternalsSupplier.getAuthoritiesMapper()); }
Source:
<code>public BlockLease getBlockView(int[] positions, int positionCount) { <START> checkArgument(outputPositionCount > 0, "outputPositionCount must be greater than zero"); <END> checkState(outputRequired, "This stream reader doesn't produce output"); checkState(positionCount <= outputPositionCount, "Not enough values"); if (positionCount < outputPositionCount) { compactValues(positions, positionCount); } return newLease(new DictionaryBlock(positionCount, dictionaryBlock, values)); }</code><technical_language>check valuesIsUse</technical_language>

Target:
public BlockLease getBlockView(int[] positions, int positionCount) { checkArgument(outputPositionCount > 0, "outputPositionCount must be greater than zero"); checkState(outputRequired, "This stream reader doesn't produce output"); checkState(positionCount <= outputPositionCount, "Not enough values"); checkState(!valuesInUse, "BlockLease hasn't been closed yet"); if (positionCount < outputPositionCount) { compactValues(positions, positionCount); } return newLease(new DictionaryBlock(positionCount, dictionaryBlock, values)); }
Source:
<code>public AbstractCreatureSteeringControl(Creature creature) { this.creature = creature; maxLinearSpeed = creature.getSpeed(); <START> maxLinearSpeed = maxLinearSpeed * 10; <END> }</code><technical_language>This correct... If is needed multiply line before</technical_language>

Target:
public AbstractCreatureSteeringControl(Creature creature) { this.creature = creature; maxLinearSpeed = creature.getSpeed(); maxLinearAcceleration = maxLinearSpeed * 10; }
Source:
<code><START> public ComplexSearchQueryBuilder terms(Collection<Term> terms) { <END> terms.forEach(term -> { String termText = term.text(); switch (term.field().toLowerCase()) { case "author" -> this.author(termText); case "title" -> this.titlePhrase(termText); case "journal" -> this.journal(termText); case "year" -> this.singleYear(Integer.valueOf(termText)); case "year-range" -> this.fromYearAndToYear(Integer.valueOf(termText.split("-")[0]), Integer.valueOf(termText.split("-")[1])); case "default" -> this.defaultFieldPhrase(termText); } }); return this; }</code><technical_language>I add this a constructor, if want a more descriptive name a static ComplexSearchQuery fromTerms(Collection<Term> terms) method in ComplexSearchQuery. builder pattern is useful if a lot of constructor arguments, want create a nice interface for it. I builder interface is outdated IDEs intelligent enough show named constructor arguments, e.g ![image](<LINK_0></technical_language>

Target:
public ComplexSearchQueryBuilder terms(Collection<Term> terms) { terms.forEach(term -> { String termText = term.text(); switch (term.field().toLowerCase()) { case "author" -> this.author(termText); case "title" -> this.titlePhrase(termText); case "journal" -> this.journal(termText); case "year" -> this.singleYear(Integer.valueOf(termText)); case "year-range" -> this.parseYearRange(termText); case "default" -> this.defaultFieldPhrase(termText); } }); return this; }
Source:
<code>public void testMergeProjects1() { Configuration cfg = new Configuration(); <START> cfg.setTabSize(8); <END> Project p1 = new Project(); p1.setNavigateWindowEnabled(true); p1.completeWithDefaults(cfg); assertNotNull(p1); assertTrue("Navigate window should be turned on", p1.isNavigateWindowEnabled()); assertEquals(8, p1.getTabSize()); }</code><technical_language>some crazy number a more robust (in case default set 8)</technical_language>

Target:
public void testMergeProjects1() { Configuration cfg = new Configuration(); cfg.setTabSize(new Configuration().getTabSize() + 3731); Project p1 = new Project(); p1.setNavigateWindowEnabled(true); p1.completeWithDefaults(cfg); assertNotNull(p1); assertTrue("Navigate window should be turned on", p1.isNavigateWindowEnabled()); assertEquals(new Configuration().getTabSize() + 3731, p1.getTabSize()); }
Source:
<code>public String getTuple(ResultSet rs) { StringBuilder resultTuple = new StringBuilder(); try { for (String obj : emitColumns) { resultTuple.append(rs.getObject(obj) + ","); } <START> resultTuple.substring(0, resultTuple.length() - 1); END> } catch (SQLException e) { throw new RuntimeException(e); } return resultTuple.toString(); }</code><technical_language>Need assign returned substring resultTuple</technical_language>

Target:
public String getTuple(ResultSet rs) { StringBuilder resultTuple = new StringBuilder(); try { for (String obj : emitColumns) { resultTuple.append(rs.getObject(obj) + ","); } return resultTuple.substring(0, resultTuple.length() - 1); } catch (SQLException e) { throw new RuntimeException(e); } }
Source:
<code>public void initialise() { renderingDebugConfig = config.getRendering().getDebug(); renderingDebugConfig.subscribe(RenderingDebugConfig.ENABLED, this); enablePostMaterial = new EnableMaterial(POST_MATERIAL.toString()); enableDebugMaterial = new EnableMaterial(DEBUG_MATERIAL.toString()); if (!renderingDebugConfig.isEnabled()) { addDesiredStateChange(enablePostMaterial); } else { addDesiredStateChange(enableDebugMaterial); } addDesiredStateChange(new BindFBO(new ResourceUrn("engine:sceneFinal"), displayResolutionDependentFBOs)); <START> addDesiredStateChange(new SetViewportToSizeOf(new ResourceUrn("engine:sceneFinal"), displayResolutionDependentFBOs)); <END> }</code><technical_language>Please new ResourceUrn a static final field</technical_language>

Target:
public void initialise() { renderingDebugConfig = config.getRendering().getDebug(); renderingDebugConfig.subscribe(RenderingDebugConfig.ENABLED, this); enablePostMaterial = new EnableMaterial(POST_MATERIAL.toString()); enableDebugMaterial = new EnableMaterial(DEBUG_MATERIAL.toString()); if (!renderingDebugConfig.isEnabled()) { addDesiredStateChange(enablePostMaterial); } else { addDesiredStateChange(enableDebugMaterial); } addDesiredStateChange(new BindFBO(FINAL_BUFFER, displayResolutionDependentFBOs)); addDesiredStateChange(new SetViewportToSizeOf(FINAL_BUFFER, displayResolutionDependentFBOs)); }
Source:
<code>public void stop() { try { lock.lock(); for (FluxSender fluxSender : fluxSenders) { <START> if (fluxSender.getClass().isAssignableFrom(FluxSenderImpl.class)) { <END> ((FluxSenderImpl) fluxSender).dispose(); } } for (Disposable disposable : fluxDisposables) { disposable.dispose(); } if (running) { this.running = false; } } finally { lock.unlock(); } }</code><technical_language>??? FluxSenderImpl **is** Disposable, too, added fluxDisposables well. OTOH avoid tangle package protected FluxSenderImpl class. implements Disposable, instanceof interface. Unclear .getClass().isAssignableFrom() evaluated object..</technical_language>

Target:
public void stop() { try { this.lock.lock(); if (this.running) { for (Closeable closeable : closeableFluxResources) { try { closeable.close(); } catch (IOException e) { log.error("Error closing reactive source", e); } } this.running = false; } } finally { this.lock.unlock(); } }
Source:
<code>public void shouldAlertWhenLocalFileIncludedInResponse(NanoHTTPD.Response.Status status) throws Exception { String test = "/test"; this.nano.addHandler( new NanoServerHandler(test) { @Override protected NanoHTTPD.Response serve(NanoHTTPD.IHTTPSession session) { consumeBody(session); String response = "root:*:0:0:System Administrator:/var/root:/bin/sh"; return newFixedLengthResponse(status, NanoHTTPD.MIME_PLAINTEXT, response); } }); HttpMessage msg = this.getHttpMessage(test); msg.setRequestBody("<?xml version=\"1.0\"?><comment><text>test</text></comment>"); msg.getRequestHeader().setMethod("POST"); msg.getRequestHeader().setHeader("Content-Type", "application/xml"); rule.init(msg, parent); rule.localFileInclusionAttack(msg); assertThat(alertsRaised.size(), equalTo(1)); <START> assertThat(alertsRaised.get(0).getEvidence(), equalTo("root:*:0:0")); assertThat( alertsRaised.get(0).getAttack(), equalTo( MessageFormat.format(XxeScanRule.ATTACK_HEADER, "file:/ + XxeScanRule.ATTACK_BODY)); assertThat(alertsRaised.get(0).getRisk(), equalTo(Alert.RISK_HIGH)); assertThat(alertsRaised.get(0).getConfidence(), equalTo(Alert.CONFIDENCE_MEDIUM)); <END> }</code><technical_language>suggestion Alert alert = alertsRaised.get(0); assertThat(alert.getEvidence(), equalTo("root:*:0:0")); assertThat( alert.getAttack(), equalTo( MessageFormat.format(XxeScanRule.ATTACK_HEADER, "file:///etc/passwd") + XxeScanRule.ATTACK_BODY)); assertThat(alert.getRisk(), equalTo(Alert.RISK_HIGH)); assertThat(alert.getConfidence(), equalTo(Alert.CONFIDENCE_MEDIUM)); This applies well</technical_language>

Target:
public void shouldAlertWhenLocalFileIncludedInResponse(NanoHTTPD.Response.Status status) throws HttpMalformedHeaderException { String test = "/test"; String responseBody = "[drivers]\n" + "wave=mmdrv.dll"; this.nano.addHandler(createNanoHandler(test, status, responseBody)); HttpMessage msg = getXmlPostMessage(test); rule.init(msg, parent); rule.setAttackStrength(Plugin.AttackStrength.HIGH); rule.scan(); String localFileInclusionAttackPayload = MessageFormat.format(XxeScanRule.ATTACK_HEADER, "file:/ + XxeScanRule.ATTACK_BODY; List<Alert> alertList = alertsRaised.stream() .filter(alert -> alert.getAttack().equals(localFileInclusionAttackPayload)) .collect(Collectors.toList()); assertThat(alertList.size(), equalTo(1)); Alert alert = alertList.get(0); assertThat(alert.getEvidence(), equalTo("[drivers]")); assertThat(alert.getRisk(), equalTo(Alert.RISK_HIGH)); assertThat(alert.getConfidence(), equalTo(Alert.CONFIDENCE_MEDIUM)); }
Source:
<code>protected void addAttachmentToNote(T document, AccountingXmlDocumentBackupLink backupLink, Note note) { try { Attachment attachment = accountingXmlDocumentDownloadAttachmentService.createAttachmentFromBackupLink(document, backupLink); note.setAttachment(attachment); } catch (IOException e) { LOG.error("addAttachmentToNote, unable to create attachment: " + e.getMessage()); String message = MessageFormat.format( configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_CREATE_ACCOUNTING_DOCUMENT_ATTACHMENT_DOWNLOAD), <START> KFSConstants.BLANK_SPACE + backupLink.getLinkUrl()); <END> throw new ValidationException(message); } }</code><technical_language>Do need prepend blank space, MessageFormat.format()? If not, able simplify this a further</technical_language>

Target:
protected void addAttachmentToNote(T document, AccountingXmlDocumentBackupLink backupLink, Note note) { try { Attachment attachment = accountingXmlDocumentDownloadAttachmentService.createAttachmentFromBackupLink(document, backupLink); note.setAttachment(attachment); } catch (IOException e) { LOG.error("addAttachmentToNote, unable to create attachment: " + e.getMessage()); String message = MessageFormat.format( configurationService.getPropertyValueAsString(CuFPKeyConstants.ERROR_CREATE_ACCOUNTING_DOCUMENT_ATTACHMENT_DOWNLOAD), backupLink.getLinkUrl()); throw new ValidationException(message); } }
Source:
<code>public void validate(String description) { if (isNullOrEmpty(description)) return; checkArgument(description.length() <= MAX_DESC_LENGTH, <START> "Description can't be longer than " + MAX_DESC_LENGTH + " characters" + " but was " + description.length()); <END> checkArgument(DESCRIPTION_ACCEPTABLE_RANGE.matchesAllOf(description), "Description should have ASCII values between 32 and 126."); }</code><technical_language>Java eagerly evaluates arguments, build this string time. Instead call multi-argument constructor build formatted string assertion fails: checkArgument(description.length() <= MAX_DESC_LENGTH, "Description longer %d characters %d", MAX_DESC_LENGTH, description.length());</technical_language>

Target:
public void validate(String description) { if (isNullOrEmpty(description)) return; checkArgument(description.length() <= MAX_DESC_LENGTH, "Description can't be longer than %d characters but was %d", MAX_DESC_LENGTH, description.length()); checkArgument(DESCRIPTION_ACCEPTABLE_RANGE.matchesAllOf(description), "Description should have ASCII values between 32 and 126."); }
Source:
<code>private String getNewPathFromUri(Uri uri) { String filePath = getContext().getFilesDir().getAbsolutePath() + "/temp/" + FileUtil.getFileName(uri.toString()); File file = new File(filePath); try { InputStream fileStream = getContext().getContentResolver().openInputStream(uri); FileUtil.ensureFilePathExists(file); FileUtil.copyFile(fileStream, file); } catch (IOException e1) { e1.printStackTrace(); <START> Logger.log(LogTypes.TYPE_MAINTENANCE, "Getting new file path from uri failed due to " + e1.getMessage()); <END> Toast.makeText(getActivity(), Localization.get("file.selection.failed"), Toast.LENGTH_LONG).show(); return null; } return filePath; }</code><technical_language>call Logger.exception log full stack trace</technical_language>

Target:
private String getNewPathFromUri(Uri uri) throws IOException { String filePath = getContext().getFilesDir().getAbsolutePath() + "/temp/" + FileUtil.getFileName(uri.toString()); File file = new File(filePath); InputStream fileStream = getContext().getContentResolver().openInputStream(uri); FileUtil.ensureFilePathExists(file); FileUtil.copyFile(fileStream, file); return filePath; }
Source:
<code>public String getLogFileParentDir() { ArrayList<String> elements = new ArrayList<String>(); if (mPrefix != null && mPrefix.length() > 0) { elements.add(mPrefix); } if (mTopic != null && mTopic.length() > 0) { if (getCustomTopicsNames() != null && <START> getCustomTopicsNames().isEmpty() == false && <END> getCustomTopicsNames().get(mTopic) != null && getCustomTopicsNames().get(mTopic).length() > 0) { elements.add(getCustomTopicsNames().get(mTopic)); } else { elements.add(mTopic); } } return StringUtils.join(elements, "/"); }</code><technical_language>!getCustomTopicNames().isEmpty()</technical_language>

Target:
public String getLogFileParentDir() { elements = new ArrayList<String>(); if (mPrefix != null && mPrefix.length() > 0) { elements.add(mPrefix); } if (mTopic != null && mTopic.length() > 0) { if (getCustomTopicsNames() != null && !getCustomTopicsNames().isEmpty() && getCustomTopicsNames().get(mTopic) != null && getCustomTopicsNames().get(mTopic).length() > 0) { elements.add(getCustomTopicsNames().get(mTopic)); } else { elements.add(mTopic); } } return StringUtils.join(elements, "/"); }
Source:
<code><START> private String escapePath(String path) { <END> String esc; if (path.indexOf(":") == 1) { esc = path.replaceFirst(":", "").replace('\\', '/'); } else { esc = path.replace('\\', '/'); } if (!esc.startsWith("/")) { esc = "/" + Character.toLowerCase(esc.charAt(0)) + esc.substring(1); } else { esc = Character.toLowerCase(esc.charAt(0)) + esc.substring(1); } return esc; }</code><technical_language>util method need in future. move _Util_ class test</technical_language>

Target:
protected String escapePath(String path) { String esc; if (path.indexOf(":") == 1) { esc = path.replaceFirst(":", "").replace('\\', '/'); esc = Character.toLowerCase(esc.charAt(0)) + esc.substring(1); } else { esc = path.replace('\\', '/'); } if (!esc.startsWith("/")) { esc = "/" + esc; } return esc; }
Source:
<code>public void testHetVsArbitrary(final File metricsFile, final double tolerance, final int sampleSize) throws Exception { final MetricsFile Metrics = new MetricsFile(); <START> Metrics.read(new FileReader(metricsFile)); <END> final List<Histogram<Integer>> histograms = Metrics.getAllHistograms(); final Histogram<Integer> depthHistogram = histograms.get(0); final Histogram<Integer> qualityHistogram = histograms.get(1); final double[] qualityDistribution = TheoreticalSensitivity.normalizeHistogram(qualityHistogram); final double[] depthDistribution = TheoreticalSensitivity.normalizeHistogram(depthHistogram); final double resultFromTS = TheoreticalSensitivity.theoreticalSensitivity(depthHistogram, qualityHistogram, sampleSize, 3, 0.5); final double resultFromTHS = TheoreticalSensitivity.hetSNPSensitivity(depthDistribution, qualityDistribution, sampleSize, 3); Assert.assertEquals(resultFromTS, resultFromTHS, tolerance); }</code><technical_language>try-with-resources for FileReader</technical_language>

Target:
public void testHetVsArbitrary(final File metricsFile, final double tolerance, final int sampleSize) throws Exception { final MetricsFile metrics = new MetricsFile(); try (final FileReader metricsFileReader = new FileReader(metricsFile)) { metrics.read(metricsFileReader); } final List<Histogram<Integer>> histograms = metrics.getAllHistograms(); final Histogram<Integer> depthHistogram = histograms.get(0); final Histogram<Integer> qualityHistogram = histograms.get(1); final double[] qualityDistribution = TheoreticalSensitivity.normalizeHistogram(qualityHistogram); final double[] depthDistribution = TheoreticalSensitivity.normalizeHistogram(depthHistogram); final double resultFromTS = TheoreticalSensitivity.theoreticalSensitivity(depthHistogram, qualityHistogram, sampleSize, 3, 0.5); final double resultFromTHS = TheoreticalSensitivity.hetSNPSensitivity(depthDistribution, qualityDistribution, sampleSize, 3); Assert.assertEquals(resultFromTS, resultFromTHS, tolerance); }
Source:
<code>public void testLuceneIndexLocking(final String writeLockProvider) throws IOException { BaseLockFactory baseLockFactory = BaseLockFactory.INSTANCE; Lock luceneLockA = baseLockFactory.makeLock(directory1, writeLockProvider); Lock luceneLockB = baseLockFactory.makeLock(directory1, writeLockProvider); Lock anotherLock = baseLockFactory.makeLock(directory3, writeLockProvider); assert luceneLockA.obtain(); assert luceneLockB.isLocked(); <START> assert !anotherLock.isLocked(); <END> assert !luceneLockA.obtain(); assert !luceneLockB.obtain(); luceneLockA.close(); assert !luceneLockB.isLocked(); assert luceneLockB.obtain(); luceneLockA.close(); assert !luceneLockB.isLocked(); }</code><technical_language>standard assertTrue assertFalse here? consistent</technical_language>

Target:
public void testLuceneIndexLocking(final String writeLockProvider) throws IOException { BaseLockFactory baseLockFactory = BaseLockFactory.INSTANCE; Lock luceneLockA = baseLockFactory.makeLock(directory1, writeLockProvider); Lock luceneLockB = baseLockFactory.makeLock(directory1, writeLockProvider); Lock anotherLock = baseLockFactory.makeLock(directory3, writeLockProvider); assertTrue(luceneLockA.obtain()); assertTrue(luceneLockB.isLocked()); assertFalse(anotherLock.isLocked()); assertFalse(luceneLockA.obtain()); assertFalse(luceneLockB.obtain()); luceneLockA.close(); assertFalse(luceneLockB.isLocked()); assertTrue(luceneLockB.obtain()); luceneLockA.close(); assertFalse(luceneLockB.isLocked()); }
Source:
<code><START> public Optional<Object> calculateMappedValue(Mapping inputMapping, <END> DelegateExecution execution, ProcessExtensionModel extensions) { if (inputMapping != null) { if (Mapping.SourceMappingType.VALUE.equals(inputMapping.getType()) || Mapping.SourceMappingType.STATIC_VALUE.equals(inputMapping.getType())) { return Optional.of(inputMapping.getValue()); } if (Mapping.SourceMappingType.VARIABLE.equals(inputMapping.getType())) { String name = inputMapping.getValue().toString(); VariableDefinition processVariableDefinition = extensions.getExtensions().getPropertyByName(name); if (processVariableDefinition != null) { return Optional.of(execution.getVariable(processVariableDefinition.getName())); } } } return Optional.empty(); }</code><technical_language>This method is called another protected method, protected scope too</technical_language>

Target:
protected Optional<Object> calculateMappedValue(Mapping inputMapping, DelegateExecution execution, ProcessExtensionModel extensions) { if (inputMapping != null) { if (Mapping.SourceMappingType.VALUE.equals(inputMapping.getType()) || Mapping.SourceMappingType.STATIC_VALUE.equals(inputMapping.getType())) { return Optional.of(inputMapping.getValue()); } if (Mapping.SourceMappingType.VARIABLE.equals(inputMapping.getType())) { String name = inputMapping.getValue().toString(); VariableDefinition processVariableDefinition = extensions.getExtensions().getPropertyByName(name); if (processVariableDefinition != null) { return Optional.of(execution.getVariable(processVariableDefinition.getName())); } } } return Optional.empty(); }
Source:
<code>public void testApplyEmptyOrNull() { Assert.assertEquals(null, loadingLookup.apply(null)); if (NullHandling.sqlCompatible()) { Assert.assertEquals(null, loadingLookup.apply("")); <START> } <END> }</code><technical_language>Assert.assertNull(). Also, do need test for non-sql-compatible mode? Like: java Assert.assertNull(loadingLookup.apply(null)); if (NullHandling.sqlCompatible()) { // empty string behavior Assert.assertNull(loadingLookup.apply("")); } else { Assert.assertEquals("", loadingLookup.apply("")); }</technical_language>

Target:
public void testApplyEmptyOrNull() throws ExecutionException { EasyMock.expect(lookupCache.get(EasyMock.eq(""), EasyMock.anyObject(Callable.class))) .andReturn("empty").atLeastOnce(); EasyMock.replay(lookupCache); Assert.assertEquals("empty", loadingLookup.apply("")); if (!NullHandling.sqlCompatible()) { Assert.assertEquals("empty", loadingLookup.apply(null)); } else { Assert.assertNull(loadingLookup.apply(null)); } EasyMock.verify(lookupCache); }
Source:
<code>public T call() throws Exception { try { Request.setPerThreadRequestData(requestData); UUIDs.setRandom(random); ThreadContext.bind(securityManager); ThreadContext.bind(subject); MDC.setContextMap(mdcContextMap); return delegate.call(); } finally { Request.resetPerThreadRequestData(); <START> UUIDs.setRandom(null); <END> ThreadContext.unbindSecurityManager(); ThreadContext.unbindSubject(); MDC.setContextMap(mdcContextMap); } }</code><technical_language>Unrelated change this finally block is a crazy amount of thread reset state</technical_language>

Target:
public T call() throws Exception { try { Request.setPerThreadRequestData(requestData); UUIDs.setRandom(random); ThreadContext.bind(securityManager); ThreadContext.bind(subject); MDC.setContextMap(mdcContextMap); return delegate.call(); } finally { Request.resetPerThreadRequestData(); UUIDs.setRandom(null); ThreadContext.unbindSecurityManager(); ThreadContext.unbindSubject(); MDC.clear(); } }
Source:
<code>public Mongo mongo() { <START> return new Fongo("something").getMongo(); <END> }</code><technical_language>I a more meaningful string. I this is Fongo DB instance, class name, "instance", "defaultInstance" better</technical_language>

Target:
public Mongo mongo() { return new Fongo("defaultInstance").getMongo(); }
Source:
<code>public void run() { logger.debug("{}: running {}", DataList.this, this); try { if (addedData() || checkIfListenersHaveDataToSendOnly()) { future = autoFlushExecutor.submit(this); logger.debug("{}: rescheduled {}", DataList.this, this); } else { synchronized (this) { if (isMoreDataAvailable) { isMoreDataAvailable = false; future = autoFlushExecutor.submit(this); logger.debug("{}: rescheduled {}", DataList.this, this); } else { future = null; } } } } catch (Exception e) { logger.debug("{}: {}", DataList.this, this, e); } finally { <START> logger.debug("{}: finished {}", this); <END> } }</code><technical_language>Missing argument</technical_language>

Target:
public void run() { logger.debug("{} entered run", this); try { if (addedData() || checkIfListenersHaveDataToSendOnly()) { future = autoFlushExecutor.submit(this); } else { synchronized (this) { if (isMoreDataAvailable) { isMoreDataAvailable = false; future = autoFlushExecutor.submit(this); } else { future = null; } } } } catch (RuntimeException e) { logger.warn("{}", this, e); } finally { logger.debug("{} exiting run", this); } }
Source:
<code>private Repository getRepository(IFileBuffer buffer) { IPath location = getPath(buffer); if (location != null) { return <START> org.eclipse.egit.core.Activator.getDefault() <END> .getRepositoryCache().getRepository(location); } return null; }</code><technical_language>Nit: package removed; Activator is imported</technical_language>

Target:
private Repository getRepository(IFileBuffer buffer) { IPath location = getPath(buffer); if (location != null) { return Activator.getDefault().getRepositoryCache() .getRepository(location); } return null; }
Source:
<code>public void close() throws IOException { <START> httpClient.close(); <END> }</code><technical_language>is case in httpClient null, right</technical_language>

Target:
public void close() throws IOException { if (httpClient != null) { httpClient.close(); } }
Source:
<code>public Supplier<Boolean> getTask(@NotNull Context context) { return () -> { Collect.getInstance().getComponent().inject(this); if (storageMigrationRepository.isMigrationBeingPerformed()) { return true; } NetworkInfo currentNetworkInfo = connectivityProvider.getNetworkInfo(); if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) || !(networkTypeMatchesAutoSendSetting(currentNetworkInfo) || atLeastOneFormSpecifiesAutoSend())) { if (!networkTypeMatchesAutoSendSetting(currentNetworkInfo)) { return false; } return true; } return changeLock.withLock(acquiredLock -> { if (acquiredLock) { try { Pair<Boolean, String> results = new InstanceSubmitter(analytics).submitUnsubmittedInstances(); notifier.onSubmission(results.first, results.second); } catch (SubmitException e) { switch (e.getType()) { case GOOGLE_ACCOUNT_NOT_SET: <START> notifier.onSubmission(true, TranslationHandler.getString(Collect.getInstance(), R.string.google_set_account)); <END> break; case GOOGLE_ACCOUNT_NOT_PERMITTED: notifier.onSubmission(true, TranslationHandler.getString(Collect.getInstance(), R.string.odk_permissions_fail)); break; case NOTHING_TO_SUBMIT: break; } } return true; } else { return false; } }); }; }</code><technical_language>context param instead of Collect.getInstance()</technical_language>

Target:
public Supplier<Boolean> getTask(@NotNull Context context) { return () -> { Collect.getInstance().getComponent().inject(this); if (storageMigrationRepository.isMigrationBeingPerformed()) { return true; } NetworkInfo currentNetworkInfo = connectivityProvider.getNetworkInfo(); if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) || !(networkTypeMatchesAutoSendSetting(currentNetworkInfo) || atLeastOneFormSpecifiesAutoSend())) { if (!networkTypeMatchesAutoSendSetting(currentNetworkInfo)) { return false; } return true; } return changeLock.withLock(acquiredLock -> { if (acquiredLock) { try { Pair<Boolean, String> results = new InstanceSubmitter(analytics, formsRepository, instancesRepository, googleAccountsManager, googleApiProvider).submitUnsubmittedInstances(); notifier.onSubmission(results.first, results.second); } catch (SubmitException e) { switch (e.getType()) { case GOOGLE_ACCOUNT_NOT_SET: notifier.onSubmission(true, context.getString(R.string.google_set_account)); break; case GOOGLE_ACCOUNT_NOT_PERMITTED: notifier.onSubmission(true, context.getString(R.string.odk_permissions_fail)); break; case NOTHING_TO_SUBMIT: break; } } return true; } else { return false; } }); }; }
Source:
<code>public ShadowMapNode(Context context) { worldRenderer = context.get(WorldRenderer.class); renderQueues = context.get(RenderQueuesHelper.class); backdropProvider = context.get(BackdropProvider.class); Config config = context.get(Config.class); RenderableWorld renderableWorld = context.get(RenderableWorld.class); <START> ShadowMapResolutionDependentFBOs shadowMapResolutionDependentFBOs = context.get(ShadowMapResolutionDependentFBOs.class); <END> this.playerCamera = worldRenderer.getActiveCamera(); this.renderingConfig = config.getRendering(); renderableWorld.setShadowMapCamera(shadowMapCamera); requiresFBO(new FBOConfig(SHADOW_MAP_FBO, FBO.Type.NO_COLOR).useDepthBuffer(), shadowMapResolutionDependentFBOs); texelSize = 1.0f / renderingConfig.getShadowMapResolution() * 2.0f; renderingConfig.subscribe(RenderingConfig.SHADOW_MAP_RESOLUTION, this); requiresCondition(() -> renderingConfig.isDynamicShadows()); renderingConfig.subscribe(RenderingConfig.DYNAMIC_SHADOWS, this); addDesiredStateChange(new BindFBO(SHADOW_MAP_FBO, shadowMapResolutionDependentFBOs)); addDesiredStateChange(new SetViewportToSizeOf(SHADOW_MAP_FBO, shadowMapResolutionDependentFBOs)); addDesiredStateChange(new EnableMaterial(SHADOW_MAP_MATERIAL)); }</code><technical_language>reorganize section is distance line variables assigned variables used. I.e. worldRenderer line playerCamera assignment</technical_language>

Target:
public ShadowMapNode(Context context) { super(context); renderQueues = context.get(RenderQueuesHelper.class); backdropProvider = context.get(BackdropProvider.class); worldRenderer = context.get(WorldRenderer.class); this.playerCamera = worldRenderer.getActiveCamera(); this.renderingConfig = context.get(Config.class).getRendering(); context.get(RenderableWorld.class).setShadowMapCamera(shadowMapCamera); texelSize = 1.0f / renderingConfig.getShadowMapResolution() * 2.0f; renderingConfig.subscribe(RenderingConfig.SHADOW_MAP_RESOLUTION, this); requiresCondition(() -> renderingConfig.isDynamicShadows()); renderingConfig.subscribe(RenderingConfig.DYNAMIC_SHADOWS, this); ShadowMapResolutionDependentFBOs shadowMapResolutionDependentFBOs = context.get(ShadowMapResolutionDependentFBOs.class); requiresFBO(new FBOConfig(SHADOW_MAP_FBO, FBO.Type.NO_COLOR).useDepthBuffer(), shadowMapResolutionDependentFBOs); addDesiredStateChange(new BindFBO(SHADOW_MAP_FBO, shadowMapResolutionDependentFBOs)); addDesiredStateChange(new SetViewportToSizeOf(SHADOW_MAP_FBO, shadowMapResolutionDependentFBOs)); addDesiredStateChange(new EnableMaterial(SHADOW_MAP_MATERIAL)); }
Source:
<code>public void onPageStarted(WebView view, String urlClient, Bitmap favicon) { if (progressCircle == null) { progressCircle = new ProgressDialog(view.getContext(), R.style.WebViewLoadingCircle); progressCircle.setCancelable(true); progressCircle.setCanceledOnTouchOutside(false); progressCircle.setProgressStyle(android.R.style.Widget_ProgressBar_Small); try { progressCircle.show(); <START> } catch (Exception e) { <END> Log.e(TAG, "Exception while showing progress circle", e); } } if (callMainMenu && urlClient.equals(Constants.BASE_URL_HTTPS)) { Intent intent = new Intent(getBaseContext(), MainMenuActivity.class); startActivity(intent); } }</code><technical_language>show() exception</technical_language>

Target:
public void onPageStarted(WebView view, String urlClient, Bitmap favicon) { if (callMainMenu && urlClient.equals(Constants.BASE_URL_HTTPS)) { Intent intent = new Intent(getBaseContext(), MainMenuActivity.class); startActivity(intent); } }
Source:
<code>private void checkUsage(IdentifierTree parameterUsage, MethodTree methodTree) { <START> Tree parameterParent = parameterUsage.identifierToken().parent(); <END> while (!parameterParent.equals(methodTree) && !assertReported.contains(parameterParent)) { if (parameterParent.is(Tree.Kind.ASSERT_STATEMENT)) { assertReported.add((AssertStatementTree) parameterParent); reportIssue(parameterParent, "Replace this assert with a proper check."); return; } parameterParent = parameterParent.parent(); } }</code><technical_language>starting identifierToken() parameterUsage ? strart parameter parent</technical_language>

Target:
private void checkUsage(IdentifierTree parameterUsage, MethodTree methodTree) { Tree parameterParent = parameterUsage.parent(); while (!parameterParent.equals(methodTree) && !assertReported.contains(parameterParent)) { if (parameterParent.is(Tree.Kind.ASSERT_STATEMENT)) { assertReported.add((AssertStatementTree) parameterParent); reportIssue(parameterParent, "Replace this assert with a proper check."); return; } parameterParent = parameterParent.parent(); } }
Source:
<code>public static void checkBlackPearlForTapeFailure(final Ds3Client client) throws IOException, SignatureException, CommandException { final List<TapeFailure> tapeFailures = client.getTapeFailuresSpectraS3(new GetTapeFailuresSpectraS3Request()).getTapeFailureListResult().getTapeFailure(); <START> if (tapeFailures != null && !Iterables.isEmpty(tapeFailures)) { <END> throw new CommandException(new TapeFailureException(tapeFailures.iterator())); } }</code><technical_language>a List Iterable a Guard: if (Guard.isNotNullAndNotEmpty(tapeFailures))</technical_language>

Target:
public static void checkBlackPearlForTapeFailure(final Ds3Client client) throws IOException, SignatureException, CommandException { final List<TapeFailure> tapeFailures = client.getTapeFailuresSpectraS3(new GetTapeFailuresSpectraS3Request()).getTapeFailureListResult().getTapeFailure(); if (Guard.isNotNullAndNotEmpty(tapeFailures)) { throw new CommandException(new TapeFailureException(tapeFailures.iterator())); } }
Source:
<code>private void dumpTable(String dbName, String tblName, Path dbRoot) throws Exception { try { Hive db = getHive(); <START> BaseSemanticAnalyzer.TableSpec <END> ts = new BaseSemanticAnalyzer.TableSpec(db, conf, dbName + "." + tblName, null); TableExport.Paths exportPaths = new TableExport.Paths(work.astRepresentationForErrorMsg, dbRoot, tblName, conf); new TableExport(exportPaths, ts, getNewReplicationSpec(), db, conf, LOG).run(); REPL_STATE_LOG.info( "Repl Dump: Analyzed dump for table/view: {}.{} and dumping metadata and data to path {}", dbName, tblName, exportPaths.exportRootDir.toString()); } catch (InvalidTableException te) { LOG.debug(te.getMessage()); } }</code><technical_language>import BaseSemanticAnalyzer.TableSpec avoid longer names here</technical_language>

Target:
private void dumpTable(String dbName, String tblName, Path dbRoot) throws Exception { try { Hive db = getHive(); TableSpec ts = new TableSpec(db, conf, dbName + "." + tblName, null); TableExport.Paths exportPaths = new TableExport.Paths(work.astRepresentationForErrorMsg, dbRoot, tblName, conf); new TableExport(exportPaths, ts, getNewReplicationSpec(), db, conf, LOG).run(); REPL_STATE_LOG.info( "Repl Dump: Analyzed dump for table/view: {}.{} and dumping metadata and data to path {}", dbName, tblName, exportPaths.exportRootDir.toString()); } catch (InvalidTableException te) { LOG.debug(te.getMessage()); } }
Source:
<code>public void testRegisteredAdapterFactoryCache() { setUpAdapterFactoryRegistry(createNullContext()); final Collection<String> styledLabelProvider = Lists.newArrayList(ComparePackage.eNS_URI, IItemStyledLabelProvider.class.getName()); TestAdapterFactoryDescriptor rank40 = new TestAdapterFactoryDescriptor("Rank40", 40, null); registry.put(styledLabelProvider, rank40); final ComposedAdapterFactory fAdapterFactory = new EMFCompareComposedAdapterFactory(rankedRegistry); final Collection<?> styledLabelProviderTypes = Lists.newArrayList(ComparePackage.eINSTANCE, IItemStyledLabelProvider.class); AdapterFactory firstFactory = fAdapterFactory.getFactoryForTypes(styledLabelProviderTypes); AdapterFactory secondFactory = fAdapterFactory.getFactoryForTypes(styledLabelProviderTypes); assertNotNull(firstFactory); <START> assertEquals(firstFactory, <END> secondFactory); }</code><technical_language>assertSame()</technical_language>

Target:
public void testRegisteredAdapterFactoryCache() { setUpAdapterFactoryRegistry(createNullContext()); final Collection<String> styledLabelProvider = Lists.newArrayList(ComparePackage.eNS_URI, IItemStyledLabelProvider.class.getName()); TestAdapterFactoryDescriptor rank40 = new TestAdapterFactoryDescriptor("Rank40", 40, null); registry.put(styledLabelProvider, rank40); final ComposedAdapterFactory fAdapterFactory = new EMFCompareComposedAdapterFactory(rankedRegistry); final Collection<?> styledLabelProviderTypes = Lists.newArrayList(ComparePackage.eINSTANCE, IItemStyledLabelProvider.class); AdapterFactory firstFactory = fAdapterFactory.getFactoryForTypes(styledLabelProviderTypes); AdapterFactory secondFactory = fAdapterFactory.getFactoryForTypes(styledLabelProviderTypes); assertNotNull(firstFactory); assertSame(firstFactory, secondFactory); }
Source:
<code>public void testCameraBrick() { checkIfBrickAtPositionShowsString(cameraBrickPosition, R.string.brick_video); checkIfSpinnerOnBrickAtPositionShowsString(R.id.brick_video_spinner, cameraBrickPosition, R.string .video_brick_camera_on); checkIfBrickAtPositionShowsString(chooseCameraBrickPosition, R.string.brick_choose_camera); checkIfSpinnerOnBrickAtPositionShowsString(R.id.brick_choose_camera_spinner, chooseCameraBrickPosition, R.string .choose_camera_front); onView(withId(R.id.brick_choose_camera_spinner)).perform(click()); <START> onView(withText(R.string.choose_camera_back)).perform(click()); <END> onView(withText(R.string.choose_camera_back)).check(matches(isDisplayed())); onView(withId(R.id.brick_choose_camera_spinner)).perform(click()); onView(withText(R.string.choose_camera_front)).perform(click()); onView(withText(R.string.choose_camera_front)).check(matches(isDisplayed())); onView(withId(R.id.brick_video_spinner)).perform(click()); onView(withText(R.string.video_brick_camera_on)).perform(click()); onView(withText(R.string.video_brick_camera_on)).check(matches(isDisplayed())); onView(withId(R.id.brick_video_spinner)).perform(click()); onView(withText(R.string.video_brick_camera_off)).perform(click()); onView(withText(R.string.video_brick_camera_off)).check(matches(isDisplayed())); }</code><technical_language>please clickSelectCheckSpinnerValueOnBrick(...)</technical_language>

Target:
public void testCameraBrick() { checkIfBrickAtPositionShowsString(cameraBrickPosition, R.string.brick_video); checkIfSpinnerOnBrickAtPositionShowsString(R.id.brick_video_spinner, cameraBrickPosition, R.string .video_brick_camera_on); List<Integer> spinnerValues = new ArrayList<>(); spinnerValues.add(R.string.video_brick_camera_on); spinnerValues.add(R.string.video_brick_camera_off); checkIfValuesAvailableInSpinnerOnBrick(spinnerValues, R.id.brick_video_spinner, cameraBrickPosition); }
Source:
<code>protected String doGet(String apiUrl, Map<String,String> data) throws Exception { String fullUrl = BASE_URL + apiUrl; if (data != null) { <START> if (data.size() > 0) { <END> fullUrl += "?"; } for (Map.Entry<String,String> entry : data.entrySet()) { fullUrl += entry.getKey() + "=" + uriEncode(entry.getValue()) + "&"; } } if (_clientId != null) { if (data == null || data.size() == 0) { fullUrl += "?"; } fullUrl += "clientUUID=" + _clientId; } fullUrl += "&profileIdentifier=" + uriEncode(this._profileName); OkHttpClient okHttpClient = new OkHttpClient(); Request request = new Request.Builder() .url(fullUrl) .build(); Response response = okHttpClient.newCall(request).execute(); return response.body().string(); }</code><technical_language>!data.isEmpty()</technical_language>

Target:
protected String doGet(String apiUrl, Map<String,String> data) throws Exception { String fullUrl = getRequestUrlFromMap(apiUrl, data); if (_clientId != null) { if (data == null || data.isEmpty()) { fullUrl += "?"; } fullUrl += "clientUUID=" + _clientId; } fullUrl += "&profileIdentifier=" + uriEncode(this._profileName); Request request = new Request.Builder() .url(fullUrl) .build(); Response response = okHttpClient.newCall(request).execute(); return response.body().string(); }
Source:
<code>private Consumer<Traverser<Try<ExcelDescription>>> getExcelDataTraverser( PropertyColumnMetadata propertyColumnMetadata, PropertyData propertyData, Map.Entry<String, LocalProperty> prop) { return x -> { <START> x.get().onSuccess(excelDescription -> { <END> propertyColumnMetadata.addColumnInformation(excelDescription, prop.getKey()); propertyData.putProperty(prop.getKey(), excelDescription); }); x.get().onFailure(e -> { LOG.error("Something went wrong while reading the property '{}' of '{}'", prop.getKey(), type, e); }); }; }</code><technical_language>is clear type 'x' is is supposed do</technical_language>

Target:
private Consumer<Traverser<Try<ExcelDescription>>> getExcelDataTraverser( PropertyColumnMetadata propertyColumnMetadata, PropertyData propertyData, Map.Entry<String, LocalProperty> prop) { return tryOfExcelDescription -> { tryOfExcelDescription.get().onSuccess(excelDescription -> { propertyColumnMetadata.addColumnInformation(excelDescription, prop.getKey()); propertyData.putProperty(prop.getKey(), excelDescription); }); tryOfExcelDescription.get().onFailure(e -> { LOG.error("Something went wrong while reading the property '{}' of '{}'", prop.getKey(), type, e); }); }; }
Source:
<code>void doShow() { setVisible(true); GPLogger.log(String.format("Bounds after setVisible: %s", getBounds())); try { <START> Class.forName("java.awt.desktop.AboutHandler"); <END> DesktopIntegration.setup(GanttProject.this); } catch (ClassNotFoundException e) { GPLogger.log(e); } getActiveChart().reset(); getRssFeedChecker().setOptionsVersion(getGanttOptions().getVersion()); getRssFeedChecker().setUpdater(getUpdater()); getRssFeedChecker().run(); setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); }</code><technical_language>targeting Java 11, I suggest removing this line surrounding try/catch block too. needed able run Java 8 Java 11 (there AboutHandler in Java 8), is obsolete</technical_language>

Target:
void doShow() { setVisible(true); GPLogger.log(String.format("Bounds after setVisible: %s", getBounds())); DesktopIntegration.setup(GanttProject.this); getActiveChart().reset(); getRssFeedChecker().setOptionsVersion(getGanttOptions().getVersion()); getRssFeedChecker().setUpdater(getUpdater()); getRssFeedChecker().run(); setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); }
Source:
<code>public void animateEvent(ModelEvent event) { <START> if (event.messageType == MessageType.PROCESSING_SIGNAL) { <END> return; } this.register(event); }</code><technical_language>is purpose of this conditional</technical_language>

Target:
public void animateEvent(ModelEvent event) { if (event.messageType != MessageType.PROCESSING_SIGNAL) { register(event); } }
Source:
<code>@Override public Vector apply(K k, V v) { Vector res = basePreprocessor.apply(k, v); assert res.size() == min.length; assert res.size() == max.length; for (int i = 0; i < res.size(); i++) { double scaled = (res.get(i) - min[i]) / (max[i] - min[i]); if (Double.isNaN(scaled)) <START> res.set(i, 0); <END> else res.set(i, scaled); } return res; }</code><technical_language>behavior break logic of min-max scaler. In opinion write this: double denom = max[i] - min[i] (res.get(i) - min[i]) / (denom > EPS ? denom : 1.0);</technical_language>

Target:
@Override public Vector apply(K k, V v) { Vector res = basePreprocessor.apply(k, v); assert res.size() == min.length; assert res.size() == max.length; for (int i = 0; i < res.size(); i++) { double num = res.get(i) - min[i]; double denom = max[i] - min[i]; double scaled = num / denom; if (Double.isNaN(scaled)) res.set(i, num); else res.set(i, scaled); } return res; }
Source:
<code>public ParameterDialog(Shell parentShell, String dialogTitle, String dialogMessage, String baseCommand, IInputValidator validator) { super(parentShell); <START> this.title = dialogTitle; <END> message = dialogMessage; value = ""; this.validator = validator; this.baseCommand = baseCommand; }</code><technical_language>do need this</technical_language>

Target:
public ParameterDialog(Shell parentShell, String dialogTitle, String dialogMessage, String baseCommand, IInputValidator validator) { super(parentShell); fTitle = dialogTitle; fMessage = dialogMessage; fValue = ""; fValidator = validator; fBaseCommand = baseCommand; }
Source:
<code>public void setOwner(String owner) { <START> this.owner = owner; <END> }</code><technical_language>suggestion this.owner = Util.fixEmpty(owner);</technical_language>

Target:
public void setOwner(String owner) { this.owner = Util.fixEmpty(owner); }
Source:
<code>public void canAccessHeadersCaseInsensitively() { List<String> valueList = Collections.singletonList("application/json"); Response response = Response.builder() .status(200) .reason(null) <START> .headers(Collections.singletonMap("Content-Type", valueList)) <END> .body(new byte[0]) .build(); assertThat(response.headers().get("content-type")).isEqualTo(valueList); assertThat(response.headers().get("Content-Type")).isEqualTo(valueList); }</code><technical_language>out is initialize headers a linkedHashMap add "putHeader(String, Collection)"? out of generics warfare cleans callsites</technical_language>

Target:
public void canAccessHeadersCaseInsensitively() { Map<String, Collection<String>> headersMap = new LinkedHashMap(); List<String> valueList = Collections.singletonList("application/json"); headersMap.put("Content-Type", valueList); Response response = Response.builder() .status(200) .headers(headersMap) .body(new byte[0]) .build(); assertThat(response.headers().get("content-type")).isEqualTo(valueList); assertThat(response.headers().get("Content-Type")).isEqualTo(valueList); }
Source:
<code>private void printAgentDescription(TaskListener listener) { <START> if (pod != null && showRawYaml) { <END> listener.getLogger().println(Serialization.asYaml(pod)); } }</code><technical_language>pod is showRamYaml is set, simplify pod field: KubernetesLauncher simply decline call assignPod template.isShowRawYaml()</technical_language>

Target:
private void printAgentDescription(TaskListener listener) { if (pod != null) { listener.getLogger().println(Serialization.asYaml(pod)); } }