Buggy code:
public abstract class Session implements Serializable , ICoverterLocator { 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 ICoverterLocator 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 ; private transient Map < String , Thread > usedPages ; 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 ) { } 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 setApplication ( final Application application ) { } 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 ( ) { if ( dirty ) { if ( Session . log . isDebugEnabled ( ) ) { Session . log . debug ( "update:<seq2seq4repair_space>Session<seq2seq4repair_space>is<seq2seq4repair_space>dirty.<seq2seq4repair_space>Replicating." ) ; } this . dirty = false ; setAttribute ( Session . SESSION_ATTRIBUTE_NAME , this ) ; } else { if ( Session . log . isDebugEnabled ( ) ) { Session . log . debug ( "update:<seq2seq4repair_space>Session<seq2seq4repair_space>not<seq2seq4repair_space>dirty." ) ; } } List dirtyObjects = Session . dirtyObjects . get ( ) ; if ( dirtyObjects != null ) { for ( final Iterator iterator = dirtyObjects . iterator ( ) ; iterator . hasNext ( ) ; ) { String attribute = null ; Object object = iterator . next ( ) ; if ( object instanceof Page ) { final Page page = ( ( Page ) ( object ) ) ; <START_BUG> if ( page . isStateless ( ) ) { <END_BUG> continue ; } attribute = page . getPageMap ( ) . attributeForId ( page . getNumericId ( ) ) ; if ( ( getAttribute ( attribute ) ) == null ) { continue ; } object = page . getPageMapEntry ( ) ; } else if ( object instanceof PageMap ) { attribute = attributeForPageMapName ( ( ( PageMap ) ( object ) ) . getName ( ) ) ; } setAttribute ( attribute , object ) ; } Session . dirtyObjects . set ( null ) ; } } final void cleanupFeedbackMessages ( ) { } void dirtyPage ( final Page page ) { } final synchronized void pageDetached ( Page page ) { } void dirtyPageMap ( final PageMap map ) { } private final String attributeForPageMapName ( final String pageMapName ) { } List < Serializable > getDirtyObjectsList ( ) { } }

Fix:
if ( page . isPageStateless ( ) ) {