Program: 63934
Project: 63934
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());
  properties.put(JAXBContextProperties.OXM_METADATA_SOURCE,metadataLocations);
  properties.put("String_Node_Str",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());
  properties.put(JAXBContextProperties.OXM_METADATA_SOURCE,metadataLocations);
  properties.put(JAXBContextProperties.SESSION_EVENT_LISTENER,new PreLoginMappingAdapter((AbstractSession)session));
  return properties;
}