Program: 166611
Project: 166611
Buggy source:
@Test public void testLogging() throws IOException {
  String theradName="String_Node_Str";
  String loggerName="String_Node_Str";
  long timestamp=System.currentTimeMillis();
  Thread.currentThread().setName(theradName);
  Logger l=LoggerFactory.getLogger(loggerName);
  l.trace("String_Node_Str");
  l.debug("String_Node_Str");
  l.info("String_Node_Str");
  l.warn("String_Node_Str");
  l.error("String_Node_Str");
  Chronicle reader=new IndexedChronicle(basePath(ChronicleLoggingConfig.TYPE_INDEXED,loggerName));
  ExcerptTailer tailer=reader.createTailer().toStart();
  assertTrue(tailer.nextIndex());
  assertEquals(Chronology.VERSION,tailer.readByte());
  assertEquals(Chronology.TYPE_SLF4J,tailer.readByte());
  assertTrue(timestamp < tailer.readLong());
  assertEquals(ChronologyLogLevel.DEBUG.levelInt,tailer.readInt());
  assertEquals(theradName,tailer.readUTF());
  assertEquals(loggerName,tailer.readUTF());
  assertEquals("String_Node_Str",tailer.readUTF());
  assertTrue(tailer.nextIndex());
  assertEquals(Chronology.VERSION,tailer.readByte());
  assertEquals(Chronology.TYPE_SLF4J,tailer.readByte());
  assertTrue(timestamp < tailer.readLong());
  assertEquals(ChronologyLogLevel.INFO.levelInt,tailer.readInt());
  assertEquals(theradName,tailer.readUTF());
  assertEquals(loggerName,tailer.readUTF());
  assertEquals("String_Node_Str",tailer.readUTF());
  assertTrue(tailer.nextIndex());
  assertEquals(Chronology.VERSION,tailer.readByte());
  assertEquals(Chronology.TYPE_SLF4J,tailer.readByte());
  assertTrue(timestamp < tailer.readLong());
  assertEquals(ChronologyLogLevel.WARN.levelInt,tailer.readInt());
  assertEquals(theradName,tailer.readUTF());
  assertEquals(loggerName,tailer.readUTF());
  assertEquals("String_Node_Str",tailer.readUTF());
  assertTrue(tailer.nextIndex());
  assertEquals(Chronology.VERSION,tailer.readByte());
  assertEquals(Chronology.TYPE_SLF4J,tailer.readByte());
  assertTrue(timestamp < tailer.readLong());
  assertEquals(ChronologyLogLevel.ERROR.levelInt,tailer.readInt());
  assertEquals(theradName,tailer.readUTF());
  assertEquals(loggerName,tailer.readUTF());
  assertEquals("String_Node_Str",tailer.readUTF());
  assertFalse(tailer.nextIndex());
  tailer.close();
  reader.close();
}

Fixed version (ground truth):
@Test public void testLogging() throws IOException {
  String theradName="String_Node_Str";
  String loggerName="String_Node_Str";
  long timestamp=System.currentTimeMillis();
  Thread.currentThread().setName(theradName);
  Logger l=LoggerFactory.getLogger(loggerName);
  l.trace("String_Node_Str");
  l.debug("String_Node_Str");
  l.info("String_Node_Str");
  l.warn("String_Node_Str");
  l.error("String_Node_Str");
  Chronicle reader=new IndexedChronicle(basePath(ChronicleLoggingConfig.TYPE_INDEXED,loggerName));
  ExcerptTailer tailer=reader.createTailer().toStart();
  assertTrue(tailer.nextIndex());
  assertEquals(Chronology.VERSION,tailer.readByte());
  assertEquals(Chronology.TYPE_SLF4J,tailer.readByte());
  assertTrue(timestamp <= tailer.readLong());
  assertEquals(ChronologyLogLevel.DEBUG.levelInt,tailer.readInt());
  assertEquals(theradName,tailer.readUTF());
  assertEquals(loggerName,tailer.readUTF());
  assertEquals("String_Node_Str",tailer.readUTF());
  assertTrue(tailer.nextIndex());
  assertEquals(Chronology.VERSION,tailer.readByte());
  assertEquals(Chronology.TYPE_SLF4J,tailer.readByte());
  assertTrue(timestamp <= tailer.readLong());
  assertEquals(ChronologyLogLevel.INFO.levelInt,tailer.readInt());
  assertEquals(theradName,tailer.readUTF());
  assertEquals(loggerName,tailer.readUTF());
  assertEquals("String_Node_Str",tailer.readUTF());
  assertTrue(tailer.nextIndex());
  assertEquals(Chronology.VERSION,tailer.readByte());
  assertEquals(Chronology.TYPE_SLF4J,tailer.readByte());
  assertTrue(timestamp <= tailer.readLong());
  assertEquals(ChronologyLogLevel.WARN.levelInt,tailer.readInt());
  assertEquals(theradName,tailer.readUTF());
  assertEquals(loggerName,tailer.readUTF());
  assertEquals("String_Node_Str",tailer.readUTF());
  assertTrue(tailer.nextIndex());
  assertEquals(Chronology.VERSION,tailer.readByte());
  assertEquals(Chronology.TYPE_SLF4J,tailer.readByte());
  assertTrue(timestamp <= tailer.readLong());
  assertEquals(ChronologyLogLevel.ERROR.levelInt,tailer.readInt());
  assertEquals(theradName,tailer.readUTF());
  assertEquals(loggerName,tailer.readUTF());
  assertEquals("String_Node_Str",tailer.readUTF());
  assertFalse(tailer.nextIndex());
  tailer.close();
  reader.close();
}