Program: 176387
Project: 176387
Buggy source:
/** 
 * Gets the entity manager factory.
 * @param useLucene
 * @param property
 * @return the entity manager factory
 */
private EntityManagerFactoryImpl getEntityManagerFactory(String property){
  ClientMetadata clientMetadata=new ClientMetadata();
  Map<String,Object> props=new HashMap<String,Object>();
  props.put(Constants.PERSISTENCE_UNIT_NAME,persistenceUnit);
  props.put(PersistenceProperties.KUNDERA_CLIENT_FACTORY,CoreTestClientFactory.class.getName());
  props.put(PersistenceProperties.KUNDERA_NODES,"String_Node_Str");
  props.put(PersistenceProperties.KUNDERA_PORT,"String_Node_Str");
  props.put(PersistenceProperties.KUNDERA_KEYSPACE,"String_Node_Str");
  clientMetadata.setLuceneIndexDir(null);
  KunderaMetadata.INSTANCE.setApplicationMetadata(null);
  ApplicationMetadata appMetadata=KunderaMetadata.INSTANCE.getApplicationMetadata();
  PersistenceUnitMetadata puMetadata=new PersistenceUnitMetadata();
  puMetadata.setPersistenceUnitName(persistenceUnit);
  Properties p=new Properties();
  p.putAll(props);
  puMetadata.setProperties(p);
  Map<String,PersistenceUnitMetadata> metadata=new HashMap<String,PersistenceUnitMetadata>();
  metadata.put(persistenceUnit,puMetadata);
  appMetadata.addPersistenceUnitMetadata(metadata);
  Map<String,List<String>> clazzToPu=new HashMap<String,List<String>>();
  List<String> pus=new ArrayList<String>();
  pus.add(persistenceUnit);
  clazzToPu.put(Employe.class.getName(),pus);
  clazzToPu.put(KunderaUser.class.getName(),pus);
  appMetadata.setClazzToPuMap(clazzToPu);
  EntityMetadata m=new EntityMetadata(Employe.class);
  EntityMetadata m1=new EntityMetadata(KunderaUser.class);
  TableProcessor processor=new TableProcessor(null);
  processor.process(Employe.class,m);
  processor.process(KunderaUser.class,m1);
  IndexProcessor indexProcessor=new IndexProcessor();
  indexProcessor.process(Employe.class,m);
  indexProcessor.process(KunderaUser.class,m1);
  m.setPersistenceUnit(persistenceUnit);
  MetamodelImpl metaModel=new MetamodelImpl();
  metaModel.addEntityMetadata(Employe.class,m);
  metaModel.addEntityMetadata(KunderaUser.class,m1);
  appMetadata.getMetamodelMap().put(persistenceUnit,metaModel);
  metaModel.assignManagedTypes(appMetadata.getMetaModelBuilder(persistenceUnit).getManagedTypes());
  metaModel.assignEmbeddables(appMetadata.getMetaModelBuilder(persistenceUnit).getEmbeddables());
  metaModel.assignMappedSuperClass(appMetadata.getMetaModelBuilder(persistenceUnit).getMappedSuperClassTypes());
  String[] persistenceUnits=new String[]{persistenceUnit};
  new ClientFactoryConfiguraton(null,persistenceUnits).configure();
  new SchemaConfiguration(null,persistenceUnits).configure();
  return null;
}

Fixed version (ground truth):
/** 
 * Gets the entity manager factory.
 * @param useLucene
 * @param property
 * @return the entity manager factory
 */
private EntityManagerFactoryImpl getEntityManagerFactory(String property){
  ClientMetadata clientMetadata=new ClientMetadata();
  Map<String,Object> props=new HashMap<String,Object>();
  props.put(Constants.PERSISTENCE_UNIT_NAME,persistenceUnit);
  props.put(PersistenceProperties.KUNDERA_CLIENT_FACTORY,CoreTestClientFactory.class.getName());
  props.put(PersistenceProperties.KUNDERA_NODES,"String_Node_Str");
  props.put(PersistenceProperties.KUNDERA_PORT,"String_Node_Str");
  props.put(PersistenceProperties.KUNDERA_KEYSPACE,"String_Node_Str");
  clientMetadata.setLuceneIndexDir(null);
  KunderaMetadata.INSTANCE.setApplicationMetadata(null);
  ApplicationMetadata appMetadata=KunderaMetadata.INSTANCE.getApplicationMetadata();
  PersistenceUnitMetadata puMetadata=new PersistenceUnitMetadata();
  puMetadata.setPersistenceUnitName(persistenceUnit);
  Properties p=new Properties();
  p.putAll(props);
  puMetadata.setProperties(p);
  Map<String,PersistenceUnitMetadata> metadata=new HashMap<String,PersistenceUnitMetadata>();
  metadata.put(persistenceUnit,puMetadata);
  appMetadata.addPersistenceUnitMetadata(metadata);
  Map<String,List<String>> clazzToPu=new HashMap<String,List<String>>();
  List<String> pus=new ArrayList<String>();
  pus.add(persistenceUnit);
  clazzToPu.put(Employe.class.getName(),pus);
  clazzToPu.put(KunderaUser.class.getName(),pus);
  appMetadata.setClazzToPuMap(clazzToPu);
  EntityMetadata m=new EntityMetadata(Employe.class);
  EntityMetadata m1=new EntityMetadata(KunderaUser.class);
  TableProcessor processor=new TableProcessor(null);
  processor.process(Employe.class,m);
  processor.process(KunderaUser.class,m1);
  IndexProcessor indexProcessor=new IndexProcessor();
  indexProcessor.process(Employe.class,m);
  indexProcessor.process(KunderaUser.class,m1);
  Assert.assertNotNull(m1.toString());
  m.setPersistenceUnit(persistenceUnit);
  MetamodelImpl metaModel=new MetamodelImpl();
  metaModel.addEntityMetadata(Employe.class,m);
  metaModel.addEntityMetadata(KunderaUser.class,m1);
  appMetadata.getMetamodelMap().put(persistenceUnit,metaModel);
  metaModel.assignManagedTypes(appMetadata.getMetaModelBuilder(persistenceUnit).getManagedTypes());
  metaModel.assignEmbeddables(appMetadata.getMetaModelBuilder(persistenceUnit).getEmbeddables());
  metaModel.assignMappedSuperClass(appMetadata.getMetaModelBuilder(persistenceUnit).getMappedSuperClassTypes());
  String[] persistenceUnits=new String[]{persistenceUnit};
  new ClientFactoryConfiguraton(null,persistenceUnits).configure();
  new SchemaConfiguration(null,persistenceUnits).configure();
  return null;
}