auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static SchedulingPolicyUnit map(PolicyUnit entity, SchedulingPolicyUnit template) { SchedulingPolicyUnit model = template != null ? template : new SchedulingPolicyUnit(); model.setId(entity.getId().toString()); model.setName(entity.getName()); model.setDescription(entity.getDescription()); <START> model.setType(entity.getPolicyUnitType().name().toLowerCase()); <END> model.setEnabled(entity.isEnabled()); model.setInternal(entity.isInternal()); if (entity.getParameterRegExMap() != null && !entity.getParameterRegExMap().isEmpty()) { model.setRegexValidationMap(CustomPropertiesParser.fromMap(entity.getParameterRegExMap())); } return model; }</code><technical_language>PolicyUnitType enum in API. 'twin' enums in API for north-bound enum in engine. reason is decouple enigine api. written here, if tomorrow a developer change name of some element in engine enum: PolicyUntiType.java, API break</technical_language>

Target:
public static SchedulingPolicyUnit map(PolicyUnit entity, SchedulingPolicyUnit template) { SchedulingPolicyUnit model = template != null ? template : new SchedulingPolicyUnit(); model.setId(entity.getId().toString()); model.setName(entity.getName()); model.setDescription(entity.getDescription()); String policyUnitTypeName = null; switch (entity.getPolicyUnitType()) { case FILTER: policyUnitTypeName = org.ovirt.engine.api.model.PolicyUnitType.FILTER.name().toLowerCase(); break; case WEIGHT: policyUnitTypeName = org.ovirt.engine.api.model.PolicyUnitType.WEIGHT.name().toLowerCase(); break; case LOAD_BALANCING: policyUnitTypeName = org.ovirt.engine.api.model.PolicyUnitType.LOAD_BALANCING.name().toLowerCase(); break; default: assert (false) : "unknown Policy Unit Type value: " + model.toString(); return null; } model.setType(policyUnitTypeName); model.setEnabled(entity.isEnabled()); model.setInternal(entity.isInternal()); if (entity.getParameterRegExMap() != null && !entity.getParameterRegExMap().isEmpty()) { model.setPropertiesMetaData(CustomPropertiesParser.fromMap(entity.getParameterRegExMap())); } return model; }
Source:
<code>public void load() { cache.clear(); nameMap.clear(); for (NormalAchievements value : NormalAchievements.values()) { <START> if (mainConfig.contains(value.getCategoryName())) { <END> cache.addAll(loadInner(value.getCategoryName(), value.getCategoryName())); } } for (MultipleAchievements value : MultipleAchievements.values()) { cache.addAll(loadMulti(value.getCategoryName())); } nameMap.putAll(cache.stream().collect(Collectors.toMap(a -> a.getName().toLowerCase(), i -> i))); categoryMap .putAll(cache.stream() .collect(Collectors.groupingBy(a -> a.getCategory().toLowerCase(), Collectors.toSet()))); }</code><technical_language>is this condition needed? is for MultipleAchievements</technical_language>

Target:
public void load() { cache.clear(); nameMap.clear(); for (NormalAchievements value : NormalAchievements.values()) { if (mainConfig.contains(value.getCategoryName())) { cache.addAll(loadInner(value.getCategoryName(), value.getCategoryName())); } } for (MultipleAchievements value : MultipleAchievements.values()) { if (mainConfig.contains(value.getCategoryName())) { cache.addAll(loadMulti(value.getCategoryName())); } } if (mainConfig.contains(CommandAchievements.COMMANDS.toString())) { cache.addAll(loadInner(CommandAchievements.COMMANDS.toString(), CommandAchievements.COMMANDS.toString())); } nameMap.putAll(cache.stream().collect(Collectors.toMap(a -> a.getName().toLowerCase(), i -> i))); categoryMap .putAll(cache.stream() .collect(Collectors.groupingBy(a -> a.getCategory().toLowerCase(), Collectors.toSet()))); }
Source:
<code>public void testIncorrectQueryField() throws Exception { try { startGrid(); } catch (Exception exception) { <START> if (exception.getMessage().contains( <END> GridQueryProcessor.propertyInitializationExceptionMessage( Object.class, Object.class, "exceptionOid", Object.class))) { } else { fail("property initialization exception must be thrown, but got " + exception.getMessage()); } } }</code><technical_language>need @SuppressWarnings, replace if (!contains()) {fail();}</technical_language>

Target:
public void testIncorrectQueryField() throws Exception { try { startGrid(); } catch (Exception exception) { if (!exception.getMessage().contains( GridQueryProcessor.propertyInitializationExceptionMessage( Object.class, Object.class, "exceptionOid", Object.class))) { fail("property initialization exception must be thrown, but got " + exception.getMessage()); } } }
Source:
<code><START> private Flux<ShareItem> listShares(String marker, ListSharesOptions options) { <END> String prefix = null; Integer maxResults = null; List<ListSharesIncludeType> include = new ArrayList<>(); if (options != null) { prefix = options.prefix(); maxResults = options.maxResults(); if (options.includeMetadata()) { include.add(ListSharesIncludeType.fromString(ListSharesIncludeType.METADATA.toString())); } if (options.includeSnapshots()) { include.add(ListSharesIncludeType.fromString(ListSharesIncludeType.SNAPSHOTS.toString())); } } return client.services().listSharesSegmentWithRestResponseAsync(prefix, marker, maxResults, include, null, Context.NONE) .flatMapMany(response -> Flux.fromIterable(response.value().shareItems())); }</code><technical_language>this call listShares method handles iterating paged responses</technical_language>

Target:
private Flux<ShareItem> listShares(String marker, ListSharesOptions options) { String prefix = null; Integer maxResults = null; List<ListSharesIncludeType> include = new ArrayList<>(); if (options != null) { prefix = options.prefix(); maxResults = options.maxResults(); if (options.includeMetadata()) { include.add(ListSharesIncludeType.fromString(ListSharesIncludeType.METADATA.toString())); } if (options.includeSnapshots()) { include.add(ListSharesIncludeType.fromString(ListSharesIncludeType.SNAPSHOTS.toString())); } } return azureFileStorageClient.services().listSharesSegmentWithRestResponseAsync(prefix, marker, maxResults, include, null, Context.NONE) .flatMapMany(response -> Flux.fromIterable(response.value().shareItems())); }
Source:
<code>private FormattedDomain parseDomain(Domain domain) { ImmutableSet.Builder<FormattedRange> formattedRanges = ImmutableSet.builder(); Type type = domain.getType(); domain.getValues().getValuesProcessor().consume( ranges -> formattedRanges.addAll( ranges.getOrderedRanges().stream() .map(range -> new FormattedRange(formatMarker(range.getLow()), formatMarker(range.getHigh()))) .collect(toImmutableSet())), discreteValues -> formattedRanges.addAll( discreteValues.getValues().stream() .map(value -> getVarcharValue(type, value)) <START> .filter(Objects::nonNull) <END> .map(value -> new FormattedMarker(Optional.of(value), EXACTLY)) .map(marker -> new FormattedRange(marker, marker)) .collect(toImmutableSet())), allOrNone -> { throw new IllegalStateException("Unreachable AllOrNone consumer"); }); return new FormattedDomain(domain.isNullAllowed(), formattedRanges.build()); }</code><technical_language>purpose of this filter</technical_language>

Target:
private FormattedDomain parseDomain(Domain domain) { ImmutableSet.Builder<FormattedRange> formattedRanges = ImmutableSet.builder(); Type type = domain.getType(); domain.getValues().getValuesProcessor().consume( ranges -> formattedRanges.addAll( ranges.getOrderedRanges().stream() .map(range -> new FormattedRange(formatMarker(range.getLow()), formatMarker(range.getHigh()))) .collect(toImmutableSet())), discreteValues -> formattedRanges.addAll( discreteValues.getValues().stream() .map(value -> getVarcharValue(type, value)) .map(value -> new FormattedMarker(Optional.of(value), EXACTLY)) .map(marker -> new FormattedRange(marker, marker)) .collect(toImmutableSet())), allOrNone -> { throw new IllegalStateException("Unreachable AllOrNone consumer"); }); return new FormattedDomain(domain.isNullAllowed(), formattedRanges.build()); }
Source:
<code>public void settingPrimaryKeyWithObjectSchema() { RealmConfiguration originalConfig = configFactory.createConfigurationBuilder() .schema(AllTypes.class) .build(); Realm.getInstance(originalConfig).close(); RealmMigration migration = new RealmMigration() { @Override public void migrate(DynamicRealm realm, long oldVersion, long newVersion) { RealmSchema schema = realm.getSchema(); schema.create("AnnotationTypes") .addField("id", long.class) .addPrimaryKey("id") .addField("indexString", String.class) .addIndex("indexString") .addField("notIndexString", String.class); } }; RealmConfiguration realmConfig = configFactory.createConfigurationBuilder() .schemaVersion(1) .schema(AllTypes.class, AnnotationTypes.class) .migration(migration) .build(); realm = Realm.getInstance(realmConfig); <START> RealmObjectSchema schema = realm.getSchema().getSchemaForClass(AnnotationTypes.class); <END> assertTrue(schema.hasPrimaryKey()); assertTrue(schema.hasIndex("id")); realm.close(); }</code><technical_language>getSchemaForClass is internal API, public method is called get. public API if IMO</technical_language>

Target:
public void settingPrimaryKeyWithObjectSchema() { RealmConfiguration originalConfig = configFactory.createConfigurationBuilder() .schema(AllTypes.class) .build(); Realm.getInstance(originalConfig).close(); RealmMigration migration = new RealmMigration() { @Override public void migrate(DynamicRealm realm, long oldVersion, long newVersion) { RealmSchema schema = realm.getSchema(); schema.create("AnnotationTypes") .addField("id", long.class) .addPrimaryKey("id") .addField("indexString", String.class) .addIndex("indexString") .addField("notIndexString", String.class); } }; RealmConfiguration realmConfig = configFactory.createConfigurationBuilder() .schemaVersion(1) .schema(AllTypes.class, AnnotationTypes.class) .migration(migration) .build(); realm = Realm.getInstance(realmConfig); RealmObjectSchema schema = realm.getSchema().get("AnnotationTypes"); assertTrue(schema.hasPrimaryKey()); assertTrue(schema.hasIndex("id")); realm.close(); }
Source:
<code>public Iterable<TmfAnalysisRequirement> getAnalysisRequirements() { <START> return new ArrayList<>(); <END> }</code><technical_language>sorry, I get it, explain I call getAnalysisRequirements() I get ArrayLists()</technical_language>

Target:
public Iterable<TmfAnalysisRequirement> getAnalysisRequirements() { return Collections.EMPTY_SET; }
Source:
<code>public Cell checkLevelAABB(AABB aabb, Point motion) { Grid<Cell> cells = level.getCells(); int minx = (int) Math.max(Math.floor(aabb.getStart().getX()), 0); int miny = (int) Math.max(Math.floor(aabb.getStart().getY()), 0); int maxx = (int) Math.min(Math.ceil(aabb.getEnd().getX()), cells.getWidth()); int maxy = (int) Math.min(Math.ceil(aabb.getEnd().getY()), cells.getHeight()); for(int y = miny; y < maxy; y++) { for(int x = minx; x < maxx; x++) { Point c = new Point(x, y); Cell cell = cells.get(x, y); Point aabbo = cell.getAABBOffset(); AABB tile = new AABB(c.add(aabbo), c.add(aabbo).add(cell.getAABBDimensions())); if (cell.collides(motion) && aabb.overlaps(tile)) { <START> if(cell.getType() == Cell.WALL) <END> { return Cell.WALL; } return Cell.PLATFORM; } } } return Cell.EMPTY; }</code><technical_language>replace return cell instead. < layout</technical_language>

Target:
public Cell checkLevelAABB(AABB aabb, Point motion) { Grid<Cell> cells = level.getCells(); int minx = (int) Math.max(Math.floor(aabb.getStart().getX()), 0); int miny = (int) Math.max(Math.floor(aabb.getStart().getY()), 0); int maxx = (int) Math.min(Math.ceil(aabb.getEnd().getX()), cells.getWidth()); int maxy = (int) Math.min(Math.ceil(aabb.getEnd().getY()), cells.getHeight()); for(int y = miny; y < maxy; y++) { for(int x = minx; x < maxx; x++) { Point c = new Point(x, y); Cell cell = cells.get(x, y); Point aabbo = cell.getAABBOffset(); AABB tile = new AABB(c.add(aabbo), c.add(aabbo).add(cell.getAABBDimensions())); if (cell.collides(motion) && aabb.overlaps(tile)) { return cell; } } } return Cell.EMPTY; }
Source:
<code>protected List<FeedbackSessionAttributes> loadFeedbackSessionsList( List<InstructorAttributes> instructorList) { List<FeedbackSessionAttributes> sessions = <START> logic.getFeedbackSessionsListForInstructor(instructorList); <END> return sessions; }</code><technical_language>line if</technical_language>

Target:
protected List<FeedbackSessionAttributes> loadFeedbackSessionsList(List<InstructorAttributes> instructorList) { return logic.getFeedbackSessionsListForInstructor(instructorList); }
Source:
<code>private void getDeprecatedContainers() { deprecatedContainers.clear(); if (accountService != null) { accountService.getContainersByStatus(Container.ContainerStatus.DELETE_IN_PROGRESS).forEach((container) -> { <START> if (container.getLastUpdateTime() + TimeUnit.DAYS.toMillis(14) >= System.currentTimeMillis()) { <END> deprecatedContainers.add(new Pair<>(container.getParentAccountId(), container.getId())); } }); accountService.getContainersByStatus(Container.ContainerStatus.INACTIVE).forEach((container) -> { deprecatedContainers.add(new Pair<>(container.getParentAccountId(), container.getId())); }); } }</code><technical_language>nit: a config for this value, update in next pr</technical_language>

Target:
private void getDeprecatedContainers() { deprecatedContainers.clear(); if (accountService != null) { accountService.getContainersByStatus(Container.ContainerStatus.DELETE_IN_PROGRESS).forEach((container) -> { if (container.getDeleteTriggerTime() + TimeUnit.DAYS.toMillis(config.storeContainerDeletionRetentionDays) >= System.currentTimeMillis()) { deprecatedContainers.add(new Pair<>(container.getParentAccountId(), container.getId())); } }); accountService.getContainersByStatus(Container.ContainerStatus.INACTIVE).forEach((container) -> { deprecatedContainers.add(new Pair<>(container.getParentAccountId(), container.getId())); }); } }
Source:
<code>private void checkConnection () throws SQLException { Statement statement = null; try { statement = connection.createStatement(); @SuppressWarnings("unused") <START> ResultSet r = statement.executeQuery("select null"); <END> } finally { if (statement != null) { statement.close(); } } }</code><technical_language>please replace tabs spaces. Adding warning change fact unused code added :-) if wishes solve completely, create ResultSet try block close result set in finally block, closing prepared statement. step introducing a new method org.ovirt.engine.core.utils.db.DbUtils performs closeQuitely for result set for statement (or call DbUtils.closeQuietly(rs, statement, null)</technical_language>

Target:
private void checkConnection () throws SQLException { if (!connection.isValid(0)) { throw new SQLException("The connection has been closed or invalid."); } }
Source:
<code>private void updateShareableDiskEnabled() { StorageDomain storageDomain = getStorageDomain().getSelectedItem(); if (storageDomain != null && (StorageType.GLUSTERFS == storageDomain.getStorageType() || storageDomain.getStorageType().equals(StorageType.MANAGED_BLOCK_STORAGE))) { getIsShareable().setEntity(false); getIsShareable().setIsChangeable(false, constants.shareableDiskNotSupported()); } else if (getVolumeType().getSelectedItem() == VolumeType.Sparse && storageDomain != null && storageDomain.getStorageType().isBlockDomain()) { getIsShareable().setEntity(false); getIsShareable().setIsChangeable(false, constants.shareableDiskNotSupportedByConfiguration()); } else { getIsShareable().setIsChangeable(isEditEnabled(), constants.shareableDiskNotSupportedOnRunningVM()); } <START> Frontend.getInstance() <END> .runQuery(QueryType.GetClustersByStoragePoolId, new IdQueryParameters(storageDomain.getStoragePoolId()), new AsyncQuery<QueryReturnValue>( value -> enablePreallocatedAsDefaultforHC((List<Cluster>) value.getReturnValue()))); }</code><technical_language>set Default pre-allocated StorageType.GLUSTERFS. necessarily check for HC, right</technical_language>

Target:
private void updateShareableDiskEnabled() { StorageDomain storageDomain = getStorageDomain().getSelectedItem(); if (storageDomain != null && (StorageType.GLUSTERFS == storageDomain.getStorageType() || storageDomain.getStorageType().equals(StorageType.MANAGED_BLOCK_STORAGE))) { getIsShareable().setEntity(false); getIsShareable().setIsChangeable(false, constants.shareableDiskNotSupported()); } else if (getVolumeType().getSelectedItem() == VolumeType.Sparse && storageDomain != null && storageDomain.getStorageType().isBlockDomain()) { getIsShareable().setEntity(false); getIsShareable().setIsChangeable(false, constants.shareableDiskNotSupportedByConfiguration()); } else { getIsShareable().setIsChangeable(isEditEnabled(), constants.shareableDiskNotSupportedOnRunningVM()); } Frontend.getInstance() .runQuery(QueryType.GetClusterById, new IdQueryParameters(getHost().getSelectedItem().getClusterId()), new AsyncQuery<QueryReturnValue>( value -> enablePreallocatedAsDefaultforHC((Cluster) value.getReturnValue()))); }
Source:
<code>private void decodeCallRequest(ChannelHandlerContext ctx, CallRequestFrame frame, List<Object> out) { <START> assert this.messageMap.get(frame.getId()) == null; <END> assert this.defragmentationState.get(frame.getId()) == null; ArgScheme scheme = ArgScheme.toScheme(frame.getHeaders().get(TransportHeaders.ARG_SCHEME_KEY)); if (!ArgScheme.isSupported(scheme)) { ErrorFrame error = sendError(ErrorType.BadRequest, "Invalid arg schema", frame.getId(), ctx); this.errorMap.put(frame.getId(), error); return; } ByteBuf arg1 = this.readArg(frame); ByteBuf arg2 = this.readArg(frame); ByteBuf arg3 = this.readArg(frame); Request req = Request.build( scheme, frame.getId(), frame.getTTL(), frame.getService(), frame.getHeaders(), arg1, arg2, arg3); this.messageMap.put(frame.getId(), req); }</code><technical_language>do want assertion? exception</technical_language>

Target:
private void decodeCallRequest(ChannelHandlerContext ctx, CallRequestFrame frame, List<Object> out) { ArgScheme scheme = ArgScheme.toScheme(frame.getHeaders().get(TransportHeaders.ARG_SCHEME_KEY)); if (!ArgScheme.isSupported(scheme)) { ErrorFrame error = sendError(ErrorType.BadRequest, "Invalid arg schema", frame.getId(), ctx); this.errorMap.put(frame.getId(), error); return; } ByteBuf arg1 = this.readArg(frame); ByteBuf arg2 = this.readArg(frame); ByteBuf arg3 = this.readArg(frame); Request req = Request.build( scheme, frame.getId(), frame.getTTL(), frame.getService(), frame.getHeaders(), arg1, arg2, arg3); this.messageMap.put(frame.getId(), req); }
Source:
<code>private <T> void handleServiceAsync(final CompletableFuture<T> fut, ClientOperation op, Consumer<PayloadOutputChannel> payloadWriter, Function<PayloadInputChannel, T> payloadReader, int attemptsLimit, ClientConnectionException failure) { T2<ClientChannel, Integer> chAndAttempts; try { chAndAttempts = applyOnDefaultChannel(channel -> channel, attemptsLimit); <START> <END> } catch (Throwable ex) { fut.completeExceptionally(ex); return; } ClientChannel ch = chAndAttempts.getKey(); ch .serviceAsync(op, payloadWriter, payloadReader) .handle((res, err) -> { if (err == null) { fut.complete(res); return null; } ClientConnectionException failure0 = failure; if (err instanceof ClientConnectionException) { try { onChannelFailure(ch); } catch (Throwable ex) { fut.completeExceptionally(ex); return null; } if (failure0 == null) failure0 = (ClientConnectionException)err; else failure0.addSuppressed(err); int leftAttempts = attemptsLimit - chAndAttempts.getValue(); if (failure == null) leftAttempts = getRetryLimit() - 1; if (leftAttempts > 0) { handleServiceAsync(fut, op, payloadWriter, payloadReader, leftAttempts, failure0); return null; } } else { fut.completeExceptionally(err instanceof ClientException ? err : new ClientException(err)); return null; } fut.completeExceptionally(failure0); return null; }); }</code><technical_language>Redundant NL</technical_language>

Target:
private <T> void handleServiceAsync(final CompletableFuture<T> fut, ClientOperation op, Consumer<PayloadOutputChannel> payloadWriter, Function<PayloadInputChannel, T> payloadReader, int attemptsLimit, ClientConnectionException failure) { ClientChannel ch; int attemptsCnt[] = new int[1]; try { ch = applyOnDefaultChannel(channel -> channel, attemptsLimit, v -> attemptsCnt[0] = v ); } catch (Throwable ex) { if (failure != null) { failure.addSuppressed(ex); fut.completeExceptionally(failure); return; } fut.completeExceptionally(ex); return; } ch .serviceAsync(op, payloadWriter, payloadReader) .handle((res, err) -> { if (err == null) { fut.complete(res); return null; } ClientConnectionException failure0 = failure; if (err instanceof ClientConnectionException) { try { onChannelFailure(ch); } catch (Throwable ex) { fut.completeExceptionally(ex); return null; } if (failure0 == null) failure0 = (ClientConnectionException)err; else failure0.addSuppressed(err); int leftAttempts = attemptsLimit - attemptsCnt[0]; if (failure == null) leftAttempts = getRetryLimit() - 1; if (leftAttempts > 0) { handleServiceAsync(fut, op, payloadWriter, payloadReader, leftAttempts, failure0); return null; } } else { fut.completeExceptionally(err instanceof ClientException ? err : new ClientException(err)); return null; } fut.completeExceptionally(failure0); return null; }); }
Source:
<code>public PrefabData load(ResourceUrn resourceUrn, List<AssetDataFile> inputs) throws IOException { try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputs.get(0).openStream(), Charsets.UTF_8))) { EntityData.Prefab prefabData = EntityDataJSONFormat.readPrefab(reader); if (prefabData != null) { logger.info("Attempting to deserialize prefab with inputs {}", resourceUrn, inputs); PrefabSerializer serializer = new PrefabSerializer(componentLibrary, typeSerializationLibrary); return serializer.deserialize(prefabData); } else { <START> logger.error("Failed to read prefab for '" + resourceUrn + "'"); <END> return null; } } }</code><technical_language>This method designed throw a IOException in case wrong (this is reflected in signature). Imho this design, catching (and handling) errors early problematic</technical_language>

Target:
public PrefabData load(ResourceUrn resourceUrn, List<AssetDataFile> inputs) throws IOException { try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputs.get(0).openStream(), Charsets.UTF_8))) { EntityData.Prefab prefabData = EntityDataJSONFormat.readPrefab(reader); if (prefabData != null) { logger.info("Attempting to deserialize prefab with inputs {}", resourceUrn, inputs); PrefabSerializer serializer = new PrefabSerializer(componentLibrary, typeSerializationLibrary); return serializer.deserialize(prefabData); } else { throw new IOException("Failed to read prefab for '" + resourceUrn + "'"); } } }
Source:
<code>public PlanNode visitAggregation(AggregationNode node, RewriteContext<Set<VariableReferenceExpression>> context) { ImmutableSet.Builder<VariableReferenceExpression> expectedInputs = ImmutableSet.<VariableReferenceExpression>builder() .addAll(node.getGroupingKeys()); if (node.getHashVariable().isPresent()) { expectedInputs.add(node.getHashVariable().get()); } ImmutableMap.Builder<VariableReferenceExpression, Aggregation> aggregations = ImmutableMap.builder(); for (Map.Entry<VariableReferenceExpression, Aggregation> entry : node.getAggregations().entrySet()) { VariableReferenceExpression variable = entry.getKey(); if (context.get().contains(variable)) { Aggregation aggregation = entry.getValue(); expectedInputs.addAll( <START> extractUniqueVariables(aggregation, symbolAllocator.getTypes()) <END> .stream() .collect(toImmutableList())); aggregation.getMask().ifPresent(mask -> expectedInputs.add(mask)); aggregations.put(variable, aggregation); } } PlanNode source = context.rewrite(node.getSource(), expectedInputs.build()); return new AggregationNode(node.getId(), source, aggregations.build(), node.getGroupingSets(), ImmutableList.of(), node.getStep(), node.getHashVariable(), node.getGroupIdVariable()); }</code><technical_language>nit: do ImmutableList.copyOf(extractUniqueVariables(aggregation, symbolAllocator.getTypes()). ditto for line 661</technical_language>

Target:
public PlanNode visitAggregation(AggregationNode node, RewriteContext<Set<VariableReferenceExpression>> context) { ImmutableSet.Builder<VariableReferenceExpression> expectedInputs = ImmutableSet.<VariableReferenceExpression>builder() .addAll(node.getGroupingKeys()); if (node.getHashVariable().isPresent()) { expectedInputs.add(node.getHashVariable().get()); } ImmutableMap.Builder<VariableReferenceExpression, Aggregation> aggregations = ImmutableMap.builder(); for (Map.Entry<VariableReferenceExpression, Aggregation> entry : node.getAggregations().entrySet()) { VariableReferenceExpression variable = entry.getKey(); if (context.get().contains(variable)) { Aggregation aggregation = entry.getValue(); expectedInputs.addAll(extractAggregationUniqueVariables(aggregation, symbolAllocator.getTypes())); aggregation.getMask().ifPresent(mask -> expectedInputs.add(mask)); aggregations.put(variable, aggregation); } } PlanNode source = context.rewrite(node.getSource(), expectedInputs.build()); return new AggregationNode(node.getId(), source, aggregations.build(), node.getGroupingSets(), ImmutableList.of(), node.getStep(), node.getHashVariable(), node.getGroupIdVariable()); }
Source:
<code>public IndexReference indexCreate( SchemaDescriptor descriptor, String providerName ) throws SchemaKernelException { acquireExclusiveLabelLock( descriptor.keyId() ); ktx.assertOpen(); assertValidDescriptor( descriptor, SchemaKernelException.OperationContext.INDEX_CREATION ); assertIndexDoesNotExist( SchemaKernelException.OperationContext.INDEX_CREATION, descriptor ); SchemaIndexDescriptor indexDescriptor = SchemaIndexDescriptorFactory.forSchema( descriptor ); IndexProvider.Descriptor providerDescriptor = null; if ( providerName != null ) { IndexProviderDescriptorByName candidates = new IndexProviderDescriptorByName( providerName ); <START> indexProviderMap.accept( candidates ); <END> providerDescriptor = candidates.single(); } ktx.txState().indexRuleDoAdd( indexDescriptor, providerDescriptor ); return DefaultIndexReference.fromDescriptor( indexDescriptor ); }</code><technical_language>If IndexProviderMap a <String,IndexProvider> mapping instead. serve - IndexProvider apply( IndexProvider.Descriptor ) - IndexProvider.Descriptor apply( String providerName ) get rid of this visitor patter IndexProviderDescriptorByName class together. I simpler. IndexProviderMap mappings in parallel, <String,IndexProvider.Descriptor> <IndexProvider.Descriptor, IndexProvider></technical_language>

Target:
public IndexReference indexCreate( SchemaDescriptor descriptor, String providerName ) throws SchemaKernelException { acquireExclusiveLabelLock( descriptor.keyId() ); ktx.assertOpen(); assertValidDescriptor( descriptor, SchemaKernelException.OperationContext.INDEX_CREATION ); assertIndexDoesNotExist( SchemaKernelException.OperationContext.INDEX_CREATION, descriptor ); SchemaIndexDescriptor indexDescriptor = SchemaIndexDescriptorFactory.forSchema( descriptor ); IndexProvider.Descriptor providerDescriptor = providerByName( providerName ); ktx.txState().indexRuleDoAdd( indexDescriptor, providerDescriptor ); return DefaultIndexReference.fromDescriptor( indexDescriptor ); }
Source:
<code>public void scheduleJobs() { SchedulerUtil sched = getSchedulUtil(); int refreshRate = Config.<Integer> getValue(ConfigValues.VdsRefreshRate) * 1000; registeredJobs.add(sched.scheduleAFixedDelayJob( this, "onTimer", new Class[0], new Object[0], refreshRate, refreshRate, TimeUnit.MILLISECONDS)); double availableUpdatesRefreshRate = Config.<Double> getValue(ConfigValues.HostPackagesUpdateTimeInHours); final int HOURS_TO_MINUTES = 60; long rateInMinutes = Math.round(availableUpdatesRefreshRate * HOURS_TO_MINUTES); registeredJobs.add(sched.scheduleAFixedDelayJob( this, "availableUpdates", new Class[0], new Object[0], RandomUtils.nextInt(HOURS_TO_MINUTES) + 1, rateInMinutes, TimeUnit.MINUTES)); vmsRefresher = getRefresherFactory().create(this); vmsRefresher.startMonitoring(); <START> new RefreshHostOnHostConnectionChangeEvent(this).subscribe(); <END> }</code><technical_language>need cancel subscription call dispose(). do want subscription active for single host call getCaps</technical_language>

Target:
public void scheduleJobs() { SchedulerUtil sched = getSchedulUtil(); int refreshRate = Config.<Integer> getValue(ConfigValues.VdsRefreshRate) * 1000; registeredJobs.add(sched.scheduleAFixedDelayJob( this, "onTimer", new Class[0], new Object[0], refreshRate, refreshRate, TimeUnit.MILLISECONDS)); double availableUpdatesRefreshRate = Config.<Double> getValue(ConfigValues.HostPackagesUpdateTimeInHours); final int HOURS_TO_MINUTES = 60; long rateInMinutes = Math.round(availableUpdatesRefreshRate * HOURS_TO_MINUTES); registeredJobs.add(sched.scheduleAFixedDelayJob( this, "availableUpdates", new Class[0], new Object[0], RandomUtils.nextInt(HOURS_TO_MINUTES) + 1, rateInMinutes, TimeUnit.MINUTES)); vmsRefresher = getRefresherFactory().create(this); vmsRefresher.startMonitoring(); hostRefresher = new RefreshHostOnHostConnectionChangeEvent(this); hostRefresher.startMonitoring(); }
Source:
<code>private void unregisterRegion(final String encodedName) { LOG.info("Unregister region {}", encodedName); if (primaryRegionsUnderReplication.get(encodedName) == null) { LOG.warn("Try to unregister a unregistered region {}", encodedName); return; } CatalogReplicaShipper[] replicaShippers = primaryRegionsUnderReplication.remove(encodedName); for (CatalogReplicaShipper s : replicaShippers) { <START> s.setRunning(false); <END> } }</code><technical_language>s/setRunning/stop/</technical_language>

Target:
private void unregisterRegion(final String encodedName) { LOG.info("Unregister region {}", encodedName); if (primaryRegionsUnderReplication.get(encodedName) == null) { LOG.warn("Try to unregister a unregistered region {}", encodedName); return; } CatalogReplicaShipper[] replicaShippers = primaryRegionsUnderReplication.remove(encodedName); for (CatalogReplicaShipper s : replicaShippers) { s.stopShipper(); } }
Source:
<code><START> public ConstraintViolationProblem(final List<Violation> violations) { <END> this(Optional.empty(), violations); }</code><technical_language>this constructor I create a mutable instance. Needs do another copy, sorting logic moved instead of in advise</technical_language>

Target:
public ConstraintViolationProblem(final List<Violation> violations) { this(Optional.empty(), new ArrayList<>(violations)); }
Source:
<code>public static String joinParticipantTypes(List<FeedbackParticipantType> participants, String delimiter) { if (participants.isEmpty()) { return ""; <START> } else { <END> String result = ""; for (FeedbackParticipantType fpt: participants) { result += fpt + delimiter; } return result.substring(0, result.length() - delimiter.length()); } }</code><technical_language>need for else if clause returns</technical_language>

Target:
public static String joinParticipantTypes(List<FeedbackParticipantType> participants, String delimiter) { String result = ""; if (!participants.isEmpty()) { for (FeedbackParticipantType fpt : participants) { result += fpt + delimiter; } result = result.substring(0, result.length() - delimiter.length()); } return result; }
Source:
<code>private int matchResultColour(MatchResult result) { int colour; switch (result) { case WON: colour = R.color.battlereport_won; break; case LOST: colour = R.color.battlereport_lost; break; case DRAW: colour = R.color.battlereport_draw; break; default: <START> return R.color.black; <END> } return context.getResources().getColor(colour); }</code><technical_language>reason for this assigning colour rest of cases, instead of returning</technical_language>

Target:
private int matchResultColour(MatchResult result) { int colour; switch (result) { case WON: colour = R.color.battlereport_won; break; case LOST: colour = R.color.battlereport_lost; break; case DRAW: colour = R.color.battlereport_draw; break; default: colour = R.color.black; break; } return context.getResources().getColor(colour); }
Source:
<code>public void test447460MultipleUpdateConfiguration() throws Exception { <START> IProject project = importProject("projects/447460_MultipleUpdateConfiguration/pom.xml"); <END> IJavaProject javaProject = JavaCore.create(project); List<IClasspathEntry> cpEntries = filterClasspath(javaProject.getRawClasspath(), IClasspathEntry.CPE_SOURCE); assertNotNull(cpEntries); assertEquals("Invalid number of classpath entries", 4, cpEntries.size()); for(IClasspathEntry cpEntry : cpEntries) { IPath[] exclusions = cpEntry.getExclusionPatterns(); assertNotNull(exclusions); assertEquals("Classpath entry contains an exclusion pattern.", 0, exclusions.length); } }</code><technical_language>Subjective, createExisting explicit manager.updateProjectConfiguration. I this represent scenario in bug 447460 leave room assert classpath state configuration update</technical_language>

Target:
public void test447460MultipleUpdateConfiguration() throws Exception { IProject project = importProject("projects/447460_MultipleUpdateConfiguration/pom.xml"); IJavaProject javaProject = JavaCore.create(project); List<IClasspathEntry> cpEntries = filterClasspath(javaProject.getRawClasspath(), IClasspathEntry.CPE_SOURCE); assertNotNull(cpEntries); assertEquals("Invalid number of classpath entries", 4, cpEntries.size()); for(IClasspathEntry cpEntry : cpEntries) { String[] path = cpEntry.getPath().segments(); if("java".equals(path[path.length - 1])) { IPath[] exclusions = cpEntry.getExclusionPatterns(); assertNotNull(exclusions); assertEquals("Classpath source entry isn't supposed to contain any exclusion pattern.", 0, exclusions.length); } else { IPath[] exclusions = cpEntry.getExclusionPatterns(); assertNotNull(exclusions); assertEquals("Classpath resource entry contains more or less than one exclusion pattern.", 1, exclusions.length); assertEquals("Exclusion pattern is supposed to be '**' !", new Path("**"), exclusions[0]); } } }
Source:
<code>private Map<String, Object> getMap(List<String> fields, Aggregations aggregations) { final String field = fields.get(0); final List<String> remainingFields = (fields.size() > 1) ? fields.subList(1, fields.size()) : new ArrayList<>(); Terms terms = aggregations.get(Utils.sanitizeFieldForAggregation(field)); <START> Map<String, Object> levelCount = new HashMap<>(); <END> for (Terms.Bucket bucket : terms.getBuckets()) { if (fields.size() == 1) { levelCount.put(bucket.getKey(), bucket.getDocCount()); } else { levelCount.put(bucket.getKey(), getMap(remainingFields, bucket.getAggregations())); } } return levelCount; }</code><technical_language>Seriously? This Maps.createHashMap()</technical_language>

Target:
private Map<String, Object> getMap(List<String> fields, Aggregations aggregations) { final String field = fields.get(0); final List<String> remainingFields = (fields.size() > 1) ? fields.subList(1, fields.size()) : new ArrayList<>(); Terms terms = aggregations.get(Utils.sanitizeFieldForAggregation(field)); Map<String, Object> levelCount = Maps.newHashMap(); for (Terms.Bucket bucket : terms.getBuckets()) { if (fields.size() == 1) { levelCount.put(bucket.getKey(), bucket.getDocCount()); } else { levelCount.put(bucket.getKey(), getMap(remainingFields, bucket.getAggregations())); } } return levelCount; }
Source:
<code>MantaObjectOutputStream(final String path, final HttpHelper httpHelper, final MantaHttpHeaders mantaHttpHeaders, final MantaMetadata metadata, final ContentType contentType) { this.httpContent = new EmbeddedHttpContent(contentType.toString(), closed); this.path = path; final MantaHttpHeaders headers; if (mantaHttpHeaders == null) { headers = new MantaHttpHeaders(); } else { headers = mantaHttpHeaders; } if (contentType != null) { headers.setContentType(contentType.toString()); } this.completed = EXECUTOR.submit(() -> httpHelper.httpPut(path, headers, httpContent, metadata)); <START> synchronized (this.httpContent) { <END> while (!isClosed() && !httpContent.isClosed() && httpContent.getWriter() == null) { try { this.httpContent.wait(CLOSED_CHECK_INTERVAL); } catch (InterruptedException e) { return; } } } }</code><technical_language>If I github lined right, this synchronized block is constructor. Is this field published in a another thread content on</technical_language>

Target:
MantaObjectOutputStream(final String path, final HttpHelper httpHelper, final MantaHttpHeaders mantaHttpHeaders, final MantaMetadata metadata, final ContentType contentType) { this.httpContent = new EmbeddedHttpContent(contentType.toString(), closed); this.path = path; final MantaHttpHeaders headers; if (mantaHttpHeaders == null) { headers = new MantaHttpHeaders(); } else { headers = mantaHttpHeaders; } if (contentType != null) { headers.setContentType(contentType.toString()); } this.completed = EXECUTOR.submit(() -> httpHelper.httpPut(path, headers, httpContent, metadata)); synchronized (this.httpContent) { while (httpContent.getWriter() == null && !isClosed()) { try { this.httpContent.wait(CLOSED_CHECK_INTERVAL); } catch (InterruptedException e) { return; } } } }
Source:
<code>public static Map<String, Object> dictionaryToMap(Dictionary<String, Object> dictionary, OCD ocd) { if (dictionary == null) { return null; } Map<String, AD> ads = new HashMap<String, AD>(); if (ocd != null) { for (AD ad : ocd.getAD()) { ads.put(ad.getId(), ad); } } Map<String, Object> map = new HashMap<String, Object>(); Enumeration<String> keys = dictionary.keys(); while (keys.hasMoreElements()) { String key = keys.nextElement(); Object value = dictionary.get(key); AD ad = ads.get(key); if (ad != null && ad.getType() != null && Scalar.PASSWORD.equals(ad.getType())) { if (value instanceof char[]) { map.put(key, new Password((char[]) value)); } <START> if (value instanceof String[]) { <END> map.put(key, convertStringsToPasswords((String[]) value)); } else { map.put(key, new Password(value.toString())); } } else { map.put(key, value); } } return map; }</code><technical_language>else if</technical_language>

Target:
public static Map<String, Object> dictionaryToMap(Dictionary<String, Object> dictionary, OCD ocd) { if (dictionary == null) { return null; } Map<String, AD> ads = new HashMap<String, AD>(); if (ocd != null) { for (AD ad : ocd.getAD()) { ads.put(ad.getId(), ad); } } Map<String, Object> map = new HashMap<String, Object>(); Enumeration<String> keys = dictionary.keys(); while (keys.hasMoreElements()) { String key = keys.nextElement(); Object value = dictionary.get(key); AD ad = ads.get(key); if (ad != null && ad.getType() != null && Scalar.PASSWORD.equals(ad.getType())) { if (value instanceof char[]) { map.put(key, new Password((char[]) value)); } else if (value instanceof String[]) { map.put(key, convertStringsToPasswords((String[]) value)); } else { map.put(key, new Password(value.toString())); } } else { map.put(key, value); } } return map; }
Source:
<code>public void tearDown() throws Exception { super.tearDown(); <START> if (origApp != null) Entities.destroyAll(newApp.getManagementContext()); <END> if (mementoDir != null) RebindTestUtils.deleteMementoDir(mementoDir); }</code><technical_language>is this is a typo? (checking for origApp != null calling method newApp)</technical_language>

Target:
public void tearDown() throws Exception { super.tearDown(); if (origApp != null) Entities.destroyAll(origApp.getManagementContext()); if (mementoDir != null) RebindTestUtils.deleteMementoDir(mementoDir); }
Source:
<code>private void internalStep(final float delta) { if (delta <= 0) { return; } doAddRemoves(); occupiedSpaces.clear(); dynamicBodies.stream().forEach(body -> { if (body.active) { updateDynamics(body, delta); updateInput(body, delta); moveBody(body, delta); updateOccupiedSpaces(body); resetCollisions(body); } }); kineticBodies.stream().forEach(body -> { if (body.active) { updateKinetics(body); moveBody(body, delta); updateOccupiedSpaces(body); resetCollisions(body); } }); staticBodies.stream().forEach(body -> { if (body.active) { updateOccupiedSpaces(body); } }); <START> dynamicBodies.stream().filter(body -> body.active).forEach(body -> { <END> buildLevelCollisions(body); expireContact(body); findNewContact(body); }); kineticBodies.stream().filter(body -> body.active).forEach(body -> buildKineticCollections(body)); resolveAndApplyPendingResolutions(); dynamicBodies.parallelStream().filter(body -> body.active && body.stateWatcher != null).forEach(body -> body.stateWatcher.update(body)); }</code><technical_language>Is more efficient put filter part forEach loop green 121 green 131? is more efficient is throughout</technical_language>

Target:
private void internalStep(final float delta) { if (delta <= 0) { return; } doAddRemoves(); occupiedSpaces.clear(); dynamicBodies.stream().forEach(body -> { if (body.active) { updateDynamics(body, delta); updateInput(body, delta); moveBody(body, delta); updateOccupiedSpaces(body); resetCollisions(body); } }); kineticBodies.stream().forEach(body -> { if (body.active) { updateKinetics(body); moveBody(body, delta); updateOccupiedSpaces(body); resetCollisions(body); } }); staticBodies.stream().forEach(body -> { if (body.active) { updateOccupiedSpaces(body); } }); dynamicBodies.stream().forEach(body -> { if (body.active) { buildLevelCollisions(body); expireContact(body); findNewContact(body); } }); resolveAndApplyPendingResolutions(); dynamicBodies.parallelStream().filter(body -> body.active && body.stateWatcher != null).forEach(body -> body.stateWatcher.update(body)); }
Source:
<code>public <T> T getObject(String columnLabel, Class<T> type) throws SQLException { <START> return null; <END> }</code><technical_language>this implemented</technical_language>

Target:
public <T> T getObject(String columnLabel, Class<T> type) throws SQLException { throw new UnsupportedOperationException("HPCCResultSet: getPseudoColumns Not supported yet."); }
Source:
<code>public void testTriggerBucketBalancer() { <START> assertUpdate("CREATE TABLE test_bucket_balancer (c1 bigint, c2 bigint)"); <END> assertUpdate("INSERT INTO test_bucket_balancer VALUES (1, 1), (1, 2), (1, 3), (1, 4), (11, 1), (11, 2)", 6); assertUpdate("CALL system.trigger_bucket_balancer()"); assertUpdate("DROP TABLE test_bucket_balancer"); }</code><technical_language>I need create a table for this test. call procedure if fails</technical_language>

Target:
public void testTriggerBucketBalancer() { assertUpdate("CALL system.trigger_bucket_balancer()"); }
Source:
<code>public void testUnmarshallTopLevelEmptyEventProperties() throws Exception { Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_START_EVENT_FILE_PATH); assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM); StartMessageEvent emptyTop = getStartNodeById(diagram, EMPTY_TOP_LEVEL_EVENT_ID, StartMessageEvent.class); assertGeneralSet(emptyTop.getGeneral(), EMPTY_VALUE, EMPTY_VALUE); <START> assertMessageEventExecutionSet(emptyTop.getExecutionSet(), EMPTY_VALUE, NON_INTERRUPTING, ""); <END> assertDataIOSet(emptyTop.getDataIOSet(), EMPTY_VALUE); }</code><technical_language>suggestion assertMessageEventExecutionSet(emptyTop.getExecutionSet(), EMPTY_VALUE, NON_INTERRUPTING, EMPTY_VALUE);</technical_language>

Target:
public void testUnmarshallTopLevelEmptyEventProperties() throws Exception { Diagram<Graph, Metadata> diagram = unmarshall(marshaller, BPMN_START_EVENT_FILE_PATH); assertDiagram(diagram, AMOUNT_OF_NODES_IN_DIAGRAM); StartMessageEvent emptyTop = getStartNodeById(diagram, EMPTY_TOP_LEVEL_EVENT_ID, StartMessageEvent.class); assertGeneralSet(emptyTop.getGeneral(), EMPTY_VALUE, EMPTY_VALUE); assertMessageEventExecutionSet(emptyTop.getExecutionSet(), EMPTY_VALUE, NON_INTERRUPTING, EMPTY_VALUE); assertDataIOSet(emptyTop.getDataIOSet(), EMPTY_VALUE); }
Source:
<code>private void defineErrorRethrower(List<Statement> stats) { stats.add(0, new ExpressionStatement( new DeclarationExpression( <START> new VariableExpression(SpockNames.ERROR_COLLECTOR, nodeCache.ErrorCollector), <END> Token.newSymbol(Types.ASSIGN, -1, -1), new VariableExpression(SpockNames.ERROR_COLLECTOR)))); }</code><technical_language>I I prefer ErrorRethrower.INSTANCE instead of putting a field in SpecInternals</technical_language>

Target:
private void defineErrorRethrower(List<Statement> stats) { stats.add(0, new ExpressionStatement( new DeclarationExpression( new VariableExpression(SpockNames.ERROR_COLLECTOR, nodeCache.ErrorCollector), Token.newSymbol(Types.ASSIGN, -1, -1), new PropertyExpression(new ClassExpression(nodeCache.ErrorRethrower), "INSTANCE")))); }
Source:
<code>public JournalFile openFile() throws InterruptedException, IOException { if (JournalFilesRepository.trace) { JournalFilesRepository.trace("enqueueOpenFile with openedFiles.size=" + openedFiles.size()); } if (openFilesExecutor == null) { pushOpenRunnable.run(); } else { openFilesExecutor.execute(pushOpenRunnable); } JournalFile nextFile = openedFiles.poll(5, TimeUnit.SECONDS); if (nextFile == null) { fileFactory.onIOError(ActiveMQJournalBundle.BUNDLE.fileNotOpened(), "unable to open ", null); } if (nextFile == null) { <START> fileFactory.activateBuffer(journal.getCurrentFile().getFile()); <END> throw new IOException("unable to open file"); } if (JournalFilesRepository.trace) { JournalFilesRepository.trace("Returning file " + nextFile); } return nextFile; }</code><technical_language>BUNDLE Tom, ActiveMQJournalBundle.BUNDLE</technical_language>

Target:
public JournalFile openFile() throws InterruptedException, ActiveMQIOErrorException { if (JournalFilesRepository.trace) { JournalFilesRepository.trace("enqueueOpenFile with openedFiles.size=" + openedFiles.size()); } if (openFilesExecutor == null) { pushOpenRunnable.run(); } else { openFilesExecutor.execute(pushOpenRunnable); } JournalFile nextFile = openedFiles.poll(5, TimeUnit.SECONDS); if (nextFile == null) { fileFactory.onIOError(ActiveMQJournalBundle.BUNDLE.fileNotOpened(), "unable to open ", null); fileFactory.activateBuffer(journal.getCurrentFile().getFile()); throw ActiveMQJournalBundle.BUNDLE.fileNotOpened(); } if (JournalFilesRepository.trace) { JournalFilesRepository.trace("Returning file " + nextFile); } return nextFile; }
Source:
<code>public static String readResourceFile(String file) { <START> InputStream is = getResourceAsStream(file); <END> try (Scanner scanner = new Scanner(is, Const.SystemParams.ENCODING)) { return scanner.useDelimiter("\\Z").next(); } }</code><technical_language>This part of try-with-resources block</technical_language>

Target:
public static String readResourceFile(String file) { try (Scanner scanner = new Scanner(getResourceAsStream(file), Const.SystemParams.ENCODING)) { return scanner.useDelimiter("\\Z").next(); } }
Source:
<code>public boolean isAllowed(HttpServletRequest request, Project project) { return checkAll( request, "plugin_framework_project_cache", project, new AuthorizationEntity.PluginDecisionPredicate() { @Override public boolean decision(IAuthorizationPlugin plugin) { return plugin.isAllowed(request, project); } <START> @Override <END> public HttpServletRequest getRequest() { return request; } }, new AuthorizationEntity.PluginSkippingPredicate() { @Override public boolean shouldSkip(AuthorizationEntity authEntity) { if (authEntity.forProjects().isEmpty() && authEntity.forGroups().isEmpty()) { return false; } if (authEntity.forProjects().contains(project.getName())) { return false; } return true; } @Override public HttpServletRequest getRequest() { return request; } }); }</code><technical_language>indentation is a bit confusing here, nice if overrides shifter right column of new AuthorizationEntity line</technical_language>

Target:
public boolean isAllowed(HttpServletRequest request, Project project) { return checkAll( request, "plugin_framework_project_cache", project, new AuthorizationEntity.PluginDecisionPredicate() { @Override public boolean decision(IAuthorizationPlugin plugin) { return plugin.isAllowed(request, project); } }, new AuthorizationEntity.PluginSkippingPredicate() { @Override public boolean shouldSkip(AuthorizationEntity authEntity) { if (authEntity.forProjects().isEmpty() && authEntity.forGroups().isEmpty()) { return false; } if (authEntity.forProjects().contains(project.getName())) { return false; } return true; } }); }