nus-yam/ex-repair huggingface dataset:
Program: 68361
Project: 68361
Buggy source:
public void testSetPropertyOnNullListWrapper(){
  boolean expectedEx=false;
  boolean unexpectedEx=false;
  try {
    SDODataFactory factory=new SDODataFactory(getHelperContext());
    SDODataObject po=(SDODataObject)factory.create("String_Node_Str","String_Node_Str");
    po.createDataObject("String_Node_Str");
    po.set("String_Node_Str","String_Node_Str");
  }
 catch (  IndexOutOfBoundsException iobe) {
    expectedEx=true;
  }
catch (  Exception x) {
    unexpectedEx=true;
  }
  assertTrue("String_Node_Str",expectedEx);
  assertFalse("String_Node_Str",unexpectedEx);
}

Fixed version (ground truth):
public void testSetPropertyOnNullListWrapper(){
  boolean expectedEx=false;
  boolean unexpectedEx=false;
  try {
    SDODataFactory factory=new SDODataFactory(getHelperContext());
    SDODataObject po=(SDODataObject)factory.create("String_Node_Str","String_Node_Str");
    po.createDataObject("String_Node_Str");
    po.set("String_Node_Str","String_Node_Str");
  }
 catch (  SDOException sdoe) {
    if (sdoe.getErrorCode() == SDOException.CANNOT_PERFORM_OPERATION_ON_PROPERTY) {
      expectedEx=true;
    }
 else {
      unexpectedEx=true;
    }
  }
catch (  Exception x) {
    unexpectedEx=true;
  }
  assertTrue("String_Node_Str",expectedEx);
  assertFalse("String_Node_Str",unexpectedEx);
}
Program: 68365
Project: 68365
Buggy source:
public List getControlTypes(){
  List types=new ArrayList();
  String uri="String_Node_Str";
  Type stringType=typeHelper.getType("String_Node_Str","String_Node_Str");
  SDOProperty xmlDataTypeProperty=(SDOProperty)typeHelper.getOpenContentProperty(SDOConstants.ORACLE_SDO_URL,SDOConstants.SDOXML_DATATYPE);
  SDOType customerType=new SDOType(uri,"String_Node_Str");
  customerType.setDataType(false);
  customerType.setInstanceClassName("String_Node_Str");
  SDOProperty fNameProp=new SDOProperty(aHelperContext);
  fNameProp.setName("String_Node_Str");
  fNameProp.setXsd(true);
  fNameProp.setXsdLocalName("String_Node_Str");
  fNameProp.setType(stringType);
  SDOProperty lNameProp=new SDOProperty(aHelperContext);
  lNameProp.setName("String_Node_Str");
  lNameProp.setXsd(true);
  lNameProp.setXsdLocalName("String_Node_Str");
  lNameProp.setType(stringType);
  SDOProperty idProp=new SDOProperty(aHelperContext);
  idProp.setName("String_Node_Str");
  idProp.setXsd(true);
  idProp.setXsdLocalName("String_Node_Str");
  idProp.setInstanceProperty(xmlDataTypeProperty,SDOConstants.SDO_INTEGER);
  idProp.setType(SDOConstants.SDO_INTEGER);
  customerType.addDeclaredProperty(fNameProp);
  customerType.addDeclaredProperty(lNameProp);
  customerType.addDeclaredProperty(idProp);
  types.add(customerType);
  return types;
}

Fixed version (ground truth):
public List getControlTypes(){
  List types=new ArrayList();
  String uri="String_Node_Str";
  Type stringType=typeHelper.getType("String_Node_Str","String_Node_Str");
  SDOProperty xmlDataTypeProperty=(SDOProperty)typeHelper.getOpenContentProperty(SDOConstants.SDOXML_URL,SDOConstants.SDOXML_DATATYPE);
  SDOType customerType=new SDOType(uri,"String_Node_Str");
  customerType.setDataType(false);
  customerType.setInstanceClassName("String_Node_Str");
  SDOProperty fNameProp=new SDOProperty(aHelperContext);
  fNameProp.setName("String_Node_Str");
  fNameProp.setXsd(true);
  fNameProp.setXsdLocalName("String_Node_Str");
  fNameProp.setType(stringType);
  SDOProperty lNameProp=new SDOProperty(aHelperContext);
  lNameProp.setName("String_Node_Str");
  lNameProp.setXsd(true);
  lNameProp.setXsdLocalName("String_Node_Str");
  lNameProp.setType(stringType);
  SDOProperty idProp=new SDOProperty(aHelperContext);
  idProp.setName("String_Node_Str");
  idProp.setXsd(true);
  idProp.setXsdLocalName("String_Node_Str");
  idProp.setInstanceProperty(xmlDataTypeProperty,SDOConstants.SDO_INTEGER);
  idProp.setType(SDOConstants.SDO_INTEGER);
  customerType.addDeclaredProperty(fNameProp);
  customerType.addDeclaredProperty(lNameProp);
  customerType.addDeclaredProperty(idProp);
  types.add(customerType);
  return types;
}
Program: 68370
Project: 68370
Buggy source:
public List getTypesToGenerateFrom(){
  List types=new ArrayList();
  String uri="String_Node_Str";
  SDOType dataObjectType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.DATAOBJECT);
  SDOType typeType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.TYPE);
  SDOProperty xmlDataTypeProperty=(SDOProperty)typeHelper.getOpenContentProperty(SDOConstants.ORACLE_SDO_URL,SDOConstants.SDOXML_DATATYPE);
  SDOProperty xmlSchemaTypeProperty=(SDOProperty)typeHelper.getOpenContentProperty(SDOConstants.ORACLE_SDO_URL,SDOConstants.XML_SCHEMA_TYPE_NAME);
  DataObject addressTypeDO=dataFactory.create(typeType);
  addressTypeDO.set("String_Node_Str","String_Node_Str");
  addressTypeDO.set("String_Node_Str","String_Node_Str");
  addProperty(addressTypeDO,"String_Node_Str",SDOConstants.SDO_STRING,false,false,false);
  addProperty(addressTypeDO,"String_Node_Str",SDOConstants.SDO_STRING,false,false,false);
  Type addressType=typeHelper.define(addressTypeDO);
  DataObject personTypeDO=dataFactory.create(typeType);
  personTypeDO.set("String_Node_Str","String_Node_Str");
  personTypeDO.set("String_Node_Str",uri);
  addProperty(personTypeDO,"String_Node_Str",SDOConstants.SDO_STRING,false,false,false);
  DataObject addressPropDO=addProperty(personTypeDO,"String_Node_Str",addressType,true,false,true);
  addressPropDO.set(xmlDataTypeProperty,dataObjectType);
  addressPropDO.set(xmlSchemaTypeProperty,addressType);
  Type personType=typeHelper.define(personTypeDO);
  types.add(personType);
  return types;
}

Fixed version (ground truth):
public List getTypesToGenerateFrom(){
  List types=new ArrayList();
  String uri="String_Node_Str";
  SDOType dataObjectType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.DATAOBJECT);
  SDOType typeType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.TYPE);
  SDOProperty xmlDataTypeProperty=(SDOProperty)typeHelper.getOpenContentProperty(SDOConstants.SDOXML_URL,SDOConstants.SDOXML_DATATYPE);
  SDOProperty xmlSchemaTypeProperty=(SDOProperty)typeHelper.getOpenContentProperty(SDOConstants.ORACLE_SDO_URL,SDOConstants.XML_SCHEMA_TYPE_NAME);
  DataObject addressTypeDO=dataFactory.create(typeType);
  addressTypeDO.set("String_Node_Str","String_Node_Str");
  addressTypeDO.set("String_Node_Str","String_Node_Str");
  addProperty(addressTypeDO,"String_Node_Str",SDOConstants.SDO_STRING,false,false,false);
  addProperty(addressTypeDO,"String_Node_Str",SDOConstants.SDO_STRING,false,false,false);
  Type addressType=typeHelper.define(addressTypeDO);
  DataObject personTypeDO=dataFactory.create(typeType);
  personTypeDO.set("String_Node_Str","String_Node_Str");
  personTypeDO.set("String_Node_Str",uri);
  addProperty(personTypeDO,"String_Node_Str",SDOConstants.SDO_STRING,false,false,false);
  DataObject addressPropDO=addProperty(personTypeDO,"String_Node_Str",addressType,true,false,true);
  addressPropDO.set(xmlDataTypeProperty,dataObjectType);
  addressPropDO.set(xmlSchemaTypeProperty,addressType);
  Type personType=typeHelper.define(personTypeDO);
  types.add(personType);
  return types;
}
Program: 68372
Project: 68372
Buggy source:
public void setInstanceProperty(Property property,Object value){
  getPropertyValues().put(property,value);
  if (SDOConstants.ORACLE_SDO_URL.equals(((SDOProperty)property).getUri()) && SDOConstants.SDOXML_DATATYPE.equals(property.getName()) && value instanceof Type) {
    setType((Type)value);
  }
  if (SDOConstants.ORACLE_SDO_URL.equals(((SDOProperty)property).getUri()) && SDOConstants.XML_SCHEMA_TYPE_NAME.equals(property.getName()) && value instanceof Type) {
    Type schemaType=(Type)value;
    QName schemaTypeQName=new QName(schemaType.getURI(),schemaType.getName());
    setXsdType(schemaTypeQName);
  }
}

Fixed version (ground truth):
public void setInstanceProperty(Property property,Object value){
  getPropertyValues().put(property,value);
  if (SDOConstants.SDOXML_URL.equals(((SDOProperty)property).getUri()) && SDOConstants.SDOXML_DATATYPE.equals(property.getName()) && value instanceof Type) {
    setType((Type)value);
  }
  if (SDOConstants.ORACLE_SDO_URL.equals(((SDOProperty)property).getUri()) && SDOConstants.XML_SCHEMA_TYPE_NAME.equals(property.getName()) && value instanceof Type) {
    Type schemaType=(Type)value;
    QName schemaTypeQName=new QName(schemaType.getURI(),schemaType.getName());
    setXsdType(schemaTypeQName);
  }
}
Program: 68375
Project: 68375
Buggy source:
private void initOpenProps(){
  getGlobalAttributes().put(SDOConstants.MIME_TYPE_QNAME,SDOConstants.MIME_TYPE_PROPERTY);
  getGlobalAttributes().put(SDOConstants.MIME_TYPE_PROPERTY_QNAME,SDOConstants.MIME_TYPE_PROPERTY_PROPERTY);
  Property xmlSchemaTypeProperty=aHelperContext.getTypeHelper().getOpenContentProperty(SDOConstants.SDO_URL,SDOConstants.XML_SCHEMA_TYPE_NAME);
  getGlobalAttributes().put(SDOConstants.SCHEMA_TYPE_QNAME,xmlSchemaTypeProperty);
  getGlobalAttributes().put(SDOConstants.JAVA_CLASS_QNAME,SDOConstants.JAVA_CLASS_PROPERTY);
  getGlobalAttributes().put(SDOConstants.XML_ELEMENT_QNAME,SDOConstants.XMLELEMENT_PROPERTY);
  Property xmlDataTypeProperty=aHelperContext.getTypeHelper().getOpenContentProperty(SDOConstants.ORACLE_SDO_URL,SDOConstants.SDOXML_DATATYPE);
  getGlobalAttributes().put(SDOConstants.XML_DATATYPE_QNAME,xmlDataTypeProperty);
  getGlobalAttributes().put(SDOConstants.XML_ID_PROPERTY_QNAME,SDOConstants.ID_PROPERTY);
  getGlobalAttributes().put(SDOConstants.DOCUMENTATION_PROPERTY_QNAME,SDOConstants.DOCUMENTATION_PROPERTY);
}

Fixed version (ground truth):
private void initOpenProps(){
  getGlobalAttributes().put(SDOConstants.MIME_TYPE_QNAME,SDOConstants.MIME_TYPE_PROPERTY);
  getGlobalAttributes().put(SDOConstants.MIME_TYPE_PROPERTY_QNAME,SDOConstants.MIME_TYPE_PROPERTY_PROPERTY);
  Property xmlSchemaTypeProperty=aHelperContext.getTypeHelper().getOpenContentProperty(SDOConstants.SDO_URL,SDOConstants.XML_SCHEMA_TYPE_NAME);
  getGlobalAttributes().put(SDOConstants.SCHEMA_TYPE_QNAME,xmlSchemaTypeProperty);
  getGlobalAttributes().put(SDOConstants.JAVA_CLASS_QNAME,SDOConstants.JAVA_CLASS_PROPERTY);
  getGlobalAttributes().put(SDOConstants.XML_ELEMENT_QNAME,SDOConstants.XMLELEMENT_PROPERTY);
  Property xmlDataTypeProperty=aHelperContext.getTypeHelper().getOpenContentProperty(SDOConstants.SDOXML_URL,SDOConstants.SDOXML_DATATYPE);
  getGlobalAttributes().put(SDOConstants.XML_DATATYPE_QNAME,xmlDataTypeProperty);
  getGlobalAttributes().put(SDOConstants.XML_ID_PROPERTY_QNAME,SDOConstants.ID_PROPERTY);
  getGlobalAttributes().put(SDOConstants.DOCUMENTATION_PROPERTY_QNAME,SDOConstants.DOCUMENTATION_PROPERTY);
}
Program: 68376
Project: 68376
Buggy source:
protected void test(){
  this.unitOfWorkWorkingCopy.setFirstName("String_Node_Str");
  this.unitOfWorkWorkingCopy.addPhoneNumber(new PhoneNumber("String_Node_Str","String_Node_Str","String_Node_Str"));
  Employee newEmp=new Employee();
  newEmp.setFirstName("String_Node_Str");
  newEmp.setLastName("String_Node_Str");
  newEmp.setSalary(13);
  PhoneNumber phone=(PhoneNumber)this.unitOfWorkWorkingCopy.getPhoneNumbers().get(0);
  this.unitOfWorkWorkingCopy.getPhoneNumbers().remove(phone);
  this.unitOfWork.deleteObject(phone);
  this.unitOfWorkWorkingCopy.addManagedEmployee(newEmp);
  if (compareObjects(this.originalObject,this.unitOfWorkWorkingCopy)) {
    throw new TestErrorException("String_Node_Str");
  }
  UnitOfWorkChangeSet changeSet=(UnitOfWorkChangeSet)this.unitOfWork.getCurrentChanges();
  this.unitOfWork.revertAndResume();
  ((UnitOfWorkImpl)this.unitOfWork).commitAndResumeWithPreBuiltChangeSet(changeSet);
  this.unitOfWork.release();
}

Fixed version (ground truth):
protected void test(){
  this.unitOfWorkWorkingCopy.setFirstName("String_Node_Str");
  this.unitOfWorkWorkingCopy.addPhoneNumber(new PhoneNumber("String_Node_Str","String_Node_Str","String_Node_Str"));
  Employee newEmp=new Employee();
  newEmp.setFirstName("String_Node_Str");
  newEmp.setLastName("String_Node_Str");
  newEmp.setSalary(13);
  PhoneNumber phone=(PhoneNumber)this.unitOfWorkWorkingCopy.getPhoneNumbers().get(0);
  this.unitOfWorkWorkingCopy.getPhoneNumbers().remove(phone);
  this.unitOfWork.deleteObject(phone);
  this.unitOfWorkWorkingCopy.addManagedEmployee(newEmp);
  if (compareObjects(this.originalObject,this.unitOfWorkWorkingCopy)) {
    throw new TestErrorException("String_Node_Str");
  }
  UnitOfWorkChangeSet changeSet=(UnitOfWorkChangeSet)this.unitOfWork.getCurrentChanges();
  this.unitOfWork.assignSequenceNumbers();
  this.unitOfWork.revertAndResume();
  ((UnitOfWorkImpl)this.unitOfWork).commitAndResumeWithPreBuiltChangeSet(changeSet);
  this.unitOfWork.release();
}
Program: 68378
Project: 68378
Buggy source:
public void startElement(String namespaceURI,String localName,String qName,Attributes atts) throws SAXException {
  if (namespaceURI.equals(XMLConstants.XOP_URL) && (localName.equals("String_Node_Str") || qName.equals("String_Node_Str"))) {
    this.c_id=atts.getValue("String_Node_Str","String_Node_Str");
  }
 else {
    record.getXMLReader().setContentHandler(record);
    record.startElement(namespaceURI,localName,qName,atts);
  }
}

Fixed version (ground truth):
@Override public void startElement(String namespaceURI,String localName,String qName,Attributes atts) throws SAXException {
  if (XMLConstants.XOP_URL.equals(namespaceURI) && (INCLUDE_ELEMENT_NAME.equals(localName) || INCLUDE_ELEMENT_NAME.equals(qName))) {
    this.c_id=atts.getValue("String_Node_Str",HREF_ATTRIBUTE_NAME);
  }
 else {
    record.getXMLReader().setContentHandler(record);
    record.startElement(namespaceURI,localName,qName,atts);
  }
}
Program: 68379
Project: 68379
Buggy source:
public XMLBinaryAttachmentHandler(UnmarshalRecord unmarshalRecord,NodeValue nodeValue,XMLBinaryDataCollectionMapping mapping){
  record=unmarshalRecord;
  this.mapping=mapping;
  converter=mapping.getValueConverter();
  this.nodeValue=nodeValue;
  isCollection=true;
}

Fixed version (ground truth):
public XMLBinaryAttachmentHandler(UnmarshalRecord unmarshalRecord,NodeValue nodeValue,DatabaseMapping mapping,Converter converter,boolean isCollection){
  super(null);
  record=unmarshalRecord;
  this.mapping=mapping;
  this.nodeValue=nodeValue;
  this.converter=converter;
  this.isCollection=isCollection;
}
Program: 68380
Project: 68380
Buggy source:
public void characters(char[] characters,int offset,int length){
}

Fixed version (ground truth):
@Override public void characters(char[] ch,int offset,int length) throws SAXException {
}
Program: 68381
Project: 68381
Buggy source:
public void endElement(String namespaceURI,String localName,String qName) throws SAXException {
  if (namespaceURI.equals(XMLConstants.XOP_URL) && (localName.equals("String_Node_Str") || qName.equals("String_Node_Str"))) {
    XMLAttachmentUnmarshaller attachmentUnmarshaller=record.getUnmarshaller().getAttachmentUnmarshaller();
    Object data=attachmentUnmarshaller.getAttachmentAsByteArray(this.c_id);
    if (this.converter != null) {
      Converter converter=this.converter;
      if (converter instanceof XMLConverter) {
        data=((XMLConverter)converter).convertDataValueToObjectValue(data,record.getSession(),record.getUnmarshaller());
      }
 else {
        data=converter.convertDataValueToObjectValue(data,record.getSession());
      }
    }
    data=XMLBinaryDataHelper.getXMLBinaryDataHelper().convertObject(data,mapping.getAttributeClassification(),record.getSession());
    if (isCollection) {
      Object container=record.getContainerInstance((XMLBinaryDataCollectionMappingNodeValue)nodeValue);
      ((XMLBinaryDataCollectionMapping)mapping).getContainerPolicy().addInto(data,container,record.getSession());
    }
 else {
      mapping.setAttributeValueInObject(record.getCurrentObject(),data);
    }
    record.getXMLReader().setContentHandler(record);
  }
 else {
    record.getXMLReader().setContentHandler(record);
    record.endElement(namespaceURI,localName,qName);
  }
}

Fixed version (ground truth):
@Override public void endElement(String namespaceURI,String localName,String qName) throws SAXException {
  if (XMLConstants.XOP_URL.equals(namespaceURI) && (INCLUDE_ELEMENT_NAME.equals(localName) || INCLUDE_ELEMENT_NAME.equals(qName))) {
    XMLAttachmentUnmarshaller attachmentUnmarshaller=record.getUnmarshaller().getAttachmentUnmarshaller();
    Object data=attachmentUnmarshaller.getAttachmentAsByteArray(this.c_id);
    if (this.converter != null) {
      Converter converter=this.converter;
      if (converter instanceof XMLConverter) {
        data=((XMLConverter)converter).convertDataValueToObjectValue(data,record.getSession(),record.getUnmarshaller());
      }
 else {
        data=converter.convertDataValueToObjectValue(data,record.getSession());
      }
    }
    data=XMLBinaryDataHelper.getXMLBinaryDataHelper().convertObject(data,mapping.getAttributeClassification(),record.getSession());
    if (isCollection) {
      if (data != null) {
        record.addAttributeValue((ContainerValue)nodeValue,data);
      }
    }
 else {
      record.setAttributeValue(data,mapping);
    }
    record.getXMLReader().setContentHandler(record);
  }
 else {
    record.getXMLReader().setContentHandler(record);
    record.endElement(namespaceURI,localName,qName);
  }
}
Program: 68384
Project: 68384
Buggy source:
public void endElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord){
  if (!xmlBinaryDataCollectionMapping.shouldInlineBinaryData() && !xmlBinaryDataCollectionMapping.isSwaRef() && unmarshalRecord.getUnmarshaller().getAttachmentUnmarshaller() != null && unmarshalRecord.getUnmarshaller().getAttachmentUnmarshaller().isXOPPackage()) {
    unmarshalRecord.resetStringBuffer();
    return;
  }
  Object value=unmarshalRecord.getStringBuffer().toString();
  unmarshalRecord.resetStringBuffer();
  if (xmlBinaryDataCollectionMapping.isSwaRef() && unmarshalRecord.getUnmarshaller().getAttachmentUnmarshaller() != null) {
    if (xmlBinaryDataCollectionMapping.getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
      value=unmarshalRecord.getUnmarshaller().getAttachmentUnmarshaller().getAttachmentAsDataHandler((String)value);
    }
 else {
      value=unmarshalRecord.getUnmarshaller().getAttachmentUnmarshaller().getAttachmentAsByteArray((String)value);
    }
    if (xmlBinaryDataCollectionMapping.getValueConverter() != null) {
      Converter converter=xmlBinaryDataCollectionMapping.getValueConverter();
      if (converter instanceof XMLConverter) {
        value=((XMLConverter)converter).convertDataValueToObjectValue(value,unmarshalRecord.getSession(),unmarshalRecord.getUnmarshaller());
      }
 else {
        value=converter.convertDataValueToObjectValue(value,unmarshalRecord.getSession());
      }
    }
  }
 else {
    value=((XMLConversionManager)unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager()).convertSchemaBase64ToByteArray(value);
    if (xmlBinaryDataCollectionMapping.getValueConverter() != null) {
      Converter converter=xmlBinaryDataCollectionMapping.getValueConverter();
      if (converter instanceof XMLConverter) {
        value=((XMLConverter)converter).convertDataValueToObjectValue(value,unmarshalRecord.getSession(),unmarshalRecord.getUnmarshaller());
      }
 else {
        value=converter.convertDataValueToObjectValue(value,unmarshalRecord.getSession());
      }
    }
  }
  value=XMLBinaryDataHelper.getXMLBinaryDataHelper().convertObject(value,xmlBinaryDataCollectionMapping.getAttributeClassification(),unmarshalRecord.getSession());
  if (value != null) {
    Object container=unmarshalRecord.getContainerInstance(this);
    unmarshalRecord.addAttributeValue(this,value);
  }
}

Fixed version (ground truth):
public void endElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord){
  unmarshalRecord.getStringBuffer().reset();
}
Program: 68385
Project: 68385
Buggy source:
public void endElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord){
  if (!xmlBinaryDataMapping.shouldInlineBinaryData() && !xmlBinaryDataMapping.isSwaRef() && (unmarshalRecord.getUnmarshaller().getAttachmentUnmarshaller() != null)&& unmarshalRecord.getUnmarshaller().getAttachmentUnmarshaller().isXOPPackage()) {
    unmarshalRecord.resetStringBuffer();
    return;
  }
  unmarshalRecord.removeNullCapableValue(this);
  Object value=unmarshalRecord.getStringBuffer().toString();
  unmarshalRecord.resetStringBuffer();
  if (xmlBinaryDataMapping.isSwaRef() && (unmarshalRecord.getUnmarshaller().getAttachmentUnmarshaller() != null)) {
    if (xmlBinaryDataMapping.getAttributeClassification() == XMLBinaryDataHelper.getXMLBinaryDataHelper().DATA_HANDLER) {
      value=unmarshalRecord.getUnmarshaller().getAttachmentUnmarshaller().getAttachmentAsDataHandler((String)value);
    }
 else {
      value=unmarshalRecord.getUnmarshaller().getAttachmentUnmarshaller().getAttachmentAsByteArray((String)value);
    }
    if (xmlBinaryDataMapping.getConverter() != null) {
      Converter converter=xmlBinaryDataMapping.getConverter();
      if (converter instanceof XMLConverter) {
        value=((XMLConverter)converter).convertDataValueToObjectValue(value,unmarshalRecord.getSession(),unmarshalRecord.getUnmarshaller());
      }
 else {
        value=converter.convertDataValueToObjectValue(value,unmarshalRecord.getSession());
      }
    }
  }
 else {
    value=((XMLConversionManager)unmarshalRecord.getSession().getDatasourcePlatform().getConversionManager()).convertSchemaBase64ToByteArray(value);
    if (xmlBinaryDataMapping.getConverter() != null) {
      Converter converter=xmlBinaryDataMapping.getConverter();
      if (converter instanceof XMLConverter) {
        value=((XMLConverter)converter).convertDataValueToObjectValue(value,unmarshalRecord.getSession(),unmarshalRecord.getUnmarshaller());
      }
 else {
        value=converter.convertDataValueToObjectValue(value,unmarshalRecord.getSession());
      }
    }
  }
  value=XMLBinaryDataHelper.getXMLBinaryDataHelper().convertObject(value,xmlBinaryDataMapping.getAttributeClassification(),unmarshalRecord.getSession());
  unmarshalRecord.setAttributeValue(value,xmlBinaryDataMapping);
}

Fixed version (ground truth):
public void endElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord){
  unmarshalRecord.getStringBuffer().reset();
}
Program: 68387
Project: 68387
Buggy source:
public void parse(Node node) throws SAXException {
  if (getContentHandler() == null) {
    return;
  }
  Element rootNode=null;
  if (node.getNodeType() == Node.DOCUMENT_NODE) {
    rootNode=((Document)node).getDocumentElement();
  }
 else {
    rootNode=(Element)node;
  }
  startDocument();
  setupLocator(rootNode.getOwnerDocument());
  reportElementEvents(rootNode);
  endDocument();
}

Fixed version (ground truth):
public void parse(Node node) throws SAXException {
  if (getContentHandler() == null) {
    return;
  }
  Element rootNode=null;
  if (node.getNodeType() == Node.DOCUMENT_NODE) {
    rootNode=((Document)node).getDocumentElement();
  }
 else {
    rootNode=(Element)node;
  }
  processParentNamespaces(rootNode);
  startDocument();
  setupLocator(rootNode.getOwnerDocument());
  reportElementEvents(rootNode);
  endDocument();
}
Program: 68388
Project: 68388
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  String platform=System.getProperty("String_Node_Str");
  boolean jaxpPlatform=platform.equalsIgnoreCase("String_Node_Str");
  suite.addTestSuite(XMLMarshallerCreateTestCases.class);
  suite.addTestSuite(XMLMarshalTestCases.class);
  suite.addTestSuite(XMLMarshalFragmentTestCases.class);
  suite.addTestSuite(XMLUnmarshalTestCases.class);
  if (!jaxpPlatform) {
    suite.addTestSuite(XMLMarshallerValidateRootTestCases.class);
  }
  suite.addTestSuite(XMLMarshallerValidationModeTestCases.class);
  suite.addTestSuite(SetSchemasTestCases.class);
  suite.addTest(StructureValidationTestSuite.suite());
  suite.addTestSuite(XMLUnmarshallerHandlerTestCases.class);
  suite.addTestSuite(XMLMarshallerNoDefaultRootTestCases.class);
  suite.addTestSuite(XMLContextConstructorUsingXMLSessionConfigLoader.class);
  suite.addTestSuite(XMLContextStoreXMLDescriptorSimpleType.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  String platform=System.getProperty("String_Node_Str");
  boolean jaxpPlatform=platform.equalsIgnoreCase("String_Node_Str");
  suite.addTestSuite(XMLMarshallerCreateTestCases.class);
  suite.addTestSuite(XMLMarshalTestCases.class);
  suite.addTestSuite(XMLMarshalFragmentTestCases.class);
  suite.addTestSuite(XMLUnmarshalTestCases.class);
  if (!jaxpPlatform) {
    suite.addTestSuite(XMLMarshallerValidateRootTestCases.class);
  }
  suite.addTestSuite(XMLMarshallerValidationModeTestCases.class);
  suite.addTestSuite(SetSchemasTestCases.class);
  suite.addTest(StructureValidationTestSuite.suite());
  suite.addTestSuite(XMLUnmarshallerHandlerTestCases.class);
  suite.addTestSuite(XMLMarshallerNoDefaultRootTestCases.class);
  suite.addTestSuite(XMLContextConstructorUsingXMLSessionConfigLoader.class);
  suite.addTestSuite(XMLContextStoreXMLDescriptorSimpleType.class);
  suite.addTestSuite(UnmarshalChildElementNSTestCases.class);
  return suite;
}
Program: 68389
Project: 68389
Buggy source:
public SDOChangeSummary(SDODataObject dataObject,HelperContext aContext){
  this();
  aHelperContext=aContext;
  rootDataObject=dataObject;
}

Fixed version (ground truth):
public SDOChangeSummary(SDODataGraph dataGraph,HelperContext aContext){
  this();
  aHelperContext=aContext;
  this.dataGraph=dataGraph;
}
Program: 68390
Project: 68390
Buggy source:
/** 
 * Creates a new root data object of the specified type. An exception is thrown if a root object exists.
 * @param type the type of the new root.
 * @return the new root.
 * @throws IllegalStateException if the root object already exists.
 * @see #createRootObject(String,String)
 */
public DataObject createRootObject(Type type){
  rootObject=(SDODataObject)helperContext.getDataFactory().create(type);
  rootObject.setDataGraph(this);
  rootObject._setChangeSummary(changeSummary);
  return rootObject;
}

Fixed version (ground truth):
/** 
 * Creates a new root data object of the specified type. An exception is thrown if a root object exists.
 * @param type the type of the new root.
 * @return the new root.
 * @throws IllegalStateException if the root object already exists.
 * @see #createRootObject(String,String)
 */
public DataObject createRootObject(Type type){
  if (null != rootObject) {
    throw new IllegalStateException();
  }
  rootObject=(SDODataObject)helperContext.getDataFactory().create(type);
  rootObject.setDataGraph(this);
  rootObject._setChangeSummary(changeSummary);
  changeSummary.setRootDataObject(rootObject);
  return rootObject;
}
Program: 68391
Project: 68391
Buggy source:
public SDODataGraph(HelperContext helperContext){
  super();
  if (null == helperContext) {
    this.helperContext=HelperProvider.getDefaultContext();
  }
 else {
    this.helperContext=helperContext;
  }
  this.changeSummary=new SDOChangeSummary();
}

Fixed version (ground truth):
public SDODataGraph(HelperContext helperContext){
  super();
  if (null == helperContext) {
    this.helperContext=HelperProvider.getDefaultContext();
  }
 else {
    this.helperContext=helperContext;
  }
  this.changeSummary=new SDOChangeSummary(this,helperContext);
}
Program: 68392
Project: 68392
Buggy source:
public StoredProcedureDefinition buildSQLServerUpdateProcedure(){
  StoredProcedureDefinition proc=new StoredProcedureDefinition();
  proc.setName("String_Node_Str");
  proc.addArgument("String_Node_Str",Long.class);
  proc.addArgument("String_Node_Str",Integer.class);
  proc.addArgument("String_Node_Str",java.sql.Date.class);
  proc.addArgument("String_Node_Str",Long.class);
  proc.addArgument("String_Node_Str",java.sql.Date.class);
  proc.addArgument("String_Node_Str",String.class,40);
  proc.addArgument("String_Node_Str",String.class,40);
  proc.addArgument("String_Node_Str",String.class,1);
  proc.addArgument("String_Node_Str",Long.class);
  proc.addArgument("String_Node_Str",Long.class);
  proc.addArgument("String_Node_Str",java.sql.Time.class);
  proc.addArgument("String_Node_Str",java.sql.Time.class);
  proc.addStatement("String_Node_Str");
  proc.addStatement("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  return proc;
}

Fixed version (ground truth):
public StoredProcedureDefinition buildSQLServerUpdateProcedure(){
  StoredProcedureDefinition proc=new StoredProcedureDefinition();
  proc.setName("String_Node_Str");
  proc.addArgument("String_Node_Str",Long.class);
  proc.addArgument("String_Node_Str",Integer.class);
  proc.addArgument("String_Node_Str",java.sql.Date.class);
  proc.addArgument("String_Node_Str",Long.class);
  proc.addArgument("String_Node_Str",java.sql.Date.class);
  proc.addArgument("String_Node_Str",String.class,40);
  proc.addArgument("String_Node_Str",String.class,40);
  proc.addArgument("String_Node_Str",String.class,1);
  proc.addArgument("String_Node_Str",Long.class);
  proc.addArgument("String_Node_Str",java.sql.Time.class);
  proc.addArgument("String_Node_Str",java.sql.Time.class);
  proc.addStatement("String_Node_Str");
  proc.addStatement("String_Node_Str" + "String_Node_Str");
  return proc;
}
Program: 68395
Project: 68395
Buggy source:
public void test(){
  ReadAllQuery query=new ReadAllQuery();
  query.setReferenceClass(Employee.class);
  query.useScrollableCursor();
  ScrollableCursor cursor=(ScrollableCursor)getSession().executeQuery(query);
  while (cursor.hasMoreElements()) {
    this.cursoredQueryObjects.addElement(cursor.nextElement());
  }
}

Fixed version (ground truth):
public void test(){
  ReadAllQuery query=new ReadAllQuery();
  query.setReferenceClass(Employee.class);
  if (TYPE_SCROLL_INSENSITIVE_isSupported && CONCUR_UPDATABLE_isSupported) {
    query.useScrollableCursor();
  }
 else {
    ScrollableCursorPolicy policy=new ScrollableCursorPolicy();
    if (!TYPE_SCROLL_INSENSITIVE_isSupported) {
      policy.setResultSetType(ScrollableCursorPolicy.TYPE_SCROLL_SENSITIVE);
    }
    if (!CONCUR_UPDATABLE_isSupported) {
      policy.setResultSetConcurrency(ScrollableCursorPolicy.CONCUR_READ_ONLY);
    }
    policy.setPageSize(10);
    query.useScrollableCursor(policy);
  }
  ScrollableCursor cursor=(ScrollableCursor)getSession().executeQuery(query);
  while (cursor.hasMoreElements()) {
    this.cursoredQueryObjects.addElement(cursor.nextElement());
  }
}
Program: 68396
Project: 68396
Buggy source:
protected void setup(){
  if (getSession().getPlatform().isAccess() || getSession().getPlatform().isTimesTen()) {
    throw new TestWarningException("String_Node_Str");
  }
  if (getSession().getPlatform().isDB2()) {
    throw new TestWarningException("String_Node_Str" + Helper.cr() + "String_Node_Str");
  }
  this.cursoredQueryObjects=new Vector();
  getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
}

Fixed version (ground truth):
protected void setup(){
  if (getSession().getPlatform().isAccess() || getSession().getPlatform().isTimesTen()) {
    throw new TestWarningException("String_Node_Str");
  }
  if (getSession().getPlatform().isDB2()) {
    throw new TestWarningException("String_Node_Str" + Helper.cr() + "String_Node_Str");
  }
  TYPE_SCROLL_INSENSITIVE_isSupported=true;
  CONCUR_UPDATABLE_isSupported=true;
  if (getSession().getPlatform().isSQLServer()) {
    TYPE_SCROLL_INSENSITIVE_isSupported=false;
    CONCUR_UPDATABLE_isSupported=false;
  }
  this.cursoredQueryObjects=new Vector();
  getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
}
Program: 68397
Project: 68397
Buggy source:
/** 
 * Test the join-subclasses query feature.
 */
public TestCase buildJoinSubclassesQueryTest(){
  TestCase test=new TestCase(){
    public void test(){
      UnitOfWork uow=getSession().acquireUnitOfWork();
      ReadAllQuery query=new ReadAllQuery(Project.class);
      query.useScrollableCursor();
      query.setShouldOuterJoinSubclasses(true);
      Cursor result=(Cursor)uow.executeQuery(query);
      result.nextElement();
      result.close();
    }
  }
;
  test.setName("String_Node_Str");
  return test;
}

Fixed version (ground truth):
/** 
 * Test the join-subclasses query feature.
 */
public TestCase buildJoinSubclassesQueryTest(){
  TestCase test=new TestCase(){
    public void test(){
      UnitOfWork uow=getSession().acquireUnitOfWork();
      ReadAllQuery query=new ReadAllQuery(Project.class);
      boolean TYPE_SCROLL_INSENSITIVE_isSupported=true;
      boolean CONCUR_UPDATABLE_isSupported=true;
      if (getSession().getPlatform().isSQLServer()) {
        TYPE_SCROLL_INSENSITIVE_isSupported=false;
        CONCUR_UPDATABLE_isSupported=false;
      }
      if (TYPE_SCROLL_INSENSITIVE_isSupported && CONCUR_UPDATABLE_isSupported) {
        query.useScrollableCursor();
      }
 else {
        ScrollableCursorPolicy policy=new ScrollableCursorPolicy();
        if (!TYPE_SCROLL_INSENSITIVE_isSupported) {
          policy.setResultSetType(ScrollableCursorPolicy.TYPE_SCROLL_SENSITIVE);
        }
        if (!CONCUR_UPDATABLE_isSupported) {
          policy.setResultSetConcurrency(ScrollableCursorPolicy.CONCUR_READ_ONLY);
        }
        policy.setPageSize(10);
        query.useScrollableCursor(policy);
      }
      query.setShouldOuterJoinSubclasses(true);
      Cursor result=(Cursor)uow.executeQuery(query);
      result.nextElement();
      result.close();
    }
  }
;
  test.setName("String_Node_Str");
  return test;
}
Program: 68398
Project: 68398
Buggy source:
public void test(){
  ReadAllQuery query=new ReadAllQuery();
  query.setReferenceClass(Employee.class);
  ExpressionBuilder builder=new ExpressionBuilder();
  Expression exp=builder.get("String_Node_Str").like("String_Node_Str");
  query.setSelectionCriteria(exp);
  query.useScrollableCursor();
  employeeStream=(ScrollableCursor)getSession().executeQuery(query);
}

Fixed version (ground truth):
public void test(){
  ReadAllQuery query=new ReadAllQuery();
  query.setReferenceClass(Employee.class);
  ExpressionBuilder builder=new ExpressionBuilder();
  Expression exp=builder.get("String_Node_Str").like("String_Node_Str");
  query.setSelectionCriteria(exp);
  if (TYPE_SCROLL_INSENSITIVE_isSupported && CONCUR_UPDATABLE_isSupported) {
    query.useScrollableCursor();
  }
 else {
    ScrollableCursorPolicy policy=new ScrollableCursorPolicy();
    if (!TYPE_SCROLL_INSENSITIVE_isSupported) {
      policy.setResultSetType(ScrollableCursorPolicy.TYPE_SCROLL_SENSITIVE);
    }
    if (!CONCUR_UPDATABLE_isSupported) {
      policy.setResultSetConcurrency(ScrollableCursorPolicy.CONCUR_READ_ONLY);
    }
    policy.setPageSize(10);
    query.useScrollableCursor(policy);
  }
  employeeStream=(ScrollableCursor)getSession().executeQuery(query);
}
Program: 68399
Project: 68399
Buggy source:
protected void setup(){
  if (getSession().getPlatform().isDB2() || getSession().getPlatform().isAccess() || getSession().getPlatform().isTimesTen()) {
    throw new TestWarningException("String_Node_Str");
  }
}

Fixed version (ground truth):
protected void setup(){
  if (getSession().getPlatform().isDB2() || getSession().getPlatform().isAccess() || getSession().getPlatform().isTimesTen()) {
    throw new TestWarningException("String_Node_Str");
  }
  TYPE_SCROLL_INSENSITIVE_isSupported=true;
  CONCUR_UPDATABLE_isSupported=true;
  if (getSession().getPlatform().isSQLServer()) {
    TYPE_SCROLL_INSENSITIVE_isSupported=false;
    CONCUR_UPDATABLE_isSupported=false;
  }
}
Program: 68400
Project: 68400
Buggy source:
public void test(){
  ReadAllQuery query=new ReadAllQuery();
  ScrollableCursor cursor=null;
  try {
    query.setReferenceClass(Employee.class);
    query.useScrollableCursor(2);
    if (configuration != null) {
      ExpressionBuilder builder=new ExpressionBuilder();
      Expression exp=builder.get("String_Node_Str").greaterThan(50000);
      query.setSelectionCriteria(exp);
      query.conformResultsInUnitOfWork();
    }
    cursor=(ScrollableCursor)getSession().executeQuery(query);
    try {
      int totalItems=0;
      while (cursor.hasNext()) {
        readWithNext.addElement(cursor.next());
        totalItems++;
      }
      while (cursor.hasPrevious()) {
        readWithPrevious.addElement(cursor.previous());
        totalItems--;
      }
      cursorSuccess=(totalItems == 0);
      int size=readWithPrevious.size();
      for (int i=0; i < readWithNext.size(); i++) {
        cursorSuccess=(cursorSuccess && (readWithNext.elementAt(i) == readWithPrevious.elementAt((size - 1) - i)));
      }
    }
 catch (    org.eclipse.persistence.exceptions.QueryException ex) {
      caughtException=ex;
    }
  }
  finally {
    if (cursor != null) {
      cursor.close();
    }
  }
}

Fixed version (ground truth):
public void test(){
  ReadAllQuery query=new ReadAllQuery();
  ScrollableCursor cursor=null;
  try {
    query.setReferenceClass(Employee.class);
    if (TYPE_SCROLL_INSENSITIVE_isSupported && CONCUR_UPDATABLE_isSupported) {
      query.useScrollableCursor(2);
    }
 else {
      ScrollableCursorPolicy policy=new ScrollableCursorPolicy();
      if (!TYPE_SCROLL_INSENSITIVE_isSupported) {
        policy.setResultSetType(ScrollableCursorPolicy.TYPE_SCROLL_SENSITIVE);
      }
      if (!CONCUR_UPDATABLE_isSupported) {
        policy.setResultSetConcurrency(ScrollableCursorPolicy.CONCUR_READ_ONLY);
      }
      policy.setPageSize(2);
      query.useScrollableCursor(policy);
    }
    if (configuration != null) {
      ExpressionBuilder builder=new ExpressionBuilder();
      Expression exp=builder.get("String_Node_Str").greaterThan(50000);
      query.setSelectionCriteria(exp);
      query.conformResultsInUnitOfWork();
    }
    cursor=(ScrollableCursor)getSession().executeQuery(query);
    try {
      int totalItems=0;
      while (cursor.hasNext()) {
        readWithNext.addElement(cursor.next());
        totalItems++;
      }
      while (cursor.hasPrevious()) {
        readWithPrevious.addElement(cursor.previous());
        totalItems--;
      }
      cursorSuccess=(totalItems == 0);
      int size=readWithPrevious.size();
      for (int i=0; i < readWithNext.size(); i++) {
        cursorSuccess=(cursorSuccess && (readWithNext.elementAt(i) == readWithPrevious.elementAt((size - 1) - i)));
      }
    }
 catch (    org.eclipse.persistence.exceptions.QueryException ex) {
      caughtException=ex;
    }
  }
  finally {
    if (cursor != null) {
      cursor.close();
    }
  }
}
Program: 68401
Project: 68401
Buggy source:
protected void setup(){
  if (getSession().getPlatform().isDB2() || getSession().getPlatform().isAccess() || getSession().getPlatform().isTimesTen()) {
    throw new TestWarningException("String_Node_Str");
  }
  readWithNext=new Vector();
  readWithPrevious=new Vector();
  getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
  if (configuration != null) {
    configuration.setup(getSession());
    getExecutor().setSession(configuration.getUnitOfWork());
  }
}

Fixed version (ground truth):
protected void setup(){
  if (getSession().getPlatform().isDB2() || getSession().getPlatform().isAccess() || getSession().getPlatform().isTimesTen()) {
    throw new TestWarningException("String_Node_Str");
  }
  TYPE_SCROLL_INSENSITIVE_isSupported=true;
  CONCUR_UPDATABLE_isSupported=true;
  if (getSession().getPlatform().isSQLServer()) {
    TYPE_SCROLL_INSENSITIVE_isSupported=false;
    CONCUR_UPDATABLE_isSupported=false;
  }
  readWithNext=new Vector();
  readWithPrevious=new Vector();
  getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
  if (configuration != null) {
    configuration.setup(getSession());
    getExecutor().setSession(configuration.getUnitOfWork());
  }
}
Program: 68403
Project: 68403
Buggy source:
protected void setup(){
  if (getSession().getPlatform().isDB2() || getSession().getPlatform().isAccess() || getSession().getPlatform().isTimesTen()) {
    throw new TestWarningException("String_Node_Str");
  }
  if (getSession().getPlatform().isMySQL()) {
    throw new TestWarningException("String_Node_Str");
  }
  getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
  if (configuration != null) {
    configuration.setup(getSession());
    getExecutor().setSession(configuration.getUnitOfWork());
  }
}

Fixed version (ground truth):
protected void setup(){
  if (getSession().getPlatform().isDB2() || getSession().getPlatform().isAccess() || getSession().getPlatform().isTimesTen()) {
    throw new TestWarningException("String_Node_Str");
  }
  if (getSession().getPlatform().isMySQL()) {
    throw new TestWarningException("String_Node_Str");
  }
  TYPE_SCROLL_INSENSITIVE_isSupported=true;
  CONCUR_UPDATABLE_isSupported=true;
  if (getSession().getPlatform().isSQLServer()) {
    TYPE_SCROLL_INSENSITIVE_isSupported=false;
    CONCUR_UPDATABLE_isSupported=false;
  }
  getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
  if (configuration != null) {
    configuration.setup(getSession());
    getExecutor().setSession(configuration.getUnitOfWork());
  }
}
Program: 68404
Project: 68404
Buggy source:
public void test(){
  ReadAllQuery query1=new ReadAllQuery();
  query1.setReferenceClass(Employee.class);
  Vector resultSet=null;
  ReadAllQuery query2=new ReadAllQuery();
  query2.setReferenceClass(Employee.class);
  query2.useScrollableCursor();
  ScrollableCursor cursor=null;
  resultSet=(Vector)getSession().executeQuery(query1);
  try {
    cursor=(ScrollableCursor)getSession().executeQuery(query2);
    size=cursor.size();
  }
 catch (  org.eclipse.persistence.exceptions.DatabaseException dbe) {
    caughtException=dbe;
  }
 finally {
    if (cursor != null) {
      cursor.close();
    }
  }
}

Fixed version (ground truth):
public void test(){
  ReadAllQuery query1=new ReadAllQuery();
  query1.setReferenceClass(Employee.class);
  Vector resultSet=null;
  ReadAllQuery query2=new ReadAllQuery();
  query2.setReferenceClass(Employee.class);
  if (TYPE_SCROLL_INSENSITIVE_isSupported && CONCUR_UPDATABLE_isSupported) {
    query2.useScrollableCursor();
  }
 else {
    ScrollableCursorPolicy policy=new ScrollableCursorPolicy();
    if (!TYPE_SCROLL_INSENSITIVE_isSupported) {
      policy.setResultSetType(ScrollableCursorPolicy.TYPE_SCROLL_SENSITIVE);
    }
    if (!CONCUR_UPDATABLE_isSupported) {
      policy.setResultSetConcurrency(ScrollableCursorPolicy.CONCUR_READ_ONLY);
    }
    policy.setPageSize(10);
    query2.useScrollableCursor(policy);
  }
  ScrollableCursor cursor=null;
  resultSet=(Vector)getSession().executeQuery(query1);
  try {
    cursor=(ScrollableCursor)getSession().executeQuery(query2);
    size=cursor.size();
  }
 catch (  org.eclipse.persistence.exceptions.DatabaseException dbe) {
    caughtException=dbe;
  }
 finally {
    if (cursor != null) {
      cursor.close();
    }
  }
}
Program: 68405
Project: 68405
Buggy source:
protected void setup(){
  this.origionalBindingState=this.getSession().getPlatform().shouldBindAllParameters();
  if (getSession().getPlatform().isDB2() || getSession().getPlatform().isAccess() || getSession().getPlatform().isTimesTen()) {
    throw new TestWarningException("String_Node_Str");
  }
  this.origionalStatementCachingState=this.getSession().getPlatform().shouldCacheAllStatements();
  this.getSession().getPlatform().setShouldBindAllParameters(true);
  this.getSession().getPlatform().setShouldCacheAllStatements(true);
}

Fixed version (ground truth):
protected void setup(){
  this.origionalBindingState=this.getSession().getPlatform().shouldBindAllParameters();
  if (getSession().getPlatform().isDB2() || getSession().getPlatform().isAccess() || getSession().getPlatform().isTimesTen()) {
    throw new TestWarningException("String_Node_Str");
  }
  TYPE_SCROLL_INSENSITIVE_isSupported=true;
  CONCUR_UPDATABLE_isSupported=true;
  if (getSession().getPlatform().isSQLServer()) {
    TYPE_SCROLL_INSENSITIVE_isSupported=false;
    CONCUR_UPDATABLE_isSupported=false;
  }
  this.origionalStatementCachingState=this.getSession().getPlatform().shouldCacheAllStatements();
  this.getSession().getPlatform().setShouldBindAllParameters(true);
  this.getSession().getPlatform().setShouldCacheAllStatements(true);
}
Program: 68406
Project: 68406
Buggy source:
public void testQueryTimeoutReset(Session session){
  boolean query1TimedOut=false;
  boolean query2TimedOut=false;
  String sql;
  if (getSession().getLogin().getDatasourcePlatform().isDB2() || getSession().getLogin().getDatasourcePlatform().isMySQL()) {
    sql="String_Node_Str";
  }
 else   if (getSession().getLogin().getDatasourcePlatform().isSybase()) {
    sql="String_Node_Str";
  }
 else {
    sql="String_Node_Str";
  }
  try {
    DataReadQuery query=new DataReadQuery();
    query.setSQLString(sql);
    query.setQueryTimeout(1);
    session.executeQuery(query);
  }
 catch (  Exception e) {
    if (e instanceof DatabaseException) {
      query1TimedOut=true;
    }
  }
  try {
    DataReadQuery query=new DataReadQuery();
    query.setSQLString(sql);
    session.executeQuery(query);
  }
 catch (  Exception e) {
    if (e instanceof DatabaseException) {
      query2TimedOut=true;
    }
  }
  if (query2TimedOut == true) {
    throw new TestErrorException("String_Node_Str");
  }
}

Fixed version (ground truth):
public void testQueryTimeoutReset(Session session){
  boolean query1TimedOut=false;
  boolean query2TimedOut=false;
  String sql;
  if (getSession().getLogin().getDatasourcePlatform().isDB2() || getSession().getLogin().getDatasourcePlatform().isMySQL()) {
    sql="String_Node_Str";
  }
 else   if (getSession().getLogin().getDatasourcePlatform().isSybase() || getSession().getLogin().getDatasourcePlatform().isSQLServer()) {
    sql="String_Node_Str";
  }
 else {
    sql="String_Node_Str";
  }
  try {
    DataReadQuery query=new DataReadQuery();
    query.setSQLString(sql);
    query.setQueryTimeout(1);
    session.executeQuery(query);
  }
 catch (  Exception e) {
    if (e instanceof DatabaseException) {
      query1TimedOut=true;
    }
  }
  try {
    DataReadQuery query=new DataReadQuery();
    query.setSQLString(sql);
    session.executeQuery(query);
  }
 catch (  Exception e) {
    if (e instanceof DatabaseException) {
      query2TimedOut=true;
    }
  }
  if (query2TimedOut == true) {
    throw new TestErrorException("String_Node_Str");
  }
}