auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Set<PatternWrapper> getPatterns() { final Set<PatternWrapper> patterns = new HashSet<>(); final BRLRuleModel brlRuleModel = new BRLRuleModel(presenter.getModel()); final List<String> variables = brlRuleModel.getLHSPatternVariables(); <START> variables.stream().forEach(var -> { <END> final String factType = brlRuleModel.getLHSBoundFact(var).getFactType(); final boolean isNegated = brlRuleModel.getLHSBoundFact(var).isNegated(); patterns.add(new PatternWrapper(factType, var, isNegated)); }); return patterns; }</code><technical_language>Another stream().forEach ;-)</technical_language>

Target:
public Set<PatternWrapper> getPatterns() { final Set<PatternWrapper> patterns = new HashSet<>(); final BRLRuleModel brlRuleModel = new BRLRuleModel(presenter.getModel()); final List<String> variables = brlRuleModel.getLHSPatternVariables(); variables.forEach(var -> { final String factType = brlRuleModel.getLHSBoundFact(var).getFactType(); final boolean isNegated = brlRuleModel.getLHSBoundFact(var).isNegated(); patterns.add(new PatternWrapper(factType, var, isNegated)); }); return patterns; }
Source:
<code>ILogData read(@NonNull Long nextRead, @NonNull NavigableSet<Long> addresses, @NonNull ReadOptions options) { if (cacheReadRequest(options)) { ILogData data = readCache.getIfPresent(nextRead); if (data == null) { List<Long> batch = getBatch(nextRead, addresses); log.trace("read: request address {}, read batch {}", nextRead, batch); Map<Long, ILogData> mapAddresses = this.read(batch, options); <START> data = mapAddresses.getOrDefault(nextRead, LogData.COMPACTED); <END> } return data; } return fetch(nextRead); }</code><technical_language>here, getCompacted(long address) set global address for compacted data</technical_language>

Target:
ILogData read(@NonNull Long nextRead, @NonNull NavigableSet<Long> addresses, @NonNull ReadOptions options) { if (cacheReadRequest(options)) { ILogData data = readCache.getIfPresent(nextRead); if (data == null) { List<Long> batch = getBatch(nextRead, addresses); log.trace("read: request address {}, read batch {}", nextRead, batch); Map<Long, ILogData> mapAddresses = this.read(batch, options); data = mapAddresses.getOrDefault(nextRead, LogData.getCompacted(nextRead)); } return data; } return fetch(nextRead); }
Source:
<code>public void shutdown() { if (enableEvents) { monitoringTask.cancel(true); <START> } <END> }</code><technical_language>need change this if ( monitoringTask != null ) monitoringTask.cancel(true);, if enableEvents is true creating a monitoringTask failed watch service is supported current OS, line 282 result in NPE</technical_language>

Target:
public void shutdown() { if (enableEvents && monitoringTask != null) { try { monitoringTask.cancel(true); } finally { monitoringTask = null; } } }
Source:
<code>public List<UuidWithProjectUuidDto> selectAllViewsAndSubViews(DbSession session) { <START> return mapper(session).selectUuidsForQualifiers(Qualifiers.VIEW, Qualifiers.SUBVIEW, Qualifiers.APP); <END> }</code><technical_language>This method is index view</technical_language>

Target:
public List<UuidWithProjectUuidDto> selectAllViewsAndSubViews(DbSession session) { return mapper(session).selectUuidsForQualifiers(Qualifiers.VIEW, Qualifiers.SUBVIEW); }
Source:
<code>public int hashCode() { <START> return new HashCodeBuilder(3, 17).append(right).append(simple) <END> .append(securityTool).toHashCode(); }</code><technical_language>do pass HashCodeBuilder constructor</technical_language>

Target:
public int hashCode() { return new HashCodeBuilder().append(right).append(simple).toHashCode(); }
Source:
<code>private static List<GenericDescription> createEquinoxCapabilities(ManifestElement[] equinoxCapabilities) throws BundleException { if (equinoxCapabilities == null) return null; ArrayList<GenericDescription> results = new ArrayList<>(equinoxCapabilities.length); for (ManifestElement <START> equinoxCapabilitie : <END> equinoxCapabilities) { String[] genericNames = equinoxCapabilitie.getValueComponents(); for (String genericName : genericNames) { GenericDescriptionImpl desc = new GenericDescriptionImpl(); String name = genericName; int colonIdx = genericName.indexOf(':'); if (colonIdx > 0) { name = genericName.substring(0, colonIdx); desc.setType(genericName.substring(colonIdx + 1)); if (IdentityNamespace.IDENTITY_NAMESPACE.equals(desc.getType())) throw new BundleException("A bundle is not allowed to define a capability in the " + IdentityNamespace.IDENTITY_NAMESPACE + " name space."); } Map<String, Object> mapAttrs = getAttributes(equinoxCapabilitie, new String[] {Constants.VERSION_ATTRIBUTE}); Dictionary<String, Object> attrs = mapAttrs == null ? new Hashtable<String, Object>() : new Hashtable<>(mapAttrs); attrs.put(desc.getType(), name); String versionString = equinoxCapabilitie.getAttribute(Constants.VERSION_ATTRIBUTE); if (versionString != null) attrs.put(Constants.VERSION_ATTRIBUTE, Version.parseVersion(versionString)); desc.setAttributes(attrs); results.add(desc); } } return results; }</code><technical_language>Name equinoxCapability</technical_language>

Target:
private static List<GenericDescription> createEquinoxCapabilities(ManifestElement[] equinoxCapabilities) throws BundleException { if (equinoxCapabilities == null) return null; ArrayList<GenericDescription> results = new ArrayList<>(equinoxCapabilities.length); for (ManifestElement equinoxCapability : equinoxCapabilities) { String[] genericNames = equinoxCapability.getValueComponents(); for (String genericName : genericNames) { GenericDescriptionImpl desc = new GenericDescriptionImpl(); String name = genericName; int colonIdx = genericName.indexOf(':'); if (colonIdx > 0) { name = genericName.substring(0, colonIdx); desc.setType(genericName.substring(colonIdx + 1)); if (IdentityNamespace.IDENTITY_NAMESPACE.equals(desc.getType())) throw new BundleException("A bundle is not allowed to define a capability in the " + IdentityNamespace.IDENTITY_NAMESPACE + " name space."); } Map<String, Object> mapAttrs = getAttributes(equinoxCapability, new String[] {Constants.VERSION_ATTRIBUTE}); Dictionary<String, Object> attrs = mapAttrs == null ? new Hashtable<String, Object>() : new Hashtable<>(mapAttrs); attrs.put(desc.getType(), name); String versionString = equinoxCapability.getAttribute(Constants.VERSION_ATTRIBUTE); if (versionString != null) attrs.put(Constants.VERSION_ATTRIBUTE, Version.parseVersion(versionString)); desc.setAttributes(attrs); results.add(desc); } } return results; }
Source:
<code>public void execute(JobExecutionContext context) throws JobExecutionException { Logger.debug(this, "Running DistReindexJournalCleanupThread - " + new Date()); try { run(); } catch (Exception e) { Logger.info(this, e.toString()); } finally { try { HibernateUtil.closeSession(); } catch (DotHibernateException e) { Logger.error(this, e.getMessage(), e); <START> } <END> } }</code><technical_language>Remove entire wrapper finally block, this is happening run</technical_language>

Target:
public void execute(JobExecutionContext context) throws JobExecutionException { Logger.debug(this, "Running DistReindexJournalCleanupThread - " + new Date()); try { run(); } catch (Exception e) { Logger.info(this, e.toString()); } }
Source:
<code><START> public void testOverrideWithStore() { <END> final ConfigurationBuilder builder1 = new ConfigurationBuilder(); builder1.loaders().addStore(DummyInMemoryCacheStoreConfigurationBuilder.class).fetchPersistentState(true); cm = new DefaultCacheManager(new GlobalConfigurationBuilder().build(), builder1.build()); ConfigurationBuilder builder2 = new ConfigurationBuilder(); builder2.read(cm.getDefaultCacheConfiguration()); builder2.eviction().maxEntries(1000); cm.defineConfiguration("named", builder2.build()); cm.getCache("named"); }</code><technical_language>test assert anything... is this ok</technical_language>

Target:
public void testOverrideWithStore() { final ConfigurationBuilder builder1 = new ConfigurationBuilder(); builder1.loaders().addStore(DummyInMemoryCacheStoreConfigurationBuilder.class); cm = new DefaultCacheManager(new GlobalConfigurationBuilder().build(), builder1.build()); ConfigurationBuilder builder2 = new ConfigurationBuilder(); builder2.read(cm.getDefaultCacheConfiguration()); builder2.eviction().maxEntries(1000); Configuration configuration = cm.defineConfiguration("named", builder2.build()); assertEquals(1, configuration.loaders().cacheLoaders().size()); }
Source:
<code>@Override public Result load(Request request, int networkPolicy) throws IOException { Response response = downloader.load(request.uri, request.networkPolicy); if (response == null) { return null; } Picasso.LoadedFrom loadedFrom = response.cached ? DISK : NETWORK; Bitmap bitmap = response.getBitmap(); if (bitmap != null) { return new Result(bitmap, loadedFrom); } InputStream is = response.getInputStream(); if (is == null) { return null; } if (loadedFrom == DISK && response.getContentLength() == 0) { Utils.closeQuietly(is); throw new ContentLengthException("Received response with 0 content-length header."); } if (loadedFrom == NETWORK && response.getContentLength() > 0) { stats.dispatchDownloadFinished(response.getContentLength()); } try { int orientation = ExifStreamReader.getOrientation(is); return new Result(is, loadedFrom, orientation); } catch (IOException ignored) { <START> <END> } return new Result(is, loadedFrom); }</code><technical_language>Remove empty line</technical_language>

Target:
@Override public Result load(Request request, int networkPolicy) throws IOException { Response response = downloader.load(request.uri, request.networkPolicy); if (response == null) { return null; } Picasso.LoadedFrom loadedFrom = response.cached ? DISK : NETWORK; Bitmap bitmap = response.getBitmap(); if (bitmap != null) { return new Result(bitmap, loadedFrom); } InputStream is = response.getInputStream(); if (is == null) { return null; } if (loadedFrom == DISK && response.getContentLength() == 0) { Utils.closeQuietly(is); throw new ContentLengthException("Received response with 0 content-length header."); } if (loadedFrom == NETWORK && response.getContentLength() > 0) { stats.dispatchDownloadFinished(response.getContentLength()); } try { MarkableInputStream markStream = new MarkableInputStream(is); is = markStream; int orientation = ExifStreamReader.getOrientation(is); return new Result(is, loadedFrom, orientation); } catch (IOException ignored) { } return new Result(is, loadedFrom); }
Source:
<code>private void increaseNumberOfHandledNodesWithLockAndPersist(final int additionalNumberOfNodes) { setPersistedInfraVariable((PersistedInfraVariablesHandler<Void>) () -> { int updated = (int) this.persistedInfraVariables.get(NB_HANDLED_NODES_KEY) + additionalNumberOfNodes; this.persistedInfraVariables.put(NB_HANDLED_NODES_KEY, updated); <START> return null; <END> }); }</code><technical_language>is fine returns null</technical_language>

Target:
private void increaseNumberOfHandledNodesWithLockAndPersist(final int additionalNumberOfNodes) { setPersistedInfraVariable(() -> { int updated = (int) this.persistedInfraVariables.get(NB_HANDLED_NODES_KEY) + additionalNumberOfNodes; this.persistedInfraVariables.put(NB_HANDLED_NODES_KEY, updated); return updated; }); }
Source:
<code>public ListResponse<DomainRouterResponse> searchForRouters(ListRoutersCmd cmd) { Pair<List<DomainRouterJoinVO>, Integer> result = searchForRoutersInternal(cmd, cmd.getId(), cmd.getRouterName(), cmd.getState(), cmd.getZoneId(), cmd.getPodId(), cmd.getClusterId(), cmd.getHostId(), cmd.getKeyword(), cmd.getNetworkId(), cmd.getVpcId(), cmd.getForVpc(), cmd.getRole(), cmd.getVersion()); ListResponse<DomainRouterResponse> response = new ListResponse<DomainRouterResponse>(); <START> if (!VirtualNetworkApplianceManager.RouterHealthChecksEnabled.value()) { s_logger.debug("Skipping health checks data in router as router.health.checks.enabled is false for router"); return response; } <END> List<DomainRouterResponse> routerResponses = ViewResponseHelper.createDomainRouterResponse(result.first().toArray(new DomainRouterJoinVO[result.first().size()])); for (DomainRouterResponse res : routerResponses) { DomainRouterVO resRouter = _routerDao.findByUuid(res.getId()); res.setHealthChecksFailed(routerHealthCheckResultDao.hasFailingChecks(resRouter.getId())); if (cmd.shouldFetchHealthCheckResults()) { res.setHealthCheckResults(responseGenerator.createHealthCheckResponse(resRouter, new ArrayList<>(routerHealthCheckResultDao.getHealthCheckResults(resRouter.getId())))); } } response.setResponses(routerResponses, result.second()); return response; }</code><technical_language>again, i more interested in a log is enabled</technical_language>

Target:
public ListResponse<DomainRouterResponse> searchForRouters(ListRoutersCmd cmd) { Pair<List<DomainRouterJoinVO>, Integer> result = searchForRoutersInternal(cmd, cmd.getId(), cmd.getRouterName(), cmd.getState(), cmd.getZoneId(), cmd.getPodId(), cmd.getClusterId(), cmd.getHostId(), cmd.getKeyword(), cmd.getNetworkId(), cmd.getVpcId(), cmd.getForVpc(), cmd.getRole(), cmd.getVersion()); ListResponse<DomainRouterResponse> response = new ListResponse<DomainRouterResponse>(); List<DomainRouterResponse> routerResponses = ViewResponseHelper.createDomainRouterResponse(result.first().toArray(new DomainRouterJoinVO[result.first().size()])); if (VirtualNetworkApplianceManager.RouterHealthChecksEnabled.value()) { for (DomainRouterResponse res : routerResponses) { DomainRouterVO resRouter = _routerDao.findByUuid(res.getId()); res.setHealthChecksFailed(routerHealthCheckResultDao.hasFailingChecks(resRouter.getId())); if (cmd.shouldFetchHealthCheckResults()) { res.setHealthCheckResults(responseGenerator.createHealthCheckResponse(resRouter, new ArrayList<>(routerHealthCheckResultDao.getHealthCheckResults(resRouter.getId())))); } } } response.setResponses(routerResponses, result.second()); return response; }
Source:
<code>public TriggerResult onProcessingTime(long time, W window, TriggerContext ctx) throws Exception { ReducingState<Long> fireTimestamp = ctx.getPartitionedState(stateDesc); if (fireTimestamp.get().equals(time)) { fireTimestamp.clear(); fireTimestamp.add(time + interval); ctx.registerProcessingTimeTimer(time + interval); return TriggerResult.FIRE; } if (window.maxTimestamp() == time) { <START> return TriggerResult.FIRE_AND_PURGE; <END> } return TriggerResult.CONTINUE; }</code><technical_language>bring this in line ContinuousEventTimeTrigger FIRE</technical_language>

Target:
public TriggerResult onProcessingTime(long time, W window, TriggerContext ctx) throws Exception { ReducingState<Long> fireTimestamp = ctx.getPartitionedState(stateDesc); if (fireTimestamp.get().equals(time)) { fireTimestamp.clear(); fireTimestamp.add(time + interval); ctx.registerProcessingTimeTimer(time + interval); return TriggerResult.FIRE; } if (window.maxTimestamp() == time) { return TriggerResult.FIRE; } return TriggerResult.CONTINUE; }
Source:
<code>@Override public RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq) { return Util.last(rels) .computeSelfCost(planner, mq) .multiplyBy( RelMdUtil.linear(querySpec.fieldNames.size(), 2, 100, 1d, 2d)) .multiplyBy(getQueryTypeCostMultiplier()) <START> .multiplyBy(Util.last(rels) instanceof Bindables.BindableSort ? 0.1 : 0.2); <END> }</code><technical_language>superclass in case other rules do generate a Sort bindable convention, i.e., _instanceof Sort_ instead of _BindableSort_. Further, if operator is a SortLimit, leave cost is, i.e., multiply _1_ instead of _0.2_</technical_language>

Target:
@Override public RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq) { return Util.last(rels) .computeSelfCost(planner, mq) .multiplyBy( RelMdUtil.linear(querySpec.fieldNames.size(), 2, 100, 1d, 2d)) .multiplyBy(getQueryTypeCostMultiplier()) .multiplyBy(Util.last(rels) instanceof Sort ? 0.1 : 1); }
Source:
<code>public SshPairDto getPair(String service, String name) throws ServerException, NotFoundException { try { <START> final String url = UriBuilder.fromUri(sshUrl + "/getPair") <END> .build(service) .toString(); return requestFactory.fromUrl(url) .useGetMethod() .addQueryParam("name", name) .request() .asDto(SshPairDto.class); } catch (IOException | ForbiddenException | BadRequestException | ConflictException | UnauthorizedException e) { throw new ServerException(e); } }</code><technical_language>For **won't** work all. check changes</technical_language>

Target:
public SshPairDto getPair(String service, String name) throws ServerException, NotFoundException { try { return requestFactory.fromUrl(sshUrl + "/" + service + "/find") .useGetMethod() .addQueryParam("name", name) .request() .asDto(SshPairDto.class); } catch (IOException | ForbiddenException | BadRequestException | ConflictException | UnauthorizedException e) { throw new ServerException(e); } }
Source:
<code>public void describe(StreamApplicationDescriptor appDescriptor) { Table<KV<Integer, TestTableData.Profile>> table = appDescriptor.getTable( new RocksDbTableDescriptor<Integer, TestTableData.Profile>("profile-view-store", KVSerde.of(new IntegerSerde(), new TestTableData.ProfileJsonSerde()))); KafkaSystemDescriptor ksd = new KafkaSystemDescriptor("test"); <START> KafkaInputDescriptor<TestTableData.Profile> profileISD = ksd.getInputDescriptor("Profile", new JsonSerdeV2<>()); <END> appDescriptor.getInputStream(profileISD).map(m -> new KV(m.getMemberId(), m)).sendTo(table); KafkaInputDescriptor<TestTableData.PageView> pageViewISD = ksd.getInputDescriptor("PageView", new JsonSerdeV2<>()); KafkaOutputDescriptor<TestTableData.EnrichedPageView> enrichedPageViewOSD = ksd.getOutputDescriptor("EnrichedPageView", new NoOpSerde<>()); OutputStream<TestTableData.EnrichedPageView> outputStream = appDescriptor.getOutputStream(enrichedPageViewOSD); appDescriptor.getInputStream(pageViewISD) .partitionBy(TestTableData.PageView::getMemberId, pv -> pv, KVSerde.of(new IntegerSerde(), new JsonSerdeV2<>( TestTableData.PageView.class)), "p1") .join(table, new PageViewToProfileJoinFunction()) .sendTo(outputStream); }</code><technical_language>Set a KVSerde.of() this test key serde usage well</technical_language>

Target:
public void describe(StreamApplicationDescriptor appDescriptor) { Table<KV<Integer, TestTableData.Profile>> table = appDescriptor.getTable( new RocksDbTableDescriptor<Integer, TestTableData.Profile>("profile-view-store", KVSerde.of(new IntegerSerde(), new TestTableData.ProfileJsonSerde()))); KafkaSystemDescriptor ksd = new KafkaSystemDescriptor("test"); KafkaInputDescriptor<KV<String, TestTableData.Profile>> profileISD = ksd.getInputDescriptor("Profile", KVSerde.of(new StringSerde(), new JsonSerdeV2<>())); appDescriptor .getInputStream(profileISD) .map(m -> new KV(m.getValue().getMemberId(), m.getValue())) .sendTo(table); KafkaInputDescriptor<KV<String, TestTableData.PageView>> pageViewISD = ksd.getInputDescriptor("PageView", KVSerde.of(new StringSerde(), new JsonSerdeV2<>())); KafkaOutputDescriptor<TestTableData.EnrichedPageView> enrichedPageViewOSD = ksd.getOutputDescriptor("EnrichedPageView", new JsonSerdeV2<>()); OutputStream<TestTableData.EnrichedPageView> outputStream = appDescriptor.getOutputStream(enrichedPageViewOSD); appDescriptor.getInputStream(pageViewISD) .partitionBy(pv -> pv.getValue().getMemberId() , pv -> pv.getValue(), KVSerde.of(new IntegerSerde(), new JsonSerdeV2<>(TestTableData.PageView.class)), "p1") .join(table, new PageViewToProfileJoinFunction()) .sendTo(outputStream); }
Source:
<code>private List<LiveMigrateDisksParameters> getLiveMigrateDisksParametersList() { List<LiveMigrateDisksParameters> liveMigrateDisksParametersList = new ArrayList<LiveMigrateDisksParameters>(); for (Guid vmId : vmsLiveMigrateParametersMap.keySet()) { <START> List<LiveMigrateDiskParameters> parametersList = vmsLiveMigrateParametersMap.get(vmId); <END> LiveMigrateDisksParameters liveMigrateDisksParameters = new LiveMigrateDisksParameters(parametersList, vmId); liveMigrateDisksParameters.setParentCommand(VdcActionType.MoveDisks); liveMigrateDisksParameters.setSessionId(getParameters().getSessionId()); liveMigrateDisksParametersList.add(liveMigrateDisksParameters); } return liveMigrateDisksParametersList; }</code><technical_language>iterating keyset, calling get map in line. iterate entrySet instead</technical_language>

Target:
private List<LiveMigrateDisksParameters> getLiveMigrateDisksParametersList() { List<LiveMigrateDisksParameters> liveMigrateDisksParametersList = new ArrayList<LiveMigrateDisksParameters>(); for (Map.Entry<Guid, List<LiveMigrateDiskParameters>> entry : vmsLiveMigrateParametersMap.entrySet()) { LiveMigrateDisksParameters liveMigrateDisksParameters = new LiveMigrateDisksParameters(entry.getValue(), entry.getKey()); liveMigrateDisksParameters.setParentCommand(VdcActionType.MoveDisks); liveMigrateDisksParameters.setSessionId(getParameters().getSessionId()); liveMigrateDisksParametersList.add(liveMigrateDisksParameters); } return liveMigrateDisksParametersList; }
Source:
<code>public CommonProfile validateToken(final String token) { final TokenCredentials credentials = new TokenCredentials(token, "(validateToken)Method"); try { validate(credentials, null); <START> } catch (final HttpAction | CredentialsException e) { <END> throw new TechnicalException(e); } return credentials.getUserProfile(); }</code><technical_language>I disagree: CredentialsException expected exceptions turn unexpected (TechnicalException). return a null profile in case</technical_language>

Target:
public CommonProfile validateToken(final String token) { final TokenCredentials credentials = new TokenCredentials(token, "(validateToken)Method"); try { validate(credentials, null); } catch (final HttpAction e) { throw new TechnicalException(e); } catch (final CredentialsException e) { logger.info("Failed to retrieve or validate credentials: {}", e.getMessage()); logger.debug("Failed to retrieve or validate credentials", e); return null; } return credentials.getUserProfile(); }
Source:
<code>public static <K, V, T extends Map<K, V>> T unmarshallMap(ObjectInput in, MapBuilder<K, V, T> builder) throws IOException, ClassNotFoundException { final int size = unmarshallInt(in); if (size == NULL_VALUE) { return null; } <START> final T map = Objects.requireNonNull(builder, "MapBuilder must be non-null").build(); <END> for (int i = 0; i < size; i++) map.put((K) in.readObject(), (V) in.readObject()); return map; }</code><technical_language>size map have, enhance MapBuilder support initial size avoid resizing while unmarshalling</technical_language>

Target:
public static <K, V, T extends Map<K, V>> T unmarshallMap(ObjectInput in, MapBuilder<K, V, T> builder) throws IOException, ClassNotFoundException { final int size = unmarshallInt(in); if (size == NULL_VALUE) { return null; } final T map = Objects.requireNonNull(builder, "MapBuilder must be non-null").build(size); for (int i = 0; i < size; i++) map.put((K) in.readObject(), (V) in.readObject()); return map; }
Source:
<code>public static boolean isEcoreEqual(EObject object, EObject otherObject) { if (object == null) { if (otherObject == null) { return true; } return false; } if (object.eClass() != otherObject.eClass()) { return false; } for (EAttribute attribute : object.eClass().getEAllAttributes()) { if (!ObjectUtils.equals(object.eGet(attribute), otherObject.eGet(attribute))) { return false; } } for (EReference reference : object.eClass().getEAllReferences()) { if (!reference.isMany()) { <START> boolean equal = isEcoreEqual((EObject) object.eGet(reference), (EObject) object.eGet(reference)); <END> if (!equal) { return false; } } } return true; }</code><technical_language>of objects otherObject</technical_language>

Target:
public static boolean isEcoreEqual(EObject object, EObject otherObject) { return isEcoreEqual(object, otherObject, new HashSet<EObject>(), new HashSet<EObject>()); }
Source:
<code><START> public void isInternalImportExternalImportType() { <END> final Imports imports = new Imports(); final Import importType = new Import("External1"); imports.addImport(importType); presenter.setContent(dmo, imports, false); assertFalse(presenter.isInternalImport(mock(Import.class))); }</code><technical_language>This method contains assertion: assertFalse(presenter.isInternalImport(mock(Import.class))); this? assertFalse(presenter.isInternalImport(importType));</technical_language>

Target:
public void isInternalImportExternalImportType() { final Imports imports = new Imports(); final Import importType = new Import("External1"); imports.addImport(importType); presenter.setContent(dmo, imports, false); assertFalse(presenter.isInternalImport(importType)); }
Source:
<code>public io.reactivex.Observable<?> convert(Publisher<?> source) { <START> return (io.reactivex.Observable<?>) REACTIVE_ADAPTER_REGISTRY.getAdapter(io.reactivex.Observable.class) <END> .fromPublisher(source); }</code><technical_language>Flowable</technical_language>

Target:
public Flux<?> convert(Publisher<?> source) { return Flux.from(source); }
Source:
<code>public void release(V bean) { K id = bean.getId(); Entry<V> entry = this.entries.get(id); if ((entry != null) && entry.done()) { if (this.timeout != null) { <START> this.scheduler.schedule(id, this.timeout.isZero() ? Instant.now() : Instant.now().plus(this.timeout)); <END> } } }</code><technical_language>I this change is sufficient completely fix this bug. Essentially, change moves call remove(...) a separate thread, effect of (usually) delaying call Cache.remove(...). root of bug (i.e. reason @PreDestroy callback is triggered) is due this logic: <LINK_0> @PreDestroy is skipped StatefulSessionComponentInstance.isSynchronizationRegistered() returns true. If release logic StatefulSessionSynchronizationInterceptor: <LINK_1> call Cache.release(...) precedes call StatefulSessionComponentInstance.setSynchronizationRegistered(false). Thus, changes, is for @PreDestroy listener skipped, if scheduler thread initiates call Cache.remove(...) interceptor sets synchronizationRegistered flag. completely fix this issue, I instead suggest logic StatefulSessionSynchronizationInterceptor.releaseInstance(...) modified setSynchronizationRegistered(false) is called instance is released cache</technical_language>

Target:
public void release(V bean) { K id = bean.getId(); Entry<V> entry = this.entries.get(id); if ((entry != null) && entry.done()) { if (this.timeout != null) { if (!this.timeout.isZero()) { this.scheduler.schedule(id, Instant.now().plus(this.timeout)); } else { remove(id); } } } }
Source:
<code>public Iterable<SubstitutableLogger> getLoggers() { <START> return loggers.values(); <END> }</code><technical_language>return a copy? java return new ArrayList<SubstitutableLogger>(loggers.values());</technical_language>

Target:
public List<SubstitutableLogger> getLoggers() { return new ArrayList<SubstitutableLogger>(loggers.values()); }
Source:
<code>public void before() throws Exception { context = setupWithPoolingDataSource(JBPM_PERSISTENCE_UNIT_NAME); CorrelationKeyFactory factory = KieInternalServices.Factory.get().newCorrelationKeyFactory(); EntityManagerFactory emf = (EntityManagerFactory) context.get(EnvironmentName.ENTITY_MANAGER_FACTORY); UserTransaction ut = InitialContext.doLookup("java:comp/UserTransaction"); ut.begin(); EntityManager em = emf.createEntityManager(); try { em.persist(factory.newCorrelationKey("test123")); List<String> props = new ArrayList<String>(); props.add("test123"); props.add("123test"); em.persist(factory.newCorrelationKey(props)); } catch (Exception ex) { ex.printStackTrace(); <START> ut.rollback(); <END> } ut.commit(); }</code><technical_language>@domhanak please logging instead of ex.printStackTrace()</technical_language>

Target:
public void before() throws Exception { context = setupWithPoolingDataSource(JBPM_PERSISTENCE_UNIT_NAME); CorrelationKeyFactory factory = KieInternalServices.Factory.get().newCorrelationKeyFactory(); EntityManagerFactory emf = (EntityManagerFactory) context.get(EnvironmentName.ENTITY_MANAGER_FACTORY); UserTransaction ut = InitialContext.doLookup("java:comp/UserTransaction"); ut.begin(); try { EntityManager em = emf.createEntityManager(); em.persist(factory.newCorrelationKey("test123")); List<String> props = new ArrayList<String>(); props.add("test123"); props.add("123test"); em.persist(factory.newCorrelationKey(props)); ut.commit(); } catch (Exception ex) { ut.rollback(); Assert.fail("Exception thrown while trying to prepare correlation data."); } }
Source:
<code>public <START> void request(final <END> Callback cb) { final ProgressDialog dialog = ProgressDialog.show(getActivity(), "", getActivity().getString(R.string.dialog_loading_siteinfo_wait), true); Retrofit retrofitClient = RetrofitFactory.newInstance(apiBaseUrl, new WikiSite(apiBaseUrl)); Service request = retrofitClient.create(Service.class); Call<MwQueryResponse<SiteInfo>> call = request.requestSiteinfo(); call.enqueue(new retrofit2.Callback<MwQueryResponse<SiteInfo>>() { @Override public void onResponse(Call<MwQueryResponse<SiteInfo>> call, Response<MwQueryResponse<SiteInfo>> response) { if (response.isSuccessful() && response.body().success()) { cb.onSuccess(response.body().query()); } else { showAlert(getActivity().getString(R.string.dialog_loading_siteinfo_failed, Integer.toString(response.code()))); } dialog.hide(); } @Override public void onFailure(Call<MwQueryResponse<SiteInfo>> call, Throwable t) { String message = t.getMessage(); if (t instanceof HttpStatusException && message == null) { message = Integer.toString(((HttpStatusException) t).code()); } showAlert(getActivity().getString(R.string.dialog_loading_siteinfo_failed, message), t); dialog.hide(); } }); }</code><technical_language>I refactor of page client code in some areas issue requests synchronously asynchronously. Please return Call<> clients decide want execute request cancel (for example, Activity Fragment destruction). example of do this overloads in CaptchaClient.request()</technical_language>

Target:
public Call<MwQueryResponse<SiteInfo>> request(final Callback cb) { Retrofit retrofitClient = RetrofitFactory.newInstance(apiBaseUrl, new WikiSite(apiBaseUrl)); Service request = retrofitClient.create(Service.class); Call<MwQueryResponse<SiteInfo>> call = request.requestSiteinfo(); call.enqueue(new retrofit2.Callback<MwQueryResponse<SiteInfo>>() { @Override public void onResponse(Call<MwQueryResponse<SiteInfo>> call, Response<MwQueryResponse<SiteInfo>> response) { if (response.isSuccessful() && response.body().success()) { cb.onSuccess(response.body().query()); } else { cb.onFailure(new HttpStatusException(response.raw())); } } @Override public void onFailure(Call<MwQueryResponse<SiteInfo>> call, Throwable t) { cb.onFailure(t); } }); return call; }
Source:
<code>public void concurrentlyPublishedEventsMustAllBeProcessed() throws Exception { EventConsumer consumer = new EventConsumer(); final CountDownLatch startLatch = new CountDownLatch( 1 ); final int threads = 10; final int iterations = 2_000; final AsyncEvents<Event> asyncEvents = new AsyncEvents<>( consumer, AsyncEvents.Monitor.NONE ); executor.submit( asyncEvents ); ExecutorService threadPool = Executors.newFixedThreadPool( threads ); Runnable runner = () -> { try { startLatch.await(); } catch ( InterruptedException e ) { throw new RuntimeException( e ); } for ( int i = 0; i < iterations; i++ ) { asyncEvents.send( new Event() ); } }; for ( int i = 0; i < threads; i++ ) { threadPool.submit( runner ); } startLatch.countDown(); Thread thisThread = Thread.currentThread(); int eventCount = threads * iterations; try { for ( int i = 0; i < eventCount; i++ ) { Event event = consumer.poll( 1, TimeUnit.SECONDS ); if ( event == null ) { <START> eventCount--; <END> } else { assertThat( event.processedBy, is( not( thisThread ) ) ); } } } finally { asyncEvents.shutdown(); } }</code><technical_language>I events dropped, a runner thread died</technical_language>

Target:
public void concurrentlyPublishedEventsMustAllBeProcessed() throws Exception { EventConsumer consumer = new EventConsumer(); final CountDownLatch startLatch = new CountDownLatch( 1 ); final int threads = 10; final int iterations = 2_000; final AsyncEvents<Event> asyncEvents = new AsyncEvents<>( consumer, AsyncEvents.Monitor.NONE ); executor.submit( asyncEvents ); ExecutorService threadPool = Executors.newFixedThreadPool( threads ); Runnable runner = () -> { try { startLatch.await(); } catch ( InterruptedException e ) { throw new RuntimeException( e ); } for ( int i = 0; i < iterations; i++ ) { asyncEvents.send( new Event() ); } }; for ( int i = 0; i < threads; i++ ) { threadPool.submit( runner ); } startLatch.countDown(); Thread thisThread = Thread.currentThread(); int eventCount = threads * iterations; try { for ( int i = 0; i < eventCount; i++ ) { Event event = consumer.poll( 1, TimeUnit.SECONDS ); if ( event == null ) { i--; } else { assertThat( event.processedBy, is( not( thisThread ) ) ); } } } finally { asyncEvents.shutdown(); } }
Source:
<code>protected void setACP(Document doc, ACP newAcp, boolean overwrite, Map<String, Serializable> options) { DocumentModel docModel = readModel(doc); if (options == null) { options = new HashMap<>(); } ACP oldAcp = docModel.getACP(); <START> options.put(CoreEventConstants.OLD_ACP, oldAcp == null ? null : oldAcp.clone()); <END> options.put(CoreEventConstants.NEW_ACP, newAcp); notifyEvent(DocumentEventTypes.BEFORE_DOC_SECU_UPDATE, docModel, options, null, null, true, true); getSession().setACP(doc, newAcp, overwrite); docModel = readModel(doc); options.put(CoreEventConstants.NEW_ACP, newAcp.clone()); notifyEvent(DocumentEventTypes.DOCUMENT_SECURITY_UPDATED, docModel, options, null, null, true, false); }</code><technical_language>I if need set CoreEventConstants.OLD_ACP option in case oldAcp is null</technical_language>

Target:
protected void setACP(Document doc, ACP newAcp, boolean overwrite, Map<String, Serializable> options) { DocumentModel docModel = readModel(doc); if (options == null) { options = new HashMap<>(); } ACP oldAcp = docModel.getACP(); if (oldAcp != null) { options.put(CoreEventConstants.OLD_ACP, oldAcp.clone()); } options.put(CoreEventConstants.NEW_ACP, newAcp); notifyEvent(DocumentEventTypes.BEFORE_DOC_SECU_UPDATE, docModel, options, null, null, true, true); getSession().setACP(doc, newAcp, overwrite); docModel = readModel(doc); options.put(CoreEventConstants.NEW_ACP, newAcp.clone()); notifyEvent(DocumentEventTypes.DOCUMENT_SECURITY_UPDATED, docModel, options, null, null, true, false); }
Source:
<code>private Map<String, Integer> fetchCapacityUsage(String partitionName, ResourceConfig resourceConfig, ClusterConfig clusterConfig) { Map<String, Map<String, Integer>> capacityMap; try { capacityMap = resourceConfig.getPartitionCapacityMap(); } catch (IOException ex) { throw new IllegalArgumentException( "Invalid partition capacity configuration of resource: " + resourceConfig .getResourceName(), ex); } Map<String, Integer> partitionCapacity = capacityMap.get(partitionName); if (partitionCapacity == null) { partitionCapacity = capacityMap.getOrDefault(ResourceConfig.DEFAULT_PARTITION_KEY, new HashMap<>()); } for (Map.Entry<String, Integer> capacityEntry : clusterConfig.getDefaultPartitionWeightMap() .entrySet()) { partitionCapacity.putIfAbsent(capacityEntry.getKey(), capacityEntry.getValue()); } <START> List<String> requiredCapacityKeys = clusterConfig.getInstanceCapacityKeys(); <END> partitionCapacity.keySet().retainAll(requiredCapacityKeys); if (!partitionCapacity.keySet().containsAll(requiredCapacityKeys)) { throw new HelixException(String.format( "The required capacity keys %s are not fully configured int the resource %s partition %s weight map %s.", requiredCapacityKeys.toString(), resourceConfig.getResourceName(), partitionName, partitionCapacity.toString())); } return partitionCapacity; }</code><technical_language>iterate requiredCapacityKeys in place starting in line 159</technical_language>

Target:
private Map<String, Integer> fetchCapacityUsage(String partitionName, ResourceConfig resourceConfig, ClusterConfig clusterConfig) { Map<String, Map<String, Integer>> capacityMap; try { capacityMap = resourceConfig.getPartitionCapacityMap(); } catch (IOException ex) { throw new IllegalArgumentException( "Invalid partition capacity configuration of resource: " + resourceConfig .getResourceName(), ex); } Map<String, Integer> partitionCapacity = new HashMap<>(clusterConfig.getDefaultPartitionWeightMap()); partitionCapacity.putAll(capacityMap.getOrDefault(partitionName, capacityMap.getOrDefault(ResourceConfig.DEFAULT_PARTITION_KEY, new HashMap<>()))); List<String> requiredCapacityKeys = clusterConfig.getInstanceCapacityKeys(); if (!partitionCapacity.keySet().containsAll(requiredCapacityKeys)) { throw new HelixException(String.format( "The required capacity keys: %s are not fully configured in the resource: %s, partition: %s, weight map: %s.", requiredCapacityKeys.toString(), resourceConfig.getResourceName(), partitionName, partitionCapacity.toString())); } partitionCapacity.keySet().retainAll(requiredCapacityKeys); return partitionCapacity; }
Source:
<code>public void run() { while (!Thread.interrupted()) { try { Lease lease = leaseMaintainer.getCurrentLease(); if (!(lease instanceof NullLease)) { boolean validLease = lease.isValidAndContiguous(lease); if (!validLease) { try { connection.close(); } catch (IllegalStateException e) { } <START> break; <END> } } timeSource.sleep(200L); } catch (IOException e) { LOGGER.error("Closing connection, due to lease expiry, caused an error", e); } catch (InterruptedException e) { Thread.interrupted(); break; } } }</code><technical_language>a return clearer</technical_language>

Target:
public void run() { while (!Thread.interrupted()) { try { Lease lease = leaseMaintainer.getCurrentLease(); if (!(lease instanceof NullLease)) { boolean validLease = lease.isValidAndContiguous(lease); if (!validLease) { try { connection.close(); } catch (IllegalStateException e) { } return; } } timeSource.sleep(200L); } catch (IOException e) { LOGGER.error("Closing connection, due to lease expiry, caused an error", e); } catch (InterruptedException e) { Thread.interrupted(); return; } } }
Source:
<code>public static EList<Expression> getOrderedExpressions(List<Argument> arguments, Operation operation) { Expression[] result = new Expression[arguments.size()]; for (int index = 0; index < arguments.size(); index++) { Argument argument = arguments.get(index); if (argument.getParameter() == null) result[index] = argument.getValue(); else { for (Parameter param : operation.getParameters()) { if (param.getName().equals(argument.getParameter().getName())) { result[operation.getParameters().indexOf(param)] = argument.getValue(); break; } } } } EList<Expression> resultAsList = new BasicEList<Expression>(); for (int i = 0; i < result.length; i++) { Expression expression = result[i]; if (expression != null) <START> resultAsList.add(expression); <END> } return resultAsList; }</code><technical_language>This part problematic. Consider p1 p3, p2 in arguments, return [p1,p3], i.e. p3 position of p2</technical_language>

Target:
public static EList<Expression> getOrderedExpressions(List<Argument> arguments, Operation operation) { Expression[] result = new Expression[arguments.size()]; for (int index = 0; index < arguments.size(); index++) { Argument argument = arguments.get(index); if (argument.getParameter() == null) result[index] = argument.getValue(); else { for (Parameter param : operation.getParameters()) { if (param.getName().equals(argument.getParameter().getName())) { int parameterIndex = operation.getParameters().indexOf(param); if (parameterIndex < result.length) result[parameterIndex] = argument.getValue(); break; } } } } EList<Expression> resultAsList = new BasicEList<Expression>(); for (int i = 0; i < result.length; i++) { Expression expression = result[i]; if (expression != null) resultAsList.add(expression); } return resultAsList; }
Source:
<code>public void search() { OrmUtils.withinSession( sessionFactory, session -> { FullTextSession ftSession = Search.getFullTextSession( session ); FullTextSearchTarget<Book> searchTarget = ftSession.search( Book.class ); FullTextQuery<Book_Author_Score> query = ftSession.search( Book.class ) .query() .asProjection( searchTarget.projection().composite( Book_Author_Score::new, searchTarget.projection().composite( Book_Author::new, searchTarget.projection().object().toProjection(), searchTarget.projection().field( "author", String.class ).toProjection() ).toProjection(), searchTarget.projection().score().toProjection() ).toProjection() ) .predicate( f -> f.matchAll().toPredicate() ) .build(); backendMock.expectSearchProjection( Arrays.asList( Book.INDEX ), b -> { }, StubSearchWorkBehavior.of( 3L, Arrays.asList( Arrays.asList( StubBackendUtils.reference( Book.INDEX, "1" ), AUTHOR_4_3_2_1 ), 1.0F ), Arrays.asList( Arrays.asList( StubBackendUtils.reference( Book.INDEX, "2" ), AUTHOR_CIDER_HOUSE ), <START> 1.0F <END> ), Arrays.asList( Arrays.asList( StubBackendUtils.reference( Book.INDEX, "3" ), AUTHOR_AVENUE_OF_MYSTERIES ), 1.0F ) ) ); Assertions.assertThat( query.list() ).containsExactlyInAnyOrder( new Book_Author_Score( new Book_Author( session.get( Book.class, 1 ), AUTHOR_4_3_2_1 ), 1.0F ), new Book_Author_Score( new Book_Author( session.get( Book.class, 2 ), AUTHOR_CIDER_HOUSE ), 1.0F ), new Book_Author_Score( new Book_Author( session.get( Book.class, 3 ), AUTHOR_AVENUE_OF_MYSTERIES ), 1.0F ) ); } ); }</code><technical_language>scores</technical_language>

Target:
public void search() { OrmUtils.withinSession( sessionFactory, session -> { FullTextSession ftSession = Search.getFullTextSession( session ); FullTextSearchTarget<Book> searchTarget = ftSession.search( Book.class ); FullTextQuery<Book_Author_Score> query = ftSession.search( Book.class ) .query() .asProjection( searchTarget.projection().composite( Book_Author_Score::new, searchTarget.projection().composite( Book_Author::new, searchTarget.projection().object().toProjection(), searchTarget.projection().field( "author", String.class ).toProjection() ).toProjection(), searchTarget.projection().score().toProjection() ).toProjection() ) .predicate( f -> f.matchAll().toPredicate() ) .build(); backendMock.expectSearchProjection( Arrays.asList( Book.INDEX ), b -> { }, StubSearchWorkBehavior.of( 3L, Arrays.asList( Arrays.asList( StubBackendUtils.reference( Book.INDEX, "1" ), AUTHOR_4_3_2_1 ), 4.0F ), Arrays.asList( Arrays.asList( StubBackendUtils.reference( Book.INDEX, "2" ), AUTHOR_CIDER_HOUSE ), 5.0F ), Arrays.asList( Arrays.asList( StubBackendUtils.reference( Book.INDEX, "3" ), AUTHOR_AVENUE_OF_MYSTERIES ), 6.0F ) ) ); Assertions.assertThat( query.list() ).containsExactlyInAnyOrder( new Book_Author_Score( new Book_Author( session.get( Book.class, 1 ), AUTHOR_4_3_2_1 ), 4.0F ), new Book_Author_Score( new Book_Author( session.get( Book.class, 2 ), AUTHOR_CIDER_HOUSE ), 5.0F ), new Book_Author_Score( new Book_Author( session.get( Book.class, 3 ), AUTHOR_AVENUE_OF_MYSTERIES ), 6.0F ) ); } ); }
Source:
<code>public static List<CellReference> candidateCells(LockDescriptor lockDescriptor) { Optional<TableRefAndRemainder> tableRefAndRemainder = tryParseTableRef(lockDescriptor); if (!tableRefAndRemainder.isPresent()) { return ImmutableList.of(); } TableReference tableRef = tableRefAndRemainder.get().tableRef(); ByteString remainingBytes = tableRefAndRemainder.get().remainder(); <START> int lookupFrom = 0; <END> int nextCandidate; List<Cell> cells = new ArrayList<>(); while ((nextCandidate = remainingBytes.indexOf(ZERO_ARRAY, lookupFrom)) != -1) { if (nextCandidate > 0 && nextCandidate < remainingBytes.size() - 2) { byte[] row = remainingBytes.substring(0, nextCandidate).toByteArray(); byte[] col = remainingBytes.substring(nextCandidate + 1, remainingBytes.size()).toByteArray(); cells.add(Cell.create(row, col)); } lookupFrom = nextCandidate + 1; } return cells.stream().map(cell -> CellReference.of(tableRef, cell)).collect(Collectors.toList()); }</code><technical_language>feels zeros yourself? java IntStream.range(0, remainingBytes.size()) .filter(i -> isValidZeroIndex(remainingBytes, i) .mapToObj(zeroIndex -> createCellFromByteString(remainingBytes, zeroIndex) .map(cell -> CellReference.of(tableRef, cell)) .collect(toList()); private static boolean isValidZeroIndex(ByteString remainingBytes, int zeroIndex) { remainingBytes.getByte(zeroIndex) == 0 && zeroIndex > 0 && zeroIndex < remainingBytes.size() - 2 } private static Cell createCellFromByteString(ByteString remainingBytes, int zeroIndexDelimiter) { byte[] row = remainingBytes.substring(0, i).toByteArray(); byte[] col = remainingBytes.substring(i + 1, remainingBytes.size()).toByteArray(); return Cell.create(row, col); } ByteString.indexOf basically one. IntStream IntPredicate is boxing/unboxing cost pay</technical_language>

Target:
public static List<CellReference> candidateCells(LockDescriptor lockDescriptor) { Optional<TableRefAndRemainder> tableRefAndRemainder = tryParseTableRef(lockDescriptor); if (!tableRefAndRemainder.isPresent()) { return ImmutableList.of(); } TableReference tableRef = tableRefAndRemainder.get().tableRef(); ByteString remainingBytes = tableRefAndRemainder.get().remainder(); return IntStream.range(1, remainingBytes.size() - 2) .filter(index -> isZeroDelimiterIndex(remainingBytes, index)) .mapToObj(index -> createCellFromByteString(remainingBytes, index)) .map(cell -> CellReference.of(tableRef, cell)) .collect(Collectors.toList()); }
Source:
<code>public <T> void addToCache(TenantIdKey key, T entry) { PrivilegedCarbonContext.startTenantFlow(); try { PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext(); carbonContext.setTenantId(MultitenantConstants.SUPER_TENANT_ID); carbonContext.setTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); clearCacheEntry(key); Cache<TenantIdKey, T> cache = getTenantCache(); if (cache != null) { cache.put(key, entry); <START> log.debug(TENANT_CACHE + " which is under " + TENANT_CACHE_MANAGER + ", added the entry : " + entry <END> + " for the key : " + key + " successfully"); } else { if (log.isDebugEnabled()) { log.debug("Error while getting the cache : " + TENANT_CACHE + " which is under " + TENANT_CACHE_MANAGER); } } } finally { PrivilegedCarbonContext.endTenantFlow(); } }</code><technical_language>check debug is enabled</technical_language>

Target:
public <T> void addToCache(TenantIdKey key, T entry) { PrivilegedCarbonContext.startTenantFlow(); try { PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext(); carbonContext.setTenantId(MultitenantConstants.SUPER_TENANT_ID); carbonContext.setTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME); clearCacheEntry(key); Cache<TenantIdKey, T> cache = getTenantCache(); if (cache != null) { cache.put(key, entry); if (log.isDebugEnabled()) { log.debug(TENANT_CACHE + " which is under " + TENANT_CACHE_MANAGER + ", added the entry : " + entry + " for the key : " + key + " successfully"); } } else { if (log.isDebugEnabled()) { log.debug("Error while getting the cache : " + TENANT_CACHE + " which is under " + TENANT_CACHE_MANAGER); } } } finally { PrivilegedCarbonContext.endTenantFlow(); } }