Buggy code:
public class Context { private static StringManager sm = StringManager . getManager ( "org.apache.tomcat.core" ) ; private String path = "" ; private String docBase ; private ContextManager contextM ; private ServletContextFacade contextFacade ; private SessionManager sessionManager ; private ServletLoader servletL ; boolean reloadable = true ; private Hashtable attributes = new Hashtable ( ) ; private File workDir ; private RequestSecurityProvider rsProvider ; private Vector contextInterceptors = new Vector ( ) ; private Vector requestInterceptors = new Vector ( ) ; private Hashtable servlets = new Hashtable ( ) ; private Hashtable initializationParameters = new Hashtable ( ) ; private Vector welcomeFiles = new Vector ( ) ; private Hashtable errorPages = new Hashtable ( ) ; private String description = null ; private boolean isDistributable = false ; private MimeMap mimeTypes = new MimeMap ( ) ; private int sessionTimeOut = - 1 ; Hashtable tagLibs = new Hashtable ( ) ; Hashtable envEntryTypes = new Hashtable ( ) ; Hashtable envEntryValues = new Hashtable ( ) ; private Hashtable mappings = new Hashtable ( ) ; Hashtable constraints = new Hashtable ( ) ; Hashtable containers = new Hashtable ( ) ; private ServletWrapper defaultServlet = null ; String authMethod ; String realmName ; String formLoginPage ; String formErrorPage ; int debug = 0 ; public Context ( ) { } ServletContextFacade getFacade ( ) { } public ContextManager getContextManager ( ) { } public void setContextManager ( ContextManager cm ) { } public String getPath ( ) { } public void setPath ( String path ) { } public void setDocBase ( String docB ) { } public String getDocBase ( ) { } public void setReloadable ( String s ) { } public void setReloadable ( boolean b ) { } public boolean getReloadable ( ) { } public Enumeration getWelcomeFiles ( ) { } public void removeWelcomeFiles ( ) { } public void addWelcomeFile ( String s ) { } public void addTaglib ( String uri , String location ) { } public String getTaglibLocation ( String uri ) { } public Enumeration getTaglibs ( ) { } public void addEnvEntry ( String name , String type , String value , String description ) { } public String getEnvEntryType ( String name ) { } public String getEnvEntryValue ( String name ) { } public Enumeration getEnvEntries ( ) { } public String getInitParameter ( String name ) { } public void setInitParameter ( String name , String value ) { } public void addInitParameter ( String name , String value ) { } public Enumeration getInitParameterNames ( ) { } public Object getAttribute ( String name ) { } public Enumeration getAttributeNames ( ) { } public void setAttribute ( String name , Object object ) { } public void removeAttribute ( String name ) { } public String getDescription ( ) { } public void setDescription ( String description ) { } public void setIcon ( String icon ) { } public boolean isDistributable ( ) { } public void setDistributable ( boolean isDistributable ) { } public int getSessionTimeOut ( ) { } public void setSessionTimeOut ( int sessionTimeOut ) { } public FileNameMap getMimeMap ( ) { } public void addContentType ( String ext , String type ) { } public String getErrorPage ( int errorCode ) { } public void addErrorPage ( String errorType , String value ) { <START_BUG> this . errorPages . put ( errorPages , value ) ; <END_BUG> } public String getErrorPage ( String errorCode ) { } public String getAuthMethod ( ) { } public String getRealmName ( ) { } public String getFormLoginPage ( ) { } public String getFormErrorPage ( ) { } public void setLoginConfig ( String authMethod , String realmName , String formLoginPage , String formErrorPage ) { } public void addServletMapping ( String path , String servletName ) throws TomcatException { } public void addSecurityConstraint ( String [ ] path , String [ ] methods , String [ ] roles , String transport ) throws TomcatException { } public Enumeration getContainers ( ) { } public Enumeration getContainerLocations ( ) { } public Container getContainer ( String path ) { } public void removeContainer ( Container ct ) { } public ServletWrapper getDefaultServlet ( ) { } public void removeServletByName ( String servletName ) throws TomcatException { } public ServletWrapper getServletByName ( String servletName ) { } public void addServlet ( ServletWrapper wrapper ) throws TomcatException { } public Enumeration getServletNames ( ) { } public SessionManager getSessionManager ( ) { } public void setSessionManager ( SessionManager manager ) { } public void setServletLoader ( ServletLoader loader ) { } public ServletLoader getServletLoader ( ) { } public void setDebug ( int level ) { } public int getDebug ( ) { } public void log ( String msg ) { } public String toString ( ) { } public RequestDispatcher getRequestDispatcher ( String path ) { } public RequestDispatcher getNamedDispatcher ( String name ) { } public URL getResource ( String rpath ) throws MalformedURLException { } Context getContext ( String path ) { } public void log ( String msg , Throwable t ) { } String getRealPath ( String path ) { } private boolean isWorkDirPersistent = false ; private String engineHeader = null ; private URL documentBase ; private URL servletBase = null ; private boolean isInvokerEnabled = false ; private File warDir = null ; private boolean isWARExpanded = false ; private boolean isWARValidated = false ; public boolean isInvokerEnabled ( ) { } public void setInvokerEnabled ( boolean isInvokerEnabled ) { } public boolean isWorkDirPersistent ( ) { } public void setWorkDirPersistent ( boolean b ) { } public File getWorkDir ( ) { } public void setWorkDir ( File workDir ) { } public void setWorkDirPath ( String workDir ) { } public String getEngineHeader ( ) { } public void setEngineHeader ( String s ) { }

Fix:
this . errorPages . put ( errorType , value ) ;