Buggy code:
public class RequestCycle implements IEventSink , IRequestCycle { private static final Logger log = LoggerFactory . getLogger ( RequestCycle . class ) ; private boolean cleanupFeedbackMessagesOnDetach = true ; private interface IExecutor < T > { void execute ( T object ) { } } public static RequestCycle get ( ) { } private static void set ( RequestCycle requestCycle ) { } private Request request ; private final Response originalResponse ; private final IRequestMapper requestMapper ; private final IExceptionMapper exceptionMapper ; private final RequestCycleListenerCollection listeners = new RequestCycleListenerCollection ( ) ; private UrlRenderer urlRenderer ; private MetaDataEntry < ? > [ ] metaData ; private final long startTime = System . currentTimeMillis ( ) ; private RequestHandlerStack requestHandlerExecutor ; private Response activeResponse ; public RequestCycle ( RequestCycleContext context ) { } protected UrlRenderer newUrlRenderer ( ) { } public Response getOriginalResponse ( ) { } public final UrlRenderer getUrlRenderer ( ) { } protected IRequestHandler resolveRequestHandler ( ) { } protected int getExceptionRetryCount ( ) { } public boolean processRequest ( ) { } public boolean processRequestAndDetach ( ) { } private void executeExceptionRequestHandler ( final IRequestHandler handler , final int retryCount ) { } protected IRequestHandler handleException ( final Exception e ) { } public Request getRequest ( ) { } public void setRequest ( Request request ) { } public final < T > void setMetaData ( final MetaDataKey < T > key , final T object ) { } public final < T > T getMetaData ( final MetaDataKey < T > key ) { } public Url mapUrlFor ( IRequestHandler handler ) { } public Url mapUrlFor ( ResourceReference reference , PageParameters params ) { } public final < C extends Page > Url mapUrlFor ( final Class < C > pageClass , final PageParameters parameters ) { } public final CharSequence urlFor ( ResourceReference reference , PageParameters params ) { } public final < C extends Page > CharSequence urlFor ( final Class < C > pageClass , final PageParameters parameters ) { } public CharSequence urlFor ( IRequestHandler handler ) { } private String renderUrl ( Url url ) { } public final void detach ( ) { } private void onInternalDetach ( ) { } public void onDetach ( ) { if ( cleanupFeedbackMessagesOnDetach ) { if ( Session . exists ( ) ) { Session . get ( ) . cleanupFeedbackMessages ( ) ; } } try { onEndRequest ( ) ; listeners . onEndRequest ( this ) ; } catch ( RuntimeException e ) { <START_BUG> RequestCycle . log . error ( "Exception<seq2seq4repair_space>occurred<seq2seq4repair_space>during<seq2seq4repair_space>onAfterRequest" , e ) ; <END_BUG> } try { requestHandlerExecutor . detach ( ) ; } finally { listeners . onDetach ( this ) ; } if ( Session . exists ( ) ) { Session . get ( ) . detach ( ) ; } } public void setResponsePage ( IRequestablePage page ) { } public void setResponsePage ( Class < ? extends IRequestablePage > pageClass ) { } public void setResponsePage ( Class < ? extends IRequestablePage > pageClass , PageParameters parameters ) { } public boolean isCleanupFeedbackMessagesOnDetach ( ) { } public void setCleanupFeedbackMessagesOnDetach ( boolean cleanupFeedbackMessagesOnDetach ) { } public final long getStartTime ( ) { } public void onEvent ( IEvent < ? > event ) { } protected void onBeginRequest ( ) { } protected void onEndRequest ( ) { } public RequestCycleListenerCollection getListeners ( ) { } public Response getResponse ( ) { } public Response setResponse ( final Response response ) { } public void scheduleRequestHandlerAfterCurrent ( IRequestHandler handler ) { } public IRequestHandler getActiveRequestHandler ( ) { } public IRequestHandler getRequestHandlerScheduledAfterCurrent ( ) { } public void replaceAllRequestHandlers ( final IRequestHandler handler ) { } private class HandlerExecutor extends RequestHandlerStack { @ Override protected void respond ( IRequestHandler handler ) { } @ Override protected void detach ( IRequestHandler handler ) { } } }

Fix:
RequestCycle . log . error ( "Exception<seq2seq4repair_space>occurred<seq2seq4repair_space>during<seq2seq4repair_space>onEndRequest" , e ) ;