Buggy code:
public class ContextManager implements LogAware { private Object permissions ; Vector connectors = new Vector ( ) ; private Vector contextsV = new Vector ( ) ; int debug = 0 ; String workDir ; String home ; String installDir ; public static final String DEFAULT_WORK_DIR = "work" ; Container defaultContainer ; ClassLoader parentLoader ; public ContextManager ( ) { } public void setHome ( String home ) { } public String getHome ( ) { } public String getInstallDir ( ) { } public void setInstallDir ( String tH ) { } public void setWorkDir ( String wd ) { } public String getWorkDir ( ) { } public Object getPermissions ( ) { } public void setPermissions ( Object permissions ) { } public void setParentLoader ( ClassLoader cl ) { } public ClassLoader getParentLoader ( ) { } public String getRandomClass ( ) { } public void setRandomClass ( String randomClass ) { } public void init ( ) throws TomcatException { } public void shutdown ( ) throws TomcatException { } public void initContext ( Context ctx ) throws TomcatException { } public void shutdownContext ( Context ctx ) throws TomcatException { } public void start ( ) throws Exception { } public void stop ( ) throws Exception { } public Enumeration getContexts ( ) { } public void addContext ( Context ctx ) throws TomcatException { } public void removeContext ( Context context ) throws TomcatException { } public void doReload ( Request req , Context context ) throws TomcatException { } public void addContainer ( Container container ) throws TomcatException { } public void removeContainer ( Container container ) throws TomcatException { } public synchronized void addServerConnector ( ContextInterceptor con ) { } public Enumeration getConnectors ( ) { } public void addRequestInterceptor ( RequestInterceptor ri ) { } public RequestInterceptor [ ] getRequestInterceptors ( Request req ) { } public RequestInterceptor [ ] getRequestInterceptors ( ) { } public void addContextInterceptor ( ContextInterceptor ci ) { } public ContextInterceptor [ ] getContextInterceptors ( ) { } public ContextInterceptor [ ] getContextInterceptors ( Container ct ) { } public ContextInterceptor [ ] getContextInterceptors ( Context ctx ) { } public void initRequest ( Request req , Response resp ) { } public void service ( Request req , Response res ) { } private void internalService ( Request req , Response res ) { } public int processRequest ( Request req ) { } public int doAuthenticate ( Request req , Response res ) { } public int doAuthorize ( Request req , Response res , String [ ] roles ) { } int doBeforeBody ( Request req , Response res ) { } int doBeforeCommit ( Request req , Response res ) { } public void doWrite ( Request req , Response res , byte [ ] buf , int off , int cnt ) throws IOException { } int doPreService ( Request req , Response res ) { } int doPostService ( Request req , Response res ) { } int doNewSessionRequest ( Request req , Response res ) { } int doAfterBody ( Request req , Response res ) { } public Request createRequest ( Context ctx , String urlPath ) { } public Request createRequest ( String urlPath ) { } public void handleStatus ( Request req , Response res , int code ) { } void handleError ( Request req , Response res , Throwable t ) { Context ctx = req . getContext ( ) ; if ( ctx == null ) { ctx = getContext ( "" ) ; } if ( t instanceof IllegalStateException ) { ctx . log ( ( "IllegalStateException<seq2seq4repair_space>in<seq2seq4repair_space>" + req ) , t ) ; } else if ( t instanceof IOException ) { <START_BUG> if ( ( ( IOException ) ( t ) ) . getMessage ( ) . equals ( "Broken<seq2seq4repair_space>pipe" ) ) { <END_BUG> ctx . log ( ( "Broken<seq2seq4repair_space>pipe<seq2seq4repair_space>in<seq2seq4repair_space>" + req ) , t , DEBUG ) ; return ; } ctx . log ( ( "IOException<seq2seq4repair_space>in<seq2seq4repair_space>" + req ) , t ) ; } else { ctx . log ( ( "Exception<seq2seq4repair_space>in<seq2seq4repair_space>" + req ) , t ) ; } if ( null != ( req . getAttribute ( "tomcat.servlet.error.defaultHandler" ) ) ) { log ( "ERROR:<seq2seq4repair_space>can't<seq2seq4repair_space>find<seq2seq4repair_space>default<seq2seq4repair_space>error<seq2seq4repair_space>handler,<seq2seq4repair_space>or<seq2seq4repair_space>error<seq2seq4repair_space>in<seq2seq4repair_space>default<seq2seq4repair_space>error<seq2seq4repair_space>page" , t ) ; } String errorPath = null ; Handler errorServlet = null ; Class clazz = t . getClass ( ) ; while ( ( errorPath == null ) && ( clazz != null ) ) { String name = clazz . getName ( ) ; errorPath = ctx . getErrorPage ( name ) ; clazz = clazz . getSuperclass ( ) ; } if ( errorPath != null ) { errorServlet = getHandlerForPath ( ctx , errorPath ) ; } if ( ( errorLoop ( ctx , req ) ) || ( errorServlet == null ) ) ; errorServlet = ctx . getServletByName ( "tomcat.exceptionHandler" ) ; req . setAttribute ( "javax.servlet.error.exception_type" , t . getClass ( ) ) ; req . setAttribute ( "javax.servlet.error.message" , t . getMessage ( ) ) ; req . setAttribute ( "tomcat.servlet.error.throwable" , t ) ; req . setAttribute ( "tomcat.servlet.error.request" , req ) ; errorServlet . service ( req , res ) ; } public Handler getHandlerForPath ( Context ctx , String path ) { } private boolean errorLoop ( Context ctx , Request req ) { } 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 ;

Fix:
if ( "Broken<seq2seq4repair_space>pipe" . equals ( t . getMessage ( ) ) ) {