Program: 85508
Project: 85508
Buggy source:
public void doFilter(ServletRequest req,ServletResponse resp,FilterChain chain) throws IOException, ServletException {
  if (enabled) {
    HttpServletRequest request=(HttpServletRequest)req;
    HttpServletResponse response=(HttpServletResponse)resp;
    Cookie c=RequestUtil.getCookie(request,Constants.LOGIN_COOKIE);
    WebApplicationContext context=(WebApplicationContext)config.getServletContext().getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
    UserManager mgr=(UserManager)context.getBean("String_Node_Str");
    if (request.getRequestURL().indexOf("String_Node_Str") != -1) {
      if (log.isDebugEnabled()) {
        log.debug("String_Node_Str" + request.getRemoteUser() + "String_Node_Str");
      }
      mgr.removeLoginCookies(request.getRemoteUser());
      RequestUtil.deleteCookie(response,c,request.getContextPath());
      request.getSession().invalidate();
    }
 else     if (c != null) {
      try {
        String loginCookie=mgr.checkLoginCookie(c.getValue());
        if (loginCookie != null) {
          RequestUtil.setCookie(response,Constants.LOGIN_COOKIE,loginCookie,request.getContextPath());
          loginCookie=StringUtil.decodeString(loginCookie);
          String[] value=StringUtils.split(loginCookie,'|');
          UserForm user=(UserForm)mgr.getUser(value[0]);
          String route="String_Node_Str" + user.getUsername() + "String_Node_Str"+ user.getPassword();
          request.setAttribute("String_Node_Str","String_Node_Str");
          request.getSession(true).setAttribute("String_Node_Str","String_Node_Str");
          if (log.isDebugEnabled()) {
            log.debug("String_Node_Str" + user.getUsername() + "String_Node_Str");
          }
          RequestDispatcher dispatcher=request.getRequestDispatcher(route);
          dispatcher.forward(request,response);
          return;
        }
      }
 catch (      Exception e) {
        log.warn(e.getMessage());
      }
    }
  }
  chain.doFilter(req,resp);
}

Fixed version (ground truth):
public void doFilter(ServletRequest req,ServletResponse resp,FilterChain chain) throws IOException, ServletException {
  HttpServletRequest request=(HttpServletRequest)req;
  HttpServletResponse response=(HttpServletResponse)resp;
  Cookie c=RequestUtil.getCookie(request,Constants.LOGIN_COOKIE);
  WebApplicationContext context=(WebApplicationContext)config.getServletContext().getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
  UserManager mgr=(UserManager)context.getBean("String_Node_Str");
  if (request.getRequestURL().indexOf("String_Node_Str") != -1) {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str" + request.getRemoteUser() + "String_Node_Str");
    }
    mgr.removeLoginCookies(request.getRemoteUser());
    RequestUtil.deleteCookie(response,c,request.getContextPath());
    request.getSession().invalidate();
  }
 else   if (c != null && enabled) {
    try {
      String loginCookie=mgr.checkLoginCookie(c.getValue());
      if (loginCookie != null) {
        RequestUtil.setCookie(response,Constants.LOGIN_COOKIE,loginCookie,request.getContextPath());
        loginCookie=StringUtil.decodeString(loginCookie);
        String[] value=StringUtils.split(loginCookie,'|');
        UserForm user=(UserForm)mgr.getUser(value[0]);
        String route="String_Node_Str" + user.getUsername() + "String_Node_Str"+ user.getPassword();
        request.setAttribute("String_Node_Str","String_Node_Str");
        request.getSession(true).setAttribute("String_Node_Str","String_Node_Str");
        if (log.isDebugEnabled()) {
          log.debug("String_Node_Str" + user.getUsername() + "String_Node_Str");
        }
        RequestDispatcher dispatcher=request.getRequestDispatcher(route);
        dispatcher.forward(request,response);
        return;
      }
    }
 catch (    Exception e) {
      log.warn(e.getMessage());
    }
  }
  chain.doFilter(req,resp);
}