Program: 85431
Project: 85431
Buggy source:
public ModelAndView onSubmit(HttpServletRequest request,HttpServletResponse response,Object command,BindException errors) throws Exception {
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
  User user=(User)command;
  Locale locale=request.getLocale();
  if (request.getParameter("String_Node_Str") != null) {
    getUserManager().removeUser(user.getId().toString());
    saveMessage(request,getText("String_Node_Str",user.getFullName(),locale));
    return new ModelAndView(getSuccessView());
  }
 else {
    Boolean encrypt=(Boolean)getConfiguration().get(Constants.ENCRYPT_PASSWORD);
    if (StringUtils.equals(request.getParameter("String_Node_Str"),"String_Node_Str") && (encrypt != null && encrypt.booleanValue())) {
      String algorithm=(String)getConfiguration().get(Constants.ENC_ALGORITHM);
      if (algorithm == null) {
        if (log.isDebugEnabled()) {
          log.debug("String_Node_Str");
        }
        algorithm="String_Node_Str";
      }
      user.setPassword(StringUtil.encodePassword(user.getPassword(),algorithm));
    }
    String[] userRoles=request.getParameterValues("String_Node_Str");
    if (userRoles != null) {
      user.getRoles().clear();
      for (int i=0; i < userRoles.length; i++) {
        String roleName=userRoles[i];
        user.addRole(roleManager.getRole(roleName));
      }
    }
    Integer originalVersion=user.getVersion();
    try {
      getUserManager().saveUser(user);
    }
 catch (    UserExistsException e) {
      log.warn(e.getMessage());
      errors.rejectValue("String_Node_Str","String_Node_Str",new Object[]{user.getUsername(),user.getEmail()},"String_Node_Str");
      user.setPassword(user.getConfirmPassword());
      user.setVersion(originalVersion);
      return showForm(request,response,errors);
    }
    if (!StringUtils.equals(request.getParameter("String_Node_Str"),"String_Node_Str")) {
      saveMessage(request,getText("String_Node_Str",user.getFullName(),locale));
      return new ModelAndView(new RedirectView("String_Node_Str"));
    }
 else {
      if (StringUtils.isBlank(request.getParameter("String_Node_Str"))) {
        saveMessage(request,getText("String_Node_Str",user.getFullName(),locale));
        message.setSubject(getText("String_Node_Str",locale));
        sendUserMessage(user,getText("String_Node_Str",user.getFullName(),locale),RequestUtil.getAppURL(request));
        return showNewForm(request,response);
      }
 else {
        saveMessage(request,getText("String_Node_Str",user.getFullName(),locale));
      }
    }
  }
  return showForm(request,response,errors);
}

Fixed version (ground truth):
public ModelAndView onSubmit(HttpServletRequest request,HttpServletResponse response,Object command,BindException errors) throws Exception {
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
  User user=(User)command;
  Locale locale=request.getLocale();
  if (request.getParameter("String_Node_Str") != null) {
    getUserManager().removeUser(user.getId().toString());
    saveMessage(request,getText("String_Node_Str",user.getFullName(),locale));
    return new ModelAndView(getSuccessView());
  }
 else {
    Boolean encrypt=(Boolean)getConfiguration().get(Constants.ENCRYPT_PASSWORD);
    if (StringUtils.equals(request.getParameter("String_Node_Str"),"String_Node_Str") && (encrypt != null && encrypt)) {
      String algorithm=(String)getConfiguration().get(Constants.ENC_ALGORITHM);
      if (algorithm == null) {
        log.debug("String_Node_Str");
        algorithm="String_Node_Str";
      }
      user.setPassword(StringUtil.encodePassword(user.getPassword(),algorithm));
    }
    if (request.isUserInRole(Constants.ADMIN_ROLE)) {
      String[] userRoles=request.getParameterValues("String_Node_Str");
      if (userRoles != null) {
        user.getRoles().clear();
        for (        String roleName : userRoles) {
          user.addRole(roleManager.getRole(roleName));
        }
      }
    }
    Integer originalVersion=user.getVersion();
    try {
      getUserManager().saveUser(user);
    }
 catch (    UserExistsException e) {
      log.warn(e.getMessage());
      errors.rejectValue("String_Node_Str","String_Node_Str",new Object[]{user.getUsername(),user.getEmail()},"String_Node_Str");
      user.setPassword(user.getConfirmPassword());
      user.setVersion(originalVersion);
      return showForm(request,response,errors);
    }
    if (!StringUtils.equals(request.getParameter("String_Node_Str"),"String_Node_Str")) {
      saveMessage(request,getText("String_Node_Str",user.getFullName(),locale));
      return new ModelAndView(new RedirectView("String_Node_Str"));
    }
 else {
      if (StringUtils.isBlank(request.getParameter("String_Node_Str"))) {
        saveMessage(request,getText("String_Node_Str",user.getFullName(),locale));
        message.setSubject(getText("String_Node_Str",locale));
        sendUserMessage(user,getText("String_Node_Str",user.getFullName(),locale),RequestUtil.getAppURL(request));
        return showNewForm(request,response);
      }
 else {
        saveMessage(request,getText("String_Node_Str",user.getFullName(),locale));
      }
    }
  }
  return showForm(request,response,errors);
}