Buggy code:
public class WicketFilter implements Filter { public static final String APP_FACT_PARAM = "applicationFactoryClassName" ; public static final String FILTER_MAPPING_PARAM = "filterMappingUrlPattern" ; private static final Logger log = LoggerFactory . getLogger ( WicketFilter . class ) ; static final String SERVLET_PATH_HOLDER = "<servlet>" ; private FilterConfig filterConfig ; private String filterPath ; private WebApplication webApplication ; private boolean servletMode = false ; public void destroy ( ) { } public void doFilter ( ServletRequest request , ServletResponse response , FilterChain chain ) throws IOException , ServletException { } public void doGet ( final HttpServletRequest servletRequest , final HttpServletResponse servletResponse ) throws IOException , ServletException { } public FilterConfig getFilterConfig ( ) { } public String getRelativePath ( HttpServletRequest request ) { } public void init ( FilterConfig filterConfig ) throws ServletException { } private String getFilterPath ( String filterName , InputStream is ) throws ServletException { String prefix = ( servletMode ) ? "servlet" : "filter" ; String mapping = prefix + "-mapping" ; String name = prefix + "-name" ; try { ArrayList urlPatterns = new ArrayList ( ) ; XmlPullParser parser = new XmlPullParser ( ) ; parser . parse ( is ) ; while ( true ) { XmlTag elem ; do { elem = ( ( XmlTag ) ( parser . nextTag ( ) ) ) ; } while ( ( elem != null ) && ( ! ( ( elem . getName ( ) . equals ( mapping ) ) && ( elem . isOpen ( ) ) ) ) ) ; if ( elem == null ) { break ; } String encounteredFilterName = null ; String urlPattern = null ; do { elem = ( ( XmlTag ) ( parser . nextTag ( ) ) ) ; if ( elem . isOpen ( ) ) { parser . setPositionMarker ( ) ; } else if ( ( elem . isClose ( ) ) && ( elem . getName ( ) . equals ( name ) ) ) { <START_BUG> encounteredFilterName = parser . getInputFromPositionMarker ( elem . getPos ( ) ) . toString ( ) ; <END_BUG> } else if ( ( elem . isClose ( ) ) && ( elem . getName ( ) . equals ( "url-pattern" ) ) ) { urlPattern = parser . getInputFromPositionMarker ( elem . getPos ( ) ) . toString ( ) . trim ( ) ; } } while ( ( urlPattern == null ) || ( encounteredFilterName == null ) ) ; if ( filterName . equals ( encounteredFilterName ) ) { urlPatterns . add ( urlPattern ) ; } } String prefixUppered = ( Character . toUpperCase ( prefix . charAt ( 0 ) ) ) + ( prefix . substring ( 1 ) ) ; if ( ( urlPatterns . size ( ) ) == 0 ) { throw new IllegalArgumentException ( ( ( ( ( ( ( ( "Error<seq2seq4repair_space>initializing<seq2seq4repair_space>Wicket" + prefixUppered ) + "<seq2seq4repair_space>-<seq2seq4repair_space>you<seq2seq4repair_space>have<seq2seq4repair_space>no<seq2seq4repair_space><" ) + mapping ) + "><seq2seq4repair_space>element<seq2seq4repair_space>with<seq2seq4repair_space>a<seq2seq4repair_space>url-pattern<seq2seq4repair_space>that<seq2seq4repair_space>uses<seq2seq4repair_space>" ) + prefix ) + ":<seq2seq4repair_space>" ) + filterName ) ) ; } String urlPattern = ( ( String ) ( urlPatterns . get ( 0 ) ) ) ; if ( ( ! ( urlPattern . startsWith ( "//" ) ) ) || ( ! ( urlPattern . endsWith ( "*" ) ) ) ) { throw new IllegalArgumentException ( ( ( ( ( ( ( "<" + mapping ) + "><seq2seq4repair_space>for<seq2seq4repair_space>Wicket" ) + prefixUppered ) + "<seq2seq4repair_space>\"" ) + filterName ) + "\"<seq2seq4repair_space>must<seq2seq4repair_space>start<seq2seq4repair_space>with<seq2seq4repair_space>\'//\'<seq2seq4repair_space>and<seq2seq4repair_space>end<seq2seq4repair_space>with<seq2seq4repair_space>\'*\'." ) ) ; } return stripWildcard ( urlPattern ) ; } catch ( IOException e ) { throw new ServletException ( ( ( ( ( "Error<seq2seq4repair_space>finding<seq2seq4repair_space><" + prefix ) + "><seq2seq4repair_space>" ) + filterName ) + "<seq2seq4repair_space>in<seq2seq4repair_space>web.xml" ) , e ) ; } catch ( ParseException e ) { throw new ServletException ( ( ( ( ( "Error<seq2seq4repair_space>finding<seq2seq4repair_space><" + prefix ) + "><seq2seq4repair_space>" ) + filterName ) + "<seq2seq4repair_space>in<seq2seq4repair_space>web.xml" ) , e ) ; } catch ( ResourceStreamNotFoundException e ) { throw new ServletException ( ( ( ( ( "Error<seq2seq4repair_space>finding<seq2seq4repair_space><" + prefix ) + "><seq2seq4repair_space>" ) + filterName ) + "<seq2seq4repair_space>in<seq2seq4repair_space>web.xml" ) , e ) ; } } private boolean isWicketRequest ( String relativePath ) { } private void maybeSetLastModified ( final HttpServletResponse resp , final long lastModified ) { } protected IWebApplicationFactory getApplicationFactory ( ) { } protected ClassLoader getClassLoader ( ) { } protected String getFilterPath ( HttpServletRequest request ) { } private String stripWildcard ( String result ) { } long getLastModified ( final HttpServletRequest request ) { } }

Fix:
encounteredFilterName = parser . getInputFromPositionMarker ( elem . getPos ( ) ) . toString ( ) . trim ( ) ;