Buggy code:
public static final int STATE_NEW = 0 ; public static final int STATE_ADDED = 1 ; public static final int STATE_DISABLED = 2 ; public static final int STATE_READY = 3 ; private String path = "" ; private String docBase ; private String absPath ; private Hashtable properties = new Hashtable ( ) ; private int state = Context . STATE_NEW ; private ContextManager contextM ; private Object contextFacade ; private int debug = 0 ; private boolean reloadable = true ; private Hashtable attributes = new Hashtable ( ) ; private File workDir ; private Hashtable servlets = new Hashtable ( ) ; private Hashtable initializationParameters = new Hashtable ( ) ; private Vector welcomeFilesV = new Vector ( ) ; private String [ ] welcomeFiles = null ; private Hashtable errorPages = new Hashtable ( ) ; private MimeMap mimeTypes = new MimeMap ( ) ; private int sessionTimeOut = - 1 ; private boolean isDistributable = false ; private Hashtable mappings = new Hashtable ( ) ; private Hashtable constraints = new Hashtable ( ) ; private Hashtable containers = new Hashtable ( ) ; private Container defaultContainer = null ; private String authMethod ; private String realmName ; private String formLoginPage ; private String formErrorPage ; private String engineHeader = null ; private String vhost = null ; private Vector vhostAliases = new Vector ( ) ; private boolean trusted = false ; private Log loghelper = new Log ( "tc_log" , this ) ; private Log loghelperServlet ; private String apiLevel = "2.2" ; private ClassLoader classLoader ; private Vector classPath = new Vector ( ) ; private boolean reload ; private DependManager dependM = new DependManager ( ) ; private String description = null ; private String icon = null ; private Hashtable tagLibs = new Hashtable ( ) ; private Hashtable envEntryTypes = new Hashtable ( ) ; private Hashtable envEntryValues = new Hashtable ( ) ; public Context ( ) { } public final void addServletMapping ( String path , String servletName ) throws TomcatException { } public final void addSecurityConstraint ( String [ ] path , String [ ] methods , String [ ] roles , String transport ) throws TomcatException { } private Object getSpecialAttribute ( String name ) { } public final boolean allowAttribute ( String name ) { } public final Object getFacade ( ) { } public final void setFacade ( Object obj ) { } public final ContextManager getContextManager ( ) { } public final void setContextManager ( ContextManager cm ) { } public final Container getContainer ( ) { } public final int getState ( ) { } void setState ( int state ) { } public final void init ( ) throws TomcatException { if ( ( state ) == ( Context . STATE_READY ) ) { log ( "Already<seq2seq4repair_space>initialized<seq2seq4repair_space>" ) ; return ; } getContainer ( ) . resetInterceptorCache ( H_engineInit ) ; BaseInterceptor [ ] cI = getContainer ( ) . getInterceptors ( ) ; for ( int i = 0 ; i < ( cI . length ) ; i ++ ) { if ( ( this ) != ( cI [ i ] . getContext ( ) ) ) continue ; cI [ i ] . setContextManager ( contextM ) ; try { for ( int j = 0 ; j < ( cI . length ) ; j ++ ) { cI [ j ] . addInterceptor ( contextM , this , cI [ i ] ) ; } cI [ i ] . engineInit ( contextM ) ; } catch ( TomcatException ex ) { log ( ( ( ( "Error<seq2seq4repair_space>initializing<seq2seq4repair_space>" + ( cI [ i ] ) ) + "<seq2seq4repair_space>for<seq2seq4repair_space>" ) + ( this ) ) ) ; } } <START_BUG> if ( ( ( contextM ) == null ) || ( ( contextM . getState ( ) ) == ( ContextManager . STATE_CONFIG ) ) ) { <END_BUG> log ( "ContextManager<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>yet<seq2seq4repair_space>initialized<seq2seq4repair_space>" ) ; return ; } if ( ( state ) == ( Context . STATE_NEW ) ) { contextM . addContext ( this ) ; } cI = getContainer ( ) . getInterceptors ( ) ; for ( int i = 0 ; i < ( cI . length ) ; i ++ ) { cI [ i ] . contextInit ( this ) ; } setState ( Context . STATE_READY ) ; } public void shutdown ( ) throws TomcatException { } public final String getPath ( ) { } public final void setPath ( String path ) { } public final void setHost ( String h ) { } public final String getHost ( ) { } public final void setDocBase ( String docB ) { } public final String getDocBase ( ) { } public final String getAbsolutePath ( ) { } public final void setAbsolutePath ( String s ) { } public String getProperty ( String n ) { } public void setProperty ( String n , String v ) { } public final void setReloadable ( boolean b ) { } public final boolean getReloadable ( ) { } public final void setServletAPI ( String s ) { } public final String getServletAPI ( ) { } public final String [ ] getWelcomeFiles ( ) { } public final void addWelcomeFile ( String s ) { } public final String getInitParameter ( String name ) { } public final void addInitParameter ( String name , String value ) { } public final Enumeration getInitParameterNames ( ) { } public final Object getAttribute ( String name ) { } public final Enumeration getAttributeNames ( ) { } public final void setAttribute ( String name , Object object ) { } public final void removeAttribute ( String name ) { } public final void addTaglib ( String uri , String location ) { } public final String getTaglibLocation ( String uri ) { }

Fix:
if ( ( ( contextM ) == null ) || ( ( contextM . getState ( ) ) == ( ContextManager . STATE_NEW ) ) ) {