Buggy code:
public class AjaxRequestTarget implements IRequestTarget { public static interface IListener { public void onBeforeRespond ( Map map , AjaxRequestTarget target ) { } public void onAfterRespond ( Map map , AjaxRequestTarget . IJavascriptResponse response ) { } } public static interface IJavascriptResponse { public void addJavascript ( String script ) { } } private final class EncodingResponse extends WebResponse { private final AppendingStringBuffer buffer = new AppendingStringBuffer ( 256 ) ; private boolean escaped = false ; private final Response originalResponse ; public EncodingResponse ( Response originalResponse ) { } public CharSequence encodeURL ( CharSequence url ) { } public CharSequence getContents ( ) { } public OutputStream getOutputStream ( ) { } public boolean isContentsEncoded ( ) { } public void reset ( ) { } public void write ( CharSequence cs ) { } } private static final Log LOG = LogFactory . getLog ( AjaxRequestTarget . class ) ; private final List appendJavascripts = new ArrayList ( ) ; private final AjaxRequestTarget . EncodingResponse encodingBodyResponse ; private final AjaxRequestTarget . EncodingResponse encodingHeaderResponse ; private final Map markupIdToComponent = new LinkedHashMap ( ) ; private final List prependJavascripts = new ArrayList ( ) ; private List listeners = null ; public AjaxRequestTarget ( ) { } public void addListener ( AjaxRequestTarget . IListener listener ) { } public final void addComponent ( Component component ) { } public final void addComponent ( Component component , String markupId ) { } public final void addJavascript ( String javascript ) { } public final void focusComponent ( Component component ) { } public final void appendJavascript ( String javascript ) { } public void detach ( final RequestCycle requestCycle ) { } public boolean equals ( final Object obj ) { } public int hashCode ( ) { } public final void prependJavascript ( String javascript ) { } public final void respond ( final RequestCycle requestCycle ) { } private void fireOnBeforeRespondListeners ( ) { } private void fireOnAfterRespondListeners ( final WebResponse response ) { } private void respondComponents ( WebResponse response ) { } public String toString ( ) { } protected String encode ( String str ) { } protected String getEncodingName ( ) { } protected boolean needsEncoding ( String str ) { } private void respondComponent ( final Response response , final String markupId , final Component component ) { } private class AjaxHeaderResponse extends HeaderResponse { private static final long serialVersionUID = 1L ; private void checkHeaderRendering ( ) { } public void renderCSSReference ( ResourceReference reference , String media ) { } public void renderCSSReference ( String url ) { } public void renderCSSReference ( String url , String media ) { } public void renderJavascript ( CharSequence javascript , String id ) { } public void renderCSSReference ( ResourceReference reference ) { } public void renderJavascriptReference ( ResourceReference reference ) { } public void renderJavascriptReference ( String url ) { } public void renderString ( CharSequence string ) { } public AjaxHeaderResponse ( ) { } public void renderOnDomReadyJavascript ( String javascript ) { } public void renderOnLoadJavascript ( String javascript ) { } public Response getResponse ( ) { } } private boolean headerRendering = false ; private HtmlHeaderContainer header = null ; private IHeaderResponse headerResponse ; public IHeaderResponse getHeaderResponse ( ) { } private static class AjaxHtmlHeaderContainer extends HtmlHeaderContainer { private static final long serialVersionUID = 1L ; public AjaxHtmlHeaderContainer ( String id , AjaxRequestTarget target ) { } protected IHeaderResponse newHeaderResponse ( ) { } private transient AjaxRequestTarget target ; } private void respondHeaderContribution ( final Response response , final Component component ) { headerRendering = true ; if ( ( header ) == null ) { header = new AjaxRequestTarget . AjaxHtmlHeaderContainer ( HtmlHeaderSectionHandler . HEADER_ID , this ) ; } Component oldHeader = component . getPage ( ) . get ( HEADER_ID ) ; if ( oldHeader != null ) { component . getPage ( ) . replace ( header ) ; } else { component . getPage ( ) . add ( header ) ; } Response oldResponse = RequestCycle . get ( ) . setResponse ( encodingHeaderResponse ) ; encodingHeaderResponse . reset ( ) ; component . renderHead ( header ) ; if ( component instanceof MarkupContainer ) { ( ( MarkupContainer ) ( component ) ) . visitChildren ( new Component . IVisitor ( ) { public Object component ( Component component ) { if ( component . isVisible ( ) ) { component . renderHead ( header ) ; return CONTINUE_TRAVERSAL ; } else { return CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER ; } } } ) ; } RequestCycle . get ( ) . setResponse ( oldResponse ) ; if ( ( encodingHeaderResponse . getContents ( ) . length ( ) ) != 0 ) { response . write ( "<header-contribution" ) ; if ( encodingHeaderResponse . isContentsEncoded ( ) ) { response . write ( "<seq2seq4repair_space>encoding=\"" ) ; response . write ( getEncodingName ( ) ) ; response . write ( "\"<seq2seq4repair_space>" ) ; } <START_BUG> response . write ( "><![CDATA[<head<seq2seq4repair_space>xmlns:org.apache.wicket=\"http:////org.apache.wicket.sourceforge.net\">" ) ; <END_BUG> response . write ( encodingHeaderResponse . getContents ( ) ) ; response . write ( "<//head>]]>" ) ; response . write ( "<//header-contribution>" ) ; } headerRendering = false ; if ( oldHeader == null ) component . getPage ( ) . remove ( header ) ; else component . getPage ( ) . replace ( oldHeader ) ; } private void respondInvocation ( final Response response , final String js ) { } }

Fix:
response . write ( "><![CDATA[<head<seq2seq4repair_space>xmlns:wicket=\"http:////wicket.sourceforge.net\">" ) ;