Buggy code:
} ; public static final String SESSION_ATTRIBUTE_NAME = "session" ; private static final ThreadLocal current = new ThreadLocal ( ) ; private static final ThreadLocal dirtyObjects = new ThreadLocal ( ) ; private static final Logger log = LoggerFactory . getLogger ( Session . class ) ; private static final String pageMapAttributePrefix = "m:" ; private static final IFeedbackMessageFilter RENDERED_SESSION_SCOPED_MESSAGES = new IFeedbackMessageFilter ( ) { private static final long serialVersionUID = 1L ; public boolean accept ( FeedbackMessage message ) { } } ; private static final long serialVersionUID = 1L ; private static final ThreadLocal touchedPages = new ThreadLocal ( ) ; static final String pageMapEntryAttributePrefix = "p:" ; public static boolean exists ( ) { } public static final Session findOrCreate ( ) { } public static Session get ( ) { } public static void set ( final Session session ) { } public static void unset ( ) { } private int autoCreatePageMapCounter = 0 ; private ClientInfo clientInfo ; private transient boolean dirty = false ; private final FeedbackMessages feedbackMessages = new FeedbackMessages ( ) ; private String id = null ; private Locale locale ; private MetaDataEntry [ ] metaData ; private static class PageMapsUsedInRequestEntry { Thread thread ; RequestCycle requestCycle ; } private transient Map pageMapsUsedInRequest ; private transient boolean sessionInvalidated = false ; private transient ISessionStore sessionStore ; private String style ; private transient Map temporarySessionAttributes ; private final LinkedList usedPageMaps = new LinkedList ( ) ; public Session ( Request request ) { } protected Session ( Application application , Request request ) { } public final void bind ( ) { } public void cleanupFeedbackMessages ( ) { } public final void clear ( ) { } public final IPageMap createAutoPageMap ( ) { } protected int currentCreateAutoPageMapCounter ( ) { } protected void incrementCreateAutoPageMapCounter ( ) { } public final synchronized String createAutoPageMapName ( ) { } protected String getAutoPageMapNamePrefix ( ) { } protected String getAutoPageMapNameSuffix ( ) { } public final void error ( final String message ) { } public final Application getApplication ( ) { } public IAuthorizationStrategy getAuthorizationStrategy ( ) { } public final IClassResolver getClassResolver ( ) { } public ClientInfo getClientInfo ( ) { } public final IPageMap getDefaultPageMap ( ) { } public final FeedbackMessages getFeedbackMessages ( ) { } public final String getId ( ) { } public Locale getLocale ( ) { } public final Serializable getMetaData ( final MetaDataKey key ) { } protected boolean isCurrentRequestValid ( RequestCycle lockedRequestCycle ) { } public final Page getPage ( final int pageId , final int versionNumber ) { } public final Page getPage ( final String pageMapName , final String path , final int versionNumber ) { } public final IPageFactory getPageFactory ( ) { } public final IPageFactory getPageFactory ( final Page page ) { } public final List getPageMaps ( ) { } public final long getSizeInBytes ( ) { } public final String getStyle ( ) { } public final void info ( final String message ) { } public void invalidate ( ) { } public void invalidateNow ( ) { } public final boolean isSessionInvalidated ( ) { } public final boolean isTemporary ( ) { } public final IPageMap newPageMap ( final String name ) { } public final IPageMap pageMapForName ( String pageMapName , final boolean autoCreate ) { } public final void removePageMap ( final IPageMap 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 warn ( final String message ) { } private void addFeedbackMessage ( String message , int level ) { } private final String attributeForPageMapName ( final String pageMapName ) { } protected void attach ( ) { } protected void detach ( ) { } public final void dirty ( ) { } protected final Object getAttribute ( final String name ) { } protected final List getAttributeNames ( ) { } protected ISessionStore getSessionStore ( ) { } protected final void removeAttribute ( String name ) { } protected final void setAttribute ( String name , Object value ) { if ( ! ( isTemporary ( ) ) ) { RequestCycle cycle = RequestCycle . get ( ) ; if ( cycle == null ) { <START_BUG> throw new IllegalStateException ( "Cannot<seq2seq4repair_space>set<seq2seq4repair_space>the<seq2seq4repair_space>attribute:<seq2seq4repair_space>no<seq2seq4repair_space>RequestCycle<seq2seq4repair_space>available" ) ; <END_BUG> } ISessionStore store = getSessionStore ( ) ; Request request = cycle . getRequest ( ) ; if ( value == ( this ) ) { Object current = store . getAttribute ( request , name ) ; if ( current == null ) { String id = store . getSessionId ( request , false ) ; if ( id != null ) { store . bind ( request , ( ( Session ) ( value ) ) ) ; } } } store . setAttribute ( request , name , value ) ; } else { if ( ( temporarySessionAttributes ) == null ) { temporarySessionAttributes = new HashMap ( 3 ) ; } temporarySessionAttributes . put ( name , value ) ; } } protected final void update ( ) { } void dirtyPage ( final Page page ) { } void dirtyPageMap ( final IPageMap map ) { } List getDirtyObjectsList ( ) { } final void requestDetached ( ) { } private int pageIdCounter = 0 ; protected synchronized int nextPageId ( ) { } }

Fix:
throw new IllegalStateException ( "Cannot<seq2seq4repair_space>set<seq2seq4repair_space>the<seq2seq4repair_space>attribute:<seq2seq4repair_space>no<seq2seq4repair_space>RequestCycle<seq2seq4repair_space>available.<seq2seq4repair_space>If<seq2seq4repair_space>you<seq2seq4repair_space>get<seq2seq4repair_space>this<seq2seq4repair_space>error<seq2seq4repair_space>when<seq2seq4repair_space>using<seq2seq4repair_space>WicketTester.startPage(Page),<seq2seq4repair_space>make<seq2seq4repair_space>sure<seq2seq4repair_space>to<seq2seq4repair_space>call<seq2seq4repair_space>WicketTester.createRequestCycle()<seq2seq4repair_space>beforehand." ) ;