Program: 65929
Project: 65929
Buggy source:
public void testCreateMafiaFamily707(){
  EntityManager em=createEntityManager(MULTI_TENANT_PU);
  em.setProperty("String_Node_Str",707);
  em.setProperty("String_Node_Str",707);
  try {
    beginTransaction(em);
    MafiaFamily family=new MafiaFamily();
    family.setName("String_Node_Str");
    family.setRevenue(10000000.00);
    family.addTag("String_Node_Str");
    family.addTag("String_Node_Str");
    family.addTag("String_Node_Str");
    Boss boss=new Boss();
    boss.setFirstName("String_Node_Str");
    boss.setLastName("String_Node_Str");
    boss.setGender(Mafioso.Gender.Male);
    Underboss underboss=new Underboss();
    underboss.setFirstName("String_Node_Str");
    underboss.setLastName("String_Node_Str");
    underboss.setGender(Mafioso.Gender.Male);
    Capo capo1=new Capo();
    capo1.setFirstName("String_Node_Str");
    capo1.setLastName("String_Node_Str");
    capo1.setGender(Mafioso.Gender.Female);
    Capo capo2=new Capo();
    capo2.setFirstName("String_Node_Str");
    capo2.setLastName("String_Node_Str");
    capo2.setGender(Mafioso.Gender.Male);
    Soldier soldier1=new Soldier();
    soldier1.setFirstName("String_Node_Str");
    soldier1.setLastName("String_Node_Str");
    soldier1.setGender(Mafioso.Gender.Female);
    Soldier soldier2=new Soldier();
    soldier2.setFirstName("String_Node_Str");
    soldier2.setLastName("String_Node_Str");
    soldier2.setGender(Mafioso.Gender.Male);
    Soldier soldier3=new Soldier();
    soldier3.setFirstName("String_Node_Str");
    soldier3.setLastName("String_Node_Str");
    soldier3.setGender(Mafioso.Gender.Male);
    Soldier soldier4=new Soldier();
    soldier4.setFirstName("String_Node_Str");
    soldier4.setLastName("String_Node_Str");
    soldier4.setGender(Mafioso.Gender.Male);
    Soldier soldier5=new Soldier();
    soldier5.setFirstName("String_Node_Str");
    soldier5.setLastName("String_Node_Str");
    soldier5.setGender(Mafioso.Gender.Female);
    Contract contract1=new Contract();
    contract1.setDescription("String_Node_Str");
    Contract contract2=new Contract();
    contract2.setDescription("String_Node_Str");
    Contract contract3=new Contract();
    contract3.setDescription("String_Node_Str");
    contract1.addSoldier(soldier1);
    contract1.addSoldier(soldier5);
    contract2.addSoldier(soldier1);
    contract2.addSoldier(soldier3);
    contract2.addSoldier(soldier5);
    contract3.addSoldier(soldier2);
    contract3.addSoldier(soldier3);
    contract3.addSoldier(soldier4);
    contract3.addSoldier(soldier5);
    boss.setUnderboss(underboss);
    capo1.setUnderboss(underboss);
    capo2.setUnderboss(underboss);
    capo1.addSoldier(soldier1);
    capo1.addSoldier(soldier2);
    capo2.addSoldier(soldier3);
    capo2.addSoldier(soldier4);
    capo2.addSoldier(soldier5);
    underboss.addCapo(capo1);
    underboss.addCapo(capo2);
    family.addMafioso(boss);
    family.addMafioso(underboss);
    family.addMafioso(capo1);
    family.addMafioso(capo2);
    family.addMafioso(soldier1);
    family.addMafioso(soldier2);
    family.addMafioso(soldier3);
    family.addMafioso(soldier4);
    family.addMafioso(soldier5);
    em.persist(family);
    family707=family.getId();
    family707Mafiosos.add(boss.getId());
    family707Mafiosos.add(underboss.getId());
    family707Mafiosos.add(capo1.getId());
    family707Mafiosos.add(capo2.getId());
    family707Mafiosos.add(soldier1.getId());
    family707Mafiosos.add(soldier2.getId());
    family707Mafiosos.add(soldier3.getId());
    family707Mafiosos.add(soldier4.getId());
    family707Mafiosos.add(soldier5.getId());
    family707Contracts.add(contract1.getId());
    family707Contracts.add(contract2.getId());
    family707Contracts.add(contract3.getId());
    commitTransaction(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    throw e;
  }
 finally {
    closeEntityManager(em);
  }
}

Fixed version (ground truth):
public void testCreateMafiaFamily707(){
  EntityManager em=createEntityManager(MULTI_TENANT_PU);
  em.setProperty("String_Node_Str","String_Node_Str");
  em.setProperty("String_Node_Str","String_Node_Str");
  try {
    beginTransaction(em);
    MafiaFamily family=new MafiaFamily();
    family.setName("String_Node_Str");
    family.setRevenue(10000000.00);
    family.addTag("String_Node_Str");
    family.addTag("String_Node_Str");
    family.addTag("String_Node_Str");
    Boss boss=new Boss();
    boss.setFirstName("String_Node_Str");
    boss.setLastName("String_Node_Str");
    boss.setGender(Mafioso.Gender.Male);
    Underboss underboss=new Underboss();
    underboss.setFirstName("String_Node_Str");
    underboss.setLastName("String_Node_Str");
    underboss.setGender(Mafioso.Gender.Male);
    Capo capo1=new Capo();
    capo1.setFirstName("String_Node_Str");
    capo1.setLastName("String_Node_Str");
    capo1.setGender(Mafioso.Gender.Female);
    Capo capo2=new Capo();
    capo2.setFirstName("String_Node_Str");
    capo2.setLastName("String_Node_Str");
    capo2.setGender(Mafioso.Gender.Male);
    Soldier soldier1=new Soldier();
    soldier1.setFirstName("String_Node_Str");
    soldier1.setLastName("String_Node_Str");
    soldier1.setGender(Mafioso.Gender.Female);
    Soldier soldier2=new Soldier();
    soldier2.setFirstName("String_Node_Str");
    soldier2.setLastName("String_Node_Str");
    soldier2.setGender(Mafioso.Gender.Male);
    Soldier soldier3=new Soldier();
    soldier3.setFirstName("String_Node_Str");
    soldier3.setLastName("String_Node_Str");
    soldier3.setGender(Mafioso.Gender.Male);
    Soldier soldier4=new Soldier();
    soldier4.setFirstName("String_Node_Str");
    soldier4.setLastName("String_Node_Str");
    soldier4.setGender(Mafioso.Gender.Male);
    Soldier soldier5=new Soldier();
    soldier5.setFirstName("String_Node_Str");
    soldier5.setLastName("String_Node_Str");
    soldier5.setGender(Mafioso.Gender.Female);
    Contract contract1=new Contract();
    contract1.setDescription("String_Node_Str");
    Contract contract2=new Contract();
    contract2.setDescription("String_Node_Str");
    Contract contract3=new Contract();
    contract3.setDescription("String_Node_Str");
    contract1.addSoldier(soldier1);
    contract1.addSoldier(soldier5);
    contract2.addSoldier(soldier1);
    contract2.addSoldier(soldier3);
    contract2.addSoldier(soldier5);
    contract3.addSoldier(soldier2);
    contract3.addSoldier(soldier3);
    contract3.addSoldier(soldier4);
    contract3.addSoldier(soldier5);
    boss.setUnderboss(underboss);
    capo1.setUnderboss(underboss);
    capo2.setUnderboss(underboss);
    capo1.addSoldier(soldier1);
    capo1.addSoldier(soldier2);
    capo2.addSoldier(soldier3);
    capo2.addSoldier(soldier4);
    capo2.addSoldier(soldier5);
    underboss.addCapo(capo1);
    underboss.addCapo(capo2);
    family.addMafioso(boss);
    family.addMafioso(underboss);
    family.addMafioso(capo1);
    family.addMafioso(capo2);
    family.addMafioso(soldier1);
    family.addMafioso(soldier2);
    family.addMafioso(soldier3);
    family.addMafioso(soldier4);
    family.addMafioso(soldier5);
    em.persist(family);
    family707=family.getId();
    family707Mafiosos.add(boss.getId());
    family707Mafiosos.add(underboss.getId());
    family707Mafiosos.add(capo1.getId());
    family707Mafiosos.add(capo2.getId());
    family707Mafiosos.add(soldier1.getId());
    family707Mafiosos.add(soldier2.getId());
    family707Mafiosos.add(soldier3.getId());
    family707Mafiosos.add(soldier4.getId());
    family707Mafiosos.add(soldier5.getId());
    family707Contracts.add(contract1.getId());
    family707Contracts.add(contract2.getId());
    family707Contracts.add(contract3.getId());
    commitTransaction(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    throw e;
  }
 finally {
    closeEntityManager(em);
  }
}