Program: 188899
Project: 188899
Buggy source:
@Test public void getDirectFilesAssociatedWithWorkflowRuns(){
  List<Integer> files=new ArrayList<Integer>();
  List<WorkflowRun> result=instance.getWorkflowRunsAssociatedWithFiles(files);
  Assert.assertTrue("String_Node_Str",result == null);
  WorkflowRun wr=instance.getWorkflowRun(863);
  Assert.assertTrue("String_Node_Str",wr.getInputFiles().isEmpty());
  final int f1_sw_accession=835;
  wr.getInputFiles().add(f1_sw_accession);
  final int f2_sw_accession=838;
  wr.getInputFiles().add(f2_sw_accession);
  final int f3_sw_accession=866;
  wr.getInputFiles().add(f3_sw_accession);
  instance.update_workflow_run(wr.getWorkflowRunId(),wr.getCommand(),wr.getTemplate(),wr.getStatus(),wr.getStatusCmd(),wr.getCurrentWorkingDir(),wr.getDax(),wr.getIniFile(),wr.getHost(),wr.getStdOut(),wr.getStdErr(),wr.getWorkflowEngine(),wr.getInputFiles());
  final int f4_sw_accession=867;
  wr.getInputFiles().add(f1_sw_accession);
  wr.getInputFiles().add(f4_sw_accession);
  wr=instance.getWorkflowRun(6603);
  instance.update_workflow_run(wr.getWorkflowRunId(),wr.getCommand(),wr.getTemplate(),wr.getStatus(),wr.getStatusCmd(),wr.getCurrentWorkingDir(),wr.getDax(),wr.getIniFile(),wr.getHost(),wr.getStdOut(),wr.getStdErr(),wr.getWorkflowEngine(),wr.getInputFiles());
  files.add(835);
  result=instance.getWorkflowRunsAssociatedWithFiles(files);
  Assert.assertTrue("String_Node_Str" + result.size(),result.size() == 2);
  Assert.assertTrue("String_Node_Str",result.get(0).getSwAccession() == 863);
  Assert.assertTrue("String_Node_Str",result.get(1).getSwAccession() == 6603);
  files.clear();
  files.add(867);
  result=instance.getWorkflowRunsAssociatedWithFiles(files);
  Assert.assertTrue("String_Node_Str" + result.size(),result.size() == 1);
}

Fixed version (ground truth):
@Test public void getDirectFilesAssociatedWithWorkflowRuns(){
  BasicTestDatabaseCreator.resetDatabaseWithUsers();
  List<Integer> files=new ArrayList<Integer>();
  List<WorkflowRun> result=instance.getWorkflowRunsAssociatedWithFiles(files);
  Assert.assertTrue("String_Node_Str",result.isEmpty());
  WorkflowRun wr=instance.getWorkflowRun(863);
  Assert.assertTrue("String_Node_Str",wr.getInputFiles().isEmpty());
  final int f1_sw_accession=835;
  wr.getInputFiles().add(f1_sw_accession);
  final int f2_sw_accession=838;
  wr.getInputFiles().add(f2_sw_accession);
  final int f3_sw_accession=866;
  wr.getInputFiles().add(f3_sw_accession);
  instance.update_workflow_run(wr.getWorkflowRunId(),wr.getCommand(),wr.getTemplate(),wr.getStatus(),wr.getStatusCmd(),wr.getCurrentWorkingDir(),wr.getDax(),wr.getIniFile(),wr.getHost(),wr.getStdOut(),wr.getStdErr(),wr.getWorkflowEngine(),wr.getInputFiles());
  final int f4_sw_accession=867;
  wr=instance.getWorkflowRun(6603);
  wr.getInputFiles().add(f1_sw_accession);
  wr.getInputFiles().add(f4_sw_accession);
  instance.update_workflow_run(wr.getWorkflowRunId(),wr.getCommand(),wr.getTemplate(),wr.getStatus(),wr.getStatusCmd(),wr.getCurrentWorkingDir(),wr.getDax(),wr.getIniFile(),wr.getHost(),wr.getStdOut(),wr.getStdErr(),wr.getWorkflowEngine(),wr.getInputFiles());
  files.add(f1_sw_accession);
  result=instance.getWorkflowRunsAssociatedWithFiles(files);
  Assert.assertTrue("String_Node_Str" + result.size(),result.size() == 2);
  Assert.assertTrue("String_Node_Str",result.get(0).getSwAccession() == 863);
  Assert.assertTrue("String_Node_Str",result.get(1).getSwAccession() == 6603);
  files.clear();
  files.add(f4_sw_accession);
  result=instance.getWorkflowRunsAssociatedWithFiles(files);
  Assert.assertTrue("String_Node_Str" + result.size(),result.size() == 1);
  Assert.assertTrue("String_Node_Str",result.get(0).getSwAccession() == 6603);
  files.add(f1_sw_accession);
  result=instance.getWorkflowRunsAssociatedWithFiles(files);
  Assert.assertTrue("String_Node_Str" + result.size(),result.size() == 2);
  Assert.assertTrue("String_Node_Str",result.get(0).getSwAccession() == 863);
  Assert.assertTrue("String_Node_Str",result.get(1).getSwAccession() == 6603);
}