Buggy code:
public class HTMLLayout extends Layout { public static final String DEFAULT_CONVERSION_PATTERN = "%m" ; public static final String TTCC_CONVERSION_PATTERN = "%r%t%p%c%x%m" ; static String TRACE_PREFIX = "<br>&nbsp;&nbsp;&nbsp;&nbsp;" ; protected final int BUF_SIZE = 256 ; protected final int MAX_CAPACITY = 1024 ; private String pattern ; private PatternConverter head ; private String timezone ; private String title = "Log4J<seq2seq4repair_space>Log<seq2seq4repair_space>Messages" ; private long counter = 0 ; public HTMLLayout ( ) { } public HTMLLayout ( String pattern ) { } public void setConversionPattern ( String conversionPattern ) { } public String getConversionPattern ( ) { } public void activateOptions ( ) { } protected PatternParser createPatternParser ( String pattern ) { } public void setTitle ( String title ) { } public String getTitle ( ) { } public String getContentType ( ) { } void appendThrowableAsHTML ( String [ ] s , Writer sbuf ) throws IOException { } public String getHeader ( ) { StringBuffer sbuf = new StringBuffer ( ) ; sbuf . append ( "<!DOCTYPE<seq2seq4repair_space>HTML<seq2seq4repair_space>PUBLIC<seq2seq4repair_space>\"-////W3C////DTD<seq2seq4repair_space>HTML<seq2seq4repair_space>4.01<seq2seq4repair_space>Transitional////EN\"" ) ; sbuf . append ( "<seq2seq4repair_space>\"http:////www.w3.org//TR//html4//loose.dtd\">" ) ; sbuf . append ( Layout . LINE_SEP ) ; sbuf . append ( "<html>" ) ; sbuf . append ( Layout . LINE_SEP ) ; sbuf . append ( "<head>" ) ; sbuf . append ( Layout . LINE_SEP ) ; sbuf . append ( ( ( "<title>" + ( title ) ) + "<//title>" ) ) ; sbuf . append ( Layout . LINE_SEP ) ; <START_BUG> sbuf . append ( "<LINK<seq2seq4repair_space>REL=StyleSheet<seq2seq4repair_space>HREF=\"http:////logging.apache.org//log4j//docs//css//default0.css\"<seq2seq4repair_space>TITLE=\"Basic\">" ) ; <END_BUG> sbuf . append ( Layout . LINE_SEP ) ; sbuf . append ( "<//head>" ) ; sbuf . append ( Layout . LINE_SEP ) ; sbuf . append ( "<body>" ) ; sbuf . append ( Layout . LINE_SEP ) ; sbuf . append ( "<hr<seq2seq4repair_space>size=\"1\"<seq2seq4repair_space>noshade>" ) ; sbuf . append ( Layout . LINE_SEP ) ; sbuf . append ( ( ( "Log<seq2seq4repair_space>session<seq2seq4repair_space>start<seq2seq4repair_space>time<seq2seq4repair_space>" + ( new Date ( ) ) ) + "<br>" ) ) ; sbuf . append ( Layout . LINE_SEP ) ; sbuf . append ( "<br>" ) ; sbuf . append ( Layout . LINE_SEP ) ; sbuf . append ( "<table<seq2seq4repair_space>cellspacing=\"0\"<seq2seq4repair_space>width=\"80%\"<seq2seq4repair_space>>" ) ; sbuf . append ( Layout . LINE_SEP ) ; sbuf . append ( "<tr<seq2seq4repair_space>class=\"header\">" ) ; sbuf . append ( Layout . LINE_SEP ) ; PatternConverter c = head ; while ( c != null ) { sbuf . append ( "<td<seq2seq4repair_space>class=\"" ) ; sbuf . append ( c . getName ( ) . toLowerCase ( ) ) ; sbuf . append ( "\">" ) ; sbuf . append ( c . getName ( ) ) ; sbuf . append ( "<//td>" ) ; sbuf . append ( Layout . LINE_SEP ) ; c = c . next ; } sbuf . append ( "<//tr>" ) ; sbuf . append ( Layout . LINE_SEP ) ; return sbuf . toString ( ) ; } public String getFooter ( ) { } public boolean ignoresThrowable ( ) { } public void format ( Writer output , LoggingEvent event ) throws IOException { } }

Fix:
sbuf . append ( "<LINK<seq2seq4repair_space>REL=StyleSheet<seq2seq4repair_space>HREF=\"http:////logging.apache.org//log4j//docs//css//eventTable-1.0.css\"<seq2seq4repair_space>TITLE=\"Basic\">" ) ;