Buggy code:
public class Context { private static StringManager sm = StringManager . getManager ( "org.apache.tomcat.core" ) ; private String path = "" ; private String docBase ; private String absPath ; private ContextManager contextM ; private ServletContext contextFacade ; private ServletLoader servletL ; boolean reloadable = true ; private Hashtable attributes = new Hashtable ( ) ; private File workDir ; Object perms = null ; Object protectionDomain ; private Vector contextInterceptors = new Vector ( ) ; private Vector requestInterceptors = new Vector ( ) ; private Hashtable servlets = new Hashtable ( ) ; private Hashtable initializationParameters = new Hashtable ( ) ; private boolean expectUserWelcomeFiles = false ; 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 ( ) ; Container defaultContainer = null ; private ServletWrapper defaultServlet = null ; String authMethod ; String realmName ; String formLoginPage ; String formErrorPage ; int debug = 0 ; boolean trusted = false ; String vhost = null ; Vector vhostAliases = new Vector ( ) ; FacadeManager facadeM ; public Context ( ) { } public ServletContext getFacade ( ) { } public ContextManager getContextManager ( ) { } public void setContextManager ( ContextManager cm ) { } public FacadeManager getFacadeManager ( ) { } public String getPath ( ) { } public void setPath ( String path ) { } public void setDocBase ( String docB ) { } public String getDocBase ( ) { } public String getAbsolutePath ( ) { } public void setReloadable ( String s ) { } public void setReloadable ( boolean b ) { } public boolean getReloadable ( ) { } public Enumeration getWelcomeFiles ( ) { } public void removeWelcomeFiles ( ) { } public void expectUserWelcomeFiles ( ) { } 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 ) { if ( name . startsWith ( "org.apache.tomcat" ) ) { if ( name . equals ( "org.apache.tomcat.jsp_classpath" ) ) { String cp = getServletLoader ( ) . getClassPath ( ) ; return cp ; } <START_BUG> if ( name . equals ( ATTRIB_JSP_ProtectionDomain ) ) { <END_BUG> return getProtectionDomain ( ) ; } if ( name . equals ( "org.apache.tomcat.classloader" ) ) { return this . getServletLoader ( ) . getClassLoader ( ) ; } if ( name . equals ( FACADE_ATTRIBUTE ) ) { if ( ! ( allowAttribute ( name ) ) ) return null ; return this . getFacadeManager ( ) ; } return null ; } else { Object o = attributes . get ( name ) ; return attributes . get ( 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 ) { } 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 Container getContainer ( ) { } 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 void setServletLoader ( ServletLoader loader ) { } public ServletLoader getServletLoader ( ) { } public void setDebug ( int level ) { } public void setDebug ( String level ) { } public int getDebug ( ) { } public final void log ( String msg ) { }

Fix:
if ( name . equals ( "org.apache.tomcat.protection_domain" ) ) {