Program: 5278
Project: 5278
Buggy source:
@Test public void testPreferences() throws Exception {
  testPreferencesOutput(cli,"String_Node_Str",ImmutableMap.<String,String>of());
  Map<String,String> propMap=Maps.newHashMap();
  propMap.put("String_Node_Str","String_Node_Str");
  propMap.put("String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  testPreferencesOutput(cli,"String_Node_Str",propMap);
  testPreferencesOutput(cli,"String_Node_Str",propMap);
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  propMap.clear();
  testPreferencesOutput(cli,"String_Node_Str",propMap);
  propMap.put("String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,String.format("String_Node_Str",FakeApp.NAME,FakeFlow.NAME),"String_Node_Str");
  testPreferencesOutput(cli,String.format("String_Node_Str",FakeApp.NAME,FakeFlow.NAME),propMap);
  testCommandOutputContains(cli,String.format("String_Node_Str",FakeApp.NAME,FakeFlow.NAME),"String_Node_Str");
  propMap.clear();
  testPreferencesOutput(cli,String.format("String_Node_Str",FakeApp.NAME),propMap);
  testPreferencesOutput(cli,"String_Node_Str",propMap);
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  File file=new File(TMP_FOLDER.newFolder(),"String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str" + file.getAbsolutePath() + "String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str" + file.getParentFile().getAbsolutePath() + "String_Node_Str","String_Node_Str");
  BufferedWriter writer=Files.newWriter(file,Charsets.UTF_8);
  try {
    writer.write("String_Node_Str");
  }
  finally {
    writer.close();
  }
  testCommandOutputContains(cli,"String_Node_Str" + file.getAbsolutePath() + "String_Node_Str","String_Node_Str");
  propMap.clear();
  propMap.put("String_Node_Str","String_Node_Str");
  testPreferencesOutput(cli,"String_Node_Str",propMap);
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  file=new File(TMP_FOLDER.newFolder(),"String_Node_Str");
  writer=Files.newWriter(file,Charsets.UTF_8);
  try {
    writer.write("String_Node_Str");
  }
  finally {
    writer.close();
  }
  testCommandOutputContains(cli,"String_Node_Str" + file.getAbsolutePath() + "String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str" + file.getAbsolutePath() + "String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Test public void testPreferences() throws Exception {
  testPreferencesOutput(cli,"String_Node_Str",ImmutableMap.<String,String>of());
  Map<String,String> propMap=Maps.newHashMap();
  propMap.put("String_Node_Str","String_Node_Str");
  propMap.put("String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  testPreferencesOutput(cli,"String_Node_Str",propMap);
  testPreferencesOutput(cli,"String_Node_Str",propMap);
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  propMap.clear();
  testPreferencesOutput(cli,"String_Node_Str",propMap);
  propMap.put("String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,String.format("String_Node_Str",FakeApp.NAME,FakeFlow.NAME),"String_Node_Str");
  testPreferencesOutput(cli,String.format("String_Node_Str",FakeApp.NAME,FakeFlow.NAME),propMap);
  testCommandOutputContains(cli,String.format("String_Node_Str",FakeApp.NAME,FakeFlow.NAME),"String_Node_Str");
  propMap.clear();
  testPreferencesOutput(cli,String.format("String_Node_Str",FakeApp.NAME),propMap);
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  testPreferencesOutput(cli,"String_Node_Str",propMap);
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  File file=new File(TMP_FOLDER.newFolder(),"String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str" + file.getAbsolutePath() + "String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str" + file.getParentFile().getAbsolutePath() + "String_Node_Str","String_Node_Str");
  BufferedWriter writer=Files.newWriter(file,Charsets.UTF_8);
  try {
    writer.write("String_Node_Str");
  }
  finally {
    writer.close();
  }
  testCommandOutputContains(cli,"String_Node_Str" + file.getAbsolutePath() + "String_Node_Str","String_Node_Str");
  propMap.clear();
  propMap.put("String_Node_Str","String_Node_Str");
  testPreferencesOutput(cli,"String_Node_Str",propMap);
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  file=new File(TMP_FOLDER.newFolder(),"String_Node_Str");
  writer=Files.newWriter(file,Charsets.UTF_8);
  try {
    writer.write("String_Node_Str");
  }
  finally {
    writer.close();
  }
  testCommandOutputContains(cli,"String_Node_Str" + file.getAbsolutePath() + "String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str" + file.getAbsolutePath() + "String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
  testCommandOutputContains(cli,"String_Node_Str","String_Node_Str");
}