Program: 67091
Project: 67091
Buggy source:
/** 
 * INTERNAL: This function is implemented by SDOType.setOpen() in a mapping setGet/SetMethodName call
 * @return
 */
public List _getOpenContentPropertiesWithXMLRoots(){
  List returnList=new ArrayList();
  for (int i=0, size=openContentProperties.size(); i < size; i++) {
    Property next=(Property)openContentProperties.get(i);
    XMLRoot root=new XMLRoot();
    String localName=((SDOProperty)next).getXPath();
    if (next.getType() != null) {
      if (!next.getType().isDataType()) {
        String uri=((SDOProperty)next).getUri();
        root.setNamespaceURI(uri);
      }
 else {
        String uri=((SDOProperty)next).getUri();
        root.setNamespaceURI(uri);
      }
    }
    root.setLocalName(localName);
    Object value=get(next);
    if (next.isMany()) {
      for (int j=0, sizel=((List)value).size(); j < sizel; j++) {
        XMLRoot nextRoot=new XMLRoot();
        nextRoot.setNamespaceURI(root.getNamespaceURI());
        nextRoot.setLocalName(root.getLocalName());
        Object nextItem=((List)value).get(j);
        if ((next.getType() != null) && (((SDOType)next.getType()).getXmlDescriptor() == null)) {
          nextItem=XMLConversionManager.getDefaultXMLManager().convertObject(nextItem,String.class);
        }
        nextRoot.setObject(nextItem);
        returnList.add(nextRoot);
      }
    }
 else {
      if ((next.getType() != null) && (((SDOType)next.getType()).getXmlDescriptor() == null)) {
        value=XMLConversionManager.getDefaultXMLManager().convertObject(value,String.class);
      }
      root.setObject(value);
      returnList.add(root);
    }
  }
  return returnList;
}

Fixed version (ground truth):
/** 
 * INTERNAL: This function is implemented by SDOType.setOpen() in a mapping setGet/SetMethodName call
 * @return
 */
public List _getOpenContentPropertiesWithXMLRoots(){
  List returnList=new ArrayList();
  for (int i=0, size=openContentProperties.size(); i < size; i++) {
    SDOProperty next=(SDOProperty)openContentProperties.get(i);
    XMLRoot root=new XMLRoot();
    String localName=next.getXPath();
    if (next.getType() != null) {
      if (!next.getType().isDataType()) {
        String uri=next.getUri();
        root.setNamespaceURI(uri);
      }
 else {
        String uri=next.getUri();
        root.setNamespaceURI(uri);
      }
    }
    root.setLocalName(localName);
    Object value=get(next);
    if (next.isMany()) {
      for (int j=0, sizel=((List)value).size(); j < sizel; j++) {
        XMLRoot nextRoot=new XMLRoot();
        nextRoot.setNamespaceURI(root.getNamespaceURI());
        nextRoot.setLocalName(root.getLocalName());
        Object nextItem=((List)value).get(j);
        if ((next.getType() != null) && (next.getType().getXmlDescriptor() == null)) {
          nextItem=XMLConversionManager.getDefaultXMLManager().convertObject(nextItem,String.class);
        }
        nextRoot.setObject(nextItem);
        returnList.add(nextRoot);
      }
    }
 else {
      if ((next.getType() != null) && (next.getType().getXmlDescriptor() == null)) {
        value=XMLConversionManager.getDefaultXMLManager().convertObject(value,String.class);
      }
      root.setObject(value);
      returnList.add(root);
    }
  }
  return returnList;
}