Program: 72736
Project: 72736
Buggy source:
private void collectExecutable() throws OLAPException {
  elements=new ArrayList();
  currentElement=0;
  endGroup=false;
  int startingGroupIndex=getStartingGroupLevel(rowCursor,groupCursors);
  if (startingGroupIndex <= currentGroupIndex + 1) {
    if (totalMeasureCount > 0 || !IColumnWalker.IGNORE_TOTAL_COLUMN_WITHOUT_MEASURE) {
      if (!isCurrentLevelLeafGroup() && currentLevel != null && currentLevel.getAggregationHeader() != null && AGGREGATION_HEADER_LOCATION_BEFORE.equals(currentLevel.getAggregationHeaderLocation())) {
        CrosstabGroupBandExecutor bandExecutor=new CrosstabGroupBandExecutor(this,currentDimensionIndex,currentLevelIndex,IBandContent.BAND_HEADER);
        elements.add(bandExecutor);
      }
    }
  }
  if (currentGroupIndex < rowGroups.size() - 1) {
    CrosstabGroupExecutor groupExecutor=new CrosstabGroupExecutor(this,currentGroupIndex + 1,rowCursor);
    elements.add(groupExecutor);
  }
 else {
    CrosstabGroupBandExecutor bandExecutor=new CrosstabGroupBandExecutor(this,currentDimensionIndex,currentLevelIndex,IBandContent.BAND_DETAIL);
    elements.add(bandExecutor);
  }
  int endingGroupIndex=getEndingGroupLevel(rowCursor,groupCursors);
  if (endingGroupIndex <= currentGroupIndex + 1) {
    if (totalMeasureCount > 0 || !IColumnWalker.IGNORE_TOTAL_COLUMN_WITHOUT_MEASURE) {
      if (!isCurrentLevelLeafGroup() && currentLevel != null && currentLevel.getAggregationHeader() != null && AGGREGATION_HEADER_LOCATION_AFTER.equals(currentLevel.getAggregationHeaderLocation())) {
        CrosstabGroupBandExecutor bandExecutor=new CrosstabGroupBandExecutor(this,currentDimensionIndex,currentLevelIndex,IBandContent.BAND_FOOTER);
        elements.add(bandExecutor);
      }
    }
    endGroup=true;
  }
}

Fixed version (ground truth):
private void collectExecutable() throws OLAPException {
  elements=new ArrayList();
  currentElement=0;
  endGroup=false;
  int startingGroupIndex=GroupUtil.getStartingGroupLevel(rowCursor,groupCursors);
  if (startingGroupIndex <= currentGroupIndex + 1) {
    if (totalMeasureCount > 0 || !IColumnWalker.IGNORE_TOTAL_COLUMN_WITHOUT_MEASURE) {
      if (!isCurrentLevelLeafGroup() && currentLevel != null && currentLevel.getAggregationHeader() != null && AGGREGATION_HEADER_LOCATION_BEFORE.equals(currentLevel.getAggregationHeaderLocation())) {
        CrosstabGroupBandExecutor bandExecutor=new CrosstabGroupBandExecutor(this,currentDimensionIndex,currentLevelIndex,IBandContent.BAND_HEADER);
        elements.add(bandExecutor);
      }
    }
  }
  if (currentGroupIndex < rowGroups.size() - 1) {
    CrosstabGroupExecutor groupExecutor=new CrosstabGroupExecutor(this,currentGroupIndex + 1,rowCursor);
    elements.add(groupExecutor);
  }
 else {
    CrosstabGroupBandExecutor bandExecutor=new CrosstabGroupBandExecutor(this,currentDimensionIndex,currentLevelIndex,IBandContent.BAND_DETAIL);
    elements.add(bandExecutor);
  }
  int endingGroupIndex=GroupUtil.getEndingGroupLevel(rowCursor,groupCursors);
  if (endingGroupIndex <= currentGroupIndex + 1) {
    if (totalMeasureCount > 0 || !IColumnWalker.IGNORE_TOTAL_COLUMN_WITHOUT_MEASURE) {
      if (!isCurrentLevelLeafGroup() && currentLevel != null && currentLevel.getAggregationHeader() != null && AGGREGATION_HEADER_LOCATION_AFTER.equals(currentLevel.getAggregationHeaderLocation())) {
        CrosstabGroupBandExecutor bandExecutor=new CrosstabGroupBandExecutor(this,currentDimensionIndex,currentLevelIndex,IBandContent.BAND_FOOTER);
        elements.add(bandExecutor);
      }
    }
    endGroup=true;
  }
}