Program: 65932
Project: 65932
Buggy source:
public void testCreateMafiaFamily007(){
  EntityManager em=createEntityManager(MULTI_TENANT_PU);
  em.setProperty("String_Node_Str",007);
  em.setProperty("String_Node_Str",007);
  try {
    beginTransaction(em);
    MafiaFamily family=new MafiaFamily();
    family.setName("String_Node_Str");
    family.setRevenue(987654321.03);
    family.addTag("String_Node_Str");
    family.addTag("String_Node_Str");
    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.Female);
    Underboss underboss=new Underboss();
    underboss.setFirstName("String_Node_Str");
    underboss.setLastName("String_Node_Str");
    underboss.setGender(Mafioso.Gender.Female);
    Capo capo1=new Capo();
    capo1.setFirstName("String_Node_Str");
    capo1.setLastName("String_Node_Str");
    capo1.setGender(Mafioso.Gender.Male);
    Capo capo2=new Capo();
    capo2.setFirstName("String_Node_Str");
    capo2.setLastName("String_Node_Str");
    capo2.setGender(Mafioso.Gender.Female);
    Soldier soldier1=new Soldier();
    soldier1.setFirstName("String_Node_Str");
    soldier1.setLastName("String_Node_Str");
    soldier1.setGender(Mafioso.Gender.Male);
    Soldier soldier2=new Soldier();
    soldier2.setFirstName("String_Node_Str");
    soldier2.setLastName("String_Node_Str");
    soldier2.setGender(Mafioso.Gender.Female);
    Soldier soldier3=new Soldier();
    soldier3.setFirstName("String_Node_Str");
    soldier3.setLastName("String_Node_Str");
    soldier3.setGender(Mafioso.Gender.Female);
    Soldier soldier4=new Soldier();
    soldier4.setFirstName("String_Node_Str");
    soldier4.setLastName("String_Node_Str");
    soldier4.setGender(Mafioso.Gender.Female);
    Soldier soldier5=new Soldier();
    soldier5.setFirstName("String_Node_Str");
    soldier5.setLastName("String_Node_Str");
    soldier5.setGender(Mafioso.Gender.Male);
    Soldier soldier6=new Soldier();
    soldier6.setFirstName("String_Node_Str");
    soldier6.setLastName("String_Node_Str");
    soldier6.setGender(Mafioso.Gender.Male);
    Soldier soldier7=new Soldier();
    soldier7.setFirstName("String_Node_Str");
    soldier7.setLastName("String_Node_Str");
    soldier7.setGender(Mafioso.Gender.Male);
    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(soldier7);
    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);
    capo2.addSoldier(soldier6);
    capo2.addSoldier(soldier7);
    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);
    family.addMafioso(soldier6);
    family.addMafioso(soldier7);
    em.persist(family);
    family007=family.getId();
    family007Mafiosos.add(boss.getId());
    family007Mafiosos.add(underboss.getId());
    family007Mafiosos.add(capo1.getId());
    family007Mafiosos.add(capo2.getId());
    family007Mafiosos.add(soldier1.getId());
    family007Mafiosos.add(soldier2.getId());
    family007Mafiosos.add(soldier3.getId());
    family007Mafiosos.add(soldier4.getId());
    family007Mafiosos.add(soldier5.getId());
    family007Mafiosos.add(soldier6.getId());
    family007Mafiosos.add(soldier7.getId());
    family007Contracts.add(contract1.getId());
    family007Contracts.add(contract2.getId());
    family007Contracts.add(contract3.getId());
    commitTransaction(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    throw e;
  }
 finally {
    closeEntityManager(em);
  }
}

Fixed version (ground truth):
public void testCreateMafiaFamily007(){
  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(987654321.03);
    family.addTag("String_Node_Str");
    family.addTag("String_Node_Str");
    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.Female);
    Underboss underboss=new Underboss();
    underboss.setFirstName("String_Node_Str");
    underboss.setLastName("String_Node_Str");
    underboss.setGender(Mafioso.Gender.Female);
    Capo capo1=new Capo();
    capo1.setFirstName("String_Node_Str");
    capo1.setLastName("String_Node_Str");
    capo1.setGender(Mafioso.Gender.Male);
    Capo capo2=new Capo();
    capo2.setFirstName("String_Node_Str");
    capo2.setLastName("String_Node_Str");
    capo2.setGender(Mafioso.Gender.Female);
    Soldier soldier1=new Soldier();
    soldier1.setFirstName("String_Node_Str");
    soldier1.setLastName("String_Node_Str");
    soldier1.setGender(Mafioso.Gender.Male);
    Soldier soldier2=new Soldier();
    soldier2.setFirstName("String_Node_Str");
    soldier2.setLastName("String_Node_Str");
    soldier2.setGender(Mafioso.Gender.Female);
    Soldier soldier3=new Soldier();
    soldier3.setFirstName("String_Node_Str");
    soldier3.setLastName("String_Node_Str");
    soldier3.setGender(Mafioso.Gender.Female);
    Soldier soldier4=new Soldier();
    soldier4.setFirstName("String_Node_Str");
    soldier4.setLastName("String_Node_Str");
    soldier4.setGender(Mafioso.Gender.Female);
    Soldier soldier5=new Soldier();
    soldier5.setFirstName("String_Node_Str");
    soldier5.setLastName("String_Node_Str");
    soldier5.setGender(Mafioso.Gender.Male);
    Soldier soldier6=new Soldier();
    soldier6.setFirstName("String_Node_Str");
    soldier6.setLastName("String_Node_Str");
    soldier6.setGender(Mafioso.Gender.Male);
    Soldier soldier7=new Soldier();
    soldier7.setFirstName("String_Node_Str");
    soldier7.setLastName("String_Node_Str");
    soldier7.setGender(Mafioso.Gender.Male);
    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(soldier7);
    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);
    capo2.addSoldier(soldier6);
    capo2.addSoldier(soldier7);
    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);
    family.addMafioso(soldier6);
    family.addMafioso(soldier7);
    em.persist(family);
    family007=family.getId();
    family007Mafiosos.add(boss.getId());
    family007Mafiosos.add(underboss.getId());
    family007Mafiosos.add(capo1.getId());
    family007Mafiosos.add(capo2.getId());
    family007Mafiosos.add(soldier1.getId());
    family007Mafiosos.add(soldier2.getId());
    family007Mafiosos.add(soldier3.getId());
    family007Mafiosos.add(soldier4.getId());
    family007Mafiosos.add(soldier5.getId());
    family007Mafiosos.add(soldier6.getId());
    family007Mafiosos.add(soldier7.getId());
    family007Contracts.add(contract1.getId());
    family007Contracts.add(contract2.getId());
    family007Contracts.add(contract3.getId());
    commitTransaction(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    throw e;
  }
 finally {
    closeEntityManager(em);
  }
}