Program: 41160
Project: 41160
Buggy source:
public void receivedMessageFromQueueWithoutToResultsInUseOfConsumerDestinationImpl(boolean useQueue) throws Exception {
  try (TestAmqpPeer testPeer=new TestAmqpPeer(IntegrationTestFixture.PORT)){
    Connection connection=testFixture.establishConnecton(testPeer);
    connection.start();
    testPeer.expectBegin(true);
    String queueName="String_Node_Str";
    String topicName="String_Node_Str";
    Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
    Destination destination=null;
    if (useQueue) {
      destination=session.createQueue(queueName);
    }
 else {
      destination=session.createTopic(topicName);
    }
    PropertiesDescribedType props=new PropertiesDescribedType();
    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(destination);
    Message receivedMessage=messageConsumer.receive(1000);
    testPeer.waitForAllHandlersToComplete(3000);
    assertNotNull(receivedMessage);
    Destination dest=receivedMessage.getJMSDestination();
    if (useQueue) {
      assertNotNull("String_Node_Str",dest);
      assertTrue("String_Node_Str" + dest.getClass().getName(),dest instanceof Queue);
      assertEquals(queueName,((Queue)dest).getQueueName());
    }
 else {
      assertNotNull("String_Node_Str",dest);
      assertTrue("String_Node_Str" + dest.getClass().getName(),dest instanceof Topic);
      assertEquals(topicName,((Topic)dest).getTopicName());
    }
  }
 }

Fixed version (ground truth):
public void receivedMessageFromQueueWithoutToResultsInUseOfConsumerDestinationImpl(boolean useQueue) throws Exception {
  try (TestAmqpPeer testPeer=new TestAmqpPeer(testFixture.getAvailablePort())){
    Connection connection=testFixture.establishConnecton(testPeer);
    connection.start();
    testPeer.expectBegin(true);
    String queueName="String_Node_Str";
    String topicName="String_Node_Str";
    Session session=connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
    Destination destination=null;
    if (useQueue) {
      destination=session.createQueue(queueName);
    }
 else {
      destination=session.createTopic(topicName);
    }
    PropertiesDescribedType props=new PropertiesDescribedType();
    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(destination);
    Message receivedMessage=messageConsumer.receive(1000);
    testPeer.waitForAllHandlersToComplete(3000);
    assertNotNull(receivedMessage);
    Destination dest=receivedMessage.getJMSDestination();
    if (useQueue) {
      assertNotNull("String_Node_Str",dest);
      assertTrue("String_Node_Str" + dest.getClass().getName(),dest instanceof Queue);
      assertEquals(queueName,((Queue)dest).getQueueName());
    }
 else {
      assertNotNull("String_Node_Str",dest);
      assertTrue("String_Node_Str" + dest.getClass().getName(),dest instanceof Topic);
      assertEquals(topicName,((Topic)dest).getTopicName());
    }
  }
 }