Program: 68861
Project: 68861
Buggy source:
/** 
 * add several common use page for Birt data set editor
 * @param ds
 */
private void addCommonPage(DataSetHandle ds){
  if (ds instanceof ScriptDataSetHandle) {
    addPageTo("String_Node_Str",OUTPUTCOLUMN_PAGE,Messages.getString("String_Node_Str"),null,new OutputColumnDefnPage());
    addPageTo("String_Node_Str",PARAMETERS_PAGE,Messages.getString("String_Node_Str"),null,new DataSetParametersPage());
    addPageTo("String_Node_Str",FILTERS_PAGE,Messages.getString("String_Node_Str"),null,new DataSetFiltersPage());
    addDataSetSettingPage(ds);
    addPageTo("String_Node_Str",RESULTSET_PREVIEW_PAGE,Messages.getString("String_Node_Str"),null,new ResultSetPreviewPage());
  }
 else   if (ds instanceof OdaDataSetHandle) {
    addPageTo("String_Node_Str",OUTPUTCOLUMN_PAGE,Messages.getString("String_Node_Str"),null,new AdvancedDataSetOutputColumnsPage());
    addPageTo("String_Node_Str",COMPUTED_COLUMNS_PAGE,Messages.getString("String_Node_Str"),null,new AdvancedDataSetComputedColumnsPage());
    if (includeInputParameterPage)     addPageTo("String_Node_Str",PARAMETERS_PAGE,Messages.getString("String_Node_Str"),null,new DataSetParametersPage());
    IPropertyPage filterpage=new DataSetFiltersPage();
    try {
      filterpage=(IPropertyPage)Class.forName("String_Node_Str").newInstance();
    }
 catch (    Throwable e) {
    }
    addPageTo("String_Node_Str",FILTERS_PAGE,Messages.getString("String_Node_Str"),null,filterpage);
    addPageTo("String_Node_Str",DATASOURCE_EDITOR_PROPERTY_PAGE,Messages.getString("String_Node_Str"),null,new PropertyBindingPage());
    addDataSetSettingPage(ds);
    if (includeOutputParameterPage)     addPageTo("String_Node_Str",OUTPUT_PARAMETER_PREVIEW_PAGE,Messages.getString("String_Node_Str"),null,new OutputParameterPreviewPage());
    addPageTo("String_Node_Str",RESULTSET_PREVIEW_PAGE,Messages.getString("String_Node_Str"),null,new ResultSetPreviewPage());
  }
 else   if (ds instanceof JointDataSetHandle) {
    addPageTo("String_Node_Str",JOINT_DATA_SET_PAGE,Messages.getString("String_Node_Str"),null,new JointDataSetPage(Messages.getString("String_Node_Str")));
    addPageTo("String_Node_Str",OUTPUTCOLUMN_PAGE,Messages.getString("String_Node_Str"),null,new AdvancedDataSetOutputColumnsPage());
    addPageTo("String_Node_Str",COMPUTED_COLUMNS_PAGE,Messages.getString("String_Node_Str"),null,new AdvancedDataSetComputedColumnsPage());
    addPageTo("String_Node_Str",PARAMETERS_PAGE,Messages.getString("String_Node_Str"),null,new DataSetParametersPage());
    addPageTo("String_Node_Str",FILTERS_PAGE,Messages.getString("String_Node_Str"),null,new DataSetFiltersPage());
    addPageTo("String_Node_Str",RESULTSET_PREVIEW_PAGE,Messages.getString("String_Node_Str"),null,new ResultSetPreviewPage());
  }
 else {
    IPropertyPage[] pages=ExtenalUIUtil.getCommonPages(ds);
    if (pages != null && pages.length > 0) {
      for (int i=0; i < pages.length; i++) {
        addPageTo("String_Node_Str",pages[i].getClass().getName(),pages[i].getName(),null,pages[i]);
      }
      addPageTo("String_Node_Str",OUTPUTCOLUMN_PAGE,Messages.getString("String_Node_Str"),null,new AdvancedDataSetOutputColumnsPage());
      addPageTo("String_Node_Str",COMPUTED_COLUMNS_PAGE,Messages.getString("String_Node_Str"),null,new AdvancedDataSetComputedColumnsPage());
      addPageTo("String_Node_Str",PARAMETERS_PAGE,Messages.getString("String_Node_Str"),null,new DataSetParametersPage());
      addPageTo("String_Node_Str",FILTERS_PAGE,Messages.getString("String_Node_Str"),null,new DataSetFiltersPage());
      addPageTo("String_Node_Str",RESULTSET_PREVIEW_PAGE,Messages.getString("String_Node_Str"),null,new ResultSetPreviewPage());
    }
  }
  if (needToFocusOnOutput)   setDefaultNode(OUTPUTCOLUMN_PAGE);
}

Fixed version (ground truth):
/** 
 * add several common use page for Birt data set editor
 * @param ds
 */
private void addCommonPage(DataSetHandle ds){
  if (ds instanceof ScriptDataSetHandle) {
    addPageTo("String_Node_Str",OUTPUTCOLUMN_PAGE,Messages.getString("String_Node_Str"),null,new AdvancedOutputColumnDefnPage());
    addPageTo("String_Node_Str",PARAMETERS_PAGE,Messages.getString("String_Node_Str"),null,new DataSetParametersPage());
    addPageTo("String_Node_Str",FILTERS_PAGE,Messages.getString("String_Node_Str"),null,new DataSetFiltersPage());
    addDataSetSettingPage(ds);
    addPageTo("String_Node_Str",RESULTSET_PREVIEW_PAGE,Messages.getString("String_Node_Str"),null,new ResultSetPreviewPage());
  }
 else   if (ds instanceof OdaDataSetHandle) {
    addPageTo("String_Node_Str",OUTPUTCOLUMN_PAGE,Messages.getString("String_Node_Str"),null,new AdvancedDataSetOutputColumnsPage());
    addPageTo("String_Node_Str",COMPUTED_COLUMNS_PAGE,Messages.getString("String_Node_Str"),null,new AdvancedDataSetComputedColumnsPage());
    if (includeInputParameterPage)     addPageTo("String_Node_Str",PARAMETERS_PAGE,Messages.getString("String_Node_Str"),null,new DataSetParametersPage());
    IPropertyPage filterpage=new DataSetFiltersPage();
    try {
      filterpage=(IPropertyPage)Class.forName("String_Node_Str").newInstance();
    }
 catch (    Throwable e) {
    }
    addPageTo("String_Node_Str",FILTERS_PAGE,Messages.getString("String_Node_Str"),null,filterpage);
    addPageTo("String_Node_Str",DATASOURCE_EDITOR_PROPERTY_PAGE,Messages.getString("String_Node_Str"),null,new PropertyBindingPage());
    addDataSetSettingPage(ds);
    if (includeOutputParameterPage)     addPageTo("String_Node_Str",OUTPUT_PARAMETER_PREVIEW_PAGE,Messages.getString("String_Node_Str"),null,new OutputParameterPreviewPage());
    addPageTo("String_Node_Str",RESULTSET_PREVIEW_PAGE,Messages.getString("String_Node_Str"),null,new ResultSetPreviewPage());
  }
 else   if (ds instanceof JointDataSetHandle) {
    addPageTo("String_Node_Str",JOINT_DATA_SET_PAGE,Messages.getString("String_Node_Str"),null,new JointDataSetPage(Messages.getString("String_Node_Str")));
    addPageTo("String_Node_Str",OUTPUTCOLUMN_PAGE,Messages.getString("String_Node_Str"),null,new AdvancedDataSetOutputColumnsPage());
    addPageTo("String_Node_Str",COMPUTED_COLUMNS_PAGE,Messages.getString("String_Node_Str"),null,new AdvancedDataSetComputedColumnsPage());
    addPageTo("String_Node_Str",PARAMETERS_PAGE,Messages.getString("String_Node_Str"),null,new DataSetParametersPage());
    addPageTo("String_Node_Str",FILTERS_PAGE,Messages.getString("String_Node_Str"),null,new DataSetFiltersPage());
    addPageTo("String_Node_Str",RESULTSET_PREVIEW_PAGE,Messages.getString("String_Node_Str"),null,new ResultSetPreviewPage());
  }
 else {
    IPropertyPage[] pages=ExtenalUIUtil.getCommonPages(ds);
    if (pages != null && pages.length > 0) {
      for (int i=0; i < pages.length; i++) {
        addPageTo("String_Node_Str",pages[i].getClass().getName(),pages[i].getName(),null,pages[i]);
      }
      addPageTo("String_Node_Str",OUTPUTCOLUMN_PAGE,Messages.getString("String_Node_Str"),null,new AdvancedDataSetOutputColumnsPage());
      addPageTo("String_Node_Str",COMPUTED_COLUMNS_PAGE,Messages.getString("String_Node_Str"),null,new AdvancedDataSetComputedColumnsPage());
      addPageTo("String_Node_Str",PARAMETERS_PAGE,Messages.getString("String_Node_Str"),null,new DataSetParametersPage());
      addPageTo("String_Node_Str",FILTERS_PAGE,Messages.getString("String_Node_Str"),null,new DataSetFiltersPage());
      addPageTo("String_Node_Str",RESULTSET_PREVIEW_PAGE,Messages.getString("String_Node_Str"),null,new ResultSetPreviewPage());
    }
  }
  if (needToFocusOnOutput)   setDefaultNode(OUTPUTCOLUMN_PAGE);
}