auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testGetPositionWhenSelectorIsNull() { final Rect position = positionProvider.getPosition(null); verify(console).warn("[Guided Tour - Position Provider] Invalid custom query selector: null"); <START> assertNotNull(position); <END> }</code><technical_language>check if position is Rect.NONE</technical_language>

Target:
public void testGetPositionWhenSelectorIsNull() { final Rect position = positionProvider.getPosition(null); verify(console).warn("[Guided Tour - Position Provider] Invalid custom query selector: null"); assertEquals(none, position); }
Source:
<code>public Builder cidrBlocks(Iterable<String> cidrBlocks) { Iterables.addAll(this.cidrBlocks, transform(cidrBlocks, new Function<String, String>() { @Override public String apply(String input) { checkArgument(isCidrFormat(input), "input %s is not a valid CIDR", input); return input; } <START> })); <END> return this; }</code><technical_language>Wow...if this right, "transform" simply validates entry? In case simply write: for (String cidrBlock : cidrBlocks) { checkArgument(isCidrFormat(cirdBlock), "%s is a valid CIDR", cirdBlock); } Iterables.addAll(this.cidrBlocks, cidrBlocks); return this; ? Intent clearer me..</technical_language>

Target:
public Builder cidrBlocks(Iterable<String> cidrBlocks) { for (String cidrBlock : cidrBlocks) { checkArgument(isCidrFormat(cidrBlock), "%s is not a valid CIDR", cidrBlock); } Iterables.addAll(this.cidrBlocks, cidrBlocks); return this; }
Source:
<code>public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; WorkspaceProjectContextChangeEvent other = (WorkspaceProjectContextChangeEvent) obj; <START> if (module == null) { <END> if (other.module != null) return false; } else if (!module.equals(other.module)) return false; if (ou == null) { if (other.ou != null) return false; } else if (!ou.equals(other.ou)) return false; if (pkg == null) { if (other.pkg != null) return false; } else if (!pkg.equals(other.pkg)) return false; if (workspaceProject == null) { if (other.workspaceProject != null) return false; } else if (!workspaceProject.equals(other.workspaceProject)) return false; return true; }</code><technical_language>(optional) This kind of complicated. Personally I find more readable. WorkspaceProjectContextChangeEvent other = ...; return Objects.equals(module,other.module) && Objects.equals(ou, other.ou) && Objects.equals(pkg, other.pkg) && Objects.equals(workspaceProject, other.workspaceProject);</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } else if (obj == null || getClass() != obj.getClass()) { return false; } else { WorkspaceProjectContextChangeEvent other = (WorkspaceProjectContextChangeEvent) obj; return Objects.equals(module, other.module) && Objects.equals(ou, other.ou) && Objects.equals(pkg, other.pkg) && Objects.equals(workspaceProject, other.workspaceProject); } }
Source:
<code>public <T> T create(final Class<T> service) { Utils.validateServiceInterface(service); if (validateEagerly) { eagerlyValidateMethods(service); } return (T) Proxy.newProxyInstance(service.getClassLoader(), new Class<?>[] { service }, new InvocationHandler() { private final Platform platform = Platform.get(); @Override public Object invoke(Object proxy, Method method, @Nullable Object[] args) throws Throwable { if (method.getDeclaringClass() == Object.class) { return method.invoke(this, args); } if (platform.isDefaultMethod(method)) { return platform.invokeDefaultMethod(method, service, proxy, args); } List<Object> argsList = args != null ? Arrays.asList(args) : Collections.emptyList(); <START> Invocation invocation = new Invocation(method, argsList); <END> return loadServiceMethod(method).invoke(invocation); } }); }</code><technical_language>need push this creation in remove Continuation argument #2886. I want reference instance request leak objects if retain a response object for longer expect</technical_language>

Target:
public <T> T create(final Class<T> service) { Utils.validateServiceInterface(service); if (validateEagerly) { eagerlyValidateMethods(service); } return (T) Proxy.newProxyInstance(service.getClassLoader(), new Class<?>[] { service }, new InvocationHandler() { private final Platform platform = Platform.get(); private final Object[] emptyArgs = new Object[0]; @Override public Object invoke(Object proxy, Method method, @Nullable Object[] args) throws Throwable { if (method.getDeclaringClass() == Object.class) { return method.invoke(this, args); } if (platform.isDefaultMethod(method)) { return platform.invokeDefaultMethod(method, service, proxy, args); } return loadServiceMethod(method).invoke(args != null ? args : emptyArgs); } }); }
Source:
<code><START> public static Network getNetworkByVnicProfileId(Guid vnicProfileId) { <END> if (vnicProfileId == null) { return null; } VnicProfile vnicProfile = DbFacade.getInstance().getVnicProfileDao().get(vnicProfileId); return getNetworkByVnicProfile(vnicProfile); }</code><technical_language>lines 76-81 replaced new method line 85: getVnicProfile(Guid vnicProfileId) need consider possibility a returned null value</technical_language>

Target:
public static Network getNetworkByVnicProfileId(Guid vnicProfileId) { VnicProfile vnicProfile = getVnicProfile(vnicProfileId); return getNetworkByVnicProfile(vnicProfile); }
Source:
<code><START> private boolean isJsonEnabled(HttpServletRequest request) { <END> return "true".equals(request.getParameter(JSONValidationInterceptor.VALIDATE_JSON_PARAM)); }</code><technical_language>this function protected? This allow extensions users</technical_language>

Target:
protected boolean isJsonEnabled(HttpServletRequest request) { return "true".equals(request.getParameter(JSONValidationInterceptor.VALIDATE_JSON_PARAM)); }
Source:
<code><START> private ICompletableFuture<SyntheticRequest> invoke(int partitionId) throws Exception { <END> ICompletableFuture<SyntheticRequest> future; if (isClient) { SyntheticRequest request = new SyntheticRequest(syncBackupCount, asyncBackupCount, backupDelayNanos, null); request.setPartitionId(partitionId); Address target = clientPartitionService.getPartitionOwner(partitionId); future = clientInvocationService.invokeOnTarget(request, target); } else { SyntheticOperation operation = new SyntheticOperation(syncBackupCount, asyncBackupCount, getBackupDelayNanos()); future = operationService.invokeOnPartition(null, operation, partitionId); } return future; }</code><technical_language>missing something, is future returning of a type? operation returns null. SyntheticRequest is returned a response</technical_language>

Target:
private ICompletableFuture<Object> invoke(int partitionId) throws Exception { ICompletableFuture<Object> future; if (isClient) { SyntheticRequest request = new SyntheticRequest(syncBackupCount, asyncBackupCount, backupDelayNanos, null); request.setPartitionId(partitionId); Address target = clientPartitionService.getPartitionOwner(partitionId); future = clientInvocationService.invokeOnTarget(request, target); } else { SyntheticOperation operation = new SyntheticOperation(syncBackupCount, asyncBackupCount, getBackupDelayNanos()); future = operationService.invokeOnPartition(serviceName, operation, partitionId); } return future; }
Source:
<code>public void stop(ComponentContext context) throws InterruptedException { <START> super.stop(context); <END> providers.values().forEach(KeyValueStoreProvider::close); }</code><technical_language>do close calling super.stop</technical_language>

Target:
public void stop(ComponentContext context) throws InterruptedException { providers.values().forEach(KeyValueStoreProvider::close); super.stop(context); }
Source:
<code>public void testUpdateTableColumnStatisticsEmptyOptionalFields() throws Exception { SchemaTableName tableName = temporaryTable("update_table_column_statistics_empty_optional_fields"); ExtendedHiveMetastore metastoreClient = getMetastoreClient(tableName.getSchemaName()); if (!metastoreClient.supportsColumnStatistics()) { <START> return; <END> } try { doCreateEmptyTable(tableName, ORC, STATISTICS_TABLE_COLUMNS); metastoreClient.updateTableStatistics( tableName.getSchemaName(), tableName.getTableName(), currentStatistics -> STATISTICS_EMPTY_OPTIONAL_FIELDS); assertThat(metastoreClient.getTableStatistics(tableName.getSchemaName(), tableName.getTableName())) .isEqualTo(STATISTICS_EMPTY_OPTIONAL_FIELDS); } finally { dropTable(tableName); } }</code><technical_language>throw SkipException instead. This mislead tests passing metastore supports that</technical_language>

Target:
public void testUpdateTableColumnStatisticsEmptyOptionalFields() throws Exception { SchemaTableName tableName = temporaryTable("update_table_column_statistics_empty_optional_fields"); try { doCreateEmptyTable(tableName, ORC, STATISTICS_TABLE_COLUMNS); ExtendedHiveMetastore metastoreClient = getMetastoreClient(tableName.getSchemaName()); assertThat(metastoreClient.supportsColumnStatistics()).isTrue(); metastoreClient.updateTableStatistics( tableName.getSchemaName(), tableName.getTableName(), currentStatistics -> STATISTICS_EMPTY_OPTIONAL_FIELDS); assertThat(metastoreClient.getTableStatistics(tableName.getSchemaName(), tableName.getTableName())) .isEqualTo(STATISTICS_EMPTY_OPTIONAL_FIELDS); } finally { dropTable(tableName); } }
Source:
<code>public void printTableInfo(String namespace, String tablename) { <START> log.info("\n======================\n"); <END> String fullName = TableRegistry.getFullyQualifiedTableName(namespace, tablename); UUID streamUUID = UUID.nameUUIDFromBytes(fullName.getBytes()); CorfuTable<CorfuDynamicKey, CorfuDynamicRecord> table = getTable(namespace, tablename); log.info("Table " + tablename + " in namespace " + namespace + " with ID " + streamUUID.toString() + " has " + table.size() + " entries"); log.info("\n======================\n"); }</code><technical_language>if namespace or/and table exist</technical_language>

Target:
public void printTableInfo(String namespace, String tablename) { log.info("\n======================\n"); String fullName = TableRegistry.getFullyQualifiedTableName(namespace, tablename); UUID streamUUID = UUID.nameUUIDFromBytes(fullName.getBytes()); CorfuTable<CorfuDynamicKey, CorfuDynamicRecord> table = getTable(namespace, tablename); log.info("Table in namespace with ID has entries", table, namespace, streamUUID.toString(), table.size()); log.info("\n======================\n"); }
Source:
<code>private boolean assignAuthorsForAffiliation(Affiliation currentAffiliation, int currentAffiliationPosition) throws SAXException { <START> boolean atLeasOneAuthorAssigned = false; <END> if (hasAmongParents(parents, ELEM_CONTRIBUTOR)) { currentAuthor.getAffiliationPos().add(currentAffiliationPosition); atLeasOneAuthorAssigned = true; } else if (hasAmongParents(parents, ELEM_CONTRIBUTOR_GROUP)) { for (PmcIngestAuthor author : currentAuthorsGroup) { author.getAffiliationPos().add(currentAffiliationPosition); atLeasOneAuthorAssigned = true; } } else if (currentAffiliationId != null) { for (PmcIngestAuthor author : currentAuthors) { for (String affRefId : author.getAffiliationRefId()) { if (StringUtils.equals(currentAffiliationId, affRefId)) { author.getAffiliationPos().add(currentAffiliationPosition); atLeasOneAuthorAssigned = true; } } } } else { throw new SAXException("unable to connect affiliation with corresponding authors (" + currentAffiliation + ")"); } return atLeasOneAuthorAssigned; }</code><technical_language>atLeas<b>t</b>OneAuthorAssigned</technical_language>

Target:
private boolean assignAuthorsForAffiliation(Affiliation currentAffiliation, int currentAffiliationPosition) throws SAXException { boolean atLeastOneAuthorAssigned = false; if (hasAmongParents(parents, ELEM_CONTRIBUTOR)) { currentAuthor.getAffiliationPos().add(currentAffiliationPosition); atLeastOneAuthorAssigned = true; } else if (hasAmongParents(parents, ELEM_CONTRIBUTOR_GROUP)) { for (JatsAuthor author : currentAuthorsGroup) { author.getAffiliationPos().add(currentAffiliationPosition); atLeastOneAuthorAssigned = true; } } else if (currentAffiliationId != null) { for (JatsAuthor author : currentAuthors) { for (String affRefId : author.getAffiliationRefId()) { if (StringUtils.equals(currentAffiliationId, affRefId)) { author.getAffiliationPos().add(currentAffiliationPosition); atLeastOneAuthorAssigned = true; } } } } else { throw new SAXException("unable to connect affiliation with corresponding authors (" + currentAffiliation + ")"); } return atLeastOneAuthorAssigned; }
Source:
<code>private void addEndpoint(Endpoint ep) { <START> logger.debug("addEndpoint({}->{})", PanStampConversions.toString(ep)); <END> ep.addListener(endpointListener); }</code><technical_language>Missing argument for log formatting</technical_language>

Target:
private void addEndpoint(Endpoint ep) { logger.debug("addEndpoint({})", PanStampConversions.toString(ep)); ep.addListener(endpointListener); }
Source:
<code>public Response removeLinkedAccount(@PathParam("providerId") String providerId) { String errorMessage = checkCommonPreconditions(providerId); if (errorMessage != null) { return ErrorResponse.error(errorMessage, Response.Status.BAD_REQUEST); } FederatedIdentityModel link = session.users().getFederatedIdentity(user, providerId, realm); if (link == null) { return ErrorResponse.error(Messages.FEDERATED_IDENTITY_NOT_ACTIVE, Response.Status.BAD_REQUEST); } <START> <END> if (!(session.users().getFederatedIdentities(user, realm).size() > 1 || user.getFederationLink() != null || isPasswordSet())) { return ErrorResponse.error(Messages.FEDERATED_IDENTITY_REMOVING_LAST_PROVIDER, Response.Status.BAD_REQUEST); } session.users().removeFederatedIdentity(realm, user, providerId); logger.debugv("Social provider {0} removed successfully from user {1}", providerId, user.getUsername()); event.event(EventType.REMOVE_FEDERATED_IDENTITY).client(auth.getClient()).user(auth.getUser()) .detail(Details.USERNAME, auth.getUser().getUsername()) .detail(Details.IDENTITY_PROVIDER, link.getIdentityProvider()) .detail(Details.IDENTITY_PROVIDER_USERNAME, link.getUserName()) .success(); return Cors.add(request, Response.ok()).auth().allowedOrigins(auth.getToken()).build(); }</code><technical_language>generate link client-side. keen this part of account endpoints, run issues if people want switch AIAs. I remember client initiated account linking work client needs check nonce redirect initiated request</technical_language>

Target:
public Response removeLinkedAccount(@PathParam("providerId") String providerId) { auth.require(AccountRoles.MANAGE_ACCOUNT); String errorMessage = checkCommonPreconditions(providerId); if (errorMessage != null) { return ErrorResponse.error(errorMessage, Response.Status.BAD_REQUEST); } FederatedIdentityModel link = session.users().getFederatedIdentity(user, providerId, realm); if (link == null) { return ErrorResponse.error(Messages.FEDERATED_IDENTITY_NOT_ACTIVE, Response.Status.BAD_REQUEST); } if (!(session.users().getFederatedIdentities(user, realm).size() > 1 || user.getFederationLink() != null || isPasswordSet())) { return ErrorResponse.error(Messages.FEDERATED_IDENTITY_REMOVING_LAST_PROVIDER, Response.Status.BAD_REQUEST); } session.users().removeFederatedIdentity(realm, user, providerId); logger.debugv("Social provider {0} removed successfully from user {1}", providerId, user.getUsername()); event.event(EventType.REMOVE_FEDERATED_IDENTITY).client(auth.getClient()).user(auth.getUser()) .detail(Details.USERNAME, auth.getUser().getUsername()) .detail(Details.IDENTITY_PROVIDER, link.getIdentityProvider()) .detail(Details.IDENTITY_PROVIDER_USERNAME, link.getUserName()) .success(); return Cors.add(request, Response.ok()).auth().allowedOrigins(auth.getToken()).build(); }
Source:
<code>public void nullProxyConfiguration() { <START> Assert.assertTrue(SYSTEM_DEFAULTS.authentication() == null); <END> Assert.assertTrue(SYSTEM_DEFAULTS.credential() == null); Assert.assertTrue(SYSTEM_DEFAULTS.proxyAddress() == null); }</code><technical_language>Assert.areNull</technical_language>

Target:
public void nullProxyConfiguration() { Assert.assertNull(SYSTEM_DEFAULTS.authentication()); Assert.assertNull(SYSTEM_DEFAULTS.credential()); Assert.assertNull(SYSTEM_DEFAULTS.proxyAddress()); }
Source:
<code>public List<VmNumaNode> getVmNumaNodes(VM vm) { <START> int numOfVmCpus = vm.getNumOfCpus(); <END> int vcpus = FeatureSupported.supportedInConfig(ConfigValues.HotPlugCpuSupported, vm.getCompatibilityVersion(), vm.getClusterArch()) ? VmCpuCountHelper.calcMaxVCpu(vm, vm.getClusterCompatibilityVersion()) : numOfVmCpus; int offlineCpus = vcpus - numOfVmCpus; List<VmNumaNode> vmNumaNodes = vmNumaNodeDao.getAllVmNumaNodeByVmId(vm.getId()); if (!vmNumaNodes.isEmpty()) { if (offlineCpus > 0) { int numaCount = vmNumaNodes.size(); int index = numOfVmCpus; for (VmNumaNode vmNode : vmNumaNodes) { if (numaCount <= 0) { break; } for (int i = vmNode.getCpuIds().size(); i < vcpus / numaCount; i++) { vmNode.getCpuIds().add(index++); } vcpus -= vcpus / numaCount; --numaCount; } } return vmNumaNodes; } if (offlineCpus > 0) { VmNumaNode vmNode = new VmNumaNode(); vmNode.setIndex(0); vmNode.setMemTotal(vm.getMemSizeMb()); for (int i = 0; i < vcpus; i++) { vmNode.getCpuIds().add(i); } return Collections.singletonList(vmNode); } return Collections.emptyList(); }</code><technical_language>call "onlineCpus"? bit more readable</technical_language>

Target:
public List<VmNumaNode> getVmNumaNodes(VM vm) { int onlineCpus = vm.getNumOfCpus(); int vcpus = FeatureSupported.supportedInConfig(ConfigValues.HotPlugCpuSupported, vm.getCompatibilityVersion(), vm.getClusterArch()) ? VmCpuCountHelper.calcMaxVCpu(vm, vm.getClusterCompatibilityVersion()) : onlineCpus; int offlineCpus = vcpus - onlineCpus; List<VmNumaNode> vmNumaNodes = vmNumaNodeDao.getAllVmNumaNodeByVmId(vm.getId()); if (!vmNumaNodes.isEmpty()) { if (offlineCpus > 0) { int numaCount = vmNumaNodes.size(); int index = onlineCpus; for (VmNumaNode vmNode : vmNumaNodes) { if (numaCount <= 0) { break; } for (int i = vmNode.getCpuIds().size(); i < vcpus / numaCount; i++) { vmNode.getCpuIds().add(index++); } vcpus -= vcpus / numaCount; --numaCount; } } return vmNumaNodes; } if (offlineCpus > 0) { VmNumaNode vmNode = new VmNumaNode(); vmNode.setIndex(0); vmNode.setMemTotal(vm.getMemSizeMb()); for (int i = 0; i < vcpus; i++) { vmNode.getCpuIds().add(i); } return Collections.singletonList(vmNode); } return Collections.emptyList(); }
Source:
<code>public void beforeLoadGame() { <START> String fileName = "world.ini"; <END> if (SaveManager.resourceExists(fileName)) { IniReader ir = new IniReader(fileName, null); long seed = Long.parseLong(ir.getString("seed", "0")); logger.info("Got seed: " + String.valueOf(seed)); SolRandom.setSeed(seed); } }</code><technical_language>this a final variable</technical_language>

Target:
private void beforeLoadGame() { if (SaveManager.resourceExists(WORLD_SAVE_FILE_NAME)) { IniReader iniReader = new IniReader(WORLD_SAVE_FILE_NAME, null); long seed = Long.parseLong(iniReader.getString("seed", "0")); logger.info("Got seed: " + String.valueOf(seed)); SolRandom.setSeed(seed); } }
Source:
<code>private Measure(MeasureDto measureDto) { <START> this.value = measureDto.getValue(); <END> this.data = measureDto.getData(); this.variation = measureDto.getVariation(); }</code><technical_language>Instead of fields Double, double Double.NaN field is supposed null</technical_language>

Target:
private Measure(MeasureDto measureDto) { this.value = toPrimitive(measureDto.getValue()); this.data = measureDto.getData(); this.variation = toPrimitive(measureDto.getVariation()); }
Source:
<code>private void UpdateVmNetworks() { if (!Objects.equals(getVm().getVdsGroupId(), getParameters().getVmStaticData().getVdsGroupId())) { List<Network> networks = getNetworkDao().getAllForCluster(getParameters().getVmStaticData().getVdsGroupId()); List<VmNic> interfaces = getVmNicDao().getAllForVm(getParameters().getVmStaticData().getId()); for (final VmNic iface : interfaces) { final Network network = NetworkHelper.getNetworkByVnicProfileId(iface.getVnicProfileId()); <START> boolean networkFound = networks.stream().allMatch(n -> ObjectUtils.equals(n.getId(), network.getId())); <END> if (!networkFound) { iface.setVnicProfileId(null); getVmNicDao().update(iface); } } } }</code><technical_language>meant anyMatch, right</technical_language>

Target:
private void UpdateVmNetworks() { if (!Objects.equals(getVm().getVdsGroupId(), getParameters().getVmStaticData().getVdsGroupId())) { List<Network> networks = getNetworkDao().getAllForCluster(getParameters().getVmStaticData().getVdsGroupId()); List<VmNic> interfaces = getVmNicDao().getAllForVm(getParameters().getVmStaticData().getId()); for (final VmNic iface : interfaces) { final Network network = NetworkHelper.getNetworkByVnicProfileId(iface.getVnicProfileId()); boolean networkFound = networks.stream().anyMatch(n -> ObjectUtils.equals(n.getId(), network.getId())); if (!networkFound) { iface.setVnicProfileId(null); getVmNicDao().update(iface); } } } }
Source:
<code>protected Map<Guid, Guid> addAllTemplateDisks() { <START> CreateAllTemplateDisksParameters parameters = new CreateAllTemplateDisksParameters(getVm() != null ? getVmId() : Guid.Empty); parameters.setVmTemplateId(getVmTemplateId()); parameters.setVmTemplateName(getVmTemplateName()); parameters.setDiskInfoDestinationMap(diskInfoDestinationMap); parameters.setTargetDiskIds(targetDiskIds); parameters.setParentCommand(getActionType()); parameters.setParentParameters(getParameters()); parameters.setEndProcedure(EndProcedure.COMMAND_MANAGED); <END> VdcReturnValueBase returnValue = runInternalAction( getAddAllTemplateDisksActionType(), parameters, ExecutionHandler.createDefaultContextForTasks(getContext())); if (!returnValue.getSucceeded()) { throw new EngineException(returnValue.getFault().getError(), returnValue.getFault().getMessage()); } return returnValue.getActionReturnValue(); }</code><technical_language>please extract a separate method (something buildAddAllTemplateDisksParameters)</technical_language>

Target:
protected Map<Guid, Guid> addAllTemplateDisks() { VdcReturnValueBase returnValue = runInternalAction( getAddAllTemplateDisksActionType(), buildCreateAllTemplateDisksParameters(), ExecutionHandler.createDefaultContextForTasks(getContext())); if (!returnValue.getSucceeded()) { throw new EngineException(returnValue.getFault().getError(), returnValue.getFault().getMessage()); } return returnValue.getActionReturnValue(); }
Source:
<code><START> public void propertyChange(PropertyChangeEvent event) { <END> if (event.getOldValue() != event.getNewValue()) { if (event.getPropertyName().equals(RenderingConfig.REFLECTIVE_WATER)) { requiresCondition(() -> renderingConfig.isReflectiveWater()); } else if (event.getPropertyName().equals(RenderingConfig.NORMAL_MAPPING)) { isNormalMapping = renderingConfig.isNormalMapping(); if (isNormalMapping) { addDesiredStateChange(setNormalTerrain); if (isParallaxMapping) { addDesiredStateChange(setHeightTerrain); } } else { removeDesiredStateChange(setNormalTerrain); if (isParallaxMapping) { removeDesiredStateChange(setHeightTerrain); } } } else { isParallaxMapping = renderingConfig.isParallaxMapping(); if (isNormalMapping) { if (isParallaxMapping) { addDesiredStateChange(setHeightTerrain); } else { removeDesiredStateChange(setHeightTerrain); } } } worldRenderer.requestTaskListRefresh(); } }</code><technical_language>This method exact duplicate of method in another classes: obtained inheritance instead</technical_language>

Target:
public void propertyChange(PropertyChangeEvent event) { if (event.getPropertyName().equals(RenderingConfig.REFLECTIVE_WATER)) { requiresCondition(() -> renderingConfig.isReflectiveWater()); } else if (event.getPropertyName().equals(RenderingConfig.NORMAL_MAPPING)) { isNormalMapping = renderingConfig.isNormalMapping(); if (isNormalMapping) { addDesiredStateChange(setNormalTerrain); if (isParallaxMapping) { addDesiredStateChange(setHeightTerrain); } } else { removeDesiredStateChange(setNormalTerrain); if (isParallaxMapping) { removeDesiredStateChange(setHeightTerrain); } } } else if (event.getPropertyName().equals(RenderingConfig.PARALLAX_MAPPING)) { isParallaxMapping = renderingConfig.isParallaxMapping(); if (isNormalMapping) { if (isParallaxMapping) { addDesiredStateChange(setHeightTerrain); } else { removeDesiredStateChange(setHeightTerrain); } } } worldRenderer.requestTaskListRefresh(); }
Source:
<code><START> public Guid getId() { <END> return clusterId; }</code><technical_language>Should'nt getter name getClusteId if field name is clusterId</technical_language>

Target:
public Guid getId() { return id; }
Source:
<code>public WebAppMonitor waitForAtLeastOneAttempt() { <START> return waitForAtLeastOneAttempt(Duration.of(30, TimeUnit.SECONDS)); <END> }</code><technical_language>Provide class constant for default timeout value? Reference in brooklyn.test.Asserts</technical_language>

Target:
public WebAppMonitor waitForAtLeastOneAttempt() { return waitForAtLeastOneAttempt(Asserts.DEFAULT_TIMEOUT); }
Source:
<code>public void scan() throws IOException { if (!rowGroupOpen) { openRowGroup(); } beginScan(presentStream, null); ensureValuesCapacity(); makeInnerQualifyingSet(); QualifyingSet input = hasNulls ? innerQualifyingSet : inputQualifyingSet; if (input.getPositionCount() > 0) { <START> resultsProcessor.reset(); <END> if (filter != null) { int numInput = input.getPositionCount(); outputQualifyingSet.reset(numInput); resultsProcessor.reset(); numInnerResults = dataStream.scan(input.getPositions(), 0, numInput, input.getEnd(), resultsProcessor); outputQualifyingSet.setPositionCount(numInnerResults); } else { resultsProcessor.reset(); numInnerResults = dataStream.scan(input.getPositions(), 0, input.getPositionCount(), input.getEnd(), resultsProcessor); } } if (hasNulls) { innerPosInRowGroup = innerQualifyingSet.getEnd(); } addNullsAfterScan(filter != null ? outputQualifyingSet : inputQualifyingSet, inputQualifyingSet.getEnd()); if (filter != null) { outputQualifyingSet.setEnd(inputQualifyingSet.getEnd()); } endScan(presentStream); }</code><technical_language>This change is unnecessary</technical_language>

Target:
public void scan() throws IOException { if (!rowGroupOpen) { openRowGroup(); } beginScan(presentStream, null); ensureValuesCapacity(); makeInnerQualifyingSet(); QualifyingSet input = hasNulls ? innerQualifyingSet : inputQualifyingSet; if (input.getPositionCount() > 0) { if (filter != null) { int numInput = input.getPositionCount(); outputQualifyingSet.reset(numInput); resultsProcessor.reset(); numInnerResults = dataStream.scan(input.getPositions(), 0, numInput, input.getEnd(), resultsProcessor); outputQualifyingSet.setPositionCount(numInnerResults); } else { resultsProcessor.reset(); numInnerResults = dataStream.scan(input.getPositions(), 0, input.getPositionCount(), input.getEnd(), resultsProcessor); } } if (hasNulls) { innerPosInRowGroup = innerQualifyingSet.getEnd(); } addNullsAfterScan(filter != null ? outputQualifyingSet : inputQualifyingSet, inputQualifyingSet.getEnd()); if (filter != null) { outputQualifyingSet.setEnd(inputQualifyingSet.getEnd()); } endScan(presentStream); }
Source:
<code>public void shouldUpgradeLiquibase() { try { upgradeTestUtil.upgrade("liquibase-master.xml"); } catch (Exception e) { <START> e.printStackTrace(); <END> Assert.fail(); } }</code><technical_language>forget remove printStackTrace? :)</technical_language>

Target:
public void shouldUpgradeLiquibase() throws IOException, SQLException { upgradeTestUtil.upgrade("liquibase-master.xml"); }
Source:
<code>public <K> void setTimer(K key, long timestamp, ScheduledCallback<K> callback) { if (scheduledFutures.containsKey(key)) { LOG.warn("Registering duplicate callback for key: {}. Attempting to cancel the previous callback", key); ScheduledFuture<?> scheduledFuture = scheduledFutures.get(key); if (scheduledFuture != null && !scheduledFuture.cancel(false) && !scheduledFuture.isDone()) { <START> LOG.debug("Failed to cancel the previous callback successfully. Ignoring the current request to register new callback"); <END> return; } } final long delay = timestamp - System.currentTimeMillis(); final ScheduledFuture<?> scheduledFuture = executor.schedule(() -> { scheduledFutures.remove(key); readyTimers.put(TimerKey.of(key, timestamp), callback); if (timerListener != null) { timerListener.onTimer(); } }, delay > 0 ? delay : 0, TimeUnit.MILLISECONDS); scheduledFutures.put(key, scheduledFuture); }</code><technical_language>need this warn level logging here</technical_language>

Target:
public <K> void setTimer(K key, long timestamp, ScheduledCallback<K> callback) { if (scheduledFutures.containsKey(key)) { LOG.warn("Registering duplicate callback for key: {}. Attempting to cancel the previous callback", key); ScheduledFuture<?> scheduledFuture = scheduledFutures.get(key); if (scheduledFuture != null && !scheduledFuture.cancel(false) && !scheduledFuture.isDone()) { LOG.warn("Failed to cancel the previous callback successfully. Ignoring the current request to register new callback"); return; } } final long delay = timestamp - System.currentTimeMillis(); final ScheduledFuture<?> scheduledFuture = executor.schedule(() -> { scheduledFutures.remove(key); readyTimers.put(TimerKey.of(key, timestamp), callback); if (timerListener != null) { timerListener.onTimer(); } }, delay > 0 ? delay : 0, TimeUnit.MILLISECONDS); scheduledFutures.put(key, scheduledFuture); }
Source:
<code>public void setUp() { assertTrue(CtfTmfTestTrace.SYNC_SRC.exists()); <START> assertTrue(CtfTmfTestTrace.SYNC_DEST.exists()); <END> CtfTmfTrace trace1 = CtfTmfTestTrace.SYNC_SRC.getTrace(); CtfTmfTrace trace2 = CtfTmfTestTrace.SYNC_DEST.getTrace(); fTraces = new CtfTmfTrace[2]; fTraces[0] = trace1; fTraces[1] = trace2; fExperiment = new TmfExperiment(trace1.getEventType(), EXPERIMENT, fTraces, BLOCK_SIZE); TmfEventMatching.registerMatchObject(new TcpEventMatching()); TmfEventMatching.registerMatchObject(new TcpLttngEventMatching()); }</code><technical_language>assumeTrue(), test is skipped if test trace is present, instead of failing? This happen offline builds</technical_language>

Target:
public void setUp() { assumeTrue(CtfTmfTestTrace.SYNC_SRC.exists()); assumeTrue(CtfTmfTestTrace.SYNC_DEST.exists()); CtfTmfTrace trace1 = CtfTmfTestTrace.SYNC_SRC.getTrace(); CtfTmfTrace trace2 = CtfTmfTestTrace.SYNC_DEST.getTrace(); fTraces = new CtfTmfTrace[2]; fTraces[0] = trace1; fTraces[1] = trace2; fExperiment = new TmfExperiment(trace1.getEventType(), EXPERIMENT, fTraces, BLOCK_SIZE); TmfEventMatching.registerMatchObject(new TcpEventMatching()); TmfEventMatching.registerMatchObject(new TcpLttngEventMatching()); }
Source:
<code><START> public URL getURL(String protocol) { <END> try { URL url = new URL(protocol, getAddress(), getPort(),""); return url; } catch (MalformedURLException e) { logger.error("Telemetry server URL mal formed", e); return null; } }</code><technical_language>Returning a class instance _or_ a null? This calls for [Optional](<LINK_0></technical_language>

Target:
public Optional<URL> getURL(String protocol) { Optional<URL> optional; try { URL url = new URL(protocol, getAddress(), getPort(), ""); optional = Optional.of(url); } catch (MalformedURLException e) { logger.error("Telemetry server URL mal formed", e); optional = Optional.ofNullable(null); } return optional; }
Source:
<code>@Override public Color getColor() { if (this.shadedColor == null) { <START> this.shadedColor = shadeColor(((net.minecraft.block.material.MapColor)baseColor).colorValue, shade); <END> } return this.shadedColor; }</code><technical_language>Spacing</technical_language>

Target:
public Color getColor() { if (this.shadedColor == null) { this.shadedColor = shadeColor(((net.minecraft.block.material.MapColor) baseColor).colorValue, shade); } return this.shadedColor; }
Source:
<code>public ScriptEngineContainer createScriptEngine(String fileExtension, String scriptIdentifier) { ScriptEngineContainer result = null; ScriptEngineProvider engineProvider = findProvider(fileExtension); if (engineProvider == null) { logger.error("loadScript(): scriptengine for language '{}' could not be found for identifier: {}", fileExtension, scriptIdentifier); } else { try { ScriptEngine engine = engineProvider.createScriptEngine(fileExtension); HashMap<String, Object> scriptExManager = new HashMap<>(); result = new ScriptEngineContainer(engine, engineProvider, scriptIdentifier); scriptExManager.put("ScriptExtension", new ScriptExtensionManagerWrapper(result, scriptExtensionManager)); engineProvider.scopeValues(engine, scriptExManager); <START> scriptExtensionManager.importDefaultPresets(engineProvider, engine, scriptIdentifier); <END> loadedScriptEngineInstances.put(scriptIdentifier, result); } catch (Exception ex) { logger.error("Error while creating ScriptEngine", ex); removeScriptExtensions(scriptIdentifier); } } return result; }</code><technical_language>NPEs this line latest commits. I able determine scriptExtensionManager is null</technical_language>

Target:
public ScriptEngineContainer createScriptEngine(String fileExtension, String scriptIdentifier) { ScriptEngineContainer result = null; ScriptEngineFactory engineProvider = findEngineFactory(fileExtension); if (engineProvider == null) { logger.error("loadScript(): scriptengine for language '{}' could not be found for identifier: {}", fileExtension, scriptIdentifier); } else { try { ScriptEngine engine = engineProvider.createScriptEngine(fileExtension); HashMap<String, Object> scriptExManager = new HashMap<>(); result = new ScriptEngineContainer(engine, engineProvider, scriptIdentifier); ScriptExtensionManagerWrapper wrapper = new ScriptExtensionManagerWrapper(result); scriptExManager.put("scriptExtension", wrapper); scriptExManager.put("se", wrapper); engineProvider.scopeValues(engine, scriptExManager); ScriptExtensionManager.importDefaultPresets(engineProvider, engine, scriptIdentifier); loadedScriptEngineInstances.put(scriptIdentifier, result); } catch (Exception ex) { logger.error("Error while creating ScriptEngine", ex); removeScriptExtensions(scriptIdentifier); } } return result; }
Source:
<code>public void testJSMetaData() { String replyTo = "$JS.ACK.test-stream.test-consumer.1.2.3.1605139610113260000"; <START> Message msg = new NatsMessage.IncomingBuilder("sid", "subj", replyTo, 0).getMessage(); <END> assertTrue(msg.isJetStream()); MessageMetaData jsmd = msg.metaData(); assertNotNull(jsmd); assertEquals("test-stream", jsmd.getStream()); assertEquals("test-consumer", jsmd.getConsumer()); assertEquals(1, jsmd.deliveredCount()); assertEquals(2, jsmd.streamSequence()); assertEquals(3, jsmd.consumerSequence()); assertEquals(2020, jsmd.timestamp().getYear()); assertEquals(6, jsmd.timestamp().getMinute()); assertEquals(113260000, jsmd.timestamp().getNano()); }</code><technical_language>for this PR, good some point open creation of JS messages. Users testing application code benefit easy artificially create JS messages</technical_language>

Target:
public void testJSMetaData() { String replyTo = "$JS.ACK.test-stream.test-consumer.1.2.3.1605139610113260000"; Message msg = new IncomingMessageFactory("sid", "subj", replyTo, 0, false).getMessage(); assertTrue(msg.isJetStream()); MessageMetaData jsmd = msg.metaData(); assertNotNull(jsmd); assertEquals("test-stream", jsmd.getStream()); assertEquals("test-consumer", jsmd.getConsumer()); assertEquals(1, jsmd.deliveredCount()); assertEquals(2, jsmd.streamSequence()); assertEquals(3, jsmd.consumerSequence()); assertEquals(2020, jsmd.timestamp().getYear()); assertEquals(6, jsmd.timestamp().getMinute()); assertEquals(113260000, jsmd.timestamp().getNano()); }
Source:
<code>public static Map<String, Object> getLaunchConfigDataAsMap(Service service, String launchConfigName) { if (launchConfigName == null) { launchConfigName = ServiceConstants.PRIMARY_LAUNCH_CONFIG_NAME; } Map<String, Object> launchConfigData = new HashMap<>(); if (launchConfigName.equalsIgnoreCase(ServiceConstants.PRIMARY_LAUNCH_CONFIG_NAME)) { launchConfigData = DataAccessor.fields(service) .withKey(ServiceConstants.FIELD_LAUNCH_CONFIG).withDefault(Collections.EMPTY_MAP) .as(Map.class); <START> for (String key: launchConfigData.keySet()) { <END> if (launchConfigData.get(key) == null) { launchConfigData.remove(key); } } } else { List<Map<String, Object>> secondaryLaunchConfigs = DataAccessor.fields(service) .withKey(ServiceConstants.FIELD_SECONDARY_LAUNCH_CONFIGS) .withDefault(Collections.EMPTY_LIST).as( List.class); for (Map<String, Object> secondaryLaunchConfig : secondaryLaunchConfigs) { if (secondaryLaunchConfig.get("name").toString().equalsIgnoreCase(launchConfigName)) { launchConfigData = secondaryLaunchConfig; break; } } } Map<String, Object> data = new HashMap<>(); data.putAll(launchConfigData); Object labels = data.get(ServiceDiscoveryConfigItem.LABELS.getCattleName()); if (labels != null) { Map<String, String> labelsMap = new HashMap<String, String>(); labelsMap.putAll((Map<String, String>) labels); data.put(ServiceDiscoveryConfigItem.LABELS.getCattleName(), labelsMap); } return data; }</code><technical_language>is safe remove key map while iterating it. introduce some temporary for iteration (and addAll items original launchConfigData); remove form launchConfigData work</technical_language>

Target:
public static Map<String, Object> getLaunchConfigDataAsMap(Service service, String launchConfigName) { if (launchConfigName == null) { launchConfigName = ServiceConstants.PRIMARY_LAUNCH_CONFIG_NAME; } Map<String, Object> launchConfigData = new HashMap<>(); if (launchConfigName.equalsIgnoreCase(ServiceConstants.PRIMARY_LAUNCH_CONFIG_NAME)) { launchConfigData = DataAccessor.fields(service) .withKey(ServiceConstants.FIELD_LAUNCH_CONFIG).withDefault(Collections.EMPTY_MAP) .as(Map.class); ArrayList<String> deletedKeys = new ArrayList<>(); for (String key: launchConfigData.keySet()) { if (launchConfigData.get(key) == null) { deletedKeys.add(key); } } for (String key: deletedKeys) { launchConfigData.remove(key); } } else { List<Map<String, Object>> secondaryLaunchConfigs = DataAccessor.fields(service) .withKey(ServiceConstants.FIELD_SECONDARY_LAUNCH_CONFIGS) .withDefault(Collections.EMPTY_LIST).as( List.class); for (Map<String, Object> secondaryLaunchConfig : secondaryLaunchConfigs) { if (secondaryLaunchConfig.get("name").toString().equalsIgnoreCase(launchConfigName)) { launchConfigData = secondaryLaunchConfig; break; } } } Map<String, Object> data = new HashMap<>(); data.putAll(launchConfigData); Object labels = data.get(ServiceDiscoveryConfigItem.LABELS.getCattleName()); if (labels != null) { Map<String, String> labelsMap = new HashMap<String, String>(); labelsMap.putAll((Map<String, String>) labels); data.put(ServiceDiscoveryConfigItem.LABELS.getCattleName(), labelsMap); } return data; }
Source:
<code>public String getText(Object object) { Match match = (Match)object; String ret = itemDelegator.getText(match.getLeft()); if (isNullOrEmpty(ret)) { ret = itemDelegator.getText(match.getOrigin()); } if (isNullOrEmpty(ret)) { ret = itemDelegator.getText(match.getRight()); } if (isNullOrEmpty(ret)) { if (match instanceof NotLoadedFragmentMatch) { ret = "[ ... ]"; String name = ((NotLoadedFragmentMatch)match).getName(); if (!isNullOrEmpty(name)) { ret += " (" + name + ")"; } } else { Adapter adapter = EcoreUtil.getAdapter(match.eAdapters(), MatchOfContainmentReferenceChangeAdapter.class); if (adapter instanceof MatchOfContainmentReferenceChangeAdapter) { ReferenceChange referenceChange = ((MatchOfContainmentReferenceChangeAdapter)adapter) .getReferenceChange(); if (referenceChange != null) { <START> ret = new ReferenceChangeItemProviderSpec(getRootAdapterFactory()) <END> .getValueText(referenceChange); } } else { ret = super.getText(object); } } } return ret; }</code><technical_language>Try get adapter reference change</technical_language>

Target:
public String getText(Object object) { Match match = (Match)object; String ret = itemDelegator.getText(match.getLeft()); if (isNullOrEmpty(ret)) { ret = itemDelegator.getText(match.getOrigin()); } if (isNullOrEmpty(ret)) { ret = itemDelegator.getText(match.getRight()); } if (isNullOrEmpty(ret)) { if (match instanceof NotLoadedFragmentMatch) { ret = "[ ... ]"; String name = ((NotLoadedFragmentMatch)match).getName(); if (!isNullOrEmpty(name)) { ret += " (" + name + ")"; } } else { Adapter matchAdapter = EcoreUtil.getAdapter(match.eAdapters(), MatchOfContainmentReferenceChangeAdapter.class); if (matchAdapter instanceof MatchOfContainmentReferenceChangeAdapter) { ReferenceChange referenceChange = ((MatchOfContainmentReferenceChangeAdapter)matchAdapter) .getReferenceChange(); Adapter rcAdapter = null; if (referenceChange != null) { rcAdapter = EcoreUtil.getAdapter(referenceChange.eAdapters(), ReferenceChangeItemProviderSpec.class); } if (rcAdapter instanceof ReferenceChangeItemProviderSpec) { ret = ((ReferenceChangeItemProviderSpec)rcAdapter).getValueText(referenceChange); } } if (isNullOrEmpty(ret)) { ret = super.getText(object); } } } return ret; }
Source:
<code>private void migrateEntriesWithMetadata(RemoteCache<Object, Object> sourceCache, AtomicInteger counter) { try (CloseableIterator<Map.Entry<Object, MetadataValue<Object>>> iterator = sourceCache.retrieveEntriesWithMetadata(segments, readBatch)) { while (iterator.hasNext()) { Map.Entry<Object, MetadataValue<Object>> entry = iterator.next(); if (!Arrays.equals((byte[]) entry.getKey(), ignoredKey)) { MetadataValue<Object> metadataValue = entry.getValue(); int lifespan = metadataValue.getLifespan(); int maxIdle = metadataValue.getMaxIdle(); long version = metadataValue.getVersion(); long created = metadataValue.getCreated(); long lastUsed = metadataValue.getLastUsed(); Metadata metadata = new EmbeddedMetadata.Builder() .version(new NumericVersion(version)) .lifespan(lifespan, TimeUnit.SECONDS) .maxIdle(maxIdle, TimeUnit.SECONDS) .build(); InternalMetadataImpl internalMetadata = new InternalMetadataImpl(metadata, created, lastUsed); executorService.submit(() -> { Object key = entry.getKey(); if (!deletedKeys.contains(new WrappedByteArray((byte[]) key))) { cache.getAdvancedCache().withFlags(Flag.SKIP_CACHE_LOAD, Flag.ROLLING_UPGRADE).putIfAbsent(entry.getKey(), entry.getValue().getValue(), internalMetadata); } int currentCount = counter.incrementAndGet(); if (log.isDebugEnabled() && currentCount % 100 == 0) <START> log.debugf(">> Migrated %s entries\n", currentCount); <END> }); } } } }</code><technical_language>if this is faster batches of inserts instead of 1 callable per</technical_language>

Target:
private void migrateEntriesWithMetadata(RemoteCache<Object, Object> sourceCache, AtomicInteger counter) { try (CloseableIterator<Map.Entry<Object, MetadataValue<Object>>> iterator = sourceCache.retrieveEntriesWithMetadata(segments, readBatch)) { while (iterator.hasNext() && !Thread.currentThread().isInterrupted()) { Map.Entry<Object, MetadataValue<Object>> entry = iterator.next(); if (!Arrays.equals((byte[]) entry.getKey(), ignoredKey)) { MetadataValue<Object> metadataValue = entry.getValue(); int lifespan = metadataValue.getLifespan(); int maxIdle = metadataValue.getMaxIdle(); long version = metadataValue.getVersion(); long created = metadataValue.getCreated(); long lastUsed = metadataValue.getLastUsed(); Metadata metadata = new EmbeddedMetadata.Builder() .version(new NumericVersion(version)) .lifespan(lifespan, TimeUnit.SECONDS) .maxIdle(maxIdle, TimeUnit.SECONDS) .build(); InternalMetadataImpl internalMetadata = new InternalMetadataImpl(metadata, created, lastUsed); executorService.submit(() -> { Object key = entry.getKey(); if (!deletedKeys.contains(new WrappedByteArray((byte[]) key))) { cache.getAdvancedCache().withFlags(Flag.SKIP_CACHE_LOAD, Flag.ROLLING_UPGRADE).putIfAbsent(entry.getKey(), entry.getValue().getValue(), internalMetadata); } int currentCount = counter.incrementAndGet(); if (log.isDebugEnabled() && currentCount % 100 == 0) log.debugf(">> Migrated %s entries\n", currentCount); }); } } } }
Source:
<code>public void observe(@Observes AfterBeanDiscovery event, BeanManager beanManager) throws IOException, ClassNotFoundException { Index index = classPathIndexer.createIndex(); List<AnnotationInstance> annotations = index.getAnnotations(DotName.createSimple("javax.ws.rs.Path")); for (AnnotationInstance annotation : annotations) { if (!annotation.target().kind().equals(AnnotationTarget.Kind.CLASS)) { continue; } Class<?> clazz = getClass().getClassLoader().loadClass(annotation.target().asClass().name().toString()); LRAParticipant participant = processJavaClass(clazz); if (participant != null) { participants.put(participant.getId().getName(), participant); Set<Bean<?>> participantBeans = beanManager.getBeans(clazz, new AnnotationLiteral<Any>() {}); if (participantBeans.isEmpty()) { event.addBean() .read(beanManager.createAnnotatedType(clazz)) .beanClass(clazz) .scope(ApplicationScoped.class) .name(clazz.getName()); } <START> } <END> } event.addBean() .read(beanManager.createAnnotatedType(LRAParticipantRegistry.class)) .beanClass(LRAParticipantRegistry.class) .scope(ApplicationScoped.class) .createWith(context -> new LRAParticipantRegistry(participants)); }</code><technical_language>do need turn resource a bean</technical_language>

Target:
public void observe(@Observes AfterBeanDiscovery event, BeanManager beanManager) throws IOException, ClassNotFoundException { Index index = classPathIndexer.createIndex(); List<AnnotationInstance> annotations = index.getAnnotations(DotName.createSimple("javax.ws.rs.Path")); for (AnnotationInstance annotation : annotations) { ClassInfo classInfo; AnnotationTarget target = annotation.target(); if (target.kind().equals(AnnotationTarget.Kind.CLASS)) { classInfo = target.asClass(); } else if (target.kind().equals(AnnotationTarget.Kind.METHOD)) { classInfo = target.asMethod().declaringClass(); } else { continue; } LRAParticipant participant = getAsParticipant(classInfo); if (participant != null) { participants.put(participant.getJavaClass().getName(), participant); Set<Bean<?>> participantBeans = beanManager.getBeans(participant.getJavaClass(), new AnnotationLiteral<Any>() {}); if (participantBeans.isEmpty()) { try { participant.setInstance(participant.getJavaClass().newInstance()); } catch (InstantiationException | IllegalAccessException e) { LRALogger.i18NLogger.error_cannotProcessParticipant(e); } } } } event.addBean() .read(beanManager.createAnnotatedType(LRAParticipantRegistry.class)) .beanClass(LRAParticipantRegistry.class) .scope(ApplicationScoped.class) .createWith(context -> new LRAParticipantRegistry(participants)); }
Source:
<code>protected void deleteBreakpointFromTarget(final IBreakpointsTargetDMContext context, final int reference, RequestMonitor finalRm) { final Step deleteBreakpointStep = new Step() { @Override public void execute(final RequestMonitor rm) { fConnection.queueCommand(fCommandFactory.createMIBreakDelete(context, new int[] { reference }), new DataRequestMonitor<MIInfo>(getExecutor(), rm) { @Override <START> protected void handleCompleted() { <END> rm.setStatus(getStatus()); rm.done(); } }); } }; fRunControl.executeWithTargetAvailable(context, new Step[] { deleteBreakpointStep }, finalRm); }</code><technical_language>I guess is point in overriding handleCompleted() anymore. base one, no</technical_language>

Target:
protected void deleteBreakpointFromTarget(final IBreakpointsTargetDMContext context, final int reference, RequestMonitor finalRm) { final Step deleteBreakpointStep = new Step() { @Override public void execute(final RequestMonitor rm) { fConnection.queueCommand( fCommandFactory.createMIBreakDelete(context, new int[] { reference }), new DataRequestMonitor<MIInfo>(getExecutor(), rm)); } }; fRunControl.executeWithTargetAvailable(context, new Step[] { deleteBreakpointStep }, finalRm); }