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 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 final WebRequestCodingStrategy . Settings settings ; private static final Log log = LogFactory . getLog ( WebRequestCodingStrategy . class ) ; private final WebRequestCodingStrategy . MountsMap mountsOnPath ; private CharSequence urlPrefix ; 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 IRequestTargetUrlCodingStrategy [ ] listMounts ( ) { } public final IRequestTargetUrlCodingStrategy urlCodingStrategyForPath ( String path ) { } public final void mount ( String path , IRequestTargetUrlCodingStrategy encoder ) { } 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 ) { final String requestString = request . getParameter ( WebRequestCodingStrategy . INTERFACE_PARAMETER_NAME ) ; if ( requestString != null ) { String [ ] pathComponents = Strings . split ( requestString , PATH_SEPARATOR ) ; if ( ( pathComponents . length ) < 4 ) { throw new WicketRuntimeException ( ( ( ( "Internal<seq2seq4repair_space>error<seq2seq4repair_space>parsing<seq2seq4repair_space>" + ( WebRequestCodingStrategy . INTERFACE_PARAMETER_NAME ) ) + "<seq2seq4repair_space>=<seq2seq4repair_space>" ) + requestString ) ) ; } final String pageMapName = pathComponents [ 0 ] ; parameters . setPageMapName ( ( ( pageMapName . length ( ) ) == 0 ? PageMap . DEFAULT_NAME : pageMapName ) ) ; final String behaviourId = pathComponents [ ( ( pathComponents . length ) - 1 ) ] ; parameters . setBehaviorId ( ( ( behaviourId . length ( ) ) != 0 ? behaviourId : null ) ) ; final String interfaceName = pathComponents [ ( ( pathComponents . length ) - 2 ) ] ; parameters . setInterfaceName ( ( ( interfaceName . length ( ) ) != 0 ? interfaceName : INTERFACE . getName ( ) ) ) ; final String versionNumberString = pathComponents [ ( ( pathComponents . length ) - 3 ) ] ; final int versionNumber = ( Strings . isEmpty ( versionNumberString ) ) ? 0 : Integer . parseInt ( versionNumberString ) ; parameters . setVersionNumber ( versionNumber ) ; final int start = ( pageMapName . length ( ) ) + 1 ; <START_BUG> final int end = ( ( ( ( requestString . length ( ) ) - ( behaviourId . length ( ) ) ) - ( interfaceName . length ( ) ) ) - ( versionNumberString . length ( ) ) ) - 2 ; <END_BUG> final String componentPath = requestString . substring ( start , end ) ; parameters . setComponentPath ( componentPath ) ; } } 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 , 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 map ; public MountsMap ( boolean caseSensitiveMounts ) { } public IRequestTargetUrlCodingStrategy strategyForPath ( String path ) { } public int size ( ) { } public Collection strategies ( ) { } public void unmount ( String mount ) { } public IRequestTargetUrlCodingStrategy strategyForMount ( String mount ) { } public IRequestTargetUrlCodingStrategy mount ( String mount , IRequestTargetUrlCodingStrategy encoder ) { } private static final Comparator LENGTH_COMPARATOR = new Comparator ( ) { public int compare ( Object o1 , Object o2 ) { } } ; } }

Fix:
final int end = ( ( ( ( requestString . length ( ) ) - ( behaviourId . length ( ) ) ) - ( interfaceName . length ( ) ) ) - ( versionNumberString . length ( ) ) ) - 3 ;