Program: 21517
Project: 21517
Buggy source:
@Test(timeout=5000) public void retryRecoverableErrors() throws Exception {
  logTestStart();
  String testURI="String_Node_Str";
  BodyQName ref=BodyQName.createWithPrefix(testURI,"String_Node_Str","String_Node_Str");
  session.send(ComposableBody.builder().build());
  StubConnection conn=cm.awaitConnection();
  AbstractBody scr=this.getSessionCreationResponse(conn.getRequest().getBody()).setAttribute(Attributes.REQUESTS,"String_Node_Str").build();
  conn.sendResponse(scr);
  session.drain();
  session.send(ComposableBody.builder().setNamespaceDefinition("String_Node_Str",testURI).setAttribute(ref,"String_Node_Str").build());
  StubConnection conn1=cm.awaitConnection();
  session.send(ComposableBody.builder().setNamespaceDefinition("String_Node_Str",testURI).setAttribute(ref,"String_Node_Str").build());
  StubConnection conn2=cm.awaitConnection();
  String expected2=conn2.getRequest().getBody().toXML();
  conn2.sendResponse(ComposableBody.builder().setNamespaceDefinition("String_Node_Str",testURI).setAttribute(ref,"String_Node_Str").build());
  final ArrayList<String> orderedResends=new ArrayList<String>();
  session.addBOSHClientRequestListener(new BOSHClientRequestListener(){
    public void requestSent(    BOSHMessageEvent event){
synchronized (orderedResends) {
        String actual=event.getBody().toXML();
        orderedResends.add(actual);
        orderedResends.notify();
      }
    }
  }
);
  String expected1=conn1.getRequest().getBody().toXML();
  conn1.sendResponse(ComposableBody.builder().setNamespaceDefinition("String_Node_Str",testURI).setAttribute(Attributes.TYPE,"String_Node_Str").setAttribute(ref,"String_Node_Str").build());
  conn=cm.awaitConnection();
  String actual1=conn.getRequest().getBody().toXML();
  conn.sendResponse(ComposableBody.builder().setNamespaceDefinition("String_Node_Str",testURI).setAttribute(ref,"String_Node_Str").build());
  conn=cm.awaitConnection();
  String actual2=conn.getRequest().getBody().toXML();
  conn.sendResponse(ComposableBody.builder().setNamespaceDefinition("String_Node_Str",testURI).setAttribute(ref,"String_Node_Str").build());
synchronized (orderedResends) {
    while (orderedResends.size() < 2) {
      orderedResends.wait();
    }
  }
  assertEquals(expected1,orderedResends.get(0));
  assertEquals(expected2,orderedResends.get(1));
  if (!(expected1.equals(actual1) && expected2.equals(actual2)) && !(expected1.equals(actual2) && expected2.equals(actual1))) {
    fail("String_Node_Str" + expected1 + "String_Node_Str"+ expected2+ "String_Node_Str"+ actual1+ "String_Node_Str"+ actual2+ "String_Node_Str");
  }
  session.drain();
}

Fixed version (ground truth):
public void retryRecoverableErrors(boolean http10) throws Exception {
  logTestStart();
  String testURI="String_Node_Str";
  BodyQName ref=BodyQName.createWithPrefix(testURI,"String_Node_Str","String_Node_Str");
  session.send(ComposableBody.builder().build());
  StubConnection conn=cm.awaitConnection();
  AbstractBody scr=this.getSessionCreationResponse(conn.getRequest().getBody()).setAttribute(Attributes.REQUESTS,"String_Node_Str").build();
  if (http10)   conn.forceHTTP1();
  conn.sendResponse(scr);
  session.drain();
  session.send(ComposableBody.builder().setNamespaceDefinition("String_Node_Str",testURI).setAttribute(ref,"String_Node_Str").build());
  StubConnection conn1=cm.awaitConnection();
  session.send(ComposableBody.builder().setNamespaceDefinition("String_Node_Str",testURI).setAttribute(ref,"String_Node_Str").build());
  StubConnection conn2=cm.awaitConnection();
  String expected2=conn2.getRequest().getBody().toXML();
  if (http10) {
    conn2.sendResponse(ComposableBody.builder().setNamespaceDefinition("String_Node_Str",testURI).setAttribute(ref,"String_Node_Str").build());
  }
  final ArrayList<String> orderedResends=new ArrayList<String>();
  session.addBOSHClientRequestListener(new BOSHClientRequestListener(){
    public void requestSent(    BOSHMessageEvent event){
synchronized (orderedResends) {
        String actual=event.getBody().toXML();
        orderedResends.add(actual);
        orderedResends.notify();
      }
    }
  }
);
  String expected1=conn1.getRequest().getBody().toXML();
  conn1.sendResponse(ComposableBody.builder().setNamespaceDefinition("String_Node_Str",testURI).setAttribute(Attributes.TYPE,"String_Node_Str").setAttribute(ref,"String_Node_Str").build());
  conn=cm.awaitConnection();
  String actual1=conn.getRequest().getBody().toXML();
  conn.sendResponse(ComposableBody.builder().setNamespaceDefinition("String_Node_Str",testURI).setAttribute(ref,"String_Node_Str").build());
  conn=cm.awaitConnection();
  String actual2=conn.getRequest().getBody().toXML();
  conn.sendResponse(ComposableBody.builder().setNamespaceDefinition("String_Node_Str",testURI).setAttribute(ref,"String_Node_Str").build());
synchronized (orderedResends) {
    while (orderedResends.size() < 2) {
      orderedResends.wait();
    }
  }
  assertEquals(expected1,orderedResends.get(0));
  assertEquals(expected2,orderedResends.get(1));
  if (!(expected1.equals(actual1) && expected2.equals(actual2)) && !(expected1.equals(actual2) && expected2.equals(actual1))) {
    fail("String_Node_Str" + expected1 + "String_Node_Str"+ expected2+ "String_Node_Str"+ actual1+ "String_Node_Str"+ actual2+ "String_Node_Str");
  }
  session.drain();
}