auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private SystemEvent convertSystemEventDTO(SystemEventDTO record) { final String id = record.getId(); final SystemEventType eventType = SystemEventType.valueOf(record.getEventType()); final String payloadStr = record.getPayload(); <START> System.out.println("------ payloadStr = " + payloadStr); <END> final Payload payload = marshalUtils.unmarshal(payloadStr, Payload.class); final Date created = new Date(record.getCreationDate()); return new SystemEvent(id, eventType, payload, created); }</code><technical_language>Debug code, remove it</technical_language>

Target:
private SystemEvent convertSystemEventDTO(SystemEventDTO record) { final String id = record.getId(); final SystemEventType eventType = SystemEventType.valueOf(record.getEventType()); final String payloadStr = record.getPayload(); final Payload payload = marshalUtils.unmarshal(payloadStr, Payload.class); final Date created = new Date(record.getCreationDate()); return new SystemEvent(id, eventType, payload, created); }
Source:
<code>public BranchInfo[] getRemoteProjectBranches(String projectName, IProgressMonitor monitor) throws GerritException { <START> String url = "/projects/" + projectName + "/branches/"; END> return executeGetRestRequest(url, BranchInfo[].class, monitor); }</code><technical_language>nit, common method w/ 299 (adding branchName there)</technical_language>

Target:
public BranchInfo[] getRemoteProjectBranches(String projectName, IProgressMonitor monitor) throws GerritException { String url = getProjectBranchesUrl(projectName); return executeGetRestRequest(url, BranchInfo[].class, monitor); }
Source:
<code>private Environment environment() { <START> this.assertNotNull(this.sources, "sources"); <END> this.assertNotNull(this.classes, "classes"); this.assertNotNull(this.classpath, "classpath"); return new AntEnvironment( this.getProject(), this.sources, this.classes, this.classpath ); }</code><technical_language>@simonjenga is this for? Submit a separate pull request for this, include here</technical_language>

Target:
private Environment environment() { if (this.sources == null) { throw new BuildException("srcdir not defined for QuliceTask"); } if (this.classes == null) { throw new BuildException("classesdir not defined for QuliceTask"); } if (this.classpath == null) { throw new BuildException("classpath not defined for QuliceTask"); } return new AntEnvironment( this.getProject(), this.sources, this.classes, this.classpath ); }
Source:
<code>private Optional<Object> getConfigKeyValue(EntitySpec spec, FlagUtils.FlagConfigKeyAndValueRecord r) { <START> Object configValue = spec.getConfig().get(r.getConfigKey()); <END> return (configValue == null) ? Optional.absent() : Optional.of(configValue); }</code><technical_language>write return Optional.fromNullable(spec.getConfig().get(r.getConfigKey()))</technical_language>

Target:
private Optional<Object> getConfigKeyValue(EntitySpec spec, FlagUtils.FlagConfigKeyAndValueRecord r) { return Optional.fromNullable(spec.getConfig().get(r.getConfigKey())); }
Source:
<code>public Map<TaskName, LocationId> readTaskLocality() { Map<TaskName, LocationId> taskLocality = new HashMap<>(); List<String> tasks = zkClient.getChildren(keyBuilder.getTaskLocalityPath()); for (String taskName : tasks) { String taskPath = String.format("%s/%s", keyBuilder.getTaskLocalityPath(), taskName); <START> String locationId = zkClient.readData(taskPath); <END> taskLocality.put(new TaskName(taskName), new LocationId(locationId)); } return taskLocality; }</code><technical_language>taskPath exist? Do need handle it</technical_language>

Target:
public Map<TaskName, LocationId> readTaskLocality() { Map<TaskName, LocationId> taskLocality = new HashMap<>(); String taskLocalityPath = keyBuilder.getTaskLocalityPath(); List<String> tasks = new ArrayList<>(); if (zkClient.exists(taskLocalityPath)) { tasks = zkClient.getChildren(taskLocalityPath); } for (String taskName : tasks) { String taskPath = String.format("%s/%s", keyBuilder.getTaskLocalityPath(), taskName); String locationId = zkClient.readData(taskPath, true); if (locationId != null) { taskLocality.put(new TaskName(taskName), new LocationId(locationId)); } } return taskLocality; }
Source:
<code><START> public void testListPartitionsByExprNullResult() throws Exception { <END> createTable4PartColsParts(getClient()); TestMetastoreExpr.ExprBuilder e = new TestMetastoreExpr.ExprBuilder(TABLE_NAME); getClient().listPartitionsSpecByExpr(DB_NAME, TABLE_NAME, SerializationUtilities.serializeExpressionToKryo( e.strCol("yyyy").val("2017").pred("=", 2).build()), null, (short)-1, null); }</code><technical_language>create test methods coverage of listPartitionsByExpr method is part of HMS API</technical_language>

Target:
public void testListPartitionsByExprNullResult() throws Exception { createTable4PartColsParts(getClient()); TestMetastoreExpr.ExprBuilder e = new TestMetastoreExpr.ExprBuilder(TABLE_NAME); getClient().listPartitionsByExpr(DB_NAME, TABLE_NAME, SerializationUtilities.serializeExpressionToKryo( e.strCol("yyyy").val("2017").pred("=", 2).build()), null, (short)-1, null); }
Source:
<code>private K8sContainerResolver toK8sContainerResolver( <START> CheContainer container, List<ChePluginEndpoint> endpoints) throws InfrastructureException { <END> return new K8sContainerResolverBuilder() .setContainer(container) .setImagePullPolicy(sidecarImagePullPolicy) .setPluginEndpoints(endpoints) .build(); }</code><technical_language>InfrastructureException thrown</technical_language>

Target:
private K8sContainerResolver toK8sContainerResolver( CheContainer container, List<ChePluginEndpoint> endpoints) { return new K8sContainerResolverBuilder() .setContainer(container) .setImagePullPolicy(sidecarImagePullPolicy) .setPluginEndpoints(endpoints) .build(); }
Source:
<code>public void addNewRaNegativeTestCase() throws Exception { client.apply(new AddResourceAdapter.Builder(RA_ID, "org.jboss.nonexsitingmodule", TransactionType.XA).build()); <START> admin.reloadIfRequired(); <END> }</code><technical_language>Is this needed? exception thrown line, no</technical_language>

Target:
public void addNewRaNegativeTestCase() throws Exception { client.apply(new AddResourceAdapter.Builder(RA_ID, "org.jboss.nonexsitingmodule", TransactionType.XA).build()); }
Source:
<code>private boolean isValidSpaceRequirements() { Map<Guid, List<DiskImage>> storageDomainsImagesMap = new HashMap<Guid, List<DiskImage>>(); for (LiveMigrateDiskParameters parameters : getParameters().getParametersList()) { MultiValueMapUtils.addToMap(parameters.getStorageDomainId(), getDiskImageById(parameters.getImageId()), storageDomainsImagesMap); } for (Guid destDomainId : storageDomainsImagesMap.keySet()) { List<DiskImage> disksList = storageDomainsImagesMap.get(destDomainId); Guid storagePoolId = disksList.get(0).getstorage_pool_id().getValue(); storage_domains destDomain = getStorageDomainById(destDomainId, storagePoolId); if (!StorageDomainSpaceChecker.isBelowThresholds(destDomain)) { addCanDoActionMessage(String.format("$%1$s %2$s", "storageName", getStorageDomain().getstorage_name())); return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN); } long totalImagesSize = 0; for (DiskImage diskImage : disksList) { Guid templateId = diskImage.getit_guid(); List<DiskImage> allImageSnapshots = ImagesHandler.getAllImageSnapshots(diskImage.getImageId(), templateId); diskImage.getSnapshots().addAll(allImageSnapshots); <START> totalImagesSize += Math.round(diskImage.getActualDiskWithSnapshotsSize()); <END> } if (!StorageDomainSpaceChecker.hasSpaceForRequest(destDomain, totalImagesSize)) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW); } } return true; }</code><technical_language>ceil instead of round, super-safe side</technical_language>

Target:
private boolean isValidSpaceRequirements() { Map<Guid, List<DiskImage>> storageDomainsImagesMap = new HashMap<Guid, List<DiskImage>>(); for (LiveMigrateDiskParameters parameters : getParameters().getParametersList()) { MultiValueMapUtils.addToMap(parameters.getStorageDomainId(), getDiskImageById(parameters.getImageId()), storageDomainsImagesMap); } for (Map.Entry<Guid, List<DiskImage>> entry : storageDomainsImagesMap.entrySet()) { Guid destDomainId = entry.getKey(); List<DiskImage> disksList = entry.getValue(); Guid storagePoolId = disksList.get(0).getstorage_pool_id().getValue(); storage_domains destDomain = getStorageDomainById(destDomainId, storagePoolId); if (!StorageDomainSpaceChecker.isBelowThresholds(destDomain)) { addCanDoActionMessage(String.format("$%1$s %2$s", "storageName", getStorageDomain().getstorage_name())); return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN); } long totalImagesSize = 0; for (DiskImage diskImage : disksList) { Guid templateId = diskImage.getit_guid(); List<DiskImage> allImageSnapshots = ImagesHandler.getAllImageSnapshots(diskImage.getImageId(), templateId); diskImage.getSnapshots().addAll(allImageSnapshots); totalImagesSize += Math.round(diskImage.getActualDiskWithSnapshotsSize()); } if (!StorageDomainSpaceChecker.hasSpaceForRequest(destDomain, totalImagesSize)) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW); } } return true; }
Source:
<code>public Mono<Void> renewMessageLock(ServiceBusReceivedMessage message, Duration maxLockRenewalDuration) { if (isDisposed.get()) { <START> throw logger.logExceptionAsError(new IllegalStateException( <END> String.format(INVALID_OPERATION_DISPOSED_RECEIVER, "getAutoRenewMessageLock"))); } else if (Objects.isNull(message)) { throw logger.logExceptionAsError(new NullPointerException("'message' cannot be null.")); } else if (message.getLockToken().isEmpty()) { throw logger.logExceptionAsError(new IllegalArgumentException("'message.getLockToken()' cannot be empty.")); } else if (receiverOptions.isSessionReceiver()) { throw logger.logExceptionAsError(new IllegalStateException( String.format("Cannot renew message lock [%s] for a session receiver.", message.getLockToken()))); } else if (maxLockRenewalDuration == null) { throw logger.logExceptionAsError(new NullPointerException("'maxLockRenewalDuration' cannot be null.")); } else if (maxLockRenewalDuration.isNegative()) { throw logger.logExceptionAsError(new IllegalArgumentException( "'maxLockRenewalDuration' cannot be negative.")); } final LockRenewalOperation operation = new LockRenewalOperation(message.getLockToken(), maxLockRenewalDuration, false, ignored -> renewMessageLock(message)); renewalContainer.addOrUpdate(message.getLockToken(), Instant.now().plus(maxLockRenewalDuration), operation); return operation.getCompletionOperation(); }</code><technical_language>question. monoError. This overload logger.logExceptionAsError()</technical_language>

Target:
public Mono<Void> renewMessageLock(ServiceBusReceivedMessage message, Duration maxLockRenewalDuration) { if (isDisposed.get()) { return monoError(logger, new IllegalStateException( String.format(INVALID_OPERATION_DISPOSED_RECEIVER, "getAutoRenewMessageLock"))); } else if (Objects.isNull(message)) { return monoError(logger, new NullPointerException("'message' cannot be null.")); } else if (Objects.isNull(message.getLockToken())) { return monoError(logger, new NullPointerException("'message.getLockToken()' cannot be null.")); } else if (message.getLockToken().isEmpty()) { return monoError(logger, new IllegalArgumentException("'message.getLockToken()' cannot be empty.")); } else if (receiverOptions.isSessionReceiver()) { return monoError(logger, new IllegalStateException( String.format("Cannot renew message lock [%s] for a session receiver.", message.getLockToken()))); } else if (maxLockRenewalDuration == null) { return monoError(logger, new NullPointerException("'maxLockRenewalDuration' cannot be null.")); } else if (maxLockRenewalDuration.isNegative()) { return monoError(logger, new IllegalArgumentException("'maxLockRenewalDuration' cannot be negative.")); } final LockRenewalOperation operation = new LockRenewalOperation(message.getLockToken(), maxLockRenewalDuration, false, ignored -> renewMessageLock(message)); renewalContainer.addOrUpdate(message.getLockToken(), Instant.now().plus(maxLockRenewalDuration), operation); return operation.getCompletionOperation(); }
Source:
<code>private void validateParameters(Action action) { <START> String srvcTypeParam = action.getServiceType(); <END> validateParameters(action, "serviceType"); validateEnum(ServiceType.class, srvcTypeParam); }</code><technical_language>reason for this local var</technical_language>

Target:
private void validateParameters(Action action) { validateParameters(action, "serviceType"); validateEnum(ServiceType.class, action.getServiceType()); }
Source:
<code>public void trustedRootCA() throws InterruptedException { String username = UUID.randomUUID().toString(); String password = "password"; <START> SyncUser user = SyncUser.login(SyncCredentials.usernamePassword(username, password, true), Constants.AUTH_URL); <END> final SyncConfiguration configOld = configurationFactory.createSyncConfigurationBuilder(user, Constants.USER_REALM) .schema(StringOnly.class) .build(); Realm realm = Realm.getInstance(configOld); realm.beginTransaction(); realm.createObject(StringOnly.class).setChars("Foo"); realm.commitTransaction(); SystemClock.sleep(TimeUnit.SECONDS.toMillis(2)); realm.close(); user.logout(); Realm.deleteRealm(configOld); user = SyncUser.login(SyncCredentials.usernamePassword(username, password), Constants.AUTH_URL); SyncConfiguration config = new SyncConfiguration.Builder(user, Constants.USER_REALM_SECURE) .schema(StringOnly.class) .waitForInitialRemoteData() .trustedRootCA("trusted_ca.pem") .build(); realm = Realm.getInstance(config); RealmResults<StringOnly> all = realm.where(StringOnly.class).findAll(); try { assertEquals(1, all.size()); assertEquals("Foo", all.get(0).getChars()); } finally { realm.close(); } }</code><technical_language>feels slightly weird this Java defined CA's instead of custom one, is scope of this PR</technical_language>

Target:
public void trustedRootCA() throws InterruptedException { String username = UUID.randomUUID().toString(); String password = "password"; SyncUser user = SyncUser.login(SyncCredentials.usernamePassword(username, password, true), Constants.AUTH_URL); final SyncConfiguration configOld = configurationFactory.createSyncConfigurationBuilder(user, Constants.USER_REALM) .schema(StringOnly.class) .build(); Realm realm = Realm.getInstance(configOld); realm.beginTransaction(); realm.createObject(StringOnly.class).setChars("Foo"); realm.commitTransaction(); SystemClock.sleep(TimeUnit.SECONDS.toMillis(2)); realm.close(); user.logout(); Realm.deleteRealm(configOld); user = SyncUser.login(SyncCredentials.usernamePassword(username, password), Constants.AUTH_URL); SyncConfiguration config = configurationFactory.createSyncConfigurationBuilder(user, Constants.USER_REALM_SECURE) .schema(StringOnly.class) .waitForInitialRemoteData() .trustedRootCA("trusted_ca.pem") .build(); realm = Realm.getInstance(config); RealmResults<StringOnly> all = realm.where(StringOnly.class).findAll(); try { assertEquals(1, all.size()); assertEquals("Foo", all.get(0).getChars()); } finally { realm.close(); } }
Source:
<code>public void testOrderedAggregations() { assertQuery( "SELECT orderpriority, custkey, array_agg(orderstatus ORDER BY orderstatus) FILTER (WHERE custkey > 500)" + "FROM orders " + "WHERE orderkey IN (1, 2, 3, 4, 5) " + "GROUP BY GROUPING SETS ((), (orderpriority), (orderpriority, custkey))", "VALUES " + <START> "(NULL, NULL , ('O', 'F', 'O'))," + <END> "('5-LOW', NULL , ('F', 'O'))," + "('1-URGENT', NULL , ('O'))," + "('5-LOW', 370 , NULL)," + "('5-LOW', 1234, ('F'))," + "('5-LOW', 1369, ('O'))," + "('5-LOW', 445 , NULL)," + "('1-URGENT', 781 , ('O'))"); }</code><technical_language>is a bug! Please notice is sort in array_agg(orderstatus ORDER orderstatus)</technical_language>

Target:
public void testOrderedAggregations() { assertQuery( "SELECT orderpriority, custkey, array_agg(orderstatus ORDER BY orderstatus) FILTER (WHERE custkey > 500)" + "FROM orders " + "WHERE orderkey IN (1, 2, 3, 4, 5) " + "GROUP BY GROUPING SETS ((), (orderpriority), (orderpriority, custkey))", "VALUES " + "(NULL, NULL , ('F', 'O', 'O'))," + "('5-LOW', NULL , ('F', 'O'))," + "('1-URGENT', NULL , ('O'))," + "('5-LOW', 370 , NULL)," + "('5-LOW', 1234, ('F'))," + "('5-LOW', 1369, ('O'))," + "('5-LOW', 445 , NULL)," + "('1-URGENT', 781 , ('O'))"); }
Source:
<code>public static ParsingOptions createParsingOptions(Session session) { <START> return new ParsingOptions(isParseDecimalLiteralsAsDouble(session) ? AS_DOUBLE : AS_DECIMAL); <END> }</code><technical_language>This delegate function</technical_language>

Target:
public static ParsingOptions createParsingOptions(Session session) { return createParsingOptions(session, WarningCollector.NOOP); }
Source:
<code>private static Expr.ObjectBinding createBindings(ColumnSelectorFactory columnSelectorFactory, Expr expression) { final Map<String, Supplier<Object>> suppliers = Maps.newHashMap(); for (String columnName : Parser.findRequiredBindings(expression)) { final ColumnCapabilities columnCapabilities = columnSelectorFactory.getColumnCapabilities(columnName); final ValueType nativeType = columnCapabilities != null ? columnCapabilities.getType() : null; final Supplier<Object> supplier; if (nativeType == ValueType.FLOAT) { supplier = columnSelectorFactory.makeFloatColumnSelector(columnName)::get; } else if (nativeType == ValueType.LONG) { supplier = columnSelectorFactory.makeLongColumnSelector(columnName)::get; } else if (nativeType == ValueType.STRING) { supplier = supplierFromDimensionSelector( columnSelectorFactory.makeDimensionSelector(new DefaultDimensionSpec(columnName, columnName)) ); <START> } else if (nativeType == ValueType.DOUBLE) { <END> supplier = columnSelectorFactory.makeDoubleColumnSelector(columnName)::get; } else if (nativeType == null) { supplier = supplierFromObjectSelector(columnSelectorFactory.makeObjectColumnSelector(columnName)); } else { supplier = null; } if (supplier != null) { suppliers.put(columnName, supplier); } } return Parser.withSuppliers(suppliers); }</code><technical_language>Move this condition higher</technical_language>

Target:
private static Expr.ObjectBinding createBindings(ColumnSelectorFactory columnSelectorFactory, Expr expression) { final Map<String, Supplier<Object>> suppliers = Maps.newHashMap(); for (String columnName : Parser.findRequiredBindings(expression)) { final ColumnCapabilities columnCapabilities = columnSelectorFactory.getColumnCapabilities(columnName); final ValueType nativeType = columnCapabilities != null ? columnCapabilities.getType() : null; final Supplier<Object> supplier; if (nativeType == ValueType.FLOAT) { supplier = columnSelectorFactory.makeFloatColumnSelector(columnName)::get; } else if (nativeType == ValueType.LONG) { supplier = columnSelectorFactory.makeLongColumnSelector(columnName)::get; } else if (nativeType == ValueType.DOUBLE) { supplier = columnSelectorFactory.makeDoubleColumnSelector(columnName)::get; } else if (nativeType == ValueType.STRING) { supplier = supplierFromDimensionSelector( columnSelectorFactory.makeDimensionSelector(new DefaultDimensionSpec(columnName, columnName)) ); } else if (nativeType == null) { supplier = supplierFromObjectSelector(columnSelectorFactory.makeObjectColumnSelector(columnName)); } else { supplier = null; } if (supplier != null) { suppliers.put(columnName, supplier); } } return Parser.withSuppliers(suppliers); }
Source:
<code><START> public void enrichWithTraceHeaders(HttpRequest request, Span span) { <END> setHeader(request, Span.TRACE_ID_NAME, span.getTraceId()); setHeader(request, Span.SPAN_ID_NAME, span.getSpanId()); if (!span.isExportable()) { setHeader(request, Span.NOT_SAMPLED_NAME, "true"); } setHeader(request, Span.SPAN_NAME_NAME, span.getName().toString()); setHeader(request, Span.PARENT_ID_NAME, getParentId(span)); setHeader(request, Span.PROCESS_ID_NAME, span.getProcessId()); }</code><technical_language>this public</technical_language>

Target:
private void enrichWithTraceHeaders(HttpRequest request, Span span) { setIdHeader(request, Span.TRACE_ID_NAME, span.getTraceId()); setIdHeader(request, Span.SPAN_ID_NAME, span.getSpanId()); if (!span.isExportable()) { setHeader(request, Span.NOT_SAMPLED_NAME, "true"); } setHeader(request, Span.SPAN_NAME_NAME, span.getName().toString()); setIdHeader(request, Span.PARENT_ID_NAME, getParentId(span)); setHeader(request, Span.PROCESS_ID_NAME, span.getProcessId()); }
Source:
<code>public String getClientConfigFile() { if (clientConfigFile == null) { List<String> searchPaths = new LinkedList<>(); searchPaths.add(System.getProperty("user.home") + "/.accumulo/accumulo-client.properties"); <START> if (System.getenv("ACCUMULO_CONF_DIR") != null) { <END> searchPaths.add(System.getenv("ACCUMULO_CONF_DIR") + "/accumulo-client.properties"); } searchPaths.add("/etc/accumulo/accumulo-client.properties"); for (String path : searchPaths) { File file = new File(path); if (file.isFile() && file.canRead()) { clientConfigFile = file.getAbsolutePath(); break; } } } return clientConfigFile; }</code><technical_language>This regresses in attempt phase out of environment variables in Java code</technical_language>

Target:
public String getClientConfigFile() { if (clientConfigFile == null) { URL clientPropsUrl = ClientOpts.class.getClassLoader() .getResource("accumulo-client.properties"); if (clientPropsUrl != null) { clientConfigFile = clientPropsUrl.getFile(); } } return clientConfigFile; }
Source:
<code>public void scanFile(final JavaFileScannerContext context) { this.context = context; assertionInMethod.clear(); visitedMethods.clear(); inUnitTest.push(false); methodContainsAssertion.push(false); scan(context.getTree()); methodContainsAssertion.pop(); inUnitTest.pop(); assertionInMethod.clear(); <START> visitedMethods.clear(); <END> }</code><technical_language>discussed, rely keySet of assertionInMethod map other set</technical_language>

Target:
public void scanFile(final JavaFileScannerContext context) { this.context = context; assertionInMethod.clear(); inUnitTest.push(false); methodContainsAssertion.push(false); scan(context.getTree()); methodContainsAssertion.pop(); inUnitTest.pop(); assertionInMethod.clear(); }
Source:
<code>protected int <START> getThreshold() <END> { if (!selectFeedbackEnabled) { if (getViewer().getControl() instanceof Table) return ((Table) getViewer().getControl()).getItemHeight() / 2; if (getViewer().getControl() instanceof Tree) return ((Tree) getViewer().getControl()).getItemHeight() / 2; if (getViewer().getControl() instanceof List) return ((List) getViewer().getControl()).getItemHeight() / 2; } return 5; }</code><technical_language>If this is usage private expose API</technical_language>

Target:
private int getThreshold() { if (!selectFeedbackEnabled) { if (getViewer().getControl() instanceof Table) return ((Table) getViewer().getControl()).getItemHeight() / 2; if (getViewer().getControl() instanceof Tree) return ((Tree) getViewer().getControl()).getItemHeight() / 2; if (getViewer().getControl() instanceof List) return ((List) getViewer().getControl()).getItemHeight() / 2; } return 5; }
Source:
<code><START> public int getHeartbeat() throws IOException { <END> return Integer.parseInt( this.client.getConfig().get(LuaCommand.HEARTBEAT.toString()) .toString()); }</code><technical_language>This get queue-specific heartbeat (<name>-heartbeat) if set. get default heartbeat (what's written here). java heartbeat = this.client.getConfig().get(this.name + "-heartbeat"); if (heartbeat == null) { return Integer.parseInt(this.client.getConfig().get(...).toString()); } return Integer.parseInt(heartbeat.toString());</technical_language>

Target:
public int getHeartbeat() throws IOException { Object heartbeat = this.client.getConfig() .get(this.getHeartbeatConfigName()); if (null == heartbeat) { heartbeat = this.client.getConfig() .get(LuaConfigParameter.HEARTBEAT); } return Integer.parseInt(heartbeat.toString()); }
Source:
<code>public PeriodicQueryNode(long window, long period, TimeUnit unit, String temporalVar, TupleExpr arg) { super(arg); checkArgument(period <= window); checkNotNull(temporalVar); checkNotNull(arg); <START> checkNotNull(unit); <END> this.windowDuration = window; this.periodDuration = period; this.unit = unit; this.temporalVar = temporalVar; }</code><technical_language>= checkNotNull</technical_language>

Target:
public PeriodicQueryNode(long window, long period, TimeUnit unit, String temporalVar, TupleExpr arg) { super(checkNotNull(arg)); checkArgument(0 < period && period <= window); this.temporalVar = checkNotNull(temporalVar); this.unit = checkNotNull(unit); this.windowDuration = window; this.periodDuration = period; }
Source:
<code>private void addProductContentToMap(Map<String, Content> contentMap, Product product) { if (product == null) { return; } Map<String, Content> mapped = new HashMap<String, Content>(); List<ProductContent> duplicates = new LinkedList<ProductContent>(); for (ProductContent pc : product.getProductContent()) { Content content = pc.getContent(); if (mapped.containsKey(content.getId())) { log.warn( "Multiple references to the same content found on a single product; " + "discarding duplicate: => {}, {}", product, content, mapped.get(content.getId()) ); duplicates.add(pc); continue; } mapped.put(content.getId(), content); Content existing = contentMap.get(content.getId()); if (existing != null && !content.equals(existing)) { log.warn( "Multiple versions of the same content found on a single subscription: {}", <START> content.getId() <END> ); } contentMap.put(content.getId(), content); } product.getProductContent().removeAll(duplicates); }</code><technical_language>I this is old, wondered effect of this is process. worth adding a more context warning. Thoughts</technical_language>

Target:
private void addProductContentToMap(Map<String, Content> contentMap, Product product) { if (product == null) { return; } Map<String, Content> mapped = new HashMap<String, Content>(); List<ProductContent> duplicates = new LinkedList<ProductContent>(); for (ProductContent pc : product.getProductContent()) { Content content = pc.getContent(); if (mapped.containsKey(content.getId())) { log.warn( "Multiple references to the same content found on a single product; " + "discarding duplicate: => {}, {}", product, content, mapped.get(content.getId()) ); duplicates.add(pc); continue; } mapped.put(content.getId(), content); Content existing = contentMap.get(content.getId()); if (existing != null && !content.equals(existing)) { log.warn( "Multiple versions of the same content found on a single subscription; " + "discarding previous version: => {}, {}", content.getId(), existing, content ); } contentMap.put(content.getId(), content); } product.getProductContent().removeAll(duplicates); }
Source:
<code>public void decryptAsymmetric( String projectId, String locationId, String keyRingId, String keyId, String keyVersionId, byte[] ciphertext) throws IOException { try (KeyManagementServiceClient client = KeyManagementServiceClient.create()) { CryptoKeyVersionName keyVersionName = CryptoKeyVersionName.of(projectId, locationId, keyRingId, keyId, keyVersionId); <START> long ceiphertextCrc32c = getCrc32cAsLong(ciphertext); <END> AsymmetricDecryptRequest request = AsymmetricDecryptRequest.newBuilder() .setName(keyVersionName.toString()) .setCiphertext(ByteString.copyFrom(ciphertext)) .setCiphertextCrc32C( Int64Value.newBuilder().setValue(ceiphertextCrc32c).build()) .build(); AsymmetricDecryptResponse response = client.asymmetricDecrypt(request); if (!response.getVerifiedCiphertextCrc32C()) { throw new IOException("AsymmetricDecrypt: request to server corrupted"); } if (!crcMatches(response.getPlaintextCrc32C().getValue(), response.getPlaintext().toByteArray())) { throw new IOException("AsymmetricDecrypt: response from server corrupted"); } System.out.printf("Plaintext: %s%n", response.getPlaintext().toStringUtf8()); } }</code><technical_language>This spelling error shows in a other places. suggest a global find/replace suggestion long ciphertextCrc32c = getCrc32cAsLong(ciphertext);</technical_language>

Target:
public void decryptAsymmetric( String projectId, String locationId, String keyRingId, String keyId, String keyVersionId, byte[] ciphertext) throws IOException { try (KeyManagementServiceClient client = KeyManagementServiceClient.create()) { CryptoKeyVersionName keyVersionName = CryptoKeyVersionName.of(projectId, locationId, keyRingId, keyId, keyVersionId); long ciphertextCrc32c = getCrc32cAsLong(ciphertext); AsymmetricDecryptRequest request = AsymmetricDecryptRequest.newBuilder() .setName(keyVersionName.toString()) .setCiphertext(ByteString.copyFrom(ciphertext)) .setCiphertextCrc32C( Int64Value.newBuilder().setValue(ciphertextCrc32c).build()) .build(); AsymmetricDecryptResponse response = client.asymmetricDecrypt(request); if (!response.getVerifiedCiphertextCrc32C()) { throw new IOException("AsymmetricDecrypt: request to server corrupted"); } if (!crcMatches(response.getPlaintextCrc32C().getValue(), response.getPlaintext().toByteArray())) { throw new IOException("AsymmetricDecrypt: response from server corrupted"); } System.out.printf("Plaintext: %s%n", response.getPlaintext().toStringUtf8()); } }
Source:
<code>private String postBlobAndVerify(HttpHeaders headers, ByteBuffer content) throws ExecutionException, InterruptedException { FullHttpRequest httpRequest = buildRequest(HttpMethod.POST, "/", headers, content); Queue<HttpObject> responseParts = nettyClient.sendRequest(httpRequest, null, null).get(); HttpResponse response = (HttpResponse) responseParts.poll(); <START> discardContent(responseParts); <END> assertEquals("Unexpected response status", HttpResponseStatus.CREATED, response.getStatus()); assertTrue("No Date header", HttpHeaders.getDateHeader(response, HttpHeaders.Names.DATE, null) != null); assertTrue("No " + RestUtils.Headers.CREATION_TIME, HttpHeaders.getHeader(response, RestUtils.Headers.CREATION_TIME, null) != null); assertEquals("Content-Length is not 0", 0, HttpHeaders.getContentLength(response)); String blobId = HttpHeaders.getHeader(response, HttpHeaders.Names.LOCATION, null); if (blobId == null) { fail("postBlobAndVerify did not return a blob ID"); } return blobId; }</code><technical_language>responseParts do expect</technical_language>

Target:
private String postBlobAndVerify(HttpHeaders headers, ByteBuffer content) throws ExecutionException, InterruptedException { FullHttpRequest httpRequest = buildRequest(HttpMethod.POST, "/", headers, content); Queue<HttpObject> responseParts = nettyClient.sendRequest(httpRequest, null, null).get(); HttpResponse response = (HttpResponse) responseParts.poll(); discardContent(responseParts, 1); assertEquals("Unexpected response status", HttpResponseStatus.CREATED, response.getStatus()); assertTrue("No Date header", HttpHeaders.getDateHeader(response, HttpHeaders.Names.DATE, null) != null); assertTrue("No " + RestUtils.Headers.CREATION_TIME, HttpHeaders.getHeader(response, RestUtils.Headers.CREATION_TIME, null) != null); assertEquals("Content-Length is not 0", 0, HttpHeaders.getContentLength(response)); String blobId = HttpHeaders.getHeader(response, HttpHeaders.Names.LOCATION, null); if (blobId == null) { fail("postBlobAndVerify did not return a blob ID"); } return blobId; }
Source:
<code>public boolean isLeaf() { <START> return isTest(); <END> }</code><technical_language>I doubt this assumption is true for tree leaves. leaves definition containers, e.g. dynamic tests</technical_language>

Target:
public boolean isLeaf() { return !isContainer(); }
Source:
<code>protected TupleBatch fetchNextReady() throws DbException { final Operator child = getChild(); TupleBatch tb = child.nextReady(); while (tb != null) { for (int row = 0; row < tb.numTuples(); ++row) { <START> IntIterator iter = groupStates.getIndices(tb, gfields, row).intIterator(); <END> int indice; if (!iter.hasNext()) { groupStates.addTuple(tb, gfields, row, true); for (int j = 0; j < internalAggs.size(); ++j) { internalAggs.get(j).initState(groupStates.getData()); } indice = groupStates.getData().numTuples() - 1; } else { indice = iter.next(); } for (int j = 0; j < internalAggs.size(); ++j) { internalAggs.get(j).addRow(tb, row, groupStates.getData(), indice); } } tb = child.nextReady(); } if (child.eos()) { generateResult(); return resultBuffer.popAny(); } return null; }</code><technical_language>I overhead iterator interface is imposing tuples in groupStates expected unique. worthwhile another TupleHashTable impl assumed uniqueness of tuples a getIndex() method simply returned int (or -1 for absence)</technical_language>

Target:
protected TupleBatch fetchNextReady() throws DbException { final Operator child = getChild(); TupleBatch tb = child.nextReady(); while (tb != null) { for (int row = 0; row < tb.numTuples(); ++row) { IntIterator iter = groupStates.getIndices(tb, gfields, row).intIterator(); int index; if (!iter.hasNext()) { groupStates.addTuple(tb, gfields, row, true); int offset = gfields.length; for (Aggregator agg : internalAggs) { agg.initState(groupStates.getData(), offset); offset += agg.getStateSize(); } index = groupStates.getData().numTuples() - 1; } else { index = iter.next(); } int offset = gfields.length; for (Aggregator agg : internalAggs) { agg.addRow(tb, row, groupStates.getData(), index, offset); offset += agg.getStateSize(); } } tb = child.nextReady(); } if (child.eos()) { generateResult(); return resultBuffer.popAny(); } return null; }
Source:
<code>public BoundedNettyByteBufReceive replace(ByteBuf content) { BoundedNettyByteBufReceive receive = new BoundedNettyByteBufReceive(content, sizeToRead); <START> return receive; <END> }</code><technical_language>variable receive is redundant</technical_language>

Target:
public BoundedNettyByteBufReceive replace(ByteBuf content) { return new BoundedNettyByteBufReceive(content, sizeToRead); }
Source:
<code>public String getPath() { <START> return organization + "/" + repository; <END> }</code><technical_language>SonarLint is complain String concat</technical_language>

Target:
public String getPath() { return String.format("%s/%s", organization, repositoryName); }
Source:
<code>private static AsyncWriteChannelOptions getWriteChannelOptions(Configuration config) { return AsyncWriteChannelOptions.builder() .setBufferSize(GCS_OUTPUT_STREAM_BUFFER_SIZE.get(config, config::getInt)) .setPipeBufferSize(GCS_OUTPUT_STREAM_PIPE_BUFFER_SIZE.get(config, config::getInt)) .setPipeType(GCS_OUTPUT_STREAM_PIPE_TYPE.get(config, config::getEnum)) .setUploadChunkSize(GCS_OUTPUT_STREAM_UPLOAD_CHUNK_SIZE.get(config, config::getInt)) .setUploadCacheSize(GCS_OUTPUT_STREAM_UPLOAD_CACHE_SIZE.get(config, config::getInt)) .setDirectUploadEnabled( GCS_OUTPUT_STREAM_DIRECT_UPLOAD_ENABLE.get(config, config::getBoolean)) .setGrpcChecksumsEnabled(GCS_GRPC_CHECKSUMS_ENABLE.get(config, config::getBoolean)) <START> .setGenerationMismatchForOverwriteMutationsIgnored( <END> GCS_OVERWRITE_GENERATION_MISMATCH_IGNORE.get(config, config::getBoolean)) .build(); }</code><technical_language>Rename method match config: setOverwriteGenerationMismatchIgnored()</technical_language>

Target:
private static AsyncWriteChannelOptions getWriteChannelOptions(Configuration config) { return AsyncWriteChannelOptions.builder() .setBufferSize(GCS_OUTPUT_STREAM_BUFFER_SIZE.get(config, config::getInt)) .setPipeBufferSize(GCS_OUTPUT_STREAM_PIPE_BUFFER_SIZE.get(config, config::getInt)) .setPipeType(GCS_OUTPUT_STREAM_PIPE_TYPE.get(config, config::getEnum)) .setUploadChunkSize(GCS_OUTPUT_STREAM_UPLOAD_CHUNK_SIZE.get(config, config::getInt)) .setUploadCacheSize(GCS_OUTPUT_STREAM_UPLOAD_CACHE_SIZE.get(config, config::getInt)) .setDirectUploadEnabled( GCS_OUTPUT_STREAM_DIRECT_UPLOAD_ENABLE.get(config, config::getBoolean)) .setGrpcChecksumsEnabled(GCS_GRPC_CHECKSUMS_ENABLE.get(config, config::getBoolean)) .build(); }
Source:
<code>public void init(String attributeName, Attribute.Type attributeType) { Attribute set; Expression setInitialValue; if (attributeType.equals(Attribute.Type.FLOAT) || attributeType.equals(Attribute.Type.DOUBLE) || attributeType.equals(Attribute.Type.INT) || attributeType.equals(Attribute.Type.LONG) || attributeType.equals(Attribute.Type.STRING) || attributeType.equals(Attribute.Type.BOOL)) { set = new Attribute("AGG_SET_".concat(attributeName), Attribute.Type.OBJECT); setInitialValue = Expression.function("createSet", Expression.variable(attributeName)); } else { throw new SiddhiAppRuntimeException( "Distinct count aggregation cannot be executed on attribute type " + attributeType.toString()); } this.baseAttributes = new Attribute[]{set}; this.baseAttributesInitialValues = new Expression[]{setInitialValue}; <START> assert baseAttributes.length == baseAttributesInitialValues.length; <END> }</code><technical_language>dont assert check throw exception</technical_language>

Target:
public void init(String attributeName, Attribute.Type attributeType) { Attribute set; Expression setInitialValue; if (attributeType.equals(Attribute.Type.FLOAT) || attributeType.equals(Attribute.Type.DOUBLE) || attributeType.equals(Attribute.Type.INT) || attributeType.equals(Attribute.Type.LONG) || attributeType.equals(Attribute.Type.STRING) || attributeType.equals(Attribute.Type.BOOL)) { set = new Attribute("AGG_SET_".concat(attributeName), Attribute.Type.OBJECT); setInitialValue = Expression.function("createSet", Expression.variable(attributeName)); } else { throw new SiddhiAppRuntimeException( "Distinct count aggregation cannot be executed on attribute type " + attributeType.toString()); } this.baseAttributes = new Attribute[]{set}; this.baseAttributesInitialValues = new Expression[]{setInitialValue}; }
Source:
<code>public void onPostValidation(boolean valid) { View errorView = findViewById(R.id.error_view); if (errorView != null) { errorView.setVisibility(valid ? GONE : VISIBLE); } int max = getGridLinearLayout().getChildCount(); for (int i = 0; i < max; i++) { DDMFieldGridRowView gridRowView = (DDMFieldGridRowView) getGridLinearLayout().getChildAt(i); <START> Drawable drawable; <END> drawable = getContext().getResources().getDrawable(R.drawable.lexicon_grid_row_view_error_drawable); FormViewUtil.setupBackground(valid ? null : drawable, gridRowView); DDLFieldSelectView columnSelectView = gridRowView.getColumnSelectView(); if (valid) { drawable = getContext().getResources().getDrawable(R.drawable.default_grid_edit_text_selector); } else { drawable = getContext().getResources().getDrawable(R.drawable.lexicon_grid_select_error_drawable); } FormViewUtil.setupBackground(drawable, columnSelectView.getTextEditText()); } }</code><technical_language>P</technical_language>

Target:
public void onPostValidation(boolean valid) { FormViewUtil.setupErrorView(valid, findViewById(R.id.error_view)); int max = getGridLinearLayout().getChildCount(); Drawable backgroundErrorDrawable = getContext().getResources().getDrawable(R.drawable.lexicon_grid_row_view_error_drawable); Drawable editTextDefaultDrawable = getContext().getResources().getDrawable(R.drawable.default_grid_edit_text_selector); Drawable editTextErrorDrawable = getContext().getResources().getDrawable(R.drawable.lexicon_grid_select_error_drawable); for (int i = 0; i < max; i++) { DDMFieldGridRowView gridRowView = (DDMFieldGridRowView) getGridLinearLayout().getChildAt(i); EditText columnEditText = gridRowView.getColumnSelectView().getTextEditText(); if (valid) { gridRowView.setBackground(null); columnEditText.setBackground(editTextDefaultDrawable); } else { gridRowView.setBackground(backgroundErrorDrawable); columnEditText.setBackground(editTextErrorDrawable); } } }
Source:
<code>public Header(long id, String shortName, String name, Form form, int index) { <START> setId(required(id,"id is required")); <END> setShortName(required(shortName,"shortName is required")); setName(required(name,"name is required")); setForm(required(form,"form is required")); setIndex(required(index,"index is required")); }</code><technical_language>remove private setters? necessary private setters, reduce size of class</technical_language>

Target:
public Header(long id, String shortName, String name, Form form, int index) { this.id = required(id, "id is required"); this.shortName = required(shortName, "shortName is required"); this.name = required(name, "name is required"); this.form = required(form, "form is required"); this.index = required(index, "index is required"); }
Source:
<code>public EvalBinding(IBinding binding, IType type, IBinding templateDefinition) { super(templateDefinition); fParameterPosition = -1; fBinding= binding; fType= type; fFixedType= type != null; if (fBinding == null) { <START> CCorePlugin.log(new NullPointerException()); <END> } }</code><technical_language>Please add a TODO replace logging throwing NPE</technical_language>

Target:
public EvalBinding(IBinding binding, IType type, IBinding templateDefinition) { super(templateDefinition); fParameterPosition = -1; fBinding= binding; fType= type; fFixedType= type != null; }
Source:
<code>public void initialize(URL location, ResourceBundle resources) { <START> metricResultsListView.setCellFactory(param -> new MetricResultListCell()); <END> scopeHierarchyTreeView.setCellFactory(param -> new ScopeHierarchyTreeCell()); scopeHierarchyTreeView.getSelectionModel().selectedItemProperty().addListener((obs, oldVal, newVal) -> { if (newVal != null && newVal.getValue() instanceof NameDeclaration) { parent.onNameDeclarationSelected((NameDeclaration) newVal.getValue()); } }); }</code><technical_language>In theory, cell factories set in fxml: <?import net.sourceforge.pmd.util.fxdesigner.util.controls.MetricResultListCell?> <?import net.sourceforge.pmd.util.fxdesigner.util.controls.ScopeHierarchyTreeCell?> <ListView fx:id="metricResultsListView" styleClass="secondary-panel" BorderPane.alignment="CENTER"> <cellFactory> <MetricResultListCell /> </cellFactory> </ListView> <TreeView fx:id="scopeHierarchyTreeView" styleClass="secondary-panel" BorderPane.alignment="CENTER"> <cellFactory> <ScopeHierarchyTreeCell /> </cellFactory> </TreeView></technical_language>

Target:
public void initialize(URL location, ResourceBundle resources) { scopeHierarchyTreeView.getSelectionModel().selectedItemProperty().addListener((obs, oldVal, newVal) -> { if (newVal != null && newVal.getValue() instanceof NameDeclaration) { parent.onNameDeclarationSelected((NameDeclaration) newVal.getValue()); } }); }
Source:
<code>public void testQueryFromCode() { final String drl = "import org.drools.compiler.oopath.model.Thing;\n" + "query isContainedIn( Thing $x, Thing $y )\n" + " $y := /$x/children\n" + "or\n" + " ( $z := /$x/children and isContainedIn( $z, $y; ) )\n" + "end\n"; <START> final List<String> itemList = Arrays.asList(new String[] { "display", "keyboard", "processor" }); <END> final KieSession ksession = new KieHelper().addContent( drl, ResourceType.DRL ) .build() .newKieSession(); Thing smartphone = new Thing("smartphone"); for ( String item : itemList ) { Thing component = new Thing(item); smartphone.addChild(component); } ksession.insert(smartphone); QueryResults queryResults = ksession.getQueryResults("isContainedIn", new Object[] { smartphone, Variable.v }); List<String> resultList = new ArrayList<>(); for(QueryResultsRow row : queryResults) { Thing component = (Thing) row.get("$y"); resultList.add(component.getName()); } assertThat(resultList).as("Querry does not contain all items").containsAll(itemList); ksession.dispose(); }</code><technical_language>I suggest pay more attention variable locality. (Even if literal.) itemList is line 58, is declared line 51? ksession is line 63, is declared line 53? force people in heads more need to, for longer need to</technical_language>

Target:
public void testQueryFromCode() { final String drl = "import org.drools.compiler.oopath.model.Thing;\n" + "query isContainedIn( Thing $x, Thing $y )\n" + " $y := /$x/children\n" + "or\n" + " ( $z := /$x/children and isContainedIn( $z, $y; ) )\n" + "end\n"; final Thing smartphone = new Thing("smartphone"); final List<String> itemList = Arrays.asList(new String[] { "display", "keyboard", "processor" }); itemList.stream().map(item -> new Thing(item)).forEach((thing) -> smartphone.addChild(thing)); final KieSession ksession = new KieHelper().addContent( drl, ResourceType.DRL ) .build() .newKieSession(); ksession.insert(smartphone); final QueryResults queryResults = ksession.getQueryResults("isContainedIn", new Object[] { smartphone, Variable.v }); final List<String> resultList = StreamSupport.stream(queryResults.spliterator(), false) .map(row -> ((Thing) row.get("$y")).getName()).collect(Collectors.toList()); assertThat(resultList).as("Query does not contain all items").containsAll(itemList); ksession.dispose(); }
Source:
<code>public Geometry extractAggregationResult(AggregationResultHolder aggregationResultHolder) { <START> return aggregationResultHolder.getResult(); <END> }</code><technical_language>Need handle null</technical_language>

Target:
public Geometry extractAggregationResult(AggregationResultHolder aggregationResultHolder) { Geometry geometry = aggregationResultHolder.getResult(); return geometry == null ? GeometryUtils.EMPTY_POINT : geometry; }
Source:
<code>private Disposable testSubscribeOn() { Disposable subscribeOn = realm.asFlowable() <START> .map(realm -> realm.where(Person.class).findAllSorted("name").get(0)) <END> .subscribeOn(Schedulers.io()) .subscribe( person -> {}, throwable -> showStatus("subscribeOn: " + throwable.toString()) ); Disposable asyncSubscribeOn = realm.where(Person.class).findAllSortedAsync("name").get(0).<Person>asFlowable() .subscribe( person -> showStatus("subscribeOn/async: " + person.getName() + ":" + person.getAge()), throwable -> showStatus("subscribeOn/async: " +throwable.toString()) ); return new CompositeDisposable(subscribeOn, asyncSubscribeOn); }</code><technical_language>this added</technical_language>

Target:
private void testSubscribeOn() { Disposable subscribeOnDisposable = realm.asFlowable() .map(realm -> realm.where(Person.class).findAllSorted("name").get(0)) .subscribeOn(Schedulers.io()) .subscribe( person -> {}, throwable -> showStatus("subscribeOn: " + throwable.toString()) ); compositeDisposable.add(subscribeOnDisposable); Disposable asyncSubscribeOnDisposable = realm.where(Person.class).findAllSortedAsync("name").get(0).<Person>asFlowable() .subscribe( person -> showStatus("subscribeOn/async: " + person.getName() + ":" + person.getAge()), throwable -> showStatus("subscribeOn/async: " +throwable.toString()) ); compositeDisposable.add(asyncSubscribeOnDisposable); }
Source:
<code>public List<Class> getSupportedTypes() { <START> return new ArrayList<>(Arrays.asList(BigInteger.class)); <END> }</code><technical_language>Collections.singletonList</technical_language>

Target:
public List<Class> getSupportedTypes() { return Collections.singletonList(BigInteger.class); }
Source:
<code>public void test_controlled_access_non_expired_study_scope_succeeds() { val choices = List.of(false, true); boolean everythingPassed = true; for (val hasOther : choices) { <START> val result = run_test(false, true, false, true, hasOther); <END> if (!result) { System.err.printf("Access wasn't granted to non-expired token (scopes='%s')", getScopes(false, true, hasOther)); everythingPassed = false; } } assertTrue(everythingPassed); }</code><technical_language>this run_test(false, **false**, false, true, hasOther); a controlled access test</technical_language>

Target:
public void test_controlled_access_non_expired_study_scope_succeeds() { val choices = List.of(false, true); boolean everythingPassed = true; for (val hasOther : choices) { val result = run_test(false, false, false, true, hasOther); if (!result) { System.err.printf("Access wasn't granted to non-expired token (scopes='%s')", getScopes(false, true, hasOther)); everythingPassed = false; } } assertTrue(everythingPassed); }
Source:
<code>public void canDoActionUpdateDescriptionVmDown() { <START> canDoActionUpdateWipeAfterDelete(VMStatus.Down); <END> }</code><technical_language>invoke 'canDoActionUpdateDescription'</technical_language>

Target:
public void canDoActionUpdateDescriptionVmDown() { canDoActionUpdateDescription(VMStatus.Down); }