Program: 52222
Project: 52222
Buggy source:
/** 
 * Add a new eperson. This method will check that the email address,  first name, and last name are non empty. Also a check is preformed  to see if the requested email address is allready in use by another user.
 * @param context The current DSpace context
 * @param request The HTTP request parameters
 * @param objectModel Cocoon's object model
 * @return A process result's object.
 */
public static FlowResult processAddEPerson(Context context,Request request,Map objectModel) throws SQLException, AuthorizeException {
  FlowResult result=new FlowResult();
  result.setContinue(false);
  String email=request.getParameter("String_Node_Str");
  String first=request.getParameter("String_Node_Str");
  String last=request.getParameter("String_Node_Str");
  String phone=request.getParameter("String_Node_Str");
  boolean login=(request.getParameter("String_Node_Str") != null) ? true : false;
  boolean certificate=(request.getParameter("String_Node_Str") != null) ? true : false;
  if (email.length() == 0)   result.addError("String_Node_Str");
  if (first.length() == 0)   result.addError("String_Node_Str");
  if (last.length() == 0)   result.addError("String_Node_Str");
  EPerson potentialDupicate=EPerson.findByEmail(context,email);
  if (potentialDupicate != null) {
    result.addError("String_Node_Str");
  }
  if (result.getErrors() == null) {
    EPerson newPerson=AuthenticationUtil.createNewEperson(objectModel,email);
    newPerson.setFirstName(first);
    newPerson.setLastName(last);
    newPerson.setMetadata("String_Node_Str",phone);
    newPerson.setCanLogIn(login);
    newPerson.setRequireCertificate(certificate);
    newPerson.setSelfRegistered(false);
    newPerson.update();
    context.commit();
    result.setContinue(true);
    result.setOutcome(true);
    result.setMessage(T_add_eperson_success_notice);
    result.setParameter("String_Node_Str",newPerson.getID());
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Add a new eperson. This method will check that the email address,  first name, and last name are non empty. Also a check is preformed  to see if the requested email address is allready in use by another user.
 * @param context The current DSpace context
 * @param request The HTTP request parameters
 * @param objectModel Cocoon's object model
 * @return A process result's object.
 */
public static FlowResult processAddEPerson(Context context,Request request,Map objectModel) throws SQLException, AuthorizeException {
  FlowResult result=new FlowResult();
  result.setContinue(false);
  String email=request.getParameter("String_Node_Str").trim();
  String first=request.getParameter("String_Node_Str").trim();
  String last=request.getParameter("String_Node_Str").trim();
  String phone=request.getParameter("String_Node_Str").trim();
  boolean login=(request.getParameter("String_Node_Str") != null) ? true : false;
  boolean certificate=(request.getParameter("String_Node_Str") != null) ? true : false;
  if (email.length() == 0)   result.addError("String_Node_Str");
  if (first.length() == 0)   result.addError("String_Node_Str");
  if (last.length() == 0)   result.addError("String_Node_Str");
  EPerson potentialDupicate=EPerson.findByEmail(context,email);
  if (potentialDupicate != null) {
    result.addError("String_Node_Str");
  }
  if (result.getErrors() == null) {
    EPerson newPerson=AuthenticationUtil.createNewEperson(objectModel,email);
    newPerson.setFirstName(first);
    newPerson.setLastName(last);
    newPerson.setMetadata("String_Node_Str",phone);
    newPerson.setCanLogIn(login);
    newPerson.setRequireCertificate(certificate);
    newPerson.setSelfRegistered(false);
    newPerson.update();
    context.commit();
    result.setContinue(true);
    result.setOutcome(true);
    result.setMessage(T_add_eperson_success_notice);
    result.setParameter("String_Node_Str",newPerson.getID());
  }
  return result;
}