Program: 4536
Project: 4536
Buggy source:
public void testHTTPRequest() throws Exception {
  drain(testUP);
  final byte[] clientGUID=GUID.makeGuid();
  byte[] guid=GUID.makeGuid();
  rs.query(guid,"String_Node_Str");
  Message m=null;
  do {
    m=testUP.receive(TIMEOUT);
  }
 while (!(m instanceof QueryRequest));
  ServerSocket ss=new ServerSocket(7000);
  ss.setReuseAddress(true);
  ss.setSoTimeout(TIMEOUT);
  PushProxyInterface[] proxies=new QueryReply.PushProxyContainer[1];
  proxies[0]=new QueryReply.PushProxyContainer("String_Node_Str",7000);
  Response[] res=new Response[1];
  res[0]=new Response(10,10,"String_Node_Str");
  m=new QueryReply(m.getGUID(),(byte)1,7000,InetAddress.getLocalHost().getAddress(),0,res,clientGUID,new byte[0],false,false,true,true,false,false,null);
  testUP.send(m);
  testUP.flush();
  Thread.sleep(1000);
  assertNotNull(callback.getRFD());
  rs.doAsynchronousBrowseHost(callback.getRFD().getHost(),callback.getRFD().getPort(),new GUID(GUID.makeGuid()),new GUID(clientGUID),null);
  Socket httpSock=ss.accept();
  assertNotNull(httpSock);
  String currLine=null;
  BufferedReader reader=new BufferedReader(new InputStreamReader(httpSock.getInputStream()));
  currLine=reader.readLine();
  assertTrue(currLine.startsWith("String_Node_Str"));
  currLine=reader.readLine();
  assertTrue(currLine.startsWith("String_Node_Str"));
  StringTokenizer st=new StringTokenizer(currLine,"String_Node_Str");
  assertEquals(st.nextToken(),"String_Node_Str");
  InetAddress addr=InetAddress.getByName(st.nextToken().trim());
  Arrays.equals(addr.getAddress(),rs.getAddress());
  assertEquals(Integer.parseInt(st.nextToken()),PORT);
  Thread.sleep(500);
  BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(httpSock.getOutputStream()));
  writer.write("String_Node_Str");
  writer.flush();
  writer.write("String_Node_Str");
  writer.flush();
  httpSock.close();
  try {
    do {
      m=testUP.receive(TIMEOUT);
      assertTrue(!(m instanceof PushRequest));
    }
 while (true);
  }
 catch (  InterruptedIOException expected) {
  }
  ss.close();
}

Fixed version (ground truth):
public void testHTTPRequest() throws Exception {
  drain(testUP);
  final byte[] clientGUID=GUID.makeGuid();
  byte[] guid=GUID.makeGuid();
  RouterService.query(guid,"String_Node_Str");
  Message m=null;
  do {
    m=testUP.receive(TIMEOUT);
  }
 while (!(m instanceof QueryRequest));
  ServerSocket ss=new ServerSocket(7000);
  ss.setReuseAddress(true);
  ss.setSoTimeout(TIMEOUT);
  PushProxyInterface[] proxies=new QueryReply.PushProxyContainer[1];
  proxies[0]=new QueryReply.PushProxyContainer("String_Node_Str",7000);
  Response[] res=new Response[1];
  res[0]=new Response(10,10,"String_Node_Str");
  m=new QueryReply(m.getGUID(),(byte)1,7000,InetAddress.getLocalHost().getAddress(),0,res,clientGUID,new byte[0],false,false,true,true,false,false,null);
  testUP.send(m);
  testUP.flush();
  Thread.sleep(1000);
  assertNotNull(callback.getRFD());
  RouterService.doAsynchronousBrowseHost(callback.getRFD().getHost(),callback.getRFD().getPort(),new GUID(GUID.makeGuid()),new GUID(clientGUID),null);
  Socket httpSock=ss.accept();
  assertNotNull(httpSock);
  String currLine=null;
  BufferedReader reader=new BufferedReader(new InputStreamReader(httpSock.getInputStream()));
  currLine=reader.readLine();
  assertTrue(currLine.startsWith("String_Node_Str"));
  currLine=reader.readLine();
  assertTrue(currLine.startsWith("String_Node_Str"));
  StringTokenizer st=new StringTokenizer(currLine,"String_Node_Str");
  assertEquals(st.nextToken(),"String_Node_Str");
  InetAddress addr=InetAddress.getByName(st.nextToken().trim());
  Arrays.equals(addr.getAddress(),RouterService.getAddress());
  assertEquals(Integer.parseInt(st.nextToken()),SERVER_PORT);
  Thread.sleep(500);
  BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(httpSock.getOutputStream()));
  writer.write("String_Node_Str");
  writer.flush();
  writer.write("String_Node_Str");
  writer.flush();
  httpSock.close();
  try {
    do {
      m=testUP.receive(TIMEOUT);
      assertTrue(!(m instanceof PushRequest));
    }
 while (true);
  }
 catch (  InterruptedIOException expected) {
  }
  ss.close();
}