Program: 65444
Project: 65444
Buggy source:
/** 
 * Creates the top level control for this dialog page under the given parent composite. <p> Implementors are responsible for ensuring that the created control can be accessed via <code>getControl</code> </p>
 * @param parent the parent composite
 */
public void createControl(Composite parent){
  helper=new DataSetBasePageHelper();
  Composite composite=new Composite(parent,SWT.NULL);
  composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  GridLayout layout=new GridLayout();
  composite.setLayout(layout);
  final Group group=new Group(composite,SWT.NONE);
  group.setLayout(new GridLayout());
  group.setText(Messages.getString("String_Node_Str"));
  group.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,8));
  wizardFilter=new WizardFilter();
  dataSourceFilteredTree=new FilteredTree(group,SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL| SWT.V_SCROLL,this.wizardFilter,true);
  GridData treeData=new GridData(GridData.FILL_BOTH);
  treeData.grabExcessHorizontalSpace=true;
  treeData.grabExcessVerticalSpace=true;
  treeData.heightHint=300;
  treeData.widthHint=600;
  dataSourceFilteredTree.setLayoutData(treeData);
  SelectionListener listener=new SelectionListener(){
    TreeItem parent=null;
    public void widgetDefaultSelected(    SelectionEvent arg0){
    }
    public void widgetSelected(    SelectionEvent event){
      if (event.item.getData() instanceof DataSourceHandle) {
        dataSetTypeChooser.getCombo().setEnabled(true);
        if (parent == null || parent != ((TreeItem)event.item).getParentItem()) {
          parent=((TreeItem)event.item).getParentItem();
          doDataSourceSelectionChanged(parent.getData());
        }
        setPageComplete(!hasWizard() && (getMessageType() != ERROR));
      }
 else {
        dataSetTypeChooser.getCombo().clearSelection();
        dataSetTypeChooser.getCombo().setEnabled(false);
        setPageComplete(false);
      }
    }
  }
;
  dataSourceFilteredTree.getViewer().getTree().addSelectionListener(listener);
  createDataSetTypeViewer(composite);
  setDataSourceTreeViewer();
  setPageStatus();
  new Label(composite,SWT.RIGHT).setText(Messages.getString("String_Node_Str"));
  nameEditor=new Text(composite,SWT.BORDER);
  String name=ReportPlugin.getDefault().getCustomName(ReportDesignConstants.DATA_SET_ELEMENT);
  if (name != null) {
    nameEditor.setText(Utility.getUniqueDataSetName(name));
  }
 else {
    nameEditor.setText(Utility.getUniqueDataSetName(Messages.getString("String_Node_Str")));
  }
  nameEditor.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  nameEditor.setToolTipText(Messages.getString("String_Node_Str"));
  nameEditor.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (StringUtil.isBlank(nameEditor.getText().trim())) {
        setMessage(EMPTY_NAME,ERROR);
      }
 else       if (isDuplicateName()) {
        setMessage(DUPLICATE_NAME,ERROR);
      }
 else       if (containInvalidCharactor(nameEditor.getText())) {
        String msg=Messages.getFormattedString("String_Node_Str",new Object[]{nameEditor.getText()});
        setMessage(msg,ERROR);
      }
 else {
        setMessage(CREATE_PROMPT);
      }
      setPageComplete(!hasWizard() && (getMessageType() != ERROR) && getSelectedDataSource() != null);
    }
  }
);
  setControl(composite);
  Utility.setSystemHelp(getControl(),IHelpConstants.CONEXT_ID_DATASET_NEW);
}

Fixed version (ground truth):
/** 
 * Creates the top level control for this dialog page under the given parent composite. <p> Implementors are responsible for ensuring that the created control can be accessed via <code>getControl</code> </p>
 * @param parent the parent composite
 */
public void createControl(Composite parent){
  helper=new DataSetBasePageHelper();
  Composite composite=new Composite(parent,SWT.NULL);
  composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  GridLayout layout=new GridLayout();
  composite.setLayout(layout);
  final Group group=new Group(composite,SWT.NONE);
  group.setLayout(new GridLayout());
  group.setText(Messages.getString("String_Node_Str"));
  group.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,8));
  wizardFilter=new WizardFilter();
  dataSourceFilteredTree=new FilteredTree(group,SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL| SWT.V_SCROLL,this.wizardFilter,true);
  GridData treeData=new GridData(GridData.FILL_BOTH);
  treeData.grabExcessHorizontalSpace=true;
  treeData.grabExcessVerticalSpace=true;
  treeData.heightHint=300;
  treeData.widthHint=600;
  dataSourceFilteredTree.setLayoutData(treeData);
  SelectionListener listener=new SelectionListener(){
    TreeItem parent=null;
    public void widgetDefaultSelected(    SelectionEvent arg0){
    }
    public void widgetSelected(    SelectionEvent event){
      if (event.item.getData() instanceof DataSourceHandle) {
        dataSetTypeChooser.getCombo().setEnabled(true);
        if (parent == null || parent != ((TreeItem)event.item).getParentItem()) {
          parent=((TreeItem)event.item).getParentItem();
          doDataSourceSelectionChanged(parent.getData());
        }
        setPageComplete(!hasWizard() && (getMessageType() != ERROR));
      }
 else {
        dataSetTypeChooser.getCombo().clearSelection();
        dataSetTypeChooser.getCombo().setEnabled(false);
        setPageComplete(false);
      }
    }
  }
;
  dataSourceFilteredTree.getViewer().getTree().addSelectionListener(listener);
  createDataSetTypeViewer(composite);
  setDataSourceTreeViewer();
  setPageStatus();
  new Label(composite,SWT.RIGHT).setText(Messages.getString("String_Node_Str"));
  nameEditor=new Text(composite,SWT.BORDER);
  String name=ReportPlugin.getDefault().getCustomName(ReportDesignConstants.DATA_SET_ELEMENT);
  if (name != null) {
    nameEditor.setText(Utility.getUniqueDataSetName(name));
  }
 else {
    nameEditor.setText(Utility.getUniqueDataSetName(Messages.getString("String_Node_Str")));
  }
  nameEditor.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  nameEditor.setToolTipText(Messages.getString("String_Node_Str"));
  nameEditor.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (StringUtil.isBlank(nameEditor.getText().trim())) {
        setMessage(EMPTY_NAME,ERROR);
      }
 else       if (isDuplicateName()) {
        setMessage(DUPLICATE_NAME,ERROR);
      }
 else       if (containInvalidCharactor(nameEditor.getText())) {
        String msg=Messages.getFormattedString("String_Node_Str",new Object[]{nameEditor.getText()});
        setMessage(msg,ERROR);
      }
 else {
        setMessage(CREATE_PROMPT);
      }
      setPageComplete(!hasWizard() && (getMessageType() != ERROR) && getSelectedDataSource() != null);
      nameEditor.setFocus();
    }
  }
);
  setControl(composite);
  Utility.setSystemHelp(getControl(),IHelpConstants.CONEXT_ID_DATASET_NEW);
}