Program: 65350
Project: 65350
Buggy source:
public void createControl(Composite parent){
  helper=new DataSourceSelectionHelper();
  Composite composite=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.numColumns=2;
  composite.setLayout(layout);
  setupDSChoiceListRadio(composite);
  setupConnectionProfileRadio(composite);
  GridData layoutData=new GridData(GridData.FILL_BOTH);
  layoutData.horizontalSpan=2;
  dataSourceList=new ListViewer(composite,SWT.SINGLE | SWT.BORDER);
  dataSourceList.getControl().setLayoutData(layoutData);
  dataSourceList.setContentProvider(new IStructuredContentProvider(){
    public Object[] getElements(    Object inputElement){
      return (Object[])inputElement;
    }
    public void dispose(){
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
  }
);
  dataSourceList.setLabelProvider(new LabelProvider(){
    public String getText(    Object element){
      String displayName=null;
      if (element instanceof ExtensionManifest) {
        ExtensionManifest config=(ExtensionManifest)element;
        DataSetProvider.findDataSourceElement(config.getExtensionID());
        displayName=config.getDataSourceDisplayName();
      }
 else {
        displayName=element.toString();
      }
      return displayName;
    }
  }
);
  dataSourceList.setInput(helper.getFilteredDataSourceArray());
  dataSourceList.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      validateDataSourceName();
      prevSelectedDataSourceType=getSelectedDataSource();
      validateDataSourceHandle(prevSelectedDataSourceType);
      setPageComplete(!helper.hasNextPage(prevSelectedDataSourceType) && getMessageType() != ERROR);
    }
  }
);
  dataSourceList.setSorter(new ViewerSorter());
  dataSourceNameLabel=new Label(composite,SWT.NONE);
  dataSourceNameLabel.setText(Messages.getString("String_Node_Str"));
  dataSourceName=new Text(composite,SWT.BORDER);
  String name=ReportPlugin.getDefault().getCustomName(ReportDesignConstants.DATA_SOURCE_ELEMENT);
  if (name != null) {
    dataSourceName.setText(Utility.getUniqueDataSourceName(name));
  }
 else {
    dataSourceName.setText(Utility.getUniqueDataSourceName(Messages.getString("String_Node_Str")));
  }
  dsName=dataSourceName.getText().trim();
  layoutData=new GridData(GridData.FILL_HORIZONTAL);
  dataSourceName.setLayoutData(layoutData);
  dataSourceName.setToolTipText(EMPTY_NAME);
  dataSourceName.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      validateDataSourceName();
    }
  }
);
  setControl(composite);
  Utility.setSystemHelp(getControl(),IHelpConstants.CONEXT_ID_DATASOURCE_NEW);
}

Fixed version (ground truth):
public void createControl(Composite parent){
  helper=new DataSourceSelectionHelper();
  ScrolledComposite scrollContent=new ScrolledComposite(parent,SWT.H_SCROLL | SWT.V_SCROLL);
  scrollContent.setAlwaysShowScrollBars(false);
  scrollContent.setExpandHorizontal(true);
  scrollContent.setMinWidth(500);
  scrollContent.setMinHeight(300);
  scrollContent.setLayout(new FillLayout());
  scrollContent.setLayoutData(new GridData(GridData.FILL_BOTH));
  Composite composite=new Composite(scrollContent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.numColumns=2;
  composite.setLayout(layout);
  GridData gd=new GridData(GridData.FILL_BOTH);
  composite.setLayoutData(gd);
  setupDSChoiceListRadio(composite);
  setupConnectionProfileRadio(composite);
  GridData layoutData=new GridData(GridData.FILL_BOTH);
  layoutData.horizontalSpan=2;
  dataSourceList=new ListViewer(composite,SWT.SINGLE | SWT.FULL_SELECTION | SWT.BORDER| SWT.H_SCROLL| SWT.V_SCROLL);
  dataSourceList.getList().setLayoutData(layoutData);
  dataSourceList.setContentProvider(new IStructuredContentProvider(){
    public Object[] getElements(    Object inputElement){
      return (Object[])inputElement;
    }
    public void dispose(){
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
  }
);
  dataSourceList.setLabelProvider(new LabelProvider(){
    public String getText(    Object element){
      String displayName=null;
      if (element instanceof ExtensionManifest) {
        ExtensionManifest config=(ExtensionManifest)element;
        DataSetProvider.findDataSourceElement(config.getExtensionID());
        displayName=config.getDataSourceDisplayName();
      }
 else {
        displayName=element.toString();
      }
      return displayName;
    }
  }
);
  dataSourceList.setInput(helper.getFilteredDataSourceArray());
  dataSourceList.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      validateDataSourceName();
      prevSelectedDataSourceType=getSelectedDataSource();
      validateDataSourceHandle(prevSelectedDataSourceType);
      setPageComplete(!helper.hasNextPage(prevSelectedDataSourceType) && getMessageType() != ERROR);
    }
  }
);
  dataSourceList.setSorter(new ViewerSorter());
  dataSourceNameLabel=new Label(composite,SWT.NONE);
  dataSourceNameLabel.setText(Messages.getString("String_Node_Str"));
  dataSourceName=new Text(composite,SWT.BORDER);
  String name=ReportPlugin.getDefault().getCustomName(ReportDesignConstants.DATA_SOURCE_ELEMENT);
  if (name != null) {
    dataSourceName.setText(Utility.getUniqueDataSourceName(name));
  }
 else {
    dataSourceName.setText(Utility.getUniqueDataSourceName(Messages.getString("String_Node_Str")));
  }
  dsName=dataSourceName.getText().trim();
  layoutData=new GridData(GridData.FILL_HORIZONTAL);
  dataSourceName.setLayoutData(layoutData);
  dataSourceName.setToolTipText(EMPTY_NAME);
  dataSourceName.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      validateDataSourceName();
    }
  }
);
  setControl(scrollContent);
  dataSourceName.setFocus();
  Point size=composite.computeSize(SWT.DEFAULT,SWT.DEFAULT);
  composite.setSize(size);
  scrollContent.setContent(composite);
  Utility.setSystemHelp(getControl(),IHelpConstants.CONEXT_ID_DATASOURCE_NEW);
}