nus-yam/ex-repair huggingface dataset:
Program: 67751
Project: 67751
Buggy source:
protected String convertObjectToString(Object sourceObject,QName schemaTypeQName) throws ConversionException {
  if (sourceObject instanceof Calendar) {
    return stringFromCalendar((Calendar)sourceObject,schemaTypeQName);
  }
  if (sourceObject instanceof QName) {
    return stringFromQName((QName)sourceObject);
  }
  if (sourceObject instanceof java.sql.Date) {
    return stringFromSQLDate((java.sql.Date)sourceObject,schemaTypeQName);
  }
  if (sourceObject instanceof java.sql.Time) {
    return stringFromSQLTime((java.sql.Time)sourceObject,schemaTypeQName);
  }
  if (sourceObject instanceof java.sql.Timestamp) {
    return stringFromTimestamp((Timestamp)sourceObject,schemaTypeQName);
  }
  if (sourceObject instanceof java.util.Date) {
    return stringFromDate((java.util.Date)sourceObject,schemaTypeQName);
  }
  if (sourceObject instanceof XMLGregorianCalendar) {
    return stringFromXMLGregorianCalendar((XMLGregorianCalendar)sourceObject,schemaTypeQName);
  }
  if (sourceObject instanceof Duration) {
    return stringFromDuration((Duration)sourceObject);
  }
  return super.convertObjectToString(sourceObject);
}

Fixed version (ground truth):
protected String convertObjectToString(Object sourceObject,QName schemaTypeQName) throws ConversionException {
  if (sourceObject instanceof Calendar) {
    return stringFromCalendar((Calendar)sourceObject,schemaTypeQName);
  }
  if (sourceObject instanceof Character && sourceObject.equals((char)0)) {
    return "String_Node_Str";
  }
  if (sourceObject instanceof QName) {
    return stringFromQName((QName)sourceObject);
  }
  if (sourceObject instanceof java.sql.Date) {
    return stringFromSQLDate((java.sql.Date)sourceObject,schemaTypeQName);
  }
  if (sourceObject instanceof java.sql.Time) {
    return stringFromSQLTime((java.sql.Time)sourceObject,schemaTypeQName);
  }
  if (sourceObject instanceof java.sql.Timestamp) {
    return stringFromTimestamp((Timestamp)sourceObject,schemaTypeQName);
  }
  if (sourceObject instanceof java.util.Date) {
    return stringFromDate((java.util.Date)sourceObject,schemaTypeQName);
  }
  if (sourceObject instanceof XMLGregorianCalendar) {
    return stringFromXMLGregorianCalendar((XMLGregorianCalendar)sourceObject,schemaTypeQName);
  }
  if (sourceObject instanceof Duration) {
    return stringFromDuration((Duration)sourceObject);
  }
  if (sourceObject instanceof Double) {
    if (Double.POSITIVE_INFINITY == ((Double)sourceObject)) {
      return XMLConstants.POSITIVE_INFINITY;
    }
    if (Double.NEGATIVE_INFINITY == ((Double)sourceObject)) {
      return XMLConstants.NEGATIVE_INFINITY;
    }
    return ((Double)sourceObject).toString();
  }
  if (sourceObject instanceof Float) {
    if (Float.POSITIVE_INFINITY == ((Float)sourceObject)) {
      return XMLConstants.POSITIVE_INFINITY;
    }
    if (Float.NEGATIVE_INFINITY == ((Float)sourceObject)) {
      return XMLConstants.NEGATIVE_INFINITY;
    }
    return ((Float)sourceObject).toString();
  }
  return super.convertObjectToString(sourceObject);
}
Program: 67756
Project: 67756
Buggy source:
public XMLMapping generateMappingForReferenceProperty(ReferenceProperty property,XMLDescriptor descriptor,NamespaceInfo namespaceInfo){
  XMLChoiceObjectMapping mapping=new XMLChoiceObjectMapping();
  mapping.setAttributeName(property.getPropertyName());
  if (property.isMethodProperty()) {
    mapping.setGetMethodName(property.getGetMethodName());
    mapping.setSetMethodName(property.getSetMethodName());
  }
  List<ElementDeclaration> referencedElements=property.getReferencedElements();
  boolean hasJAXBElements=false;
  AttributeAccessor mappingAccessor=mapping.getAttributeAccessor();
  for (  ElementDeclaration element : referencedElements) {
    QName elementName=element.getElementName();
    XMLField xmlField=this.getXPathForElement("String_Node_Str",elementName,namespaceInfo,!(this.typeInfo.containsKey(element.getJavaTypeName())));
    mapping.addChoiceElement(xmlField,element.getJavaTypeName());
    if (!element.isXmlRootElement()) {
      XMLRootConverter converter=new XMLRootConverter(xmlField);
      mapping.addConverter(xmlField,converter);
    }
    hasJAXBElements=hasJAXBElements || !element.isXmlRootElement();
    if (hasJAXBElements) {
      mapping.setAttributeAccessor(new JAXBElementAttributeAccessor(mappingAccessor));
    }
  }
  descriptor.addMapping(mapping);
  return mapping;
}

Fixed version (ground truth):
public XMLMapping generateMappingForReferenceProperty(ReferenceProperty property,XMLDescriptor descriptor,NamespaceInfo namespaceInfo){
  DatabaseMapping mapping;
  boolean isCollection=isCollectionType(property);
  if (isCollection) {
    mapping=new XMLChoiceCollectionMapping();
  }
 else {
    mapping=new XMLChoiceObjectMapping();
  }
  mapping.setAttributeName(property.getPropertyName());
  if (property.isMethodProperty()) {
    mapping.setGetMethodName(property.getGetMethodName());
    mapping.setSetMethodName(property.getSetMethodName());
  }
  List<ElementDeclaration> referencedElements=property.getReferencedElements();
  boolean hasJAXBElements=false;
  AttributeAccessor mappingAccessor=mapping.getAttributeAccessor();
  for (  ElementDeclaration element : referencedElements) {
    QName elementName=element.getElementName();
    XMLField xmlField=this.getXPathForElement("String_Node_Str",elementName,namespaceInfo,!(this.typeInfo.containsKey(element.getJavaTypeName())));
    if (isCollection) {
      ((XMLChoiceCollectionMapping)mapping).addChoiceElement(xmlField,element.getJavaTypeName());
    }
 else {
      ((XMLChoiceObjectMapping)mapping).addChoiceElement(xmlField,element.getJavaTypeName());
    }
    if (!element.isXmlRootElement()) {
      XMLRootConverter converter=new XMLRootConverter(xmlField);
      if (isCollection) {
        ((XMLChoiceCollectionMapping)mapping).addConverter(xmlField,converter);
      }
 else {
        ((XMLChoiceObjectMapping)mapping).addConverter(xmlField,converter);
      }
    }
    hasJAXBElements=hasJAXBElements || !element.isXmlRootElement();
    if (hasJAXBElements) {
      mapping.setAttributeAccessor(new JAXBElementAttributeAccessor(mappingAccessor));
    }
  }
  descriptor.addMapping(mapping);
  return (XMLMapping)mapping;
}
Program: 67757
Project: 67757
Buggy source:
public Collection getActualTypeArguments(){
  ArrayList<JavaClassImpl> argCollection=new ArrayList<JavaClassImpl>();
  if (jType instanceof ParameterizedType) {
    ParameterizedType pType=(ParameterizedType)jType;
    Type[] params=pType.getActualTypeArguments();
    for (    Type type : params) {
      if (type instanceof ParameterizedType) {
        ParameterizedType pt=(ParameterizedType)type;
        argCollection.add(new JavaClassImpl(pt,(Class)pt.getRawType()));
      }
 else       if (type instanceof Class) {
        argCollection.add(new JavaClassImpl((Class)type));
      }
 else       if (type instanceof GenericArrayType) {
        Class genericTypeClass=(Class)((GenericArrayType)type).getGenericComponentType();
        genericTypeClass=java.lang.reflect.Array.newInstance(genericTypeClass,0).getClass();
        argCollection.add(new JavaClassImpl(genericTypeClass));
      }
    }
  }
  return argCollection;
}

Fixed version (ground truth):
public Collection getActualTypeArguments(){
  ArrayList<JavaClassImpl> argCollection=new ArrayList<JavaClassImpl>();
  if (jType instanceof ParameterizedType) {
    ParameterizedType pType=(ParameterizedType)jType;
    Type[] params=pType.getActualTypeArguments();
    for (    Type type : params) {
      if (type instanceof ParameterizedType) {
        ParameterizedType pt=(ParameterizedType)type;
        argCollection.add(new JavaClassImpl(pt,(Class)pt.getRawType()));
      }
 else       if (type instanceof WildcardType) {
        Type[] upperTypes=((WildcardType)type).getUpperBounds();
        if (upperTypes.length > 0) {
          Type upperType=upperTypes[0];
          if (upperType instanceof Class) {
            argCollection.add(new JavaClassImpl((Class)upperType));
          }
        }
      }
 else       if (type instanceof Class) {
        argCollection.add(new JavaClassImpl((Class)type));
      }
 else       if (type instanceof GenericArrayType) {
        Class genericTypeClass=(Class)((GenericArrayType)type).getGenericComponentType();
        genericTypeClass=java.lang.reflect.Array.newInstance(genericTypeClass,0).getClass();
        argCollection.add(new JavaClassImpl(genericTypeClass));
      }
    }
  }
  return argCollection;
}
Program: 67758
Project: 67758
Buggy source:
/** 
 * INTERNAL: This method is used to add the next value from an iterator built using ContainerPolicy's iteratorFor() method into the toCollection. This method is overridden by subclasses to provide extended functionality for map keys
 * @see MappedKeyMapContainerPolicy
 * @param valuesIterator
 * @param toCollection
 * @param mapping
 * @param unitOfWork
 * @param isExisting
 */
public void addNextValueFromIteratorInto(Object valuesIterator,Object parent,Object toCollection,CollectionMapping mapping,UnitOfWorkImpl unitOfWork,boolean isExisting){
  Object cloneValue=mapping.buildElementClone(next(valuesIterator,unitOfWork),parent,unitOfWork,isExisting);
  addInto(cloneValue,toCollection,unitOfWork);
}

Fixed version (ground truth):
/** 
 * INTERNAL: This method is used to add the next value from an iterator built using ContainerPolicy's iteratorFor() method into the toCollection. This method is overridden by subclasses to provide extended functionality for map keys
 * @see MappedKeyMapContainerPolicy
 * @param valuesIterator
 * @param toCollection
 * @param mapping
 * @param unitOfWork
 * @param isExisting
 */
public void addNextValueFromIteratorInto(Object valuesIterator,Object parent,Object toCollection,CollectionMapping mapping,UnitOfWorkImpl unitOfWork,boolean isExisting){
  Object cloneValue=mapping.buildElementClone(next(valuesIterator,unitOfWork),parent,unitOfWork,isExisting);
  if (!isExisting && mapping.isCandidateForPrivateOwnedRemoval() && unitOfWork.shouldDiscoverNewObjects()&& cloneValue != null && unitOfWork.isObjectNew(cloneValue)) {
    unitOfWork.addPrivateOwnedObject(mapping,cloneValue);
  }
  addInto(cloneValue,toCollection,unitOfWork);
}
Program: 67759
Project: 67759
Buggy source:
/** 
 * INTERNAL: This method is used to add the next value from an iterator built using ContainerPolicy's iteratorFor() method into the toCollection.  Since this ContainerPolicy represents a Map, the key and the value are extracted and added
 */
public void addNextValueFromIteratorInto(Object valuesIterator,Object parent,Object toCollection,CollectionMapping mapping,UnitOfWorkImpl unitOfWork,boolean isExisting){
  Map.Entry entry=((MapContainerPolicyIterator)valuesIterator).next();
  Object clonedKey=buildCloneForKey(entry.getKey(),parent,unitOfWork,isExisting);
  Object clonedValue=buildCloneForValue(entry.getValue(),parent,mapping,unitOfWork,isExisting);
  addInto(clonedKey,clonedValue,toCollection,unitOfWork);
}

Fixed version (ground truth):
/** 
 * INTERNAL: This method is used to add the next value from an iterator built using ContainerPolicy's iteratorFor() method into the toCollection.  Since this ContainerPolicy represents a Map, the key and the value are extracted and added
 */
public void addNextValueFromIteratorInto(Object valuesIterator,Object parent,Object toCollection,CollectionMapping mapping,UnitOfWorkImpl unitOfWork,boolean isExisting){
  Map.Entry entry=((MapContainerPolicyIterator)valuesIterator).next();
  Object clonedKey=buildCloneForKey(entry.getKey(),parent,unitOfWork,isExisting);
  Object clonedValue=buildCloneForValue(entry.getValue(),parent,mapping,unitOfWork,isExisting);
  if (mapping.isCandidateForPrivateOwnedRemoval() && unitOfWork.shouldDiscoverNewObjects()) {
    if (clonedValue != null && unitOfWork.isObjectNew(clonedValue)) {
      unitOfWork.addPrivateOwnedObject(mapping,clonedValue);
    }
    if (clonedKey != null && unitOfWork.isObjectNew(clonedKey)) {
      unitOfWork.addPrivateOwnedObject(mapping,clonedKey);
    }
  }
  addInto(clonedKey,clonedValue,toCollection,unitOfWork);
}
Program: 67760
Project: 67760
Buggy source:
/** 
 * INTERNAL: Cascade registerNew to any mappings managed by the container policy. This will cascade the register to the key mapping.
 */
public void cascadeRegisterNewIfRequired(Object object,UnitOfWorkImpl uow,Map visitedObjects){
  if (((DatabaseMapping)keyMapping).isOneToOneMapping()) {
    uow.registerNewObjectForPersist(((Map.Entry)object).getKey(),visitedObjects);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Cascade registerNew to any mappings managed by the container policy. This will cascade the register to the key mapping.
 */
public void cascadeRegisterNewIfRequired(Object object,UnitOfWorkImpl uow,Map visitedObjects){
  DatabaseMapping mapping=(DatabaseMapping)keyMapping;
  if (mapping.isOneToOneMapping()) {
    Object key=((Map.Entry)object).getKey();
    if (mapping.isCandidateForPrivateOwnedRemoval() && uow.shouldDiscoverNewObjects()) {
      uow.addPrivateOwnedObject(mapping,key);
    }
    uow.registerNewObjectForPersist(key,visitedObjects);
  }
}
Program: 67761
Project: 67761
Buggy source:
/** 
 * INTERNAL: Cascade discover and persist new objects during commit to the map key
 */
public void cascadeDiscoverAndPersistUnregisteredNewObjects(Object object,boolean cascade,Map newObjects,Map unregisteredExistingObjects,Map visitedObjects,UnitOfWorkImpl uow){
  if (((DatabaseMapping)keyMapping).isOneToOneMapping()) {
    uow.discoverAndPersistUnregisteredNewObjects(((Map.Entry)object).getKey(),cascade,newObjects,unregisteredExistingObjects,visitedObjects);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Cascade discover and persist new objects during commit to the map key
 */
public void cascadeDiscoverAndPersistUnregisteredNewObjects(Object object,boolean cascade,Map newObjects,Map unregisteredExistingObjects,Map visitedObjects,UnitOfWorkImpl uow){
  if (((DatabaseMapping)keyMapping).isOneToOneMapping()) {
    Object key=((Map.Entry)object).getKey();
    if (uow.hasPrivateOwnedObjects()) {
      uow.removePrivateOwnedObject(((DatabaseMapping)keyMapping),key);
    }
    uow.discoverAndPersistUnregisteredNewObjects(key,cascade,newObjects,unregisteredExistingObjects,visitedObjects);
  }
}
Program: 67763
Project: 67763
Buggy source:
/** 
 * INTERNAL: Traverse the object to find references to objects not registered in this unit of work.
 */
public void discoverUnregisteredNewObjects(Map clones,final Map knownNewObjects,final Map unregisteredExistingObjects,Map visitedObjects){
  DescriptorIterator iterator=new DescriptorIterator(){
    public void iterate(    Object object){
      if (isClassReadOnly(object.getClass(),this.getCurrentDescriptor())) {
        this.setShouldBreak(true);
        return;
      }
      if (isSmartMerge() && isOriginalNewObject(object)) {
        return;
      }
 else       if (!isObjectRegistered(object)) {
        if (shouldPerformNoValidation()) {
          if (checkForUnregisteredExistingObject(object)) {
            unregisteredExistingObjects.put(object,object);
            this.setShouldBreak(true);
            return;
          }
        }
 else {
          getBackupClone(object,getCurrentDescriptor());
        }
        knownNewObjects.put(object,object);
      }
    }
  }
;
  setUnregisteredExistingObjects(unregisteredExistingObjects);
  iterator.setVisitedObjects(visitedObjects);
  iterator.setResult(knownNewObjects);
  iterator.setSession(this);
  iterator.setShouldIterateOverWrappedObjects(false);
  for (Iterator clonesEnum=clones.keySet().iterator(); clonesEnum.hasNext(); ) {
    iterator.startIterationOn(clonesEnum.next());
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Traverse the object to find references to objects not registered in this unit of work.
 */
public void discoverUnregisteredNewObjects(Map clones,final Map knownNewObjects,final Map unregisteredExistingObjects,Map visitedObjects){
  DescriptorIterator iterator=new DescriptorIterator(){
    public void iterate(    Object object){
      if (isClassReadOnly(object.getClass(),this.getCurrentDescriptor())) {
        this.setShouldBreak(true);
        return;
      }
      if (isSmartMerge() && isOriginalNewObject(object)) {
        return;
      }
 else       if (!isObjectRegistered(object)) {
        if (shouldPerformNoValidation()) {
          if (checkForUnregisteredExistingObject(object)) {
            unregisteredExistingObjects.put(object,object);
            this.setShouldBreak(true);
            return;
          }
        }
 else {
          getBackupClone(object,getCurrentDescriptor());
        }
        knownNewObjects.put(object,object);
      }
    }
    public void iterateReferenceObjectForMapping(    Object referenceObject,    DatabaseMapping mapping){
      super.iterateReferenceObjectForMapping(referenceObject,mapping);
      if (hasPrivateOwnedObjects()) {
        removePrivateOwnedObject(mapping,referenceObject);
      }
    }
  }
;
  setUnregisteredExistingObjects(unregisteredExistingObjects);
  iterator.setVisitedObjects(visitedObjects);
  iterator.setResult(knownNewObjects);
  iterator.setSession(this);
  iterator.setShouldIterateOverWrappedObjects(false);
  for (Iterator clonesEnum=clones.keySet().iterator(); clonesEnum.hasNext(); ) {
    iterator.startIterationOn(clonesEnum.next());
  }
}
Program: 67764
Project: 67764
Buggy source:
/** 
 * INTERNAL: This method will clear all registered objects from this UnitOfWork. If parameter value is 'true' then the cache(s) are cleared, too.
 */
public void clear(boolean shouldClearCache){
  this.cloneToOriginals=null;
  this.cloneMapping=null;
  this.newObjectsCloneToOriginal=null;
  this.newObjectsOriginalToClone=null;
  this.deletedObjects=null;
  this.allClones=null;
  this.objectsDeletedDuringCommit=null;
  this.removedObjects=null;
  this.unregisteredNewObjects=null;
  this.unregisteredExistingObjects=null;
  this.newAggregates=null;
  this.unitOfWorkChangeSet=null;
  this.pessimisticLockedObjects=null;
  this.optimisticReadLockObjects=null;
  this.batchReadObjects=null;
  if (shouldClearCache) {
    clearIdentityMapCache();
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: This method will clear all registered objects from this UnitOfWork. If parameter value is 'true' then the cache(s) are cleared, too.
 */
public void clear(boolean shouldClearCache){
  this.cloneToOriginals=null;
  this.cloneMapping=null;
  this.newObjectsCloneToOriginal=null;
  this.newObjectsOriginalToClone=null;
  this.deletedObjects=null;
  this.allClones=null;
  this.objectsDeletedDuringCommit=null;
  this.removedObjects=null;
  this.unregisteredNewObjects=null;
  this.unregisteredExistingObjects=null;
  this.newAggregates=null;
  this.unitOfWorkChangeSet=null;
  this.pessimisticLockedObjects=null;
  this.optimisticReadLockObjects=null;
  this.batchReadObjects=null;
  this.privateOwnedObjects=null;
  if (shouldClearCache) {
    clearIdentityMapCache();
  }
}
Program: 67766
Project: 67766
Buggy source:
public void setClasses(Class[] newClasses) throws Exception {
  this.classes=newClasses;
  this.classLoader=new JaxbClassLoader(Thread.currentThread().getContextClassLoader());
  generator=new Generator(new JavaModelInputImpl(classes,new JavaModelImpl(this.classLoader)));
  Project proj=generator.generateProject();
  ConversionManager manager=new ConversionManager();
  manager.setLoader(classLoader);
  for (Iterator<ClassDescriptor> descriptorIt=proj.getOrderedDescriptors().iterator(); descriptorIt.hasNext(); ) {
    ClassDescriptor descriptor=descriptorIt.next();
    if (descriptor.getJavaClass() == null) {
      descriptor.setJavaClass(manager.convertClassNameToClass(descriptor.getJavaClassName()));
    }
  }
  setProject(proj);
}

Fixed version (ground truth):
public void setClasses(Class[] newClasses) throws Exception {
  this.classes=newClasses;
  this.classLoader=new JaxbClassLoader(Thread.currentThread().getContextClassLoader());
  generator=new Generator(new JavaModelInputImpl(classes,new JavaModelImpl(this.classLoader)));
  Project proj=generator.generateProject();
  proj.convertClassNamesToClasses(classLoader);
  ConversionManager manager=new ConversionManager();
  manager.setLoader(classLoader);
  for (Iterator<ClassDescriptor> descriptorIt=proj.getOrderedDescriptors().iterator(); descriptorIt.hasNext(); ) {
    ClassDescriptor descriptor=descriptorIt.next();
    if (descriptor.getJavaClass() == null) {
      descriptor.setJavaClass(manager.convertClassNameToClass(descriptor.getJavaClassName()));
    }
  }
  setProject(proj);
}
Program: 67767
Project: 67767
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  String contextPath="String_Node_Str";
  System.setProperty("String_Node_Str",contextPath);
  String platform=System.getProperty("String_Node_Str");
  boolean jaxpPlatform=platform.equalsIgnoreCase("String_Node_Str");
  suite.addTestSuite(MarshallerTestCases.class);
  suite.addTestSuite(UnmarshallerTestCases.class);
  if (!jaxpPlatform) {
    suite.addTestSuite(ValidatorTestCases.class);
  }
  suite.addTestSuite(UnmarshallValidationTestCases.class);
  suite.addTestSuite(MarshallerPropertiesTestCases.class);
  suite.addTestSuite(MarshallerFormattingTestCases.class);
  suite.addTest(MarshallerEncodingTestCases.suite());
  suite.addTestSuite(MarshallerFragmentTestCases.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  String contextPath="String_Node_Str";
  System.setProperty("String_Node_Str",contextPath);
  String platform=System.getProperty("String_Node_Str");
  boolean jaxpPlatform=true;
  suite.addTestSuite(MarshallerTestCases.class);
  suite.addTestSuite(UnmarshallerTestCases.class);
  if (!jaxpPlatform) {
    suite.addTestSuite(ValidatorTestCases.class);
  }
  suite.addTestSuite(UnmarshallValidationTestCases.class);
  suite.addTestSuite(MarshallerPropertiesTestCases.class);
  suite.addTestSuite(MarshallerFormattingTestCases.class);
  suite.addTest(MarshallerEncodingTestCases.suite());
  suite.addTestSuite(MarshallerFragmentTestCases.class);
  return suite;
}
Program: 67768
Project: 67768
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  String contextPath="String_Node_Str";
  System.setProperty("String_Node_Str",contextPath);
  String platform=System.getProperty("String_Node_Str");
  boolean jaxpPlatform=platform.equalsIgnoreCase("String_Node_Str");
  suite.addTestSuite(MarshallerTestCases.class);
  suite.addTestSuite(UnmarshallerTestCases.class);
  if (!jaxpPlatform) {
    suite.addTestSuite(ValidatorTestCases.class);
  }
  suite.addTestSuite(UnmarshallValidationTestCases.class);
  suite.addTestSuite(MarshallerPropertiesTestCases.class);
  suite.addTestSuite(MarshallerFormattingTestCases.class);
  suite.addTest(MarshallerEncodingTestCases.suite());
  suite.addTestSuite(MarshallerFragmentTestCases.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  String contextPath="String_Node_Str";
  System.setProperty("String_Node_Str",contextPath);
  String platform=System.getProperty("String_Node_Str");
  boolean jaxpPlatform=true;
  suite.addTestSuite(MarshallerTestCases.class);
  suite.addTestSuite(UnmarshallerTestCases.class);
  if (!jaxpPlatform) {
    suite.addTestSuite(ValidatorTestCases.class);
  }
  suite.addTestSuite(UnmarshallValidationTestCases.class);
  suite.addTestSuite(MarshallerPropertiesTestCases.class);
  suite.addTestSuite(MarshallerFormattingTestCases.class);
  suite.addTest(MarshallerEncodingTestCases.suite());
  suite.addTestSuite(MarshallerFragmentTestCases.class);
  return suite;
}
Program: 67769
Project: 67769
Buggy source:
/** 
 * INTERNAL: Return the descriptor for the document.
 */
protected XMLDescriptor getDescriptor(DOMRecord xmlRecord) throws XMLMarshalException {
  XMLContext xmlContext=xmlUnmarshaller.getXMLContext();
  QName rootQName=new QName(xmlRecord.getNamespaceURI(),xmlRecord.getLocalName());
  XMLDescriptor xmlDescriptor=xmlContext.getDescriptor(rootQName);
  if (null == xmlDescriptor) {
    String type=((Element)xmlRecord.getDOM()).getAttributeNS(XMLConstants.SCHEMA_INSTANCE_URL,"String_Node_Str");
    if (null != type) {
      XPathFragment typeFragment=new XPathFragment(type);
      String namespaceURI=xmlRecord.resolveNamespacePrefix(typeFragment.getPrefix());
      typeFragment.setNamespaceURI(namespaceURI);
      xmlDescriptor=xmlContext.getDescriptorByGlobalType(typeFragment);
    }
    if (null == xmlDescriptor) {
      throw XMLMarshalException.noDescriptorWithMatchingRootElement(rootQName.toString());
    }
  }
  return xmlDescriptor;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Return the descriptor for the document.
 */
protected XMLDescriptor getDescriptor(DOMRecord xmlRecord) throws XMLMarshalException {
  XMLDescriptor xmlDescriptor=null;
  XMLContext xmlContext=xmlUnmarshaller.getXMLContext();
  String type=((Element)xmlRecord.getDOM()).getAttributeNS(XMLConstants.SCHEMA_INSTANCE_URL,"String_Node_Str");
  if (null != type) {
    XPathFragment typeFragment=new XPathFragment(type);
    String namespaceURI=xmlRecord.resolveNamespacePrefix(typeFragment.getPrefix());
    typeFragment.setNamespaceURI(namespaceURI);
    xmlDescriptor=xmlContext.getDescriptorByGlobalType(typeFragment);
  }
  if (null == xmlDescriptor) {
    QName rootQName=new QName(xmlRecord.getNamespaceURI(),xmlRecord.getLocalName());
    xmlDescriptor=xmlContext.getDescriptor(rootQName);
    if (null == xmlDescriptor) {
      throw XMLMarshalException.noDescriptorWithMatchingRootElement(rootQName.toString());
    }
  }
  return xmlDescriptor;
}
Program: 67772
Project: 67772
Buggy source:
public void setAttributeValueInObject(Object object,Object value){
  Object attributeValue=value;
  if (isContainer) {
    Object results=containerPolicy.containerInstance(containerPolicy.sizeFor(attributeValue));
    Object iterator=containerPolicy.iteratorFor(attributeValue);
    while (containerPolicy.hasNext(iterator)) {
      Object next=containerPolicy.next(iterator,null);
      if (next instanceof XMLRoot) {
        XMLRoot root=(XMLRoot)next;
        QName name=new QName(root.getNamespaceURI(),root.getLocalName());
        JAXBElement element=new JAXBElement(name,root.getObject().getClass(),root.getObject());
        containerPolicy.addInto(element,results,null);
      }
 else {
        containerPolicy.addInto(next,results,null);
      }
    }
    attributeValue=results;
  }
 else {
    if (attributeValue instanceof XMLRoot) {
      XMLRoot root=(XMLRoot)attributeValue;
      QName name=new QName(root.getNamespaceURI(),root.getLocalName());
      JAXBElement element=new JAXBElement(name,root.getObject().getClass(),root.getObject());
      attributeValue=element;
    }
  }
  nestedAccessor.setAttributeValueInObject(object,attributeValue);
}

Fixed version (ground truth):
public void setAttributeValueInObject(Object object,Object value){
  Object attributeValue=value;
  if (isContainer) {
    Object results=containerPolicy.containerInstance(containerPolicy.sizeFor(attributeValue));
    Object iterator=containerPolicy.iteratorFor(attributeValue);
    while (containerPolicy.hasNext(iterator)) {
      Object next=containerPolicy.next(iterator,null);
      Object objectToAdd=unwrapObject(next);
      containerPolicy.addInto(objectToAdd,results,null);
    }
    attributeValue=results;
  }
 else {
    if (attributeValue instanceof XMLRoot) {
      XMLRoot root=(XMLRoot)attributeValue;
      QName name=new QName(root.getNamespaceURI(),root.getLocalName());
      JAXBElement element=new JAXBElement(name,root.getObject().getClass(),root.getObject());
      attributeValue=element;
    }
  }
  nestedAccessor.setAttributeValueInObject(object,attributeValue);
}
Program: 67773
Project: 67773
Buggy source:
public Unmarshaller createUnmarshaller(){
  JAXBUnmarshaller unmarshaller=new JAXBUnmarshaller(xmlContext.createUnmarshaller());
  if (generator != null && generator.hasUnmarshalCallbacks()) {
    for (Iterator callIt=generator.getUnmarshalCallbacks().keySet().iterator(); callIt.hasNext(); ) {
      UnmarshalCallback cb=(UnmarshalCallback)generator.getUnmarshalCallbacks().get(callIt.next());
      cb.initialize(generator.getClass().getClassLoader());
    }
    unmarshaller.setUnmarshalCallbacks(generator.getUnmarshalCallbacks());
  }
  unmarshaller.setGeneratedClassesToQName(this.generatedClassesToQName);
  return unmarshaller;
}

Fixed version (ground truth):
public Unmarshaller createUnmarshaller(){
  JAXBUnmarshaller unmarshaller=new JAXBUnmarshaller(xmlContext.createUnmarshaller());
  if (generator != null && generator.hasUnmarshalCallbacks()) {
    for (Iterator callIt=generator.getUnmarshalCallbacks().keySet().iterator(); callIt.hasNext(); ) {
      UnmarshalCallback cb=(UnmarshalCallback)generator.getUnmarshalCallbacks().get(callIt.next());
      cb.initialize(generator.getClass().getClassLoader());
    }
    unmarshaller.setUnmarshalCallbacks(generator.getUnmarshalCallbacks());
  }
  return unmarshaller;
}
Program: 67774
Project: 67774
Buggy source:
public JAXBContext(XMLContext context,Generator generator){
  super();
  this.xmlContext=context;
  this.generator=generator;
  this.generatedClassesToQName=generator.getMappingsGenerator().getGeneratedClassesToQName();
  this.qNameToGeneratedClasses=generator.getMappingsGenerator().getQNamesToGeneratedClasses();
}

Fixed version (ground truth):
public JAXBContext(XMLContext context,Generator generator){
  super();
  this.xmlContext=context;
  this.generator=generator;
  this.qNameToGeneratedClasses=generator.getMappingsGenerator().getQNamesToGeneratedClasses();
}
Program: 67775
Project: 67775
Buggy source:
private Object createJAXBElementIfRequired(Object value){
  if (this.generatedClassesToQName != null) {
    QName qname=this.generatedClassesToQName.get(value.getClass());
    if (qname != null) {
      Object unwrappedValue=null;
      if (value instanceof WrappedValue) {
        unwrappedValue=((WrappedValue)value).getWrappedValue();
      }
      return createJAXBElement(qname,unwrappedValue);
    }
  }
  if (value instanceof XMLRoot) {
    return createJAXBElementFromXMLRoot((XMLRoot)value);
  }
  return value;
}

Fixed version (ground truth):
private Object createJAXBElementIfRequired(Object value){
  if (value instanceof WrappedValue) {
    return createJAXBElementFromWrappedValue(((WrappedValue)value));
  }
  if (value instanceof XMLRoot) {
    return createJAXBElementFromXMLRoot((XMLRoot)value);
  }
  return value;
}
Program: 67776
Project: 67776
Buggy source:
private JAXBElement createJAXBElementFromXMLRoot(XMLRoot xmlRoot){
  Object value=xmlRoot.getObject();
  QName qname=new QName(xmlRoot.getNamespaceURI(),xmlRoot.getLocalName());
  return createJAXBElement(qname,value);
}

Fixed version (ground truth):
private JAXBElement createJAXBElementFromXMLRoot(XMLRoot xmlRoot){
  Object value=xmlRoot.getObject();
  QName qname=new QName(xmlRoot.getNamespaceURI(),xmlRoot.getLocalName());
  if (value == null) {
    return createJAXBElement(qname,Object.class,value);
  }
 else {
    return createJAXBElement(qname,value.getClass(),value);
  }
}
Program: 67777
Project: 67777
Buggy source:
/** 
 * Create a JAXBElement instance.  If the object is an instance of XMLRoot, we will use its field values to create the  JAXBElement.  If the object is not an XMLRoot instance, we will have to determine the 'name' value.  This will be done  using the object's descriptor default root element - any prefix will be resolved, and a QName created.
 * @param obj
 * @return
 */
private JAXBElement buildJAXBElementFromObject(Object obj){
  if (obj instanceof XMLRoot) {
    return createJAXBElementFromXMLRoot(((XMLRoot)obj));
  }
  org.eclipse.persistence.sessions.Session sess=xmlUnmarshaller.getXMLContext().getSession(obj);
  XMLDescriptor desc=(XMLDescriptor)sess.getClassDescriptor(obj);
  String rootName=desc.getDefaultRootElement();
  if (rootName == null) {
    return createJAXBElement(new QName("String_Node_Str"),obj);
  }
  String rootNamespaceUri=null;
  int idx=rootName.indexOf("String_Node_Str");
  if (idx != -1) {
    rootNamespaceUri=desc.getNamespaceResolver().resolveNamespacePrefix(rootName.substring(0,idx));
    rootName=rootName.substring(idx + 1);
  }
  QName qname;
  if (rootNamespaceUri == null) {
    qname=new QName(rootName);
  }
 else {
    qname=new QName(rootNamespaceUri,rootName);
  }
  return createJAXBElement(qname,obj);
}

Fixed version (ground truth):
/** 
 * Create a JAXBElement instance.  If the object is an instance of XMLRoot, we will use its field values to create the  JAXBElement.  If the object is not an XMLRoot instance, we will have to determine the 'name' value.  This will be done  using the object's descriptor default root element - any prefix will be resolved, and a QName created.
 * @param obj
 * @return
 */
private JAXBElement buildJAXBElementFromObject(Object obj){
  if (obj instanceof XMLRoot) {
    return createJAXBElementFromXMLRoot(((XMLRoot)obj));
  }
  if (obj instanceof WrappedValue) {
    return createJAXBElementFromWrappedValue(((WrappedValue)obj));
  }
  org.eclipse.persistence.sessions.Session sess=xmlUnmarshaller.getXMLContext().getSession(obj);
  XMLDescriptor desc=(XMLDescriptor)sess.getClassDescriptor(obj);
  String rootName=desc.getDefaultRootElement();
  if (rootName == null) {
    return createJAXBElement(new QName("String_Node_Str"),obj.getClass(),obj);
  }
  String rootNamespaceUri=null;
  int idx=rootName.indexOf("String_Node_Str");
  if (idx != -1) {
    rootNamespaceUri=desc.getNamespaceResolver().resolveNamespacePrefix(rootName.substring(0,idx));
    rootName=rootName.substring(idx + 1);
  }
  QName qname;
  if (rootNamespaceUri == null) {
    qname=new QName(rootName);
  }
 else {
    qname=new QName(rootNamespaceUri,rootName);
  }
  Object jaxbElement=createJAXBElementIfRequired(obj);
  return createJAXBElement(qname,obj.getClass(),obj);
}
Program: 67778
Project: 67778
Buggy source:
private JAXBElement createJAXBElement(QName qname,Object value){
  Class theClass=value.getClass();
  if (value instanceof XMLGregorianCalendar) {
    theClass=ClassConstants.XML_GREGORIAN_CALENDAR;
  }
 else   if (value instanceof Duration) {
    theClass=ClassConstants.DURATION;
  }
  return new JAXBElement(qname,theClass,value);
}

Fixed version (ground truth):
private JAXBElement createJAXBElement(QName qname,Class theClass,Object value){
  if (ClassConstants.XML_GREGORIAN_CALENDAR.isAssignableFrom(theClass)) {
    theClass=ClassConstants.XML_GREGORIAN_CALENDAR;
  }
 else   if (ClassConstants.DURATION.isAssignableFrom(theClass)) {
    theClass=ClassConstants.DURATION;
  }
  return new JAXBElement(qname,theClass,value);
}
Program: 67780
Project: 67780
Buggy source:
public MappingsGenerator(Helper helper){
  this.helper=helper;
  jotArrayList=helper.getJavaClass(ArrayList.class);
  jotHashSet=helper.getJavaClass(HashSet.class);
  generatedClassesToQNames=new HashMap<Class,QName>();
  qNamesToGeneratedClasses=new HashMap<QName,Class>();
}

Fixed version (ground truth):
public MappingsGenerator(Helper helper){
  this.helper=helper;
  jotArrayList=helper.getJavaClass(ArrayList.class);
  jotHashSet=helper.getJavaClass(HashSet.class);
  qNamesToGeneratedClasses=new HashMap<QName,Class>();
}
Program: 67781
Project: 67781
Buggy source:
public XMLAnyCollectionMapping generateAnyCollectionMapping(Property property,XMLDescriptor descriptor,NamespaceInfo namespaceInfo){
  AnyProperty prop=(AnyProperty)property;
  XMLAnyCollectionMapping mapping=new XMLAnyCollectionMapping();
  mapping.setAttributeName(property.getPropertyName());
  if (prop.isLax()) {
    mapping.setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT);
  }
 else {
    mapping.setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT);
  }
  if (prop.getDomHandlerClass() != null) {
    DomHandlerConverter converter=new DomHandlerConverter(prop.getDomHandlerClass());
    mapping.setConverter(converter);
  }
  descriptor.addMapping(mapping);
  return mapping;
}

Fixed version (ground truth):
public XMLAnyCollectionMapping generateAnyCollectionMapping(Property property,XMLDescriptor descriptor,NamespaceInfo namespaceInfo){
  AnyProperty prop=(AnyProperty)property;
  XMLAnyCollectionMapping mapping=new XMLAnyCollectionMapping();
  mapping.setAttributeName(property.getPropertyName());
  mapping.setUseXMLRoot(true);
  mapping.setAttributeAccessor(new JAXBElementAttributeAccessor(mapping.getAttributeAccessor(),mapping.getContainerPolicy()));
  if (prop.isLax()) {
    mapping.setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT);
  }
 else {
    mapping.setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT);
  }
  if (prop.getDomHandlerClass() != null) {
    DomHandlerConverter converter=new DomHandlerConverter(prop.getDomHandlerClass());
    mapping.setConverter(converter);
  }
  descriptor.addMapping(mapping);
  return mapping;
}
Program: 67782
Project: 67782
Buggy source:
public Project generateProject(ArrayList<JavaClass> typeInfoClasses,HashMap<String,TypeInfo> typeInfo,HashMap userDefinedSchemaTypes,HashMap<String,NamespaceInfo> packageToNamespaceMappings,HashMap<QName,ElementDeclaration> globalElements) throws Exception {
  this.typeInfo=typeInfo;
  this.userDefinedSchemaTypes=userDefinedSchemaTypes;
  this.packageToNamespaceMappings=packageToNamespaceMappings;
  this.globalElements=globalElements;
  Project project=new Project();
  for (  JavaClass next : typeInfoClasses) {
    if (!next.isEnum()) {
      generateDescriptor(next,project);
    }
  }
  generateMappings();
  processGlobalElements(project);
  return project;
}

Fixed version (ground truth):
public Project generateProject(ArrayList<JavaClass> typeInfoClasses,HashMap<String,TypeInfo> typeInfo,HashMap userDefinedSchemaTypes,HashMap<String,NamespaceInfo> packageToNamespaceMappings,HashMap<QName,ElementDeclaration> globalElements) throws Exception {
  this.typeInfo=typeInfo;
  this.userDefinedSchemaTypes=userDefinedSchemaTypes;
  this.packageToNamespaceMappings=packageToNamespaceMappings;
  this.globalElements=globalElements;
  Project project=new Project();
  for (  JavaClass next : typeInfoClasses) {
    if (!next.isEnum()) {
      generateDescriptor(next,project);
    }
  }
  generateMappings();
  processGlobalElements(project);
  wrapperCounter=0;
  return project;
}
Program: 67784
Project: 67784
Buggy source:
/** 
 * Test should serialize/deserialize successfully/
 */
public void testResolveWithHelperContextSetInUserMap(){
  SDOHelperContext.putHelperContext(Thread.currentThread().getContextClassLoader(),localCtx);
  serialize(localDObj,FILE_NAME);
  DataObject dobj=deserialize(FILE_NAME);
  String dobjImplClassName=dobj.getType().getInstanceClass().getName();
  assertTrue("String_Node_Str" + implClassname + "String_Node_Str"+ dobjImplClassName+ "String_Node_Str",dobjImplClassName.equals(implClassname));
  SDOHelperContext.removeHelperContext(Thread.currentThread().getContextClassLoader());
}

Fixed version (ground truth):
/** 
 * Test should serialize/deserialize successfully/
 */
public void testResolveWithHelperContextSetInUserMap(){
  SDOHelperContext.putHelperContext(Thread.currentThread().getContextClassLoader(),localCtx);
  serialize(localDObj,FILE_NAME);
  SDODataObject dobj=(SDODataObject)deserialize(FILE_NAME);
  String dobjImplClassName=dobj.getType().getInstanceClassName();
  assertTrue("String_Node_Str" + implClassname + "String_Node_Str"+ dobjImplClassName+ "String_Node_Str",dobjImplClassName.equals(implClassname));
  SDOHelperContext.removeHelperContext(Thread.currentThread().getContextClassLoader());
}
Program: 67785
Project: 67785
Buggy source:
public void testInstanceClassInvlaidNameWithNullInstanceClass(){
  SDOType type=new SDOType("String_Node_Str","String_Node_Str");
  type.setInstanceClass(null);
  type.setInstanceClassName("String_Node_Str");
  Class theClass=type.getInstanceClass();
  assertNotNull(theClass);
}

Fixed version (ground truth):
public void testInstanceClassInvlaidNameWithNullInstanceClass(){
  SDOType type=new SDOType("String_Node_Str","String_Node_Str");
  type.setInstanceClass(null);
  type.setInstanceClassName("String_Node_Str");
  Class theClass=type.getInstanceClass();
  assertNull(theClass);
}
Program: 67786
Project: 67786
Buggy source:
public Class getInstanceClass(){
  if ((javaClass == null) && (javaClassName != null)) {
    try {
      SDOClassLoader loader=((SDOXMLHelper)aHelperContext.getXMLHelper()).getLoader();
      if (!isDataType() && (javaImplClass == null)) {
        javaImplClass=loader.loadClass(getImplClassName(),this);
        getXmlDescriptor().setJavaClass(javaImplClass);
      }
      javaClass=loader.loadClass(javaClassName,this);
    }
 catch (    ClassNotFoundException e) {
      throw SDOException.classNotFound(e,getURI(),getName());
    }
catch (    SecurityException e) {
      throw SDOException.classNotFound(e,getURI(),getName());
    }
  }
  return javaClass;
}

Fixed version (ground truth):
public Class getInstanceClass(){
  if ((javaClass == null) && (javaClassName != null)) {
    try {
      SDOClassLoader loader=((SDOXMLHelper)aHelperContext.getXMLHelper()).getLoader();
      javaClass=loader.getParent().loadClass(javaClassName);
    }
 catch (    ClassNotFoundException e) {
      javaClass=getClass();
    }
catch (    SecurityException e) {
      throw SDOException.classNotFound(e,getURI(),getName());
    }
  }
  if (javaClass == getClass()) {
    return null;
  }
  return javaClass;
}
Program: 67787
Project: 67787
Buggy source:
/** 
 * INTERNAL: Sets the Java class that this type represents.
 * @param aClass the Java class that this type represents.
 */
public void setInstanceClass(Class aClass){
  javaClass=aClass;
  if (javaClass != null) {
    javaClassName=javaClass.getName();
  }
  if (getXmlDescriptor() != null) {
    getXmlDescriptor().setJavaClass(aClass);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Sets the Java class that this type represents.
 * @param aClass the Java class that this type represents.
 */
public void setInstanceClass(Class aClass){
  javaClass=aClass;
  if (javaClass != null) {
    javaClassName=javaClass.getName();
  }
}
Program: 67789
Project: 67789
Buggy source:
private String getJavaTypeForProperty(Property property){
  if (property.isMany() || ((SDOType)property.getType()).isXsdList()) {
    return "String_Node_Str";
  }
 else {
    Class instanceClass=property.getType().getInstanceClass();
    if (instanceClass.equals(ClassConstants.ABYTE)) {
      return "String_Node_Str";
    }
 else     if (instanceClass.equals(ClassConstants.APBYTE)) {
      return "String_Node_Str";
    }
    return instanceClass.getName();
  }
}

Fixed version (ground truth):
private String getJavaTypeForProperty(SDOProperty property){
  if (property.isMany() || ((SDOType)property.getType()).isXsdList()) {
    return "String_Node_Str";
  }
 else {
    SDOType propertyType=property.getType();
    Class instanceClass=propertyType.getInstanceClass();
    if (ClassConstants.ABYTE.equals(instanceClass)) {
      return "String_Node_Str";
    }
 else     if (ClassConstants.APBYTE.equals(instanceClass)) {
      return "String_Node_Str";
    }
    return propertyType.getInstanceClassName();
  }
}
Program: 67790
Project: 67790
Buggy source:
public SDOChangeSummaryType(SDOTypeHelper sdoTypeHelper){
  super(SDOConstants.SDO_URL,SDOConstants.CHANGESUMMARY,sdoTypeHelper);
  xmlDescriptor.setJavaClass(SDOChangeSummary.class);
  xmlDescriptor.setSequencedObject(false);
  XMLDirectMapping loggingMapping=new XMLDirectMapping();
  loggingMapping.setAttributeName("String_Node_Str");
  loggingMapping.setXPath("String_Node_Str");
  loggingMapping.setNullValue(Boolean.TRUE);
  xmlDescriptor.addMapping(loggingMapping);
  XMLCompositeDirectCollectionMapping createdMapping=new XMLCompositeDirectCollectionMapping();
  createdMapping.setAttributeName("String_Node_Str");
  createdMapping.setXPath("String_Node_Str");
  createdMapping.useCollectionClass(ArrayList.class);
  ((XMLField)createdMapping.getField()).setUsesSingleNode(true);
  xmlDescriptor.addMapping(createdMapping);
  XMLCompositeDirectCollectionMapping deletedMapping=new XMLCompositeDirectCollectionMapping();
  deletedMapping.setAttributeName("String_Node_Str");
  deletedMapping.setXPath("String_Node_Str");
  deletedMapping.useCollectionClass(ArrayList.class);
  ((XMLField)deletedMapping.getField()).setUsesSingleNode(true);
  xmlDescriptor.addMapping(deletedMapping);
  XMLAnyCollectionMapping aChangeMapping=new XMLAnyCollectionMapping();
  aChangeMapping.setAttributeName("String_Node_Str");
  aChangeMapping.setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT);
  aChangeMapping.useCollectionClass(ArrayList.class);
  xmlDescriptor.addMapping(aChangeMapping);
}

Fixed version (ground truth):
public SDOChangeSummaryType(SDOTypeHelper sdoTypeHelper){
  super(SDOConstants.SDO_URL,SDOConstants.CHANGESUMMARY,sdoTypeHelper);
  setInstanceClass(ChangeSummary.class);
  xmlDescriptor.setJavaClass(SDOChangeSummary.class);
  xmlDescriptor.setSequencedObject(false);
  XMLDirectMapping loggingMapping=new XMLDirectMapping();
  loggingMapping.setAttributeName("String_Node_Str");
  loggingMapping.setXPath("String_Node_Str");
  loggingMapping.setNullValue(Boolean.TRUE);
  xmlDescriptor.addMapping(loggingMapping);
  XMLCompositeDirectCollectionMapping createdMapping=new XMLCompositeDirectCollectionMapping();
  createdMapping.setAttributeName("String_Node_Str");
  createdMapping.setXPath("String_Node_Str");
  createdMapping.useCollectionClass(ArrayList.class);
  ((XMLField)createdMapping.getField()).setUsesSingleNode(true);
  xmlDescriptor.addMapping(createdMapping);
  XMLCompositeDirectCollectionMapping deletedMapping=new XMLCompositeDirectCollectionMapping();
  deletedMapping.setAttributeName("String_Node_Str");
  deletedMapping.setXPath("String_Node_Str");
  deletedMapping.useCollectionClass(ArrayList.class);
  ((XMLField)deletedMapping.getField()).setUsesSingleNode(true);
  xmlDescriptor.addMapping(deletedMapping);
  XMLAnyCollectionMapping aChangeMapping=new XMLAnyCollectionMapping();
  aChangeMapping.setAttributeName("String_Node_Str");
  aChangeMapping.setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT);
  aChangeMapping.useCollectionClass(ArrayList.class);
  xmlDescriptor.addMapping(aChangeMapping);
}