Program: 176800
Project: 176800
Buggy source:
@Override protected List<Object> populateEntities(EntityMetadata m,Client client){
  log.debug("String_Node_Str");
  List<Object> result=null;
  ApplicationMetadata appMetadata=KunderaMetadata.INSTANCE.getApplicationMetadata();
  MetamodelImpl metaModel=(MetamodelImpl)KunderaMetadata.INSTANCE.getApplicationMetadata().getMetamodel(m.getPersistenceUnit());
  if (metaModel.isEmbeddable(m.getIdAttribute().getBindableJavaType())) {
    result=onQueryOverCompositeColumns(m,client,metaModel);
  }
 else {
    if (appMetadata.isNative(getJPAQuery())) {
      result=((CassandraClientBase)client).executeQuery(appMetadata.getQuery(getJPAQuery()),m.getEntityClazz(),null);
    }
 else {
      if (MetadataUtils.useSecondryIndex(m.getPersistenceUnit())) {
        boolean useInvertedIndex=CassandraIndexHelper.isInvertedIndexingApplicable(m);
        Map<Boolean,List<IndexClause>> ixClause=prepareIndexClause(m,useInvertedIndex);
        if (useInvertedIndex && !getKunderaQuery().getFilterClauseQueue().isEmpty()) {
          result=(List)((CassandraEntityReader)getReader()).readFromIndexTable(m,client,ixClause);
        }
 else {
          boolean isRowKeyQuery=ixClause.keySet().iterator().next();
          if (!isRowKeyQuery) {
            result=((CassandraClientBase)client).find(ixClause.get(isRowKeyQuery),m,false,null,maxResult,getColumnList(m,getKunderaQuery().getResult(),null));
          }
 else {
            result=((CassandraEntityReader)getReader()).handleFindByRange(m,client,result,ixClause,isRowKeyQuery,getColumnList(m,getKunderaQuery().getResult(),null));
          }
        }
      }
 else {
        result=populateUsingLucene(m,client,result);
      }
    }
  }
  return result;
}

Fixed version (ground truth):
@Override protected List<Object> populateEntities(EntityMetadata m,Client client){
  log.debug("String_Node_Str");
  List<Object> result=null;
  ApplicationMetadata appMetadata=KunderaMetadata.INSTANCE.getApplicationMetadata();
  MetamodelImpl metaModel=(MetamodelImpl)KunderaMetadata.INSTANCE.getApplicationMetadata().getMetamodel(m.getPersistenceUnit());
  if (!appMetadata.isNative(getJPAQuery()) && metaModel.isEmbeddable(m.getIdAttribute().getBindableJavaType())) {
    result=onQueryOverCompositeColumns(m,client,metaModel);
  }
 else {
    if (appMetadata.isNative(getJPAQuery())) {
      result=((CassandraClientBase)client).executeQuery(appMetadata.getQuery(getJPAQuery()),m.getEntityClazz(),null);
    }
 else {
      if (MetadataUtils.useSecondryIndex(m.getPersistenceUnit())) {
        boolean useInvertedIndex=CassandraIndexHelper.isInvertedIndexingApplicable(m);
        Map<Boolean,List<IndexClause>> ixClause=prepareIndexClause(m,useInvertedIndex);
        if (useInvertedIndex && !getKunderaQuery().getFilterClauseQueue().isEmpty()) {
          result=(List)((CassandraEntityReader)getReader()).readFromIndexTable(m,client,ixClause);
        }
 else {
          boolean isRowKeyQuery=ixClause.keySet().iterator().next();
          if (!isRowKeyQuery) {
            result=((CassandraClientBase)client).find(ixClause.get(isRowKeyQuery),m,false,null,maxResult,getColumnList(m,getKunderaQuery().getResult(),null));
          }
 else {
            result=((CassandraEntityReader)getReader()).handleFindByRange(m,client,result,ixClause,isRowKeyQuery,getColumnList(m,getKunderaQuery().getResult(),null));
          }
        }
      }
 else {
        result=populateUsingLucene(m,client,result);
      }
    }
  }
  return result;
}