Program: 68271
Project: 68271
Buggy source:
private void generateOutputParmsBindings(DataSetHandle datasetHandle){
  List<DataSetParameterHandle> outputParams=new ArrayList<DataSetParameterHandle>();
  for (Iterator iter=datasetHandle.parametersIterator(); iter.hasNext(); ) {
    Object obj=iter.next();
    if ((obj instanceof DataSetParameterHandle) && ((DataSetParameterHandle)obj).isOutput() == true) {
      outputParams.add((DataSetParameterHandle)obj);
    }
  }
  int ret=-1;
  if (outputParams.size() > 0) {
    MessageDialog prefDialog=new MessageDialog(UIUtil.getDefaultShell(),Messages.getString("String_Node_Str"),null,Messages.getString("String_Node_Str"),MessageDialog.QUESTION,new String[]{Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")},0);
    ret=prefDialog.open();
  }
  if (ret == 0)   for (int i=0; i < outputParams.size(); i++) {
    DataSetParameterHandle param=outputParams.get(i);
    ComputedColumn bindingColumn=StructureFactory.newComputedColumn(bindingObject,param.getName());
    bindingColumn.setDataType(param.getDataType());
    String groupType=DEUtil.getGroupControlType(bindingObject);
    List groupList=DEUtil.getGroups(bindingObject);
    ExpressionUtility.setBindingColumnExpression(param,bindingColumn);
    if (bindingObject instanceof ReportItemHandle) {
      try {
        ((ReportItemHandle)bindingObject).addColumnBinding(bindingColumn,false);
      }
 catch (      SemanticException e) {
        ExceptionUtil.handle(e);
      }
      continue;
    }
    if (ExpressionUtil.hasAggregation(bindingColumn.getExpression())) {
      if (groupType.equals(DEUtil.TYPE_GROUP_GROUP))       bindingColumn.setAggregrateOn(((GroupHandle)groupList.get(0)).getName());
 else       if (groupType.equals(DEUtil.TYPE_GROUP_LISTING))       bindingColumn.setAggregrateOn(null);
    }
  }
}

Fixed version (ground truth):
private void generateOutputParmsBindings(DataSetHandle datasetHandle){
  List<DataSetParameterHandle> outputParams=new ArrayList<DataSetParameterHandle>();
  for (Iterator iter=datasetHandle.parametersIterator(); iter.hasNext(); ) {
    Object obj=iter.next();
    if ((obj instanceof DataSetParameterHandle) && ((DataSetParameterHandle)obj).isOutput() == true) {
      outputParams.add((DataSetParameterHandle)obj);
    }
  }
  int ret=-1;
  if (outputParams.size() > 0) {
    MessageDialog prefDialog=new MessageDialog(UIUtil.getDefaultShell(),Messages.getString("String_Node_Str"),null,Messages.getString("String_Node_Str"),MessageDialog.QUESTION,new String[]{Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")},0);
    ret=prefDialog.open();
  }
  if (ret == 0)   for (int i=0; i < outputParams.size(); i++) {
    DataSetParameterHandle param=outputParams.get(i);
    ComputedColumn bindingColumn=StructureFactory.newComputedColumn(bindingObject,param.getName());
    bindingColumn.setDataType(param.getDataType());
    String groupType=DEUtil.getGroupControlType(bindingObject);
    List groupList=DEUtil.getGroups(bindingObject);
    ExpressionUtility.setBindingColumnExpression(param,bindingColumn,true);
    if (bindingObject instanceof ReportItemHandle) {
      try {
        ((ReportItemHandle)bindingObject).addColumnBinding(bindingColumn,false);
      }
 catch (      SemanticException e) {
        ExceptionUtil.handle(e);
      }
      continue;
    }
    if (ExpressionUtil.hasAggregation(bindingColumn.getExpression())) {
      if (groupType.equals(DEUtil.TYPE_GROUP_GROUP))       bindingColumn.setAggregrateOn(((GroupHandle)groupList.get(0)).getName());
 else       if (groupType.equals(DEUtil.TYPE_GROUP_LISTING))       bindingColumn.setAggregrateOn(null);
    }
  }
}