Program: 63845
Project: 63845
Buggy source:
/** 
 * Build the set of properties used to create the JAXBContext based on the EntityManagerFactory that this PersistenceContext wraps
 * @param persistenceUnitName
 * @param session
 * @return
 * @throws IOException
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) protected Map<String,Object> createJAXBProperties(AbstractSession session) throws IOException {
  Map<String,Object> properties=new HashMap<String,Object>(1);
  List<Object> metadataLocations=new ArrayList<Object>();
  addDynamicXMLMetadataSources(metadataLocations,session);
  String oxmLocation=(String)emf.getProperties().get("String_Node_Str");
  if (oxmLocation != null) {
    metadataLocations.add(oxmLocation);
  }
  Object passedOXMLocations=emf.getProperties().get(JAXBContextProperties.OXM_METADATA_SOURCE);
  if (passedOXMLocations != null) {
    if (passedOXMLocations instanceof Collection) {
      metadataLocations.addAll((Collection)passedOXMLocations);
    }
 else {
      metadataLocations.add(passedOXMLocations);
    }
  }
  metadataLocations.add(new LinkMetadataSource());
  metadataLocations.add(new ReportQueryResultListMetadataSource());
  metadataLocations.add(new ReportQueryResultListItemMetadataSource());
  metadataLocations.add(new SingleResultQueryListMetadataSource());
  metadataLocations.add(new SimpleHomogeneousListMetadataSource());
  metadataLocations.add(new ReportQueryResultCollectionMetadataSource());
  metadataLocations.add(new ReadAllQueryResultCollectionMetadataSource());
  metadataLocations.add(new JavaLangMetadataSource());
  metadataLocations.add(new JavaMathMetadataSource());
  metadataLocations.add(new JavaUtilMetadataSource());
  metadataLocations.add(new LinkV2MetadataSource());
  metadataLocations.add(new ItemLinksMetadataSource());
  properties.put(JAXBContextProperties.OXM_METADATA_SOURCE,metadataLocations);
  properties.put(JAXBContextProperties.SESSION_EVENT_LISTENER,new PreLoginMappingAdapter((AbstractSession)session));
  return properties;
}

Fixed version (ground truth):
/** 
 * Build the set of properties used to create the JAXBContext based on the EntityManagerFactory that this PersistenceContext wraps
 * @param persistenceUnitName
 * @param session
 * @return
 * @throws IOException
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) protected Map<String,Object> createJAXBProperties(AbstractSession session) throws IOException {
  Map<String,Object> properties=new HashMap<String,Object>(1);
  List<Object> metadataLocations=new ArrayList<Object>();
  addDynamicXMLMetadataSources(metadataLocations,session);
  String oxmLocation=(String)emf.getProperties().get("String_Node_Str");
  if (oxmLocation != null) {
    metadataLocations.add(oxmLocation);
  }
  Object passedOXMLocations=emf.getProperties().get(JAXBContextProperties.OXM_METADATA_SOURCE);
  if (passedOXMLocations != null) {
    if (passedOXMLocations instanceof Collection) {
      metadataLocations.addAll((Collection)passedOXMLocations);
    }
 else {
      metadataLocations.add(passedOXMLocations);
    }
  }
  metadataLocations.add(new LinkMetadataSource());
  metadataLocations.add(new ReportQueryResultListMetadataSource());
  metadataLocations.add(new ReportQueryResultListItemMetadataSource());
  metadataLocations.add(new SingleResultQueryListMetadataSource());
  metadataLocations.add(new SimpleHomogeneousListMetadataSource());
  metadataLocations.add(new ReportQueryResultCollectionMetadataSource());
  metadataLocations.add(new ReadAllQueryResultCollectionMetadataSource());
  metadataLocations.add(new JavaLangMetadataSource());
  metadataLocations.add(new JavaMathMetadataSource());
  metadataLocations.add(new JavaUtilMetadataSource());
  metadataLocations.add(new LinkV2MetadataSource());
  metadataLocations.add(new ItemLinksMetadataSource());
  metadataLocations.add(new ErrorResponseMetadataSource());
  properties.put(JAXBContextProperties.OXM_METADATA_SOURCE,metadataLocations);
  properties.put(JAXBContextProperties.SESSION_EVENT_LISTENER,new PreLoginMappingAdapter((AbstractSession)session));
  return properties;
}