auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public SerializedPage serialize(Page page) { SliceOutput serializationBuffer = new DynamicSliceOutput(toIntExact(page.getSizeInBytes() + Integer.BYTES)); writeRawPage(page, serializationBuffer, blockEncodingSerde); Slice slice = serializationBuffer.slice(); int uncompressedSize = serializationBuffer.size(); byte markers = PageCodecMarker.none(); if (compressor.isPresent()) { int maxCompressedSize = compressor.get().maxCompressedLength(uncompressedSize); ensureCompressionBufferCapacity(maxCompressedSize); int compressedSize = compressor.get().compress((byte[]) slice.getBase(), 0, uncompressedSize, compressionBuffer, 0, maxCompressedSize); <START> <END> if ((((double) compressedSize) / uncompressedSize) <= MINIMUM_COMPRESSION_RATIO) { slice = Slices.copyOf(Slices.wrappedBuffer(compressionBuffer, 0, compressedSize)); markers = COMPRESSED.set(markers); } } if (spillCipher.isPresent()) { slice = Slices.wrappedBuffer(spillCipher.get().encrypt(slice.toByteBuffer())); markers = ENCRYPTED.set(markers); } else { slice = Slices.copyOf(slice); } return new SerializedPage(slice, markers, page.getPositionCount(), uncompressedSize); }</code><technical_language>Arrays.ensureCapacity</technical_language>

Target:
public SerializedPage serialize(Page page) { SliceOutput serializationBuffer = new DynamicSliceOutput(toIntExact(page.getSizeInBytes() + Integer.BYTES)); writeRawPage(page, serializationBuffer, blockEncodingSerde); Slice slice = serializationBuffer.slice(); int uncompressedSize = serializationBuffer.size(); byte markers = PageCodecMarker.none(); if (compressor.isPresent()) { int maxCompressedSize = compressor.get().maxCompressedLength(uncompressedSize); compressionBuffer = ensureCapacity(compressionBuffer, maxCompressedSize); int compressedSize = compressor.get().compress( (byte[]) slice.getBase(), (int) (slice.getAddress() - ARRAY_BYTE_BASE_OFFSET), uncompressedSize, compressionBuffer, 0, maxCompressedSize); if (compressedSize / (double) uncompressedSize <= MINIMUM_COMPRESSION_RATIO) { slice = Slices.copyOf(Slices.wrappedBuffer(compressionBuffer, 0, compressedSize)); markers = COMPRESSED.set(markers); } } if (spillCipher.isPresent()) { slice = Slices.wrappedBuffer(spillCipher.get().encrypt(slice.toByteBuffer())); markers = ENCRYPTED.set(markers); } else { slice = Slices.copyOf(slice); } return new SerializedPage(slice, markers, page.getPositionCount(), uncompressedSize); }
Source:
<code>private @CheckForNull String getCurrentUserLogin() { <START> String userLogin = null; Authentication auth = SecurityContextHolder.getContext().getAuthentication(); if (auth != null) { userLogin = auth.getName(); } return userLogin; <END> }</code><technical_language>suggestion Authentication auth = Jenkins.getAuthentication(); return auth.equals(Jenkins.ANONYMOUS) ? null : auth.getName();</technical_language>

Target:
private @CheckForNull String getCurrentUserLogin() { return Stream.of(Jenkins.getAuthentication()) .filter(auth -> !auth.equals(Jenkins.ANONYMOUS)) .findFirst() .map(auth -> auth.getName()) .orElse(null); }
Source:
<code>public void subscribe(Subscriber<? super RecordsRetrieved> s) { subscriber = s; ++subscriptionTryCount; s.onSubscribe(new Subscription() { @Override public void request(long n) { <START> if (subscriptionTryCount == 1) { <END> } else { send(n); } } @Override public void cancel() { requested = 0; } }); }</code><technical_language>simpler rewrite this block if (subscriptionTryCount != 1)</technical_language>

Target:
public void subscribe(Subscriber<? super RecordsRetrieved> s) { subscriber = s; ++subscriptionTryCount; s.onSubscribe(new Subscription() { @Override public void request(long n) { if (subscriptionTryCount != 1) { send(n); } } @Override public void cancel() { requested = 0; } }); }
Source:
<code>private Sequence<Row> mergeGroupByResults(final GroupByQuery query, QueryRunner<Row> runner) { Sequence<Row> result; DataSource dataSource = query.getDataSource(); if (dataSource instanceof QueryDataSource) { GroupByQuery subquery; try { subquery = (GroupByQuery) ((QueryDataSource) dataSource).getQuery(); } catch (ClassCastException e) { throw new UnsupportedOperationException("Subqueries must be of type 'group by'"); } Sequence<Row> subqueryResult = mergeGroupByResults(subquery, runner); final GroupByQuery.Builder builder = new GroupByQuery.Builder(subquery); for (PostAggregator postAggregator : subquery.getPostAggregatorSpecs()) { <START> builder.addAggregator(new DoubleSumAggregatorFactory(postAggregator.getName(), postAggregator.getName())); <END> } IncrementalIndexStorageAdapter adapter = new IncrementalIndexStorageAdapter(makeIncrementalIndex(builder.build(), subqueryResult)); result = engine.process(query, adapter); } else { result = runner.run(query); } return postAggregate(query, makeIncrementalIndex(query, result)); }</code><technical_language>of DoubleSumAggregatorFactory nervous. Do PostAggregations doubles? case I dealing nested queries needs deal complex metrics (we some sketch metrics), I in future wanting pass a sketch query outer query for processing</technical_language>

Target:
private Sequence<Row> mergeGroupByResults(final GroupByQuery query, QueryRunner<Row> runner) { final DataSource dataSource = query.getDataSource(); if (dataSource instanceof QueryDataSource) { GroupByQuery subquery; try { subquery = (GroupByQuery) ((QueryDataSource) dataSource).getQuery(); } catch (ClassCastException e) { throw new UnsupportedOperationException("Subqueries must be of type 'group by'"); } final Sequence<Row> subqueryResult = mergeGroupByResults(subquery, runner); final List<AggregatorFactory> aggs = Lists.newArrayList(); for (AggregatorFactory aggregatorFactory : query.getAggregatorSpecs()) { aggs.addAll(aggregatorFactory.getRequiredColumns()); } final GroupByQuery innerQuery = new GroupByQuery.Builder(query) .setAggregatorSpecs(aggs) .setInterval(subquery.getIntervals()) .setPostAggregatorSpecs(Lists.<PostAggregator>newArrayList()) .build(); final GroupByQuery outerQuery = new GroupByQuery.Builder(query) .setLimitSpec(query.getLimitSpec().merge(subquery.getLimitSpec())) .build(); final IncrementalIndexStorageAdapter adapter = new IncrementalIndexStorageAdapter( makeIncrementalIndex(innerQuery, subqueryResult) ); return outerQuery.applyLimit(engine.process(outerQuery, adapter)); } else { return query.applyLimit(postAggregate(query, makeIncrementalIndex(query, runner.run(query)))); } }
Source:
<code>public static void inspectTextFile() { String projectId = "my-project-id"; <START> String filePath = "path/to/textfile.txt"; <END> inspectTextFile(projectId, filePath); }</code><technical_language>super nit: suggestion String filePath = "path/to/text/file.txt";</technical_language>

Target:
public static void inspectTextFile() { String projectId = "your-project-id"; String filePath = "path/to/file.txt"; inspectTextFile(projectId, filePath); }
Source:
<code>private Object checkForCompositeRename(ExecutionEvent event) { ISelection sel= HandlerUtil.getCurrentSelection(event); if (sel instanceof IStructuredSelection) { IResource resource= getCurrentResource((IStructuredSelection) sel); if (resource != null) { <START> String newName= resource.getName().substring(0, resource.getName().lastIndexOf('.')) + 'a'; <END> String placeHolderFileName= newName + '.' + resource.getFileExtension(); RenameResourceWizard refactoringWizard= new RenameResourceWizard(resource, placeHolderFileName); Change change= getChange(refactoringWizard); return isCompositeChange(change); } } return null; }</code><technical_language>resources dot in name. I this code fail in case</technical_language>

Target:
private Object checkForCompositeRename(ExecutionEvent event) { ISelection sel= HandlerUtil.getCurrentSelection(event); if (sel instanceof IStructuredSelection) { IResource resource= getCurrentResource((IStructuredSelection) sel); if (resource != null) { String placeHolderFileName; if (resource.getFileExtension() != null) { String newName= resource.getName().substring(0, resource.getName().lastIndexOf('.')) + 'a'; placeHolderFileName= newName + '.' + resource.getFileExtension(); } else { placeHolderFileName= resource.getName() + 'a'; } RenameResourceWizard refactoringWizard= new RenameResourceWizard(resource, placeHolderFileName); Change change= getChange(refactoringWizard); return isCompositeChange(change); } } return null; }
Source:
<code>private String getDateTimeFromTimeStamp(long timeStampMillis) { <START> SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.XXX"); <END> sdf.setTimeZone(TimeZone.getTimeZone("UTC")); return sdf.format(new Date(timeStampMillis)); }</code><technical_language>This result in dates 1970-01-01T00:00:00.Z. I meant SSS for milliseconds</technical_language>

Target:
private String getDateTimeFromTimeStamp(long timeStampMillis) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"); sdf.setTimeZone(TimeZone.getTimeZone("UTC")); return sdf.format(new Date(timeStampMillis)); }
Source:
<code>public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof VmDevice)) { return false; } VmDevice other = (VmDevice) obj; return (ObjectUtils.objectsEqual(id, other.id) && device.equals(other.device) && type.equals(other.type) && address.equals(other.address) && bootOrder == other.bootOrder && ObjectUtils.objectsEqual(specParams, other.specParams) && isManaged == other.isManaged && getIsPlugged().equals(other.getIsPlugged()) && getIsReadOnly().equals(other.getIsReadOnly()) && alias.equals(other.alias) && ObjectUtils.objectsEqual(customProperties, other.customProperties) && ObjectUtils.objectsEqual(snapshotId, other.snapshotId) && ObjectUtils.objectsEqual(logicalName, other.logicalName) <START> && ObjectUtils.objectsEqual(usingScsiReservation, other.usingScsiReservation)); <END> }</code><technical_language>a primitive, avoid objectEqual</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof VmDevice)) { return false; } VmDevice other = (VmDevice) obj; return (ObjectUtils.objectsEqual(id, other.id) && device.equals(other.device) && type.equals(other.type) && address.equals(other.address) && bootOrder == other.bootOrder && ObjectUtils.objectsEqual(specParams, other.specParams) && isManaged == other.isManaged && getIsPlugged().equals(other.getIsPlugged()) && getIsReadOnly().equals(other.getIsReadOnly()) && alias.equals(other.alias) && ObjectUtils.objectsEqual(customProperties, other.customProperties) && ObjectUtils.objectsEqual(snapshotId, other.snapshotId) && ObjectUtils.objectsEqual(logicalName, other.logicalName) && usingScsiReservation == other.usingScsiReservation); }
Source:
<code><START> public Set<String> listFilenames(final RepositoryPath path) <END> throws IOException { try (InputStream is = Files.newInputStream(path); BufferedInputStream bis = new BufferedInputStream(is); BZip2CompressorInputStream bzIs = new BZip2CompressorInputStream(bis); ArchiveInputStream tarIs = new TarArchiveInputStream(bzIs)) { return getEntriesNames(tarIs); } }</code><technical_language>hsould called listFileNames (with a capital 'N')..</technical_language>

Target:
public Set<String> listFilenames(final RepositoryPath path) throws IOException { try (InputStream is = Files.newInputStream(path); BufferedInputStream bis = new BufferedInputStream(is); BZip2CompressorInputStream bzIs = new BZip2CompressorInputStream(bis); ArchiveInputStream tarIs = new TarArchiveInputStream(bzIs)) { return getEntryNames(tarIs); } }
Source:
<code>public void testCliBatch() throws IOException { Path testPath = Paths.get(CommonsTestingUtil.tmpDirectory(CliIT.class)); testPath.toFile().mkdirs(); try { Path batchFilePath = testPath.resolve("batch.cli").toAbsolutePath(); try (PrintWriter out = new PrintWriter(Files.newBufferedWriter(batchFilePath))) { out.println("echo Hi CLI"); <START> out.printf("connect %s:11222\n", hostAddress()); <END> out.println("ls"); out.println("cd caches"); out.println("ls"); out.println("create cache --template=org.infinispan.DIST_SYNC batch1"); out.println("cd batch1"); out.println("put k1 batch1"); out.println("get k1"); out.println("disconnect"); out.flush(); } AeshTestShell shell = new AeshTestShell(); CLI.main(shell, new String[]{"-f", batchFilePath.toString()}); shell.assertContains("Hi CLI"); shell.assertContains("batch1"); } finally { Util.recursiveFileRemove(testPath.toFile()); } }</code><technical_language>Interesting. support env property replacement in batches</technical_language>

Target:
public void testCliBatch() { System.setProperty("serverAddress", hostAddress()); AeshTestShell shell = new AeshTestShell(); CLI.main(shell, new String[]{"-f", this.getClass().getResource("/cli/batch.cli").getPath()}); shell.assertContains("Hi CLI running on " + System.getProperty("os.arch")); shell.assertContains("batch1"); }
Source:
<code>protected Correlate( RelOptCluster cluster, RelTraitSet traits, RelNode left, RelNode right, CorrelationId correlationId, ImmutableBitSet requiredColumns, <START> JoinRelType joinType) { <END> super(cluster, traits, left, right); this.joinType = joinType; this.correlationId = correlationId; this.requiredColumns = requiredColumns; }</code><technical_language>Correlate joinType of INNER, LEFT, SEMI, ANTI (i.e SemiJoinTypes), I throw IllegalArgumentException if joinType is of</technical_language>

Target:
protected Correlate( RelOptCluster cluster, RelTraitSet traits, RelNode left, RelNode right, CorrelationId correlationId, ImmutableBitSet requiredColumns, JoinRelType joinType) { super(cluster, traits, left, right); assert !joinType.generatesNullsOnLeft() : "Correlate has invalid join type " + joinType; this.joinType = joinType; this.correlationId = correlationId; this.requiredColumns = requiredColumns; }
Source:
<code><START> public String getDaemonDir() { <END> return getProperty("daemon_dir", DEFAULT_DAEMON_DIR) + "/" + keyPath.substring(0, keyPath.length() - 1).replace('.', '/'); }</code><technical_language>return File for file path. for other methods</technical_language>

Target:
public File getDaemonDir() { return new File(getProperty("daemon_dir", DEFAULT_DAEMON_DIR), keyPath.substring(0, keyPath.length() - 1).replace('.', '/')); }
Source:
<code>private void reboot() { UIConstants constants = ConstantsManager.getInstance().getConstants(); ConfirmationModel model = new ConfirmationModel(); setWindow(model); model.setTitle(constants.rebootVirtualMachinesTitle()); model.setReasonVisible(false); model.setHelpTag(HelpTag.reboot_virtual_machine); model.setHashName("reboot_virtual_machine"); model.setMessage(constants.areYouSureYouWantToRebootTheFollowingVirtualMachinesMsg()); ArrayList<String> items = new ArrayList<>(); for (Object item : getSelectedItems()) { VM vm = (VM) item; ArrayList<VM> test = new ArrayList<>(); test.add(vm); <START> if (AsyncDataProvider.getInstance().isRebootCommandExecutionAllowed(test)) { <END> items.add(vm.getName()); } } model.setItems(items); UICommand tempVar = new UICommand("OnReboot", this); tempVar.setTitle(ConstantsManager.getInstance().getConstants().ok()); tempVar.setIsDefault(true); model.getCommands().add(tempVar); UICommand tempVar2 = UICommand.createCancelUiCommand("Cancel", this); model.getCommands().add(tempVar2); }</code><technical_language>I this is needed - other actions allow partial success send commands server server returns error messages for executed. I change needed in AsyncDataProvider</technical_language>

Target:
private void reboot() { UIConstants constants = ConstantsManager.getInstance().getConstants(); powerAction(REBOOT, constants.rebootVirtualMachinesTitle(), constants.areYouSureYouWantToRebootTheFollowingVirtualMachinesMsg(), false); }
Source:
<code>public MemberRemovedFromGroupTotally(Member member, Group group) { this.member = member; this.group = group; <START> this.message = formatMessage("%s was removed from %s totally", member, group); <END> }</code><technical_language>character '.' word 'totally'</technical_language>

Target:
public MemberRemovedFromGroupTotally(Member member, Group group) { this.member = member; this.group = group; this.message = formatMessage("%s was removed from %s totally.", member, group); }
Source:
<code><START> private DeltaVisit next() { <END> if (parent != null && parent.nextChild == null) { parent.data = null; parent = parent.parent; } if (nextChild != null) return new DeltaVisit(this); if (parent != null) return new DeltaVisit(parent); return null; }</code><technical_language>Good change making this instance member, thanks</technical_language>

Target:
DeltaVisit next() { if (parent != null && parent.nextChild == null) { parent.data = null; parent = parent.parent; } if (nextChild != null) return new DeltaVisit(this); if (parent != null) return new DeltaVisit(parent); return null; }
Source:
<code>protected static boolean shouldUseCompression(HttpExchange exchange) { List<String> encodings = exchange.getRequestHeaders().get("Accept-Encoding"); if (encodings == null) return false; for (String encoding: encodings) { <START> if(encoding.contains("gzip")) { <END> return true; } } return false; }</code><technical_language>space if</technical_language>

Target:
protected static boolean shouldUseCompression(HttpExchange exchange) { List<String> encodingHeaders = exchange.getRequestHeaders().get("Accept-Encoding"); if (encodingHeaders == null) return false; for (String encodingHeader : encodingHeaders) { String[] encodings = encodingHeader.split(","); for (String encoding : encodings) { if (encoding.trim().toLowerCase().equals("gzip")) { return true; } } } return false; }
Source:
<code>public void testDisplayingDataSeries() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { IViewPart viewSite = getSWTBotView().getViewReference().getView(true); assertTrue(viewSite instanceof CounterView); final TmfCommonXLineChartViewer chartViewer = <START> getChartViewer2(viewSite); <END> assertNotNull(chartViewer); fBot.waitUntil(ConditionHelpers.xyViewerIsReadyCondition(chartViewer)); chartViewer.setNbPoints(NUMBER_OF_POINTS); fBot.waitUntil(ConditionHelpers.xyViewerIsReadyCondition(chartViewer)); final Chart chart = getChart(); assertNotNull(chart); assertEquals(0, chart.getSeriesSet().getSeries().length); SWTBotTree treeBot = getSWTBotView().bot().tree(); WaitUtils.waitUntil(tree -> tree.rowCount() >= 1, treeBot, "The tree viewer did not finish loading."); SWTBotTreeItem root = treeBot.getTreeItem(TRACE_NAME); SWTBotTreeItem counter = retrieveTreeItem(root, COUNTER_NAME); counter.check(); fBot.waitUntil(ConditionHelpers.xyViewerIsReadyCondition(chartViewer)); WaitUtils.waitUntil(c -> c.getSeriesSet().getSeries().length >= 1, chart, "The data series did not load."); verifySeriesStyle(MAIN_SERIES_NAME, ISeries.SeriesType.LINE, BLUE, LineStyle.SOLID, false); WaitUtils.waitUntil(json -> isChartDataValid(chart, json, MAIN_SERIES_NAME), "resources/minor_faults-res50.json", "The chart data is not valid."); }</code><technical_language>method return base TmfXYChartViewer, test class cast right sub-class</technical_language>

Target:
public void testDisplayingDataSeries() throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { IViewPart viewSite = getSWTBotView().getViewReference().getView(true); assertTrue(viewSite instanceof CounterView); final TmfCommonXLineChartViewer chartViewer = (TmfCommonXLineChartViewer) getChartViewer(viewSite); assertNotNull(chartViewer); fBot.waitUntil(ConditionHelpers.xyViewerIsReadyCondition(chartViewer)); chartViewer.setNbPoints(NUMBER_OF_POINTS); fBot.waitUntil(ConditionHelpers.xyViewerIsReadyCondition(chartViewer)); final Chart chart = getChart(); assertNotNull(chart); assertEquals(0, chart.getSeriesSet().getSeries().length); SWTBotTree treeBot = getSWTBotView().bot().tree(); WaitUtils.waitUntil(tree -> tree.rowCount() >= 1, treeBot, "The tree viewer did not finish loading."); SWTBotTreeItem root = treeBot.getTreeItem(TRACE_NAME); SWTBotTreeItem counter = retrieveTreeItem(root, COUNTER_NAME); counter.check(); fBot.waitUntil(ConditionHelpers.xyViewerIsReadyCondition(chartViewer)); WaitUtils.waitUntil(c -> c.getSeriesSet().getSeries().length >= 1, chart, "The data series did not load."); verifySeriesStyle(MAIN_SERIES_NAME, ISeries.SeriesType.LINE, BLUE, LineStyle.SOLID, false); WaitUtils.waitUntil(json -> isChartDataValid(chart, json, MAIN_SERIES_NAME), "resources/minor_faults-res50.json", "The chart data is not valid."); }
Source:
<code>private void register(SonarLintProjectSettings settings) { <START> SonarQubeNotifications.get().remove(eventListener); <END> SonarQubeServer server; try { server = bindingManager.getSonarQubeServer(); } catch (InvalidBindingException e) { return; } if (settings.isBindingEnabled() && server.enableNotifications()) { NotificationConfiguration config = createConfiguration(settings, server); SonarQubeNotifications.get().register(config); } }</code><technical_language>This line appears in file. effectively logical of register, I extract a method unregister</technical_language>

Target:
private void register(SonarLintProjectSettings settings) { unregister(); SonarQubeServer server; try { server = bindingManager.getSonarQubeServer(); } catch (InvalidBindingException e) { return; } if (settings.isBindingEnabled() && server.enableNotifications()) { NotificationConfiguration config = createConfiguration(settings, server); SonarQubeNotifications.get().register(config); } }
Source:
<code>public void setupConnection() { try { if (connection == null) { String serviceName = System.getenv("STREAMING_ANALYTICS_SERVICE_NAME"); String vcapServices = System.getenv("VCAP_SERVICES"); assumeNotNull(serviceName, vcapServices); testType = "STREAMING_ANALYTICS_SERVICE"; connection = StreamingAnalyticsConnection.createInstance(vcapServices, serviceName); } } catch (IOException e) { <START> fail("This shouldn't cause an exception"); <END> } }</code><technical_language>hide exceptions - resolving failures hard</technical_language>

Target:
public void setupConnection() { try { if (connection == null) { String serviceName = System.getenv("STREAMING_ANALYTICS_SERVICE_NAME"); String vcapServices = System.getenv("VCAP_SERVICES"); assumeNotNull(serviceName, vcapServices); testType = "STREAMING_ANALYTICS_SERVICE"; connection = StreamingAnalyticsConnection.createInstance(vcapServices, serviceName); } } catch (IOException e) { e.printStackTrace(); fail(e.getMessage()); } }
Source:
<code>public <R> Single<R> scalarFlatMap(final Func1<? super T, ? extends Single<? extends R>> func) { return create(new OnSubscribe<R>() { @Override public void call(final SingleSubscriber<? super R> child) { Single<? extends R> o = func.call(value); <START> if (o.getClass() == ScalarSynchronousSingle.class) { <END> child.onSuccess(((ScalarSynchronousSingle<? extends R>) o).value); } else { o.unsafeSubscribe(new Subscriber<R>() { @Override public void onCompleted() { } @Override public void onError(Throwable e) { child.onError(e); } @Override public void onNext(R r) { child.onSuccess(r); } }); } } }); }</code><technical_language>This instanceof well</technical_language>

Target:
public <R> Single<R> scalarFlatMap(final Func1<? super T, ? extends Single<? extends R>> func) { return create(new OnSubscribe<R>() { @Override public void call(final SingleSubscriber<? super R> child) { Single<? extends R> o = func.call(value); if (o instanceof ScalarSynchronousSingle) { child.onSuccess(((ScalarSynchronousSingle<? extends R>) o).value); } else { Subscriber<R> subscriber = new Subscriber<R>() { @Override public void onCompleted() { } @Override public void onError(Throwable e) { child.onError(e); } @Override public void onNext(R r) { child.onSuccess(r); } }; child.add(subscriber); o.unsafeSubscribe(subscriber); } } }); }
Source:
<code>public void testUnDeployVMReplica() throws Exception { TierInstance tierInstance = new TierInstance(); tierInstance.setTier(tier); VM vm = new VM(); <START> vm.setHostname("hotname"); <END> tierInstance.setVM(vm); OpenStackAccess access = new OpenStackAccess(); access.setTenantId("tenantId"); access.setToken("token"); when(openStackRegion.getTokenAdmin()).thenReturn(access); when(openStackUtil.deleteServer(anyString(), anyString(), anyString(), anyString())).thenReturn(""); when(openStackUtil.getServer(anyString(), anyString(), anyString(), anyString())).thenThrow(new OpenStackException("")); claudiaClientOpenStack.undeployVMReplica(claudiaData, tierInstance); verify(openStackUtil).deleteServer(anyString(), anyString(), anyString(), anyString()); }</code><technical_language>typo important "hotname"</technical_language>

Target:
public void testUnDeployVMReplica() throws Exception { TierInstance tierInstance = new TierInstance(); tierInstance.setTier(tier); VM vm = new VM(); vm.setHostname("hostname"); vm.setVmid("ID"); tierInstance.setVM(vm); OpenStackAccess access = new OpenStackAccess(); access.setTenantId("tenantId"); access.setToken("token"); when(openStackRegion.getTokenAdmin()).thenReturn(access); when(openStackUtil.deleteServer(vm.getVmid(), tierInstance.getTier().getRegion(), access.getToken(), access.getTenantId())).thenReturn("OK"); when(openStackUtil.getServer(vm.getVmid(), tierInstance.getTier().getRegion(), claudiaData.getUser().getToken(), claudiaData.getUser().getTenantId())). thenThrow(new OpenStackException("Infrastructure Error")); claudiaClientOpenStack.undeployVMReplica(claudiaData, tierInstance); verify(openStackUtil).deleteServer(anyString(), anyString(), anyString(), anyString()); }
Source:
<code><START> private void decreaseNumOfStudents(int remainingNumOfStudents) { <END> Set<String> studentsNames = testData.students.keySet(); for (String key : studentsNames) { if (testData.students.size() <= remainingNumOfStudents) { return; } testData.students.remove(key); } }</code><technical_language>Consider renaming this method: similarity increaseNumOfStudents suggests decreases number of students integer passed in</technical_language>

Target:
private void decreaseNumOfStudents(int remainingNumOfStudents) { Map<String, StudentAttributes> remainingStudents = new LinkedHashMap<>(); int count = 0; for (String key : testData.students.keySet()) { if (count >= remainingNumOfStudents) { return; } remainingStudents.put(key, testData.students.get(key)); count++; } testData.students = remainingStudents; }
Source:
<code>public void removeAuthorizedClient(String clientRegistrationId, String principalName) { Assert.hasText(clientRegistrationId, "clientRegistrationId cannot be empty"); Assert.hasText(principalName, "principalName cannot be empty"); SqlParameterValue[] parameters = new SqlParameterValue[] { new SqlParameterValue(Types.VARCHAR, clientRegistrationId), new SqlParameterValue(Types.VARCHAR, principalName) }; <START> try (LobCreator lobCreator = this.lobHandler.getLobCreator()) { <END> PreparedStatementSetter pss = new LobCreatorArgumentPreparedStatementSetter(lobCreator, parameters); this.jdbcOperations.update(REMOVE_AUTHORIZED_CLIENT_SQL, pss); } }</code><technical_language>Please revert ArgumentPreparedStatementSetter reading/writing BLOB is required remove</technical_language>

Target:
public void removeAuthorizedClient(String clientRegistrationId, String principalName) { Assert.hasText(clientRegistrationId, "clientRegistrationId cannot be empty"); Assert.hasText(principalName, "principalName cannot be empty"); SqlParameterValue[] parameters = new SqlParameterValue[] { new SqlParameterValue(Types.VARCHAR, clientRegistrationId), new SqlParameterValue(Types.VARCHAR, principalName) }; PreparedStatementSetter pss = new ArgumentPreparedStatementSetter(parameters); this.jdbcOperations.update(REMOVE_AUTHORIZED_CLIENT_SQL, pss); }
Source:
<code>public ModelAndView saveAbout(@ProjectIdentifier @PathVariable("ProjectId") String projectId, @Validated @ModelAttribute("aboutTextBean") AboutText formBean, BindingResult result, ModelAndView model, Principal principal, @InjectProject IProject project) throws QuadrigaStorageException { <START> model = new ModelAndView("auth/editabout"); <END> List<INetwork> networks = nwManager.getNetworksInProject(projectId, INetworkStatus.APPROVED); model.addObject("project", project); model.addObject("networks", networks); if (result.hasErrors()) { model.addObject("aboutTextBean", formBean); } else { aboutTextManager.saveAbout(projectId, formBean); model.addObject("show_success_alert", true); model.addObject("success_alert_msg", "You successfully edited the about text"); } return model; }</code><technical_language>model is injected reinstantiated again</technical_language>

Target:
public ModelAndView saveAbout(@ProjectIdentifier @PathVariable("ProjectId") String projectId, @Validated @ModelAttribute("aboutTextBean") AboutText formBean, BindingResult result, ModelAndView model, Principal principal, @InjectProject IProject project) throws QuadrigaStorageException { List<INetwork> networks = nwManager.getNetworksInProject(projectId, INetworkStatus.APPROVED); model.addObject("project", project); model.addObject("networks", networks); if (result.hasErrors()) { model.addObject("aboutTextBean", formBean); } else { aboutTextManager.saveAbout(projectId, formBean); model.addObject("show_success_alert", true); model.addObject("success_alert_msg", "You successfully edited the about text"); } return model; }
Source:
<code>private boolean hasReviewsIncoming(ITask task) { <START> Set<String> reviewUrls = ImmutableSet.copyOf(taskReviewStore.getReviewUrls(task.getUrl())); <END> for (String reviewUrl : reviewUrls) { AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager() .getConnectorForRepositoryTaskUrl(reviewUrl); String taskId = connector.getTaskIdFromTaskUrl(reviewUrl); String repositoryUrl = connector.getRepositoryUrlFromTaskUrl(reviewUrl); ITask reviewTask = taskList.getTask(repositoryUrl, taskId); if ((reviewTask.getSynchronizationState().isIncoming())) { return true; } } return false; }</code><technical_language>getReviewUrls is ImmutableSet</technical_language>

Target:
private boolean hasReviewsIncoming(ITask task) { for (String reviewUrl : taskReviewStore.getReviewUrls(task.getUrl())) { AbstractRepositoryConnector connector = TasksUiPlugin.getRepositoryManager() .getConnectorForRepositoryTaskUrl(reviewUrl); String taskId = connector.getTaskIdFromTaskUrl(reviewUrl); String repositoryUrl = connector.getRepositoryUrlFromTaskUrl(reviewUrl); ITask reviewTask = taskList.getTask(repositoryUrl, taskId); if ((reviewTask.getSynchronizationState().isIncoming())) { return true; } } return false; }
Source:
<code>public static VdsStatic map(Host model, VdsStatic template) { VdsStatic entity = template != null ? template : new VdsStatic(); if (model.isSetId()) { entity.setId(GuidUtils.asGuid(model.getId())); } if (model.isSetName()) { entity.setVdsName(model.getName()); } if (model.isSetCluster() && model.getCluster().isSetId()) { entity.setVdsGroupId(GuidUtils.asGuid(model.getCluster().getId())); } if (model.isSetAddress()) { entity.setHostName(model.getAddress()); } if (model.isSetPort() && model.getPort() > 0) { entity.setPort(model.getPort()); } else { entity.setPort(DEFAULT_VDSM_PORT); } <START> if (model.isSetProtocol()) { <END> entity.setProtocol(VdsProtocol.fromValue(model.getProtocol())); } if (model.isSetSsh()) { map(model.getSsh(), entity); } if (model.isSetPowerManagement()) { entity = map(model.getPowerManagement(), entity); } if (model.isSetStorageManager()) { if (model.getStorageManager().getPriority() != null) { entity.setVdsSpmPriority(model.getStorageManager().getPriority()); } } if (model.isSetSpm()) { if (model.getSpm().getPriority() != null) { entity.setVdsSpmPriority(model.getSpm().getPriority()); } } if (model.isSetDisplay() && model.getDisplay().isSetAddress()) { entity.setConsoleAddress("".equals(model.getDisplay().getAddress()) ? null : model.getDisplay().getAddress()); } if (model.isSetComment()) { entity.setComment(model.getComment()); } return entity; }</code><technical_language>need do a mapping well, assume values of VdsProtocol HostProtocol match</technical_language>

Target:
public static VdsStatic map(Host model, VdsStatic template) { VdsStatic entity = template != null ? template : new VdsStatic(); if (model.isSetId()) { entity.setId(GuidUtils.asGuid(model.getId())); } if (model.isSetName()) { entity.setVdsName(model.getName()); } if (model.isSetCluster() && model.getCluster().isSetId()) { entity.setVdsGroupId(GuidUtils.asGuid(model.getCluster().getId())); } if (model.isSetAddress()) { entity.setHostName(model.getAddress()); } if (model.isSetPort() && model.getPort() > 0) { entity.setPort(model.getPort()); } else { entity.setPort(DEFAULT_VDSM_PORT); } if (model.isSetProtocol()) { map(model.getProtocol(), entity); } if (model.isSetSsh()) { map(model.getSsh(), entity); } if (model.isSetPowerManagement()) { entity = map(model.getPowerManagement(), entity); } if (model.isSetStorageManager()) { if (model.getStorageManager().getPriority() != null) { entity.setVdsSpmPriority(model.getStorageManager().getPriority()); } } if (model.isSetSpm()) { if (model.getSpm().getPriority() != null) { entity.setVdsSpmPriority(model.getSpm().getPriority()); } } if (model.isSetDisplay() && model.getDisplay().isSetAddress()) { entity.setConsoleAddress("".equals(model.getDisplay().getAddress()) ? null : model.getDisplay().getAddress()); } if (model.isSetComment()) { entity.setComment(model.getComment()); } return entity; }
Source:
<code>private int getTotalPaddingHorizontal() { <START> return getPaddingLeft() + getPaddingRight() + extraHorizontalPadding * 2; <END> }</code><technical_language>2 fail CS magic number check, clear needed here. A descriptively named constant clear</technical_language>

Target:
private int getTotalPaddingHorizontal() { return getPaddingLeft() + getPaddingRight() + extraHorizontalPadding * BOTH_SIDES; }
Source:
<code>public void handleNewSession() throws Exception { <START> autoRegistration(); <END> for (PreConnectCallback callback : _preConnectCallbacks) { callback.onPreConnect(); } createLiveInstance(); carryOverPreviousCurrentState(); setupMsgHandler(); }</code><technical_language>rush for auto registration logic here. split PRs. For this PR, interface class implementation. Move registration logic separate PR</technical_language>

Target:
public void handleNewSession() throws Exception { joinCluster(); for (PreConnectCallback callback : _preConnectCallbacks) { callback.onPreConnect(); } createLiveInstance(); carryOverPreviousCurrentState(); setupMsgHandler(); }
Source:
<code>public static void fmlPostInit() { netWrapper = NetworkRegistry.INSTANCE.newSimpleChannel("bc-lib"); netWrapper.registerMessage(MessageZonePlannerMapChunkRequest.Handler.class, MessageZonePlannerMapChunkRequest.class, 123, Side.SERVER); <START> netWrapper.registerMessage(MessageZonePlannerMapChunkResponse.Handler.class, MessageZonePlannerMapChunkResponse.class, 124, Side.CLIENT); <END> Collections.sort(handlers); if (DEBUG) { BCLog.logger.info("[lib.messages] Sorted list of messages:"); for (int i = 0; i < handlers.size(); i++) { final MessageTypeData<?, ?> handler = handlers.get(i); BCLog.logger.info(" " + i + " = " + handler.messageClass.getName() + " " + Arrays.toString(handler.sides)); } BCLog.logger.info("[lib.messages] Total of " + handlers.size() + " messages"); } for (int i = 0; i < handlers.size(); i++) { addInternal(handlers.get(i), i); } }</code><technical_language>This in BCRobotics class, in preInit. _probably_ this: java BCMessageHandler.addMessageType(MessageZonePlannerMapChunkRequest.class, MessageZonePlannerMapChunkRequest.Handler.INSTANCE, Side.SERVER); BCMessageHandler.addMessageType(MessageZonePlannerMapChunkResponse.class, MessageZonePlannerMapChunkResponse.Handler.INSTANCE, Side.CLIENT); This require change handlers enum types, a single object "INSTANCE"</technical_language>

Target:
public static void fmlPostInit() { netWrapper = NetworkRegistry.INSTANCE.newSimpleChannel("bc-lib"); Collections.sort(handlers); if (DEBUG) { BCLog.logger.info("[lib.messages] Sorted list of messages:"); for (int i = 0; i < handlers.size(); i++) { final MessageTypeData<?, ?> handler = handlers.get(i); BCLog.logger.info(" " + i + " = " + handler.messageClass.getName() + " " + Arrays.toString(handler.sides)); } BCLog.logger.info("[lib.messages] Total of " + handlers.size() + " messages"); } for (int i = 0; i < handlers.size(); i++) { addInternal(handlers.get(i), i); } }
Source:
<code>public void testDynamicTaskLoadingNonexistingTaskFactory() throws Exception { <START> List<String> taskClasses = new ArrayList<String>(); taskClasses.add("com.mycompany.mocktask.MockTask"); DynamicTaskConfig taskConfig = new DynamicTaskConfig("Reindex", "src/test/resources/Reindex.jar", "1.0.0", taskClasses, "com.mycompany.mocktask.RandomTaskFactory"); String path = TaskConstants.DYNAMICALLY_LOADED_TASK_PATH + "/Reindex"; removePathIfExists(path); _manager.getHelixDataAccessor().getBaseDataAccessor() .create(path, taskConfig.getTaskConfigZNRecord(), AccessOption.PERSISTENT); TaskDriver driver = new TaskDriver(_manager); String workflowName = TestHelper.getTestMethodName(); submitWorkflow(workflowName, driver); try { TaskState finalState = driver.pollForWorkflowState(workflowName, TaskState.COMPLETED, TaskState.FAILED); AssertJUnit.assertEquals(finalState, TaskState.FAILED); } catch (HelixException e) { AssertJUnit.fail(e.getMessage()); <END> } }</code><technical_language>Style, structure, AssertJUnit</technical_language>

Target:
public void testDynamicTaskLoadingNonexistingTaskFactory() throws Exception { String taskCommand = "Reindex"; String taskJarPath = "src/test/resources/Random.jar"; String taskVersion = "1.0.0"; String fullyQualifiedTaskClassName = "com.mycompany.mocktask.MockTask"; String fullyQualifiedTaskFactoryClassName = "com.mycompany.mocktask.RandomTaskFactory"; List<String> taskClasses = new ArrayList(); taskClasses.add(fullyQualifiedTaskClassName); DynamicTaskConfig taskConfig = new DynamicTaskConfig(taskCommand, taskJarPath, taskVersion, taskClasses, fullyQualifiedTaskFactoryClassName); String path = TaskConstants.DYNAMICALLY_LOADED_TASK_PATH + "/" + taskCommand; removePathIfExists(path); _manager.getHelixDataAccessor().getBaseDataAccessor() .create(path, taskConfig.getTaskConfigZNRecord(), AccessOption.PERSISTENT); TaskDriver driver = new TaskDriver(_manager); String workflowName = TestHelper.getTestMethodName(); submitWorkflow(workflowName, driver); TaskState finalState = driver.pollForWorkflowState(workflowName, TaskState.COMPLETED, TaskState.FAILED); Assert.assertEquals(finalState, TaskState.FAILED); }
Source:
<code>private void parseEntry(boolean forward) { currentEntry = cache.getEntry(ptr); final byte[] cep = currentEntry.path; if (!forward) { if (nextSubtreePos > 0) { final DirCacheTree p = tree.getChild(nextSubtreePos - 1); if (p.contains(cep, pathOffset, cep.length)) { nextSubtreePos--; currentSubtree = p; } } } if (nextSubtreePos != tree.getChildCount()) { final DirCacheTree s = tree.getChild(nextSubtreePos); if (s.contains(cep, pathOffset, cep.length)) { currentSubtree = s; nextSubtreePos++; if (s.isValid()) s.getObjectId().copyRawTo(subtreeId, 0); mode = FileMode.TREE.getBits(); path = cep; pathLen = pathOffset + s.nameLength(); return; } } mode = currentEntry.getRawMode(); path = cep; pathLen = cep.length; currentSubtree = null; String pathString = currentEntry.getPathString(); if (pathString != null) { <START> if (pathString.endsWith(Constants.DOT_GIT_ATTRIBUTES)) <END> attributesNode = new LazyLoadingAttributesNode( currentEntry.getObjectId()); } }</code><technical_language>if path "hello.gitattributes"</technical_language>

Target:
private void parseEntry(boolean forward) { currentEntry = cache.getEntry(ptr); final byte[] cep = currentEntry.path; if (!forward) { if (nextSubtreePos > 0) { final DirCacheTree p = tree.getChild(nextSubtreePos - 1); if (p.contains(cep, pathOffset, cep.length)) { nextSubtreePos--; currentSubtree = p; } } } if (nextSubtreePos != tree.getChildCount()) { final DirCacheTree s = tree.getChild(nextSubtreePos); if (s.contains(cep, pathOffset, cep.length)) { currentSubtree = s; nextSubtreePos++; if (s.isValid()) s.getObjectId().copyRawTo(subtreeId, 0); mode = FileMode.TREE.getBits(); path = cep; pathLen = pathOffset + s.nameLength(); return; } } mode = currentEntry.getRawMode(); path = cep; pathLen = cep.length; currentSubtree = null; byte[] entryName = new byte[pathLen - pathOffset]; System.arraycopy(path, pathOffset, entryName, 0, pathLen - pathOffset); if (Arrays.equals(entryName, DOT_GIT_ATTRIBUTES_BYTES)) attributesNode = new LazyLoadingAttributesNode( currentEntry.getObjectId()); }
Source:
<code>public static String formatReplaceabledHTML(String text, String id) { StringBuilder sb = new StringBuilder(); <START> sb.append("\n<div "); <END> if (id != null && !id.trim().isEmpty()) { sb.append("id=\""); sb.append(escapeIdString(id)); sb.append("\" "); } sb.append("class=\""); sb.append(REPLACEABLE_LICENSE_TEXT_CLASS); sb.append("\" style=\"display: inline\">"); sb.append(SpdxLicenseTemplateHelper.formatEscapeHTML(text)); sb.append("</div>\n"); return sb.toString(); }</code><technical_language>I this is in other direction :p. In #121, advocating <var> (or <span>) wrapping phrasing content, <div> wrapping flow content. I a single element cover cases</technical_language>

Target:
public static String formatReplaceabledHTML(String text, String id) { StringBuilder sb = new StringBuilder(); sb.append("\n<span "); if (id != null && !id.trim().isEmpty()) { sb.append("id=\""); sb.append(escapeIdString(id)); sb.append("\" "); } sb.append("class=\""); sb.append(REPLACEABLE_LICENSE_TEXT_CLASS); sb.append("\">"); sb.append(SpdxLicenseTemplateHelper.formatEscapeHTML(text)); sb.append("</span>\n"); return sb.toString(); }
Source:
<code>private void updateStorageDomainBackup(){ <START> if(getStorageDomain().getStorageStaticData().isBackup() <END> == false) { getStorageDomain().setBackup(true); } }</code><technical_language>add space, formatter</technical_language>

Target:
private void updateStorageDomainBackup() { if(!getStorageDomain().getStorageStaticData().isBackup()) { getStorageDomain().setBackup(true); } }
Source:
<code>public String getDisplayName() { <START> return "Email User ID Resolver"; <END> }</code><technical_language>slack in here? suggestion return "Slack email User ID Resolver";</technical_language>

Target:
public String getDisplayName() { return "Slack email User ID Resolver"; }
Source:
<code>private SecretKey tryGenerateStrongBoxSecurityKey(String service) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, NoSuchProviderException { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) { return null; } try { return generateKey(getKeyGenSpecBuilder(service).setIsStrongBoxBacked(true).build()); } catch (Exception e) { <START> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && e instanceof StrongBoxUnavailableException) { <END> Log.i(TAG, "StrongBox is unavailable on this device"); } else { Log.e(TAG, "An error occurred when trying to generate a StrongBoxSecurityKey: " + e.getMessage()); } return null; } }</code><technical_language>checking Build.VERSION.SDK_INT >= Build.VERSION_CODES.P if is if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) { return null; } above</technical_language>

Target:
private SecretKey tryGenerateStrongBoxSecurityKey(String service) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, NoSuchProviderException { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) { return null; } try { return generateKey(getKeyGenSpecBuilder(service).setIsStrongBoxBacked(true).build()); } catch (Exception e) { if (e instanceof StrongBoxUnavailableException) { Log.i(TAG, "StrongBox is unavailable on this device"); } else { Log.e(TAG, "An error occurred when trying to generate a StrongBoxSecurityKey: " + e.getMessage()); } return null; } }
Source:
<code>public boolean checkAccess(Account account, DiskOffering dof, DataCenter zone) throws PermissionDeniedException { <START> boolean isAccess = false; <END> if (account == null || dof == null) { isAccess = true; } else { if (_accountService.isRootAdmin(account.getId())) { isAccess = true; } else if (_accountService.isNormalUser(account.getId()) || account.getType() == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN || _accountService.isDomainAdmin(account.getId()) || account.getType() == Account.ACCOUNT_TYPE_PROJECT) { final List<Long> doDomainIds = diskOfferingDetailsDao.findDomainIds(dof.getId()); if (doDomainIds.isEmpty()) { isAccess = true; } else { for (Long domainId : doDomainIds) { if (_domainDao.isChildDomain(domainId, account.getDomainId())) { isAccess = true; break; } } } } } if (isAccess && dof != null && zone != null) { final List<Long> doZoneIds = diskOfferingDetailsDao.findZoneIds(dof.getId()); isAccess = doZoneIds.isEmpty() || doZoneIds.contains(zone.getId()); } return isAccess; }</code><technical_language>minor nit: hasAccess is a variable name :)</technical_language>

Target:
public boolean checkAccess(Account account, DiskOffering dof, DataCenter zone) throws PermissionDeniedException { boolean hasAccess = false; if (account == null || dof == null) { hasAccess = true; } else { if (_accountService.isRootAdmin(account.getId())) { hasAccess = true; } else if (_accountService.isNormalUser(account.getId()) || account.getType() == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN || _accountService.isDomainAdmin(account.getId()) || account.getType() == Account.ACCOUNT_TYPE_PROJECT) { final List<Long> doDomainIds = diskOfferingDetailsDao.findDomainIds(dof.getId()); if (doDomainIds.isEmpty()) { hasAccess = true; } else { for (Long domainId : doDomainIds) { if (_domainDao.isChildDomain(domainId, account.getDomainId())) { hasAccess = true; break; } } } } } if (hasAccess && dof != null && zone != null) { final List<Long> doZoneIds = diskOfferingDetailsDao.findZoneIds(dof.getId()); hasAccess = doZoneIds.isEmpty() || doZoneIds.contains(zone.getId()); } return hasAccess; }
Source:
<code>public static boolean openRenameWizard(String newName, IStructuredSelection structuredSelection) { Map<String, Object> commandParameters = Collections.emptyMap(); <START> commandParameters.put(LTK_RENAME_COMMAND_NEWNAME_PARAMETER_KEY, newName); <END> return runCommand(LTK_RENAME_ID, structuredSelection, commandParameters); }</code><technical_language>This is legal: collections.emptyMap returns a non-modifiable empty map (and empty map). Invoking .put fail. For maps a single element, Collections.singletonMap(...). return a non-modifiable map. Note this is highlighting trap in Java language API</technical_language>

Target:
public static boolean openRenameWizard(String newName, IStructuredSelection structuredSelection) { Map<String, Object> commandParameters = new HashMap<>(); commandParameters.put(LTK_RENAME_COMMAND_NEWNAME_PARAMETER_KEY, newName); return runCommand(LTK_RENAME_ID, structuredSelection, commandParameters); }