Buggy code:
public abstract class RequestCycle { private static final Map constructors = new HashMap ( ) ; private static final ThreadLocal current = new ThreadLocal ( ) ; private static final Map listenerRequestInterfaceMethods = new HashMap ( ) ; private static final Log log = LogFactory . getLog ( RequestCycle . class ) ; protected final Application application ; protected Request request ; protected Response response ; protected final Session session ; private Page pageBackup ; private boolean redirect ; private Page responsePage ; private Class responsePageClass ; private PageParameters responsePageParams ; private boolean updateCluster ; private Page invokePage ; private IResourceStream responseStream ; public static final RequestCycle get ( ) { } public static void registerRequestListenerInterface ( final Class i ) { } protected RequestCycle ( final Session session , final Request request , final Response response ) { } public final Application getApplication ( ) { } public final boolean getRedirect ( ) { } public final Request getRequest ( ) { } public final Response getResponse ( ) { } public final Page getResponsePage ( ) { } public final PageParameters getResponsePagePageParameters ( ) { } public final Class getResponsePageClass ( ) { } protected final Page getInvokePage ( ) { } public final Session getSession ( ) { } public final void request ( ) throws ServletException { } public final void setRedirect ( final boolean redirect ) { } public final void setRequest ( Request request ) { } public final void setResponse ( final Response response ) { } public final void setResponsePage ( final Page page ) { } public final void setResponsePage ( final Class pageClass ) { } public final void setResponsePage ( final Class pageClass , final PageParameters pageParameters ) { } protected final void setInvokePage ( final Page page ) { } public void setUpdateCluster ( boolean updateCluster ) { } protected final Method getRequestInterfaceMethod ( final String interfaceName ) { } protected final void internalOnBeginRequest ( ) { } protected final void internalOnEndRequest ( ) { } protected void onBeginRequest ( ) { } protected void onEndRequest ( ) { } protected abstract boolean parseRequest ( ) { } protected abstract void redirectTo ( final Page page ) throws ServletException { } protected final void internalOnRuntimeException ( final Page page , final RuntimeException e ) throws ServletException { } protected void onRuntimeException ( final Page page , final RuntimeException e ) { } private final void redirectToExceptionErrorPage ( final Page page , final RuntimeException e ) throws ServletException { } private final void respond ( ) throws ServletException { } public String urlFor ( final Class pageClass , final PageParameters parameters ) { if ( pageClass == null ) { throw new NullPointerException ( "argument<seq2seq4repair_space>pageClass<seq2seq4repair_space>may<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null" ) ; } final StringBuffer buffer = urlPrefix ( ) ; buffer . append ( "?bookmarkablePage=" ) ; <START_BUG> String pageReference = application . getPages ( ) . aliasForPageClass ( pageClass ) ; <END_BUG> if ( pageReference == null ) pageReference = pageClass . getName ( ) ; buffer . append ( pageReference ) ; if ( parameters != null ) { for ( final Iterator iterator = parameters . keySet ( ) . iterator ( ) ; iterator . hasNext ( ) ; ) { final String key = ( ( String ) ( iterator . next ( ) ) ) ; buffer . append ( '&' ) ; buffer . append ( key ) ; buffer . append ( '=' ) ; buffer . append ( parameters . getString ( key ) ) ; } } return getResponse ( ) . encodeURL ( buffer . toString ( ) ) ; } protected abstract StringBuffer urlPrefix ( ) { } private final void threadAttach ( ) { } private final void threadDetach ( ) { } public String toString ( ) { } }

Fix:
String pageReference = application . getPages ( ) . aliasForClass ( pageClass ) ;