Program: 177096
Project: 177096
Buggy source:
private void populateMetadata(EntityMetadata metadata,Class<?> clazz){
  Table table=clazz.getAnnotation(Table.class);
  boolean isEmbeddable=false;
  metadata.setTableName(table.name());
  String schema=table.schema().length() != 0 ? table.schema() : emf.getSchema();
  metadata.setSchema(schema);
  metadata.setType(com.impetus.kundera.metadata.EntityMetadata.Type.COLUMN_FAMILY);
  for (  Field f : clazz.getDeclaredFields()) {
    if (f.isAnnotationPresent(Id.class)) {
      LOG.debug(f.getName() + "String_Node_Str");
      metadata.setIdProperty(f);
      populateIdAccessorMethods(metadata,clazz,f);
      populateIdColumn(metadata,clazz,f);
    }
 else     if (f.isAnnotationPresent(Embedded.class)) {
      metadata.setType(com.impetus.kundera.metadata.EntityMetadata.Type.SUPER_COLUMN_FAMILY);
      String superColumnName=f.getName();
      Class superColumnFieldClass=f.getType();
      isEmbeddable=true;
      if (superColumnFieldClass.equals(List.class) || superColumnFieldClass.equals(Set.class)) {
        superColumnFieldClass=PropertyAccessorHelper.getGenericClass(f);
        populateSuperColumnInMetadata(metadata,f,superColumnFieldClass);
      }
 else {
        populateSuperColumnInMetadata(metadata,f,superColumnFieldClass);
      }
      metadata.addToEmbedCollection(superColumnFieldClass);
    }
 else {
      String name=getValidJPAColumnName(clazz,f);
      if (null != name) {
        if (!isEmbeddable) {
          metadata.addColumn(name,metadata.new Column(name,f));
        }
        SuperColumn superColumn=metadata.new SuperColumn(name,f);
        metadata.addSuperColumn(name,superColumn);
        superColumn.addColumn(name,f);
      }
    }
  }
  if (isEmbeddable && !metadata.getColumnsMap().isEmpty()) {
    Map<String,EntityMetadata.Column> cols=metadata.getColumnsMap();
    cols.clear();
    cols=null;
    metadata.setType(Type.SUPER_COLUMN_FAMILY);
  }
 else {
    Map<String,EntityMetadata.SuperColumn> superColumns=metadata.getSuperColumnsMap();
    superColumns.clear();
    superColumns=null;
    metadata.setType(Type.COLUMN_FAMILY);
  }
}

Fixed version (ground truth):
private void populateMetadata(EntityMetadata metadata,Class<?> clazz){
  Table table=clazz.getAnnotation(Table.class);
  boolean isEmbeddable=false;
  metadata.setTableName(table.name());
  String schema=table.schema().length() != 0 ? table.schema() : emf.getSchema();
  metadata.setSchema(schema);
  metadata.setType(com.impetus.kundera.metadata.EntityMetadata.Type.COLUMN_FAMILY);
  for (  Field f : clazz.getDeclaredFields()) {
    if (f.isAnnotationPresent(Id.class)) {
      LOG.debug(f.getName() + "String_Node_Str");
      metadata.setIdProperty(f);
      populateIdAccessorMethods(metadata,clazz,f);
      populateIdColumn(metadata,clazz,f);
    }
 else     if (f.isAnnotationPresent(Embedded.class)) {
      metadata.setType(com.impetus.kundera.metadata.EntityMetadata.Type.SUPER_COLUMN_FAMILY);
      String superColumnName=f.getName();
      Class superColumnFieldClass=f.getType();
      isEmbeddable=true;
      if (superColumnFieldClass.equals(List.class) || superColumnFieldClass.equals(Set.class)) {
        superColumnFieldClass=PropertyAccessorHelper.getGenericClass(f);
        populateSuperColumnInMetadata(metadata,f,superColumnFieldClass);
      }
 else {
        populateSuperColumnInMetadata(metadata,f,superColumnFieldClass);
      }
      metadata.addToEmbedCollection(superColumnFieldClass);
    }
 else {
      String name=getValidJPAColumnName(clazz,f);
      if (null != name) {
        if (!isEmbeddable) {
          metadata.addColumn(name,metadata.new Column(name,f));
        }
        SuperColumn superColumn=metadata.new SuperColumn(name,f);
        metadata.addSuperColumn(name,superColumn);
        superColumn.addColumn(name,f);
      }
    }
  }
  if (isEmbeddable) {
    Map<String,EntityMetadata.Column> cols=metadata.getColumnsMap();
    cols.clear();
    cols=null;
    metadata.setType(Type.SUPER_COLUMN_FAMILY);
  }
 else {
    Map<String,EntityMetadata.SuperColumn> superColumns=metadata.getSuperColumnsMap();
    superColumns.clear();
    superColumns=null;
    metadata.setType(Type.COLUMN_FAMILY);
  }
}