Program: 77687
Project: 77687
Buggy source:
void createCustomControl(Composite parent){
  Composite content=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.numColumns=3;
  layout.verticalSpacing=10;
  content.setLayout(layout);
  GridData gridData;
  new Label(content,SWT.RIGHT).setText(JdbcPlugin.getResourceString("String_Node_Str"));
  driverChooserCombo=new ComboViewer(content,SWT.DROP_DOWN);
  gridData=new GridData();
  gridData.horizontalSpan=2;
  gridData.horizontalAlignment=SWT.FILL;
  driverChooserCombo.getControl().setLayoutData(gridData);
  List driverList=JdbcToolKit.getJdbcDriversFromODADir(JDBC_EXTENSION_ID);
  driverChooserCombo.setContentProvider(new IStructuredContentProvider(){
    public Object[] getElements(    Object inputElement){
      if (inputElement != null) {
        return ((ArrayList)inputElement).toArray();
      }
      return new JDBCDriverInformation[]{};
    }
    public void dispose(){
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
  }
);
  driverChooserCombo.setLabelProvider(new LabelProvider(){
    public String getText(    Object inputElement){
      JDBCDriverInformation info=(JDBCDriverInformation)inputElement;
      return info.getDisplayString();
    }
  }
);
  driverChooserCombo.setInput(sortDriverList(driverList));
  driverChooserCombo.addSelectionChangedListener(new ISelectionChangedListener(){
    private String driverClassName;
    public void selectionChanged(    SelectionChangedEvent event){
      StructuredSelection selection=(StructuredSelection)event.getSelection();
      JDBCDriverInformation info=(JDBCDriverInformation)selection.getFirstElement();
      String className=(info != null) ? info.getDriverClassName() : EMPTY_STRING;
      if (className.equalsIgnoreCase(driverClassName) == true)       return;
      driverClassName=className;
      if (info != null) {
        if (info.getUrlFormat() != null) {
          jdbcUrl.setText(info.getUrlFormat());
        }
 else {
          jdbcUrl.setText(EMPTY_STRING);
        }
      }
      jndiName.setText(EMPTY_STRING);
      userName.setText(EMPTY_STRING);
      password.setText(EMPTY_STRING);
      updateTestButton();
    }
  }
);
  new Label(content,SWT.RIGHT).setText(JdbcPlugin.getResourceString("String_Node_Str"));
  jdbcUrl=new Text(content,SWT.BORDER);
  gridData=new GridData();
  gridData.horizontalSpan=2;
  gridData.horizontalAlignment=SWT.FILL;
  gridData.grabExcessHorizontalSpace=true;
  jdbcUrl.setLayoutData(gridData);
  new Label(content,SWT.RIGHT).setText(JdbcPlugin.getResourceString("String_Node_Str"));
  userName=new Text(content,SWT.BORDER);
  gridData=new GridData();
  gridData.horizontalSpan=2;
  gridData.horizontalAlignment=SWT.FILL;
  userName.setLayoutData(gridData);
  new Label(content,SWT.RIGHT).setText(JdbcPlugin.getResourceString("String_Node_Str"));
  password=new Text(content,SWT.BORDER | SWT.PASSWORD);
  gridData=new GridData();
  gridData.horizontalSpan=2;
  gridData.horizontalAlignment=SWT.FILL;
  password.setLayoutData(gridData);
  String jndiLabel="String_Node_Str";
  new Label(content,SWT.RIGHT).setText(jndiLabel);
  jndiName=new Text(content,SWT.BORDER);
  gridData=new GridData();
  gridData.horizontalSpan=2;
  gridData.horizontalAlignment=SWT.FILL;
  jndiName.setLayoutData(gridData);
  new Label(content,SWT.NONE);
  manageButton=new Button(content,SWT.PUSH);
  manageButton.setText(JdbcPlugin.getResourceString("String_Node_Str"));
  testButton=new Button(content,SWT.PUSH);
  testButton.setText(JdbcPlugin.getResourceString("String_Node_Str"));
  testButton.setLayoutData(new GridData(GridData.CENTER));
  addControlListeners();
  updateTestButton();
  verifyJDBCProperties();
  Utility.setSystemHelp(content,IHelpConstants.CONEXT_ID_DATASOURCE_JDBC);
}

Fixed version (ground truth):
void createCustomControl(Composite parent){
  Composite content=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.numColumns=3;
  layout.verticalSpacing=10;
  layout.marginBottom=10;
  content.setLayout(layout);
  GridData gridData;
  new Label(content,SWT.RIGHT).setText(JdbcPlugin.getResourceString("String_Node_Str"));
  driverChooserCombo=new ComboViewer(content,SWT.DROP_DOWN);
  gridData=new GridData();
  gridData.horizontalSpan=2;
  gridData.horizontalAlignment=SWT.FILL;
  driverChooserCombo.getControl().setLayoutData(gridData);
  List driverList=JdbcToolKit.getJdbcDriversFromODADir(JDBC_EXTENSION_ID);
  driverChooserCombo.setContentProvider(new IStructuredContentProvider(){
    public Object[] getElements(    Object inputElement){
      if (inputElement != null) {
        return ((ArrayList)inputElement).toArray();
      }
      return new JDBCDriverInformation[]{};
    }
    public void dispose(){
    }
    public void inputChanged(    Viewer viewer,    Object oldInput,    Object newInput){
    }
  }
);
  driverChooserCombo.setLabelProvider(new LabelProvider(){
    public String getText(    Object inputElement){
      JDBCDriverInformation info=(JDBCDriverInformation)inputElement;
      return info.getDisplayString();
    }
  }
);
  driverChooserCombo.setInput(sortDriverList(driverList));
  driverChooserCombo.addSelectionChangedListener(new ISelectionChangedListener(){
    private String driverClassName;
    public void selectionChanged(    SelectionChangedEvent event){
      StructuredSelection selection=(StructuredSelection)event.getSelection();
      JDBCDriverInformation info=(JDBCDriverInformation)selection.getFirstElement();
      String className=(info != null) ? info.getDriverClassName() : EMPTY_STRING;
      if (className.equalsIgnoreCase(driverClassName) == true)       return;
      driverClassName=className;
      if (info != null) {
        if (info.getUrlFormat() != null) {
          jdbcUrl.setText(info.getUrlFormat());
        }
 else {
          jdbcUrl.setText(EMPTY_STRING);
        }
      }
      jndiName.setText(EMPTY_STRING);
      userName.setText(EMPTY_STRING);
      password.setText(EMPTY_STRING);
      updateTestButton();
    }
  }
);
  new Label(content,SWT.RIGHT).setText(JdbcPlugin.getResourceString("String_Node_Str"));
  jdbcUrl=new Text(content,SWT.BORDER);
  gridData=new GridData();
  gridData.horizontalSpan=2;
  gridData.horizontalAlignment=SWT.FILL;
  gridData.grabExcessHorizontalSpace=true;
  jdbcUrl.setLayoutData(gridData);
  new Label(content,SWT.RIGHT).setText(JdbcPlugin.getResourceString("String_Node_Str"));
  userName=new Text(content,SWT.BORDER);
  gridData=new GridData();
  gridData.horizontalSpan=2;
  gridData.horizontalAlignment=SWT.FILL;
  userName.setLayoutData(gridData);
  new Label(content,SWT.RIGHT).setText(JdbcPlugin.getResourceString("String_Node_Str"));
  password=new Text(content,SWT.BORDER | SWT.PASSWORD);
  gridData=new GridData();
  gridData.horizontalSpan=2;
  gridData.horizontalAlignment=SWT.FILL;
  password.setLayoutData(gridData);
  String jndiLabel="String_Node_Str";
  new Label(content,SWT.RIGHT).setText(jndiLabel);
  jndiName=new Text(content,SWT.BORDER);
  gridData=new GridData();
  gridData.horizontalSpan=2;
  gridData.horizontalAlignment=SWT.FILL;
  jndiName.setLayoutData(gridData);
  new Label(content,SWT.NONE);
  manageButton=new Button(content,SWT.PUSH);
  manageButton.setText(JdbcPlugin.getResourceString("String_Node_Str"));
  testButton=new Button(content,SWT.PUSH);
  testButton.setText(JdbcPlugin.getResourceString("String_Node_Str"));
  testButton.setLayoutData(new GridData(GridData.CENTER));
  addControlListeners();
  updateTestButton();
  verifyJDBCProperties();
  Utility.setSystemHelp(content,IHelpConstants.CONEXT_ID_DATASOURCE_JDBC);
}