Program: 176243
Project: 176243
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,"String_Node_Str");
  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(CassandraEntitySample.class.getName(),pus);
  appMetadata.setClazzToPuMap(clazzToPu);
  EntityMetadata m=new EntityMetadata(CassandraEntitySample.class);
  TableProcessor processor=new TableProcessor(null);
  processor.process(CassandraEntitySample.class,m);
  m.setPersistenceUnit(persistenceUnit);
  MetamodelImpl metaModel=new MetamodelImpl();
  metaModel.addEntityMetadata(CassandraEntitySample.class,m);
  appMetadata.getMetamodelMap().put(persistenceUnit,metaModel);
  metaModel.assignManagedTypes(appMetadata.getMetaModelBuilder(persistenceUnit).getManagedTypes());
  metaModel.assignEmbeddables(appMetadata.getMetaModelBuilder(persistenceUnit).getEmbeddables());
  metaModel.assignMappedSuperClass(appMetadata.getMetaModelBuilder(persistenceUnit).getMappedSuperClassTypes());
  EntityManagerFactoryImpl emf=new EntityManagerFactoryImpl(persistenceUnit,props);
  String[] persistenceUnits=new String[]{persistenceUnit};
  new ClientFactoryConfiguraton(null,persistenceUnits).configure();
  CoreMetadata coreMetadata=new CoreMetadata();
  coreMetadata.setLazyInitializerFactory(new CglibLazyInitializerFactory());
  KunderaMetadata.INSTANCE.setCoreMetadata(coreMetadata);
  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,"String_Node_Str");
  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(CassandraEntitySample.class.getName(),pus);
  appMetadata.setClazzToPuMap(clazzToPu);
  MetadataBuilder metadataBuilder=new MetadataBuilder(persistenceUnit,ThriftClientFactory.class.getSimpleName(),null);
  MetamodelImpl metaModel=new MetamodelImpl();
  metaModel.addEntityMetadata(CassandraEntitySample.class,metadataBuilder.buildEntityMetadata(CassandraEntitySample.class));
  appMetadata.getMetamodelMap().put(persistenceUnit,metaModel);
  metaModel.assignManagedTypes(appMetadata.getMetaModelBuilder(persistenceUnit).getManagedTypes());
  metaModel.assignEmbeddables(appMetadata.getMetaModelBuilder(persistenceUnit).getEmbeddables());
  metaModel.assignMappedSuperClass(appMetadata.getMetaModelBuilder(persistenceUnit).getMappedSuperClassTypes());
  EntityManagerFactoryImpl emf=new EntityManagerFactoryImpl(persistenceUnit,props);
  String[] persistenceUnits=new String[]{persistenceUnit};
  new ClientFactoryConfiguraton(null,persistenceUnits).configure();
  CoreMetadata coreMetadata=new CoreMetadata();
  coreMetadata.setLazyInitializerFactory(new CglibLazyInitializerFactory());
  KunderaMetadata.INSTANCE.setCoreMetadata(coreMetadata);
  return emf;
}