Buggy code:
public class WebRequestCodingStrategy implements IRequestCodingStrategy , IRequestTargetMountsInfo { public static final String NAME_SPACE = "wicket:" ; public static final String INTERFACE_PARAMETER_NAME = ( WebRequestCodingStrategy . NAME_SPACE ) + "interface" ; public static final String BEHAVIOR_ID_PARAMETER_NAME = ( WebRequestCodingStrategy . NAME_SPACE ) + "behaviorId" ; public static final String BOOKMARKABLE_PAGE_PARAMETER_NAME = ( WebRequestCodingStrategy . NAME_SPACE ) + "bookmarkablePage" ; public static final String PAGEMAP = ( WebRequestCodingStrategy . NAME_SPACE ) + "pageMapName" ; public static final String DEFAULT_PAGEMAP_NAME = "wicketdef" ; public static final String RESOURCES_PATH_PREFIX = "resources//" ; public static final String IGNORE_IF_NOT_ACTIVE_PARAMETER_NAME = ( WebRequestCodingStrategy . NAME_SPACE ) + "ignoreIfNotActive" ; public static class Settings { private boolean mountsCaseSensitive = true ; public Settings ( ) { } public void setMountsCaseSensitive ( boolean mountsCaseSensitive ) { } public boolean areMountsCaseSensitive ( ) { } } private static final Logger log = LoggerFactory . getLogger ( WebRequestCodingStrategy . class ) ; private final WebRequestCodingStrategy . MountsMap mountsOnPath ; public WebRequestCodingStrategy ( ) { } public WebRequestCodingStrategy ( WebRequestCodingStrategy . Settings settings ) { } public final RequestParameters decode ( final Request request ) { } public final CharSequence encode ( final RequestCycle requestCycle , final IRequestTarget requestTarget ) { } public CharSequence encode ( CharSequence url ) { } public IRequestTargetUrlCodingStrategy [ ] listMounts ( ) { } public IRequestTargetUrlCodingStrategy urlCodingStrategyForPath ( String path ) { } public final void mount ( IRequestTargetUrlCodingStrategy encoder ) { } public void addIgnoreMountPath ( String path ) { } public final CharSequence pathForTarget ( IRequestTarget requestTarget ) { } public final IRequestTarget targetForRequest ( RequestParameters requestParameters ) { } public final void unmount ( String path ) { } protected void addBookmarkablePageParameters ( final Request request , final RequestParameters parameters ) { } protected void addInterfaceParameters ( final Request request , final RequestParameters parameters ) { } public static void addInterfaceParameters ( final String interfaceParameter , final RequestParameters parameters ) { } protected void addResourceParameters ( Request request , RequestParameters parameters ) { } protected String doEncode ( RequestCycle requestCycle , IRequestTarget requestTarget ) { } protected CharSequence encode ( RequestCycle requestCycle , IBookmarkablePageRequestTarget requestTarget ) { } protected CharSequence encode ( RequestCycle requestCycle , ISharedResourceRequestTarget requestTarget ) { } protected CharSequence encode ( RequestCycle requestCycle , PageIdRequestTarget requestTarget ) { } protected CharSequence encode ( RequestCycle requestCycle , IListenerInterfaceRequestTarget requestTarget ) { } protected CharSequence encode ( RequestCycle requestCycle , IPageRequestTarget requestTarget ) { } protected IRequestTargetUrlCodingStrategy getMountEncoder ( IRequestTarget requestTarget ) { } protected String getRequestPath ( Request request ) { } private static class MountsMap { private static final long serialVersionUID = 1L ; private final boolean caseSensitiveMounts ; private final TreeMap < String , IRequestTargetUrlCodingStrategy > map ; public MountsMap ( boolean caseSensitiveMounts ) { } public IRequestTargetUrlCodingStrategy strategyForPath ( String path ) { if ( path == null ) { throw new IllegalArgumentException ( "Argument<seq2seq4repair_space>[[path]]<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; } if ( ( caseSensitiveMounts ) == false ) { path = path . toLowerCase ( ) ; } for ( Map . Entry < String , IRequestTargetUrlCodingStrategy > entry : map . entrySet ( ) ) { final String key = entry . getKey ( ) ; if ( path . startsWith ( key ) ) { IRequestTargetUrlCodingStrategy strategy = entry . getValue ( ) ; <START_BUG> if ( strategy . matches ( path ) ) { <END_BUG> return strategy ; } } } return null ; } public int size ( ) { } public Collection < IRequestTargetUrlCodingStrategy > strategies ( ) { } public void unmount ( String mount ) { } public IRequestTargetUrlCodingStrategy strategyForMount ( String mount ) { } public IRequestTargetUrlCodingStrategy mount ( String mount , IRequestTargetUrlCodingStrategy encoder ) { } private static final Comparator < String > LENGTH_COMPARATOR = new Comparator < String > ( ) { public int compare ( String o1 , String o2 ) { } } ; } public static final String encodePageMapName ( String pageMapName ) { } public static String decodePageMapName ( String pageMapName ) { } private static class PassThroughUrlCodingStrategy extends AbstractRequestTargetUrlCodingStrategy { public PassThroughUrlCodingStrategy ( String path ) { } public IRequestTarget decode ( RequestParameters requestParameters ) { } public CharSequence encode ( IRequestTarget requestTarget ) { } public boolean matches ( IRequestTarget requestTarget ) { } } public String rewriteStaticRelativeUrl ( String string ) { } }

Fix:
if ( strategy . matches ( path , caseSensitiveMounts ) ) {