Program: 48198
Project: 48198
Buggy source:
@Test public void testConversionOfCardInfo() throws Exception {
  WSMarshaller m=new AndroidMarshaller();
  Object o=m.unmarshal(m.str2doc(npaCif));
  if (!(o instanceof CardInfo)) {
    throw new Exception("String_Node_Str");
  }
  CardInfo cardInfo=(CardInfo)o;
  assertEquals("String_Node_Str",cardInfo.getCardType().getObjectIdentifier());
  assertEquals(new byte[]{0x3F,0x00},cardInfo.getApplicationCapabilities().getImplicitlySelectedApplication());
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().size(),3);
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getApplicationName(),"String_Node_Str");
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getRequirementLevel(),BasicRequirementsType.PERSONALIZATION_MANDATORY);
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().size(),40);
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().get(0).getCardApplicationServiceName(),"String_Node_Str");
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().get(0).getAction().getAPIAccessEntryPoint(),APIAccessEntryPointName.INITIALIZE);
  assertTrue(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().get(0).getSecurityCondition().isAlways());
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().get(39).getAction().getAuthorizationServiceAction(),AuthorizationServiceActionName.ACL_MODIFY);
  assertFalse(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().get(39).getSecurityCondition().isNever());
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getDIDInfo().get(0).getRequirementLevel(),BasicRequirementsType.PERSONALIZATION_MANDATORY);
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getDIDInfo().get(0).getDIDACL().getAccessRule().get(0).getCardApplicationServiceName(),"String_Node_Str");
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(1).getDataSetInfo().get(0).getRequirementLevel(),BasicRequirementsType.PERSONALIZATION_MANDATORY);
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(1).getDataSetInfo().get(0).getDataSetACL().getAccessRule().get(0).getCardApplicationServiceName(),"String_Node_Str");
  for (  DataSetInfoType dataSetInfo : cardInfo.getApplicationCapabilities().getCardApplication().get(2).getDataSetInfo()) {
    if (dataSetInfo.getDataSetName().equals("String_Node_Str")) {
      assertEquals(dataSetInfo.getLocalDataSetName().get(0).getLang(),"String_Node_Str");
      assertEquals(dataSetInfo.getLocalDataSetName().get(0).getValue(),"String_Node_Str");
    }
  }
  o=m.unmarshal(m.str2doc(egkCif));
  if (!(o instanceof CardInfo)) {
    throw new Exception("String_Node_Str");
  }
  cardInfo=(CardInfo)o;
  assertEquals("String_Node_Str",cardInfo.getCardType().getObjectIdentifier());
  CardApplicationType cardApplicationESIGN=cardInfo.getApplicationCapabilities().getCardApplication().get(1);
  assertEquals(cardApplicationESIGN.getDIDInfo().get(0).getDifferentialIdentity().getDIDName(),"String_Node_Str");
  assertEquals(cardApplicationESIGN.getDIDInfo().get(0).getDifferentialIdentity().getDIDProtocol(),"String_Node_Str");
  CryptoMarkerType cryptoMarkerType=new CryptoMarkerType(cardApplicationESIGN.getDIDInfo().get(0).getDifferentialIdentity().getDIDMarker().getCryptoMarker());
  assertEquals(cryptoMarkerType.getProtocol(),"String_Node_Str");
  assertEquals(cryptoMarkerType.getAlgorithmInfo().getSupportedOperations().get(0),"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testConversionOfCardInfo() throws Exception {
  WSMarshaller m=new AndroidMarshaller();
  Object o=m.unmarshal(m.str2doc(npaCif));
  if (!(o instanceof CardInfo)) {
    throw new Exception("String_Node_Str");
  }
  CardInfo cardInfo=(CardInfo)o;
  assertEquals("String_Node_Str",cardInfo.getCardType().getObjectIdentifier());
  assertEquals(new byte[]{0x3F,0x00},cardInfo.getApplicationCapabilities().getImplicitlySelectedApplication());
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().size(),3);
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getApplicationName(),"String_Node_Str");
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getRequirementLevel(),BasicRequirementsType.PERSONALIZATION_MANDATORY);
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().size(),40);
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().get(0).getCardApplicationServiceName(),"String_Node_Str");
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().get(0).getAction().getAPIAccessEntryPoint(),APIAccessEntryPointName.INITIALIZE);
  assertTrue(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().get(0).getSecurityCondition().isAlways());
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().get(39).getAction().getAuthorizationServiceAction(),AuthorizationServiceActionName.ACL_MODIFY);
  assertFalse(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getCardApplicationACL().getAccessRule().get(39).getSecurityCondition().isNever());
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getDIDInfo().get(0).getRequirementLevel(),BasicRequirementsType.PERSONALIZATION_MANDATORY);
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(0).getDIDInfo().get(0).getDIDACL().getAccessRule().get(0).getCardApplicationServiceName(),"String_Node_Str");
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(1).getDataSetInfo().get(0).getRequirementLevel(),BasicRequirementsType.PERSONALIZATION_MANDATORY);
  assertEquals(cardInfo.getApplicationCapabilities().getCardApplication().get(1).getDataSetInfo().get(0).getDataSetACL().getAccessRule().get(0).getCardApplicationServiceName(),"String_Node_Str");
  for (  DataSetInfoType dataSetInfo : cardInfo.getApplicationCapabilities().getCardApplication().get(2).getDataSetInfo()) {
    if (dataSetInfo.getDataSetName().equals("String_Node_Str")) {
      assertEquals(dataSetInfo.getLocalDataSetName().get(0).getLang(),"String_Node_Str");
      assertEquals(dataSetInfo.getLocalDataSetName().get(0).getValue(),"String_Node_Str");
    }
  }
  o=m.unmarshal(m.str2doc(egkCif));
  if (!(o instanceof CardInfo)) {
    throw new Exception("String_Node_Str");
  }
  cardInfo=(CardInfo)o;
  assertEquals("String_Node_Str",cardInfo.getCardType().getObjectIdentifier());
  CardApplicationType cardApplicationESIGN=cardInfo.getApplicationCapabilities().getCardApplication().get(2);
  DIDInfoType didInfo=cardApplicationESIGN.getDIDInfo().get(2);
  DifferentialIdentityType differentialIdentity=didInfo.getDifferentialIdentity();
  assertEquals(differentialIdentity.getDIDName(),"String_Node_Str");
  assertEquals(differentialIdentity.getDIDProtocol(),"String_Node_Str");
  CryptoMarkerType cryptoMarkerType=new CryptoMarkerType(differentialIdentity.getDIDMarker().getCryptoMarker());
  assertEquals(cryptoMarkerType.getProtocol(),"String_Node_Str");
  assertEquals(cryptoMarkerType.getAlgorithmInfo().getSupportedOperations().get(0),"String_Node_Str");
}