Program: 80243
Project: 80243
Buggy source:
public void testMulticastJoinLeave() throws Exception {
  final Buffer buffer=TestUtils.generateRandomBuffer(128);
  final String groupAddress="String_Node_Str";
  peer1=vertx.createDatagramSocket(null);
  peer2=vertx.createDatagramSocket(InternetProtocolFamily.IPv4);
  peer2.dataHandler(new Handler<DatagramPacket>(){
    @Override public void handle(    DatagramPacket event){
      tu.checkThread();
      tu.azzert(event.data().equals(buffer));
    }
  }
);
  peer2.listen("String_Node_Str",1234,new AsyncResultHandler<DatagramSocket>(){
    @Override public void handle(    AsyncResult<DatagramSocket> event){
      tu.checkThread();
      tu.azzert(event.succeeded());
      peer2.listenMulticastGroup(groupAddress,new AsyncResultHandler<DatagramSocket>(){
        @Override public void handle(        AsyncResult<DatagramSocket> event){
          tu.azzert(event.succeeded());
          peer1.send(buffer,groupAddress,1234,new AsyncResultHandler<DatagramSocket>(){
            @Override public void handle(            AsyncResult<DatagramSocket> event){
              tu.azzert(event.succeeded());
              peer2.unlistenMulticastGroup(groupAddress,new AsyncResultHandler<DatagramSocket>(){
                @Override public void handle(                AsyncResult<DatagramSocket> event){
                  tu.azzert(event.succeeded());
                  final AtomicBoolean received=new AtomicBoolean(false);
                  peer2.dataHandler(new Handler<DatagramPacket>(){
                    @Override public void handle(                    DatagramPacket event){
                      received.set(true);
                    }
                  }
);
                  peer1.send(buffer,groupAddress,1234,new AsyncResultHandler<DatagramSocket>(){
                    @Override public void handle(                    AsyncResult<DatagramSocket> event){
                      tu.azzert(event.succeeded());
                      vertx.setTimer(1000,new Handler<Long>(){
                        @Override public void handle(                        Long event){
                          tu.azzert(!received.get());
                          tu.testComplete();
                        }
                      }
);
                    }
                  }
);
                }
              }
);
            }
          }
);
        }
      }
);
    }
  }
);
}

Fixed version (ground truth):
public void testMulticastJoinLeave() throws Exception {
  final Buffer buffer=TestUtils.generateRandomBuffer(128);
  final String groupAddress="String_Node_Str";
  final String iface=NetworkInterface.getByInetAddress(InetAddress.getByName("String_Node_Str")).getName();
  final AtomicBoolean received=new AtomicBoolean();
  peer1=vertx.createDatagramSocket(InternetProtocolFamily.IPv4);
  peer2=vertx.createDatagramSocket(InternetProtocolFamily.IPv4);
  peer1.setMulticastNetworkInterface(iface);
  peer2.setMulticastNetworkInterface(iface);
  peer1.dataHandler(new Handler<DatagramPacket>(){
    @Override public void handle(    DatagramPacket event){
      tu.checkThread();
      tu.azzert(event.data().equals(buffer));
      received.set(true);
    }
  }
);
  peer1.listen(1234,new Handler<AsyncResult<DatagramSocket>>(){
    @Override public void handle(    AsyncResult<DatagramSocket> event){
      tu.checkThread();
      tu.azzert(event.succeeded());
      peer1.listenMulticastGroup(groupAddress,iface,null,new AsyncResultHandler<DatagramSocket>(){
        @Override public void handle(        AsyncResult<DatagramSocket> event){
          tu.checkThread();
          tu.azzert(event.succeeded());
          peer2.send(buffer,groupAddress,1234,new AsyncResultHandler<DatagramSocket>(){
            @Override public void handle(            AsyncResult<DatagramSocket> event){
              tu.checkThread();
              tu.azzert(event.succeeded());
              vertx.setTimer(1000,new Handler<Long>(){
                @Override public void handle(                Long event){
                  peer1.unlistenMulticastGroup(groupAddress,iface,null,new AsyncResultHandler<DatagramSocket>(){
                    @Override public void handle(                    AsyncResult<DatagramSocket> event){
                      tu.checkThread();
                      tu.azzert(event.succeeded());
                      final AtomicBoolean receivedAfter=new AtomicBoolean();
                      peer1.dataHandler(new Handler<DatagramPacket>(){
                        @Override public void handle(                        DatagramPacket event){
                          tu.checkThread();
                          receivedAfter.set(true);
                        }
                      }
);
                      peer2.send(buffer,groupAddress,1234,new AsyncResultHandler<DatagramSocket>(){
                        @Override public void handle(                        AsyncResult<DatagramSocket> event){
                          tu.checkThread();
                          tu.azzert(event.succeeded());
                          vertx.setTimer(1000,new Handler<Long>(){
                            @Override public void handle(                            Long event){
                              tu.checkThread();
                              tu.azzert(!receivedAfter.get());
                              tu.azzert(received.get());
                              tu.testComplete();
                            }
                          }
);
                        }
                      }
);
                    }
                  }
);
                }
              }
);
            }
          }
);
        }
      }
);
    }
  }
);
}