nus-yam/ex-repair huggingface dataset:
Program: 66446
Project: 66446
Buggy source:
/** 
 * Tests XmlDirectMapping configuration via eclipselink-oxm.xml. Here a marshal operation is performed. Utilizes xml-value. xml-attribute and xml-element are tested above. Positive test.
 */
public void testDirectMappingXmlValueMarshal(){
  try {
    super.setUp();
  }
 catch (  Exception e) {
    e.printStackTrace();
    fail("String_Node_Str");
  }
  JAXBContext jCtx=null;
  try {
    jCtx=createContext(new Class[]{Price.class},CONTEXT_PATH,PATH + "String_Node_Str");
  }
 catch (  JAXBException e) {
    e.printStackTrace();
    fail("String_Node_Str");
  }
  String src=PATH + "String_Node_Str";
  Document testDoc=parser.newDocument();
  Document ctrlDoc=parser.newDocument();
  try {
    ctrlDoc=getControlDocument(src);
  }
 catch (  Exception e) {
    e.printStackTrace();
    fail("String_Node_Str" + src + "String_Node_Str");
  }
  Marshaller marshaller=jCtx.createMarshaller();
  try {
    Price ctrlPrice=getControlPriceObject();
    marshaller.marshal(ctrlPrice,testDoc);
    assertTrue("String_Node_Str",compareDocuments(ctrlDoc,testDoc));
  }
 catch (  JAXBException e) {
    e.printStackTrace();
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Tests XmlDirectMapping configuration via eclipselink-oxm.xml. Here a marshal operation is performed. Utilizes xml-value. xml-attribute and xml-element are tested above. Positive test.
 */
public void testDirectMappingXmlValueMarshal(){
  JAXBContext jCtx=null;
  try {
    jCtx=createContext(new Class[]{Price.class},CONTEXT_PATH,PATH + "String_Node_Str");
  }
 catch (  JAXBException e) {
    e.printStackTrace();
    fail("String_Node_Str");
  }
  String src=PATH + "String_Node_Str";
  Document testDoc=parser.newDocument();
  Document ctrlDoc=parser.newDocument();
  try {
    ctrlDoc=getControlDocument(src);
  }
 catch (  Exception e) {
    e.printStackTrace();
    fail("String_Node_Str" + src + "String_Node_Str");
  }
  Marshaller marshaller=jCtx.createMarshaller();
  try {
    Price ctrlPrice=getControlPriceObject();
    marshaller.marshal(ctrlPrice,testDoc);
    assertTrue("String_Node_Str",compareDocuments(ctrlDoc,testDoc));
  }
 catch (  JAXBException e) {
    e.printStackTrace();
    fail("String_Node_Str");
  }
}
Program: 66447
Project: 66447
Buggy source:
public void testVehiclesSchemaGen(){
  try {
    super.setUp();
    String metadataFile=PATH + "String_Node_Str";
    MySchemaOutputResolver oResolver=new MySchemaOutputResolver();
    oResolver=generateSchemaWithFileName(new Class[]{Car.class,Truck.class},CONTEXT_PATH,metadataFile,2);
    String controlSchema=PATH + "String_Node_Str";
    compareSchemas(oResolver.schemaFiles.get(EMPTY_NAMESPACE),new File(controlSchema));
  }
 catch (  Exception e) {
    fail("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
public void testVehiclesSchemaGen(){
  try {
    String metadataFile=PATH + "String_Node_Str";
    MySchemaOutputResolver oResolver=new MySchemaOutputResolver();
    oResolver=generateSchemaWithFileName(new Class[]{Car.class,Truck.class},CONTEXT_PATH,metadataFile,2);
    String controlSchema=PATH + "String_Node_Str";
    compareSchemas(oResolver.schemaFiles.get(EMPTY_NAMESPACE),new File(controlSchema));
  }
 catch (  Exception e) {
    fail("String_Node_Str" + e.getMessage());
  }
}
Program: 66448
Project: 66448
Buggy source:
/** 
 * Inits the DDL generation fields. Currently equivalent to the defaults from the EJB 3.0 spec.
 */
public void initDDLFields(){
  scale=0;
  length=255;
  precision=0;
  isUnique=false;
  isNullable=true;
  isUpdatable=true;
  isInsertable=true;
  columnDefinition="String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Inits the DDL generation fields with our defaults. Note: we used to  initialize the length to the JPA default of 255 but since this default  value should only apply for string fields we set it to 0 to indicate that it was not specified and rely on the default (255) to come from individual platforms.
 */
public void initDDLFields(){
  scale=0;
  length=0;
  precision=0;
  isUnique=false;
  isNullable=true;
  isUpdatable=true;
  isInsertable=true;
  columnDefinition="String_Node_Str";
}
Program: 66464
Project: 66464
Buggy source:
/** 
 * INTERNAL:
 */
public DatabaseField getDatabaseField(){
  DatabaseField field=super.getDatabaseField();
  field.setUnique(m_unique == null ? false : m_unique.booleanValue());
  field.setScale(m_scale == null ? 0 : m_scale.intValue());
  field.setLength(m_length == null ? 255 : m_length.intValue());
  field.setPrecision(m_precision == null ? 0 : m_precision.intValue());
  field.setTableName(m_table == null ? "String_Node_Str" : m_table);
  return field;
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public DatabaseField getDatabaseField(){
  DatabaseField field=super.getDatabaseField();
  field.setUnique(m_unique == null ? false : m_unique.booleanValue());
  field.setScale(m_scale == null ? 0 : m_scale.intValue());
  field.setLength(m_length == null ? 0 : m_length.intValue());
  field.setPrecision(m_precision == null ? 0 : m_precision.intValue());
  field.setTableName(m_table == null ? "String_Node_Str" : m_table);
  return field;
}
Program: 66466
Project: 66466
Buggy source:
public static void main(String[] args) throws Throwable {
  Listener listener=new Listener();
  int compileSuccess=-1;
  try {
    compileSuccess=Driver.run(args,listener);
  }
 catch (  BadCommandLineException e) {
    if (e.getMessage() != null) {
      System.out.println(e.getMessage());
      System.out.println();
    }
    Driver.usage(e.getOptions(),false);
    System.exit(1);
  }
  if (compileSuccess == 0) {
    String destDir="String_Node_Str";
    for (int i=0; i < args.length; i++) {
      if (args[i].equals("String_Node_Str")) {
        destDir=args[i + 1];
        break;
      }
    }
    File jaxbPropsFile=new File(destDir + File.separator + listener.getGeneratedPackagePath(),"String_Node_Str");
    FileWriter writer=new FileWriter(jaxbPropsFile);
    writer.write("String_Node_Str");
    listener.generatedFile(listener.getGeneratedPackagePath() + File.separator + "String_Node_Str",0,0);
    writer.close();
  }
  System.exit(compileSuccess);
}

Fixed version (ground truth):
public static void main(String[] args) throws Throwable {
  Listener listener=new Listener();
  int compileSuccess=-1;
  String[] arguments=args;
  System.out.println("String_Node_Str" + args);
  if (args[0].equals("String_Node_Str")) {
    arguments=new String[args.length - 1];
    for (int i=1; i < args.length; i++) {
      arguments[i - 1]=args[i];
    }
  }
  System.out.println("String_Node_Str" + arguments);
  try {
    compileSuccess=Driver.run(arguments,listener);
  }
 catch (  BadCommandLineException e) {
    if (e.getMessage() != null) {
      System.out.println(e.getMessage());
      System.out.println();
    }
    Driver.usage(e.getOptions(),false);
    System.exit(1);
  }
  if (compileSuccess == 0) {
    String destDir="String_Node_Str";
    for (int i=0; i < args.length; i++) {
      if (args[i].equals("String_Node_Str")) {
        destDir=args[i + 1];
        break;
      }
    }
    if (listener.getGeneratedPackagePath() != null) {
      File jaxbPropsFile=new File(destDir + File.separator + listener.getGeneratedPackagePath(),"String_Node_Str");
      FileWriter writer=new FileWriter(jaxbPropsFile);
      writer.write("String_Node_Str");
      listener.generatedFile(listener.getGeneratedPackagePath() + File.separator + "String_Node_Str",0,0);
      writer.close();
    }
  }
  System.exit(compileSuccess);
}
Program: 66467
Project: 66467
Buggy source:
public URL getURL(){
  return loader.getResource(this.getResource());
}

Fixed version (ground truth):
public URL getURL(){
  if (null == loader) {
    return Thread.currentThread().getContextClassLoader().getResource(this.getResource());
  }
  return loader.getResource(this.getResource());
}
Program: 66468
Project: 66468
Buggy source:
public void testValidCar() throws Exception {
  XMLDescriptor carDesc=(XMLDescriptor)project.getDescriptors().get(Car.class);
  carDesc.setSchemaReference(schemaRef);
  Car car=new Car();
  car.setLicense("String_Node_Str");
  assertTrue("String_Node_Str",xmlValidator.validateRoot(car));
}

Fixed version (ground truth):
public void testValidCar() throws Exception {
  Car car=new Car();
  car.setLicense("String_Node_Str");
  assertTrue("String_Node_Str",xmlValidator.validateRoot(car));
}
Program: 66469
Project: 66469
Buggy source:
public void testDescriptorWithNoSchemaReference() throws Exception {
  Car car=new Car();
  car.setLicense("String_Node_Str");
  try {
    xmlValidator.validateRoot(car);
  }
 catch (  XMLMarshalException ex) {
    assertTrue("String_Node_Str",ex.getErrorCode() == XMLMarshalException.SCHEMA_REFERENCE_NOT_SET);
    return;
  }
  assertTrue("String_Node_Str",false);
}

Fixed version (ground truth):
public void testDescriptorWithNoSchemaReference() throws Exception {
  ((XMLDescriptor)project.getClassDescriptor(Car.class)).setSchemaReference(null);
  Car car=new Car();
  car.setLicense("String_Node_Str");
  try {
    xmlValidator.validateRoot(car);
  }
 catch (  XMLMarshalException ex) {
    assertTrue("String_Node_Str",ex.getErrorCode() == XMLMarshalException.SCHEMA_REFERENCE_NOT_SET);
    return;
  }
  assertTrue("String_Node_Str",false);
}
Program: 66470
Project: 66470
Buggy source:
public void setUp() throws Exception {
  schemaRef=new XMLSchemaClassPathReference("String_Node_Str");
  project=new XMLMarshallerCarProject();
  xmlContext=new XMLContext(project);
  xmlValidator=xmlContext.createValidator();
}

Fixed version (ground truth):
public void setUp() throws Exception {
  project=new XMLMarshallerCarProject();
  xmlContext=new XMLContext(project);
  xmlValidator=xmlContext.createValidator();
}
Program: 66471
Project: 66471
Buggy source:
public void testErrorHandler() throws Exception {
  XMLDescriptor carDesc=(XMLDescriptor)project.getDescriptors().get(Car.class);
  carDesc.setSchemaReference(schemaRef);
  ErrorHandler errorHandler=new IgnoreAllErrorHandler();
  xmlValidator.setErrorHandler(errorHandler);
  Car car=new Car();
  car.setLicense("String_Node_Str");
  assertTrue("String_Node_Str",xmlValidator.validateRoot(car));
}

Fixed version (ground truth):
public void testErrorHandler() throws Exception {
  ErrorHandler errorHandler=new IgnoreAllErrorHandler();
  xmlValidator.setErrorHandler(errorHandler);
  Car car=new Car();
  car.setLicense("String_Node_Str");
  assertTrue("String_Node_Str",xmlValidator.validateRoot(car));
}
Program: 66472
Project: 66472
Buggy source:
public void testInvalidCar() throws Exception {
  XMLDescriptor carDesc=(XMLDescriptor)project.getDescriptors().get(Car.class);
  carDesc.setSchemaReference(schemaRef);
  Car car=new Car();
  car.setLicense("String_Node_Str");
  assertFalse("String_Node_Str",xmlValidator.validateRoot(car));
}

Fixed version (ground truth):
public void testInvalidCar() throws Exception {
  Car car=new Car();
  car.setLicense("String_Node_Str");
  assertFalse("String_Node_Str",xmlValidator.validateRoot(car));
}
Program: 66473
Project: 66473
Buggy source:
public Object valueFromRow(AbstractRecord row,JoinedAttributeManager joinManager,ObjectBuildingQuery query,AbstractSession executionSession){
  Object value=((DOMRecord)row).getIndicatingNoEntry(this.getField(),true);
  if (value instanceof Element) {
    XMLPlatformFactory.getInstance().getXMLPlatform().namespaceQualifyFragment((Element)value);
  }
  return value;
}

Fixed version (ground truth):
public Object valueFromRow(AbstractRecord row,JoinedAttributeManager joinManager,ObjectBuildingQuery query,AbstractSession executionSession){
  DOMRecord domRecord=(DOMRecord)row;
  Object value=domRecord.getIndicatingNoEntry(this.getField(),true);
  if (value == domRecord) {
    value=domRecord.getDOM();
  }
  if (value instanceof Element) {
    XMLPlatformFactory.getInstance().getXMLPlatform().namespaceQualifyFragment((Element)value);
  }
  return value;
}
Program: 66474
Project: 66474
Buggy source:
/** 
 * Receive notification of a node.
 * @param node The Node to be added to the document
 * @param namespaceResolver The NamespaceResolver can be used to resolve thenamespace URI/prefix of the node
 */
public void node(Node node,NamespaceResolver namespaceResolver){
  if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
    Attr attr=(Attr)node;
    String resolverPfx=null;
    if (namespaceResolver != null) {
      resolverPfx=namespaceResolver.resolveNamespaceURI(attr.getNamespaceURI());
    }
    if (resolverPfx != null) {
      attribute(attr.getNamespaceURI(),XMLConstants.EMPTY_STRING,resolverPfx + XMLConstants.COLON + attr.getLocalName(),attr.getNodeValue());
    }
 else {
      attribute(attr.getNamespaceURI(),XMLConstants.EMPTY_STRING,attr.getName(),attr.getNodeValue());
      if (attr.getNamespaceURI() != null) {
        attribute(XMLConstants.XMLNS_URL,XMLConstants.EMPTY_STRING,XMLConstants.XMLNS + XMLConstants.COLON + attr.getPrefix(),attr.getNamespaceURI());
      }
    }
  }
 else {
    try {
      FormattedOutputStreamRecordContentHandler handler=new FormattedOutputStreamRecordContentHandler();
      XMLFragmentReader xfragReader=new XMLFragmentReader(namespaceResolver);
      xfragReader.setContentHandler(handler);
      xfragReader.setProperty("String_Node_Str",handler);
      xfragReader.parse(node);
    }
 catch (    SAXException sex) {
      throw XMLMarshalException.marshalException(sex);
    }
  }
}

Fixed version (ground truth):
/** 
 * Receive notification of a node.
 * @param node The Node to be added to the document
 * @param namespaceResolver The NamespaceResolver can be used to resolve thenamespace URI/prefix of the node
 */
public void node(Node node,NamespaceResolver namespaceResolver){
  if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
    Attr attr=(Attr)node;
    String resolverPfx=null;
    if (namespaceResolver != null) {
      resolverPfx=namespaceResolver.resolveNamespaceURI(attr.getNamespaceURI());
    }
    if (resolverPfx != null) {
      attribute(attr.getNamespaceURI(),XMLConstants.EMPTY_STRING,resolverPfx + XMLConstants.COLON + attr.getLocalName(),attr.getNodeValue());
    }
 else {
      attribute(attr.getNamespaceURI(),XMLConstants.EMPTY_STRING,attr.getName(),attr.getNodeValue());
      if (attr.getNamespaceURI() != null) {
        attribute(XMLConstants.XMLNS_URL,XMLConstants.EMPTY_STRING,XMLConstants.XMLNS + XMLConstants.COLON + attr.getPrefix(),attr.getNamespaceURI());
      }
    }
  }
 else   if (node.getNodeType() == Node.TEXT_NODE) {
    characters(node.getNodeValue());
  }
 else {
    try {
      FormattedOutputStreamRecordContentHandler handler=new FormattedOutputStreamRecordContentHandler();
      XMLFragmentReader xfragReader=new XMLFragmentReader(namespaceResolver);
      xfragReader.setContentHandler(handler);
      xfragReader.setProperty("String_Node_Str",handler);
      xfragReader.parse(node);
    }
 catch (    SAXException sex) {
      throw XMLMarshalException.marshalException(sex);
    }
  }
}
Program: 66475
Project: 66475
Buggy source:
/** 
 * Receive notification of a node.
 * @param node The Node to be added to the document
 * @param namespaceResolver The NamespaceResolver can be used to resolve thenamespace URI/prefix of the node
 */
public void node(Node node,NamespaceResolver namespaceResolver){
  if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
    Attr attr=(Attr)node;
    String resolverPfx=null;
    if (namespaceResolver != null) {
      resolverPfx=namespaceResolver.resolveNamespaceURI(attr.getNamespaceURI());
    }
    if (resolverPfx != null) {
      attribute(attr.getNamespaceURI(),XMLConstants.EMPTY_STRING,resolverPfx + XMLConstants.COLON + attr.getLocalName(),attr.getNodeValue());
    }
 else {
      attribute(attr.getNamespaceURI(),XMLConstants.EMPTY_STRING,attr.getName(),attr.getNodeValue());
      if (attr.getNamespaceURI() != null) {
        attribute(XMLConstants.XMLNS_URL,XMLConstants.EMPTY_STRING,XMLConstants.XMLNS + XMLConstants.COLON + attr.getPrefix(),attr.getNamespaceURI());
      }
    }
  }
 else {
    try {
      FormattedWriterRecordContentHandler wrcHandler=new FormattedWriterRecordContentHandler();
      XMLFragmentReader xfragReader=new XMLFragmentReader(namespaceResolver);
      xfragReader.setContentHandler(wrcHandler);
      xfragReader.setProperty("String_Node_Str",wrcHandler);
      xfragReader.parse(node);
    }
 catch (    SAXException sex) {
      throw XMLMarshalException.marshalException(sex);
    }
  }
}

Fixed version (ground truth):
/** 
 * Receive notification of a node.
 * @param node The Node to be added to the document
 * @param namespaceResolver The NamespaceResolver can be used to resolve thenamespace URI/prefix of the node
 */
public void node(Node node,NamespaceResolver namespaceResolver){
  if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
    Attr attr=(Attr)node;
    String resolverPfx=null;
    if (namespaceResolver != null) {
      resolverPfx=namespaceResolver.resolveNamespaceURI(attr.getNamespaceURI());
    }
    if (resolverPfx != null) {
      attribute(attr.getNamespaceURI(),XMLConstants.EMPTY_STRING,resolverPfx + XMLConstants.COLON + attr.getLocalName(),attr.getNodeValue());
    }
 else {
      attribute(attr.getNamespaceURI(),XMLConstants.EMPTY_STRING,attr.getName(),attr.getNodeValue());
      if (attr.getNamespaceURI() != null) {
        attribute(XMLConstants.XMLNS_URL,XMLConstants.EMPTY_STRING,XMLConstants.XMLNS + XMLConstants.COLON + attr.getPrefix(),attr.getNamespaceURI());
      }
    }
  }
 else   if (node.getNodeType() == Node.TEXT_NODE) {
    characters(node.getNodeValue());
  }
 else {
    try {
      FormattedWriterRecordContentHandler wrcHandler=new FormattedWriterRecordContentHandler();
      XMLFragmentReader xfragReader=new XMLFragmentReader(namespaceResolver);
      xfragReader.setContentHandler(wrcHandler);
      xfragReader.setProperty("String_Node_Str",wrcHandler);
      xfragReader.parse(node);
    }
 catch (    SAXException sex) {
      throw XMLMarshalException.marshalException(sex);
    }
  }
}
Program: 66476
Project: 66476
Buggy source:
protected void setOrAddAttributeValue(UnmarshalRecord unmarshalRecord,Object value,XPathFragment xPathFragment,Object collection){
  if (!xmlAnyCollectionMapping.usesXMLRoot()) {
    unmarshalRecord.addAttributeValue(this,value);
  }
 else {
    XMLRoot xmlRoot=new XMLRoot();
    xmlRoot.setNamespaceURI(xPathFragment.getNamespaceURI());
    xmlRoot.setSchemaType(unmarshalRecord.getTypeQName());
    xmlRoot.setLocalName(xPathFragment.getLocalName());
    xmlRoot.setObject(value);
    unmarshalRecord.addAttributeValue(this,xmlRoot);
  }
}

Fixed version (ground truth):
protected void setOrAddAttributeValue(UnmarshalRecord unmarshalRecord,Object value,XPathFragment xPathFragment,Object collection){
  if (!xmlAnyCollectionMapping.usesXMLRoot() || xPathFragment.getLocalName() == null) {
    unmarshalRecord.addAttributeValue(this,value);
  }
 else {
    XMLRoot xmlRoot=new XMLRoot();
    xmlRoot.setNamespaceURI(xPathFragment.getNamespaceURI());
    xmlRoot.setSchemaType(unmarshalRecord.getTypeQName());
    xmlRoot.setLocalName(xPathFragment.getLocalName());
    xmlRoot.setObject(value);
    unmarshalRecord.addAttributeValue(this,xmlRoot);
  }
}
Program: 66477
Project: 66477
Buggy source:
public void characters(char[] ch,int start,int length) throws SAXException {
  try {
    if (null != selfRecords) {
      for (int x=0, selfRecordsSize=selfRecords.size(); x < selfRecordsSize; x++) {
        UnmarshalRecord selfRecord=selfRecords.get(x);
        if (selfRecord != null) {
          selfRecord.characters(ch,start,length);
        }
 else {
          getFragmentBuilder().characters(ch,start,length);
        }
      }
    }
    XPathNode textNode=xPathNode.getTextNode();
    if (null == textNode) {
      textNode=xPathNode.getAnyNode();
      if (textNode != null) {
        if (0 == length) {
          return;
        }
        String tmpString=new String(ch,start,length);
        if (!textNode.isWhitespaceAware() && tmpString.trim().length() == 0) {
          return;
        }
      }
    }
    if (null != textNode) {
      xPathNode=textNode;
      unmarshalContext.characters(this);
    }
    if (null != xPathNode.getUnmarshalNodeValue()) {
      getStringBuffer().append(ch,start,length);
    }
  }
 catch (  EclipseLinkException e) {
    if (null == xmlReader.getErrorHandler()) {
      throw e;
    }
 else {
      SAXParseException saxParseException=new SAXParseException(null,null,null,0,0,e);
      xmlReader.getErrorHandler().error(saxParseException);
    }
  }
}

Fixed version (ground truth):
public void characters(char[] ch,int start,int length) throws SAXException {
  try {
    if (null != selfRecords) {
      for (int x=0, selfRecordsSize=selfRecords.size(); x < selfRecordsSize; x++) {
        UnmarshalRecord selfRecord=selfRecords.get(x);
        if (selfRecord != null) {
          selfRecord.characters(ch,start,length);
        }
 else {
          getFragmentBuilder().characters(ch,start,length);
        }
      }
    }
    XPathNode textNode=xPathNode.getTextNode();
    if (null == textNode) {
      textNode=xPathNode.getAnyNode();
      if (textNode != null) {
        xpathNodeIsMixedContent=true;
        this.xPathFragment.setLocalName(null);
        this.xPathFragment.setNamespaceURI(null);
        if (0 == length) {
          return;
        }
        String tmpString=new String(ch,start,length);
        if (!textNode.isWhitespaceAware() && tmpString.trim().length() == 0) {
          return;
        }
      }
    }
    if (null != textNode) {
      xPathNode=textNode;
      unmarshalContext.characters(this);
    }
    if (null != xPathNode.getUnmarshalNodeValue()) {
      getStringBuffer().append(ch,start,length);
    }
  }
 catch (  EclipseLinkException e) {
    if (null == xmlReader.getErrorHandler()) {
      throw e;
    }
 else {
      SAXParseException saxParseException=new SAXParseException(null,null,null,0,0,e);
      xmlReader.getErrorHandler().error(saxParseException);
    }
  }
}
Program: 66480
Project: 66480
Buggy source:
public boolean isNullCapableValue(){
  return true;
}

Fixed version (ground truth):
public boolean isNullCapableValue(){
  return xmlBinaryDataMapping.getNullPolicy().getIsSetPerformedForAbsentNode();
}
Program: 66481
Project: 66481
Buggy source:
protected void verifyDocument(XMLDocument document){
  super.verifyDocument(document);
  DataObject obj=document.getRootObject();
  String value=obj.getString("String_Node_Str");
  assertTrue("String_Node_Str" + value,value.equals(CONTROL_BASE64_VALUE));
}

Fixed version (ground truth):
protected void verifyDocument(XMLDocument document){
  super.verifyDocument(document);
  DataObject obj=document.getRootObject();
  assertTrue(obj.isSet("String_Node_Str"));
  String value=obj.getString("String_Node_Str");
  assertTrue("String_Node_Str" + value,value.equals(CONTROL_BASE64_VALUE));
}
Program: 66482
Project: 66482
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(new TestSuite(LoadWithDataHandlerGetStringTestCases.class));
  suite.addTest(new TestSuite(LoadSchemasWithImportAndInheritance.class));
  suite.addTest(new TestSuite(StringWrapperBug268335TestCases.class));
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(new TestSuite(LoadWithDataHandlerGetStringTestCases.class));
  suite.addTest(new TestSuite(LoadWithDataHandlerIsSetTestCases.class));
  suite.addTest(new TestSuite(LoadSchemasWithImportAndInheritance.class));
  suite.addTest(new TestSuite(StringWrapperBug268335TestCases.class));
  return suite;
}
Program: 66483
Project: 66483
Buggy source:
private DatabaseMapping buildXMLBinaryDataMapping(String mappingUri,MimeTypePolicy mimeTypePolicy){
  XMLBinaryDataMapping mapping=new XMLBinaryDataMapping();
  mapping.setAttributeName(getName());
  String xpath=getQualifiedXPath(mappingUri,false);
  mapping.setMimeTypePolicy(mimeTypePolicy);
  mapping.setXPath(xpath);
  ((XMLField)mapping.getField()).setSchemaType(XMLConstants.BASE_64_BINARY_QNAME);
  if (shouldAddInstanceClassConverter()) {
    InstanceClassConverter converter=new InstanceClassConverter();
    converter.setCustomClass(getType().getInstanceClass());
    mapping.setConverter(converter);
  }
  return mapping;
}

Fixed version (ground truth):
private DatabaseMapping buildXMLBinaryDataMapping(String mappingUri,MimeTypePolicy mimeTypePolicy){
  XMLBinaryDataMapping mapping=new XMLBinaryDataMapping();
  mapping.setAttributeName(getName());
  String xpath=getQualifiedXPath(mappingUri,false);
  mapping.setMimeTypePolicy(mimeTypePolicy);
  mapping.setXPath(xpath);
  ((XMLField)mapping.getField()).setSchemaType(XMLConstants.BASE_64_BINARY_QNAME);
  if (shouldAddInstanceClassConverter()) {
    InstanceClassConverter converter=new InstanceClassConverter();
    converter.setCustomClass(getType().getInstanceClass());
    mapping.setConverter(converter);
  }
  if (nullable) {
    setIsSetNillablePolicyOnMapping(mapping,propertyName);
  }
 else {
    setIsSetOptionalPolicyOnMapping(mapping,propertyName);
  }
  mapping.getNullPolicy().setNullRepresentedByEmptyNode(true);
  return mapping;
}
Program: 66484
Project: 66484
Buggy source:
/** 
 * INTERNAL:
 */
public void cdata(String value){
  if (isStartElementOpen) {
    outputStreamWrite(CLOSE_ELEMENT);
    isStartElementOpen=false;
  }
  outputStreamWrite(CR);
  outputStreamWriteTab();
  super.cdata(value);
  complexType=true;
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public void cdata(String value){
  if (isStartElementOpen) {
    outputStreamWrite(CLOSE_ELEMENT);
    isStartElementOpen=false;
  }
  super.cdata(value);
  complexType=false;
}
Program: 66485
Project: 66485
Buggy source:
/** 
 * INTERNAL:
 */
public void cdata(String value){
  try {
    if (isStartElementOpen) {
      writer.write('>');
      isStartElementOpen=false;
    }
    writer.write(Helper.cr());
    for (int x=0; x < numberOfTabs; x++) {
      writer.write(TAB);
    }
    super.cdata(value);
    complexType=true;
  }
 catch (  IOException ex) {
    throw XMLMarshalException.marshalException(ex);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public void cdata(String value){
  try {
    if (isStartElementOpen) {
      writer.write('>');
      isStartElementOpen=false;
    }
    super.cdata(value);
    complexType=false;
  }
 catch (  IOException ex) {
    throw XMLMarshalException.marshalException(ex);
  }
}
Program: 66486
Project: 66486
Buggy source:
public String getNamespaceURI(String prefix){
  if (null == prefix) {
    prefix=XMLConstants.EMPTY_STRING;
  }
  try {
    return xmlStreamReader.getNamespaceURI(prefix);
  }
 catch (  IllegalStateException e) {
    return null;
  }
}

Fixed version (ground truth):
public String getNamespaceURI(String prefix){
  if (null == prefix) {
    prefix=XMLConstants.EMPTY_STRING;
  }
  try {
    String namespaceURI=xmlStreamReader.getNamespaceURI(prefix);
    if (null == namespaceURI) {
      return xmlStreamReader.getAttributeValue(XMLConstants.XMLNS_URL,prefix);
    }
    return namespaceURI;
  }
 catch (  IllegalStateException e) {
    return null;
  }
}
Program: 66487
Project: 66487
Buggy source:
/** 
 * This function is invoked by the JUnit framework before test cases are executed
 */
public void setUp(){
  try {
    super.setUp();
    String xsdString=getXSDString("String_Node_Str");
    List types=xsdHelper.define(xsdString);
    FileInputStream inStream=new FileInputStream("String_Node_Str");
    XMLDocument document=xmlHelper.load(inStream);
    root=(DataObject)document.getRootObject();
    inStream.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * This function is invoked by the JUnit framework before test cases are executed
 */
public void setUp(){
  try {
    xmlComparer=new SDOXMLComparer();
    aHelperContext=SDOHelperContext.getHelperContext();
    typeHelper=aHelperContext.getTypeHelper();
    xmlHelper=aHelperContext.getXMLHelper();
    xsdHelper=aHelperContext.getXSDHelper();
    equalityHelper=aHelperContext.getEqualityHelper();
    copyHelper=aHelperContext.getCopyHelper();
    dataFactory=aHelperContext.getDataFactory();
    dataHelper=(SDODataHelper)aHelperContext.getDataHelper();
    DocumentBuilderFactory builderFactory=DocumentBuilderFactory.newInstance();
    builderFactory.setNamespaceAware(true);
    builderFactory.setIgnoringElementContentWhitespace(true);
    try {
      parser=builderFactory.newDocumentBuilder();
    }
 catch (    Exception e) {
      fail("String_Node_Str");
      e.printStackTrace();
    }
    ((SDOTypeHelper)typeHelper).reset();
    ((SDOXMLHelper)xmlHelper).reset();
    ((SDOXSDHelper)xsdHelper).reset();
    String xsdString=getXSDString("String_Node_Str");
    List types=xsdHelper.define(xsdString);
    FileInputStream inStream=new FileInputStream("String_Node_Str");
    XMLDocument document=xmlHelper.load(inStream);
    root=(DataObject)document.getRootObject();
    inStream.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
    fail("String_Node_Str");
  }
}
Program: 66490
Project: 66490
Buggy source:
/** 
 * ADVANCED: Remove the HelperContext for the application associated with a given key, if it exists in the map.
 */
private static void resetHelperContext(Object key){
  HelperContext hCtx=helperContexts.get(key);
  if (hCtx != null) {
    helperContexts.remove(key);
  }
}

Fixed version (ground truth):
/** 
 * ADVANCED: Remove the HelperContext for the application associated with a given key, if it exists in the map.
 */
private static void resetHelperContext(Object key){
  HelperContext hCtx=helperContexts.get(key).get(GLOBAL_HELPER_IDENTIFIER);
  if (hCtx != null) {
    helperContexts.remove(key);
  }
}
Program: 66491
Project: 66491
Buggy source:
/** 
 * INTERNAL: Put a ClassLoader/HelperContext key/value pair in the Thread HelperContext  map.  If Thread.currentThread().getContextClassLoader() == key during  getHelperContext() call then the HelperContext (value) will be returned. This method will overwrite an existing entry in the map with the same ClassLoader key.
 * @param key class loader
 * @param value helper context
 */
public static void putHelperContext(ClassLoader key,HelperContext value){
  if (key == null || value == null) {
    return;
  }
  userSetHelperContexts.put(key,new WeakReference<HelperContext>(value));
}

Fixed version (ground truth):
/** 
 * Replaces the provided helper context in the map of identifiers to helper contexts for this application. ctx.getIdentifier() will be used to obtain identifier 
 */
public static void putHelperContext(HelperContext ctx){
  String identifier=((SDOHelperContext)ctx).getIdentifier();
  if (GLOBAL_HELPER_IDENTIFIER.equals(identifier)) {
    return;
  }
  getContextMap().put(identifier,ctx);
}
Program: 66492
Project: 66492
Buggy source:
/** 
 * ADVANCED Promote this helper context to be the default or global one. This will completely replace the existing default context including all types and properties defined. 
 */
public void makeDefaultContext(){
  ClassLoader contextClassLoader=Thread.currentThread().getContextClassLoader();
  Object key=getDelegateMapKey(contextClassLoader);
  helperContexts.put(key,this);
}

Fixed version (ground truth):
/** 
 * ADVANCED Promote this helper context to be the default or global one. This will completely replace the existing default context including all types and properties defined. 
 */
public void makeDefaultContext(){
  ClassLoader contextClassLoader=Thread.currentThread().getContextClassLoader();
  Object key=getDelegateMapKey(contextClassLoader);
  ConcurrentHashMap<String,HelperContext> contexts=helperContexts.get(key);
  if (contexts == null) {
    contexts=new ConcurrentHashMap<String,HelperContext>();
    ConcurrentHashMap<String,HelperContext> existingContexts=helperContexts.putIfAbsent(key,contexts);
    if (existingContexts != null) {
      contexts=existingContexts;
    }
  }
  this.identifier=GLOBAL_HELPER_IDENTIFIER;
  contexts.put(GLOBAL_HELPER_IDENTIFIER,this);
}
Program: 66493
Project: 66493
Buggy source:
/** 
 * Create a local HelperContext.  This constructor should be used in OSGi  environments.
 * @param aClassLoader This class loader will be used to find static instance classes.
 */
public SDOHelperContext(ClassLoader aClassLoader){
  super();
  initialize(aClassLoader);
}

Fixed version (ground truth):
/** 
 * Create a local HelperContext with the given identifier.  This constructor should be used in OSGi environments.
 * @param identifier The unique label for this HelperContext.
 * @param aClassLoader This class loader will be used to find static instance classes.
 */
public SDOHelperContext(String identifier,ClassLoader aClassLoader){
  super();
  this.identifier=identifier;
  initialize(aClassLoader);
}
Program: 66494
Project: 66494
Buggy source:
/** 
 * INTERNAL:  Return the helper context for a given key.  The key will either be a ClassLoader or a String (representing an application name). A new context will be created and put in the map if none exists  for the given key. The key is assumed to be non-null -  getDelegateKey should always return either a string representing the application name (for WLS) or a class loader.  This is relevant since 'putIfAbsent' will  throw a null pointer exception if the key is null.   
 */
public static HelperContext getHelperContext(){
  ClassLoader contextClassLoader=Thread.currentThread().getContextClassLoader();
  HelperContext hCtx=getHelperContext(contextClassLoader);
  if (hCtx != null) {
    return hCtx;
  }
  Object key=getDelegateMapKey(contextClassLoader);
  hCtx=helperContexts.get(key);
  if (hCtx == null) {
    hCtx=new SDOHelperContext();
    HelperContext existingCtx=helperContexts.putIfAbsent(key,hCtx);
    if (existingCtx != null) {
      hCtx=existingCtx;
    }
    if (key.getClass() == ClassConstants.STRING) {
      helperContexts.put(contextClassLoader,hCtx);
    }
    addNotificationListener(key);
  }
  return hCtx;
}

Fixed version (ground truth):
/** 
 * Return the local helper context with the given identifier, or create one if it does not already exist.
 */
public static HelperContext getHelperContext(String identifier,ClassLoader classLoader){
  ConcurrentMap<String,HelperContext> contextMap=getContextMap();
  HelperContext helperContext=contextMap.get(identifier);
  if (null == helperContext) {
    helperContext=new SDOHelperContext(identifier,classLoader);
    HelperContext existingContext=contextMap.putIfAbsent(identifier,helperContext);
    if (existingContext != null) {
      helperContext=existingContext;
    }
  }
  return helperContext;
}
Program: 66495
Project: 66495
Buggy source:
public List getNullCapableValues(){
  return this.nullCapableValues;
}

Fixed version (ground truth):
public List getNullCapableValues(){
  if (null == nullCapableValues) {
    this.nullCapableValues=new ArrayList<NullCapableValue>();
  }
  return this.nullCapableValues;
}
Program: 66498
Project: 66498
Buggy source:
public static TableDefinition buildDEPTTable(){
  TableDefinition table=new TableDefinition();
  table.setName("String_Node_Str");
  FieldDefinition fieldID=new FieldDefinition();
  fieldID.setName("String_Node_Str");
  fieldID.setTypeName("String_Node_Str");
  fieldID.setSize(15);
  fieldID.setSubSize(0);
  fieldID.setIsPrimaryKey(true);
  fieldID.setIsIdentity(true);
  fieldID.setUnique(false);
  fieldID.setShouldAllowNull(false);
  table.addField(fieldID);
  FieldDefinition fieldNAME=new FieldDefinition();
  fieldNAME.setName("String_Node_Str");
  fieldNAME.setTypeName("String_Node_Str");
  fieldNAME.setSize(60);
  fieldNAME.setSubSize(0);
  fieldNAME.setIsPrimaryKey(false);
  fieldNAME.setIsIdentity(false);
  fieldNAME.setUnique(false);
  fieldNAME.setShouldAllowNull(true);
  table.addField(fieldNAME);
  return table;
}

Fixed version (ground truth):
public static TableDefinition buildDEPTTable(){
  TableDefinition table=new TableDefinition();
  table.setName("String_Node_Str");
  FieldDefinition fieldID=new FieldDefinition();
  fieldID.setName("String_Node_Str");
  fieldID.setTypeName("String_Node_Str");
  fieldID.setSize(15);
  fieldID.setSubSize(0);
  fieldID.setIsPrimaryKey(true);
  fieldID.setIsIdentity(true);
  fieldID.setUnique(false);
  fieldID.setShouldAllowNull(false);
  table.addField(fieldID);
  FieldDefinition fieldNAME=new FieldDefinition();
  fieldNAME.setName("String_Node_Str");
  fieldNAME.setTypeName("String_Node_Str");
  fieldNAME.setSize(60);
  fieldNAME.setSubSize(0);
  fieldNAME.setIsPrimaryKey(false);
  fieldNAME.setIsIdentity(false);
  fieldNAME.setUnique(false);
  fieldNAME.setShouldAllowNull(true);
  table.addField(fieldNAME);
  FieldDefinition fieldHEAD=new FieldDefinition();
  fieldHEAD.setName("String_Node_Str");
  fieldHEAD.setTypeName("String_Node_Str");
  fieldHEAD.setSize(15);
  fieldHEAD.setSubSize(0);
  fieldHEAD.setIsPrimaryKey(false);
  fieldHEAD.setIsIdentity(false);
  fieldHEAD.setUnique(false);
  fieldHEAD.setShouldAllowNull(true);
  table.addField(fieldHEAD);
  return table;
}
Program: 66508
Project: 66508
Buggy source:
/** 
 * Test for Bug 259974 - JPQL IN function doesn't work with negative literal values This test executes a JPQL statement with an IN function with a negative literal value and ensures it successfully returns the correct value.
 */
public void simpleInNegativeTest(){
  EntityManager em=createEntityManager();
  em.getTransaction().begin();
  try {
    Employee expectedResult=new Employee();
    expectedResult.setSalary(-12345);
    em.persist(expectedResult);
    em.flush();
    clearCache();
    String ejbqlString="String_Node_Str";
    Employee result=(Employee)em.createQuery(ejbqlString).getSingleResult();
    Assert.assertTrue("String_Node_Str",comparer.compareObjects(result,expectedResult));
  }
  finally {
    em.getTransaction().rollback();
  }
}

Fixed version (ground truth):
/** 
 * Test for Bug 259974 - JPQL IN function doesn't work with negative literal values This test executes a JPQL statement with an IN function with a negative literal value and ensures it successfully returns the correct value.
 */
public void simpleInNegativeTest(){
  EntityManager em=createEntityManager();
  beginTransaction(em);
  try {
    Employee expectedResult=new Employee();
    expectedResult.setSalary(-12345);
    em.persist(expectedResult);
    em.flush();
    clearCache();
    String ejbqlString="String_Node_Str";
    Employee result=(Employee)em.createQuery(ejbqlString).getSingleResult();
    Assert.assertTrue("String_Node_Str",comparer.compareObjects(result,expectedResult));
  }
  finally {
    rollbackTransaction(em);
    closeEntityManager(em);
  }
}
Program: 66509
Project: 66509
Buggy source:
/** 
 * Attempt to return the WAS application name based on a given class loader hierarchy.  The loader hierarchy will be traversed until the application  name is successfully retrieved, or the top of the hierarchy is reached.
 * @param loader
 * @return application name if successfully retrieved (i.e. loader exists inthe hierarchy with toString containing "[app:") or null
 */
private static String getApplicationNameForWAS(ClassLoader loader){
  String applicationName=null;
  int i=0;
  while ((applicationName == null) && (i < WAS_COUNTER_LIMIT)) {
    applicationName=getApplicationNameFromWASClassLoader(loader);
    i++;
    final ClassLoader parent=loader.getParent();
    if ((parent == null) || (parent == loader)) {
      break;
    }
 else {
      loader=parent;
    }
  }
  return applicationName;
}

Fixed version (ground truth):
/** 
 * Attempt to return the WAS application name based on a given class loader hierarchy.  The loader hierarchy will be traversed until the application  name is successfully retrieved, or the top of the hierarchy is reached.
 * @param loader
 * @return application name if successfully retrieved (i.e. loader exists inthe hierarchy with toString containing "[app:") or null
 */
private static String getApplicationNameForWAS(ClassLoader loader){
  String applicationName=null;
  int i=0;
  while ((applicationName == null) && (i < COUNTER_LIMIT)) {
    applicationName=getApplicationNameFromWASClassLoader(loader);
    i++;
    final ClassLoader parent=loader.getParent();
    if ((parent == null) || (parent == loader)) {
      break;
    }
 else {
      loader=parent;
    }
  }
  return applicationName;
}
Program: 66511
Project: 66511
Buggy source:
/** 
 * INTERNAL: Converts a String which is in Base64 format to a Byte[]
 */
public byte[] convertSchemaBase64ToByteArray(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String) {
    try {
      byte[] bytes=Base64.base64Decode(((String)sourceObject).getBytes());
      return bytes;
    }
 catch (    ArrayIndexOutOfBoundsException ex) {
      StringTokenizer tokenizer=new StringTokenizer((String)sourceObject);
      StringBuilder builder=new StringBuilder();
      while (tokenizer.hasMoreTokens()) {
        builder.append(tokenizer.nextToken());
      }
      byte[] bytes=Base64.base64Decode(builder.toString().getBytes());
      return bytes;
    }
  }
  return convertObjectToByteArray(sourceObject);
}

Fixed version (ground truth):
/** 
 * INTERNAL: Converts a String which is in Base64 format to a Byte[]
 */
public byte[] convertSchemaBase64ToByteArray(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String) {
    StringTokenizer tokenizer=new StringTokenizer((String)sourceObject);
    StringBuilder builder=new StringBuilder();
    while (tokenizer.hasMoreTokens()) {
      builder.append(tokenizer.nextToken());
    }
    byte[] bytes=Base64.base64Decode(builder.toString().getBytes());
    return bytes;
  }
  return convertObjectToByteArray(sourceObject);
}
Program: 66512
Project: 66512
Buggy source:
/** 
 * INTERNAL: Converts a String which is in Base64 format to a Byte[]
 */
public byte[] convertSchemaBase64ToByteArray(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String) {
    byte[] bytes=Base64.base64Decode(((String)sourceObject).getBytes());
    return bytes;
  }
  return convertObjectToByteArray(sourceObject);
}

Fixed version (ground truth):
/** 
 * INTERNAL: Converts a String which is in Base64 format to a Byte[]
 */
public byte[] convertSchemaBase64ToByteArray(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String) {
    try {
      byte[] bytes=Base64.base64Decode(((String)sourceObject).getBytes());
      return bytes;
    }
 catch (    ArrayIndexOutOfBoundsException ex) {
      StringTokenizer tokenizer=new StringTokenizer((String)sourceObject);
      StringBuilder builder=new StringBuilder();
      while (tokenizer.hasMoreTokens()) {
        builder.append(tokenizer.nextToken());
      }
      byte[] bytes=Base64.base64Decode(builder.toString().getBytes());
      return bytes;
    }
  }
  return convertObjectToByteArray(sourceObject);
}
Program: 66513
Project: 66513
Buggy source:
public void endSelfNodeValue(UnmarshalRecord unmarshalRecord,Attributes atts){
}

Fixed version (ground truth):
public void endSelfNodeValue(UnmarshalRecord unmarshalRecord,UnmarshalRecord selfRecord,Attributes atts){
}
Program: 66514
Project: 66514
Buggy source:
public void endSelfNodeValue(UnmarshalRecord unmarshalRecord,Attributes attributes){
  unmarshalRecord.getStringBuffer().reset();
}

Fixed version (ground truth):
public void endSelfNodeValue(UnmarshalRecord unmarshalRecord,UnmarshalRecord selfRecord,Attributes attributes){
  unmarshalRecord.getStringBuffer().reset();
}
Program: 66517
Project: 66517
Buggy source:
protected void internalTestSequenceObjectDefinition(int preallocationSize,int startValue,String seqName,EntityManager em,ServerSession ss){
  NativeSequence sequence=new NativeSequence(seqName,preallocationSize,startValue,false);
  sequence.onConnect(ss.getPlatform());
  SequenceObjectDefinition def=new SequenceObjectDefinition(sequence);
  try {
    String createStr=def.buildCreationWriter(ss,new StringWriter()).toString();
    beginTransaction(em);
    em.createNativeQuery(createStr).executeUpdate();
    commitTransaction(em);
    Vector seqValues=sequence.getGeneratedVector(null,ss);
    int firstSequenceValue=((Number)seqValues.elementAt(0)).intValue();
    if (firstSequenceValue != startValue) {
      fail(seqName + "String_Node_Str" + preallocationSize+ "String_Node_Str"+ startValue+ "String_Node_Str"+ firstSequenceValue);
    }
  }
  finally {
    sequence.onDisconnect(ss.getPlatform());
    if (JUnitTestCase.getServerSession().getPlatform().isSymfoware())     return;
    String dropStr=def.buildDeletionWriter(ss,new StringWriter()).toString();
    beginTransaction(em);
    em.createNativeQuery(dropStr).executeUpdate();
    commitTransaction(em);
  }
}

Fixed version (ground truth):
protected void internalTestSequenceObjectDefinition(int preallocationSize,int startValue,String seqName,EntityManager em,ServerSession ss){
  NativeSequence sequence=new NativeSequence(seqName,preallocationSize,startValue,false);
  sequence.onConnect(ss.getPlatform());
  SequenceObjectDefinition def=new SequenceObjectDefinition(sequence);
  try {
    String createStr=def.buildCreationWriter(ss,new StringWriter()).toString();
    beginTransaction(em);
    em.createNativeQuery(createStr).executeUpdate();
    commitTransaction(em);
    Vector seqValues=sequence.getGeneratedVector(null,ss);
    int firstSequenceValue=((Number)seqValues.elementAt(0)).intValue();
    if (firstSequenceValue != startValue) {
      fail(seqName + "String_Node_Str" + preallocationSize+ "String_Node_Str"+ startValue+ "String_Node_Str"+ firstSequenceValue);
    }
  }
  finally {
    sequence.onDisconnect(ss.getPlatform());
    if (JUnitTestCase.getServerSession("String_Node_Str").getPlatform().isSymfoware())     return;
    String dropStr=def.buildDeletionWriter(ss,new StringWriter()).toString();
    beginTransaction(em);
    em.createNativeQuery(dropStr).executeUpdate();
    commitTransaction(em);
  }
}
Program: 66519
Project: 66519
Buggy source:
public void test(){
  try {
    mapping.writeFromObjectIntoRowWithChangeRecord(changeRecord,new org.eclipse.persistence.sessions.DatabaseRecord(),(AbstractSession)getSession());
  }
 catch (  EclipseLinkException exception) {
    caughtException=exception;
  }
}

Fixed version (ground truth):
public void test(){
  try {
    mapping.writeFromObjectIntoRowWithChangeRecord(changeRecord,new org.eclipse.persistence.sessions.DatabaseRecord(),(AbstractSession)getSession(),WriteType.UNDEFINED);
  }
 catch (  EclipseLinkException exception) {
    caughtException=exception;
  }
}
Program: 66520
Project: 66520
Buggy source:
public void test(){
  try {
    if (testMode == 0) {
      mapping.writeFromObjectIntoRow(actor,databaseRow,(AbstractSession)getSession());
    }
 else     if (testMode == 1) {
      mapping.writeFromObjectIntoRowWithChangeRecord((org.eclipse.persistence.internal.sessions.ChangeRecord)changeRecord,databaseRow,(AbstractSession)getSession());
    }
 else     if (testMode == 2) {
      mapping.writeFromObjectIntoRowForWhereClause(deleteObjectQuery,databaseRow);
    }
 else {
      throw new org.eclipse.persistence.testing.framework.TestProblemException("String_Node_Str");
    }
  }
 catch (  EclipseLinkException exception) {
    caughtException=exception;
  }
}

Fixed version (ground truth):
public void test(){
  try {
    if (testMode == 0) {
      mapping.writeFromObjectIntoRow(actor,databaseRow,(AbstractSession)getSession(),WriteType.UNDEFINED);
    }
 else     if (testMode == 1) {
      mapping.writeFromObjectIntoRowWithChangeRecord((org.eclipse.persistence.internal.sessions.ChangeRecord)changeRecord,databaseRow,(AbstractSession)getSession(),WriteType.UNDEFINED);
    }
 else     if (testMode == 2) {
      mapping.writeFromObjectIntoRowForWhereClause(deleteObjectQuery,databaseRow);
    }
 else {
      throw new org.eclipse.persistence.testing.framework.TestProblemException("String_Node_Str");
    }
  }
 catch (  EclipseLinkException exception) {
    caughtException=exception;
  }
}