Program: 65058
Project: 65058
Buggy source:
public void populate(DatabaseSession session){
  PopulationManager manager=PopulationManager.getDefaultManager();
  Cat cat=Cat.example1();
  session.writeObject(cat);
  manager.registerObject(cat,"String_Node_Str");
  Dog dog=Dog.example1();
  session.writeObject(dog);
  manager.registerObject(dog,"String_Node_Str");
  cat=Cat.example2();
  session.writeObject(cat);
  manager.registerObject(cat,"String_Node_Str");
  dog=Dog.example2();
  session.writeObject(dog);
  manager.registerObject(dog,"String_Node_Str");
  cat=Cat.example3();
  session.writeObject(cat);
  manager.registerObject(cat,"String_Node_Str");
  dog=Dog.example3();
  session.writeObject(dog);
  manager.registerObject(dog,"String_Node_Str");
  Company company=Company.example1();
  session.writeObject(company);
  manager.registerObject(company,"String_Node_Str");
  manager.registerObject(((Vector)company.getVehicles().getValue()).firstElement(),"String_Node_Str");
  company=Company.example2();
  session.writeObject(company);
  manager.registerObject(company,"String_Node_Str");
  company=Company.example3();
  session.writeObject(company);
  manager.registerObject(company,"String_Node_Str");
  Person person=Person.example1();
  session.writeObject(person);
  manager.registerObject(person,"String_Node_Str");
  session.writeObject(A_King2.exp1());
  session.writeObject(A_King2.exp2());
  session.writeObject(A_1_King2.exp3());
  session.writeObject(A_2_King2.exp4());
  session.writeObject(A_2_1_King2.exp5());
  UnitOfWork unitOfWork=session.acquireUnitOfWork();
  person=Person.example2();
  unitOfWork.registerObject(person);
  unitOfWork.commit();
  manager.registerObject(person,"String_Node_Str");
  manager.registerObject(person.bestFriend,"String_Node_Str");
  manager.registerObject(person.representitive,"String_Node_Str");
  person=Person.example3();
  session.writeObject(person);
  manager.registerObject(person,"String_Node_Str");
  Computer computer=Computer.example1();
  session.writeObject(computer);
  manager.registerObject(computer,"String_Node_Str");
  computer=Computer.example2();
  session.writeObject(computer);
  manager.registerObject(computer,"String_Node_Str");
  computer=Computer.example3();
  session.writeObject(computer);
  manager.registerObject(computer,"String_Node_Str");
  computer=Computer.example4();
  session.writeObject(computer);
  manager.registerObject(computer,"String_Node_Str");
  computer=Computer.example5();
  session.writeObject(computer);
  manager.registerObject(computer,"String_Node_Str");
  JavaProgrammer JP=JavaProgrammer.example1();
  session.writeObject(JP);
  manager.registerObject(JP,"String_Node_Str");
  JP=JavaProgrammer.example2();
  session.writeObject(JP);
  manager.registerObject(JP,"String_Node_Str");
  unitOfWork=session.acquireUnitOfWork();
  Alligator alligator=new Alligator();
  alligator.setFavoriteSwamp("String_Node_Str");
  alligator.setLatestVictim(JavaProgrammer.steve());
  unitOfWork.registerObject(alligator);
  manager.registerObject(alligator,"String_Node_Str");
  unitOfWork.commit();
  unitOfWork=session.acquireUnitOfWork();
  Entomologist bugguy=new Entomologist();
  bugguy.setId((int)System.currentTimeMillis());
  bugguy.setName("String_Node_Str");
  bugguy=(Entomologist)unitOfWork.registerObject(bugguy);
  Insect insect=new GrassHopper();
  insect.setIn_numberOfLegs(4);
  insect.setEntomologist(bugguy);
  bugguy.getInsectCollection().add(insect);
  unitOfWork.commit();
}

Fixed version (ground truth):
public void populate(DatabaseSession session){
  PopulationManager manager=PopulationManager.getDefaultManager();
  Cat cat=Cat.example1();
  session.writeObject(cat);
  manager.registerObject(cat,"String_Node_Str");
  Dog dog=Dog.example1();
  session.writeObject(dog);
  manager.registerObject(dog,"String_Node_Str");
  cat=Cat.example2();
  session.writeObject(cat);
  manager.registerObject(cat,"String_Node_Str");
  dog=Dog.example2();
  session.writeObject(dog);
  manager.registerObject(dog,"String_Node_Str");
  cat=Cat.example3();
  session.writeObject(cat);
  manager.registerObject(cat,"String_Node_Str");
  dog=Dog.example3();
  session.writeObject(dog);
  manager.registerObject(dog,"String_Node_Str");
  Company company=Company.example1();
  session.writeObject(company);
  manager.registerObject(company,"String_Node_Str");
  manager.registerObject(((Vector)company.getVehicles().getValue()).firstElement(),"String_Node_Str");
  company=Company.example2();
  session.writeObject(company);
  manager.registerObject(company,"String_Node_Str");
  company=Company.example3();
  session.writeObject(company);
  manager.registerObject(company,"String_Node_Str");
  Person person=Person.example1();
  session.writeObject(person);
  manager.registerObject(person,"String_Node_Str");
  session.writeObject(A_King2.exp1());
  session.writeObject(A_King2.exp2());
  session.writeObject(A_1_King2.exp3());
  session.writeObject(A_2_King2.exp4());
  session.writeObject(A_2_1_King2.exp5());
  UnitOfWork unitOfWork=session.acquireUnitOfWork();
  person=Person.example2();
  unitOfWork.registerObject(person);
  unitOfWork.commit();
  manager.registerObject(person,"String_Node_Str");
  manager.registerObject(person.bestFriend,"String_Node_Str");
  manager.registerObject(person.representitive,"String_Node_Str");
  person=Person.example3();
  session.writeObject(person);
  manager.registerObject(person,"String_Node_Str");
  Computer computer=Computer.example1();
  session.writeObject(computer);
  manager.registerObject(computer,"String_Node_Str");
  computer=Computer.example2();
  session.writeObject(computer);
  manager.registerObject(computer,"String_Node_Str");
  computer=Computer.example3();
  session.writeObject(computer);
  manager.registerObject(computer,"String_Node_Str");
  computer=Computer.example4();
  session.writeObject(computer);
  manager.registerObject(computer,"String_Node_Str");
  computer=Computer.example5();
  session.writeObject(computer);
  manager.registerObject(computer,"String_Node_Str");
  JavaProgrammer JP=JavaProgrammer.example1();
  session.writeObject(JP);
  manager.registerObject(JP,"String_Node_Str");
  JP=JavaProgrammer.example2();
  session.writeObject(JP);
  manager.registerObject(JP,"String_Node_Str");
  unitOfWork=session.acquireUnitOfWork();
  Alligator alligator=new Alligator();
  alligator.setFavoriteSwamp("String_Node_Str");
  alligator.setLatestVictim(JavaProgrammer.steve());
  unitOfWork.registerObject(alligator);
  manager.registerObject(alligator,"String_Node_Str");
  unitOfWork.commit();
  unitOfWork=session.acquireUnitOfWork();
  Entomologist bugguy=new Entomologist();
  bugguy.setId((int)System.currentTimeMillis());
  bugguy.setName("String_Node_Str");
  bugguy=(Entomologist)unitOfWork.registerObject(bugguy);
  GrassHopper insect=new GrassHopper();
  insect.setIn_numberOfLegs(4);
  insect.setGh_maximumJump(5);
  insect.setEntomologist(bugguy);
  bugguy.getInsectCollection().add(insect);
  unitOfWork.commit();
}