Buggy code:
public class DefaultServlet extends HttpServlet { private static final String datePattern = "EEE,<seq2seq4repair_space>dd<seq2seq4repair_space>MMM<seq2seq4repair_space>yyyyy<seq2seq4repair_space>HH:mm<seq2seq4repair_space>z" ; private static final DateFormat dateFormat = new SimpleDateFormat ( DefaultServlet . datePattern ) ; ServletContext contextF ; private Context context ; String docBase ; int debug = 0 ; public void init ( ) throws ServletException { } public String getServletInfo ( ) { } public void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } public void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { String pathInfo = ( ( String ) ( request . getAttribute ( "javax.servlet.include.path_info" ) ) ) ; String requestURI = ( ( String ) ( request . getAttribute ( "javax.servlet.include.request_uri" ) ) ) ; if ( pathInfo == null ) { pathInfo = request . getPathInfo ( ) ; } if ( requestURI == null ) { requestURI = request . getRequestURI ( ) ; } File file = null ; <START_BUG> if ( ( pathInfo == null ) || ( ( pathInfo . length ( ) ) < 1 ) ) <END_BUG> file = new File ( docBase ) ; else file = new File ( ( ( docBase ) + ( pathInfo . substring ( 1 ) ) ) ) ; String absPath = file . getAbsolutePath ( ) ; if ( ( debug ) > 0 ) contextF . log ( ( "DefaultServlet:<seq2seq4repair_space>" + absPath ) ) ; String patchedPath = FileUtil . patch ( absPath ) ; if ( ( ( debug ) > 0 ) && ( ! ( absPath . equals ( patchedPath ) ) ) ) contextF . log ( ( "DefaultServlet:<seq2seq4repair_space>patched<seq2seq4repair_space>path" + patchedPath ) ) ; absPath = patchedPath ; if ( isFileMasked ( docBase , absPath ) ) { response . sendError ( response . SC_NOT_FOUND ) ; return ; } if ( file . isDirectory ( ) ) { String welcomeFile = getWelcomeFile ( file ) ; if ( ( debug ) > 0 ) contextF . log ( ( "DefaultServlet:<seq2seq4repair_space>welcome<seq2seq4repair_space>file:<seq2seq4repair_space>" + welcomeFile ) ) ; if ( welcomeFile != null ) { if ( requestURI . endsWith ( "//" ) ) { String path = requestURI ; String contextPath = context . getPath ( ) ; if ( ( contextPath . length ( ) ) == 0 ) { contextPath = "//" ; } int index = requestURI . indexOf ( contextPath ) ; if ( index > ( - 1 ) ) { path = requestURI . substring ( ( index + ( contextPath . length ( ) ) ) ) ; } if ( ! ( path . startsWith ( "//" ) ) ) { path = "//" + path ; } if ( ( debug ) > 0 ) contextF . log ( ( ( ( "DefaultServlet:<seq2seq4repair_space>forward:<seq2seq4repair_space>" + path ) + "<seq2seq4repair_space>" ) + welcomeFile ) ) ; RequestDispatcher rd = contextF . getRequestDispatcher ( ( path + welcomeFile ) ) ; rd . forward ( request , response ) ; } else { boolean inInclude = false ; Object o = request . getAttribute ( ATTRIBUTE_Dispatch ) ; if ( o != null ) { inInclude = true ; } if ( ( debug ) > 0 ) contextF . log ( ( "DefaultServlet:<seq2seq4repair_space>redirect:<seq2seq4repair_space>" + requestURI ) ) ; if ( ! inInclude ) { response . sendRedirect ( ( requestURI + "//" ) ) ; } } } else { serveDir ( file , request , response ) ; } } else { if ( ( debug ) > 0 ) contextF . log ( ( "DefaultServlet:<seq2seq4repair_space>serving<seq2seq4repair_space>file:<seq2seq4repair_space>" + file ) ) ; if ( ( ( ( ! ( absPath . endsWith ( "//" ) ) ) && ( ! ( absPath . endsWith ( "\\" ) ) ) ) && ( ! ( request . getRequestURI ( ) . endsWith ( "//" ) ) ) ) && ( ! ( request . getRequestURI ( ) . endsWith ( "." ) ) ) ) { serveFile ( file , request , response ) ; } else { response . sendError ( response . SC_NOT_FOUND , ( "File<seq2seq4repair_space>Not<seq2seq4repair_space>Found<br>" + requestURI ) ) ; } } } private String getWelcomeFile ( File file ) { } private void serveFile ( File file , HttpServletRequest request , HttpServletResponse response ) throws IOException { } private void serveStream ( InputStream in , HttpServletRequest request , HttpServletResponse response ) throws IOException { } private void serveStreamAsStream ( InputStream in , OutputStream out ) throws IOException { } private void serveStreamAsWriter ( InputStream in , PrintWriter out ) throws IOException { } private boolean isFileMasked ( String docBase , String requestedFile ) { } private boolean isDirMasked ( String basedir , String subdir ) { } private void serveDir ( File file , HttpServletRequest request , HttpServletResponse response ) throws IOException { } }

Fix:
if ( pathInfo == null )