Buggy code:
public class CeylonDocToolTest { private CeylonDocTool tool ( String pathname , String testName , String moduleName , String ... repositories ) throws IOException { } protected void assertFileExists ( File destDir , String path ) { } protected void assertFileNotExists ( File destDir , String path ) { } protected void assertDirectoryExists ( File destDir , String path ) { } static interface GrepAsserter { void makeAssertions ( Matcher matcher ) { } } static CeylonDocToolTest . GrepAsserter AT_LEAST_ONE_MATCH = new CeylonDocToolTest . GrepAsserter ( ) { @ Override public void makeAssertions ( Matcher matcher ) { } } ; static CeylonDocToolTest . GrepAsserter NO_MATCHES = new CeylonDocToolTest . GrepAsserter ( ) { @ Override public void makeAssertions ( Matcher matcher ) { } } ; protected void assertMatchInFile ( File destDir , String path , Pattern pattern , CeylonDocToolTest . GrepAsserter asserter ) throws IOException { } protected void assertMatchInFile ( File destDir , String path , Pattern pattern ) throws IOException { } protected void assertNoMatchInFile ( File destDir , String path , Pattern pattern ) throws IOException { } @ Test public void moduleA ( ) throws IOException { } private void assertBy ( File destDir ) throws IOException { } private void assertThrows ( File destDir ) throws IOException { } private void assertSee ( File destDir ) throws IOException { } private void assertIcons ( File destDir ) throws IOException { } private void assertInnerTypesDoc ( File destDir ) throws IOException { } private void assertDeprecated ( File destDir ) throws IOException { } private void assertTagged ( File destDir ) throws IOException { <START_BUG> assertMatchInFile ( destDir , ".resources//index.js" , Pattern . compile ( "var<seq2seq4repair_space>tagIndex<seq2seq4repair_space>=<seq2seq4repair_space>\\[\\n\'stubTag1\'," ) ) ; <END_BUG> assertMatchInFile ( destDir , ".resources//index.js" , Pattern . compile ( "\\{\'name\':<seq2seq4repair_space>\'StubClass\',<seq2seq4repair_space>\'type\':<seq2seq4repair_space>\'class\',<seq2seq4repair_space>\'url\':<seq2seq4repair_space>\'class_StubClass.html\',<seq2seq4repair_space>\'doc\':<seq2seq4repair_space>\'<p>This<seq2seq4repair_space>is<seq2seq4repair_space><code>StubClass<//code><//p>\\\\n\',<seq2seq4repair_space>\'tags\':<seq2seq4repair_space>\\[\'stubTag1\',<seq2seq4repair_space>\'stubTag2\'\\]\\}" ) ) ; assertMatchInFile ( destDir , ".resources//index.js" , Pattern . compile ( "\\{\'name\':<seq2seq4repair_space>\'StubClass.attributeWithTagged\',<seq2seq4repair_space>\'type\':<seq2seq4repair_space>\'value\',<seq2seq4repair_space>\'url\':<seq2seq4repair_space>\'class_StubClass.html#attributeWithTagged\',<seq2seq4repair_space>\'doc\':<seq2seq4repair_space>\'<p>The<seq2seq4repair_space>stub<seq2seq4repair_space>attribute<seq2seq4repair_space>with<seq2seq4repair_space><code>tagged<//code>.<//p>\\\\n\',<seq2seq4repair_space>\'tags\':<seq2seq4repair_space>\\[\'stubTag1\'\\]\\}" ) ) ; assertMatchInFile ( destDir , ".resources//index.js" , Pattern . compile ( "\\{\'name\':<seq2seq4repair_space>\'StubClass.methodWithTagged\',<seq2seq4repair_space>\'type\':<seq2seq4repair_space>\'function\',<seq2seq4repair_space>\'url\':<seq2seq4repair_space>\'class_StubClass.html#methodWithTagged\',<seq2seq4repair_space>\'doc\':<seq2seq4repair_space>\'<p>The<seq2seq4repair_space>stub<seq2seq4repair_space>method<seq2seq4repair_space>with<seq2seq4repair_space><code>tagged<//code><seq2seq4repair_space>.*?<//p>\\\\n\',<seq2seq4repair_space>\'tags\':<seq2seq4repair_space>\\[\'stubTag2\'\\]\\}" ) ) ; assertMatchInFile ( destDir , "class_StubClass.html" , Pattern . compile ( "<div<seq2seq4repair_space>class=\'tags\'><span<seq2seq4repair_space>class=\'tagCaption\'>Tags:<seq2seq4repair_space><//span><a<seq2seq4repair_space>class=\'tagLabel\'<seq2seq4repair_space>name=\'stubTag1\'<seq2seq4repair_space>href=\'search.html\\?q=stubTag1\'>stubTag1<//a><a<seq2seq4repair_space>class=\'tagLabel\'<seq2seq4repair_space>name=\'stubTag2\'<seq2seq4repair_space>href=\'search.html\\?q=stubTag2\'>stubTag2<//a><//div>" ) ) ; assertMatchInFile ( destDir , "class_StubClass.html" , Pattern . compile ( "<div<seq2seq4repair_space>class=\'tags\'><span<seq2seq4repair_space>class=\'tagCaption\'>Tags:<seq2seq4repair_space><//span><a<seq2seq4repair_space>class=\'tagLabel\'<seq2seq4repair_space>name=\'stubTag1\'<seq2seq4repair_space>href=\'search.html\\?q=stubTag1\'>stubTag1<//a><//div><code>attributeWithTagged" ) ) ; assertMatchInFile ( destDir , "class_StubClass.html" , Pattern . compile ( "<div<seq2seq4repair_space>class=\'tags\'><span<seq2seq4repair_space>class=\'tagCaption\'>Tags:<seq2seq4repair_space><//span><a<seq2seq4repair_space>class=\'tagLabel\'<seq2seq4repair_space>name=\'stubTag2\'<seq2seq4repair_space>href=\'search.html\\?q=stubTag2\'>stubTag2<//a><//div><code>methodWithTagged" ) ) ; assertMatchInFile ( destDir , "index.html" , Pattern . compile ( "<div<seq2seq4repair_space>class=\'tags\'><span<seq2seq4repair_space>class=\'tagCaption\'>Tags:<seq2seq4repair_space><//span><a<seq2seq4repair_space>class=\'tagLabel\'<seq2seq4repair_space>name=\'stubTag1a\'<seq2seq4repair_space>href=\'search.html\\?q=stubTag1a\'>stubTag1a<//a><a<seq2seq4repair_space>class=\'tagLabel\'<seq2seq4repair_space>name=\'stubTag1b\'<seq2seq4repair_space>href=\'search.html\\?q=stubTag1b\'>stubTag1b<//a><a<seq2seq4repair_space>class=\'tagLabel\'<seq2seq4repair_space>name=\'stubTagWithVeryLongName<seq2seq4repair_space>...<seq2seq4repair_space>!!!\'<seq2seq4repair_space>href=\'search.html\\?q=stubTagWithVeryLongName<seq2seq4repair_space>...<seq2seq4repair_space>!!!\'>stubTagWithVeryLongName<seq2seq4repair_space>...<seq2seq4repair_space>!!!<//a><//div><div<seq2seq4repair_space>class=\'long\'><div<seq2seq4repair_space>class=\'doc\'><p>This<seq2seq4repair_space>is<seq2seq4repair_space><code>StubInterface<//code><//p>" ) ) ; assertMatchInFile ( destDir , "index.html" , Pattern . compile ( "<div<seq2seq4repair_space>class=\'tags\'><span<seq2seq4repair_space>class=\'tagCaption\'>Tags:<seq2seq4repair_space><//span><a<seq2seq4repair_space>class=\'tagLabel\'<seq2seq4repair_space>name=\'stubTag1\'<seq2seq4repair_space>href=\'search.html\\?q=stubTag1\'>stubTag1<//a><a<seq2seq4repair_space>class=\'tagLabel\'<seq2seq4repair_space>name=\'stubTag2\'<seq2seq4repair_space>href=\'search.html\\?q=stubTag2\'>stubTag2<//a><//div><div<seq2seq4repair_space>class=\'long\'><div<seq2seq4repair_space>class=\'doc\'><p>This<seq2seq4repair_space>is<seq2seq4repair_space><code>StubClass<//code><//p>" ) ) ; } private File getOutputDir ( CeylonDocTool tool , Module module ) { } @ Test public void moduleAWithPrivate ( ) throws IOException { } @ Test public void dependentOnBinaryModule ( ) throws IOException { } private void compile ( String pathname , String moduleName ) throws IOException { } }

Fix:
assertMatchInFile ( destDir , ".resources//index.js" , Pattern . compile ( "var<seq2seq4repair_space>tagIndex<seq2seq4repair_space>=<seq2seq4repair_space>\\[\\n\'stubInnerMethodTag1\'," ) ) ;