Buggy code:
public final class MarkupParserTest extends WicketTestCase { private static final Log log = LogFactory . getLog ( MarkupParserTest . class ) ; public MarkupParserTest ( String name ) { } public final void testTagParsing ( ) throws Exception { } public final void test ( ) throws Exception { } public final void testXhtmlDocument ( ) throws Exception { } private MarkupResourceStream newMarkupResourceStream ( final IResourceStreamLocator locator , final Class c , final String style , final Locale locale , final String extension ) { } public final void testFileDocument ( ) throws IOException , ParseException , ResourceStreamNotFoundException { } public final void testWicketTag ( ) throws IOException , ParseException , ResourceStreamNotFoundException { WicketTagIdentifier . registerWellKnownTagName ( "body" ) ; WicketTagIdentifier . registerWellKnownTagName ( "border" ) ; WicketTagIdentifier . registerWellKnownTagName ( "panel" ) ; final MarkupParser parser = new MarkupParser ( new XmlPullParser ( ) ) ; parser . parse ( "<span<seq2seq4repair_space>wicket:id=\"test\"//>" ) ; parser . parse ( "<span<seq2seq4repair_space>wicket:id=\"test\">Body<//span>" ) ; parser . parse ( "This<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>test<seq2seq4repair_space><span<seq2seq4repair_space>wicket:id=\"test\"//>" ) ; parser . parse ( "This<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>test<seq2seq4repair_space><span<seq2seq4repair_space>wicket:id=\"test\">Body<//span>" ) ; parser . parse ( "<a<seq2seq4repair_space>wicket:id=\"[autolink]\"<seq2seq4repair_space>href=\"test.html\">Home<//a>" ) ; parser . parse ( "<wicket:body//>" ) ; parser . parse ( "<wicket:border//>" ) ; parser . parse ( "<wicket:panel//>" ) ; try { parser . parse ( "<wicket:remove//>" ) ; assertTrue ( "Should<seq2seq4repair_space>have<seq2seq4repair_space>thrown<seq2seq4repair_space>an<seq2seq4repair_space>exception" , false ) ; } catch ( MarkupException ex ) { } Markup markup = parser . parse ( "<wicket:remove><seq2seq4repair_space><//wicket:remove>" ) ; assertEquals ( 0 , markup . size ( ) ) ; markup = parser . parse ( "<wicket:remove><seq2seq4repair_space><span<seq2seq4repair_space>id=\"test\"//><seq2seq4repair_space><//wicket:remove>" ) ; assertEquals ( 0 , markup . size ( ) ) ; markup = parser . parse ( "<div><wicket:remove><seq2seq4repair_space><span<seq2seq4repair_space>id=\"test\"//><seq2seq4repair_space><//wicket:remove><//div>" ) ; assertEquals ( 2 , markup . size ( ) ) ; assertEquals ( "<div>" , ( ( RawMarkup ) ( markup . get ( 0 ) ) ) . toString ( ) ) ; assertEquals ( "<//div>" , ( ( RawMarkup ) ( markup . get ( 1 ) ) ) . toString ( ) ) ; try { parser . parse ( "<wicket:remove><seq2seq4repair_space><wicket:remove><seq2seq4repair_space><//wicket:remove><seq2seq4repair_space><//wicket:remove>" ) ; <START_BUG> assertTrue ( "Should<seq2seq4repair_space>have<seq2seq4repair_space>thrown<seq2seq4repair_space>an<seq2seq4repair_space>exception:<seq2seq4repair_space>remove<seq2seq4repair_space>regions<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>contain<seq2seq4repair_space>org.apache.wicket-components" , false ) ; <END_BUG> } catch ( MarkupException ex ) { } parser . parse ( "<wicket:component<seq2seq4repair_space>name<seq2seq4repair_space>=<seq2seq4repair_space>\"componentName\"<seq2seq4repair_space>class<seq2seq4repair_space>=<seq2seq4repair_space>\"classname\"<seq2seq4repair_space>param1<seq2seq4repair_space>=<seq2seq4repair_space>\"value1\"//>" ) ; parser . parse ( "<wicket:component<seq2seq4repair_space>name<seq2seq4repair_space>=<seq2seq4repair_space>\"componentName\"<seq2seq4repair_space>class<seq2seq4repair_space>=<seq2seq4repair_space>\"classname\"<seq2seq4repair_space>param1<seq2seq4repair_space>=<seq2seq4repair_space>\"value1\"><seq2seq4repair_space><//wicket:component>" ) ; parser . parse ( "<wicket:component<seq2seq4repair_space>name<seq2seq4repair_space>=<seq2seq4repair_space>\"componentName\"<seq2seq4repair_space>class<seq2seq4repair_space>=<seq2seq4repair_space>\"classname\"<seq2seq4repair_space>param1<seq2seq4repair_space>=<seq2seq4repair_space>\"value1\"><seq2seq4repair_space><span<seq2seq4repair_space>wicket:id=\"msg\">hello<seq2seq4repair_space>world!<//span><//wicket:component>" ) ; parser . parse ( "<wicket:panel><div<seq2seq4repair_space>id=\"definitionsContentBox\"><span<seq2seq4repair_space>wicket:id=\"contentPanel\"//><//div><//wicket:panel>" ) ; } public final void testDefaultWicketTag ( ) throws IOException , ParseException , ResourceStreamNotFoundException { } public final void testScript ( ) throws IOException , ParseException , ResourceStreamNotFoundException { } public final void testBalancing ( ) throws IOException , ResourceStreamNotFoundException { } }

Fix:
assertTrue ( "Should<seq2seq4repair_space>have<seq2seq4repair_space>thrown<seq2seq4repair_space>an<seq2seq4repair_space>exception:<seq2seq4repair_space>remove<seq2seq4repair_space>regions<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>contain<seq2seq4repair_space>wicket-components" , false ) ;