Program: 41710
Project: 41710
Buggy source:
private void receivedMessageWithCorrelationIdTestImpl(Object correlationIdForAmqpMessageClass,boolean appSpecific) 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);
    Queue queue=session.createQueue("String_Node_Str");
    PropertiesDescribedType props=new PropertiesDescribedType();
    DescribedType amqpValueNullContent=new AmqpValueDescribedType(null);
    MessageAnnotationsDescribedType ann=null;
    props.setMessageId("String_Node_Str");
    props.setCorrelationId(correlationIdForAmqpMessageClass);
    if (appSpecific) {
      ann=new MessageAnnotationsDescribedType();
      ann.setSymbolKeyedAnnotation(AmqpMessageSupport.JMS_APP_CORRELATION_ID,true);
    }
    testPeer.expectReceiverAttach();
    testPeer.expectLinkFlowRespondWithTransfer(null,ann,props,null,amqpValueNullContent);
    testPeer.expectDispositionThatIsAcceptedAndSettled();
    MessageConsumer messageConsumer=session.createConsumer(queue);
    Message receivedMessage=messageConsumer.receive(1000);
    testPeer.waitForAllHandlersToComplete(3000);
    assertNotNull(receivedMessage);
    String expectedBaseIdString=new AmqpMessageIdHelper().toBaseMessageIdString(correlationIdForAmqpMessageClass);
    String expected=expectedBaseIdString;
    if (!appSpecific) {
      expected="String_Node_Str" + expected;
    }
    assertEquals(expected,receivedMessage.getJMSCorrelationID());
  }
 }

Fixed version (ground truth):
private void receivedMessageWithCorrelationIdTestImpl(Object correlationIdForAmqpMessageClass,boolean appSpecific) 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);
    Queue queue=session.createQueue("String_Node_Str");
    PropertiesDescribedType props=new PropertiesDescribedType();
    DescribedType amqpValueNullContent=new AmqpValueDescribedType(null);
    MessageAnnotationsDescribedType ann=null;
    props.setMessageId("String_Node_Str");
    props.setCorrelationId(correlationIdForAmqpMessageClass);
    if (appSpecific) {
      ann=new MessageAnnotationsDescribedType();
      ann.setSymbolKeyedAnnotation(AmqpMessageSupport.JMS_APP_CORRELATION_ID,true);
    }
    testPeer.expectReceiverAttach();
    testPeer.expectLinkFlowRespondWithTransfer(null,ann,props,null,amqpValueNullContent);
    testPeer.expectDispositionThatIsAcceptedAndSettled();
    MessageConsumer messageConsumer=session.createConsumer(queue);
    Message receivedMessage=messageConsumer.receive(1000);
    testPeer.waitForAllHandlersToComplete(3000);
    assertNotNull(receivedMessage);
    String expectedBaseIdString=new AmqpMessageIdHelper().toBaseMessageIdString(correlationIdForAmqpMessageClass);
    String expected=expectedBaseIdString;
    if (!appSpecific) {
      expected="String_Node_Str" + expected;
    }
    assertEquals(expected,receivedMessage.getJMSCorrelationID());
  }
 }