Program: 60580
Project: 60580
Buggy source:
@Test public void checkUserSuspension(){
  UserTO userTO=UserTestITCase.getUniqueSampleTO("String_Node_Str");
  MembershipTO membershipTO=new MembershipTO();
  membershipTO.setRoleId(7L);
  AttributeTO testAttributeTO=new AttributeTO();
  testAttributeTO.setSchema("String_Node_Str");
  testAttributeTO.addValue("String_Node_Str");
  membershipTO.addAttribute(testAttributeTO);
  userTO.addMembership(membershipTO);
  userTO=createUser(userTO);
  assertNotNull(userTO);
  UserService userService2=setupCredentials(userService,userTO.getUsername(),"String_Node_Str");
  userTO=userService2.read(userTO.getId());
  assertNotNull(userTO);
  assertNotNull(userTO.getFailedLogins());
  assertEquals(Integer.valueOf(0),userTO.getFailedLogins());
  UserService userService3=setupCredentials(userService,userTO.getUsername(),"String_Node_Str");
  Throwable t=null;
  try {
    userService3.read(userTO.getId());
    fail();
  }
 catch (  Exception e) {
    t=e;
  }
  assertNotNull(t);
  t=null;
  try {
    userService3.read(userTO.getId());
  }
 catch (  Exception e) {
    t=e;
  }
  assertNotNull(t);
  t=null;
  try {
    userService3.read(userTO.getId());
  }
 catch (  Exception e) {
    t=e;
  }
  assertNotNull(t);
  t=null;
  super.resetRestTemplate();
  userTO=userService.read(userTO.getId());
  assertNotNull(userTO);
  assertNotNull(userTO.getFailedLogins());
  assertEquals(Integer.valueOf(3),userTO.getFailedLogins());
  userService3=setupCredentials(userService,userTO.getUsername(),"String_Node_Str");
  try {
    userService3.read(userTO.getId());
  }
 catch (  Exception e) {
    t=e;
  }
  assertNotNull(t);
  t=null;
  super.resetRestTemplate();
  userTO=userService.read(userTO.getId());
  assertNotNull(userTO);
  assertNotNull(userTO.getFailedLogins());
  assertEquals(Integer.valueOf(3),userTO.getFailedLogins());
  assertEquals("String_Node_Str",userTO.getStatus());
  userService2=setupCredentials(userService,userTO.getUsername(),"String_Node_Str");
  try {
    userService2.read(userTO.getId());
    assertNotNull(userTO);
  }
 catch (  Exception e) {
    t=e;
  }
  assertNotNull(t);
  t=null;
  super.resetRestTemplate();
  userTO=userService.reactivate(userTO.getId());
  assertNotNull(userTO);
  assertEquals("String_Node_Str",userTO.getStatus());
  userService2=setupCredentials(userService,userTO.getUsername(),"String_Node_Str");
  userTO=userService2.read(userTO.getId());
  assertNotNull(userTO);
  assertEquals(Integer.valueOf(0),userTO.getFailedLogins());
}

Fixed version (ground truth):
@Test public void checkUserSuspension(){
  UserTO userTO=UserTestITCase.getUniqueSampleTO("String_Node_Str");
  MembershipTO membershipTO=new MembershipTO();
  membershipTO.setRoleId(7L);
  AttributeTO testAttributeTO=new AttributeTO();
  testAttributeTO.setSchema("String_Node_Str");
  testAttributeTO.addValue("String_Node_Str");
  membershipTO.addAttribute(testAttributeTO);
  userTO.addMembership(membershipTO);
  userTO=createUser(userTO);
  assertNotNull(userTO);
  UserService userService2=setupCredentials(userService,UserService.class,userTO.getUsername(),"String_Node_Str");
  userTO=userService2.read(userTO.getId());
  assertNotNull(userTO);
  assertNotNull(userTO.getFailedLogins());
  assertEquals(Integer.valueOf(0),userTO.getFailedLogins());
  UserService userService3=setupCredentials(userService,UserService.class,userTO.getUsername(),"String_Node_Str");
  Throwable t=null;
  try {
    userService3.read(userTO.getId());
    fail();
  }
 catch (  Exception e) {
    t=e;
  }
  assertNotNull(t);
  t=null;
  try {
    userService3.read(userTO.getId());
  }
 catch (  Exception e) {
    t=e;
  }
  assertNotNull(t);
  t=null;
  try {
    userService3.read(userTO.getId());
  }
 catch (  Exception e) {
    t=e;
  }
  assertNotNull(t);
  t=null;
  super.resetRestTemplate();
  userTO=userService.read(userTO.getId());
  assertNotNull(userTO);
  assertNotNull(userTO.getFailedLogins());
  assertEquals(Integer.valueOf(3),userTO.getFailedLogins());
  userService3=setupCredentials(userService,UserService.class,userTO.getUsername(),"String_Node_Str");
  try {
    userService3.read(userTO.getId());
  }
 catch (  Exception e) {
    t=e;
  }
  assertNotNull(t);
  t=null;
  super.resetRestTemplate();
  userTO=userService.read(userTO.getId());
  assertNotNull(userTO);
  assertNotNull(userTO.getFailedLogins());
  assertEquals(Integer.valueOf(3),userTO.getFailedLogins());
  assertEquals("String_Node_Str",userTO.getStatus());
  userService2=setupCredentials(userService,UserService.class,userTO.getUsername(),"String_Node_Str");
  try {
    userService2.read(userTO.getId());
    assertNotNull(userTO);
  }
 catch (  Exception e) {
    t=e;
  }
  assertNotNull(t);
  t=null;
  super.resetRestTemplate();
  userTO=userService.reactivate(userTO.getId());
  assertNotNull(userTO);
  assertEquals("String_Node_Str",userTO.getStatus());
  userService2=setupCredentials(userService,UserService.class,userTO.getUsername(),"String_Node_Str");
  userTO=userService2.read(userTO.getId());
  assertNotNull(userTO);
  assertEquals(Integer.valueOf(0),userTO.getFailedLogins());
}