Program: 41168
Project: 41168
Buggy source:
private void doSendMessageOnConnectionWithPrefixTestImpl(Class<? extends Destination> destType,String destPrefix,String destName,String destAddress,Byte destTypeAnnotationValue) throws Exception {
  try (TestAmqpPeer testPeer=new TestAmqpPeer(IntegrationTestFixture.PORT)){
    Connection connection=null;
    if (destType == Topic.class) {
      connection=testFixture.establishConnecton(testPeer,"String_Node_Str" + destPrefix);
    }
 else     if (destType == Queue.class) {
      connection=testFixture.establishConnecton(testPeer,"String_Node_Str" + destPrefix);
    }
 else {
      connection=testFixture.establishConnecton(testPeer,"String_Node_Str" + destPrefix + "String_Node_Str"+ destPrefix);
    }
    connection.start();
    if (destType == Topic.class) {
      ((JmsConnection)connection).setTopicPrefix(destPrefix);
    }
 else     if (destType == Queue.class) {
      ((JmsConnection)connection).setQueuePrefix(destPrefix);
    }
    testPeer.expectBegin(true);
    Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
    Destination dest=null;
    if (destType == Topic.class) {
      dest=session.createTopic(destName);
    }
 else     if (destType == Queue.class) {
      dest=session.createQueue(destName);
    }
 else     if (destType == TemporaryTopic.class) {
      testPeer.expectTempTopicCreationAttach(destAddress);
      dest=session.createTemporaryTopic();
    }
 else     if (destType == TemporaryQueue.class) {
      testPeer.expectTempQueueCreationAttach(destAddress);
      dest=session.createTemporaryQueue();
    }
    TargetMatcher targetMatcher=new TargetMatcher();
    targetMatcher.withAddress(equalTo(destAddress));
    testPeer.expectSenderAttach(targetMatcher,false,false);
    MessageProducer producer=session.createProducer(dest);
    MessageHeaderSectionMatcher headersMatcher=new MessageHeaderSectionMatcher(true);
    MessageAnnotationsSectionMatcher msgAnnotationsMatcher=new MessageAnnotationsSectionMatcher(true);
    msgAnnotationsMatcher.withEntry(Symbol.valueOf(AmqpDestinationHelper.JMS_DEST_TYPE_MSG_ANNOTATION_SYMBOL_NAME),equalTo(destTypeAnnotationValue));
    msgAnnotationsMatcher.withEntry(Symbol.valueOf(AmqpDestinationHelper.JMS_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL_NAME),equalTo(destTypeAnnotationValue));
    MessagePropertiesSectionMatcher propsMatcher=new MessagePropertiesSectionMatcher(true);
    propsMatcher.withTo(equalTo(destAddress));
    propsMatcher.withReplyTo(equalTo(destAddress));
    TransferPayloadCompositeMatcher messageMatcher=new TransferPayloadCompositeMatcher();
    messageMatcher.setHeadersMatcher(headersMatcher);
    messageMatcher.setMessageAnnotationsMatcher(msgAnnotationsMatcher);
    messageMatcher.setPropertiesMatcher(propsMatcher);
    testPeer.expectTransfer(messageMatcher);
    Message message=session.createMessage();
    message.setJMSReplyTo(dest);
    producer.send(message);
    testPeer.waitForAllHandlersToComplete(2000);
  }
 }

Fixed version (ground truth):
private void doSendMessageOnConnectionWithPrefixTestImpl(Class<? extends Destination> destType,String destPrefix,String destName,String destAddress,Byte destTypeAnnotationValue) throws Exception {
  try (TestAmqpPeer testPeer=new TestAmqpPeer(testFixture.getAvailablePort())){
    Connection connection=null;
    if (destType == Topic.class) {
      connection=testFixture.establishConnecton(testPeer,"String_Node_Str" + destPrefix);
    }
 else     if (destType == Queue.class) {
      connection=testFixture.establishConnecton(testPeer,"String_Node_Str" + destPrefix);
    }
 else {
      connection=testFixture.establishConnecton(testPeer,"String_Node_Str" + destPrefix + "String_Node_Str"+ destPrefix);
    }
    connection.start();
    if (destType == Topic.class) {
      ((JmsConnection)connection).setTopicPrefix(destPrefix);
    }
 else     if (destType == Queue.class) {
      ((JmsConnection)connection).setQueuePrefix(destPrefix);
    }
    testPeer.expectBegin(true);
    Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
    Destination dest=null;
    if (destType == Topic.class) {
      dest=session.createTopic(destName);
    }
 else     if (destType == Queue.class) {
      dest=session.createQueue(destName);
    }
 else     if (destType == TemporaryTopic.class) {
      testPeer.expectTempTopicCreationAttach(destAddress);
      dest=session.createTemporaryTopic();
    }
 else     if (destType == TemporaryQueue.class) {
      testPeer.expectTempQueueCreationAttach(destAddress);
      dest=session.createTemporaryQueue();
    }
    TargetMatcher targetMatcher=new TargetMatcher();
    targetMatcher.withAddress(equalTo(destAddress));
    testPeer.expectSenderAttach(targetMatcher,false,false);
    MessageProducer producer=session.createProducer(dest);
    MessageHeaderSectionMatcher headersMatcher=new MessageHeaderSectionMatcher(true);
    MessageAnnotationsSectionMatcher msgAnnotationsMatcher=new MessageAnnotationsSectionMatcher(true);
    msgAnnotationsMatcher.withEntry(Symbol.valueOf(AmqpDestinationHelper.JMS_DEST_TYPE_MSG_ANNOTATION_SYMBOL_NAME),equalTo(destTypeAnnotationValue));
    msgAnnotationsMatcher.withEntry(Symbol.valueOf(AmqpDestinationHelper.JMS_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL_NAME),equalTo(destTypeAnnotationValue));
    MessagePropertiesSectionMatcher propsMatcher=new MessagePropertiesSectionMatcher(true);
    propsMatcher.withTo(equalTo(destAddress));
    propsMatcher.withReplyTo(equalTo(destAddress));
    TransferPayloadCompositeMatcher messageMatcher=new TransferPayloadCompositeMatcher();
    messageMatcher.setHeadersMatcher(headersMatcher);
    messageMatcher.setMessageAnnotationsMatcher(msgAnnotationsMatcher);
    messageMatcher.setPropertiesMatcher(propsMatcher);
    testPeer.expectTransfer(messageMatcher);
    Message message=session.createMessage();
    message.setJMSReplyTo(dest);
    producer.send(message);
    testPeer.waitForAllHandlersToComplete(2000);
  }
 }