Program: 176780
Project: 176780
Buggy source:
public final void process(final Class<?> clazz,EntityMetadata metadata){
  if (clazz != null) {
    metadata.setIndexName(clazz.getSimpleName());
  }
  Index idx=clazz.getAnnotation(Index.class);
  IndexCollection indexes=clazz.getAnnotation(IndexCollection.class);
  List<String> columnsNameToBeIndexed=new ArrayList<String>();
  Map<String,com.impetus.kundera.index.Index> indexedColumnsMap=new HashMap<String,com.impetus.kundera.index.Index>();
  if (null != indexes) {
    if (indexes.columns() != null && indexes.columns().length != 0) {
      metadata.setIndexable(true);
      for (      com.impetus.kundera.index.Index indexedColumn : indexes.columns()) {
        indexedColumnsMap.put(indexedColumn.name(),indexedColumn);
      }
    }
  }
 else   if (null != idx) {
    boolean isIndexable=idx.index();
    if (isIndexable) {
      metadata.setIndexable(isIndexable);
      String indexName=idx.name();
      if (indexName != null && !indexName.isEmpty()) {
        metadata.setIndexName(indexName);
      }
      if (idx.columns() != null && idx.columns().length != 0) {
        for (        String indexedColumn : idx.columns()) {
          columnsNameToBeIndexed.add(indexedColumn);
        }
      }
    }
  }
 else {
    log.debug("String_Node_Str" + clazz.getName() + "String_Node_Str"+ (indexedColumnsMap.isEmpty() ? "String_Node_Str" : indexedColumnsMap));
    return;
  }
  log.debug("String_Node_Str" + clazz.getName() + "String_Node_Str");
  for (  Field f : clazz.getDeclaredFields()) {
    if (f.isAnnotationPresent(Column.class)) {
      String fieldName=f.getName();
      if (indexedColumnsMap != null && !indexedColumnsMap.isEmpty() && indexedColumnsMap.containsKey(fieldName)) {
        com.impetus.kundera.index.Index indexedColumn=indexedColumnsMap.get(fieldName);
        metadata.addIndexProperty(populatePropertyIndex(indexedColumn.name(),indexedColumn.type(),indexedColumn.max(),indexedColumn.min(),f));
      }
 else       if (columnsNameToBeIndexed != null && !columnsNameToBeIndexed.isEmpty() && columnsNameToBeIndexed.contains(fieldName)) {
        metadata.addIndexProperty(populatePropertyIndex(fieldName,null,null,null,f));
      }
    }
  }
}

Fixed version (ground truth):
public final void process(final Class<?> clazz,EntityMetadata metadata){
  if (clazz != null) {
    metadata.setIndexName(clazz.getSimpleName());
  }
  Index idx=clazz.getAnnotation(Index.class);
  IndexCollection indexes=clazz.getAnnotation(IndexCollection.class);
  List<String> columnsNameToBeIndexed=new ArrayList<String>();
  Map<String,com.impetus.kundera.index.Index> indexedColumnsMap=new HashMap<String,com.impetus.kundera.index.Index>();
  if (null != indexes) {
    if (indexes.columns() != null && indexes.columns().length != 0) {
      metadata.setIndexable(true);
      for (      com.impetus.kundera.index.Index indexedColumn : indexes.columns()) {
        indexedColumnsMap.put(indexedColumn.name(),indexedColumn);
      }
    }
  }
 else   if (null != idx) {
    boolean isIndexable=idx.index();
    if (isIndexable) {
      metadata.setIndexable(isIndexable);
      String indexName=idx.name();
      if (indexName != null && !indexName.isEmpty()) {
        metadata.setIndexName(indexName);
      }
      if (idx.columns() != null && idx.columns().length != 0) {
        for (        String indexedColumn : idx.columns()) {
          columnsNameToBeIndexed.add(indexedColumn);
        }
      }
    }
  }
 else {
    log.debug("String_Node_Str" + clazz.getName() + "String_Node_Str"+ (indexedColumnsMap.isEmpty() ? "String_Node_Str" : indexedColumnsMap));
    return;
  }
  log.debug("String_Node_Str" + clazz.getName() + "String_Node_Str");
  for (  Field f : clazz.getDeclaredFields()) {
    if (f.isAnnotationPresent(Column.class)) {
      String fieldName=f.getName();
      String colName=getIndexName(f,fieldName);
      if (indexedColumnsMap != null && !indexedColumnsMap.isEmpty() && indexedColumnsMap.containsKey(fieldName)) {
        com.impetus.kundera.index.Index indexedColumn=indexedColumnsMap.get(fieldName);
        metadata.addIndexProperty(populatePropertyIndex(indexedColumn.name(),indexedColumn.type(),indexedColumn.max(),indexedColumn.min(),f));
      }
 else       if (columnsNameToBeIndexed != null && !columnsNameToBeIndexed.isEmpty() && columnsNameToBeIndexed.contains(colName)) {
        metadata.addIndexProperty(populatePropertyIndex(fieldName,null,null,null,f));
      }
    }
  }
}