Program: 41703
Project: 41703
Buggy source:
/** 
 * Tests that lack of any destination type annotation value (via either  {@link AmqpDestinationHelper#JMS_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL_NAME}or   {@link AmqpMessageSupport#LEGACY_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL_NAME}) set on a message to indicate type of its 'reply-to' address results in it being classed as the same type as the consumer destination.
 */
@Test(timeout=2000) public void testReceivedMessageFromTopicWithReplyToWithoutTypeAnnotationResultsInUseOfConsumerDestinationType() throws Exception {
  try (TestAmqpPeer testPeer=new TestAmqpPeer(IntegrationTestFixture.PORT)){
    Connection connection=testFixture.establishConnecton(testPeer);
    connection.start();
    testPeer.expectBegin(true);
    Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
    Topic topic=session.createTopic("String_Node_Str");
    String myReplyTopicAddress="String_Node_Str";
    PropertiesDescribedType props=new PropertiesDescribedType();
    props.setReplyTo(myReplyTopicAddress);
    props.setMessageId("String_Node_Str");
    DescribedType amqpValueNullContent=new AmqpValueDescribedType(null);
    testPeer.expectReceiverAttach();
    testPeer.expectLinkFlowRespondWithTransfer(null,null,props,null,amqpValueNullContent);
    testPeer.expectDispositionThatIsAcceptedAndSettled();
    MessageConsumer messageConsumer=session.createConsumer(topic);
    Message receivedMessage=messageConsumer.receive(1000);
    testPeer.waitForAllHandlersToComplete(3000);
    assertNotNull(receivedMessage);
    Destination dest=receivedMessage.getJMSReplyTo();
    assertNotNull("String_Node_Str",dest);
    assertTrue("String_Node_Str" + dest.getClass(),dest instanceof Topic);
    assertEquals(myReplyTopicAddress,((Topic)dest).getTopicName());
  }
 }

Fixed version (ground truth):
/** 
 * Tests that lack of any destination type annotation value (via either  {@link AmqpDestinationHelper#JMS_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL_NAME}or   {@link AmqpMessageSupport#LEGACY_REPLY_TO_TYPE_MSG_ANNOTATION_SYMBOL_NAME}) set on a message to indicate type of its 'reply-to' address results in it being classed as the same type as the consumer destination.
 */
@Test(timeout=2000) public void testReceivedMessageFromTopicWithReplyToWithoutTypeAnnotationResultsInUseOfConsumerDestinationType() throws Exception {
  try (TestAmqpPeer testPeer=new TestAmqpPeer(testFixture.getAvailablePort())){
    Connection connection=testFixture.establishConnecton(testPeer);
    connection.start();
    testPeer.expectBegin(true);
    Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
    Topic topic=session.createTopic("String_Node_Str");
    String myReplyTopicAddress="String_Node_Str";
    PropertiesDescribedType props=new PropertiesDescribedType();
    props.setReplyTo(myReplyTopicAddress);
    props.setMessageId("String_Node_Str");
    DescribedType amqpValueNullContent=new AmqpValueDescribedType(null);
    testPeer.expectReceiverAttach();
    testPeer.expectLinkFlowRespondWithTransfer(null,null,props,null,amqpValueNullContent);
    testPeer.expectDispositionThatIsAcceptedAndSettled();
    MessageConsumer messageConsumer=session.createConsumer(topic);
    Message receivedMessage=messageConsumer.receive(1000);
    testPeer.waitForAllHandlersToComplete(3000);
    assertNotNull(receivedMessage);
    Destination dest=receivedMessage.getJMSReplyTo();
    assertNotNull("String_Node_Str",dest);
    assertTrue("String_Node_Str" + dest.getClass(),dest instanceof Topic);
    assertEquals(myReplyTopicAddress,((Topic)dest).getTopicName());
  }
 }