Buggy code:
public abstract class Session implements Serializable , IConverterLocator { private static final long serialVersionUID = 1L ; public static final String SESSION_ATTRIBUTE_NAME = "session" ; static final String pageMapEntryAttributePrefix = "p:" ; private static final ThreadLocal < Session > current = new ThreadLocal < Session > ( ) ; private static final ThreadLocal < List < Serializable > > dirtyObjects = new ThreadLocal < List < Serializable > > ( ) ; private static final Log log = LogFactory . getLog ( Session . class ) ; private static final String pageMapAttributePrefix = "m:" ; private ClientInfo clientInfo ; private transient IConverterLocator converterSupplier ; private transient boolean dirty = false ; private Locale locale ; private int autoCreatePageMapCounter = 0 ; private LinkedList < PageMap > usedPageMaps = new LinkedList < PageMap > ( ) ; private String style ; private FeedbackMessages feedbackMessages = new FeedbackMessages ( new CopyOnWriteArrayList < wicket . feedback . FeedbackMessage > ( ) ) ; private transient Map < PageMap , Thread > pageMapsUsedInRequest ; private String id = null ; private transient ISessionStore sessionStore ; private MetaDataEntry [ ] metaData ; public static interface IPageMapVisitor { public void pageMap ( final PageMap pageMap ) { } } public static Session get ( ) { } public static Session get ( boolean forceBind ) { } protected final void bind ( ) { } public final boolean isTemporary ( ) { } public static void set ( final Session session ) { } public static void unset ( ) { } protected Session ( final Application application ) { } public final void clear ( ) { } public Application getApplication ( ) { } public IAuthorizationStrategy getAuthorizationStrategy ( ) { } public final IClassResolver getClassResolver ( ) { } public ClientInfo getClientInfo ( ) { } public final PageMap getDefaultPageMap ( ) { } public final String getId ( ) { } public Locale getLocale ( ) { } public final Serializable getMetaData ( final MetaDataKey key ) { } public final synchronized Page getPage ( final String pageMapName , final String path , final int versionNumber ) { if ( Session . log . isDebugEnabled ( ) ) { Session . log . debug ( ( ( ( ( "Getting<seq2seq4repair_space>page<seq2seq4repair_space>[path<seq2seq4repair_space>=<seq2seq4repair_space>" + path ) + ",<seq2seq4repair_space>versionNumber<seq2seq4repair_space>=<seq2seq4repair_space>" ) + versionNumber ) + "]" ) ) ; } <START_BUG> PageMap pageMap = pageMapForName ( pageMapName , pageMapName . equals ( DEFAULT_NAME ) ) ; <END_BUG> if ( pageMap != null ) { long startTime = System . currentTimeMillis ( ) ; if ( ( pageMapsUsedInRequest ) == null ) { pageMapsUsedInRequest = new HashMap < PageMap , Thread > ( 3 ) ; } Thread t = pageMapsUsedInRequest . get ( pageMap ) ; while ( ( t != null ) && ( t != ( Thread . currentThread ( ) ) ) ) { try { wait ( 20000 ) ; } catch ( InterruptedException ex ) { throw new WicketRuntimeException ( ex ) ; } t = pageMapsUsedInRequest . get ( pageMap ) ; if ( ( ( t != null ) && ( t != ( Thread . currentThread ( ) ) ) ) && ( ( startTime + 20000 ) < ( System . currentTimeMillis ( ) ) ) ) { throw new WicketRuntimeException ( ( ( ( ( ( "After<seq2seq4repair_space>20s<seq2seq4repair_space>the<seq2seq4repair_space>Pagemap<seq2seq4repair_space>" + pageMapName ) + "<seq2seq4repair_space>is<seq2seq4repair_space>still<seq2seq4repair_space>locked<seq2seq4repair_space>by:<seq2seq4repair_space>" ) + t ) + ",<seq2seq4repair_space>giving<seq2seq4repair_space>up<seq2seq4repair_space>trying<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>the<seq2seq4repair_space>page<seq2seq4repair_space>for<seq2seq4repair_space>path:<seq2seq4repair_space>" ) + path ) ) ; } } pageMapsUsedInRequest . put ( pageMap , Thread . currentThread ( ) ) ; final String id = Strings . firstPathComponent ( path , PATH_SEPARATOR ) ; Page page = pageMap . get ( Integer . parseInt ( id ) , versionNumber ) ; if ( page == null ) { pageMapsUsedInRequest . remove ( pageMap ) ; notifyAll ( ) ; } return page ; } return null ; } public final IPageFactory getPageFactory ( ) { } public final IPageFactory getPageFactory ( final Page page ) { } public final PageMap pageMapForName ( String pageMapName , final boolean autoCreate ) { } public final synchronized PageMap createAutoPageMap ( ) { } public final synchronized String createAutoPageMapName ( ) { } public final List < PageMap > getPageMaps ( ) { } public final long getSizeInBytes ( ) { } public final String getStyle ( ) { } public final void init ( ) { } public void invalidate ( ) { } public final PageMap newPageMap ( final String name ) { } public final RequestCycle newRequestCycle ( final Request request , final Response response ) { } public final void removePageMap ( final PageMap pageMap ) { } public final void setClientInfo ( ClientInfo clientInfo ) { } public final void setLocale ( final Locale locale ) { } public final void setMetaData ( final MetaDataKey key , final Serializable object ) { } public final Session setStyle ( final String style ) { } public final void touch ( Page page ) { } public final void visitPageMaps ( final Session . IPageMapVisitor visitor ) { } public final void info ( final String message ) { } public final void warn ( final String message ) { } public final void error ( final String message ) { } public final FeedbackMessages getFeedbackMessages ( ) { } public final IConverter getConverter ( Class type ) { } private void addFeedbackMessage ( String message , int level ) { } protected void detach ( ) { } protected void dirty ( ) { } protected final Object getAttribute ( final String name ) { } protected final List < String > getAttributeNames ( ) { } protected abstract IRequestCycleFactory getRequestCycleFactory ( ) { } protected ISessionStore getSessionStore ( ) { } protected final void removeAttribute ( String name ) { } protected final void setAttribute ( String name , Object value ) { } protected void update ( ) { } final void cleanupFeedbackMessages ( ) { }

Fix:
PageMap pageMap = pageMapForName ( pageMapName , Objects . equal ( DEFAULT_NAME , pageMapName ) ) ;