Program: 5717
Project: 5717
Buggy source:
public void testWordCount(String pluginType) throws Exception {
  String inputName="String_Node_Str" + pluginType;
  String outputName="String_Node_Str" + pluginType;
  ETLStage source=new ETLStage("String_Node_Str",MockSource.getPlugin(inputName));
  ETLStage sink=new ETLStage("String_Node_Str",MockSink.getPlugin(outputName));
  Map<String,String> aggProperties=new HashMap<>();
  aggProperties.put("String_Node_Str","String_Node_Str");
  ETLStage agg=new ETLStage("String_Node_Str",new ETLPlugin("String_Node_Str",pluginType,aggProperties,null));
  ETLBatchConfig pipelineConfig=ETLBatchConfig.builder("String_Node_Str").addStage(source).addStage(sink).addStage(agg).addConnection(source.getName(),agg.getName()).addConnection(agg.getName(),sink.getName()).build();
  Id.Application pipelineId=Id.Application.from(Id.Namespace.DEFAULT,"String_Node_Str" + pluginType);
  ApplicationManager appManager=deployApplication(pipelineId,new AppRequest<>(APP_ARTIFACT,pipelineConfig));
  Schema inputSchema=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)));
  DataSetManager<Table> inputManager=getDataset(inputName);
  List<StructuredRecord> inputRecords=new ArrayList<>();
  inputRecords.add(StructuredRecord.builder(inputSchema).set("String_Node_Str","String_Node_Str").build());
  inputRecords.add(StructuredRecord.builder(inputSchema).set("String_Node_Str","String_Node_Str").build());
  inputRecords.add(StructuredRecord.builder(inputSchema).set("String_Node_Str","String_Node_Str").build());
  MockSource.writeInput(inputManager,inputRecords);
  WorkflowManager workflowManager=appManager.getWorkflowManager(SmartWorkflow.NAME);
  workflowManager.start();
  workflowManager.waitForFinish(4,TimeUnit.MINUTES);
  DataSetManager<Table> outputManager=getDataset(outputName);
  Set<StructuredRecord> outputRecords=new HashSet<>();
  outputRecords.addAll(MockSink.readOutput(outputManager));
  Set<StructuredRecord> expected=new HashSet<>();
  expected.add(StructuredRecord.builder(WordCountAggregator.OUTPUT_SCHEMA).set("String_Node_Str","String_Node_Str").set("String_Node_Str",3L).build());
  expected.add(StructuredRecord.builder(WordCountAggregator.OUTPUT_SCHEMA).set("String_Node_Str","String_Node_Str").set("String_Node_Str",1L).build());
  expected.add(StructuredRecord.builder(WordCountAggregator.OUTPUT_SCHEMA).set("String_Node_Str","String_Node_Str").set("String_Node_Str",2L).build());
  expected.add(StructuredRecord.builder(WordCountAggregator.OUTPUT_SCHEMA).set("String_Node_Str","String_Node_Str").set("String_Node_Str",2L).build());
  expected.add(StructuredRecord.builder(WordCountAggregator.OUTPUT_SCHEMA).set("String_Node_Str","String_Node_Str").set("String_Node_Str",2L).build());
  expected.add(StructuredRecord.builder(WordCountAggregator.OUTPUT_SCHEMA).set("String_Node_Str","String_Node_Str").set("String_Node_Str",1L).build());
  expected.add(StructuredRecord.builder(WordCountAggregator.OUTPUT_SCHEMA).set("String_Node_Str","String_Node_Str").set("String_Node_Str",1L).build());
  Assert.assertEquals(expected,outputRecords);
}

Fixed version (ground truth):
public void testWordCount(String pluginType) throws Exception {
  String inputName="String_Node_Str" + pluginType;
  String outputName="String_Node_Str" + pluginType;
  ETLStage source=new ETLStage("String_Node_Str",MockSource.getPlugin(inputName));
  ETLStage sink=new ETLStage("String_Node_Str",MockSink.getPlugin(outputName));
  Map<String,String> aggProperties=new HashMap<>();
  aggProperties.put("String_Node_Str","String_Node_Str");
  ETLStage agg=new ETLStage("String_Node_Str",new ETLPlugin("String_Node_Str",pluginType,aggProperties,null));
  ETLBatchConfig pipelineConfig=ETLBatchConfig.builder("String_Node_Str").addStage(source).addStage(sink).addStage(agg).addConnection(source.getName(),agg.getName()).addConnection(agg.getName(),sink.getName()).build();
  ApplicationId pipelineId=NamespaceId.DEFAULT.app("String_Node_Str" + pluginType);
  ApplicationManager appManager=deployApplication(pipelineId,new AppRequest<>(APP_ARTIFACT,pipelineConfig));
  Schema inputSchema=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)));
  DataSetManager<Table> inputManager=getDataset(inputName);
  List<StructuredRecord> inputRecords=new ArrayList<>();
  inputRecords.add(StructuredRecord.builder(inputSchema).set("String_Node_Str","String_Node_Str").build());
  inputRecords.add(StructuredRecord.builder(inputSchema).set("String_Node_Str","String_Node_Str").build());
  inputRecords.add(StructuredRecord.builder(inputSchema).set("String_Node_Str","String_Node_Str").build());
  MockSource.writeInput(inputManager,inputRecords);
  WorkflowManager workflowManager=appManager.getWorkflowManager(SmartWorkflow.NAME);
  workflowManager.start();
  workflowManager.waitForFinish(4,TimeUnit.MINUTES);
  DataSetManager<Table> outputManager=getDataset(outputName);
  Set<StructuredRecord> outputRecords=new HashSet<>();
  outputRecords.addAll(MockSink.readOutput(outputManager));
  Set<StructuredRecord> expected=new HashSet<>();
  expected.add(StructuredRecord.builder(WordCountAggregator.OUTPUT_SCHEMA).set("String_Node_Str","String_Node_Str").set("String_Node_Str",3L).build());
  expected.add(StructuredRecord.builder(WordCountAggregator.OUTPUT_SCHEMA).set("String_Node_Str","String_Node_Str").set("String_Node_Str",1L).build());
  expected.add(StructuredRecord.builder(WordCountAggregator.OUTPUT_SCHEMA).set("String_Node_Str","String_Node_Str").set("String_Node_Str",2L).build());
  expected.add(StructuredRecord.builder(WordCountAggregator.OUTPUT_SCHEMA).set("String_Node_Str","String_Node_Str").set("String_Node_Str",2L).build());
  expected.add(StructuredRecord.builder(WordCountAggregator.OUTPUT_SCHEMA).set("String_Node_Str","String_Node_Str").set("String_Node_Str",2L).build());
  expected.add(StructuredRecord.builder(WordCountAggregator.OUTPUT_SCHEMA).set("String_Node_Str","String_Node_Str").set("String_Node_Str",1L).build());
  expected.add(StructuredRecord.builder(WordCountAggregator.OUTPUT_SCHEMA).set("String_Node_Str","String_Node_Str").set("String_Node_Str",1L).build());
  Assert.assertEquals(expected,outputRecords);
}