auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void doStop() { log.info("Stopping Netty server"); <START> boss.shutdownGracefully(); <END> wrkr.shutdownGracefully(); try { sock.channel().closeFuture().sync(); } catch (InterruptedException e) { log.warn("Netty server stop interrupted"); Thread.currentThread().interrupt(); } log.info("Netty server stopped"); notifyStopped(); }</code><technical_language>npe if (datagram) be: if (datagram) boss.shutdownGracefully();</technical_language>

Target:
protected void doStop() { log.info("Stopping Netty server"); boss.shutdownGracefully(); if(!datagram) { wrkr.shutdownGracefully(); } try { sock.channel().closeFuture().sync(); } catch (InterruptedException e) { log.warn("Netty server stop interrupted"); Thread.currentThread().interrupt(); } log.info("Netty server stopped"); notifyStopped(); }
Source:
<code>public void destroy() { clearProjectItems(); tagInput.setValue( "" ); <START> tagList.removeAllChildren(); <END> }</code><technical_language>Surely clean-up TagItemView instances? (Like is done ProjectItemView in clearProjectItems())</technical_language>

Target:
public void destroy() { projects.removeAllChildren(); tagInput.setValue( "" ); tagList.removeAllChildren(); }
Source:
<code>protected List<Map<String, Serializable>> getTags(DocumentModel docModel) { try { return (List<Map<String, Serializable>>) docModel.getPropertyValue(TAG_LIST); } catch (PropertyNotFoundException e) { if (log.isWarnEnabled()) { log.warn( <START> "Getting tags on " + docModel.getName() + " failed since " + TAG_FACET + " facet is missing on " <END> + docModel.getType() + " document type. This operation will be ignored."); } return new ArrayList<>(); } }</code><technical_language>getPathAsString instead of getName provide unambiguous info</technical_language>

Target:
protected List<Map<String, Serializable>> getTags(DocumentModel docModel) { try { return (List<Map<String, Serializable>>) docModel.getPropertyValue(TAG_LIST); } catch (PropertyNotFoundException e) { if (log.isWarnEnabled()) { log.warn(String.format( "Getting tags on %s failed since %s is missing on %s document type. This operation will be ignored.", docModel.getPathAsString(), TAG_FACET, docModel.getType())); } return new ArrayList<>(); } }
Source:
<code>public void process() { PerformanceMonitor.startActivity("rendering/prePostComposite"); if (renderingConfig.isLocalReflections()) { prePostMaterial.setMatrix4("invProjMatrix", activeCamera.getInverseProjectionMatrix(), true); prePostMaterial.setMatrix4("projMatrix", activeCamera.getProjectionMatrix(), true); } if (renderingConfig.isOutline()) { prePostMaterial.setFloat("outlineDepthThreshold", outlineDepthThreshold, true); prePostMaterial.setFloat("outlineThickness", outlineThickness, true); } if (renderingConfig.isVolumetricFog()) { prePostMaterial.setMatrix4("invViewProjMatrix", activeCamera.getInverseViewProjectionMatrix(), true); } if (renderingConfig.isInscattering()) { skyInscatteringSettingsFrag.set(0, skyInscatteringStrength, skyInscatteringLength, skyInscatteringThreshold); prePostMaterial.setFloat4("skyInscatteringSettingsFrag", skyInscatteringSettingsFrag, true); } <START> <END> renderFullscreenQuad(); displayResolutionDependentFBOs.swapReadWriteBuffers(); PerformanceMonitor.endActivity(); }</code><technical_language>Fog, in volumetric volumetric form, is begla (Terasology founder) experimenting managed some nice videos it. some point this feature broke begla fix it. say: leave apparatus in fix remove dig teeth in actual shaders. Right focus working machinery _around_ shaders eventually, splitting shaders a larger number of simpler nodes. that, splitting stage if must, a do fog</technical_language>

Target:
public void process() { PerformanceMonitor.startActivity("rendering/prePostComposite"); if (isLocalReflections) { prePostMaterial.setMatrix4("invProjMatrix", activeCamera.getInverseProjectionMatrix(), true); prePostMaterial.setMatrix4("projMatrix", activeCamera.getProjectionMatrix(), true); } if (isOutline) { prePostMaterial.setFloat("outlineDepthThreshold", outlineDepthThreshold, true); prePostMaterial.setFloat("outlineThickness", outlineThickness, true); } if (isVolumetricFog) { prePostMaterial.setMatrix4("invViewProjMatrix", activeCamera.getInverseViewProjectionMatrix(), true); } if (isInscattering) { prePostMaterial.setFloat4("skyInscatteringSettingsFrag", 0, skyInscatteringStrength, skyInscatteringLength, skyInscatteringThreshold, true); } renderFullscreenQuad(); displayResolutionDependentFBOs.swapReadWriteBuffers(); PerformanceMonitor.endActivity(); }
Source:
<code>public int deleteAnnouncement(int id) { LOG.debug("delete announcement with id: " + id); final SqlSession session = factory.openSession(); int deletedId = -1; try { final AnnouncementsMapper mapper = session.getMapper(AnnouncementsMapper.class); deletedId = mapper.deleteAnnouncement(id); session.commit(); } catch (Exception e) { LOG.error(e, "Couldn't delete announcement with id:", id); } finally { <START> session.close(); <END> } return deletedId; }</code><technical_language>try-with-resources need manually close session</technical_language>

Target:
public int deleteAnnouncement(int id) { int deletedId = -1; try (final SqlSession session = factory.openSession()) { final AnnouncementsMapper mapper = session.getMapper(AnnouncementsMapper.class); deletedId = mapper.deleteAnnouncement(id); return deletedId; } catch (Exception e) { throw new ServiceRuntimeException("Failed to save announcements", e); } }
Source:
<code>void queueEdmInfo(EdmInfo edmInfo) { try { Set<String> urls = edmInfo.edmObject.getResourceUrls(urlTypes).keySet(); if (urls.isEmpty()) { logger.error("content url missing in edm file representation: {}", edmInfo.representation); return; } edmInfo.fileInfos = urls.stream().map(FileInfo::new).collect(Collectors.toList()); Map<String, Long> hostCounts = urls.stream() .collect(Collectors.groupingBy(url -> URI.create(url).getHost(), Collectors.counting())); Comparator<Entry<String, Long>> c = Comparator.comparing(Entry::getValue); c = c.thenComparing(Entry::getKey); String host = hostCounts.entrySet().stream().max(c).get().getKey(); SourceInfo source = sourcesByHost.computeIfAbsent(host, SourceInfo::new); source.addToQueue(edmInfo); } catch (Exception e) { subTaskInfoDao.insert( (int) edmInfo.counter, edmInfo.taskInfo.task.getTaskId(), <START> "linkcheck_topology", <END> edmInfo.representation.getUri().toString(), States.ERROR.toString(), "Failed while queing edm info", e.getMessage(), null); StatsTupleData stats = new StatsTupleData(edmInfo.taskInfo.task.getTaskId(), 1); stats.addStatus(edmInfo.representation.getUri().toString(), e.getMessage()); outputCollector.emit(StatsTupleData.STREAM_ID, new Values(stats)); edmProcessed(edmInfo); } }</code><technical_language>is hard coded in here</technical_language>

Target:
void queueEdmInfo(EdmInfo edmInfo) { try { Set<String> urls = edmInfo.edmObject.getResourceUrls(urlTypes).keySet(); if (urls.isEmpty()) { logger.error("content url missing in edm file representation: {}", edmInfo.representation); return; } edmInfo.fileInfos = urls.stream().map(FileInfo::new).collect(Collectors.toList()); Map<String, Long> hostCounts = urls.stream() .collect(Collectors.groupingBy(url -> URI.create(url).getHost(), Collectors.counting())); Comparator<Entry<String, Long>> c = Comparator.comparing(Entry::getValue); c = c.thenComparing(Entry::getKey); String host = hostCounts.entrySet().stream().max(c).get().getKey(); SourceInfo source = sourcesByHost.computeIfAbsent(host, SourceInfo::new); source.addToQueue(edmInfo); } catch (Exception e) { subTaskInfoDao.insert( (int) edmInfo.counter, edmInfo.taskInfo.task.getTaskId(), (String) baseSpout.getComponentConfiguration().getOrDefault(TOPOLOGY_NAME, "linkcheck_topology"), edmInfo.representation.getUri().toString(), States.ERROR.toString(), "Failed while queing edm info", e.getMessage(), null); StatsTupleData stats = new StatsTupleData(edmInfo.taskInfo.task.getTaskId(), 1); stats.addStatus(edmInfo.representation.getUri().toString(), e.getMessage()); outputCollector.emit(StatsTupleData.STREAM_ID, new Values(stats)); edmProcessed(edmInfo); } }
Source:
<code>private static ImportPackageSpecification[] createImportPackages(ExportPackageDescription[] exported, List<String> providedExports, ManifestElement[] imported, ManifestElement[] dynamicImported, int manifestVersion) { List<ImportPackageSpecification> allImports = null; if (manifestVersion < 2) { if (exported.length == 0 && imported == null && dynamicImported == null) return null; allImports = new ArrayList<>(exported.length + (imported == null ? 0 : imported.length)); for (ExportPackageDescription <START> exported1 : <END> exported) { if (providedExports.contains(exported1.getName())) { continue; } ImportPackageSpecificationImpl result = new ImportPackageSpecificationImpl(); result.setName(exported1.getName()); result.setVersionRange(getVersionRange(exported1.getVersion().toString())); result.setDirective(Constants.RESOLUTION_DIRECTIVE, ImportPackageSpecification.RESOLUTION_STATIC); allImports.add(result); } } else { allImports = new ArrayList<>(imported == null ? 0 : imported.length); } if (dynamicImported != null) for (ManifestElement dynamicImported1 : dynamicImported) { addImportPackages(dynamicImported1, allImports, manifestVersion, true); } if (imported != null) for (ManifestElement imported1 : imported) { addImportPackages(imported1, allImports, manifestVersion, false); } return allImports.toArray(new ImportPackageSpecification[allImports.size()]); }</code><technical_language>name exportDescription</technical_language>

Target:
private static ImportPackageSpecification[] createImportPackages(ExportPackageDescription[] exported, List<String> providedExports, ManifestElement[] imported, ManifestElement[] dynamicImported, int manifestVersion) { List<ImportPackageSpecification> allImports = null; if (manifestVersion < 2) { if (exported.length == 0 && imported == null && dynamicImported == null) return null; allImports = new ArrayList<>(exported.length + (imported == null ? 0 : imported.length)); for (ExportPackageDescription exportDescription : exported) { if (providedExports.contains(exportDescription.getName())) { continue; } ImportPackageSpecificationImpl result = new ImportPackageSpecificationImpl(); result.setName(exportDescription.getName()); result.setVersionRange(getVersionRange(exportDescription.getVersion().toString())); result.setDirective(Constants.RESOLUTION_DIRECTIVE, ImportPackageSpecification.RESOLUTION_STATIC); allImports.add(result); } } else { allImports = new ArrayList<>(imported == null ? 0 : imported.length); } if (dynamicImported != null) for (ManifestElement dynamicImport : dynamicImported) { addImportPackages(dynamicImport, allImports, manifestVersion, true); } if (imported != null) for (ManifestElement imported1 : imported) { addImportPackages(imported1, allImports, manifestVersion, false); } return allImports.toArray(new ImportPackageSpecification[allImports.size()]); }
Source:
<code>public void getPhonesShouldReturnTheListOfPhones() throws Exception { String responseString = "[" + "{" + "\"id\": \"foobar\"," + "\"verified\": \"true\"," + "\"primary\": \"true\"," + "\"e164Masked\": \"+XXXXXXXXX04\"," + <START> "\"internationalMasked\": \"+X XXX-XXX-XX04\"" + <END> "}" + "]"; MockRestAdapter<List<Phone>> adapter = new MockRestAdapter<>("foobar", responseString, null); adapter.request(new RepromiseFunction<UpholdRestAdapter, List<Phone>>() { @Override public Promise<List<Phone>> call(UpholdRestAdapter adapter) { User user = Fixtures.loadUser(); user.setUpholdRestAdapter(adapter); return user.getPhones(); } }); List<Phone> phones = adapter.getResult(); Request request = adapter.getRequest(); Assert.assertEquals(request.getMethod(), "GET"); Assert.assertEquals(request.getUrl(), String.format("%s/v0/me/phones", BuildConfig.API_SERVER_URL)); Assert.assertEquals(phones.size(), 1); Assert.assertEquals(phones.get(0).getE164Masked(), "+XXXXXXXXX04"); Assert.assertEquals(phones.get(0).getId(), "foobar"); Assert.assertEquals(phones.get(0).getInternationalMasked(), "+X XXX-XXX-XX04"); Assert.assertTrue(phones.get(0).getPrimary()); Assert.assertTrue(phones.get(0).getVerified()); }</code><technical_language>remove this field in favour of e164Masked</technical_language>

Target:
public void getPhonesShouldReturnTheListOfPhones() throws Exception { String responseString = "[" + "{" + "\"id\": \"foobar\"," + "\"verified\": \"true\"," + "\"primary\": \"true\"," + "\"e164Masked\": \"+XXXXXXXXX04\"" + "}" + "]"; MockRestAdapter<List<Phone>> adapter = new MockRestAdapter<>("foobar", responseString, null); adapter.request(new RepromiseFunction<UpholdRestAdapter, List<Phone>>() { @Override public Promise<List<Phone>> call(UpholdRestAdapter adapter) { User user = Fixtures.loadUser(); user.setUpholdRestAdapter(adapter); return user.getPhones(); } }); List<Phone> phones = adapter.getResult(); Request request = adapter.getRequest(); Assert.assertEquals(request.getMethod(), "GET"); Assert.assertEquals(request.getUrl(), String.format("%s/v0/me/phones", BuildConfig.API_SERVER_URL)); Assert.assertEquals(phones.size(), 1); Assert.assertEquals(phones.get(0).getE164Masked(), "+XXXXXXXXX04"); Assert.assertEquals(phones.get(0).getId(), "foobar"); Assert.assertTrue(phones.get(0).getPrimary()); Assert.assertTrue(phones.get(0).getVerified()); }
Source:
<code>private void initializePartition(Set<TrackerClient> trackerClients, int partitionId, long clusterGenerationId) { <START> Lock lock = new ReentrantLock(); <END> PartitionRelativeLoadBalancerState partitionRelativeLoadBalancerState = new PartitionRelativeLoadBalancerState(partitionId, new DelegatingRingFactory<>(_relativeStrategyProperties.getRingProperties()), _relativeStrategyProperties.getRingProperties().getPointsPerWeight(), lock, _listenerFactories.stream().map(factory -> factory.create(partitionId)).collect(Collectors.toList())); partitionRelativeLoadBalancerState.getLock().lock(); try { if (!_partitionLoadBalancerStateMap.containsKey(partitionId)) { updateStateForPartition(trackerClients, partitionId, partitionRelativeLoadBalancerState, clusterGenerationId); } } finally { partitionRelativeLoadBalancerState.getLock().unlock(); } }</code><technical_language>concurrency concern</technical_language>

Target:
private void initializePartition(Set<TrackerClient> trackerClients, int partitionId, long clusterGenerationId) { PartitionState partitionState = new PartitionState(partitionId, new DelegatingRingFactory<>(_relativeStrategyProperties.getRingProperties()), _relativeStrategyProperties.getRingProperties().getPointsPerWeight(), _listenerFactories.stream().map(factory -> factory.create(partitionId)).collect(Collectors.toList())); _lock.lock(); try { if (!_partitionLoadBalancerStateMap.containsKey(partitionId)) { updateStateForPartition(trackerClients, partitionId, partitionState, clusterGenerationId); } } finally { _lock.unlock(); } }
Source:
<code>public void handleHoursSpentInputChange( ChangeEvent event ) { try { Long value = hoursSpentInput.getValue().isEmpty() ? null : Long.parseLong( hoursSpentInput.getValue() ); presenter.onHoursSpentChange( value ); } catch ( NumberFormatException e ) { <START> <END> } }</code><technical_language>Likewise.</technical_language>

Target:
public void handleHoursSpentInputChange( ChangeEvent event ) { boolean isNumeric = hoursSpentInput.getValue().matches( "\\d+" ); if (isNumeric) { presenter.onHoursSpentChange( Long.parseLong( hoursSpentInput.getValue() ) ); } else { presenter.onHoursSpentChange( 0l ); hoursSpentInput.setValue( "0" ); } }
Source:
<code>protected Node[] createNodesForKey(String key) { try { String accountType = key; if (accountType.equals(Account.Type.CREDIT_CARD.getTypeName())) { return new Node[]{new CreditCardNumberAccountTypeNode()}; } else { String accountTypeDisplayname; try { accountTypeDisplayname = skCase.getCommunicationsManager().getAccountType(accountType).getDisplayName(); } catch (TskCoreException ex) { LOGGER.log(Level.SEVERE, "Error getting display name for account type. ", ex); accountTypeDisplayname = accountType; } return new Node[]{new DefaultAccountTypeNode(key, accountTypeDisplayname)}; } } catch (IllegalArgumentException ex) { LOGGER.log(Level.WARNING, "Unknown account type: {0}", key); return new Node[]{new DefaultAccountTypeNode(key, key)}; <START> } <END> }</code><technical_language>is throwing unchecked IllegalArgumentException requires do this catch</technical_language>

Target:
protected Node[] createNodesForKey(String key) { String accountType = key; if (accountType.equals(Account.Type.CREDIT_CARD.getTypeName())) { return new Node[]{new CreditCardNumberAccountTypeNode()}; } else { String accountTypeDisplayname; try { accountTypeDisplayname = skCase.getCommunicationsManager().getAccountType(accountType).getDisplayName(); } catch (TskCoreException ex) { LOGGER.log(Level.SEVERE, "Error getting display name for account type. ", ex); accountTypeDisplayname = accountType; } return new Node[]{new DefaultAccountTypeNode(key, accountTypeDisplayname)}; } }
Source:
<code>static int checkStyle (int style) { if ((style & SWT.NO_TRIM) != 0) { style &= ~(SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.MAX | SWT.RESIZE | SWT.BORDER); <START> } <END> if ((style & (SWT.MENU | SWT.MIN | SWT.MAX | SWT.CLOSE)) != 0) { style |= SWT.TITLE; } if (style == SWT.NO_MOVE) { style |= SWT.TITLE; } return style; }</code><technical_language>correct check SWT.NO_MOVE equals, instead bitwise operation (style is a bitwise of more SWT style constants). I code in Decorations.checkStyle() platforms. if ((style & SWT.NO_TRIM) != 0) { ... } else { if ((style & SWT.NO_MOVE) != 0) { style |= SWT.TITLE; } }</technical_language>

Target:
static int checkStyle (int style) { if ((style & SWT.NO_TRIM) != 0) { style &= ~(SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.MAX | SWT.RESIZE | SWT.BORDER); } else if ((style & SWT.NO_MOVE) != 0) { style |= SWT.TITLE; } if ((style & (SWT.MENU | SWT.MIN | SWT.MAX | SWT.CLOSE)) != 0) { style |= SWT.TITLE; } return style; }
Source:
<code>public void processLeftData(final MistDataEvent input) { try { input.setValue(aggregateFunc.apply((WindowData<IN>) input.getValue())); outputEmitter.emitData(input); <START> } catch (ClassCastException e) { <END> throw e; } }</code><technical_language>final</technical_language>

Target:
public void processLeftData(final MistDataEvent input) { try { input.setValue(aggregateFunc.apply((WindowData<IN>) input.getValue())); outputEmitter.emitData(input); } catch (final ClassCastException e) { throw e; } }
Source:
<code>public DataSourceWithSegmentSpec( @JsonProperty("dataSource") DataSource dataSource, @JsonProperty("intervals") QuerySegmentSpec querySegmentSpec) { <START> this.dataSource = dataSource; <END> this.querySegmentSpec = querySegmentSpec; }</code><technical_language>Add check non-null</technical_language>

Target:
public DataSourceWithSegmentSpec( @JsonProperty("dataSource") DataSource dataSource, @JsonProperty("intervals") QuerySegmentSpec querySegmentSpec) { this.dataSource = Preconditions.checkNotNull(dataSource); this.querySegmentSpec = Preconditions.checkNotNull(querySegmentSpec); }
Source:
<code>public String getErrorCodeValue() { <START> return errorCodeValue; <END> }</code><technical_language>this turned a TextAnalyticsErrorCode? Generally want loose string matching error codes</technical_language>

Target:
public TextAnalyticsErrorCode getErrorCodeValue() { return TextAnalyticsErrorCode.fromString(errorCodeValue); }
Source:
<code>public void loadChunk(int x, int z) { <START> w.loadChunk(z, z); <END> }</code><technical_language>(z, z) right</technical_language>

Target:
public void loadChunk(int x, int z) { w.loadChunk(x, z); }
Source:
<code>public static boolean promptToDeleteLock(final LockFailedException exception) { final AtomicBoolean confirmed = new AtomicBoolean(); <START> final Display display = PlatformUI.getWorkbench().getDisplay(); <END> display.syncExec(new Runnable() { public void run() { confirmed.set(MessageDialog.openQuestion(display .getActiveShell(), UIText.UIUtils_TitleLockFailed, MessageFormat.format(UIText.UIUtils_MessageLockFailed, exception.getFile().getAbsolutePath()))); } }); return confirmed.get(); }</code><technical_language>This sends a dialog user while operation is running holding locks (e.g. Workspace Root). This problematic (dead locks)</technical_language>

Target:
public static void promptToDeleteLock(final LockFailedException exception) { final Display display = PlatformUI.getWorkbench().getDisplay(); display.asyncExec(new Runnable() { public void run() { boolean confirmed = MessageDialog.openQuestion(display .getActiveShell(), UIText.UIUtils_TitleLockFailed, MessageFormat.format(UIText.UIUtils_MessageLockFailed, exception.getFile().getAbsolutePath())); if (confirmed) LockFile.unlock(exception.getFile()); } }); }
Source:
<code>public static String getResponseType(final ImmutableList<Ds3ResponseCode> responseCodes) { <START> if (responseCodes == null) return ""; <END> for (final Ds3ResponseCode responseCode : responseCodes) { final int rc = responseCode.getCode(); if (rc < 200 || rc >= 300) continue; for (final Ds3ResponseType responseType : responseCode.getDs3ResponseTypes()) { if (ConverterUtil.hasContent(responseType.getType()) && !responseType.getType().contentEquals("null")) { return StructHelper.getResponseTypeName(responseType.getType()); } if (ConverterUtil.hasContent(responseType.getComponentType()) && !responseType.getComponentType().contentEquals("null")) { return StructHelper.getResponseTypeName(responseType.getComponentType()); } } } return ""; }</code><technical_language>This isEmpty(responseCodes) check for null empty list</technical_language>

Target:
public static String getResponseType(final ImmutableList<Ds3ResponseCode> responseCodes) { if (isEmpty(responseCodes)) return ""; for (final Ds3ResponseCode responseCode : responseCodes) { final int rc = responseCode.getCode(); if (rc < 200 || rc >= 300) continue; for (final Ds3ResponseType responseType : responseCode.getDs3ResponseTypes()) { if (ConverterUtil.hasContent(responseType.getType()) && !responseType.getType().contentEquals("null")) { return StructHelper.getResponseTypeName(responseType.getType()); } if (ConverterUtil.hasContent(responseType.getComponentType()) && !responseType.getComponentType().contentEquals("null")) { return StructHelper.getResponseTypeName(responseType.getComponentType()); } } } return ""; }
Source:
<code>public RenderedImageMap produceMap(final WMSMapContent mapContent, final boolean tiled) { this.mapContent = mapContent; final GetMapRequest request = mapContent.getRequest(); RenderedImageMap map = null; this.map = null; int maxRenderingTime = wms.getMaxRenderingTime() * 1000; int localMaxRenderingTime = 0; Object timeoutOption = request.getFormatOptions().get("timeout"); if (timeoutOption != null) { try { localMaxRenderingTime = Integer.parseInt(timeoutOption.toString()) * 1000; } catch (NumberFormatException e) { LOGGER.log(Level.WARNING,"Could not parse format_option \"timeout\": "+timeoutOption, e); } } if (maxRenderingTime == 0) { maxRenderingTime = localMaxRenderingTime; } else if (localMaxRenderingTime != 0) { maxRenderingTime = Math.min(maxRenderingTime, localMaxRenderingTime); <START> } <END> RenderingTimeoutEnforcer timeout = new RenderingTimeoutEnforcer(maxRenderingTime); timeout.start(); try { map = super.produceMap(mapContent, tiled); } finally { timeout.stop(); } if (timeout.timedOut) { LOGGER.log(Level.WARNING,"Renderer timed out. Returning partial image"); } if (map == null) { map = this.map; } this.mapContent = null; this.renderer = null; this.graphic = null; this.preparedImage = null; this.map = null; return map; }</code><technical_language>This good, suspect feed this format option community</technical_language>

Target:
public RenderedImageMap produceMap(final WMSMapContent mapContent, final boolean tiled) { this.mapContent = mapContent; final GetMapRequest request = mapContent.getRequest(); RenderedImageMap map = null; this.map = null; int maxRenderingTime = wms.getMaxRenderingTime() * 1000; int localMaxRenderingTime = 0; Object timeoutOption = request.getFormatOptions().get("timeout"); if (timeoutOption != null) { try { localMaxRenderingTime = Integer.parseInt(timeoutOption.toString()); } catch (NumberFormatException e) { LOGGER.log(Level.WARNING,"Could not parse format_option \"timeout\": "+timeoutOption, e); } } if (maxRenderingTime == 0) { maxRenderingTime = localMaxRenderingTime; } else if (localMaxRenderingTime != 0) { maxRenderingTime = Math.min(maxRenderingTime, localMaxRenderingTime); } InternalTimeoutEnforcer timeout = new InternalTimeoutEnforcer(maxRenderingTime); timeout.start(); try { map = super.produceMap(mapContent, tiled); } finally { timeout.stop(); } if (timeout.timedOut) { LOGGER.log(Level.FINE,"Renderer timed out. Returning partial image"); } if (map == null) { map = this.map; } this.mapContent = null; this.renderer = null; this.graphic = null; this.preparedImage = null; this.map = null; return map; }
Source:
<code>public List<PermissionSubject> getPermissionCheckSubjects() { if (permissionsList == null) { permissionsList = new ArrayList<PermissionSubject>(); <START> permissionsList.add(new PermissionSubject(getImageId(), VdcObjectType.Disk, ActionGroup.EDIT_DISK_PROPERTIES)); <END> } return permissionsList; }</code><technical_language>this disk id, image id</technical_language>

Target:
public List<PermissionSubject> getPermissionCheckSubjects() { if (permissionsList == null) { permissionsList = new ArrayList<PermissionSubject>(); permissionsList.add(new PermissionSubject(getImage().getId(), VdcObjectType.Disk, ActionGroup.EDIT_DISK_PROPERTIES)); } return permissionsList; }
Source:
<code>public static String getParameter(String key) { try { return getConfig().getString(key); } catch (NoSuchElementException e) { <START> e.printStackTrace(); <END> throw new NoSuchElementException("No configuration found in " + CONFIG_FILE + " for key " + key + "!"); } }</code><technical_language>logger instead of printStackTrace() calls</technical_language>

Target:
public static String getParameter(String key) { try { return getConfig().getString(key); } catch (NoSuchElementException e) { throw new NoSuchElementException("No configuration found in " + CONFIG_FILE + " for key " + key + "!"); } }
Source:
<code>public static String getHtml(String backgroundColor, String preHtml, String postHtml, Set<XWidgetRendererItem> set, String name) { StringBuffer sb = new StringBuffer(); <START> sb.append(AHTML.startBorderTable(100, backgroundColor, <END> name)); if (preHtml != null) { sb.append(preHtml); } for (XWidgetRendererItem layoutData : set) { XWidget xWidget = layoutData.getXWidget(); if (xWidget instanceof IArtifactWidget) { ((IArtifactWidget) xWidget).setArtifact(layoutData.getArtifact()); } sb.append(layoutData.getXWidget().toHTML(AHTML.LABEL_FONT)); sb.append(AHTML.newline()); } if (postHtml != null) { sb.append(postHtml); } sb.append(AHTML.endBorderTable()); return sb.toString(); }</code><technical_language>variable</technical_language>

Target:
public static String getHtml(String backgroundColor, String preHtml, String postHtml, Set<XWidgetRendererItem> set, String name) { StringBuffer sb = new StringBuffer(); int defaultWidth = 100; sb.append(AHTML.startBorderTable(defaultWidth, backgroundColor, name)); if (preHtml != null) { sb.append(preHtml); } for (XWidgetRendererItem layoutData : set) { XWidget xWidget = layoutData.getXWidget(); if (xWidget instanceof IArtifactWidget) { ((IArtifactWidget) xWidget).setArtifact(layoutData.getArtifact()); } sb.append(layoutData.getXWidget().toHTML(AHTML.LABEL_FONT)); sb.append(AHTML.newline()); } if (postHtml != null) { sb.append(postHtml); } sb.append(AHTML.endBorderTable()); return sb.toString(); }
Source:
<code>public void createStates(List<State> states) { List<Document> docs = states.stream().map(converter::stateToBson).collect(Collectors.toList()); log.trace("MongoDB: CREATE [{}]: {}", () -> docs.stream().map(doc -> doc.get(idKey).toString()).collect(Collectors.joining(", ")), () -> docs); try { coll.insertMany(docs); } catch (MongoBulkWriteException mbwe) { <START> final List<String> duplicates = mbwe.getWriteErrors() <END> .stream() .filter(wr -> wr.getCode() == 11000) .map(BulkWriteError::getMessage) .collect(Collectors.toList()); if (duplicates.size() == mbwe.getWriteErrors().size()) { log.trace("MongoDB: -> CONCURRENT UPDATE: {}", duplicates); final ConcurrentUpdateException concurrentUpdateException = new ConcurrentUpdateException(); duplicates.stream().forEach(concurrentUpdateException::addInfo); throw concurrentUpdateException; } throw mbwe; } }</code><technical_language>Remove unneeded final</technical_language>

Target:
public void createStates(List<State> states) { List<Document> docs = states.stream().map(converter::stateToBson).collect(Collectors.toList()); log.trace("MongoDB: CREATE [{}]: {}", () -> docs.stream().map(doc -> doc.get(idKey).toString()).collect(Collectors.joining(", ")), () -> docs); try { coll.insertMany(docs); } catch (MongoBulkWriteException mbwe) { List<String> duplicates = mbwe.getWriteErrors() .stream() .filter(wr -> DUPLICATE_KEY.equals(fromErrorCode(wr.getCode()))) .map(BulkWriteError::getMessage) .collect(Collectors.toList()); if (duplicates.size() == mbwe.getWriteErrors().size()) { log.trace("MongoDB: -> DUPLICATE KEY: {}", duplicates); ConcurrentUpdateException concurrentUpdateException = new ConcurrentUpdateException(); duplicates.forEach(concurrentUpdateException::addInfo); throw concurrentUpdateException; } throw mbwe; } }
Source:
<code>public static long getNextPageStart(JSONObject jsonObject) throws StashReportExtractionException { <START> long result = 0; <END> if (jsonObject.get("nextPageStart") != null) { return (Long) jsonObject.get("nextPageStart"); } return 0; }</code><technical_language>This is unused</technical_language>

Target:
public static long getNextPageStart(JSONObject jsonObject) throws StashReportExtractionException { if (jsonObject.get("nextPageStart") != null) { return (Long) jsonObject.get("nextPageStart"); } return 0; }
Source:
<code><START> public String getExtractedRemoveButtonConfiguration() { <END> String removeButtonConfiguration = getRemoveButtonConfiguration().trim(); if( !removeButtonConfiguration.startsWith( CKEDITOR_CONFIG_REMOVE_BUTTONS ) || !removeButtonConfiguration.endsWith( ";" ) ) { throw new RuntimeException( "Invalid CKEditor removeButtons configuration" ); } int equalSignIndex = removeButtonConfiguration.indexOf( '=' ); int lastSemicolonIndex = removeButtonConfiguration.lastIndexOf( ';' ); return removeButtonConfiguration.substring( equalSignIndex + 1, lastSemicolonIndex ).trim(); }</code><technical_language>This method API exist in SWT Nebula RichTextEditor. public method is toString</technical_language>

Target:
private String getExtractedRemoveButtonConfiguration() { String removeButtonConfiguration = getRemoveButtonConfiguration().trim(); if( !removeButtonConfiguration.startsWith( CKEDITOR_CONFIG_REMOVE_BUTTONS ) || !removeButtonConfiguration.endsWith( ";" ) ) { throw new RuntimeException( "Invalid CKEditor removeButtons configuration" ); } int equalSignIndex = removeButtonConfiguration.indexOf( '=' ); int lastSemicolonIndex = removeButtonConfiguration.lastIndexOf( ';' ); return removeButtonConfiguration.substring( equalSignIndex + 1, lastSemicolonIndex ).trim(); }
Source:
<code>public void setUp() throws Exception { when( decisionTableXLSResourceType.getSuffix() ).thenReturn( "XLS" ); when( decisionTableXLSResourceType.accept( XLSPath ) ).thenReturn( true ); when( decisionTableXLSResourceType.accept( XLSXPath ) ).thenReturn( false ); when( decisionTableXLSXResourceType.getSuffix() ).thenReturn( "XLSX" ); when( decisionTableXLSXResourceType.accept( XLSPath ) ).thenReturn( false ); when( decisionTableXLSXResourceType.accept( XLSXPath ) ).thenReturn( true ); presenter = new DecisionTableXLSEditorPresenter( view, decisionTableXLSResourceType, decisionTableXLSXResourceType, <START> busyIndicatorView, new ServiceMock() <END> ) { { kieView = mock( KieEditorWrapperView.class ); overviewWidget = mock( OverviewWidgetPresenter.class ); versionRecordManager = versionRecordManagerMock; concurrentUpdateSessionInfo = null; } protected void makeMenuBar() { } protected void addSourcePage() { } }; }</code><technical_language>nice parameters split lines</technical_language>

Target:
public void setUp() throws Exception { when( decisionTableXLSResourceType.getSuffix() ).thenReturn( "XLS" ); when( decisionTableXLSResourceType.accept( XLSPath ) ).thenReturn( true ); when( decisionTableXLSResourceType.accept( XLSXPath ) ).thenReturn( false ); when( decisionTableXLSXResourceType.getSuffix() ).thenReturn( "XLSX" ); when( decisionTableXLSXResourceType.accept( XLSPath ) ).thenReturn( false ); when( decisionTableXLSXResourceType.accept( XLSXPath ) ).thenReturn( true ); presenter = new DecisionTableXLSEditorPresenter( view, decisionTableXLSResourceType, decisionTableXLSXResourceType, busyIndicatorView, notification, new ServiceMock() ) { { kieView = mock( KieEditorWrapperView.class ); overviewWidget = mock( OverviewWidgetPresenter.class ); versionRecordManager = versionRecordManagerMock; concurrentUpdateSessionInfo = null; } protected void makeMenuBar() { } protected void addSourcePage() { } }; }
Source:
<code>public User signup(String name) { control(by.input("username")).set(name); <START> control(by.name("Submit")).clickAndWaitToBecomeStale(Duration.ofSeconds(120)); <END> return new User(getJenkins(), name); }</code><technical_language>2 minutes? much, I 1 2 seconds more enough</technical_language>

Target:
public User signup(String name) { control(by.input("username")).set(name); control(by.name("Submit")).clickAndWaitToBecomeStale(); return new User(getJenkins(), name); }
Source:
<code>public boolean contains(final String roleName) { try { return StreamSupport.stream(delegate.spliterator(), false).anyMatch(role -> <START> (regex.matcher(role).matches() && role.replaceFirst(regex.pattern(), replace).equals(roleName)) || <END> (keepNonMapped && !regex.matcher(role).matches() && role.equals(roleName))); } catch (PatternSyntaxException | IndexOutOfBoundsException ex) { throw log.invalidReplacementInRegexRoleMapper(); } }</code><technical_language>I for some components allow a replacement specified, allow a boolean replaceAll configured occurrences replaced first. default false (i.e., replace occurrence default). (e.g., RegexNameRewriter)</technical_language>

Target:
public boolean contains(final String roleName) { try { return StreamSupport.stream(delegate.spliterator(), false).anyMatch(role -> { String pattern = this.pattern.pattern(); boolean containsRegex = this.pattern.matcher(role).find(); boolean containsRegexAndRoleExists = containsRegex && (replaceAll ? role.replaceAll(pattern, replace).equals(roleName) : role.replaceFirst(pattern, replace).equals(roleName)); boolean doesNotContainRegexButRoleExists = !containsRegex && keepNonMapped && role.equals(roleName); return containsRegexAndRoleExists || doesNotContainRegexButRoleExists; }); } catch (PatternSyntaxException | IndexOutOfBoundsException ex) { throw log.invalidReplacementInRegexRoleMapper(); } }
Source:
<code>void setErrorReportApiClient(@NonNull ErrorReportApiClient errorReportApiClient) { if (errorReportApiClient == null) { throw new IllegalArgumentException("ErrorReportApiClient cannot be null."); } <START> DeliveryCompat compat = (DeliveryCompat) config.getDelivery(); <END> compat.errorReportApiClient = errorReportApiClient; }</code><technical_language>This cast error-prone. If interacts Delivery interface this deprecated interface, crash</technical_language>

Target:
void setErrorReportApiClient(@NonNull ErrorReportApiClient errorReportApiClient) { if (errorReportApiClient == null) { throw new IllegalArgumentException("ErrorReportApiClient cannot be null."); } DeliveryCompat compat = getAndSetDeliveryCompat(); compat.errorReportApiClient = errorReportApiClient; }
Source:
<code>public void whenExpectingAssumptionViolatedExceptionStatementsThrowingDifferentExceptionShouldFail() { Statement statementThrowingSomeException = new Fail(new SomeException("not expected")); ExpectException expectException = new ExpectException(statementThrowingSomeException, AssumptionViolatedException.class); try { expectException.evaluate(); fail("should throw 'Unexpected exception' when statement throws an exception which is not the one expected"); <START> } catch (Exception e) { <END> assertThat(e.getMessage(), equalTo("Unexpected exception, expected<org.junit.internal.AssumptionViolatedException> " + "but was<org.junit.internal.runners.statements.ExpectExceptionTest$SomeException>")); } }</code><technical_language>Is a more specific exception caught</technical_language>

Target:
public void whenExpectingAssumptionViolatedExceptionStatementsThrowingDifferentExceptionShouldFail() { Statement delegate = new Fail(new SomeException("not expected")); ExpectException expectException = new ExpectException(delegate, AssumptionViolatedException.class); try { expectException.evaluate(); fail("should throw 'Unexpected exception' when statement throws an exception which is not the one expected"); } catch (Exception e) { assertThat(e.getMessage(), equalTo("Unexpected exception, expected<org.junit.internal.AssumptionViolatedException> " + "but was<org.junit.internal.runners.statements.ExpectExceptionTest$SomeException>")); } }
Source:
<code>public void doScrape() throws Exception { MBeanServerConnection beanConn; JMXConnector jmxc = null; if (jmxUrl.isEmpty()) { <START> try { <END> beanConn = ManagementFactory.getPlatformMBeanServer(); } catch (JMRuntimeException e) { if (e.getCause() instanceof ClassNotFoundException) return; else throw e; } } else { Map<String, Object> environment = new HashMap<String, Object>(); if (username != null && username.length() != 0 && password != null && password.length() != 0) { String[] credent = new String[] {username, password}; environment.put(javax.management.remote.JMXConnector.CREDENTIALS, credent); } if (ssl) { environment.put(Context.SECURITY_PROTOCOL, "ssl"); SslRMIClientSocketFactory clientSocketFactory = new SslRMIClientSocketFactory(); environment.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, clientSocketFactory); environment.put("com.sun.jndi.rmi.factory.socket", clientSocketFactory); } jmxc = JMXConnectorFactory.connect(new JMXServiceURL(jmxUrl), environment); beanConn = jmxc.getMBeanServerConnection(); } try { Set<ObjectInstance> mBeanNames = new HashSet(); for (ObjectName name : whitelistObjectNames) { mBeanNames.addAll(beanConn.queryMBeans(name, null)); } for (ObjectName name : blacklistObjectNames) { mBeanNames.removeAll(beanConn.queryMBeans(name, null)); } for (ObjectInstance name : mBeanNames) { long start = System.nanoTime(); scrapeBean(beanConn, name.getObjectName()); logger.fine("TIME: " + (System.nanoTime() - start) + " ns for " + name.getObjectName().toString()); } } finally { if (jmxc != null) { jmxc.close(); } } }</code><technical_language>Throwing exception is correct behaviour, scrape fail</technical_language>

Target:
public void doScrape() throws Exception { MBeanServerConnection beanConn; JMXConnector jmxc = null; if (jmxUrl.isEmpty()) { beanConn = ManagementFactory.getPlatformMBeanServer(); } else { Map<String, Object> environment = new HashMap<String, Object>(); if (username != null && username.length() != 0 && password != null && password.length() != 0) { String[] credent = new String[] {username, password}; environment.put(javax.management.remote.JMXConnector.CREDENTIALS, credent); } if (ssl) { environment.put(Context.SECURITY_PROTOCOL, "ssl"); SslRMIClientSocketFactory clientSocketFactory = new SslRMIClientSocketFactory(); environment.put(RMIConnectorServer.RMI_CLIENT_SOCKET_FACTORY_ATTRIBUTE, clientSocketFactory); environment.put("com.sun.jndi.rmi.factory.socket", clientSocketFactory); } jmxc = JMXConnectorFactory.connect(new JMXServiceURL(jmxUrl), environment); beanConn = jmxc.getMBeanServerConnection(); } try { Set<ObjectInstance> mBeanNames = new HashSet(); for (ObjectName name : whitelistObjectNames) { mBeanNames.addAll(beanConn.queryMBeans(name, null)); } for (ObjectName name : blacklistObjectNames) { mBeanNames.removeAll(beanConn.queryMBeans(name, null)); } for (ObjectInstance name : mBeanNames) { long start = System.nanoTime(); scrapeBean(beanConn, name.getObjectName()); logger.fine("TIME: " + (System.nanoTime() - start) + " ns for " + name.getObjectName().toString()); } } finally { if (jmxc != null) { jmxc.close(); } } }
Source:
<code>public EventDispatcherDescriptor getDispatcherDescriptor() { int nbd = contribs.size(); if (nbd > 0) { return contribs.get(nbd - 1); } else { return null; <START> } <END> }</code><technical_language>return contribs.isEmpty() ? null : contribs.get(contribs.size() - 1)</technical_language>

Target:
public EventDispatcherDescriptor getDispatcherDescriptor() { return contribs.isEmpty() ? null : contribs.get(contribs.size() - 1); }
Source:
<code>private Stream<String> getKeysStream() { try (Cursor<byte[]> cursor = client .getConnectionFactory() .getConnection() .scan(ScanOptions .scanOptions() .match(getPatternTicketRedisKey()) .count(SCAN_COUNT) .build())) { return StreamSupport .stream(Spliterators.spliteratorUnknownSize(cursor, Spliterator.ORDERED), false) .map((key) -> (String) client.getKeySerializer().deserialize(key)) <START> .collect(Collectors.toList()) <END> .stream(); } catch (IOException ex) { LOGGER.error("Could not acquire a Redis connection", ex); return Stream.empty(); } }</code><technical_language>Sure, sounds OK me. Also, please correct indentations. (Looks tabs in some places)</technical_language>

Target:
private Stream<String> getKeysStream() { final Cursor<byte[]> cursor = client .getConnectionFactory() .getConnection() .scan(ScanOptions .scanOptions() .match(getPatternTicketRedisKey()) .count(SCAN_COUNT) .build()); return StreamSupport .stream(Spliterators.spliteratorUnknownSize(cursor, Spliterator.ORDERED), false) .map(key -> (String) client.getKeySerializer().deserialize(key)) .onClose(() -> { try { cursor.close(); } catch (final IOException e) { LOGGER.error("Could not close Redis connection", e); } }); }
Source:
<code>public static void display(final String token, final Screen view) { if (view.isRequiresSignIn() && !isSignedIn()) { doSignIn(token); } else { view.setToken(token); body.setView(view); } <START> if (view instanceof PatchScreen) { <END> patchScreen = (PatchScreen) view; menuLeft.setVisible(diffBar, true); menuLeft.selectTab(menuLeft.getWidgetIndex(diffBar)); } else { if (patchScreen != null) { menuLeft.selectTab(isSignedIn() ? 1 : 0); } menuLeft.setVisible(diffBar, false); patchScreen = null; } }</code><technical_language>This code in display(). early. Move override of onShowView() method of PatchScreen itself... base class Screen. problem is in display() Screen ready for display yet. attached a hidden part of UI RPCs start populate data. RPCs done, onShowView() method updates UI Screen visible. Yes, display() is named wrong. :-)</technical_language>

Target:
public static void display(final String token, final Screen view) { if (view.isRequiresSignIn() && !isSignedIn()) { doSignIn(token); } else { view.setToken(token); body.setView(view); } }
Source:
<code>private void deleteAlarmAssociations(int alarmId) { Map<Integer, AlarmAssociationAndFact> associationFacts = alarmAssociationById.remove(alarmId); if (associationFacts == null) { return; } for (Integer association : associationFacts.keySet()) { AlarmAssociationAndFact assocationFact = associationFacts.get(association); if (assocationFact != null) { <START> LOG.debug("Deleting ack from session: {}", assocationFact.getAlarmAssociation()); <END> getKieSession().delete(assocationFact.getFact()); } } }</code><technical_language>ack association</technical_language>

Target:
private void deleteAlarmAssociations(int alarmId) { Map<Integer, AlarmAssociationAndFact> associationFacts = alarmAssociationById.remove(alarmId); if (associationFacts == null) { return; } for (Integer association : associationFacts.keySet()) { AlarmAssociationAndFact assocationFact = associationFacts.get(association); if (assocationFact != null) { LOG.debug("Deleting association from session: {}", assocationFact.getAlarmAssociation()); getKieSession().delete(assocationFact.getFact()); } } }
Source:
<code>protected void innerMap( InputRow inputRow, Text text, Context context ) throws IOException, InterruptedException { final Map<String, Set<String>> dims = Maps.newTreeMap(); for(final String dim : inputRow.getDimensions()) { final Set<String> dimValues = ImmutableSortedSet.copyOf(inputRow.getDimension(dim)); if(dimValues.size() > 0) { dims.put(dim, dimValues); } } final List<Object> groupKey = ImmutableList.of( <START> getConfig().getRollupSpec().getRollupGranularity().truncate(inputRow.getTimestampFromEpoch()), <END> dims ); context.write(new Text(HadoopDruidIndexerConfig.jsonMapper.writeValueAsBytes(groupKey)), NullWritable.get()); }</code><technical_language>I this is a string of getters, code a bit easier follow if override config() method store instance of granularity there</technical_language>

Target:
protected void innerMap( InputRow inputRow, Text text, Context context ) throws IOException, InterruptedException { final Map<String, Set<String>> dims = Maps.newTreeMap(); for(final String dim : inputRow.getDimensions()) { final Set<String> dimValues = ImmutableSortedSet.copyOf(inputRow.getDimension(dim)); if(dimValues.size() > 0) { dims.put(dim, dimValues); } } final List<Object> groupKey = ImmutableList.of( rollupGranularity.truncate(inputRow.getTimestampFromEpoch()), dims ); context.write( new BytesWritable(HadoopDruidIndexerConfig.jsonMapper.writeValueAsBytes(groupKey)), NullWritable.get() ); }
Source:
<code>private ForkliftConsumerI getGroupedTopic(GroupedTopicSource source) throws ConnectorException { if (!source.groupSpecified()) throw new ConnectorException("No consumer group specified"); final String groupName = source.getGroup().replaceAll("\\.", "_"); final String topicName = source.getName().replaceAll("\\.", "_"); <START> return getConsumerForSource(new QueueSource("Consumer." + groupName + ".VirtualTopic." + topicName)); <END> }</code><technical_language>this new GroupedTopicSource</technical_language>

Target:
private ForkliftConsumerI getGroupedTopic(GroupedTopicSource source) throws ConnectorException { if (!source.groupSpecified()) throw new ConnectorException("No consumer group specified"); final String groupName = source.getGroup().replaceAll("\\.", "_"); final String topicName = source.getName(); return getConsumerForSource(new QueueSource("Consumer." + groupName + ".VirtualTopic." + topicName)); }
Source:
<code>protected void loadLibs(Context context) { <START> new SqliteLibraryLoader().loadSqlCipher(context); <END> }</code><technical_language>static call. need instantiate this util class time</technical_language>

Target:
protected void loadLibs(Context context) { SqliteLibraryLoader.loadSqlCipher(context); }
Source:
<code>public String sequenceValue() { <START> return name(); <END> }</code><technical_language>I this convention means longer rename-refactor identifiers changing meaning of program. is in effect a subtle kind of reflection. I prefer a distinct string field in this case others it. I realize lots of this kind of in OCS, fix encounter it. this sense</technical_language>

Target:
public String sequenceValue() { return _sequenceValue; }
Source:
<code>public void detectLanguagesBatchInputShowStatistics() { detectLanguageShowStatisticsRunner((inputs, options) -> { StepVerifier.create(client.detectBatchLanguagesWithResponse(inputs, options)) <START> .assertNext(response -> validateBatchResult(response.getValue(), getExpectedBatchDetectedLanguages(), "Language")) <END> .verifyComplete(); }); }</code><technical_language>If write "language", switch-case longer passes</technical_language>

Target:
public void detectLanguagesBatchInputShowStatistics() { detectLanguageShowStatisticsRunner((inputs, options) -> { StepVerifier.create(client.detectBatchLanguagesWithResponse(inputs, options)) .assertNext(response -> validateBatchResult(response.getValue(), getExpectedBatchDetectedLanguages(), TestEndpoint.LANGUAGE)) .verifyComplete(); }); }