auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testPostTaskDataWithoutProduct() throws Exception { final TaskMapping taskMappingInit = new TaskMapping() { @Override public String getSummary() { return "The Summary"; } @Override public String getDescription() { return "The Description"; } }; AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler(); TaskAttributeMapper mapper = taskDataHandler.getAttributeMapper(actualFixture.repository()); TaskData taskData = new TaskData(mapper, actualFixture.repository().getConnectorKind(), actualFixture.repository().getRepositoryUrl(), ""); taskDataHandler.initializeTaskData(actualFixture.repository(), taskData, taskMappingInit, null); taskData.getRoot().getAttribute("cf_dropdown").setValue("one"); try { connector.getClient(actualFixture.repository()).postTaskData(taskData, null); <START> fail("never reach this!"); <END> } catch (BugzillaRestException e) { String url = actualFixture.getRepositoryUrl(); assertEquals("You must select/enter a product. (status: Bad Request from " + url.substring(url.lastIndexOf('/')) + "/rest.cgi/bug)", e.getMessage()); } }</code><technical_language>A good pattern is a message "Expected BugzillaRestException" test fails easier wrong</technical_language>

Target:
public void testPostTaskDataWithoutProduct() throws Exception { final TaskMapping taskMappingInit = new TaskMapping() { @Override public String getSummary() { return "The Summary"; } @Override public String getDescription() { return "The Description"; } }; AbstractTaskDataHandler taskDataHandler = connector.getTaskDataHandler(); TaskAttributeMapper mapper = taskDataHandler.getAttributeMapper(actualFixture.repository()); TaskData taskData = new TaskData(mapper, actualFixture.repository().getConnectorKind(), actualFixture.repository().getRepositoryUrl(), ""); taskDataHandler.initializeTaskData(actualFixture.repository(), taskData, taskMappingInit, null); taskData.getRoot().getAttribute("cf_dropdown").setValue("one"); try { connector.getClient(actualFixture.repository()).postTaskData(taskData, null); fail("BugzillaRestException expected, never reach this!"); } catch (BugzillaRestException e) { String url = actualFixture.getRepositoryUrl(); assertEquals("You must select/enter a product. (status: Bad Request from " + url.substring(url.lastIndexOf('/')) + "/rest.cgi/bug)", e.getMessage()); } }
Source:
<code>private TableStatisticsMetadata getStatisticsCollectionMetadata(List<ColumnMetadata> columns, List<String> partitionedBy, boolean includeRowCount) { Set<ColumnStatisticMetadata> columnStatistics = columns.stream() .filter(column -> !partitionedBy.contains(column.getName())) .filter(column -> !column.isHidden()) .map(this::getColumnStatisticMetadata) .flatMap(List::stream) .collect(toImmutableSet()); <START> if (!includeRowCount) { <END> return new TableStatisticsMetadata(columnStatistics, ImmutableSet.of(), partitionedBy); } return new TableStatisticsMetadata(columnStatistics, ImmutableSet.of(ROW_COUNT), partitionedBy); }</code><technical_language>I this cleaner java Set<TableStatisticType> statTypes = includeRowCount ? ImmutableSet.of(ROW_COUNT) : ImmutableSet.of(); return new TableStatisticsMetadata(columnStatistics, statTypes, partitionedBy); This removes duplication easy part is variable</technical_language>

Target:
private TableStatisticsMetadata getStatisticsCollectionMetadata(List<ColumnMetadata> columns, List<String> partitionedBy, boolean includeRowCount) { Set<ColumnStatisticMetadata> columnStatistics = columns.stream() .filter(column -> !partitionedBy.contains(column.getName())) .filter(column -> !column.isHidden()) .map(this::getColumnStatisticMetadata) .flatMap(List::stream) .collect(toImmutableSet()); Set<TableStatisticType> tableStatistics = includeRowCount ? ImmutableSet.of(ROW_COUNT) : ImmutableSet.of(); return new TableStatisticsMetadata(columnStatistics, tableStatistics, partitionedBy); }
Source:
<code>public Mono<Response<String>> acquireLeaseWithResponse(int duration, RequestConditions modifiedRequestConditions) { try { <START> return withContext(context -> acquireLeaseWithResponse(duration, modifiedRequestConditions, context), STORAGE_TRACING_PROPERTIES); <END> } catch (RuntimeException ex) { return monoError(logger, ex); } }</code><technical_language>Thoughts changing this withContext a String constant in Storage Common making this a helper method in Storage Common</technical_language>

Target:
public Mono<Response<String>> acquireLeaseWithResponse(int duration, RequestConditions modifiedRequestConditions) { try { return withContext(context -> acquireLeaseWithResponse(duration, modifiedRequestConditions, context)); } catch (RuntimeException ex) { return monoError(logger, ex); } }
Source:
<code>public void ProximityChanged(float distance) { this.distance = distance; <START> notifyDataObservers(null, distance); <END> EventDispatcher.dispatchEvent(this, "ProximityChanged", this.distance); }</code><technical_language>I feel of null here. If keys propagate blocks layer, this issues. I recommend giving key a name "distance" similar for consistency other sensors report values</technical_language>

Target:
public void ProximityChanged(float distance) { this.distance = distance; notifyDataObservers("distance", distance); EventDispatcher.dispatchEvent(this, "ProximityChanged", this.distance); }
Source:
<code>protected Builder() { id("softlayer") .name("SoftLayer") .apiMetadata(new SoftLayerApiMetadata()) .homepage(URI.create("<LINK_1>")) .console(URI.create("<LINK_0>")) <START> .iso3166Codes("SG","US-CA","US-TX","US-VA","US-WA","US-TX", "NL") <END> .endpoint("<LINK_2>") .defaultProperties(SoftLayerProviderMetadata.defaultProperties()); }</code><technical_language>"NL-NH" is accurate for Amsterdam</technical_language>

Target:
protected Builder() { id("softlayer") .name("SoftLayer") .apiMetadata(new SoftLayerApiMetadata()) .homepage(URI.create("<LINK_1>")) .console(URI.create("<LINK_0>")) .iso3166Codes("SG","US-CA","US-TX","US-VA","US-WA","US-TX") .endpoint("<LINK_2>") .defaultProperties(SoftLayerProviderMetadata.defaultProperties()); }
Source:
<code>public void startParsing() { BackgroundTask.wrap(() -> currentCitationfetcher.performSearch(inputTextProperty.getValue())) .onRunning(() -> dialogService.notify(Localization.lang("Your text is being parsed..."))) .onFailure((e) -> { if (e instanceof UncheckedIOException) { <START> String msg = Localization.lang("There are connection issues with the %0 server. Detailed information: %1.", <END> currentCitationfetcher.getServerUrl(), e.getMessage()); dialogService.notify(msg); } else { LOGGER.warn("Missing exception handling.", e); } }) .onSuccess(parsedEntries -> { dialogService.notify(Localization.lang("%0 entries were parsed from your query.", String.valueOf(parsedEntries.size()))); importHandler.importEntries(parsedEntries); for (BibEntry bibEntry : parsedEntries) { trackNewEntry(bibEntry); } }).executeWith(taskExecutor); }</code><technical_language>I important for user exact url failed (especially popup disappears quickly type in url of a webbrower check). I suggest wording: "Could connect JabRef server (Connection timed out)."</technical_language>

Target:
public void startParsing() { BackgroundTask.wrap(() -> currentCitationfetcher.performSearch(inputTextProperty.getValue())) .onRunning(() -> dialogService.notify(Localization.lang("Your text is being parsed..."))) .onFailure((e) -> { if (e instanceof FetcherException) { String msg = Localization.lang("There are connection issues with a JabRef server. Detailed information: %0.", e.getMessage()); dialogService.notify(msg); } else { LOGGER.warn("Missing exception handling.", e); } }) .onSuccess(parsedEntries -> { dialogService.notify(Localization.lang("%0 entries were parsed from your query.", String.valueOf(parsedEntries.size()))); importHandler.importEntries(parsedEntries); for (BibEntry bibEntry : parsedEntries) { trackNewEntry(bibEntry); } }).executeWith(taskExecutor); }
Source:
<code>public InfinispanResponse deleteCacheValue(InfinispanRequest request) throws RestResponseException { try { String cacheName = request.getCacheName().get(); String key = request.getKey().orElseThrow(NoKeyException::new); Optional<Boolean> useAsync = request.getUseAsync(); CacheEntry<String, Object> entry = restCacheManager.getInternalEntry(cacheName, key); InfinispanResponse response = InfinispanResponse.inReplyTo(request); response.status(HttpResponseStatus.NOT_FOUND); if (entry instanceof InternalCacheEntry) { InternalCacheEntry<String, Object> ice = (InternalCacheEntry<String, Object>) entry; Optional<String> clientEtag = request.getEtagIfNoneMatch(); if (clientEtag.isPresent()) { Metadata meta = entry.getMetadata(); if (meta instanceof MimeMetadata) { String etag = calcETAG(ice.getValue(), ((MimeMetadata) meta).contentType()); <START> if (clientEtag.map(t -> t.equals(etag)).orElse(true)) { <END> response.status(HttpResponseStatus.OK); deleteCacheValue(cacheName, key, useAsync); } else { response.status(HttpResponseStatus.PRECONDITION_FAILED); } } } else { response.status(HttpResponseStatus.OK); deleteCacheValue(cacheName, key, useAsync); } } return response; } catch (CacheException cacheException) { throw new NoCacheFoundException(cacheException.getLocalizedMessage()); } }</code><technical_language>in clientEtag.isPresent() branch, this is equivalent clientEtag.get().equals(etag)</technical_language>

Target:
public InfinispanResponse deleteCacheValue(InfinispanRequest request) throws RestResponseException { try { String cacheName = request.getCacheName().get(); String key = request.getKey().orElseThrow(NoKeyException::new); Optional<Boolean> useAsync = request.getUseAsync(); CacheEntry<String, Object> entry = restCacheManager.getInternalEntry(cacheName, key); InfinispanResponse response = InfinispanResponse.inReplyTo(request); response.status(HttpResponseStatus.NOT_FOUND); if (entry instanceof InternalCacheEntry) { InternalCacheEntry<String, Object> ice = (InternalCacheEntry<String, Object>) entry; Optional<String> clientEtag = request.getEtagIfNoneMatch(); if (clientEtag.isPresent()) { Metadata meta = entry.getMetadata(); if (meta instanceof MimeMetadata) { String etag = calcETAG(ice.getValue(), ((MimeMetadata) meta).contentType()); if (clientEtag.get().equals(etag)) { response.status(HttpResponseStatus.OK); deleteCacheValue(cacheName, key, useAsync); } else { response.status(HttpResponseStatus.PRECONDITION_FAILED); } } } else { response.status(HttpResponseStatus.OK); deleteCacheValue(cacheName, key, useAsync); } } return response; } catch (CacheException cacheException) { throw new NoCacheFoundException(cacheException.getLocalizedMessage()); } }
Source:
<code>public void isLeader() { LOG.info("We are the leader! Starting BaragonStatePersisterWorker..."); if (statePersisterWorkerFuture != null) { statePersisterWorkerFuture.cancel(false); } statePersisterWorkerFuture = scheduledExecutorService.scheduleAtFixedRate( baragonStatePersisterWorker, baragonConfiguration.getWorkerConfiguration().getInitialDelayMs(), <START> baragonConfiguration.getWorkerConfiguration().getIntervalMs(), <END> TimeUnit.MILLISECONDS); }</code><technical_language>split out a separate pair of config values for this. intended for RequestWorkerListener. Check out ElbSyncWorkerListener / ElbConfiguration for example</technical_language>

Target:
public void isLeader() { LOG.info("We are the leader! Starting BaragonStatePersisterWorker..."); if (statePersisterWorkerFuture != null) { statePersisterWorkerFuture.cancel(false); } statePersisterWorkerFuture = scheduledExecutorService.scheduleAtFixedRate( baragonStatePersisterWorker, config.getInitialDelayMs(), config.getIntervalMs(), TimeUnit.MILLISECONDS); }
Source:
<code>@Override public String toString() { boolean first = true; StringBuilder builder = new StringBuilder("SetBinding["); for (SetBinding<T> setBinding = this; setBinding != null; setBinding = setBinding.parent) { <START> for (Binding<?> contributor : setBinding.contributors) { <END> if (!first) { builder.append(","); } builder.append(contributor); first = false; } } builder.append("]"); return builder.toString(); }</code><technical_language>save iterator index loop</technical_language>

Target:
@Override public String toString() { boolean first = true; StringBuilder builder = new StringBuilder("SetBinding["); for (SetBinding<T> setBinding = this; setBinding != null; setBinding = setBinding.parent) { for (int i = 0, size = setBinding.contributors.size(); i < size; i++) { if (!first) { builder.append(","); } builder.append(setBinding.contributors.get(i)); first = false; } } builder.append("]"); return builder.toString(); }
Source:
<code>public void addPlayers() { retrieveTeam(team -> { <START> try { <END> tm.begin(); String playerName; while (!(playerName = con.readLine("Enter player's name (to stop adding, type \"q\"): ")).equals("q")) { team.addPlayer(playerName); String country = con.readLine("Enter player's country: "); players.put(playerName, country); } teams.put(team.getName(), team); tm.commit(); } catch (Exception e) { con.printf("Exception message %s", e.getMessage()); } }); }</code><technical_language>I start transaction retrieveTeam(). Otherwise, getter retrieve team cache happen transaction</technical_language>

Target:
public void addPlayers() { retrieveTeam(team -> { String playerName; while (!(playerName = con.readLine("Enter player's name (to stop adding, type \"q\"): ")).equals("q")) { team.addPlayer(playerName); String country = con.readLine("Enter player's country: "); players.put(playerName, country); } teams.put(team.getName(), team); }); }
Source:
<code>public LongInputStreamV1(OrcInputStream input, boolean signed) { this.input = input; this.signed = signed; <START> lastReadInputCheckpoint = input.getCheckpoint(); <END> }</code><technical_language>lastReadInputCheckpoint is anymore. remove</technical_language>

Target:
public LongInputStreamV1(OrcInputStream input, boolean signed) { this.input = input; this.signed = signed; }
Source:
<code>public boolean visit(final UserdataPwdRules userdata) throws ResourceUnavailableException { final VirtualRouter router = userdata.getRouter(); final Commands commands = new Commands(Command.OnError.Stop); final VirtualMachineProfile profile = userdata.getProfile(); final NicVO nicVo = userdata.getNicVo(); final UserVmVO userVM = userdata.getUserVM(); <START> if (router.getRedundantState() == VirtualRouter.RedundantState.MASTER) { <END> _commandSetupHelper.createPasswordCommand(router, profile, nicVo, commands); } _commandSetupHelper.createVmDataCommand(router, userVM, nicVo, userVM.getDetail("SSH.PublicKey"), commands); return _networkGeneralHelper.sendCommandsToRouter(router, commands); }</code><technical_language>1. line 69 changed if (!router.getIsRedundantRouter() || router.getRedundantState() == RedundantState.MASTER) { 2, this works in a new isolated network ( RVR), working a new VPC (with RVR). is a guest network in new isolated network VRs MASTER/BACKUP, for VPC BACKUP/BACKUP. I idea fix it, do change this part password stored in both......actually vm in a vpc</technical_language>

Target:
public boolean visit(final UserdataPwdRules userdata) throws ResourceUnavailableException { final VirtualRouter router = userdata.getRouter(); final Commands commands = new Commands(Command.OnError.Stop); final VirtualMachineProfile profile = userdata.getProfile(); final NicVO nicVo = userdata.getNicVo(); final UserVmVO userVM = userdata.getUserVM(); if (router.getIsRedundantRouter() && router.getVpcId() == null && router.getRedundantState() == VirtualRouter.RedundantState.MASTER) { _commandSetupHelper.createPasswordCommand(router, profile, nicVo, commands); }else if (!router.getIsRedundantRouter() || router.getVpcId()!= null){ _commandSetupHelper.createPasswordCommand(router, profile, nicVo, commands); } _commandSetupHelper.createVmDataCommand(router, userVM, nicVo, userVM.getDetail("SSH.PublicKey"), commands); return _networkGeneralHelper.sendCommandsToRouter(router, commands); }
Source:
<code>public void setPostLogoutRedirectUri(URI postLogoutRedirectUri) { Assert.notNull(postLogoutRedirectUri, "postLogoutRedirectUri cannot be empty"); <START> this.postLogoutRedirectUriTemplate = postLogoutRedirectUri.toASCIIString(); <END> }</code><technical_language>This needs @Deprecated</technical_language>

Target:
public void setPostLogoutRedirectUri(URI postLogoutRedirectUri) { Assert.notNull(postLogoutRedirectUri, "postLogoutRedirectUri cannot be empty"); this.postLogoutRedirectUri = postLogoutRedirectUri.toASCIIString(); }
Source:
<code>protected boolean verify(@NonNull List<AuthScope> grantedScopes, @NonNull final String objectId) { if (grantedScopes.stream().anyMatch(AuthScope::allowAllProjects)) { log.info("Access granted to blanket scope"); return true; } val projectCodes = getAuthorizedProjectCodes(grantedScopes); <START> val projCd = fetchProjectCode(objectId); <END> val result = projectCodes.contains(projCd); log.info("checking for permission to project for object id ({})", projCd, objectId, result); return result; }</code><technical_language>rename this variable requiredProjectCode</technical_language>

Target:
protected boolean verify(@NonNull List<AuthScope> grantedScopes, @NonNull final String objectId) { if (grantedScopes.stream().anyMatch(AuthScope::allowAllProjects)) { log.info("Access granted to blanket scope"); return true; } val projectCodes = getAuthorizedProjectCodes(grantedScopes); val requiredProjectCode = fetchProjectCode(objectId); val result = projectCodes.contains(requiredProjectCode); log.info("checking for permission to project for object id ({})", requiredProjectCode, objectId, result); return result; }
Source:
<code>public int compareTo(AvroReplacementDescriptor o) { if (priority != o.priority) { return Integer.compare(priority, o.priority); } else { <START> return forbidden == null ? o.forbidden == null ? 0 : 1 : forbidden.compareTo(o.forbidden); <END> } }</code><technical_language>do about: return Objects.compare(forbidden, o.forbidden, String::compareTo);</technical_language>

Target:
public int compareTo(AvroReplacementDescriptor o) { if (priority != o.priority) { return Integer.compare(priority, o.priority); } else { return Objects.compare(forbidden, o.forbidden, String::compareTo); } }
Source:
<code>public void testPostRequest() throws IOException { final TestMessage message = new TestMessage("messagetest", "12345"); HttpWebResponse httpResponse = null; WebRequestHandler request = new WebRequestHandler(); String json = new Gson().toJson(message); try { httpResponse = request.sendPost(getUrl(TEST_WEBAPI_URL), null, json.getBytes(ENCODING_UTF8), "application/json"); <START> } catch (final IOException e) { <END> Assert.fail("Encounter unexpected IOException."); } assertTrue("status is 200", httpResponse.getStatusCode() == 200); String responseMsg = new String(httpResponse.getBody()); assertTrue("request body check", responseMsg.contains(message.getAccessToken() + message.getUserName())); }</code><technical_language>do catch anything, test throws exception</technical_language>

Target:
public void testPostRequest() throws IOException { final TestMessage message = new TestMessage("messagetest", "12345"); HttpWebResponse httpResponse = null; WebRequestHandler request = new WebRequestHandler(); String json = new Gson().toJson(message); httpResponse = request.sendPost(getUrl(TEST_WEBAPI_URL), null, json.getBytes(ENCODING_UTF8), "application/json"); assertTrue("status is 200", httpResponse.getStatusCode() == 200); String responseMsg = new String(httpResponse.getBody()); assertTrue("request body check", responseMsg.contains(message.getAccessToken() + message.getUserName())); }
Source:
<code>public void apply(OnlineCommandContext ctx) throws IOException { Operations ops = new Operations(ctx.client); String socketBindingGroup = ctx.client.options().isDomain ? "full-sockets" : "standard-sockets"; Address socketBindingAddress = Address.of("socket-binding-group", socketBindingGroup) .and("socket-binding", socketBindingName); if (replaceExisting) { try { ops.removeIfExists(socketBindingAddress); <START> } catch (OperationException e) { <END> throw new IOException("Failed to remove existing socket binding " + socketBindingName, e); } } ops.add(socketBindingAddress, Values.empty() .andListOptional(String.class, "client-mappings", clientMappings) .andOptional("fixed-port", fixedPort) .andOptional("interface", interfaceName) .andOptional("multicast-address", multicastAddress) .andOptional("multicast-port", multicastPort) .andOptional("port", port)); }</code><technical_language>is this wrapped IOException? wrap another OperationException. @honza-kasik , @rhatlapa WDYT</technical_language>

Target:
public void apply(OnlineCommandContext ctx) throws CommandFailedException, IOException { Operations ops = new Operations(ctx.client); String contextSocketBindingGroup; if (socketBindingGroup == null) { contextSocketBindingGroup = ctx.client.options().isDomain ? "full-sockets" : "standard-sockets"; } else { contextSocketBindingGroup = socketBindingGroup; } Address socketBindingAddress = Address.of("socket-binding-group", contextSocketBindingGroup) .and("socket-binding", socketBindingName); if (replaceExisting) { try { ops.removeIfExists(socketBindingAddress); } catch (OperationException e) { throw new CommandFailedException("Failed to remove existing socket binding " + socketBindingName, e); } } ops.add(socketBindingAddress, Values.empty() .andListOptional(String.class, "client-mappings", clientMappings) .andOptional("fixed-port", fixedPort) .andOptional("interface", interfaceName) .andOptional("multicast-address", multicastAddress) .andOptional("multicast-port", multicastPort) .andOptional("port", port)); }
Source:
<code>private void initUI() { ArrayList<Integer> tableNumbers = new ArrayList<Integer>(); for (int i = 1; i <= getTablesCount(); i++) { <START> tableNumbers.add(i); <END> } mTableStatus = getTableStatus(); GridViewAdapter imagesItem = new GridViewAdapter(this, tableNumbers, R.layout.table_item, mTableStatus); GridView tablesView = (GridView) findViewById(R.id.tables); tablesView.setAdapter(imagesItem); tablesView.setOnItemClickListener(new AdapterView.OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { OrderManager.getInstance().setTableId(position + 1); if (mTableStatus.get(position) == true) { OrderManager.getInstance().setTableId(position + 1); Intent intent = new Intent(SelectTableActivity.this, MainListActivity.class); startActivity(intent); } else { } } }); registerForContextMenu(tablesView); }</code><technical_language>do need array, includes 1, 2, 3, 4, 5...</technical_language>

Target:
private void initUI() { GridViewAdapter imagesItem = new GridViewAdapter(this, R.layout.table_item, mTablesList); GridView tablesView = (GridView) findViewById(R.id.tables); tablesView.setAdapter(imagesItem); tablesView.setOnItemClickListener(new AdapterView.OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { OrderManager.getInstance().setTableId(position + 1); if (mTablesList.get(position).isFree()) { Intent intent = new Intent(SelectTableActivity.this, MainListActivity.class); startActivity(intent); } else { } } }); registerForContextMenu(tablesView); }
Source:
<code>public List<CertificateSerialDto> getEntitlementCertificateSerials( @PathParam("consumer_uuid") @Verify(Consumer.class) String consumerUuid) { log.debug("Getting client certificate serials for consumer: {}", consumerUuid); Consumer consumer = consumerCurator.verifyAndLookupConsumer(consumerUuid); poolManager.regenerateDirtyEntitlements(consumer); List<CertificateSerialDto> allCerts = new LinkedList<CertificateSerialDto>(); for (Long id : entCertService.listEntitlementSerialIds(consumer)) { allCerts.add(new CertificateSerialDto(id)); } <START> if (!StringUtils.isEmpty(consumer.getOwner().getContentAccessMode())) { <END> ContentAccessCertificate cac = consumer.getContentAccessCert(); if (cac != null) { allCerts.add(new CertificateSerialDto(cac.getSerial().getId())); } } return allCerts; }</code><technical_language>chained calls end performance pain points later, I Hibernate lazily load Owner, pull access mode. change yet, in mind for future</technical_language>

Target:
public List<CertificateSerialDto> getEntitlementCertificateSerials( @PathParam("consumer_uuid") @Verify(Consumer.class) String consumerUuid) { log.debug("Getting client certificate serials for consumer: {}", consumerUuid); Consumer consumer = consumerCurator.verifyAndLookupConsumer(consumerUuid); checkForGuestMigration(consumer); poolManager.regenerateDirtyEntitlements(consumer); List<CertificateSerialDto> allCerts = new LinkedList<CertificateSerialDto>(); for (Long id : entCertService.listEntitlementSerialIds(consumer)) { allCerts.add(new CertificateSerialDto(id)); } if (!consumer.getOwner().contentAccessMode() .equals(ContentAccessCertServiceAdapter.DEFAULT_CONTENT_ACCESS_MODE)) { try { ContentAccessCertificate cac = contentAccessCertService.getCertificate(consumer); if (cac != null) { allCerts.add(new CertificateSerialDto(cac.getSerial().getId())); } } catch (IOException ioe) { throw new BadRequestException(i18n.tr("Cannot retrieve content access certificate"), ioe); } catch (GeneralSecurityException gse) { throw new BadRequestException(i18n.tr("Cannot retrieve content access certificate", gse)); } } return allCerts; }
Source:
<code>public ServerInfoResource(NodeVersion nodeVersion, NodeInfo nodeInfo, ServerConfig serverConfig, GracefulShutdownHandler shutdownHandler) { this.version = requireNonNull(nodeVersion, "nodeVersion is null"); this.environment = requireNonNull(nodeInfo, "nodeInfo is null").getEnvironment(); this.isCoordinator = requireNonNull(requireNonNull(serverConfig, "serverConfig is null").isCoordinator()); this.shutdownHandler = requireNonNull(shutdownHandler, "shutdownHandler is null"); <START> this.startTime = System.nanoTime(); <END> }</code><technical_language>Initialize this in field declaration</technical_language>

Target:
public ServerInfoResource(NodeVersion nodeVersion, NodeInfo nodeInfo, ServerConfig serverConfig, GracefulShutdownHandler shutdownHandler) { this.version = requireNonNull(nodeVersion, "nodeVersion is null"); this.environment = requireNonNull(nodeInfo, "nodeInfo is null").getEnvironment(); this.coordinator = requireNonNull(requireNonNull(serverConfig, "serverConfig is null").isCoordinator()); this.shutdownHandler = requireNonNull(shutdownHandler, "shutdownHandler is null"); }
Source:
<code>public T path(String path) { <START> this.path += "/" + encodePath(path); <END> return returnThis(); }</code><technical_language>I baseUri.toAsciiString() a trailing / in usage current build() method I end (for example): http://some.example:80//path/path/path?query=true changing this.path += encodePath(path) + "/"; result in: http://some.example:80/path/path/path/?query=true I of valid URLs, I need server side issues if // /?. @tomblench thoughts this</technical_language>

Target:
public T path(String path) { if (path.length() == 0) { this.path += encodePath(path); } else { this.path += "/" + encodePath(path); } return returnThis(); }
Source:
<code>private void writeNumaTune() { NumaTuneMode numaTune = vm.getNumaTuneMode(); if (numaTune == null) { return; } Map<String, Object> numaTuneSetting = NumaSettingFactory.buildVmNumatuneSetting( numaTune, vmNumaNodesSupplier.get()); if (numaTuneSetting.isEmpty()) { return; } String nodeSet = (String) numaTuneSetting.get(VdsProperties.NUMA_TUNE_NODESET); String mode = (String) numaTuneSetting.get(VdsProperties.NUMA_TUNE_MODE); @SuppressWarnings("unchecked") List<Map<String, String>> memNodes = (List<Map<String, String>>) numaTuneSetting.get(VdsProperties.NUMA_TUNE_MEMNODES); if (nodeSet != null || memNodes != null) { writer.writeStartElement("numatune"); if (nodeSet != null) { writer.writeStartElement("memory"); writer.writeAttributeString("mode", mode); writer.writeAttributeString("modeset", nodeSet); writer.writeEndElement(); } if (memNodes != null) { for (Map<String, String> memnode : memNodes) { writer.writeStartElement("memnode"); writer.writeAttributeString("mode", mode); <START> writer.writeAttributeString("cellid", memnode.get(VdsProperties.NUMA_TUNE_VM_NODE_INDEX)); <END> writer.writeAttributeString("nodeset", memnode.get(VdsProperties.NUMA_TUNE_NODESET)); writer.writeEndElement(); } } writer.writeEndElement(); } }</code><technical_language>purpose of this change</technical_language>

Target:
private void writeNumaTune() { NumaTuneMode numaTune = vm.getNumaTuneMode(); if (numaTune == null) { return; } Map<String, Object> numaTuneSetting = NumaSettingFactory.buildVmNumatuneSetting( numaTune, vmNumaNodesSupplier.get()); if (numaTuneSetting.isEmpty()) { return; } String nodeSet = (String) numaTuneSetting.get(VdsProperties.NUMA_TUNE_NODESET); String mode = (String) numaTuneSetting.get(VdsProperties.NUMA_TUNE_MODE); @SuppressWarnings("unchecked") List<Map<String, String>> memNodes = (List<Map<String, String>>) numaTuneSetting.get(VdsProperties.NUMA_TUNE_MEMNODES); if (nodeSet != null || memNodes != null) { writer.writeStartElement("numatune"); if (nodeSet != null) { writer.writeStartElement("memory"); writer.writeAttributeString("mode", mode); writer.writeAttributeString("modeset", nodeSet); writer.writeEndElement(); } if (memNodes != null) { for (Map<String, String> memnode : memNodes) { writer.writeStartElement("memnode"); writer.writeAttributeString("mode", mode); writer.writeAttributeString("cellid", (String) memnode.get(VdsProperties.NUMA_TUNE_VM_NODE_INDEX)); writer.writeAttributeString("nodeset", (String) memnode.get(VdsProperties.NUMA_TUNE_NODESET)); writer.writeEndElement(); } } writer.writeEndElement(); } }
Source:
<code>public static String generateInitRequestFunctionSignature(final Request request) { final ImmutableList.Builder<String> builder = ImmutableList.builder(); if (request.getClassification() == Classification.amazons3) { final String amazonS3InitParams = getAmazonS3InitParams(request.isResourceRequired(), request.isResourceIdRequired()); if (!amazonS3InitParams.isEmpty()) { builder.add(amazonS3InitParams); } } else { final String spectraS3InitParams = getSpectraS3InitParams(request.isResourceRequired()); if (!spectraS3InitParams.isEmpty()) { builder.add(spectraS3InitParams); } } builder.addAll(request.getRequiredQueryParams().stream() .filter(parm -> !parm.getParameterType().equals("ds3_bool")) .filter(parm -> !parm.getParameterType().equals("operation")) .map(Parameter::toString) .collect(GuavaCollectors.immutableList())); builder.addAll(request.getOptionalQueryParams().stream() .map(Parameter::toString) .collect(GuavaCollectors.immutableList())); <START> if (request.hasRequestPayload()) { <END> if (request.getName().equalsIgnoreCase("put_object_request") || request.getName().equalsIgnoreCase("complete_multi_part_upload_request")) { } else { builder.add(request.getRequestPayload().toString()); } } final ImmutableList<String> allParams = builder.build(); return "ds3_request* init_" + getNameRootUnderscores(request.getName()) + "(" + joinStrings(allParams)+ ")"; }</code><technical_language>This simplified nested ifs: java if (request.hasRequestPayload() && (!request.getName().equalsIgnoreCase("put_object_request") && !request.getName().equalsIgnoreCase("complete_multi_part_upload_request")) ) { builder.add(...) }</technical_language>

Target:
public static String generateInitRequestFunctionSignature(final Request request) { final ImmutableList.Builder<String> builder = ImmutableList.builder(); if (request.getClassification() == Classification.amazons3) { final String amazonS3InitParams = getAmazonS3InitParams(request.isResourceRequired(), request.isResourceIdRequired()); if (!amazonS3InitParams.isEmpty()) { builder.add(amazonS3InitParams); } } else { final String spectraS3InitParams = getSpectraS3InitParams(request.isResourceRequired()); if (!spectraS3InitParams.isEmpty()) { builder.add(spectraS3InitParams); } } builder.addAll(request.getRequiredQueryParams().stream() .filter(parm -> !parm.getParameterType().equals("ds3_bool")) .filter(parm -> !parm.getParameterType().equals("operation")) .map(Parameter::toString) .collect(GuavaCollectors.immutableList())); builder.addAll(request.getOptionalQueryParams().stream() .map(Parameter::toString) .collect(GuavaCollectors.immutableList())); if (request.hasRequestPayload() && !request.getName().equalsIgnoreCase("put_object_request") && !request.getName().equalsIgnoreCase("complete_multi_part_upload_request")) { builder.add(request.getRequestPayload().toString()); } final ImmutableList<String> allParams = builder.build(); return "ds3_request* init_" + getNameRootUnderscores(request.getName()) + "(" + joinStrings(allParams)+ ")"; }
Source:
<code>public ByteStream hex(String s) { int len = s.length(); for (int i = 0; i < len; i += 2) { byte value = (byte)((Character.digit(s.charAt(i), 16) << 4) + Character.digit(s.charAt(i+1), 16)); <START> stream = Stream.concat(stream, Stream.of(value)); <END> } this.empty = false; return this; }</code><technical_language>if Stream.concat() (or Stream in general) is right here. I get a stack overflow error a moderately large file. Exception in thread "Thread-22" java.lang.StackOverflowError java.base/java.util.stream.Streams$ConcatSpliterator.characteristics(Streams.java:755)</technical_language>

Target:
public ByteStream hex(String s) { int len = s.length(); for (int i = 0; i < len; i += 2) { byte value = (byte)((Character.digit(s.charAt(i), 16) << 4) + Character.digit(s.charAt(i+1), 16)); stream.add(value); } this.empty = false; return this; }
Source:
<code>public List<Group> getGroups() { <START> return new ArrayList<Group>(); <END> }</code><technical_language>this return group</technical_language>

Target:
public List<Group> getGroups() { return this.groups; }
Source:
<code><START> protected HashMap<String, Object> buildGitEnv(String url, <END> String username, String password, boolean mirror) { return new HashMap<String, Object>() {{ put("origin", url); put(SCHEME, GitRepository.SCHEME.toString()); put("replaceIfExists", true); put("username", username); put("password", password); put(MIRROR, mirror); }}; }</code><technical_language>Program interface, implementation - please change return type Map<String, Object></technical_language>

Target:
protected Map<String, Object> buildGitEnv(String url, String username, String password, boolean mirror) { return new HashMap<String, Object>() {{ put("origin", url); put(SCHEME, GitRepository.SCHEME.toString()); put("replaceIfExists", true); put("username", username); put("password", password); put(MIRROR, mirror); }}; }
Source:
<code>public static void wipeDB(Settings settings) { <START> DaoSession daoSession = DbConnection.getSession(); <END> daoSession.getArticleContentDao().deleteAll(); daoSession.getArticleDao().deleteAll(); daoSession.getTagDao().deleteAll(); daoSession.getArticleTagsJoinDao().deleteAll(); daoSession.getQueueItemDao().deleteAll(); settings.setLatestUpdatedItemTimestamp(0); settings.setLatestUpdateRunTimestamp(0); settings.setFirstSyncDone(false); EventHelper.notifyEverythingRemoved(); }</code><technical_language>good catch cache session :+1: newly introduced getDaoSession() here, too</technical_language>

Target:
public static void wipeDB(Settings settings) { DaoSession daoSession = getDaoSession(); FtsDao.deleteAllArticles(daoSession.getDatabase()); daoSession.getArticleContentDao().deleteAll(); daoSession.getArticleDao().deleteAll(); daoSession.getTagDao().deleteAll(); daoSession.getArticleTagsJoinDao().deleteAll(); daoSession.getQueueItemDao().deleteAll(); settings.setLatestUpdatedItemTimestamp(0); settings.setLatestUpdateRunTimestamp(0); settings.setFirstSyncDone(false); EventHelper.notifyEverythingRemoved(); }
Source:
<code>protected void customPaintBackground(Graphics g) { Graphics2D g2 = (Graphics2D) g.create(); try { AntialiasingManager.activateAntialiasing(g2); super.customPaintBackground(g2); JTextComponent c = this.getComponent(); int dy = c.getHeight() / 2 - searchIcon.getIconHeight()/2; g2.drawImage(searchIcon.getImage(), 3, dy, null); String str = c.getText(); boolean containsLetter = false; for (int i = 0; i < str.length(); i++) { <START> if (Character.isLetter(str.charAt(i))) <END> { containsLetter = true; break; } } if (c.getText() != null && c.getText().length() > 0 && !containsLetter && isSMSButtonEnabled) { Rectangle smsRect = getSMSButtonRect(); int dx = smsRect.x; dy = smsRect.y; if (isSMSMousePressed) g2.drawImage(smsPressedIcon, dx, dy, null); else if (isSMSMouseOver) { g2.drawImage(smsRolloverIcon, dx, dy, null); } else g2.drawImage(smsIcon, dx, dy, null); isSMSIconVisible = true; } else isSMSIconVisible = false; if (c.getText() != null && c.getText().length() > 0 && isCallButtonEnabled) { Rectangle callRect = getCallButtonRect(); int dx = callRect.x; dy = callRect.y; if (isCallMousePressed) g2.drawImage(callPressedIcon, dx, dy, null); else if (isCallMouseOver) g2.drawImage(callRolloverIcon, dx, dy, null); else g2.drawImage(callIcon, dx, dy, null); g2.drawImage( separatorIcon, dx + callRect.width + 3, dy + (callRect.height - separatorIcon.getHeight(null))/2, null); isCallIconVisible = true; } else isCallIconVisible = false; } finally { g2.dispose(); } }</code><technical_language>NPE. Please, ANALYZE changes. isAlpha well. I doube code is anyway</technical_language>

Target:
protected void customPaintBackground(Graphics g) { Graphics2D g2 = (Graphics2D) g.create(); try { AntialiasingManager.activateAntialiasing(g2); super.customPaintBackground(g2); JTextComponent c = this.getComponent(); int dy = c.getHeight() / 2 - searchIcon.getIconHeight()/2; g2.drawImage(searchIcon.getImage(), 3, dy, null); String str = c.getText(); if (c.getText() != null && c.getText().length() > 0 && (str != null && StringUtils.isNotEmpty(str) && !StringUtils.isAlpha(str)) && isSMSButtonEnabled) { Rectangle smsRect = getSMSButtonRect(); int dx = smsRect.x; dy = smsRect.y; if (isSMSMousePressed) g2.drawImage(smsPressedIcon, dx, dy, null); else if (isSMSMouseOver) { g2.drawImage(smsRolloverIcon, dx, dy, null); } else g2.drawImage(smsIcon, dx, dy, null); isSMSIconVisible = true; } else isSMSIconVisible = false; if (c.getText() != null && c.getText().length() > 0 && isCallButtonEnabled) { Rectangle callRect = getCallButtonRect(); int dx = callRect.x; dy = callRect.y; if (isCallMousePressed) g2.drawImage(callPressedIcon, dx, dy, null); else if (isCallMouseOver) g2.drawImage(callRolloverIcon, dx, dy, null); else g2.drawImage(callIcon, dx, dy, null); g2.drawImage( separatorIcon, dx + callRect.width + 3, dy + (callRect.height - separatorIcon.getHeight(null))/2, null); isCallIconVisible = true; } else isCallIconVisible = false; } finally { g2.dispose(); } }
Source:
<code>public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Permanent permanent = game.getBattlefield().getPermanent(source.getSourceId()); if (permanent == null) { permanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD); <START> } <END> if (controller != null && permanent != null) { new AddCountersSourceEffect(CounterType.WAGE.createInstance(), true).apply(game, source); Cost cost = new GenericManaCost(2 * permanent.getCounters(game).getCount(CounterType.WAGE)); if (!cost.pay(source, game, controller.getId(), controller.getId(), false)) { new RemoveAllCountersSourceEffect(CounterType.WAGE).apply(game, source); Target target = new TargetOpponent(true); target.choose(Outcome.GainControl, source.getControllerId(), source.getSourceId(), game); Player opponent = game.getPlayer(target.getFirstTarget()); if (opponent != null) { permanent.changeControllerId(controller.getId(), game); } } return true; } return false; }</code><technical_language>calls replaced game.getPermanentOrLKIBattlefield(</technical_language>

Target:
public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (controller != null && permanent != null) { new AddCountersSourceEffect(CounterType.WAGE.createInstance(), true).apply(game, source); Cost cost = new GenericManaCost(2 * permanent.getCounters(game).getCount(CounterType.WAGE)); if (!cost.pay(source, game, controller.getId(), controller.getId(), false)) { new RemoveAllCountersSourceEffect(CounterType.WAGE).apply(game, source); Player opponent; Set<UUID> opponents = game.getOpponents(controller.getId()); if (opponents.size() == 1) { opponent = game.getPlayer(opponents.iterator().next()); } else { Target target = new TargetOpponent(true); target.setNotTarget(true); target.choose(Outcome.GainControl, source.getControllerId(), source.getSourceId(), game); opponent = game.getPlayer(target.getFirstTarget()); } if (opponent != null) { permanent.changeControllerId(opponent.getId(), game); } } return true; } return false; }
Source:
<code>public ClassGenerator(final String url, final String path) throws IOException { download(url, path + "/source.zip"); unzip(path + "/source.zip", path + "/doc-sources"); final Path sourceDir = Paths.get(path + "/doc-sources"); Files.walkFileTree(sourceDir, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException { if (attrs.isRegularFile()) { <START> final String content = new Scanner(file.toFile()).useDelimiter("\\Z").next(); <END> final String name = file.getName(file.getNameCount() - 2).toString(); final List<String> l; if (sections.containsKey(name)) { l = sections.get(name); } else { l = new ArrayList<>(); } l.add(content); sections.put(name, l); } return FileVisitResult.CONTINUE; } }); }</code><technical_language>I this is of ways read entire contents of a file JDK classes, a fan. utilities in dictionary package for this? If want create in places</technical_language>

Target:
public ClassGenerator(final String url, final String path) throws IOException { download(url, path + "/source.zip"); unzip(path + "/source.zip", path + "/doc-sources"); final Path sourceDir = Paths.get(path + "/doc-sources"); Files.walkFileTree(sourceDir, new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException { if (attrs.isRegularFile()) { final String content = new String(Files.readAllBytes(file), StandardCharsets.UTF_8); final String name = file.getName(file.getNameCount() - 2).toString(); final List<String> l; if (sections.containsKey(name)) { l = sections.get(name); } else { l = new ArrayList<>(); } l.add(content); sections.put(name, l); } return FileVisitResult.CONTINUE; } }); }
Source:
<code>public void tearDown() throws Exception { <START> if (this.fileWatcher != null) { <END> this.fileWatcher.close(); } final Path workDir = PATH.getParent(); if (Files.exists(workDir)) { Files.deleteIfExists(PATH); Files.delete(workDir); } }</code><technical_language>a TemporaryFolder @Rule for workDir simplify code? For example here: <LINK_0></technical_language>

Target:
public void tearDown() throws Exception { if (this.fileWatcher != null) { this.fileWatcher.close(); } }
Source:
<code>public void createNodePrintAcl(ZooKeeper zk, String path, String testName) { try { LOG.debug("KeyAuthenticationProvider Creating Test Node:"+path+".\n"); zk.create(path, null, Ids.CREATOR_ALL_ACL, CreateMode.PERSISTENT); List<ACL> acls = zk.getACL(path, null); LOG.debug("Node: "+path+" Test:"+testName+" ACLs:"); for (ACL acl : acls) { LOG.debug(" "+acl.toString()); } } catch (Exception e) { <START> LOG.debug(" EXCEPTION THROWN"); <END> } }</code><technical_language>add reason as: LOG.debug(" EXCEPTION THROWN ", e);</technical_language>

Target:
public void createNodePrintAcl(ZooKeeper zk, String path, String testName) { try { LOG.debug("KeyAuthenticationProvider Creating Test Node:" + path + ".\n"); zk.create(path, null, Ids.CREATOR_ALL_ACL, CreateMode.PERSISTENT); List<ACL> acls = zk.getACL(path, null); LOG.debug("Node: " + path + " Test:" + testName + " ACLs:"); for (ACL acl : acls) { LOG.debug(" " + acl.toString()); } } catch (Exception e) { LOG.debug(" EXCEPTION THROWN", e); } }
Source:
<code>protected Serializable handleMessage(final DlmsDevice device, final Serializable requestObject) throws OsgpException, ProtocolAdapterException { <START> final SmartMeteringDeviceDto smartMeteringDevice = (SmartMeteringDeviceDto) requestObject; <END> this.installationService.addMeter(smartMeteringDevice); return null; }</code><technical_language>Is guaranteed requestObject is a SmartMeteringDeviceDto !</technical_language>

Target:
protected Serializable handleMessage(final DlmsDevice device, final Serializable requestObject) throws OsgpException, ProtocolAdapterException { this.assertRequestObjectType(SmartMeteringDeviceDto.class, requestObject); final SmartMeteringDeviceDto smartMeteringDevice = (SmartMeteringDeviceDto) requestObject; this.installationService.addMeter(smartMeteringDevice); return null; }
Source:
<code>protected void onInit() throws Exception { super.onInit(); if (!this.autoStartupSetExplicitly) { String[] endpointNamePatterns = getIntegrationProperty(IntegrationProperties.ENDPOINTS_NO_AUTO_STARTUP, String[].class); for (String pattern : endpointNamePatterns) { if (PatternMatchUtils.simpleMatch(pattern, getComponentName())) { this.autoStartup = false; break; } } } if (StringUtils.hasText(this.role)) { this.roleController = getBeanFactory() .getBean(IntegrationContextUtils.INTEGRATION_LIFECYCLE_ROLE_CONTROLLER, SmartLifecycleRoleController.class); <START> this.roleController.addLifecycleToRole(this.role, this); <END> } }</code><technical_language>Needs null check - also, if endpoints register themselves, parsers technique? <LINK_0></technical_language>

Target:
protected void onInit() throws Exception { super.onInit(); if (!this.autoStartupSetExplicitly) { String[] endpointNamePatterns = getIntegrationProperty(IntegrationProperties.ENDPOINTS_NO_AUTO_STARTUP, String[].class); for (String pattern : endpointNamePatterns) { if (PatternMatchUtils.simpleMatch(pattern, getComponentName())) { this.autoStartup = false; break; } } } if (StringUtils.hasText(this.role)) { try { this.roleController = getBeanFactory() .getBean(IntegrationContextUtils.INTEGRATION_LIFECYCLE_ROLE_CONTROLLER, SmartLifecycleRoleController.class); this.roleController.addLifecycleToRole(this.role, this); } catch (NoSuchBeanDefinitionException e) { this.logger.trace("No LifecycleRoleController in the context"); } } }
Source:
<code>public void setTags(String tags) { this.tags = tags; <START> if (tags != null) { <END> this.tags = this.tags.replaceAll("<", "&lt;"); Pair<String, int[]> normalized = StringNormalizer.normalizeWithMap(this.tags); this.tagsNormalized = normalized.first; this.tagsPositionMap = normalized.second; } }</code><technical_language>Check this.tags</technical_language>

Target:
public void setTags(String tags) { this.tags = tags; if (this.tags != null) { this.tags = this.tags.replaceAll("<", "&lt;"); Pair<String, int[]> normalized = StringNormalizer.normalizeWithMap(this.tags); this.tagsNormalized = normalized.first; this.tagsPositionMap = normalized.second; } }
Source:
<code>public void sparseTrim(@NonNull IToken token, @NonNull LogData garbageEntry) { <START> log.info("sparse trim[{}]", token.getSequence()); <END> garbageEntry.useToken(token); layoutHelper(e -> { List<String> servers = e.getLayout().getStripe(token.getSequence()).getLogServers(); int numUnits = servers.size(); for (int i = numUnits - 1; i >= 0; --i) { log.trace("Propagate[{}]: chain {}/{}", Token.of(e.getLayout().getEpoch(), token.getSequence()), i + 1, numUnits); String server = servers.get(i); writeGarbageToLogUnit(e, server, token, garbageEntry); } return null; }, true); }</code><technical_language>sparse trim -> sparseTrim</technical_language>

Target:
public void sparseTrim(@NonNull IToken token, @NonNull LogData garbageEntry) { log.info("sparseTrim[{}]", token.getSequence()); garbageEntry.useToken(token); layoutHelper(e -> { List<String> servers = e.getLayout().getStripe(token.getSequence()).getLogServers(); int numUnits = servers.size(); for (int i = numUnits - 1; i >= 0; --i) { log.trace("sparseTrim ChainReplication[{}]: {}/{}", Token.of(e.getLayout().getEpoch(), token.getSequence()), i + 1, numUnits); String server = servers.get(i); writeGarbageToLogUnit(e, server, token, garbageEntry); } return null; }, true); }