Program: 8708
Project: 8708
Buggy source:
@Test public void basicCallbackTest() throws Exception {
  HourDayMonthBucketer hourDayMonthBucketer=new HourDayMonthBucketer();
  Dimension<DateTime> time=new Dimension<DateTime>("String_Node_Str",hourDayMonthBucketer,false,8);
  Dimension<String> zipcode=new Dimension<String>("String_Node_Str",new StringToBytesBucketer(),true,5);
  Rollup hourAndZipRollup=new Rollup(zipcode,time,HourDayMonthBucketer.hours);
  Rollup dayAndZipRollup=new Rollup(zipcode,time,HourDayMonthBucketer.days);
  Rollup hourRollup=new Rollup(time,HourDayMonthBucketer.hours);
  Rollup dayRollup=new Rollup(time,HourDayMonthBucketer.days);
  List<Dimension<?>> dimensions=ImmutableList.<Dimension<?>>of(time,zipcode);
  List<Rollup> rollups=ImmutableList.of(hourAndZipRollup,dayAndZipRollup,hourRollup,dayRollup);
  DataCube<LongOp> dataCube=new DataCube<LongOp>(dimensions,rollups);
  IdService idService=new MapIdService();
  Semaphore s=new Semaphore(1);
  s.acquire();
  HTablePool pool=new HTablePool(getTestUtil().getConfiguration(),Integer.MAX_VALUE);
  DbHarness<LongOp> hbaseDbHarness=new HBaseDbHarness<LongOp>(pool,"String_Node_Str".getBytes(),DATA_CUBE_TABLE,CF,LongOp.DESERIALIZER,idService,DbHarness.CommitType.INCREMENT,new TestCallback(s),1,1,1,"String_Node_Str",1);
  DataCubeIo<LongOp> dataCubeIo=new DataCubeIo<LongOp>(dataCube,hbaseDbHarness,1,100000,SyncLevel.BATCH_SYNC,"String_Node_Str",true);
  dataCubeIo.writeSync(new LongOp(5),new WriteBuilder().at(time,DateTime.now(DateTimeZone.UTC)).at(zipcode,"String_Node_Str"));
  boolean callbackCalled=s.tryAcquire(1,TimeUnit.SECONDS);
  Assert.assertTrue(callbackCalled);
  dataCubeIo.writeAsync(new LongOp(5),new WriteBuilder().at(time,DateTime.now(DateTimeZone.UTC)).at(zipcode,"String_Node_Str"));
  callbackCalled=s.tryAcquire(1,TimeUnit.SECONDS);
  Assert.assertTrue(callbackCalled);
}

Fixed version (ground truth):
@Test public void basicCallbackTest() throws Exception {
  HourDayMonthBucketer hourDayMonthBucketer=new HourDayMonthBucketer();
  Dimension<DateTime> time=new Dimension<DateTime>("String_Node_Str",hourDayMonthBucketer,false,8);
  Dimension<String> zipcode=new Dimension<String>("String_Node_Str",new StringToBytesBucketer(),true,5);
  Rollup hourAndZipRollup=new Rollup(zipcode,time,HourDayMonthBucketer.hours);
  Rollup dayAndZipRollup=new Rollup(zipcode,time,HourDayMonthBucketer.days);
  Rollup hourRollup=new Rollup(time,HourDayMonthBucketer.hours);
  Rollup dayRollup=new Rollup(time,HourDayMonthBucketer.days);
  List<Dimension<?>> dimensions=ImmutableList.<Dimension<?>>of(time,zipcode);
  List<Rollup> rollups=ImmutableList.of(hourAndZipRollup,dayAndZipRollup,hourRollup,dayRollup);
  DataCube<LongOp> dataCube=new DataCube<LongOp>(dimensions,rollups);
  IdService idService=new MapIdService();
  Semaphore s=new Semaphore(1);
  s.acquire();
  HTablePool pool=new HTablePool(getTestUtil().getConfiguration(),Integer.MAX_VALUE);
  DbHarness<LongOp> hbaseDbHarness=new HBaseDbHarness<LongOp>(pool,"String_Node_Str".getBytes(),DATA_CUBE_TABLE,CF,LongOp.DESERIALIZER,idService,DbHarness.CommitType.INCREMENT,new TestCallback(s),1,1,1,"String_Node_Str",this.batchSize);
  DataCubeIo<LongOp> dataCubeIo=new DataCubeIo<LongOp>(dataCube,hbaseDbHarness,1,100000,SyncLevel.BATCH_SYNC,"String_Node_Str",true);
  dataCubeIo.writeSync(new LongOp(5),new WriteBuilder().at(time,DateTime.now(DateTimeZone.UTC)).at(zipcode,"String_Node_Str"));
  boolean callbackCalled=s.tryAcquire(1,TimeUnit.SECONDS);
  Assert.assertTrue(callbackCalled);
  dataCubeIo.writeAsync(new LongOp(5),new WriteBuilder().at(time,DateTime.now(DateTimeZone.UTC)).at(zipcode,"String_Node_Str"));
  callbackCalled=s.tryAcquire(1,TimeUnit.SECONDS);
  Assert.assertTrue(callbackCalled);
}