Program: 4384
Project: 4384
Buggy source:
public void testStartsUDPTransfer() throws Exception {
  PrivilegedAccessor.setValue(RouterService.getAcceptor(),"String_Node_Str",new byte[]{(byte)10,(byte)07,(byte)19,(byte)76});
  drain(testUP[0]);
  drainUDP();
  assertEquals(2,RouterService.getFileManager().getNumFiles());
  QueryRequest query=new QueryRequest(GUID.makeGuid(),(byte)2,0 | QueryRequest.SPECIAL_MINSPEED_MASK | QueryRequest.SPECIAL_FIREWALL_MASK| QueryRequest.SPECIAL_FWTRANS_MASK,"String_Node_Str","String_Node_Str",null,null,null,false,Message.N_UNKNOWN,false,0,false,0);
  testUP[0].send(query);
  testUP[0].flush();
  Message m=null;
  do {
    m=testUP[0].receive(TIMEOUT);
  }
 while (!(m instanceof QueryReply));
  QueryReply reply=(QueryReply)m;
  assertEquals(reply.getIP(),"String_Node_Str",reply.getIP());
  assertTrue(reply.getSupportsFWTransfer());
  assertEquals(UDPConnection.VERSION,reply.getFWTransferVersion());
  assertNotNull(reply.getPushProxies());
  Set proxies=reply.getPushProxies();
  assertEquals(1,proxies.size());
  Iterator iter=proxies.iterator();
  IpPort ppi=(IpPort)iter.next();
  assertEquals(ppi.getPort(),6355);
  assertTrue(ppi.getInetAddress().equals(InetAddress.getLocalHost()));
  ServerSocket ss=new ServerSocket(9000);
  ss.setReuseAddress(true);
  ss.setSoTimeout(TIMEOUT);
  PushRequest pr=new PushRequest(GUID.makeGuid(),(byte)1,RouterService.getMessageRouter()._clientGUID,PushRequest.FW_TRANS_INDEX,InetAddress.getLocalHost().getAddress(),9000);
  testUP[0].send(pr);
  testUP[0].flush();
  while (true) {
    DatagramPacket pack=new DatagramPacket(new byte[1000],1000);
    try {
      UDP_ACCESS.receive(pack);
    }
 catch (    IOException bad) {
      fail("String_Node_Str",bad);
    }
    InputStream in=new ByteArrayInputStream(pack.getData());
    Message syn=Message.read(in);
    if (syn instanceof SynMessage)     break;
  }
  try {
    Socket givSock=ss.accept();
    assertTrue(false);
  }
 catch (  InterruptedIOException expected) {
  }
  ss.close();
}

Fixed version (ground truth):
public void testStartsUDPTransfer() throws Exception {
  PrivilegedAccessor.setValue(RouterService.getAcceptor(),"String_Node_Str",new byte[]{(byte)10,(byte)07,(byte)19,(byte)76});
  drain(testUP[0]);
  drainUDP();
  assertEquals(2,RouterService.getFileManager().getNumFiles());
  QueryRequest query=new QueryRequest(GUID.makeGuid(),(byte)2,0 | QueryRequest.SPECIAL_MINSPEED_MASK | QueryRequest.SPECIAL_FIREWALL_MASK| QueryRequest.SPECIAL_FWTRANS_MASK,"String_Node_Str","String_Node_Str",null,null,null,false,Message.N_UNKNOWN,false,0,false,0);
  testUP[0].send(query);
  testUP[0].flush();
  Message m=null;
  do {
    m=testUP[0].receive(TIMEOUT);
  }
 while (!(m instanceof QueryReply));
  QueryReply reply=(QueryReply)m;
  assertEquals(reply.getIP(),"String_Node_Str",reply.getIP());
  assertTrue(reply.getSupportsFWTransfer());
  assertEquals(UDPConnection.VERSION,reply.getFWTransferVersion());
  assertNotNull(reply.getPushProxies());
  Set proxies=reply.getPushProxies();
  assertEquals(1,proxies.size());
  Iterator iter=proxies.iterator();
  IpPort ppi=(IpPort)iter.next();
  assertEquals(ppi.getPort(),6355);
  assertTrue(ppi.getInetAddress().equals(((Connection)rs.getConnectionManager().getConnections().get(0)).getInetAddress()));
  ServerSocket ss=new ServerSocket(9000);
  ss.setReuseAddress(true);
  ss.setSoTimeout(TIMEOUT);
  PushRequest pr=new PushRequest(GUID.makeGuid(),(byte)1,RouterService.getMessageRouter()._clientGUID,PushRequest.FW_TRANS_INDEX,InetAddress.getLocalHost().getAddress(),9000);
  testUP[0].send(pr);
  testUP[0].flush();
  while (true) {
    DatagramPacket pack=new DatagramPacket(new byte[1000],1000);
    try {
      UDP_ACCESS.receive(pack);
    }
 catch (    IOException bad) {
      fail("String_Node_Str",bad);
    }
    InputStream in=new ByteArrayInputStream(pack.getData());
    Message syn=Message.read(in);
    if (syn instanceof SynMessage)     break;
  }
  try {
    Socket givSock=ss.accept();
    assertTrue(false);
  }
 catch (  InterruptedIOException expected) {
  }
  ss.close();
}