Program: 11170
Project: 11170
Buggy source:
/** 
 * Transforms a Cassandra   {@link com.datastax.driver.core.ResultSet} into a {@link com.stratio.crossdata.common.data.ResultSet}.
 * @param alias  The map with the relations between ColumnName and Alias.
 * @return An equivalent Meta ResultSet.
 */
public com.stratio.crossdata.common.data.ResultSet transformPagingToMetaResultSet(List<ColumnDefinitions.Definition> definitions,List<Row> rows,Map<Selector,String> alias){
  ResultSet crs=new ResultSet();
  CassandraMetadataHelper helper=new CassandraMetadataHelper();
  List<ColumnMetadata> columnList=new ArrayList<>();
  ColumnMetadata columnMetadata=null;
  for (  ColumnDefinitions.Definition def : definitions) {
    ColumnName columnName=new ColumnName(def.getKeyspace(),def.getTable(),def.getName());
    ColumnType type=helper.toColumnType(def.getType().getName().toString());
    ColumnName cassandraColumnName=new ColumnName(def.getKeyspace(),def.getTable(),def.getName());
    for (    Map.Entry<Selector,String> entry : alias.entrySet()) {
      if (entry.getKey().getColumnName().getQualifiedName().equals(cassandraColumnName.getQualifiedName())) {
        columnMetadata=new ColumnMetadata(columnName,null,type);
        columnMetadata.getName().setAlias(entry.getValue());
        break;
      }
 else {
        columnMetadata=new ColumnMetadata(columnName,null,type);
      }
    }
    columnList.add(columnMetadata);
  }
  crs.setColumnMetadata(columnList);
  try {
    for (    Row row : rows) {
      com.stratio.crossdata.common.data.Row metaRow=new com.stratio.crossdata.common.data.Row();
      for (      ColumnDefinitions.Definition def : definitions) {
        if (def.getName().toLowerCase().startsWith("String_Node_Str")) {
          continue;
        }
        Cell metaCell=getCell(def.getType(),row,def.getName());
        ColumnName cassandraColumnName=new ColumnName(def.getKeyspace(),def.getTable(),def.getName());
        boolean findIt=false;
        for (        Map.Entry<Selector,String> entry : alias.entrySet()) {
          if (entry.getKey().getColumnName().getQualifiedName().equals(cassandraColumnName.getQualifiedName())) {
            metaRow.addCell(entry.getValue(),metaCell);
            findIt=true;
            break;
          }
        }
        if (!findIt) {
          metaRow.addCell(def.getName(),metaCell);
        }
      }
      crs.add(metaRow);
    }
  }
 catch (  InvocationTargetException|IllegalAccessException e) {
    LOG.error("String_Node_Str",e);
    crs=new ResultSet();
  }
  return crs;
}

Fixed version (ground truth):
/** 
 * Transforms a Cassandra   {@link com.datastax.driver.core.ResultSet} into a {@link com.stratio.crossdata.common.data.ResultSet}.
 * @param alias The map with the relations between ColumnName and Alias.
 * @return An equivalent Meta ResultSet.
 */
public com.stratio.crossdata.common.data.ResultSet transformPagingToMetaResultSet(List<ColumnDefinitions.Definition> definitions,List<Row> rows,Map<Selector,String> alias){
  ResultSet crs=new ResultSet();
  CassandraMetadataHelper helper=new CassandraMetadataHelper();
  List<ColumnMetadata> columnList=new ArrayList<>();
  ColumnMetadata columnMetadata=null;
  for (  ColumnDefinitions.Definition def : definitions) {
    ColumnName columnName=new ColumnName(def.getKeyspace(),def.getTable(),def.getName());
    ColumnType type=helper.toColumnType(def.getType().getName().toString());
    ColumnName cassandraColumnName=new ColumnName(def.getKeyspace(),def.getTable(),def.getName());
    for (    Map.Entry<Selector,String> entry : alias.entrySet()) {
      if (entry.getKey().getColumnName().getQualifiedName().equals(cassandraColumnName.getQualifiedName())) {
        columnMetadata=new ColumnMetadata(columnName,null,type);
        columnMetadata.getName().setAlias(entry.getValue());
        break;
      }
 else {
        columnMetadata=new ColumnMetadata(columnName,null,type);
      }
    }
    columnList.add(columnMetadata);
  }
  crs.setColumnMetadata(columnList);
  try {
    for (    Row row : rows) {
      com.stratio.crossdata.common.data.Row metaRow=new com.stratio.crossdata.common.data.Row();
      for (      ColumnDefinitions.Definition def : definitions) {
        if (def.getName().toLowerCase().startsWith("String_Node_Str")) {
          continue;
        }
        Cell metaCell=getCell(def.getType(),row,def.getName());
        ColumnName cassandraColumnName=new ColumnName(def.getKeyspace(),def.getTable(),def.getName());
        boolean findIt=false;
        for (        Map.Entry<Selector,String> entry : alias.entrySet()) {
          if (entry.getKey().getColumnName().getQualifiedName().equals(cassandraColumnName.getQualifiedName())) {
            metaRow.addCell(entry.getValue(),metaCell);
            findIt=true;
            break;
          }
        }
        if (!findIt) {
          metaRow.addCell(def.getName(),metaCell);
        }
      }
      crs.add(metaRow);
    }
  }
 catch (  InvocationTargetException|IllegalAccessException e) {
    LOG.error("String_Node_Str",e);
    crs=new ResultSet();
  }
  return crs;
}