auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> public void sendRedirect(String urlStr) { <END> try { getContext().getResponse().sendRedirect(encodeUrlToUtf8(urlStr)); } catch (IOException exp) { LOGGER.error("Failed to redirect to url [" + urlStr + "]", exp); } }</code><technical_language>please move implementation xxxService add a delegation in ScriptService</technical_language>

Target:
public void sendRedirect(String urlStr) { getCelementsWebService().sendRedirect(urlStr); }
Source:
<code>public JWTBuilderImpl() { builder = JWT.create(); builder.withIssuer(NUXEO_ISSUER); String subject = NuxeoPrincipal.getCurrent().getActingUser(); if (subject == null) { throw new NuxeoException("No currently logged-in user"); } builder.withSubject(subject); withTTL(0); <START> String token = JWT.create() <END> .withIssuer("nuxeo") .withSubject("NUXEO_USERNAME") .withExpiresAt(new Date(System.currentTimeMillis() + 24 * 60 * 60 * 1000)) .sign(Algorithm.HMAC512("NUXEO_JWT_SECRET")); }</code><technical_language>in this commit :-)</technical_language>

Target:
public JWTBuilderImpl() { builder = JWT.create(); builder.withIssuer(NUXEO_ISSUER); String subject = NuxeoPrincipal.getCurrent().getActingUser(); if (subject == null) { throw new NuxeoException("No currently logged-in user"); } builder.withSubject(subject); withTTL(0); }
Source:
<code>public Predicate<String> provideServerDeletedPredicate(final DimensionDataCloudControlApi api, final ComputeServiceConstants.Timeouts timeouts, final ComputeServiceConstants.PollPeriod pollPeriod) { <START> return retry(new ServerState(api.getServerApi(), State.DELETED), timeouts.imageAvailable, <END> pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod); }</code><technical_language>timeouts.nodeTerminated</technical_language>

Target:
public Predicate<String> provideServerDeletedPredicate(final DimensionDataCloudControlApi api, final ComputeServiceConstants.Timeouts timeouts, final ComputeServiceConstants.PollPeriod pollPeriod) { return retry(new ServerState(api.getServerApi(), State.DELETED), timeouts.nodeTerminated, pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod); }
Source:
<code>public void waitCloseProjectConfigForm() { <START> new WebDriverWait(seleniumWebDriver, LOADER_TIMEOUT_SEC) <END> .until(ExpectedConditions.invisibilityOfElementLocated(By.id(Locators.MAIN_FORM_ID))); }</code><technical_language>Please, "SeleniumWebDriverHelper#waitInvisibility" method: seleniumWebDriverHelper.waitInvisibility(By.id(MAIN_FORM_ID), LOADER_TIMEOUT_SEC);</technical_language>

Target:
public void waitCloseProjectConfigForm() { seleniumWebDriverHelper.waitInvisibility(By.id(Locators.MAIN_FORM_ID), LOADER_TIMEOUT_SEC); }
Source:
<code>protected void scriptConsoleInitialized(ScriptConsole console){ console.getCommand().addInputStreamListener(new ChartStreamDaemon2(console, dataSet, parser)); try { IWorkbenchPage p = PlatformUI.getWorkbench().showPerspective(GraphingPerspective.ID, PlatformUI.getWorkbench().getActiveWorkbenchWindow()); IViewPart ivp = p.showView(GraphSelectorView.ID); String name = console.getName(); ((GraphSelectorView)ivp).createScriptSet(name.substring(name.lastIndexOf('/')+1), dataSet); } catch(WorkbenchException we) { <START> MessageDialog.openError(Display.getCurrent().getActiveShell(), <END> Messages.RunScriptChartAction_couldNotSwitchToGraphicPerspective, Messages.RunScriptChartAction_couldNotSwitchToGraphicPerspective + ": " + we.getMessage()); } }</code><technical_language>ErrorDialog <LINK_0> is recommended stacktrace easily visible author too</technical_language>

Target:
protected void scriptConsoleInitialized(ScriptConsole console){ console.getCommand().addInputStreamListener(new ChartStreamDaemon2(console, dataSet, parser)); try { IWorkbenchPage p = PlatformUI.getWorkbench().showPerspective(GraphingPerspective.ID, PlatformUI.getWorkbench().getActiveWorkbenchWindow()); IViewPart ivp = p.showView(GraphSelectorView.ID); String name = console.getName(); ((GraphSelectorView)ivp).createScriptSet(name.substring(name.lastIndexOf('/')+1), dataSet); } catch(WorkbenchException we) { IStatus status = new Status(IStatus.ERROR, GraphicalRunPlugin.ID, 1, Messages.RunScriptChartAction_couldNotSwitchToGraphicPerspective , we); ErrorDialog.openError(Display.getCurrent().getActiveShell(), Messages.RunScriptChartAction_couldNotSwitchToGraphicPerspective, null, status); } }
Source:
<code>void fireCheckChangeEvent(CheckChangeEvent evt) { Object[] listeners = listenerList.getListenerList(); for (int i = 0; i < listeners.length; i++) { if (listeners[i] == CheckChangeEventListener.class) { <START> ((CheckChangeEventListener) listeners[i]).checkStateChanged(evt); <END> } } }</code><technical_language>This is correct, wrong is for (it e.g. int i = listeners.length - 2; i >= 0; i -= 2)</technical_language>

Target:
void fireCheckChangeEvent(CheckChangeEvent evt) { Object[] listeners = listenerList.getListenerList(); for (int i = 0; i < listeners.length-1; i += 2) { if (listeners[i] == CheckChangeEventListener.class) { ((CheckChangeEventListener) listeners[i+1]).checkStateChanged(evt); } } }
Source:
<code>public void onTraversalStart() { Set<VCFHeaderLine> defaultToolHeaderLines = getDefaultToolVCFHeaderLines(); for (final ConcordanceState state : ConcordanceState.values()) { snpCounts.put(state, new MutableLong(0)); indelCounts.put(state, new MutableLong(0)); } if (truePositivesAndFalseNegativesVcf != null) { truePositivesAndFalseNegativesVcfWriter = createVCFWriter(truePositivesAndFalseNegativesVcf); final VCFHeader truthHeader = getTruthHeader(); truthHeader.addMetaDataLine(TRUTH_STATUS_HEADER_LINE); defaultToolHeaderLines.forEach(truthHeader::addMetaDataLine); truePositivesAndFalseNegativesVcfWriter.writeHeader(truthHeader); } if (truePositivesAndFalsePositivesVcf != null) { truePositivesAndFalsePositivesVcfWriter = createVCFWriter(truePositivesAndFalsePositivesVcf); final VCFHeader evalHeader = getEvalHeader(); <START> defaultToolHeaderLines.stream().forEach(evalHeader::addMetaDataLine); <END> evalHeader.addMetaDataLine(TRUTH_STATUS_HEADER_LINE); truePositivesAndFalsePositivesVcfWriter.writeHeader(evalHeader); } if (filteredTrueNegativesAndFalseNegativesVcf != null) { filteredTrueNegativesAndFalseNegativesVcfWriter = createVCFWriter(filteredTrueNegativesAndFalseNegativesVcf); final VCFHeader evalHeader = getEvalHeader(); evalHeader.addMetaDataLine(TRUTH_STATUS_HEADER_LINE); defaultToolHeaderLines.stream().forEach(evalHeader::addMetaDataLine); filteredTrueNegativesAndFalseNegativesVcfWriter.writeHeader(evalHeader); } }</code><technical_language>consistent forEach stream().forEach. plain forEach. If order of is important forEachOrdered</technical_language>

Target:
public void onTraversalStart() { Set<VCFHeaderLine> defaultToolHeaderLines = getDefaultToolVCFHeaderLines(); for (final ConcordanceState state : ConcordanceState.values()) { snpCounts.put(state, new MutableLong(0)); indelCounts.put(state, new MutableLong(0)); } if (truePositivesAndFalseNegativesVcf != null) { truePositivesAndFalseNegativesVcfWriter = createVCFWriter(truePositivesAndFalseNegativesVcf); final VCFHeader truthHeader = getTruthHeader(); truthHeader.addMetaDataLine(TRUTH_STATUS_HEADER_LINE); defaultToolHeaderLines.forEach(truthHeader::addMetaDataLine); truePositivesAndFalseNegativesVcfWriter.writeHeader(truthHeader); } if (truePositivesAndFalsePositivesVcf != null) { truePositivesAndFalsePositivesVcfWriter = createVCFWriter(truePositivesAndFalsePositivesVcf); final VCFHeader evalHeader = getEvalHeader(); defaultToolHeaderLines.forEach(evalHeader::addMetaDataLine); evalHeader.addMetaDataLine(TRUTH_STATUS_HEADER_LINE); truePositivesAndFalsePositivesVcfWriter.writeHeader(evalHeader); } if (filteredTrueNegativesAndFalseNegativesVcf != null) { filteredTrueNegativesAndFalseNegativesVcfWriter = createVCFWriter(filteredTrueNegativesAndFalseNegativesVcf); final VCFHeader evalHeader = getEvalHeader(); evalHeader.addMetaDataLine(TRUTH_STATUS_HEADER_LINE); defaultToolHeaderLines.forEach(evalHeader::addMetaDataLine); filteredTrueNegativesAndFalseNegativesVcfWriter.writeHeader(evalHeader); } }
Source:
<code><START> public int getTotalAliveNodesNumber() { <END> int count = 0; for (RMNode node : allNodes.values()) { if (!node.isDown()) count++; } return count; }</code><technical_language>sense add this method ResourceManager interface</technical_language>

Target:
public int getTotalAliveNodesNumber() { return listAliveNodeUrls().size(); }
Source:
<code>public int getMetricsCategory() { return <START> 0; <END> }</code><technical_language>need create event in frameworks/base/core/proto/android/app/settings_enums.proto</technical_language>

Target:
public int getMetricsCategory() { return SettingsEnums.ADB_WIRELESS_DEVICE_DETAILS; }
Source:
<code>public void start() { String networkAlias = getNetworkAliases().get(0); proxy = new SocatContainer() .withNetwork(getNetwork()) <START> .withTarget(9093, networkAlias) <END> .withTarget(2181, networkAlias); proxy.start(); withEnv("KAFKA_ADVERTISED_LISTENERS", "BROKER://" + networkAlias + ":9093,PLAINTEXT://" + proxy.getContainerIpAddress() + ":" + proxy.getFirstMappedPort()); if (externalZookeeperConnect != null) { withEnv("KAFKA_ZOOKEEPER_CONNECT", externalZookeeperConnect); } else { addExposedPort(ZOOKEEPER_PORT); withEnv("KAFKA_ZOOKEEPER_CONNECT", "localhost:2181"); withClasspathResourceMapping("tc-zookeeper.properties", "/zookeeper.properties", BindMode.READ_ONLY); withCommand("sh", "-c", "zookeeper-server-start /zookeeper.properties & /etc/confluent/docker/run"); } super.start(); }</code><technical_language>I more consistent KAFKA_PORT (as in line 35)</technical_language>

Target:
public void start() { String networkAlias = getNetworkAliases().get(0); proxy = new SocatContainer() .withNetwork(getNetwork()) .withTarget(KAFKA_PORT, networkAlias) .withTarget(ZOOKEEPER_PORT, networkAlias); proxy.start(); withEnv("KAFKA_ADVERTISED_LISTENERS", "BROKER://" + networkAlias + ":" + KAFKA_PORT +",PLAINTEXT://" + proxy.getContainerIpAddress() + ":" + proxy.getFirstMappedPort()); if (externalZookeeperConnect != null) { withEnv("KAFKA_ZOOKEEPER_CONNECT", externalZookeeperConnect); } else { addExposedPort(ZOOKEEPER_PORT); withEnv("KAFKA_ZOOKEEPER_CONNECT", "localhost:2181"); withClasspathResourceMapping("tc-zookeeper.properties", "/zookeeper.properties", BindMode.READ_ONLY); withCommand("sh", "-c", "zookeeper-server-start /zookeeper.properties & /etc/confluent/docker/run"); } super.start(); }
Source:
<code>public void stop(ConfigBag parameters) { <START> doStop(parameters, new Callable<StopMachineDetails<Integer>>() { <END> public StopMachineDetails<Integer> call() { return stopAnyProvisionedMachines(); } }); }</code><technical_language>MachineLifecycleEffectorTasks is configurable end persisted. introduce new anonymous classes if references kept, existing anonymous classes indexes. I anonymous classes task bodies, supposed get persisted, safe sorry</technical_language>

Target:
public void stop(ConfigBag parameters) { doStop(parameters, new StopAnyProvisionedMachinesTask()); }
Source:
<code>@Test public void noCacheAndKnownContentLengthDispatchToStats() { responses.add(responseOf(ResponseBody.create(null, new byte[10]))); Action action = TestUtils.mockAction(URI_KEY_1, URI_1); networkHandler.load(action.getRequest(), 0, new Callback() { @Override public void onSuccess(Result result) { verify(stats).dispatchDownloadFinished(10); } @Override public void onError(Throwable t) { <START> fail(t.getMessage()); <END> } }); }</code><technical_language>tricky question - this route right thread</technical_language>

Target:
@Test public void noCacheAndKnownContentLengthDispatchToStats() { responses.add(responseOf(ResponseBody.create(null, new byte[10]))); Action action = TestUtils.mockAction(URI_KEY_1, URI_1); networkHandler.load(action.getRequest(), 0, new RequestHandler.Callback() { @Override public void onSuccess(Result result) { verify(stats).dispatchDownloadFinished(10); } @Override public void onError(Throwable t) { fail(t.getMessage()); } }); }
Source:
<code>protected void addArgs(final ArgumentParser parser) { httpArg = parser.addArgument("--http") .setDefault("<LINK_0>") .help("http endpoint"); adminArg = parser.addArgument("--admin") .setDefault("<LINK_1>") .help("admin http port"); zkAclAgentDigest = parser.addArgument("--zk-acl-agent-digest") .type(String.class); zkAclMasterPassword = parser.addArgument("--zk-acl-master-password") .type(String.class) .help("ZooKeeper master password (for ZooKeeper ACLs). If the " + ZK_MASTER_PASSWORD_ENVVAR + " environment variable is present this argument is ignored."); agentReapingTimeout = parser.addArgument("--agent-reaping-timeout") .type(Long.class) .setDefault(TimeUnit.DAYS.toHours(14)) .help("In hours. Agents will be automatically de-registered if they are DOWN for more " + "than the specified timeout. To disable reaping, set to 0."); jobRetention = parser.addArgument("--job-retention") .type(Long.class) .setDefault(-1L) .help("In days. Jobs not deployed anywhere and with a job history showing they were last " + "used before the specified retention time will be removed. " + "This is disabled by default by setting it to a sentinel value of -1."); whitelistedCapabilities = parser.addArgument("--whitelisted-capability") .action(append()) .setDefault(new ArrayList<>()) <START> .help("The Linux capabilities containers on this agent are allowed to add. " <END> + "Defaults to allowing nothing."); }</code><technical_language>of "this agent" this copy pasted previous commit</technical_language>

Target:
protected void addArgs(final ArgumentParser parser) { httpArg = parser.addArgument("--http") .setDefault("<LINK_0>") .help("http endpoint"); adminArg = parser.addArgument("--admin") .setDefault("<LINK_1>") .help("admin http port"); zkAclAgentDigest = parser.addArgument("--zk-acl-agent-digest") .type(String.class); zkAclMasterPassword = parser.addArgument("--zk-acl-master-password") .type(String.class) .help("ZooKeeper master password (for ZooKeeper ACLs). If the " + ZK_MASTER_PASSWORD_ENVVAR + " environment variable is present this argument is ignored."); agentReapingTimeout = parser.addArgument("--agent-reaping-timeout") .type(Long.class) .setDefault(TimeUnit.DAYS.toHours(14)) .help("In hours. Agents will be automatically de-registered if they are DOWN for more " + "than the specified timeout. To disable reaping, set to 0."); jobRetention = parser.addArgument("--job-retention") .type(Long.class) .setDefault(-1L) .help("In days. Jobs not deployed anywhere and with a job history showing they were last " + "used before the specified retention time will be removed. " + "This is disabled by default by setting it to a sentinel value of -1."); whitelistedCapabilities = parser.addArgument("--whitelisted-capability") .action(append()) .setDefault(new ArrayList<>()) .help("The Linux capabilities Helios jobs are allowed to add to their Docker containers. " + "Defaults to allowing nothing."); }
Source:
<code>public void connectorDefinitionEmptyDir() throws IOException { <START> processRuntime.start(ProcessPayloadBuilder.start() <END> .withProcessDefinitionKey(CATEGORIZE_PROCESS) .withVariable("expectedKey", true) .build()); }</code><technical_language>here, a process a user task allow check variable valued connector execution</technical_language>

Target:
public void connectorDefinitionEmptyDir() { processRuntime.start(ProcessPayloadBuilder.start() .withProcessDefinitionKey(CATEGORIZE_PROCESS) .withVariable("expectedKey", true) .build()); }
Source:
<code>public String getDescription() { <START> return "Dropping an Association to generate a ClearAssociationAction"; <END> }</code><technical_language>Missing NLS</technical_language>

Target:
public String getDescription() { return Messages.AssociationToClearAssociationActionDropStrategy_Description; }
Source:
<code><START> protected void doDeclares() { <END> if (this.isRunning()) { if (this.admin != null) { if (this.queue != null) { admin.declareQueue(this.queue); } if (this.binding != null) { admin.declareBinding(this.binding); } } } }</code><technical_language>protected ? other side declare admin in AbstractSubscribableAmqpChannel's constructor container</technical_language>

Target:
private void doDeclares() { if (this.isRunning()) { AmqpAdmin admin = this.getAdmin(); if (admin != null) { if (this.queue != null) { admin.declareQueue(this.queue); } if (this.binding != null) { admin.declareBinding(this.binding); } } } }
Source:
<code>private <T> Optional<T> readFrom(String path, ThrowingReader<T> supplier, boolean quiet) { try { byte[] data = zookeeper.getData().forPath(path); if (ArrayUtils.isNotEmpty(data)) { return Optional.of(supplier.read(data)); } } catch (JsonMappingException malformedException) { if (quiet) { logger.warn("Unable to read data from path {}", path, malformedException); return Optional.empty(); } else { throw new MalformedDataException(path, malformedException); } } catch (Exception exception) { if (quiet) { logger.warn("Unable to read data from path {}", path, exception); return Optional.empty(); } else { throw new InternalProcessingException(exception); } } if (quiet) { <START> logger.warn("No data at path {}", path); <END> return Optional.empty(); } else { throw new InternalProcessingException("No data at path " + path); } }</code><technical_language>This log live a try block other return Optional.empty(); in catch blocks unneeded</technical_language>

Target:
private <T> Optional<T> readFrom(String path, ThrowingReader<T> supplier, boolean quiet) { try { byte[] data = zookeeper.getData().forPath(path); if (ArrayUtils.isNotEmpty(data)) { return Optional.of(supplier.read(data)); } else { logWarnOrThrowException("No data at path " + path, new InternalProcessingException("No data at path " + path), quiet); } } catch (JsonMappingException malformedException) { logWarnOrThrowException("Unable to read data from path " + path, new MalformedDataException(path, malformedException), quiet); } catch (InternalProcessingException e) { throw e; } catch (Exception exception) { logWarnOrThrowException("Unable to read data from path " + path, new InternalProcessingException(exception), quiet); } return Optional.empty(); }
Source:
<code>public void testDefaultRouteWhenOutOfSyncOnOlderCluster() { cluster.setCompatibilityVersion(Version.v4_1); network.setDnsResolverConfiguration(sampleDnsResolverConfiguration); assertThat(createTestedInstance(true, sampleDnsResolverConfiguration).isNetworkInSync(), <START> is(false)); <END> }</code><technical_language>'true'? I this test passes, I understand why. do I miss? change code if default route is supported, network is considered in sync of conditions</technical_language>

Target:
public void testDefaultRouteWhenOutOfSyncOnOlderCluster() { cluster.setCompatibilityVersion(Version.v4_1); network.setDnsResolverConfiguration(sampleDnsResolverConfiguration); assertThat(createTestedInstance(true, sampleDnsResolverConfiguration).isNetworkInSync(), is(true)); }
Source:
<code>public void processPendingMoveOrCopy_withOnlyLocalMessages() throws Exception { configureRemoteStoreWithFolder(); <START> Collection<String> strings = Arrays.asList(K9.LOCAL_UID_PREFIX + "msg1", K9.LOCAL_UID_PREFIX + "msg2"); <END> controller.processPendingMoveOrCopy( account, localFolder.getServerId(), FOLDER_NAME, strings, false, null); verify(account).getRemoteStore(); verify(remoteStore).getFolder(FOLDER_NAME); verify(remoteFolder).close(); verifyNoMoreInteractions(remoteFolder); }</code><technical_language>Nit: uids instead of strings</technical_language>

Target:
public void processPendingMoveOrCopy_withOnlyLocalMessages() throws Exception { configureRemoteStoreWithFolder(); Collection<String> uids = Arrays.asList(K9.LOCAL_UID_PREFIX + "msg1", K9.LOCAL_UID_PREFIX + "msg2"); controller.processPendingMoveOrCopy( account, localFolder.getServerId(), FOLDER_NAME, uids, false, null); verify(account).getRemoteStore(); verify(remoteStore).getFolder(FOLDER_NAME); verify(remoteFolder).close(); verifyNoMoreInteractions(remoteFolder); }
Source:
<code>public NinjaFileItemStream convert(FileItemStream fileItemStream) { if (inMemory) { <START> return new NinjaInMemoryFileItemStream(fileItemStream, <END> inMemoryFileItemFactory); } else { return new NinjaDiskFileItemStream(fileItemStream, uploadDirectory); } }</code><technical_language>Please replace "new" calls (both NinjaInMemoryFileItemStream NinjaDiskFileItemStream) a Provider... simply inject a Provider<NinjaInMemoryFileItemStream> top of this file ready :) create init method takes "fileItemStream" "uploadDirectory" in case of NinjaDiskFileItemStream</technical_language>

Target:
public NinjaFileItemStream convert(FileItemStream fileItemStream) { NinjaFileItemStream item; if (inMemory) { item = inMemoryFileItemStreamProvider.get(); } else { item = diskFileItemStreamProvider.get(); } item.init(fileItemStream); return item; }
Source:
<code>private void populate(ApplicationDTO engineTools) { final VBox toolsPane = new VBox(); final Text title = new TextWithStyle(tr("Wine tools"), TITLE_CSS_CLASS); if (engineTools == null) { <START> return; <END> } toolsPane.getStyleClass().add(CONFIGURATION_PANE_CSS_CLASS); toolsPane.getChildren().add(title); final TilePane toolsContentPane = new TilePane(); toolsContentPane.setPrefColumns(3); toolsContentPane.getStyleClass().add("grid"); for (ScriptDTO tool : engineTools.getScripts()) { Button toolButton = new Button(tool.getScriptName()); toolButton.getStyleClass().addAll("toolButton"); toolButton.setStyle("-fx-background-image: url('" + tool.getIcon() + "');"); toolButton.setOnMouseClicked(event -> { this.lockAll(); this.engineToolsManager.runTool(container.getEngine(), container.getName(), tool.getId(), this::unlockAll, e -> Platform.runLater(() -> new ErrorMessage("Error", e).show())); }); this.lockableElements.add(toolButton); toolsContentPane.getChildren().add(toolButton); } toolsPane.getChildren().add(toolsContentPane); this.setContent(toolsPane); }</code><technical_language>asking: this happen, null is passed? If this is case I passing Optional object method</technical_language>

Target:
private void populate(ApplicationDTO engineTools) { final VBox toolsPane = new VBox(); final Text title = new TextWithStyle(tr("Wine tools"), TITLE_CSS_CLASS); toolsPane.getStyleClass().add(CONFIGURATION_PANE_CSS_CLASS); toolsPane.getChildren().add(title); final TilePane toolsContentPane = new TilePane(); toolsContentPane.setPrefColumns(3); toolsContentPane.getStyleClass().add("grid"); for (ScriptDTO tool : engineTools.getScripts()) { Button toolButton = new Button(tool.getScriptName()); toolButton.getStyleClass().addAll("toolButton"); toolButton.setStyle("-fx-background-image: url('" + tool.getIcon() + "');"); toolButton.setOnMouseClicked(event -> { this.lockAll(); this.engineToolsManager.runTool(container.getEngine(), container.getName(), tool.getId(), this::unlockAll, e -> Platform.runLater(() -> new ErrorMessage("Error", e).show())); }); this.lockableElements.add(toolButton); toolsContentPane.getChildren().add(toolButton); } toolsPane.getChildren().add(toolsContentPane); this.setContent(toolsPane); }
Source:
<code>private static PlanNodeStatsEstimate symbolToSymbolEquality(PlanNodeStatsEstimate inputStatistics, Symbol left, Symbol right) { SymbolStatsEstimate leftStats = inputStatistics.getSymbolStatistics(left); SymbolStatsEstimate rightStats = inputStatistics.getSymbolStatistics(right); if (isNaN(leftStats.getDistinctValuesCount()) || isNaN(rightStats.getDistinctValuesCount())) { filterStatsForUnknownExpression(inputStatistics); } StatisticRange leftRange = StatisticRange.from(leftStats); StatisticRange rightRange = StatisticRange.from(rightStats); StatisticRange intersect = leftRange.intersect(rightRange); SymbolStatsEstimate newRightStats = buildFrom(rightStats) .setNullsFraction(0) .setStatisticsRange(intersect) .build(); SymbolStatsEstimate newLeftStats = buildFrom(leftStats) .setNullsFraction(0) .setStatisticsRange(intersect) .build(); double nullsFilterFactor = (1 - leftStats.getNullsFraction()) * (1 - rightStats.getNullsFraction()); double filterFactor = 1 / max(leftRange.getDistinctValuesCount(), rightRange.getDistinctValuesCount()); <START> return inputStatistics.mapOutputRowCount(size -> size * filterFactor * nullsFilterFactor) <END> .mapSymbolColumnStatistics(left, oldLeftStats -> newLeftStats) .mapSymbolColumnStatistics(right, oldRightStats -> newRightStats); }</code><technical_language>s/size/count</technical_language>

Target:
private static PlanNodeStatsEstimate symbolToSymbolEquality(PlanNodeStatsEstimate inputStatistics, Symbol left, Symbol right) { SymbolStatsEstimate leftStats = inputStatistics.getSymbolStatistics(left); SymbolStatsEstimate rightStats = inputStatistics.getSymbolStatistics(right); if (isNaN(leftStats.getDistinctValuesCount()) || isNaN(rightStats.getDistinctValuesCount())) { filterStatsForUnknownExpression(inputStatistics); } StatisticRange leftRange = StatisticRange.from(leftStats); StatisticRange rightRange = StatisticRange.from(rightStats); StatisticRange intersect = leftRange.intersect(rightRange); SymbolStatsEstimate newRightStats = buildFrom(rightStats) .setNullsFraction(0) .setStatisticsRange(intersect) .build(); SymbolStatsEstimate newLeftStats = buildFrom(leftStats) .setNullsFraction(0) .setStatisticsRange(intersect) .build(); double nullsFilterFactor = (1 - leftStats.getNullsFraction()) * (1 - rightStats.getNullsFraction()); double filterFactor = 1 / max(leftRange.getDistinctValuesCount(), rightRange.getDistinctValuesCount()); return inputStatistics.mapOutputRowCount(rowCount -> rowCount * filterFactor * nullsFilterFactor) .mapSymbolColumnStatistics(left, oldLeftStats -> newLeftStats) .mapSymbolColumnStatistics(right, oldRightStats -> newRightStats); }
Source:
<code>default void writeStreamAsZip(Set<SourceFile> sourceFiles, OutputStream outputStream, Path workingDirectory) { try (ZipOutputStream zipOutputStream = new ZipOutputStream(outputStream)) { List<String> paths = new ArrayList<>(); for (SourceFile sourceFile : sourceFiles) { Path resolve = workingDirectory.resolve(sourceFile.getAbsolutePath()); String stripStart = StringUtils.stripStart(resolve.toFile().toString(), "./"); ZipEntry secondaryZipEntry = new ZipEntry(stripStart); Path filePath = Paths.get(stripStart).normalize(); if (filePath.getNameCount() > 1) { String parentPath = filePath.getParent().toString() + "/"; if (!paths.contains(parentPath)) { zipOutputStream.putNextEntry(new ZipEntry(parentPath)); zipOutputStream.closeEntry(); paths.add(parentPath); } } zipOutputStream.putNextEntry(secondaryZipEntry); zipOutputStream.write(sourceFile.getContent().getBytes(Charsets.UTF_8)); zipOutputStream.closeEntry(); } } catch (IOException ex) { <START> throw new CustomWebApplicationException("Could not create ZIP file", HttpStatus.SC_INTERNAL_SERVER_ERROR); <END> } }</code><technical_language>This new, this clean in case of error</technical_language>

Target:
default void writeStreamAsZip(Set<SourceFile> sourceFiles, OutputStream outputStream, Path workingDirectory) { try (ZipOutputStream zipOutputStream = new ZipOutputStream(outputStream)) { List<String> paths = new ArrayList<>(); for (SourceFile sourceFile : sourceFiles) { Path resolve = workingDirectory.resolve(sourceFile.getAbsolutePath()); String stripStart = StringUtils.stripStart(resolve.toFile().toString(), "./"); ZipEntry secondaryZipEntry = new ZipEntry(stripStart); Path filePath = Paths.get(stripStart).normalize(); if (filePath.getNameCount() > 1) { String parentPath = filePath.getParent().toString() + "/"; if (!paths.contains(parentPath)) { zipOutputStream.putNextEntry(new ZipEntry(parentPath)); zipOutputStream.closeEntry(); paths.add(parentPath); } } zipOutputStream.putNextEntry(secondaryZipEntry); zipOutputStream.write(sourceFile.getContent().getBytes(Charsets.UTF_8)); } } catch (IOException ex) { throw new CustomWebApplicationException("Could not create ZIP file", HttpStatus.SC_INTERNAL_SERVER_ERROR); } }
Source:
<code>public void onPackageAdded(String packageName) { final PackageInfo app; try { app = mPackageManager.getPackageInfo(packageName, GET_PERMISSIONS | MATCH_ANY_USER); } catch (NameNotFoundException e) { Slog.wtf(TAG, "NameNotFoundException " + packageName); return; } int uid = <START> app.applicationInfo != null ? <END> app.applicationInfo.uid : INVALID_UID; if (uid == INVALID_UID) { return; } processPackagePermissions(uid, Arrays.asList(app.requestedPermissions)); synchronized (mPackageNameUidMap) { mPackageNameUidMap.put(packageName, uid); } }</code><technical_language>Nit: put parenthesis this for readability</technical_language>

Target:
public void onPackageAdded(String packageName) { final PackageInfo app = getPackageInfo(packageName); if (app == null) { Slog.wtf(TAG, "Failed to get information of installed package: " + packageName); return; } int uid = (app.applicationInfo != null) ? app.applicationInfo.uid : INVALID_UID; if (uid == INVALID_UID) { return; } sendPackagePermissionsForUid(uid, filterPermission(Arrays.asList(app.requestedPermissions))); synchronized (mPackageNameUidMap) { mPackageNameUidMap.put(packageName, uid); } }
Source:
<code>private void notifyAsyncTransactionCallbacks() { if (!pendingOnSuccessAsyncTransactionCallbacks.isEmpty()) { for (Runnable callback : pendingOnSuccessAsyncTransactionCallbacks) { <START> realm.handler.post(callback); <END> } pendingOnSuccessAsyncTransactionCallbacks.clear(); } }</code><technical_language>I feel wrong posting runnable instead of calling directly. Consider posting it, other threads chance post a change event in front of it. is reason do posting here</technical_language>

Target:
private void notifyAsyncTransactionCallbacks() { if (!pendingOnSuccessAsyncTransactionCallbacks.isEmpty()) { for (Runnable callback : pendingOnSuccessAsyncTransactionCallbacks) { callback.run(); } pendingOnSuccessAsyncTransactionCallbacks.clear(); } }
Source:
<code>private void processIMC(final InterModProcessEvent event) { <START> registryManager.onInitStep(IInitListener.Step.PROCESS_IMC, event); <END> finishAPI2(); if (inDev) { Tests.runBackgroundTests(); } }</code><technical_language>Pls swap setupAPI2, is required</technical_language>

Target:
private void processIMC(final InterModProcessEvent event) { finishAPI2(); registryManager.onInitStep(IInitListener.Step.PROCESS_IMC, event); if (inDev) { Tests.runBackgroundTests(); } }
Source:
<code>private void checkDynamicJobUsage(IElementParameter param) { if (!EParameterName.USE_DYNAMIC_JOB.getName().equals(param.getName())) { return; } boolean isSelectUseDynamic = false; Object paramValue = param.getValue(); if (paramValue != null && paramValue instanceof Boolean) { isSelectUseDynamic = (Boolean) paramValue; } if (isSelectUseDynamic) { ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(process.getProperty().getItem()); <START> if (ERepositoryObjectType.JOBLET.equals(itemType)) { <END> String warningMessage = Messages.getString("Node.checkDynamicJobUsageWarning"); Problems.add(ProblemStatus.WARNING, this, warningMessage); } } }</code><technical_language>ERepositoryObjectType.getAllTypesOfJoblet().contains(itemType)</technical_language>

Target:
private void checkDynamicJobUsage(IElementParameter param) { if (!EParameterName.USE_DYNAMIC_JOB.getName().equals(param.getName())) { return; } boolean isSelectUseDynamic = false; Object paramValue = param.getValue(); if (paramValue != null && paramValue instanceof Boolean) { isSelectUseDynamic = (Boolean) paramValue; } if (isSelectUseDynamic) { ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(process.getProperty().getItem()); if (ERepositoryObjectType.getAllTypesOfJoblet().contains(itemType)) { String warningMessage = Messages.getString("Node.checkDynamicJobUsageWarning"); Problems.add(ProblemStatus.WARNING, this, warningMessage); } } }
Source:
<code><START> public OffHeapServerStore(PageSource source, int concurrency) { <END> segments = new ArrayList<OffHeapChainMap<Long>>(concurrency); for (int i = 0; i < concurrency; i++) { segments.add(new OffHeapChainMap<Long>(source, LongPortability.INSTANCE, KILOBYTES.toBytes(4), MEGABYTES.toBytes(8), false)); } }</code><technical_language>this constructor in tests move package private</technical_language>

Target:
OffHeapServerStore(PageSource source, int concurrency) { segments = new ArrayList<OffHeapChainMap<Long>>(concurrency); for (int i = 0; i < concurrency; i++) { segments.add(new OffHeapChainMap<Long>(source, LongPortability.INSTANCE, KILOBYTES.toBytes(4), MEGABYTES.toBytes(8), false)); } }
Source:
<code>public static void main(String[] args) { try { final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); final TokenCredential credential = new DefaultAzureCredentialBuilder() <START> .authorityHost(profile.getEnvironment().getResourceManagerEndpoint()) <END> .build(); Azure azure = Azure .configure() .withLogLevel(HttpLogDetailLevel.BASIC) .authenticate(credential, profile) .withDefaultSubscription(); System.out.println("Selected subscription: " + azure.subscriptionId()); runSample(azure, Configuration.getGlobalConfiguration().get(Configuration.PROPERTY_AZURE_CLIENT_ID)); } catch (Exception e) { System.out.println(e.getMessage()); e.printStackTrace(); } }</code><technical_language>getActiveDirectoryEndpoint</technical_language>

Target:
public static void main(String[] args) { try { final AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); final TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); Azure azure = Azure .configure() .withLogLevel(HttpLogDetailLevel.BASIC) .authenticate(credential, profile) .withDefaultSubscription(); System.out.println("Selected subscription: " + azure.subscriptionId()); runSample(azure, Configuration.getGlobalConfiguration().get(Configuration.PROPERTY_AZURE_CLIENT_ID)); } catch (Exception e) { System.out.println(e.getMessage()); e.printStackTrace(); } }
Source:
<code>public Collection<RegisteredService> findServiceBy(final Predicate<RegisteredService> predicate) { if (predicate == null) { return new ArrayList<>(0); } <START> var results= serviceRegistry.findServicePredicate(predicate). <END> stream(). sorted(). peek(RegisteredService::initialize). collect(Collectors.toMap(r -> { return r.getId(); }, Function.identity(), (r, s) -> s)); services.putAll(results); return results.values(); }</code><technical_language>suggestion var results = serviceRegistry.findServicePredicate(predicate)</technical_language>

Target:
public Collection<RegisteredService> findServiceBy(final Predicate<RegisteredService> predicate) { if (predicate == null) { return new ArrayList<>(0); } val results = serviceRegistry.findServicePredicate(predicate). stream(). sorted(). peek(RegisteredService::initialize). collect(Collectors.toMap(r -> { return r.getId(); }, Function.identity(), (r, s) -> s)); services.putAll(results); return results.values(); }
Source:
<code>public GoodDataHttpClient(final HttpClient httpClient, final SSTRetrievalStrategy sstStrategy) { this(httpClient, sstStrategy, null, null, null, VerificationLevel.COOKIE, null); <START> notNull(httpClient); <END> notNull(sstStrategy); }</code><technical_language>please add messages notNull checks? a bit more easier find root-cause of problem line number, some message also</technical_language>

Target:
public GoodDataHttpClient(final HttpClient httpClient, final SSTRetrievalStrategy sstStrategy) { this(httpClient, sstStrategy, null, null, null, VerificationLevel.COOKIE, null); notNull(httpClient, "httpClient cannot be null"); notNull(sstStrategy, "sstStrategy cannot be null"); }
Source:
<code>private void processEnforceSnapshotSync(DiscoveryServiceEvent event) { if (replicationManager == null || !isLeader.get()) { return; } <START> replicationManager.enforceSnapshotSync(event); <END> }</code><technical_language>I logic is correct. Assuming caller sends enforce request 3 nodes, current node is leader. processEnforceSnapshotSync is done here, public boolean forceSnapshotSync() is blocking timeout. completeExceptionally cf Illegal State Exception. ExecutionException log</technical_language>

Target:
private void processEnforceSnapshotSync(DiscoveryServiceEvent event) { if (replicationManager == null || !isLeader.get()) { log.warn("The current node is not the leader will skip doing the snapshot full sync"); return; } replicationManager.enforceSnapshotSync(event); }
Source:
<code>public Object decode(ByteBuf buffer) throws Exception { int rc; long ledgerId, entryId; int packetHeader = buffer.readInt(); byte version = PacketHeader.getVersion(packetHeader); byte opCode = PacketHeader.getOpCode(packetHeader); switch (opCode) { case BookieProtocol.ADDENTRY: rc = buffer.readInt(); ledgerId = buffer.readLong(); entryId = buffer.readLong(); return BookieProtocol.AddResponse.create(version, rc, ledgerId, entryId); case BookieProtocol.READENTRY: rc = buffer.readInt(); ledgerId = buffer.readLong(); entryId = buffer.readLong(); if (rc == BookieProtocol.EOK) { <START> return new BookieProtocol.ReadResponse(version, rc, <END> ledgerId, entryId, buffer.retain()); } else { return new BookieProtocol.ReadResponse(version, rc, ledgerId, entryId); } case BookieProtocol.AUTH: ByteBufInputStream bufStream = new ByteBufInputStream(buffer); BookkeeperProtocol.AuthMessage.Builder builder = BookkeeperProtocol.AuthMessage.newBuilder(); builder.mergeFrom(bufStream, extensionRegistry); BookkeeperProtocol.AuthMessage am = builder.build(); return new BookieProtocol.AuthResponse(version, am); default: throw new IllegalStateException("Received unknown response : op code = " + opCode); } }</code><technical_language>100% slice() avoided, double check places touching buffer. I a option is buffer.retainedSlice() achieves goals (and lets resulting ByteBuf slice object pooled</technical_language>

Target:
public Object decode(ByteBuf buffer) throws Exception { int rc; long ledgerId, entryId; int packetHeader = buffer.readInt(); byte version = PacketHeader.getVersion(packetHeader); byte opCode = PacketHeader.getOpCode(packetHeader); switch (opCode) { case BookieProtocol.ADDENTRY: rc = buffer.readInt(); ledgerId = buffer.readLong(); entryId = buffer.readLong(); return BookieProtocol.AddResponse.create(version, rc, ledgerId, entryId); case BookieProtocol.READENTRY: rc = buffer.readInt(); ledgerId = buffer.readLong(); entryId = buffer.readLong(); if (rc == BookieProtocol.EOK) { return new BookieProtocol.ReadResponse(version, rc, ledgerId, entryId, buffer.retainedSlice()); } else { return new BookieProtocol.ReadResponse(version, rc, ledgerId, entryId); } case BookieProtocol.AUTH: ByteBufInputStream bufStream = new ByteBufInputStream(buffer); BookkeeperProtocol.AuthMessage.Builder builder = BookkeeperProtocol.AuthMessage.newBuilder(); builder.mergeFrom(bufStream, extensionRegistry); BookkeeperProtocol.AuthMessage am = builder.build(); return new BookieProtocol.AuthResponse(version, am); default: throw new IllegalStateException("Received unknown response : op code = " + opCode); } }
Source:
<code><START> void testSimpleSwitch() { <END> int a = 0; switch(a) { case 1: break; case 2: case 3: break; } }</code><technical_language>P(i=1:i=N)NP(Statement(i)) NP= (Statement(1)=1) * (Statement(2)=3) = 3</technical_language>

Target:
int testSimpleSwitch() { int a = 0; switch(a) { case 1: break; case 2: case 3: break; } return a; }
Source:
<code>private static void metaCheck(SubscriptionContext subscriptionContext) { ClassDef classDef = (ClassDef) subscriptionContext.syntaxNode(); boolean isMetaClass = "Meta".equals(classDef.name().name()); <START> if (!isMetaClass) { <END> return; } boolean isWithinFlaskForm = Optional.ofNullable(TreeUtils.firstAncestorOfKind(classDef, Tree.Kind.CLASSDEF)) .map(parentClassDef -> ((ClassDef) parentClassDef).name().symbol()) .flatMap(checkedCast(Symbol.Kind.CLASS, ClassSymbol.class)) .filter(parentClassSymbol -> parentClassSymbol.canBeOrExtend("flask_wtf.FlaskForm")) .isPresent(); if (!isWithinFlaskForm) { return; } classDef.body().statements().forEach(stmt -> { if (stmt.is(Tree.Kind.ASSIGNMENT_STMT)) { AssignmentStatement asgn = (AssignmentStatement) stmt; if (isLhsCalled("csrf").test(asgn) && Expressions.isFalsy(asgn.assignedValue())) { subscriptionContext.addIssue(asgn.assignedValue(), DISABLING_CSRF_MESSAGE); } } }); }</code><technical_language>Minor nitpick I inline this</technical_language>

Target:
private static void metaCheck(SubscriptionContext subscriptionContext) { ClassDef classDef = (ClassDef) subscriptionContext.syntaxNode(); if (!"Meta".equals(classDef.name().name())) { return; } boolean isWithinFlaskForm = Optional.ofNullable(TreeUtils.firstAncestorOfKind(classDef, Tree.Kind.CLASSDEF)) .map(parentClassDef -> ((ClassDef) parentClassDef).name().symbol()) .filter(s -> s.is(Symbol.Kind.CLASS)) .map(ClassSymbol.class::cast) .filter(parentClassSymbol -> parentClassSymbol.canBeOrExtend("flask_wtf.FlaskForm")) .isPresent(); if (!isWithinFlaskForm) { return; } classDef.body().statements().forEach(stmt -> { if (stmt.is(Tree.Kind.ASSIGNMENT_STMT)) { AssignmentStatement asgn = (AssignmentStatement) stmt; if (isLhsCalled("csrf").test(asgn) && Expressions.isFalsy(asgn.assignedValue())) { subscriptionContext.addIssue(asgn.assignedValue(), DISABLING_CSRF_MESSAGE); } } }); }
Source:
<code>public Response remove(String id, Action action) { getEntity(id); validateParameters(action, "detach"); <START> if (action.isDetach()) { <END> AttachDettachVmDiskParameters params = new AttachDettachVmDiskParameters(parentId, Guid.createGuidFromString(id), true); return performAction(VdcActionType.DetachDiskFromVm, params); } else { return remove(id); } }</code><technical_language>potential NPE, check if <detach> set</technical_language>

Target:
public Response remove(String id, Action action) { getEntity(id); if (action.isSetDetach() && action.isDetach()) { return performAction(VdcActionType.DetachDiskFromVm, new AttachDettachVmDiskParameters(parentId, Guid.createGuidFromString(id), true)); } else { return remove(id); } }
Source:
<code>private void vmBalloonDriverIsRequestedAndUnavailable(Guid vmId) { Integer currentVal = vmsWithBalloonDriverProblem.get(vmId); if (currentVal == null) { vmsWithBalloonDriverProblem.put(vmId, 1); } else { <START> vmsWithBalloonDriverProblem.put(vmId, currentVal + 1); <END> if (currentVal >= Config.<Integer> GetValue(ConfigValues.IterationsWithBalloonProblem)) { AuditLogableBase auditLogable = new AuditLogableBase(); auditLogable.setVmId(vmId); AuditLogDirector.log(auditLogable, AuditLogType.VM_BALLOON_DRIVER_ERROR); } } }</code><technical_language>I guess need clear this alert</technical_language>

Target:
private void vmBalloonDriverIsRequestedAndUnavailable(Guid vmId) { Integer currentVal = vmsWithBalloonDriverProblem.get(vmId); if (currentVal == null) { vmsWithBalloonDriverProblem.put(vmId, 1); } else { vmsWithBalloonDriverProblem.put(vmId, currentVal + 1); if (currentVal >= Config.<Integer> GetValue(ConfigValues.IterationsWithBalloonProblem)) { AuditLogableBase auditLogable = new AuditLogableBase(); auditLogable.setVmId(vmId); AuditLogDirector.log(auditLogable, AuditLogType.VM_BALLOON_DRIVER_ERROR); vmsWithBalloonDriverProblem.put(vmId, 0); } } }
Source:
<code>public void configure(IProject project, Set<IPath> excludedDirectories, IProgressMonitor monitor) { <START> ResolverConfiguration configuration <END> = new ResolverConfiguration(); IProjectConfigurationManager configurationManager = MavenPlugin.getProjectConfigurationManager(); try { if(!project.hasNature(IMavenConstants.NATURE_ID)) { configurationManager.enableMavenNature(project, configuration, monitor); } configurationManager.updateProjectConfiguration(project, monitor); } catch (Exception ex) { log.error(ex.getMessage(), ex); } }</code><technical_language>remove line</technical_language>

Target:
public void configure(IProject project, Set<IPath> excludedDirectories, IProgressMonitor monitor) { IProjectConfigurationManager configurationManager = MavenPlugin.getProjectConfigurationManager(); try { if(!project.hasNature(IMavenConstants.NATURE_ID)) { ResolverConfiguration configuration = ResolverConfigurationIO.readResolverConfiguration(project); configurationManager.enableMavenNature(project, configuration, monitor); } configurationManager.updateProjectConfiguration(project, monitor); } catch (Exception ex) { log.error(ex.getMessage(), ex); } }
Source:
<code>protected Stream<String> getExcludedPatterns() { return Stream.concat(Stream.of( "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.DefaultTemplateParser", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.NpmTemplateParser", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.BundleParser", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.BundleParser\\$DependencyVisitor", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.TemplateDataAnalyzer\\$.*", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.TemplateInitializer(\\$.*)?", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.TemplateParser(\\$.*)?", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.InjectablePolymerElementInitializer", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.TemplateDataAnalyzer", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.IdCollector", <START> "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.rpc\\.OSGiPolymerPublishedEventHandlerRegistration"), <END> super.getExcludedPatterns()); }</code><technical_language>this class exist magic</technical_language>

Target:
protected Stream<String> getExcludedPatterns() { return Stream.concat(Stream.of( "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.DefaultTemplateParser", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.NpmTemplateParser", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.BundleParser", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.BundleParser\\$DependencyVisitor", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.TemplateDataAnalyzer\\$.*", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.TemplateInitializer(\\$.*)?", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.TemplateParser(\\$.*)?", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.InjectablePolymerElementInitializer", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.TemplateDataAnalyzer", "com\\.vaadin\\.flow\\.component\\.polymertemplate\\.IdCollector"), super.getExcludedPatterns()); }
Source:
<code>private static String checkNullToEmpty(byte[] data) { if (data == null || data.length == 0) { return ""; } <START> return new String(data); <END> }</code><technical_language>set a charset? ASCII UTF8</technical_language>

Target:
private static String checkNullToEmpty(byte[] data) throws IOException { if (data == null || data.length == 0) { return ""; } return new String(data, "UTF8"); }
Source:
<code>Collection<TransportEndpoint> getTrustedOrSuspectedEndpoints() { Map<String, ClusterMember> suspectedOrTrusted = filterValues(membership, new Predicate<ClusterMember>() { @Override public boolean apply(ClusterMember input) { return input.status() == TRUSTED || input.status() == SUSPECTED; } }); <START> return transformEntries(suspectedOrTrusted, new Maps.EntryTransformer<String, ClusterMember, TransportEndpoint>() { <END> @Override public TransportEndpoint transformEntry(String key, ClusterMember value) { return value.endpoint(); } }).values(); }</code><technical_language>Entry transformer static value, need create new call</technical_language>

Target:
public Collection<TransportEndpoint> getTrustedOrSuspectedEndpoints() { Map<String, ClusterMember> suspectedOrTrusted = Maps.filterValues(membership, TRUSTED_OR_SUSPECTED_PREDICATE); return Maps.transformEntries(suspectedOrTrusted, MEMBER_TO_ENDPOINT_TRANSFORMER).values(); }