Buggy code:
public class HTMLLayout extends Layout { static final String TRACE_PREFIX = "<br>&nbsp;&nbsp;&nbsp;&nbsp;" ; public static final String LOCATION_INFO_OPTION = "LocationInfo" ; public static final String TITLE_OPTION = "Title" ; protected static final int BUF_SIZE = 256 ; protected static final int MAX_CAPACITY = 1024 ; private StringBuffer sbuf = new StringBuffer ( HTMLLayout . BUF_SIZE ) ; boolean locationInfo = false ; String title = "Log4J<seq2seq4repair_space>Log<seq2seq4repair_space>Messages" ; public void setLocationInfo ( boolean flag ) { } public boolean getLocationInfo ( ) { } public void setTitle ( String title ) { } public String getTitle ( ) { } public String getContentType ( ) { } public void activateOptions ( ) { } public void format ( Writer output , LoggingEvent event ) throws IOException { output . write ( ( ( ( Layout . LINE_SEP ) + "<tr>" ) + ( Layout . LINE_SEP ) ) ) ; output . write ( "<td>" ) ; <START_BUG> output . write ( Long . toString ( ( ( event . timeStamp ) - ( LoggingEvent . getStartTime ( ) ) ) ) ) ; <END_BUG> output . write ( ( "<//td>" + ( Layout . LINE_SEP ) ) ) ; output . write ( ( ( "<td<seq2seq4repair_space>title=\"" + ( event . getThreadName ( ) ) ) + "<seq2seq4repair_space>thread\">" ) ) ; Transform . escapeTags ( event . getThreadName ( ) , output ) ; output . write ( ( "<//td>" + ( Layout . LINE_SEP ) ) ) ; output . write ( "<td<seq2seq4repair_space>title=\"Level\">" ) ; if ( event . getLevel ( ) . equals ( Level . DEBUG ) ) { output . write ( "<font<seq2seq4repair_space>color=\"#339933\">" ) ; output . write ( event . getLevel ( ) . toString ( ) ) ; output . write ( "<//font>" ) ; } else if ( event . getLevel ( ) . isGreaterOrEqual ( Level . WARN ) ) { output . write ( "<font<seq2seq4repair_space>color=\"#993300\"><strong>" ) ; output . write ( event . getLevel ( ) . toString ( ) ) ; output . write ( "<//strong><//font>" ) ; } else { output . write ( event . getLevel ( ) . toString ( ) ) ; } output . write ( ( "<//td>" + ( Layout . LINE_SEP ) ) ) ; output . write ( ( ( "<td<seq2seq4repair_space>title=\"" + ( event . getLoggerName ( ) ) ) + "<seq2seq4repair_space>category\">" ) ) ; output . write ( event . getLoggerName ( ) ) ; output . write ( ( "<//td>" + ( Layout . LINE_SEP ) ) ) ; if ( locationInfo ) { LocationInfo locInfo = event . getLocationInformation ( ) ; output . write ( "<td>" ) ; Transform . escapeTags ( locInfo . getFileName ( ) , output ) ; output . write ( ':' ) ; output . write ( locInfo . getLineNumber ( ) ) ; output . write ( ( "<//td>" + ( Layout . LINE_SEP ) ) ) ; } output . write ( "<td<seq2seq4repair_space>title=\"Message\">" ) ; Transform . escapeTags ( event . getRenderedMessage ( ) , output ) ; output . write ( ( "<//td>" + ( Layout . LINE_SEP ) ) ) ; output . write ( ( "<//tr>" + ( Layout . LINE_SEP ) ) ) ; if ( ( event . getNDC ( ) ) != null ) { output . write ( "<tr><td<seq2seq4repair_space>bgcolor=\"#EEEEEE\"<seq2seq4repair_space>style=\"font-size<seq2seq4repair_space>:<seq2seq4repair_space>xx-small;\"<seq2seq4repair_space>colspan=\"6\"<seq2seq4repair_space>title=\"Nested<seq2seq4repair_space>Diagnostic<seq2seq4repair_space>Context\">" ) ; Transform . escapeTags ( event . getNDC ( ) , output ) ; output . write ( ( "<//td><//tr>" + ( Layout . LINE_SEP ) ) ) ; } String [ ] s = event . getThrowableStrRep ( ) ; if ( s != null ) { output . write ( "<tr><td<seq2seq4repair_space>bgcolor=\"#993300\"<seq2seq4repair_space>style=\"color:White;<seq2seq4repair_space>font-size<seq2seq4repair_space>:<seq2seq4repair_space>xx-small;\"<seq2seq4repair_space>colspan=\"6\">" ) ; appendThrowableAsHTML ( s , output ) ; output . write ( ( "<//td><//tr>" + ( Layout . LINE_SEP ) ) ) ; } } void appendThrowableAsHTML ( String [ ] s , Writer output ) throws IOException { } public String getHeader ( ) { } public String getFooter ( ) { } public boolean ignoresThrowable ( ) { } }

Fix:
output . write ( Long . toString ( ( ( event . getTimeStamp ( ) ) - ( LoggingEvent . getStartTime ( ) ) ) ) ) ;