Buggy code:
public final class ContextManager implements LogAware { public static final String TOMCAT_VERSION = "3.3<seq2seq4repair_space>dev" ; public static final String TOMCAT_NAME = "Tomcat<seq2seq4repair_space>Web<seq2seq4repair_space>Server" ; public static final String TOMCAT_HOME = "tomcat.home" ; public static final int STATE_PRE_INIT = 0 ; public static final int STATE_INIT = 1 ; public static final int STATE_START = 2 ; public static final int STATE_STOP = 3 ; private int state = ContextManager . STATE_PRE_INIT ; private Vector contextsV = new Vector ( ) ; private int debug = 0 ; private String workDir ; private String home ; private String installDir ; private Container defaultContainer ; private ClassLoader parentLoader ; private Hashtable loggers ; public ContextManager ( ) { } public final void setHome ( String home ) { } public final String getHome ( ) { } public final String getInstallDir ( ) { } public final void setInstallDir ( String tH ) { } public final void setWorkDir ( String wd ) { } public final String getWorkDir ( ) { } public final void setDebug ( int level ) { } public final int getDebug ( ) { } public final int getState ( ) { } public final void setParentLoader ( ClassLoader cl ) { } public final ClassLoader getParentLoader ( ) { } public final Container getContainer ( ) { } public final void setContainer ( Container newDefaultContainer ) { } public final void addInterceptor ( BaseInterceptor ri ) { } public final void init ( ) throws TomcatException { } public final void shutdown ( ) throws TomcatException { } public final void start ( ) throws TomcatException { } public final void stop ( ) throws Exception { } public final Enumeration getContexts ( ) { } public final void addContext ( Context ctx ) throws TomcatException { } public final void removeContext ( Context context ) throws TomcatException { } public final void initContext ( Context ctx ) throws TomcatException { } public final void shutdownContext ( Context ctx ) throws TomcatException { } public final void initRequest ( Request req , Response resp ) { } public final void service ( Request req , Response res ) { } private final void internalService ( Request req , Response res ) { try { int status = res . getStatus ( ) ; if ( status >= 400 ) { if ( ( debug ) > 0 ) log ( ( ( ( "Error<seq2seq4repair_space>reading<seq2seq4repair_space>request<seq2seq4repair_space>" + req ) + "<seq2seq4repair_space>" ) + status ) ) ; handleStatus ( req , res , status ) ; return ; } status = processRequest ( req ) ; if ( status != 0 ) { if ( ( debug ) > 0 ) log ( ( ( ( "Error<seq2seq4repair_space>mapping<seq2seq4repair_space>the<seq2seq4repair_space>request<seq2seq4repair_space>" + req ) + "<seq2seq4repair_space>" ) + status ) ) ; handleStatus ( req , res , status ) ; return ; } if ( ( req . getHandler ( ) ) == null ) { status = 404 ; if ( ( debug ) > 0 ) log ( ( ( ( "No<seq2seq4repair_space>handler<seq2seq4repair_space>for<seq2seq4repair_space>request<seq2seq4repair_space>" + req ) + "<seq2seq4repair_space>" ) + status ) ) ; handleStatus ( req , res , status ) ; return ; } String [ ] roles = req . getRequiredRoles ( ) ; if ( roles != null ) { status = 0 ; <START_BUG> BaseInterceptor [ ] reqI = req . getContainer ( ) . getInterceptors ( H_authorize ) ; <END_BUG> for ( int i = 0 ; i < ( reqI . length ) ; i ++ ) { status = reqI [ i ] . authorize ( req , res , roles ) ; if ( status != 0 ) { break ; } } } if ( status > 200 ) { if ( ( debug ) > 0 ) log ( ( ( ( "Authorize<seq2seq4repair_space>error<seq2seq4repair_space>" + req ) + "<seq2seq4repair_space>" ) + status ) ) ; handleStatus ( req , res , status ) ; return ; } req . getHandler ( ) . service ( req , res ) ; } catch ( Throwable t ) { handleError ( req , res , t ) ; } } public final int processRequest ( Request req ) { } public final Request createRequest ( Context ctx , String urlPath ) { } private final Request createSubRequest ( String host , String urlPath ) { } public final Context getContext ( Context base , String path ) { } public final void handleStatus ( Request req , Response res , int code ) { } void handleError ( Request req , Response res , Throwable t ) { } public static final int NOTE_COUNT = 5 ; private int [ ] noteId = new int [ ContextManager . NOTE_COUNT ] ; public static final int MAX_NOTES = 32 ; public static final int RESERVED = 3 ; public static final int SERVER_NOTE = 0 ; public static final int CONTAINER_NOTE = 1 ; public static final int REQUEST_NOTE = 2 ; public static final int HANDLER_NOTE = 3 ; public static final int REQ_RE_NOTE = 0 ; private String [ ] [ ] noteName = new String [ ContextManager . NOTE_COUNT ] [ ContextManager . MAX_NOTES ] ; public final synchronized int getNoteId ( int noteType , String name ) throws TomcatException { } public final String getNoteName ( int noteType , int noteId ) { } private Object [ ] notes = new Object [ ContextManager . MAX_NOTES ] ; public final void setNote ( int pos , Object value ) { } public final Object getNote ( int pos ) { } private Log loghelper = new Log ( "tc_log" , "ContextManager" ) ; public final Logger getLogger ( ) { } public final Log getLog ( ) { } public final void setLogger ( Logger logger ) { } public final void addLogger ( Logger l ) { } public final Hashtable getLoggers ( ) { }

Fix:
BaseInterceptor [ ] reqI = req . getContext ( ) . getContainer ( ) . getInterceptors ( H_authorize ) ;