Buggy code:
public ModalWindow setInitialWidth ( int initialWidth ) { } public int getInitialWidth ( ) { } public ModalWindow setInitialHeight ( int initialHeight ) { } public int getInitialHeight ( ) { } public ModalWindow setUseInitialHeight ( boolean useInitialHeight ) { } public boolean isUseInitialHeight ( ) { } public ModalWindow setResizable ( boolean resizable ) { } public boolean isResizable ( ) { } public ModalWindow setWidthUnit ( String widthUnit ) { } public String getWidthUnit ( ) { } public ModalWindow setHeightUnit ( String heightUnit ) { } public String getHeightUnit ( ) { } public ModalWindow setCookieName ( String cookieName ) { } public String getCookieName ( ) { } public ModalWindow setTitle ( String title ) { } public ModalWindow setTitle ( IModel < String > title ) { } public IModel < String > getTitle ( ) { } public static final class MaskType extends EnumeratedType { private static final long serialVersionUID = 1L ; public static final ModalWindow . MaskType TRANSPARENT = new ModalWindow . MaskType ( "TRANSPARENT" ) ; public static final ModalWindow . MaskType SEMI_TRANSPARENT = new ModalWindow . MaskType ( "SEMI_TRANSPARENT" ) ; public MaskType ( String name ) { } } public ModalWindow setMaskType ( ModalWindow . MaskType mask ) { } public ModalWindow . MaskType getMaskType ( ) { } private Page createPage ( ) { } @ Override protected void onBeforeRender ( ) { } protected boolean makeContentVisible ( ) { } @ Override protected void onComponentTag ( final ComponentTag tag ) { } protected final Component getContent ( ) { } protected boolean isCustomComponent ( ) { } @ Override public void remove ( Component component ) { } public ModalWindow setContent ( final Component component ) { } private class WindowClosedBehavior extends AbstractDefaultAjaxBehavior { private static final long serialVersionUID = 1L ; @ Override protected void respond ( AjaxRequestTarget target ) { } @ Override protected CharSequence getCallbackScript ( ) { } } private class CloseButtonBehavior extends AbstractDefaultAjaxBehavior { private static final long serialVersionUID = 1L ; @ Override protected void respond ( AjaxRequestTarget target ) { } @ Override protected IAjaxCallDecorator getAjaxCallDecorator ( ) { } @ Override protected CharSequence getCallbackScript ( ) { } } private String getContentMarkupId ( ) { } private String escapeQuotes ( String string ) { } protected final String getWindowOpenJavascript ( ) { AppendingStringBuffer buffer = new AppendingStringBuffer ( 500 ) ; if ( ( isCustomComponent ( ) ) == true ) { buffer . append ( "var<seq2seq4repair_space>element<seq2seq4repair_space>=<seq2seq4repair_space>document.getElementById(\"" ) ; buffer . append ( getContentMarkupId ( ) ) ; buffer . append ( "\");\n" ) ; } buffer . append ( "var<seq2seq4repair_space>settings<seq2seq4repair_space>=<seq2seq4repair_space>new<seq2seq4repair_space>Object();\n" ) ; appendAssignment ( buffer , "settings.minWidth" , getMinimalWidth ( ) ) ; appendAssignment ( buffer , "settings.minHeight" , getMinimalHeight ( ) ) ; appendAssignment ( buffer , "settings.className" , getCssClassName ( ) ) ; appendAssignment ( buffer , "settings.width" , getInitialWidth ( ) ) ; if ( ( ( isUseInitialHeight ( ) ) == true ) || ( ( isCustomComponent ( ) ) == false ) ) { appendAssignment ( buffer , "settings.height" , getInitialHeight ( ) ) ; } else { buffer . append ( "settings.height=null;\n" ) ; } appendAssignment ( buffer , "settings.resizable" , isResizable ( ) ) ; if ( ( isResizable ( ) ) == false ) { appendAssignment ( buffer , "settings.widthUnit" , getWidthUnit ( ) ) ; appendAssignment ( buffer , "settings.heightUnit" , getHeightUnit ( ) ) ; } if ( ( isCustomComponent ( ) ) == false ) { Page page = createPage ( ) ; if ( page == null ) { throw new WicketRuntimeException ( "Error<seq2seq4repair_space>creating<seq2seq4repair_space>page<seq2seq4repair_space>for<seq2seq4repair_space>modal<seq2seq4repair_space>dialog." ) ; } IRequestHandler handler = new RenderPageRequestHandler ( new org . apache . wicket . request . handler . PageProvider ( page ) ) ; <START_BUG> appendAssignment ( buffer , "settings.src" , RequestCycle . get ( ) . renderUrlFor ( handler ) ) ; <END_BUG> } else { buffer . append ( "settings.element=element;\n" ) ; } if ( ( getCookieName ( ) ) != null ) { appendAssignment ( buffer , "settings.cookieId" , getCookieName ( ) ) ; } Object title = ( ( getTitle ( ) ) != null ) ? getTitle ( ) . getObject ( ) : null ; if ( title != null ) { appendAssignment ( buffer , "settings.title" , escapeQuotes ( title . toString ( ) ) ) ; } if ( ( getMaskType ( ) ) == ( ModalWindow . MaskType . TRANSPARENT ) ) { buffer . append ( "settings.mask=\"transparent\";\n" ) ; } else if ( ( getMaskType ( ) ) == ( ModalWindow . MaskType . SEMI_TRANSPARENT ) ) { buffer . append ( "settings.mask=\"semi-transparent\";\n" ) ; } boolean haveCloseCallback = false ; if ( ( windowClosedCallback ) != null ) { ModalWindow . WindowClosedBehavior behavior = getBehaviors ( ModalWindow . WindowClosedBehavior . class ) . get ( 0 ) ; buffer . append ( "settings.onClose<seq2seq4repair_space>=<seq2seq4repair_space>function()<seq2seq4repair_space>{<seq2seq4repair_space>" ) ; buffer . append ( behavior . getCallbackScript ( ) ) ; buffer . append ( "<seq2seq4repair_space>};\n" ) ; haveCloseCallback = true ; } if ( ( ( closeButtonCallback ) != null ) || ( haveCloseCallback == false ) ) { ModalWindow . CloseButtonBehavior behavior = getBehaviors ( ModalWindow . CloseButtonBehavior . class ) . get ( 0 ) ; buffer . append ( "settings.onCloseButton<seq2seq4repair_space>=<seq2seq4repair_space>function()<seq2seq4repair_space>{<seq2seq4repair_space>" ) ; buffer . append ( behavior . getCallbackScript ( ) ) ; buffer . append ( "};\n" ) ; } postProcessSettings ( buffer ) ; buffer . append ( getShowJavascript ( ) ) ; return buffer . toString ( ) ; } private void appendAssignment ( final AppendingStringBuffer buffer , final CharSequence key , final int value ) { } private void appendAssignment ( final AppendingStringBuffer buffer , final CharSequence key , final boolean value ) { } private void appendAssignment ( final AppendingStringBuffer buffer , final CharSequence key , final CharSequence value ) { } protected AppendingStringBuffer postProcessSettings ( AppendingStringBuffer settings ) { }

Fix:
appendAssignment ( buffer , "settings.src" , RequestCycle . get ( ) . urlFor ( handler ) ) ;