nus-yam/ex-repair huggingface dataset:
Program: 68552
Project: 68552
Buggy source:
public void simpleInOneDotTest(){
  org.eclipse.persistence.jpa.JpaEntityManager em=(org.eclipse.persistence.jpa.JpaEntityManager)createEntityManager();
  ReadObjectQuery roq=new ReadObjectQuery(Employee.class);
  ExpressionBuilder empBldr=new ExpressionBuilder();
  Expression exp1=empBldr.get("String_Node_Str").equal("String_Node_Str");
  Expression exp2=empBldr.get("String_Node_Str").equal("String_Node_Str");
  roq.setSelectionCriteria(exp1.and(exp2));
  Employee expectedResult=(Employee)em.getActiveSession().executeQuery(roq);
  clearCache();
  PhoneNumber empPhoneNumbers=(PhoneNumber)((Vector)expectedResult.getPhoneNumbers()).elementAt(0);
  String ejbqlString="String_Node_Str" + "String_Node_Str" + empPhoneNumbers.getAreaCode() + "String_Node_Str"+ "String_Node_Str"+ expectedResult.getFirstName()+ "String_Node_Str";
  ejbqlString=ejbqlString + "String_Node_Str" + expectedResult.getLastName()+ "String_Node_Str";
  Employee result=(Employee)em.createQuery(ejbqlString).getSingleResult();
  Assert.assertTrue("String_Node_Str",comparer.compareObjects(result,expectedResult));
}

Fixed version (ground truth):
public void simpleInOneDotTest(){
  org.eclipse.persistence.jpa.JpaEntityManager em=(org.eclipse.persistence.jpa.JpaEntityManager)createEntityManager();
  ReadObjectQuery roq=new ReadObjectQuery(Employee.class);
  ExpressionBuilder empBldr=new ExpressionBuilder();
  Expression exp1=empBldr.get("String_Node_Str").equal("String_Node_Str");
  Expression exp2=empBldr.get("String_Node_Str").equal("String_Node_Str");
  roq.setSelectionCriteria(exp1.and(exp2));
  Employee expectedResult=(Employee)em.getActiveSession().executeQuery(roq);
  clearCache();
  PhoneNumber empPhoneNumbers=(PhoneNumber)((java.util.LinkedList)expectedResult.getPhoneNumbers()).getFirst();
  String ejbqlString="String_Node_Str" + "String_Node_Str" + empPhoneNumbers.getAreaCode() + "String_Node_Str"+ "String_Node_Str"+ expectedResult.getFirstName()+ "String_Node_Str";
  ejbqlString=ejbqlString + "String_Node_Str" + expectedResult.getLastName()+ "String_Node_Str";
  Employee result=(Employee)em.createQuery(ejbqlString).getSingleResult();
  Assert.assertTrue("String_Node_Str",comparer.compareObjects(result,expectedResult));
}
Program: 68553
Project: 68553
Buggy source:
public void collectionMemberIdentifierEqualsTest(){
  org.eclipse.persistence.jpa.JpaEntityManager em=(org.eclipse.persistence.jpa.JpaEntityManager)createEntityManager();
  ExpressionBuilder employees=new ExpressionBuilder();
  Expression exp=employees.get("String_Node_Str").equal("String_Node_Str");
  exp=exp.and(employees.get("String_Node_Str").equal("String_Node_Str"));
  Employee expectedResult=(Employee)em.getActiveSession().readAllObjects(Employee.class,exp).firstElement();
  clearCache();
  PhoneNumber phoneNumber=(PhoneNumber)((Vector)expectedResult.getPhoneNumbers()).firstElement();
  String ejbqlString="String_Node_Str" + "String_Node_Str";
  List result=em.createQuery(ejbqlString).setParameter(1,phoneNumber).getResultList();
  Assert.assertTrue("String_Node_Str",comparer.compareObjects(expectedResult,result));
}

Fixed version (ground truth):
public void collectionMemberIdentifierEqualsTest(){
  org.eclipse.persistence.jpa.JpaEntityManager em=(org.eclipse.persistence.jpa.JpaEntityManager)createEntityManager();
  ExpressionBuilder employees=new ExpressionBuilder();
  Expression exp=employees.get("String_Node_Str").equal("String_Node_Str");
  exp=exp.and(employees.get("String_Node_Str").equal("String_Node_Str"));
  Employee expectedResult=(Employee)em.getActiveSession().readAllObjects(Employee.class,exp).firstElement();
  clearCache();
  PhoneNumber phoneNumber=(PhoneNumber)((java.util.LinkedList)expectedResult.getPhoneNumbers()).getFirst();
  String ejbqlString="String_Node_Str" + "String_Node_Str";
  List result=em.createQuery(ejbqlString).setParameter(1,phoneNumber).getResultList();
  Assert.assertTrue("String_Node_Str",comparer.compareObjects(expectedResult,result));
}
Program: 68555
Project: 68555
Buggy source:
public void testSelectPhoneNumberAreaCodeWithEmployee(){
  org.eclipse.persistence.jpa.JpaEntityManager em=(org.eclipse.persistence.jpa.JpaEntityManager)createEntityManager();
  ExpressionBuilder employees=new ExpressionBuilder();
  Expression exp=employees.get("String_Node_Str").equal("String_Node_Str");
  exp=exp.and(employees.get("String_Node_Str").equal("String_Node_Str"));
  Employee emp=(Employee)em.getActiveSession().readAllObjects(Employee.class,exp).firstElement();
  PhoneNumber phone=(PhoneNumber)((Vector)emp.getPhoneNumbers()).firstElement();
  String areaCode=phone.getAreaCode();
  String firstName=emp.getFirstName();
  ExpressionBuilder employeeBuilder=new ExpressionBuilder();
  Expression phones=employeeBuilder.anyOf("String_Node_Str");
  Expression whereClause=phones.get("String_Node_Str").equal(areaCode).and(phones.get("String_Node_Str").get("String_Node_Str").equal(firstName));
  ReportQuery rq=new ReportQuery();
  rq.setSelectionCriteria(whereClause);
  rq.addAttribute("String_Node_Str",phones.get("String_Node_Str"));
  rq.setReferenceClass(Employee.class);
  rq.dontMaintainCache();
  Vector expectedResult=getAttributeFromAll("String_Node_Str",(Vector)em.getActiveSession().executeQuery(rq),Employee.class);
  clearCache();
  String ejbqlString;
  ejbqlString="String_Node_Str" + "String_Node_Str" + areaCode + "String_Node_Str"+ firstName+ "String_Node_Str";
  List result=em.createQuery(ejbqlString).getResultList();
  Assert.assertTrue("String_Node_Str",comparer.compareObjects(result,expectedResult));
}

Fixed version (ground truth):
public void testSelectPhoneNumberAreaCodeWithEmployee(){
  org.eclipse.persistence.jpa.JpaEntityManager em=(org.eclipse.persistence.jpa.JpaEntityManager)createEntityManager();
  ExpressionBuilder employees=new ExpressionBuilder();
  Expression exp=employees.get("String_Node_Str").equal("String_Node_Str");
  exp=exp.and(employees.get("String_Node_Str").equal("String_Node_Str"));
  Employee emp=(Employee)em.getActiveSession().readAllObjects(Employee.class,exp).firstElement();
  PhoneNumber phone=(PhoneNumber)((java.util.LinkedList)emp.getPhoneNumbers()).getFirst();
  String areaCode=phone.getAreaCode();
  String firstName=emp.getFirstName();
  ExpressionBuilder employeeBuilder=new ExpressionBuilder();
  Expression phones=employeeBuilder.anyOf("String_Node_Str");
  Expression whereClause=phones.get("String_Node_Str").equal(areaCode).and(phones.get("String_Node_Str").get("String_Node_Str").equal(firstName));
  ReportQuery rq=new ReportQuery();
  rq.setSelectionCriteria(whereClause);
  rq.addAttribute("String_Node_Str",phones.get("String_Node_Str"));
  rq.setReferenceClass(Employee.class);
  rq.dontMaintainCache();
  Vector expectedResult=getAttributeFromAll("String_Node_Str",(Vector)em.getActiveSession().executeQuery(rq),Employee.class);
  clearCache();
  String ejbqlString;
  ejbqlString="String_Node_Str" + "String_Node_Str" + areaCode + "String_Node_Str"+ firstName+ "String_Node_Str";
  List result=em.createQuery(ejbqlString).getResultList();
  Assert.assertTrue("String_Node_Str",comparer.compareObjects(result,expectedResult));
}
Program: 68556
Project: 68556
Buggy source:
public void testSelectPhoneNumberNumberWithEmployeeWithFirstNameFirst(){
  org.eclipse.persistence.jpa.JpaEntityManager em=(org.eclipse.persistence.jpa.JpaEntityManager)createEntityManager();
  ExpressionBuilder employees=new ExpressionBuilder();
  Expression exp=employees.get("String_Node_Str").equal("String_Node_Str");
  exp=exp.and(employees.get("String_Node_Str").equal("String_Node_Str"));
  Employee emp=(Employee)em.getActiveSession().readAllObjects(Employee.class,exp).firstElement();
  PhoneNumber phone=(PhoneNumber)((Vector)emp.getPhoneNumbers()).firstElement();
  String areaCode=phone.getAreaCode();
  String firstName=emp.getFirstName();
  ExpressionBuilder employeeBuilder=new ExpressionBuilder();
  Expression phones=employeeBuilder.anyOf("String_Node_Str");
  Expression whereClause=phones.get("String_Node_Str").get("String_Node_Str").equal(firstName).and(phones.get("String_Node_Str").equal(areaCode));
  ReportQuery rq=new ReportQuery();
  rq.setSelectionCriteria(whereClause);
  rq.addAttribute("String_Node_Str",phones.get("String_Node_Str"));
  rq.setReferenceClass(Employee.class);
  Vector expectedResult=getAttributeFromAll("String_Node_Str",(Vector)em.getActiveSession().executeQuery(rq),Employee.class);
  clearCache();
  String ejbqlString;
  ejbqlString="String_Node_Str" + "String_Node_Str" + firstName + "String_Node_Str"+ areaCode+ "String_Node_Str";
  List result=em.createQuery(ejbqlString).getResultList();
  Assert.assertTrue("String_Node_Str",comparer.compareObjects(result,expectedResult));
}

Fixed version (ground truth):
public void testSelectPhoneNumberNumberWithEmployeeWithFirstNameFirst(){
  org.eclipse.persistence.jpa.JpaEntityManager em=(org.eclipse.persistence.jpa.JpaEntityManager)createEntityManager();
  ExpressionBuilder employees=new ExpressionBuilder();
  Expression exp=employees.get("String_Node_Str").equal("String_Node_Str");
  exp=exp.and(employees.get("String_Node_Str").equal("String_Node_Str"));
  Employee emp=(Employee)em.getActiveSession().readAllObjects(Employee.class,exp).firstElement();
  PhoneNumber phone=(PhoneNumber)((java.util.LinkedList)emp.getPhoneNumbers()).getFirst();
  String areaCode=phone.getAreaCode();
  String firstName=emp.getFirstName();
  ExpressionBuilder employeeBuilder=new ExpressionBuilder();
  Expression phones=employeeBuilder.anyOf("String_Node_Str");
  Expression whereClause=phones.get("String_Node_Str").get("String_Node_Str").equal(firstName).and(phones.get("String_Node_Str").equal(areaCode));
  ReportQuery rq=new ReportQuery();
  rq.setSelectionCriteria(whereClause);
  rq.addAttribute("String_Node_Str",phones.get("String_Node_Str"));
  rq.setReferenceClass(Employee.class);
  Vector expectedResult=getAttributeFromAll("String_Node_Str",(Vector)em.getActiveSession().executeQuery(rq),Employee.class);
  clearCache();
  String ejbqlString;
  ejbqlString="String_Node_Str" + "String_Node_Str" + firstName + "String_Node_Str"+ areaCode+ "String_Node_Str";
  List result=em.createQuery(ejbqlString).getResultList();
  Assert.assertTrue("String_Node_Str",comparer.compareObjects(result,expectedResult));
}
Program: 68558
Project: 68558
Buggy source:
/** 
 * INTERNAL: Set the correct indirection policy on a collection mapping. Method assume that the reference class has been set on the mapping before calling this method.
 */
public void setIndirectionPolicy(CollectionMapping mapping,String mapKey,boolean usesIndirection){
  Class rawClass=getRawClass();
  if (usesIndirection) {
    if (rawClass == Map.class) {
      mapping.useTransparentMap(mapKey);
    }
 else     if (rawClass == List.class) {
      mapping.useTransparentList();
    }
 else     if (rawClass == Collection.class) {
      mapping.useTransparentCollection();
      mapping.setContainerPolicy(new CollectionContainerPolicy(ClassConstants.IndirectList_Class));
    }
 else     if (rawClass == Set.class) {
      mapping.useTransparentSet();
    }
 else {
    }
  }
 else {
    mapping.dontUseIndirection();
    if (rawClass == Map.class) {
      mapping.useMapClass(java.util.Hashtable.class,mapKey);
    }
 else     if (rawClass == Set.class) {
      mapping.useCollectionClass(java.util.HashSet.class);
    }
 else {
      mapping.useCollectionClass(java.util.Vector.class);
    }
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Set the correct indirection policy on a collection mapping. Method assume that the reference class has been set on the mapping before calling this method.
 */
public void setIndirectionPolicy(CollectionMapping mapping,String mapKey,boolean usesIndirection){
  Class rawClass=getRawClass();
  if (usesIndirection) {
    if (rawClass == Map.class) {
      mapping.useTransparentMap(mapKey);
    }
 else     if (rawClass == List.class) {
      mapping.useTransparentList();
    }
 else     if (rawClass == Collection.class) {
      mapping.useTransparentCollection();
      mapping.setContainerPolicy(new CollectionContainerPolicy(ClassConstants.IndirectList_Class));
    }
 else     if (rawClass == Set.class) {
      mapping.useTransparentSet();
    }
 else {
      this.getLogger().logWarningMessage(MetadataLogger.WARNING_INVALID_COLLECTION_USED_ON_LAZY_RELATION,this.getJavaClass(),this.getAnnotatedElement(),rawClass);
    }
  }
 else {
    mapping.dontUseIndirection();
    if (rawClass == Map.class) {
      mapping.useMapClass(java.util.Hashtable.class,mapKey);
    }
 else     if (rawClass == Set.class) {
      mapping.useCollectionClass(java.util.HashSet.class);
    }
 else     if ((rawClass == List.class) || (rawClass == Collection.class)) {
      mapping.useCollectionClass(java.util.Vector.class);
    }
 else {
      if (mapKey == null || mapKey.equals("String_Node_Str")) {
        mapping.useCollectionClass(rawClass);
      }
 else {
        mapping.useMapClass(rawClass,mapKey);
      }
    }
  }
}
Program: 68559
Project: 68559
Buggy source:
public void test(){
  ReadObjectQuery query=new ReadObjectQuery(IsolatedEmployee.class);
  Session client1=this.server.acquireClientSession();
  IsolatedEmployee employee=(IsolatedEmployee)client1.executeQuery(query);
  client1.release();
  try {
    employee.getPhoneNumbers();
    throw new TestErrorException("String_Node_Str");
  }
 catch (  ValidationException ex) {
  }
}

Fixed version (ground truth):
public void test(){
  ReadObjectQuery query=new ReadObjectQuery(IsolatedEmployee.class);
  ClientSession client1=this.server.acquireClientSession();
  IsolatedEmployee employee=(IsolatedEmployee)client1.executeQuery(query);
  if (numAcquireExclusive != 1 || numReleaseExclusive != 0) {
    errorMsg+="String_Node_Str" + numAcquireExclusive + "String_Node_Str"+ numReleaseExclusive+ "String_Node_Str";
  }
  client1.release();
  if (numAcquireExclusive != 1 || numReleaseExclusive != 1) {
    errorMsg+="String_Node_Str" + numAcquireExclusive + "String_Node_Str"+ numReleaseExclusive+ "String_Node_Str";
  }
  if (client1.getWriteConnection() != null) {
    errorMsg+="String_Node_Str";
  }
  employee.getPhoneNumbers();
  if (numAcquireExclusive != 2 || numReleaseExclusive != 2) {
    errorMsg+="String_Node_Str" + numAcquireExclusive + "String_Node_Str"+ numReleaseExclusive+ "String_Node_Str";
  }
  if (client1.getWriteConnection() != null) {
    errorMsg+="String_Node_Str";
  }
}
Program: 68560
Project: 68560
Buggy source:
public void reset(){
  try {
    this.server.logout();
    getDatabaseSession().logout();
    getDatabaseSession().login();
    String schemaName=getSession().getLogin().getUserName();
  }
 catch (  DatabaseException ex) {
  }
}

Fixed version (ground truth):
public void reset(){
  try {
    errorMsg="String_Node_Str";
    numAcquireExclusive=0;
    numReleaseExclusive=0;
    this.server.getEventManager().removeListener(listener);
    this.server.logout();
    getDatabaseSession().logout();
    getDatabaseSession().login();
    String schemaName=getSession().getLogin().getUserName();
  }
 catch (  DatabaseException ex) {
  }
}
Program: 68561
Project: 68561
Buggy source:
public void setup(){
  try {
    this.emps=getSession().readAllObjects(IsolatedEmployee.class);
    String schemaName=getSession().getLogin().getUserName();
    this.login=(DatabaseLogin)getSession().getLogin().clone();
    this.server=new ServerSession(this.login,2,5);
    this.server.getDefaultConnectionPolicy().setShouldUseExclusiveConnection(true);
    this.server.setSessionLog(getSession().getSessionLog());
    copyDescriptors(getSession());
    this.server.login();
  }
 catch (  RuntimeException ex) {
    getSession().logMessage("String_Node_Str");
    throw ex;
  }
}

Fixed version (ground truth):
public void setup(){
  try {
    this.emps=getSession().readAllObjects(IsolatedEmployee.class);
    String schemaName=getSession().getLogin().getUserName();
    this.login=(DatabaseLogin)getSession().getLogin().clone();
    this.server=new ServerSession(this.login,2,5);
    this.server.getDefaultConnectionPolicy().setShouldUseExclusiveConnection(true);
    this.server.setSessionLog(getSession().getSessionLog());
    copyDescriptors(getSession());
    this.server.getEventManager().addListener(listener);
    this.server.login();
  }
 catch (  RuntimeException ex) {
    getSession().logMessage("String_Node_Str");
    throw ex;
  }
}
Program: 68562
Project: 68562
Buggy source:
public void verify(){
}

Fixed version (ground truth):
public void verify(){
  if (errorMsg.length() > 0) {
    throw new TestErrorException(errorMsg);
  }
}
Program: 68563
Project: 68563
Buggy source:
public Class loadClass(String className,SDOType type) throws ClassNotFoundException {
  Class javaClass=null;
  try {
    javaClass=delegateLoader.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;
    }
  }
  return javaClass;
}

Fixed version (ground truth):
public Class loadClass(String className,SDOType type) throws ClassNotFoundException {
  Class javaClass=null;
  javaClass=(Class)generatedClasses.get(className);
  if (javaClass != null) {
    return javaClass;
  }
  try {
    javaClass=delegateLoader.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;
    }
  }
  return javaClass;
}
Program: 68564
Project: 68564
Buggy source:
/** 
 * Returns whether or not the specified data object was updated while   {@link #isLogging logging}. An object that was contained in the scope when logging began and remains in the scope when logging ends will be considered potentially modified. <p> An object considered modified must have at least one old value setting.
 * @param dataObject the data object in question.
 * @return <code>true</code> if the specified data object was modified.
 * @see #getChangedDataObjects
 */
public boolean isModified(DataObject dataObject){
  return (modifiedList != null) && modifiedList.contains(dataObject);
}

Fixed version (ground truth):
/** 
 * Returns whether or not the specified data object was updated while   {@link #isLogging logging}. An object that was contained in the scope when logging began and remains in the scope when logging ends will be considered potentially modified. <p> An object considered modified must have at least one old value setting.
 * @param dataObject the data object in question.
 * @return <code>true</code> if the specified data object was modified.
 * @see #getChangedDataObjects
 */
public boolean isModified(DataObject dataObject){
  if (this.originalValueStores.get(dataObject) == null || isDeleted(dataObject)) {
    return false;
  }
  return true;
}
Program: 68565
Project: 68565
Buggy source:
/** 
 * INTERNAL: Return all modified objects
 * @return Set
 */
public List getModified(){
  return modifiedList;
}

Fixed version (ground truth):
private void getModified(SDODataObject sdoDataObject,List modifiedList){
  if (null == sdoDataObject) {
    return;
  }
  if (isModified(sdoDataObject)) {
    modifiedList.add(sdoDataObject);
  }
  List<Property> properties=(List<Property>)sdoDataObject.getInstanceProperties();
  for (int x=0; x < properties.size(); x++) {
    Property property=properties.get(x);
    if (property.isContainment()) {
      if (property.isMany()) {
        List<SDODataObject> dataObjects=(List<SDODataObject>)sdoDataObject.getList(property);
        for (int y=0; y < dataObjects.size(); y++) {
          getModified(dataObjects.get(y),modifiedList);
        }
      }
 else {
        if ((property.getType() != null) && !(((SDOType)property.getType()).isChangeSummaryType())) {
          getModified((SDODataObject)sdoDataObject.getDataObject(property),modifiedList);
        }
      }
    }
  }
}
Program: 68566
Project: 68566
Buggy source:
/** 
 * INTERNAL: Set flag created value.
 * @param created   flag created's new value.
 */
public void setCreated(DataObject anObject,boolean created){
  if (getRootObject() == anObject) {
    return;
  }
  if (isLogging() && !created) {
    createdList.remove(anObject);
  }
  if (isLogging() && !isCreated(anObject)) {
    if (created) {
      modifiedList.remove(anObject);
      deletedList.remove(anObject);
      createdList.add(anObject);
    }
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Set flag created value.
 * @param created   flag created's new value.
 */
public void setCreated(DataObject anObject,boolean created){
  if (getRootObject() == anObject) {
    return;
  }
  if (isLogging() && !created) {
    createdList.remove(anObject);
  }
  if (isLogging() && !isCreated(anObject)) {
    if (created) {
      deletedList.remove(anObject);
      createdList.add(anObject);
    }
  }
}
Program: 68567
Project: 68567
Buggy source:
/** 
 * INTERNAL: Called from beginLogging and undoChanges
 */
private void resetChanges(){
  createdList.clear();
  deletedList.clear();
  modifiedList.clear();
  oldSettings.clear();
  deepCopies.clear();
  oldContainer.clear();
  oldContainmentProperty.clear();
  unsetPropsMap.clear();
  unsetOCPropsMap.clear();
  originalValueStores.clear();
  originalElements.clear();
  reverseDeletedMap.clear();
  getOldSequences().clear();
  getOriginalSequences().clear();
}

Fixed version (ground truth):
/** 
 * INTERNAL: Called from beginLogging and undoChanges
 */
private void resetChanges(){
  createdList.clear();
  deletedList.clear();
  oldSettings.clear();
  deepCopies.clear();
  oldContainer.clear();
  oldContainmentProperty.clear();
  unsetPropsMap.clear();
  unsetOCPropsMap.clear();
  originalValueStores.clear();
  originalElements.clear();
  reverseDeletedMap.clear();
  getOldSequences().clear();
  getOriginalSequences().clear();
}
Program: 68568
Project: 68568
Buggy source:
/** 
 * Returns a list consisting of all the   {@link DataObject data objects} that have been changed while {@link #isLogging logging}. <p> The   {@link #isCreated new} and {@link #isModified modified} objects in the List are references to objectsassociated with this ChangeSummary. The  {@link #isDeleted deleted} objects in the List are references to objectsat the time that event logging was enabled; <p> Each changed object must have exactly one of the following methods return true: {@link #isCreated isCreated},  {@link #isDeleted isDeleted}, or  {@link #isModified isModified}.
 * @return a list of changed data objects.
 * @see #isCreated(DataObject)
 * @see #isDeleted(DataObject)
 * @see #isModified(DataObject)
 */
public List getChangedDataObjects(){
  ArrayList aList=new ArrayList();
  if (modifiedList != null) {
    aList.addAll(modifiedList);
  }
  if (deletedList != null) {
    aList.addAll(deletedList);
  }
  if (createdList != null) {
    aList.addAll(createdList);
  }
  return aList;
}

Fixed version (ground truth):
/** 
 * Returns a list consisting of all the   {@link DataObject data objects} that have been changed while {@link #isLogging logging}. <p> The   {@link #isCreated new} and {@link #isModified modified} objects in the List are references to objectsassociated with this ChangeSummary. The  {@link #isDeleted deleted} objects in the List are references to objectsat the time that event logging was enabled; <p> Each changed object must have exactly one of the following methods return true: {@link #isCreated isCreated},  {@link #isDeleted isDeleted}, or  {@link #isModified isModified}.
 * @return a list of changed data objects.
 * @see #isCreated(DataObject)
 * @see #isDeleted(DataObject)
 * @see #isModified(DataObject)
 */
public List getChangedDataObjects(){
  ArrayList aList=new ArrayList();
  aList.addAll(getModified());
  if (deletedList != null) {
    aList.addAll(deletedList);
  }
  if (createdList != null) {
    aList.addAll(createdList);
  }
  return aList;
}
Program: 68569
Project: 68569
Buggy source:
/** 
 * INTERNAL: Set flag modified value.
 * @param deleted   flag modified's new value.
 */
public boolean setDeleted(DataObject anObject,boolean deleted){
  if (getRootObject() == anObject) {
    return false;
  }
  if (isLogging() && !deleted) {
    deletedList.remove(anObject);
  }
  if (isLogging() && !this.isDeleted(anObject)) {
    if (deleted) {
      modifiedList.remove(anObject);
      if (isCreated(anObject)) {
        createdList.remove(anObject);
        oldSettings.remove(anObject);
        originalValueStores.remove(anObject);
        originalElements.remove(anObject);
        return false;
      }
 else {
        pauseLogging();
        deletedList.add(anObject);
        resumeLogging();
      }
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Set flag modified value.
 * @param deleted   flag modified's new value.
 */
public boolean setDeleted(DataObject anObject,boolean deleted){
  if (getRootObject() == anObject) {
    return false;
  }
  if (isLogging() && !deleted) {
    deletedList.remove(anObject);
  }
  if (isLogging() && !this.isDeleted(anObject)) {
    if (deleted) {
      if (isCreated(anObject)) {
        createdList.remove(anObject);
        oldSettings.remove(anObject);
        originalValueStores.remove(anObject);
        originalElements.remove(anObject);
        return false;
      }
 else {
        pauseLogging();
        deletedList.add(anObject);
        resumeLogging();
      }
    }
  }
  return true;
}
Program: 68570
Project: 68570
Buggy source:
/** 
 * INTERNAL: Set flag modified value.
 * @param modified   flag modified's new value.
 */
public void _setModified(boolean modified){
  if (changeSummary != null) {
    ((SDOChangeSummary)changeSummary).setModified(this,modified);
    if (isLogging()) {
      updateChangeSummaryWithOriginalValues();
    }
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Set flag modified value.
 * @param modified   flag modified's new value.
 */
public void _setModified(boolean modified){
  if (changeSummary != null) {
    if (isLogging()) {
      updateChangeSummaryWithOriginalValues();
    }
  }
}
Program: 68571
Project: 68571
Buggy source:
/** 
 * INTERNAL:
 */
public void buildChangeSummaryMapping(){
  XMLCompositeObjectMapping aCMapping=new XMLCompositeObjectMapping();
  aCMapping.setAttributeName(getName());
  String xpath=getQualifiedXPath(getContainingType().getURI(),false);
  aCMapping.setXPath(xpath);
  aCMapping.setGetMethodName("String_Node_Str");
  aCMapping.setSetMethodName("String_Node_Str");
  aCMapping.setReferenceClass(SDOChangeSummary.class);
  setXmlMapping(aCMapping);
  return;
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public void buildChangeSummaryMapping(){
  XMLCompositeObjectMapping aCMapping=new XMLCompositeObjectMapping();
  aCMapping.setAttributeName(getName());
  String xpath=getQualifiedXPath(getContainingType().getURI(),false);
  aCMapping.setXPath(xpath);
  aCMapping.setGetMethodName("String_Node_Str");
  aCMapping.setSetMethodName("String_Node_Str");
  aCMapping.setReferenceClass(SDOChangeSummary.class);
  if (nullable) {
    setIsSetNillablePolicyOnMapping(aCMapping,propertyName);
  }
 else {
    setIsSetOptionalPolicyOnMapping(aCMapping,propertyName);
  }
  setXmlMapping(aCMapping);
}
Program: 68572
Project: 68572
Buggy source:
/** 
 * INTERNAL:
 * @param index
 * @param item
 * @param updateSequence
 */
public void add(int index,Object item,boolean updateSequence){
  if ((index < 0) || (index > size())) {
    return;
  }
  copyElements();
  updateContainment(item,updateSequence);
  currentElements.add(index,item);
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 * @param index
 * @param item
 * @param updateSequence
 */
public void add(int index,Object item,boolean updateSequence){
  if ((index < 0) || (index > size())) {
    return;
  }
  copyElements();
  currentElements.add(index,item);
  updateContainment(item,updateSequence);
}
Program: 68574
Project: 68574
Buggy source:
/** 
 * @param currentDO
 * @param isCSonAncestor
 */
public void assertChangeSummaryStatusIfClearedIfCSIsAncestor(DataObject currentDO,boolean isCSonAncestor){
  if (currentDO != null) {
    if (isCSonAncestor) {
      assertNull(((SDODataObject)currentDO).getChangeSummary());
    }
 else {
      assertNotNull(((SDODataObject)currentDO).getChangeSummary());
    }
    List instanceProperties=currentDO.getInstanceProperties();
    for (int i=0; i < instanceProperties.size(); i++) {
      Property nextProperty=(Property)instanceProperties.get(i);
      Object value=currentDO.get(nextProperty);
      if (nextProperty.getType() != SDO_CHANGESUMMARY && !nextProperty.getType().isDataType() && value != null) {
        if (nextProperty.isMany()) {
          Object manyItem;
          for (int index=0; index < ((List)value).size(); index++) {
            manyItem=((List)value).get(index);
            if (manyItem != null) {
              assertChangeSummaryStatusIfClearedIfCSIsAncestor((SDODataObject)manyItem,isCSonAncestor);
            }
          }
        }
 else {
          assertChangeSummaryStatusIfClearedIfCSIsAncestor((SDODataObject)value,isCSonAncestor);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @param currentDO
 * @param isCSonAncestor
 */
public void assertChangeSummaryStatusIfClearedIfCSIsAncestor(DataObject currentDO,boolean isCSonAncestor){
  if (currentDO != null) {
    if (isCSonAncestor) {
      assertNull(((SDODataObject)currentDO).getChangeSummary());
    }
 else {
      assertNotNull(((SDODataObject)currentDO).getChangeSummary());
    }
    List instanceProperties=currentDO.getInstanceProperties();
    for (int i=0; i < instanceProperties.size(); i++) {
      SDOProperty nextProperty=(SDOProperty)instanceProperties.get(i);
      Object value=currentDO.get(nextProperty);
      if (!nextProperty.getType().isChangeSummaryType() && !nextProperty.getType().isDataType() && value != null) {
        if (nextProperty.isMany()) {
          Object manyItem;
          for (int index=0; index < ((List)value).size(); index++) {
            manyItem=((List)value).get(index);
            if (manyItem != null) {
              assertChangeSummaryStatusIfClearedIfCSIsAncestor((SDODataObject)manyItem,isCSonAncestor);
            }
          }
        }
 else {
          assertChangeSummaryStatusIfClearedIfCSIsAncestor((SDODataObject)value,isCSonAncestor);
        }
      }
    }
  }
}
Program: 68577
Project: 68577
Buggy source:
public void testDataObjectNotInContainmentTree(){
  SDOType notInTreeRootType=new SDOType(aHelperContext);
  SDOProperty notInTreeProperty=new SDOProperty(aHelperContext);
  notInTreeProperty.setName("String_Node_Str");
  SDOType notInTreePropertyType=new SDOType(aHelperContext);
  notInTreePropertyType.setDataType(false);
  notInTreeProperty.setContainment(true);
  notInTreeProperty.setType(notInTreePropertyType);
  notInTreeRootType.addDeclaredProperty(notInTreeProperty);
  SDODataObject dataObjectNotInTree=(SDODataObject)dataFactory.create(notInTreeRootType);
  SDODataObject dataObjectNotInTreeroot=(SDODataObject)dataFactory.create(notInTreeRootType);
  dataObjectNotInTreeroot.set(notInTreeProperty,dataObjectNotInTree);
  containedByContainedDataObject.set(containedByContainedProperty2,dataObjectNotInTree);
  SDODataObject copyRoot=null;
  try {
    copyRoot=(SDODataObject)((SDOCopyHelper)copyHelper).copy(root,getChangeSummary());
  }
 catch (  IllegalArgumentException e) {
    assertNull(copyRoot);
  }
}

Fixed version (ground truth):
public void testDataObjectNotInContainmentTree(){
  SDOType notInTreeRootType=new SDOType((SDOTypeHelper)aHelperContext.getTypeHelper());
  SDOProperty notInTreeProperty=new SDOProperty(aHelperContext);
  notInTreeProperty.setName("String_Node_Str");
  SDOType notInTreePropertyType=new SDOType((SDOTypeHelper)aHelperContext.getTypeHelper());
  notInTreePropertyType.setDataType(false);
  notInTreeProperty.setContainment(true);
  notInTreeProperty.setType(notInTreePropertyType);
  notInTreeRootType.addDeclaredProperty(notInTreeProperty);
  SDODataObject dataObjectNotInTree=(SDODataObject)dataFactory.create(notInTreeRootType);
  SDODataObject dataObjectNotInTreeroot=(SDODataObject)dataFactory.create(notInTreeRootType);
  dataObjectNotInTreeroot.set(notInTreeProperty,dataObjectNotInTree);
  containedByContainedDataObject.set(containedByContainedProperty2,dataObjectNotInTree);
  SDODataObject copyRoot=null;
  try {
    copyRoot=(SDODataObject)((SDOCopyHelper)copyHelper).copy(root,getChangeSummary());
  }
 catch (  IllegalArgumentException e) {
    assertNull(copyRoot);
  }
}
Program: 68578
Project: 68578
Buggy source:
public void setUp(){
  super.setUp();
  customerObject=rootObject.getDataObject("String_Node_Str");
  DataObject newProperty=dataFactory.create(SDOConstants.SDO_PROPERTY);
  SDOProperty nameProp=(SDOProperty)newProperty.getType().getProperty("String_Node_Str");
  newProperty.set(nameProp,"String_Node_Str");
  newProperty.set("String_Node_Str",SDOConstants.SDO_STRING);
  openPropString=typeHelper.defineOpenContentProperty("String_Node_Str",newProperty);
  DataObject newProperty2=dataFactory.create(SDOConstants.SDO_PROPERTY);
  newProperty2.set(nameProp,"String_Node_Str");
  newProperty2.set("String_Node_Str",SDOConstants.SDO_STRING);
  newProperty2.set("String_Node_Str",true);
  openPropStringMany=typeHelper.defineOpenContentProperty("String_Node_Str",newProperty2);
}

Fixed version (ground truth):
public void setUp(){
  super.setUp();
  SDOType propertyType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.PROPERTY);
  customerObject=rootObject.getDataObject("String_Node_Str");
  DataObject newProperty=dataFactory.create(propertyType);
  SDOProperty nameProp=(SDOProperty)newProperty.getType().getProperty("String_Node_Str");
  newProperty.set(nameProp,"String_Node_Str");
  newProperty.set("String_Node_Str",SDOConstants.SDO_STRING);
  openPropString=typeHelper.defineOpenContentProperty("String_Node_Str",newProperty);
  DataObject newProperty2=dataFactory.create(propertyType);
  newProperty2.set(nameProp,"String_Node_Str");
  newProperty2.set("String_Node_Str",SDOConstants.SDO_STRING);
  newProperty2.set("String_Node_Str",true);
  openPropStringMany=typeHelper.defineOpenContentProperty("String_Node_Str",newProperty2);
}
Program: 68580
Project: 68580
Buggy source:
public void testOpenTypeException() throws Exception {
  SDOType type=new SDOType("String_Node_Str","String_Node_Str");
  type.setDataType(true);
  try {
    dataFactory.create(type);
    fail("String_Node_Str");
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
public void testOpenTypeException() throws Exception {
  SDOType type=new SDODataType("String_Node_Str","String_Node_Str",(SDOTypeHelper)HelperProvider.getDefaultContext().getTypeHelper());
  try {
    dataFactory.create(type);
    fail("String_Node_Str");
  }
 catch (  Exception e) {
  }
}
Program: 68582
Project: 68582
Buggy source:
public void testDefineOpenContentProperty(){
  DataObject propDO=dataFactory.create(SDOConstants.SDO_PROPERTY);
  propDO.set("String_Node_Str","String_Node_Str");
  propDO.set("String_Node_Str",SDOConstants.SDO_STRING);
  Property definedProp=typeHelper.defineOpenContentProperty("String_Node_Str",propDO);
  Property typeProp=typeHelper.getOpenContentProperty("String_Node_Str","String_Node_Str");
  assertNotNull(typeProp);
  assertEquals(definedProp,typeProp);
  Property xsdProp=xsdHelper.getGlobalProperty("String_Node_Str","String_Node_Str",true);
  assertNull(xsdProp);
  xsdProp=xsdHelper.getGlobalProperty("String_Node_Str","String_Node_Str",false);
  assertNotNull(xsdProp);
}

Fixed version (ground truth):
public void testDefineOpenContentProperty(){
  SDOType propertyType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.PROPERTY);
  DataObject propDO=dataFactory.create(propertyType);
  propDO.set("String_Node_Str","String_Node_Str");
  propDO.set("String_Node_Str",SDOConstants.SDO_STRING);
  Property definedProp=typeHelper.defineOpenContentProperty("String_Node_Str",propDO);
  Property typeProp=typeHelper.getOpenContentProperty("String_Node_Str","String_Node_Str");
  assertNotNull(typeProp);
  assertEquals(definedProp,typeProp);
  Property xsdProp=xsdHelper.getGlobalProperty("String_Node_Str","String_Node_Str",true);
  assertNull(xsdProp);
  xsdProp=xsdHelper.getGlobalProperty("String_Node_Str","String_Node_Str",false);
  assertNotNull(xsdProp);
}
Program: 68583
Project: 68583
Buggy source:
public void testDefineOpenContentPropertyNullUri(){
  DataObject propDO=dataFactory.create(SDOConstants.SDO_PROPERTY);
  propDO.set("String_Node_Str","String_Node_Str");
  propDO.set("String_Node_Str",SDOConstants.SDO_STRING);
  typeHelper.defineOpenContentProperty(null,propDO);
  Property typeProp=typeHelper.getOpenContentProperty("String_Node_Str","String_Node_Str");
  assertNull(typeProp);
  Property xsdProp=xsdHelper.getGlobalProperty("String_Node_Str","String_Node_Str",true);
  assertNull(xsdProp);
  xsdProp=xsdHelper.getGlobalProperty("String_Node_Str","String_Node_Str",false);
  assertNull(xsdProp);
}

Fixed version (ground truth):
public void testDefineOpenContentPropertyNullUri(){
  SDOType propertyType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.PROPERTY);
  DataObject propDO=dataFactory.create(propertyType);
  propDO.set("String_Node_Str","String_Node_Str");
  propDO.set("String_Node_Str",SDOConstants.SDO_STRING);
  typeHelper.defineOpenContentProperty(null,propDO);
  Property typeProp=typeHelper.getOpenContentProperty("String_Node_Str","String_Node_Str");
  assertNull(typeProp);
  Property xsdProp=xsdHelper.getGlobalProperty("String_Node_Str","String_Node_Str",true);
  assertNull(xsdProp);
  xsdProp=xsdHelper.getGlobalProperty("String_Node_Str","String_Node_Str",false);
  assertNull(xsdProp);
}
Program: 68584
Project: 68584
Buggy source:
public void testDefine() throws Exception {
  DataObject personTypeDO=dataFactory.create(SDOConstants.SDO_TYPE);
  personTypeDO.set("String_Node_Str","String_Node_Str");
  personTypeDO.set("String_Node_Str","String_Node_Str");
  DataObject parentTypeDO=dataFactory.create(SDOConstants.SDO_TYPE);
  parentTypeDO.set("String_Node_Str","String_Node_Str");
  parentTypeDO.set("String_Node_Str","String_Node_Str");
  List baseTypes=new ArrayList();
  baseTypes.add(personTypeDO);
  parentTypeDO.set("String_Node_Str",baseTypes);
  addProperty(personTypeDO,"String_Node_Str",SDOConstants.SDO_STRING,false,false,true);
  addProperty(personTypeDO,"String_Node_Str",parentTypeDO,true,false,true);
  Type personType=typeHelper.define(personTypeDO);
  Type parentType=typeHelper.define(parentTypeDO);
  assertNotNull(parentType.getBaseTypes());
  assertEquals(1,parentType.getBaseTypes().size());
  Type theBaseType=(Type)parentType.getBaseTypes().get(0);
  assertTrue(personType == theBaseType);
}

Fixed version (ground truth):
public void testDefine() throws Exception {
  SDOType typeType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.TYPE);
  DataObject personTypeDO=dataFactory.create(typeType);
  personTypeDO.set("String_Node_Str","String_Node_Str");
  personTypeDO.set("String_Node_Str","String_Node_Str");
  DataObject parentTypeDO=dataFactory.create(typeType);
  parentTypeDO.set("String_Node_Str","String_Node_Str");
  parentTypeDO.set("String_Node_Str","String_Node_Str");
  List baseTypes=new ArrayList();
  baseTypes.add(personTypeDO);
  parentTypeDO.set("String_Node_Str",baseTypes);
  addProperty(personTypeDO,"String_Node_Str",SDOConstants.SDO_STRING,false,false,true);
  addProperty(personTypeDO,"String_Node_Str",parentTypeDO,true,false,true);
  Type personType=typeHelper.define(personTypeDO);
  Type parentType=typeHelper.define(parentTypeDO);
  assertNotNull(parentType.getBaseTypes());
  assertEquals(1,parentType.getBaseTypes().size());
  Type theBaseType=(Type)parentType.getBaseTypes().get(0);
  assertTrue(personType == theBaseType);
}
Program: 68586
Project: 68586
Buggy source:
public void testDefineOpenContentProperty(){
  assertEquals(2,rootType.getDeclaredProperties().size());
  DataObject newProperty=dataFactory.create(SDOConstants.SDO_PROPERTY);
  SDOProperty prop=(SDOProperty)newProperty.getType().getProperty("String_Node_Str");
  newProperty.set(prop,"String_Node_Str");
  prop=(SDOProperty)newProperty.getType().getProperty("String_Node_Str");
  newProperty.set(prop,typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.STRING));
  Property openProp=typeHelper.defineOpenContentProperty("String_Node_Str",newProperty);
  Property lookedUp=typeHelper.getOpenContentProperty("String_Node_Str","String_Node_Str");
  assertNotNull(lookedUp);
  assertTrue(openProp == lookedUp);
  assertTrue(lookedUp.isOpenContent());
  DataObject rootDataObject=dataFactory.create(rootType);
  assertEquals(2,rootDataObject.getInstanceProperties().size());
  rootDataObject.set(lookedUp,"String_Node_Str");
  assertEquals(3,rootDataObject.getInstanceProperties().size());
  assertNull(lookedUp.getContainingType());
  rootDataObject.unset(lookedUp);
  assertEquals(2,rootDataObject.getInstanceProperties().size());
}

Fixed version (ground truth):
public void testDefineOpenContentProperty(){
  assertEquals(2,rootType.getDeclaredProperties().size());
  SDOType propertyType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.PROPERTY);
  DataObject newProperty=dataFactory.create(propertyType);
  SDOProperty prop=(SDOProperty)newProperty.getType().getProperty("String_Node_Str");
  newProperty.set(prop,"String_Node_Str");
  prop=(SDOProperty)newProperty.getType().getProperty("String_Node_Str");
  newProperty.set(prop,typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.STRING));
  Property openProp=typeHelper.defineOpenContentProperty("String_Node_Str",newProperty);
  Property lookedUp=typeHelper.getOpenContentProperty("String_Node_Str","String_Node_Str");
  assertNotNull(lookedUp);
  assertTrue(openProp == lookedUp);
  assertTrue(lookedUp.isOpenContent());
  DataObject rootDataObject=dataFactory.create(rootType);
  assertEquals(2,rootDataObject.getInstanceProperties().size());
  rootDataObject.set(lookedUp,"String_Node_Str");
  assertEquals(3,rootDataObject.getInstanceProperties().size());
  assertNull(lookedUp.getContainingType());
  rootDataObject.unset(lookedUp);
  assertEquals(2,rootDataObject.getInstanceProperties().size());
}
Program: 68587
Project: 68587
Buggy source:
public void testDataTypeTrueFails2() throws Exception {
  DataObject newTypeDO=dataFactory.create(SDOConstants.SDO_TYPE);
  SDOProperty prop=(SDOProperty)newTypeDO.getType().getProperty("String_Node_Str");
  newTypeDO.set(prop,"String_Node_Str");
  newTypeDO.set("String_Node_Str","String_Node_Str");
  newTypeDO.set("String_Node_Str",true);
  newTypeDO.set("String_Node_Str",true);
  try {
    Type newType=typeHelper.define(newTypeDO);
  }
 catch (  SDOException e) {
    assertEquals(SDOException.TYPE_CANNOT_BE_OPEN_AND_DATATYPE,e.getErrorCode());
    return;
  }
}

Fixed version (ground truth):
public void testDataTypeTrueFails2() throws Exception {
  SDOType typeType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.TYPE);
  DataObject newTypeDO=dataFactory.create(typeType);
  SDOProperty prop=(SDOProperty)newTypeDO.getType().getProperty("String_Node_Str");
  newTypeDO.set(prop,"String_Node_Str");
  newTypeDO.set("String_Node_Str","String_Node_Str");
  newTypeDO.set("String_Node_Str",true);
  newTypeDO.set("String_Node_Str",true);
  try {
    Type newType=typeHelper.define(newTypeDO);
  }
 catch (  SDOException e) {
    assertEquals(SDOException.TYPE_CANNOT_BE_OPEN_AND_DATATYPE,e.getErrorCode());
    return;
  }
}
Program: 68588
Project: 68588
Buggy source:
public void testDataTypeTrueFails() throws Exception {
  DataObject newTypeDO=dataFactory.create(SDOConstants.SDO_TYPE);
  SDOProperty prop=(SDOProperty)newTypeDO.getType().getProperty("String_Node_Str");
  newTypeDO.set(prop,"String_Node_Str");
  newTypeDO.set("String_Node_Str","String_Node_Str");
  newTypeDO.set("String_Node_Str",true);
  newTypeDO.set("String_Node_Str",true);
  try {
    Type newType=typeHelper.define(newTypeDO);
  }
 catch (  SDOException e) {
    assertEquals(SDOException.TYPE_CANNOT_BE_OPEN_AND_DATATYPE,e.getErrorCode());
    return;
  }
  fail("String_Node_Str");
}

Fixed version (ground truth):
public void testDataTypeTrueFails() throws Exception {
  SDOType typeType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.TYPE);
  DataObject newTypeDO=dataFactory.create(typeType);
  SDOProperty prop=(SDOProperty)newTypeDO.getType().getProperty("String_Node_Str");
  newTypeDO.set(prop,"String_Node_Str");
  newTypeDO.set("String_Node_Str","String_Node_Str");
  newTypeDO.set("String_Node_Str",true);
  newTypeDO.set("String_Node_Str",true);
  try {
    Type newType=typeHelper.define(newTypeDO);
  }
 catch (  SDOException e) {
    assertEquals(SDOException.TYPE_CANNOT_BE_OPEN_AND_DATATYPE,e.getErrorCode());
    return;
  }
  fail("String_Node_Str");
}
Program: 68590
Project: 68590
Buggy source:
/** 
 * INTERNAL: This method is used to clear the batched statements without the need to execute the statements first This is used in the case of rollback.
 */
public void clear(){
  this.previousCall=null;
  this.parameters.clear();
  statementCount=executionCount=0;
  clearCacheQueryTimeout();
}

Fixed version (ground truth):
/** 
 * INTERNAL: This method is used to clear the batched statements without the need to execute the statements first This is used in the case of rollback.
 */
public void clear(){
  this.previousCall=null;
  this.parameters.clear();
  statementCount=executionCount=0;
  clearCacheQueryTimeout();
  lastCallAppended=null;
}
Program: 68591
Project: 68591
Buggy source:
/** 
 * Test that inserts allow the garbage collection of the persisted objects.
 */
public TestCase buildInsertTest(){
  MemoryLeakTestCase test=new MemoryLeakTestCase(){
    public void test(){
      EntityManager manager=createEntityManager();
      ((JpaEntityManager)manager).getUnitOfWork().getParent().getIdentityMapAccessor().initializeAllIdentityMaps();
      manager.getTransaction().begin();
      for (int count=0; count < 500; count++) {
        Employee employee=new Employee();
        employee.setFirstName("String_Node_Str");
        employee.setLastName("String_Node_Str");
        manager.persist(employee);
        addWeakReference(employee);
      }
      manager.getTransaction().commit();
      Query query=manager.createQuery("String_Node_Str");
      query.setHint("String_Node_Str",true);
      query.setHint("String_Node_Str",CacheUsage.CheckCacheOnly);
      addWeakReferences(query.getResultList());
      addWeakReference(manager);
      addWeakReference(((JpaEntityManager)manager).getUnitOfWork());
      addWeakReference(((JpaEntityManager)manager).getSession());
      manager.close();
    }
    public void reset(){
      getSession().executeNonSelectingSQL("String_Node_Str");
      getSession().executeNonSelectingSQL("String_Node_Str");
      getSession().executeNonSelectingSQL("String_Node_Str");
    }
  }
;
  test.setName("String_Node_Str");
  test.setThreshold(100);
  return test;
}

Fixed version (ground truth):
/** 
 * Test that inserts allow the garbage collection of the persisted objects.
 */
public TestCase buildInsertTest(){
  MemoryLeakTestCase test=new MemoryLeakTestCase(){
    public void test(){
      EntityManager manager=createEntityManager();
      ((JpaEntityManager)manager).getUnitOfWork().getParent().getIdentityMapAccessor().initializeAllIdentityMaps();
      manager.getTransaction().begin();
      for (int count=0; count < 500; count++) {
        Employee employee=new Employee();
        employee.setFirstName("String_Node_Str");
        employee.setLastName("String_Node_Str");
        manager.persist(employee);
        addWeakReference(employee);
      }
      manager.getTransaction().commit();
      Query query=manager.createQuery("String_Node_Str");
      query.setHint("String_Node_Str",true);
      query.setHint("String_Node_Str",CacheUsage.CheckCacheOnly);
      addWeakReferences(query.getResultList());
      addWeakReference(manager);
      addWeakReference(((JpaEntityManager)manager).getUnitOfWork());
      addWeakReference(((JpaEntityManager)manager).getUnitOfWork().getParent());
      manager.close();
    }
    public void reset(){
      getSession().executeNonSelectingSQL("String_Node_Str");
    }
  }
;
  test.setName("String_Node_Str");
  test.setThreshold(100);
  return test;
}