Program: 5714
Project: 5714
Buggy source:
@Test public void testTextFileSource() throws Exception {
  String inputName="String_Node_Str";
  String outputName="String_Node_Str";
  Map<String,String> sourceProperties=new HashMap<>();
  sourceProperties.put(TextFileSetSource.Conf.FILESET_NAME,inputName);
  sourceProperties.put(TextFileSetSource.Conf.CREATE_IF_NOT_EXISTS,"String_Node_Str");
  sourceProperties.put(TextFileSetSource.Conf.DELETE_INPUT_ON_SUCCESS,"String_Node_Str");
  ETLStage source=new ETLStage("String_Node_Str",new ETLPlugin(TextFileSetSource.NAME,BatchSource.PLUGIN_TYPE,sourceProperties,null));
  ETLStage sink=new ETLStage("String_Node_Str",MockSink.getPlugin(outputName));
  ETLBatchConfig pipelineConfig=ETLBatchConfig.builder("String_Node_Str").addStage(source).addStage(sink).addConnection(source.getName(),sink.getName()).build();
  Id.Application pipelineId=Id.Application.from(Id.Namespace.DEFAULT,"String_Node_Str");
  ApplicationManager appManager=deployApplication(pipelineId,new AppRequest<>(APP_ARTIFACT,pipelineConfig));
  DataSetManager<FileSet> inputManager=getDataset(inputName);
  Location inputFile=inputManager.get().getBaseLocation().append("String_Node_Str");
  String line1="String_Node_Str";
  String line2="String_Node_Str";
  String line3="String_Node_Str";
  String inputText=line1 + "String_Node_Str" + line2+ "String_Node_Str"+ line3;
  try (OutputStream outputStream=inputFile.getOutputStream()){
    outputStream.write(inputText.getBytes(Charset.forName("String_Node_Str")));
  }
   Map<String,String> runtimeArgs=new HashMap<>();
  runtimeArgs.put(String.format("String_Node_Str",inputName),inputFile.getName());
  WorkflowManager workflowManager=appManager.getWorkflowManager(SmartWorkflow.NAME);
  workflowManager.start(runtimeArgs);
  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(TextFileSetSource.OUTPUT_SCHEMA).set("String_Node_Str",(long)inputText.indexOf(line1)).set("String_Node_Str",line1).build());
  expected.add(StructuredRecord.builder(TextFileSetSource.OUTPUT_SCHEMA).set("String_Node_Str",(long)inputText.indexOf(line2)).set("String_Node_Str",line2).build());
  expected.add(StructuredRecord.builder(TextFileSetSource.OUTPUT_SCHEMA).set("String_Node_Str",(long)inputText.indexOf(line3)).set("String_Node_Str",line3).build());
  Assert.assertEquals(expected,outputRecords);
  Assert.assertFalse(inputFile.exists());
}

Fixed version (ground truth):
@Test public void testTextFileSource() throws Exception {
  String inputName="String_Node_Str";
  String outputName="String_Node_Str";
  Map<String,String> sourceProperties=new HashMap<>();
  sourceProperties.put(TextFileSetSource.Conf.FILESET_NAME,inputName);
  sourceProperties.put(TextFileSetSource.Conf.CREATE_IF_NOT_EXISTS,"String_Node_Str");
  sourceProperties.put(TextFileSetSource.Conf.DELETE_INPUT_ON_SUCCESS,"String_Node_Str");
  ETLStage source=new ETLStage("String_Node_Str",new ETLPlugin(TextFileSetSource.NAME,BatchSource.PLUGIN_TYPE,sourceProperties,null));
  ETLStage sink=new ETLStage("String_Node_Str",MockSink.getPlugin(outputName));
  ETLBatchConfig pipelineConfig=ETLBatchConfig.builder("String_Node_Str").addStage(source).addStage(sink).addConnection(source.getName(),sink.getName()).build();
  ApplicationId pipelineId=NamespaceId.DEFAULT.app("String_Node_Str");
  ApplicationManager appManager=deployApplication(pipelineId,new AppRequest<>(APP_ARTIFACT,pipelineConfig));
  DataSetManager<FileSet> inputManager=getDataset(inputName);
  Location inputFile=inputManager.get().getBaseLocation().append("String_Node_Str");
  String line1="String_Node_Str";
  String line2="String_Node_Str";
  String line3="String_Node_Str";
  String inputText=line1 + "String_Node_Str" + line2+ "String_Node_Str"+ line3;
  try (OutputStream outputStream=inputFile.getOutputStream()){
    outputStream.write(inputText.getBytes(Charset.forName("String_Node_Str")));
  }
   Map<String,String> runtimeArgs=new HashMap<>();
  runtimeArgs.put(String.format("String_Node_Str",inputName),inputFile.getName());
  WorkflowManager workflowManager=appManager.getWorkflowManager(SmartWorkflow.NAME);
  workflowManager.start(runtimeArgs);
  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(TextFileSetSource.OUTPUT_SCHEMA).set("String_Node_Str",(long)inputText.indexOf(line1)).set("String_Node_Str",line1).build());
  expected.add(StructuredRecord.builder(TextFileSetSource.OUTPUT_SCHEMA).set("String_Node_Str",(long)inputText.indexOf(line2)).set("String_Node_Str",line2).build());
  expected.add(StructuredRecord.builder(TextFileSetSource.OUTPUT_SCHEMA).set("String_Node_Str",(long)inputText.indexOf(line3)).set("String_Node_Str",line3).build());
  Assert.assertEquals(expected,outputRecords);
  Assert.assertFalse(inputFile.exists());
}