Program: 65920
Project: 65920
Buggy source:
public void testElementCollectionClear(){
  EntityManager em=createEntityManager();
  beginTransaction(em);
  try {
    SimpleEntity se=new SimpleEntity();
    se.setId(101L);
    se.setDescription("String_Node_Str");
    Collection<String> nature=new ArrayList<String>();
    nature.add(SimpleNature.PERSONALITY[0]);
    nature.add(SimpleNature.PERSONALITY[1]);
    nature.add(SimpleNature.PERSONALITY[2]);
    nature.add(SimpleNature.PERSONALITY[3]);
    nature.add(SimpleNature.PERSONALITY[4]);
    nature.add(SimpleNature.PERSONALITY[5]);
    se.setSimpleNature(nature);
    em.persist(se);
    commitTransaction(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    throw e;
  }
 finally {
    closeEntityManager(em);
  }
  clearCache();
  em=createEntityManager();
  beginTransaction(em);
  SimpleEntity se;
  try {
    se=em.find(SimpleEntity.class,101L);
    em.clear();
    closeEntityManager(em);
    se.getSimpleNature().clear();
    em=createEntityManager();
    beginTransaction(em);
    em.merge(se);
    commitTransaction(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    throw e;
  }
 finally {
    closeEntityManager(em);
  }
  clearCache();
  em=createEntityManager();
  beginTransaction(em);
  try {
    se=em.find(SimpleEntity.class,101L);
    Collection<String> natureList=se.getSimpleNature();
    int count=0;
    for (    String nature : natureList) {
      count++;
    }
    Assert.assertEquals("String_Node_Str",0,count);
  }
 catch (  RuntimeException e) {
    throw e;
  }
 finally {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    closeEntityManager(em);
  }
}

Fixed version (ground truth):
public void testElementCollectionClear(){
  EntityManager em=createEntityManager();
  beginTransaction(em);
  try {
    SimpleEntity se=new SimpleEntity();
    se.setId(101L);
    se.setDescription("String_Node_Str");
    Collection<String> nature=new ArrayList<String>();
    nature.add(SimpleNature.PERSONALITY[0]);
    nature.add(SimpleNature.PERSONALITY[1]);
    nature.add(SimpleNature.PERSONALITY[2]);
    nature.add(SimpleNature.PERSONALITY[3]);
    nature.add(SimpleNature.PERSONALITY[4]);
    nature.add(SimpleNature.PERSONALITY[5]);
    se.setSimpleNature(nature);
    em.persist(se);
    commitTransaction(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    throw e;
  }
 finally {
    closeEntityManager(em);
  }
  clearCache();
  em=createEntityManager();
  SimpleEntity se;
  try {
    se=em.find(SimpleEntity.class,101L);
    em.clear();
    closeEntityManager(em);
    se.getSimpleNature().clear();
    em=createEntityManager();
    beginTransaction(em);
    em.merge(se);
    commitTransaction(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    throw e;
  }
 finally {
    closeEntityManager(em);
  }
  clearCache();
  em=createEntityManager();
  beginTransaction(em);
  try {
    se=em.find(SimpleEntity.class,101L);
    Collection<String> natureList=se.getSimpleNature();
    int count=0;
    for (    String nature : natureList) {
      count++;
    }
    Assert.assertEquals("String_Node_Str",0,count);
  }
 catch (  RuntimeException e) {
    throw e;
  }
 finally {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    closeEntityManager(em);
  }
}