Program: 78955
Project: 78955
Buggy source:
public void widgetSelected(SelectionEvent e){
  if (e.getSource().equals(btnUseReportData)) {
    if (!btnUseReportData.getSelection()) {
      return;
    }
    try {
      switchDataSet(null);
    }
 catch (    ChartException e1) {
      container.displayException(e1);
    }
    cmbDataSet.setEnabled(false);
    btnNewData.setEnabled(false);
    btnFilters.setEnabled(hasDataSet());
    btnParameters.setEnabled(hasDataSet());
  }
 else   if (e.getSource().equals(btnUseDataSet)) {
    if (!btnUseDataSet.getSelection()) {
      return;
    }
    if (cmbDataSet.getText().length() == 0) {
      cmbDataSet.setItems(getWizardContext().getDataServiceProvider().getAllDataSets());
      cmbDataSet.select(0);
    }
    if (cmbDataSet.getText().length() != 0) {
      try {
        switchDataSet(cmbDataSet.getText());
      }
 catch (      ChartException e1) {
        container.displayException(e1);
      }
    }
    cmbDataSet.setEnabled(true);
    btnNewData.setEnabled(true);
    btnFilters.setEnabled(true);
    btnParameters.setEnabled(true);
  }
 else   if (e.getSource().equals(cmbDataSet)) {
    try {
      ColorPalette.getInstance().restore();
      switchDataSet(cmbDataSet.getText());
    }
 catch (    ChartException e1) {
      container.displayException(e1);
    }
  }
 else   if (e.getSource().equals(btnNewData)) {
    String[] sAllDS=getWizardContext().getDataServiceProvider().getAllDataSets();
    String sCurrentDS="String_Node_Str";
    if (sAllDS.length > 0) {
      sCurrentDS=getWizardContext().getDataServiceProvider().getBoundDataSet();
    }
    getWizardContext().getDataServiceProvider().invoke(IDataServiceProvider.COMMAND_NEW_DATASET);
    sAllDS=((ChartWizardContext)context).getDataServiceProvider().getAllDataSets();
    cmbDataSet.setItems(sAllDS);
    if (sCurrentDS.length() > 0) {
      cmbDataSet.setText(sCurrentDS);
    }
 else     if (sAllDS.length > 0) {
      cmbDataSet.setText(sAllDS[0]);
      try {
        switchDataSet(sAllDS[0]);
      }
 catch (      ChartException e1) {
        container.displayException(e1);
      }
    }
  }
 else   if (e.getSource().equals(btnFilters)) {
    if (getWizardContext().getDataServiceProvider().invoke(IDataServiceProvider.COMMAND_EDIT_FILTER) == Window.OK) {
      refreshTablePreview();
      doLivePreview();
    }
  }
 else   if (e.getSource().equals(btnParameters)) {
    if (getWizardContext().getDataServiceProvider().invoke(IDataServiceProvider.COMMAND_EDIT_PARAMETER) == Window.OK) {
      refreshTablePreview();
      doLivePreview();
    }
  }
 else   if (e.getSource() instanceof MenuItem) {
    MenuItem item=(MenuItem)e.getSource();
    IAction action=(IAction)item.getData();
    action.setChecked(!action.isChecked());
    action.run();
  }
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  if (e.getSource().equals(btnUseReportData)) {
    if (!btnUseReportData.getSelection()) {
      return;
    }
    try {
      switchDataSet(null);
    }
 catch (    ChartException e1) {
      container.displayException(e1);
    }
    cmbDataSet.setEnabled(false);
    btnNewData.setEnabled(false);
    btnFilters.setEnabled(hasDataSet());
    btnParameters.setEnabled(hasDataSet());
  }
 else   if (e.getSource().equals(btnUseDataSet)) {
    if (!btnUseDataSet.getSelection()) {
      return;
    }
    if (cmbDataSet.getText().length() == 0) {
      cmbDataSet.setItems(getWizardContext().getDataServiceProvider().getAllDataSets());
      cmbDataSet.select(0);
    }
    if (cmbDataSet.getText().length() != 0) {
      try {
        switchDataSet(cmbDataSet.getText());
      }
 catch (      ChartException e1) {
        container.displayException(e1);
      }
    }
    cmbDataSet.setEnabled(true);
    btnNewData.setEnabled(true);
    btnFilters.setEnabled(hasDataSet());
    btnParameters.setEnabled(hasDataSet());
  }
 else   if (e.getSource().equals(cmbDataSet)) {
    try {
      ColorPalette.getInstance().restore();
      switchDataSet(cmbDataSet.getText());
    }
 catch (    ChartException e1) {
      container.displayException(e1);
    }
  }
 else   if (e.getSource().equals(btnNewData)) {
    String[] sAllDS=getWizardContext().getDataServiceProvider().getAllDataSets();
    String sCurrentDS="String_Node_Str";
    if (sAllDS.length > 0) {
      sCurrentDS=getWizardContext().getDataServiceProvider().getBoundDataSet();
    }
    getWizardContext().getDataServiceProvider().invoke(IDataServiceProvider.COMMAND_NEW_DATASET);
    sAllDS=((ChartWizardContext)context).getDataServiceProvider().getAllDataSets();
    cmbDataSet.setItems(sAllDS);
    if (sCurrentDS.length() > 0) {
      cmbDataSet.setText(sCurrentDS);
    }
 else     if (sAllDS.length > 0) {
      cmbDataSet.setText(sAllDS[0]);
      try {
        switchDataSet(sAllDS[0]);
      }
 catch (      ChartException e1) {
        container.displayException(e1);
      }
    }
  }
 else   if (e.getSource().equals(btnFilters)) {
    if (getWizardContext().getDataServiceProvider().invoke(IDataServiceProvider.COMMAND_EDIT_FILTER) == Window.OK) {
      refreshTablePreview();
      doLivePreview();
    }
  }
 else   if (e.getSource().equals(btnParameters)) {
    if (getWizardContext().getDataServiceProvider().invoke(IDataServiceProvider.COMMAND_EDIT_PARAMETER) == Window.OK) {
      refreshTablePreview();
      doLivePreview();
    }
  }
 else   if (e.getSource() instanceof MenuItem) {
    MenuItem item=(MenuItem)e.getSource();
    IAction action=(IAction)item.getData();
    action.setChecked(!action.isChecked());
    action.run();
  }
}