Program: 67203
Project: 67203
Buggy source:
/** 
 * Set related data set on specified session.
 * @param handle the handle which contains related data set.
 * @param session data request session handle
 * @param keepDataSetFilter 
 * @param disAllowAggregation
 * @throws AdapterException
 * @throws BirtException
 */
@SuppressWarnings("String_Node_Str") public void defineDataSet(DataSetHandle handle,DataRequestSession session,boolean keepDataSetFilter,boolean disAllowAggregation) throws AdapterException, BirtException {
  if (handle == null) {
    return;
  }
  DataSourceHandle dataSourceHandle=handle.getDataSource();
  if (dataSourceHandle != null) {
    IBaseDataSourceDesign dsourceDesign=session.getModelAdaptor().adaptDataSource(dataSourceHandle);
    session.defineDataSource(dsourceDesign);
  }
  if (handle instanceof JointDataSetHandle) {
    Iterator iter=((JointDataSetHandle)handle).dataSetsIterator();
    while (iter.hasNext()) {
      DataSetHandle dsHandle=(DataSetHandle)iter.next();
      if (dsHandle != null) {
        defineDataSet(dsHandle,session,true,false);
      }
    }
  }
  if (handle instanceof DerivedDataSetHandle) {
    List inputDataSet=((DerivedDataSetHandle)handle).getInputDataSets();
    for (int i=0; i < inputDataSet.size(); i++) {
      defineDataSet((DataSetHandle)inputDataSet.get(i),session,keepDataSetFilter,disAllowAggregation);
    }
  }
  BaseDataSetDesign baseDS=session.getModelAdaptor().adaptDataSet(handle);
  if (baseDS == null) {
    return;
  }
  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 org.eclipse.birt.data.engine.api.querydefn.ComputedColumn(computedColumn.getName(),"String_Node_Str"));
        }
      }
    }
  }
  new ModelDteApiAdapter().defineDataSet(handle,session);
}

Fixed version (ground truth):
/** 
 * Set related data set on specified session.
 * @param handle the handle which contains related data set.
 * @param session data request session handle
 * @param keepDataSetFilter 
 * @param disAllowAggregation
 * @throws AdapterException
 * @throws BirtException
 */
@SuppressWarnings("String_Node_Str") public void defineDataSet(DataSetHandle handle,DataRequestSession session,boolean keepDataSetFilter,boolean disAllowAggregation) throws AdapterException, BirtException {
  if (handle == null) {
    return;
  }
  DataSourceHandle dataSourceHandle=handle.getDataSource();
  if (dataSourceHandle != null) {
    IBaseDataSourceDesign dsourceDesign=session.getModelAdaptor().adaptDataSource(dataSourceHandle);
    session.defineDataSource(dsourceDesign);
  }
  if (handle instanceof JointDataSetHandle) {
    Iterator iter=((JointDataSetHandle)handle).dataSetsIterator();
    while (iter.hasNext()) {
      DataSetHandle dsHandle=(DataSetHandle)iter.next();
      if (dsHandle != null) {
        defineDataSet(dsHandle,session,true,false);
      }
    }
  }
  if (handle instanceof DerivedDataSetHandle) {
    List inputDataSet=((DerivedDataSetHandle)handle).getInputDataSets();
    for (int i=0; i < inputDataSet.size(); i++) {
      defineDataSet((DataSetHandle)inputDataSet.get(i),session,keepDataSetFilter,disAllowAggregation);
    }
  }
  BaseDataSetDesign baseDS=session.getModelAdaptor().adaptDataSet(handle);
  if (baseDS == null) {
    return;
  }
  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 org.eclipse.birt.data.engine.api.querydefn.ComputedColumn(computedColumn.getName(),"String_Node_Str"));
        }
      }
    }
  }
  if (executionContext == null) {
    new ModelDteApiAdapter().defineDataSet(handle,session);
  }
 else {
    new ModelDteApiAdapter(executionContext).defineDataSet(handle,session);
  }
}