Program: 5904
Project: 5904
Buggy source:
@Test public void testJoin() throws Exception {
  Schema inputSchema1=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)));
  Schema inputSchema2=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.LONG)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)));
  Schema inputSchema3=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)));
  Schema outSchema1=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.LONG)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)));
  Schema outSchema2=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.STRING))),Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.STRING))),Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.STRING))),Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.STRING))),Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.STRING))),Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.STRING))),Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.LONG))),Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.STRING))),Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.STRING))));
  StructuredRecord recordSamuel=StructuredRecord.builder(inputSchema1).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord recordBob=StructuredRecord.builder(inputSchema1).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord recordJane=StructuredRecord.builder(inputSchema1).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord recordCar=StructuredRecord.builder(inputSchema2).set("String_Node_Str","String_Node_Str").set("String_Node_Str",10000L).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord recordBike=StructuredRecord.builder(inputSchema2).set("String_Node_Str","String_Node_Str").set("String_Node_Str",100L).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord recordTrasCar=StructuredRecord.builder(inputSchema3).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord recordTrasBike=StructuredRecord.builder(inputSchema3).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord recordTrasPlane=StructuredRecord.builder(inputSchema3).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  List<StructuredRecord> input1=ImmutableList.of(recordSamuel,recordBob,recordJane);
  List<StructuredRecord> input2=ImmutableList.of(recordCar,recordBike);
  List<StructuredRecord> input3=ImmutableList.of(recordTrasCar,recordTrasBike,recordTrasPlane);
  String outputName="String_Node_Str";
  DataStreamsConfig etlConfig=DataStreamsConfig.builder().addStage(new ETLStage("String_Node_Str",MockSource.getPlugin(inputSchema1,input1))).addStage(new ETLStage("String_Node_Str",MockSource.getPlugin(inputSchema2,input2))).addStage(new ETLStage("String_Node_Str",MockSource.getPlugin(inputSchema3,input3))).addStage(new ETLStage("String_Node_Str",FieldsPrefixTransform.getPlugin("String_Node_Str",inputSchema1.toString()))).addStage(new ETLStage("String_Node_Str",FieldsPrefixTransform.getPlugin("String_Node_Str",inputSchema2.toString()))).addStage(new ETLStage("String_Node_Str",FieldsPrefixTransform.getPlugin("String_Node_Str",inputSchema3.toString()))).addStage(new ETLStage("String_Node_Str",FieldsPrefixTransform.getPlugin("String_Node_Str",outSchema1.toString()))).addStage(new ETLStage("String_Node_Str",MockJoiner.getPlugin("String_Node_Str","String_Node_Str","String_Node_Str"))).addStage(new ETLStage("String_Node_Str",MockJoiner.getPlugin("String_Node_Str","String_Node_Str","String_Node_Str"))).addStage(new ETLStage("String_Node_Str",MockSink.getPlugin(outputName))).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").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").setBatchInterval("String_Node_Str").build();
  AppRequest<DataStreamsConfig> appRequest=new AppRequest<>(APP_ARTIFACT,etlConfig);
  Id.Application appId=Id.Application.from(Id.Namespace.DEFAULT,"String_Node_Str");
  ApplicationManager appManager=deployApplication(appId,appRequest);
  SparkManager sparkManager=appManager.getSparkManager(DataStreamsSparkLauncher.NAME);
  sparkManager.start();
  sparkManager.waitForStatus(true,10,1);
  StructuredRecord joinRecordSamuel=StructuredRecord.builder(outSchema2).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str",10000L).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord joinRecordJane=StructuredRecord.builder(outSchema2).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str",100L).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord joinRecordPlane=StructuredRecord.builder(outSchema2).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  final Set<StructuredRecord> expected=ImmutableSet.of(joinRecordSamuel,joinRecordJane,joinRecordPlane);
  final DataSetManager<Table> outputManager=getDataset(outputName);
  Tasks.waitFor(true,new Callable<Boolean>(){
    @Override public Boolean call() throws Exception {
      outputManager.flush();
      Set<StructuredRecord> outputRecords=new HashSet<>();
      outputRecords.addAll(MockSink.readOutput(outputManager));
      return expected.equals(outputRecords);
    }
  }
,4,TimeUnit.MINUTES);
  sparkManager.stop();
  sparkManager.waitForStatus(false,10,1);
}

Fixed version (ground truth):
@Test public void testJoin() throws Exception {
  Schema inputSchema1=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)));
  Schema inputSchema2=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.LONG)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)));
  Schema inputSchema3=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)));
  Schema outSchema1=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.LONG)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)),Schema.Field.of("String_Node_Str",Schema.of(Schema.Type.STRING)));
  Schema outSchema2=Schema.recordOf("String_Node_Str",Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.STRING))),Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.STRING))),Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.STRING))),Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.STRING))),Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.STRING))),Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.STRING))),Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.LONG))),Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.STRING))),Schema.Field.of("String_Node_Str",Schema.nullableOf(Schema.of(Schema.Type.STRING))));
  StructuredRecord recordSamuel=StructuredRecord.builder(inputSchema1).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord recordBob=StructuredRecord.builder(inputSchema1).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord recordJane=StructuredRecord.builder(inputSchema1).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord recordCar=StructuredRecord.builder(inputSchema2).set("String_Node_Str","String_Node_Str").set("String_Node_Str",10000L).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord recordBike=StructuredRecord.builder(inputSchema2).set("String_Node_Str","String_Node_Str").set("String_Node_Str",100L).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord recordTrasCar=StructuredRecord.builder(inputSchema3).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord recordTrasBike=StructuredRecord.builder(inputSchema3).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord recordTrasPlane=StructuredRecord.builder(inputSchema3).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  List<StructuredRecord> input1=ImmutableList.of(recordSamuel,recordBob,recordJane);
  List<StructuredRecord> input2=ImmutableList.of(recordCar,recordBike);
  List<StructuredRecord> input3=ImmutableList.of(recordTrasCar,recordTrasBike,recordTrasPlane);
  String outputName="String_Node_Str";
  DataStreamsConfig etlConfig=DataStreamsConfig.builder().addStage(new ETLStage("String_Node_Str",MockSource.getPlugin(inputSchema1,input1))).addStage(new ETLStage("String_Node_Str",MockSource.getPlugin(inputSchema2,input2))).addStage(new ETLStage("String_Node_Str",MockSource.getPlugin(inputSchema3,input3))).addStage(new ETLStage("String_Node_Str",FieldsPrefixTransform.getPlugin("String_Node_Str",inputSchema1.toString()))).addStage(new ETLStage("String_Node_Str",FieldsPrefixTransform.getPlugin("String_Node_Str",inputSchema2.toString()))).addStage(new ETLStage("String_Node_Str",FieldsPrefixTransform.getPlugin("String_Node_Str",inputSchema3.toString()))).addStage(new ETLStage("String_Node_Str",FieldsPrefixTransform.getPlugin("String_Node_Str",outSchema1.toString()))).addStage(new ETLStage("String_Node_Str",MockJoiner.getPlugin("String_Node_Str","String_Node_Str","String_Node_Str"))).addStage(new ETLStage("String_Node_Str",MockJoiner.getPlugin("String_Node_Str","String_Node_Str","String_Node_Str"))).addStage(new ETLStage("String_Node_Str",MockSink.getPlugin(outputName))).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").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").addConnection("String_Node_Str","String_Node_Str").setBatchInterval("String_Node_Str").build();
  AppRequest<DataStreamsConfig> appRequest=new AppRequest<>(APP_ARTIFACT,etlConfig);
  Id.Application appId=Id.Application.from(Id.Namespace.DEFAULT,"String_Node_Str");
  ApplicationManager appManager=deployApplication(appId,appRequest);
  SparkManager sparkManager=appManager.getSparkManager(DataStreamsSparkLauncher.NAME);
  sparkManager.start();
  sparkManager.waitForStatus(true,10,1);
  StructuredRecord joinRecordSamuel=StructuredRecord.builder(outSchema2).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str",10000L).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord joinRecordJane=StructuredRecord.builder(outSchema2).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str",100L).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  StructuredRecord joinRecordPlane=StructuredRecord.builder(outSchema2).set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").set("String_Node_Str","String_Node_Str").build();
  final Set<StructuredRecord> expected=ImmutableSet.of(joinRecordSamuel,joinRecordJane,joinRecordPlane);
  final DataSetManager<Table> outputManager=getDataset(outputName);
  Tasks.waitFor(true,new Callable<Boolean>(){
    @Override public Boolean call() throws Exception {
      outputManager.flush();
      Set<StructuredRecord> outputRecords=new HashSet<>();
      outputRecords.addAll(MockSink.readOutput(outputManager));
      return expected.equals(outputRecords);
    }
  }
,4,TimeUnit.MINUTES);
  sparkManager.stop();
  sparkManager.waitForStatus(false,10,1);
  validateMetric(appId,"String_Node_Str",3);
  validateMetric(appId,"String_Node_Str",2);
  validateMetric(appId,"String_Node_Str",3);
  validateMetric(appId,"String_Node_Str",3);
  validateMetric(appId,"String_Node_Str",3);
  validateMetric(appId,"String_Node_Str",2);
  validateMetric(appId,"String_Node_Str",2);
  validateMetric(appId,"String_Node_Str",3);
  validateMetric(appId,"String_Node_Str",3);
  validateMetric(appId,"String_Node_Str",2);
  validateMetric(appId,"String_Node_Str",2);
  validateMetric(appId,"String_Node_Str",5);
  validateMetric(appId,"String_Node_Str",2);
  validateMetric(appId,"String_Node_Str",5);
  validateMetric(appId,"String_Node_Str",3);
  validateMetric(appId,"String_Node_Str",3);
}