Program: 5690
Project: 5690
Buggy source:
@Test public void testDAG() throws Exception {
  Schema schema=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.INT)));
  StructuredRecord record1=StructuredRecord.builder(schema).set("String_Node_Str",1).build();
  StructuredRecord record2=StructuredRecord.builder(schema).set("String_Node_Str",2).build();
  StructuredRecord record3=StructuredRecord.builder(schema).set("String_Node_Str",3).build();
  List<StructuredRecord> input=ImmutableList.of(record1,record2,record3);
  File sink1Out=TMP_FOLDER.newFolder();
  File sink2Out=TMP_FOLDER.newFolder();
  ETLRealtimeConfig etlConfig=ETLRealtimeConfig.builder().addStage(new ETLStage("String_Node_Str",MockSource.getPlugin(input))).addStage(new ETLStage("String_Node_Str",MockSink.getPlugin(sink1Out))).addStage(new ETLStage("String_Node_Str",MockSink.getPlugin(sink2Out))).addStage(new ETLStage("String_Node_Str",IntValueFilterTransform.getPlugin("String_Node_Str",2))).addStage(new ETLStage("String_Node_Str",DoubleTransform.getPlugin())).addStage(new ETLStage("String_Node_Str",IdentityTransform.getPlugin())).addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").build();
  Id.Application appId=Id.Application.from(Id.Namespace.DEFAULT,"String_Node_Str");
  AppRequest<ETLRealtimeConfig> appRequest=new AppRequest<>(APP_ARTIFACT,etlConfig);
  ApplicationManager appManager=deployApplication(appId,appRequest);
  Assert.assertNotNull(appManager);
  WorkerManager workerManager=appManager.getWorkerManager(ETLWorker.NAME);
  workerManager.start();
  workerManager.waitForStatus(true,10,1);
  try {
    List<StructuredRecord> sink1output=MockSink.getRecords(sink1Out,0,10,TimeUnit.SECONDS);
    List<StructuredRecord> sink1expected=ImmutableList.of(record1,record3);
    Assert.assertEquals(sink1expected,sink1output);
    List<StructuredRecord> sink2output=MockSink.getRecords(sink2Out,0,10,TimeUnit.SECONDS);
    Assert.assertEquals(9,sink2output.size());
  }
  finally {
    stopWorker(workerManager);
  }
  validateMetric(3,appId,"String_Node_Str");
  validateMetric(3,appId,"String_Node_Str");
  validateMetric(2,appId,"String_Node_Str");
  validateMetric(3,appId,"String_Node_Str");
  validateMetric(6,appId,"String_Node_Str");
  validateMetric(3,appId,"String_Node_Str");
  validateMetric(3,appId,"String_Node_Str");
  validateMetric(2,appId,"String_Node_Str");
  validateMetric(9,appId,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testDAG() throws Exception {
  Schema schema=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.INT)));
  StructuredRecord record1=StructuredRecord.builder(schema).set("String_Node_Str",1).build();
  StructuredRecord record2=StructuredRecord.builder(schema).set("String_Node_Str",2).build();
  StructuredRecord record3=StructuredRecord.builder(schema).set("String_Node_Str",3).build();
  List<StructuredRecord> input=ImmutableList.of(record1,record2,record3);
  File sink1Out=TMP_FOLDER.newFolder();
  File sink2Out=TMP_FOLDER.newFolder();
  ETLRealtimeConfig etlConfig=ETLRealtimeConfig.builder().addStage(new ETLStage("String_Node_Str",MockSource.getPlugin(input))).addStage(new ETLStage("String_Node_Str",MockSink.getPlugin(sink1Out))).addStage(new ETLStage("String_Node_Str",MockSink.getPlugin(sink2Out))).addStage(new ETLStage("String_Node_Str",IntValueFilterTransform.getPlugin("String_Node_Str",2))).addStage(new ETLStage("String_Node_Str",DoubleTransform.getPlugin())).addStage(new ETLStage("String_Node_Str",IdentityTransform.getPlugin())).addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").build();
  ApplicationId appId=NamespaceId.DEFAULT.app("String_Node_Str");
  AppRequest<ETLRealtimeConfig> appRequest=new AppRequest<>(APP_ARTIFACT,etlConfig);
  ApplicationManager appManager=deployApplication(appId,appRequest);
  Assert.assertNotNull(appManager);
  WorkerManager workerManager=appManager.getWorkerManager(ETLWorker.NAME);
  workerManager.start();
  workerManager.waitForStatus(true,10,1);
  try {
    List<StructuredRecord> sink1output=MockSink.getRecords(sink1Out,0,10,TimeUnit.SECONDS);
    List<StructuredRecord> sink1expected=ImmutableList.of(record1,record3);
    Assert.assertEquals(sink1expected,sink1output);
    List<StructuredRecord> sink2output=MockSink.getRecords(sink2Out,0,10,TimeUnit.SECONDS);
    Assert.assertEquals(9,sink2output.size());
  }
  finally {
    stopWorker(workerManager);
  }
  validateMetric(3,appId,"String_Node_Str");
  validateMetric(3,appId,"String_Node_Str");
  validateMetric(2,appId,"String_Node_Str");
  validateMetric(3,appId,"String_Node_Str");
  validateMetric(6,appId,"String_Node_Str");
  validateMetric(3,appId,"String_Node_Str");
  validateMetric(3,appId,"String_Node_Str");
  validateMetric(2,appId,"String_Node_Str");
  validateMetric(9,appId,"String_Node_Str");
}