nus-yam/ex-repair huggingface dataset:
Program: 63293
Project: 63293
Buggy source:
/** 
 * INTERNAL: Creates an instance of   {@link System} property getter with privileges enabled.Selects  {@link System} property getter with default value to be executed so getter will return {@code def}if property with   {@code key} does not exist.
 * @param key The name of the {@link System} property.
 * @since 2.7
 */
public PrivilegedGetSystemProperty(final String key,final String def){
  this.key=key;
  this.def=null;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Creates an instance of   {@link System} property getter with privileges enabled.Selects  {@link System} property getter with default value to be executed so getter will return {@code def}if property with   {@code key} does not exist.
 * @param key The name of the {@link System} property.
 * @since 2.7
 */
public PrivilegedGetSystemProperty(final String key,final String def){
  this.key=key;
  this.def=def;
}
Program: 63294
Project: 63294
Buggy source:
public void cdata(String value){
  CDATASection cdata=document.createCDATASection(value);
  node.appendChild(cdata);
}

Fixed version (ground truth):
public void cdata(String value){
  for (  String part : MarshalRecord.splitCData(value)) {
    CDATASection cdata=document.createCDATASection(part);
    node.appendChild(cdata);
  }
}
Program: 63296
Project: 63296
Buggy source:
/** 
 * INTERNAL:
 */
public void cdata(String value){
  try {
    if (isStartElementOpen) {
      isStartElementOpen=false;
      outputStreamWrite(CLOSE_ELEMENT);
    }
    outputStreamWrite(OPEN_CDATA);
    outputStreamWrite(value.getBytes(Constants.DEFAULT_XML_ENCODING));
    outputStreamWrite(CLOSE_CDATA);
  }
 catch (  UnsupportedEncodingException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public void cdata(String value){
  try {
    if (isStartElementOpen) {
      isStartElementOpen=false;
      outputStreamWrite(CLOSE_ELEMENT);
    }
    for (    String part : MarshalRecord.splitCData(value)) {
      outputStreamWrite(OPEN_CDATA);
      outputStreamWrite(part.getBytes(Constants.DEFAULT_XML_ENCODING));
      outputStreamWrite(CLOSE_CDATA);
    }
  }
 catch (  UnsupportedEncodingException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 63298
Project: 63298
Buggy source:
/** 
 * INTERNAL:
 */
public void cdata(String value){
  if (isStartElementOpen) {
    isStartElementOpen=false;
    builder.append('>');
  }
  builder.append("String_Node_Str");
  builder.append(value);
  builder.append("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public void cdata(String value){
  if (isStartElementOpen) {
    isStartElementOpen=false;
    builder.append('>');
  }
  for (  String part : MarshalRecord.splitCData(value)) {
    builder.append("String_Node_Str");
    builder.append(part);
    builder.append("String_Node_Str");
  }
}
Program: 63299
Project: 63299
Buggy source:
@Override public void cdata(String value){
  try {
    if (isStartElementOpen) {
      openAndCloseStartElement();
      isStartElementOpen=false;
    }
    xmlEventWriter.add(xmlEventFactory.createCData(value));
  }
 catch (  Exception e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
@Override public void cdata(String value){
  try {
    if (isStartElementOpen) {
      openAndCloseStartElement();
      isStartElementOpen=false;
    }
    for (    String part : MarshalRecord.splitCData(value)) {
      xmlEventWriter.add(xmlEventFactory.createCData(part));
    }
  }
 catch (  Exception e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 63300
Project: 63300
Buggy source:
public void cdata(String value){
  try {
    xmlStreamWriter.writeCData(value);
  }
 catch (  XMLStreamException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
public void cdata(String value){
  try {
    for (    String part : MarshalRecord.splitCData(value)) {
      xmlStreamWriter.writeCData(part);
    }
  }
 catch (  XMLStreamException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 63302
Project: 63302
Buggy source:
/** 
 * INTERNAL: Helper method to readObject.  Completely write this ObjectChangeSet to the stream
 */
public void writeCompleteChangeSet(java.io.ObjectOutputStream stream) throws java.io.IOException {
  ensureChanges();
  writeIdentityInformation(stream);
  stream.writeObject(this.changes);
  stream.writeObject(this.oldKey);
  stream.writeObject(this.newKey);
}

Fixed version (ground truth):
/** 
 * INTERNAL: Helper method to readObject.  Completely write this ObjectChangeSet to the stream
 */
public void writeCompleteChangeSet(java.io.ObjectOutputStream stream) throws java.io.IOException {
  ensureChanges();
  writeIdentityInformation(stream);
  stream.writeObject(this.changes);
  stream.writeObject(this.oldKey);
  stream.writeObject(this.newKey);
  stream.writeObject(this.protectedForeignKeys);
}
Program: 63303
Project: 63303
Buggy source:
/** 
 * INTERNAL: Helper method used by readObject to read a completely serialized change set from the stream.
 */
public void readCompleteChangeSet(java.io.ObjectInputStream stream) throws java.io.IOException, ClassNotFoundException {
  readIdentityInformation(stream);
  this.changes=(List)stream.readObject();
  this.oldKey=stream.readObject();
  this.newKey=stream.readObject();
}

Fixed version (ground truth):
/** 
 * INTERNAL: Helper method used by readObject to read a completely serialized change set from the stream.
 */
public void readCompleteChangeSet(java.io.ObjectInputStream stream) throws java.io.IOException, ClassNotFoundException {
  readIdentityInformation(stream);
  this.changes=(List)stream.readObject();
  this.oldKey=stream.readObject();
  this.newKey=stream.readObject();
  this.protectedForeignKeys=(AbstractRecord)stream.readObject();
}
Program: 63305
Project: 63305
Buggy source:
/** 
 * INTERNAL: A combination of readFromRowIntoObject and buildClone. <p> buildClone assumes the attribute value exists on the original and can simply be copied. <p> readFromRowIntoObject assumes that one is building an original. <p> Both of the above assumptions are false in this method, and actually attempts to do both at the same time. <p> Extract value from the row and set the attribute to this value in the working copy clone. In order to bypass the shared cache when in transaction a UnitOfWork must be able to populate working copies directly from the row.
 */
@Override public void buildCloneFromRow(AbstractRecord databaseRow,JoinedAttributeManager joinManager,Object clone,CacheKey sharedCacheKey,ObjectBuildingQuery sourceQuery,UnitOfWorkImpl unitOfWork,AbstractSession executionSession){
  Object clonedAttributeValue=buildAggregateFromRow(databaseRow,clone,null,joinManager,sourceQuery,false,executionSession,true);
  ClassDescriptor descriptor=getReferenceDescriptor(clonedAttributeValue,unitOfWork);
  if (clonedAttributeValue != null) {
    descriptor.getObjectChangePolicy().setAggregateChangeListener(clone,clonedAttributeValue,unitOfWork,descriptor,getAttributeName());
  }
  setAttributeValueInObject(clone,clonedAttributeValue);
  return;
}

Fixed version (ground truth):
/** 
 * INTERNAL: A combination of readFromRowIntoObject and buildClone. <p> buildClone assumes the attribute value exists on the original and can simply be copied. <p> readFromRowIntoObject assumes that one is building an original. <p> Both of the above assumptions are false in this method, and actually attempts to do both at the same time. <p> Extract value from the row and set the attribute to this value in the working copy clone. In order to bypass the shared cache when in transaction a UnitOfWork must be able to populate working copies directly from the row.
 */
@Override public void buildCloneFromRow(AbstractRecord databaseRow,JoinedAttributeManager joinManager,Object clone,CacheKey sharedCacheKey,ObjectBuildingQuery sourceQuery,UnitOfWorkImpl unitOfWork,AbstractSession executionSession){
  Object clonedAttributeValue=buildAggregateFromRow(databaseRow,clone,sharedCacheKey,joinManager,sourceQuery,false,executionSession,true);
  if (clonedAttributeValue != null) {
    ClassDescriptor descriptor=getReferenceDescriptor(clonedAttributeValue,unitOfWork);
    descriptor.getObjectChangePolicy().setAggregateChangeListener(clone,clonedAttributeValue,unitOfWork,descriptor,getAttributeName());
  }
  setAttributeValueInObject(clone,clonedAttributeValue);
}
Program: 63307
Project: 63307
Buggy source:
public ComplexAggregateTableCreator(){
  setName("String_Node_Str");
  addTableDefinition(buildCITYSLICKERTable());
  addTableDefinition(buildCOUNTRYDWELLERTable());
  addTableDefinition(buildWORLDTable());
  addTableDefinition(buildHOCKEYCOACHTable());
  addTableDefinition(buildHOCKEYPLAYERTable());
  addTableDefinition(buildHOCKEYTEAMTable());
  addTableDefinition(buildROLETable());
  addTableDefinition(buildPLAYERROLESTable());
  addTableDefinition(buildHockeyCoach_NICKNAMESTable());
  addTableDefinition(buildBODYTable());
  addTableDefinition(buildPLACETable());
}

Fixed version (ground truth):
public ComplexAggregateTableCreator(){
  setName("String_Node_Str");
  addTableDefinition(buildCITYSLICKERTable());
  addTableDefinition(buildCOUNTRYDWELLERTable());
  addTableDefinition(buildWORLDTable());
  addTableDefinition(buildHOCKEYCOACHTable());
  addTableDefinition(buildHOCKEYPLAYERTable());
  addTableDefinition(buildHOCKEYTEAMTable());
  addTableDefinition(buildROLETable());
  addTableDefinition(buildPLAYERROLESTable());
  addTableDefinition(buildHockeyCoach_NICKNAMESTable());
  addTableDefinition(buildBODYTable());
  addTableDefinition(buildPLACETable());
  addTableDefinition(buildHOCKEY_PUCKTable());
  addTableDefinition(buildHOCKEY_RINKTable());
}
Program: 63308
Project: 63308
Buggy source:
/** 
 * Returns BeanValidationHelper.
 */
public BeanValidationHelper getBeanValidationHelper(){
  return beanValidationHelper;
}

Fixed version (ground truth):
/** 
 * Returns BeanValidationHelper. Can return null if bean validation jar is not on class path.
 */
public BeanValidationHelper getBeanValidationHelper(){
  return beanValidationHelper;
}
Program: 63309
Project: 63309
Buggy source:
/** 
 * Create a JAXBContext.  The XMLContext contains the metadata about the Object to XML mappings.
 */
public JAXBContext(XMLContext context,Generator generator,TypeMappingInfo[] boundTypes){
  contextState=new JAXBContextState(context,generator,boundTypes,null);
}

Fixed version (ground truth):
/** 
 * Create a JAXBContext.  The XMLContext contains the metadata about the Object to XML mappings.
 */
public JAXBContext(XMLContext context,Generator generator,TypeMappingInfo[] boundTypes){
  contextState=new JAXBContextState(context,generator,boundTypes,null);
  initBeanValidation();
}
Program: 63310
Project: 63310
Buggy source:
/** 
 * INTERNAL: Ensure the change set is populated for cache coordination.
 */
public void ensureChanges(){
  if (this.isNew && ((this.changes == null) || this.changes.isEmpty())) {
    AbstractSession unitOfWork=this.unitOfWorkChangeSet.getSession();
    if (unitOfWork != null && !unitOfWork.isRemoteUnitOfWork()) {
      ClassDescriptor descriptor=getDescriptor();
      if (descriptor != null) {
        FetchGroup fetchGroup=null;
        if (descriptor.hasFetchGroupManager()) {
          fetchGroup=descriptor.getFetchGroupManager().getObjectFetchGroup(this.cloneObject);
        }
        List mappings=descriptor.getMappings();
        int mappingsSize=mappings.size();
        for (int index=0; index < mappingsSize; index++) {
          DatabaseMapping mapping=(DatabaseMapping)mappings.get(index);
          if (fetchGroup == null || fetchGroup.containsAttributeInternal(mapping.getAttributeName())) {
            addChange(mapping.compareForChange(this.cloneObject,this.cloneObject,this,unitOfWork));
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Ensure the change set is populated for cache coordination.
 */
public void ensureChanges(){
  if (this.isNew && ((this.changes == null) || this.changes.isEmpty() || cacheSynchronizationType != ClassDescriptor.SEND_NEW_OBJECTS_WITH_CHANGES)) {
    AbstractSession unitOfWork=this.unitOfWorkChangeSet.getSession();
    if (unitOfWork != null && !unitOfWork.isRemoteUnitOfWork()) {
      ClassDescriptor descriptor=getDescriptor();
      if (descriptor != null) {
        FetchGroup fetchGroup=null;
        if (descriptor.hasFetchGroupManager()) {
          fetchGroup=descriptor.getFetchGroupManager().getObjectFetchGroup(this.cloneObject);
        }
        List mappings=descriptor.getMappings();
        int mappingsSize=mappings.size();
        for (int index=0; index < mappingsSize; index++) {
          DatabaseMapping mapping=(DatabaseMapping)mappings.get(index);
          if (fetchGroup == null || fetchGroup.containsAttributeInternal(mapping.getAttributeName())) {
            addChange(mapping.compareForChange(this.cloneObject,this.cloneObject,this,unitOfWork));
          }
        }
      }
    }
  }
}
Program: 63312
Project: 63312
Buggy source:
Expression findQueryExpressionImp(String variableName){
  Expression expression=getQueryExpressionImp(variableName);
  if ((expression == null) && (parent != null)) {
    expression=parent.findQueryExpressionImp(variableName);
    if (expression != null && expression.isExpressionBuilder()) {
      expression=(Expression)expression.clone();
    }
  }
  return expression;
}

Fixed version (ground truth):
Expression findQueryExpressionImp(String variableName){
  Expression expression=getQueryExpressionImp(variableName);
  if ((expression == null) && (parent != null)) {
    expression=parent.findQueryExpressionImp(variableName);
  }
  return expression;
}
Program: 63315
Project: 63315
Buggy source:
Expression findQueryExpressionImp(String variableName){
  Expression expression=getQueryExpressionImp(variableName);
  if ((expression == null) && (parent != null)) {
    expression=parent.findQueryExpressionImp(variableName);
  }
  return expression;
}

Fixed version (ground truth):
Expression findQueryExpressionImp(String variableName){
  Expression expression=getQueryExpressionImp(variableName);
  if ((expression == null) && (parent != null)) {
    expression=parent.findQueryExpressionImp(variableName);
    if (expression != null && expression.isExpressionBuilder()) {
      expression=(Expression)expression.clone();
    }
  }
  return expression;
}
Program: 63318
Project: 63318
Buggy source:
public void testDeleteEmployee(){
  Employee employee=new Employee();
  employee.addPhoneNumber(new PhoneNumber("String_Node_Str","String_Node_Str","String_Node_Str"));
  employee.addPhoneNumber(new PhoneNumber("String_Node_Str","String_Node_Str","String_Node_Str"));
  employee.addResponsibility("String_Node_Str");
  employee.addResponsibility("String_Node_Str");
  employee.addProject(new Project());
  employee.setWorkWeek(new HashSet<Employee.Weekdays>());
  employee.getWorkWeek().add(Employee.Weekdays.MONDAY);
  employee.getWorkWeek().add(Employee.Weekdays.TUESDAY);
  QuerySQLTracker counter=new QuerySQLTracker(getServerSession());
  EntityManager em=createEntityManager();
  try {
    beginTransaction(em);
    em.persist(employee);
    commitTransaction(em);
    closeEntityManager(em);
    clearCache();
    em=createEntityManager();
    beginTransaction(em);
    employee=em.find(Employee.class,employee.getId());
    counter.getSqlStatements().clear();
    em.remove(employee);
    commitTransaction(em);
    if (isWeavingEnabled() && counter.getSqlStatements().size() > 13) {
      fail("String_Node_Str" + counter.getSqlStatements().size());
    }
    beginTransaction(em);
    verifyDelete(employee);
    commitTransaction(em);
  }
  finally {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    closeEntityManager(em);
  }
}

Fixed version (ground truth):
public void testDeleteEmployee(){
  Employee employee=new Employee();
  employee.addPhoneNumber(new PhoneNumber("String_Node_Str","String_Node_Str","String_Node_Str"));
  employee.addPhoneNumber(new PhoneNumber("String_Node_Str","String_Node_Str","String_Node_Str"));
  employee.addResponsibility("String_Node_Str");
  employee.addResponsibility("String_Node_Str");
  employee.addProject(new Project());
  employee.setWorkWeek(new HashSet<Employee.Weekdays>());
  employee.getWorkWeek().add(Employee.Weekdays.MONDAY);
  employee.getWorkWeek().add(Employee.Weekdays.TUESDAY);
  QuerySQLTracker counter=new QuerySQLTracker(getServerSession());
  EntityManager em=createEntityManager();
  try {
    beginTransaction(em);
    em.persist(employee);
    commitTransaction(em);
    closeEntityManager(em);
    clearCache();
    em=createEntityManager();
    beginTransaction(em);
    employee=em.find(Employee.class,employee.getId());
    counter.getSqlStatements().clear();
    em.remove(employee);
    commitTransaction(em);
    if (isWeavingEnabled() && counter.getSqlStatements().size() > 13) {
      fail("String_Node_Str" + counter.getSqlStatements().size());
    }
    beginTransaction(em);
    verifyDelete(employee);
    commitTransaction(em);
  }
  finally {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    if (counter != null) {
      counter.remove();
    }
    closeEntityManager(em);
  }
}
Program: 63321
Project: 63321
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  suite.addTest(new AdvancedJunitTest("String_Node_Str"));
  return suite;
}
Program: 63327
Project: 63327
Buggy source:
public TableDefinition buildCMP3_PEARL_HISTTable(){
  TableDefinition table=buildCMP3_PEARLTable();
  table.setName(table.getName() + "String_Node_Str");
  FieldDefinition fieldSTART=new FieldDefinition();
  fieldSTART.setName("String_Node_Str");
  fieldSTART.setTypeName("String_Node_Str");
  fieldSTART.setIsPrimaryKey(true);
  fieldSTART.setIsIdentity(false);
  fieldSTART.setUnique(false);
  fieldSTART.setShouldAllowNull(true);
  table.addField(fieldSTART);
  FieldDefinition fieldEND=new FieldDefinition();
  fieldEND.setName("String_Node_Str");
  fieldEND.setTypeName("String_Node_Str");
  fieldEND.setIsPrimaryKey(false);
  fieldEND.setIsIdentity(false);
  fieldEND.setUnique(false);
  fieldEND.setShouldAllowNull(true);
  table.addField(fieldEND);
  return table;
}

Fixed version (ground truth):
public TableDefinition buildCMP3_PEARL_HISTTable(){
  TableDefinition table=buildCMP3_PEARLTable();
  table.setName(table.getName() + "String_Node_Str");
  FieldDefinition fieldSTART=new FieldDefinition();
  fieldSTART.setName("String_Node_Str");
  fieldSTART.setTypeName("String_Node_Str");
  fieldSTART.setIsPrimaryKey(true);
  fieldSTART.setIsIdentity(false);
  fieldSTART.setUnique(false);
  fieldSTART.setShouldAllowNull(false);
  table.addField(fieldSTART);
  FieldDefinition fieldEND=new FieldDefinition();
  fieldEND.setName("String_Node_Str");
  fieldEND.setTypeName("String_Node_Str");
  fieldEND.setIsPrimaryKey(false);
  fieldEND.setIsIdentity(false);
  fieldEND.setUnique(false);
  fieldEND.setShouldAllowNull(true);
  table.addField(fieldEND);
  return table;
}
Program: 63328
Project: 63328
Buggy source:
/** 
 * INTERNAL: Return the original valueHolder object. Access to the underlying valueholder may be required when serializing the valueholder or converting the valueHolder to another type.
 */
@Override public Object getOriginalValueHolder(Object unitOfWorkIndirectionObject,AbstractSession session){
  if (!(unitOfWorkIndirectionObject instanceof IndirectContainer)) {
    return new ValueHolder();
  }
  IndirectContainer container=(IndirectContainer)unitOfWorkIndirectionObject;
  if (container.getValueHolder() instanceof WrappingValueHolder) {
    ValueHolderInterface valueHolder=((WrappingValueHolder)container.getValueHolder()).getWrappedValueHolder();
    if ((valueHolder == null) && session.isRemoteUnitOfWork()) {
      RemoteSessionController controller=((RemoteUnitOfWork)session).getParentSessionController();
      valueHolder=controller.getRemoteValueHolders().get(((UnitOfWorkValueHolder)container.getValueHolder()).getWrappedValueHolderRemoteID());
    }
    if (!session.isProtectedSession()) {
      while (valueHolder instanceof WrappingValueHolder && ((WrappingValueHolder)valueHolder).getWrappedValueHolder() != null) {
        valueHolder=((WrappingValueHolder)valueHolder).getWrappedValueHolder();
      }
    }
    return valueHolder;
  }
 else {
    return container.getValueHolder();
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Return the original valueHolder object. Access to the underlying valueholder may be required when serializing the valueholder or converting the valueHolder to another type.
 */
@Override public Object getOriginalValueHolder(Object unitOfWorkIndirectionObject,AbstractSession session){
  if (!(unitOfWorkIndirectionObject instanceof IndirectContainer)) {
    return new ValueHolder();
  }
  IndirectContainer container=(IndirectContainer)unitOfWorkIndirectionObject;
  if (container.getValueHolder() instanceof WrappingValueHolder) {
    ValueHolderInterface valueHolder=((WrappingValueHolder)container.getValueHolder()).getWrappedValueHolder();
    if ((valueHolder == null) && session.isRemoteUnitOfWork()) {
      RemoteSessionController controller=((RemoteUnitOfWork)session).getParentSessionController();
      valueHolder=controller.getRemoteValueHolders().get(((UnitOfWorkValueHolder)container.getValueHolder()).getWrappedValueHolderRemoteID());
    }
    if (!session.isProtectedSession()) {
      while (valueHolder instanceof WrappingValueHolder && ((WrappingValueHolder)valueHolder).getWrappedValueHolder() != null) {
        valueHolder=((WrappingValueHolder)valueHolder).getWrappedValueHolder();
      }
    }
    if ((valueHolder != null) && (valueHolder instanceof DatabaseValueHolder)) {
      ((DatabaseValueHolder)valueHolder).releaseWrappedValueHolder(session);
    }
    return valueHolder;
  }
 else {
    return container.getValueHolder();
  }
}
Program: 63332
Project: 63332
Buggy source:
public void testTimeStampLTZ(){
  int year=2000, month=3, date=21, hour=11, minute=45, second=50;
  Integer tsId=null;
  Calendar originalCal=null, dbCal;
  String zoneId="String_Node_Str";
  EntityManager em=createEntityManager("String_Node_Str");
  beginTransaction(em);
  try {
    TStamp ts=new TStamp();
    originalCal=Calendar.getInstance(TimeZone.getTimeZone(zoneId));
    originalCal.set(Calendar.AM_PM,Calendar.AM);
    originalCal.set(year,month,date,hour,minute,second);
    originalCal.set(Calendar.MILLISECOND,0);
    ts.setTsLTZ(originalCal);
    em.persist(ts);
    em.flush();
    tsId=ts.getId();
    commitTransaction(em);
  }
 catch (  Exception e) {
    e.printStackTrace();
    rollbackTransaction(em);
    throw e;
  }
 finally {
    clearCache();
    dbCal=em.find(TStamp.class,tsId).getTsLTZ();
    closeEntityManager(em);
  }
  dbCal.setTimeZone(TimeZone.getTimeZone(zoneId));
  assertEquals("String_Node_Str",year,dbCal.get(Calendar.YEAR));
  assertEquals("String_Node_Str",month,dbCal.get(Calendar.MONTH));
  assertEquals("String_Node_Str",date,dbCal.get(Calendar.DATE));
  assertEquals("String_Node_Str",originalCal.get(Calendar.HOUR_OF_DAY),dbCal.get(Calendar.HOUR_OF_DAY));
  assertEquals("String_Node_Str",minute,dbCal.get(Calendar.MINUTE));
  assertEquals("String_Node_Str",second,dbCal.get(Calendar.SECOND));
}

Fixed version (ground truth):
public void testTimeStampLTZ(){
  int year=2000, month=3, date=21, hour=11, minute=45, second=50;
  Integer tsId=null;
  Calendar originalCal=null, dbCal;
  String zoneId="String_Node_Str";
  EntityManager em=createEntityManager("String_Node_Str");
  beginTransaction(em);
  try {
    TStamp ts=new TStamp();
    originalCal=Calendar.getInstance(TimeZone.getTimeZone(zoneId));
    originalCal.set(Calendar.AM_PM,Calendar.AM);
    originalCal.set(year,month,date,hour,minute,second);
    originalCal.set(Calendar.MILLISECOND,0);
    ts.setTsLTZ(originalCal);
    em.persist(ts);
    em.flush();
    tsId=ts.getId();
    commitTransaction(em);
  }
 catch (  Exception e) {
    e.printStackTrace();
    rollbackTransaction(em);
    throw e;
  }
 finally {
    clearCache();
    dbCal=em.find(TStamp.class,tsId).getTsLTZ();
    closeEntityManager(em);
  }
  dbCal.getTime();
  dbCal.setTimeZone(TimeZone.getTimeZone(zoneId));
  assertEquals("String_Node_Str",year,dbCal.get(Calendar.YEAR));
  assertEquals("String_Node_Str",month,dbCal.get(Calendar.MONTH));
  assertEquals("String_Node_Str",date,dbCal.get(Calendar.DATE));
  assertEquals("String_Node_Str",originalCal.get(Calendar.HOUR_OF_DAY),dbCal.get(Calendar.HOUR_OF_DAY));
  assertEquals("String_Node_Str",minute,dbCal.get(Calendar.MINUTE));
  assertEquals("String_Node_Str",second,dbCal.get(Calendar.SECOND));
}
Program: 63333
Project: 63333
Buggy source:
public void addTests(){
  addTest(new ConcurrencyTest());
  addTest(new AppendLockTest());
  addTest(new UpdateCacheKeyPropertiesTest());
  addTest(getReadEmployeeTestSuite());
  addTest(getAboutToUpdateEventTestSuite());
  addTest(getDescriptorQueryManagerAddQueryTest());
  addTest(getQueryCacheMultithreadedTest());
  addTest(new ConcurrentDecryptionTest());
  addTest(new ConcurrentReadOneToOneInheritanceTest());
  addTest(new ConcurrentReadFetchJoinTest());
  addTest(new ConcurrentReadFetchJoinWithUOWLocksTest());
  addTest(AddDescriptorsMultithreadedTest.AddDescriptorsTest.createMultithreadedTest(3,0));
  addTest(AddDescriptorsMultithreadedTest.SequencePreallocationTest.createMultithreadedTest(10,10000));
  addTest(AddDescriptorsMultithreadedTest.SequencePreallocationTest.createMultithreadedTestWithAddDescriptors(1,100,10));
  addTest(AddDescriptorsMultithreadedTest.InsertTest.createMultithreadedTest(10,10000));
  addTest(AddDescriptorsMultithreadedTest.InsertTest.createMultithreadedTestWithAddDescriptors(1,100,10));
}

Fixed version (ground truth):
public void addTests(){
  addTest(new ConcurrencyTest());
  addTest(new AppendLockTest());
  addTest(new UpdateCacheKeyPropertiesTest());
  addTest(getReadEmployeeTestSuite());
  addTest(getAboutToUpdateEventTestSuite());
  addTest(getDescriptorQueryManagerAddQueryTest());
  addTest(getQueryCacheMultithreadedTest());
  addTest(new ConcurrentDecryptionTest());
  addTest(new ConcurrentReadOneToOneInheritanceTest());
  addTest(new ConcurrentReadFetchJoinTest());
  addTest(new ConcurrentReadFetchJoinWithUOWLocksTest());
  addTest(AddDescriptorsMultithreadedTest.AddDescriptorsTest.createMultithreadedTest(3,0));
  addTest(AddDescriptorsMultithreadedTest.SequencePreallocationTest.createMultithreadedTest(10,10000));
  addTest(AddDescriptorsMultithreadedTest.SequencePreallocationTest.createMultithreadedTestWithAddDescriptors(1,100,10));
  addTest(AddDescriptorsMultithreadedTest.InsertTest.createMultithreadedTest(10,10000));
  addTest(AddDescriptorsMultithreadedTest.InsertTest.createMultithreadedTestWithAddDescriptors(1,100,10));
  addTest(new ConcurrentQueryCacheQueryResultsTest());
}
Program: 63334
Project: 63334
Buggy source:
/** 
 * Insert a new element into the linked list of LinkedCacheKeys. New elements (Recently Used) are added at the end (last).
 * @return the added LinkedCacheKey
 */
protected LinkedCacheKey insertLink(LinkedCacheKey key){
  if (key == null) {
    return key;
  }
synchronized (this.first) {
    this.first.getNext().setPrevious(key);
    key.setNext(this.first.getNext());
    key.setPrevious(this.first);
    this.first.setNext(key);
  }
  return key;
}

Fixed version (ground truth):
/** 
 * Insert a new element into the linked list of LinkedCacheKeys. New elements (Recently Used) are added at the end (last). Callers of this method must synchronize on the start of the list (this.first).
 * @return the added LinkedCacheKey
 */
protected LinkedCacheKey insertLink(LinkedCacheKey key){
  if (key == null) {
    return key;
  }
  this.first.getNext().setPrevious(key);
  key.setNext(this.first.getNext());
  key.setPrevious(this.first);
  this.first.setNext(key);
  return key;
}
Program: 63335
Project: 63335
Buggy source:
/** 
 * Remove the LinkedCacheKey from the linked list.
 * @return the removed LinkedCacheKey.
 */
protected LinkedCacheKey removeLink(LinkedCacheKey key){
  if (key == null) {
    return key;
  }
synchronized (this.first) {
    if (key.getPrevious() == null || key.getNext() == null) {
      return key;
    }
    key.getPrevious().setNext(key.getNext());
    key.getNext().setPrevious(key.getPrevious());
    key.setNext(null);
    key.setPrevious(null);
  }
  return key;
}

Fixed version (ground truth):
/** 
 * Remove the LinkedCacheKey from the linked list. Callers of this method must synchronize on the start of the list (this.first).
 * @return the removed LinkedCacheKey.
 */
protected LinkedCacheKey removeLink(LinkedCacheKey key){
  if (key == null || key.getPrevious() == null || key.getNext() == null) {
    return key;
  }
  key.getPrevious().setNext(key.getNext());
  key.getNext().setPrevious(key.getPrevious());
  key.setNext(null);
  key.setPrevious(null);
  return key;
}
Program: 63336
Project: 63336
Buggy source:
/** 
 * Also insert the link if the cacheKey is put.
 */
protected CacheKey putCacheKeyIfAbsent(CacheKey searchKey){
  CacheKey cacheKey=super.putCacheKeyIfAbsent(searchKey);
  if (cacheKey == null) {
    insertLink((LinkedCacheKey)searchKey);
    ensureFixedSize();
  }
  return cacheKey;
}

Fixed version (ground truth):
/** 
 * Also insert the link if the cacheKey is put.
 */
protected CacheKey putCacheKeyIfAbsent(CacheKey searchKey){
synchronized (this.first) {
    CacheKey cacheKey=super.putCacheKeyIfAbsent(searchKey);
    if (cacheKey == null) {
      insertLink((LinkedCacheKey)searchKey);
      ensureFixedSize();
    }
    return cacheKey;
  }
}
Program: 63337
Project: 63337
Buggy source:
/** 
 * Remove the LinkedCacheKey from the cache as well as from the linked list.
 * @return the LinkedCacheKey to be removed.
 */
public Object remove(CacheKey key){
  super.remove(key);
  if (key == null) {
    return null;
  }
  return removeLink((LinkedCacheKey)key).getObject();
}

Fixed version (ground truth):
/** 
 * Remove the LinkedCacheKey from the cache as well as from the linked list.
 * @return the LinkedCacheKey to be removed.
 */
public Object remove(CacheKey key){
synchronized (this.first) {
    super.remove(key);
    if (key == null) {
      return null;
    }
    return removeLink((LinkedCacheKey)key).getObject();
  }
}
Program: 63338
Project: 63338
Buggy source:
/** 
 * Add a mapping to the list of mappings that require postCalculateChanges method to be called.
 */
public void addMappingsPostCalculateChanges(DatabaseMapping mapping){
  getMappingsPostCalculateChanges().add(mapping);
}

Fixed version (ground truth):
/** 
 * Add a mapping to the list of mappings that require postCalculateChanges method to be called.
 */
public void addMappingsPostCalculateChanges(DatabaseMapping mapping){
  if (mapping.getReferenceDescriptor() != null) {
    getMappingsPostCalculateChanges().add(mapping);
  }
}
Program: 63339
Project: 63339
Buggy source:
/** 
 * INTERNAL: Initialize the state of mapping.
 */
@Override public void initialize(AbstractSession session) throws DescriptorException {
  super.initialize(session);
  if (this.isPrivateOwned && (this.descriptor != null)) {
    this.descriptor.addMappingsPostCalculateChanges(this);
  }
  initializeReferenceDescriptor(session);
  initializeSelectionQuery(session);
  this.indirectionPolicy.initialize();
  if ((this.referenceDescriptor != null) && this.referenceDescriptor.getCachePolicy().isIsolated()) {
    this.isCacheable=false;
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Initialize the state of mapping.
 */
@Override public void initialize(AbstractSession session) throws DescriptorException {
  super.initialize(session);
  initializeReferenceDescriptor(session);
  if (this.isPrivateOwned && (this.descriptor != null)) {
    this.descriptor.addMappingsPostCalculateChanges(this);
  }
  initializeSelectionQuery(session);
  this.indirectionPolicy.initialize();
  if ((this.referenceDescriptor != null) && this.referenceDescriptor.getCachePolicy().isIsolated()) {
    this.isCacheable=false;
  }
}
Program: 63340
Project: 63340
Buggy source:
public OrphanRemovalModelTableCreator(){
  setName("String_Node_Str");
  addTableDefinition(buildVEHICLETable());
  addTableDefinition(buildCHASSISTable());
  addTableDefinition(buildENGINETable());
  addTableDefinition(buildSPARKPLUGTable());
  addTableDefinition(buildWHEELTable());
  addTableDefinition(buildWHEELRIMTable());
  addTableDefinition(buildWHEELNUTTable());
}

Fixed version (ground truth):
public OrphanRemovalModelTableCreator(){
  setName("String_Node_Str");
  addTableDefinition(buildVEHICLETable());
  addTableDefinition(buildCHASSISTable());
  addTableDefinition(buildENGINETable());
  addTableDefinition(buildSPARKPLUGTable());
  addTableDefinition(buildWHEELTable());
  addTableDefinition(buildWHEELRIMTable());
  addTableDefinition(buildWHEELNUTTable());
  addTableDefinition(buildTIREDETAILTable());
}
Program: 63342
Project: 63342
Buggy source:
public void test12MFromExistingObject(){
  EntityManager em=createEntityManager();
  try {
    beginTransaction(em);
    Vehicle vehicle=new Vehicle("String_Node_Str");
    Chassis chassis1=new Chassis(1l);
    vehicle.setChassis(chassis1);
    Wheel wheel1=new Wheel(1l);
    chassis1.addWheel(wheel1);
    Wheel wheel2=new Wheel(2l);
    chassis1.addWheel(wheel2);
    em.persist(vehicle);
    commitTransaction(em);
    closeEntityManager(em);
    clearCache();
    em=createEntityManager();
    beginTransaction(em);
    Vehicle vehicleRead=em.find(Vehicle.class,vehicle.getId());
    compareObjects(vehicle,vehicleRead);
    Chassis chassisRead=vehicleRead.getChassis();
    chassisRead.setSerialNumber(74923402);
    chassisRead.removeWheel(wheel1);
    chassisRead.removeWheel(wheel2);
    chassisRead.setWheels(null);
    commitTransaction(em);
    closeEntityManager(em);
    clearCache();
    em=createEntityManager();
    beginTransaction(em);
    Vehicle vehicleReadAgain=em.find(Vehicle.class,vehicle.getId());
    assertNull("String_Node_Str",em.find(Wheel.class,wheel1.getId()));
    assertNull("String_Node_Str",em.find(Wheel.class,wheel2.getId()));
    em.remove(vehicleReadAgain);
    commitTransaction(em);
    closeEntityManager(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    closeEntityManager(em);
    throw e;
  }
}

Fixed version (ground truth):
public void test12MFromExistingObject(){
  EntityManager em=createEntityManager();
  try {
    beginTransaction(em);
    Vehicle vehicle=new Vehicle("String_Node_Str");
    Chassis chassis1=new Chassis(1l);
    vehicle.setChassis(chassis1);
    Wheel wheel1=new Wheel(1l);
    wheel1.setTire(new Tire());
    chassis1.addWheel(wheel1);
    Wheel wheel2=new Wheel(2l);
    wheel2.setTire(new Tire());
    chassis1.addWheel(wheel2);
    em.persist(vehicle);
    commitTransaction(em);
    closeEntityManager(em);
    clearCache();
    em=createEntityManager();
    beginTransaction(em);
    Vehicle vehicleRead=em.find(Vehicle.class,vehicle.getId());
    compareObjects(vehicle,vehicleRead);
    Chassis chassisRead=vehicleRead.getChassis();
    chassisRead.setSerialNumber(74923402);
    chassisRead.removeWheel(wheel1);
    chassisRead.removeWheel(wheel2);
    chassisRead.setWheels(null);
    commitTransaction(em);
    closeEntityManager(em);
    clearCache();
    em=createEntityManager();
    beginTransaction(em);
    Vehicle vehicleReadAgain=em.find(Vehicle.class,vehicle.getId());
    assertNull("String_Node_Str",em.find(Wheel.class,wheel1.getId()));
    assertNull("String_Node_Str",em.find(Wheel.class,wheel2.getId()));
    em.remove(vehicleReadAgain);
    commitTransaction(em);
    closeEntityManager(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    closeEntityManager(em);
    throw e;
  }
}
Program: 63343
Project: 63343
Buggy source:
public void test12MFromExistingObjectModification(){
  EntityManager em=createEntityManager();
  try {
    beginTransaction(em);
    Vehicle vehicle=new Vehicle("String_Node_Str");
    Chassis chassis1=new Chassis(1l);
    vehicle.setChassis(chassis1);
    chassis1.addWheel(new Wheel(1l));
    chassis1.addWheel(new Wheel(2l));
    em.persist(vehicle);
    commitTransaction(em);
    closeEntityManager(em);
    clearCache();
    em=createEntityManager();
    beginTransaction(em);
    Vehicle vehicleRead=em.find(Vehicle.class,vehicle.getId());
    compareObjects(vehicle,vehicleRead);
    Chassis chassis=vehicleRead.getChassis();
    for (    Wheel wheel : chassis.getWheels()) {
      wheel.setSerialNumber(wheel.getSerialNumber() + 10);
    }
    commitTransaction(em);
    closeEntityManager(em);
    clearCache();
    em=createEntityManager();
    beginTransaction(em);
    Vehicle vehicleReadAgain=em.find(Vehicle.class,vehicle.getId());
    compareObjects(vehicleRead,vehicleReadAgain);
    em.remove(vehicleReadAgain);
    commitTransaction(em);
    closeEntityManager(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    closeEntityManager(em);
    throw e;
  }
}

Fixed version (ground truth):
public void test12MFromExistingObjectModification(){
  EntityManager em=createEntityManager();
  try {
    beginTransaction(em);
    Vehicle vehicle=new Vehicle("String_Node_Str");
    Chassis chassis1=new Chassis(1l);
    vehicle.setChassis(chassis1);
    Wheel wheel1=new Wheel(1l);
    Wheel wheel2=new Wheel(2l);
    wheel1.setTire(new Tire());
    wheel2.setTire(new Tire());
    chassis1.addWheel(wheel1);
    chassis1.addWheel(wheel2);
    em.persist(vehicle);
    commitTransaction(em);
    closeEntityManager(em);
    clearCache();
    em=createEntityManager();
    beginTransaction(em);
    Vehicle vehicleRead=em.find(Vehicle.class,vehicle.getId());
    compareObjects(vehicle,vehicleRead);
    Chassis chassis=vehicleRead.getChassis();
    for (    Wheel wheel : chassis.getWheels()) {
      wheel.setSerialNumber(wheel.getSerialNumber() + 10);
    }
    commitTransaction(em);
    closeEntityManager(em);
    clearCache();
    em=createEntityManager();
    beginTransaction(em);
    Vehicle vehicleReadAgain=em.find(Vehicle.class,vehicle.getId());
    compareObjects(vehicleRead,vehicleReadAgain);
    em.remove(vehicleReadAgain);
    commitTransaction(em);
    closeEntityManager(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    closeEntityManager(em);
    throw e;
  }
}
Program: 63345
Project: 63345
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  if (!JUnitTestCase.isJPA10()) {
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
  }
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  if (!JUnitTestCase.isJPA10()) {
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
    suite.addTest(new OrphanRemovalJUnitTestCase("String_Node_Str"));
  }
  return suite;
}
Program: 63347
Project: 63347
Buggy source:
/** 
 * PUBLIC: Return a new descriptor.
 */
public ClassDescriptor(){
  this.tables=NonSynchronizedVector.newInstance(3);
  this.mappings=NonSynchronizedVector.newInstance();
  this.primaryKeyFields=new ArrayList(2);
  this.fields=NonSynchronizedVector.newInstance();
  this.allFields=NonSynchronizedVector.newInstance();
  this.constraintDependencies=NonSynchronizedVector.newInstance(2);
  this.multipleTableForeignKeys=new HashMap(5);
  this.queryKeys=new HashMap(5);
  this.initializationStage=UNINITIALIZED;
  this.interfaceInitializationStage=UNINITIALIZED;
  this.descriptorType=NORMAL;
  this.shouldOrderMappings=true;
  this.shouldBeReadOnly=false;
  this.shouldAlwaysConformResultsInUnitOfWork=false;
  this.shouldAcquireCascadedLocks=false;
  this.hasSimplePrimaryKey=false;
  this.derivesIdMappings=new HashMap(5);
  this.referencingClasses=new HashSet<ClassDescriptor>();
  this.objectBuilder=new ObjectBuilder(this);
  this.cachePolicy=new CachePolicy();
  this.additionalWritableMapKeyFields=new ArrayList(2);
  this.foreignKeyValuesForCaching=new HashSet<DatabaseField>();
}

Fixed version (ground truth):
/** 
 * PUBLIC: Return a new descriptor.
 */
public ClassDescriptor(){
  this.tables=NonSynchronizedVector.newInstance(3);
  this.mappings=NonSynchronizedVector.newInstance();
  this.primaryKeyFields=new ArrayList(2);
  this.fields=NonSynchronizedVector.newInstance();
  this.allFields=NonSynchronizedVector.newInstance();
  this.constraintDependencies=NonSynchronizedVector.newInstance(2);
  this.multipleTableForeignKeys=new HashMap(5);
  this.queryKeys=new HashMap(5);
  this.initializationStage=UNINITIALIZED;
  this.interfaceInitializationStage=UNINITIALIZED;
  this.descriptorType=NORMAL;
  this.shouldOrderMappings=true;
  this.shouldBeReadOnly=false;
  this.shouldAlwaysConformResultsInUnitOfWork=false;
  this.shouldAcquireCascadedLocks=false;
  this.hasSimplePrimaryKey=false;
  this.derivesIdMappings=new HashMap(5);
  this.referencingClasses=new HashSet<>();
  this.objectBuilder=new ObjectBuilder(this);
  this.cachePolicy=new CachePolicy();
  this.additionalWritableMapKeyFields=new ArrayList(2);
  this.foreignKeyValuesForCaching=new HashSet<DatabaseField>();
}
Program: 63348
Project: 63348
Buggy source:
/** 
 * INTERNAL: Was PUBLIC: customer will be redirected to   {@link org.eclipse.persistence.sessions.Session}. Release the client session. This releases the client session back to it server. Normally this will logout of the client session's connection, and allow the client session to garbage collect.
 */
@Override public void release() throws DatabaseException {
  if (!this.isActive) {
    return;
  }
  if (this.eventManager != null) {
    this.eventManager.preReleaseClientSession();
  }
  if (hasWriteConnection()) {
    this.parent.releaseClientSession(this);
  }
  this.isActive=false;
  log(SessionLog.FINER,SessionLog.CONNECTION,"String_Node_Str");
  if (this.eventManager != null) {
    this.eventManager.postReleaseClientSession();
  }
  incrementProfile(SessionProfiler.ClientSessionReleased);
}

Fixed version (ground truth):
/** 
 * INTERNAL: Was PUBLIC: customer will be redirected to   {@link org.eclipse.persistence.sessions.Session}. Release the client session. This releases the client session back to it server. Normally this will logout of the client session's connection, and allow the client session to garbage collect.
 */
@Override public void release() throws DatabaseException {
  for (  Map.Entry<Class,ClassDescriptor> entry : getDescriptors().entrySet()) {
    entry.getValue().clearReferencingClasses();
  }
  if (!this.isActive) {
    return;
  }
  if (this.eventManager != null) {
    this.eventManager.preReleaseClientSession();
  }
  if (hasWriteConnection()) {
    this.parent.releaseClientSession(this);
  }
  this.isActive=false;
  log(SessionLog.FINER,SessionLog.CONNECTION,"String_Node_Str");
  if (this.eventManager != null) {
    this.eventManager.postReleaseClientSession();
  }
  incrementProfile(SessionProfiler.ClientSessionReleased);
}