Program: 64109
Project: 64109
Buggy source:
protected void addMapping(Descriptor descriptor,DatabaseMapping mapping){
  String target=null;
  if (mapping.isCollectionMapping()) {
    if (mapping.isEISMapping()) {
      EISCompositeCollectionMapping collectionMapping=(EISCompositeCollectionMapping)mapping;
      String collectionType=mapping.getContainerPolicy().getContainerClass().getSimpleName();
      if (collectionMapping.getContainerPolicy().isMapPolicy()) {
        String mapKeyType=((MapContainerPolicy)collectionMapping.getContainerPolicy()).getKeyType().toString();
        target=collectionType + "String_Node_Str" + mapKeyType+ "String_Node_Str"+ collectionMapping.getReferenceClass().getSimpleName()+ "String_Node_Str";
      }
 else {
        target=collectionType + "String_Node_Str" + collectionMapping.getReferenceClass().getSimpleName()+ "String_Node_Str";
      }
    }
 else {
      CollectionMapping collectionMapping=(CollectionMapping)mapping;
      String collectionType=collectionMapping.getContainerPolicy().getContainerClassName();
      if (collectionMapping.getContainerPolicy().isMapPolicy()) {
        String mapKeyType=((MapContainerPolicy)collectionMapping.getContainerPolicy()).getKeyType().toString();
        target=collectionType + "String_Node_Str" + mapKeyType+ "String_Node_Str"+ collectionMapping.getReferenceClass().getSimpleName()+ "String_Node_Str";
      }
 else {
        target=collectionType + "String_Node_Str" + collectionMapping.getReferenceClass().getSimpleName()+ "String_Node_Str";
      }
    }
  }
 else   if (mapping.isForeignReferenceMapping()) {
    target=((ForeignReferenceMapping)mapping).getReferenceClass().getSimpleName();
  }
 else {
    target=mapping.getAttributeClassification().getSimpleName();
  }
  descriptor.getAttributes().add(new Attribute(mapping.getAttributeName(),target));
}

Fixed version (ground truth):
protected void addMapping(Descriptor descriptor,DatabaseMapping mapping){
  String target=null;
  String collectionName=null;
  if (mapping.isCollectionMapping()) {
    if (mapping.isEISMapping()) {
      EISCompositeCollectionMapping collectionMapping=(EISCompositeCollectionMapping)mapping;
      String collectionType=mapping.getContainerPolicy().getContainerClass().getSimpleName();
      if (collectionMapping.getReferenceClass() != null) {
        collectionName=collectionMapping.getReferenceClass().getSimpleName();
      }
      if ((collectionName == null) && (collectionMapping.getAttributeClassification() != null)) {
        collectionName=collectionMapping.getAttributeClassification().getSimpleName();
      }
      if (collectionMapping.getContainerPolicy().isMapPolicy()) {
        String mapKeyType=((MapContainerPolicy)collectionMapping.getContainerPolicy()).getKeyType().toString();
        target=collectionType + "String_Node_Str" + mapKeyType+ "String_Node_Str"+ collectionName+ "String_Node_Str";
      }
 else {
        target=collectionType + "String_Node_Str" + collectionName+ "String_Node_Str";
      }
    }
 else {
      CollectionMapping collectionMapping=(CollectionMapping)mapping;
      String collectionType=collectionMapping.getContainerPolicy().getContainerClass().getSimpleName();
      if (collectionMapping.getReferenceClass() != null) {
        collectionName=collectionMapping.getReferenceClass().getSimpleName();
      }
      if ((collectionName == null) && (collectionMapping.getAttributeClassification() != null)) {
        collectionName=collectionMapping.getAttributeClassification().getSimpleName();
      }
      if (collectionMapping.getContainerPolicy().isMapPolicy()) {
        String mapKeyType=((MapContainerPolicy)collectionMapping.getContainerPolicy()).getKeyType().toString();
        target=collectionType + "String_Node_Str" + mapKeyType+ "String_Node_Str"+ collectionName+ "String_Node_Str";
      }
 else {
        target=collectionType + "String_Node_Str" + collectionName+ "String_Node_Str";
      }
    }
  }
 else   if (mapping.isForeignReferenceMapping()) {
    target=((ForeignReferenceMapping)mapping).getReferenceClass().getSimpleName();
  }
 else {
    target=mapping.getAttributeClassification().getSimpleName();
  }
  descriptor.getAttributes().add(new Attribute(mapping.getAttributeName(),target));
}