Program: 85505
Project: 85505
Buggy source:
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,'|');
        User user=(User)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) {
      e.printStackTrace();
      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 (request.getRemoteUser() != null) {
      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,'|');
        User user=(User)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) {
      e.printStackTrace();
      log.warn(e.getMessage());
    }
  }
  chain.doFilter(req,resp);
}