Program: 66812
Project: 66812
Buggy source:
/** 
 * @param dataSetName
 * @throws AdapterException
 * @throws BirtException
 */
private void defineDataSet(DataSetHandle handle,boolean keepDataSetFilter,boolean disAllowAggregation) throws AdapterException, BirtException {
  if (handle == null) {
    return;
  }
  DataSourceHandle dataSourceHandle=handle.getDataSource();
  if (dataSourceHandle != null) {
    IBaseDataSourceDesign dsourceDesign=this.modelAdaptor.adaptDataSource(dataSourceHandle);
    dataEngine.defineDataSource(dsourceDesign);
  }
  if (handle instanceof JointDataSetHandle) {
    defineSourceDataSets((JointDataSetHandle)handle);
  }
  if (handle instanceof DerivedDataSetHandle) {
    List inputDataSet=((DerivedDataSetHandle)handle).getInputDataSets();
    for (int i=0; i < inputDataSet.size(); i++) {
      defineDataSet((DataSetHandle)inputDataSet.get(i),keepDataSetFilter,disAllowAggregation);
    }
  }
  BaseDataSetDesign baseDS=this.modelAdaptor.adaptDataSet(handle);
  if (useResultHints == false && handle.equals(major)) {
    baseDS.getResultSetHints().clear();
  }
  if (!keepDataSetFilter) {
    if (baseDS.getFilters() != null)     baseDS.getFilters().clear();
  }
  if (disAllowAggregation) {
    List computedColumns=baseDS.getComputedColumns();
    if (computedColumns != null && computedColumns.size() != 0) {
      for (int i=0; i < computedColumns.size(); i++) {
        IComputedColumn computedColumn=(IComputedColumn)computedColumns.get(i);
        if (computedColumn.getAggregateFunction() != null) {
          computedColumns.set(i,new ComputedColumn(computedColumn.getName(),"String_Node_Str"));
        }
      }
    }
  }
  if (handle.getDataSourceName() != null) {
    TransientDataMartUtil.prepareDataSet(sessionContext.getAppContext(),sessionContext.getDataEngineContext(),((DataEngineImpl)dataEngine).getDataSourceDesign(baseDS.getDataSourceName()),baseDS,session);
  }
  dataEngine.defineDataSet(baseDS);
}

Fixed version (ground truth):
/** 
 * @param dataSetName
 * @throws AdapterException
 * @throws BirtException
 */
private void defineDataSet(DataSetHandle handle,boolean keepDataSetFilter,boolean disAllowAggregation) throws AdapterException, BirtException {
  if (handle == null) {
    return;
  }
  DataSourceHandle dataSourceHandle=handle.getDataSource();
  if (dataSourceHandle != null) {
    IBaseDataSourceDesign dsourceDesign=this.modelAdaptor.adaptDataSource(dataSourceHandle);
    dataEngine.defineDataSource(dsourceDesign);
  }
  if (handle instanceof JointDataSetHandle) {
    defineSourceDataSets((JointDataSetHandle)handle);
  }
  if (handle instanceof DerivedDataSetHandle) {
    List inputDataSet=((DerivedDataSetHandle)handle).getInputDataSets();
    for (int i=0; i < inputDataSet.size(); i++) {
      defineDataSet((DataSetHandle)inputDataSet.get(i),keepDataSetFilter,disAllowAggregation);
    }
  }
  BaseDataSetDesign baseDS=this.modelAdaptor.adaptDataSet(handle);
  if (useResultHints == false && handle.equals(major)) {
    baseDS.getResultSetHints().clear();
  }
  if (!keepDataSetFilter) {
    if (baseDS.getFilters() != null)     baseDS.getFilters().clear();
  }
  if (disAllowAggregation) {
    List computedColumns=baseDS.getComputedColumns();
    if (computedColumns != null && computedColumns.size() != 0) {
      for (int i=0; i < computedColumns.size(); i++) {
        IComputedColumn computedColumn=(IComputedColumn)computedColumns.get(i);
        if (computedColumn.getAggregateFunction() != null) {
          computedColumns.set(i,new ComputedColumn(computedColumn.getName(),"String_Node_Str"));
        }
      }
    }
  }
  session.defineDataSet(baseDS);
}