nus-yam/ex-repair huggingface dataset:
Program: 67691
Project: 67691
Buggy source:
public QName getQNameForProperty(String defaultName,JavaHasAnnotations element,NamespaceInfo namespaceInfo){
  String name="String_Node_Str";
  String namespace="String_Node_Str";
  if (helper.isAnnotationPresent(element,XmlAttribute.class)) {
    XmlAttribute xmlAttribute=(XmlAttribute)helper.getAnnotation(element,XmlAttribute.class);
    name=xmlAttribute.name();
    namespace=xmlAttribute.namespace();
  }
 else   if (helper.isAnnotationPresent(element,XmlElement.class)) {
    XmlElement xmlElement=(XmlElement)helper.getAnnotation(element,XmlElement.class);
    name=xmlElement.name();
    namespace=xmlElement.namespace();
  }
  if (name.equals("String_Node_Str")) {
    name=defaultName;
  }
  QName qName=null;
  if (!namespace.equals("String_Node_Str")) {
    qName=new QName(namespace,name);
  }
 else {
    qName=new QName(name);
  }
  return qName;
}

Fixed version (ground truth):
public QName getQNameForProperty(String defaultName,JavaHasAnnotations element,NamespaceInfo namespaceInfo){
  String name="String_Node_Str";
  String namespace="String_Node_Str";
  QName qName=null;
  if (helper.isAnnotationPresent(element,XmlAttribute.class)) {
    XmlAttribute xmlAttribute=(XmlAttribute)helper.getAnnotation(element,XmlAttribute.class);
    name=xmlAttribute.name();
    namespace=xmlAttribute.namespace();
    if (name.equals("String_Node_Str")) {
      name=defaultName;
    }
    if (!namespace.equals("String_Node_Str")) {
      qName=new QName(namespace,name);
    }
 else {
      if (namespaceInfo.isAttributeFormQualified()) {
        qName=new QName(namespaceInfo.getNamespace(),name);
      }
 else {
        qName=new QName(name);
      }
    }
  }
 else {
    if (helper.isAnnotationPresent(element,XmlElement.class)) {
      XmlElement xmlElement=(XmlElement)helper.getAnnotation(element,XmlElement.class);
      name=xmlElement.name();
      namespace=xmlElement.namespace();
    }
    if (name.equals("String_Node_Str")) {
      name=defaultName;
    }
    if (!namespace.equals("String_Node_Str")) {
      qName=new QName(namespace,name);
    }
 else {
      if (namespaceInfo.isElementFormQualified()) {
        qName=new QName(namespaceInfo.getNamespace(),name);
      }
 else {
        qName=new QName(name);
      }
    }
  }
  return qName;
}
Program: 67692
Project: 67692
Buggy source:
public XMLField getXPathForElement(String path,QName elementName,NamespaceInfo namespaceInfo,boolean isText){
  String namespace="String_Node_Str";
  if (namespaceInfo.isElementFormQualified()) {
    namespace=namespaceInfo.getNamespace();
  }
  if (!elementName.getNamespaceURI().equals("String_Node_Str")) {
    namespace=elementName.getNamespaceURI();
  }
  if (namespace.equals("String_Node_Str")) {
    path+=elementName.getLocalPart();
    if (isText) {
      path+="String_Node_Str";
    }
  }
 else {
    String prefix=getPrefixForNamespace(namespace,namespaceInfo.getNamespaceResolver());
    path+=prefix + "String_Node_Str" + elementName.getLocalPart();
    if (isText) {
      path+="String_Node_Str";
    }
  }
  XMLField xmlField=new XMLField(path);
  return xmlField;
}

Fixed version (ground truth):
public XMLField getXPathForElement(String path,QName elementName,NamespaceInfo namespaceInfo,boolean isText){
  String namespace="String_Node_Str";
  if (!elementName.getNamespaceURI().equals("String_Node_Str")) {
    namespace=elementName.getNamespaceURI();
  }
  if (namespace.equals("String_Node_Str")) {
    path+=elementName.getLocalPart();
    if (isText) {
      path+="String_Node_Str";
    }
  }
 else {
    String prefix=getPrefixForNamespace(namespace,namespaceInfo.getNamespaceResolver());
    path+=prefix + "String_Node_Str" + elementName.getLocalPart();
    if (isText) {
      path+="String_Node_Str";
    }
  }
  XMLField xmlField=new XMLField(path);
  return xmlField;
}
Program: 67695
Project: 67695
Buggy source:
public List getBaseTypes(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getBaseTypes(){
  return Collections.EMPTY_LIST;
}
Program: 67696
Project: 67696
Buggy source:
public List getDeclaredProperties(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getDeclaredProperties(){
  return Collections.EMPTY_LIST;
}
Program: 67697
Project: 67697
Buggy source:
public List getProperties(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getProperties(){
  return Collections.EMPTY_LIST;
}
Program: 67698
Project: 67698
Buggy source:
public List getAliasNames(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getAliasNames(){
  return Collections.EMPTY_LIST;
}
Program: 67699
Project: 67699
Buggy source:
public List getInstanceProperties(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getInstanceProperties(){
  return Collections.EMPTY_LIST;
}
Program: 67700
Project: 67700
Buggy source:
public List getBaseTypes(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getBaseTypes(){
  return Collections.EMPTY_LIST;
}
Program: 67701
Project: 67701
Buggy source:
public List getAliasNames(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getAliasNames(){
  return Collections.EMPTY_LIST;
}
Program: 67702
Project: 67702
Buggy source:
public List getBaseTypes(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getBaseTypes(){
  return Collections.EMPTY_LIST;
}
Program: 67703
Project: 67703
Buggy source:
public SDOOpenSequencedType(SDOTypeHelper sdoTypeHelper){
  super(SDOConstants.ORACLE_SDO_URL,"String_Node_Str",sdoTypeHelper);
  this.xmlDescriptor.setNamespaceResolver(new NamespaceResolver());
  setInstanceClassName(ORACLE_SDO_DO_URL + "String_Node_Str");
  setImplClassName(ORACLE_SDO_DO_URL + "String_Node_Str");
  getInstanceClass();
  Class implClass=getImplClass();
  xmlDescriptor.setJavaClass(implClass);
  setMixed(true);
  setSequenced(true);
  setOpen(true);
  setFinalized(true);
}

Fixed version (ground truth):
public SDOOpenSequencedType(SDOTypeHelper sdoTypeHelper){
  super(SDOConstants.ORACLE_SDO_URL,"String_Node_Str",sdoTypeHelper);
  this.xmlDescriptor.setNamespaceResolver(new NamespaceResolver());
  setInstanceClass(OpenSequencedType.class);
  setImplClassName(ORACLE_SDO_DO_URL + "String_Node_Str");
  Class implClass=getImplClass();
  xmlDescriptor.setJavaClass(implClass);
  setMixed(true);
  setSequenced(true);
  setOpen(true);
  setFinalized(true);
}
Program: 67704
Project: 67704
Buggy source:
public List getAliasNames(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getAliasNames(){
  return Collections.EMPTY_LIST;
}
Program: 67705
Project: 67705
Buggy source:
public List getBaseTypes(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getBaseTypes(){
  return Collections.EMPTY_LIST;
}
Program: 67706
Project: 67706
Buggy source:
public List getAliasNames(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getAliasNames(){
  return Collections.EMPTY_LIST;
}
Program: 67707
Project: 67707
Buggy source:
public List getBaseTypes(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getBaseTypes(){
  return Collections.EMPTY_LIST;
}
Program: 67709
Project: 67709
Buggy source:
public List getAliasNames(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getAliasNames(){
  return Collections.EMPTY_LIST;
}
Program: 67710
Project: 67710
Buggy source:
public List getBaseTypes(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getBaseTypes(){
  return Collections.EMPTY_LIST;
}
Program: 67711
Project: 67711
Buggy source:
public List getAliasNames(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getAliasNames(){
  return Collections.EMPTY_LIST;
}
Program: 67712
Project: 67712
Buggy source:
public List getBaseTypes(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getBaseTypes(){
  return Collections.EMPTY_LIST;
}
Program: 67713
Project: 67713
Buggy source:
public List getAliasNames(){
  return EMPTY_LIST;
}

Fixed version (ground truth):
public List getAliasNames(){
  return Collections.EMPTY_LIST;
}
Program: 67714
Project: 67714
Buggy source:
public JAXBElementAttributeAccessor(AttributeAccessor nestedAccessor,ContainerPolicy containerPolicy){
  this.nestedAccessor=nestedAccessor;
  this.containerPolicy=containerPolicy;
  this.isContainer=true;
}

Fixed version (ground truth):
public JAXBElementAttributeAccessor(AttributeAccessor nestedAccessor,ContainerPolicy containerPolicy){
  this.nestedAccessor=nestedAccessor;
  this.containerPolicy=containerPolicy;
  this.isContainer=true;
  qNamesToScopes=new HashMap<QName,Class>();
}
Program: 67715
Project: 67715
Buggy source:
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);
}

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;
  }
  Class scopeClass=qNamesToScopes.get(qname);
  return new JAXBElement(qname,theClass,scopeClass,value);
}
Program: 67717
Project: 67717
Buggy source:
public ElementDeclaration(QName name,JavaClass javaType,String javaTypeName,boolean isList){
  this.elementName=name;
  this.javaTypeName=javaTypeName;
  this.javaType=javaType;
  this.substitutableElements=new ArrayList<ElementDeclaration>();
  this.isList=isList;
}

Fixed version (ground truth):
public ElementDeclaration(QName name,JavaClass javaType,String javaTypeName,boolean isList,Class scopeClass){
  this(name,javaType,javaTypeName,isList);
  this.scopeClass=scopeClass;
}
Program: 67719
Project: 67719
Buggy source:
public XMLMapping generateCollectionMappingForReferenceProperty(ReferenceProperty property,XMLDescriptor descriptor,NamespaceInfo namespaceInfo){
  XMLChoiceCollectionMapping mapping=new XMLChoiceCollectionMapping();
  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,mapping.getContainerPolicy()));
  }
  descriptor.addMapping(mapping);
  return mapping;
}

Fixed version (ground truth):
public XMLMapping generateCollectionMappingForReferenceProperty(ReferenceProperty property,XMLDescriptor descriptor,NamespaceInfo namespaceInfo){
  XMLChoiceCollectionMapping mapping=new XMLChoiceCollectionMapping();
  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();
  Map<QName,Class> qNamesToScopeClass=new HashMap<QName,Class>();
  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);
      qNamesToScopeClass.put(elementName,element.getScopeClass());
    }
    hasJAXBElements=hasJAXBElements || !element.isXmlRootElement();
  }
  if (hasJAXBElements) {
    JAXBElementAttributeAccessor accessor=new JAXBElementAttributeAccessor(mappingAccessor,mapping.getContainerPolicy());
    accessor.setQNamesToScopes(qNamesToScopeClass);
    mapping.setAttributeAccessor(accessor);
  }
  descriptor.addMapping(mapping);
  return mapping;
}
Program: 67721
Project: 67721
Buggy source:
public QName getQNameForProperty(String defaultName,JavaHasAnnotations element,NamespaceInfo namespaceInfo){
  String name="String_Node_Str";
  String namespace="String_Node_Str";
  QName qName=null;
  if (helper.isAnnotationPresent(element,XmlAttribute.class)) {
    XmlAttribute xmlAttribute=(XmlAttribute)helper.getAnnotation(element,XmlAttribute.class);
    name=xmlAttribute.name();
    namespace=xmlAttribute.namespace();
    if (name.equals("String_Node_Str")) {
      name=defaultName;
    }
    if (!namespace.equals("String_Node_Str")) {
      qName=new QName(namespace,name);
    }
 else {
      if (namespaceInfo.isAttributeFormQualified()) {
        qName=new QName(namespaceInfo.getNamespace(),name);
      }
 else {
        qName=new QName(name);
      }
    }
  }
 else {
    if (helper.isAnnotationPresent(element,XmlElement.class)) {
      XmlElement xmlElement=(XmlElement)helper.getAnnotation(element,XmlElement.class);
      name=xmlElement.name();
      namespace=xmlElement.namespace();
    }
    if (name.equals("String_Node_Str")) {
      name=defaultName;
    }
    if (!namespace.equals("String_Node_Str")) {
      qName=new QName(namespace,name);
    }
 else {
      if (namespaceInfo.isElementFormQualified()) {
        qName=new QName(namespaceInfo.getNamespace(),name);
      }
 else {
        qName=new QName(name);
      }
    }
  }
  return qName;
}

Fixed version (ground truth):
public QName getQNameForProperty(String defaultName,JavaHasAnnotations element,NamespaceInfo namespaceInfo){
  String name="String_Node_Str";
  String namespace="String_Node_Str";
  if (helper.isAnnotationPresent(element,XmlAttribute.class)) {
    XmlAttribute xmlAttribute=(XmlAttribute)helper.getAnnotation(element,XmlAttribute.class);
    name=xmlAttribute.name();
    namespace=xmlAttribute.namespace();
  }
 else   if (helper.isAnnotationPresent(element,XmlElement.class)) {
    XmlElement xmlElement=(XmlElement)helper.getAnnotation(element,XmlElement.class);
    name=xmlElement.name();
    namespace=xmlElement.namespace();
  }
  if (name.equals("String_Node_Str")) {
    name=defaultName;
  }
  QName qName=null;
  if (!namespace.equals("String_Node_Str")) {
    qName=new QName(namespace,name);
  }
 else {
    qName=new QName(name);
  }
  return qName;
}
Program: 67722
Project: 67722
Buggy source:
public XMLField getXPathForElement(String path,QName elementName,NamespaceInfo namespaceInfo,boolean isText){
  String namespace="String_Node_Str";
  if (!elementName.getNamespaceURI().equals("String_Node_Str")) {
    namespace=elementName.getNamespaceURI();
  }
  if (namespace.equals("String_Node_Str")) {
    path+=elementName.getLocalPart();
    if (isText) {
      path+="String_Node_Str";
    }
  }
 else {
    String prefix=getPrefixForNamespace(namespace,namespaceInfo.getNamespaceResolver());
    path+=prefix + "String_Node_Str" + elementName.getLocalPart();
    if (isText) {
      path+="String_Node_Str";
    }
  }
  XMLField xmlField=new XMLField(path);
  return xmlField;
}

Fixed version (ground truth):
public XMLField getXPathForElement(String path,QName elementName,NamespaceInfo namespaceInfo,boolean isText){
  String namespace="String_Node_Str";
  if (namespaceInfo.isElementFormQualified()) {
    namespace=namespaceInfo.getNamespace();
  }
  if (!elementName.getNamespaceURI().equals("String_Node_Str")) {
    namespace=elementName.getNamespaceURI();
  }
  if (namespace.equals("String_Node_Str")) {
    path+=elementName.getLocalPart();
    if (isText) {
      path+="String_Node_Str";
    }
  }
 else {
    String prefix=getPrefixForNamespace(namespace,namespaceInfo.getNamespaceResolver());
    path+=prefix + "String_Node_Str" + elementName.getLocalPart();
    if (isText) {
      path+="String_Node_Str";
    }
  }
  XMLField xmlField=new XMLField(path);
  return xmlField;
}
Program: 67724
Project: 67724
Buggy source:
private void reloadParticles(XSModelGroup xsGroup){
  ListIterator oldParticles=this.particles();
  ListIterator particleNodes=XercesTools.listIteratorFromXSObjectList(xsGroup.getParticles());
  while (oldParticles.hasNext() && particleNodes.hasNext()) {
    MWParticle oldParticle=(MWParticle)oldParticles.next();
    XSParticleDecl particleNode=(XSParticleDecl)particleNodes.next();
    if (oldParticle.isEquivalentTo((XSParticleDecl)particleNode)) {
      oldParticle.reload(particleNode);
    }
 else {
      oldParticles.remove();
      this.getProject().nodeRemoved(oldParticle);
      MWParticle newParticle=MWParticle.ParticleFactory.newParticle(this,particleNode);
      oldParticles.add(newParticle);
    }
  }
  while (oldParticles.hasNext()) {
    MWParticle next=(MWParticle)oldParticles.next();
    oldParticles.remove();
    this.getProject().nodeRemoved(next);
  }
  while (particleNodes.hasNext()) {
    XSParticleDecl particleNode=(XSParticleDecl)particleNodes.next();
    MWParticle newParticle=MWParticle.ParticleFactory.newParticle(this,particleNode);
    oldParticles.add(newParticle);
  }
}

Fixed version (ground truth):
private void reloadParticles(XSModelGroup xsGroup){
  List newParticles=new Vector();
  ListIterator oldParticles=this.particles();
  while (oldParticles.hasNext()) {
    MWParticle oldParticle=(MWParticle)oldParticles.next();
    if (!containsEquivalentNode(oldParticle,XercesTools.listIteratorFromXSObjectList(xsGroup.getParticles()))) {
      oldParticles.remove();
      this.getProject().nodeRemoved(oldParticle);
    }
  }
  ListIterator particleNodes=XercesTools.listIteratorFromXSObjectList(xsGroup.getParticles());
  while (particleNodes.hasNext()) {
    XSParticleDecl particleNode=(XSParticleDecl)particleNodes.next();
    MWParticle oldParticle=containsEquivalentParticle(particleNode,this.particles());
    if (oldParticle != null) {
      oldParticle.reload(particleNode);
      newParticles.add(oldParticle);
    }
 else {
      MWParticle newParticle=MWParticle.ParticleFactory.newParticle(this,particleNode);
      newParticles.add(newParticle);
    }
  }
  this.particles=newParticles;
}
Program: 67725
Project: 67725
Buggy source:
public boolean equals(Object object){
  if (object instanceof RootKeepAsElement) {
    if (t1 == null && ((RootKeepAsElement)object).getT1() == null) {
      return true;
    }
 else     if (t1 == null && ((RootKeepAsElement)object).getT1() != null) {
      return false;
    }
 else {
      Object value1=t1;
      Object value2=((RootKeepAsElement)object).getT1();
      if ((value1 instanceof ElementNSImpl) && (value2 instanceof ElementNSImpl)) {
        ElementNSImpl elem1=(ElementNSImpl)value1;
        ElementNSImpl elem2=(ElementNSImpl)value2;
        XMLMappingTestCases.assertEquals(elem1.getLocalName(),elem2.getLocalName());
        XMLMappingTestCases.assertEquals(elem1.getNamespaceURI(),elem2.getNamespaceURI());
        XMLMappingTestCases.assertEquals(elem1.getUserData(),elem2.getUserData());
        return true;
      }
 else {
        return this.t1.equals(((RootKeepAsElement)object).getT1());
      }
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean equals(Object object){
  if (object instanceof RootKeepAsElement) {
    if (t1 == null && ((RootKeepAsElement)object).getT1() == null) {
      return true;
    }
 else     if (t1 == null && ((RootKeepAsElement)object).getT1() != null) {
      return false;
    }
 else {
      Object value1=t1;
      Object value2=((RootKeepAsElement)object).getT1();
      if ((value1 instanceof Element) && (value2 instanceof Element)) {
        Element elem1=(Element)value1;
        Element elem2=(Element)value2;
        if (!(elem1.getLocalName().equals(elem2.getLocalName()))) {
          return false;
        }
        return true;
      }
 else {
        return this.t1.equals(((RootKeepAsElement)object).getT1());
      }
    }
  }
  return false;
}
Program: 67726
Project: 67726
Buggy source:
public Class loadClass(String className,SDOType type) throws ClassNotFoundException {
  Class javaClass=null;
  javaClass=(Class)generatedClasses.get(className);
  if (javaClass != null) {
    return javaClass;
  }
  try {
    javaClass=getParent().loadClass(className);
  }
 catch (  ClassNotFoundException e) {
    javaClass=createGeneric(className,type);
    if (javaClass == null) {
      throw e;
    }
  }
catch (  NoClassDefFoundError error) {
    javaClass=createGeneric(className,type);
    if (javaClass == null) {
      throw error;
    }
  }
  if (!type.isDataType() && null != aHelperContext && null != aHelperContext.getTypeHelper()) {
    ((SDOTypeHelper)aHelperContext.getTypeHelper()).getImplClassesToSDOType().put(javaClass,type);
  }
  return javaClass;
}

Fixed version (ground truth):
public Class loadClass(String className,SDOType type) throws ClassNotFoundException {
  Class javaClass=generatedClasses.get(className);
  if (javaClass != null) {
    return javaClass;
  }
  try {
    javaClass=getParent().loadClass(className);
  }
 catch (  ClassNotFoundException e) {
    javaClass=createGeneric(className,type);
    if (javaClass == null) {
      throw e;
    }
  }
catch (  NoClassDefFoundError error) {
    javaClass=createGeneric(className,type);
    if (javaClass == null) {
      throw error;
    }
  }
  if (!type.isDataType() && null != aHelperContext && null != aHelperContext.getTypeHelper()) {
    ((SDOTypeHelper)aHelperContext.getTypeHelper()).getImplClassesToSDOType().put(javaClass,type);
  }
  return javaClass;
}
Program: 67727
Project: 67727
Buggy source:
public static JPQLExceptionTest missingDescriptorExceptionTest(){
  JPQLExceptionTest theTest=new JPQLExceptionTest();
  theTest.expectedException=JPQLException.unknownAbstractSchemaType2(null,0,0,null);
  theTest.setName("String_Node_Str");
  theTest.setEjbqlString("String_Node_Str");
  return theTest;
}

Fixed version (ground truth):
public static JPQLExceptionTest missingDescriptorExceptionTest(){
  JPQLExceptionTest theTest=new JPQLExceptionTest();
  theTest.expectedException=JPQLException.entityTypeNotFound2(null,0,0,null);
  theTest.setName("String_Node_Str");
  theTest.setEjbqlString("String_Node_Str");
  return theTest;
}
Program: 67728
Project: 67728
Buggy source:
/** 
 * resolveClass: Answer the class which corresponds to my variableName. This is the class for an alias, where the variableName is registered to an alias.
 */
public Class resolveClass(GenerationContext context){
  String alias=abstractSchemaName;
  ClassDescriptor descriptor=context.getSession().getDescriptorForAlias(alias);
  if (descriptor == null) {
    throw JPQLException.unknownAbstractSchemaType2(context.getParseTreeContext().getQueryInfo(),getLine(),getColumn(),alias);
  }
  Class theClass=descriptor.getJavaClass();
  if (theClass == null) {
    throw JPQLException.resolutionClassNotFoundException2(context.getParseTreeContext().getQueryInfo(),getLine(),getColumn(),alias);
  }
  return theClass;
}

Fixed version (ground truth):
/** 
 * resolveClass: Answer the class which corresponds to my variableName. This is the class for an alias, where the variableName is registered to an alias.
 */
public Class resolveClass(GenerationContext context){
  String alias=abstractSchemaName;
  ClassDescriptor descriptor=context.getSession().getDescriptorForAlias(alias);
  if (descriptor == null) {
    throw JPQLException.entityTypeNotFound2(context.getParseTreeContext().getQueryInfo(),getLine(),getColumn(),alias);
  }
  Class theClass=descriptor.getJavaClass();
  if (theClass == null) {
    throw JPQLException.resolutionClassNotFoundException2(context.getParseTreeContext().getQueryInfo(),getLine(),getColumn(),alias);
  }
  return theClass;
}
Program: 67729
Project: 67729
Buggy source:
/** 
 * INTERNAL Answer the class associated with the provided schema name
 */
public Class classForSchemaName(String schemaName,GenerationContext context){
  ClassDescriptor descriptor=context.getSession().getDescriptorForAlias(schemaName);
  if (descriptor == null) {
    throw JPQLException.unknownAbstractSchemaType(getQueryInfo(),schemaName);
  }
  Class theClass=descriptor.getJavaClass();
  if (theClass == null) {
    throw JPQLException.resolutionClassNotFoundException(getQueryInfo(),schemaName);
  }
  return theClass;
}

Fixed version (ground truth):
/** 
 * INTERNAL Answer the class associated with the provided schema name
 */
public Class classForSchemaName(String schemaName,GenerationContext context){
  ClassDescriptor descriptor=context.getSession().getDescriptorForAlias(schemaName);
  if (descriptor == null) {
    throw JPQLException.entityTypeNotFound(getQueryInfo(),schemaName);
  }
  Class theClass=descriptor.getJavaClass();
  if (theClass == null) {
    throw JPQLException.resolutionClassNotFoundException(getQueryInfo(),schemaName);
  }
  return theClass;
}
Program: 67730
Project: 67730
Buggy source:
/** 
 * INTERNAL Validate node and calculate its type.
 */
public void validate(ParseTreeContext context){
  super.validate(context);
  TypeHelper typeHelper=context.getTypeHelper();
  Object type=typeHelper.resolveSchema(abstractSchemaName);
  if (type == null) {
    throw JPQLException.unknownAbstractSchemaType2(context.getQueryInfo(),getLine(),getColumn(),abstractSchemaName);
  }
  setType(type);
}

Fixed version (ground truth):
/** 
 * INTERNAL Validate node and calculate its type.
 */
public void validate(ParseTreeContext context){
  super.validate(context);
  TypeHelper typeHelper=context.getTypeHelper();
  Object type=typeHelper.resolveSchema(abstractSchemaName);
  if (type == null) {
    throw JPQLException.entityTypeNotFound2(context.getQueryInfo(),getLine(),getColumn(),abstractSchemaName);
  }
  setType(type);
}
Program: 67731
Project: 67731
Buggy source:
/** 
 * INTERNAL: Return the message for the given exception class and error number. Based on the state of the translate flag - look up translation for the key:value message
 * @param localizationClassName
 * @param key
 * @param arguments
 * @param translate
 * @return
 */
public static String buildMessage(String localizationClassName,String key,Object[] arguments,boolean translate){
  String message=key;
  ResourceBundle bundle=null;
  if (arguments != null) {
    for (int i=0; i < arguments.length; i++) {
      if (arguments[i] == null) {
        arguments[i]="String_Node_Str";
      }
    }
  }
  bundle=ResourceBundle.getBundle("String_Node_Str" + localizationClassName + "String_Node_Str",Locale.getDefault());
  try {
    message=bundle.getString(key);
  }
 catch (  java.util.MissingResourceException mre) {
    bundle=ResourceBundle.getBundle("String_Node_Str",Locale.getDefault());
    String noTranslationMessage=bundle.getString("String_Node_Str");
    if (translate) {
      return MessageFormat.format(message,arguments) + noTranslationMessage;
    }
 else {
      return MessageFormat.format(message,arguments);
    }
  }
  return MessageFormat.format(message,arguments);
}

Fixed version (ground truth):
/** 
 * INTERNAL: Return the message for the given exception class and error number. Based on the state of the translate flag - look up translation for the key:value message
 * @param localizationClassName
 * @param key
 * @param arguments
 * @param translate
 * @return
 */
public static String buildMessage(String localizationClassName,String key,Object[] arguments,boolean translate){
  String message=key;
  ResourceBundle bundle=null;
  String append="String_Node_Str";
  if (arguments != null) {
    for (int i=0; i < arguments.length; i++) {
      if (arguments[i] == null) {
        arguments[i]="String_Node_Str";
      }
    }
  }
  bundle=ResourceBundle.getBundle("String_Node_Str" + localizationClassName + "String_Node_Str",Locale.getDefault());
  try {
    message=bundle.getString(key);
  }
 catch (  java.util.MissingResourceException mre) {
    bundle=ResourceBundle.getBundle("String_Node_Str",Locale.getDefault());
    if (translate && !Locale.getDefault().getLanguage().equals(Locale.ENGLISH.getLanguage())) {
      append=bundle.getString("String_Node_Str");
    }
  }
  return MessageFormat.format(message,arguments) + append;
}
Program: 67732
Project: 67732
Buggy source:
public Object convertDataValueToObjectValue(Object dataValue,Session session){
  XMLRoot root=new XMLRoot();
  root.setLocalName(this.rootFragment.getLocalName());
  root.setNamespaceURI(this.rootFragment.getNamespaceURI());
  root.setObject(dataValue);
  return root;
}

Fixed version (ground truth):
public Object convertDataValueToObjectValue(Object dataValue,Session session){
  XMLRoot root=new XMLRoot();
  root.setLocalName(this.rootFragment.getLocalName());
  root.setNamespaceURI(this.rootFragment.getNamespaceURI());
  if (mapping.isAbstractDirectMapping()) {
    if ((dataValue == null) || (dataValue.getClass() != mapping.getAttributeClassification())) {
      try {
        dataValue=session.getDatasourcePlatform().convertObject(dataValue,mapping.getAttributeClassification());
      }
 catch (      ConversionException e) {
        throw ConversionException.couldNotBeConverted(this,mapping.getDescriptor(),e);
      }
    }
  }
  root.setObject(dataValue);
  return root;
}
Program: 67733
Project: 67733
Buggy source:
public void initialize(DatabaseMapping mapping,Session session){
  XPathFragment fragment=associatedField.getXPathFragment();
  while (fragment.getNextFragment() != null && !(fragment.getNextFragment().nameIsText())) {
    fragment=fragment.getNextFragment();
  }
  this.rootFragment=fragment;
}

Fixed version (ground truth):
public void initialize(DatabaseMapping mapping,Session session){
  XPathFragment fragment=associatedField.getXPathFragment();
  while (fragment.getNextFragment() != null && !(fragment.getNextFragment().nameIsText())) {
    fragment=fragment.getNextFragment();
  }
  this.rootFragment=fragment;
  this.mapping=mapping;
}
Program: 67734
Project: 67734
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);
      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);
}

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 {
    attributeValue=unwrapObject(attributeValue);
  }
  nestedAccessor.setAttributeValueInObject(object,attributeValue);
}
Program: 67735
Project: 67735
Buggy source:
public void setDescriptor(XMLDescriptor desc){
  if (isIDSet()) {
    String pkFieldName;
    if (helper.isAnnotationPresent(getIDProperty().getElement(),XmlAttribute.class)) {
      pkFieldName=ATT + getIDProperty().getSchemaName();
    }
 else {
      pkFieldName=getIDProperty().getSchemaName() + TXT;
    }
    desc.addPrimaryKeyFieldName(pkFieldName);
  }
  descriptor=desc;
  XMLSchemaClassPathReference schemaRef=new XMLSchemaClassPathReference();
  if (classNamespace == null || classNamespace == "String_Node_Str") {
    schemaRef.setSchemaContext("String_Node_Str" + schemaTypeName);
  }
 else {
    schemaRef.setSchemaContextAsQName(new QName(classNamespace,schemaTypeName));
  }
  if (isEnumerationType() || (propertyNames.size() == 1 && helper.isAnnotationPresent(getProperties().get(propertyNames.get(0)).getElement(),XmlValue.class))) {
    schemaRef.setType(XMLSchemaReference.SIMPLE_TYPE);
  }
  descriptor.setSchemaReference(schemaRef);
}

Fixed version (ground truth):
public void setDescriptor(XMLDescriptor desc){
  if (isIDSet()) {
    String pkFieldName;
    if (helper.isAnnotationPresent(getIDProperty().getElement(),XmlAttribute.class)) {
      pkFieldName=ATT + getIDProperty().getSchemaName();
    }
 else {
      pkFieldName=getIDProperty().getSchemaName() + TXT;
    }
    desc.addPrimaryKeyFieldName(pkFieldName);
  }
  descriptor=desc;
  XMLSchemaClassPathReference schemaRef=new XMLSchemaClassPathReference();
  if (classNamespace == null || classNamespace.equals("String_Node_Str")) {
    schemaRef.setSchemaContext("String_Node_Str" + schemaTypeName);
  }
 else {
    String prefix=desc.getNonNullNamespaceResolver().resolveNamespaceURI(classNamespace);
    if (prefix != null && !prefix.equals("String_Node_Str")) {
      schemaRef.setSchemaContext("String_Node_Str" + prefix + "String_Node_Str"+ schemaTypeName);
    }
 else {
      schemaRef.setSchemaContext("String_Node_Str" + schemaTypeName);
    }
    schemaRef.setSchemaContextAsQName(new QName(classNamespace,schemaTypeName));
  }
  if (isEnumerationType() || (propertyNames.size() == 1 && helper.isAnnotationPresent(getProperties().get(propertyNames.get(0)).getElement(),XmlValue.class))) {
    schemaRef.setType(XMLSchemaReference.SIMPLE_TYPE);
  }
  descriptor.setSchemaReference(schemaRef);
}
Program: 67736
Project: 67736
Buggy source:
/** 
 * INTERNAL: Converts a String which is in Base64 format to a Byte[]
 */
public byte[] convertSchemaBase64ToByteArray(Object sourceObject) throws ConversionException {
  if (!(sourceObject instanceof String)) {
    throw ConversionException.couldNotBeConverted(sourceObject,ClassConstants.APBYTE);
  }
  byte[] bytes=Base64.base64Decode(((String)sourceObject).getBytes());
  return bytes;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Converts a String which is in Base64 format to a Byte[]
 */
public byte[] convertSchemaBase64ToByteArray(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String) {
    byte[] bytes=Base64.base64Decode(((String)sourceObject).getBytes());
    return bytes;
  }
  return convertObjectToByteArray(sourceObject);
}
Program: 67738
Project: 67738
Buggy source:
public String getSchemaTypeNameForClassName(String className){
  String typeName="String_Node_Str";
  if (className.indexOf('$') != -1) {
    typeName=Introspector.decapitalize(className.substring(className.lastIndexOf('$') + 1));
  }
 else {
    typeName=Introspector.decapitalize(className.substring(className.lastIndexOf('.') + 1));
  }
  return typeName;
}

Fixed version (ground truth):
public String getSchemaTypeNameForClassName(String className){
  String typeName="String_Node_Str";
  if (className.indexOf('$') != -1) {
    typeName=Introspector.decapitalize(className.substring(className.lastIndexOf('$') + 1));
  }
 else {
    typeName=Introspector.decapitalize(className.substring(className.lastIndexOf('.') + 1));
  }
  boolean inBreak=false;
  StringBuffer toReturn=new StringBuffer(typeName.length());
  for (int i=0; i < typeName.length(); i++) {
    char next=typeName.charAt(i);
    if (Character.isDigit(next)) {
      if (!inBreak) {
        inBreak=true;
      }
      toReturn.append(next);
    }
 else {
      if (inBreak) {
        toReturn.append(Character.toUpperCase(next));
      }
 else {
        toReturn.append(next);
      }
    }
  }
  return toReturn.toString();
}
Program: 67741
Project: 67741
Buggy source:
public QName getSchemaTypeFor(JavaClass javaClass){
  QName schemaType=(QName)userDefinedSchemaTypes.get(javaClass.getQualifiedName());
  if (schemaType == null) {
    schemaType=(QName)helper.getXMLToJavaTypeMap().get(javaClass.getRawName());
  }
  if (schemaType == null) {
    return XMLConstants.ANY_SIMPLE_TYPE_QNAME;
  }
  return schemaType;
}

Fixed version (ground truth):
public QName getSchemaTypeFor(JavaClass javaClass){
  QName schemaType=(QName)userDefinedSchemaTypes.get(javaClass.getQualifiedName());
  if (schemaType == null) {
    schemaType=(QName)helper.getXMLToJavaTypeMap().get(javaClass.getRawName());
  }
  if (schemaType == null) {
    TypeInfo targetInfo=this.typeInfo.get(javaClass.getQualifiedName());
    if (targetInfo != null) {
      schemaType=new QName(targetInfo.getClassNamespace(),targetInfo.getSchemaTypeName());
    }
  }
  if (schemaType == null) {
    return XMLConstants.ANY_SIMPLE_TYPE_QNAME;
  }
  return schemaType;
}
Program: 67744
Project: 67744
Buggy source:
public QName getQNameForProperty(String defaultName,JavaHasAnnotations element){
  String name="String_Node_Str";
  String namespace="String_Node_Str";
  if (helper.isAnnotationPresent(element,XmlAttribute.class)) {
    XmlAttribute xmlAttribute=(XmlAttribute)helper.getAnnotation(element,XmlAttribute.class);
    name=xmlAttribute.name();
    namespace=xmlAttribute.namespace();
  }
 else   if (helper.isAnnotationPresent(element,XmlElement.class)) {
    XmlElement xmlElement=(XmlElement)helper.getAnnotation(element,XmlElement.class);
    name=xmlElement.name();
    namespace=xmlElement.namespace();
  }
  if (name.equals("String_Node_Str")) {
    name=defaultName;
  }
  QName qName=null;
  if (!namespace.equals("String_Node_Str")) {
    qName=new QName(namespace,name);
  }
 else {
    qName=new QName(name);
  }
  return qName;
}

Fixed version (ground truth):
public QName getQNameForProperty(String defaultName,JavaHasAnnotations element,NamespaceInfo namespaceInfo){
  String name="String_Node_Str";
  String namespace="String_Node_Str";
  QName qName=null;
  if (helper.isAnnotationPresent(element,XmlAttribute.class)) {
    XmlAttribute xmlAttribute=(XmlAttribute)helper.getAnnotation(element,XmlAttribute.class);
    name=xmlAttribute.name();
    namespace=xmlAttribute.namespace();
    if (name.equals("String_Node_Str")) {
      name=defaultName;
    }
    if (!namespace.equals("String_Node_Str")) {
      qName=new QName(namespace,name);
    }
 else {
      if (namespaceInfo.isAttributeFormQualified()) {
        qName=new QName(namespaceInfo.getNamespace(),name);
      }
 else {
        qName=new QName(name);
      }
    }
  }
 else {
    if (helper.isAnnotationPresent(element,XmlElement.class)) {
      XmlElement xmlElement=(XmlElement)helper.getAnnotation(element,XmlElement.class);
      name=xmlElement.name();
      namespace=xmlElement.namespace();
    }
    if (name.equals("String_Node_Str")) {
      name=defaultName;
    }
    if (!namespace.equals("String_Node_Str")) {
      qName=new QName(namespace,name);
    }
 else {
      if (namespaceInfo.isElementFormQualified()) {
        qName=new QName(namespaceInfo.getNamespace(),name);
      }
 else {
        qName=new QName(name);
      }
    }
  }
  return qName;
}
Program: 67745
Project: 67745
Buggy source:
public XMLField getXPathForElement(String path,QName elementName,NamespaceInfo namespaceInfo,boolean isText){
  String namespace="String_Node_Str";
  if (namespaceInfo.isElementFormQualified()) {
    namespace=namespaceInfo.getNamespace();
  }
  if (!elementName.getNamespaceURI().equals("String_Node_Str")) {
    namespace=elementName.getNamespaceURI();
  }
  if (namespace.equals("String_Node_Str")) {
    path+=elementName.getLocalPart();
    if (isText) {
      path+="String_Node_Str";
    }
  }
 else {
    String prefix=getPrefixForNamespace(namespace,namespaceInfo.getNamespaceResolver());
    path+=prefix + "String_Node_Str" + elementName.getLocalPart();
    if (isText) {
      path+="String_Node_Str";
    }
  }
  XMLField xmlField=new XMLField(path);
  return xmlField;
}

Fixed version (ground truth):
public XMLField getXPathForElement(String path,QName elementName,NamespaceInfo namespaceInfo,boolean isText){
  String namespace="String_Node_Str";
  if (!elementName.getNamespaceURI().equals("String_Node_Str")) {
    namespace=elementName.getNamespaceURI();
  }
  if (namespace.equals("String_Node_Str")) {
    path+=elementName.getLocalPart();
    if (isText) {
      path+="String_Node_Str";
    }
  }
 else {
    String prefix=getPrefixForNamespace(namespace,namespaceInfo.getNamespaceResolver());
    path+=prefix + "String_Node_Str" + elementName.getLocalPart();
    if (isText) {
      path+="String_Node_Str";
    }
  }
  XMLField xmlField=new XMLField(path);
  return xmlField;
}
Program: 67747
Project: 67747
Buggy source:
public Marshaller createMarshaller(){
  JAXBMarshaller marshaller=new JAXBMarshaller(xmlContext.createMarshaller(),new JAXBIntrospector(xmlContext));
  if (generator != null && generator.hasMarshalCallbacks()) {
    for (Iterator callIt=generator.getMarshalCallbacks().keySet().iterator(); callIt.hasNext(); ) {
      MarshalCallback cb=(MarshalCallback)generator.getMarshalCallbacks().get(callIt.next());
      cb.initialize(generator.getClass().getClassLoader());
    }
    marshaller.setMarshalCallbacks(generator.getMarshalCallbacks());
  }
  return marshaller;
}

Fixed version (ground truth):
public Marshaller createMarshaller(){
  JAXBMarshaller marshaller=new JAXBMarshaller(xmlContext.createMarshaller(),new JAXBIntrospector(xmlContext));
  if (generator != null && generator.hasMarshalCallbacks()) {
    for (Iterator callIt=generator.getMarshalCallbacks().keySet().iterator(); callIt.hasNext(); ) {
      MarshalCallback cb=(MarshalCallback)generator.getMarshalCallbacks().get(callIt.next());
      cb.initialize(generator.getClass().getClassLoader());
    }
    marshaller.setMarshalCallbacks(generator.getMarshalCallbacks());
  }
  marshaller.setQNameToGeneratedClasses(this.qNameToGeneratedClasses);
  return marshaller;
}
Program: 67748
Project: 67748
Buggy source:
public JAXBContext(XMLContext context,Generator generator){
  super();
  this.xmlContext=context;
  this.generator=generator;
  this.generatedClassesToQName=generator.getMappingsGenerator().getGeneratedClassesToQName();
}

Fixed version (ground truth):
public JAXBContext(XMLContext context,Generator generator){
  super();
  this.xmlContext=context;
  this.generator=generator;
  this.generatedClassesToQName=generator.getMappingsGenerator().getGeneratedClassesToQName();
  this.qNameToGeneratedClasses=generator.getMappingsGenerator().getQNamesToGeneratedClasses();
}
Program: 67749
Project: 67749
Buggy source:
/** 
 * Create an instance of XMLRoot populated from the contents of the provided JAXBElement. XMLRoot will be used to hold the contents of the JAXBElement while the marshal operation is performed by TopLink OXM. This will avoid adding any runtime dependencies to TopLink.
 * @param elt
 * @return
 */
private XMLRoot createXMLRootFromJAXBElement(JAXBElement elt){
  XMLRoot xmlroot=new XMLRoot();
  xmlroot.setObject(elt.getValue());
  QName qname=elt.getName();
  xmlroot.setLocalName(qname.getLocalPart());
  xmlroot.setNamespaceURI(qname.getNamespaceURI());
  if (elt.getDeclaredType() == ClassConstants.ABYTE || elt.getDeclaredType() == ClassConstants.APBYTE) {
    xmlroot.setSchemaType(XMLConstants.BASE_64_BINARY_QNAME);
  }
 else {
    xmlroot.setSchemaType((QName)org.eclipse.persistence.internal.oxm.XMLConversionManager.getDefaultJavaTypes().get(elt.getDeclaredType()));
  }
  return xmlroot;
}

Fixed version (ground truth):
/** 
 * Create an instance of XMLRoot populated from the contents of the provided JAXBElement. XMLRoot will be used to hold the contents of the JAXBElement while the marshal operation is performed by TopLink OXM. This will avoid adding any runtime dependencies to TopLink.
 * @param elt
 * @return
 */
private XMLRoot createXMLRootFromJAXBElement(JAXBElement elt){
  XMLRoot xmlroot=new XMLRoot();
  xmlroot.setObject(elt.getValue());
  QName qname=elt.getName();
  xmlroot.setLocalName(qname.getLocalPart());
  xmlroot.setNamespaceURI(qname.getNamespaceURI());
  if (elt.getDeclaredType() == ClassConstants.ABYTE || elt.getDeclaredType() == ClassConstants.APBYTE) {
    xmlroot.setSchemaType(XMLConstants.BASE_64_BINARY_QNAME);
  }
 else {
    xmlroot.setSchemaType((QName)org.eclipse.persistence.internal.oxm.XMLConversionManager.getDefaultJavaTypes().get(elt.getDeclaredType()));
  }
  if (qNameToGeneratedClasses != null) {
    Class theClass=qNameToGeneratedClasses.get(qname);
    if (theClass != null && WrappedValue.class.isAssignableFrom(theClass)) {
      ClassDescriptor desc=xmlMarshaller.getXMLContext().getSession(theClass).getDescriptor(theClass);
      Object newObject=desc.getInstantiationPolicy().buildNewInstance();
      ((WrappedValue)newObject).setWrappedValue(elt.getValue());
      xmlroot.setObject(newObject);
    }
  }
  return xmlroot;
}