Buggy code:
public class InvokerServlet extends TomcatInternalServlet { private Context context ; public void init ( ) throws ServletException { } public void service ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { String requestURI = request . getRequestURI ( ) ; String includedRequestURI = ( ( String ) ( request . getAttribute ( "javax.servlet.include.request_uri" ) ) ) ; boolean inInclude = includedRequestURI != null ; String pathInfo ; if ( inInclude ) pathInfo = ( ( String ) ( request . getAttribute ( "javax.servlet.include.path_info" ) ) ) ; else pathInfo = request . getPathInfo ( ) ; String servletPath ; if ( inInclude ) servletPath = ( ( String ) ( request . getAttribute ( "javax.servlet.include.servlet_path" ) ) ) ; else servletPath = request . getServletPath ( ) ; if ( ( ( pathInfo == null ) || ( ! ( pathInfo . startsWith ( "//" ) ) ) ) || ( ( pathInfo . length ( ) ) < 3 ) ) { response . sendError ( 404 , ( ( ( "Not<seq2seq4repair_space>enough<seq2seq4repair_space>information<seq2seq4repair_space>" + ( request . getRequestURI ( ) ) ) + "<seq2seq4repair_space>" ) + pathInfo ) ) ; return ; } int piLen = pathInfo . length ( ) ; String servletName = pathInfo . substring ( 1 , piLen ) ; if ( ( servletName . indexOf ( "//" ) ) > ( - 1 ) ) { servletName = servletName . substring ( 0 , servletName . indexOf ( "//" ) ) ; } String newServletPath = ( servletPath + "//" ) + servletName ; String newPathInfo ; int sNLen = servletName . length ( ) ; if ( piLen > ( sNLen + 1 ) ) newPathInfo = pathInfo . substring ( ( sNLen + 1 ) ) ; else newPathInfo = null ; if ( ( context ) == null ) { System . out . println ( "Servlet<seq2seq4repair_space>called<seq2seq4repair_space>before<seq2seq4repair_space>init.<seq2seq4repair_space>Need<seq2seq4repair_space>to<seq2seq4repair_space>keep<seq2seq4repair_space>it<seq2seq4repair_space>disabled,<seq2seq4repair_space>sync<seq2seq4repair_space>at<seq2seq4repair_space>startup" ) ; return ; } ServletWrapper wrapper = context . getServletByName ( servletName ) ; if ( wrapper == null ) { try { context . addServletMapping ( ( newServletPath + "//*" ) , servletName ) ; wrapper = context . getServletByName ( servletName ) ; wrapper . setOrigin ( ORIGIN_INVOKER ) ; } catch ( TomcatException ex ) { ex . printStackTrace ( ) ; response . sendError ( 505 , ( "Error<seq2seq4repair_space>getting<seq2seq4repair_space>the<seq2seq4repair_space>servlet<seq2seq4repair_space>" + ex ) ) ; return ; } } if ( ( context . getDebug ( ) ) > 3 ) context . log ( ( ( ( "Invoker-based<seq2seq4repair_space>execution<seq2seq4repair_space>" + newServletPath ) + "<seq2seq4repair_space>" ) + newPathInfo ) ) ; Request realRequest = facadeM . getRealRequest ( request ) ; Response realResponse = realRequest . getResponse ( ) ; if ( ! inInclude ) { realRequest . setServletPath ( newServletPath ) ; realRequest . setPathInfo ( newPathInfo ) ; } else { realRequest . setAttribute ( "javax.servlet.include.servlet_path" , newServletPath ) ; if ( newPathInfo != null ) { realRequest . setAttribute ( "javax.servlet.include.path_info" , newPathInfo ) ; } else { realRequest . removeAttribute ( "javax.servlet.include.path_info" ) ; } } <START_BUG> wrapper . handleRequest ( realRequest , realResponse ) ; <END_BUG> if ( ! inInclude ) { realRequest . setServletPath ( servletPath ) ; realRequest . setPathInfo ( pathInfo ) ; } else { realRequest . setAttribute ( "javax.servlet.include.servlet_path" , servletPath ) ; if ( pathInfo != null ) { realRequest . setAttribute ( "javax.servlet.include.path_info" , pathInfo ) ; } else { realRequest . removeAttribute ( "javax.servlet.include.path_info" ) ; } } } }

Fix:
wrapper . service ( realRequest , realResponse ) ;