Program: 3690
Project: 3690
Buggy source:
@Test public void testPerson() throws java.security.NoSuchAlgorithmException, java.io.UnsupportedEncodingException {
  String Id1=EntityBase.generateNewID();
  String Id2=EntityBase.generateNewID();
  String Id3=EntityBase.generateNewID();
  Person p=new Person();
  p.setEntityAccessStatus("String_Node_Str");
  p.setEntityId(Id1);
  p.setTypeId(0);
  p.setEmail("String_Node_Str");
  p.setFirstName("String_Node_Str");
  p.setLastName("String_Node_Str");
  p.setPhone("String_Node_Str");
  p.save();
  User personOwner=new User();
  personOwner.setFirstName("String_Node_Str");
  personOwner.setLastName("String_Node_Str");
  personOwner.setEmail(Id2);
  personOwner.setPhone("String_Node_Str");
  personOwner.setEntityId(Id2);
  personOwner.setPassword(EntityBase.generateNewID());
  personOwner.save();
  Person person=(Person)Person.selectByID(Id1);
  assert(person != null);
  Person p1=new Person();
  p1.setEntityAccessStatus("String_Node_Str");
  p1.setEntityId(Id3);
  p1.setTypeId(0);
  p1.setPhone("String_Node_Str");
  p1.setFirstName("String_Node_Str");
  p1.setLastName("String_Node_Str");
  p1.setEmail("String_Node_Str");
  p1.setOwner(personOwner);
  p1.save();
  Person p4=(Person)Person.selectByID(Id3);
  User u1=(User)User.selectByUsername(Id2);
  assert(p4 != null);
  assert(u1 != null);
  p4.delete(true);
  Person p5=(Person)Person.selectByID(Id3);
  assert(p5 == null);
  User u2=(User)User.selectByUsername(Id2);
  assert(u2 != null);
  u2.delete(true);
  p.delete(true);
  Person p6=(Person)Person.selectByID(Id1);
  User u6=(User)User.selectByUsername(Id2);
  assert(p6 == null);
  assert(u6 == null);
  ;
}

Fixed version (ground truth):
@Test public void testPerson() throws java.security.NoSuchAlgorithmException, java.io.UnsupportedEncodingException {
  String Id1=EntityBase.generateNewID();
  String Id2=EntityBase.generateNewID();
  String Id3=EntityBase.generateNewID();
  Person p=new Person();
  p.setEntityAccessStatus("String_Node_Str");
  p.setEntityId(Id1);
  p.setTypeId(0);
  p.setEmail("String_Node_Str");
  p.setFirstName("String_Node_Str");
  p.setLastName("String_Node_Str");
  p.setPhone("String_Node_Str");
  p.save();
  User personOwner=new User();
  personOwner.setFirstName("String_Node_Str");
  personOwner.setLastName("String_Node_Str");
  personOwner.setEmail(Id2);
  personOwner.setPhone("String_Node_Str");
  personOwner.setEntityId(Id2);
  personOwner.setPassword(EntityBase.generateNewID());
  personOwner.save();
  Person person=(Person)Person.selectByID(Id1);
  assert(person != null);
  Person p1=new Person();
  p1.setEntityAccessStatus("String_Node_Str");
  p1.setEntityId(Id3);
  p1.setTypeId(0);
  p1.setPhone("String_Node_Str");
  p1.setFirstName("String_Node_Str");
  p1.setLastName("String_Node_Str");
  p1.setEmail("String_Node_Str");
  p1.setOwner(personOwner);
  p1.save();
  Person p4=(Person)Person.selectByID(Id3);
  User u1=(User)User.selectByUsername(Id2);
  assert(p4 != null);
  assert(u1 != null);
  p4.delete(true);
  Person p5=(Person)Person.selectByID(Id3);
  assert(p5 == null);
  User u2=(User)User.selectByUsername(Id2);
  assert(u2 != null);
  u2.delete(true);
  p.delete(true);
  Person p6=(Person)Person.selectByID(Id1);
  User u6=(User)User.selectByUsername(Id2);
  assert(p6 == null);
  assert(u6 == null);
}