Program: 65089
Project: 65089
Buggy source:
/** 
 * Create a <tt>DynamicJAXBContext</tt>, using an EclipseLink OXM file as the metadata source.
 * @param classLoader The application's current class loader, which will be used to first lookup classes to see if they exist before new <tt>DynamicTypes</tt> are generated.  Can be <tt>null</tt>, in which case <tt>Thread.currentThread().getContextClassLoader()</tt> will be used.
 * @param properties Map of properties to use when creating a new <tt>DynamicJAXBContext</tt>.  This map must contain a key of JAXBContext.ECLIPSELINK_OXM_XML_KEY, which can have several possible values: <ul> <li>One of the following, pointing to your OXM file: <tt>java.io.File</tt>, <tt>java.io.InputStream</tt>, <tt>java.io.Reader</tt>, <tt>java.net.URL</tt>,<br> <tt>javax.xml.stream.XMLEventReader</tt>, <tt>javax.xml.stream.XMLStreamReader</tt>, <tt>javax.xml.transform.Source</tt>,<br> <tt>org.w3c.dom.Node</tt>, or <tt>org.xml.sax.InputSource</tt>. <li>A <tt>List</tt> of objects from the set above. <li>A <tt>Map&lt;String, Object&gt;</tt>, where <tt>String</tt> is a package name, and <tt>Object</tt> is the pointer to the OXM file, from the set<br> of possibilities above.  If using this option, a <tt>package-name</tt> element is not required in the <tt>xml-bindings</tt> element of your OXM file. </ul>
 * @return A new instance of <tt>DynamicJAXBContext</tt>.
 * @throws JAXBException if an error was encountered while creating the <tt>DynamicJAXBContext</tt>.
 */
public static DynamicJAXBContext createContextFromOXM(ClassLoader classLoader,Map<String,?> properties) throws JAXBException {
  if (properties == null || properties.get(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY) == null) {
    throw new JAXBException(org.eclipse.persistence.exceptions.JAXBException.oxmKeyNotFound());
  }
  return new DynamicJAXBContext(new MetadataContextInput(properties,classLoader));
}

Fixed version (ground truth):
/** 
 * Create a <tt>DynamicJAXBContext</tt>, using an EclipseLink OXM file as the metadata source.
 * @param classLoader The application's current class loader, which will be used to first lookup classes to see if they exist before new <tt>DynamicTypes</tt> are generated.  Can be <tt>null</tt>, in which case <tt>Thread.currentThread().getContextClassLoader()</tt> will be used.
 * @param properties Map of properties to use when creating a new <tt>DynamicJAXBContext</tt>.  This map must contain a key of JAXBContextProperties.OXM_METADATA_SOURCE, which can have several possible values: <ul> <li>One of the following, pointing to your OXM file: <tt>java.io.File</tt>, <tt>java.io.InputStream</tt>, <tt>java.io.Reader</tt>, <tt>java.net.URL</tt>,<br> <tt>javax.xml.stream.XMLEventReader</tt>, <tt>javax.xml.stream.XMLStreamReader</tt>, <tt>javax.xml.transform.Source</tt>,<br> <tt>org.w3c.dom.Node</tt>, or <tt>org.xml.sax.InputSource</tt>. <li>A <tt>List</tt> of objects from the set above. <li>A <tt>Map&lt;String, Object&gt;</tt>, where <tt>String</tt> is a package name, and <tt>Object</tt> is the pointer to the OXM file, from the set<br> of possibilities above.  If using this option, a <tt>package-name</tt> element is not required in the <tt>xml-bindings</tt> element of your OXM file. </ul>
 * @return A new instance of <tt>DynamicJAXBContext</tt>.
 * @throws JAXBException if an error was encountered while creating the <tt>DynamicJAXBContext</tt>.
 */
public static DynamicJAXBContext createContextFromOXM(ClassLoader classLoader,Map<String,?> properties) throws JAXBException {
  if (properties == null || (properties.get(JAXBContextProperties.OXM_METADATA_SOURCE) == null && properties.get(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY) == null)) {
    throw new JAXBException(org.eclipse.persistence.exceptions.JAXBException.oxmKeyNotFound());
  }
  return new DynamicJAXBContext(new MetadataContextInput(properties,classLoader));
}