Buggy code:
public class WebPage extends Page implements INewBrowserWindowListener { private static final class PageMapChecker extends AbstractBehavior implements IHeaderContributor { private static final long serialVersionUID = 1L ; private final WebPage webPage ; PageMapChecker ( WebPage webPage ) { } public final void renderHead ( final IHeaderResponse headResponse ) { Response response = headResponse . getResponse ( ) ; final WebRequestCycle cycle = ( ( WebRequestCycle ) ( RequestCycle . get ( ) ) ) ; final IRequestTarget target = cycle . getRequestTarget ( ) ; <START_BUG> if ( webPage . getStatelessHint ( ) ) { <END_BUG> return ; } IPageMap pageMap = webPage . getPageMap ( ) ; String name = pageMap . getName ( ) ; if ( name == null ) { name = "wicket:default" ; } else { name = name . replace ( '"' , '_' ) ; } Session session = Session . get ( ) ; Session . PageMapAccessMetaData meta = ( ( Session . PageMapAccessMetaData ) ( session . getMetaData ( PAGEMAP_ACCESS_MDK ) ) ) ; if ( meta == null ) { meta = new Session . PageMapAccessMetaData ( ) ; session . setMetaData ( PAGEMAP_ACCESS_MDK , meta ) ; } boolean firstAccess = meta . add ( pageMap ) ; if ( firstAccess ) { JavascriptUtils . writeOpenTag ( response ) ; response . write ( "if<seq2seq4repair_space>(window.name==\'\'<seq2seq4repair_space>||<seq2seq4repair_space>window.name.indexOf(\'wicket\')<seq2seq4repair_space>><seq2seq4repair_space>-1)<seq2seq4repair_space>{<seq2seq4repair_space>window.name=\"" ) ; response . write ( ( "wicket-" + name ) ) ; response . write ( "\";<seq2seq4repair_space>}" ) ; JavascriptUtils . writeCloseTag ( response ) ; } else { CharSequence url = null ; if ( target instanceof IBookmarkablePageRequestTarget ) { IBookmarkablePageRequestTarget current = ( ( IBookmarkablePageRequestTarget ) ( target ) ) ; BookmarkablePageRequestTarget redirect = new BookmarkablePageRequestTarget ( session . createAutoPageMapName ( ) , current . getPageClass ( ) , current . getPageParameters ( ) ) ; url = cycle . urlFor ( redirect ) ; } else { url = webPage . urlFor ( INTERFACE ) ; } JavascriptUtils . writeOpenTag ( response ) ; response . write ( ( ( ( "if<seq2seq4repair_space>(window.name==''<seq2seq4repair_space>||<seq2seq4repair_space>(window.name.indexOf('wicket')<seq2seq4repair_space>><seq2seq4repair_space>-1<seq2seq4repair_space>&&<seq2seq4repair_space>window.name!='" + "wicket-" ) + name ) + "\'))<seq2seq4repair_space>{<seq2seq4repair_space>window.location=\"" ) ) ; response . write ( url ) ; response . write ( "\"<seq2seq4repair_space>+<seq2seq4repair_space>(window.location.hash<seq2seq4repair_space>!=<seq2seq4repair_space>null<seq2seq4repair_space>?<seq2seq4repair_space>window.location.hash<seq2seq4repair_space>:<seq2seq4repair_space>\"\");<seq2seq4repair_space>}" ) ; JavascriptUtils . writeCloseTag ( response ) ; } } } private static final Logger log = LoggerFactory . getLogger ( WebPage . class ) ; private static ResourceReference cookiesResource = new ResourceReference ( WebPage . class , "cookies.js" ) ; private static final long serialVersionUID = 1L ; private UrlCompressor compressor ; protected WebPage ( ) { } protected WebPage ( final IModel model ) { } protected WebPage ( final IPageMap pageMap ) { } protected WebPage ( final IPageMap pageMap , final IModel model ) { } protected WebPage ( final PageParameters parameters ) { } protected WebPage ( final IPageMap pageMap , final PageParameters parameters ) { } public String getMarkupType ( ) { } public final UrlCompressor getUrlCompressor ( ) { } public void onNewBrowserWindow ( ) { } private void commonInit ( ) { } protected void configureResponse ( ) { } protected void setHeaders ( WebResponse response ) { } protected final WebRequestCycle getWebRequestCycle ( ) { } protected final BookmarkablePageLink homePageLink ( final String id ) { } protected void onDetach ( ) { } }

Fix:
if ( webPage . isPageStateless ( ) ) {