Program: 132308
Project: 132308
Buggy source:
@Test public void testShutdownAfterCheckpoint() throws Exception {
  database=BabuDBFactory.createBabuDB(new BabuDBConfig(baseDir,baseDir,1,0,0,SyncMode.SYNC_WRITE,0,0,compression,maxNumRecs,maxBlockFileSize));
  Database db=database.getDatabaseManager().createDatabase("String_Node_Str",2);
  db.singleInsert(0,"String_Node_Str".getBytes(),"String_Node_Str".getBytes(),null).get();
  byte[] result=db.lookup(0,"String_Node_Str".getBytes(),null).get();
  String value=new String(result);
  assertEquals(value,"String_Node_Str");
  db.singleInsert(0,"String_Node_Str".getBytes(),"String_Node_Str".getBytes(),null).get();
  result=db.lookup(0,"String_Node_Str".getBytes(),null).get();
  value=new String(result);
  assertEquals(value,"String_Node_Str");
  db.singleInsert(0,"String_Node_Str".getBytes(),"String_Node_Str".getBytes(),null).get();
  result=db.lookup(0,"String_Node_Str".getBytes(),null).get();
  value=new String(result);
  assertEquals(value,"String_Node_Str");
  database.getCheckpointer().checkpoint();
  database.shutdown();
  database=BabuDBFactory.createBabuDB(new BabuDBConfig(baseDir,baseDir,2,0,0,SyncMode.SYNC_WRITE,0,0,compression,maxNumRecs,maxBlockFileSize));
  db=database.getDatabaseManager().getDatabase("String_Node_Str");
  result=db.lookup(0,"String_Node_Str".getBytes(),null).get();
  assertNotNull(result);
  value=new String(result);
  assertEquals(value,"String_Node_Str");
  result=db.lookup(0,"String_Node_Str".getBytes(),null).get();
  assertNotNull(result);
  value=new String(result);
  assertEquals(value,"String_Node_Str");
  result=db.lookup(0,"String_Node_Str".getBytes(),null).get();
  assertNotNull(result);
  value=new String(result);
  assertEquals(value,"String_Node_Str");
  System.out.println("String_Node_Str");
  database.shutdown();
}

Fixed version (ground truth):
@Test public void testShutdownAfterCheckpoint() throws Exception {
  database=BabuDBFactory.createBabuDB(new BabuDBConfig(baseDir,baseDir,1,0,0,SyncMode.SYNC_WRITE,0,0,compression,maxNumRecs,maxBlockFileSize,true,0,Logging.LEVEL_DEBUG));
  Database db=database.getDatabaseManager().createDatabase("String_Node_Str",2);
  db.singleInsert(0,"String_Node_Str".getBytes(),"String_Node_Str".getBytes(),null).get();
  byte[] result=db.lookup(0,"String_Node_Str".getBytes(),null).get();
  String value=new String(result);
  assertEquals(value,"String_Node_Str");
  db.singleInsert(0,"String_Node_Str".getBytes(),"String_Node_Str".getBytes(),null).get();
  result=db.lookup(0,"String_Node_Str".getBytes(),null).get();
  value=new String(result);
  assertEquals(value,"String_Node_Str");
  db.singleInsert(0,"String_Node_Str".getBytes(),"String_Node_Str".getBytes(),null).get();
  result=db.lookup(0,"String_Node_Str".getBytes(),null).get();
  value=new String(result);
  assertEquals(value,"String_Node_Str");
  database.getCheckpointer().checkpoint();
  database.shutdown();
  database=BabuDBFactory.createBabuDB(new BabuDBConfig(baseDir,baseDir,2,0,0,SyncMode.SYNC_WRITE,0,0,compression,maxNumRecs,maxBlockFileSize));
  db=database.getDatabaseManager().getDatabase("String_Node_Str");
  result=db.lookup(0,"String_Node_Str".getBytes(),null).get();
  assertNotNull(result);
  value=new String(result);
  assertEquals(value,"String_Node_Str");
  result=db.lookup(0,"String_Node_Str".getBytes(),null).get();
  assertNotNull(result);
  value=new String(result);
  assertEquals(value,"String_Node_Str");
  result=db.lookup(0,"String_Node_Str".getBytes(),null).get();
  assertNotNull(result);
  value=new String(result);
  assertEquals(value,"String_Node_Str");
  System.out.println("String_Node_Str");
  database.shutdown();
}