auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> public void changeLimitForPeriod(final int limitForPeriod) { <END> E newConfig = state.get().getConfig() .withLimitForPeriod(limitForPeriod); state.updateAndGet(currentState -> currentState.withConfig(newConfig)); }</code><technical_language>@gkatzioura please run benchmarks compare latency throughput of AtomicRateLimiter changes contention parameters</technical_language>

Target:
public void changeLimitForPeriod(final int limitForPeriod) { try { E newConfig = withLimitForPeriod(limitForPeriod, state.get().getConfig()); state.updateAndGet(currentState -> currentState.withConfig(newConfig)); } catch (ConfigBuilderHelper.NonRegisteredConfig e) { throw new IllegalStateException("Please override method",e); } }
Source:
<code>private void updatePlacesByLocation() { removeHiddenLocations(); Collections.sort(allLocations, new Comparator<MITMapPlace>() { @Override public int compare(MITMapPlace lhs, MITMapPlace rhs) { Location placeLocation1 = new Location("place1"); placeLocation1.setLatitude(lhs.getLatitude()); placeLocation1.setLongitude(lhs.getLongitude()); Location placeLocation2 = new Location("place2"); placeLocation2.setLatitude(rhs.getLatitude()); placeLocation2.setLongitude(rhs.getLongitude()); float distance1 = 0; float distance2 = 0; if (location != null) { distance1 = placeLocation1.distanceTo(location); distance2 = placeLocation2.distanceTo(location); } <START> if (distance1 > distance2) { <END> return 1; } else if (distance1 < distance2) { return -1; } else { return 0; } } }); for (int i = 0; i < NEARBY_LOCATION_MAX_COUNT; i++) { places.add(allLocations.get(i)); } placeAdapter.notifyDataSetChanged(); }</code><technical_language>Float.compare(distance1, distance2) do this work for</technical_language>

Target:
private void updatePlacesByLocation() { removeHiddenLocations(); Collections.sort(allLocations, new Comparator<MITMapPlace>() { @Override public int compare(MITMapPlace lhs, MITMapPlace rhs) { Location placeLocation1 = new Location("place1"); placeLocation1.setLatitude(lhs.getLatitude()); placeLocation1.setLongitude(lhs.getLongitude()); Location placeLocation2 = new Location("place2"); placeLocation2.setLatitude(rhs.getLatitude()); placeLocation2.setLongitude(rhs.getLongitude()); float distance1 = 0; float distance2 = 0; if (location != null) { distance1 = placeLocation1.distanceTo(location); distance2 = placeLocation2.distanceTo(location); } return Float.compare(distance1, distance2); } }); for (int i = 0; i < NEARBY_LOCATION_MAX_COUNT; i++) { places.add(allLocations.get(i)); } placeAdapter.notifyDataSetChanged(); }
Source:
<code>public void testConfigure_WithoutValues() throws PropertyAccessException { CONNECTTestClient<TestServicePortType> testClient = new CONNECTTestClient<>( new TestServicePortDescriptor()); ServiceEndpoint<TestServicePortType> serviceEndpoint = testClient.getServiceEndpoint(); final PropertyAccessor mockPropAccessor = mock(PropertyAccessor.class); AssertionType assertion = new AssertionType(); assertion.setKeepAlive("true"); CONNECTCustomHttpHeadersType assertionHeaders = new CONNECTCustomHttpHeadersType(); assertionHeaders.setHeaderName("headerName"); assertionHeaders.setHeaderValue("headerValue"); assertion.getCONNECTCustomHttpHeaders().add(assertionHeaders); <START> HttpHeaderServiceEndpointDecorator headerDecorator = new HttpHeaderServiceEndpointDecorator(serviceEndpoint, assertion) { <END> }; headerDecorator.configure(); validateConfiguration(headerDecorator); }</code><technical_language>In place of HttpHeaderServiceEndpointDecorator headerDecorator = new HttpHeaderServiceEndpointDecorator(serviceEndpoint, assertion) {}; statement overriding methods: HttpHeaderServiceEndpointDecorator headerDecorator = new HttpHeaderServiceEndpointDecorator(serviceEndpoint, assertion);</technical_language>

Target:
public void testConfigure_WithoutValues() throws PropertyAccessException { final CONNECTTestClient<TestServicePortType> testClient = new CONNECTTestClient<>( new TestServicePortDescriptor()); final ServiceEndpoint<TestServicePortType> serviceEndpoint = testClient.getServiceEndpoint(); final AssertionType assertion = new AssertionType(); final HttpHeaderServiceEndpointDecorator headerDecorator = new HttpHeaderServiceEndpointDecorator( serviceEndpoint, assertion); headerDecorator.configure(); final BindingProvider bp = (BindingProvider) headerDecorator.getPort(); final Map<String, List<String>> bpMap = (Map<String, List<String>>) bp.getRequestContext() .get(NhincConstants.CUSTOM_HTTP_HEADERS); assertNull(bpMap); }
Source:
<code>protected BundleContext getBundleContext() { final BundleContext bundleContext = this.bundleContext; if (bundleContext != null) { return bundleContext; } else { throw new IllegalStateException( <START> "The bundle context is missing (it seems your thing handler is used but not active)."); <END> } }</code><technical_language>"your _thing handler_" sense then, right</technical_language>

Target:
protected BundleContext getBundleContext() { final BundleContext bundleContext = this.bundleContext; if (bundleContext != null) { return bundleContext; } else { throw new IllegalStateException( "The bundle context is missing (it seems your thing handler factory is used but not active)."); } }
Source:
<code>private void setLocaleWith(Locale locale) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, NoSuchFieldException { Class<?> activityManagerNativeClass = Class.forName("android.app.ActivityManagerNative"); <START> Object amn; <END> Configuration config; Method methodGetDefault = activityManagerNativeClass.getMethod("getDefault"); methodGetDefault.setAccessible(true); amn = methodGetDefault.invoke(activityManagerNativeClass); if (Build.VERSION.SDK_INT >= 26) { activityManagerNativeClass = Class.forName(amn.getClass().getName()); } Method methodGetConfiguration = activityManagerNativeClass.getMethod("getConfiguration"); methodGetConfiguration.setAccessible(true); config = (Configuration) methodGetConfiguration.invoke(amn); Class<?> configClass = config.getClass(); Field f = configClass.getField("userSetLocale"); f.setBoolean(config, true); config.locale = locale; Method methodUpdateConfiguration = activityManagerNativeClass.getMethod("updateConfiguration", Configuration.class); methodUpdateConfiguration.setAccessible(true); methodUpdateConfiguration.invoke(amn, config); }</code><technical_language>is reason define variables here? define assigned</technical_language>

Target:
private void setLocaleWith(Locale locale) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, NoSuchFieldException { Class<?> activityManagerNativeClass = Class.forName("android.app.ActivityManagerNative"); Method methodGetDefault = activityManagerNativeClass.getMethod("getDefault"); methodGetDefault.setAccessible(true); Object amn = methodGetDefault.invoke(activityManagerNativeClass); if (Build.VERSION.SDK_INT >= 26) { activityManagerNativeClass = Class.forName(amn.getClass().getName()); } Method methodGetConfiguration = activityManagerNativeClass.getMethod("getConfiguration"); methodGetConfiguration.setAccessible(true); Configuration config = (Configuration) methodGetConfiguration.invoke(amn); Class<?> configClass = config.getClass(); Field f = configClass.getField("userSetLocale"); f.setBoolean(config, true); config.locale = locale; Method methodUpdateConfiguration = activityManagerNativeClass.getMethod("updateConfiguration", Configuration.class); methodUpdateConfiguration.setAccessible(true); methodUpdateConfiguration.invoke(amn, config); }
Source:
<code>public Builder( Class<?> beanClass, ConstrainedExecutable constrainedExecutable, ConstraintHelper constraintHelper, ExecutableHelper executableHelper, MethodValidationConfiguration methodValidationConfiguration) { super( beanClass, constraintHelper ); this.executableHelper = executableHelper; kind = constrainedExecutable.getKind(); executable = constrainedExecutable.getExecutable(); add( constrainedExecutable ); this.methodValidationConfiguration = methodValidationConfiguration; this.rules = new HashSet<MethodConfigurationRule>(); for ( Class<? extends MethodConfigurationRule> ruleClass : this.methodValidationConfiguration.getConfiguredRuleSet() ) { try { <START> this.rules.add( ruleClass.newInstance() ); <END> } catch ( InstantiationException e ) { throw new IllegalArgumentException( "Failed to create " + ruleClass.getName() + " with error " + e.toString() ); } catch ( IllegalAccessException e ) { throw new IllegalArgumentException( "Failed to create " + ruleClass.getName() + " with error " + e.toString() ); } } }</code><technical_language>Please org.hibernate.validator.internal.util.privilegedactions.NewInstance instead; strictly needed in this case, prefer for sake of consistency code base (also exception messages consistent way). Or, actual rule _instances_ in this set (as created earlier in MethodValidationConfigurationImpl()? That'd avoid need for reflective instantiation altogether</technical_language>

Target:
public Builder( Class<?> beanClass, ConstrainedExecutable constrainedExecutable, ConstraintHelper constraintHelper, ExecutableHelper executableHelper, MethodValidationConfiguration methodValidationConfiguration) { super( beanClass, constraintHelper ); this.executableHelper = executableHelper; kind = constrainedExecutable.getKind(); executable = constrainedExecutable.getExecutable(); add( constrainedExecutable ); this.methodValidationConfiguration = methodValidationConfiguration; this.rules = new HashSet<MethodConfigurationRule>(); for ( Class<? extends MethodConfigurationRule> ruleClass : this.methodValidationConfiguration.getConfiguredRuleSet() ) { MethodConfigurationRule rule = run( NewInstance.action( ruleClass, "Method configuration rule" ) ); this.rules.add( rule ); } }
Source:
<code>public int nextAreaZoneId() { int desiredID = getServerZone().getMaxZoneID() + 1; <START> while (desiredID < 5 || getServerZone().getAreaZone(desiredID) != null) <END> { getServerZone().nextZoneID(); desiredID = getServerZone().getMaxZoneID() + 1; } return desiredID; }</code><technical_language>is reasoning for this logic? Specifically desiredID < 5</technical_language>

Target:
public int nextAreaZoneId() { int desiredID = getServerZone().getMaxZoneID() + 1; while (desiredID < RESERVED_ID_COUNT || getServerZone().getAreaZone(desiredID) != null) { getServerZone().nextZoneID(); desiredID = getServerZone().getMaxZoneID() + 1; } return desiredID; }
Source:
<code>public Consumer setUuid(String uuid) { <START> if (this.uuid == null) { <END> this.uuid = uuid; } return this; }</code><technical_language>intent this? Generally want allow this changed point. Is in requires this update</technical_language>

Target:
public Consumer setUuid(String uuid) { this.uuid = uuid; return this; }
Source:
<code><START> public ConsumerGroupListing(String groupId, boolean isSimpleConsumerGroup, Optional<ConsumerGroupState> state) { <END> this.groupId = groupId; this.isSimpleConsumerGroup = isSimpleConsumerGroup; this.state = state; }</code><technical_language>Hmm, this is a public class. safer add a constructor overload</technical_language>

Target:
public ConsumerGroupListing(String groupId, boolean isSimpleConsumerGroup, Optional<ConsumerGroupState> state) { this.groupId = groupId; this.isSimpleConsumerGroup = isSimpleConsumerGroup; this.state = Objects.requireNonNull(state); }
Source:
<code>protected StorageDomainValidator getStorageDomainValidator(DiskImage diskImage) { <START> if (storageDomainValidator == null) { <END> StorageDomain storageDomain = getStorageDomainDAO().getForStoragePool( diskImage.getStorageIds().get(0), diskImage.getStoragePoolId()); storageDomainValidator = new StorageDomainValidator(storageDomain); } return storageDomainValidator; }</code><technical_language>If a parameter, caching validator sense - API pass a DiskImage get a validator for it, in practice get validator of param</technical_language>

Target:
protected StorageDomainValidator getStorageDomainValidator(DiskImage diskImage) { StorageDomain storageDomain = getStorageDomainDAO().getForStoragePool( diskImage.getStorageIds().get(0), diskImage.getStoragePoolId()); return new StorageDomainValidator(storageDomain); }
Source:
<code>private PGPCryptInfo safeGetCryptInfo(Object cryptInfo) throws MissingPGPKeyException { if (cryptInfo == null || cryptInfo instanceof PGPEncryptAndSignInfo) { MuleEvent event = RequestContext.getEvent(); String principalId = (String) this.getCredentialsAccessor().getCredentials(event); PGPPublicKey publicKey = keyManager.getPublicKey(principalId); validateNotNull(publicKey, PGPMessages.noPublicKeyForPrincipal(principalId)); this.checkKeyExpirity(publicKey); if (cryptInfo instanceof PGPEncryptAndSignInfo) { String signerPrincipal = ((PGPEncryptAndSignInfo) cryptInfo).getSignerPrincipal(); try { readSecretKeyBundleIfNecessary(); Iterator<PGPSecretKeyRing> signerSecretKeysIterator = this.keyManager.getSecretKeys().getKeyRings(signerPrincipal); if (!signerSecretKeysIterator.hasNext()) { <START> throw new MissingPGPKeyException(createStaticMessage("Signer private key not found for principal: " + signerPrincipal)) ; <END> } PGPSecretKey signerSecretKey = signerSecretKeysIterator.next().getSecretKey(); PGPPrivateKey signerPrivateKey = signerSecretKey.extractPrivateKey(PBE_SECRET_KEY_DECRYPTOR_BUILDER.build(keyManager.getSecretPassphrase().toCharArray())); return new PGPCryptInfo(publicKey, signerPrivateKey, signerPrincipal); } catch (PGPException e) { throw new MissingPGPKeyException(e); } } else { return new PGPCryptInfo(publicKey, false); } } else { PGPCryptInfo info = (PGPCryptInfo) cryptInfo; this.checkKeyExpirity(info.getPublicKey()); return info; } }</code><technical_language>static literal</technical_language>

Target:
private PGPCryptInfo safeGetCryptInfo(Object cryptInfo) throws MissingPGPKeyException { if (cryptInfo == null) { return new PGPCryptInfo(getPublicKeyForCurrentEventValidatingIt(), false); } else if (cryptInfo instanceof PGPEncryptAndSignInfo) { return doSafeGetEncryptAndSignInfo((PGPEncryptAndSignInfo) cryptInfo); } else { PGPCryptInfo info = (PGPCryptInfo) cryptInfo; this.checkKeyExpirity(info.getPublicKey()); return info; } }
Source:
<code>public GlowEntity spawn(Location location, Class<? extends GlowEntity> clazz, SpawnReason reason) throws IllegalArgumentException { if (TNTPrimed.class.isAssignableFrom(clazz)) { <START> return new GlowTntPrimed(location, null); <END> } GlowEntity entity = null; try { MethodHandle constructor = entityCtors.computeIfAbsent(clazz, clazz_ -> { try { return MethodHandles.lookup().unreflectConstructor( clazz_.getConstructor(Location.class)); } catch (IllegalAccessException e) { throw new IllegalAccessError(e.getMessage()); } catch (NoSuchMethodException e) { throw new NoSuchMethodError(e.getMessage()); } }); entity = (GlowEntity) constructor.invokeExact((Location) location); GlowEntity impl = entity; EntitySpawnEvent spawnEvent = null; if (entity instanceof LivingEntity) { spawnEvent = EventFactory .callEvent(new CreatureSpawnEvent((LivingEntity) entity, reason)); } else if (!(entity instanceof Item)) { spawnEvent = EventFactory.callEvent(new EntitySpawnEvent(entity)); } if (spawnEvent != null && spawnEvent.isCancelled()) { entity.remove(); } else { List<Message> spawnMessage = entity.createSpawnMessage(); getRawPlayers().stream().filter(player -> player.canSeeEntity(impl)) .forEach(player -> player.getSession().sendAll(spawnMessage .toArray(new Message[spawnMessage.size()]))); } } catch (NoSuchMethodError | IllegalAccessError e) { GlowServer.logger.log(Level.WARNING, "Invalid entity spawn: ", e); } catch (Throwable t) { GlowServer.logger.log(Level.SEVERE, "Unable to spawn entity: ", t); } if (entity != null) { return entity; } throw new UnsupportedOperationException("Not supported yet."); }</code><technical_language>This prevents events called (under this statement) for Primed TNT</technical_language>

Target:
public GlowEntity spawn(Location location, Class<? extends GlowEntity> clazz, SpawnReason reason) throws IllegalArgumentException { GlowEntity entity = null; try { if (EntityRegistry.getEntity(clazz) != null) { entity = EntityStorage.create(clazz, location); } EntitySpawnEvent spawnEvent = null; if (entity instanceof LivingEntity) { spawnEvent = EventFactory .callEvent(new CreatureSpawnEvent((LivingEntity) entity, reason)); } else if (!(entity instanceof Item)) { spawnEvent = EventFactory.callEvent(new EntitySpawnEvent(entity)); } if (spawnEvent != null && spawnEvent.isCancelled()) { entity.remove(); } else { List<Message> spawnMessage = entity.createSpawnMessage(); final GlowEntity finalEntity = entity; getRawPlayers().stream().filter(player -> player.canSeeEntity(finalEntity)) .forEach(player -> player.getSession().sendAll(spawnMessage .toArray(new Message[spawnMessage.size()]))); } } catch (NoSuchMethodError | IllegalAccessError e) { GlowServer.logger.log(Level.WARNING, "Invalid entity spawn: ", e); } catch (Throwable t) { GlowServer.logger.log(Level.SEVERE, "Unable to spawn entity: ", t); } if (entity != null) { return entity; } throw new UnsupportedOperationException("Not supported yet."); }
Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_logs); mSectionsPagerAdapter = new SectionsPagerAdapter( getSupportFragmentManager()); mViewPager = (ViewPager) findViewById(R.id.pager); mViewPager.setAdapter(mSectionsPagerAdapter); findViewById(R.id.add_entry_button).setOnClickListener( new View.OnClickListener() { @SuppressLint("ShowToast") @Override public void onClick(View view) { <START> if(((UBudgetApp) getApplication()).getBudgetList().isEmpty()){ <END> Toast.makeText(LogsActivity.this, R.string.dialog_add_budget_first, Toast.LENGTH_LONG).show(); }else{ Intent intent = new Intent(LogsActivity.this, AddEntryActivity.class); startActivity(intent); } } }); findViewById(R.id.add_budget_button).setOnClickListener( new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(LogsActivity.this, AddBudgetActivity.class); startActivity(intent); } }); }</code><technical_language>Decompose this multiple lines for clarity</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_logs); mSectionsPagerAdapter = new SectionsPagerAdapter( getSupportFragmentManager()); mViewPager = (ViewPager) findViewById(R.id.pager); mViewPager.setAdapter(mSectionsPagerAdapter); findViewById(R.id.add_entry_button).setOnClickListener( new View.OnClickListener() { @SuppressLint("ShowToast") @Override public void onClick(View view) { List<Budget> budgets = ((UBudgetApp) getApplication()).getBudgetList(); if(budgets.isEmpty()){ Toast.makeText(LogsActivity.this, R.string.dialog_add_budget_first, Toast.LENGTH_LONG).show(); }else{ Intent intent = new Intent(LogsActivity.this, AddEntryActivity.class); startActivity(intent); } } }); findViewById(R.id.add_budget_button).setOnClickListener( new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(LogsActivity.this, AddBudgetActivity.class); startActivity(intent); } }); }
Source:
<code><START> @Override public void onPositiveClicked(@NotNull String instanceTag) { <END> switch (instanceTag) { case GOOGLE_ERROR_DIALOG_TAG: break; } }</code><technical_language>@Override annotation a separate line onPositiveClicked method for code consistency</technical_language>

Target:
public void onPositiveClicked(@NotNull String instanceTag) { switch (instanceTag) { case GOOGLE_ERROR_DIALOG_TAG: break; } }
Source:
<code>public void propertyChange(PropertyChangeEvent evt) { try { getController().handleCaseEvent(evt); } catch (NoCurrentCaseException ex) { return; } catch (TskCoreException ex) { MessageNotifyUtil.Message.error("Error creating timeline controller."); logger.log(Level.SEVERE, "Error creating timeline controller", ex); } if (Case.Events.valueOf(evt.getPropertyName()).equals(CURRENT_CASE)) { <START> synchronized (controllerLock) { <END> controller = null; } } }</code><technical_language>significance (if any) of "if (evt.getNewValue() == null)" check in original code</technical_language>

Target:
public void propertyChange(PropertyChangeEvent evt) { if (Case.Events.valueOf(evt.getPropertyName()).equals(CURRENT_CASE)) { if (evt.getNewValue() == null) { synchronized (controllerLock) { if (controller != null) { SwingUtilities.invokeLater(controller::shutDownTimeLine); } controller = null; } } } else { try { getController().handleCaseEvent(evt); } catch (NoCurrentCaseException ignored) { } catch (TskCoreException ex) { logger.log(Level.SEVERE, "Error handling application event", ex); } } }
Source:
<code>public void processAst(IASTTranslationUnit ast) { ast.accept(new ASTVisitor() { { shouldVisitNames = true; shouldVisitImplicitNames = true; } @Override public int visit(IASTName name) { try { IBinding binding = name.resolveBinding(); if (binding instanceof ICExternalBinding) if ( !(binding instanceof CImplicitFunction) && (binding instanceof CExternalFunction)) { <START> reportProblem(ERR_ID, name.getLastName(), new String(name.getSimpleID())); <END> return PROCESS_CONTINUE; } } catch (Exception e) { CodanCheckersActivator.log(e); } return PROCESS_CONTINUE; } }); }</code><technical_language>new String(String)</technical_language>

Target:
public void processAst(IASTTranslationUnit ast) { ast.accept(new ASTVisitor() { { shouldVisitNames = true; shouldVisitImplicitNames = true; } @Override public int visit(IASTName name) { try { IBinding binding = name.resolveBinding(); if (binding instanceof ICExternalBinding) if ( !(binding instanceof CImplicitFunction) && (binding instanceof CExternalFunction)) { reportProblem(ERR_ID, name.getLastName(), name.getRawSignature()); return PROCESS_CONTINUE; } } catch (Exception e) { CodanCheckersActivator.log(e); } return PROCESS_CONTINUE; } }); }
Source:
<code>private static <T extends Node> T simplifiedParse(ParseStart<T> context, Provider provider) { ParseResult<T> result = new JavaParser(staticConfiguration).parse(context, provider); if (result.isSuccessful()) { return result.getResult().get(); } <START> throw new ParseProblemException(result); <END> }</code><technical_language>problems enough</technical_language>

Target:
private static <T extends Node> T simplifiedParse(ParseStart<T> context, Provider provider) { ParseResult<T> result = new JavaParser(staticConfiguration).parse(context, provider); if (result.isSuccessful()) { return result.getResult().get(); } throw new ParseProblemException(result.getProblems()); }
Source:
<code>public final void setData(String sessionId, String key, Object value) { SessionInfo sessionInfo = getSessionInfo(sessionId); if (sessionInfo == null) { sessionInfo = new SessionInfo(); sessionInfo.contentOfSession.put(ENGINE_SESSION_ID, sessionId); <START> if (!key.equals(SOFT_LIMIT_INTERVAL_PARAMETER_NAME)) { <END> sessionInfo.contentOfSession.put(SOFT_LIMIT_INTERVAL_PARAMETER_NAME, Config.<Integer> getValue(ConfigValues.UserSessionTimeOutInterval)); } SessionInfo oldSessionInfo = sessionInfoMap.putIfAbsent(sessionId, sessionInfo); if (oldSessionInfo != null) { sessionInfo = oldSessionInfo; } } sessionInfo.contentOfSession.put(key, value); }</code><technical_language>noticed... key soft limit if session id is null, please remove condition. anyway, if so, this condition is unneeded complexity bellow key is set anyway</technical_language>

Target:
public final void setData(String sessionId, String key, Object value) { SessionInfo sessionInfo = getSessionInfo(sessionId); if (sessionInfo == null) { sessionInfo = new SessionInfo(); sessionInfo.contentOfSession.put(ENGINE_SESSION_ID, sessionId); sessionInfo.contentOfSession.put(SOFT_LIMIT_INTERVAL_PARAMETER_NAME, Config.<Integer> getValue(ConfigValues.UserSessionTimeOutInterval)); SessionInfo oldSessionInfo = sessionInfoMap.putIfAbsent(sessionId, sessionInfo); if (oldSessionInfo != null) { sessionInfo = oldSessionInfo; } } sessionInfo.contentOfSession.put(key, value); }
Source:
<code>public CompletableFuture<Boolean> replaceWithVersionAsync(K key, V newValue, long version, long lifespan, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit) { assertRemoteCacheManagerIsStarted(); ReplaceIfUnmodifiedOperation op = operationsFactory.newReplaceIfUnmodifiedOperation( compatKeyIfNeeded(key), keyToBytes(key), valueToBytes(newValue), lifespan, lifespanTimeUnit, maxIdle, maxIdleTimeUnit, version, dataFormat); return op.execute().thenApply(response -> { boolean b = response.getCode().isUpdated(); <START> if (statistics && b) { <END> clientStatistics.incrementRemoteStores(); } return b; }); }</code><technical_language>statistics check out lambda (if want in operations), this is creating another CF</technical_language>

Target:
public CompletableFuture<Boolean> replaceWithVersionAsync(K key, V newValue, long version, long lifespan, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit) { assertRemoteCacheManagerIsStarted(); ReplaceIfUnmodifiedOperation op = operationsFactory.newReplaceIfUnmodifiedOperation( keyAsObjectIfNeeded(key), keyToBytes(key), valueToBytes(newValue), lifespan, lifespanTimeUnit, maxIdle, maxIdleTimeUnit, version, dataFormat); return op.execute().thenApply(response -> response.getCode().isUpdated()); }
Source:
<code>public void commit() throws DockerException, InterruptedException { assumeNotSwarm("", dockerRule); CreateContainerResponse container = dockerRule.getClient().createContainerCmd(DEFAULT_IMAGE) .withCmd("touch", "/test") .exec(); LOG.info("Created container: {}", container.toString()); assertThat(container.getId(), not(isEmptyString())); dockerRule.getClient().startContainerCmd(container.getId()).exec(); LOG.info("Committing container: {}", container.toString()); String imageId = dockerRule.getClient().commitCmd(container.getId()).exec(); <START> wait(5000); <END> InspectImageResponse inspectImageResponse = dockerRule.getClient().inspectImageCmd(imageId).exec(); LOG.info("Image Inspect: {}", inspectImageResponse.toString()); assertThat(inspectImageResponse, hasField("container", startsWith(container.getId()))); assertThat(inspectImageResponse.getContainerConfig().getImage(), equalTo(DEFAULT_IMAGE)); InspectImageResponse busyboxImg = dockerRule.getClient().inspectImageCmd("busybox").exec(); assertThat(inspectImageResponse.getParent(), equalTo(busyboxImg.getId())); }</code><technical_language>awaitility query needed</technical_language>

Target:
public void commit() throws DockerException, InterruptedException { CreateContainerResponse container = dockerRule.getClient().createContainerCmd(DEFAULT_IMAGE) .withCmd("touch", "/test") .exec(); LOG.info("Created container: {}", container.toString()); assertThat(container.getId(), not(isEmptyString())); dockerRule.getClient().startContainerCmd(container.getId()).exec(); LOG.info("Committing container: {}", container.toString()); String imageId = dockerRule.getClient().commitCmd(container.getId()).exec(); synchronized (this) { wait(5000); } InspectImageResponse inspectImageResponse = dockerRule.getClient().inspectImageCmd(imageId).exec(); LOG.info("Image Inspect: {}", inspectImageResponse.toString()); assertThat(inspectImageResponse, hasField("container", startsWith(container.getId()))); assertThat(inspectImageResponse.getContainerConfig().getImage(), equalTo(DEFAULT_IMAGE)); InspectImageResponse busyboxImg = dockerRule.getClient().inspectImageCmd("busybox").exec(); assertThat(inspectImageResponse.getParent(), equalTo(busyboxImg.getId())); }
Source:
<code>public static <M extends Message> M getMessage(Failure failure) { checkNotNull(failure); <START> final M result = AnyPacker.unpack(failure.getMessage()); <END> return result; }</code><technical_language>good pack/unpack invoked in a symmetric way. pack() is statically imported, while unpack() is not</technical_language>

Target:
public static <M extends Message> M getMessage(Failure failure) { checkNotNull(failure); final M result = unpack(failure.getMessage()); return result; }
Source:
<code>protected View inflate(LayoutInflater layoutInflater, ViewGroup viewGroup) { View inflatedView = layoutInflater.inflate(R.layout.item_notification, viewGroup, false); ButterKnife.bind(this, inflatedView); <START> if (NotificationActivity.isarchivedvisible) { <END> swipeLayout.setSwipeEnabled(false); }else { swipeLayout.setSwipeEnabled(true); } swipeLayout.addDrag(SwipeLayout.DragEdge.Top, bottomLayout); swipeLayout.addRevealListener(R.id.bottom_wrapper_child1, (child, edge, fraction, distance) -> { View star = child.findViewById(R.id.star); float d = child.getHeight() / 2 - star.getHeight() / 2; ViewHelper.setTranslationY(star, d * fraction); ViewHelper.setScaleX(star, fraction + 0.6f); ViewHelper.setScaleY(star, fraction + 0.6f); int c = (Integer) evaluate(fraction, Color.parseColor("#dddddd"), Color.parseColor("#90960a0a")); child.setBackgroundColor(c); }); return inflatedView; }</code><technical_language>Pass isSwipeEnabled in constructor. Do NotificationActivity.isarchivedvisible</technical_language>

Target:
protected View inflate(LayoutInflater layoutInflater, ViewGroup viewGroup) { View inflatedView = layoutInflater.inflate(R.layout.item_notification, viewGroup, false); ButterKnife.bind(this, inflatedView); if (isarchivedvisible) { swipeLayout.setSwipeEnabled(false); }else { swipeLayout.setSwipeEnabled(true); } swipeLayout.addDrag(SwipeLayout.DragEdge.Top, bottomLayout); swipeLayout.addRevealListener(R.id.bottom_wrapper_child1, (child, edge, fraction, distance) -> { View star = child.findViewById(R.id.star); float d = child.getHeight() / 2 - star.getHeight() / 2; ViewHelper.setTranslationY(star, d * fraction); ViewHelper.setScaleX(star, fraction + 0.6f); ViewHelper.setScaleY(star, fraction + 0.6f); int c = (Integer) evaluate(fraction, Color.parseColor("#dddddd"), Color.parseColor("#90960a0a")); child.setBackgroundColor(c); }); return inflatedView; }
Source:
<code>public void endTask() { assert lastWork == totalWork : "Recorded " + lastWork + <START> " units of work where "+totalWork+" were planned"; <END> }</code><technical_language>assertEquals(totalWork, lastWork, ...) here</technical_language>

Target:
public void endTask() { assertEquals("Units of work recorded", totalWork, lastWork); }
Source:
<code>public CouchClient(CouchConfig config) { this.jsonHelper = new JSONHelper(); this.uriHelper = new CouchURIHelper(config.getRootUri()); this.customHeaders = config.getCustomHeaders(); this.requestFilters = config.getRequestFilters(); <START> this.responseFilters = config.getResponseFilters(); <END> }</code><technical_language>Create new lists assigning them</technical_language>

Target:
public CouchClient(CouchConfig config) { this.jsonHelper = new JSONHelper(); this.uriHelper = new CouchURIHelper(config.getRootUri()); this.customHeaders = config.getCustomHeaders(); this.requestFilters = new ArrayList<HttpConnectionRequestFilter>(); this.responseFilters = new ArrayList<HttpConnectionResponseFilter>(); if(config.getRequestFilters() != null) { this.requestFilters.addAll(config.getRequestFilters()); } if(config.getResponseFilters() != null) { this.responseFilters.addAll(config.getResponseFilters()); } }
Source:
<code>public static void main(String[] args) { assertEquals(0, $noinline$div(1)); assertEquals(1, $noinline$rem(1)); assertEquals(0, $noinline$div(-1)); assertEquals(-1, $noinline$rem(-1)); assertEquals(0, $noinline$div(0)); assertEquals(0, $noinline$rem(0)); assertEquals(1, $noinline$div(Integer.MIN_VALUE)); assertEquals(0, $noinline$rem(Integer.MIN_VALUE)); assertEquals(0, $noinline$div(Integer.MAX_VALUE)); assertEquals(Integer.MAX_VALUE, $noinline$rem(Integer.MAX_VALUE)); assertEquals(0, $noinline$div(Integer.MAX_VALUE - 1)); assertEquals(Integer.MAX_VALUE - 1, $noinline$rem(Integer.MAX_VALUE - 1)); assertEquals(0, $noinline$div(Integer.MIN_VALUE + 1)); assertEquals(Integer.MIN_VALUE + 1, $noinline$rem(Integer.MIN_VALUE + 1)); assertEquals(0L, <START> $noinline$div(1)); <END> assertEquals(1L, $noinline$rem(1)); assertEquals(0L, $noinline$div(-1)); assertEquals(-1L, $noinline$rem(-1)); assertEquals(0L, $noinline$div(0)); assertEquals(0L, $noinline$rem(0)); assertEquals(1L, $noinline$div(Long.MIN_VALUE)); assertEquals(0L, $noinline$rem(Long.MIN_VALUE)); assertEquals(0L, $noinline$div(Long.MAX_VALUE)); assertEquals(Long.MAX_VALUE, $noinline$rem(Long.MAX_VALUE)); assertEquals(0L, $noinline$div(Long.MAX_VALUE - 1)); assertEquals(Long.MAX_VALUE - 1, $noinline$rem(Long.MAX_VALUE - 1)); assertEquals(0L, $noinline$div(Integer.MIN_VALUE + 1)); assertEquals(Long.MIN_VALUE + 1, $noinline$rem(Long.MIN_VALUE + 1)); }</code><technical_language>This invokes int variant of method - need invoke 1L. said, renamed $noinline$div_int $noinline$div_long confusion. for below..</technical_language>

Target:
public static void main(String[] args) { assertEquals(0, $noinline$divInt(1)); assertEquals(1, $noinline$remInt(1)); assertEquals(0, $noinline$divInt(-1)); assertEquals(-1, $noinline$remInt(-1)); assertEquals(0, $noinline$divInt(0)); assertEquals(0, $noinline$remInt(0)); assertEquals(1, $noinline$divInt(Integer.MIN_VALUE)); assertEquals(0, $noinline$remInt(Integer.MIN_VALUE)); assertEquals(0, $noinline$divInt(Integer.MAX_VALUE)); assertEquals(Integer.MAX_VALUE, $noinline$remInt(Integer.MAX_VALUE)); assertEquals(0, $noinline$divInt(Integer.MAX_VALUE - 1)); assertEquals(Integer.MAX_VALUE - 1, $noinline$remInt(Integer.MAX_VALUE - 1)); assertEquals(0, $noinline$divInt(Integer.MIN_VALUE + 1)); assertEquals(Integer.MIN_VALUE + 1, $noinline$remInt(Integer.MIN_VALUE + 1)); assertEquals(0L, $noinline$divLong(1L)); assertEquals(1L, $noinline$remLong(1L)); assertEquals(0L, $noinline$divLong(-1L)); assertEquals(-1L, $noinline$remLong(-1L)); assertEquals(0L, $noinline$divLong(0L)); assertEquals(0L, $noinline$remLong(0L)); assertEquals(1L, $noinline$divLong(Long.MIN_VALUE)); assertEquals(0L, $noinline$remLong(Long.MIN_VALUE)); assertEquals(0L, $noinline$divLong(Long.MAX_VALUE)); assertEquals(Long.MAX_VALUE, $noinline$remLong(Long.MAX_VALUE)); assertEquals(0L, $noinline$divLong(Long.MAX_VALUE - 1)); assertEquals(Long.MAX_VALUE - 1, $noinline$remLong(Long.MAX_VALUE - 1)); assertEquals(0L, $noinline$divLong(Integer.MIN_VALUE + 1)); assertEquals(Long.MIN_VALUE + 1, $noinline$remLong(Long.MIN_VALUE + 1)); }
Source:
<code>public ConnectorSplitSource getSplits(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorTableLayoutHandle layout, SplitSchedulingStrategy splitSchedulingStrategy) { SystemTableLayoutHandle layoutHandle = (SystemTableLayoutHandle) layout; SystemTableHandle tableHandle = layoutHandle.getTable(); TupleDomain<ColumnHandle> constraint = layoutHandle.getConstraint(); <START> SystemTable systemTable = tables.getSystemTable(session, tableHandle.getSchemaTableName()).orElseThrow(() -> new IllegalArgumentException("no table found for " + tableHandle)); <END> Distribution tableDistributionMode = systemTable.getDistribution(); if (tableDistributionMode == SINGLE_COORDINATOR) { HostAddress address = nodeManager.getCurrentNode().getHostAndPort(); ConnectorSplit split = new SystemSplit(tableHandle.getConnectorId(), tableHandle, address, constraint); return new FixedSplitSource(ImmutableList.of(split)); } ImmutableList.Builder<ConnectorSplit> splits = ImmutableList.builder(); ImmutableSet.Builder<Node> nodes = ImmutableSet.builder(); if (tableDistributionMode == ALL_COORDINATORS) { nodes.addAll(nodeManager.getCoordinators()); } else if (tableDistributionMode == ALL_NODES) { nodes.addAll(nodeManager.getNodes(ACTIVE)); } Set<Node> nodeSet = nodes.build(); for (Node node : nodeSet) { splits.add(new SystemSplit(tableHandle.getConnectorId(), tableHandle, node.getHostAndPort(), constraint)); } return new FixedSplitSource(splits.build()); }</code><technical_language>newline . orElseThrow</technical_language>

Target:
public ConnectorSplitSource getSplits(ConnectorTransactionHandle transactionHandle, ConnectorSession session, ConnectorTableLayoutHandle layout, SplitSchedulingStrategy splitSchedulingStrategy) { SystemTableLayoutHandle layoutHandle = (SystemTableLayoutHandle) layout; SystemTableHandle tableHandle = layoutHandle.getTable(); TupleDomain<ColumnHandle> constraint = layoutHandle.getConstraint(); SystemTable systemTable = tables.getSystemTable(session, tableHandle.getSchemaTableName()) .orElseThrow(() -> new PrestoException(NOT_FOUND, format("Table %s not found", tableHandle.getSchemaTableName()))); Distribution tableDistributionMode = systemTable.getDistribution(); if (tableDistributionMode == SINGLE_COORDINATOR) { HostAddress address = nodeManager.getCurrentNode().getHostAndPort(); ConnectorSplit split = new SystemSplit(tableHandle.getConnectorId(), tableHandle, address, constraint); return new FixedSplitSource(ImmutableList.of(split)); } ImmutableList.Builder<ConnectorSplit> splits = ImmutableList.builder(); ImmutableSet.Builder<Node> nodes = ImmutableSet.builder(); if (tableDistributionMode == ALL_COORDINATORS) { nodes.addAll(nodeManager.getCoordinators()); } else if (tableDistributionMode == ALL_NODES) { nodes.addAll(nodeManager.getNodes(ACTIVE)); } Set<Node> nodeSet = nodes.build(); for (Node node : nodeSet) { splits.add(new SystemSplit(tableHandle.getConnectorId(), tableHandle, node.getHostAndPort(), constraint)); } return new FixedSplitSource(splits.build()); }
Source:
<code><START> public void incrementCount() { <END> this.count++; }</code><technical_language>Is a rationale for exposing a public method increment count</technical_language>

Target:
private void incrementCount() { this.count++; }
Source:
<code>private void upgradeTo8Dot2() { <START> LayoutSyncManager.getInstance().getSmartStore().dropAllSoups(); <END> LayoutSyncManager.reset(); }</code><technical_language>remove soups? simply delete soups layout sync sank into? Alternatively, write query work keys new keys for layouts</technical_language>

Target:
private void upgradeTo8Dot2() { LayoutSyncManager.getInstance().getSmartStore().dropSoup("sfdcLayouts"); LayoutSyncManager.reset(); }
Source:
<code>private static void setBool(ListBox box, InheritedBoolean val) { <START> if (box != null) { <END> for (int i = 0; i < box.getItemCount(); i++) { if (val.name().equals(box.getValue(i))) { box.setSelectedIndex(i); break; } } } }</code><technical_language>box null? If yes, checked in getBool(ListBox)</technical_language>

Target:
private static void setBool(ListBox box, InheritedBoolean val) { for (int i = 0; i < box.getItemCount(); i++) { if (val.name().equals(box.getValue(i))) { box.setSelectedIndex(i); break; } } }
Source:
<code>private Map<String, TopologyIracVersion> generateNewVectorFunction(Integer s, Map<String, TopologyIracVersion> versions) { if (versions == null) { return Collections.singletonMap(localSite, TopologyIracVersion.newVersion(topologyId)); } else { Map<String, TopologyIracVersion> copy = new HashMap<>(versions); copy.compute(localSite, this::incrementVersionFunction); <START> return Collections.unmodifiableMap(copy); <END> } }</code><technical_language>I store actual Map instead return map wrapped unmodifiable map. extra allocations operation for unmodifiable wrappers internally needed</technical_language>

Target:
private Map<String, TopologyIracVersion> generateNewVectorFunction(Integer s, Map<String, TopologyIracVersion> versions) { if (versions == null) { return Collections.singletonMap(localSite, TopologyIracVersion.newVersion(topologyId)); } else { Map<String, TopologyIracVersion> copy = new HashMap<>(versions); copy.compute(localSite, this::incrementVersionFunction); return copy; } }
Source:
<code>public void testRouterClosingOnRequestResponseHandlerThreadException() throws Exception { router = getNonBlockingRouter(); int blobSize = chunkSize * random.nextInt(10) + 1; for (int i = 0; i < 2; i++) { RequestAndResult requestAndResult = new RequestAndResult(blobSize); requestAndResultsList.add(requestAndResult); MockReadableStreamChannel putChannel = new MockReadableStreamChannel(blobSize); requestAndResult.result = (FutureResult<String>) router .putBlob(requestAndResult.putBlobProperties, requestAndResult.putUserMetadata, putChannel, null); } mockSelectorState.set(MockSelectorState.SleepOnPoll); Thread requestResponseHandlerThread = TestUtils.getThreadByThisName("RequestResponseHandlerThread"); requestResponseHandlerThread.interrupt(); while (TestUtils.numThreadsByThisName("RequestResponseHandlerThread") > 0) { Thread.yield(); } <START> <END> for (RequestAndResult requestAndResult : requestAndResultsList) { requestAndResult.result.await(); } Exception expectedException = new RouterException("", RouterErrorCode.RouterClosed); assertFailure(expectedException); Assert.assertEquals("No ChunkFiller Thread should be running after the router is closed", 0, TestUtils.numThreadsByThisName("ChunkFillerThread")); Assert.assertEquals("No RequestResponseHandler should be running after the router is closed", 0, TestUtils.numThreadsByThisName("RequestResponseHandlerThread")); Assert.assertEquals("All operations should have completed", 0, router.getOperationsCount()); }</code><technical_language>Similar test, try put a blob ensure 3 operations failed</technical_language>

Target:
public void testRouterClosingOnRequestResponseHandlerThreadException() throws Exception { router = getNonBlockingRouter(); int blobSize = chunkSize * random.nextInt(10) + 1; for (int i = 0; i < 2; i++) { RequestAndResult requestAndResult = new RequestAndResult(blobSize); requestAndResultsList.add(requestAndResult); MockReadableStreamChannel putChannel = new MockReadableStreamChannel(blobSize); requestAndResult.result = (FutureResult<String>) router .putBlob(requestAndResult.putBlobProperties, requestAndResult.putUserMetadata, putChannel, null); } mockSelectorState.set(MockSelectorState.ThrowExceptionOnAllPoll); while (TestUtils.numThreadsByThisName("RequestResponseHandlerThread") > 0) { Thread.yield(); } for (RequestAndResult requestAndResult : requestAndResultsList) { requestAndResult.result.await(); } Exception expectedException = new RouterException("", RouterErrorCode.RouterClosed); assertFailure(expectedException); Assert.assertEquals("No ChunkFiller Thread should be running after the router is closed", 0, TestUtils.numThreadsByThisName("ChunkFillerThread")); Assert.assertEquals("No RequestResponseHandler should be running after the router is closed", 0, TestUtils.numThreadsByThisName("RequestResponseHandlerThread")); Assert.assertEquals("All operations should have completed", 0, router.getOperationsCount()); }
Source:
<code>public Book book() { for(Book b : Book.values()) { <START> if((ctx.varpbits.varpbit(Constants.SPELLBOOK_VARPBIT) & 0x3) == <END> b.varp) return b; } return Book.NIL; }</code><technical_language>Introduce a local variable for varp grab iteration</technical_language>

Target:
public Book book() { int varp = ctx.varpbits.varpbit(Constants.SPELLBOOK_VARPBIT) & 0x3; for(Book b : Book.values()) { if(varp == b.varp) return b; } return Book.NIL; }
Source:
<code>private static boolean isQuotedType(HiveType type) { <START> return QUOTED_TYPES.contains(type.getTypeInfo().getTypeName()); <END> }</code><technical_language>this works for varchar char, override for TypeInfo.getTypeName() returns a qualified name varchar(30). want type.getTypeSignature().getBase(), return base Presto type name</technical_language>

Target:
private static boolean isQuotedType(HiveType type) { return QUOTED_TYPES.contains(type.getTypeSignature().getBase()); }
Source:
<code>public void setUp() { context = InstrumentationRegistry.getInstrumentation().getContext(); UserPreferences.init(context); PodDBAdapter.init(context); PodDBAdapter.deleteDatabase(); PodDBAdapter adapter = PodDBAdapter.getInstance(); adapter.open(); adapter.close(); SharedPreferences spref = mock(SharedPreferences.class); when(spref.getString(eq("prefGpodnetHostname"), anyString())).thenReturn("gpodder.net"); Application app = mock(Application.class); when(app.getSharedPreferences(anyString(), anyInt())).thenReturn(spref); ClientConfig.applicationCallbacks = mock(ApplicationCallbacks.class); when(ClientConfig.applicationCallbacks.getApplicationInstance()).thenReturn(app); <START> localFeedDir1 = new File("sampledata/local-feed1"); <END> localFeedDir2 = new File("sampledata/local-feed2"); List<File> files = new ArrayList<>(); Collections.addAll(files, localFeedDir1.listFiles()); Collections.addAll(files, localFeedDir2.listFiles()); for (File file : files) { DataSource ds = DataSource.toDataSource(context, Uri.fromFile(file)); ShadowMediaMetadataRetriever.addMetadata(ds, MediaMetadataRetriever.METADATA_KEY_DURATION, "10"); ShadowMediaMetadataRetriever.addMetadata(ds, MediaMetadataRetriever.METADATA_KEY_TITLE, file.getName()); } shadowOf(MimeTypeMap.getSingleton()).addExtensionMimeTypMapping("mp3", "audio/mp3"); }</code><technical_language>a test flavour of assets folder? understanding, sampledata is for layout rendering in Android Studio, for unit tests</technical_language>

Target:
public void setUp() throws Exception { context = InstrumentationRegistry.getInstrumentation().getContext(); UserPreferences.init(context); Application app = (Application) context; ClientConfig.applicationCallbacks = mock(ApplicationCallbacks.class); when(ClientConfig.applicationCallbacks.getApplicationInstance()).thenReturn(app); PodDBAdapter.init(context); PodDBAdapter.deleteDatabase(); PodDBAdapter adapter = PodDBAdapter.getInstance(); adapter.open(); adapter.close(); mapDummyMetadata(LOCAL_FEED_DIR1); mapDummyMetadata(LOCAL_FEED_DIR2); shadowOf(MimeTypeMap.getSingleton()).addExtensionMimeTypMapping("mp3", "audio/mp3"); }
Source:
<code>public void setDisplay(DisplayUnit display) { <START> DisplayData mData = display.evaluate(); <END> setAVT(Localizer.processArguments(display.getText().evaluate(ec), new String[] {""}).trim(), mData.getImageURI()); }</code><technical_language>pass ec here</technical_language>

Target:
public void setDisplay(DisplayUnit display) { DisplayData mData = display.evaluate(ec); setAVT(Localizer.processArguments(display.getText().evaluate(ec), new String[] {""}).trim(), mData.getImageURI()); }
Source:
<code>public void reset() { <START> clearPartition(false, false); <END> stats.reset(); mutationObserver.onReset(); }</code><technical_language>This basically do: clearMapStore(); clearLockStore(); clearIndexedData(false); storage.clear(isDuringShutdown); mutationObserver.onClear(); problem is clearing data lock store calling onClear for mutation observers, of is event journal. reset, service clear data owns. This means LockService is responsible for clearing locks RingbufferService is resposible for clearing event journals. I this method is calling clearIndexedData. leak</technical_language>

Target:
public void reset() { clearMapStore(); storage.clear(false); stats.reset(); mutationObserver.onReset(); }