auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private Map<String, IdealState> convertResourceAssignment( ResourceControllerDataProvider clusterData, Map<String, ResourceAssignment> assignments) throws HelixRebalanceException { Map<String, IdealState> finalIdealStateMap = new HashMap<>(); for (String resourceName : assignments.keySet()) { try { IdealState currentIdealState = clusterData.getIdealState(resourceName); Map<String, Integer> statePriorityMap = clusterData.getStateModelDef(currentIdealState.getStateModelDefRef()) .getStatePriorityMap(); IdealState newIdealState = new IdealState(resourceName); newIdealState.getRecord().setSimpleFields(currentIdealState.getRecord().getSimpleFields()); newIdealState.setPreferenceLists( getPreferenceLists(assignments.get(resourceName), statePriorityMap)); finalIdealStateMap.put(resourceName, newIdealState); } catch (Exception ex) { throw new HelixRebalanceException( <START> "Fail to calculate the new IdealState for resource: " + resourceName, <END> HelixRebalanceException.Type.INVALID_CLUSTER_STATUS, ex); } } return finalIdealStateMap; }</code><technical_language>Failed</technical_language>

Target:
private Map<String, IdealState> convertResourceAssignment( ResourceControllerDataProvider clusterData, Map<String, ResourceAssignment> assignments) throws HelixRebalanceException { Map<String, IdealState> finalIdealStateMap = new HashMap<>(); for (String resourceName : assignments.keySet()) { try { IdealState currentIdealState = clusterData.getIdealState(resourceName); Map<String, Integer> statePriorityMap = clusterData.getStateModelDef(currentIdealState.getStateModelDefRef()) .getStatePriorityMap(); IdealState newIdealState = new IdealState(resourceName); newIdealState.getRecord().setSimpleFields(currentIdealState.getRecord().getSimpleFields()); newIdealState.setPreferenceLists( getPreferenceLists(assignments.get(resourceName), statePriorityMap)); finalIdealStateMap.put(resourceName, newIdealState); } catch (Exception ex) { throw new HelixRebalanceException( "Failed to calculate the new IdealState for resource: " + resourceName, HelixRebalanceException.Type.INVALID_CLUSTER_STATUS, ex); } } return finalIdealStateMap; }
Source:
<code>private List<HistoryEntry> removeHistoryEntries(final History history) { final List<HistoryEntry> removedEntries = new ArrayList<>(); final int insertStampToRemove = history.currentInsertStamp; final Iterator<HistoryEntry> it = history.entries.iterator(); <START> if (!it.hasNext()) return removedEntries; <END> while (it.hasNext()) { final HistoryEntry entry = it.next(); if (entry.insertStamp != insertStampToRemove) break; removedEntries.add(entry); it.remove(); } return removedEntries; }</code><technical_language>if history.entries.isEmpty()? more readable in opinion. (Maybe add isEmpty function history class.)</technical_language>

Target:
private List<HistoryEntry> removeHistoryEntries(final History history) { final List<HistoryEntry> removedEntries = new ArrayList<>(); final int insertStampToRemove = history.currentInsertStamp; final Iterator<HistoryEntry> it = history.entries.iterator(); while (it.hasNext()) { final HistoryEntry entry = it.next(); if (entry.insertStamp != insertStampToRemove) break; removedEntries.add(entry); it.remove(); } return removedEntries; }
Source:
<code>public final void testDirectArenaMemoryCopy() { PooledByteBuf<ByteBuffer> src = (PooledByteBuf<ByteBuffer>) PooledByteBufAllocator.DEFAULT.directBuffer(512); PooledByteBuf<ByteBuffer> dst = (PooledByteBuf<ByteBuffer>) PooledByteBufAllocator.DEFAULT.directBuffer(512); dst.writeBytes(ByteBuffer.allocate(128)); <START> dst.chunk.arena.memoryCopy(src.memory, 0, dst, 512); <END> }</code><technical_language>@njhill need call src.release() dst.release() well</technical_language>

Target:
public void testDirectArenaMemoryCopy() { ByteBuf src = PooledByteBufAllocator.DEFAULT.directBuffer(512); ByteBuf dst = PooledByteBufAllocator.DEFAULT.directBuffer(512); PooledByteBuf<ByteBuffer> pooledSrc = unwrapIfNeeded(src); PooledByteBuf<ByteBuffer> pooledDst = unwrapIfNeeded(dst); pooledDst.writeBytes(ByteBuffer.allocate(128)); pooledDst.chunk.arena.memoryCopy(pooledSrc.memory, 0, pooledDst, 512); src.release(); dst.release(); }
Source:
<code>private ContentItem readContent(URI uri) throws StorageException { Path path = getContentFilePath(uri); if (path == null) { throw new StorageException( "Unable to find file for content ID: " + uri.getSchemeSpecificPart()); } String filename = path.getFileName().toString(); InputStream contentInputStream; String extension; try { <START> if (REF_EXT.equals(FilenameUtils.getExtension(path.getFileName().toString()))) { <END> extension = FilenameUtils.getExtension( FilenameUtils.removeExtension(path.getFileName().toString())); contentInputStream = getInputStreamFromReference(path); } else { extension = FilenameUtils.getExtension(path.getFileName().toString()); contentInputStream = getInputStreamFromResource(path); } } catch (IOException e) { throw new StorageException( String.format("Unable to resolve InputStream given URI of %s", uri), e); } ByteSource byteSource = decryptStream(contentInputStream); long size = 0; try { size = byteSource.size(); } catch (IOException e) { LOGGER.debug("Problem determining size of resource; defaulting to {}.", size, e); } String mimeType = determineMimeType(extension, path, byteSource); return new ContentItemImpl( uri.getSchemeSpecificPart(), uri.getFragment(), byteSource, mimeType, filename, size, null); }</code><technical_language>clarify simplify code in this block if filename defined line 411 above</technical_language>

Target:
private ContentItem readContent(URI uri) throws StorageException { Path path = getContentFilePath(uri); if (path == null) { throw new StorageException( "Unable to find file for content ID: " + uri.getSchemeSpecificPart()); } String filename = path.getFileName().toString(); InputStream contentInputStream; String extension; try { if (REF_EXT.equals(FilenameUtils.getExtension(filename))) { extension = FilenameUtils.getExtension( FilenameUtils.removeExtension(path.getFileName().toString())); contentInputStream = getInputStreamFromReference(path); } else { extension = FilenameUtils.getExtension(path.getFileName().toString()); contentInputStream = getInputStreamFromResource(path); } } catch (IOException e) { throw new StorageException( String.format("Unable to resolve InputStream given URI of %s", uri), e); } ByteSource byteSource = decryptStream(contentInputStream); long size = 0; try { size = byteSource.size(); } catch (IOException e) { LOGGER.debug("Problem determining size of resource; defaulting to {}.", size, e); } String mimeType = determineMimeType(extension, path, byteSource); return new ContentItemImpl( uri.getSchemeSpecificPart(), uri.getFragment(), byteSource, mimeType, filename, size, null); }
Source:
<code>private static void openTrace() { final Exception exception[] = new Exception[1]; exception[0] = null; UIThreadRunnable.syncExec(new VoidResult() { @Override public void run() { try { IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(TRACE_PROJECT_NAME); TmfTraceFolder destinationFolder = TmfProjectRegistry.getProject(project, true).getTracesFolder(); <START> TmfOpenTraceHelper.openTraceFromPath(destinationFolder, pttt.getTrace().getPath(), PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "org.eclipse.linuxtools.lttng2.kernel.tracetype"); <END> } catch (CoreException e) { exception[0] = e; } } }); if (exception[0] != null) { fail(exception[0].getMessage()); } SWTBotUtil.delay(1000); SWTBotUtil.waitForJobs(); }</code><technical_language>Change trace id</technical_language>

Target:
private static void openTrace() { final Exception exception[] = new Exception[1]; exception[0] = null; UIThreadRunnable.syncExec(new VoidResult() { @Override public void run() { try { IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(TRACE_PROJECT_NAME); TmfTraceFolder destinationFolder = TmfProjectRegistry.getProject(project, true).getTracesFolder(); TmfOpenTraceHelper.openTraceFromPath(destinationFolder, pttt.getTrace().getPath(), PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "org.eclipse.linuxtools.tmf.pcap.core.pcaptrace"); } catch (CoreException e) { exception[0] = e; } } }); if (exception[0] != null) { fail(exception[0].getMessage()); } SWTBotUtil.delay(1000); SWTBotUtil.waitForJobs(); }
Source:
<code>public static String[] prefixPaths(final String rawPath) { <START> final String[] parts = rawPath.split(SEPARATOR); <END> final Iterator<Path> itr = Paths.get("", parts).iterator(); final StringBuilder sb = new StringBuilder(SEPARATOR); final String[] paths = new String[parts.length - 1]; for (int i = 0; itr.hasNext(); i++) { final String part = itr.next().toString(); sb.append(part); paths[i] = sb.toString(); if (itr.hasNext()) { sb.append(SEPARATOR); } } return paths; }</code><technical_language>want skip String.split() StringUtils.split() need regular expression parsing. However, changed enough in JDK, this superstition habits part. EDIT: confused: <LINK_0></technical_language>

Target:
public static String[] prefixPaths(final String rawPath) { final String[] parts = StringUtils.split(rawPath, SEPARATOR.charAt(0)); final Iterator<Path> itr = Paths.get("", parts).iterator(); final StringBuilder sb = new StringBuilder(SEPARATOR); final String[] paths = new String[parts.length]; for (int i = 0; itr.hasNext(); i++) { final String part = itr.next().toString(); sb.append(part); paths[i] = sb.toString(); if (itr.hasNext()) { sb.append(SEPARATOR); } } return paths; }
Source:
<code>public void queryNative(Blackhole blackhole) throws Exception { <START> HashMap<String, Object> context = Maps.newHashMap(); <END> final Sequence<Row> resultSequence = QueryPlus.wrap(groupByQuery).run(walker, context); final ArrayList<Row> resultList = Sequences.toList(resultSequence, Lists.<Row>newArrayList()); for (Row row : resultList) { blackhole.consume(row); } }</code><technical_language>remove this local var</technical_language>

Target:
public void queryNative(Blackhole blackhole) throws Exception { final Sequence<Row> resultSequence = QueryPlus.wrap(groupByQuery).run(walker, Maps.newHashMap()); final ArrayList<Row> resultList = Sequences.toList(resultSequence, Lists.<Row>newArrayList()); for (Row row : resultList) { blackhole.consume(row); } }
Source:
<code>private boolean blockUnlessChangeOccurs(String sitemapname, String pageId) { <START> boolean changeOccurred = true; <END> Sitemap sitemap = getSitemap(sitemapname); if (sitemap != null) { if (pageId.equals(sitemap.getName())) { EList<Widget> children = itemUIRegistry.getChildren(sitemap); changeOccurred = waitForChanges(children); } else { Widget pageWidget = itemUIRegistry.getWidget(sitemap, pageId); if (pageWidget instanceof LinkableWidget) { EList<Widget> children = itemUIRegistry.getChildren((LinkableWidget) pageWidget); changeOccurred = waitForChanges(children); } } } return changeOccurred; }</code><technical_language>Is correct claim changeOccurred if is sitemap name</technical_language>

Target:
private boolean blockUnlessChangeOccurs(String sitemapname, String pageId) { boolean timeout = false; Sitemap sitemap = getSitemap(sitemapname); if (sitemap != null) { if (pageId.equals(sitemap.getName())) { EList<Widget> children = itemUIRegistry.getChildren(sitemap); timeout = waitForChanges(children); } else { Widget pageWidget = itemUIRegistry.getWidget(sitemap, pageId); if (pageWidget instanceof LinkableWidget) { EList<Widget> children = itemUIRegistry.getChildren((LinkableWidget) pageWidget); timeout = waitForChanges(children); } } } return timeout; }
Source:
<code>public final void validateDependencies() { getProject() .getConvention() .getPlugin(JavaPluginConvention.class) .getSourceSets() .forEach(ss -> { <START> if (ss.getName().equals(IGNORE_MAIN_CONFIGURATION)) { <END> return; } Optional<Test> maybeTestTask = BaselineTesting.getTestTaskForSourceSet(getProject(), ss); if (!maybeTestTask.isPresent()) { return; } Test task = maybeTestTask.get(); getProject().getLogger().info("Analyzing source set with task {}", ss.getName(), task.getName()); validateSourceSet(ss, task); }); }</code><technical_language>change, <LINK_0></technical_language>

Target:
public final void validateDependencies() { getProbablyTestSourceSets().forEach(ss -> { Optional<Test> maybeTestTask = BaselineTesting.getTestTaskForSourceSet(getProject(), ss); if (!maybeTestTask.isPresent()) { return; } Test task = maybeTestTask.get(); getProject().getLogger().info("Analyzing source set with task {}", ss.getName(), task.getName()); validateSourceSet(ss, task); }); }
Source:
<code>public static Map<String, Object> getMetadata() { <START> return new HashMap<>(getClient().getMetadataState().getMetadata().toMap()); <END> }</code><technical_language>this call Client.getMetadata require a separate method retrieve MetadataState</technical_language>

Target:
public static Map<String, Object> getMetadata() { return getClient().getMetadata(); }
Source:
<code><START> private MethodSpec createConstructor(StorIOContentResolverTypeMeta storIOSQLiteTypeMeta) { <END> final ClassName putResolver = ClassName.get(storIOSQLiteTypeMeta.packageName, PutResolverGenerator.generateName(storIOSQLiteTypeMeta)); final ClassName getResolver = ClassName.get(storIOSQLiteTypeMeta.packageName, GetResolverGenerator.generateName(storIOSQLiteTypeMeta)); final ClassName deleteResolver = ClassName.get(storIOSQLiteTypeMeta.packageName, DeleteResolverGenerator.generateName(storIOSQLiteTypeMeta)); return MethodSpec.constructorBuilder() .addModifiers(PUBLIC) .addStatement("super(new $T(), new $T(), new $T())", putResolver, getResolver, deleteResolver) .build(); }</code><technical_language>Please add nullability annotations</technical_language>

Target:
private MethodSpec createConstructor(StorIOContentResolverTypeMeta storIOSQLiteTypeMeta) { final ClassName putResolver = ClassName.get(storIOSQLiteTypeMeta.packageName, PutResolverGenerator.generateName(storIOSQLiteTypeMeta)); final ClassName getResolver = ClassName.get(storIOSQLiteTypeMeta.packageName, GetResolverGenerator.generateName(storIOSQLiteTypeMeta)); final ClassName deleteResolver = ClassName.get(storIOSQLiteTypeMeta.packageName, DeleteResolverGenerator.generateName(storIOSQLiteTypeMeta)); return MethodSpec.constructorBuilder() .addModifiers(PUBLIC) .addStatement("super(new $T(),\nnew $T(),\nnew $T())", putResolver, getResolver, deleteResolver) .build(); }
Source:
<code>private String startResumableUpload() throws InterruptedException, IOException { InsertObjectSpec.Builder insertObjectSpecBuilder = InsertObjectSpec.newBuilder() .setResource( Object.newBuilder() .setBucket(resourceId.getBucketName()) .setName(resourceId.getObjectName()) .setContentType(contentType) .putAllMetadata(metadata) .build()); if (writeConditions.hasContentGenerationMatch()) { insertObjectSpecBuilder.setIfGenerationMatch( Int64Value.newBuilder().setValue(writeConditions.getContentGenerationMatch())); } if (writeConditions.hasMetaGenerationMatch()) { insertObjectSpecBuilder.setIfMetagenerationMatch( Int64Value.newBuilder().setValue(writeConditions.getMetaGenerationMatch())); } if (requesterPaysProject.isPresent()) { insertObjectSpecBuilder.setUserProject(requesterPaysProject.get()); } StartResumableWriteRequest request = StartResumableWriteRequest.newBuilder() .setInsertObjectSpec(insertObjectSpecBuilder) .build(); SimpleResponseObserver<StartResumableWriteResponse> responseObserver = new SimpleResponseObserver<>(); <START> runWithRetries( <END> () -> { stub.withDeadlineAfter(START_RESUMABLE_WRITE_TIMEOUT.toMillis(), TimeUnit.MILLISECONDS) .startResumableWrite(request, responseObserver); try { responseObserver.done.await(); } catch (InterruptedException e) { e.printStackTrace(); } }, responseObserver); return responseObserver.getResponse().getUploadId(); }</code><technical_language>[ResilientOperation](<LINK_0> instead</technical_language>

Target:
private String startResumableUpload() throws InterruptedException, IOException { InsertObjectSpec.Builder insertObjectSpecBuilder = InsertObjectSpec.newBuilder() .setResource( Object.newBuilder() .setBucket(resourceId.getBucketName()) .setName(resourceId.getObjectName()) .setContentType(contentType) .putAllMetadata(metadata) .build()); if (writeConditions.hasContentGenerationMatch()) { insertObjectSpecBuilder.setIfGenerationMatch( Int64Value.newBuilder().setValue(writeConditions.getContentGenerationMatch())); } if (writeConditions.hasMetaGenerationMatch()) { insertObjectSpecBuilder.setIfMetagenerationMatch( Int64Value.newBuilder().setValue(writeConditions.getMetaGenerationMatch())); } if (requesterPaysProject.isPresent()) { insertObjectSpecBuilder.setUserProject(requesterPaysProject.get()); } StartResumableWriteRequest request = StartResumableWriteRequest.newBuilder() .setInsertObjectSpec(insertObjectSpecBuilder) .build(); SimpleResponseObserver<StartResumableWriteResponse> responseObserver = new SimpleResponseObserver<>(); runWithRetries( () -> { stub.withDeadlineAfter(START_RESUMABLE_WRITE_TIMEOUT.toMillis(), TimeUnit.MILLISECONDS) .startResumableWrite(request, responseObserver); try { responseObserver.done.await(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RuntimeException("Failed to start resumable upload.", e); } }, responseObserver); return responseObserver.getResponse().getUploadId(); }
Source:
<code>public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws CoreException { <START> RefactoringStatus refactoringStatus <END> = RefactoringStatus.create(Resources.checkInSync(fResource)); boolean autoRefresh = Platform.getPreferencesService().getBoolean(ResourcesPlugin.PI_RESOURCES, ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH, false, null); if(autoRefresh) { fResource.refreshLocal(IResource.DEPTH_INFINITE, pm); refactoringStatus = RefactoringStatus.create(Resources.checkInSync(fResource)); } return refactoringStatus; }</code><technical_language>refactoringStatus created returning</technical_language>

Target:
public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws CoreException { RefactoringStatus refactoringStatus = RefactoringStatus.create(Resources.checkInSync(fResource)); if (!refactoringStatus.isOK()) { boolean autoRefresh= Platform.getPreferencesService().getBoolean(ResourcesPlugin.PI_RESOURCES, ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH, false, null); if (autoRefresh) { fResource.refreshLocal(IResource.DEPTH_INFINITE, pm); refactoringStatus= RefactoringStatus.create(Resources.checkInSync(fResource)); } } return refactoringStatus; }
Source:
<code>public void launch(Instance machine, Agent agent) throws ServerException { try { String architecture = detectArchitecture(machine); machine.copy(archivePathProvider.getPath(architecture), terminalLocation); <START> final AgentImpl agentCopy = new AgentImpl(agent); <END> agentCopy.setScript(agent.getScript() + "\n" + terminalRunCommand); super.launch(machine, agentCopy); } catch (ConflictException e) { throw new ServerException("Internal server error occurs on terminal launching."); } }</code><technical_language>Do necessity extend TerminalAgentLauncher avoid copying of code? get rid of getAgentId() method. @tolusha, @svor</technical_language>

Target:
public void launch(Instance machine, Agent agent) throws ServerException { try { String architecture = detectArchitecture(machine); machine.copy(archivePathProvider.getPath(architecture), terminalLocation); super.launch(machine, agent); } catch (ConflictException e) { throw new ServerException("Internal server error occurs on terminal launching."); } }
Source:
<code>private MigrateVDSCommandParameters createMigrateVDSCommandParameters() { String srcVdsHost = getVds().getHostName(); String dstVdsHost = String.format("%1$s:%2$s", getDestinationVds().getHostName(), getDestinationVds().getPort()); return new MigrateVDSCommandParameters(getVdsId(), getVmId(), srcVdsHost, getDestinationVdsId(), dstVdsHost, MigrationMethod.ONLINE, isTunnelMigrationUsed(), getMigrationNetworkIp(), getVds().getVdsGroupCompatibilityVersion(), <START> getMaximumMigrationDowntime(), getAutoConverge(), getMigrateCompressed(), getVds().getConsoleAddress()); <END> }</code><technical_language>is bug feature page attached this commit motivation for this patch clear me. for instance, getVds().getConsoleAddress() getDestinationVds().getConsoleAddress()</technical_language>

Target:
private MigrateVDSCommandParameters createMigrateVDSCommandParameters() { String srcVdsHost = getVds().getHostName(); String dstVdsHost = String.format("%1$s:%2$s", getDestinationVds().getHostName(), getDestinationVds().getPort()); return new MigrateVDSCommandParameters(getVdsId(), getVmId(), srcVdsHost, getDestinationVdsId(), dstVdsHost, MigrationMethod.ONLINE, isTunnelMigrationUsed(), getMigrationNetworkIp(), getVds().getVdsGroupCompatibilityVersion(), getMaximumMigrationDowntime(), getAutoConverge(), getMigrateCompressed(), getDestinationVds().getConsoleAddress()); }
Source:
<code>public static Properties writeUserDataAsProperties( Map<String,String> messagingConfiguration, String applicationName, String scopedInstancePath ) { Properties result = new Properties(); if( applicationName != null ) result.setProperty( APPLICATION_NAME, applicationName ); if( scopedInstancePath != null ) result.setProperty( SCOPED_INSTANCE_PATH, scopedInstancePath ); if( messagingConfiguration != null ) { <START> for (String k : messagingConfiguration.keySet()) { <END> String v = messagingConfiguration.get(k); if (v != null) { result.setProperty(k, v); } } } return result; }</code><technical_language>Map#entrySet instead</technical_language>

Target:
public static Properties writeUserDataAsProperties( Map<String,String> messagingConfiguration, String applicationName, String scopedInstancePath ) { Properties result = new Properties(); if( applicationName != null ) result.setProperty( APPLICATION_NAME, applicationName ); if( scopedInstancePath != null ) result.setProperty( SCOPED_INSTANCE_PATH, scopedInstancePath ); if( messagingConfiguration != null ) { for (Map.Entry<String, String> e : messagingConfiguration.entrySet()) { if (e.getValue() != null) { result.setProperty(e.getKey(), e.getValue()); } } } return result; }
Source:
<code>public void channelActive(ChannelHandlerContext ctx) throws RestServiceException { logger.debug("Channel with remote address active", ctx.channel(), ctx.channel().remoteAddress()); this.ctx = ctx; requestHandler = requestHandlerController.getRequestHandler(); responseHandler = new NettyResponseHandler(ctx, nettyMetrics); if (requestHandler == null || responseHandler == null) { String msg = new StringBuilder( <START> (requestHandler == null ? "RestRequestHandler received was null" : "RestResponseHandler received was null")) <END> .append(" during bootstrap of channel ").append(ctx.channel()) .append(". Channel will be destroyed since initialization has failed").toString(); logger.error(msg); nettyMetrics.channelActiveTasksFailure.inc(); throw new RestServiceException(msg, RestServiceErrorCode.ChannelActiveTasksFailure); } nettyMetrics.channelCreationRate.mark(); }</code><technical_language>typo. null in cases</technical_language>

Target:
public void channelActive(ChannelHandlerContext ctx) throws RestServiceException { logger.trace("Channel active", ctx.channel()); this.ctx = ctx; requestHandler = requestHandlerController.getRequestHandler(); responseHandler = new NettyResponseHandler(ctx, nettyMetrics); if (requestHandler == null) { nettyMetrics.channelActiveTasksError.inc(); throw new RestServiceException("RestRequestHandler received during channel bootstrap was null", RestServiceErrorCode.ChannelActiveTasksFailure); } nettyMetrics.channelCreationRate.mark(); }
Source:
<code>public Configuration getConfiguration(GraphContext context) { return ConfigurationBuilder .begin() .addRule() .perform(new GraphOperation() { @Override public void perform(GraphRewrite event, EvaluationContext context) { TagService tagService = tagServiceHolder.getTagService(); <START> System.out.println("TagService: " + tagService); <END> ReportService reportService = new ReportService(event.getGraphContext()); Path outputDir = Paths.get(reportService.getReportDirectory()); File tagsDataFile = outputDir.resolve("resources/tagsData.js").toFile(); try { FileUtils.forceMkdir(tagsDataFile.getParentFile()); } catch (IOException ex) { LOG.severe("Error creating a directory: " + tagsDataFile.getParentFile().getPath()); return; } try(FileWriter writer = new FileWriter(tagsDataFile)) { tagService.dumpTagsToJavaScript(writer); LOG.info("Exporting tags data to file: " + tagsDataFile.getPath()); } catch (IOException e) { LOG.severe("Error exporting tags data to: " + tagsDataFile.getPath()); return; } } }); }</code><technical_language>System.out.println ... remove please. :)</technical_language>

Target:
public Configuration getConfiguration(GraphContext context) { return ConfigurationBuilder .begin() .addRule() .perform(new GraphOperation() { @Override public void perform(GraphRewrite event, EvaluationContext context) { TagService tagService = tagServiceHolder.getTagService(); ReportService reportService = new ReportService(event.getGraphContext()); Path outputDir = Paths.get(reportService.getReportDirectory()); File tagsDataFile = outputDir.resolve("resources/tagsData.js").toFile(); try { FileUtils.forceMkdir(tagsDataFile.getParentFile()); } catch (IOException ex) { LOG.severe("Error creating a directory: " + tagsDataFile.getParentFile().getPath()); return; } try(FileWriter writer = new FileWriter(tagsDataFile)) { tagService.dumpTagsToJavaScript(writer); LOG.info("Exporting tags data to file: " + tagsDataFile.getPath()); } catch (IOException e) { LOG.severe("Error exporting tags data to: " + tagsDataFile.getPath()); return; } } }); }
Source:
<code>private void setFrameTitle() { <START> String title = Messages.getString("BoardEditor.title"); if (curfile != null) { title = Messages.getString("BoardEditor.title") + curfile; } <END> boolean isChanged = !undoStack.isEmpty(); frame.setTitle(title + (isChanged ? "*" : "")); }</code><technical_language>suggestion String title = Messages.getString("BoardEditor.title"); //$NON-NLS-1$ if (curfile != null) { title += curfile; }</technical_language>

Target:
private void setFrameTitle() { String title = Messages.getString("BoardEditor.title"); if (curfile != null) { title = Messages.getString("BoardEditor.title0", curfile); } frame.setTitle(title + (hasChanges ? "*" : "")); }
Source:
<code>public PRowImpl(ImmutableBytesWritable key, long ts, Integer bucketNum) { this.ts = ts; if (bucketNum != null) { this.key = SaltingUtil.getSaltedKey(key, bucketNum); } else { <START> this.key = key.copyBytes(); <END> } this.setValues = new Put(this.key); this.unsetValues = new Delete(this.key); }</code><technical_language>Minor, create a util function checks if key.getOffset() == 0 && key.getLength() == key.get().length byte[] copying? put in ByteUtil</technical_language>

Target:
public PRowImpl(ImmutableBytesWritable key, long ts, Integer bucketNum) { this.ts = ts; if (bucketNum != null) { this.key = SaltingUtil.getSaltedKey(key, bucketNum); } else { this.key = ByteUtil.copyKeyBytesIfNecessary(key); } this.setValues = new Put(this.key); this.unsetValues = new Delete(this.key); }
Source:
<code>public boolean performNextOperation(int completedChildCount) { if (getParameters().getNextPhase() == ImportRepoImageParameters.Phase.DOWNLOAD) { Backend.getInstance().runInternalAction(VdcActionType.DownloadImage, createDownloadImageParameters(), ExecutionHandler.createDefaultContextForTasks(getContext())); getParameters().setNextPhase(ImportRepoImageParameters.Phase.END); <START> persistCommand(getParameters().getParentCommand(), true); <END> return true; } return false; }</code><technical_language>please move 2 lines beginning of if clause</technical_language>

Target:
public boolean performNextOperation(int completedChildCount) { if (getParameters().getNextPhase() == ImportRepoImageParameters.Phase.DOWNLOAD) { getParameters().setNextPhase(ImportRepoImageParameters.Phase.END); persistCommand(getParameters().getParentCommand(), true); Backend.getInstance().runInternalAction(VdcActionType.DownloadImage, createDownloadImageParameters(), ExecutionHandler.createDefaultContextForTasks(getContext())); return true; } return false; }
Source:
<code>public JSONObject validateVariant(String id) { String url = null; try { url = SERVICE_URL + URLEncoder.encode(id, "UTF-8"); } catch (UnsupportedEncodingException e) { <START> e.printStackTrace(); <END> } HttpGet method = new HttpGet(url); method.setHeader(HttpHeaders.ACCEPT, ContentType.APPLICATION_JSON.getMimeType()); try (CloseableHttpResponse httpResponse = this.client.execute(method)) { String response = IOUtils.toString(httpResponse.getEntity().getContent(), Consts.UTF_8); JSONObject responseJSON = (JSONObject) JSONSerializer.toJSON(response); return responseJSON; } catch (IOException | JSONException ex) { this.logger.warn("Failed to validate HGVS variant symbol id: {}", ex.getMessage()); } return new JSONObject(true); }</code><technical_language>I a better/standard XWiki of handling exceptions</technical_language>

Target:
public JSONObject validateVariant(String id) { String safeID; try { safeID = URLEncoder.encode(id, Consts.UTF_8.name()); } catch (UnsupportedEncodingException e) { safeID = id.replaceAll("\\s", ""); this.logger.warn("Could not find the encoding: {}", Consts.UTF_8.name()); } HttpGet method = new HttpGet(SERVICE_URL + safeID); method.setHeader(HttpHeaders.ACCEPT, ContentType.APPLICATION_JSON.getMimeType()); try (CloseableHttpResponse httpResponse = this.client.execute(method)) { String response = IOUtils.toString(httpResponse.getEntity().getContent(), Consts.UTF_8); JSONObject responseJSON = (JSONObject) JSONSerializer.toJSON(response); return responseJSON; } catch (IOException | JSONException ex) { this.logger.warn("Failed to validate HGVS variant symbol id: {}", ex.getMessage()); } return new JSONObject(true); }
Source:
<code><START> private GlusterVolumeTaskStatus getAggregateStatus(Map<String, Object> aggregateStatus) { <END> GlusterVolumeTaskStatus status = new GlusterVolumeTaskStatus(); status.setFilesScanned(Integer.parseInt((String)aggregateStatus.get(FILES_SCANNED))); status.setFilesMoved(Integer.parseInt((String)aggregateStatus.get(FILES_MOVED))); status.setFilesSkipped(Integer.parseInt((String)aggregateStatus.get(FILES_SKIPPED))); status.setFilesFailed(Integer.parseInt((String)aggregateStatus.get(FILES_FAILED))); status.setTotalSizeMoved(Long.parseLong((String)aggregateStatus.get(TOTAL_SIZE_MOVED))); status.setStatus(JobExecutionStatus.valueOf((String)aggregateStatus.get(STATUS))); return status; }</code><technical_language>getAggregateStatus getStatusForNode similar. Consider reusing</technical_language>

Target:
private GlusterVolumeTaskStatus getAggregateStatus(Map<String, Object> aggregateStatus) { GlusterVolumeTaskStatus status = new GlusterVolumeTaskStatus(); status.setFilesScanned(Integer.parseInt((String)aggregateStatus.get(FILES_SCANNED))); status.setFilesMoved(Integer.parseInt((String)aggregateStatus.get(FILES_MOVED))); status.setFilesFailed(Integer.parseInt((String)aggregateStatus.get(FILES_FAILED))); status.setTotalSizeMoved(Long.parseLong((String)aggregateStatus.get(TOTAL_SIZE_MOVED))); status.setStatus(JobExecutionStatus.valueOf((String)aggregateStatus.get(STATUS))); return status; }
Source:
<code>public void testFindDockerConnection() { MockCDKDockerUtility util = new MockCDKDockerUtility("name1"); <START> try { <END> ADBInfo adb = createADB(); ADBInfo wrongHost = createADB("10.1.2.3"); ADBInfo wrongPort = createADB("10.1.2.2", "500"); assertFalse(util.dockerConnectionExists(adb)); IDockerConnection con = util.createDockerConnection(null, adb); assertTrue(util.dockerConnectionExists(adb)); assertFalse(util.dockerConnectionExists(wrongHost)); assertFalse(util.dockerConnectionExists(wrongPort)); DockerConnectionManager mgr = org.eclipse.linuxtools.docker.core.DockerConnectionManager.getInstance(); mgr.removeConnection(con); assertFalse(util.dockerConnectionExists(adb)); } catch(URISyntaxException urise) { fail(urise.getMessage()); } catch(DockerException de) { fail(de.getMessage()); } }</code><technical_language>try block unnecessary, testFindDockerConnection throw Exception</technical_language>

Target:
public void testFindDockerConnection() throws Exception { DockerConnectionManager mgr = org.eclipse.linuxtools.docker.core.DockerConnectionManager.getInstance(); IDockerConnection con = null; try { MockCDKDockerUtility util = new MockCDKDockerUtility("name1"); ADBInfo adb = createADB(); ADBInfo wrongHost = createADB("10.1.2.3"); ADBInfo wrongPort = createADB("10.1.2.2", "500"); assertTrue(mgr.getConnections().length == 0); assertFalse(util.dockerConnectionExists(adb)); con = util.createDockerConnection(null, adb); assertTrue(util.dockerConnectionExists(adb)); assertFalse(util.dockerConnectionExists(wrongHost)); assertFalse(util.dockerConnectionExists(wrongPort)); mgr.removeConnection(con); assertFalse(util.dockerConnectionExists(adb)); assertTrue(mgr.getConnections().length == 0); } finally { if( con != null ) { mgr.removeConnection(con); } } }
Source:
<code>public void setMemoryPool(MemoryPool pool) { <START> synchronized (queryMemoryContext) { <END> synchronized (this) { requireNonNull(pool, "pool is null"); if (memoryPool == pool) { return; } MemoryPool originalPool = memoryPool; long originalReserved = queryMemoryContext.getUserMemory(); long originalRevocableReserved = queryMemoryContext.getRevocableMemory(); memoryPool = pool; ListenableFuture<?> future = pool.reserve(queryId, originalReserved); originalPool.free(queryId, originalReserved); pool.reserveRevocable(queryId, originalRevocableReserved); originalPool.freeRevocable(queryId, originalRevocableReserved); future.addListener(() -> { taskContexts.values().forEach(TaskContext::moreMemoryAvailable); }, directExecutor()); } } }</code><technical_language>is monitor for queryMemoryContexttaken in codebase? I find it. 1. MemoryTrackingContext is synchronized internally. is marked @ThreadSafe I assume fact is implication of building blocks (just guessing - I do code here). is explicit synchronization this. 2. I do synchronized(some instance of MemoryTrackingContext) anywhere</technical_language>

Target:
public synchronized void setMemoryPool(MemoryPool pool) { requireNonNull(pool, "pool is null"); if (memoryPool == pool) { return; } MemoryPool originalPool = memoryPool; long originalReserved = originalPool.getQueryUserMemoryReservation(queryId); long originalRevocableReserved = originalPool.getQueryRevocableMemoryReservation(queryId); memoryPool = pool; ListenableFuture<?> future = pool.reserve(queryId, originalReserved); originalPool.free(queryId, originalReserved); pool.reserveRevocable(queryId, originalRevocableReserved); originalPool.freeRevocable(queryId, originalRevocableReserved); future.addListener(() -> { taskContexts.values().forEach(TaskContext::moreMemoryAvailable); }, directExecutor()); }
Source:
<code>public static Group deserialize(JsonArray jsonArray, JsonDeserializationContext context) { Group.Builder builder = new Group.Builder(); for (JsonElement item : jsonArray) { Component component = context.deserialize(item, ComponentsTypeProvider .getClassOfComponentType(getTypeFromJsonElement(item))); <START> if (!(component instanceof Undefined)) { <END> builder.addItem(component); } } return builder.create(); }</code><technical_language>is more efficient compare instance of deserializedItem Undefined.INSTANCE instanceof operator</technical_language>

Target:
public static Group deserialize(JsonArray jsonArray, JsonDeserializationContext context) { Group.Builder builder = new Group.Builder(); for (JsonElement item : jsonArray) { Component component = deserializeComponent(item, context); if (component != null) { builder.addItem(component); } } return builder.create(); }
Source:
<code>private void setColorForBatDuration(IFactionPlayer player) { float batPercentage = ((IVampirePlayer) player).getActionHandler().getPercentageForAction(VampireActions.bat); if (batPercentage < 0.1F && batPercentage > 0.0F) { screenBottomColor = 0xcc7067f9; <START> screenBottomPercentage = (int) (0.1F - batPercentage * 10); <END> fullScreen = false; } else { screenBottomColor = 0; screenBottomPercentage = 0; } }</code><technical_language>I assume screenBottomPercentage 0 100. batPercentage a range 0.1 0). I propose changing this (int) (100.0F*10*(0.1F - batPercentage))</technical_language>

Target:
private void setColorForBatDuration(IFactionPlayer player) { float batPercentage = ((IVampirePlayer) player).getActionHandler().getPercentageForAction(VampireActions.bat); if (batPercentage < 0.2F && batPercentage > 0.0F) { screenBottomColor = 0xcc7067f9; screenBottomPercentage = (int) ((0.2F - batPercentage) * 1000); fullScreen = false; } else { screenBottomColor = 0; screenBottomPercentage = 0; } }
Source:
<code><START> public void testCaseWhenRound() throws Exception { <END> ResultSet res = executeString( "select * from (select n_nationkey as key, " + "case when n_nationkey > 6 then round((n_nationkey * 100 / 2.123) / (n_regionkey * 50 / 2.123), 2) else 100.0 end as val " + "from nation where n_regionkey > 0 and n_nationkey > 0) a " + "order by a.key" ); String expected = "key,val\n" + "-------------------------------\n" + "1,100.0\n" + "2,100.0\n" + "3,100.0\n" + "4,100.0\n" + "6,100.0\n" + "7,4.67\n" + "8,8.0\n" + "9,9.0\n" + "10,5.0\n" + "11,5.5\n" + "12,12.0\n" + "13,6.5\n" + "17,34.0\n" + "18,18.0\n" + "19,12.67\n" + "20,10.0\n" + "21,21.0\n" + "22,14.67\n" + "23,15.33\n" + "24,48.0\n"; assertEquals(expected, resultSetToString(res)); res.close(); }</code><technical_language>mind improving this test executeFile() instead of executeString()</technical_language>

Target:
public void testCaseWhenRound() throws Exception { ResultSet res = executeQuery(); assertResultSet(res); cleanupQuery(res); }
Source:
<code>public models.internal.reports.Report toInternal() { final Collection<RecipientGroup> groups = recipientGroups .stream() .map(ReportRecipientGroup::toInternal) .collect(Collectors.collectingAndThen(Collectors.toSet(), ImmutableSet::copyOf)); return new DefaultReport.Builder() .setId(uuid) .setName(name) <START> .setRecipientGroups(ImmutableSet.copyOf(groups)) <END> .setSchedule(schedule.toInternal()) .setReportSource(reportSource.toInternal()) .build(); }</code><technical_language>copied immutableset, copy again? -- account for empty case in stream return immutableset.of() avoid double copy here</technical_language>

Target:
public models.internal.reports.Report toInternal() { final ImmutableSetMultimap<models.internal.reports.ReportFormat, models.internal.reports.Recipient> internalRecipients = recipientAssocs .stream() .collect(ImmutableSetMultimap.toImmutableSetMultimap(this::assocToFormat, this::assocToRecipient)); return new DefaultReport.Builder() .setId(uuid) .setName(name) .setRecipients(internalRecipients) .setSchedule(schedule.toInternal()) .setReportSource(reportSource.toInternal()) .build(); }
Source:
<code>public NetworkStats getNetworkStatsDetail() { mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); try { return <START> mStatsFactory.readNetworkStatsDetail(UID_ALL, null, TAG_ALL); <END> } catch (IOException e) { throw new IllegalStateException(e); } }</code><technical_language>nit: replaced readNetworkStatsDetail()</technical_language>

Target:
public NetworkStats getNetworkStatsDetail() { mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); try { return mStatsFactory.readNetworkStatsDetail(); } catch (IOException e) { throw new IllegalStateException(e); } }
Source:
<code>public void cleanUp(MMenu menuModel) { <START> ContributionRecord record = getContributionRecord(menuModel); <END> if (record != null) { if (record.menuModel == menuModel) { record.dispose(); for (MMenuElement copy : record.generatedElements) { cleanUpCopy(record, copy); } for (MMenuElement copy : record.sharedElements) { cleanUpCopy(record, copy); } record.generatedElements.clear(); record.sharedElements.clear(); removeContributionRecord(menuModel); } } }</code><technical_language>This a list of contribution records one. multiple contribution records applied menu model elements. I getContributionRecord(menuModel) returns CR created a model element</technical_language>

Target:
public void cleanUp(MMenu menuModel) { Collection<ContributionRecord> vals = getList(menuModel); List<ContributionRecord> disposedRecords = new ArrayList<ContributionRecord>(); for (ContributionRecord record : vals .toArray(new ContributionRecord[vals.size()])) { if (record.menuModel == menuModel) { record.dispose(); for (MMenuElement copy : record.generatedElements) { cleanUpCopy(record, copy); } for (MMenuElement copy : record.sharedElements) { cleanUpCopy(record, copy); } record.generatedElements.clear(); record.sharedElements.clear(); disposedRecords.add(record); } } Iterator<ContributionRecord> iterator = vals.iterator(); for (; iterator.hasNext();) { ContributionRecord record = iterator.next(); if (disposedRecords.contains(record)) { iterator.remove(); } } }
Source:
<code>public void init() { if (isConfigured()) { String[] parts = endpoint.split(":"); if (parts.length < 1 || parts.length > 2) { throw new IllegalArgumentException("altus.audit.endpoint must be in host or host:port format."); } host = parts[0]; port = parts.length == 2 ? Integer.parseInt(parts[1]) : DEFAULT_AUDIT_PORT; <START> } else { <END> if (structuredEventEnablementConfig.isAuditServiceEnabled()) { throw new IllegalStateException("Audit service is enabled, but altus.audit.endpoint is not configured"); } } }</code><technical_language>else if</technical_language>

Target:
public void init() { if (isConfigured()) { String[] parts = endpoint.split(":"); if (parts.length < 1 || parts.length > 2) { throw new IllegalArgumentException("altus.audit.endpoint must be in host or host:port format."); } host = parts[0]; port = parts.length == 2 ? Integer.parseInt(parts[1]) : DEFAULT_AUDIT_PORT; } else if (structuredEventEnablementConfig.isAuditServiceEnabled()) { throw new IllegalStateException("Audit service is enabled, but altus.audit.endpoint is not configured"); } }
Source:
<code>public boolean isRubricRadioChecked(int qnIndex, int respIndex, int row, int col) { WebElement radio = browser.driver.findElement(By.id(Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_CHOICE + "-" + qnIndex + "-" + respIndex + "-" + row + "-" + col)); String isChecked = radio.getAttribute("checked"); <START> return isChecked != null && "true".equals(isChecked); <END> }</code><technical_language>null check is redundant do literal.equals(variable)</technical_language>

Target:
public boolean isRubricRadioChecked(int qnIndex, int respIndex, int row, int col) { WebElement radio = browser.driver.findElement(By.id(Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_CHOICE + "-" + qnIndex + "-" + respIndex + "-" + row + "-" + col)); String isChecked = radio.getAttribute("checked"); return "true".equals(isChecked); }
Source:
<code>public Object[] getChildren(Object parent) { if (parent instanceof IDebugTarget) { IJavaDebugTarget target = ((IDebugTarget)parent).getAdapter(IJavaDebugTarget.class); if (target != null) { try { return ((IJavaDebugTarget)parent).getThreads(); } catch (DebugException e) { JDIDebugUIPlugin.log(e); } } } if (parent instanceof ILaunchManager) { List<IJavaDebugTarget> children= new ArrayList<>(); ILaunch[] launches= ((ILaunchManager) parent).getLaunches(); IDebugTarget[] targets; IJavaDebugTarget target; for (ILaunch <START> launche : <END> launches) { targets= launche.getDebugTargets(); for (IDebugTarget target2 : targets) { target= target2.getAdapter(IJavaDebugTarget.class); if (target != null && !target.isDisconnected() && !target.isTerminated()) { children.add(target); } } } return children.toArray(); } return new Object[0]; }</code><technical_language>rename launch</technical_language>

Target:
public Object[] getChildren(Object parent) { if (parent instanceof IDebugTarget) { IJavaDebugTarget target = ((IDebugTarget)parent).getAdapter(IJavaDebugTarget.class); if (target != null) { try { return ((IJavaDebugTarget)parent).getThreads(); } catch (DebugException e) { JDIDebugUIPlugin.log(e); } } } if (parent instanceof ILaunchManager) { List<IJavaDebugTarget> children= new ArrayList<>(); ILaunch[] launches= ((ILaunchManager) parent).getLaunches(); IDebugTarget[] targets; IJavaDebugTarget target; for (ILaunch launch : launches) { targets= launch.getDebugTargets(); for (IDebugTarget debugTarget : targets) { target= debugTarget.getAdapter(IJavaDebugTarget.class); if (target != null && !target.isDisconnected() && !target.isTerminated()) { children.add(target); } } } return children.toArray(); } return new Object[0]; }
Source:
<code>void reset(boolean isShutdown) { logger.info("Resetting CallbackHandler: {}. Is resetting for shutdown: {}.", this.toString(), isShutdown); try { _ready = false; synchronized (this) { if (_batchCallbackProcessor != null) { if (isShutdown) { _batchCallbackProcessor.shutdown(); _batchCallbackProcessor = null; if (_periodicRefreshExecutor != null) { _periodicRefreshExecutor.shutdownNow(); } } else { _batchCallbackProcessor.resetEventQueue(); if (_periodicRefreshExecutor != null) { _periodicRefreshExecutor.shutdownNow(); initRefreshTask(); } } <START> } <END> } NotificationContext changeContext = new NotificationContext(_manager); changeContext.setType(NotificationContext.Type.FINALIZE); changeContext.setChangeType(_changeType); invoke(changeContext); } catch (Exception e) { String msg = "Exception while resetting the listener:" + _listener; ZKExceptionHandler.getInstance().handle(msg, e); } }</code><technical_language>making sure: this line automatically cancels scheduled runnable in _scheduledRefreshFuture right? If refresh period is right this line next line, okay</technical_language>

Target:
void reset(boolean isShutdown) { logger.info("Resetting CallbackHandler: {}. Is resetting for shutdown: {}.", this.toString(), isShutdown); try { shutDownTriggerTask(); _ready = false; synchronized (this) { if (_batchCallbackProcessor != null) { if (isShutdown) { _batchCallbackProcessor.shutdown(); _batchCallbackProcessor = null; } else { _batchCallbackProcessor.resetEventQueue(); } } } NotificationContext changeContext = new NotificationContext(_manager); changeContext.setType(NotificationContext.Type.FINALIZE); changeContext.setChangeType(_changeType); invoke(changeContext); } catch (Exception e) { String msg = "Exception while resetting the listener:" + _listener; ZKExceptionHandler.getInstance().handle(msg, e); } }
Source:
<code><START> static void send(List<Event> events) { <END> Map<String, ArrayList<Event>> eventsByStream = new HashMap<>(); for (Event event : events) { String stream = event.getStream(); if (!eventsByStream.containsKey(stream) || eventsByStream.get(stream) == null) { eventsByStream.put(stream, new ArrayList<>()); } eventsByStream.get(stream).add(event); } for (String stream : eventsByStream.keySet()) { postEvents(getStreamConfig(stream), eventsByStream.get(stream)); } }</code><technical_language>checking if user disabled Usage Reports in Preferences. sending kind of data if "send usage reports" is disabled</technical_language>

Target:
static void send(List<Event> events) { Map<String, ArrayList<Event>> eventsByStream = new HashMap<>(); for (Event event : events) { String stream = event.getStream(); if (!eventsByStream.containsKey(stream) || eventsByStream.get(stream) == null) { eventsByStream.put(stream, new ArrayList<>()); } eventsByStream.get(stream).add(event); } for (String stream : eventsByStream.keySet()) { if (isEventLoggingEnabled()) { postEvents(getStreamConfig(stream), eventsByStream.get(stream)); } } }