Program: 176242
Project: 176242
Buggy source:
/** 
 * Gets the entity manager factory.
 * @return the entity manager factory
 */
private EntityManagerFactoryImpl getEntityManagerFactory(){
  Map<String,Object> props=new HashMap<String,Object>();
  String persistenceUnit="String_Node_Str";
  props.put(Constants.PERSISTENCE_UNIT_NAME,persistenceUnit);
  props.put(PersistenceProperties.KUNDERA_CLIENT_FACTORY,"String_Node_Str");
  props.put(PersistenceProperties.KUNDERA_NODES,"String_Node_Str");
  props.put(PersistenceProperties.KUNDERA_PORT,"String_Node_Str");
  props.put(PersistenceProperties.KUNDERA_KEYSPACE,schema);
  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("String_Node_Str",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(CassandraEntity.class.getName(),pus);
  clazzToPu.put(CassandraBatchEntity.class.getName(),pus);
  appMetadata.setClazzToPuMap(clazzToPu);
  EntityMetadata m=new EntityMetadata(CassandraEntity.class);
  EntityMetadata m1=new EntityMetadata(CassandraBatchEntity.class);
  TableProcessor processor=new TableProcessor(null);
  processor.process(CassandraEntity.class,m);
  processor.process(CassandraBatchEntity.class,m1);
  m.setPersistenceUnit(persistenceUnit);
  MetamodelImpl metaModel=new MetamodelImpl();
  metaModel.addEntityMetadata(CassandraEntity.class,m);
  metaModel.addEntityMetadata(CassandraBatchEntity.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());
  CoreMetadata coreMetadata=new CoreMetadata();
  coreMetadata.setLazyInitializerFactory(new CglibLazyInitializerFactory());
  KunderaMetadata.INSTANCE.setCoreMetadata(coreMetadata);
  EntityManagerFactoryImpl emf=new EntityManagerFactoryImpl(persistenceUnit,props);
  String[] persistenceUnits=new String[]{persistenceUnit};
  new ClientFactoryConfiguraton(null,persistenceUnits).configure();
  return emf;
}

Fixed version (ground truth):
/** 
 * Gets the entity manager factory.
 * @return the entity manager factory
 */
private EntityManagerFactoryImpl getEntityManagerFactory(){
  Map<String,Object> props=new HashMap<String,Object>();
  String persistenceUnit="String_Node_Str";
  props.put(Constants.PERSISTENCE_UNIT_NAME,persistenceUnit);
  props.put(PersistenceProperties.KUNDERA_CLIENT_FACTORY,"String_Node_Str");
  props.put(PersistenceProperties.KUNDERA_NODES,"String_Node_Str");
  props.put(PersistenceProperties.KUNDERA_PORT,"String_Node_Str");
  props.put(PersistenceProperties.KUNDERA_KEYSPACE,schema);
  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("String_Node_Str",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(CassandraEntity.class.getName(),pus);
  clazzToPu.put(CassandraBatchEntity.class.getName(),pus);
  appMetadata.setClazzToPuMap(clazzToPu);
  MetadataBuilder metadataBuilder=new MetadataBuilder(persistenceUnit,ThriftClientFactory.class.getSimpleName(),null);
  MetamodelImpl metaModel=new MetamodelImpl();
  metaModel.addEntityMetadata(CassandraEntity.class,metadataBuilder.buildEntityMetadata(CassandraEntity.class));
  metaModel.addEntityMetadata(CassandraBatchEntity.class,metadataBuilder.buildEntityMetadata(CassandraBatchEntity.class));
  appMetadata.getMetamodelMap().put(persistenceUnit,metaModel);
  metaModel.assignManagedTypes(appMetadata.getMetaModelBuilder(persistenceUnit).getManagedTypes());
  metaModel.assignEmbeddables(appMetadata.getMetaModelBuilder(persistenceUnit).getEmbeddables());
  metaModel.assignMappedSuperClass(appMetadata.getMetaModelBuilder(persistenceUnit).getMappedSuperClassTypes());
  CoreMetadata coreMetadata=new CoreMetadata();
  coreMetadata.setLazyInitializerFactory(new CglibLazyInitializerFactory());
  KunderaMetadata.INSTANCE.setCoreMetadata(coreMetadata);
  EntityManagerFactoryImpl emf=new EntityManagerFactoryImpl(persistenceUnit,props);
  String[] persistenceUnits=new String[]{persistenceUnit};
  new ClientFactoryConfiguraton(null,persistenceUnits).configure();
  return emf;
}