Program: 6441
Project: 6441
Buggy source:
@Test public void testFiletoMultipleTPFS() throws Exception {
  String filePath="String_Node_Str";
  String testData="String_Node_Str";
  Path textFile=new Path(filePath);
  Configuration conf=new Configuration();
  FileSystem fs=FileSystem.get(conf);
  FSDataOutputStream writeData=fs.create(textFile);
  writeData.write(testData.getBytes());
  writeData.flush();
  writeData.close();
  ETLStage source=new ETLStage("String_Node_Str",ImmutableMap.<String,String>builder().put(Properties.File.FILESYSTEM,"String_Node_Str").put(Properties.File.PATH,filePath).build());
  ETLStage sink1=new ETLStage("String_Node_Str",ImmutableMap.of(Properties.TimePartitionedFileSetDataset.SCHEMA,FileBatchSource.DEFAULT_SCHEMA.toString(),Properties.TimePartitionedFileSetDataset.TPFS_NAME,"String_Node_Str"));
  ETLStage sink2=new ETLStage("String_Node_Str",ImmutableMap.of(Properties.TimePartitionedFileSetDataset.SCHEMA,FileBatchSource.DEFAULT_SCHEMA.toString(),Properties.TimePartitionedFileSetDataset.TPFS_NAME,"String_Node_Str"));
  ETLBatchConfig etlConfig=new ETLBatchConfig("String_Node_Str",source,Lists.newArrayList(sink1,sink2),Lists.<ETLStage>newArrayList(),new Resources(),Lists.<ETLStage>newArrayList());
  AppRequest<ETLBatchConfig> appRequest=new AppRequest<>(ETLBATCH_ARTIFACT,etlConfig);
  Id.Application appId=Id.Application.from(Id.Namespace.DEFAULT,"String_Node_Str");
  ApplicationManager appManager=deployApplication(appId,appRequest);
  MapReduceManager mrManager=appManager.getMapReduceManager(ETLMapReduce.NAME);
  mrManager.start();
  mrManager.waitForFinish(2,TimeUnit.MINUTES);
  for (  String sinkName : new String[]{"String_Node_Str","String_Node_Str"}) {
    DataSetManager<TimePartitionedFileSet> fileSetManager=getDataset(sinkName);
    TimePartitionedFileSet fileSet=fileSetManager.get();
    List<GenericRecord> records=readOutput(fileSet,FileBatchSource.DEFAULT_SCHEMA);
    Assert.assertEquals(1,records.size());
    Assert.assertEquals(testData,records.get(0).get("String_Node_Str").toString());
    fileSet.close();
  }
}

Fixed version (ground truth):
@Test public void testFiletoMultipleTPFS() throws Exception {
  String filePath="String_Node_Str";
  String testData="String_Node_Str";
  Path textFile=new Path(filePath);
  Configuration conf=new Configuration();
  FileSystem fs=FileSystem.get(conf);
  FSDataOutputStream writeData=fs.create(textFile);
  writeData.write(testData.getBytes());
  writeData.flush();
  writeData.close();
  ETLStage source=new ETLStage("String_Node_Str",ImmutableMap.<String,String>builder().put(Properties.File.FILESYSTEM,"String_Node_Str").put(Properties.File.PATH,filePath).build());
  ETLStage sink1=new ETLStage("String_Node_Str",ImmutableMap.of(Properties.TimePartitionedFileSetDataset.SCHEMA,FileBatchSource.DEFAULT_SCHEMA.toString(),Properties.TimePartitionedFileSetDataset.TPFS_NAME,"String_Node_Str"));
  ETLStage sink2=new ETLStage("String_Node_Str",ImmutableMap.of(Properties.TimePartitionedFileSetDataset.SCHEMA,FileBatchSource.DEFAULT_SCHEMA.toString(),Properties.TimePartitionedFileSetDataset.TPFS_NAME,"String_Node_Str"));
  ETLBatchConfig etlConfig=new ETLBatchConfig("String_Node_Str",source,Lists.newArrayList(sink1,sink2),Lists.<ETLStage>newArrayList(),new Resources(),Lists.<ETLStage>newArrayList());
  AppRequest<ETLBatchConfig> appRequest=new AppRequest<>(ETLBATCH_ARTIFACT,etlConfig);
  Id.Application appId=Id.Application.from(Id.Namespace.DEFAULT,"String_Node_Str");
  ApplicationManager appManager=deployApplication(appId,appRequest);
  MapReduceManager mrManager=appManager.getMapReduceManager(ETLMapReduce.NAME);
  mrManager.start();
  mrManager.waitForFinish(2,TimeUnit.MINUTES);
  for (  String sinkName : new String[]{"String_Node_Str","String_Node_Str"}) {
    DataSetManager<TimePartitionedFileSet> fileSetManager=getDataset(sinkName);
    try (TimePartitionedFileSet fileSet=fileSetManager.get()){
      List<GenericRecord> records=readOutput(fileSet,FileBatchSource.DEFAULT_SCHEMA);
      Assert.assertEquals(1,records.size());
      Assert.assertEquals(testData,records.get(0).get("String_Node_Str").toString());
    }
   }
}