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 String format ( LoggingEvent event ) { if ( ( sbuf . capacity ( ) ) > ( HTMLLayout . MAX_CAPACITY ) ) { sbuf = new StringBuffer ( HTMLLayout . BUF_SIZE ) ; } else { sbuf . setLength ( 0 ) ; } sbuf . append ( ( ( ( Layout . LINE_SEP ) + "<tr>" ) + ( Layout . LINE_SEP ) ) ) ; sbuf . append ( "<td>" ) ; <START_BUG> sbuf . append ( ( ( event . timeStamp ) - ( event . getStartTime ( ) ) ) ) ; <END_BUG> sbuf . append ( ( "<//td>" + ( Layout . LINE_SEP ) ) ) ; sbuf . append ( ( ( "<td<seq2seq4repair_space>title=\"" + ( event . getThreadName ( ) ) ) + "<seq2seq4repair_space>thread\">" ) ) ; sbuf . append ( Transform . escapeTags ( event . getThreadName ( ) ) ) ; sbuf . append ( ( "<//td>" + ( Layout . LINE_SEP ) ) ) ; sbuf . append ( "<td<seq2seq4repair_space>title=\"Level\">" ) ; if ( event . getLevel ( ) . equals ( Level . DEBUG ) ) { sbuf . append ( "<font<seq2seq4repair_space>color=\"#339933\">" ) ; sbuf . append ( event . getLevel ( ) ) ; sbuf . append ( "<//font>" ) ; } else if ( event . getLevel ( ) . isGreaterOrEqual ( Level . WARN ) ) { sbuf . append ( "<font<seq2seq4repair_space>color=\"#993300\"><strong>" ) ; sbuf . append ( event . getLevel ( ) ) ; sbuf . append ( "<//strong><//font>" ) ; } else { sbuf . append ( event . getLevel ( ) ) ; } sbuf . append ( ( "<//td>" + ( Layout . LINE_SEP ) ) ) ; sbuf . append ( ( ( "<td<seq2seq4repair_space>title=\"" + ( event . getLoggerName ( ) ) ) + "<seq2seq4repair_space>category\">" ) ) ; sbuf . append ( Transform . escapeTags ( event . getLoggerName ( ) ) ) ; sbuf . append ( ( "<//td>" + ( Layout . LINE_SEP ) ) ) ; if ( locationInfo ) { LocationInfo locInfo = event . getLocationInformation ( ) ; sbuf . append ( "<td>" ) ; sbuf . append ( Transform . escapeTags ( locInfo . getFileName ( ) ) ) ; sbuf . append ( ':' ) ; sbuf . append ( locInfo . getLineNumber ( ) ) ; sbuf . append ( ( "<//td>" + ( Layout . LINE_SEP ) ) ) ; } sbuf . append ( "<td<seq2seq4repair_space>title=\"Message\">" ) ; sbuf . append ( Transform . escapeTags ( event . getRenderedMessage ( ) ) ) ; sbuf . append ( ( "<//td>" + ( Layout . LINE_SEP ) ) ) ; sbuf . append ( ( "<//tr>" + ( Layout . LINE_SEP ) ) ) ; if ( ( event . getNDC ( ) ) != null ) { sbuf . append ( "<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\">" ) ; sbuf . append ( ( "NDC:<seq2seq4repair_space>" + ( Transform . escapeTags ( event . getNDC ( ) ) ) ) ) ; sbuf . append ( ( "<//td><//tr>" + ( Layout . LINE_SEP ) ) ) ; } String [ ] s = event . getThrowableStrRep ( ) ; if ( s != null ) { sbuf . append ( "<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 , sbuf ) ; sbuf . append ( ( "<//td><//tr>" + ( Layout . LINE_SEP ) ) ) ; } return sbuf . toString ( ) ; } void appendThrowableAsHTML ( String [ ] s , StringBuffer sbuf ) { } public String getHeader ( ) { } public String getFooter ( ) { } public boolean ignoresThrowable ( ) { } }

Fix:
sbuf . append ( ( ( event . timeStamp ) - ( LoggingEvent . getStartTime ( ) ) ) ) ;