Program: 67863
Project: 67863
Buggy source:
public void test() throws Exception {
  try {
    HockeyTeam team1=new HockeyTeam();
    team1.setName("String_Node_Str");
    team1.setAwayColor("String_Node_Str");
    team1.setHomeColor("String_Node_Str");
    team1.setLevel("String_Node_Str");
    HockeyTeam team2=new HockeyTeam();
    team2.setName("String_Node_Str");
    team2.setAwayColor("String_Node_Str");
    team2.setHomeColor("String_Node_Str");
    team2.setLevel("String_Node_Str");
    HockeyTeam team3=new HockeyTeam();
    team3.setName("String_Node_Str");
    team3.setAwayColor("String_Node_Str");
    team3.setHomeColor("String_Node_Str");
    team3.setLevel("String_Node_Str");
    HockeyPlayer player1=new HockeyPlayer();
    player1.setFirstName("String_Node_Str");
    player1.setLastName("String_Node_Str");
    PersonalVitals personalVitals1=new PersonalVitals();
    personalVitals1.setAge(29);
    personalVitals1.setHeight(1.80);
    personalVitals1.setWeight(180);
    TeamVitals teamVitals1=new TeamVitals();
    teamVitals1.setHockeyTeam(team2);
    team2.getPlayers().add(player1);
    teamVitals1.setJerseyNumber(20);
    teamVitals1.setPosition("String_Node_Str");
    teamVitals1.getRoles().add(new Role("String_Node_Str"));
    Vitals vitals1=new Vitals();
    vitals1.setPersonalVitals(personalVitals1);
    vitals1.setTeamVitals(teamVitals1);
    player1.setVitals(vitals1);
    HockeyPlayer player2=new HockeyPlayer();
    player2.setFirstName("String_Node_Str");
    player2.setLastName("String_Node_Str");
    PersonalVitals personalVitals2=new PersonalVitals();
    personalVitals2.setAge(35);
    personalVitals2.setHeight(1.77);
    personalVitals2.setWeight(165);
    TeamVitals teamVitals2=new TeamVitals();
    teamVitals2.setHockeyTeam(team1);
    team1.getPlayers().add(player2);
    teamVitals2.setJerseyNumber(70);
    teamVitals2.setPosition("String_Node_Str");
    teamVitals2.getRoles().add(new Role("String_Node_Str"));
    teamVitals2.getRoles().add(new Role("String_Node_Str"));
    Vitals vitals2=new Vitals();
    vitals2.setPersonalVitals(personalVitals2);
    vitals2.setTeamVitals(teamVitals2);
    player2.setVitals(vitals2);
    HockeyPlayer player3=new HockeyPlayer();
    player3.setFirstName("String_Node_Str");
    player3.setLastName("String_Node_Str");
    PersonalVitals personalVitals3=new PersonalVitals();
    personalVitals3.setAge(30);
    personalVitals3.setHeight(1.83);
    personalVitals3.setWeight(200);
    TeamVitals teamVitals3=new TeamVitals();
    teamVitals3.setHockeyTeam(team1);
    team1.getPlayers().add(player3);
    teamVitals3.setJerseyNumber(12);
    teamVitals3.setPosition("String_Node_Str");
    teamVitals3.getRoles().add(new Role("String_Node_Str"));
    Vitals vitals3=new Vitals();
    vitals3.setPersonalVitals(personalVitals3);
    vitals3.setTeamVitals(teamVitals3);
    player3.setVitals(vitals3);
    HockeyPlayer player4=new HockeyPlayer();
    player4.setFirstName("String_Node_Str");
    player4.setLastName("String_Node_Str");
    PersonalVitals personalVitals4=new PersonalVitals();
    personalVitals4.setAge(32);
    personalVitals4.setHeight(1.86);
    personalVitals4.setWeight(210);
    TeamVitals teamVitals4=new TeamVitals();
    teamVitals4.setHockeyTeam(team3);
    team3.getPlayers().add(player4);
    teamVitals4.setJerseyNumber(6);
    teamVitals4.setPosition("String_Node_Str");
    teamVitals4.getRoles().add(new Role("String_Node_Str"));
    teamVitals4.getRoles().add(new Role("String_Node_Str"));
    Vitals vitals4=new Vitals();
    vitals4.setPersonalVitals(personalVitals4);
    vitals4.setTeamVitals(teamVitals4);
    player4.setVitals(vitals4);
    HockeyPlayer player5=new HockeyPlayer();
    player5.setFirstName("String_Node_Str");
    player5.setLastName("String_Node_Str");
    PersonalVitals personalVitals5=new PersonalVitals();
    personalVitals5.setAge(31);
    personalVitals5.setHeight(1.80);
    personalVitals5.setWeight(205);
    TeamVitals teamVitals5=new TeamVitals();
    teamVitals5.setHockeyTeam(team3);
    team3.getPlayers().add(player5);
    teamVitals5.setJerseyNumber(7);
    teamVitals5.setPosition("String_Node_Str");
    Vitals vitals5=new Vitals();
    vitals5.setPersonalVitals(personalVitals5);
    vitals5.setTeamVitals(teamVitals5);
    player5.setVitals(vitals5);
    HockeyPlayer player6=new HockeyPlayer();
    player6.setFirstName("String_Node_Str");
    player6.setLastName("String_Node_Str");
    PersonalVitals personalVitals6=new PersonalVitals();
    personalVitals6.setAge(32);
    personalVitals6.setHeight(1.83);
    personalVitals6.setWeight(190);
    TeamVitals teamVitals6=new TeamVitals();
    teamVitals6.setHockeyTeam(team2);
    team2.getPlayers().add(player6);
    teamVitals6.setJerseyNumber(17);
    teamVitals6.setPosition("String_Node_Str");
    Vitals vitals6=new Vitals();
    vitals6.setPersonalVitals(personalVitals6);
    vitals6.setTeamVitals(teamVitals6);
    player6.setVitals(vitals6);
    HockeyCoach coach1=new HockeyCoach();
    coach1.setFirstName("String_Node_Str");
    coach1.setLastName("String_Node_Str");
    PersonalVitals coachPersonalVitals1=new PersonalVitals();
    coachPersonalVitals1.setAge(55);
    coachPersonalVitals1.setHeight(1.85);
    coachPersonalVitals1.setWeight(200);
    CoachVitals coachVitals1=new CoachVitals();
    coachVitals1.setPersonalVitals(coachPersonalVitals1);
    coachVitals1.setHockeyTeam(team1);
    team1.getCoaches().add(coach1);
    coach1.setVitals(coachVitals1);
    HockeyCoach coach2=new HockeyCoach();
    coach2.setFirstName("String_Node_Str");
    coach2.setLastName("String_Node_Str");
    PersonalVitals coachPersonalVitals2=new PersonalVitals();
    coachPersonalVitals2.setAge(63);
    coachPersonalVitals2.setHeight(1.86);
    coachPersonalVitals2.setWeight(213);
    CoachVitals coachVitals2=new CoachVitals();
    coachVitals2.setPersonalVitals(coachPersonalVitals2);
    coachVitals2.setHockeyTeam(team2);
    team2.getCoaches().add(coach2);
    coach2.setVitals(coachVitals2);
    HockeyCoach coach3=new HockeyCoach();
    coach3.setFirstName("String_Node_Str");
    coach3.setLastName("String_Node_Str");
    PersonalVitals coachPersonalVitals3=new PersonalVitals();
    coachPersonalVitals3.setAge(47);
    coachPersonalVitals3.setHeight(1.91);
    coachPersonalVitals3.setWeight(191);
    CoachVitals coachVitals3=new CoachVitals();
    coachVitals3.setPersonalVitals(coachPersonalVitals3);
    coachVitals3.setHockeyTeam(team3);
    team3.getCoaches().add(coach3);
    coach3.setVitals(coachVitals3);
    beginTransaction();
    try {
      getEntityManager().persist(team1);
      teamIDs[0]=team1.getId();
      getEntityManager().persist(team2);
      teamIDs[1]=team2.getId();
      getEntityManager().persist(team3);
      teamIDs[2]=team3.getId();
      getEntityManager().persist(player1);
      getEntityManager().persist(player2);
      getEntityManager().persist(player3);
      getEntityManager().persist(player4);
      getEntityManager().persist(player5);
      getEntityManager().persist(player6);
      getEntityManager().persist(coach1);
      getEntityManager().persist(coach2);
      getEntityManager().persist(coach3);
      commitTransaction();
    }
 catch (    RuntimeException ex) {
      rollbackTransaction();
      throw ex;
    }
  }
 catch (  DatabaseException e) {
    throw new TestErrorException("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
public void test() throws Exception {
  try {
    HockeyTeam team1=new HockeyTeam();
    team1.setName("String_Node_Str");
    team1.setAwayColor("String_Node_Str");
    team1.setHomeColor("String_Node_Str");
    team1.setLevel("String_Node_Str");
    HockeyTeam team2=new HockeyTeam();
    team2.setName("String_Node_Str");
    team2.setAwayColor("String_Node_Str");
    team2.setHomeColor("String_Node_Str");
    team2.setLevel("String_Node_Str");
    HockeyTeam team3=new HockeyTeam();
    team3.setName("String_Node_Str");
    team3.setAwayColor("String_Node_Str");
    team3.setHomeColor("String_Node_Str");
    team3.setLevel("String_Node_Str");
    HockeyPlayer player1=new HockeyPlayer();
    player1.setFirstName("String_Node_Str");
    player1.setLastName("String_Node_Str");
    PersonalVitals personalVitals1=new PersonalVitals();
    personalVitals1.setAge(29);
    personalVitals1.setHeight(1.80);
    personalVitals1.setWeight(180);
    TeamVitals teamVitals1=new TeamVitals();
    teamVitals1.setHockeyTeam(team2);
    team2.getPlayers().add(player1);
    teamVitals1.setJerseyNumber(20);
    teamVitals1.setPosition("String_Node_Str");
    teamVitals1.getRoles().add(new Role("String_Node_Str"));
    Vitals vitals1=new Vitals();
    vitals1.setPersonalVitals(personalVitals1);
    vitals1.setTeamVitals(teamVitals1);
    player1.setVitals(vitals1);
    HockeyPlayer player2=new HockeyPlayer();
    player2.setFirstName("String_Node_Str");
    player2.setLastName("String_Node_Str");
    PersonalVitals personalVitals2=new PersonalVitals();
    personalVitals2.setAge(35);
    personalVitals2.setHeight(1.77);
    personalVitals2.setWeight(165);
    TeamVitals teamVitals2=new TeamVitals();
    teamVitals2.setHockeyTeam(team1);
    team1.getPlayers().add(player2);
    teamVitals2.setJerseyNumber(70);
    teamVitals2.setPosition("String_Node_Str");
    teamVitals2.getRoles().add(new Role("String_Node_Str"));
    teamVitals2.getRoles().add(new Role("String_Node_Str"));
    Vitals vitals2=new Vitals();
    vitals2.setPersonalVitals(personalVitals2);
    vitals2.setTeamVitals(teamVitals2);
    player2.setVitals(vitals2);
    HockeyPlayer player3=new HockeyPlayer();
    player3.setFirstName("String_Node_Str");
    player3.setLastName("String_Node_Str");
    PersonalVitals personalVitals3=new PersonalVitals();
    personalVitals3.setAge(30);
    personalVitals3.setHeight(1.83);
    personalVitals3.setWeight(200);
    TeamVitals teamVitals3=new TeamVitals();
    teamVitals3.setHockeyTeam(team1);
    team1.getPlayers().add(player3);
    teamVitals3.setJerseyNumber(12);
    teamVitals3.setPosition("String_Node_Str");
    teamVitals3.getRoles().add(new Role("String_Node_Str"));
    Vitals vitals3=new Vitals();
    vitals3.setPersonalVitals(personalVitals3);
    vitals3.setTeamVitals(teamVitals3);
    player3.setVitals(vitals3);
    HockeyPlayer player4=new HockeyPlayer();
    player4.setFirstName("String_Node_Str");
    player4.setLastName("String_Node_Str");
    PersonalVitals personalVitals4=new PersonalVitals();
    personalVitals4.setAge(32);
    personalVitals4.setHeight(1.86);
    personalVitals4.setWeight(210);
    TeamVitals teamVitals4=new TeamVitals();
    teamVitals4.setHockeyTeam(team3);
    team3.getPlayers().add(player4);
    teamVitals4.setJerseyNumber(6);
    teamVitals4.setPosition("String_Node_Str");
    teamVitals4.getRoles().add(new Role("String_Node_Str"));
    teamVitals4.getRoles().add(new Role("String_Node_Str"));
    Vitals vitals4=new Vitals();
    vitals4.setPersonalVitals(personalVitals4);
    vitals4.setTeamVitals(teamVitals4);
    player4.setVitals(vitals4);
    HockeyPlayer player5=new HockeyPlayer();
    player5.setFirstName("String_Node_Str");
    player5.setLastName("String_Node_Str");
    PersonalVitals personalVitals5=new PersonalVitals();
    personalVitals5.setAge(31);
    personalVitals5.setHeight(1.80);
    personalVitals5.setWeight(205);
    TeamVitals teamVitals5=new TeamVitals();
    teamVitals5.setHockeyTeam(team3);
    team3.getPlayers().add(player5);
    teamVitals5.setJerseyNumber(7);
    teamVitals5.setPosition("String_Node_Str");
    Vitals vitals5=new Vitals();
    vitals5.setPersonalVitals(personalVitals5);
    vitals5.setTeamVitals(teamVitals5);
    player5.setVitals(vitals5);
    HockeyPlayer player6=new HockeyPlayer();
    player6.setFirstName("String_Node_Str");
    player6.setLastName("String_Node_Str");
    PersonalVitals personalVitals6=new PersonalVitals();
    personalVitals6.setAge(32);
    personalVitals6.setHeight(1.83);
    personalVitals6.setWeight(190);
    TeamVitals teamVitals6=new TeamVitals();
    teamVitals6.setHockeyTeam(team2);
    team2.getPlayers().add(player6);
    teamVitals6.setJerseyNumber(17);
    teamVitals6.setPosition("String_Node_Str");
    Vitals vitals6=new Vitals();
    vitals6.setPersonalVitals(personalVitals6);
    vitals6.setTeamVitals(teamVitals6);
    player6.setVitals(vitals6);
    HockeyCoach coach1=new HockeyCoach();
    coach1.setFirstName("String_Node_Str");
    coach1.setLastName("String_Node_Str");
    PersonalVitals coachPersonalVitals1=new PersonalVitals();
    coachPersonalVitals1.setAge(55);
    coachPersonalVitals1.setHeight(1.85);
    coachPersonalVitals1.setWeight(200);
    CoachVitals coachVitals1=new CoachVitals();
    coachVitals1.setPersonalVitals(coachPersonalVitals1);
    coachVitals1.setHockeyTeam(team1);
    team1.getCoaches().add(coach1);
    coach1.setVitals(coachVitals1);
    HockeyCoach coach2=new HockeyCoach();
    coach2.setFirstName("String_Node_Str");
    coach2.setLastName("String_Node_Str");
    PersonalVitals coachPersonalVitals2=new PersonalVitals();
    coachPersonalVitals2.setAge(63);
    coachPersonalVitals2.setHeight(1.86);
    coachPersonalVitals2.setWeight(213);
    CoachVitals coachVitals2=new CoachVitals();
    coachVitals2.setPersonalVitals(coachPersonalVitals2);
    coachVitals2.setHockeyTeam(team2);
    team2.getCoaches().add(coach2);
    coach2.setVitals(coachVitals2);
    HockeyCoach coach3=new HockeyCoach();
    coach3.setFirstName("String_Node_Str");
    coach3.setLastName("String_Node_Str");
    PersonalVitals coachPersonalVitals3=new PersonalVitals();
    coachPersonalVitals3.setAge(47);
    coachPersonalVitals3.setHeight(1.91);
    coachPersonalVitals3.setWeight(191);
    CoachVitals coachVitals3=new CoachVitals();
    coachVitals3.setPersonalVitals(coachPersonalVitals3);
    coachVitals3.setHockeyTeam(team3);
    team3.getCoaches().add(coach3);
    coach3.setVitals(coachVitals3);
    HockeyCoach coach4=new HockeyCoach();
    coach4.setFirstName("String_Node_Str");
    coach4.setLastName("String_Node_Str");
    PersonalVitals coachPersonalVitals4=new PersonalVitals();
    coachPersonalVitals4.setAge(67);
    coachPersonalVitals4.setHeight(1.94);
    coachPersonalVitals4.setWeight(187);
    CoachVitals coachVitals4=new CoachVitals();
    coachVitals4.setPersonalVitals(coachPersonalVitals4);
    coachVitals4.setHockeyTeam(team1);
    team1.getCoaches().add(coach4);
    coach4.setVitals(coachVitals4);
    HockeyCoach coach5=new HockeyCoach();
    coach5.setFirstName("String_Node_Str");
    coach5.setLastName("String_Node_Str");
    PersonalVitals coachPersonalVitals5=new PersonalVitals();
    coachPersonalVitals5.setAge(33);
    coachPersonalVitals5.setHeight(1.67);
    coachPersonalVitals5.setWeight(155);
    CoachVitals coachVitals5=new CoachVitals();
    coachVitals5.setPersonalVitals(coachPersonalVitals5);
    coachVitals5.setHockeyTeam(team2);
    team2.getCoaches().add(coach5);
    coach5.setVitals(coachVitals5);
    HockeyCoach coach6=new HockeyCoach();
    coach6.setFirstName("String_Node_Str");
    coach6.setLastName("String_Node_Str");
    PersonalVitals coachPersonalVitals6=new PersonalVitals();
    coachPersonalVitals6.setAge(37);
    coachPersonalVitals6.setHeight(1.77);
    coachPersonalVitals6.setWeight(179);
    CoachVitals coachVitals6=new CoachVitals();
    coachVitals6.setPersonalVitals(coachPersonalVitals5);
    coachVitals6.setHockeyTeam(team3);
    team3.getCoaches().add(coach6);
    coach6.setVitals(coachVitals6);
    beginTransaction();
    try {
      getEntityManager().persist(team1);
      teamIDs[0]=team1.getId();
      getEntityManager().persist(team2);
      teamIDs[1]=team2.getId();
      getEntityManager().persist(team3);
      teamIDs[2]=team3.getId();
      getEntityManager().persist(player1);
      getEntityManager().persist(player2);
      getEntityManager().persist(player3);
      getEntityManager().persist(player4);
      getEntityManager().persist(player5);
      getEntityManager().persist(player6);
      getEntityManager().persist(coach1);
      getEntityManager().persist(coach2);
      getEntityManager().persist(coach3);
      getEntityManager().persist(coach4);
      getEntityManager().persist(coach5);
      getEntityManager().persist(coach6);
      commitTransaction();
    }
 catch (    RuntimeException ex) {
      rollbackTransaction();
      throw ex;
    }
  }
 catch (  DatabaseException e) {
    throw new TestErrorException("String_Node_Str" + e.getMessage());
  }
}