Program: 78807
Project: 78807
Buggy source:
protected boolean initDialog(){
  if (inputGroup.getName() != null) {
    nameEditor.setText(inputGroup.getName());
  }
  columnList=DataSetManager.getCurrentInstance().getColumns(dataSetList);
  Iterator itor=columnList.iterator();
  if (!itor.hasNext()) {
    ExceptionHandler.openMessageBox(ERROR_DLG_TITLE_NO_DATA,ERROR_MESSAGE_NO_DATA,SWT.ICON_QUESTION);
    return false;
  }
  while (itor.hasNext()) {
    keyChooser.add(((DataSetItemModel)itor.next()).getDisplayName());
  }
  String groupKey=inputGroup.getKeyExpr();
  int index=-1;
  if (groupKey != null) {
    for (int i=0; i < columnList.size(); i++) {
      if (groupKey.equals(DEUtil.getExpression(columnList.get(i)))) {
        index=i;
        break;
      }
    }
    if (index != -1) {
      keyChooser.select(index);
    }
 else {
      keyChooser.setText(groupKey);
    }
  }
 else {
    getOkButton().setEnabled(false);
  }
  index=getIntervalTypeIndex(inputGroup.getInterval());
  intervalType.select(index);
  if (index == 0) {
    intervalRange.setEnabled(false);
  }
 else {
    intervalRange.setSelection(inputGroup.getIntervalRange());
  }
  if (inputGroup instanceof TableGroupHandle) {
    includeHeader.setSelection(inputGroup.hasHeader());
    includeFooter.setSelection(inputGroup.hasFooter());
  }
 else {
    includeHeader.setSelection(false);
    includeFooter.setSelection(false);
  }
  if (DesignChoiceConstants.SORT_DIRECTION_ASC.equals(inputGroup.getSortDirection())) {
    ascending.setSelection(true);
  }
 else {
    descending.setSelection(true);
  }
  List list=new ArrayList(1);
  list.add(inputGroup);
  tocEditor.setText(UIUtil.convertToGUIString(inputGroup.getTocExpression()));
  return true;
}

Fixed version (ground truth):
protected boolean initDialog(){
  if (inputGroup.getName() != null) {
    nameEditor.setText(inputGroup.getName());
  }
  columnList=DataSetManager.getCurrentInstance().getColumns(dataSetList);
  Iterator itor=columnList.iterator();
  while (itor.hasNext()) {
    keyChooser.add(((DataSetItemModel)itor.next()).getDisplayName());
  }
  String groupKey=inputGroup.getKeyExpr();
  int index=-1;
  if (groupKey != null) {
    for (int i=0; i < columnList.size(); i++) {
      if (groupKey.equals(DEUtil.getExpression(columnList.get(i)))) {
        index=i;
        break;
      }
    }
    if (index != -1) {
      keyChooser.select(index);
    }
 else {
      keyChooser.setText(groupKey);
    }
  }
  index=getIntervalTypeIndex(inputGroup.getInterval());
  intervalType.select(index);
  if (index == 0) {
    intervalRange.setEnabled(false);
  }
 else {
    intervalRange.setSelection(inputGroup.getIntervalRange());
  }
  if (inputGroup instanceof TableGroupHandle) {
    includeHeader.setSelection(inputGroup.hasHeader());
    includeFooter.setSelection(inputGroup.hasFooter());
  }
 else {
    includeHeader.setSelection(false);
    includeFooter.setSelection(false);
  }
  if (DesignChoiceConstants.SORT_DIRECTION_ASC.equals(inputGroup.getSortDirection())) {
    ascending.setSelection(true);
  }
 else {
    descending.setSelection(true);
  }
  List list=new ArrayList(1);
  list.add(inputGroup);
  tocEditor.setText(UIUtil.convertToGUIString(inputGroup.getTocExpression()));
  return true;
}