Buggy code:
public class HybridUrlCodingStrategy extends AbstractRequestTargetUrlCodingStrategy { protected final WeakReference pageClassRef ; private final boolean redirectOnBookmarkableRequest ; public HybridUrlCodingStrategy ( String mountPath , Class pageClass , boolean redirectOnBookmarkableRequest ) { } public HybridUrlCodingStrategy ( String mountPath , Class pageClass ) { } private int getTrailingSlashesCount ( CharSequence seq ) { } protected boolean isRedirectOnBookmarkableRequest ( ) { } protected boolean alwaysRedirectWhenPageMapIsSpecified ( ) { } public IRequestTarget decode ( RequestParameters requestParameters ) { String parametersFragment = requestParameters . getPath ( ) . substring ( getMountPath ( ) . length ( ) ) ; HybridUrlCodingStrategy . PageInfoExtraction extraction = extractPageInfo ( parametersFragment ) ; HybridUrlCodingStrategy . PageInfo pageInfo = extraction . getPageInfo ( ) ; String pageMapName = ( pageInfo != null ) ? pageInfo . getPageMapName ( ) : null ; Integer pageVersion = ( pageInfo != null ) ? pageInfo . getVersionNumber ( ) : null ; Integer pageId = ( pageInfo != null ) ? pageInfo . getPageId ( ) : null ; PageParameters parameters = new PageParameters ( decodeParameters ( extraction . getUrlAfterExtraction ( ) , requestParameters . getParameters ( ) ) ) ; if ( ( requestParameters . getPageMapName ( ) ) == null ) { requestParameters . setPageMapName ( pageMapName ) ; } else { pageMapName = requestParameters . getPageMapName ( ) ; } final String interfaceParameter = ( ( String ) ( parameters . remove ( INTERFACE_PARAMETER_NAME ) ) ) ; int originalUrlTrailingSlashesCount = getTrailingSlashesCount ( extraction . getUrlAfterExtraction ( ) ) ; boolean redirect = isRedirectOnBookmarkableRequest ( ) ; if ( ( ( Strings . isEmpty ( pageMapName ) ) != true ) && ( alwaysRedirectWhenPageMapIsSpecified ( ) ) ) { redirect = true ; } if ( interfaceParameter != null ) { WebRequestCodingStrategy . addInterfaceParameters ( interfaceParameter , requestParameters ) ; <START_BUG> return new org . apache . wicket . request . target . component . BookmarkableListenerInterfaceRequestTarget ( pageMapName , ( ( Class ) ( pageClassRef . get ( ) ) ) , parameters , requestParameters . getComponentPath ( ) , requestParameters . getInterfaceName ( ) ) ; <END_BUG> } else if ( pageId == null ) { return new HybridUrlCodingStrategy . HybridBookmarkablePageRequestTarget ( pageMapName , ( ( Class ) ( pageClassRef . get ( ) ) ) , parameters , originalUrlTrailingSlashesCount , redirect ) ; } else { Page page ; if ( ( ( Strings . isEmpty ( pageMapName ) ) && ( Application . exists ( ) ) ) && ( Application . get ( ) . getSessionSettings ( ) . isPageIdUniquePerSession ( ) ) ) { page = Session . get ( ) . getPage ( pageId . intValue ( ) , ( pageVersion != null ? pageVersion . intValue ( ) : 0 ) ) ; } else { page = Session . get ( ) . getPage ( pageMapName , ( "" + pageId ) , ( pageVersion != null ? pageVersion . intValue ( ) : 0 ) ) ; } if ( ( page != null ) && ( page . getClass ( ) . equals ( pageClassRef . get ( ) ) ) ) { requestParameters . setInterfaceName ( INTERFACE . getName ( ) ) ; RequestCycle . get ( ) . getRequest ( ) . setPage ( page ) ; return new org . apache . wicket . request . target . component . PageRequestTarget ( page ) ; } else { return new HybridUrlCodingStrategy . HybridBookmarkablePageRequestTarget ( pageMapName , ( ( Class ) ( pageClassRef . get ( ) ) ) , parameters , originalUrlTrailingSlashesCount , redirect ) ; } } } private Integer getOriginalOriginalTrailingSlashesCount ( IRequestTarget requestTarget ) { } private PageParameters getPageParameters ( IRequestTarget requestTarget ) { } private HybridUrlCodingStrategy . PageInfo getPageInfo ( IRequestTarget requestTarget ) { } public static void setInitialPageParameters ( Page page , PageParameters pageParameters ) { } public static PageParameters getInitialPagePageParameters ( Page page ) { } private static final HybridUrlCodingStrategy . PageParametersMetaDataKey PAGE_PARAMETERS_META_DATA_KEY = new HybridUrlCodingStrategy . PageParametersMetaDataKey ( ) ; private static class PageParametersMetaDataKey extends MetaDataKey { private static final long serialVersionUID = 1L ; public PageParametersMetaDataKey ( ) { } } private static final HybridUrlCodingStrategy . OriginalUrlTrailingSlashesCountMetaDataKey ORIGINAL_TRAILING_SLASHES_COUNT_METADATA_KEY = new HybridUrlCodingStrategy . OriginalUrlTrailingSlashesCountMetaDataKey ( ) ; private static class OriginalUrlTrailingSlashesCountMetaDataKey extends MetaDataKey { private static final long serialVersionUID = 1L ; public OriginalUrlTrailingSlashesCountMetaDataKey ( ) { } } private void fixTrailingSlashes ( AppendingStringBuffer buffer , int desiredCount ) { } public CharSequence encode ( IRequestTarget requestTarget ) { } public boolean matches ( IRequestTarget requestTarget ) { } protected static class PageInfoExtraction { private final String urlAfterExtraction ; private final HybridUrlCodingStrategy . PageInfo pageInfo ; public PageInfoExtraction ( String urlAfterExtraction , HybridUrlCodingStrategy . PageInfo pageInfo ) { } public HybridUrlCodingStrategy . PageInfo getPageInfo ( ) { } public String getUrlAfterExtraction ( ) { } } protected HybridUrlCodingStrategy . PageInfoExtraction extractPageInfo ( String url ) { } protected String getBeginSeparator ( ) { } protected String getEndSeparator ( ) { } protected String addPageInfo ( String url , HybridUrlCodingStrategy . PageInfo pageInfo ) { } protected static class PageInfo { private final Integer pageId ; private final Integer versionNumber ; private final String pageMapName ; public PageInfo ( Integer pageId , Integer versionNumber , String pageMapName ) { } public Integer getPageId ( ) { } public Integer getVersionNumber ( ) { } public String getPageMapName ( ) { } private static char getPageInfoSeparator ( ) { } public String toString ( ) { } private static boolean isNumber ( String string ) { } public static HybridUrlCodingStrategy . PageInfo parsePageInfo ( String src ) { } } private static class HybridBookmarkablePageRequestTarget extends BookmarkablePageRequestTarget { private final int originalUrlTrailingSlashesCount ; private final boolean redirect ; public HybridBookmarkablePageRequestTarget ( String pageMapName , Class pageClass , PageParameters pageParameters , int originalUrlTrailingSlashesCount , boolean redirect ) { } protected Page newPage ( Class pageClass , RequestCycle requestCycle ) { } public void respond ( RequestCycle requestCycle ) { } }

Fix:
return new org . apache . wicket . request . target . component . BookmarkableListenerInterfaceRequestTarget ( pageMapName , ( ( Class ) ( pageClassRef . get ( ) ) ) , parameters , requestParameters . getComponentPath ( ) , requestParameters . getInterfaceName ( ) , requestParameters . getVersionNumber ( ) ) ;