Program: 66099
Project: 66099
Buggy source:
private void initAggOn(){
  try {
    CrosstabReportItemHandle xtabHandle=(CrosstabReportItemHandle)((ExtendedItemHandle)getBindingHolder()).getReportItem();
    String[] aggOns=getAggOns(xtabHandle);
    cmbAggOn.setItems(aggOns);
    String aggstr="String_Node_Str";
    if (getBinding() != null) {
      List aggOnList=getBinding().getAggregateOnList();
      int i=0;
      for (Iterator iterator=aggOnList.iterator(); iterator.hasNext(); ) {
        if (i > 0)         aggstr+="String_Node_Str";
        String name=(String)iterator.next();
        aggstr+=name;
        i++;
      }
    }
 else     if (getDataItemContainer() instanceof AggregationCellHandle) {
      AggregationCellHandle cellHandle=(AggregationCellHandle)getDataItemContainer();
      if (cellHandle.getAggregationOnRow() != null) {
        aggstr+=cellHandle.getAggregationOnRow().getFullName();
        if (cellHandle.getAggregationOnColumn() != null) {
          aggstr+="String_Node_Str";
        }
      }
      if (cellHandle.getAggregationOnColumn() != null) {
        aggstr+=cellHandle.getAggregationOnColumn().getFullName();
      }
    }
 else     if (container instanceof AggregationCellHandle) {
      AggregationCellHandle cellHandle=(AggregationCellHandle)container;
      if (cellHandle.getAggregationOnRow() != null) {
        aggstr+=cellHandle.getAggregationOnRow().getFullName();
        if (cellHandle.getAggregationOnColumn() != null) {
          aggstr+="String_Node_Str";
        }
      }
      if (cellHandle.getAggregationOnColumn() != null) {
        aggstr+=cellHandle.getAggregationOnColumn().getFullName();
      }
    }
    for (int j=0; j < aggOns.length; j++) {
      if (aggOns[j].equals(aggstr)) {
        cmbAggOn.select(j);
        return;
      }
    }
    cmbAggOn.select(0);
  }
 catch (  ExtendedElementException e) {
    ExceptionUtil.handle(e);
  }
}

Fixed version (ground truth):
private void initAggOn(){
  try {
    CrosstabReportItemHandle xtabHandle=(CrosstabReportItemHandle)((ExtendedItemHandle)getBindingHolder()).getReportItem();
    String[] aggOns=getAggOns(xtabHandle);
    cmbAggOn.setItems(aggOns);
    String aggstr="String_Node_Str";
    if (getBinding() != null) {
      List aggOnList=getBinding().getAggregateOnList();
      int i=0;
      for (Iterator iterator=aggOnList.iterator(); iterator.hasNext(); ) {
        if (i > 0)         aggstr+="String_Node_Str";
        String name=(String)iterator.next();
        aggstr+=name;
        i++;
      }
    }
 else     if (isTimePeriod()) {
      List rowLevelList=getCrosstabViewHandleLevels(xtabHandle,ICrosstabConstants.ROW_AXIS_TYPE);
      List columnLevelList=getCrosstabViewHandleLevels(xtabHandle,ICrosstabConstants.COLUMN_AXIS_TYPE);
      if (rowLevelList.size() != 0 && columnLevelList.size() == 0) {
        aggstr=(String)rowLevelList.get(rowLevelList.size() - 1);
      }
 else       if (rowLevelList.size() == 0 && columnLevelList.size() != 0) {
        aggstr=(String)columnLevelList.get(columnLevelList.size() - 1);
      }
 else       if (rowLevelList.size() != 0 && columnLevelList.size() != 0) {
        aggstr=(String)rowLevelList.get(rowLevelList.size() - 1) + "String_Node_Str" + (String)columnLevelList.get(columnLevelList.size() - 1);
      }
    }
 else     if (getDataItemContainer() instanceof AggregationCellHandle) {
      AggregationCellHandle cellHandle=(AggregationCellHandle)getDataItemContainer();
      if (cellHandle.getAggregationOnRow() != null) {
        aggstr+=cellHandle.getAggregationOnRow().getFullName();
        if (cellHandle.getAggregationOnColumn() != null) {
          aggstr+="String_Node_Str";
        }
      }
      if (cellHandle.getAggregationOnColumn() != null) {
        aggstr+=cellHandle.getAggregationOnColumn().getFullName();
      }
    }
 else     if (container instanceof AggregationCellHandle) {
      AggregationCellHandle cellHandle=(AggregationCellHandle)container;
      if (cellHandle.getAggregationOnRow() != null) {
        aggstr+=cellHandle.getAggregationOnRow().getFullName();
        if (cellHandle.getAggregationOnColumn() != null) {
          aggstr+="String_Node_Str";
        }
      }
      if (cellHandle.getAggregationOnColumn() != null) {
        aggstr+=cellHandle.getAggregationOnColumn().getFullName();
      }
    }
    for (int j=0; j < aggOns.length; j++) {
      if (aggOns[j].equals(aggstr)) {
        cmbAggOn.select(j);
        return;
      }
    }
    cmbAggOn.select(0);
  }
 catch (  ExtendedElementException e) {
    ExceptionUtil.handle(e);
  }
}