Program: 148251
Project: 148251
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);
  }
  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(){
  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);
}