auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public DeleteManager(ClusterMap clusterMap, ResponseHandler responseHandler, NotificationSystem notificationSystem, RouterConfig routerConfig, NonBlockingRouterMetrics routerMetrics, Time time) { this.clusterMap = clusterMap; this.responseHandler = responseHandler; this.notificationSystem = notificationSystem; this.routerConfig = routerConfig; this.routerMetrics = routerMetrics; this.time = time; <START> deleteOperations = new HashSet<DeleteOperation>(); <END> correlationIdToDeleteOperation = new HashMap<Integer, DeleteOperation>(); }</code><technical_language>concurrentHashSet in PutManager? Put qps delete qps pretty similar. So, follow in</technical_language>

Target:
DeleteManager(ClusterMap clusterMap, ResponseHandler responseHandler, NotificationSystem notificationSystem, RouterConfig routerConfig, NonBlockingRouterMetrics routerMetrics, Time time) { this.clusterMap = clusterMap; this.responseHandler = responseHandler; this.notificationSystem = notificationSystem; this.routerConfig = routerConfig; this.routerMetrics = routerMetrics; this.time = time; deleteOperations = Collections.newSetFromMap(new ConcurrentHashMap<DeleteOperation, Boolean>()); correlationIdToDeleteOperation = new HashMap<Integer, DeleteOperation>(); }
Source:
<code>public Aggregator factorize(ColumnSelectorFactory metricFactory) { return new DoubleLastAggregator( name, metricFactory.makeFloatColumnSelector(fieldName), <START> metricFactory.makeLongColumnSelector(Column.TIME_COLUMN_NAME) <END> ); }</code><technical_language>minor nit: pass time column selector field selector consistent buffered aggregator</technical_language>

Target:
public Aggregator factorize(ColumnSelectorFactory metricFactory) { return new DoubleLastAggregator( name, metricFactory.makeLongColumnSelector(Column.TIME_COLUMN_NAME), metricFactory.makeFloatColumnSelector(fieldName) ); }
Source:
<code><START> public static QueryPostprocessDataContext createCassandraDataContext(Cluster cluster, String keySpaceName) { <END> return new CassandraDataContext(cluster, keySpaceName); }</code><technical_language>return DataContext (the interface) QueryPostprocessDataContext (an abstract class want expose end-users)</technical_language>

Target:
public static DataContext createCassandraDataContext(Cluster cluster, String keySpaceName) { return new CassandraDataContext(cluster, keySpaceName); }
Source:
<code>private static DataSize writeOrcColumnPresto(File outputFile, Format format, CompressionKind compression, Type type, Iterator<?> values) throws Exception { ImmutableMap.Builder<String, String> metadata = ImmutableMap.builder(); metadata.put("columns", "test"); metadata.put("columns.types", createSettableStructObjectInspector("test", type).getTypeName()); OutputStream outputStream = new FileOutputStream(outputFile); OrcWriter writer; writer = new OrcWriter( outputStream, ImmutableList.of("test"), ImmutableList.of(type), format.getOrcEncoding(), compression, new OrcWriterOptions(), ImmutableMap.of(), HIVE_STORAGE_TIME_ZONE, true, new OrcWriterStats()); BlockBuilder blockBuilder = type.createBlockBuilder(new BlockBuilderStatus(), 1024); while (values.hasNext()) { Object value = values.next(); writeValue(type, blockBuilder, value); } writer.write(new Page(blockBuilder.build())); writer.close(); writer.validate(new FileOrcDataSource(outputFile, new DataSize(1, MEGABYTE), new DataSize(1, MEGABYTE), new DataSize(1, MEGABYTE), true)); <START> return new DataSize(new OutputStreamSliceOutput(outputStream).longSize(), Unit.BYTE); <END> }</code><technical_language>This return zero stream used. return is used, remove it</technical_language>

Target:
private static void writeOrcColumnPresto(File outputFile, Format format, CompressionKind compression, Type type, Iterator<?> values) throws Exception { ImmutableMap.Builder<String, String> metadata = ImmutableMap.builder(); metadata.put("columns", "test"); metadata.put("columns.types", createSettableStructObjectInspector("test", type).getTypeName()); OrcWriter writer; writer = new OrcWriter( new FileOutputStream(outputFile), ImmutableList.of("test"), ImmutableList.of(type), format.getOrcEncoding(), compression, new OrcWriterOptions(), ImmutableMap.of(), HIVE_STORAGE_TIME_ZONE, true, new OrcWriterStats()); BlockBuilder blockBuilder = type.createBlockBuilder(new BlockBuilderStatus(), 1024); while (values.hasNext()) { Object value = values.next(); writeValue(type, blockBuilder, value); } writer.write(new Page(blockBuilder.build())); writer.close(); writer.validate(new FileOrcDataSource(outputFile, new DataSize(1, MEGABYTE), new DataSize(1, MEGABYTE), new DataSize(1, MEGABYTE), true)); }
Source:
<code>public void canSerialize() throws Exception { Phone phone = new Phone("408.258.8569", "US"); assertEquals("(408) 258-8569", phone.getNationalFormat()); JsonNode node = BridgeObjectMapper.get().valueToTree(phone); assertEquals("+14082588569", node.get("number").textValue()); assertEquals("US", node.get("regionCode").textValue()); assertEquals("Phone", node.get("type").textValue()); <START> assertEquals(4, node.size()); <END> Phone deser = BridgeObjectMapper.get().readValue(node.toString(), Phone.class); assertEquals(phone.getNumber(), deser.getNumber()); assertEquals(phone.getRegionCode(), deser.getRegionCode()); assertEquals("(408) 258-8569", deser.getNationalFormat()); }</code><technical_language>JSON node 4 entries, testing 3 of them</technical_language>

Target:
public void canSerialize() throws Exception { Phone phone = new Phone("408.258.8569", "US"); assertEquals("+14082588569", phone.getNumber()); JsonNode node = BridgeObjectMapper.get().valueToTree(phone); assertEquals("+14082588569", node.get("number").textValue()); assertEquals("US", node.get("regionCode").textValue()); assertEquals("(408) 258-8569", node.get("nationalFormat").textValue()); assertEquals("Phone", node.get("type").textValue()); assertEquals(4, node.size()); Phone deser = BridgeObjectMapper.get().readValue(node.toString(), Phone.class); assertEquals(phone.getNumber(), deser.getNumber()); assertEquals(phone.getRegionCode(), deser.getRegionCode()); assertEquals("(408) 258-8569", deser.getNationalFormat()); }
Source:
<code>public static void createContentIfNotCreated(DataSource ds) { try { datasource = ds; Connection conn = ds.getConnection(); DatabaseMetaData dbmeta = conn.getMetaData(); final String dbName = dbmeta.getDatabaseProductName().replace(' ', '_'); <START> if (!hasOskariTables(dbmeta)) { <END> getLog().info("Creating db for " + dbName); executeSqlFromFile(conn, dbName, "create-base-tables.sql"); createContent(conn, dbName, "register-bundles.json"); executeSqlFromFile(conn, dbName, "add-default-roles.sql"); executeSqlFromFile(conn, dbName, "add-internal-dataprovider.sql"); createContent(conn, dbName); try { if(!conn.getAutoCommit()) { conn.commit(); } } catch (SQLException e) { getLog().error(e, "Couldn't commit changes!"); } } else { getLog().info("Existing tables found in db. Not creating initial tables"); } } catch (Exception e) { getLog().error(e, "Error creating db content!"); } }</code><technical_language>more readable if this if negative</technical_language>

Target:
public static void createContentIfNotCreated(DataSource ds) { try { datasource = ds; Connection conn = ds.getConnection(); DatabaseMetaData dbmeta = conn.getMetaData(); final String dbName = dbmeta.getDatabaseProductName().replace(' ', '_'); if (doesNotHaveOskariTables(dbmeta)) { getLog().info("Creating db for " + dbName); executeSqlFromFile(conn, dbName, "create-base-tables.sql"); createContent(conn, dbName, "register-bundles.json"); executeSqlFromFile(conn, dbName, "add-default-roles.sql"); executeSqlFromFile(conn, dbName, "add-internal-dataprovider.sql"); createContent(conn, dbName); try { if(!conn.getAutoCommit()) { conn.commit(); } } catch (SQLException e) { getLog().error(e, "Couldn't commit changes!"); } } else { getLog().info("Existing tables found in db. Not creating initial tables"); } } catch (Exception e) { getLog().error(e, "Error creating db content!"); } }
Source:
<code>public void showSourceFeedback(Request request) { MoveEdgeGroupManager nodesGroupMoveManager = new MoveEdgeGroupManager(request); if (nodesGroupMoveManager.isToolActivated()) { nodesGroupMoveManager.showGroupFeedback(); } else { nodesGroupMoveManager.eraseGroupFeedback(); if (getLineSegMode() != LineMode.OBLIQUE) { if (REQ_CREATE_BENDPOINT.equals(request.getType())) { showMoveLineSegFeedback((BendpointRequest) request); } else if (REQ_MOVE_BENDPOINT.equals(request.getType())) { showMoveOrthogonalBendpointFeedback2((BendpointRequest) request); } } else { if (REQ_MOVE_BENDPOINT.equals(request.getType())) { showMoveBendpointFeedback((BendpointRequest) request); } else if (REQ_CREATE_BENDPOINT.equals(request.getType())) { showCreateBendpointFeedback((BendpointRequest) request); } } <START> super.showSourceFeedback(request); <END> } }</code><technical_language>This line is necessary. is wrongly</technical_language>

Target:
public void showSourceFeedback(Request request) { MoveEdgeGroupManager nodesGroupMoveManager = new MoveEdgeGroupManager(request); if (nodesGroupMoveManager.isToolActivated()) { nodesGroupMoveManager.showGroupFeedback(); } else { nodesGroupMoveManager.eraseGroupFeedback(); if (getLineSegMode() != LineMode.OBLIQUE) { if (REQ_CREATE_BENDPOINT.equals(request.getType())) { showMoveLineSegFeedback((BendpointRequest) request); } else if (REQ_MOVE_BENDPOINT.equals(request.getType())) { showMoveOrthogonalBendpointFeedback2((BendpointRequest) request); } } else { if (REQ_MOVE_BENDPOINT.equals(request.getType())) { showMoveBendpointFeedback((BendpointRequest) request); } else if (REQ_CREATE_BENDPOINT.equals(request.getType())) { showCreateBendpointFeedback((BendpointRequest) request); } } } }
Source:
<code>private void indexNotNullArray(String name, Object value, Document document, LuceneOptions luceneOptions) { <START> for ( int i = 0, length = Array.getLength( value ) ; i < length ; ++i ) { <END> Object entry = Array.get( value, i ); indexEntry( name, entry, document, luceneOptions ); } }</code><technical_language>I vote for Array introduce needed in CollectionHelper for HV</technical_language>

Target:
private void indexNotNullArray(String name, Object value, Document document, LuceneOptions luceneOptions) { for ( Object entry : CollectionHelper.iterableFromArray( value ) ) { indexEntry( name, entry, document, luceneOptions ); } }
Source:
<code><START> public void clearDFA() { <END> }</code><technical_language>This method needs implemented in LexerATNSimulator ParserATNSimulator</technical_language>

Target:
public void clearDFA() { throw new UnsupportedOperationException("This ATN simulator does not support clearing the DFA."); }
Source:
<code>public void success() { CommCareApplication._().getCurrentApp().setResourcesValidated(); if(Intent.ACTION_VIEW.equals(CommCareVerificationActivity.this.getIntent().getAction())) { Intent i = new Intent(getApplicationContext(), CommCareHomeActivity.class); i.putExtra(KEY_REQUIRE_REFRESH, true); startActivity(i); <START> startActivity(i); <END> } else { Intent i = new Intent(getIntent()); i.putExtra(KEY_REQUIRE_REFRESH, true); setResult(RESULT_OK, i); } finish(); }</code><technical_language>double 'startActivity' call needed, right</technical_language>

Target:
public void success() { CommCareApplication._().getCurrentApp().setMMResourcesValidated(); if(Intent.ACTION_VIEW.equals(CommCareVerificationActivity.this.getIntent().getAction())) { Intent i = new Intent(getApplicationContext(), CommCareHomeActivity.class); i.putExtra(KEY_REQUIRE_REFRESH, true); startActivity(i); } else { Intent i = new Intent(getIntent()); i.putExtra(KEY_REQUIRE_REFRESH, true); setResult(RESULT_OK, i); } finish(); }
Source:
<code>public void updateQueryResults( final TransactionBase tx, final VisibilityBindingSet childBindingSet, final QueryMetadata queryMetadata) throws Exception { checkNotNull(tx); checkNotNull(childBindingSet); checkNotNull(queryMetadata); log.trace( "Transaction ID: " + tx.getStartTimestamp() + "\n" + "Join Node ID: " + queryMetadata.getNodeId() + "\n" + "Child Node ID: " + queryMetadata.getChildNodeId() + "\n" + "Child Binding Set:\n" + childBindingSet + "\n"); final VariableOrder queryVarOrder = queryMetadata.getVariableOrder(); <START> final Bytes resultRow = getRowKey(queryMetadata.getNodeId(), queryVarOrder, childBindingSet); <END> final Bytes nodeValueBytes = BS_SERDE.serialize(childBindingSet); log.trace( "Transaction ID: " + tx.getStartTimestamp() + "\n" + "New Binding Set: " + childBindingSet + "\n"); tx.set(resultRow, FluoQueryColumns.QUERY_BINDING_SET, nodeValueBytes); }</code><technical_language>create get</technical_language>

Target:
public void updateQueryResults( final TransactionBase tx, final VisibilityBindingSet childBindingSet, final QueryMetadata queryMetadata) throws Exception { checkNotNull(tx); checkNotNull(childBindingSet); checkNotNull(queryMetadata); log.trace( "Transaction ID: " + tx.getStartTimestamp() + "\n" + "Join Node ID: " + queryMetadata.getNodeId() + "\n" + "Child Node ID: " + queryMetadata.getChildNodeId() + "\n" + "Child Binding Set:\n" + childBindingSet + "\n"); final VariableOrder queryVarOrder = queryMetadata.getVariableOrder(); final Bytes resultRow = makeRowKey(queryMetadata.getNodeId(), queryVarOrder, childBindingSet); final Bytes nodeValueBytes = BS_SERDE.serialize(childBindingSet); log.trace( "Transaction ID: " + tx.getStartTimestamp() + "\n" + "New Binding Set: " + childBindingSet + "\n"); tx.set(resultRow, FluoQueryColumns.QUERY_BINDING_SET, nodeValueBytes); }
Source:
<code>public void visitNode(Tree tree) { <START> ForLoopVariableTypeCheck.this.reportIssue(forEachStatement.variable().type(), String.format(PRIMARY_MESSAGE, variableType.name()), <END> getSecondaryLocations(), 0); }</code><technical_language>stop visit a relevant cast, want raise issue once</technical_language>

Target:
public void visitNode(Tree tree) { if (blockAlreadyFlagged) { return; } ExpressionTree expression = ((TypeCastTree) tree).expression(); if (expression.is(Tree.Kind.IDENTIFIER) && ((IdentifierTree) expression).symbol().equals(variable.symbol())) { ForLoopVariableTypeCheck.this.reportIssue(forEachStatement.variable().type(), String.format(PRIMARY_MESSAGE, variable.type().symbolType().name()), getSecondaryLocations(), 0); blockAlreadyFlagged = true; } }
Source:
<code>public void placeRadiologyOrder_shouldCreateRadiologyOrderEncounterWithOrdererAttachedToNewActiveVisitIfPatientWithoutActiveVisit() throws Exception { RadiologyOrder radiologyOrder = getUnsavedRadiologyOrder(); assertThat(encounterService.getEncountersByPatient(radiologyOrder.getPatient()), is(empty())); assertThat(visitService.getActiveVisitsByPatient(radiologyOrder.getPatient()), is(empty())); assertThat(radiologyOrder.getEncounter(), is(nullValue())); radiologyOrder = radiologyService.placeRadiologyOrder(radiologyOrder); Encounter encounter = radiologyOrder.getEncounter(); assertThat(encounter, is(not(nullValue()))); assertThat(encounter.getEncounterProviders() .size(), is(1)); Iterator<EncounterProvider> encounterProviderIterator = encounter.getEncounterProviders() .iterator(); <START> while (encounterProviderIterator.hasNext()) { <END> EncounterProvider encounterProvider = encounterProviderIterator.next(); assertThat(encounterProvider.getProvider(), is(radiologyOrder.getOrderer())); } assertThat(encounterService.getEncountersByPatient(radiologyOrder.getPatient()) .size(), is(1)); assertThat(visitService.getActiveVisitsByPatient(radiologyOrder.getPatient()) .size(), is(1)); assertThat(orderService.getAllOrdersByPatient(radiologyOrder.getPatient()) .size(), is(1)); }</code><technical_language>same. need for loop</technical_language>

Target:
public void placeRadiologyOrder_shouldCreateRadiologyOrderEncounterWithOrdererAttachedToNewActiveVisitIfPatientWithoutActiveVisit() throws Exception { RadiologyOrder radiologyOrder = getUnsavedRadiologyOrder(); assertThat(encounterService.getEncountersByPatient(radiologyOrder.getPatient()), is(empty())); assertThat(visitService.getActiveVisitsByPatient(radiologyOrder.getPatient()), is(empty())); assertThat(radiologyOrder.getEncounter(), is(nullValue())); radiologyOrder = radiologyService.placeRadiologyOrder(radiologyOrder); Encounter encounter = radiologyOrder.getEncounter(); assertThat(encounter, is(not(nullValue()))); assertThat(encounter.getEncounterProviders() .size(), is(1)); assertThat(encounter.getEncounterProviders() .iterator() .next() .getProvider(), is(radiologyOrder.getOrderer())); assertThat(encounterService.getEncountersByPatient(radiologyOrder.getPatient()) .size(), is(1)); assertThat(visitService.getActiveVisitsByPatient(radiologyOrder.getPatient()) .size(), is(1)); assertThat(visitService.getActiveVisitsByPatient(radiologyOrder.getPatient()) .get(0) .getEncounters(), hasItem(encounter)); assertThat(orderService.getAllOrdersByPatient(radiologyOrder.getPatient()) .size(), is(1)); }
Source:
<code>public void testGetAllForClusterFilteredWithPermissions() { <START> List<network> result = dao.getAllForCluster(cluster, PRIVILEGED_USER_ID, true); <END> assertNotNull(result); assertFalse(result.isEmpty()); }</code><technical_language>This code extracted a general "run & check" method</technical_language>

Target:
public void testGetAllForClusterFilteredWithPermissions() { List<network> result = dao.getAllForCluster(cluster, PRIVILEGED_USER_ID, true); assertGetAllForClusterResult(result); }
Source:
<code>public boolean isSet(String name) { <START> return isMapped(name) && myMapping.get(name) < myValues.size(); <END> }</code><technical_language>= 0</technical_language>

Target:
public boolean isSet(String name) { return isMapped(name) && myMapping.get(name) >= 0 && myMapping.get(name) < myValues.size(); }
Source:
<code>protected boolean validate() { if (!super.validate()) { return false; } if (getVm().getStatus() != VMStatus.Up) { return <START> failValidation(EngineMessage.ACTION_TYPE_FAILED_VM_NEEDS_TO_BE_UP, <END> ReplacementUtils.createSetVariableString( "vmId", getVmId()), ReplacementUtils.createSetVariableString( "vmName", getVm().getName()), ReplacementUtils.createSetVariableString( "currentVmState", getVm().getStatus())); } if (getDeviceToHotUnplug() == null) { return failValidation( EngineMessage.ACTION_TYPE_FAILED_VM_MEMORY_DEVICE_NOT_FOUND, ReplacementUtils.createSetVariableString( "memorySize", getParameters().getMemorySizeMb()), ReplacementUtils.createSetVariableString( "vmId", getVmId()), ReplacementUtils.createSetVariableString( "vmName", getVm().getName())); } return true; }</code><technical_language>please ACTION_TYPE_FAILED_VM_IS_NOT_UP</technical_language>

Target:
protected boolean validate() { if (!super.validate()) { return false; } if (getVm().getStatus() != VMStatus.Up) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_UP); } if (getDeviceToHotUnplug() == null) { return failValidation( EngineMessage.ACTION_TYPE_FAILED_VM_MEMORY_DEVICE_NOT_FOUND, ReplacementUtils.createSetVariableString( "memorySize", getParameters().getMemorySizeMb())); } return true; }
Source:
<code>public void testBin2Level(final int bin, final int expectedLevel, final String ignored) { Assert.assertEquals(GenomicIndexUtil.bin2level(bin), expectedLevel); <START> System.out.println(GenomicIndexUtil.bin2Region(bin)); <END> }</code><technical_language>drop this print minimize test spam</technical_language>

Target:
public void testBin2Level(final int bin, final int expectedLevel, final String ignored) { Assert.assertEquals(GenomicIndexUtil.binTolevel(bin), expectedLevel); }
Source:
<code>public void testInvalidFieldQueryParam() { final Response response = target("/valid/bar") .queryParam("sort", "foo") .request() .get(); <START> assertThat(response.getStatus()).isEqualTo(422); <END> }</code><technical_language>add additional assertion response message</technical_language>

Target:
public void testInvalidFieldQueryParam() { final Response response = target("/valid/bar") .queryParam("sort", "foo") .request() .get(); assertThat(response.getStatus()).isEqualTo(422); assertThat(response.readEntity(String.class)) .containsOnlyOnce("sortParam must match \\\"^(asc|desc)$\\\""); }
Source:
<code>private void collisions$runCollisions(EntityLivingBase self) { try (PhaseContext<?> ignored = EntityPhase.State.COLLISION.createPhaseContext() <START> .source(this).buildAndSwitch()) { <END> this.collideWithNearbyEntities(); } }</code><technical_language>guaranteed this called client thread</technical_language>

Target:
private void impl$runCollisions(EntityLivingBase self) { if (((WorldBridge) this.world).bridge$isFake()) { this.shadow$collideWithNearbyEntities(); } else { try (PhaseContext<?> ignored = EntityPhase.State.COLLISION.createPhaseContext() .source(this).buildAndSwitch()) { this.shadow$collideWithNearbyEntities(); } } }
Source:
<code>public void select(final GridWidget selectedGridWidget) { this.selectedGridWidget = Optional.of(selectedGridWidget); boolean selectionChanged = false; for (GridWidget gridWidget : getAllGridWidgets()) { <START> if (!gridWidget.equals(selectedGridWidget)) { <END> selectionChanged = true; gridWidget.deselect(); } else if (gridWidget.equals(selectedGridWidget)) { selectionChanged = true; gridWidget.select(); } } if (selectionChanged) { batch(); } }</code><technical_language>Objects.equals avoid eventual NPE</technical_language>

Target:
public void select(final GridWidget selectedGridWidget) { this.selectedGridWidget = Optional.of(selectedGridWidget); boolean selectionChanged = false; for (GridWidget gridWidget : getAllGridWidgets()) { if (!Objects.equals(gridWidget, selectedGridWidget)) { selectionChanged = true; gridWidget.deselect(); } else if (Objects.equals(gridWidget, selectedGridWidget)) { selectionChanged = true; gridWidget.select(); } } if (selectionChanged) { batch(); } }
Source:
<code><START> public void updateTableStatistics(String databaseName, String tableName, <END> Function<PartitionStatistics, PartitionStatistics> update) { throw new UnsupportedOperationException("updateTableStatistics"); }</code><technical_language>nit: param line; line empty</technical_language>

Target:
public void updateTableStatistics(String databaseName, String tableName, Function<PartitionStatistics, PartitionStatistics> update) { throw new UnsupportedOperationException("updateTableStatistics is not supported in AlluxioHiveMetastore"); }
Source:
<code>public String serialize() { if(hard != null && soft != null) return name + "="+hard+":"+soft; <START> else if(hard != null && soft == null) <END> return name + "="+hard; else if(hard == null && soft != null) return name + "=:"+soft; else return null; }</code><technical_language>soft == null is true (because line matched)</technical_language>

Target:
public String serialize() { if(hard != null && soft != null) return name + "="+hard+":"+soft; else if(hard != null) return name + "="+hard; else if(soft != null) return name + "=:"+soft; else return null; }
Source:
<code>protected void link(ProducedType type) throws IOException { if(type == null) return; TypeDeclaration decl = type.getDeclaration(); if(decl instanceof UnionType){ UnionType ut = (UnionType) decl; if (ut.getCaseTypes().size()==2) { Unit unit = decl.getUnit(); Class nothingDeclaration = unit.getNothingDeclaration(); if (com.redhat.ceylon.compiler.typechecker.model.Util.isElementOfUnion(ut, nothingDeclaration)) { ProducedType nonOptionalType = null; for (ProducedType ct : ut.getCaseTypes()) { TypeDeclaration ctd = ct.getDeclaration(); if (ctd instanceof Class && ctd.equals(nothingDeclaration)) { continue; } else { nonOptionalType = ct; break; } } link(nonOptionalType); <START> write("?"); <END> return; } if (com.redhat.ceylon.compiler.typechecker.model.Util.isElementOfUnion(ut, unit.getEmptyDeclaration()) && com.redhat.ceylon.compiler.typechecker.model.Util.isElementOfUnion(ut, unit.getSequenceDeclaration())) { link(unit.getElementType(type)); write("[]"); return; } } boolean first = true; for(ProducedType ud : ut.getCaseTypes()){ if(first){ first = false; }else{ write("|"); } link(ud); } }else if(decl instanceof IntersectionType){ IntersectionType it = (IntersectionType) decl; boolean first = true; for(ProducedType id : it.getSatisfiedTypes()){ if(first){ first = false; }else{ write("&amp;"); } link(id); } }else if(decl instanceof ClassOrInterface){ link((ClassOrInterface) decl, type.getTypeArgumentList()); } else if (decl instanceof TypeParameter) { around("span class='type-parameter'", decl.getName()); } else { write(type.getProducedTypeName()); } }</code><technical_language>I understand this code. is this unit.getDefiniteType(type)</technical_language>

Target:
protected void link(ProducedType type) throws IOException { if(type == null) return; TypeDeclaration decl = type.getDeclaration(); if(decl instanceof UnionType){ UnionType ut = (UnionType) decl; if (ut.getCaseTypes().size()==2) { Unit unit = decl.getUnit(); if (com.redhat.ceylon.compiler.typechecker.model.Util.isElementOfUnion(ut, unit.getNothingDeclaration())) { link(getDefiniteTypeForDisplay(ut)); write("?"); return; } if (com.redhat.ceylon.compiler.typechecker.model.Util.isElementOfUnion(ut, unit.getEmptyDeclaration()) && com.redhat.ceylon.compiler.typechecker.model.Util.isElementOfUnion(ut, unit.getSequenceDeclaration())) { link(unit.getElementType(type)); write("[]"); return; } } boolean first = true; for(ProducedType ud : ut.getCaseTypes()){ if(first){ first = false; }else{ write("|"); } link(ud); } }else if(decl instanceof IntersectionType){ IntersectionType it = (IntersectionType) decl; boolean first = true; for(ProducedType id : it.getSatisfiedTypes()){ if(first){ first = false; }else{ write("&amp;"); } link(id); } }else if(decl instanceof ClassOrInterface){ link((ClassOrInterface) decl, type.getTypeArgumentList()); } else if (decl instanceof TypeParameter) { around("span class='type-parameter'", decl.getName()); } else { write(type.getProducedTypeName()); } }
Source:
<code>private List<FileStatus> getStoreFilesForSnapshot(SnapshotMock.SnapshotBuilder builder) throws IOException { final List<FileStatus> allStoreFiles = Lists.newArrayList(); SnapshotReferenceUtil .visitReferencedFiles(UTIL.getConfiguration(), fs, builder.getSnapshotsDir(), new SnapshotReferenceUtil.SnapshotVisitor() { @Override public void storeFile(RegionInfo regionInfo, String familyName, SnapshotProtos.SnapshotRegionManifest.StoreFile storeFile) throws IOException { <START> FileStatus status = mockStoreFile(storeFile.getName()); <END> allStoreFiles.add(status); } }); return allStoreFiles; }</code><technical_language>This tests case getSnapshotsInProgress is called, test getSnapshotsInProgress method test case a file is correctly included if file is in progress (and negative case)</technical_language>

Target:
private List<FileStatus> getStoreFilesForSnapshot(SnapshotMock.SnapshotBuilder builder) throws IOException { final List<FileStatus> allStoreFiles = Lists.newArrayList(); SnapshotReferenceUtil .visitReferencedFiles(conf, fs, builder.getSnapshotsDir(), new SnapshotReferenceUtil.SnapshotVisitor() { @Override public void storeFile(RegionInfo regionInfo, String familyName, SnapshotProtos.SnapshotRegionManifest.StoreFile storeFile) throws IOException { FileStatus status = mockStoreFile(storeFile.getName()); allStoreFiles.add(status); } }); return allStoreFiles; }
Source:
<code>private RegistryObjectType extractRegistryObject(RegistryObjectListType registryList) { RegistryObjectType registryObj = null; if (registryList != null && NullChecker.isNotNullish(registryList.getIdentifiable())) { List<JAXBElement<? extends IdentifiableType>> identifiers = registryList.getIdentifiable(); <START> for (JAXBElement<? extends IdentifiableType> object : identifiers) { <END> if (object.getDeclaredType() != null && object.getDeclaredType().equals(RegistryPackageType.class)) { registryObj = (RegistryObjectType) object.getValue(); break; } } } else { LOG.error("RegistryPackage is null."); } return registryObj; }</code><technical_language>remove "identifiers" "registryList.getIdentifiable()" part of enhanced for loop</technical_language>

Target:
private RegistryObjectType extractRegistryObject(RegistryObjectListType registryList) { RegistryObjectType registryObj = null; if (registryList != null && registryList.getIdentifiable() != null) { for (JAXBElement<? extends IdentifiableType> object : registryList.getIdentifiable()) { if (object.getDeclaredType() != null && object.getDeclaredType().equals(RegistryPackageType.class)) { registryObj = (RegistryObjectType) object.getValue(); break; } } } if (registryObj == null) { LOG.error("RegistryPackage is null."); } return registryObj; }
Source:
<code>public void testSetupProjectTouchesTheDirSizeFile() throws Exception { final ProjectVersion pv = new ProjectVersion(12, 34, new File(this.projectsDir, "sample_project_01")); this.instance.setupProject(pv); final long lastModifiedTime1 = new File(Paths.get(pv.getInstalledDir().getPath(), Constants .PROJECT_DIR_SIZE_FILE_NAME).toString()).lastModified(); <START> Thread.sleep(1000); <END> this.instance.setupProject(pv); final long lastModifiedTime2 = new File(Paths.get(pv.getInstalledDir().getPath(), Constants .PROJECT_DIR_SIZE_FILE_NAME).toString()).lastModified(); assertThat(lastModifiedTime2).isGreaterThan(lastModifiedTime1); }</code><technical_language>Is a way</technical_language>

Target:
public void testSetupProjectTouchesTheDirSizeFile() throws Exception { final ProjectVersion pv = new ProjectVersion(12, 34, new File(this.projectsDir, "sample_project_01")); this.instance.setupProject(pv); verify(this.instance, never()).touchIfExists( Paths.get(pv.getInstalledDir().getPath(), FlowPreparer.PROJECT_DIR_SIZE_FILE_NAME)); this.instance.setupProject(pv); verify(this.instance).touchIfExists( Paths.get(pv.getInstalledDir().getPath(), FlowPreparer.PROJECT_DIR_SIZE_FILE_NAME)); }
Source:
<code>public void addDropDownOption( TerminationConfigOption terminationConfigOption ) { if ( terminationConfigOption == TerminationConfigOption.NESTED ) { return; } AnchorListItem li1 = new AnchorListItem( dropDownNameMap.get( terminationConfigOption ) ); li1.addClickHandler( h -> { presenter.onTerminationTypeSelected( terminationConfigOption.name() ); } ); for ( int i = 0; i < dropdownMenuList.getWidgetCount(); i++ ) { AnchorListItem item = (AnchorListItem) dropdownMenuList.getWidget( i ); <START> if ( terminationConfigOption.ordinal() < getDropDownOption( item.getText() ).ordinal() ) { <END> dropdownMenuList.insert( li1, i ); break; } if ( i == dropdownMenuList.getWidgetCount() - 1 ) { dropdownMenuList.add( li1 ); } } }</code><technical_language>This throw a NullPointerException based implementation of getDropDownOption()</technical_language>

Target:
public void addDropDownOption( TerminationConfigOption terminationConfigOption ) { if ( terminationConfigOption == TerminationConfigOption.NESTED ) { return; } AnchorListItem li1 = new AnchorListItem( dropDownNameMap.get( terminationConfigOption ) ); li1.addClickHandler( h -> { presenter.onTerminationTypeSelected( terminationConfigOption.name() ); } ); for ( int i = 0; i < dropdownMenuList.getWidgetCount(); i++ ) { AnchorListItem item = (AnchorListItem) dropdownMenuList.getWidget( i ); TerminationConfigOption dropDownTerminationConfigOption = getDropDownOption( item.getText() ); if ( dropDownTerminationConfigOption == null || terminationConfigOption.ordinal() < dropDownTerminationConfigOption.ordinal() ) { dropdownMenuList.insert( li1, i ); break; } if ( i == dropdownMenuList.getWidgetCount() - 1 ) { dropdownMenuList.add( li1 ); } } }
Source:
<code>private KieCompilationResponse compileAndLoadKieJarMetadataAllResourcesPackagedJar() { String alternateSettingsAbsPath = TestUtilMaven.getSettingsFile(); Path tmpRoot = Files.createTempDirectory("repo_" + UUID.randomUUID().toString()); Path tmp = Files.createDirectories(Paths.get(tmpRoot.toString(), "dummy")); try { TestUtil.copyTree(Paths.get(ResourcesConstants.KJAR_2_ALL_RESOURCES), tmp); } catch (Exception e) { logger.error(e.getMessage()); } final KieCompilationResponse res; try { final AFCompiler compiler = KieMavenCompilerFactory.getCompiler(EnumSet.of(KieDecorator.STORE_KIE_OBJECTS, KieDecorator.ENABLE_LOGGING)); final WorkspaceCompilationInfo info = new WorkspaceCompilationInfo(tmp); final CompilationRequest req = new DefaultCompilationRequest(mavenRepoPath, info, new String[]{ MavenCLIArgs.COMPILE, MavenCLIArgs.ALTERNATE_USER_SETTINGS + alternateSettingsAbsPath }, Boolean.FALSE); res = (KieCompilationResponse) compiler.compile(req); logger.info("\nFinished " + res.isSuccessful() + " all Metadata tmp:" + tmp + " UUID:" + req.getRequestUUID() + " res.getMavenOutput().isEmpty():" + res.getMavenOutput().isEmpty()); if (!res.isSuccessful()) { try { <START> logger.error("writing output on target folder:" + tmp); <END> TestUtil.writeMavenOutputIntoTargetFolder(tmp, res.getMavenOutput(), "ConcurrentBuildTest.compileAndLoadKieJarMetadataAllResourcesPackagedJar_" + req.getRequestUUID()); } catch (Exception e) { logger.error(e.getMessage()); } } } finally { latch.countDown(); } return res; }</code><technical_language>logger.error("Writing output target folder: {}" + tmp); this is missing {}</technical_language>

Target:
private KieCompilationResponse compileAndLoadKieJarMetadataAllResourcesPackagedJar() { String alternateSettingsAbsPath = TestUtilMaven.getSettingsFile(); Path tmpRoot = Files.createTempDirectory("repo_" + UUID.randomUUID().toString()); Path tmp = Files.createDirectories(Paths.get(tmpRoot.toString(), "dummy")); try { TestUtil.copyTree(Paths.get(ResourcesConstants.KJAR_2_ALL_RESOURCES), tmp); } catch (Exception e) { logger.error(e.getMessage()); } final AFCompiler compiler = KieMavenCompilerFactory.getCompiler(EnumSet.of(KieDecorator.STORE_KIE_OBJECTS, KieDecorator.ENABLE_LOGGING)); final KieCompilationResponse res; try { final WorkspaceCompilationInfo info = new WorkspaceCompilationInfo(tmp); final CompilationRequest req = new DefaultCompilationRequest(mavenRepoPath, info, new String[]{ MavenCLIArgs.COMPILE, MavenCLIArgs.ALTERNATE_USER_SETTINGS + alternateSettingsAbsPath }, Boolean.FALSE); res = (KieCompilationResponse) compiler.compile(req); logger.info("\nFinished " + res.isSuccessful() + " all Metadata tmp:{} UUID:{} res.getMavenOutput().isEmpty():{}", tmp , req.getRequestUUID(), res.getMavenOutput().isEmpty()); if (!res.isSuccessful()) { try { logger.error("writing output on target folder:{}", tmp); TestUtil.writeMavenOutputIntoTargetFolder(tmp, res.getMavenOutput(), "ConcurrentBuildTest.compileAndLoadKieJarMetadataAllResourcesPackagedJar_" + req.getRequestUUID()); } catch (Exception e) { logger.error(e.getMessage()); } } } finally { latch.countDown(); } return res; }
Source:
<code>@Override public ClientProtos.GetResponse get(RpcController controller, ClientProtos.GetRequest request) throws ServiceException { try { if (doDelay) { Thread.sleep(DELAY_GET); } } catch (InterruptedException e) { <START> LOG.error("Sleep interrupted during get operation", e); <END> } return super.get(controller, request); }</code><technical_language>this class logger</technical_language>

Target:
@Override public ClientProtos.GetResponse get(RpcController controller, ClientProtos.GetRequest request) throws ServiceException { try { if (doDelay) { Thread.sleep(DELAY_GET); } } catch (InterruptedException e) { LOGGER.error("Sleep interrupted during get operation", e); } return super.get(controller, request); }
Source:
<code>public KafkaRecordSupplier( Map<String, Object> consumerProperties, ObjectMapper sortingMapper ) { this.consumerProperties = consumerProperties; this.sortingMapper = sortingMapper; this.consumer = getKafkaConsumer(); <START> } <END></code><technical_language>original constructor delegate new one, i.e.: java public KafkaRecordSupplier( Map<String, Object> consumerProperties, ObjectMapper sortingMapper ) { this(consumerProperties, sortingMapper, getKafkaConsumer()); }</technical_language>

Target:
public KafkaRecordSupplier( Map<String, Object> consumerProperties, ObjectMapper sortingMapper ) { this(consumerProperties, sortingMapper, getKafkaConsumer(sortingMapper, consumerProperties)); }
Source:
<code><START> public static void writeIgniteUuid(ByteBuffer buf, IgniteUuid uuid) { <END> buf.putLong(uuid.globalId().getMostSignificantBits()); buf.putLong(uuid.globalId().getLeastSignificantBits()); buf.putLong(uuid.localId()); }</code><technical_language>This method private</technical_language>

Target:
static void writeIgniteUuid(ByteBuffer buf, IgniteUuid uuid) { buf.putLong(uuid.globalId().getMostSignificantBits()); buf.putLong(uuid.globalId().getLeastSignificantBits()); buf.putLong(uuid.localId()); }
Source:
<code><START> public List<Object> getAllCombo(List<Multimap<List<Object>, Object>> accu) <END> { List<Object> result = new ArrayList<>(); int leftStreamIndex = getLeftStreamIndex(); Multimap<List<Object>, Object> leftStream = accu.get(leftStreamIndex); Multimap<List<Object>, Object> rightStream = ArrayListMultimap.create(accu.get((leftStreamIndex + 1) % 2)); Map<String,PojoUtils.Getter> leftGettersStream = leftStreamIndex == 0 ? gettersStream1 : gettersStream2; Map<String,PojoUtils.Getter> rightGettersStream = leftStreamIndex == 1 ? gettersStream1 : gettersStream2; for (List lMap : leftStream.keySet()) { Collection<Object> left = leftStream.get(lMap); if (rightStream.containsKey(lMap)) { Collection<Object> right = rightStream.get(lMap); Object o; try { o = outClass.newInstance(); } catch (Throwable e) { throw Throwables.propagate(e); } for (Object lObj:left) { for (Object rObj:right) { setObjectForResult(leftGettersStream, lObj,o); setObjectForResult(rightGettersStream, rObj,o); } result.add(o); } rightStream.removeAll(lMap); } else { addNonMatchingResult(left, leftGettersStream, result); } } addNonMatchingRightStream(rightStream, rightGettersStream, result); return result; }</code><technical_language>For sake of readers of this accumulation, describe logic in this method handles case of joins</technical_language>

Target:
private List<Object> getAllCombo(List<Multimap<List<Object>, Object>> accu) { List<Object> result = new ArrayList<>(); int leftStreamIndex = getLeftStreamIndex(); Multimap<List<Object>, Object> leftStream = accu.get(leftStreamIndex); Multimap<List<Object>, Object> rightStream = ArrayListMultimap.create(accu.get((leftStreamIndex + 1) % 2)); Map<String,PojoUtils.Getter> leftGettersStream = leftStreamIndex == 0 ? gettersStream1 : gettersStream2; Map<String,PojoUtils.Getter> rightGettersStream = leftStreamIndex == 1 ? gettersStream1 : gettersStream2; for (List lMap : leftStream.keySet()) { Collection<Object> left = leftStream.get(lMap); if (rightStream.containsKey(lMap)) { Collection<Object> right = rightStream.get(lMap); Object o; try { o = outClass.newInstance(); } catch (Throwable e) { throw Throwables.propagate(e); } for (Object lObj:left) { for (Object rObj:right) { setObjectForResult(leftGettersStream, lObj,o); setObjectForResult(rightGettersStream, rObj,o); } result.add(o); } rightStream.removeAll(lMap); } else { addNonMatchingResult(left, leftGettersStream, result); } } addNonMatchingRightStream(rightStream, rightGettersStream, result); return result; }
Source:
<code>private static ResourceMapping getResourceMapping(Object o) { if (o instanceof ResourceMapping) return (ResourceMapping) o; if (o instanceof IAdaptable) { IAdaptable adaptable = (IAdaptable) o; Object adapted = adaptable.getAdapter(ResourceMapping.class); <START> if (adapted instanceof ResourceMapping) { <END> return (ResourceMapping) adapted; } adapted = adaptable.getAdapter(IContributorResourceAdapter.class); if (adapted instanceof IContributorResourceAdapter2) { IContributorResourceAdapter2 cra = (IContributorResourceAdapter2) adapted; return cra.getAdaptedResourceMapping(adaptable); } } else { Object adapted = Platform.getAdapterManager().getAdapter(o, ResourceMapping.class); if (adapted instanceof ResourceMapping) { return (ResourceMapping) adapted; } } return null; }</code><technical_language>style nit: braces for single line block</technical_language>

Target:
private static ResourceMapping getResourceMapping(Object o) { if (o instanceof ResourceMapping) return (ResourceMapping) o; if (o instanceof IAdaptable) { IAdaptable adaptable = (IAdaptable) o; Object adapted = adaptable.getAdapter(ResourceMapping.class); if (adapted instanceof ResourceMapping) return (ResourceMapping) adapted; adapted = adaptable.getAdapter(IContributorResourceAdapter.class); if (adapted instanceof IContributorResourceAdapter2) { IContributorResourceAdapter2 cra = (IContributorResourceAdapter2) adapted; return cra.getAdaptedResourceMapping(adaptable); } } else { Object adapted = Platform.getAdapterManager().getAdapter(o, ResourceMapping.class); if (adapted instanceof ResourceMapping) return (ResourceMapping) adapted; } return null; }
Source:
<code>public static List<AbstractInstance> loadMoboDataset() throws IOException { final BufferedReader br = new BufferedReader(new InputStreamReader((new GZIPInputStream(Benchmarks.class.getResourceAsStream("mobo1.json.gz"))))); final List<AbstractInstance> instances = Lists.newLinkedList(); int count = 0; while (true) { count++; final String line = br.readLine(); if (line == null) { break; } final JSONObject jo = (JSONObject) JSONValue.parse(line); final HashMapAttributes a = new HashMapAttributes(); a.putAll((JSONObject) jo.get("attributes")); <START> AbstractInstance instance = new Instance(a, ((String) jo.get("output")).equals("none") ? "none" : "notNone"); <END> instances.add(instance); } return instances; }</code><technical_language>break this line explanatory variables clearer on</technical_language>

Target:
public static List<AbstractInstance> loadMoboDataset() throws IOException { final BufferedReader br = new BufferedReader(new InputStreamReader((new GZIPInputStream(Benchmarks.class.getResourceAsStream("mobo1.json.gz"))))); final List<AbstractInstance> instances = Lists.newLinkedList(); int count = 0; while (true) { count++; final String line = br.readLine(); if (line == null) { break; } final JSONObject jo = (JSONObject) JSONValue.parse(line); final HashMapAttributes a = new HashMapAttributes(); a.putAll((JSONObject) jo.get("attributes")); String binaryClassification = ((String) jo.get("output")).equals("none") ? "none" : "notNone"; AbstractInstance instance = new Instance(a, binaryClassification); instances.add(instance); } return instances; }
Source:
<code>private boolean satisfiesCpuUtilizationCriteria() { final double maxCpuUtilizationConfig = this.azkabanProps. getDouble(ConfigurationKeys.AZKABAN_POLLING_CRITERIA_MAX_CPU_UTILIZATION_PCT, 100); if (maxCpuUtilizationConfig <= 0 || maxCpuUtilizationConfig >= 100) { return true; } final double cpuLoad = this.cpuUtil.getCpuLoad(); <START> return (cpuLoad == -1) ? true : cpuLoad < maxCpuUtilizationConfig; <END> }</code><technical_language>Consider Double.compare() instead of == compare double values</technical_language>

Target:
private boolean satisfiesCpuUtilizationCriteria() { final double maxCpuUtilizationConfig = this.azkabanProps. getDouble(ConfigurationKeys.AZKABAN_POLLING_CRITERIA_MAX_CPU_UTILIZATION_PCT, 100); if (maxCpuUtilizationConfig <= 0 || maxCpuUtilizationConfig >= 100) { return true; } final double cpuLoad = this.cpuUtil.getCpuLoad(); if (cpuLoad == -1) { return true; } final boolean cpuLoadWithinParams = cpuLoad < maxCpuUtilizationConfig; if (this.isCpuLoadUnderMax != cpuLoadWithinParams) { this.isCpuLoadUnderMax = cpuLoadWithinParams; if (cpuLoadWithinParams) { FlowRunnerManager.logger.info("Polling criteria satisfied: Cpu utilization (" + cpuLoad + "%)."); } else { FlowRunnerManager.logger.info("Polling criteria NOT satisfied: Cpu utilization (" + cpuLoad + "%)."); } } return cpuLoadWithinParams; }
Source:
<code>protected void drawIconText() { final String allegedIconFontName = FontFactory.getIconFont().getFontData()[0].getName(); <START> if(Display.getDefault().getFontList(allegedIconFontName, true).length > 0){ <END> renderIconText(); } else { log.warning("Problem loading icon font. Fallback font may not contain matching glyphs."); } }</code><technical_language>cleaner wrap this in FontFactory, isFontLoaded</technical_language>

Target:
protected void drawIconText() { final int spacing = textSize.y > 0 ? style.getSpacing() : 0; Font font; Rectangle bounds; if (FontFactory.checkIfFontLoaded(FontFactory.getIconFont())) { AdvancedScope scope = AdvancedGC.advancedScope(gc, !isWindows7()); if (isIconDropShadowStyle(style.getButtonEffects())) { for (TextIcon icon : button.getTextIcons()) { font = FontFactory.getIconFont(icon.getFontSize()); bounds = getIconTextBounds(icon, size.x, size.y, textSize, spacing); drawTextAtLocation(gc, icon.getText(), font, getForegroundColor(icon.getColorLabel(), ButtonColorEffect.DARKEN), bounds.x + SHADOW_OFFSET, bounds.y + SHADOW_OFFSET); } } for (TextIcon icon : button.getTextIcons()) { font = FontFactory.getIconFont(icon.getFontSize()); bounds = getIconTextBounds(icon, size.x, size.y, textSize, spacing); drawTextAtLocation(gc, icon.getText(), font, getForegroundColor(icon.getColorLabel(), style.getButtonColorEffect()), bounds.x, bounds.y); } scope.complete(); } }
Source:
<code>public ResultHandlingInterceptorMember(MessageHandlingMember<T> original, Class<?> expectedResultType) { super(original); this.expectedResultType = expectedResultType; Method method = original.unwrap(Method.class).orElseThrow(() -> new AxonConfigurationException( <START> "The @ExceptionHandler must be on method.")); <END> boolean declaredInterceptorChain = Arrays.stream(method.getParameters()) .anyMatch(p -> p.getType().equals(InterceptorChain.class)); if (declaredInterceptorChain) { throw new AxonConfigurationException("@ExceptionHandler annotated methods should not delare an InterceptorChain parameter"); } }</code><technical_language>I this exception a @ResultHandler annotation, is verified in MessageHandlerInterceptorDefinition#wrapHandler method</technical_language>

Target:
public ResultHandlingInterceptorMember(MessageHandlingMember<T> original, Class<?> expectedResultType) { super(original); this.expectedResultType = expectedResultType; Method method = original.unwrap(Method.class).orElseThrow(() -> new AxonConfigurationException( "Only methods can be marked as MessageHandlerInterceptor. Violating handler: " + original.signature())); boolean declaredInterceptorChain = Arrays.stream(method.getParameters()) .anyMatch(p -> p.getType().equals(InterceptorChain.class)); if (declaredInterceptorChain) { throw new AxonConfigurationException("A MessageHandlerInterceptor acting on the invocation result must not declare a parameter of type InterceptorChain. Violating handler: " + original.signature()); } }