nus-yam/ex-repair huggingface dataset:
Program: 67949
Project: 67949
Buggy source:
/** 
 * INTERNAL: Set the map of Wrapper objects (SDOWrapperTypes that wrap a primitive document).
 * @param aMap        a HashMap of SDOWrapperTypes, keyed on the XSD type that it wraps.
 */
public void setWrappersHashMap(Map aMap){
  getSDOTypeHelperDelegate().setWrappersHashMap(aMap);
}

Fixed version (ground truth):
/** 
 * INTERNAL: Set the map of Wrapper objects (SDOWrapperTypes that wrap a primitive document).
 * @param aMap        a HashMap of SDOWrapperTypes, keyed on the XSD type that it wraps.
 */
public void setWrappersHashMap(Map aMap){
  getTypeHelperDelegate().setWrappersHashMap(aMap);
}
Program: 67950
Project: 67950
Buggy source:
/** 
 * INTERNAL: Return the prefix for the given uri, or generate a new one if necessary
 */
public String getPrefix(String uri){
  return getSDOTypeHelperDelegate().getPrefix(uri);
}

Fixed version (ground truth):
/** 
 * INTERNAL: Return the prefix for the given uri, or generate a new one if necessary
 */
public String getPrefix(String uri){
  return getTypeHelperDelegate().getPrefix(uri);
}
Program: 67951
Project: 67951
Buggy source:
/** 
 * INTERNAL: Return the NamespaceResolver
 */
public NamespaceResolver getNamespaceResolver(){
  return getSDOTypeHelperDelegate().getNamespaceResolver();
}

Fixed version (ground truth):
/** 
 * INTERNAL: Return the NamespaceResolver
 */
public NamespaceResolver getNamespaceResolver(){
  return getTypeHelperDelegate().getNamespaceResolver();
}
Program: 67952
Project: 67952
Buggy source:
public Property getOpenContentProperty(String uri,String propertyName){
  return getSDOTypeHelperDelegate().getOpenContentProperty(uri,propertyName);
}

Fixed version (ground truth):
public Property getOpenContentProperty(String uri,String propertyName){
  return getTypeHelperDelegate().getOpenContentProperty(uri,propertyName);
}
Program: 67953
Project: 67953
Buggy source:
public List getAnonymousTypes(){
  return getSDOTypeHelperDelegate().getAnonymousTypes();
}

Fixed version (ground truth):
public List getAnonymousTypes(){
  return getTypeHelperDelegate().getAnonymousTypes();
}
Program: 67954
Project: 67954
Buggy source:
public QName getXSDTypeFromSDOType(Type aType){
  return getSDOTypeHelperDelegate().getXSDTypeFromSDOType(aType);
}

Fixed version (ground truth):
public QName getXSDTypeFromSDOType(Type aType){
  return getTypeHelperDelegate().getXSDTypeFromSDOType(aType);
}
Program: 67955
Project: 67955
Buggy source:
public Map getInterfacesToSDOTypeHashMap(){
  return getSDOTypeHelperDelegate().getInterfacesToSDOTypeHashMap();
}

Fixed version (ground truth):
public Map getInterfacesToSDOTypeHashMap(){
  return getTypeHelperDelegate().getInterfacesToSDOTypeHashMap();
}
Program: 67956
Project: 67956
Buggy source:
public void addWrappersToProject(Project toplinkProject){
  getSDOTypeHelperDelegate().addWrappersToProject(toplinkProject);
}

Fixed version (ground truth):
public void addWrappersToProject(Project toplinkProject){
  getTypeHelperDelegate().addWrappersToProject(toplinkProject);
}
Program: 67957
Project: 67957
Buggy source:
/** 
 * INTERNAL: Return the map of Wrapper objects (SDOWrapperTypes that wrap a primitive document).
 * @return a HashMap of SDOWrapperTypes, keyed on the XSD type that it wraps.
 */
public Map getWrappersHashMap(){
  return getSDOTypeHelperDelegate().getWrappersHashMap();
}

Fixed version (ground truth):
/** 
 * INTERNAL: Return the map of Wrapper objects (SDOWrapperTypes that wrap a primitive document).
 * @return a HashMap of SDOWrapperTypes, keyed on the XSD type that it wraps.
 */
public Map getWrappersHashMap(){
  return getTypeHelperDelegate().getWrappersHashMap();
}
Program: 67958
Project: 67958
Buggy source:
public SDOType getSDOTypeFromXSDType(QName aName){
  return getSDOTypeHelperDelegate().getSDOTypeFromXSDType(aName);
}

Fixed version (ground truth):
public SDOType getSDOTypeFromXSDType(QName aName){
  return getTypeHelperDelegate().getSDOTypeFromXSDType(aName);
}
Program: 67959
Project: 67959
Buggy source:
public void setTypesHashMap(Map typesHashMap){
  getSDOTypeHelperDelegate().setTypesHashMap(typesHashMap);
}

Fixed version (ground truth):
public void setTypesHashMap(Map typesHashMap){
  getTypeHelperDelegate().setTypesHashMap(typesHashMap);
}
Program: 67960
Project: 67960
Buggy source:
public void addType(SDOType newType){
  getSDOTypeHelperDelegate().addType(newType);
}

Fixed version (ground truth):
public void addType(SDOType newType){
  getTypeHelperDelegate().addType(newType);
}
Program: 67961
Project: 67961
Buggy source:
/** 
 * INTERNAL: Add the given namespace uri and prefix to the global namespace resolver.
 */
public String addNamespace(String prefix,String uri){
  return getSDOTypeHelperDelegate().addNamespace(prefix,uri);
}

Fixed version (ground truth):
/** 
 * INTERNAL: Add the given namespace uri and prefix to the global namespace resolver.
 */
public String addNamespace(String prefix,String uri){
  return getTypeHelperDelegate().addNamespace(prefix,uri);
}
Program: 67962
Project: 67962
Buggy source:
public Property defineOpenContentProperty(String uri,DataObject property){
  return getSDOTypeHelperDelegate().defineOpenContentProperty(uri,property);
}

Fixed version (ground truth):
public Property defineOpenContentProperty(String uri,DataObject property){
  return getTypeHelperDelegate().defineOpenContentProperty(uri,property);
}
Program: 67963
Project: 67963
Buggy source:
public Type getType(Class interfaceClass){
  return getSDOTypeHelperDelegate().getType(interfaceClass);
}

Fixed version (ground truth):
public Type getType(Class interfaceClass){
  return getTypeHelperDelegate().getType(interfaceClass);
}
Program: 67964
Project: 67964
Buggy source:
public Map getTypesHashMap(){
  return getSDOTypeHelperDelegate().getTypesHashMap();
}

Fixed version (ground truth):
public Map getTypesHashMap(){
  return getTypeHelperDelegate().getTypesHashMap();
}
Program: 67965
Project: 67965
Buggy source:
public List define(List types){
  return getSDOTypeHelperDelegate().define(types);
}

Fixed version (ground truth):
public List define(List types){
  return getTypeHelperDelegate().define(types);
}
Program: 67966
Project: 67966
Buggy source:
public void reset(){
  getSDOTypeHelperDelegate().reset();
}

Fixed version (ground truth):
public void reset(){
  getTypeHelperDelegate().reset();
}
Program: 67967
Project: 67967
Buggy source:
/** 
 * INTERNAL: Return the Map of Open Content Properties
 */
public Map getOpenContentProperties(){
  return getSDOTypeHelperDelegate().getOpenContentProperties();
}

Fixed version (ground truth):
/** 
 * INTERNAL: Return the Map of Open Content Properties
 */
public Map getOpenContentProperties(){
  return getTypeHelperDelegate().getOpenContentProperties();
}
Program: 67968
Project: 67968
Buggy source:
public Type getTypeForSimpleJavaType(Class implClass){
  return getSDOTypeHelperDelegate().getTypeForSimpleJavaType(implClass);
}

Fixed version (ground truth):
public Type getTypeForSimpleJavaType(Class implClass){
  return getTypeHelperDelegate().getTypeForSimpleJavaType(implClass);
}
Program: 67969
Project: 67969
Buggy source:
public void setTopLinkProject(Project toplinkProject){
  getSDOXMLHelperDelegate().setTopLinkProject(toplinkProject);
}

Fixed version (ground truth):
public void setTopLinkProject(Project toplinkProject){
  getXMLHelperDelegate().setTopLinkProject(toplinkProject);
}
Program: 67970
Project: 67970
Buggy source:
public SDOClassLoader getLoader(){
  return getSDOXMLHelperDelegate().getLoader();
}

Fixed version (ground truth):
public SDOClassLoader getLoader(){
  return getXMLHelperDelegate().getLoader();
}
Program: 67971
Project: 67971
Buggy source:
public void setXmlUnmarshaller(XMLUnmarshaller xmlUnmarshaller){
  getSDOXMLHelperDelegate().setXmlUnmarshaller(xmlUnmarshaller);
}

Fixed version (ground truth):
public void setXmlUnmarshaller(XMLUnmarshaller xmlUnmarshaller){
  getXMLHelperDelegate().setXmlUnmarshaller(xmlUnmarshaller);
}
Program: 67972
Project: 67972
Buggy source:
/** 
 * By setting this flag to true the marshalled date objects marshalled to  the XML schema types time and dateTime will be qualified by a time zone.   By default time information is not time zone qualified.
 */
public void setTimeZoneQualified(boolean timeZoneQualified){
  getSDOXMLHelperDelegate().setTimeZoneQualified(timeZoneQualified);
}

Fixed version (ground truth):
/** 
 * By setting this flag to true the marshalled date objects marshalled to  the XML schema types time and dateTime will be qualified by a time zone.   By default time information is not time zone qualified.
 */
public void setTimeZoneQualified(boolean timeZoneQualified){
  getXMLHelperDelegate().setTimeZoneQualified(timeZoneQualified);
}
Program: 67973
Project: 67973
Buggy source:
public void save(XMLDocument xmlDocument,Result result,Object options) throws IOException {
  getSDOXMLHelperDelegate().save(xmlDocument,result,options);
}

Fixed version (ground truth):
public void save(XMLDocument xmlDocument,Result result,Object options) throws IOException {
  getXMLHelperDelegate().save(xmlDocument,result,options);
}
Program: 67974
Project: 67974
Buggy source:
public void setXmlMarshaller(XMLMarshaller xmlMarshaller){
  getSDOXMLHelperDelegate().setXmlMarshaller(xmlMarshaller);
}

Fixed version (ground truth):
public void setXmlMarshaller(XMLMarshaller xmlMarshaller){
  getXMLHelperDelegate().setXmlMarshaller(xmlMarshaller);
}
Program: 67975
Project: 67975
Buggy source:
public XMLUnmarshaller getXmlUnmarshaller(){
  return getSDOXMLHelperDelegate().getXmlUnmarshaller();
}

Fixed version (ground truth):
public XMLUnmarshaller getXmlUnmarshaller(){
  return getXMLHelperDelegate().getXmlUnmarshaller();
}
Program: 67976
Project: 67976
Buggy source:
public XMLDocument createDocument(DataObject dataObject,String rootElementURI,String rootElementName){
  return getSDOXMLHelperDelegate().createDocument(dataObject,rootElementURI,rootElementName);
}

Fixed version (ground truth):
public XMLDocument createDocument(DataObject dataObject,String rootElementURI,String rootElementName){
  return getXMLHelperDelegate().createDocument(dataObject,rootElementURI,rootElementName);
}
Program: 67977
Project: 67977
Buggy source:
public XMLContext getXmlContext(){
  return getSDOXMLHelperDelegate().getXmlContext();
}

Fixed version (ground truth):
public XMLContext getXmlContext(){
  return getXMLHelperDelegate().getXmlContext();
}
Program: 67978
Project: 67978
Buggy source:
public Project getTopLinkProject(){
  return getSDOXMLHelperDelegate().getTopLinkProject();
}

Fixed version (ground truth):
public Project getTopLinkProject(){
  return getXMLHelperDelegate().getTopLinkProject();
}
Program: 67979
Project: 67979
Buggy source:
public XMLDocument load(Source source,String locationURI,Object options) throws IOException {
  return getSDOXMLHelperDelegate().load(source,locationURI,options);
}

Fixed version (ground truth):
public XMLDocument load(Source source,String locationURI,Object options) throws IOException {
  return getXMLHelperDelegate().load(source,locationURI,options);
}
Program: 67980
Project: 67980
Buggy source:
public void setLoader(SDOClassLoader loader){
  getSDOXMLHelperDelegate().setLoader(loader);
}

Fixed version (ground truth):
public void setLoader(SDOClassLoader loader){
  getXMLHelperDelegate().setLoader(loader);
}
Program: 67981
Project: 67981
Buggy source:
/** 
 * The specified TimeZone will be used for all String to date object conversions.  By default the TimeZone from the JVM is used.
 */
public void setTimeZone(TimeZone timeZone){
  getSDOXMLHelperDelegate().setTimeZone(timeZone);
}

Fixed version (ground truth):
/** 
 * The specified TimeZone will be used for all String to date object conversions.  By default the TimeZone from the JVM is used.
 */
public void setTimeZone(TimeZone timeZone){
  getXMLHelperDelegate().setTimeZone(timeZone);
}
Program: 67982
Project: 67982
Buggy source:
public void addDescriptors(List descriptors){
  getSDOXMLHelperDelegate().addDescriptors(descriptors);
}

Fixed version (ground truth):
public void addDescriptors(List descriptors){
  getXMLHelperDelegate().addDescriptors(descriptors);
}
Program: 67983
Project: 67983
Buggy source:
public XMLConversionManager getXmlConversionManager(){
  return getSDOXMLHelperDelegate().getXmlConversionManager();
}

Fixed version (ground truth):
public XMLConversionManager getXmlConversionManager(){
  return getXMLHelperDelegate().getXmlConversionManager();
}
Program: 67984
Project: 67984
Buggy source:
public void reset(){
  getSDOXMLHelperDelegate().reset();
}

Fixed version (ground truth):
public void reset(){
  getXMLHelperDelegate().reset();
}
Program: 67985
Project: 67985
Buggy source:
public void initializeDescriptor(XMLDescriptor descriptor){
  getSDOXMLHelperDelegate().initializeDescriptor(descriptor);
}

Fixed version (ground truth):
public void initializeDescriptor(XMLDescriptor descriptor){
  getXMLHelperDelegate().initializeDescriptor(descriptor);
}
Program: 67986
Project: 67986
Buggy source:
public void setXmlContext(XMLContext xmlContext){
  getSDOXMLHelperDelegate().setXmlContext(xmlContext);
}

Fixed version (ground truth):
public void setXmlContext(XMLContext xmlContext){
  getXMLHelperDelegate().setXmlContext(xmlContext);
}
Program: 67987
Project: 67987
Buggy source:
public XMLMarshaller getXmlMarshaller(){
  return getSDOXMLHelperDelegate().getXmlMarshaller();
}

Fixed version (ground truth):
public XMLMarshaller getXmlMarshaller(){
  return getXMLHelperDelegate().getXmlMarshaller();
}
Program: 67988
Project: 67988
Buggy source:
/** 
 * INTERNAL: This convenience method will look up a WebLogic execute thread from the runtime  MBean tree.  The execute thread contains application information.  This code  will use the name of the current thread to lookup the corresponding ExecuteThread. The ExecuteThread will allow us to obtain the application name (and version, etc).
 * @return application name or null if the name cannot be obtained
 */
private static Object getExecuteThread(){
  if (getWLSMBeanServer() != null) {
    if (wlsThreadPoolRuntime == null) {
      try {
        ObjectName service=new ObjectName(WLS_SERVICE_KEY);
        ObjectName serverRuntime=(ObjectName)wlsMBeanServer.getAttribute(service,WLS_SERVER_RUNTIME);
        wlsThreadPoolRuntime=(ObjectName)wlsMBeanServer.getAttribute(serverRuntime,WLS_THREADPOOL_RUNTIME);
      }
 catch (      Exception x) {
        return null;
      }
    }
    try {
      return wlsMBeanServer.invoke(wlsThreadPoolRuntime,WLS_EXECUTE_THREAD_GET_METHOD_NAME,new Object[]{Thread.currentThread().getName()},new String[]{String.class.getName()});
    }
 catch (    Exception e) {
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * INTERNAL: This convenience method will look up a WebLogic execute thread from the runtime  MBean tree.  The execute thread contains application information.  This code  will use the name of the current thread to lookup the corresponding ExecuteThread. The ExecuteThread will allow us to obtain the application name (and version, etc).
 * @return application name or null if the name cannot be obtained
 */
private static Object getExecuteThread(){
  if (getWLSMBeanServer() != null) {
    if (wlsThreadPoolRuntime == null) {
      ObjectName service=null;
      ObjectName serverRuntime=null;
      try {
        service=new ObjectName(WLS_SERVICE_KEY);
      }
 catch (      Exception x) {
        throw SDOException.errorGettingWLSObjectName(WLS_RUNTIME_SERVICE + "String_Node_Str" + WLS_SERVICE_KEY+ "String_Node_Str",x);
      }
      try {
        serverRuntime=(ObjectName)wlsMBeanServer.getAttribute(service,WLS_SERVER_RUNTIME);
      }
 catch (      Exception x) {
        throw SDOException.errorGettingWLSObjectName(WLS_SERVER_RUNTIME,x);
      }
      try {
        wlsThreadPoolRuntime=(ObjectName)wlsMBeanServer.getAttribute(serverRuntime,WLS_THREADPOOL_RUNTIME);
      }
 catch (      Exception x) {
        throw SDOException.errorGettingWLSObjectName(WLS_THREADPOOL_RUNTIME,x);
      }
    }
    try {
      return wlsMBeanServer.invoke(wlsThreadPoolRuntime,WLS_EXECUTE_THREAD_GET_METHOD_NAME,new Object[]{Thread.currentThread().getName()},new String[]{String.class.getName()});
    }
 catch (    Exception x) {
      throw SDOException.errorInvokingWLSMethodReflectively(WLS_EXECUTE_THREAD_GET_METHOD_NAME,WLS_THREADPOOL_RUNTIME,x);
    }
  }
  return null;
}
Program: 67989
Project: 67989
Buggy source:
/** 
 * Lazy load the WebLogic MBeanServer instance.
 * @return
 */
private static MBeanServer getWLSMBeanServer(){
  if (wlsMBeanServer == null) {
    Context weblogicContext=null;
    try {
      weblogicContext=new InitialContext();
      try {
        wlsMBeanServer=(MBeanServer)weblogicContext.lookup(WLS_ENV_CONTEXT_LOOKUP);
      }
 catch (      NamingException e) {
        try {
          wlsMBeanServer=(MBeanServer)weblogicContext.lookup(WLS_CONTEXT_LOOKUP);
        }
 catch (        NamingException ne) {
        }
      }
    }
 catch (    NamingException nex) {
    }
  }
  return wlsMBeanServer;
}

Fixed version (ground truth):
/** 
 * Lazy load the WebLogic MBeanServer instance.
 * @return
 */
private static MBeanServer getWLSMBeanServer(){
  if (wlsMBeanServer == null) {
    Context weblogicContext=null;
    try {
      weblogicContext=new InitialContext();
      try {
        wlsMBeanServer=(MBeanServer)weblogicContext.lookup(WLS_ENV_CONTEXT_LOOKUP);
      }
 catch (      NamingException e) {
        try {
          wlsMBeanServer=(MBeanServer)weblogicContext.lookup(WLS_CONTEXT_LOOKUP);
        }
 catch (        NamingException ne) {
          throw SDOException.errorPerformingWLSLookup(WLS_MBEAN_SERVER,ne);
        }
      }
    }
 catch (    NamingException nex) {
      throw SDOException.errorCreatingWLSInitialContext(nex);
    }
  }
  return wlsMBeanServer;
}
Program: 67992
Project: 67992
Buggy source:
public DatabaseMapping runtimeMapping(){
  AbstractCompositeCollectionMapping runtimeMapping=(AbstractCompositeCollectionMapping)super.runtimeMapping();
  ClassTools.invokeMethod(runtimeMapping,"String_Node_Str",new Class[]{DatabaseField.class},new Object[]{this.getXmlField().runtimeField()});
  runtimeMapping.setContainerPolicy(this.containerPolicy.runtimeContainerPolicy());
  if (runtimeMapping instanceof XMLCompositeCollectionMapping) {
    this.getContainerAccessor().adjustRuntimeMapping(runtimeMapping);
  }
  return runtimeMapping;
}

Fixed version (ground truth):
public DatabaseMapping runtimeMapping(){
  AbstractCompositeCollectionMapping runtimeMapping=(AbstractCompositeCollectionMapping)super.runtimeMapping();
  ClassTools.invokeMethod(runtimeMapping,"String_Node_Str",new Class[]{DatabaseField.class},new Object[]{this.getXmlField().runtimeField()});
  runtimeMapping.setContainerPolicy(this.containerPolicy.runtimeContainerPolicy());
  if (runtimeMapping.isXMLMapping()) {
    this.getContainerAccessor().adjustRuntimeMapping(runtimeMapping);
  }
  return runtimeMapping;
}
Program: 67993
Project: 67993
Buggy source:
public DatabaseMapping runtimeMapping(){
  AbstractCompositeObjectMapping runtimeMapping=(AbstractCompositeObjectMapping)super.runtimeMapping();
  ClassTools.invokeMethod(runtimeMapping,"String_Node_Str",new Class[]{DatabaseField.class},new Object[]{this.getXmlField().runtimeField()});
  if (runtimeMapping instanceof XMLCompositeObjectMapping) {
    this.getContainerAccessor().adjustRuntimeMapping(runtimeMapping);
  }
  return runtimeMapping;
}

Fixed version (ground truth):
public DatabaseMapping runtimeMapping(){
  AbstractCompositeObjectMapping runtimeMapping=(AbstractCompositeObjectMapping)super.runtimeMapping();
  ClassTools.invokeMethod(runtimeMapping,"String_Node_Str",new Class[]{DatabaseField.class},new Object[]{this.getXmlField().runtimeField()});
  if (runtimeMapping.isXMLMapping()) {
    this.getContainerAccessor().adjustRuntimeMapping(runtimeMapping);
  }
  return runtimeMapping;
}
Program: 67994
Project: 67994
Buggy source:
/** 
 * INTERNAL:
 * @param item
 * @param updateSequence
 */
protected void updateContainment(Object item,boolean updateSequence){
  if ((property != null) && property.isContainment() && item instanceof SDODataObject) {
    dataObject.updateContainment(property,(SDODataObject)item);
  }
  if ((property != null) && updateSequence) {
    updateSequenceSettingInternal(property,item);
  }
}

Fixed version (ground truth):
protected void updateContainment(Collection items,boolean updateSequence){
  if ((property != null) && property.isContainment()) {
    dataObject.updateContainment(property,items,updateSequence);
  }
 else {
    if (dataObject != null) {
      dataObject._setModified(true);
    }
  }
}
Program: 67995
Project: 67995
Buggy source:
/** 
 * INTERNAL:
 * @param item
 * @param fromDelete
 * @param updateSequence
 */
protected void removeContainment(int occurrence,Object item,boolean fromDelete,boolean updateSequence){
  if ((property != null) && property.isContainment() && (item != null)) {
    ((SDODataObject)item).detachOrDelete(fromDelete);
  }
  if ((property != null) && dataObject.getType().isSequenced() && updateSequence) {
    removeSequenceSettingInternal(occurrence,property,item);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 * @param item
 * @param fromDelete
 * @param updateSequence
 */
protected void removeContainment(int occurrence,Object item,boolean fromDelete,boolean updateSequence){
  if ((property != null) && property.isContainment() && (item != null)) {
    ((SDODataObject)item).detachOrDelete(fromDelete);
  }
 else {
    dataObject._setModified(true);
  }
  if ((property != null) && dataObject.getType().isSequenced() && updateSequence) {
    removeSequenceSettingInternal(occurrence,property,item);
  }
}
Program: 67996
Project: 67996
Buggy source:
public boolean addAll(int position,Collection items,boolean updateSequence){
  if ((position < 0) || (position > size())) {
    return false;
  }
  if ((items == null) || (items.size() == 0)) {
    return false;
  }
  if (items.contains(null) && (property != null && !property.isNullable())) {
    throw new UnsupportedOperationException("String_Node_Str" + property.getName() + "String_Node_Str");
  }
  copyElements();
  boolean modified=currentElements.addAll(position,items);
  dataObject.updateContainment(property,items);
  updateSequence(property,items,updateSequence);
  return modified;
}

Fixed version (ground truth):
public boolean addAll(int position,Collection items,boolean updateSequence){
  if ((position < 0) || (position > size())) {
    return false;
  }
  if ((items == null) || (items.size() == 0)) {
    return false;
  }
  if (items.contains(null) && (property != null && !property.isNullable())) {
    throw new UnsupportedOperationException("String_Node_Str" + property.getName() + "String_Node_Str");
  }
  copyElements();
  boolean modified=currentElements.addAll(position,items);
  updateContainment(items,updateSequence);
  updateSequence(property,items,updateSequence);
  return modified;
}
Program: 67998
Project: 67998
Buggy source:
protected void addProblemsTo(List newProblems){
  this.addXmlFieldProblemsTo(newProblems);
  this.addReferenceDescriptorNotSpecifiedProblemTo(newProblems);
  this.addReferenceDescriptorInactiveProblemTo(newProblems);
  super.addProblemsTo(newProblems);
}

Fixed version (ground truth):
protected void addProblemsTo(List newProblems){
  this.addXmlFieldProblemsTo(newProblems);
  this.addReferenceDescriptorNotSpecifiedProblemTo(newProblems);
  this.addReferenceDescriptorInactiveProblemTo(newProblems);
  this.addContainerAccessorNotSpecifiedProblemTo(newProblems);
  super.addProblemsTo(newProblems);
}
Program: 67999
Project: 67999
Buggy source:
protected void addChildrenTo(List children){
  super.addChildrenTo(children);
  children.add(this.referenceDescriptorHandle);
  children.add(this.xmlField);
  children.add(this.elementTypeHandle);
}

Fixed version (ground truth):
protected void addChildrenTo(List children){
  super.addChildrenTo(children);
  children.add(this.referenceDescriptorHandle);
  children.add(this.xmlField);
  children.add(this.elementTypeHandle);
  children.add(this.containerAccessor);
}
Program: 68001
Project: 68001
Buggy source:
protected void initialize(Node parent){
  super.initialize(parent);
  this.referenceDescriptorHandle=new MWDescriptorHandle(this,this.buildReferenceDescriptorScrubber());
  this.xmlField=new MWXmlField(this);
  this.elementTypeHandle=new MWNamedSchemaComponentHandle(this,this.buildElementTypeScrubber());
}

Fixed version (ground truth):
protected void initialize(Node parent){
  super.initialize(parent);
  this.referenceDescriptorHandle=new MWDescriptorHandle(this,this.buildReferenceDescriptorScrubber());
  this.xmlField=new MWXmlField(this);
  this.elementTypeHandle=new MWNamedSchemaComponentHandle(this,this.buildElementTypeScrubber());
  this.containerAccessor=new MWNullContainerAccessor(this);
  this.usesContainerAccessor=new Boolean(false);
}
Program: 68002
Project: 68002
Buggy source:
/** 
 * INTERNAL: Register a ReferenceResolver as an event listener on the session,  if one doesn't already exist.  Each source/target field will have a namespace resolver set as well. 
 * @see org.eclipse.persistence.internal.oxm.ReferenceResolver
 * @see org.eclipse.persistence.oxm.NamespaceResolver
 */
public void initialize(AbstractSession session) throws DescriptorException {
  if (getReferenceClass() == null) {
    setReferenceClass(session.getDatasourcePlatform().getConversionManager().convertClassNameToClass(getReferenceClassName()));
  }
  super.initialize(session);
  ReferenceResolver resolver=new ReferenceResolver();
  if (!(session.getEventManager().getListeners().contains(resolver))) {
    session.getEventManager().addListener(resolver);
  }
  XMLDescriptor descriptor=(XMLDescriptor)this.getDescriptor();
  XMLDescriptor targetDescriptor=(XMLDescriptor)getReferenceDescriptor();
  for (int index=0; index < sourceToTargetKeys.size(); index++) {
    XMLField sourceField=(XMLField)sourceToTargetKeys.get(index);
    sourceField=(XMLField)descriptor.buildField(sourceField);
    sourceToTargetKeys.set(index,sourceField);
    XMLField targetField=(XMLField)sourceToTargetKeyFieldAssociations.get(sourceField);
    targetField=(XMLField)targetDescriptor.buildField(targetField);
    sourceToTargetKeyFieldAssociations.put(sourceField,targetField);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Register a ReferenceResolver as an event listener on the session,  if one doesn't already exist.  Each source/target field will have a namespace resolver set as well. 
 * @see org.eclipse.persistence.internal.oxm.ReferenceResolver
 * @see org.eclipse.persistence.oxm.NamespaceResolver
 */
public void initialize(AbstractSession session) throws DescriptorException {
  if (getReferenceClass() == null) {
    setReferenceClass(session.getDatasourcePlatform().getConversionManager().convertClassNameToClass(getReferenceClassName()));
  }
  super.initialize(session);
  ReferenceListener listener=new ReferenceListener();
  if (!(session.getEventManager().getListeners().contains(listener))) {
    session.getEventManager().addListener(listener);
  }
  XMLDescriptor descriptor=(XMLDescriptor)this.getDescriptor();
  XMLDescriptor targetDescriptor=(XMLDescriptor)getReferenceDescriptor();
  for (int index=0; index < sourceToTargetKeys.size(); index++) {
    XMLField sourceField=(XMLField)sourceToTargetKeys.get(index);
    sourceField=(XMLField)descriptor.buildField(sourceField);
    sourceToTargetKeys.set(index,sourceField);
    XMLField targetField=(XMLField)sourceToTargetKeyFieldAssociations.get(sourceField);
    targetField=(XMLField)targetDescriptor.buildField(targetField);
    sourceToTargetKeyFieldAssociations.put(sourceField,targetField);
  }
}
Program: 68003
Project: 68003
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(SingleAttributeEmptyKeyTestCases.class);
  suite.addTestSuite(SingleAttributeInvalidKeyTestCases.class);
  suite.addTestSuite(SingleAttributeNullKeyTestCases.class);
  suite.addTestSuite(SingleAttributeKeyTestCases.class);
  suite.addTestSuite(SingleElementEmptyKeyTestCases.class);
  suite.addTestSuite(SingleElementInvalidKeyTestCases.class);
  suite.addTestSuite(SingleElementNullKeyTestCases.class);
  suite.addTestSuite(SingleElementKeyTestCases.class);
  suite.addTestSuite(NonStringKeyTypeTestCases.class);
  suite.addTestSuite(MultipleSourceTestCases.class);
  suite.addTestSuite(NestedAttributeKeyTestCases.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(SingleAttributeEmptyKeyTestCases.class);
  suite.addTestSuite(SingleAttributeInvalidKeyTestCases.class);
  suite.addTestSuite(SingleAttributeNullKeyTestCases.class);
  suite.addTestSuite(SingleAttributeKeyTestCases.class);
  suite.addTestSuite(SingleElementEmptyKeyTestCases.class);
  suite.addTestSuite(SingleElementInvalidKeyTestCases.class);
  suite.addTestSuite(SingleElementNullKeyTestCases.class);
  suite.addTestSuite(SingleElementKeyTestCases.class);
  suite.addTestSuite(NonStringKeyTypeTestCases.class);
  suite.addTestSuite(MultipleSourceTestCases.class);
  suite.addTestSuite(NestedAttributeKeyTestCases.class);
  suite.addTestSuite(MultithreadedTestCases.class);
  return suite;
}
Program: 68005
Project: 68005
Buggy source:
public void addNewItem(ObjectListSelectionModel listSelectionModel){
  if (getCollectionMapping().getReferenceDescriptor() != null) {
    Collection queryKeys=getCollectionMapping().getReferenceDescriptor().getAllQueryKeysIncludingInherited();
    if (queryKeys.size() == 0) {
      getCollectionMapping().addOrdering(null);
    }
 else {
      getCollectionMapping().addOrdering((MWQueryKey)queryKeys.iterator().next());
    }
  }
}

Fixed version (ground truth):
public void addNewItem(ObjectListSelectionModel listSelectionModel){
  if (getCollectionMapping().getReferenceDescriptor() != null) {
    Collection queryKeys=getCollectionMapping().getReferenceDescriptor().getAllQueryKeysIncludingInherited();
    if (queryKeys.size() == 0) {
      getCollectionMapping().addOrdering(null);
    }
 else {
      getCollectionMapping().addOrdering((MWQueryKey)queryKeys.iterator().next());
    }
  }
 else {
    getCollectionMapping().addOrdering(null);
  }
}
Program: 68006
Project: 68006
Buggy source:
private UpDownAdapter buildTablePanelAdapter(){
  return new UpDownAdapter(){
    public void removeSelectedItems(    ObjectListSelectionModel listSelectionModel){
      Object[] selectedValues=listSelectionModel.getSelectedValues();
      for (int i=0; i < selectedValues.length; i++) {
        getCollectionMapping().removeOrdering((MWCollectionOrdering)selectedValues[i]);
      }
    }
    public void addNewItem(    ObjectListSelectionModel listSelectionModel){
      if (getCollectionMapping().getReferenceDescriptor() != null) {
        Collection queryKeys=getCollectionMapping().getReferenceDescriptor().getAllQueryKeysIncludingInherited();
        if (queryKeys.size() == 0) {
          getCollectionMapping().addOrdering(null);
        }
 else {
          getCollectionMapping().addOrdering((MWQueryKey)queryKeys.iterator().next());
        }
      }
    }
    public void moveItemsDown(    Object[] items){
      for (int i=0; i < items.length; i++) {
        getCollectionMapping().moveOrderingDown((MWCollectionOrdering)items[i]);
      }
    }
    public void moveItemsUp(    Object[] items){
      for (int i=0; i < items.length; i++) {
        getCollectionMapping().moveOrderingUp((MWCollectionOrdering)items[i]);
      }
    }
  }
;
}

Fixed version (ground truth):
private UpDownAdapter buildTablePanelAdapter(){
  return new UpDownAdapter(){
    public void removeSelectedItems(    ObjectListSelectionModel listSelectionModel){
      Object[] selectedValues=listSelectionModel.getSelectedValues();
      for (int i=0; i < selectedValues.length; i++) {
        getCollectionMapping().removeOrdering((MWCollectionOrdering)selectedValues[i]);
      }
    }
    public void addNewItem(    ObjectListSelectionModel listSelectionModel){
      if (getCollectionMapping().getReferenceDescriptor() != null) {
        Collection queryKeys=getCollectionMapping().getReferenceDescriptor().getAllQueryKeysIncludingInherited();
        if (queryKeys.size() == 0) {
          getCollectionMapping().addOrdering(null);
        }
 else {
          getCollectionMapping().addOrdering((MWQueryKey)queryKeys.iterator().next());
        }
      }
 else {
        getCollectionMapping().addOrdering(null);
      }
    }
    public void moveItemsDown(    Object[] items){
      for (int i=0; i < items.length; i++) {
        getCollectionMapping().moveOrderingDown((MWCollectionOrdering)items[i]);
      }
    }
    public void moveItemsUp(    Object[] items){
      for (int i=0; i < items.length; i++) {
        getCollectionMapping().moveOrderingUp((MWCollectionOrdering)items[i]);
      }
    }
  }
;
}
Program: 68007
Project: 68007
Buggy source:
/** 
 * Inherited suite mthod for generating all test cases.
 * @return
 */
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(new TestSuite(SDODataObjectSetGetWithPropertyTest.class));
  suite.addTest(new TestSuite(SDODataObjectSetGetWithIndexTest.class));
  suite.addTest(new TestSuite(DataHelperToYearMonthDayTest.class));
  suite.addTest(new TestSuite(DataHelperToYearMonthDayWithCalnTest.class));
  suite.addTest(new TestSuite(DataHelperToYearMonthTest.class));
  suite.addTest(new TestSuite(DataHelperToYearMonthWithCalnTest.class));
  suite.addTest(new TestSuite(DataHelperToYearTest.class));
  suite.addTest(new TestSuite(DataHelperToYearWithCalnTest.class));
  suite.addTest(new TestSuite(SDODataObjectUnsetIsSetTest.class));
  suite.addTest(new TestSuite(SDODataObjectContainerContainmentPropertyTest.class));
  suite.addTest(new TestSuite(SDODataObjectListWrapperTest.class));
  suite.addTest(new TestSuite(SDODataObjectJIRA81TestCases.class));
  suite.addTest(new TestSuite(SDODataObjectJIRA90ConversionTestCases.class));
  suite.addTest(new TestSuite(SDODataObjectJIRA102NillableDirectTestCases.class));
  suite.addTest(new TestSuite(SDODataObjectJIRA102NillableCompositeObjectTestCases.class));
  suite.addTest(new TestSuite(SDODataObjectOpenContentBug6011530TestCases.class));
  suite.addTest(new TestSuite(SetAndGetWithManyPropertyTestCases.class));
  suite.addTest(new TestSuite(SetAndGetWithManyPropertyViaPathTestCases.class));
  return suite;
}

Fixed version (ground truth):
/** 
 * Inherited suite mthod for generating all test cases.
 * @return
 */
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(new TestSuite(SDODataObjectCloneTestCases.class));
  suite.addTest(new TestSuite(SDODataObjectSetGetWithPropertyTest.class));
  suite.addTest(new TestSuite(SDODataObjectSetGetWithIndexTest.class));
  suite.addTest(new TestSuite(DataHelperToYearMonthDayTest.class));
  suite.addTest(new TestSuite(DataHelperToYearMonthDayWithCalnTest.class));
  suite.addTest(new TestSuite(DataHelperToYearMonthTest.class));
  suite.addTest(new TestSuite(DataHelperToYearMonthWithCalnTest.class));
  suite.addTest(new TestSuite(DataHelperToYearTest.class));
  suite.addTest(new TestSuite(DataHelperToYearWithCalnTest.class));
  suite.addTest(new TestSuite(SDODataObjectUnsetIsSetTest.class));
  suite.addTest(new TestSuite(SDODataObjectContainerContainmentPropertyTest.class));
  suite.addTest(new TestSuite(SDODataObjectListWrapperTest.class));
  suite.addTest(new TestSuite(SDODataObjectJIRA81TestCases.class));
  suite.addTest(new TestSuite(SDODataObjectJIRA90ConversionTestCases.class));
  suite.addTest(new TestSuite(SDODataObjectJIRA102NillableDirectTestCases.class));
  suite.addTest(new TestSuite(SDODataObjectJIRA102NillableCompositeObjectTestCases.class));
  suite.addTest(new TestSuite(SDODataObjectOpenContentBug6011530TestCases.class));
  suite.addTest(new TestSuite(SetAndGetWithManyPropertyTestCases.class));
  suite.addTest(new TestSuite(SetAndGetWithManyPropertyViaPathTestCases.class));
  return suite;
}
Program: 68009
Project: 68009
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(ObjectTypeConverterTestCases.class);
  suite.addTestSuite(TypeSafeEnumConverterTestCases.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(ObjectTypeConverterTestCases.class);
  suite.addTestSuite(TypeSafeEnumConverterTestCases.class);
  suite.addTestSuite(JAXBEnumTypeConverterTestCases.class);
  return suite;
}
Program: 68010
Project: 68010
Buggy source:
/** 
 * INTERNAL: Convert all the class-name-based settings in this converter to actual  class-based settings. This method is used when converting a project  that has been built with class names to a project with classes.
 * @param classLoader 
 */
public void convertClassNamesToClasses(){
  try {
    m_enumClass=PrivilegedAccessHelper.getClassForName(m_enumClassName);
  }
 catch (  ClassNotFoundException exception) {
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Convert all the class-name-based settings in this converter to actual  class-based settings. This method is used when converting a project  that has been built with class names to a project with classes.
 * @param classLoader 
 */
public void convertClassNamesToClasses(){
  try {
    if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
      try {
        m_enumClass=(Class)AccessController.doPrivileged(new PrivilegedClassForName(m_enumClassName));
      }
 catch (      PrivilegedActionException exception) {
        throw ValidationException.classNotFoundWhileConvertingClassNames(m_enumClassName,exception.getException());
      }
    }
 else {
      m_enumClass=org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(m_enumClassName);
    }
  }
 catch (  ClassNotFoundException exception) {
    throw ValidationException.classNotFoundWhileConvertingClassNames(m_enumClassName,exception);
  }
}
Program: 68011
Project: 68011
Buggy source:
/** 
 * Inherited suite method for generating all test cases.
 * @return
 */
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(new XSDHelperDefineTestSuite().suite());
  suite.addTest(new XSDHelperGenerateTestSuite().suite());
  suite.addTest(new SDOTypeHelperTestSuite().suite());
  suite.addTest(new SDODataFactoryTestSuite().suite());
  suite.addTest(new SDOXMLHelperTestSuite().suite());
  suite.addTest(new PluggableTestSuite().suite());
  return suite;
}

Fixed version (ground truth):
/** 
 * Inherited suite method for generating all test cases.
 * @return
 */
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(new XSDHelperDefineTestSuite().suite());
  suite.addTest(new XSDHelperGenerateTestSuite().suite());
  suite.addTest(new SDOTypeHelperTestSuite().suite());
  suite.addTest(new SDODataFactoryTestSuite().suite());
  suite.addTest(new SDOXMLHelperTestSuite().suite());
  return suite;
}
Program: 68013
Project: 68013
Buggy source:
public boolean equals(Object object){
  try {
    if (this == object) {
      return true;
    }
    XPathFragment xPathFragment=(XPathFragment)object;
    return ((localName == xPathFragment.getLocalName()) || ((localName != null) && localName.equals(xPathFragment.getLocalName()))) && ((namespaceURI == xPathFragment.getNamespaceURI()) || ((namespaceURI != null) && namespaceURI.equals(xPathFragment.getNamespaceURI()))) && (this.indexValue == xPathFragment.getIndexValue())&& (nameIsText == xPathFragment.nameIsText());
  }
 catch (  ClassCastException e) {
    return false;
  }
}

Fixed version (ground truth):
public boolean equals(Object object){
  try {
    if (this == object) {
      return true;
    }
    XPathFragment xPathFragment=(XPathFragment)object;
    return ((nameIsText && xPathFragment.nameIsText()) || (localName == xPathFragment.getLocalName()) || ((localName != null) && localName.equals(xPathFragment.getLocalName()))) && ((namespaceURI == xPathFragment.getNamespaceURI()) || ((namespaceURI != null) && namespaceURI.equals(xPathFragment.getNamespaceURI()))) && (this.indexValue == xPathFragment.getIndexValue())&& (nameIsText == xPathFragment.nameIsText());
  }
 catch (  ClassCastException e) {
    return false;
  }
}
Program: 68014
Project: 68014
Buggy source:
private void buildFragments(String xpathString){
  StringTokenizer st=new StringTokenizer(xpathString,"String_Node_Str");
  String next;
  int i=0;
  XPathFragment currentXPathFragment=null;
  XPathFragment nextXPathFragment=null;
  if (xpathString.startsWith("String_Node_Str")) {
    next=st.nextToken();
    next="String_Node_Str" + next;
    currentXPathFragment=new XPathFragment(next);
    setXPathFragment(currentXPathFragment);
    i++;
  }
  while (st.hasMoreTokens()) {
    next=st.nextToken();
    if (null != next) {
      if (next.equals("String_Node_Str")) {
        nextXPathFragment=XPathFragment.TEXT_FRAGMENT;
      }
 else {
        nextXPathFragment=new XPathFragment(next);
      }
      if (0 == i) {
        setXPathFragment(nextXPathFragment);
      }
 else {
        currentXPathFragment.setNextFragment(nextXPathFragment);
        if (nextXPathFragment.isAttribute() || nextXPathFragment.nameIsText()) {
          currentXPathFragment.setHasText(true);
        }
      }
      currentXPathFragment=nextXPathFragment;
      i++;
    }
    setLastXPathFragment(currentXPathFragment);
  }
}

Fixed version (ground truth):
private void buildFragments(String xpathString){
  StringTokenizer st=new StringTokenizer(xpathString,"String_Node_Str");
  String next;
  int i=0;
  XPathFragment currentXPathFragment=null;
  XPathFragment nextXPathFragment=null;
  if (xpathString.startsWith("String_Node_Str")) {
    next=st.nextToken();
    next="String_Node_Str" + next;
    currentXPathFragment=new XPathFragment(next);
    setXPathFragment(currentXPathFragment);
    i++;
  }
  while (st.hasMoreTokens()) {
    next=st.nextToken();
    if (null != next) {
      if (next.equals(XPathFragment.TEXT)) {
        nextXPathFragment=new XPathFragment(XPathFragment.TEXT);
      }
 else {
        nextXPathFragment=new XPathFragment(next);
      }
      if (0 == i) {
        setXPathFragment(nextXPathFragment);
      }
 else {
        currentXPathFragment.setNextFragment(nextXPathFragment);
        if (nextXPathFragment.isAttribute() || nextXPathFragment.nameIsText()) {
          currentXPathFragment.setHasText(true);
        }
      }
      currentXPathFragment=nextXPathFragment;
      i++;
    }
    setLastXPathFragment(currentXPathFragment);
  }
}
Program: 68017
Project: 68017
Buggy source:
protected ClassDescriptor buildXMLChoiceCollectionMappingDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(XMLChoiceCollectionMapping.class);
  descriptor.getInheritancePolicy().setParentClass(DatabaseMapping.class);
  XMLCompositeObjectMapping containerPolicyMapping=new XMLCompositeObjectMapping();
  containerPolicyMapping.setAttributeName("String_Node_Str");
  containerPolicyMapping.setReferenceClass(ContainerPolicy.class);
  containerPolicyMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(containerPolicyMapping);
  XMLCompositeCollectionMapping fieldToClassNameMapping=new XMLCompositeCollectionMapping();
  fieldToClassNameMapping.setAttributeName("String_Node_Str");
  fieldToClassNameMapping.setGetMethodName("String_Node_Str");
  fieldToClassNameMapping.setSetMethodName("String_Node_Str");
  fieldToClassNameMapping.setReferenceClass(XMLChoiceFieldToClassAssociation.class);
  fieldToClassNameMapping.useCollectionClass(ArrayList.class);
  fieldToClassNameMapping.setXPath(getPrimaryNamespacePrefix() + "String_Node_Str");
  descriptor.addMapping(fieldToClassNameMapping);
  return descriptor;
}

Fixed version (ground truth):
protected ClassDescriptor buildXMLChoiceCollectionMappingDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(XMLChoiceCollectionMapping.class);
  descriptor.getInheritancePolicy().setParentClass(DatabaseMapping.class);
  XMLCompositeObjectMapping containerPolicyMapping=new XMLCompositeObjectMapping();
  containerPolicyMapping.setAttributeName("String_Node_Str");
  containerPolicyMapping.setReferenceClass(ContainerPolicy.class);
  containerPolicyMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(containerPolicyMapping);
  XMLCompositeCollectionMapping fieldToClassNameMapping=new XMLCompositeCollectionMapping();
  fieldToClassNameMapping.setAttributeName("String_Node_Str");
  fieldToClassNameMapping.setGetMethodName("String_Node_Str");
  fieldToClassNameMapping.setSetMethodName("String_Node_Str");
  fieldToClassNameMapping.setReferenceClass(XMLChoiceFieldToClassAssociation.class);
  fieldToClassNameMapping.useCollectionClass(ArrayList.class);
  fieldToClassNameMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(fieldToClassNameMapping);
  return descriptor;
}
Program: 68019
Project: 68019
Buggy source:
/** 
 * INTERNAL: Execute the query in the unit of work. This allows any pre-execute checks to be done for unit of work queries.
 */
public Object executeInUnitOfWork(UnitOfWorkImpl unitOfWork,AbstractRecord translationRow) throws DatabaseException, OptimisticLockException {
  Object result=null;
  if (!shouldMaintainCache() || isReadOnly()) {
    result=unitOfWork.getParent().executeQuery(this,translationRow);
  }
 else {
    result=execute(unitOfWork,translationRow);
  }
  if (lockModeType != null && result != null) {
    if (lockModeType.equals(READ) || lockModeType.equals(WRITE) || lockModeType.contains(OPTIMISTIC)) {
      boolean forceUpdateToVersionField=lockModeType.equals(WRITE) || lockModeType.equals(OPTIMISTIC_FORCE_INCREMENT);
      if (result instanceof Collection) {
        Iterator i=((Collection)result).iterator();
        while (i.hasNext()) {
          Object obj=i.next();
          if (obj != null) {
            if (obj instanceof Object[]) {
              for (              Object o : (Object[])obj) {
                if (o != null) {
                  unitOfWork.forceUpdateToVersionField(o,forceUpdateToVersionField);
                }
              }
            }
 else {
              unitOfWork.forceUpdateToVersionField(obj,forceUpdateToVersionField);
            }
          }
        }
      }
 else {
        unitOfWork.forceUpdateToVersionField(result,forceUpdateToVersionField);
      }
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Execute the query in the unit of work. This allows any pre-execute checks to be done for unit of work queries.
 */
public Object executeInUnitOfWork(UnitOfWorkImpl unitOfWork,AbstractRecord translationRow) throws DatabaseException, OptimisticLockException {
  Object result=null;
  if (!shouldMaintainCache() || isReadOnly()) {
    result=unitOfWork.getParent().executeQuery(this,translationRow);
  }
 else {
    result=execute(unitOfWork,translationRow);
  }
  if (lockModeType != null && result != null) {
    if (lockModeType.equals(READ) || lockModeType.equals(WRITE) || lockModeType.contains(OPTIMISTIC)|| lockModeType.equals(PESSIMISTIC_FORCE_INCREMENT)) {
      boolean forceUpdateToVersionField=lockModeType.equals(WRITE) || lockModeType.equals(OPTIMISTIC_FORCE_INCREMENT) || lockModeType.equals(PESSIMISTIC_FORCE_INCREMENT);
      if (result instanceof Collection) {
        Iterator i=((Collection)result).iterator();
        while (i.hasNext()) {
          Object obj=i.next();
          if (obj != null) {
            if (obj instanceof Object[]) {
              for (              Object o : (Object[])obj) {
                if (o != null) {
                  unitOfWork.forceUpdateToVersionField(o,forceUpdateToVersionField);
                }
              }
            }
 else {
              unitOfWork.forceUpdateToVersionField(obj,forceUpdateToVersionField);
            }
          }
        }
      }
 else {
        unitOfWork.forceUpdateToVersionField(result,forceUpdateToVersionField);
      }
    }
  }
  return result;
}