Program: 48142
Project: 48142
Buggy source:
@Test public void testDIDGet() throws ParserConfigurationException {
  CardApplicationPath cardApplicationPath=new CardApplicationPath();
  CardApplicationPathType cardApplicationPathType=new CardApplicationPathType();
  cardApplicationPathType.setCardApplication(cardApplication);
  cardApplicationPath.setCardAppPathRequest(cardApplicationPathType);
  CardApplicationPathResponse cardApplicationPathResponse=instance.cardApplicationPath(cardApplicationPath);
  CardApplicationConnect parameters=new CardApplicationConnect();
  CardAppPathResultSet cardAppPathResultSet=cardApplicationPathResponse.getCardAppPathResultSet();
  parameters.setCardApplicationPath(cardAppPathResultSet.getCardApplicationPathResult().get(0));
  CardApplicationConnectResponse result=instance.cardApplicationConnect(parameters);
  assertEquals(ECardConstants.Major.OK,result.getResult().getResultMajor());
  DIDList didList=new DIDList();
  didList.setConnectionHandle(result.getConnectionHandle());
  DIDQualifierType didQualifier=new DIDQualifierType();
  didQualifier.setApplicationIdentifier(cardApplication);
  didQualifier.setObjectIdentifier(ECardConstants.Protocol.GENERIC_CRYPTO);
  didQualifier.setApplicationFunction("String_Node_Str");
  didList.setFilter(didQualifier);
  DIDListResponse didListResponse=instance.didList(didList);
  assertTrue(didListResponse.getDIDNameList().getDIDName().size() > 0);
  DIDGet didGet=new DIDGet();
  didGet.setConnectionHandle(result.getConnectionHandle());
  didGet.setDIDName(didListResponse.getDIDNameList().getDIDName().get(0));
  didGet.setDIDScope(DIDScopeType.LOCAL);
  DIDGetResponse didGetResponse=instance.didGet(didGet);
  assertEquals(ECardConstants.Major.OK,didGetResponse.getResult().getResultMajor());
  org.openecard.common.sal.anytype.CryptoMarkerType cryptoMarker=new org.openecard.common.sal.anytype.CryptoMarkerType((CryptoMarkerType)didGetResponse.getDIDStructure().getDIDMarker());
  assertEquals(cryptoMarker.getCertificateRef().getDataSetName(),"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testDIDGet() throws ParserConfigurationException {
  CardApplicationPath cardApplicationPath=new CardApplicationPath();
  CardApplicationPathType cardApplicationPathType=new CardApplicationPathType();
  cardApplicationPathType.setCardApplication(cardApplication);
  cardApplicationPath.setCardAppPathRequest(cardApplicationPathType);
  CardApplicationPathResponse cardApplicationPathResponse=instance.cardApplicationPath(cardApplicationPath);
  CardApplicationConnect parameters=new CardApplicationConnect();
  CardAppPathResultSet cardAppPathResultSet=cardApplicationPathResponse.getCardAppPathResultSet();
  parameters.setCardApplicationPath(cardAppPathResultSet.getCardApplicationPathResult().get(0));
  CardApplicationConnectResponse result=instance.cardApplicationConnect(parameters);
  assertEquals(ECardConstants.Major.OK,result.getResult().getResultMajor());
  DIDList didList=new DIDList();
  didList.setConnectionHandle(result.getConnectionHandle());
  DIDQualifierType didQualifier=new DIDQualifierType();
  didQualifier.setApplicationIdentifier(cardApplication);
  didQualifier.setObjectIdentifier(ECardConstants.Protocol.GENERIC_CRYPTO);
  didQualifier.setApplicationFunction("String_Node_Str");
  didList.setFilter(didQualifier);
  DIDListResponse didListResponse=instance.didList(didList);
  assertTrue(didListResponse.getDIDNameList().getDIDName().size() > 0);
  DIDGet didGet=new DIDGet();
  didGet.setConnectionHandle(result.getConnectionHandle());
  didGet.setDIDName(didListResponse.getDIDNameList().getDIDName().get(0));
  didGet.setDIDScope(DIDScopeType.LOCAL);
  DIDGetResponse didGetResponse=instance.didGet(didGet);
  assertEquals(ECardConstants.Major.OK,didGetResponse.getResult().getResultMajor());
  org.openecard.crypto.common.sal.CryptoMarkerType cryptoMarker=new org.openecard.crypto.common.sal.CryptoMarkerType((CryptoMarkerType)didGetResponse.getDIDStructure().getDIDMarker());
  assertEquals(cryptoMarker.getCertificateRefs().get(0).getDataSetName(),"String_Node_Str");
}