auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private DockerClient createDockerClient(final AgentConfig config) { final DefaultDockerClient.Builder builder = DefaultDockerClient.builder() .uri(config.getDockerHost().uri()) <START> .connectionPoolSize(config.getConnectionPoolSize()); <END> if (!isNullOrEmpty(config.getDockerHost().dockerCertPath())) { final Path dockerCertPath = java.nio.file.Paths.get(config.getDockerHost().dockerCertPath()); final DockerCertificates dockerCertificates; try { dockerCertificates = new DockerCertificates(dockerCertPath); } catch (DockerCertificateException e) { throw Throwables.propagate(e); } builder.dockerCertificates(dockerCertificates); } return new PollingDockerClient(builder); }</code><technical_language>I call .connectionPoolSize(int) if flag is for helios-agent, default resides DefaultDockerClient.Builder class today</technical_language>

Target:
private DockerClient createDockerClient(final AgentConfig config) { final DefaultDockerClient.Builder builder = DefaultDockerClient.builder() .uri(config.getDockerHost().uri()); if (config.getConnectionPoolSize() != -1) { builder.connectionPoolSize(config.getConnectionPoolSize()); } if (!isNullOrEmpty(config.getDockerHost().dockerCertPath())) { final Path dockerCertPath = java.nio.file.Paths.get(config.getDockerHost().dockerCertPath()); final DockerCertificates dockerCertificates; try { dockerCertificates = new DockerCertificates(dockerCertPath); } catch (DockerCertificateException e) { throw Throwables.propagate(e); } builder.dockerCertificates(dockerCertificates); } return new PollingDockerClient(builder); }
Source:
<code>private List getListFromSerializableCollection(Collection<?> objects) { List serializableItems = new ArrayList<>(objects.size()); <START> Iterator<? extends Object> iterator = objects.iterator(); <END> while (iterator.hasNext()) { Object o = iterator.next(); serializableItems.add(o); } return serializableItems; }</code><technical_language>serializableItems.addAll(objects); instead of iterating collection</technical_language>

Target:
private List getListFromSerializableCollection(Collection<?> objects) { List serializableItems = new ArrayList<>(objects.size()); serializableItems.addAll(objects); return serializableItems; }
Source:
<code>private void ttsSpeak(String text, int queue, String utteranceId) { <START> if (BuildConfig.DEBUG && !(state == State.PLAYING || isTTSInitialized)) { <END> throw new AssertionError(); } if (text != null) { HashMap params = this.utteranceParams; if ( ! utteranceId.equals(params.get("utteranceId"))) { params = new HashMap(); params.put("utteranceId", utteranceId); this.utteranceParams = params; } this.tts.speak(text, queue, params); } }</code><technical_language>.. State.PLAYING && isTTSInitialized ..</technical_language>

Target:
private void ttsSpeak(String text, int queue, String utteranceId) { if (BuildConfig.DEBUG && !(state == State.PLAYING && isTTSInitialized)) { throw new AssertionError(); } if (text != null) { HashMap params = this.utteranceParams; if ( ! utteranceId.equals(params.get("utteranceId"))) { params = new HashMap(); params.put("utteranceId", utteranceId); this.utteranceParams = params; } this.tts.speak(text, queue, params); } }
Source:
<code>public Object getElementToHighlightAtPosition(View element, int x, int y, Rect bounds) { <START> if (element instanceof ViewGroup) { <END> final ViewGroup vg = (ViewGroup) element; for (int i = 0, count = vg.getChildCount(); i < count; ++i) { final View child = vg.getChildAt(i); child.getHitRect(bounds); if (bounds.contains(x, y)) { return child; } } } bounds.set(0, 0, element.getWidth(), element.getHeight()); return element; }</code><technical_language>this implemented in ViewGroupDescriptor</technical_language>

Target:
public Object getElementToHighlightAtPosition(View element, int x, int y, Rect bounds) { bounds.set(0, 0, element.getWidth(), element.getHeight()); return element; }
Source:
<code>public Attribute getAttributeValue(PerunSessionImpl sess, User user, AttributeDefinition destinationAttributeDefinition) throws InternalErrorException { Attribute destinationAttribute = new Attribute(destinationAttributeDefinition); List<String> values = new ArrayList<>(); String sourceAttributeFriendlyName = getSourceAttributeFriendlyName(); List<UserExtSource> userExtSources = sess.getPerunBl().getUsersManagerBl().getUserExtSources(sess, user); AttributesManagerBl am = sess.getPerunBl().getAttributesManagerBl(); for (UserExtSource userExtSource : userExtSources) { try { Attribute a = am.getAttribute(sess, userExtSource, AttributesManager.NS_UES_ATTR_DEF + ":" + sourceAttributeFriendlyName); Object value = a.getValue(); if (value != null && value instanceof String) { String[] rawValues = ((String) value).split(";"); for(String rawValue: rawValues) { String modifiedValue = modifyValue(rawValue); if(modifiedValue != null && !modifiedValue.isEmpty()) { <START> if(!values.contains(rawValue)) values.add(modifiedValue); <END> } } } } catch (WrongAttributeAssignmentException | AttributeNotExistsException e) { log.error("cannot read " + sourceAttributeFriendlyName + " from userExtSource " + userExtSource.getId() + " of user " + user.getId(), e); } } destinationAttribute.setValue(values); return destinationAttribute; }</code><technical_language>This if(!values.contains(modifiedValue)) values.add(modifiedValue); in previous if condition &&</technical_language>

Target:
public Attribute getAttributeValue(PerunSessionImpl sess, User user, AttributeDefinition destinationAttributeDefinition) throws InternalErrorException { Attribute destinationAttribute = new Attribute(destinationAttributeDefinition); Set<String> valuesWithoutDuplicities = new HashSet<>(); String sourceAttributeFriendlyName = getSourceAttributeFriendlyName(); List<UserExtSource> userExtSources = sess.getPerunBl().getUsersManagerBl().getUserExtSources(sess, user); AttributesManagerBl am = sess.getPerunBl().getAttributesManagerBl(); for (UserExtSource userExtSource : userExtSources) { try { Attribute a = am.getAttribute(sess, userExtSource, AttributesManager.NS_UES_ATTR_DEF + ":" + sourceAttributeFriendlyName); Object value = a.getValue(); if (value != null && value instanceof String) { String[] rawValues = ((String) value).split(";"); Arrays.stream(rawValues).map(this::modifyValue).filter(Objects::nonNull).forEachOrdered(valuesWithoutDuplicities::add); } } catch (WrongAttributeAssignmentException | AttributeNotExistsException e) { log.error("cannot read " + sourceAttributeFriendlyName + " from userExtSource " + userExtSource.getId() + " of user " + user.getId(), e); } } destinationAttribute.setValue(new ArrayList<>(valuesWithoutDuplicities)); return destinationAttribute; }
Source:
<code>public void removeRepositories(Space space, Set<String> aliases) { try { configurationService.startBatch(); OrganizationalUnit orgUnit = Optional .ofNullable(organizationalUnitService.getOrganizationalUnit(space.getName())) .orElseThrow(() -> new IllegalArgumentException(String .format("The given space [%s] does not correspond to any known organizational unit.", space.getName()))); <START> List<Repository> removedRepos = new ArrayList<>(); <END> for (final String alias : aliases) { doRemoveRepository(orgUnit, alias, findRepositoryConfig(alias), repo -> removedRepos.add(repo)); } } catch (final Exception e) { logger.error("Error while removing repositories", e); throw new RuntimeException(e); } finally { configurationService.endBatch(); } }</code><technical_language>please explain purpose of this removedRepos list? accumulating repos in while deleted, do it.. fire some "repo deleted" notifications in method above? This deserve a unit test</technical_language>

Target:
public void removeRepositories(Space space, Set<String> aliases) { try { configurationService.startBatch(); OrganizationalUnit orgUnit = Optional .ofNullable(organizationalUnitService.getOrganizationalUnit(space.getName())) .orElseThrow(() -> new IllegalArgumentException(String .format("The given space [%s] does not correspond to any known organizational unit.", space.getName()))); for (final String alias : aliases) { doRemoveRepository(orgUnit, alias, findRepositoryConfig(alias), repo -> {}); } } catch (final Exception e) { logger.error("Error while removing repositories", e); throw new RuntimeException(e); } finally { configurationService.endBatch(); } }
Source:
<code>public void visit(CommonCourtJudgment judgment) { initializeJudgment(judgment); <START> if (judgment.getCourtDivision() != null) { <END> JpaUtils.initialize(judgment.getCourtDivision()); JpaUtils.initialize(judgment.getCourtDivision().getCourt()); } }</code><technical_language>reason this change</technical_language>

Target:
public void visit(CommonCourtJudgment judgment) { initializeJudgment(judgment); JpaUtils.initialize(judgment.getCourtDivision()); JpaUtils.initialize(judgment.getCourtDivision().getCourt()); }
Source:
<code>public void testFailed(ExtensionContext context, Throwable cause) { <START> if (!(cause instanceof UIAssertionError)) { <END> log.info(screenshot(driver())); SelenideLogger.commitStep(new SelenideLog(context.getTestMethod().toString(), context.getExecutionException().toString()), FAIL); } }</code><technical_language>generally change a logic. In previous implementation collect expection if instance of UIAssertionError change this logic. Why</technical_language>

Target:
public void testFailed(ExtensionContext context, Throwable cause) { if (!(cause instanceof UIAssertionError)) { log.info(getScreenshot()); SelenideLogger.commitStep(new SelenideLog(context.getTestMethod().toString(), context.getExecutionException().toString()), FAIL); } }
Source:
<code>private String getNameOfClass(Class<?> cls) { <START> return useFqn?cls.getName():cls.getSimpleName(); <END> }</code><technical_language>this protected indent adjusted</technical_language>

Target:
protected String getNameOfClass(Class<?> cls) { return useFqn?cls.getName():cls.getSimpleName(); }
Source:
<code><START> public void tap(String name, MessageChannel channel) { <END> Assert.hasText(name, "A valid name is required to register a tap channel"); Assert.notNull(channel, "channel cannot be null"); DirectChannel localChannel = new DirectChannel(); localChannel.setComponentName(name); localChannel.setBeanFactory(applicationContext); localChannel.setBeanName(name); WireTap wiretap = new WireTap(localChannel); ((AbstractMessageChannel) channel).addInterceptor(wiretap); applicationContext.getBeanFactory().registerSingleton(name, localChannel); }</code><technical_language>This behavior is in prototype. impls based Redis RabbitMQ, easy compare local in-proc impl, but... idea tap in prototype name exist channel tapped messages go. in case, tap() is more inbound() source is a wiretap added (pre-existing) channel provided name. if clear, know</technical_language>

Target:
public void tap(String name, MessageChannel channel) { Assert.hasText(name, "A valid name is required to register a tap channel"); Assert.notNull(channel, "channel cannot be null"); SubscribableChannel registeredChannel = null; try { registeredChannel = applicationContext.getBean(name, SubscribableChannel.class); } catch (Exception e) { throw new IllegalArgumentException("No channel is currently registered for '" + name + "'"); } BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(channel); handler.afterPropertiesSet(); registeredChannel.subscribe(handler); }
Source:
<code>public Select limit(int limit) { if (limit <= 0) throw new IllegalArgumentException("Invalid LIMIT value, must be strictly positive"); <START> <END> if (this.limit != null) throw new IllegalStateException("A LIMIT value has already been provided"); this.limit = limit; return this; }</code><technical_language>history, a convoluted set dirty = true in parent class. need for scenario: java Select s = select().all().from("foo"); System.out.println(s.getQueryString()); s = s.limit(10); System.out.println(s.getQueryString()); in Batch.add. I suggest adding a setDirty method this more intuitive</technical_language>

Target:
public Select limit(int limit) { if (limit <= 0) throw new IllegalArgumentException("Invalid LIMIT value, must be strictly positive"); if (this.limit != null) throw new IllegalStateException("A LIMIT value has already been provided"); this.limit = limit; setDirty(); return this; }
Source:
<code>public MockReplicaId(int port, MockPartitionId partitionId, MockDataNodeId dataNodeId, int indexOfMountPathToUse) { this.partitionId = partitionId; this.dataNodeId = dataNodeId; if (dataNodeId.getMountPaths().isEmpty()) { replicaType = ReplicaType.CLOUD_BACKED; } else { mountPath = dataNodeId.getMountPaths().get(indexOfMountPathToUse); File mountFile = new File(mountPath); <START> File replicaFile = new File(mountFile, "replica" + port + partitionId.partition); <END> replicaFile.mkdir(); replicaFile.deleteOnExit(); if (mountPath.startsWith("/vcr")) { replicaType = ReplicaType.CLOUD_BACKED; } else { replicaType = ReplicaType.DISK_BACKED; } replicaPath = replicaFile.getAbsolutePath(); diskId = new MockDiskId(dataNodeId, mountPath); } isSealed = partitionId.getPartitionState().equals(PartitionState.READ_ONLY); }</code><technical_language>constant for "replica". Do want port partition separator</technical_language>

Target:
public MockReplicaId(int port, MockPartitionId partitionId, MockDataNodeId dataNodeId, int indexOfMountPathToUse) { this.partitionId = partitionId; this.dataNodeId = dataNodeId; if (dataNodeId.getMountPaths().isEmpty()) { replicaType = ReplicaType.CLOUD_BACKED; } else { mountPath = dataNodeId.getMountPaths().get(indexOfMountPathToUse); File mountFile = new File(mountPath); File replicaFile = new File(mountFile, REPLICA_FILE_PREFIX + port + partitionId.partition); replicaFile.mkdir(); replicaFile.deleteOnExit(); if (mountPath.startsWith(CLOUD_REPLICA_MOUNT)) { replicaType = ReplicaType.CLOUD_BACKED; } else { replicaType = ReplicaType.DISK_BACKED; } replicaPath = replicaFile.getAbsolutePath(); diskId = new MockDiskId(dataNodeId, mountPath); } isSealed = partitionId.getPartitionState().equals(PartitionState.READ_ONLY); }
Source:
<code>private static Container readContainerInternal(final int major, final InputStream inputStream, final long containerByteOffset) { final Container container = ContainerHeaderIO.readContainerHeader(major, inputStream, containerByteOffset); if (container.isEOF()) { return container; } container.compressionHeader = CompressionHeader.read(major, inputStream); final ArrayList<Slice> slices = new ArrayList<>(); <START> for (final int landmark : container.landmarks) { <END> slices.add(SliceIO.read(major, inputStream)); } container.populateSlicesAndIndexingParameters(slices, containerByteOffset); log.debug("READ CONTAINER: " + container.toString()); return container; }</code><technical_language>slightly awkward landmark is unused here; a for loop landmarks.length</technical_language>

Target:
private static Container readContainerInternal(final int major, final InputStream inputStream, final long containerByteOffset) { final Container container = ContainerHeaderIO.readContainerHeader(major, inputStream, containerByteOffset); if (container.isEOF()) { return container; } container.compressionHeader = CompressionHeader.read(major, inputStream); final ArrayList<Slice> slices = new ArrayList<>(); for (int sliceCounter = 0; sliceCounter < container.landmarks.length; sliceCounter++) { slices.add(SliceIO.read(major, inputStream)); } container.setSlicesAndByteOffset(slices, containerByteOffset); container.distributeIndexingParametersToSlices(); log.debug("READ CONTAINER: " + container.toString()); return container; }
Source:
<code><START> private synchronized <E extends BaseRealm> E doCreateRealmOrGetFromCache(RealmConfiguration configuration, <END> Class<E> realmClass) { RefAndCount refAndCount = refAndCountMap.get(RealmCacheType.valueOf(realmClass)); if (refAndCount.globalCount == 0) { copyAssetFileIfNeeded(configuration); SharedRealm sharedRealm = SharedRealm.getInstance(configuration); if (Table.primaryKeyTableNeedsMigration(sharedRealm)) { sharedRealm.beginTransaction(); if (Table.migratePrimaryKeyTableIfNeeded(sharedRealm)) { sharedRealm.commitTransaction(); } else { sharedRealm.cancelTransaction(); } } sharedRealm.close(); this.configuration = configuration; } else { validateConfiguration(configuration); } if (refAndCount.localRealm.get() == null) { BaseRealm realm; if (realmClass == Realm.class) { realm = Realm.createInstance(this); } else if (realmClass == DynamicRealm.class) { realm = DynamicRealm.createInstance(this); } else { throw new IllegalArgumentException(WRONG_REALM_CLASS_MESSAGE); } refAndCount.localRealm.set(realm); refAndCount.localCount.set(0); } Integer refCount = refAndCount.localCount.get(); if (refCount == 0) { if (realmClass == Realm.class && refAndCount.globalCount == 0) { final BaseRealm realm = refAndCount.localRealm.get(); RealmCache.storeColumnIndices(typedColumnIndicesArray, realm.schema.cloneColumnIndices()); } refAndCount.globalCount++; } refAndCount.localCount.set(refCount + 1); return (E) refAndCount.localRealm.get(); }</code><technical_language>gain moving synchronized method createRealmOrGetFromCache doCreateRealmOrGetFromCache</technical_language>

Target:
private synchronized <E extends BaseRealm> E doCreateRealmOrGetFromCache(RealmConfiguration configuration, Class<E> realmClass) { RefAndCount refAndCount = refAndCountMap.get(RealmCacheType.valueOf(realmClass)); if (getTotalGlobalRefCount() == 0) { copyAssetFileIfNeeded(configuration); SharedRealm sharedRealm = null; try { sharedRealm = SharedRealm.getInstance(configuration); if (Table.primaryKeyTableNeedsMigration(sharedRealm)) { sharedRealm.beginTransaction(); if (Table.migratePrimaryKeyTableIfNeeded(sharedRealm)) { sharedRealm.commitTransaction(); } else { sharedRealm.cancelTransaction(); } } } finally { if (sharedRealm != null) { sharedRealm.close(); } } this.configuration = configuration; } else { validateConfiguration(configuration); } if (refAndCount.localRealm.get() == null) { BaseRealm realm; if (realmClass == Realm.class) { realm = Realm.createInstance(this); } else if (realmClass == DynamicRealm.class) { realm = DynamicRealm.createInstance(this); } else { throw new IllegalArgumentException(WRONG_REALM_CLASS_MESSAGE); } refAndCount.localRealm.set(realm); refAndCount.localCount.set(0); if (realmClass == Realm.class && refAndCount.globalCount == 0) { RealmCache.storeColumnIndices(typedColumnIndicesArray, realm.schema.cloneColumnIndices()); } refAndCount.globalCount++; } Integer refCount = refAndCount.localCount.get(); refAndCount.localCount.set(refCount + 1); return (E) refAndCount.localRealm.get(); }
Source:
<code>public static String setupTestPath(final ConfigContext config, final MantaClient client, final String testName, final String testType) { if ("buckets".equals(testType)) { if (BooleanUtils.isTrue(verifyBucketsSupport(config, client))) { return setupBucketsPath(config, testName); } else { throw new SkipException("Bucket operations not supported by the server"); } } <START> return IntegrationTestConfigContext.generateBasePath(config, testName); <END> }</code><technical_language>want bucket name start upper case character, of naming restrictions mentioned [here](<LINK_0></technical_language>

Target:
public static String setupTestPath(final ConfigContext config, final MantaClient client, final String testName, final String testType) throws IOException { if ("buckets".equals(testType)) { if (BooleanUtils.isTrue(verifyBucketsSupport(config, client))) { return setupBucketsPath(config, testName); } else { throw new SkipException("Bucket operations not supported by the server"); } } return IntegrationTestConfigContext.generateBasePath(config, testName); }
Source:
<code>public void write(XMLOutputSerializer out) throws Exception { XMLStreamWriter serializer = out.getSerializer(); writeStartReplace(out, "/rapi:metadata/rapi:quality", null); if(String.valueOf(quality) != null) <START> serializer.writeCharacters(String.valueOf(quality)); <END> serializer.writeEndElement(); }</code><technical_language>quality is int, I is guaranteed null, test unnecessary</technical_language>

Target:
public void write(XMLOutputSerializer out) throws Exception { XMLStreamWriter serializer = out.getSerializer(); writeStartReplace(out, "/rapi:metadata/rapi:quality", null); serializer.writeCharacters(String.valueOf(quality)); serializer.writeEndElement(); }
Source:
<code>protected void createCacheManagers() throws Throwable { ConfigurationBuilder cb = new ConfigurationBuilder(); cb.clustering().cacheMode(CacheMode.SCATTERED_SYNC).hash().numSegments(3); if (biasAcquisition != null) { cb.clustering().biasAcquisition(biasAcquisition); } ControlledConsistentHashFactory.Scattered chf = new ControlledConsistentHashFactory.Scattered(new int[] {0, 1, 2}); cb.clustering().hash().consistentHashFactory(chf); addClusterEnabledCacheManager(cb); addClusterEnabledCacheManager(cb); viewLatch = new CountDownLatch(1); GlobalConfigurationBuilder gcb = new GlobalConfigurationBuilder(); gcb.transport().transport(new DelayedViewJGroupsTransport(viewLatch)); addClusterEnabledCacheManager(gcb, cb); assertTrue(cache(0).getCacheManager().isCoordinator()); cache(1); cache(2); waitForClusterToForm(); <START> chf.setOwnerIndexes(new int[][] { {1}, {0}, {1} }); <END> }</code><technical_language>Nitpicking, this in test node is killed</technical_language>

Target:
protected void createCacheManagers() throws Throwable { ConfigurationBuilder cb = new ConfigurationBuilder(); chf = new ControlledConsistentHashFactory.Scattered(new int[] {0, 1, 2}); cb.clustering().cacheMode(CacheMode.SCATTERED_SYNC).hash().numSegments(3).consistentHashFactory(chf); if (biasAcquisition != null) { cb.clustering().biasAcquisition(biasAcquisition); } addClusterEnabledCacheManager(cb); viewLatch = new CountDownLatch(1); GlobalConfigurationBuilder gcb = new GlobalConfigurationBuilder(); gcb.transport().transport(new DelayedViewJGroupsTransport(viewLatch)); addClusterEnabledCacheManager(gcb, cb); gcb.transport().transport(new DelayedViewJGroupsTransport(viewLatch)); addClusterEnabledCacheManager(gcb, cb); assertTrue(cache(0).getCacheManager().isCoordinator()); cache(1); cache(2); waitForClusterToForm(); }
Source:
<code>public CalculationResultMap evaluate(Collection<Integer> cohort, Map<String, Object> parameterValues, PatientCalculationContext context) { Program mchmsProgram = MetadataUtils.getProgram(Metadata.Program.MCHMS); Set<Integer> alive = alivePatients(cohort, context); Set<Integer> inMchmsProgram = CalculationUtils.patientsThatPass(Calculations.activeEnrollment(mchmsProgram, alive, context)); CalculationResultMap lastHivStatusObss = Calculations.lastObs(getConcept(Dictionary.HIV_STATUS), inMchmsProgram, context); CalculationResultMap artStatusObss = Calculations.lastObs(getConcept(Dictionary.ANTIRETROVIRAL_USE_IN_PREGNANCY), inMchmsProgram, context); CalculationResultMap ret = new CalculationResultMap(); for (Integer ptId : cohort) { boolean onHaart = false; if (inMchmsProgram.contains(ptId)) { Concept lastHivStatus = EmrCalculationUtils.codedObsResultForPatient(lastHivStatusObss, ptId); Concept lastArtStatus = EmrCalculationUtils.codedObsResultForPatient(artStatusObss, ptId); boolean hivPositive = false; if (lastHivStatus != null) { <START> hivPositive = lastHivStatus.equals(Dictionary.getConcept(Dictionary.POSITIVE)); <END> if (lastArtStatus != null) { onHaart = lastArtStatus.equals(Dictionary.getConcept(Dictionary.MOTHER_ON_HAART)); } } onHaart = hivPositive && onHaart; } ret.put(ptId, new BooleanResult(onHaart, this, context)); } return ret; }</code><technical_language>Store positive concept in a variable of loop re-fetch time</technical_language>

Target:
public CalculationResultMap evaluate(Collection<Integer> cohort, Map<String, Object> parameterValues, PatientCalculationContext context) { Program mchmsProgram = MetadataUtils.getProgram(Metadata.Program.MCHMS); Set<Integer> alive = alivePatients(cohort, context); Set<Integer> inMchmsProgram = CalculationUtils.patientsThatPass(Calculations.activeEnrollment(mchmsProgram, alive, context)); CalculationResultMap lastHivStatusObss = Calculations.lastObs(getConcept(Dictionary.HIV_STATUS), inMchmsProgram, context); CalculationResultMap artStatusObss = Calculations.lastObs(getConcept(Dictionary.ANTIRETROVIRAL_USE_IN_PREGNANCY), inMchmsProgram, context); Concept hivPositiveConcept = Dictionary.getConcept(Dictionary.POSITIVE); Concept onHaartConcept = Dictionary.getConcept(Dictionary.MOTHER_ON_HAART); CalculationResultMap ret = new CalculationResultMap(); for (Integer ptId : cohort) { boolean onHaart = false; if (inMchmsProgram.contains(ptId)) { Concept lastHivStatus = EmrCalculationUtils.codedObsResultForPatient(lastHivStatusObss, ptId); Concept lastArtStatus = EmrCalculationUtils.codedObsResultForPatient(artStatusObss, ptId); boolean hivPositive = false; if (lastHivStatus != null) { hivPositive = lastHivStatus.equals(hivPositiveConcept); if (lastArtStatus != null) { onHaart = lastArtStatus.equals(onHaartConcept); } } onHaart = hivPositive && onHaart; } ret.put(ptId, new BooleanResult(onHaart, this, context)); } return ret; }
Source:
<code>public DiskProfilePopupView(EventBus eventBus, ApplicationResources resources, ApplicationConstants constants) { super(eventBus, resources); storageDomainEditor = new ListModelListBoxEditor<StorageDomain>(new NullSafeRenderer<StorageDomain>() { @Override public String renderNullSafe(StorageDomain storageDomain) { return storageDomain.getName(); } }); qosEditor = new ListModelListBoxEditor<StorageQos>(new NullSafeRenderer<StorageQos>() { @Override <START> public String renderNullSafe(StorageQos StorageQos) { <END> return StorageQos.getName(); } }); initWidget(ViewUiBinder.uiBinder.createAndBindUi(this)); localize(constants); ViewIdHandler.idHandler.generateAndSetIds(this); driver.initialize(this); }</code><technical_language>this storageQos</technical_language>

Target:
public DiskProfilePopupView(EventBus eventBus, ApplicationResources resources, ApplicationConstants constants) { super(eventBus, resources); storageDomainEditor = new ListModelListBoxEditor<StorageDomain>(new NullSafeRenderer<StorageDomain>() { @Override public String renderNullSafe(StorageDomain storageDomain) { return storageDomain.getName(); } }); qosEditor = new ListModelListBoxEditor<StorageQos>(new NullSafeRenderer<StorageQos>() { @Override public String renderNullSafe(StorageQos storageQos) { return storageQos.getName(); } }); initWidget(ViewUiBinder.uiBinder.createAndBindUi(this)); localize(constants); ViewIdHandler.idHandler.generateAndSetIds(this); driver.initialize(this); }
Source:
<code>private boolean hasHigherPrecedence(Publisher currentPublisher, Publisher existingPublisher, Iterable<Publisher> publisherPrecedence) { for (Publisher publisher : publisherPrecedence) { if (publisher == existingPublisher) { return false; } if (publisher == currentPublisher) { return true; } } <START> LOG.warn("Delegate content index returned publisher that was not asked for." <END> + " Requested publishers: {}", currentPublisher, publisherPrecedence); return false; }</code><technical_language>If this **never** **ever** happen, log error, warning</technical_language>

Target:
private boolean hasHigherPrecedence(Publisher currentPublisher, Publisher existingPublisher, Iterable<Publisher> publisherPrecedence) { for (Publisher publisher : publisherPrecedence) { if (publisher == existingPublisher) { return false; } if (publisher == currentPublisher) { return true; } } LOG.error("Delegate content index returned publisher that was not asked for." + " Requested publishers: {}", currentPublisher, publisherPrecedence); return false; }
Source:
<code>public boolean uses(final Use u) { <START> return u == Use.X30 || u == Use.NDT || super.uses(u); <END> }</code><technical_language>u == Use.NDT || needs removed (otherwise, math functions treated non-deterministic)</technical_language>

Target:
public boolean uses(final Use u) { return u == Use.X30 || super.uses(u); }
Source:
<code><START> public void testListAccessCredentials() throws InterruptedException { <END> List<SharedStorageAccess> access = sharedStorageApi().getAccessCredentials(); assertNotNull(access); assertTrue(access.size() > 0); }</code><technical_language>Remove InterruptedException signature</technical_language>

Target:
public void testListAccessCredentials() { List<SharedStorageAccess> access = sharedStorageApi().getAccessCredentials(); assertNotNull(access); assertTrue(access.size() > 0); }
Source:
<code>private ObjectId createCommit(IdentifiedUser me, ObjectInserter inserter, <START> RevCommit prevEdit, RevCommit <END> base, ObjectId tree) throws IOException { CommitBuilder builder = new CommitBuilder(); builder.setTreeId(tree); builder.setParentIds(base); builder.setAuthor(prevEdit.getAuthorIdent()); builder.setCommitter(getCommitterIdent(me)); builder.setMessage(prevEdit.getFullMessage()); ObjectId newEdit = inserter.insert(builder); inserter.flush(); return newEdit; }</code><technical_language>obvious this argument does. copy identity? pass a PersonIdent instead</technical_language>

Target:
private ObjectId createCommit(IdentifiedUser me, ObjectInserter inserter, RevCommit prevEdit, RevCommit base, ObjectId tree) throws IOException { CommitBuilder builder = new CommitBuilder(); builder.setTreeId(tree); builder.setParentIds(base); builder.setAuthor(prevEdit.getAuthorIdent()); builder.setCommitter(getCommitterIdent(me)); builder.setMessage(prevEdit.getFullMessage()); return inserter.insert(builder); }
Source:
<code>private void returnRowLock(RowLock lock) { rowLocks.compute(lock.rowSeq, (key, value) -> { <START> Objects.requireNonNull(value); <END> Preconditions.checkState(value.count.intValue() > 0); final int newCount = value.count.decrementAndGet(); return (newCount > 0) ? value : null; }); }</code><technical_language>point in code I expect lock == value. I worth adding a sanity check for that. do following. java private void returnRowLock(RowLock lock) { Objects.requireNonNull(lock); rowLocks.compute(lock.rowSeq, (key, value) -> { Preconditions.checkState(value == lock); Preconditions.checkState(value.count.intValue() > 0); final int newCount = value.count.decrementAndGet(); return (newCount > 0) ? : null; }); }</technical_language>

Target:
private void returnRowLock(RowLock lock) { Objects.requireNonNull(lock); rowLocks.compute(lock.rowSeq, (key, value) -> { Preconditions.checkState(value == lock); Preconditions.checkState(value.count > 0); final int newCount = --value.count; return (newCount > 0) ? value : null; }); }
Source:
<code><START> private void enableTrafficControl(Platform platform, String networkDevice, int delayMs, int rateLimitKbps) throws IOException { <END> if (delayMs > 0) { int deviationMs = Math.max(1, (int) Math.sqrt(delayMs)); List<String> delay = new ArrayList<>(); rootHandler(networkDevice, delay::add); netemDelay(delayMs, deviationMs, delay::add); platform.runCommand(delay.toArray(new String[]{})); if (rateLimitKbps > 0) { List<String> rate = new ArrayList<>(); childHandler(networkDevice, rate::add); tbfRate(rateLimitKbps, rate::add); platform.runCommand(rate.toArray(new String[]{})); } } else if (rateLimitKbps > 0) { List<String> rate = new ArrayList<>(); rootHandler(networkDevice, rate::add); tbfRate(rateLimitKbps, rate::add); platform.runCommand(rate.toArray(new String[]{})); } else { } }</code><technical_language>nit: For consistency, rename delayMs latencyMs</technical_language>

Target:
private void enableTrafficControl(Platform platform, String networkDevice, int delayMs, int rateLimitKbps) throws IOException { if (delayMs > 0) { int deviationMs = Math.max(1, (int) Math.sqrt(delayMs)); List<String> delay = new ArrayList<>(); rootHandler(networkDevice, delay::add); netemDelay(delayMs, deviationMs, delay::add); platform.runCommand(delay.toArray(new String[]{})); if (rateLimitKbps > 0) { List<String> rate = new ArrayList<>(); childHandler(networkDevice, rate::add); tbfRate(rateLimitKbps, rate::add); platform.runCommand(rate.toArray(new String[]{})); } } else if (rateLimitKbps > 0) { List<String> rate = new ArrayList<>(); rootHandler(networkDevice, rate::add); tbfRate(rateLimitKbps, rate::add); platform.runCommand(rate.toArray(new String[]{})); } else { log.warn("Not applying any rate limiting or latency"); } }
Source:
<code>public Mono<AccessToken> getToken(TokenRequestContext request) { Mono<AccessToken> accessTokenMono; if (appServiceMSICredential != null) { accessTokenMono = appServiceMSICredential.authenticate(request); logger.info("Azure Identity => Managed Identity environment: MSI_ENDPOINT"); } else { accessTokenMono = virtualMachineMSICredential.authenticate(request); <START> logger.info("Azure Identity => Managed Identity environment: IMDS"); <END> } return accessTokenMono .doOnNext(token -> LoggingUtil.logTokenSuccess(logger, request)) .doOnError(error -> LoggingUtil.logTokenError(logger, request, error)); }</code><technical_language>This misleading in cases running non-Azure hosted machines. default VM credential if MSI endpoint is set. check if IMDS logging environment</technical_language>

Target:
public Mono<AccessToken> getToken(TokenRequestContext request) { Mono<AccessToken> accessTokenMono; if (appServiceMSICredential != null) { accessTokenMono = appServiceMSICredential.authenticate(request) .doOnSuccess((t -> logger.info("Azure Identity => Managed Identity environment: MSI_ENDPOINT"))); } else { accessTokenMono = virtualMachineMSICredential.authenticate(request) .doOnSuccess((t -> logger.info("Azure Identity => Managed Identity environment: IMDS"))); } return accessTokenMono .doOnNext(token -> LoggingUtil.logTokenSuccess(logger, request)) .doOnError(error -> LoggingUtil.logTokenError(logger, request, error)); }
Source:
<code>public void testConcurrentOpen() throws Exception { ClientConfiguration conf = new ClientConfiguration(); conf.setMetadataServiceUri(zkUtil.getMetadataServiceUri()) .setNumChannelsPerBookie(16) .setUseV2WireProtocol(true) .setZkTimeout(20000) .setAddEntryTimeout(30) .setReadEntryTimeout(30) .setSpeculativeReadTimeout(0) .setThrottleValue(0) .setLedgerManagerFactoryClassName(HierarchicalLedgerManagerFactory.class.getName()); BookKeeper bkc = new BookKeeper(conf); for (int j = 0; j < 10; j++) { LedgerHandle lh = bkc.createLedger(DigestType.CRC32, "testPasswd".getBytes()); lh.addEntry("foobar".getBytes()); long ledgerId = lh.getId(); final long finalLedgerId = ledgerId; ExecutorService executor = Executors.newFixedThreadPool(10); List<Future<?>> futures = new ArrayList<>(); CountDownLatch latch = new CountDownLatch(1); for (int i = 0; i < 5; i++) { final CompletableFuture<LedgerHandle> future = new CompletableFuture<>(); executor.submit(() -> { latch.await(); bkc.asyncOpenLedger(finalLedgerId, DigestType.CRC32, "testPasswd".getBytes(), (rc, handle, ctx) -> { if (rc != BKException.Code.OK) { future.completeExceptionally(BKException.create(rc)); } else { future.complete(handle); } }, null); return future; }); futures.add(future); } <START> Thread.sleep(1000); <END> latch.countDown(); for (Future<?> f : futures) { try { f.get(10, TimeUnit.SECONDS); } catch (ExecutionException ee) { Assert.assertEquals(ee.getCause().getClass(), BKException.BKLedgerRecoveryException.class); } } } bkc.close(); }</code><technical_language>This is needed</technical_language>

Target:
public void testConcurrentOpen() throws Exception { ClientConfiguration conf = new ClientConfiguration(); conf.setMetadataServiceUri(zkUtil.getMetadataServiceUri()) .setNumChannelsPerBookie(16) .setUseV2WireProtocol(true) .setZkTimeout(20000) .setAddEntryTimeout(30) .setReadEntryTimeout(30) .setSpeculativeReadTimeout(0) .setThrottleValue(0) .setLedgerManagerFactoryClassName(HierarchicalLedgerManagerFactory.class.getName()); BookKeeper bkc = new BookKeeper(conf); for (int j = 0; j < 10; j++) { LedgerHandle lh = bkc.createLedger(DigestType.CRC32, "testPasswd".getBytes()); lh.addEntry("foobar".getBytes()); long ledgerId = lh.getId(); final long finalLedgerId = ledgerId; ExecutorService executor = Executors.newFixedThreadPool(10); List<Future<?>> futures = new ArrayList<>(); CountDownLatch latch = new CountDownLatch(1); for (int i = 0; i < 5; i++) { final CompletableFuture<LedgerHandle> future = new CompletableFuture<>(); executor.submit(() -> { latch.await(); bkc.asyncOpenLedger(finalLedgerId, DigestType.CRC32, "testPasswd".getBytes(), (rc, handle, ctx) -> { if (rc != BKException.Code.OK) { future.completeExceptionally(BKException.create(rc)); } else { future.complete(handle); } }, null); return future; }); futures.add(future); } latch.countDown(); for (Future<?> f : futures) { try { f.get(10, TimeUnit.SECONDS); } catch (ExecutionException ee) { Assert.assertEquals(ee.getCause().getClass(), BKException.BKLedgerRecoveryException.class); } } } bkc.close(); }
Source:
<code>public Iterable<TmfAnalysisRequirement> getAnalysisRequirements() { <START> if (fRequirements == null) { <END> ImmutableList<String> eventNames = ImmutableList.of(LttngStrings.EXIT_SYSCALL, LttngStrings.IRQ_HANDLER_ENTRY, LttngStrings.IRQ_HANDLER_EXIT, LttngStrings.SOFTIRQ_ENTRY, LttngStrings.SOFTIRQ_EXIT, LttngStrings.SOFTIRQ_RAISE, LttngStrings.SCHED_SWITCH, LttngStrings.SCHED_PROCESS_FORK, LttngStrings.SCHED_PROCESS_EXIT, LttngStrings.SCHED_PROCESS_FREE, LttngStrings.STATEDUMP_PROCESS_STATE, LttngStrings.SCHED_WAKEUP, LttngStrings.SCHED_WAKEUP_NEW, LttngStrings.SYSCALL_PREFIX); TmfAnalysisRequirement domainReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN); domainReq.addValue(SessionConfigStrings.CONFIG_DOMAIN_TYPE_KERNEL, ValuePriorityLevel.MANDATORY); fRequirements = ImmutableList.of(domainReq, new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_EVENT, eventNames, ValuePriorityLevel.MANDATORY)); } return fRequirements; }</code><technical_language>init fRequirements in beginning final</technical_language>

Target:
public Iterable<TmfAnalysisRequirement> getAnalysisRequirements() { return fRequirements; }
Source:
<code>private void logAllObisCodes(final List<ClassIdObisAttr> allObisCodes) { int index = 1; <START> LOGGER.info("List of all ObisCodes:"); <END> for (final ClassIdObisAttr obisAttr : allObisCodes) { LOGGER.info("{}/{} #attr{}", index++, allObisCodes.size(), obisAttr.getObisCode().value(), obisAttr.getNoAttr()); } }</code><technical_language>Change log level debug</technical_language>

Target:
private void logAllObisCodes(final List<ClassIdObisAttr> allObisCodes) { int index = 1; LOGGER.debug("List of all ObisCodes:"); for (final ClassIdObisAttr obisAttr : allObisCodes) { LOGGER.debug("{}/{} #attr{}", index++, allObisCodes.size(), obisAttr.getObisCode().value(), obisAttr.getNoAttr()); } }
Source:
<code>protected boolean set(EntityZombie container, ZombieType value) { <START> if(value == ZombieTypes.VILLAGER) return false; <END> container.setZombieType(ZombieUtils.toNative(value, null)); return true; }</code><technical_language>if (, braces</technical_language>

Target:
protected boolean set(EntityZombie container, ZombieType value) { if (value == ZombieTypes.VILLAGER) { return false; } container.setZombieType(EntityUtil.toNative(value, null)); return true; }
Source:
<code>private boolean onBoardSaveAs() { logger.info("Menu: Boards > Save as"); List<PanelInfo> panelList = panels.getCurrentPanelInfos(); BoardNameDialog dlg = new BoardNameDialog(prefs, mainStage); Optional<String> response = dlg.showAndWait(); ui.showMainStage(); panels.selectFirstPanel(); if (response.isPresent()) { String boardName = response.get().trim(); prefs.addBoard(boardName, panelList); prefs.setLastOpenBoard(boardName); prefs.setLastOpenBoardPanelInfo(panelList); ui.triggerEvent(new BoardSavedEvent()); logger.info("New board " + boardName + " saved"); ui.updateTitle(); return true; } else { <START> return false; <END> } }</code><technical_language>put guard clause reduce nesting i.e. java if (!response.isPresent()) { return false; } // Successful flow</technical_language>

Target:
private void onBoardSaveAs() { logger.info("Menu: Boards > Save as"); saveBoardAs(); }
Source:
<code>public void idsIfPresentShouldBeWrittenIntoTheVariant() throws Exception { Variant variant = buildVariant("12", 3, 4, "A", "T", "fileId", "studyId"); variant.setIds(new HashSet<>(Arrays.asList("a", "b", "c"))); VariantMongoWriter variantMongoWriter = new VariantMongoWriter(collectionName, mongoOperations, false, true); variantMongoWriter.write(Collections.singletonList(variant)); DBCollection dbCollection = mongoOperations.getCollection(collectionName); assertEquals(1, dbCollection.count()); final DBObject storedVariant = dbCollection.findOne(); <START> assertNotNull(storedVariant.get(IDS_FIELD)); <END> }</code><technical_language>interesting check stored ids also, null</technical_language>

Target:
public void idsIfPresentShouldBeWrittenIntoTheVariant() throws Exception { Variant variant = buildVariantWithStats("12", 3, 4, "A", "T", "fileId", "studyId"); HashSet<String> ids = new HashSet<>(Arrays.asList("a", "b", "c")); variant.setIds(ids); VariantMongoWriter variantMongoWriter = new VariantMongoWriter(collectionName, mongoOperations, false, true); variantMongoWriter.write(Collections.singletonList(variant)); DBCollection dbCollection = mongoOperations.getCollection(collectionName); assertEquals(1, dbCollection.count()); final DBObject storedVariant = dbCollection.findOne(); BasicDBList dbIds = (BasicDBList) storedVariant.get(IDS_FIELD); for (String id : ids) { assertTrue(dbIds.contains(id)); } assertEquals(ids.size(), dbIds.size()); }
Source:
<code>private void readMetaDataText(Reader metadataTextInput) throws IOException, RecognitionException, ParseException { CommonTree tree = createAST(metadataTextInput); fTreeParser = new IOStructGen(tree, trace); fTreeParser.generate(); <START> if (getDetectedByteOrder() != null && trace.getByteOrder() != getDetectedByteOrder()) { <END> throw new ParseException("Metadata byte order and trace byte order inconsistent."); } }</code><technical_language>detectedByOrder is final, technically change calls. happen, semantically extract a variable first. put parentheses side of &&, me</technical_language>

Target:
private void readMetaDataText(Reader metadataTextInput) throws IOException, RecognitionException, ParseException { CommonTree tree = createAST(metadataTextInput); fTreeParser = new IOStructGen(tree, fTrace); fTreeParser.generate(); ByteOrder detectedByteOrder = getDetectedByteOrder(); if (detectedByteOrder != null && fTrace.getByteOrder() != detectedByteOrder) { throw new ParseException("Metadata byte order and trace byte order inconsistent."); } }
Source:
<code>public HandleServiceFactory(@JsonProperty("privateKeyFile") String privateKeyFile, @JsonProperty("cypher") String cypher, @JsonProperty("namingAuthority") String namingAuthority, @JsonProperty("prefix") String prefix) { <START> HandlePersistenceManagerFactory handleManagerFactory = new HandlePersistenceManagerFactory( <END> privateKeyFile, cypher, namingAuthority, prefix ); manager = handleManagerFactory.build(); }</code><technical_language>Merge HandleServiceFactory HandlePersistenceManager</technical_language>

Target:
public HandleServiceFactory(@JsonProperty("privateKeyFile") String privateKeyFile, @JsonProperty("cypher") String cypher, @JsonProperty("namingAuthority") String namingAuthority, @JsonProperty("prefix") String prefix) { if (Strings.isNullOrEmpty(privateKeyFile) || Strings.isNullOrEmpty(cypher) || Strings.isNullOrEmpty(namingAuthority) || Strings.isNullOrEmpty(prefix)) { LOG.error("Configuration must have: \n" + " persistenceManager:\n" + " privateKeyFile: ...\n" + " cypher: ...\n" + " namingAuthority: ...\n" + " prefix: ...\n"); throw new IllegalArgumentException( "'privateKeyFile', 'cypher', 'namingAuthority' and 'prefix' must be provided" ); } else { LOG.info("Using real handle server"); try { manager = HandleManager.newHandleManager( cypher, namingAuthority, prefix, privateKeyFile ); } catch (PersistenceManagerCreationException e) { manager = null; } } }
Source:
<code>public JeoJSONWriter workspace(Workspace ws, boolean children) throws IOException { object(); key("type").value("workspace"); key("driver").value(ws.getDriver().getName()); key("datasets"); array(); for (Handle<Dataset> ref : ws.list()) { if (children) { <START> dataset(ref.resolve()); <END> } else { value(ref.getName()); } } endArray(); return endObject(); }</code><technical_language>Do a potential leak here? I if calling resolve() need a close well</technical_language>

Target:
public JeoJSONWriter workspace(Workspace ws, boolean children) throws IOException { object(); key("type").value("workspace"); key("driver").value(ws.getDriver().getName()); key("datasets"); array(); for (Handle<Dataset> ref : ws.list()) { if (children) { try { dataset(ref.resolve()); } finally { ref.close(); } } else { value(ref.getName()); } } endArray(); return endObject(); }
Source:
<code>public void visit(FunctionExpression expression) { BooleanLiteralRenderingContext oldBooleanLiteralRenderingContext = setBooleanLiteralRenderingContext(BooleanLiteralRenderingContext.PLAIN); ParameterRenderingMode oldParameterRenderingMode = setParameterRenderingMode(ParameterRenderingMode.PLACEHOLDER); boolean hasExpressions = expression.getExpressions().size() > 0; <START> String functionName = expression.getFunctionName().toUpperCase(); <END> sb.append(functionName); if (!"CURRENT_TIME".equalsIgnoreCase(functionName) && !"CURRENT_DATE".equalsIgnoreCase(functionName) && !"CURRENT_TIMESTAMP".equalsIgnoreCase(functionName)) { sb.append('('); if (expression instanceof AggregateExpression) { AggregateExpression aggregateExpression = (AggregateExpression) expression; if (aggregateExpression.isDistinct()) { sb.append("DISTINCT "); } if (!hasExpressions && "COUNT".equalsIgnoreCase(aggregateExpression.getFunctionName())) { sb.append('*'); } } if (hasExpressions) { expression.getExpressions().get(0).accept(this); for (int i = 1; i < expression.getExpressions().size(); i++) { sb.append(","); expression.getExpressions().get(i).accept(this); } } sb.append(')'); } setBooleanLiteralRenderingContext(oldBooleanLiteralRenderingContext); setParameterRenderingMode(oldParameterRenderingMode); }</code><technical_language>Is valid do this? If a user registered custom function native APIs case able function API. function in a case insensitive tree map name function is registered? work in class ResolvingQueryGenerator</technical_language>

Target:
public void visit(FunctionExpression expression) { BooleanLiteralRenderingContext oldBooleanLiteralRenderingContext = setBooleanLiteralRenderingContext(BooleanLiteralRenderingContext.PLAIN); ParameterRenderingMode oldParameterRenderingMode = setParameterRenderingMode(ParameterRenderingMode.PLACEHOLDER); boolean hasExpressions = expression.getExpressions().size() > 0; String functionName = expression.getFunctionName(); sb.append(functionName); if (!"CURRENT_TIME".equalsIgnoreCase(functionName) && !"CURRENT_DATE".equalsIgnoreCase(functionName) && !"CURRENT_TIMESTAMP".equalsIgnoreCase(functionName)) { sb.append('('); if (expression instanceof AggregateExpression) { AggregateExpression aggregateExpression = (AggregateExpression) expression; if (aggregateExpression.isDistinct()) { sb.append("DISTINCT "); } if (!hasExpressions && "COUNT".equalsIgnoreCase(aggregateExpression.getFunctionName())) { sb.append('*'); } } if (hasExpressions) { expression.getExpressions().get(0).accept(this); for (int i = 1; i < expression.getExpressions().size(); i++) { sb.append(","); expression.getExpressions().get(i).accept(this); } } sb.append(')'); } setBooleanLiteralRenderingContext(oldBooleanLiteralRenderingContext); setParameterRenderingMode(oldParameterRenderingMode); }
Source:
<code>public void close() { if (isOpen) { isOpen = false; if (scheduler != null) { scheduler.shutdown(); try { if (!scheduler.awaitTermination(storeConfig.accountUpdaterShutDownTimeoutMs, TimeUnit.MILLISECONDS)) { logger.warn("Scheduler for account updater is not shut down successfully"); scheduler.shutdownNow(); if (!scheduler.awaitTermination(storeConfig.accountUpdaterShutDownTimeoutMs, TimeUnit.MILLISECONDS)) { logger.error("Scheduler for account updater is not shut down successfully"); } } } catch (InterruptedException e) { scheduler.shutdownNow(); <START> Thread.currentThread().interrupted(); <END> } catch (Exception e) { logger.error("Exception occurred when closing HelixAccountService.", e); } helixStore.stop(); } } }</code><technical_language>log in this case</technical_language>

Target:
public void close() { if (isOpen) { isOpen = false; if (scheduler != null) { shutDownExecutorService(scheduler, storeConfig.accountUpdaterShutDownTimeoutMs, TimeUnit.MILLISECONDS); } helixStore.stop(); } }