auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void beforeDocumentSaving(@NotNull final Document document) { if (!document.isWritable()) { return; } final Project[] projects = ProjectManager.getInstance().getOpenProjects(); if (projects.length == 0) { return; } final VirtualFile file = FileDocumentManager.getInstance().getFile(document); if (file == null || file.getFileType() != GoFileType.INSTANCE) { return; } Project project = null; for (Project possibleProject : projects) { if (ProjectRootManager.getInstance(possibleProject).getFileIndex().getSourceRootForFile(file) != null || ProjectRootManager.getInstance(possibleProject).getFileIndex().getContentRootForFile(file) != null) { project = possibleProject; break; } } if (project == null) { return; } GoProjectSettings.GoProjectSettingsBean settings = GoProjectSettings.getInstance(project).getState(); final Project p = project; if (settings.goimportsOnSave) { ApplicationManager.getApplication().invokeLater(new Runnable() { @Override public void run() { <START> if (p.isDisposed()) { <END> return; } ProcessFileWithGoImports(p, file); } }); } else if (settings.goFmtOnSave) { ApplicationManager.getApplication().invokeLater(new Runnable() { @Override public void run() { if (p.isDisposed()) { return; } ProcessFileWithGoFmt(p, file); } }); } }</code><technical_language>Please invert this if statement</technical_language>

Target:
public void beforeDocumentSaving(@NotNull final Document document) { if (!document.isWritable()) { return; } final VirtualFile file = FileDocumentManager.getInstance().getFile(document); if (file == null || file.getFileType() != GoFileType.INSTANCE) { return; } Project project = ProjectUtil.guessProjectForContentFile(file, GoFileType.INSTANCE); if (project == null) { return; } final PsiFile psiFile = PsiDocumentManager.getInstance(project).getPsiFile(document); if (psiFile == null) { return; } GoApplicationSettings.GoApplicationSettingsBean settings = GoApplicationSettings.getInstance().getState(); final Project finalProject = project; if (settings.goimportsOnSave) { ApplicationManager.getApplication().invokeLater(new Runnable() { @Override public void run() { if (finalProject.isDisposed()) { return; } try { new GoImportsFileAction().doSomething(psiFile, finalProject, file, ""); } catch (ExecutionException ignored) { } } }); } else if (settings.goFmtOnSave) { ApplicationManager.getApplication().invokeLater(new Runnable() { @Override public void run() { if (finalProject.isDisposed()) { return; } try { new GoFmtFileAction().doSomething(psiFile, finalProject, file, ""); } catch (ExecutionException ignored) { } } }); } }
Source:
<code>public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) { if (operation instanceof GetServerInfoOperation) { if (operation.hashCode() == mWaitingForOpId) { onGetServerInfoFinish(result); } } else if (operation instanceof OAuth2GetAccessToken) { onGetOAuthAccessTokenFinish(result); } else if (operation instanceof GetRemoteUserNameOperation) { onGetUserNameFinish(result); } if (result.isSuccess() && mAction == ACTION_UPDATE_EXPIRED_TOKEN) { <START> setResult(FileActivity.RESULT_OK); <END> } }</code><technical_language>Activity.RESULT_OK? need add a dependency AuthenticatorActivity FileActivity</technical_language>

Target:
public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) { if (operation instanceof GetServerInfoOperation) { if (operation.hashCode() == mWaitingForOpId) { onGetServerInfoFinish(result); } } else if (operation instanceof OAuth2GetAccessToken) { onGetOAuthAccessTokenFinish(result); } else if (operation instanceof GetRemoteUserNameOperation) { onGetUserNameFinish(result); } if (result.isSuccess() && mAction == ACTION_UPDATE_EXPIRED_TOKEN) { setResult(Activity.RESULT_OK); } }
Source:
<code>private void loadData() { final ISegmentStoreProvider cga = getCga(); UIThreadRunnable.syncExec(() -> { fTableViewer.setData(cga); fDensityViewer.setSegmentProvider(cga); fDensityViewer.updateWithRange(TmfTimeRange.ETERNITY); fDensityViewer.refresh(); <START> fTableViewer.refresh(); <END> }); if (cga != null) { try { assertTrue(fLatch.await(20, TimeUnit.SECONDS)); } catch (InterruptedException e) { fail(e.getMessage()); } } setCga(null); }</code><technical_language>this is failed</technical_language>

Target:
private void loadData() { final ISegmentStoreProvider cga = getCga(); UIThreadRunnable.syncExec(() -> { fTableViewer.setData(cga); fDensityViewer.setSegmentProvider(cga); fDensityViewer.updateWithRange(TmfTimeRange.ETERNITY); fDensityViewer.refresh(); fTableViewer.refresh(); }); if (cga != null) { try { assertTrue(fLatch.await(20, TimeUnit.SECONDS)); } catch (InterruptedException e) { fail(e.getMessage()); } } }
Source:
<code>public void shouldThrowIfRightGetLeft() { <START> assertThat(Right(1).getLeft()); <END> }</code><technical_language>drop assertThat part, Right(1).getLeft();</technical_language>

Target:
public void shouldThrowIfRightGetLeft() { Right(1).getLeft(); }
Source:
<code>protected TaskLauncherInitializer getDefaultTaskLauncherInitializer(InternalJob job) { TaskLauncherInitializer tli = new TaskLauncherInitializer(); tli.setTaskId(getId()); tli.setJobOwner(job.getJobInfo().getJobOwner()); tli.setPreScript(getPreScript()); tli.setPostScript(getPostScript()); tli.setControlFlowScript(getFlowScript()); tli.setTaskInputFiles(getInputFilesList()); tli.setTaskOutputFiles(getOutputFilesList()); tli.setNamingService(job.getJobDataSpaceApplication().getNamingServiceStub()); tli.setIterationIndex(getIterationIndex()); tli.setReplicationIndex(getReplicationIndex()); HashMap<String, String> gInfo = new HashMap<>(); gInfo.putAll(job.getGenericInformation()); <START> gInfo.putAll(getGenericInformation()); <END> tli.setGenericInformation(gInfo); tli.setForkEnvironment(getForkEnvironment()); if (isWallTimeSet()) { tli.setWalltime(wallTime); } tli.setPreciousLogs(isPreciousLogs()); tli.setVariables(job.getVariables()); tli.setPingPeriod(PASchedulerProperties.SCHEDULER_NODE_PING_FREQUENCY.getValueAsInt()); tli.setPingAttempts(PASchedulerProperties.SCHEDULER_NODE_PING_ATTEMPTS.getValueAsInt()); return tli; }</code><technical_language>a task overwrites generic information of a job. In order obvious put a private method named a description</technical_language>

Target:
protected TaskLauncherInitializer getDefaultTaskLauncherInitializer(InternalJob job) { TaskLauncherInitializer tli = new TaskLauncherInitializer(); tli.setTaskId(getId()); tli.setJobOwner(job.getJobInfo().getJobOwner()); tli.setPreScript(getPreScript()); tli.setPostScript(getPostScript()); tli.setControlFlowScript(getFlowScript()); tli.setTaskInputFiles(getInputFilesList()); tli.setTaskOutputFiles(getOutputFilesList()); tli.setNamingService(job.getJobDataSpaceApplication().getNamingServiceStub()); tli.setIterationIndex(getIterationIndex()); tli.setReplicationIndex(getReplicationIndex()); Map<String, String> gInfo = getGenericInformationOverridden(job); tli.setGenericInformation(gInfo); tli.setForkEnvironment(getForkEnvironment()); if (isWallTimeSet()) { tli.setWalltime(wallTime); } tli.setPreciousLogs(isPreciousLogs()); tli.setVariables(job.getVariables()); tli.setPingPeriod(PASchedulerProperties.SCHEDULER_NODE_PING_FREQUENCY.getValueAsInt()); tli.setPingAttempts(PASchedulerProperties.SCHEDULER_NODE_PING_ATTEMPTS.getValueAsInt()); return tli; }
Source:
<code>public void shouldReloadSchedulableMaterialsOnConfigRepoChange() { Set<MaterialConfig> schedulableMaterialConfigs = new HashSet<>(Arrays.asList(svnMaterial.config())); when(goConfigService.getSchedulableSCMMaterials()).thenReturn(schedulableMaterialConfigs); when(materialConfigConverter.toMaterials(schedulableMaterialConfigs)).thenReturn(new HashSet<>(Arrays.asList(svnMaterial))); Set<Material> materials = source.materialsForUpdate(); assertThat(materials.size(), is(1)); <START> assertTrue(materials.contains(svnMaterial)); <END> schedulableMaterialConfigs = new HashSet<>(Arrays.asList(svnMaterial.config(), gitMaterial.config())); when(goConfigService.getSchedulableSCMMaterials()).thenReturn(schedulableMaterialConfigs); when(materialConfigConverter.toMaterials(schedulableMaterialConfigs)).thenReturn(new HashSet<>(Arrays.asList(svnMaterial, gitMaterial))); when(serverHealthService.getAllLogs()).thenReturn(new ServerHealthStates()); source.onEntityConfigChange(mock(ConfigRepoConfig.class)); materials = source.materialsForUpdate(); assertThat(materials.size(), is(2)); assertTrue(materials.contains(svnMaterial)); assertTrue(materials.contains(gitMaterial)); }</code><technical_language>This required. tested in another test. mocking this, necessary check if schedulable materials contained before. <LINK_0> ensures another shedulable material present</technical_language>

Target:
public void shouldReloadSchedulableMaterialsOnConfigRepoChange() { Set<MaterialConfig> schedulableMaterialConfigs = new HashSet<>(Arrays.asList(svnMaterial.config(), gitMaterial.config())); when(goConfigService.getSchedulableSCMMaterials()).thenReturn(schedulableMaterialConfigs); when(materialConfigConverter.toMaterials(schedulableMaterialConfigs)).thenReturn(new HashSet<>(Arrays.asList(svnMaterial, gitMaterial))); when(serverHealthService.getAllLogs()).thenReturn(new ServerHealthStates()); source.onEntityConfigChange(mock(ConfigRepoConfig.class)); Set<Material> materials = source.materialsForUpdate(); assertThat(materials.size(), is(2)); assertTrue(materials.contains(svnMaterial)); assertTrue(materials.contains(gitMaterial)); }
Source:
<code>public CTFCallsite getCallsite(String eventName, long ip) { final LinkedList<CTFCallsite> candidates = callsitesByName.get(eventName); final CTFCallsite dummyCs = new CTFCallsite(null, null, ip, null, -1); final int pos = Collections.binarySearch(candidates, dummyCs) + 1; if (pos >= candidates.size()) { return null; } if (pos < 0) { <START> if (candidates.size() > -pos) { <END> return candidates.get(-pos); } return candidates.getFirst(); } return candidates.get(pos); }</code><technical_language>binarySearch() return pos == .size(), "this element last". In this case pick element (size() - 1), one, .getFirst(). Is this intended</technical_language>

Target:
public CTFCallsite getCallsite(String eventName, long ip) { final TreeSet<CTFCallsite> candidates = callsitesByName.get(eventName); final CTFCallsite dummyCs = new CTFCallsite(null, null, ip, null, -1); final CTFCallsite callsite = candidates.ceiling(dummyCs); if(callsite == null){ return candidates.floor(dummyCs); } return callsite; }
Source:
<code>public boolean shouldRetryRequest(HttpCommand command, IOException error) { <START> return isSafeToRetryOnException(command) && ifReplayableBackoffAndReturnTrue(command); <END> }</code><technical_language>isIdempotent(command) instead of isSafeToRetryOnException(command)</technical_language>

Target:
public boolean shouldRetryRequest(HttpCommand command, IOException error) { return ifReplayableBackoffAndReturnTrue(command); }
Source:
<code>public void testFloatUDF() { HiveSimpleUDF udf = init(FloatUDF.class, new DataType[]{ DataTypes.FLOAT()}); <START> assertEquals((float) udf.eval(3.0f), 3.0f, 1.0); <END> }</code><technical_language>allow a 1.0 delta here? I 3.0f expected udf.eval(3.0f) actual value</technical_language>

Target:
public void testFloatUDF() { HiveSimpleUDF udf = init(FloatUDF.class, new DataType[]{ DataTypes.FLOAT()}); assertEquals(3.0f, (float) udf.eval(3.0f), 0); }
Source:
<code>private Class<?> resolveDomainType(Class<?> repositoryInterface) { <START> Assert.notNull(repositoryInterface, "RepositoryInterface must not be null!"); <END> Class<?>[] arguments = resolveTypeArguments(repositoryInterface, Repository.class); return arguments == null ? null : arguments[0]; }</code><technical_language>"Repository interface "</technical_language>

Target:
private Class<?> resolveDomainType(Class<?> repositoryInterface) { Class<?>[] arguments = resolveTypeArguments(repositoryInterface, Repository.class); if (arguments == null || arguments[0] == null) { throw new IllegalArgumentException(String.format("Could not resolve domain type of %s!", repositoryInterface)); } return arguments[0]; }
Source:
<code>public static NotificationListenerManager get() { if (INSTANCE == null) { <START> INSTANCE = new NotificationListenerManager(); <END> } return INSTANCE; }</code><technical_language>If want lazy-load manager instance, [lazy holder idiom](<LINK_0> I code is a minor race condition</technical_language>

Target:
public static NotificationListenerManager get() { return INSTANCE; }
Source:
<code>protected void writeEntries() { if (entries.get().isEmpty()) { return; } StreamManager streamManager = getStreamManager(); for (LogEntry entry : entries.get()) { <START> Record record = recordOf(entry); if (entry != null) { streamManager.append(STREAM_NAME, record); } <END> } }</code><technical_language>recordOf call if</technical_language>

Target:
protected void writeEntries() { if (entries.get().isEmpty()) { return; } StreamManager streamManager = getStreamManager(); for (LogEntry entry : entries.get()) { if (entry != null) { Record record = recordOf(entry); streamManager.append(STREAM_NAME, record); } } }
Source:
<code>private Uri writeToFile(Bitmap bitmap) throws IOException { File temp = tempFile(); long tempFileSize = -1; int quality; do { quality = 100; do { trace(this, "writeToFile() :: Attempting to write bitmap=%s (%sx%s) to file=%s at quality=%s; size of last write=%s...", bitmap, bitmap.getWidth(), bitmap.getHeight(), temp, quality, tempFileSize); writeToFile(temp, bitmap, quality); <START> quality -= 10; <END> tempFileSize = temp.length(); if(tempFileSize <= MAX_FILE_SIZE) { trace(this, "writeToFile() :: wrote temp file %s with %s bytes (max size = %s bytes)", temp, tempFileSize, MAX_FILE_SIZE); return Uri.fromFile(temp); } } while(quality >= 0); bitmap = downsize(bitmap); } while(bitmap.getWidth() > MINIMUM_DIMENSION && bitmap.getHeight() > MINIMUM_DIMENSION); warn(this, "Failed to compress image small enough. Final quality=%s, tempFileSize=%s", quality, tempFileSize); return null; }</code><technical_language>feels weird drops quality written file, decided if loop again. works, read intention</technical_language>

Target:
private Uri writeToFile(Bitmap bitmap) throws IOException { File temp = tempFile(); long tempFileSize = -1; int quality; do { for(quality=90; quality>=50; quality-=10) { trace(this, "writeToFile() :: Attempting to write bitmap=%s (%sx%s) to file=%s at quality=%s; size of last write=%s...", bitmap, bitmap.getWidth(), bitmap.getHeight(), temp, quality, tempFileSize); writeToFile(temp, bitmap, quality); tempFileSize = temp.length(); if(tempFileSize <= MAX_FILE_SIZE) { trace(this, "writeToFile() :: wrote temp file %s with %s bytes (max size = %s bytes)", temp, tempFileSize, MAX_FILE_SIZE); return Uri.fromFile(temp); } } bitmap = downsize(bitmap); } while(bitmap.getWidth() > MINIMUM_DIMENSION && bitmap.getHeight() > MINIMUM_DIMENSION); warn(this, "Failed to compress image small enough. Final quality=%s, tempFileSize=%s", quality, tempFileSize); return null; }
Source:
<code><START> public static void main(String[] args) { <END> Map<String, String> toolArguments = null; StringBuilder sb = new StringBuilder(); try { List<ModuleService> moduleServices = ExtensionsToolLoader.load(ModuleService.class); for(ModuleService moduleService : moduleServices) { sb.append(moduleService.getName() + " "); if ((args.length < 1) || !moduleService.getName().equals(args[0])) { continue; } toolArguments = moduleService.parseArguments(args); moduleService.run(toolArguments); } if(toolArguments == null) { if(args.length > 0) { System.out.println("Module '" + args[0] + "' was not found."); } System.out.println("Available modules: " + sb.toString()); } } catch (Throwable t) { t.printStackTrace(); System.exit(1); } }</code><technical_language>in main setup log level file [at least] before</technical_language>

Target:
public static void main(String[] args) { try { Map<String, String> argMap = parseArgs(args); Map<String, ModuleService> moduleServices = load(ModuleService.class); ModuleService moduleService = moduleServices.get(args[0]); if(args[0].equals(ARG_HELP)) { System.out.println(getUsage(moduleServices.keySet())); return; } if(moduleService != null) { moduleService.parseArguments(args); ExtensionsManager extensionsManager = new ExtensionsManager(); File config = new File(argMap.get(ARG_EXT_CONFIG)); if (!config.exists()) { throw new Exception("Could not find extension configuration at the specified path"); } extensionsManager.initialize(extensionsManager.load(config)); moduleService.run(extensionsManager); } else { System.out.println("No such " + args[0] + " module exists. To list existing modules use --help argument."); } } catch (Throwable t) { t.printStackTrace(); System.exit(1); } }
Source:
<code>private JobManagerConnection associateWithJobManager( JobID jobID, ResourceID resourceID, JobMasterGateway jobMasterGateway) { checkNotNull(jobID); checkNotNull(resourceID); checkNotNull(jobMasterGateway); TaskManagerActions taskManagerActions = new TaskManagerActionsImpl(jobMasterGateway); CheckpointResponder checkpointResponder = new RpcCheckpointResponder(jobMasterGateway); GlobalAggregateManager aggregateManager = new RpcGlobalAggregateManager(jobMasterGateway); final LibraryCacheManager libraryCacheManager = new BlobLibraryCacheManager( blobCacheService.getPermanentBlobService(), taskManagerConfiguration.getClassLoaderResolveOrder(), taskManagerConfiguration.getAlwaysParentFirstLoaderPatterns(), <START> fatalErrorHandler); <END> ResultPartitionConsumableNotifier resultPartitionConsumableNotifier = new RpcResultPartitionConsumableNotifier( jobMasterGateway, getRpcService().getExecutor(), taskManagerConfiguration.getTimeout()); PartitionProducerStateChecker partitionStateChecker = new RpcPartitionStateChecker(jobMasterGateway); registerQueryableState(jobID, jobMasterGateway); return new JobManagerConnection( jobID, resourceID, jobMasterGateway, taskManagerActions, checkpointResponder, aggregateManager, libraryCacheManager, resultPartitionConsumableNotifier, partitionStateChecker); }</code><technical_language>respecting FAIL_ON_USER_CLASS_LOADING_METASPACE_OOM</technical_language>

Target:
private JobManagerConnection associateWithJobManager( JobID jobID, ResourceID resourceID, JobMasterGateway jobMasterGateway) { checkNotNull(jobID); checkNotNull(resourceID); checkNotNull(jobMasterGateway); TaskManagerActions taskManagerActions = new TaskManagerActionsImpl(jobMasterGateway); CheckpointResponder checkpointResponder = new RpcCheckpointResponder(jobMasterGateway); GlobalAggregateManager aggregateManager = new RpcGlobalAggregateManager(jobMasterGateway); final boolean failOnJvmMetaspaceOomError = taskManagerConfiguration .getConfiguration() .getBoolean(CoreOptions.FAIL_ON_USER_CLASS_LOADING_METASPACE_OOM); final LibraryCacheManager libraryCacheManager = new BlobLibraryCacheManager( blobCacheService.getPermanentBlobService(), taskManagerConfiguration.getClassLoaderResolveOrder(), taskManagerConfiguration.getAlwaysParentFirstLoaderPatterns(), failOnJvmMetaspaceOomError ? fatalErrorHandler : null); ResultPartitionConsumableNotifier resultPartitionConsumableNotifier = new RpcResultPartitionConsumableNotifier( jobMasterGateway, getRpcService().getExecutor(), taskManagerConfiguration.getTimeout()); PartitionProducerStateChecker partitionStateChecker = new RpcPartitionStateChecker(jobMasterGateway); registerQueryableState(jobID, jobMasterGateway); return new JobManagerConnection( jobID, resourceID, jobMasterGateway, taskManagerActions, checkpointResponder, aggregateManager, libraryCacheManager, resultPartitionConsumableNotifier, partitionStateChecker); }
Source:
<code>private void checkEventObjects(Object branchId, Object userArt) throws OseeArgumentException { <START> if (!(branchId instanceof BranchId)) { <END> throw new OseeArgumentException("BranchID provided to safety workflow creation event incorrect"); } if (!(userArt instanceof ArtifactReadable)) { throw new OseeArgumentException("User Artifact provided to safety workflow creation event incorrect"); } }</code><technical_language>useful display branchId checked. user art below</technical_language>

Target:
private void checkEventObjects(Object branchId, Object userArt) throws OseeArgumentException { if (!(branchId instanceof BranchId)) { throw new OseeArgumentException("BranchID provided to safety workflow creation event incorrect type: %s", branchId.toString()); } if (!(userArt instanceof ArtifactReadable)) { throw new OseeArgumentException("User Artifact provided to safety workflow creation event incorrect type: %s", userArt.toString()); } }
Source:
<code>public Result mutateRow(RowMutations rm) throws IOException { final List<Mutation> m = rm.getMutations(); OperationStatus[] operationStatuses = batchMutate(m.toArray(new Mutation[0]), true, HConstants.NO_NONCE, HConstants.NO_NONCE); <START> List<Result> results = Arrays.stream(operationStatuses) <END> .filter(os -> os.getResult() != null) .map(OperationStatus::getResult) .collect(Collectors.toList()); if (results.isEmpty()) { return null; } return Result.create(results.stream() .filter(r -> r.rawCells() != null) .flatMap(r -> Arrays.stream(r.rawCells())) .collect(Collectors.toList())); }</code><technical_language>for JDK8, stream is slow avoid stream critical read/write path for now</technical_language>

Target:
public Result mutateRow(RowMutations rm) throws IOException { final List<Mutation> m = rm.getMutations(); OperationStatus[] statuses = batchMutate(m.toArray(new Mutation[0]), true, HConstants.NO_NONCE, HConstants.NO_NONCE); List<Result> results = new ArrayList<>(); for (OperationStatus status : statuses) { if (status.getResult() != null) { results.add(status.getResult()); } } if (results.isEmpty()) { return null; } List<Cell> cells = new ArrayList<>(); for (Result result : results) { if (result.rawCells() != null) { cells.addAll(Arrays.asList(result.rawCells())); } } return Result.create(cells); }
Source:
<code>private List<PsiPackage> getTopLevelPackages() { Project myProject = presenterConfigModel.getProject(); ProjectViewSettings viewSettings = new ProjectViewSettings(); final List<VirtualFile> sourceRoots = new ArrayList<VirtualFile>(); final ProjectRootManager projectRootManager = ProjectRootManager.getInstance(myProject); ContainerUtil.addAll(sourceRoots, projectRootManager.getContentSourceRoots()); final PsiManager psiManager = PsiManager.getInstance(myProject); final List<AbstractTreeNode> children = new ArrayList<AbstractTreeNode>(); final Set<PsiPackage> topLevelPackages = new HashSet<PsiPackage>(); for (final VirtualFile root : sourceRoots) { final PsiDirectory directory = psiManager.findDirectory(root); if (directory == null) { continue; } <START> final PsiPackage directoryPackage = JavaDirectoryService.getInstance().getPackage(directory); <END> if (directoryPackage == null || PackageUtil.isPackageDefault(directoryPackage)) { final PsiDirectory[] subdirectories = directory.getSubdirectories(); for (PsiDirectory subdirectory : subdirectories) { final PsiPackage aPackage = JavaDirectoryService.getInstance().getPackage(subdirectory); if (aPackage != null && !PackageUtil.isPackageDefault(aPackage)) { topLevelPackages.add(aPackage); } } children.addAll(ProjectViewDirectoryHelper.getInstance(myProject).getDirectoryChildren(directory, viewSettings, false)); } else { topLevelPackages.add(directoryPackage); } } return new ArrayList<PsiPackage>(topLevelPackages); }</code><technical_language>nl</technical_language>

Target:
private List<PackageRoot> getTopLevelPackages() { Project myProject = presenterConfigModel.getProject(); ProjectViewSettings viewSettings = new ProjectViewSettings(); final List<VirtualFile> sourceRoots = new ArrayList<VirtualFile>(); final ProjectRootManager projectRootManager = ProjectRootManager.getInstance(myProject); ContainerUtil.addAll(sourceRoots, projectRootManager.getContentSourceRoots()); final PsiManager psiManager = PsiManager.getInstance(myProject); final List<AbstractTreeNode> children = new ArrayList<AbstractTreeNode>(); final Set<PackageRoot> topLevelPackages = new HashSet<PackageRoot>(); for (final VirtualFile root : sourceRoots) { final PsiDirectory directory = psiManager.findDirectory(root); if (directory == null) { continue; } final PsiPackage directoryPackage = JavaDirectoryService.getInstance().getPackage(directory); if (directoryPackage == null || PackageUtil.isPackageDefault(directoryPackage)) { final PsiDirectory[] subdirectories = directory.getSubdirectories(); for (PsiDirectory subdirectory : subdirectories) { final PsiPackage aPackage = JavaDirectoryService.getInstance().getPackage(subdirectory); if (aPackage != null && !PackageUtil.isPackageDefault(aPackage)) { PackageRoot packageRoot = new PackageRoot(root, aPackage); topLevelPackages.add(packageRoot); } } children.addAll(ProjectViewDirectoryHelper.getInstance(myProject).getDirectoryChildren(directory, viewSettings, false)); } else { PackageRoot packageRoot = new PackageRoot(root, directoryPackage); topLevelPackages.add(packageRoot); } } return new ArrayList<PackageRoot>(topLevelPackages); }
Source:
<code>public List<Cue> getCues(long timeUs) { int index = Util.binarySearchFloor(cueTimesUs, timeUs, true, false); <START> if (index == -1 || cues.get(index).isEmpty()) { <END> return Collections.emptyList(); } else { return cues.get(index); } }</code><technical_language>I get rid of empty check, return **the** empty list (right?)</technical_language>

Target:
public List<Cue> getCues(long timeUs) { int index = Util.binarySearchFloor(cueTimesUs, timeUs, true, false); if (index == -1) { return Collections.emptyList(); } else { return cues.get(index); } }
Source:
<code>public IFolder prepareTraceSupplementaryFolder(String supplFolderPath, boolean createFolder, IProgressMonitor progressMonitor) { IFolder folder = getTraceSupplementaryFolder(supplFolderPath); IFolder propertiesFolder = folder.getFolder(TmfCommonConstants.TRACE_PROPERTIES_FOLDER); if ((createFolder && propertiesFolder.exists() && propertiesFolder.isHidden()) || (!createFolder && folder.getParent().exists())) { return folder; } try { ICoreRunnable runnable = monitor -> { if (createFolder) { TraceUtils.createFolder(propertiesFolder, monitor); propertiesFolder.setHidden(true); } else { TraceUtils.createFolder((IFolder) folder.getParent(), monitor); } }; ResourcesPlugin.getWorkspace().run(runnable, <START> folder.getProject(), IWorkspace.AVOID_UPDATE, <END> progressMonitor); } catch (CoreException e) { Activator.getDefault().logError("Error creating supplementary folder " + folder.getFullPath(), e); } return folder; }</code><technical_language>do need lock project</technical_language>

Target:
public IFolder prepareTraceSupplementaryFolder(String supplFolderPath, boolean createFolder, IProgressMonitor progressMonitor) { SubMonitor subMonitor = SubMonitor.convert(progressMonitor); IFolder folder = getTraceSupplementaryFolder(supplFolderPath); IFolder propertiesFolder = folder.getFolder(TmfCommonConstants.TRACE_PROPERTIES_FOLDER); if ((createFolder && propertiesFolder.exists() && propertiesFolder.isHidden()) || (!createFolder && folder.getParent().exists())) { return folder; } try { ICoreRunnable runnable = monitor -> { if (createFolder) { TraceUtils.createFolder(propertiesFolder, monitor); propertiesFolder.setHidden(true); } else { TraceUtils.createFolder((IFolder) folder.getParent(), monitor); } }; ResourcesPlugin.getWorkspace().run(runnable, folder.getProject(), IWorkspace.AVOID_UPDATE, subMonitor); } catch (CoreException e) { Activator.getDefault().logError("Error creating supplementary folder " + folder.getFullPath(), e); } return folder; }
Source:
<code>public static @Nullable ITmfStateInterval querySingleStackTop(ITmfStateSystem ss, long t, int stackAttributeQuark) throws AttributeNotFoundException, StateSystemDisposedException { ITmfStateValue curStackStateValue = ss.querySingleState(t, stackAttributeQuark).getStateValue(); if (curStackStateValue.isNull()) { return null; } int curStackDepth = curStackStateValue.unboxInt(); if (curStackDepth <= 0) { String message = "A top-level stack attribute cannot " + "have a value of 0 or less."; throw new <START> StateValueTypeException(message); <END> } int subAttribQuark = ss.getQuarkRelative(stackAttributeQuark, String.valueOf(curStackDepth)); return ss.querySingleState(t, subAttribQuark); }</code><technical_language>add quark, state system here? from</technical_language>

Target:
public static @Nullable ITmfStateInterval querySingleStackTop(ITmfStateSystem ss, long t, int stackAttributeQuark) throws AttributeNotFoundException, StateSystemDisposedException { ITmfStateValue curStackStateValue = ss.querySingleState(t, stackAttributeQuark).getStateValue(); if (curStackStateValue.isNull()) { return null; } int curStackDepth = curStackStateValue.unboxInt(); if (curStackDepth <= 0) { throw new StateValueTypeException(ss.getSSID() + " Quark:" + stackAttributeQuark + ", Stack depth:" + curStackDepth); } int subAttribQuark = ss.getQuarkRelative(stackAttributeQuark, String.valueOf(curStackDepth)); return ss.querySingleState(t, subAttribQuark); }
Source:
<code><START> public void setTopicUuid(String topicId) { <END> this.topicUuid = topicId; }</code><technical_language>API doc needed</technical_language>

Target:
public void setTopicUuid(String topicId) { fields.put("topicUuid", topicId); }
Source:
<code><START> public void publishAvatarData(byte[] data, String itemId) <END> throws NoResponseException, NotConnectedException, XMPPErrorException, InterruptedException, PubSubException.NotALeafNodeException { DataExtension dataExtension = new DataExtension(data); getDataNode().publish(new PayloadItem<>(itemId, dataExtension)); }</code><technical_language>so, public if is needed. a good API public methods</technical_language>

Target:
public void publishAvatarData(byte[] data, String itemId) throws NoResponseException, NotConnectedException, XMPPErrorException, InterruptedException, PubSubException.NotALeafNodeException { DataExtension dataExtension = new DataExtension(data); getOrCreateDataNode().publish(new PayloadItem<>(itemId, dataExtension)); }
Source:
<code>private static boolean isTrue(CharSequence value) { final char firstChar = value.charAt(0); <START> return firstChar == 't' || firstChar == 'T'; <END> }</code><technical_language>java (value.charAt(0) | 32) == 't'</technical_language>

Target:
private static boolean isTrue(CharSequence value) { return (value.charAt(0) | 32) == 't'; }
Source:
<code>public void shouldNotSaveTaskWithInvalidRetryNumberValue() { Task t = new Task("name", trigger, asList(action)); t.setNumberOfRetries(-3); <START> taskService.save(t); <END> }</code><technical_language>verify in finally block, save performed</technical_language>

Target:
public void shouldNotSaveTaskWithInvalidRetryNumberValue() { Task t = new Task("name", trigger, asList(action)); t.setNumberOfRetries(-3); try { taskService.save(t); } finally { verifyZeroInteractions(tasksDataService); } }
Source:
<code>public void setUp() { fixture = new AggregateTestFixture<>(AnnotatedAggregate.class); mockCommandTargetResolver = mock(CommandTargetResolver.class); <START> <END> }</code><technical_language>Super nit: nit-picky here, this empty line is necessary I think</technical_language>

Target:
public void setUp() { fixture = new AggregateTestFixture<>(AnnotatedAggregate.class); }
Source:
<code>public static Map<Long, List<Map.Entry<String, String>>> reOrderTagsQuery(Map<String, String> tagsQuery) { Map<Long, List<Map.Entry<String, String>>> costSortedMap = new TreeMap<>(); costSortedMap.put(GROUP_B_COST, new ArrayList<>()); costSortedMap.put(GROUP_C_COST, new ArrayList<>()); for (Map.Entry<String, String> tagQuery : tagsQuery.entrySet()) { if(tagQuery.getKey().startsWith("!")) { List<Map.Entry<String, String>> entries = costSortedMap.get(GROUP_C_COST); entries.add(tagQuery); <START> costSortedMap.put(GROUP_C_COST, entries); <END> } else { List<Map.Entry<String, String>> entries = costSortedMap.get(GROUP_B_COST); entries.add(tagQuery); costSortedMap.put(GROUP_B_COST, entries); } } return costSortedMap; }</code><technical_language>Useless "put"</technical_language>

Target:
public static Map<Long, List<Map.Entry<String, String>>> reOrderTagsQuery(Map<String, String> tagsQuery) { Map<Long, List<Map.Entry<String, String>>> costSortedMap = new TreeMap<>(); costSortedMap.put(GROUP_B_COST, new ArrayList<>()); costSortedMap.put(GROUP_C_COST, new ArrayList<>()); for (Map.Entry<String, String> tagQuery : tagsQuery.entrySet()) { if(tagQuery.getKey().startsWith("!")) { List<Map.Entry<String, String>> entries = costSortedMap.get(GROUP_C_COST); entries.add(tagQuery); } else { List<Map.Entry<String, String>> entries = costSortedMap.get(GROUP_B_COST); entries.add(tagQuery); } } return costSortedMap; }
Source:
<code>public long propertiesReference() { long propertiesReference = getNextProp(); if ( read.hasTxStateWithChanges() ) { TransactionState txState = read.txState(); NodeState nodeState = txState.getNodeState( nodeReference() ); if ( nodeState.hasPropertyChanges() ) { long ref; if ( propertiesReference == NO_ID ) { ref = References.setNodeFlag( nodeReference() ); } else { ref = References.setTxStateFlag( propertiesReference ); } <START> txState.registerProperties( ref, nodeState ); <END> return ref; } } return propertiesReference; }</code><technical_language>need register flagged property reference. For case of a node properties in store, regular node lookup get property state</technical_language>

Target:
public long propertiesReference() { long propertiesReference = getNextProp(); if ( read.hasTxStateWithChanges() ) { TransactionState txState = read.txState(); NodeState nodeState = txState.getNodeState( nodeReference() ); if ( nodeState.hasPropertyChanges() ) { long ref; if ( propertiesReference == NO_ID ) { ref = References.setNodeFlag( nodeReference() ); } else { ref = References.setTxStateFlag( propertiesReference ); txState.registerProperties( ref, nodeState ); } return ref; } } return propertiesReference; }
Source:
<code>private Iterable<SAMSequenceRecord> getSamSequenceRecordsIterable() { final SequenceDictionaryUtils.SamSequenceRecordsIterator samSequenceRecordIterator = new SequenceDictionaryUtils.SamSequenceRecordsIterator(REFERENCE_SEQUENCE, TRUNCATE_NAMES_AT_WHITESPACE); samSequenceRecordIterator.setGenomeAssembly(GENOME_ASSEMBLY); samSequenceRecordIterator.setSpecies(SPECIES); samSequenceRecordIterator.setUri(URI); <START> return () -> samSequenceRecordIterator; <END> }</code><technical_language>Is a need create iterator call time? defer creation returned iterator is called, e.g. return () -> { final SequenceDictionaryUtils.SamSequenceRecordsIterator iterator = new SequenceDictionaryUtils.SamSequenceRecordsIterator(REFERENCE_SEQUENCE, TRUNCATE_NAMES_AT_WHITESPACE); iterator.setGenomeAssembly(GENOME_ASSEMBLY); iterator.setSpecies(SPECIES); iterator.setUri(URI); return iterator; };</technical_language>

Target:
private Iterable<SAMSequenceRecord> getSamSequenceRecordsIterable() { return () -> { final SequenceDictionaryUtils.SamSequenceRecordsIterator iterator = new SequenceDictionaryUtils.SamSequenceRecordsIterator(REFERENCE_SEQUENCE, TRUNCATE_NAMES_AT_WHITESPACE); iterator.setGenomeAssembly(GENOME_ASSEMBLY); iterator.setSpecies(SPECIES); iterator.setUri(URI); return iterator; }; }
Source:
<code>public CompletableFuture<Void> visitKeySetCommand(InvocationContext ctx, KeySetCommand command) throws Throwable { ctx.onReturn((ctx1, command1, rv, throwable) -> { if (throwable != null) throw throwable; CacheSet<K> keySet = (CacheSet<K>) rv; if (!enabled || hasSkipLoadFlag(command)) { return CompletableFuture.completedFuture(keySet); } CacheSet<K> wrappedKeySet = new WrappedKeySet(command, keySet); return CompletableFuture.completedFuture(wrappedKeySet); }); <START> return ctx.continueInvocation(); <END> }</code><technical_language>needed onReturn() returns CONTINUE_INVOCATION</technical_language>

Target:
public CompletableFuture<Void> visitKeySetCommand(InvocationContext ctx, KeySetCommand command) throws Throwable { return ctx.onReturn((rCtx, rCommand, rv, throwable) -> { if (throwable != null || !enabled || hasSkipLoadFlag(command)) { return null; } CacheSet<K> keySet = (CacheSet<K>) rv; CacheSet<K> wrappedKeySet = new WrappedKeySet(command, keySet); return CompletableFuture.completedFuture(wrappedKeySet); }); }
Source:
<code>public void testSetOnlineAndOffline() throws Exception { Registration queueModeRegistration = givenASimpleClientWithQueueMode(); <START> final CountDownLatch countDown = new CountDownLatch(2); <END> instance.addListener(new PresenceListener() { @Override public void onOnline(Registration endpoint) { countDown.countDown(); } @Override public void onOffline(Registration endpoint) { countDown.countDown(); } }); instance.setOnline(queueModeRegistration); instance.setOffline(queueModeRegistration); assertTrue("Expected states not set. " + countDown.getCount() + " state left to be set", countDown.await(2, TimeUnit.SECONDS)); }</code><technical_language>countdownLatch is asynchronous code</technical_language>

Target:
public void testSetOnlineAndOffline() throws Exception { Registration queueModeRegistration = givenASimpleClientWithQueueMode(); instance.addListener(new PresenceListener() { int onlineStatusCountDown = 0; int offlineStatusCountDown = 0; @Override public void onOnline(Registration registration) { onlineStatusCountDown++; assertTrue("Expected online state to be invoked only once but invoked" + onlineStatusCountDown, onlineStatusCountDown == 1); } @Override public void onOffline(Registration registration) { offlineStatusCountDown++; assertTrue("Expected offline state to be invoked only once but invoked" + offlineStatusCountDown, offlineStatusCountDown == 1); } }); instance.setOnline(queueModeRegistration); instance.setOnline(queueModeRegistration); instance.setOffline(queueModeRegistration); instance.setOffline(queueModeRegistration); }
Source:
<code>private ICompletionProposal[] convertToVersionProposals(List<String> versions) { <START> List<String> dest = new ArrayList<>(); <END> dest.addAll(versions); if (!versions.contains(ITargetConstants.UNIT_VERSION_ATTR_GENERIC)) { dest.add(ITargetConstants.UNIT_VERSION_ATTR_GENERIC); } List<ICompletionProposal> result = new ArrayList<>(); for (String version : dest) { StyledString displayString = TargetDefinitionContentAssist.getFilteredStyledString(version, searchTerm); if (displayString == null || displayString.length() == 0) { continue; } result.add(new InstallableUnitProposal(displayString, offset - searchTerm.length(), searchTerm.length())); } return result.toArray(new ICompletionProposal[result.size()]); }</code><technical_language>sort versions with: Collections.sort(versions, (v1, v2) -> (new Version(v2)).compareTo(new Version(v1)));</technical_language>

Target:
private ICompletionProposal[] convertToVersionProposals(List<String> versions) { List<String> dest = new ArrayList<>(); dest.addAll(versions); Collections.sort(dest, (v1, v2) -> (new Version(v2)).compareTo(new Version(v1))); if (!versions.contains(ITargetConstants.UNIT_VERSION_ATTR_GENERIC)) { dest.add(ITargetConstants.UNIT_VERSION_ATTR_GENERIC); } List<ICompletionProposal> result = new ArrayList<>(); for (String version : dest) { StyledString displayString = TargetDefinitionContentAssist.getFilteredStyledString(version, searchTerm); if (displayString == null || displayString.length() == 0) { continue; } result.add(new InstallableUnitProposal(displayString, offset - searchTerm.length(), searchTerm.length())); } return result.toArray(new ICompletionProposal[result.size()]); }
Source:
<code>private void diplayToolTip(Point hoverPoint, BigInteger subAddress) { <START> StringBuilder sb = new StringBuilder("0x").append(subAddress.toString(16)).append("\n"); <END> fLabelContent.setText(sb.toString()); Rectangle shellBounds = fToolTipShell.getBounds(); shellBounds.x = hoverPoint.x; shellBounds.y = hoverPoint.y + getCellWidth(); fToolTipShell.setBounds(shellBounds); fToolTipShell.pack(); fToolTipShell.setVisible(true); }</code><technical_language>Consider removing "/n" end? it, tooltip is more similar tooltip of hex render (i.e. height of a single line)</technical_language>

Target:
private void diplayToolTip(Point hoverPoint, BigInteger subAddress) { StringBuilder sb = new StringBuilder("0x").append(subAddress.toString(16)); fLabelContent.setText(sb.toString()); Rectangle shellBounds = fToolTipShell.getBounds(); shellBounds.x = hoverPoint.x; shellBounds.y = hoverPoint.y + getCellHeight(); fToolTipShell.setBounds(shellBounds); fToolTipShell.pack(); fToolTipShell.setVisible(true); }
Source:
<code>private void processInParallel(final List<ISourceModule> modules, int buildType, IBuildState state, final IScriptProject project, final IProgressMonitor monitor) { final ArrayBlockingQueue<ISourceModule> queue = new ArrayBlockingQueue<ISourceModule>( modules.size(), true, modules); int availableProcessors = Runtime.getRuntime().availableProcessors(); final JobGroup buildGroup = new JobGroup("Building Modules Group", availableProcessors, 1); Job monitorUpdateJob = new Job("Build Progress") { private int fLastNumberOfScannedFiles = 0; public IStatus run(IProgressMonitor inner) { while (!queue.isEmpty()) { if (monitor.isCanceled()) { buildGroup.cancel(); break; } int numberOfScannedFiles = modules.size() - queue.size(); monitor.subTask(NLS.bind( Messages.ValidatorBuilder_buildModuleSubTask, (int) ((numberOfScannedFiles * 100f) / modules.size()), project.getElementName())); int steps = numberOfScannedFiles - fLastNumberOfScannedFiles; monitor.worked(steps); fLastNumberOfScannedFiles += steps; try { Thread.sleep(100); } catch (InterruptedException e) { return Status.OK_STATUS; } } return Status.OK_STATUS; } }; monitorUpdateJob.setSystem(true); monitorUpdateJob.schedule(); try { <START> for (int i = 0; i < availableProcessors; i++) { <END> Job job = new BuildModulesJob(queue, buildType, state); job.setJobGroup(buildGroup); job.schedule(); } buildGroup.join(0, null); } catch (OperationCanceledException e) { DLTKCore.error(e); } catch (InterruptedException e) { DLTKCore.error(e); } }</code><technical_language>min(modules.size/2, availableProcessors) ? thinking of case if availableProcessors=16 compile 10 modules</technical_language>

Target:
private void processInParallel(final List<ISourceModule> modules, int buildType, IBuildState state, final IScriptProject project, final IProgressMonitor monitor) { final Queue<ISourceModule> queue = new ArrayBlockingQueue<ISourceModule>( modules.size(), true, modules); int maxThreads = Math.min(modules.size() / 2, Runtime.getRuntime().availableProcessors()); List<Job> jobs = new ArrayList<Job>(maxThreads); try { for (int i = 0; i < maxThreads; i++) { Job job = new BuildModulesJob(queue, buildType, state); job.schedule(); jobs.add(job); } int lastNumberOfScannedFiles = 0; for (Job job : jobs) { while (!job.join(100, null)) { if (monitor.isCanceled()) { job.cancel(); continue; } int numberOfScannedFiles = modules.size() - queue.size(); monitor.subTask(NLS.bind( Messages.ValidatorBuilder_buildModuleSubTask, (int) ((numberOfScannedFiles * 100f) / modules.size()), project.getElementName())); int steps = numberOfScannedFiles - lastNumberOfScannedFiles; monitor.worked(steps); lastNumberOfScannedFiles += steps; } } } catch (OperationCanceledException e) { DLTKCore.error(e); } catch (InterruptedException e) { DLTKCore.error(e); } }
Source:
<code><START> public static void copyTo(Localized from, Localized to) { <END> to.locale = from.locale; }</code><technical_language>this protected if this method a sub-class, do right thing</technical_language>

Target:
protected static void copyTo(Localized from, Localized to) { to.locale = from.locale; }
Source:
<code><START> public CurrentServerInfo getServerInfo() <END> { return new CurrentServerInfo(nanosSince(startTime), serverInfo); }</code><technical_language>This is a breaking change necessary. add uptime ServerInfo</technical_language>

Target:
public ServerInfo getServerInfo() { return new ServerInfo(version, environment, coordinator, Optional.of(nanosSince(startTime))); }
Source:
<code>protected void onFinishInflate() { super.onFinishInflate(); setOrientation(HORIZONTAL); <START> final int[] buttonIDs = <END> { R.id.direction_1, R.id.direction_2, R.id.direction_3, R.id.direction_4 }; for (int i = 0; i < FAN_DIRECTION_COUNT; i++) { ImageView button = (ImageView) findViewById(buttonIDs[i]); button.setTag(i); button.setOnClickListener(v -> { int direction = (int)v.getTag(); if (direction != mCurrentDirection) { updateFanButtonToOn(direction); mListener.onFanDirectionClicked(direction); } }); mButtonArray.add(button); } }</code><technical_language>this a static final field. read easier right next FAN_DIRECTION_* declarations</technical_language>

Target:
protected void onFinishInflate() { super.onFinishInflate(); setOrientation(HORIZONTAL); for (int i = 0; i < FAN_DIRECTION_COUNT; i++) { ImageView button = (ImageView) findViewById(FAN_DIRECTION_BUTTON_IDS[i]); button.setTag(i); button.setOnClickListener(v -> { int direction = (int) v.getTag(); if (direction != mCurrentDirection) { updateFanButtonToOn(direction); if (mListener != null) { mListener.onFanDirectionClicked(direction); } } }); mButtonArray.add(button); } }
Source:
<code><START> public void testRenameColumn() throws Exception { <END> TestUtils.assertMemoryLeak( () -> { try { createX(); Assert.assertEquals(ALTER, compiler.compile("alter table x rename column e z", sqlExecutionContext).getType()); String expected = "{\"columnCount\":16,\"columns\":[{\"index\":0,\"name\":\"i\",\"type\":\"INT\"},{\"index\":1,\"name\":\"sym\",\"type\":\"SYMBOL\"},{\"index\":2,\"name\":\"amt\",\"type\":\"DOUBLE\"},{\"index\":3,\"name\":\"timestamp\",\"type\":\"TIMESTAMP\"},{\"index\":4,\"name\":\"b\",\"type\":\"BOOLEAN\"},{\"index\":5,\"name\":\"c\",\"type\":\"STRING\"},{\"index\":6,\"name\":\"d\",\"type\":\"DOUBLE\"},{\"index\":7,\"name\":\"z\",\"type\":\"FLOAT\"},{\"index\":8,\"name\":\"f\",\"type\":\"SHORT\"},{\"index\":9,\"name\":\"g\",\"type\":\"DATE\"},{\"index\":10,\"name\":\"ik\",\"type\":\"SYMBOL\"},{\"index\":11,\"name\":\"j\",\"type\":\"LONG\"},{\"index\":12,\"name\":\"k\",\"type\":\"TIMESTAMP\"},{\"index\":13,\"name\":\"l\",\"type\":\"BYTE\"},{\"index\":14,\"name\":\"m\",\"type\":\"BINARY\"},{\"index\":15,\"name\":\"n\",\"type\":\"STRING\"}],\"timestampIndex\":3}"; try (TableReader reader = engine.getReader(AllowAllCairoSecurityContext.INSTANCE, "x", TableUtils.ANY_TABLE_VERSION)) { sink.clear(); reader.getMetadata().toJson(sink); TestUtils.assertEquals(expected, sink); } Assert.assertEquals(0, engine.getBusyWriterCount()); Assert.assertEquals(0, engine.getBusyReaderCount()); } finally { engine.releaseAllReaders(); engine.releaseAllWriters(); } } ); }</code><technical_language>is test ensure existing TableReader is able pick new column</technical_language>

Target:
public void testRenameColumn() throws Exception { TestUtils.assertMemoryLeak( () -> { try { createX(); Assert.assertEquals(ALTER, compiler.compile("alter table x rename column e to z", sqlExecutionContext).getType()); String expected = "{\"columnCount\":16,\"columns\":[{\"index\":0,\"name\":\"i\",\"type\":\"INT\"},{\"index\":1,\"name\":\"sym\",\"type\":\"SYMBOL\"},{\"index\":2,\"name\":\"amt\",\"type\":\"DOUBLE\"},{\"index\":3,\"name\":\"timestamp\",\"type\":\"TIMESTAMP\"},{\"index\":4,\"name\":\"b\",\"type\":\"BOOLEAN\"},{\"index\":5,\"name\":\"c\",\"type\":\"STRING\"},{\"index\":6,\"name\":\"d\",\"type\":\"DOUBLE\"},{\"index\":7,\"name\":\"z\",\"type\":\"FLOAT\"},{\"index\":8,\"name\":\"f\",\"type\":\"SHORT\"},{\"index\":9,\"name\":\"g\",\"type\":\"DATE\"},{\"index\":10,\"name\":\"ik\",\"type\":\"SYMBOL\"},{\"index\":11,\"name\":\"j\",\"type\":\"LONG\"},{\"index\":12,\"name\":\"k\",\"type\":\"TIMESTAMP\"},{\"index\":13,\"name\":\"l\",\"type\":\"BYTE\"},{\"index\":14,\"name\":\"m\",\"type\":\"BINARY\"},{\"index\":15,\"name\":\"n\",\"type\":\"STRING\"}],\"timestampIndex\":3}"; try (TableReader reader = engine.getReader(AllowAllCairoSecurityContext.INSTANCE, "x", TableUtils.ANY_TABLE_VERSION)) { sink.clear(); reader.getMetadata().toJson(sink); TestUtils.assertEquals(expected, sink); } Assert.assertEquals(0, engine.getBusyWriterCount()); Assert.assertEquals(0, engine.getBusyReaderCount()); } finally { engine.releaseAllReaders(); engine.releaseAllWriters(); } } ); }
Source:
<code>public boolean isAllowSidebandAll() { <START> return advertiseSidebandAll; <END> }</code><technical_language>If I understand intent correctly, this simply "return true". Deprecating sense me. Do need drop support for config already, though? E.g. Git supports it. support "return allowSidebandAll"</technical_language>

Target:
public boolean isAllowSidebandAll() { return allowSidebandAll; }