Program: 48443
Project: 48443
Buggy source:
@Test public void testLoadUserByUsername() throws JAXBException {
  UserDetails userDetails1=null;
  UserDetailsService accountService=new UserService();
  Users users1=new Users();
  User user1=new User();
  user1.setName("String_Node_Str");
  users1.setUsers(Arrays.asList(user1));
  TestFileUtils.createXMLFile(users1,FileUtils.getConfigFile(UsersFile,"String_Node_Str"));
  try {
    userDetails1=accountService.loadUserByUsername("String_Node_Str");
  }
 catch (  UsernameNotFoundException e) {
  }
  Assert.assertNull(userDetails1);
  UserDetails userDetails2=accountService.loadUserByUsername("String_Node_Str");
  assertNotNull(userDetails2);
  TestFileUtils.deleteXMLFile(FileUtils.getConfigFile(UsersFile,"String_Node_Str"));
  Users users2=new Users();
  User user2=new User();
  user2.setName("String_Node_Str");
  users2.setUsers(Arrays.asList(user2));
  TestFileUtils.createXMLFile(users2,FileUtils.getConfigFile(UsersFile,"String_Node_Str"));
  userDetails1=accountService.loadUserByUsername("String_Node_Str");
  assertNotNull(userDetails1);
  assertEquals(userDetails1.getUsername(),"String_Node_Str");
  TestFileUtils.deleteXMLFile(FileUtils.getConfigFile(UsersFile,"String_Node_Str"));
  Users users3=new Users();
  users3.setUsers(Arrays.asList(user2,user1));
  TestFileUtils.createXMLFile(users3,FileUtils.getConfigFile(UsersFile,"String_Node_Str"));
  userDetails1=accountService.loadUserByUsername("String_Node_Str");
  assertNotNull(userDetails1);
  assertEquals(userDetails1.getUsername(),"String_Node_Str");
  TestFileUtils.deleteXMLFile(FileUtils.getConfigFile(UsersFile,"String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testLoadUserByUsername() throws JAXBException {
  UserDetails userDetails1=null;
  UserDetailsService accountService=new UserService();
  Users users1=new Users();
  User user1=new User();
  user1.setName("String_Node_Str");
  users1.setUsers(Arrays.asList(user1));
  String confPath=System.getProperties().get("String_Node_Str") + File.separator + "String_Node_Str";
  new File(confPath).mkdir();
  String userXmlPath=confPath + File.separator + UsersFile;
  File usrXmlFile=new File(userXmlPath);
  TestFileUtils.createXMLFile(users1,usrXmlFile);
  try {
    userDetails1=accountService.loadUserByUsername("String_Node_Str");
  }
 catch (  UsernameNotFoundException e) {
  }
  Assert.assertNull(userDetails1);
  UserDetails userDetails2=accountService.loadUserByUsername("String_Node_Str");
  assertNotNull(userDetails2);
  TestFileUtils.deleteXMLFile(usrXmlFile);
  Users users2=new Users();
  User user2=new User();
  user2.setName("String_Node_Str");
  users2.setUsers(Arrays.asList(user2));
  TestFileUtils.createXMLFile(users2,usrXmlFile);
  userDetails1=accountService.loadUserByUsername("String_Node_Str");
  assertNotNull(userDetails1);
  assertEquals(userDetails1.getUsername(),"String_Node_Str");
  TestFileUtils.deleteXMLFile(usrXmlFile);
  Users users3=new Users();
  users3.setUsers(Arrays.asList(user2,user1));
  TestFileUtils.createXMLFile(users3,usrXmlFile);
  userDetails1=accountService.loadUserByUsername("String_Node_Str");
  assertNotNull(userDetails1);
  assertEquals(userDetails1.getUsername(),"String_Node_Str");
  TestFileUtils.deleteXMLFile(usrXmlFile);
}