Program: 130755
Project: 130755
Buggy source:
@Test(timeout=3000) public void testDifferentAck() throws Exception {
  String server1=getUniqueHostPort();
  String server2=getUniqueHostPort();
  String server3=getUniqueHostPort();
  TestReceiver receiver1=new TestReceiver(1);
  TestReceiver receiver2=new TestReceiver(1);
  TestReceiver receiver3=new TestReceiver(1);
  NettyTransport transport1=new NettyTransport(server1,receiver1,getDirectory());
  NettyTransport transport2=new NettyTransport(server2,receiver2,getDirectory());
  NettyTransport transport3=new NettyTransport(server3,receiver3,getDirectory());
  PeerHandler ph1=new PeerHandler(server1,transport1,10000);
  PeerHandler ph2=new PeerHandler(server2,transport2,10000);
  PeerHandler ph3=new PeerHandler(server3,transport3,10000);
  ph1.startBroadcastingTask();
  ph2.startBroadcastingTask();
  ph3.startBroadcastingTask();
  List<String> peers=new ArrayList<String>();
  peers.add(server1);
  peers.add(server2);
  peers.add(server3);
  HashMap<String,PeerHandler> quorumSet=new HashMap<String,PeerHandler>();
  quorumSet.put(server1,ph1);
  quorumSet.put(server2,ph2);
  quorumSet.put(server3,ph3);
  ClusterConfiguration cnf=new ClusterConfiguration(Zxid.ZXID_NOT_EXIST,peers,server1);
  AckProcessor ackProcessor=new AckProcessor(quorumSet,cnf,Zxid.ZXID_NOT_EXIST);
  Zxid z1=new Zxid(0,0);
  ackProcessor.processRequest(createAck(server1,new Zxid(0,2)));
  ackProcessor.processRequest(createAck(server2,new Zxid(0,1)));
  ackProcessor.processRequest(createAck(server3,new Zxid(0,0)));
  receiver1.latch.await();
  receiver2.latch.await();
  receiver3.latch.await();
  Assert.assertEquals(new Zxid(0,1),receiver1.committedZxids.get(0));
  Assert.assertEquals(new Zxid(0,1),receiver2.committedZxids.get(0));
  Assert.assertEquals(new Zxid(0,1),receiver3.committedZxids.get(0));
}

Fixed version (ground truth):
@Test(timeout=3000) public void testDifferentAck() throws Exception {
  String server1=getUniqueHostPort();
  String server2=getUniqueHostPort();
  String server3=getUniqueHostPort();
  TestReceiver receiver1=new TestReceiver(1);
  TestReceiver receiver2=new TestReceiver(1);
  TestReceiver receiver3=new TestReceiver(1);
  NettyTransport transport1=new NettyTransport(server1,receiver1,getDirectory());
  NettyTransport transport2=new NettyTransport(server2,receiver2,getDirectory());
  NettyTransport transport3=new NettyTransport(server3,receiver3,getDirectory());
  PeerHandler ph1=new PeerHandler(server1,transport1,10000);
  PeerHandler ph2=new PeerHandler(server2,transport2,10000);
  PeerHandler ph3=new PeerHandler(server3,transport3,10000);
  ph1.startBroadcastingTask();
  ph2.startBroadcastingTask();
  ph3.startBroadcastingTask();
  List<String> peers=new ArrayList<String>();
  peers.add(server1);
  peers.add(server2);
  peers.add(server3);
  HashMap<String,PeerHandler> quorumSet=new HashMap<String,PeerHandler>();
  quorumSet.put(server1,ph1);
  quorumSet.put(server2,ph2);
  quorumSet.put(server3,ph3);
  ClusterConfiguration cnf=new ClusterConfiguration(Zxid.ZXID_NOT_EXIST,peers,server1);
  AckProcessor ackProcessor=new AckProcessor(quorumSet,cnf,Zxid.ZXID_NOT_EXIST);
  Zxid z1=new Zxid(0,0);
  ackProcessor.processRequest(createAck(server1,new Zxid(0,2)));
  ackProcessor.processRequest(createAck(server2,new Zxid(0,1)));
  ackProcessor.processRequest(createAck(server3,new Zxid(0,0)));
  receiver1.latch.await();
  receiver2.latch.await();
  receiver3.latch.await();
  Assert.assertEquals(new Zxid(0,1),receiver1.committedZxids.get(0));
  Assert.assertEquals(new Zxid(0,1),receiver2.committedZxids.get(0));
  Assert.assertEquals(new Zxid(0,1),receiver3.committedZxids.get(0));
  ackProcessor.shutdown();
}