Program: 148258
Project: 148258
Buggy source:
protected void okPressed(){
  boolean isExist=false;
  if (descCombo.getCombo().getText().trim().length() == 0) {
    MessageDialog.openWarning(null,"String_Node_Str","String_Node_Str");
    descCombo.getCombo().setFocus();
    isOK=false;
    return;
  }
  if (userText.getText().trim().length() == 0) {
    MessageDialog.openWarning(null,"String_Node_Str","String_Node_Str");
    userText.setFocus();
    isOK=false;
    return;
  }
  if (passwordText.getText().trim().length() == 0) {
    MessageDialog.openWarning(null,"String_Node_Str","String_Node_Str");
    passwordText.setFocus();
    isOK=false;
    return;
  }
  isOK=true;
  SAXReader reader=new SAXReader();
  Element root=null;
  if (new File(f).exists()) {
    try {
      logininfoDocument=reader.read(new File(f));
    }
 catch (    DocumentException e) {
      log.error(e.getMessage(),e);
    }
    root=logininfoDocument.getRootElement();
    isExist=checkServer(root);
  }
 else {
    logininfoDocument=DocumentHelper.createDocument();
    root=logininfoDocument.addElement("String_Node_Str");
  }
  Element descEl=checkServerDesc(root);
  if (descEl != null && !urlText.getText().equals(descEl.element("String_Node_Str").getText())) {
    MessageDialog.openWarning(null,"String_Node_Str","String_Node_Str");
    descCombo.getCombo().setFocus();
    isOK=false;
    return;
  }
  isOK=true;
  if (!isExist) {
    addServer(root);
  }
  if (descEl != null)   return;
  XMLWriter writer;
  try {
    writer=new XMLWriter(new FileWriter(f));
    writer.write(logininfoDocument);
    writer.close();
  }
 catch (  IOException e) {
    log.error(e.getMessage(),e);
  }
  setReturnCode(OK);
}

Fixed version (ground truth):
protected void okPressed(){
  if (descCombo.getCombo().getText().trim().length() == 0) {
    MessageDialog.openWarning(null,"String_Node_Str","String_Node_Str");
    descCombo.getCombo().setFocus();
    isOK=false;
    return;
  }
  if (userText.getText().trim().length() == 0) {
    MessageDialog.openWarning(null,"String_Node_Str","String_Node_Str");
    userText.setFocus();
    isOK=false;
    return;
  }
  if (passwordText.getText().trim().length() == 0) {
    MessageDialog.openWarning(null,"String_Node_Str","String_Node_Str");
    passwordText.setFocus();
    isOK=false;
    return;
  }
  isOK=true;
  SAXReader reader=new SAXReader();
  Element root=null;
  Element savedEl=null;
  if (new File(f).exists()) {
    try {
      logininfoDocument=reader.read(new File(f));
    }
 catch (    DocumentException e) {
      log.error(e.getMessage(),e);
    }
    root=logininfoDocument.getRootElement();
    savedEl=checkServerSaved(root);
  }
 else {
    logininfoDocument=DocumentHelper.createDocument();
    root=logininfoDocument.addElement("String_Node_Str");
  }
  Element descEl=checkServerDesc(root);
  if (descEl != null && !urlText.getText().equals(descEl.element("String_Node_Str").getText())) {
    MessageDialog.openWarning(null,"String_Node_Str","String_Node_Str");
    descCombo.getCombo().setFocus();
    isOK=false;
    return;
  }
  isOK=true;
  if (savedEl == null) {
    addServer(root,savePasswordButton.getSelection());
  }
 else {
    Element connected1=savedEl.element("String_Node_Str");
    if (connected1 == null)     connected1=savedEl.addElement("String_Node_Str");
    connected1.setText("String_Node_Str");
    Element saved1=savedEl.element("String_Node_Str");
    if (saved1 == null)     saved1=savedEl.addElement("String_Node_Str");
    saved1.setText(String.valueOf(savePasswordButton.getSelection()));
  }
  XMLWriter writer;
  try {
    writer=new XMLWriter(new FileWriter(f));
    writer.write(logininfoDocument);
    writer.close();
  }
 catch (  IOException e) {
    log.error(e.getMessage(),e);
  }
  setReturnCode(OK);
}