Buggy code:
class Ajp12 { Socket socket ; InputStream sin ; BufferedInputStream ajpin ; boolean shutdown = false ; boolean isPing = false ; boolean doLog ; public Ajp12 ( ) { } void d ( String s ) { } public int doRead ( ) throws IOException { } public int doRead ( byte [ ] b , int off , int len ) throws IOException { } public void setSocket ( Socket s ) throws IOException { } public void readNextRequest ( Request req ) throws IOException { String dummy ; String token1 ; String token2 ; int marker ; int signal ; try { boolean more = true ; while ( more ) { marker = ajpin . read ( ) ; switch ( marker ) { case 0 : break ; case 1 : req . setMethod ( Ajp12 . readString ( ajpin , null ) ) ; String contextPath = Ajp12 . readString ( ajpin , null ) ; if ( "ROOT" . equalsIgnoreCase ( contextPath ) ) contextPath = null ; dummy = Ajp12 . readString ( ajpin , null ) ; req . setServerName ( Ajp12 . readString ( ajpin , null ) ) ; dummy = Ajp12 . readString ( ajpin , null ) ; req . setPathInfo ( Ajp12 . readString ( ajpin , null ) ) ; <START_BUG> req . setPathTranslated ( Ajp12 . readString ( ajpin , null ) ) ; <END_BUG> req . setQueryString ( Ajp12 . readString ( ajpin , null ) ) ; req . setRemoteAddr ( Ajp12 . readString ( ajpin , "" ) ) ; req . setRemoteHost ( Ajp12 . readString ( ajpin , "" ) ) ; req . setRemoteUser ( Ajp12 . readString ( ajpin , null ) ) ; req . setAuthType ( Ajp12 . readString ( ajpin , null ) ) ; dummy = Ajp12 . readString ( ajpin , null ) ; req . setMethod ( Ajp12 . readString ( ajpin , null ) ) ; req . setRequestURI ( Ajp12 . readString ( ajpin , "" ) ) ; dummy = Ajp12 . readString ( ajpin , null ) ; dummy = Ajp12 . readString ( ajpin , null ) ; req . setServerName ( Ajp12 . readString ( ajpin , "" ) ) ; int serverPort = 80 ; try { serverPort = Integer . parseInt ( Ajp12 . readString ( ajpin , "80" ) ) ; } catch ( Exception any ) { } req . setServerPort ( serverPort ) ; dummy = Ajp12 . readString ( ajpin , "" ) ; dummy = Ajp12 . readString ( ajpin , "" ) ; dummy = Ajp12 . readString ( ajpin , "" ) ; req . setJvmRoute ( Ajp12 . readString ( ajpin , null ) ) ; dummy = Ajp12 . readString ( ajpin , "" ) ; dummy = Ajp12 . readString ( ajpin , "" ) ; break ; case 5 : token1 = Ajp12 . readString ( ajpin , null ) ; token2 = Ajp12 . readString ( ajpin , "" ) ; req . setAttribute ( token1 , token2 ) ; if ( ( token1 . equals ( "HTTPS" ) ) && ( token2 . equals ( "on" ) ) ) { req . setScheme ( "https" ) ; } break ; case 3 : token1 = Ajp12 . readString ( ajpin , null ) ; token2 = Ajp12 . readString ( ajpin , "" ) ; req . getMimeHeaders ( ) . addValue ( token1 ) . setString ( token2 ) ; break ; case 254 : signal = ajpin . read ( ) ; if ( signal == 0 ) { try { socket . getOutputStream ( ) . write ( 0 ) ; sin . close ( ) ; } catch ( IOException ignored ) { req . getContextManager ( ) . log ( "Exception<seq2seq4repair_space>closing,<seq2seq4repair_space>ignored" , ignored ) ; } isPing = true ; return ; } else { try { InetAddress serverAddr = socket . getLocalAddress ( ) ; InetAddress clientAddr = socket . getInetAddress ( ) ; sin . close ( ) ; if ( ( signal == 15 ) && ( Ajp12 . isSameAddress ( serverAddr , clientAddr ) ) ) { req . getContextManager ( ) . stop ( ) ; System . exit ( 0 ) ; shutdown = true ; return ; } } catch ( Exception ignored ) { req . getContextManager ( ) . log ( ( ( "Ignored<seq2seq4repair_space>exception<seq2seq4repair_space>" + "processing<seq2seq4repair_space>signal<seq2seq4repair_space>" ) + signal ) , ignored ) ; } } return ; case 4 : case 255 : more = false ; break ; case - 1 : throw new IOException ( "Stream<seq2seq4repair_space>closed<seq2seq4repair_space>prematurely" ) ; default : throw new IOException ( "Stream<seq2seq4repair_space>broken" ) ; } } } catch ( IOException ioe ) { throw ioe ; } catch ( Exception e ) { req . getContextManager ( ) . log ( "Uncaught<seq2seq4repair_space>exception<seq2seq4repair_space>handling<seq2seq4repair_space>request" , e ) ; } String requestURI = req . getRequestURI ( ) ; int indexQ = requestURI . indexOf ( "?" ) ; int rLen = requestURI . length ( ) ; if ( ( indexQ > ( - 1 ) ) && ( indexQ < rLen ) ) { req . setQueryString ( requestURI . substring ( ( indexQ + 1 ) , requestURI . length ( ) ) ) ; req . setRequestURI ( requestURI . substring ( 0 , indexQ ) ) ; } } public static boolean isSameAddress ( InetAddress server , InetAddress client ) { } public static int readWord ( InputStream in ) throws IOException { } static final String CHARSET = "UTF8" ; public static String readString ( InputStream in , String def ) throws IOException { } }

Fix:
dummy = Ajp12 . readString ( ajpin , null ) ;