Program: 125467
Project: 125467
Buggy source:
/** 
 * add StringConnection Controls.
 */
private void addStringConnectionControls(){
  urlConnectionStringText.addListener(SWT.FocusIn,new Listener(){
    @Override public void handleEvent(    final Event e){
      if (!isContextMode()) {
        if (dbTypeCombo.getSelectionIndex() >= 0) {
          setPropertiesFormEditable(false);
          urlConnectionStringText.setEditable(true);
        }
 else {
          updateStatus(IStatus.ERROR,Messages.getString("String_Node_Str",dbTypeCombo.getLabel()));
        }
      }
    }
  }
);
  urlConnectionStringText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      if (!isContextMode()) {
        if (urlConnectionStringText.getEditable()) {
          if (!databaseSettingIsValide) {
            updateStatus(IStatus.INFO,Messages.getString("String_Node_Str"));
          }
          databaseSettingIsValide=false;
          checkButton.setEnabled(true);
          String[] s=DatabaseConnStrUtil.analyseURL(getConnection().getDatabaseType(),getConnection().getDbVersionString(),urlConnectionStringText.getText());
          String selection=s[0];
          if (!dbTypeCombo.getText().equals(selection)) {
            dbTypeCombo.setText(selection);
            dbTypeCombo.forceFocus();
          }
          int index=1;
          if (s[index] != "String_Node_Str") {
            if (selection.equals(EDatabaseConnTemplate.GODBC.getDBDisplayName()) || selection.equals(EDatabaseConnTemplate.MSODBC.getDBDisplayName())) {
              datasourceText.setText(s[index]);
              getConnection().setDatasourceName(s[index]);
              getConnection().setURL(getStringConnection());
            }
 else             if (selection.equals(EDatabaseConnTemplate.SQLITE.getDBDisplayName()) || selection.equals(EDatabaseConnTemplate.ACCESS.getDBDisplayName())) {
              fileField.setText(s[index]);
              getConnection().setFileFieldName(s[index]);
            }
 else             if (selection.equals(EDatabaseConnTemplate.JAVADB_EMBEDED.getDBDisplayName())) {
              sidOrDatabaseText.setText(s[index]);
              getConnection().setSID(s[index]);
              getConnection().setURL(getStringConnection());
            }
 else             if (selection.equals(EDatabaseConnTemplate.HSQLDB_IN_PROGRESS.getDBDisplayName())) {
              directoryField.setText(s[index]);
              getConnection().setDBRootPath(s[index]);
            }
 else {
              serverText.setText(s[index]);
              getConnection().setServerName(s[index]);
            }
          }
          index=2;
          if (s[index] != "String_Node_Str") {
            if (selection.equals(EDatabaseConnTemplate.INTERBASE.getDBDisplayName()) || selection.equals(EDatabaseConnTemplate.TERADATA.getDBDisplayName()) || selection.equals(EDatabaseConnTemplate.AS400.getDBDisplayName())|| selection.equals(EDatabaseConnTemplate.HSQLDB_IN_PROGRESS.getDBDisplayName())) {
              sidOrDatabaseText.setText(s[index]);
              getConnection().setSID(s[index]);
            }
 else             if (selection.equals(EDatabaseConnTemplate.FIREBIRD.getDBDisplayName())) {
              fileField.setText(s[index]);
              getConnection().setFileFieldName(s[index]);
            }
 else {
              portText.setText(s[index]);
              getConnection().setPort(s[index]);
            }
          }
          index=3;
          if (s[index] != "String_Node_Str") {
            if (selection.equals(EDatabaseConnTemplate.AS400.getDBDisplayName())) {
              sidOrDatabaseText.setText(s[index]);
              getConnection().setSID(s[index]);
            }
          }
          index=4;
          if (s[index] != "String_Node_Str") {
            if (selection.equals(EDatabaseConnTemplate.INFORMIX.getDBDisplayName())) {
              datasourceText.setText(s[index]);
              getConnection().setDatasourceName(s[index]);
            }
 else {
              additionParamText.setText(s[index]);
              getConnection().setAdditionalParams(s[index]);
            }
          }
          index=5;
          if (s[index] != "String_Node_Str") {
            additionParamText.setText(s[index]);
            getConnection().setAdditionalParams(s[index]);
          }
        }
        checkDBTypeAS400();
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * add StringConnection Controls.
 */
private void addStringConnectionControls(){
  urlConnectionStringText.addListener(SWT.FocusIn,new Listener(){
    @Override public void handleEvent(    final Event e){
      if (!isContextMode()) {
        if (dbTypeCombo.getSelectionIndex() >= 0) {
          setPropertiesFormEditable(false);
          urlConnectionStringText.setEditable(true);
        }
 else {
          updateStatus(IStatus.ERROR,Messages.getString("String_Node_Str",dbTypeCombo.getLabel()));
        }
      }
    }
  }
);
  urlConnectionStringText.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    final ModifyEvent e){
      if (!isContextMode()) {
        if (urlConnectionStringText.getEditable()) {
          if (!databaseSettingIsValide) {
            updateStatus(IStatus.INFO,Messages.getString("String_Node_Str"));
          }
          databaseSettingIsValide=false;
          checkButton.setEnabled(true);
          String[] s=DatabaseConnStrUtil.analyseURL(getConnection().getDatabaseType(),getConnection().getDbVersionString(),urlConnectionStringText.getText());
          String selection=s[0];
          if (!dbTypeCombo.getText().equals(selection)) {
            dbTypeCombo.setText(selection);
            dbTypeCombo.forceFocus();
          }
          int index=1;
          if (s[index] != "String_Node_Str") {
            if (selection.equals(EDatabaseConnTemplate.GODBC.getDBDisplayName()) || selection.equals(EDatabaseConnTemplate.MSODBC.getDBDisplayName())) {
              datasourceText.setText(s[index]);
              getConnection().setDatasourceName(s[index]);
              getConnection().setURL(getStringConnection());
            }
 else             if (selection.equals(EDatabaseConnTemplate.SQLITE.getDBDisplayName()) || selection.equals(EDatabaseConnTemplate.ACCESS.getDBDisplayName())) {
              fileField.setText(s[index]);
              getConnection().setFileFieldName(s[index]);
            }
 else             if (selection.equals(EDatabaseConnTemplate.JAVADB_EMBEDED.getDBDisplayName())) {
              sidOrDatabaseText.setText(s[index]);
              getConnection().setSID(s[index]);
              getConnection().setURL(getStringConnection());
            }
 else             if (selection.equals(EDatabaseConnTemplate.HSQLDB_IN_PROGRESS.getDBDisplayName())) {
              directoryField.setText(s[index]);
              getConnection().setDBRootPath(s[index]);
            }
 else {
              serverText.setText(s[index]);
              getConnection().setServerName(s[index]);
            }
          }
          index=2;
          if (s[index] != "String_Node_Str") {
            if (selection.equals(EDatabaseConnTemplate.INTERBASE.getDBDisplayName()) || selection.equals(EDatabaseConnTemplate.TERADATA.getDBDisplayName()) || selection.equals(EDatabaseConnTemplate.AS400.getDBDisplayName())|| selection.equals(EDatabaseConnTemplate.HSQLDB_IN_PROGRESS.getDBDisplayName())) {
              sidOrDatabaseText.setText(s[index]);
              getConnection().setSID(s[index]);
            }
 else             if (selection.equals(EDatabaseConnTemplate.FIREBIRD.getDBDisplayName())) {
              fileField.setText(s[index]);
              getConnection().setFileFieldName(s[index]);
            }
 else {
              portText.setText(s[index]);
              getConnection().setPort(s[index]);
            }
          }
          index=3;
          if (s[index] != "String_Node_Str") {
            if (selection.equals(EDatabaseConnTemplate.AS400.getDBDisplayName()) || selection.equals(EDatabaseConnTemplate.REDSHIFT.getDBDisplayName())) {
              sidOrDatabaseText.setText(s[index]);
              getConnection().setSID(s[index]);
            }
          }
          index=4;
          if (s[index] != "String_Node_Str") {
            if (selection.equals(EDatabaseConnTemplate.INFORMIX.getDBDisplayName())) {
              datasourceText.setText(s[index]);
              getConnection().setDatasourceName(s[index]);
            }
 else {
              additionParamText.setText(s[index]);
              getConnection().setAdditionalParams(s[index]);
            }
          }
          index=5;
          if (s[index] != "String_Node_Str") {
            additionParamText.setText(s[index]);
            getConnection().setAdditionalParams(s[index]);
          }
        }
        checkDBTypeAS400();
      }
    }
  }
);
}