Buggy code:
public class WebRequestCodingStrategy implements IRequestCodingStrategy { public static final String INTERFACE_PARAMETER_NAME = "wicket:interface" ; public static final String BEHAVIOR_ID_PARAMETER_NAME = "wicket:behaviorId" ; public static final String BOOKMARKABLE_PAGE_PARAMETER_NAME = "wicket:bookmarkablePage" ; private static final Comparator lengthComparator = new Comparator ( ) { public int compare ( Object o1 , Object o2 ) { } } ; private static Log log = LogFactory . getLog ( WebRequestCodingStrategy . class ) ; private final SortedMap mountsOnPath = new TreeMap ( WebRequestCodingStrategy . lengthComparator ) ; private String urlPrefix ; public WebRequestCodingStrategy ( ) { } public final RequestParameters decode ( final Request request ) { } public final String encode ( final RequestCycle requestCycle , final IRequestTarget requestTarget ) { IRequestTargetUrlCodingStrategy encoder = getMountEncoder ( requestTarget ) ; if ( encoder != null ) { final StringBuffer prefix = new StringBuffer ( urlPrefix ( requestCycle ) ) ; <START_BUG> return prefix . append ( pathForTarget ( requestTarget ) ) . toString ( ) ; <END_BUG> } if ( requestTarget instanceof IBookmarkablePageRequestTarget ) { return encode ( requestCycle , ( ( IBookmarkablePageRequestTarget ) ( requestTarget ) ) ) ; } else if ( requestTarget instanceof ISharedResourceRequestTarget ) { return encode ( requestCycle , ( ( ISharedResourceRequestTarget ) ( requestTarget ) ) ) ; } else if ( requestTarget instanceof IListenerInterfaceRequestTarget ) { return encode ( requestCycle , ( ( IListenerInterfaceRequestTarget ) ( requestTarget ) ) ) ; } else if ( requestTarget instanceof IPageRequestTarget ) { return encode ( requestCycle , ( ( IPageRequestTarget ) ( requestTarget ) ) ) ; } String url = doEncode ( requestCycle , requestTarget ) ; if ( url != null ) { return url ; } throw new wicket . WicketRuntimeException ( ( "unable<seq2seq4repair_space>to<seq2seq4repair_space>encode<seq2seq4repair_space>" + requestTarget ) ) ; } public final IRequestTargetUrlCodingStrategy urlCodingStrategyForPath ( final String path ) { } public final void mount ( String path , IRequestTargetUrlCodingStrategy encoder ) { } public final String pathForTarget ( IRequestTarget requestTarget ) { } public final IRequestTarget targetForPath ( String path ) { } public final void unmount ( String path ) { } protected void addBookmarkablePageParameters ( final Request request , final RequestParameters parameters ) { } protected void addInterfaceParameters ( final Request request , final RequestParameters parameters ) { } protected void addResourceParameters ( Request request , RequestParameters parameters ) { } protected String doEncode ( RequestCycle requestCycle , IRequestTarget requestTarget ) { } protected final String encode ( RequestCycle requestCycle , IBookmarkablePageRequestTarget requestTarget ) { } protected String encode ( RequestCycle requestCycle , ISharedResourceRequestTarget requestTarget ) { } protected final String encode ( RequestCycle requestCycle , IListenerInterfaceRequestTarget requestTarget ) { } protected final String encode ( RequestCycle requestCycle , IPageRequestTarget requestTarget ) { } protected IRequestTargetUrlCodingStrategy getMountEncoder ( IRequestTarget requestTarget ) { } protected String getRequestPath ( Request request ) { } protected final String urlPrefix ( RequestCycle requestCycle ) { } }

Fix:
return requestCycle . getResponse ( ) . encodeURL ( prefix . append ( pathForTarget ( requestTarget ) ) . toString ( ) ) ;