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 ) { final RequestListenerInterface rli = requestTarget . getRequestListenerInterface ( ) ; final AppendingStringBuffer url = new AppendingStringBuffer ( 64 ) ; url . append ( '?' ) ; url . append ( WebRequestCodingStrategy . INTERFACE_PARAMETER_NAME ) ; url . append ( '=' ) ; final Component component = requestTarget . getTarget ( ) ; final Page page = component . getPage ( ) ; final IPageMap pageMap = page . getPageMap ( ) ; if ( ! ( pageMap . isDefault ( ) ) ) { url . append ( pageMap . getName ( ) ) ; } url . append ( PATH_SEPARATOR ) ; url . append ( component . getPath ( ) ) ; url . append ( PATH_SEPARATOR ) ; final int versionNumber = component . getPage ( ) . getCurrentVersionNumber ( ) ; if ( ! ( rli . getRecordsPageVersion ( ) ) ) { url . append ( LATEST_VERSION ) ; } else if ( versionNumber > 0 ) { url . append ( versionNumber ) ; } url . append ( PATH_SEPARATOR ) ; final String listenerName = rli . getName ( ) ; if ( ! ( INTERFACE . getName ( ) . equals ( listenerName ) ) ) { url . append ( listenerName ) ; } url . append ( PATH_SEPARATOR ) ; RequestParameters params = requestTarget . getRequestParameters ( ) ; if ( ( params != null ) && ( ( params . getBehaviorId ( ) ) != null ) ) { url . append ( params . getBehaviorId ( ) ) ; } url . append ( PATH_SEPARATOR ) ; if ( ( params != null ) && ( ( params . getUrlDepth ( ) ) != 0 ) ) { url . append ( params . getUrlDepth ( ) ) ; } if ( IActivePageBehaviorListener . INTERFACE . getName ( ) . equals ( listenerName ) ) { <START_BUG> url . append ( ( ( url . indexOf ( "?" ) ) > ( - 1 ) ? "&amp;" : "?" ) ) . append ( WebRequestCodingStrategy . IGNORE_IF_NOT_ACTIVE_PARAMETER_NAME ) . append ( "=true" ) ; <END_BUG> } return url ; } 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 ) { } 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:
url . append ( ( ( url . indexOf ( "?" ) ) > ( - 1 ) ? "&" : "?" ) ) . append ( WebRequestCodingStrategy . IGNORE_IF_NOT_ACTIVE_PARAMETER_NAME ) . append ( "=true" ) ;