Program: 7046
Project: 7046
Buggy source:
public void testUploadServeOnlyFiles() throws Exception {
  MockServer server=new MockServer();
  FileInfo loadInfo=new FileInfo("String_Node_Str",1232,false,false,null);
  String loadInfoContents="String_Node_Str";
  FileInfo serveInfo=new FileInfo("String_Node_Str",1232,false,true,null);
  String serveInfoContents="String_Node_Str";
  List<FileInfo> fileSet=Arrays.asList(loadInfo,serveInfo);
  server.expect(baseUrl + "String_Node_Str","String_Node_Str");
  server.expect(baseUrl + "String_Node_Str" + gson.toJson(fileSet)+ "String_Node_Str",gson.toJson(fileSet));
  JsonCommand cmd=new JsonCommand(CommandType.RESET,Collections.<String>emptyList());
  Map<String,String> resetParams=new LinkedHashMap<String,String>();
  resetParams.put("String_Node_Str","String_Node_Str");
  resetParams.put("String_Node_Str",gson.toJson(cmd));
  server.expect(baseUrl + "String_Node_Str" + resetParams,"String_Node_Str");
  server.expect(baseUrl + "String_Node_Str","String_Node_Str");
  server.expect(baseUrl + "String_Node_Str" + gson.toJson(Arrays.asList(new FileInfo(loadInfo.getFileName(),loadInfo.getTimestamp(),loadInfo.isPatch(),loadInfo.isServeOnly(),loadInfoContents),new FileInfo(serveInfo.getFileName(),serveInfo.getTimestamp(),serveInfo.isPatch(),serveInfo.isServeOnly(),serveInfoContents)))+ "String_Node_Str","String_Node_Str");
  String url=baseUrl + "String_Node_Str" + createLoadCommandString("String_Node_Str",CommandType.LOADTEST,Arrays.asList(CommandTask.fileInfoToFileSource(loadInfo)));
  server.expect(url,"String_Node_Str");
  server.expect(baseUrl + "String_Node_Str","String_Node_Str" + createLoadedFilesResponseString() + "String_Node_Str");
  server.expect(baseUrl + "String_Node_Str","String_Node_Str");
  server.expect(baseUrl + "String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  Map<String,String> params=new LinkedHashMap<String,String>();
  params.put("String_Node_Str","String_Node_Str");
  params.put("String_Node_Str","String_Node_Str");
  FakeResponseStream stream=new FakeResponseStream();
  MockFileLoader fileReader=new MockFileLoader();
  fileReader.addExpectation(loadInfo,loadInfoContents);
  fileReader.addExpectation(serveInfo,serveInfoContents);
  CommandTask task=createCommandTask(server,new LinkedHashSet<FileInfo>(fileSet),new LinkedHashSet<FileInfo>(Arrays.asList(serveInfo)),params,stream,fileReader,true);
  task.run();
  Response response=stream.getResponse();
  assertEquals("String_Node_Str",response.getResponse());
  assertEquals("String_Node_Str",response.getBrowser().getName());
  assertEquals("String_Node_Str",response.getError());
  assertEquals(123L,response.getExecutionTime());
}

Fixed version (ground truth):
public void testUploadServeOnlyFiles() throws Exception {
  MockServer server=new MockServer();
  FileInfo loadInfo=new FileInfo("String_Node_Str",1232,false,false,null);
  String loadInfoContents="String_Node_Str";
  FileInfo serveInfo=new FileInfo("String_Node_Str",1232,false,true,null);
  String serveInfoContents="String_Node_Str";
  List<FileInfo> fileSet=Arrays.asList(loadInfo,serveInfo);
  server.expect(baseUrl + "String_Node_Str","String_Node_Str");
  server.expect(baseUrl + "String_Node_Str" + gson.toJson(fileSet)+ "String_Node_Str",gson.toJson(fileSet));
  JsonCommand cmd=new JsonCommand(CommandType.RESET,Collections.<String>emptyList());
  Map<String,String> resetParams=new LinkedHashMap<String,String>();
  resetParams.put("String_Node_Str","String_Node_Str");
  resetParams.put("String_Node_Str",gson.toJson(cmd));
  server.expect(baseUrl + "String_Node_Str" + resetParams,"String_Node_Str");
  server.expect(baseUrl + "String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  server.expect(baseUrl + "String_Node_Str" + gson.toJson(Arrays.asList(new FileInfo(loadInfo.getFileName(),loadInfo.getTimestamp(),loadInfo.isPatch(),loadInfo.isServeOnly(),loadInfoContents),new FileInfo(serveInfo.getFileName(),serveInfo.getTimestamp(),serveInfo.isPatch(),serveInfo.isServeOnly(),serveInfoContents)))+ "String_Node_Str","String_Node_Str");
  String url=baseUrl + "String_Node_Str" + createLoadCommandString("String_Node_Str",CommandType.LOADTEST,Arrays.asList(CommandTask.fileInfoToFileSource(loadInfo)));
  server.expect(url,"String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  server.expect(baseUrl + "String_Node_Str","String_Node_Str" + createLoadedFilesResponseString() + "String_Node_Str");
  server.expect(baseUrl + "String_Node_Str","String_Node_Str");
  server.expect(baseUrl + "String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  Map<String,String> params=new LinkedHashMap<String,String>();
  params.put("String_Node_Str","String_Node_Str");
  params.put("String_Node_Str","String_Node_Str");
  FakeResponseStream stream=new FakeResponseStream();
  MockFileLoader fileReader=new MockFileLoader();
  fileReader.addExpectation(loadInfo,loadInfoContents);
  fileReader.addExpectation(serveInfo,serveInfoContents);
  CommandTask task=createCommandTask(server,new LinkedHashSet<FileInfo>(fileSet),new LinkedHashSet<FileInfo>(Arrays.asList(serveInfo)),params,stream,fileReader,true);
  task.run();
  Response response=stream.getResponse();
  assertEquals("String_Node_Str",response.getResponse());
  assertEquals("String_Node_Str",response.getBrowser().getName());
  assertEquals("String_Node_Str",response.getError());
  assertEquals(123L,response.getExecutionTime());
}