Program: 70153
Project: 70153
Buggy source:
private List<AggregationDialog.GrandTotalInfo> getGrandTotalInfo(int axis){
  List<AggregationDialog.GrandTotalInfo> retValue=new ArrayList<AggregationDialog.GrandTotalInfo>();
  CrosstabReportItemHandle reportHandle=levelHandle.getCrosstab();
  CrosstabViewHandle crosstabView=reportHandle.getCrosstabView(axis);
  if (crosstabView == null || crosstabView.getDimensionCount() == 0) {
    return retValue;
  }
  int measureCount=reportHandle.getMeasureCount();
  for (int i=0; i < measureCount; i++) {
    MeasureViewHandle measureView=reportHandle.getMeasure(i);
    if (measureView instanceof ComputedMeasureViewHandle) {
      continue;
    }
    AggregationDialog.GrandTotalInfo info=new AggregationDialog.GrandTotalInfo();
    info.setMeasureQualifiedName(reportHandle.getMeasure(i).getCubeMeasure().getQualifiedName());
    info.setMeasureDisplayName(reportHandle.getMeasure(i).getCubeMeasure().getName());
    info.setFunction(CrosstabUtil.getDefaultMeasureAggregationFunction(reportHandle.getMeasure(i)));
    info.setExpectedView("String_Node_Str");
    retValue.add(info);
    info.setAssociation(getAssociation(axis));
  }
  List measures=reportHandle.getAggregationMeasures(axis);
  for (int i=0; i < measures.size(); i++) {
    MeasureViewHandle measureView=(MeasureViewHandle)measures.get(i);
    if (measureView instanceof ComputedMeasureViewHandle) {
      continue;
    }
    AggregationDialog.GrandTotalInfo info=new AggregationDialog.GrandTotalInfo();
    MeasureViewHandle measureViewHandle=(MeasureViewHandle)measures.get(i);
    info.setMeasureQualifiedName(measureViewHandle.getCubeMeasure().getQualifiedName());
    info.setMeasureDisplayName(measureViewHandle.getCubeMeasure().getName());
    info.setFunction(CrosstabUtil.getDefaultMeasureAggregationFunction(measureViewHandle));
    AggregationCellHandle cell=getGrandAggregationCell(measureView,levelHandle,axis);
    String view=getExpectedView(cell);
    info.setExpectedView(view);
    replaceInfo(info,retValue);
  }
  return retValue;
}

Fixed version (ground truth):
private List<AggregationDialog.GrandTotalInfo> getGrandTotalInfo(int axis){
  List<AggregationDialog.GrandTotalInfo> retValue=new ArrayList<AggregationDialog.GrandTotalInfo>();
  CrosstabReportItemHandle reportHandle=levelHandle.getCrosstab();
  CrosstabViewHandle crosstabView=reportHandle.getCrosstabView(axis);
  if (crosstabView == null || crosstabView.getDimensionCount() == 0) {
    return retValue;
  }
  int measureCount=reportHandle.getMeasureCount();
  for (int i=0; i < measureCount; i++) {
    MeasureViewHandle measureView=reportHandle.getMeasure(i);
    if (measureView instanceof ComputedMeasureViewHandle) {
      continue;
    }
    AggregationDialog.GrandTotalInfo info=new AggregationDialog.GrandTotalInfo();
    info.setViewHandle(reportHandle.getCrosstabView(axis));
    info.setMeasureQualifiedName(reportHandle.getMeasure(i).getCubeMeasure().getQualifiedName());
    info.setMeasureDisplayName(reportHandle.getMeasure(i).getCubeMeasure().getName());
    info.setFunction(CrosstabUtil.getDefaultMeasureAggregationFunction(reportHandle.getMeasure(i)));
    info.setExpectedView("String_Node_Str");
    info.setPosition(reportHandle.getCrosstabView(axis).getGrandTotalLocation());
    retValue.add(info);
    info.setAssociation(getAssociation(axis));
  }
  List measures=reportHandle.getAggregationMeasures(axis);
  for (int i=0; i < measures.size(); i++) {
    MeasureViewHandle measureView=(MeasureViewHandle)measures.get(i);
    if (measureView instanceof ComputedMeasureViewHandle) {
      continue;
    }
    AggregationDialog.GrandTotalInfo info=new AggregationDialog.GrandTotalInfo();
    MeasureViewHandle measureViewHandle=(MeasureViewHandle)measures.get(i);
    info.setViewHandle(reportHandle.getCrosstabView(axis));
    info.setMeasureQualifiedName(measureViewHandle.getCubeMeasure().getQualifiedName());
    info.setMeasureDisplayName(measureViewHandle.getCubeMeasure().getName());
    info.setFunction(CrosstabUtil.getDefaultMeasureAggregationFunction(measureViewHandle));
    AggregationCellHandle cell=getGrandAggregationCell(measureView,levelHandle,axis);
    String view=getExpectedView(cell);
    info.setExpectedView(view);
    info.setPosition(reportHandle.getCrosstabView(axis).getGrandTotalLocation());
    replaceInfo(info,retValue);
  }
  return retValue;
}