Program: 140048
Project: 140048
Buggy source:
public void createControl(Composite parent){
  connectionParam=(DBConnectionParameter)getParameter();
  setPageComplete(false);
  Composite comp=new Composite(parent,SWT.NULL);
  comp.setLayoutData(new GridData(GridData.FILL_BOTH));
  GridLayout layout=new GridLayout();
  comp.setLayout(layout);
  layout.numColumns=2;
  layout.verticalSpacing=9;
  GridData data=new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
  data.horizontalSpan=1;
  Composite tempComp=new Composite(comp,SWT.NULL);
  tempComp.setLayoutData(data);
  GridLayout tempLayout=new GridLayout();
  tempComp.setLayout(tempLayout);
  tempLayout.numColumns=2;
  Label label=new Label(tempComp,SWT.NULL);
  label.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  final Text username=new Text(tempComp,SWT.BORDER | SWT.SINGLE);
  GridData fullHorizontal=new GridData(GridData.FILL_HORIZONTAL);
  username.setLayoutData(fullHorizontal);
  username.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent event){
      String userId=((Text)event.getSource()).getText();
      setUserid(userId);
      updateButtonState();
    }
  }
);
  label=new Label(tempComp,SWT.NULL);
  label.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  final Text passwordText=new Text(tempComp,SWT.BORDER | SWT.SINGLE);
  passwordText.setEchoChar('*');
  fullHorizontal=new GridData(GridData.FILL_HORIZONTAL);
  passwordText.setLayoutData(fullHorizontal);
  passwordText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent event){
      String passwordStr=((Text)event.getSource()).getText();
      setPassword(passwordStr);
      updateButtonState();
    }
  }
);
  label=new Label(tempComp,SWT.NULL);
  label.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  final Combo dbTypeCombo=new Combo(tempComp,SWT.READ_ONLY);
  dbTypeCombo.setItems(SupportDBUrlStore.getInstance().getDBTypes());
  dbTypeCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  dbTypeCombo.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      if (dbTypeCombo.getText().trim().equals("String_Node_Str")) {
        updateStatus(IStatus.WARNING,UIMessages.MSG_SELECT_GENERIC_JDBC);
      }
      if (dbTypeCombo.getText().trim().equals("String_Node_Str")) {
        username.setEnabled(false);
        passwordText.setEnabled(false);
      }
      String selectedItem=((Combo)e.getSource()).getText();
      setDBType(selectedItem);
      dbTypeSwitchFlag=true;
      rebuildJDBCControls(SupportDBUrlStore.getInstance().getDBUrlType(selectedItem));
    }
  }
);
  String defalutItem=SupportDBUrlType.MYSQLDEFAULTURL.getDBKey();
  dbTypeCombo.setText(defalutItem);
  setDBType(defalutItem);
  lastTimeDBType=SupportDBUrlStore.getInstance().getDBUrlType(dbTypeCombo.getText());
  checkButton=new Button(comp,SWT.NULL);
  GridData buttonData=new GridData(SWT.CENTER,SWT.CENTER,true,true);
  buttonData.heightHint=25;
  buttonData.widthHint=100;
  checkButton.setLayoutData(buttonData);
  checkButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  checkButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  checkButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      ReturnCode code=checkDBConnection();
      if (code.isOk()) {
        MessageDialog.openInformation(getShell(),DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
      }
 else {
        MessageDialog.openInformation(getShell(),DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str") + code.getMessage());
      }
    }
  }
);
  this.container=comp;
  setControl(comp);
  rebuildJDBCControls(SupportDBUrlType.MYSQLDEFAULTURL);
  String tempUserid=connectionParam.getParameters().getProperty(PluginConstant.USER_PROPERTY);
  if (tempUserid != null) {
    userid=tempUserid;
    username.setText(userid);
  }
  String tempPassword=connectionParam.getParameters().getProperty(org.talend.dq.PluginConstant.PASSWORD_PROPERTY);
  if (tempPassword != null) {
    password=tempPassword;
    passwordText.setText(password);
  }
  String tempURL=connectionParam.getJdbcUrl();
  if (tempURL != null) {
    connectionURL=tempURL;
  }
 else {
  }
}

Fixed version (ground truth):
public void createControl(Composite parent){
  connectionParam=(DBConnectionParameter)getParameter();
  setPageComplete(false);
  Composite comp=new Composite(parent,SWT.NULL);
  comp.setLayoutData(new GridData(GridData.FILL_BOTH));
  GridLayout layout=new GridLayout();
  comp.setLayout(layout);
  layout.numColumns=2;
  layout.verticalSpacing=9;
  GridData data=new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
  data.horizontalSpan=1;
  Composite tempComp=new Composite(comp,SWT.NULL);
  tempComp.setLayoutData(data);
  GridLayout tempLayout=new GridLayout();
  tempComp.setLayout(tempLayout);
  tempLayout.numColumns=2;
  Label label=new Label(tempComp,SWT.NULL);
  label.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  final Text username=new Text(tempComp,SWT.BORDER | SWT.SINGLE);
  GridData fullHorizontal=new GridData(GridData.FILL_HORIZONTAL);
  username.setLayoutData(fullHorizontal);
  username.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent event){
      String userId=((Text)event.getSource()).getText();
      setUserid(userId);
      updateButtonState();
    }
  }
);
  label=new Label(tempComp,SWT.NULL);
  label.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  final Text passwordText=new Text(tempComp,SWT.BORDER | SWT.SINGLE);
  passwordText.setEchoChar('*');
  fullHorizontal=new GridData(GridData.FILL_HORIZONTAL);
  passwordText.setLayoutData(fullHorizontal);
  passwordText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent event){
      String passwordStr=((Text)event.getSource()).getText();
      setPassword(passwordStr);
      updateButtonState();
    }
  }
);
  label=new Label(tempComp,SWT.NULL);
  label.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  final Combo dbTypeCombo=new Combo(tempComp,SWT.READ_ONLY);
  dbTypeCombo.setItems(SupportDBUrlStore.getInstance().getDBTypes());
  dbTypeCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  dbTypeCombo.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      if (dbTypeCombo.getText().trim().equals("String_Node_Str")) {
        updateStatus(IStatus.WARNING,UIMessages.MSG_SELECT_GENERIC_JDBC);
      }
      if (dbTypeCombo.getText().trim().equals("String_Node_Str")) {
        username.setEnabled(false);
        passwordText.setEnabled(false);
      }
 else {
        username.setEnabled(true);
        passwordText.setEnabled(true);
      }
      String selectedItem=((Combo)e.getSource()).getText();
      setDBType(selectedItem);
      dbTypeSwitchFlag=true;
      rebuildJDBCControls(SupportDBUrlStore.getInstance().getDBUrlType(selectedItem));
    }
  }
);
  String defalutItem=SupportDBUrlType.MYSQLDEFAULTURL.getDBKey();
  dbTypeCombo.setText(defalutItem);
  setDBType(defalutItem);
  lastTimeDBType=SupportDBUrlStore.getInstance().getDBUrlType(dbTypeCombo.getText());
  checkButton=new Button(comp,SWT.NULL);
  GridData buttonData=new GridData(SWT.CENTER,SWT.CENTER,true,true);
  buttonData.heightHint=25;
  buttonData.widthHint=100;
  checkButton.setLayoutData(buttonData);
  checkButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  checkButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  checkButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      ReturnCode code=checkDBConnection();
      if (code.isOk()) {
        MessageDialog.openInformation(getShell(),DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
      }
 else {
        MessageDialog.openInformation(getShell(),DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str") + code.getMessage());
      }
    }
  }
);
  this.container=comp;
  setControl(comp);
  rebuildJDBCControls(SupportDBUrlType.MYSQLDEFAULTURL);
  String tempUserid=connectionParam.getParameters().getProperty(PluginConstant.USER_PROPERTY);
  if (tempUserid != null) {
    userid=tempUserid;
    username.setText(userid);
  }
  String tempPassword=connectionParam.getParameters().getProperty(org.talend.dq.PluginConstant.PASSWORD_PROPERTY);
  if (tempPassword != null) {
    password=tempPassword;
    passwordText.setText(password);
  }
  String tempURL=connectionParam.getJdbcUrl();
  if (tempURL != null) {
    connectionURL=tempURL;
  }
 else {
  }
}