Buggy code:
; static final class ContentTypeHandler implements JspParseEventListener . PageDirectiveHandler { public void handlePageDirectiveAttribute ( JspParseEventListener listener , String contentType , Mark start , Mark stop ) throws JasperException { } } static final class SessionHandler implements JspParseEventListener . PageDirectiveHandler { public void handlePageDirectiveAttribute ( JspParseEventListener listener , String session , Mark start , Mark stop ) throws JasperException { } } static final class BufferHandler implements JspParseEventListener . PageDirectiveHandler { public void handlePageDirectiveAttribute ( JspParseEventListener listener , String buffer , Mark start , Mark stop ) throws JasperException { } } static final class AutoFlushHandler implements JspParseEventListener . PageDirectiveHandler { public void handlePageDirectiveAttribute ( JspParseEventListener listener , String autoflush , Mark start , Mark stop ) throws JasperException { } } static final class IsThreadSafeHandler implements JspParseEventListener . PageDirectiveHandler { public void handlePageDirectiveAttribute ( JspParseEventListener listener , String threadsafe , Mark start , Mark stop ) throws JasperException { } } static final class InfoHandler implements JspParseEventListener . PageDirectiveHandler { public void handlePageDirectiveAttribute ( JspParseEventListener listener , String info , Mark start , Mark stop ) throws JasperException { } } static final class IsErrorPageHandler implements JspParseEventListener . PageDirectiveHandler { public void handlePageDirectiveAttribute ( JspParseEventListener listener , String iserrorpage , Mark start , Mark stop ) throws JasperException { } } static final class ErrorPageHandler implements JspParseEventListener . PageDirectiveHandler { public void handlePageDirectiveAttribute ( JspParseEventListener listener , String errorpage , Mark start , Mark stop ) throws JasperException { } } static final class LanguageHandler implements JspParseEventListener . PageDirectiveHandler { public void handlePageDirectiveAttribute ( JspParseEventListener listener , String language , Mark start , Mark stop ) throws JasperException { } } static final class ImportsHandler implements JspParseEventListener . PageDirectiveHandler { public void handlePageDirectiveAttribute ( JspParseEventListener listener , String importPkgs , Mark start , Mark stop ) throws JasperException { } } static final class ExtendsHandler implements JspParseEventListener . PageDirectiveHandler { public void handlePageDirectiveAttribute ( JspParseEventListener listener , String extendsClzz , Mark start , Mark stop ) throws JasperException { } } public void handleDirective ( String directive , Mark start , Mark stop , Hashtable attrs ) throws JasperException { } class GeneratorWrapper implements ClassDeclarationPhase , FileDeclarationPhase , Generator , InitMethodPhase , ServiceMethodPhase , StaticInitializerPhase { Generator generator ; Mark start ; Mark stop ; GeneratorWrapper ( Generator generator , Mark start , Mark stop ) { } public boolean generateCoordinates ( Class phase ) { } public void init ( JspCompilationContext ctxt ) throws JasperException { } public void generate ( ServletWriter out , Class phase ) throws JasperException { } } public void handleDeclaration ( Mark start , Mark stop , Hashtable attrs ) throws JasperException { } public void handleScriptlet ( Mark start , Mark stop , Hashtable attrs ) throws JasperException { } public void handleExpression ( Mark start , Mark stop , Hashtable attrs ) throws JasperException { } public void handleBean ( Mark start , Mark stop , Hashtable attrs ) throws JasperException { } public void handleBeanEnd ( Mark start , Mark stop , Hashtable attrs ) throws JasperException { } public void handleGetProperty ( Mark start , Mark stop , Hashtable attrs ) throws JasperException { } public void handleSetProperty ( Mark start , Mark stop , Hashtable attrs ) throws JasperException { } public void handlePlugin ( Mark start , Mark stop , Hashtable attrs , Hashtable param , String fallback ) throws JasperException { } public void handleForward ( Mark start , Mark stop , Hashtable attrs , Hashtable param ) throws JasperException { } public void handleInclude ( Mark start , Mark stop , Hashtable attrs , Hashtable param ) throws JasperException { } public void handleCharData ( Mark start , Mark stop , char [ ] chars ) throws JasperException { } public void handleTagBegin ( Mark start , Mark stop , Hashtable attrs , String prefix , String shortTagName , TagLibraryInfo tli , TagInfo ti ) throws JasperException { TagBeginGenerator tbg = new TagBeginGenerator ( start , prefix , shortTagName , attrs , tli , ti , libraries , getTagHandlerStack ( ) , getTagVarNumbers ( ) ) ; Generator gen = new JspParseEventListener . GeneratorWrapper ( tbg , start , stop ) ; addGenerator ( gen ) ; if ( ( tagPools . size ( ) ) == 0 ) { addGenerator ( new TagPoolManagerGenerator ( ) ) ; } String tagPoolVarName = TagPoolGenerator . getPoolName ( tli , ti , attrs ) ; if ( ! ( tagPools . contains ( tagPoolVarName ) ) ) { <START_BUG> tagPools . add ( tagPoolVarName ) ; <END_BUG> TagPoolGenerator tpg = new TagPoolGenerator ( prefix , shortTagName , attrs , tli , ti ) ; gen = new JspParseEventListener . GeneratorWrapper ( tpg , start , stop ) ; addGenerator ( gen ) ; } } public void handleTagEnd ( Mark start , Mark stop , String prefix , String shortTagName , Hashtable attrs , TagLibraryInfo tli , TagInfo ti ) throws JasperException { } public TagLibraries getTagLibraries ( ) { } }

Fix:
tagPools . addElement ( tagPoolVarName ) ;