Program: 4798
Project: 4798
Buggy source:
@Ignore @Test public void testWorkflowForkFailure() throws Exception {
  Assert.assertEquals(200,deploy(WorkflowFailureInForkApp.class).getStatusLine().getStatusCode());
  Id.Application appId=Id.Application.from(Id.Namespace.DEFAULT,WorkflowFailureInForkApp.NAME);
  Id.Workflow workflowId=Id.Workflow.from(appId,WorkflowFailureInForkApp.WorkflowWithFailureInFork.NAME);
  Id.Program firstMRId=Id.Program.from(appId,ProgramType.MAPREDUCE,WorkflowFailureInForkApp.FIRST_MAPREDUCE_NAME);
  Id.Program secondMRId=Id.Program.from(appId,ProgramType.MAPREDUCE,WorkflowFailureInForkApp.SECOND_MAPREDUCE_NAME);
  String outputPath=new File(tmpFolder.newFolder(),"String_Node_Str").getAbsolutePath();
  File fileToSync=new File(tmpFolder.newFolder() + "String_Node_Str");
  File fileToWait=new File(tmpFolder.newFolder() + "String_Node_Str");
  startProgram(workflowId,ImmutableMap.of("String_Node_Str",createInput("String_Node_Str"),"String_Node_Str",outputPath,"String_Node_Str",fileToSync.getAbsolutePath(),"String_Node_Str",fileToWait.getAbsolutePath(),"String_Node_Str" + WorkflowFailureInForkApp.SECOND_MAPREDUCE_NAME + "String_Node_Str","String_Node_Str"));
  waitState(workflowId,ProgramStatus.RUNNING.name());
  waitState(workflowId,ProgramStatus.STOPPED.name());
  verifyProgramRuns(workflowId,"String_Node_Str");
  List<RunRecord> mapReduceProgramRuns=getProgramRuns(firstMRId,ProgramRunStatus.KILLED.name());
  Assert.assertEquals(1,mapReduceProgramRuns.size());
  mapReduceProgramRuns=getProgramRuns(secondMRId,ProgramRunStatus.FAILED.name());
  Assert.assertEquals(1,mapReduceProgramRuns.size());
}

Fixed version (ground truth):
@Ignore @Test public void testWorkflowForkFailure() throws Exception {
  Assert.assertEquals(200,deploy(WorkflowFailureInForkApp.class).getStatusLine().getStatusCode());
  Id.Application appId=Id.Application.from(Id.Namespace.DEFAULT,WorkflowFailureInForkApp.NAME);
  Id.Workflow workflowId=Id.Workflow.from(appId,WorkflowFailureInForkApp.WorkflowWithFailureInFork.NAME);
  Id.Program firstMRId=Id.Program.from(appId,ProgramType.MAPREDUCE,WorkflowFailureInForkApp.FIRST_MAPREDUCE_NAME);
  Id.Program secondMRId=Id.Program.from(appId,ProgramType.MAPREDUCE,WorkflowFailureInForkApp.SECOND_MAPREDUCE_NAME);
  String outputPath=new File(tmpFolder.newFolder(),"String_Node_Str").getAbsolutePath();
  File fileToSync=new File(tmpFolder.newFolder() + "String_Node_Str");
  File fileToWait=new File(tmpFolder.newFolder() + "String_Node_Str");
  startProgram(workflowId,ImmutableMap.of("String_Node_Str",createInput("String_Node_Str"),"String_Node_Str",outputPath,"String_Node_Str",fileToSync.getAbsolutePath(),"String_Node_Str",fileToWait.getAbsolutePath(),"String_Node_Str" + WorkflowFailureInForkApp.SECOND_MAPREDUCE_NAME + "String_Node_Str","String_Node_Str"));
  waitState(workflowId,ProgramStatus.RUNNING.name());
  waitState(workflowId,ProgramStatus.STOPPED.name());
  verifyProgramRuns(workflowId,ProgramRunStatus.FAILED);
  List<RunRecord> mapReduceProgramRuns=getProgramRuns(firstMRId,ProgramRunStatus.KILLED);
  Assert.assertEquals(1,mapReduceProgramRuns.size());
  mapReduceProgramRuns=getProgramRuns(secondMRId,ProgramRunStatus.FAILED);
  Assert.assertEquals(1,mapReduceProgramRuns.size());
}