Program: 66616
Project: 66616
Buggy source:
public MetaInfo getMetaInfo(){
  return new IDataSet4Aggregation.MetaInfo(){
    public String[] getAttributeNames(    int dimIndex,    int levelIndex){
      IDimensionResultIterator itr=dimensionResultIterators[dimIndex];
      if (!itr.getDimesion().isTime()) {
        return itr.getDimesion().getHierarchy().getLevels()[levelIndex].getAttributeNames();
      }
 else {
        return null;
      }
    }
    public ColumnInfo getColumnInfo(    DimColumn dimColumn) throws DataException {
      String dimensionName=dimColumn.getDimensionName();
      String levelName=dimColumn.getLevelName();
      String columnName=dimColumn.getColumnName();
      int dimIndex=getDimensionIndex(dimensionName);
      if (dimIndex < 0) {
        throw new DataException(DataResourceHandle.getInstance().getMessage(ResourceConstants.NONEXISTENT_DIMENSION) + dimensionName);
      }
      IDimensionResultIterator itr=dimensionResultIterators[dimIndex];
      int levelIndex=itr.getLevelIndex(levelName);
      if (levelIndex < 0) {
        throw new DataException(DataResourceHandle.getInstance().getMessage(ResourceConstants.NONEXISTENT_LEVEL) + "String_Node_Str" + dimensionName+ "String_Node_Str"+ levelName+ "String_Node_Str");
      }
      ILevel levelInfo=itr.getDimesion().getHierarchy().getLevels()[levelIndex];
      int columnIndex=-1;
      int dataType=DataType.UNKNOWN_TYPE;
      boolean isKey=false;
      for (int i=0; i < levelInfo.getKeyNames().length; i++) {
        if (levelInfo.getKeyNames()[i].equals(columnName)) {
          columnIndex=i;
          dataType=levelInfo.getKeyDataType(columnName);
          isKey=true;
          break;
        }
      }
      if (!isKey) {
        for (int i=0; i < levelInfo.getAttributeNames().length; i++) {
          if (levelInfo.getAttributeNames()[i].equals(columnName)) {
            columnIndex=i;
            dataType=levelInfo.getAttributeDataType(columnName);
            break;
          }
        }
      }
      if (columnIndex < 0) {
        throw new DataException(DataResourceHandle.getInstance().getMessage(ResourceConstants.NONEXISTENT_KEY_OR_ATTR) + "String_Node_Str" + dimensionName+ "String_Node_Str"+ levelName+ "String_Node_Str"+ columnName+ "String_Node_Str");
      }
      return new ColumnInfo(dimIndex,levelIndex,columnIndex,dataType,isKey);
    }
    public int getDimensionIndex(    String dimensionName){
      for (int i=0; i < dimensionResultIterators.length; i++) {
        if (dimensionResultIterators[i].getDimesion().getName().equals(dimensionName)) {
          return i;
        }
      }
      return -1;
    }
    public String[] getKeyNames(    int dimIndex,    int levelIndex){
      IDimensionResultIterator itr=dimensionResultIterators[dimIndex];
      if (itr.getDimesion().isTime()) {
        return new String[]{TimeDimensionUtil.getFieldName(levelIndex)};
      }
 else {
        return itr.getDimesion().getHierarchy().getLevels()[levelIndex].getKeyNames();
      }
    }
    public int getLevelIndex(    String dimensionName,    String levelName){
      int dimIndex=getDimensionIndex(dimensionName);
      if (dimIndex >= 0) {
        IDimensionResultIterator itr=dimensionResultIterators[dimIndex];
        return itr.getLevelIndex(levelName);
      }
      return -1;
    }
    public int getMeasureIndex(    String measureName){
      if (measureName == null) {
        return -1;
      }
      MeasureInfo[] measureInfo=getMeasureInfos();
      for (int i=0; i < measureInfo.length; i++) {
        if (measureName.equals(measureInfo[i].getMeasureName())) {
          return i;
        }
      }
      return -1;
    }
    public MeasureInfo[] getMeasureInfos(){
      if (computedMeasureHelper != null && computedMeasureHelper.getAllComputedMeasureInfos() != null) {
        MeasureInfo[] cubeMeasureInfo=factTableRowIterator.getMeasureInfos();
        MeasureInfo[] computedMeasureInfo=computedMeasureHelper.getAllComputedMeasureInfos();
        MeasureInfo[] result=new MeasureInfo[computedMeasureInfo.length + cubeMeasureInfo.length];
        System.arraycopy(cubeMeasureInfo,0,result,0,cubeMeasureInfo.length);
        System.arraycopy(computedMeasureInfo,0,result,cubeMeasureInfo.length,computedMeasureInfo.length);
        return result;
      }
 else {
        return factTableRowIterator.getMeasureInfos();
      }
    }
  }
;
}

Fixed version (ground truth):
public MetaInfo getMetaInfo(){
  return new IDataSet4Aggregation.MetaInfo(){
    public String[] getAttributeNames(    int dimIndex,    int levelIndex){
      IDimensionResultIterator itr=dimensionResultIterators[dimIndex];
      if (!itr.getDimesion().isTime()) {
        return itr.getDimesion().getHierarchy().getLevels()[levelIndex].getAttributeNames();
      }
 else {
        return null;
      }
    }
    public ColumnInfo getColumnInfo(    DimColumn dimColumn) throws DataException {
      String dimensionName=dimColumn.getDimensionName();
      String levelName=dimColumn.getLevelName();
      String columnName=dimColumn.getColumnName();
      int dimIndex=getDimensionIndex(dimensionName);
      if (dimIndex < 0) {
        throw new DataException(DataResourceHandle.getInstance().getMessage(ResourceConstants.NONEXISTENT_DIMENSION) + dimensionName);
      }
      IDimensionResultIterator itr=dimensionResultIterators[dimIndex];
      int levelIndex=itr.getLevelIndex(levelName);
      if (levelIndex < 0) {
        throw new DataException(DataResourceHandle.getInstance().getMessage(ResourceConstants.NONEXISTENT_LEVEL) + "String_Node_Str" + dimensionName+ "String_Node_Str"+ levelName+ "String_Node_Str");
      }
      ILevel levelInfo=itr.getDimesion().getHierarchy().getLevels()[levelIndex];
      int columnIndex=-1;
      int dataType=DataType.UNKNOWN_TYPE;
      boolean isKey=false;
      for (int i=0; i < levelInfo.getKeyNames().length; i++) {
        if (levelInfo.getKeyNames()[i].equals(columnName)) {
          columnIndex=i;
          dataType=levelInfo.getKeyDataType(columnName);
          isKey=true;
          break;
        }
 else         if (levelInfo.getName().equals(columnName)) {
          columnIndex=i;
          dataType=levelInfo.getKeyDataType(levelInfo.getKeyNames()[0]);
          isKey=true;
          break;
        }
      }
      if (!isKey && levelInfo.getAttributeNames() != null) {
        for (int i=0; i < levelInfo.getAttributeNames().length; i++) {
          if (levelInfo.getAttributeNames()[i].equals(columnName)) {
            columnIndex=i;
            dataType=levelInfo.getAttributeDataType(columnName);
            break;
          }
        }
      }
      if (columnIndex < 0) {
        throw new DataException(DataResourceHandle.getInstance().getMessage(ResourceConstants.NONEXISTENT_KEY_OR_ATTR) + "String_Node_Str" + dimensionName+ "String_Node_Str"+ levelName+ "String_Node_Str"+ columnName+ "String_Node_Str");
      }
      return new ColumnInfo(dimIndex,levelIndex,columnIndex,dataType,isKey);
    }
    public int getDimensionIndex(    String dimensionName){
      for (int i=0; i < dimensionResultIterators.length; i++) {
        if (dimensionResultIterators[i].getDimesion().getName().equals(dimensionName)) {
          return i;
        }
      }
      return -1;
    }
    public String[] getKeyNames(    int dimIndex,    int levelIndex){
      IDimensionResultIterator itr=dimensionResultIterators[dimIndex];
      if (itr.getDimesion().isTime()) {
        return new String[]{TimeDimensionUtil.getFieldName(levelIndex)};
      }
 else {
        return itr.getDimesion().getHierarchy().getLevels()[levelIndex].getKeyNames();
      }
    }
    public int getLevelIndex(    String dimensionName,    String levelName){
      int dimIndex=getDimensionIndex(dimensionName);
      if (dimIndex >= 0) {
        IDimensionResultIterator itr=dimensionResultIterators[dimIndex];
        return itr.getLevelIndex(levelName);
      }
      return -1;
    }
    public int getMeasureIndex(    String measureName){
      if (measureName == null) {
        return -1;
      }
      MeasureInfo[] measureInfo=getMeasureInfos();
      for (int i=0; i < measureInfo.length; i++) {
        if (measureName.equals(measureInfo[i].getMeasureName())) {
          return i;
        }
      }
      return -1;
    }
    public MeasureInfo[] getMeasureInfos(){
      if (computedMeasureHelper != null && computedMeasureHelper.getAllComputedMeasureInfos() != null) {
        MeasureInfo[] cubeMeasureInfo=factTableRowIterator.getMeasureInfos();
        MeasureInfo[] computedMeasureInfo=computedMeasureHelper.getAllComputedMeasureInfos();
        MeasureInfo[] result=new MeasureInfo[computedMeasureInfo.length + cubeMeasureInfo.length];
        System.arraycopy(cubeMeasureInfo,0,result,0,cubeMeasureInfo.length);
        System.arraycopy(computedMeasureInfo,0,result,cubeMeasureInfo.length,computedMeasureInfo.length);
        return result;
      }
 else {
        return factTableRowIterator.getMeasureInfos();
      }
    }
  }
;
}