nus-yam/ex-repair huggingface dataset:
Program: 66143
Project: 66143
Buggy source:
public void testXmlSchemaUnqualified() throws Exception {
  ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
  InputStream iStream=classLoader.getResourceAsStream(XMLSCHEMA_UNQUALIFIED);
  if (iStream == null) {
    fail("String_Node_Str" + XMLSCHEMA_UNQUALIFIED + "String_Node_Str");
  }
  Map<String,Object> properties=new HashMap<String,Object>();
  properties.put(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY,iStream);
  jaxbContext=DynamicJAXBContextFactory.createContextFromOXM(classLoader,properties);
  DynamicEntity person=jaxbContext.newDynamicEntity(PACKAGE + "String_Node_Str" + PERSON);
  assertNotNull("String_Node_Str",person);
  person.set("String_Node_Str",456);
  person.set("String_Node_Str","String_Node_Str");
  person.set("String_Node_Str",45000.00);
  Document marshalDoc=DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  jaxbContext.createMarshaller().marshal(person,marshalDoc);
  Node node=marshalDoc.getChildNodes().item(0);
  assertEquals("String_Node_Str","String_Node_Str",node.getNamespaceURI());
  assertNotNull("String_Node_Str",node.getPrefix());
  DocumentBuilderFactory builderFactory=DocumentBuilderFactory.newInstance();
  if (builderFactory.getClass().getPackage().getName().contains("String_Node_Str")) {
    return;
  }
 else {
    Node attr=node.getAttributes().item(0);
    assertNull("String_Node_Str" + attr.getPrefix() + "String_Node_Str",attr.getPrefix());
  }
  Node childNode=node.getChildNodes().item(0);
  assertNull("String_Node_Str",childNode.getPrefix());
}

Fixed version (ground truth):
public void testXmlSchemaUnqualified() throws Exception {
  ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
  InputStream iStream=classLoader.getResourceAsStream(XMLSCHEMA_UNQUALIFIED);
  if (iStream == null) {
    fail("String_Node_Str" + XMLSCHEMA_UNQUALIFIED + "String_Node_Str");
  }
  Map<String,Object> properties=new HashMap<String,Object>();
  properties.put(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY,iStream);
  jaxbContext=DynamicJAXBContextFactory.createContextFromOXM(classLoader,properties);
  DynamicEntity person=jaxbContext.newDynamicEntity(PACKAGE + "String_Node_Str" + PERSON);
  assertNotNull("String_Node_Str",person);
  person.set("String_Node_Str",456);
  person.set("String_Node_Str","String_Node_Str");
  person.set("String_Node_Str",45000.00);
  Document marshalDoc=DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  jaxbContext.createMarshaller().marshal(person,marshalDoc);
  Element element=marshalDoc.getDocumentElement();
  assertEquals("String_Node_Str","String_Node_Str",element.getNamespaceURI());
  assertNotNull("String_Node_Str",element.getPrefix());
  Node attr=element.getAttributeNode("String_Node_Str");
  assertNull("String_Node_Str" + attr.getPrefix() + "String_Node_Str",attr.getPrefix());
  Node childNode=element.getElementsByTagName("String_Node_Str").item(0);
  assertNull("String_Node_Str",childNode.getPrefix());
}
Program: 66144
Project: 66144
Buggy source:
/** 
 * Find PersistenceUnitInfo corresponding to the persistence unit name. Returns null if either persistence unit either not found or provider is not supported.
 */
public SEPersistenceUnitInfo findPersistenceUnitInfo(String puName,Map m,PersistenceInitializationHelper persistenceHelper){
  SEPersistenceUnitInfo persistenceUnitInfo=null;
  if (EntityManagerFactoryProvider.initialPuInfos != null) {
    persistenceUnitInfo=EntityManagerFactoryProvider.initialPuInfos.get(puName);
    if (persistenceUnitInfo != null) {
      return persistenceUnitInfo;
    }
  }
  return findPersistenceUnitInfoInArchives(puName,m,persistenceHelper);
}

Fixed version (ground truth):
/** 
 * Find PersistenceUnitInfo corresponding to the persistence unit name. Returns null if either persistence unit either not found or provider is not supported.
 */
public SEPersistenceUnitInfo findPersistenceUnitInfo(String puName,Map m,PersistenceInitializationHelper persistenceHelper){
  SEPersistenceUnitInfo persistenceUnitInfo=null;
  persistenceUnitInfo=EntityManagerFactoryProvider.initialPuInfos.get(puName);
  if (persistenceUnitInfo != null) {
    return persistenceUnitInfo;
  }
  return findPersistenceUnitInfoInArchives(puName,m,persistenceHelper);
}
Program: 66145
Project: 66145
Buggy source:
/** 
 * This method initializes the container.  Essentially, it will try to load the class that contains the list of entities and reflectively call the method that contains that list.  It will then initialize the container with that list. If succeeded return true, false otherwise.
 */
public void initialize(Map m){
  if (!isInitialized) {
    if (globalInstrumentation != null) {
      usesAgent=true;
      if (this.initializationClassloader == null) {
        this.initializationClassloader=Thread.currentThread().getContextClassLoader();
      }
      EntityManagerFactoryProvider.initialEmSetupImpls=new HashMap<String,EntityManagerSetupImpl>();
      if (keepInitialPuInfos) {
        EntityManagerFactoryProvider.initialPuInfos=new HashMap<String,SEPersistenceUnitInfo>();
      }
      final Set<Archive> pars=PersistenceUnitProcessor.findPersistenceArchives(initializationClassloader);
      try {
        PersistenceInitializationHelper initializationHelper=new PersistenceInitializationHelper();
        for (        Archive archive : pars) {
          AbstractSessionLog.getLog().log(SessionLog.FINER,"String_Node_Str",archive);
          initPersistenceUnits(archive,m,initializationHelper);
        }
      }
  finally {
        for (        Archive archive : pars) {
          archive.close();
        }
      }
      globalInstrumentation=null;
    }
    isInitialized=true;
  }
}

Fixed version (ground truth):
/** 
 * This method initializes the container.  Essentially, it will try to load the class that contains the list of entities and reflectively call the method that contains that list.  It will then initialize the container with that list. If succeeded return true, false otherwise.
 */
public void initialize(Map m){
  if (!isInitialized) {
    if (globalInstrumentation != null) {
      usesAgent=true;
      if (this.initializationClassloader == null) {
        this.initializationClassloader=Thread.currentThread().getContextClassLoader();
      }
      final Set<Archive> pars=PersistenceUnitProcessor.findPersistenceArchives(initializationClassloader);
      try {
        PersistenceInitializationHelper initializationHelper=new PersistenceInitializationHelper();
        for (        Archive archive : pars) {
          AbstractSessionLog.getLog().log(SessionLog.FINER,"String_Node_Str",archive);
          initPersistenceUnits(archive,m,initializationHelper);
        }
      }
  finally {
        for (        Archive archive : pars) {
          archive.close();
        }
      }
      globalInstrumentation=null;
    }
    isInitialized=true;
  }
}
Program: 66147
Project: 66147
Buggy source:
public String getLocalName(int index){
  try {
    Attr item=attrs.get(index);
    if (item.getLocalName() != null) {
      return item.getLocalName();
    }
    return XMLConstants.EMPTY_STRING;
  }
 catch (  IndexOutOfBoundsException iobe) {
    return null;
  }
}

Fixed version (ground truth):
public String getLocalName(int index){
  try {
    Attr item=attrs.get(index);
    if (item.getLocalName() != null) {
      return item.getLocalName();
    }
    return item.getName();
  }
 catch (  IndexOutOfBoundsException iobe) {
    return null;
  }
}
Program: 66149
Project: 66149
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(DateAndTimeTestCases.class);
  suite.addTestSuite(QNameTestCases.class);
  suite.addTestSuite(Base64TestCases.class);
  suite.addTestSuite(ListTestCases.class);
  suite.addTestSuite(DoubleToBigDecimalTestCases.class);
  suite.addTestSuite(XMLGregorianCalendarTestCases.class);
  suite.addTestSuite(NumberTestCases.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(DateAndTimeTestCases.class);
  suite.addTestSuite(QNameTestCases.class);
  suite.addTestSuite(Base64TestCases.class);
  suite.addTestSuite(ListTestCases.class);
  suite.addTestSuite(DoubleToBigDecimalTestCases.class);
  suite.addTestSuite(XMLGregorianCalendarTestCases.class);
  suite.addTestSuite(NumberTestCases.class);
  suite.addTestSuite(BooleanTestCases.class);
  return suite;
}
Program: 66152
Project: 66152
Buggy source:
public CompositeMappingContentHandler(UnmarshalRecord parentRecord,DatabaseMapping aMapping,Attributes atts,AbstractNullPolicy aNullPolicy,XPathFragment aFragment,XMLDescriptor aDescriptor){
  super(parentRecord);
  mapping=aMapping;
  attributes=atts;
  nullPolicy=aNullPolicy;
  xPathFragment=aFragment;
  xmlDescriptor=aDescriptor;
}

Fixed version (ground truth):
public CompositeMappingContentHandler(UnmarshalRecord parentRecord,DatabaseMapping aMapping,Attributes atts,AbstractNullPolicy aNullPolicy,XPathFragment aFragment,XMLDescriptor aDescriptor){
  super(parentRecord);
  mapping=aMapping;
  nullPolicy=aNullPolicy;
  xPathFragment=aFragment;
  xmlDescriptor=aDescriptor;
  try {
    attributes=buildAttributeList(atts);
  }
 catch (  SAXException e) {
  }
}
Program: 66153
Project: 66153
Buggy source:
/** 
 * INTERNAL:
 */
public void attribute(String namespaceURI,String localName,String qName,String value){
  attributes.addAttribute(namespaceURI,localName,qName,XMLConstants.CDATA,value);
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public void attribute(String namespaceURI,String localName,String qName,String value){
  if (namespaceURI == XMLConstants.XMLNS_URL) {
    this.startPrefixMapping(localName,value);
  }
  attributes.addAttribute(namespaceURI,localName,qName,XMLConstants.CDATA,value);
}
Program: 66155
Project: 66155
Buggy source:
/** 
 * Generate mappings for a given TypeInfo.
 * @param info
 * @param descriptor
 * @param namespaceInfo
 */
public void generateMappings(TypeInfo info,XMLDescriptor descriptor,NamespaceInfo namespaceInfo){
  List<Property> propertiesInOrder=info.getNonTransientPropertiesInPropOrder();
  for (int i=0; i < propertiesInOrder.size(); i++) {
    Property next=propertiesInOrder.get(i);
    if (next != null) {
      DatabaseMapping mapping=generateMapping(next,descriptor,namespaceInfo);
      descriptor.addMapping(mapping);
      if (next.isSetUserProperties()) {
        mapping.setProperties(next.getUserProperties());
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Generate mappings for a given TypeInfo.
 * @param info
 * @param descriptor
 * @param namespaceInfo
 */
public void generateMappings(TypeInfo info,XMLDescriptor descriptor,NamespaceInfo namespaceInfo){
  if (info.isAnonymousComplexType()) {
    generateInheritedMappingsForAnonymousType(info,descriptor,namespaceInfo);
  }
  List<Property> propertiesInOrder=info.getNonTransientPropertiesInPropOrder();
  for (int i=0; i < propertiesInOrder.size(); i++) {
    Property next=propertiesInOrder.get(i);
    if (next != null) {
      DatabaseMapping mapping=generateMapping(next,descriptor,namespaceInfo);
      descriptor.addMapping(mapping);
      if (next.isSetUserProperties()) {
        mapping.setProperties(next.getUserProperties());
      }
    }
  }
}
Program: 66160
Project: 66160
Buggy source:
/** 
 * INTERNAL: Convert the attribute value to a field value. Process any converter if defined, and check for null values.
 */
public Object getFieldValue(Object attributeValue,AbstractSession session,XMLRecord record){
  Object fieldValue=attributeValue;
  if ((this.nullValue != null) && (this.nullValue.equals(fieldValue))) {
    return null;
  }
  if (hasConverter()) {
    if (getConverter() instanceof XMLConverter) {
      fieldValue=((XMLConverter)getConverter()).convertObjectValueToDataValue(fieldValue,session,record.getMarshaller());
    }
 else {
      fieldValue=getConverter().convertObjectValueToDataValue(fieldValue,session);
    }
  }
  Class fieldClassification=getFieldClassification(getField());
  if ((fieldValue != null) && (fieldClassification != fieldValue.getClass())) {
    try {
      fieldValue=session.getPlatform(descriptor.getJavaClass()).convertObject(fieldValue,fieldClassification);
    }
 catch (    ConversionException exception) {
      throw ConversionException.couldNotBeConverted(this,descriptor,exception);
    }
  }
  return fieldValue;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Convert the attribute value to a field value. Process any converter if defined, and check for null values.
 */
public Object getFieldValue(Object attributeValue,AbstractSession session,XMLRecord record){
  Object fieldValue=attributeValue;
  if ((this.nullValue != null) && (this.nullValue.equals(fieldValue)) && !((XMLField)getField()).isRequired()) {
    return null;
  }
  if (hasConverter()) {
    if (getConverter() instanceof XMLConverter) {
      fieldValue=((XMLConverter)getConverter()).convertObjectValueToDataValue(fieldValue,session,record.getMarshaller());
    }
 else {
      fieldValue=getConverter().convertObjectValueToDataValue(fieldValue,session);
    }
  }
  Class fieldClassification=getFieldClassification(getField());
  if ((fieldValue != null) && (fieldClassification != fieldValue.getClass())) {
    try {
      fieldValue=session.getPlatform(descriptor.getJavaClass()).convertObject(fieldValue,fieldClassification);
    }
 catch (    ConversionException exception) {
      throw ConversionException.couldNotBeConverted(this,descriptor,exception);
    }
  }
  return fieldValue;
}
Program: 66163
Project: 66163
Buggy source:
/** 
 * @param parentRecord
 * @param aNodeValue
 * @param aNullPolicy
 */
public CompositeObjectMappingContentHandler(UnmarshalRecord parentRecord,XMLCompositeObjectMappingNodeValue aNodeValue,XMLCompositeObjectMapping aMapping,Attributes atts,XPathFragment aFragment,XMLDescriptor aDescriptor){
  super(parentRecord);
  attributes=atts;
  mapping=aMapping;
  nullPolicy=mapping.getNullPolicy();
  nodeValue=aNodeValue;
  xPathFragment=aFragment;
  xmlDescriptor=aDescriptor;
}

Fixed version (ground truth):
public CompositeObjectMappingContentHandler(UnmarshalRecord parentRecord,XMLCompositeObjectMappingNodeValue aNodeValue,XMLCompositeObjectMapping aMapping,Attributes atts,XPathFragment aFragment,XMLDescriptor aDescriptor){
  super(parentRecord,aMapping,atts,aMapping.getNullPolicy(),aFragment,aDescriptor);
  nodeValue=aNodeValue;
}
Program: 66165
Project: 66165
Buggy source:
protected void endPrefixMappings(Element elem) throws SAXException {
  NamedNodeMap attrs=elem.getAttributes();
  for (int i=0, numOfAtts=attrs.getLength(); i < numOfAtts; i++) {
    Attr next=(Attr)attrs.item(i);
    String attrPrefix=next.getPrefix();
    if (attrPrefix != null && attrPrefix.equals(XMLConstants.XMLNS)) {
      contentHandler.endPrefixMapping(next.getLocalName());
    }
 else     if (attrPrefix == null) {
      String name=next.getLocalName();
      if (name == null) {
        name=next.getNodeName();
      }
      if (name != null) {
        contentHandler.endPrefixMapping(XMLConstants.EMPTY_STRING);
      }
    }
  }
}

Fixed version (ground truth):
protected void endPrefixMappings(Element elem) throws SAXException {
  NamedNodeMap attrs=elem.getAttributes();
  for (int i=0, numOfAtts=attrs.getLength(); i < numOfAtts; i++) {
    Attr next=(Attr)attrs.item(i);
    String attrPrefix=next.getPrefix();
    if (attrPrefix != null && attrPrefix.equals(XMLConstants.XMLNS)) {
      contentHandler.endPrefixMapping(next.getLocalName());
    }
 else     if (attrPrefix == null) {
      String name=next.getLocalName();
      if (name == null) {
        name=next.getNodeName();
      }
      if (XMLConstants.XMLNS.equals(name)) {
        contentHandler.endPrefixMapping(XMLConstants.EMPTY_STRING);
      }
    }
  }
}
Program: 66166
Project: 66166
Buggy source:
public void testSubstitutionGroupsUnmarshal() throws Exception {
  try {
    InputStream xsdStream=ClassLoader.getSystemResourceAsStream(SUBSTITUTION);
    jaxbContext=DynamicJAXBContextFactory.createContextFromXSD(xsdStream,null,null,null);
    InputStream xmlStream=ClassLoader.getSystemResourceAsStream(PERSON_XML);
    JAXBElement person=(JAXBElement)jaxbContext.createUnmarshaller().unmarshal(xmlStream);
    assertEquals("String_Node_Str",new QName("String_Node_Str","String_Node_Str"),person.getName());
    JAXBElement name=(JAXBElement)((DynamicEntity)person.getValue()).get("String_Node_Str");
    assertEquals("String_Node_Str",new QName("String_Node_Str","String_Node_Str"),name.getName());
    InputStream xmlStream2=ClassLoader.getSystemResourceAsStream(PERSONNE_XML);
    JAXBElement person2=(JAXBElement)jaxbContext.createUnmarshaller().unmarshal(xmlStream2);
    assertEquals("String_Node_Str",new QName("String_Node_Str","String_Node_Str"),person2.getName());
    JAXBElement name2=(JAXBElement)((DynamicEntity)person2.getValue()).get("String_Node_Str");
    assertEquals("String_Node_Str",new QName("String_Node_Str","String_Node_Str"),name2.getName());
  }
 catch (  UndeclaredThrowableException e) {
    if (e.getUndeclaredThrowable() instanceof NoSuchMethodException) {
      assertTrue(true);
    }
  }
}

Fixed version (ground truth):
public void testSubstitutionGroupsUnmarshal() throws Exception {
  try {
    InputStream xsdStream=ClassLoader.getSystemResourceAsStream(SUBSTITUTION);
    jaxbContext=DynamicJAXBContextFactory.createContextFromXSD(xsdStream,null,null,null);
    InputStream xmlStream=ClassLoader.getSystemResourceAsStream(PERSON_XML);
    JAXBElement person=(JAXBElement)jaxbContext.createUnmarshaller().unmarshal(xmlStream);
    assertEquals("String_Node_Str",new QName("String_Node_Str","String_Node_Str"),person.getName());
    JAXBElement name=(JAXBElement)((DynamicEntity)person.getValue()).get("String_Node_Str");
    assertEquals("String_Node_Str",new QName("String_Node_Str","String_Node_Str"),name.getName());
    InputStream xmlStream2=ClassLoader.getSystemResourceAsStream(PERSONNE_XML);
    JAXBElement person2=(JAXBElement)jaxbContext.createUnmarshaller().unmarshal(xmlStream2);
    assertEquals("String_Node_Str",new QName("String_Node_Str","String_Node_Str"),person2.getName());
    JAXBElement name2=(JAXBElement)((DynamicEntity)person2.getValue()).get("String_Node_Str");
    assertEquals("String_Node_Str",new QName("String_Node_Str","String_Node_Str"),name2.getName());
  }
 catch (  JAXBException e) {
    try {
      throw e.getLinkedException();
    }
 catch (    UndeclaredThrowableException e2) {
      if (e2.getUndeclaredThrowable() instanceof NoSuchMethodException) {
        assertTrue(true);
      }
    }
catch (    Throwable e2) {
      fail();
    }
  }
}
Program: 66168
Project: 66168
Buggy source:
public void testXmlMixed() throws Exception {
  InputStream inputStream=ClassLoader.getSystemResourceAsStream(XMLMIXED);
  try {
    jaxbContext=DynamicJAXBContextFactory.createContextFromXSD(inputStream,null,null,null);
  }
 catch (  UndeclaredThrowableException ute) {
    return;
  }
  DynamicEntity person=jaxbContext.newDynamicEntity(PACKAGE + "String_Node_Str" + PERSON);
  assertNotNull("String_Node_Str",person);
  ArrayList list=new ArrayList();
  list.add("String_Node_Str");
  list.add(new JAXBElement<String>(new QName("String_Node_Str","String_Node_Str"),String.class,person.getClass(),"String_Node_Str"));
  list.add(new JAXBElement<String>(new QName("String_Node_Str","String_Node_Str"),String.class,person.getClass(),"String_Node_Str"));
  list.add("String_Node_Str");
  list.add(new JAXBElement<BigInteger>(new QName("String_Node_Str","String_Node_Str"),BigInteger.class,person.getClass(),BigInteger.valueOf(175)));
  list.add("String_Node_Str");
  person.set("String_Node_Str",list);
  Document marshalDoc=DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  jaxbContext.createMarshaller().marshal(person,marshalDoc);
  Node node=marshalDoc.getDocumentElement();
  assertTrue("String_Node_Str",node.getChildNodes().getLength() == 6);
}

Fixed version (ground truth):
public void testXmlMixed() throws Exception {
  InputStream inputStream=ClassLoader.getSystemResourceAsStream(XMLMIXED);
  try {
    jaxbContext=DynamicJAXBContextFactory.createContextFromXSD(inputStream,null,null,null);
  }
 catch (  JAXBException e) {
    if (e.getLinkedException() instanceof UndeclaredThrowableException) {
      return;
    }
  }
  DynamicEntity person=jaxbContext.newDynamicEntity(PACKAGE + "String_Node_Str" + PERSON);
  assertNotNull("String_Node_Str",person);
  ArrayList list=new ArrayList();
  list.add("String_Node_Str");
  list.add(new JAXBElement<String>(new QName("String_Node_Str","String_Node_Str"),String.class,person.getClass(),"String_Node_Str"));
  list.add(new JAXBElement<String>(new QName("String_Node_Str","String_Node_Str"),String.class,person.getClass(),"String_Node_Str"));
  list.add("String_Node_Str");
  list.add(new JAXBElement<BigInteger>(new QName("String_Node_Str","String_Node_Str"),BigInteger.class,person.getClass(),BigInteger.valueOf(175)));
  list.add("String_Node_Str");
  person.set("String_Node_Str",list);
  Document marshalDoc=DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  jaxbContext.createMarshaller().marshal(person,marshalDoc);
  Node node=marshalDoc.getDocumentElement();
  assertTrue("String_Node_Str",node.getChildNodes().getLength() == 6);
}
Program: 66171
Project: 66171
Buggy source:
void processPropertyTypes(JavaClass[] classes){
  for (  JavaClass next : classes) {
    TypeInfo info=getTypeInfo().get(next.getQualifiedName());
    if (info != null) {
      for (      Property property : info.getPropertyList()) {
        JavaClass type=property.getActualType();
        if (!(this.typeInfo.containsKey(type.getQualifiedName())) && shouldGenerateTypeInfo(type)) {
          JavaClass[] jClassArray=new JavaClass[]{type};
          buildNewTypeInfo(jClassArray);
        }
      }
    }
  }
}

Fixed version (ground truth):
void processPropertyTypes(JavaClass[] classes){
  for (  JavaClass next : classes) {
    TypeInfo info=getTypeInfo().get(next.getQualifiedName());
    if (info != null) {
      for (      Property property : info.getPropertyList()) {
        JavaClass type=property.getActualType();
        if (!(this.typeInfo.containsKey(type.getQualifiedName())) && shouldGenerateTypeInfo(type)) {
          JavaClass[] jClassArray=new JavaClass[]{type};
          buildNewTypeInfo(jClassArray);
        }
        if (property.isChoice()) {
          processChoiceProperty(property,info,next,type);
          for (          Property choiceProp : property.getChoiceProperties()) {
            type=choiceProp.getActualType();
            if (!(this.typeInfo.containsKey(type.getQualifiedName())) && shouldGenerateTypeInfo(type)) {
              JavaClass[] jClassArray=new JavaClass[]{type};
              buildNewTypeInfo(jClassArray);
            }
          }
        }
      }
    }
  }
}
Program: 66172
Project: 66172
Buggy source:
public void openStartElement(XPathFragment xPathFragment,NamespaceResolver namespaceResolver){
  super.openStartElement(xPathFragment,namespaceResolver);
  try {
    String namespaceURI=xPathFragment.getNamespaceURI();
    if (namespaceURI == null) {
      NamespaceContext namespaceContext=xmlStreamWriter.getNamespaceContext();
      if (null == namespaceContext) {
        xmlStreamWriter.writeStartElement(xPathFragment.getLocalName());
      }
 else {
        xmlStreamWriter.writeStartElement(XMLConstants.EMPTY_STRING,xPathFragment.getLocalName(),XMLConstants.EMPTY_STRING);
        String defaultNamespace=xmlStreamWriter.getNamespaceContext().getNamespaceURI(XMLConstants.EMPTY_STRING);
        if (defaultNamespace != null && defaultNamespace.length() > 0) {
          xmlStreamWriter.writeDefaultNamespace(XMLConstants.EMPTY_STRING);
        }
      }
    }
 else {
      String prefix=xPathFragment.getPrefix();
      if (prefix == null) {
        prefix=XMLConstants.EMPTY_STRING;
      }
      xmlStreamWriter.writeStartElement(prefix,xPathFragment.getLocalName(),namespaceURI);
    }
    writePrefixMappings();
  }
 catch (  XMLStreamException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
public void openStartElement(XPathFragment xPathFragment,NamespaceResolver namespaceResolver){
  super.openStartElement(xPathFragment,namespaceResolver);
  try {
    String namespaceURI=xPathFragment.getNamespaceURI();
    if (namespaceURI == null) {
      NamespaceContext namespaceContext=xmlStreamWriter.getNamespaceContext();
      if (null == namespaceContext) {
        xmlStreamWriter.writeStartElement(xPathFragment.getLocalName());
      }
 else {
        String defaultNamespace=xmlStreamWriter.getNamespaceContext().getNamespaceURI(XMLConstants.EMPTY_STRING);
        xmlStreamWriter.writeStartElement(XMLConstants.EMPTY_STRING,xPathFragment.getLocalName(),XMLConstants.EMPTY_STRING);
        if (defaultNamespace != null && defaultNamespace.length() > 0) {
          xmlStreamWriter.writeDefaultNamespace(XMLConstants.EMPTY_STRING);
        }
      }
    }
 else {
      String prefix=xPathFragment.getPrefix();
      if (prefix == null) {
        prefix=XMLConstants.EMPTY_STRING;
      }
      xmlStreamWriter.writeStartElement(prefix,xPathFragment.getLocalName(),namespaceURI);
    }
    writePrefixMappings();
  }
 catch (  XMLStreamException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 66174
Project: 66174
Buggy source:
public NamespaceInfo getNamespaceInfoForPackage(JavaPackage pack){
  NamespaceInfo packageNamespace=packageToNamespaceMappings.get(pack.getQualifiedName());
  if (packageNamespace == null) {
    XmlSchema xmlSchema=(XmlSchema)helper.getAnnotation(pack,XmlSchema.class);
    packageNamespace=processNamespaceInformation(xmlSchema);
    if (packageNamespace.getNamespace() == null) {
      packageNamespace.setNamespace(EMPTY_STRING);
    }
    if (helper.isAnnotationPresent(pack,XmlAccessorType.class)) {
      XmlAccessorType xmlAccessorType=(XmlAccessorType)helper.getAnnotation(pack,XmlAccessorType.class);
      packageNamespace.setAccessType(XmlAccessType.fromValue(xmlAccessorType.value().name()));
    }
    if (helper.isAnnotationPresent(pack,XmlAccessorOrder.class)) {
      XmlAccessorOrder xmlAccessorOrder=(XmlAccessorOrder)helper.getAnnotation(pack,XmlAccessorOrder.class);
      packageNamespace.setAccessOrder(XmlAccessOrder.fromValue(xmlAccessorOrder.value().name()));
    }
    packageToNamespaceMappings.put(pack.getQualifiedName(),packageNamespace);
  }
  return packageNamespace;
}

Fixed version (ground truth):
public NamespaceInfo getNamespaceInfoForPackage(JavaPackage pack,String packageName){
  NamespaceInfo packageNamespace=packageToNamespaceMappings.get(packageName);
  if (packageNamespace == null) {
    XmlSchema xmlSchema=(XmlSchema)helper.getAnnotation(pack,XmlSchema.class);
    packageNamespace=processNamespaceInformation(xmlSchema);
    if (packageNamespace.getNamespace() == null) {
      packageNamespace.setNamespace(EMPTY_STRING);
    }
    if (helper.isAnnotationPresent(pack,XmlAccessorType.class)) {
      XmlAccessorType xmlAccessorType=(XmlAccessorType)helper.getAnnotation(pack,XmlAccessorType.class);
      packageNamespace.setAccessType(XmlAccessType.fromValue(xmlAccessorType.value().name()));
    }
    if (helper.isAnnotationPresent(pack,XmlAccessorOrder.class)) {
      XmlAccessorOrder xmlAccessorOrder=(XmlAccessorOrder)helper.getAnnotation(pack,XmlAccessorOrder.class);
      packageNamespace.setAccessOrder(XmlAccessOrder.fromValue(xmlAccessorOrder.value().name()));
    }
    packageToNamespaceMappings.put(packageName,packageNamespace);
  }
  return packageNamespace;
}
Program: 66176
Project: 66176
Buggy source:
@XmlIsSetNullPolicy(xsiNilRepresentsNull=true,emptyNodeRepresentsNull=false,nullRepresentationForXml=XmlMarshalNullRepresentation.XSI_NIL,isSetMethodName="String_Node_Str",isSetMethodParameters={@XmlParameter(value="String_Node_Str",type=Boolean.class)}) @XmlElement(name="String_Node_Str") public String getSomeString(){
  return someString;
}

Fixed version (ground truth):
@XmlIsSetNullPolicy(xsiNilRepresentsNull=true,emptyNodeRepresentsNull=false,nullRepresentationForXml=XmlMarshalNullRepresentation.XSI_NIL,isSetMethodName="String_Node_Str",isSetParameters={@XmlParameter(value="String_Node_Str",type=Boolean.class)}) @XmlElement(name="String_Node_Str") public String getSomeString(){
  return someString;
}
Program: 66177
Project: 66177
Buggy source:
public void testXmlJoinNode() throws Exception {
  ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
  InputStream iStream=classLoader.getResourceAsStream(XMLJOINNODE);
  if (iStream == null) {
    fail("String_Node_Str" + XMLJOINNODE + "String_Node_Str");
  }
  HashMap<String,Source> metadataSourceMap=new HashMap<String,Source>();
  metadataSourceMap.put(PACKAGE,new StreamSource(iStream));
  Map<String,Map<String,Source>> properties=new HashMap<String,Map<String,Source>>();
  properties.put(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY,metadataSourceMap);
  jaxbContext=DynamicJAXBContextFactory.createContextFromOXM(classLoader,properties);
  DynamicEntity company=exampleCompany();
  assertNotNull("String_Node_Str",company);
  Document companyDoc=DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  jaxbContext.createMarshaller().marshal(company,companyDoc);
  DynamicEntity readCompany=(DynamicEntity)jaxbContext.createUnmarshaller().unmarshal(companyDoc);
  ArrayList<DynamicEntity> readEmployees=readCompany.get("String_Node_Str");
  for (Iterator iterator=readEmployees.iterator(); iterator.hasNext(); ) {
    DynamicEntity emp=(DynamicEntity)iterator.next();
    DynamicEntity add=emp.get("String_Node_Str");
    String idString=emp.get("String_Node_Str").toString();
    String expectedAddressIdString=idString + idString.charAt(0);
    assertEquals("String_Node_Str",add.get("String_Node_Str").toString(),expectedAddressIdString);
  }
}

Fixed version (ground truth):
public void testXmlJoinNode() throws Exception {
  ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
  InputStream iStream=classLoader.getResourceAsStream(XMLJOINNODE);
  if (iStream == null) {
    fail("String_Node_Str" + XMLJOINNODE + "String_Node_Str");
  }
  HashMap<String,Source> metadataSourceMap=new HashMap<String,Source>();
  metadataSourceMap.put(PACKAGE,new StreamSource(iStream));
  Map<String,Map<String,Source>> properties=new HashMap<String,Map<String,Source>>();
  properties.put(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY,metadataSourceMap);
  jaxbContext=DynamicJAXBContextFactory.createContextFromOXM(classLoader,properties);
  DynamicEntity company=exampleCompany();
  assertNotNull("String_Node_Str",company);
  Document companyDoc=DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  jaxbContext.createMarshaller().marshal(company,companyDoc);
  DynamicEntity readCompany=(DynamicEntity)jaxbContext.createUnmarshaller().unmarshal(companyDoc);
  ArrayList<DynamicEntity> readEmployees=readCompany.get("String_Node_Str");
  for (Iterator iterator=readEmployees.iterator(); iterator.hasNext(); ) {
    DynamicEntity emp=(DynamicEntity)iterator.next();
    DynamicEntity add=emp.get("String_Node_Str");
    String idString=((Integer)emp.get("String_Node_Str")).toString();
    String expectedAddressIdString=idString + idString.charAt(0);
    assertEquals("String_Node_Str",((Integer)add.get("String_Node_Str")).toString(),expectedAddressIdString);
  }
}
Program: 66179
Project: 66179
Buggy source:
/** 
 * This exception would typically be used by JAXBContextFactory during externalized metadata processing (i.e. eclipselink-oxm.xml).  This exception applies to the case where the Value (in the package name to metadata source map) is null.
 * @param key
 * @return
 */
public static JAXBException nullMetadataSource(String key){
  Object[] args={key};
  JAXBException exception=new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class,NULL_METADATA_SOURCE,args));
  exception.setErrorCode(NULL_METADATA_SOURCE);
  return exception;
}

Fixed version (ground truth):
/** 
 * This exception would typically be used by JAXBContextFactory during externalized metadata processing (i.e. eclipselink-oxm.xml).  This exception applies to the case where the handle to the OXM metadata file is null.
 * @return
 */
public static JAXBException nullMetadataSource(){
  Object[] args={};
  JAXBException exception=new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class,NULL_METADATA_FILE,args));
  exception.setErrorCode(NULL_METADATA_FILE);
  return exception;
}
Program: 66182
Project: 66182
Buggy source:
public void endElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord){
  unmarshalRecord.getStringBuffer().reset();
}

Fixed version (ground truth):
public void endElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord,Object container){
  this.endElement(xPathFragment,unmarshalRecord);
}
Program: 66183
Project: 66183
Buggy source:
private void initializeNodeValue(){
  XMLMapping xmlMapping=xmlChoiceCollectionMapping.getChoiceElementMappings().get(xmlField);
  if (xmlMapping instanceof XMLCompositeDirectCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeDirectCollectionMappingNodeValue((XMLCompositeDirectCollectionMapping)xmlMapping);
  }
 else   if (xmlMapping instanceof XMLCompositeCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeCollectionMappingNodeValue((XMLCompositeCollectionMapping)xmlMapping);
  }
 else {
    XMLCollectionReferenceMapping refMapping=((XMLCollectionReferenceMapping)xmlMapping);
    if (refMapping.usesSingleNode() || refMapping.getFields().size() == 1) {
      choiceElementNodeValue=new XMLCollectionReferenceMappingNodeValue(refMapping,xmlField);
    }
 else {
      choiceElementNodeValue=new XMLCollectionReferenceMappingMarshalNodeValue((XMLCollectionReferenceMapping)xmlMapping);
    }
  }
}

Fixed version (ground truth):
private void initializeNodeValue(){
  XMLMapping xmlMapping=xmlChoiceCollectionMapping.getChoiceElementMappings().get(xmlField);
  if (xmlMapping instanceof XMLBinaryDataCollectionMapping) {
    choiceElementNodeValue=new XMLBinaryDataCollectionMappingNodeValue((XMLBinaryDataCollectionMapping)xmlMapping);
  }
 else   if (xmlMapping instanceof XMLCompositeDirectCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeDirectCollectionMappingNodeValue((XMLCompositeDirectCollectionMapping)xmlMapping);
  }
 else   if (xmlMapping instanceof XMLCompositeCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeCollectionMappingNodeValue((XMLCompositeCollectionMapping)xmlMapping);
  }
 else {
    XMLCollectionReferenceMapping refMapping=((XMLCollectionReferenceMapping)xmlMapping);
    if (refMapping.usesSingleNode() || refMapping.getFields().size() == 1) {
      choiceElementNodeValue=new XMLCollectionReferenceMappingNodeValue(refMapping,xmlField);
    }
 else {
      choiceElementNodeValue=new XMLCollectionReferenceMappingMarshalNodeValue((XMLCollectionReferenceMapping)xmlMapping);
    }
  }
}
Program: 66184
Project: 66184
Buggy source:
private void initializeNodeValue(){
  XMLMapping xmlMapping=xmlChoiceCollectionMapping.getChoiceElementMappings().get(xmlField);
  if (xmlMapping instanceof XMLCompositeDirectCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeDirectCollectionMappingNodeValue((XMLCompositeDirectCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else   if (xmlMapping instanceof XMLCompositeCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeCollectionMappingNodeValue((XMLCompositeCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else {
    choiceElementNodeValue=new XMLCollectionReferenceMappingNodeValue((XMLCollectionReferenceMapping)xmlMapping,xmlField);
    choiceElementMarshalNodeValue=new XMLCollectionReferenceMappingMarshalNodeValue((XMLCollectionReferenceMapping)xmlMapping);
  }
}

Fixed version (ground truth):
private void initializeNodeValue(){
  XMLMapping xmlMapping=xmlChoiceCollectionMapping.getChoiceElementMappings().get(xmlField);
  if (xmlMapping instanceof XMLBinaryDataCollectionMapping) {
    choiceElementNodeValue=new XMLBinaryDataCollectionMappingNodeValue((XMLBinaryDataCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else   if (xmlMapping instanceof XMLCompositeDirectCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeDirectCollectionMappingNodeValue((XMLCompositeDirectCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else   if (xmlMapping instanceof XMLCompositeCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeCollectionMappingNodeValue((XMLCompositeCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else {
    choiceElementNodeValue=new XMLCollectionReferenceMappingNodeValue((XMLCollectionReferenceMapping)xmlMapping,xmlField);
    choiceElementMarshalNodeValue=new XMLCollectionReferenceMappingMarshalNodeValue((XMLCollectionReferenceMapping)xmlMapping);
  }
}
Program: 66185
Project: 66185
Buggy source:
public void initializeNodeValue(){
  XMLMapping xmlMapping=xmlChoiceMapping.getChoiceElementMappings().get(xmlField);
  if (xmlMapping instanceof XMLDirectMapping) {
    choiceElementNodeValue=new XMLDirectMappingNodeValue((XMLDirectMapping)xmlMapping);
  }
 else   if (xmlMapping instanceof XMLObjectReferenceMapping) {
    choiceElementNodeValue=new XMLObjectReferenceMappingNodeValue((XMLObjectReferenceMapping)xmlMapping,xmlField);
  }
 else {
    choiceElementNodeValue=new XMLCompositeObjectMappingNodeValue((XMLCompositeObjectMapping)xmlMapping);
  }
}

Fixed version (ground truth):
public void initializeNodeValue(){
  XMLMapping xmlMapping=xmlChoiceMapping.getChoiceElementMappings().get(xmlField);
  if (xmlMapping instanceof XMLBinaryDataMapping) {
    choiceElementNodeValue=new XMLBinaryDataMappingNodeValue((XMLBinaryDataMapping)xmlMapping);
  }
 else   if (xmlMapping instanceof XMLDirectMapping) {
    choiceElementNodeValue=new XMLDirectMappingNodeValue((XMLDirectMapping)xmlMapping);
  }
 else   if (xmlMapping instanceof XMLObjectReferenceMapping) {
    choiceElementNodeValue=new XMLObjectReferenceMappingNodeValue((XMLObjectReferenceMapping)xmlMapping,xmlField);
  }
 else {
    choiceElementNodeValue=new XMLCompositeObjectMappingNodeValue((XMLCompositeObjectMapping)xmlMapping);
  }
}
Program: 66186
Project: 66186
Buggy source:
private void addChoiceElementMapping(XMLField xmlField,Class theClass){
  if (xmlField.getLastXPathFragment().nameIsText()) {
    XMLCompositeDirectCollectionMapping xmlMapping=new XMLCompositeDirectCollectionMapping();
    xmlMapping.setAttributeElementClass(theClass);
    xmlMapping.setField(xmlField);
    xmlMapping.setAttributeAccessor(temporaryAccessor);
    this.choiceElementMappings.put(xmlField,xmlMapping);
  }
 else {
    XMLCompositeCollectionMapping xmlMapping=new XMLCompositeCollectionMapping();
    if (!theClass.equals(ClassConstants.OBJECT)) {
      xmlMapping.setReferenceClass(theClass);
    }
    xmlMapping.setField(xmlField);
    xmlMapping.setAttributeAccessor(temporaryAccessor);
    this.choiceElementMappings.put(xmlField,xmlMapping);
  }
}

Fixed version (ground truth):
private void addChoiceElementMapping(XMLField xmlField,Class theClass){
  if (xmlField.getLastXPathFragment().nameIsText()) {
    XMLCompositeDirectCollectionMapping xmlMapping=new XMLCompositeDirectCollectionMapping();
    xmlMapping.setAttributeElementClass(theClass);
    xmlMapping.setField(xmlField);
    xmlMapping.setAttributeAccessor(temporaryAccessor);
    this.choiceElementMappings.put(xmlField,xmlMapping);
  }
 else {
    if (isBinaryType(theClass)) {
      XMLBinaryDataCollectionMapping xmlMapping=new XMLBinaryDataCollectionMapping();
      xmlMapping.setField(xmlField);
      xmlMapping.setAttributeElementClass(theClass);
      xmlMapping.setAttributeAccessor(temporaryAccessor);
      this.fieldsToConverters.put(xmlField,xmlMapping.getValueConverter());
      this.choiceElementMappings.put(xmlField,xmlMapping);
    }
 else {
      XMLCompositeCollectionMapping xmlMapping=new XMLCompositeCollectionMapping();
      if (!theClass.equals(ClassConstants.OBJECT)) {
        xmlMapping.setReferenceClass(theClass);
      }
      xmlMapping.setField(xmlField);
      xmlMapping.setAttributeAccessor(temporaryAccessor);
      this.choiceElementMappings.put(xmlField,xmlMapping);
    }
  }
}
Program: 66187
Project: 66187
Buggy source:
public void preInitialize(AbstractSession session) throws DescriptorException {
  getAttributeAccessor().setIsWriteOnly(this.isWriteOnly());
  getAttributeAccessor().setIsReadOnly(this.isReadOnly());
  super.preInitialize(session);
  Iterator<XMLMapping> mappings=getChoiceElementMappings().values().iterator();
  while (mappings.hasNext()) {
    DatabaseMapping nextMapping=(DatabaseMapping)mappings.next();
    nextMapping.setAttributeName(this.getAttributeName());
    if (nextMapping.getAttributeAccessor() == temporaryAccessor) {
      nextMapping.setAttributeAccessor(getAttributeAccessor());
    }
    nextMapping.setDescriptor(getDescriptor());
    nextMapping.preInitialize(session);
  }
}

Fixed version (ground truth):
public void preInitialize(AbstractSession session) throws DescriptorException {
  getAttributeAccessor().setIsWriteOnly(this.isWriteOnly());
  getAttributeAccessor().setIsReadOnly(this.isReadOnly());
  super.preInitialize(session);
  Iterator<XMLMapping> mappings=getChoiceElementMappings().values().iterator();
  while (mappings.hasNext()) {
    DatabaseMapping nextMapping=(DatabaseMapping)mappings.next();
    nextMapping.setAttributeName(this.getAttributeName());
    if (nextMapping.getAttributeAccessor() == temporaryAccessor) {
      nextMapping.setAttributeAccessor(getAttributeAccessor());
    }
    nextMapping.setIsReadOnly(this.isReadOnly());
    ((XMLMapping)nextMapping).setIsWriteOnly(this.isWriteOnly());
    nextMapping.setDescriptor(getDescriptor());
    nextMapping.preInitialize(session);
  }
}
Program: 66190
Project: 66190
Buggy source:
public void testXmlAdapter() throws Exception {
  if (true)   return;
  fail("String_Node_Str");
  ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
  InputStream iStream=classLoader.getResourceAsStream(XMLADAPTER_PACKAGE);
  if (iStream == null) {
    fail("String_Node_Str" + XMLADAPTER_PACKAGE + "String_Node_Str");
  }
  HashMap<String,Source> metadataSourceMap=new HashMap<String,Source>();
  metadataSourceMap.put(PACKAGE,new StreamSource(iStream));
  Map<String,Object> properties=new HashMap<String,Object>();
  properties.put(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY,metadataSourceMap);
  jaxbContext=DynamicJAXBContextFactory.createContextFromOXM(classLoader,properties);
  DynamicEntity person=jaxbContext.newDynamicEntity(PACKAGE + "String_Node_Str" + PERSON);
  assertNotNull("String_Node_Str",person);
  Computer computer=new Computer();
  computer.ipCode=121531298;
  computer.macCode=48261593;
  computer.workgroup='C';
  person.set("String_Node_Str","String_Node_Str");
  person.set("String_Node_Str",computer);
  print(person);
  Document marshalDoc=DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  jaxbContext.createMarshaller().marshal(person,marshalDoc);
  DynamicEntity readPerson=(DynamicEntity)jaxbContext.createUnmarshaller().unmarshal(marshalDoc);
}

Fixed version (ground truth):
public void testXmlAdapter() throws Exception {
  ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
  InputStream iStream=classLoader.getResourceAsStream(XMLADAPTER_PACKAGE);
  if (iStream == null) {
    fail("String_Node_Str" + XMLADAPTER_PACKAGE + "String_Node_Str");
  }
  HashMap<String,Source> metadataSourceMap=new HashMap<String,Source>();
  metadataSourceMap.put(PACKAGE,new StreamSource(iStream));
  Map<String,Object> properties=new HashMap<String,Object>();
  properties.put(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY,metadataSourceMap);
  jaxbContext=DynamicJAXBContextFactory.createContextFromOXM(classLoader,properties);
  DynamicEntity person=jaxbContext.newDynamicEntity(PACKAGE + "String_Node_Str" + PERSON);
  assertNotNull("String_Node_Str",person);
  Computer computer=new Computer();
  computer.ipCode=121531298;
  computer.macCode=48261593;
  computer.workgroup='C';
  person.set("String_Node_Str","String_Node_Str");
  person.set("String_Node_Str",computer);
  print(person);
  Document marshalDoc=DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  jaxbContext.createMarshaller().marshal(person,marshalDoc);
  DynamicEntity readPerson=(DynamicEntity)jaxbContext.createUnmarshaller().unmarshal(marshalDoc);
}
Program: 66191
Project: 66191
Buggy source:
@Override public ClassLoader getClassLoader(){
  return this.dynamicClassLoader;
}

Fixed version (ground truth):
public ClassLoader getClassLoader(){
  return this.dynamicClassLoader;
}
Program: 66193
Project: 66193
Buggy source:
public void reapplyPackageAndClassAdapters(Property prop,TypeInfo owningInfo){
  JavaClass type=prop.getActualType();
  TypeInfo targetInfo=aProcessor.getTypeInfo().get(type.getQualifiedName());
  if (targetInfo != null) {
    if (targetInfo.getXmlJavaTypeAdapter() != null) {
      prop.setXmlJavaTypeAdapter(targetInfo.getXmlJavaTypeAdapter());
    }
  }
  JavaClass packageLevelAdapter=owningInfo.getPackageLevelAdaptersByClass().get(type.getQualifiedName());
  if (packageLevelAdapter != null && prop.getXmlJavaTypeAdapter() == null) {
    org.eclipse.persistence.jaxb.xmlmodel.XmlJavaTypeAdapter xja=new org.eclipse.persistence.jaxb.xmlmodel.XmlJavaTypeAdapter();
    xja.setValue(packageLevelAdapter.getQualifiedName());
    xja.setType(type.getQualifiedName());
    prop.setXmlJavaTypeAdapter(xja);
  }
}

Fixed version (ground truth):
public void reapplyPackageAndClassAdapters(Property prop,TypeInfo owningInfo){
  if (prop.getXmlJavaTypeAdapter() != null) {
    return;
  }
  JavaClass type=prop.getActualType();
  TypeInfo targetInfo=aProcessor.getTypeInfo().get(type.getQualifiedName());
  if (targetInfo != null) {
    if (targetInfo.getXmlJavaTypeAdapter() != null) {
      prop.setXmlJavaTypeAdapter(targetInfo.getXmlJavaTypeAdapter());
    }
  }
  JavaClass packageLevelAdapter=owningInfo.getPackageLevelAdaptersByClass().get(type.getQualifiedName());
  if (packageLevelAdapter != null && prop.getXmlJavaTypeAdapter() == null) {
    org.eclipse.persistence.jaxb.xmlmodel.XmlJavaTypeAdapter xja=new org.eclipse.persistence.jaxb.xmlmodel.XmlJavaTypeAdapter();
    xja.setValue(packageLevelAdapter.getQualifiedName());
    xja.setType(type.getQualifiedName());
    prop.setXmlJavaTypeAdapter(xja);
  }
}
Program: 66198
Project: 66198
Buggy source:
/** 
 * Build a valid Integer instance from a String or another Number instance.
 * @caught exception    The Integer(String) constructor throws aNumberFormatException if the String does not contain a parsable integer.
 */
protected Integer convertObjectToInteger(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String && ((String)sourceObject).length() > 0 && ((String)sourceObject).charAt(0) == PLUS) {
    return super.convertObjectToInteger(((String)sourceObject).substring(1));
  }
  return super.convertObjectToInteger(sourceObject);
}

Fixed version (ground truth):
/** 
 * Build a valid Integer instance from a String or another Number instance.
 * @caught exception    The Integer(String) constructor throws aNumberFormatException if the String does not contain a parsable integer.
 */
protected Integer convertObjectToInteger(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String) {
    String sourceString=(String)sourceObject;
    if (sourceString.length() == 0) {
      return 0;
    }
 else     if (sourceString.charAt(0) == PLUS) {
      return super.convertObjectToInteger(sourceString.substring(1));
    }
  }
  return super.convertObjectToInteger(sourceObject);
}