nus-yam/ex-repair huggingface dataset:
Program: 68261
Project: 68261
Buggy source:
/** 
 * Set a property's value.
 * @param lastProperty      the property to queries.
 * @param lastDataObject    the DataObject, owner of the queried property
 * @param numInLastProperty the index number in the value list of the above property
 * @param value             the value to be set as the target property's value
 * @param convertValue     boolean used for set if we should convert the value 
 */
private void set(Property lastProperty,DataObject lastDataObject,int numInLastProperty,Object value,boolean convertValue){
  if (numInLastProperty == -1) {
    if (lastDataObject != null) {
      if (convertValue) {
        value=DataHelper.INSTANCE.convert(lastProperty,value);
      }
      lastDataObject.set(lastProperty,value);
    }
 else {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
 else {
    List objects=lastDataObject.getList(lastProperty);
    if (convertValue) {
      value=DataHelper.INSTANCE.convert(lastProperty.getType(),value);
    }
    objects.set(numInLastProperty,value);
  }
}

Fixed version (ground truth):
/** 
 * Set a property's value.
 * @param lastProperty      the property to queries.
 * @param lastDataObject    the DataObject, owner of the queried property
 * @param numInLastProperty the index number in the value list of the above property
 * @param value             the value to be set as the target property's value
 * @param convertValue     boolean used for set if we should convert the value 
 */
private void set(Property lastProperty,DataObject lastDataObject,int numInLastProperty,Object value,boolean convertValue){
  if (numInLastProperty == -1) {
    if (lastDataObject != null) {
      if (convertValue) {
        value=DataHelper.INSTANCE.convert(lastProperty,value);
      }
      lastDataObject.set(lastProperty,value);
    }
 else {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
 else {
    List objects=lastDataObject.getList(lastProperty);
    if (convertValue) {
      value=DataHelper.INSTANCE.convert(lastProperty.getType(),value);
    }
    Sequence seq=lastDataObject.getSequence();
    if (seq != null) {
      seq.setValue(numInLastProperty,value);
    }
 else {
      objects.set(numInLastProperty,value);
    }
  }
}
Program: 68265
Project: 68265
Buggy source:
/** 
 * INTERNAL: Process ValueStore changes on any set/delete/detach/unset when logging is on.
 */
private void updateChangeSummaryWithOriginalValues(){
  if (isLogging() && (!((SDOChangeSummary)getChangeSummary()).isDirty(this))) {
    ((SDOChangeSummary)getChangeSummary()).getOriginalValueStores().put(this,_getCurrentValueStore());
    currentValueStore=_getCurrentValueStore().copy();
    if (getType().isSequenced()) {
      SDOSequence copySequence=((SDOSequence)getSequence()).copy();
      ((SDOChangeSummary)getChangeSummary()).getOriginalSequences().put(this,copySequence);
    }
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Process ValueStore changes on any set/delete/detach/unset when logging is on.
 */
private void updateChangeSummaryWithOriginalValues(){
  if (isLogging() && (!((SDOChangeSummary)getChangeSummary()).isDirty(this)) && (!((SDOChangeSummary)getChangeSummary()).isCreated(this))) {
    ((SDOChangeSummary)getChangeSummary()).getOriginalValueStores().put(this,_getCurrentValueStore());
    currentValueStore=_getCurrentValueStore().copy();
    if (getType().isSequenced()) {
      SDOSequence copySequence=((SDOSequence)getSequence()).copy();
      ((SDOChangeSummary)getChangeSummary()).getOriginalSequences().put(this,copySequence);
    }
  }
}
Program: 68268
Project: 68268
Buggy source:
private String getPrefixStringForURI(String uri){
  String prefix=getPrefixForURI(uri);
  if (prefix == null) {
    return "String_Node_Str";
  }
 else {
    return prefix + "String_Node_Str";
  }
}

Fixed version (ground truth):
private String getPrefixStringForURI(String uri){
  if (null == uri || SDOConstants.EMPTY_STRING.equals(uri)) {
    return SDOConstants.EMPTY_STRING;
  }
  String prefix=getPrefixForURI(uri);
  if (prefix == null) {
    return SDOConstants.EMPTY_STRING;
  }
 else {
    return prefix + "String_Node_Str";
  }
}
Program: 68269
Project: 68269
Buggy source:
private void processSchema(Schema parsedSchema){
  rootSchema=parsedSchema;
  initialize();
  namespaceResolvers.add(rootSchema.getNamespaceResolver());
  processIncludes(rootSchema.getIncludes());
  processImports(rootSchema.getImports());
  processGlobalAttributes(rootSchema);
  processGlobalElements(rootSchema);
  processGlobalSimpleTypes(rootSchema);
  processGlobalComplexTypes(rootSchema);
  postProcessing();
}

Fixed version (ground truth):
private void processSchema(Schema parsedSchema){
  rootSchema=parsedSchema;
  initialize();
  namespaceResolvers.add(rootSchema.getNamespaceResolver());
  processIncludes(rootSchema.getIncludes());
  processImports(rootSchema.getImports());
  preprocessGlobalTypes(rootSchema);
  processGlobalAttributes(rootSchema);
  processGlobalElements(rootSchema);
  processGlobalSimpleTypes(rootSchema);
  processGlobalComplexTypes(rootSchema);
  postProcessing();
}
Program: 68270
Project: 68270
Buggy source:
private SDOType getOrCreateType(String uri,String typeName,String xsdLocalName){
  String lookupName=typeName;
  int index=lookupName.indexOf(':');
  if (index != -1) {
    lookupName=lookupName.substring(index + 1,lookupName.length());
  }
  SDOTypeHelper sdoTypeHelper=(SDOTypeHelper)aHelperContext.getTypeHelper();
  SDOType returnType=(SDOType)sdoTypeHelper.getType(uri,lookupName);
  if (returnType == null) {
    QName qname=new QName(uri,lookupName);
    returnType=(SDOType)getGeneratedTypes().get(qname);
    if (returnType == null) {
      returnType=new SDOType(uri,lookupName,sdoTypeHelper);
      returnType.setXsd(true);
      returnType.setXsdLocalName(xsdLocalName);
    }
  }
  return returnType;
}

Fixed version (ground truth):
private SDOType getOrCreateType(String uri,String typeName,String xsdLocalName){
  String lookupName=typeName;
  int index=lookupName.indexOf(':');
  if (index != -1) {
    lookupName=lookupName.substring(index + 1,lookupName.length());
  }
  SDOTypeHelper sdoTypeHelper=(SDOTypeHelper)aHelperContext.getTypeHelper();
  SDOType returnType=(SDOType)sdoTypeHelper.getType(uri,lookupName);
  if (returnType == null) {
    QName qname=new QName(uri,lookupName);
    returnType=(SDOType)getGeneratedTypes().get(qname);
    if (returnType == null) {
      QName xsdQName=new QName(uri,xsdLocalName);
      returnType=getTypeForXSDQName(xsdQName);
      if (returnType == null) {
        returnType=new SDOType(uri,lookupName,sdoTypeHelper);
        returnType.setXsd(true);
        returnType.setXsdLocalName(xsdLocalName);
      }
 else {
        returnType.setQName(qname);
      }
    }
  }
  return returnType;
}
Program: 68271
Project: 68271
Buggy source:
private void startNewSimpleType(String targetNamespace,String sdoTypeName,String xsdLocalName,SimpleType simpleType){
  SDOType currentType=createSDOTypeForName(targetNamespace,sdoTypeName,xsdLocalName);
  currentType.setDataType(true);
  SDOTypeHelper typeHelper=((SDOTypeHelper)aHelperContext.getTypeHelper());
  QName baseTypeQName=null;
  if (simpleType.getRestriction() != null) {
    String baseType=simpleType.getRestriction().getBaseType();
    int colonIndex=baseType.indexOf("String_Node_Str");
    if (colonIndex != -1) {
      baseType=baseType.substring(colonIndex + 1,baseType.length());
    }
    baseTypeQName=new QName(XMLConstants.SCHEMA_URL,baseType);
    SDOType baseSDOType=typeHelper.getSDOTypeFromXSDType(baseTypeQName);
    currentType.addBaseType(baseSDOType);
    currentType.setInstanceClass(baseSDOType.getInstanceClass());
  }
  SDOWrapperType wrapperType=new SDOWrapperType(currentType,sdoTypeName,typeHelper,baseTypeQName);
  typeHelper.getWrappersHashMap().put(currentType.getQName(),wrapperType);
  typeHelper.getTypesHashMap().put(wrapperType.getQName(),wrapperType);
  typeHelper.getInterfacesToSDOTypeHashMap().put(wrapperType.getXmlDescriptor().getInterfacePolicy().getParentInterfaces().firstElement(),wrapperType);
  ArrayList list=new ArrayList(1);
  list.add(wrapperType);
  ((SDOXMLHelper)aHelperContext.getXMLHelper()).addDescriptors(list);
  if (simpleType.getAnnotation() != null) {
    currentType.setAppInfoElements(simpleType.getAnnotation().getAppInfo());
  }
}

Fixed version (ground truth):
private void startNewSimpleType(String targetNamespace,String defaultNamespace,String sdoTypeName,String xsdLocalName,SimpleType simpleType){
  SDOType currentType=createSDOTypeForName(targetNamespace,sdoTypeName,xsdLocalName);
  currentType.setDataType(true);
  SDOTypeHelper typeHelper=((SDOTypeHelper)aHelperContext.getTypeHelper());
  QName baseTypeQName=null;
  if (simpleType.getRestriction() != null) {
    String baseType=simpleType.getRestriction().getBaseType();
    baseTypeQName=this.getQNameForString(defaultNamespace,baseType);
    SDOType baseSDOType=getTypeForXSDQName(baseTypeQName);
    currentType.addBaseType(baseSDOType);
    currentType.setInstanceClass(baseSDOType.getInstanceClass());
  }
  SDOWrapperType wrapperType=new SDOWrapperType(currentType,sdoTypeName,typeHelper,baseTypeQName);
  typeHelper.getWrappersHashMap().put(currentType.getQName(),wrapperType);
  typeHelper.getTypesHashMap().put(wrapperType.getQName(),wrapperType);
  typeHelper.getInterfacesToSDOTypeHashMap().put(wrapperType.getXmlDescriptor().getInterfacePolicy().getParentInterfaces().firstElement(),wrapperType);
  ArrayList list=new ArrayList(1);
  list.add(wrapperType);
  ((SDOXMLHelper)aHelperContext.getXMLHelper()).addDescriptors(list);
  if (simpleType.getAnnotation() != null) {
    currentType.setAppInfoElements(simpleType.getAnnotation().getAppInfo());
  }
}
Program: 68272
Project: 68272
Buggy source:
private void processGlobalSimpleType(String targetNamespace,String defaultNamespace,SimpleType simpleType){
  QName qname=new QName(targetNamespace,simpleType.getName());
  Object processed=processedSimpleTypes.get(qname);
  if (processed == null) {
    processSimpleType(targetNamespace,defaultNamespace,simpleType.getName(),simpleType);
    processedSimpleTypes.put(qname,simpleType);
  }
}

Fixed version (ground truth):
private void processGlobalSimpleType(String targetNamespace,String defaultNamespace,SimpleType simpleType){
  QName qname=new QName(targetNamespace,simpleType.getName());
  if (!processedSimpleTypes.containsKey(qname)) {
    processSimpleType(targetNamespace,defaultNamespace,simpleType.getName(),simpleType);
    processedSimpleTypes.put(qname,simpleType);
  }
}
Program: 68273
Project: 68273
Buggy source:
public SDOTypesGenerator(HelperContext aContext){
  processedComplexTypes=new HashMap();
  processedSimpleTypes=new HashMap();
  processedElements=new HashMap();
  processedAttributes=new HashMap();
  itemNameToSDOName=new HashMap();
  namespaceResolvers=new ArrayList();
  this.aHelperContext=aContext;
}

Fixed version (ground truth):
public SDOTypesGenerator(HelperContext aContext){
  generatedTypesByXsdQName=new HashMap<QName,SDOType>();
  processedComplexTypes=new HashMap();
  processedSimpleTypes=new HashMap();
  processedElements=new HashMap();
  processedAttributes=new HashMap();
  itemNameToSDOName=new HashMap();
  namespaceResolvers=new ArrayList();
  this.aHelperContext=aContext;
}
Program: 68275
Project: 68275
Buggy source:
private boolean startSimpleType(String targetNamespace,String defaultNamespace,String name,String xsdLocalName,SimpleType simpleType){
  boolean alreadyExists=typesExists(targetNamespace,name);
  if (!alreadyExists) {
    startNewSimpleType(targetNamespace,name,xsdLocalName,simpleType);
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean startSimpleType(String targetNamespace,String defaultNamespace,String name,String xsdLocalName,SimpleType simpleType){
  boolean alreadyExists=typesExists(targetNamespace,name);
  if (!alreadyExists) {
    startNewSimpleType(targetNamespace,defaultNamespace,name,xsdLocalName,simpleType);
    return true;
  }
  return false;
}
Program: 68276
Project: 68276
Buggy source:
public static TestSuite getInsertObjectTestSuite(){
  TestSuite suite=new TestSuite();
  suite.setName("String_Node_Str");
  suite.setDescription("String_Node_Str");
  PopulationManager manager=PopulationManager.getDefaultManager();
  suite.addTest(new CollectionInsertObjectTest(CollectionInsertObjectTest.buildInstanceToInsert()));
  return suite;
}

Fixed version (ground truth):
public static TestSuite getInsertObjectTestSuite(){
  TestSuite suite=new TestSuite();
  suite.setName("String_Node_Str");
  suite.setDescription("String_Node_Str");
  PopulationManager manager=PopulationManager.getDefaultManager();
  suite.addTest(new CollectionInsertObjectTest(CollectionInsertObjectTest.buildInstanceToInsert()));
  suite.addTest(new CollectionInsertDetectionTest());
  return suite;
}
Program: 68277
Project: 68277
Buggy source:
/** 
 * ADVANCED: The unit of work performs validations such as, ensuring multiple copies of the same object don't exist in the same unit of work, ensuring deleted objects are not referred after commit, ensures that objects from the parent cache are not refered in the unit of work cache. The level of validation can be increased or decreased for debugging purposes or under advanced situation where the application requires/desires to violate clone identity in the unit of work. It is strongly suggested that clone identity not be violate in the unit of work.
 */
public boolean shouldPerformNoValidation(){
  return getValidationLevel() == None;
}

Fixed version (ground truth):
/** 
 * ADVANCED: The unit of work performs validations such as, ensuring multiple copies of the same object don't exist in the same unit of work, ensuring deleted objects are not referred after commit, ensures that objects from the parent cache are not refered in the unit of work cache. The level of validation can be increased or decreased for debugging purposes or under advanced situation where the application requires/desires to violate clone identity in the unit of work. It is strongly suggested that clone identity not be violated in the unit of work.
 */
public boolean shouldPerformNoValidation(){
  return getValidationLevel() == None;
}
Program: 68278
Project: 68278
Buggy source:
/** 
 * INTERNAL: Traverse the object to find references to objects not registered in this unit of work.
 */
public void discoverUnregisteredNewObjects(Map clones,final Map knownNewObjects,final Map unregisteredExistingObjects,Map visitedObjects){
  DescriptorIterator iterator=new DescriptorIterator(){
    public void iterate(    Object object){
      if (isClassReadOnly(object.getClass(),this.getCurrentDescriptor())) {
        this.setShouldBreak(true);
        return;
      }
      if (isSmartMerge() && isOriginalNewObject(object)) {
        return;
      }
 else       if (!isObjectRegistered(object)) {
        if ((shouldPerformNoValidation()) && (!shouldValidateExistence() || checkForUnregisteredExistingObject(object))) {
          unregisteredExistingObjects.put(object,object);
          this.setShouldBreak(true);
          return;
        }
        knownNewObjects.put(object,object);
      }
    }
  }
;
  setUnregisteredExistingObjects(unregisteredExistingObjects);
  iterator.setVisitedObjects(visitedObjects);
  iterator.setResult(knownNewObjects);
  iterator.setSession(this);
  iterator.setShouldIterateOverWrappedObjects(false);
  for (Iterator clonesEnum=clones.keySet().iterator(); clonesEnum.hasNext(); ) {
    iterator.startIterationOn(clonesEnum.next());
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Traverse the object to find references to objects not registered in this unit of work.
 */
public void discoverUnregisteredNewObjects(Map clones,final Map knownNewObjects,final Map unregisteredExistingObjects,Map visitedObjects){
  DescriptorIterator iterator=new DescriptorIterator(){
    public void iterate(    Object object){
      if (isClassReadOnly(object.getClass(),this.getCurrentDescriptor())) {
        this.setShouldBreak(true);
        return;
      }
      if (isSmartMerge() && isOriginalNewObject(object)) {
        return;
      }
 else       if (!isObjectRegistered(object)) {
        if (shouldPerformNoValidation() && checkForUnregisteredExistingObject(object)) {
          unregisteredExistingObjects.put(object,object);
          this.setShouldBreak(true);
          return;
        }
        knownNewObjects.put(object,object);
      }
    }
  }
;
  setUnregisteredExistingObjects(unregisteredExistingObjects);
  iterator.setVisitedObjects(visitedObjects);
  iterator.setResult(knownNewObjects);
  iterator.setSession(this);
  iterator.setShouldIterateOverWrappedObjects(false);
  for (Iterator clonesEnum=clones.keySet().iterator(); clonesEnum.hasNext(); ) {
    iterator.startIterationOn(clonesEnum.next());
  }
}
Program: 68280
Project: 68280
Buggy source:
private boolean importExists(java.util.List imports,String schemaName){
  for (int i=0; i < imports.size(); i++) {
    Import nextImport=(Import)imports.get(i);
    if (nextImport.getSchemaLocation() != null && nextImport.getSchemaLocation().equals(schemaName)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean importExists(java.util.List imports,String schemaName){
  for (int i=0; i < imports.size(); i++) {
    Include nextImport=(Include)imports.get(i);
    if (nextImport.getSchemaLocation() != null && nextImport.getSchemaLocation().equals(schemaName)) {
      return true;
    }
  }
  return false;
}
Program: 68281
Project: 68281
Buggy source:
/** 
 * INTERNAL: Convenience method that sets up class indicator and @sdoRef attribute.
 * @param xdesc
 * @param pCls
 */
private void addClassIndicator(XMLDescriptor xdesc,Class pCls){
  XMLField field=(XMLField)getXmlDescriptor().buildField("String_Node_Str");
  xdesc.getInheritancePolicy().setClassIndicatorField(field);
  String parentIndicator=getName();
  String parentPrefix=xdesc.getNamespaceResolver().resolveNamespaceURI(getURI());
  if (parentPrefix != null) {
    parentIndicator=parentPrefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT + parentIndicator;
  }
  xdesc.getInheritancePolicy().addClassIndicator(pCls,parentIndicator);
  if (xdesc.getMappingForAttributeName(SDO_REF_MAPPING_ATTRIBUTE_NAME) == null) {
    String sdoPrefix=((SDOTypeHelper)aHelperContext.getTypeHelper()).getPrefix(SDOConstants.SDO_URL);
    XMLDirectMapping sdoRefMapping=new XMLDirectMapping();
    sdoRefMapping.setAttributeName(SDO_REF_MAPPING_ATTRIBUTE_NAME);
    XMLField xmlField=new XMLField("String_Node_Str" + sdoPrefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT+ SDOConstants.CHANGESUMMARY_REF);
    xmlField.getXPathFragment().setNamespaceURI(SDOConstants.SDO_URL);
    xmlField.getLastXPathFragment().setNamespaceURI(SDOConstants.SDO_URL);
    sdoRefMapping.setField(xmlField);
    xdesc.addMapping(sdoRefMapping);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Convenience method that sets up class indicator and @sdoRef attribute.
 * @param xdesc
 * @param pCls
 */
private void addClassIndicator(XMLDescriptor xdesc,Class pCls,boolean isInheritanceRoot){
  XMLField field=(XMLField)getXmlDescriptor().buildField("String_Node_Str");
  xdesc.getInheritancePolicy().setClassIndicatorField(field);
  String parentIndicator=getName();
  String parentPrefix=xdesc.getNamespaceResolver().resolveNamespaceURI(getURI());
  if (parentPrefix != null) {
    parentIndicator=parentPrefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT + parentIndicator;
  }
  xdesc.getInheritancePolicy().addClassIndicator(pCls,parentIndicator);
  if (isInheritanceRoot) {
    InheritanceNodeValue inheritanceNodeValue=new InheritanceNodeValue();
    inheritanceNodeValue.setInheritancePolicy(xdesc.getInheritancePolicy());
    ((TreeObjectBuilder)xmlDescriptor.getObjectBuilder()).addChild(field.getXPathFragment(),inheritanceNodeValue,xmlDescriptor.getNamespaceResolver());
  }
  if (xdesc.getMappingForAttributeName(SDO_REF_MAPPING_ATTRIBUTE_NAME) == null) {
    String sdoPrefix=((SDOTypeHelper)aHelperContext.getTypeHelper()).getPrefix(SDOConstants.SDO_URL);
    XMLDirectMapping sdoRefMapping=new XMLDirectMapping();
    sdoRefMapping.setAttributeName(SDO_REF_MAPPING_ATTRIBUTE_NAME);
    XMLField xmlField=new XMLField("String_Node_Str" + sdoPrefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT+ SDOConstants.CHANGESUMMARY_REF);
    xmlField.getXPathFragment().setNamespaceURI(SDOConstants.SDO_URL);
    xmlField.getLastXPathFragment().setNamespaceURI(SDOConstants.SDO_URL);
    sdoRefMapping.setField(xmlField);
    xdesc.addMapping(sdoRefMapping);
  }
}
Program: 68283
Project: 68283
Buggy source:
/** 
 * INTERNAL:
 */
public void openStartElement(XPathFragment xPathFragment,NamespaceResolver namespaceResolver){
  this.addPositionalNodes(xPathFragment,namespaceResolver);
  try {
    if (isStartElementOpen) {
      getWriter().write('>');
    }
    getWriter().write(Helper.cr());
    isStartElementOpen=true;
    for (int x=0; x < numberOfTabs; x++) {
      getWriter().write(TAB);
    }
    getWriter().write('<');
    getWriter().write(xPathFragment.getShortName());
    numberOfTabs++;
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public void openStartElement(XPathFragment xPathFragment,NamespaceResolver namespaceResolver){
  this.addPositionalNodes(xPathFragment,namespaceResolver);
  try {
    if (isStartElementOpen) {
      getWriter().write('>');
    }
    if (!isLastEventText) {
      getWriter().write(Helper.cr());
      for (int x=0; x < numberOfTabs; x++) {
        getWriter().write(TAB);
      }
    }
    isStartElementOpen=true;
    getWriter().write('<');
    getWriter().write(xPathFragment.getShortName());
    numberOfTabs++;
    isLastEventText=false;
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 68284
Project: 68284
Buggy source:
public void characters(char[] ch,int start,int length) throws SAXException {
  if (isProcessingCData) {
    cdata(new String(ch,start,length));
    return;
  }
  if (new String(ch).trim().length() == 0) {
    return;
  }
  super.characters(ch,start,length);
  complexType=false;
}

Fixed version (ground truth):
public void characters(char[] ch,int start,int length) throws SAXException {
  if (isProcessingCData) {
    cdata(new String(ch,start,length));
    return;
  }
  if (new String(ch).trim().length() == 0) {
    return;
  }
  super.characters(ch,start,length);
  isLastEventText=true;
  complexType=false;
}
Program: 68285
Project: 68285
Buggy source:
public void endElement(String namespaceURI,String localName,String qName) throws SAXException {
  try {
    numberOfTabs--;
    if (isStartElementOpen) {
      getWriter().write('/');
      getWriter().write('>');
      isStartElementOpen=false;
      return;
    }
    if (complexType) {
      getWriter().write(Helper.cr());
      for (int x=0; x < numberOfTabs; x++) {
        getWriter().write(TAB);
      }
    }
 else {
      complexType=true;
    }
    super.endElement(namespaceURI,localName,qName);
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
public void endElement(String namespaceURI,String localName,String qName) throws SAXException {
  try {
    isLastEventText=false;
    numberOfTabs--;
    if (isStartElementOpen) {
      getWriter().write('/');
      getWriter().write('>');
      isStartElementOpen=false;
      complexType=true;
      return;
    }
    if (complexType) {
      getWriter().write(Helper.cr());
      for (int x=0; x < numberOfTabs; x++) {
        getWriter().write(TAB);
      }
    }
 else {
      complexType=true;
    }
    super.endElement(namespaceURI,localName,qName);
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 68286
Project: 68286
Buggy source:
public void startElement(String namespaceURI,String localName,String qName,Attributes atts) throws SAXException {
  try {
    if (isStartElementOpen) {
      getWriter().write('>');
    }
    getWriter().write(Helper.cr());
    for (int x=0; x < numberOfTabs; x++) {
      getWriter().write(TAB);
    }
    getWriter().write('<');
    getWriter().write(qName);
    numberOfTabs++;
    isStartElementOpen=true;
    handleAttributes(atts);
    writePrefixMappings();
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
public void startElement(String namespaceURI,String localName,String qName,Attributes atts) throws SAXException {
  try {
    if (isStartElementOpen) {
      getWriter().write('>');
    }
    if (!isLastEventText) {
      getWriter().write(Helper.cr());
      for (int x=0; x < numberOfTabs; x++) {
        getWriter().write(TAB);
      }
    }
    getWriter().write('<');
    getWriter().write(qName);
    numberOfTabs++;
    isStartElementOpen=true;
    isLastEventText=false;
    handleAttributes(atts);
    writePrefixMappings();
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 68287
Project: 68287
Buggy source:
public FormattedWriterRecord(){
  super();
  numberOfTabs=0;
  complexType=true;
}

Fixed version (ground truth):
public FormattedWriterRecord(){
  super();
  numberOfTabs=0;
  complexType=true;
  isLastEventText=false;
}
Program: 68288
Project: 68288
Buggy source:
/** 
 * INTERNAL:
 */
public void element(String namespaceURI,String localName,String qName){
  try {
    if (isStartElementOpen) {
      getWriter().write('>');
      isStartElementOpen=false;
    }
    getWriter().write(Helper.cr());
    for (int x=0; x < numberOfTabs; x++) {
      getWriter().write(TAB);
    }
    super.element(namespaceURI,localName,qName);
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public void element(String namespaceURI,String localName,String qName){
  try {
    isLastEventText=false;
    if (isStartElementOpen) {
      getWriter().write('>');
      isStartElementOpen=false;
    }
    getWriter().write(Helper.cr());
    for (int x=0; x < numberOfTabs; x++) {
      getWriter().write(TAB);
    }
    super.element(namespaceURI,localName,qName);
  }
 catch (  IOException e) {
    throw XMLMarshalException.marshalException(e);
  }
}
Program: 68289
Project: 68289
Buggy source:
public DescriptorLevelDocumentPreservationPolicy(XMLContext ctx){
  context=ctx;
  this.setNodeOrderingPolicy(new AppendNewElementsOrderingPolicy());
}

Fixed version (ground truth):
public DescriptorLevelDocumentPreservationPolicy(){
  super();
  this.setNodeOrderingPolicy(new AppendNewElementsOrderingPolicy());
}
Program: 68290
Project: 68290
Buggy source:
@Override protected ClassDescriptor buildXMLLoginDescriptor(){
  ClassDescriptor descriptor=super.buildXMLLoginDescriptor();
  XMLDirectMapping equalNamespaceResolversMapping=new XMLDirectMapping();
  equalNamespaceResolversMapping.setAttributeName("String_Node_Str");
  equalNamespaceResolversMapping.setGetMethodName("String_Node_Str");
  equalNamespaceResolversMapping.setSetMethodName("String_Node_Str");
  equalNamespaceResolversMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  equalNamespaceResolversMapping.setNullValue(Boolean.TRUE);
  descriptor.addMapping(equalNamespaceResolversMapping);
  return descriptor;
}

Fixed version (ground truth):
@Override protected ClassDescriptor buildXMLLoginDescriptor(){
  ClassDescriptor descriptor=super.buildXMLLoginDescriptor();
  XMLDirectMapping equalNamespaceResolversMapping=new XMLDirectMapping();
  equalNamespaceResolversMapping.setAttributeName("String_Node_Str");
  equalNamespaceResolversMapping.setGetMethodName("String_Node_Str");
  equalNamespaceResolversMapping.setSetMethodName("String_Node_Str");
  equalNamespaceResolversMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  equalNamespaceResolversMapping.setNullValue(Boolean.TRUE);
  descriptor.addMapping(equalNamespaceResolversMapping);
  XMLCompositeObjectMapping documentPreservationPolicyMapping=new XMLCompositeObjectMapping();
  documentPreservationPolicyMapping.setReferenceClass(DocumentPreservationPolicy.class);
  documentPreservationPolicyMapping.setAttributeName("String_Node_Str");
  documentPreservationPolicyMapping.setGetMethodName("String_Node_Str");
  documentPreservationPolicyMapping.setSetMethodName("String_Node_Str");
  documentPreservationPolicyMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(documentPreservationPolicyMapping);
  return descriptor;
}
Program: 68292
Project: 68292
Buggy source:
public XMLSessionConfigProject_11_1_1(){
  super();
  addDescriptor(buildOc4jJGroupsTransportManagerConfigDescriptor());
  addDescriptor(buildServerPlatformConfigDescriptorFor(Oc4jPlatformConfig.class));
  addDescriptor(buildServerPlatformConfigDescriptorFor(SunAS9PlatformConfig.class));
  addDescriptor(buildServerPlatformConfigDescriptorFor(WebLogic_9_PlatformConfig.class));
  addDescriptor(buildServerPlatformConfigDescriptorFor(WebLogic_10_PlatformConfig.class));
  addDescriptor(buildServerPlatformConfigDescriptorFor(WebSphere_6_1_PlatformConfig.class));
}

Fixed version (ground truth):
public XMLSessionConfigProject_11_1_1(){
  super();
  addDescriptor(buildOc4jJGroupsTransportManagerConfigDescriptor());
  addDescriptor(buildServerPlatformConfigDescriptorFor(Oc4jPlatformConfig.class));
  addDescriptor(buildServerPlatformConfigDescriptorFor(SunAS9PlatformConfig.class));
  addDescriptor(buildServerPlatformConfigDescriptorFor(WebLogic_9_PlatformConfig.class));
  addDescriptor(buildServerPlatformConfigDescriptorFor(WebLogic_10_PlatformConfig.class));
  addDescriptor(buildServerPlatformConfigDescriptorFor(WebSphere_6_1_PlatformConfig.class));
  addDescriptor(buildDocumentPreservationPolicyConfigDescriptor());
  addDescriptor(buildDescriptorLevelDocumentPreservationPolicyConfigDescriptor());
  addDescriptor(buildNoDocumentPreservationPolicyConfigDescriptor());
  addDescriptor(buildXMLBinderPolicyConfigDescriptor());
  addDescriptor(buildNodeOrderingPolicyConfigDescriptor());
  addDescriptor(buildAppendNewElementsOrderingPolicyConfigDescriptor());
  addDescriptor(buildIgnoreNewElementsOrderingPolicyConfigDescriptor());
  addDescriptor(buildRelativePositionOrderingPolicyConfigDescriptor());
  NamespaceResolver namespaceResolver=new NamespaceResolver();
  namespaceResolver.put("String_Node_Str",W3C_XML_SCHEMA_INSTANCE_NS_URI);
  namespaceResolver.put("String_Node_Str",W3C_XML_SCHEMA_NS_URI);
  for (Iterator descriptors=getDescriptors().values().iterator(); descriptors.hasNext(); ) {
    XMLDescriptor descriptor=(XMLDescriptor)descriptors.next();
    descriptor.setNamespaceResolver(namespaceResolver);
  }
}
Program: 68293
Project: 68293
Buggy source:
public void setupDocumentPreservationPolicy(DatabaseSession session){
  XMLLogin login=(XMLLogin)session.getDatasourceLogin();
  if (login.getDocumentPreservationPolicy() == null) {
    Iterator iterator=session.getProject().getOrderedDescriptors().iterator();
    while (iterator.hasNext()) {
      XMLDescriptor xmlDescriptor=(XMLDescriptor)iterator.next();
      if (xmlDescriptor.shouldPreserveDocument()) {
        login.setDocumentPreservationPolicy(new DescriptorLevelDocumentPreservationPolicy(this));
        break;
      }
    }
  }
  if (login.getDocumentPreservationPolicy() == null) {
    login.setDocumentPreservationPolicy(new NoDocumentPreservationPolicy());
  }
  if (login.getDocumentPreservationPolicy().shouldPreserveDocument() && !hasDocumentPreservation) {
    hasDocumentPreservation=true;
  }
}

Fixed version (ground truth):
public void setupDocumentPreservationPolicy(DatabaseSession session){
  XMLLogin login=(XMLLogin)session.getDatasourceLogin();
  if (login.getDocumentPreservationPolicy() == null) {
    Iterator iterator=session.getProject().getOrderedDescriptors().iterator();
    while (iterator.hasNext()) {
      XMLDescriptor xmlDescriptor=(XMLDescriptor)iterator.next();
      if (xmlDescriptor.shouldPreserveDocument()) {
        login.setDocumentPreservationPolicy(new DescriptorLevelDocumentPreservationPolicy());
        break;
      }
    }
  }
  if (login.getDocumentPreservationPolicy() == null) {
    login.setDocumentPreservationPolicy(new NoDocumentPreservationPolicy());
  }
  login.getDocumentPreservationPolicy().initialize(this);
  if (login.getDocumentPreservationPolicy().shouldPreserveDocument() && !hasDocumentPreservation) {
    hasDocumentPreservation=true;
  }
}
Program: 68294
Project: 68294
Buggy source:
/** 
 * INTERNAL: Indicates if a null value has been set or not.
 * @param object
 * @return boolean (isSet status)
 */
private boolean isSet(Object object){
  Boolean isSet;
  try {
    Class objectClass=object.getClass();
    PrivilegedGetMethod privilegedGetMethod=new PrivilegedGetMethod(objectClass,getIsSetMethodName(),getIsSetParameterTypes(),false,true);
    Method isSetMethod=privilegedGetMethod.run();
    PrivilegedMethodInvoker privilegedMethodInvoker=new PrivilegedMethodInvoker(isSetMethod,object,isSetParameters);
    isSet=(Boolean)privilegedMethodInvoker.run();
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
  return isSet.booleanValue();
}

Fixed version (ground truth):
/** 
 * INTERNAL: Indicates if a null value has been set or not.
 * @param object
 * @return boolean (isSet status)
 */
private boolean isSet(Object object){
  try {
    Boolean isSet=(Boolean)PrivilegedAccessHelper.invokeMethod(getIsSetMethod(object.getClass()),object,isSetParameters);
    return isSet.booleanValue();
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}
Program: 68296
Project: 68296
Buggy source:
public void setup(){
  super.setup();
  this.shouldCacheStatements=getSession().getPlatform().shouldCacheAllStatements();
  this.shouldBindAllParams=getSession().getPlatform().shouldBindAllParameters();
  getSession().getPlatform().setShouldCacheAllStatements(true);
  getSession().getPlatform().setShouldBindAllParameters(true);
}

Fixed version (ground truth):
public void setup(){
  super.setup();
  this.shouldCacheStatements=getSession().getPlatform().shouldCacheAllStatements();
  this.shouldBindAllParams=getSession().getPlatform().shouldBindAllParameters();
  getSession().getPlatform().setShouldCacheAllStatements(true);
  getSession().getPlatform().setShouldBindAllParameters(true);
  ((DatabaseAccessor)getAbstractSession().getAccessor()).clearStatementCache((AbstractSession)getSession());
}
Program: 68297
Project: 68297
Buggy source:
public SAXUnmarshaller(XMLUnmarshaller xmlUnmarshaller) throws XMLMarshalException {
  super();
  try {
    saxParser=saxParserFactory.newSAXParser();
    xmlReader=new XMLReader(saxParser.getXMLReader());
    xmlParser=XMLPlatformFactory.getInstance().getXMLPlatform().newXMLParser();
    xmlParser.setNamespaceAware(true);
    xmlParser.setValidationMode(XMLParser.NONVALIDATING);
    this.xmlUnmarshaller=xmlUnmarshaller;
  }
 catch (  Exception e) {
    throw XMLMarshalException.errorInstantiatingSchemaPlatform(e);
  }
}

Fixed version (ground truth):
public SAXUnmarshaller(XMLUnmarshaller xmlUnmarshaller) throws XMLMarshalException {
  super();
  try {
    saxParserFactory=SAXParserFactory.newInstance();
    saxParserFactory.setNamespaceAware(true);
    saxParserFactory.setFeature("String_Node_Str",true);
    saxParser=saxParserFactory.newSAXParser();
    xmlReader=new XMLReader(saxParser.getXMLReader());
    xmlParser=XMLPlatformFactory.getInstance().getXMLPlatform().newXMLParser();
    xmlParser.setNamespaceAware(true);
    xmlParser.setValidationMode(XMLParser.NONVALIDATING);
    this.xmlUnmarshaller=xmlUnmarshaller;
  }
 catch (  Exception e) {
    throw XMLMarshalException.errorInstantiatingSchemaPlatform(e);
  }
}
Program: 68298
Project: 68298
Buggy source:
public void setXMLSchema(URL url) throws XMLPlatformException ;

Fixed version (ground truth):
public void setXMLSchema(Schema schema) throws XMLPlatformException ;
Program: 68299
Project: 68299
Buggy source:
public void setXMLSchema(URL url) throws XMLPlatformException {
  if (null == url) {
    return;
  }
  try {
    documentBuilderFactory.setAttribute(SCHEMA_LANGUAGE,XML_SCHEMA);
    documentBuilderFactory.setAttribute(JAXP_SCHEMA_SOURCE,url.toString());
  }
 catch (  IllegalArgumentException e) {
  }
catch (  Exception e) {
    XMLPlatformException.xmlPlatformErrorResolvingXMLSchema(url,e);
  }
}

Fixed version (ground truth):
public void setXMLSchema(Schema schema) throws XMLPlatformException {
  documentBuilderFactory.setSchema(schema);
}
Program: 68300
Project: 68300
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);
  suite.addTestSuite(UnmarshalChildElementNSTestCases.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.addTestSuite(SetXmlSchemaTestCases.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: 68301
Project: 68301
Buggy source:
public void setSchema(Schema schema){
  this.schema=schema;
}

Fixed version (ground truth):
public void setSchema(Schema schema){
  this.xmlUnmarshaller.setSchema(schema);
}
Program: 68302
Project: 68302
Buggy source:
public Schema getSchema(){
  return schema;
}

Fixed version (ground truth):
public Schema getSchema(){
  return this.xmlUnmarshaller.getSchema();
}
Program: 68303
Project: 68303
Buggy source:
public void testConverFromObject_Date_GMTDefault(){
  String origDateString="String_Node_Str";
  Date aDate=dataHelper.toDate(origDateString);
  System.out.println("String_Node_Str" + aDate);
  DateFormat f=new SimpleDateFormat("String_Node_Str");
  f.setTimeZone(TimeZone.getTimeZone("String_Node_Str"));
  String dateString=f.format(aDate);
  this.assertEquals(origDateString,dateString);
}

Fixed version (ground truth):
public void testConverFromObject_Date_GMTDefault(){
  String origDateString="String_Node_Str";
  Date aDate=dataHelper.toDate(origDateString);
  DateFormat f=new SimpleDateFormat("String_Node_Str");
  f.setTimeZone(TimeZone.getTimeZone("String_Node_Str"));
  String dateString=f.format(aDate);
  this.assertEquals(origDateString,dateString);
}
Program: 68306
Project: 68306
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(DefaultNamespaceTestCases.class);
  suite.addTestSuite(GloballyDefinedNodesTestCases.class);
  suite.addTestSuite(LocallyDefinedNodesTestCases.class);
  suite.addTestSuite(NoNamespacesTestCases.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(DefaultNamespaceTestCases.class);
  suite.addTestSuite(DefaultNamespaceXMLRootTestCases.class);
  suite.addTestSuite(GloballyDefinedNodesTestCases.class);
  suite.addTestSuite(LocallyDefinedNodesTestCases.class);
  suite.addTestSuite(NoNamespacesTestCases.class);
  return suite;
}
Program: 68307
Project: 68307
Buggy source:
public SAXUnmarshaller(XMLUnmarshaller xmlUnmarshaller) throws XMLMarshalException {
  super();
  try {
    saxParserFactory=SAXParserFactory.newInstance();
    saxParserFactory.setNamespaceAware(true);
    saxParserFactory.setFeature("String_Node_Str",true);
    saxParser=saxParserFactory.newSAXParser();
    xmlReader=new XMLReader(saxParser.getXMLReader());
    xmlParser=XMLPlatformFactory.getInstance().getXMLPlatform().newXMLParser();
    xmlParser.setNamespaceAware(true);
    xmlParser.setValidationMode(XMLParser.NONVALIDATING);
    this.xmlUnmarshaller=xmlUnmarshaller;
  }
 catch (  Exception e) {
    throw XMLMarshalException.errorInstantiatingSchemaPlatform(e);
  }
}

Fixed version (ground truth):
public SAXUnmarshaller(XMLUnmarshaller xmlUnmarshaller) throws XMLMarshalException {
  super();
  try {
    saxParserFactory=SAXParserFactory.newInstance();
    saxParserFactory.setNamespaceAware(true);
    saxParserFactory.setFeature("String_Node_Str",true);
    saxParser=saxParserFactory.newSAXParser();
    xmlReader=new XMLReader(saxParser.getXMLReader());
    DefaultErrorHandler handler=new DefaultErrorHandler();
    xmlReader.setErrorHandler(handler);
    xmlParser=XMLPlatformFactory.getInstance().getXMLPlatform().newXMLParser();
    xmlParser.setNamespaceAware(true);
    xmlParser.setValidationMode(XMLParser.NONVALIDATING);
    this.xmlUnmarshaller=xmlUnmarshaller;
  }
 catch (  Exception e) {
    throw XMLMarshalException.errorInstantiatingSchemaPlatform(e);
  }
}
Program: 68308
Project: 68308
Buggy source:
public JAXPParser(){
  super();
  documentBuilderFactory=DocumentBuilderFactory.newInstance();
  setNamespaceAware(true);
  setWhitespacePreserving(false);
}

Fixed version (ground truth):
public JAXPParser(){
  super();
  documentBuilderFactory=DocumentBuilderFactory.newInstance();
  errorHandler=new DefaultErrorHandler();
  setNamespaceAware(true);
  setWhitespacePreserving(false);
}
Program: 68309
Project: 68309
Buggy source:
public void setXMLSchema(URL url) throws XMLPlatformException {
  if (null == url) {
    return;
  }
  try {
    documentBuilderFactory.setAttribute(SCHEMA_LANGUAGE,XML_SCHEMA);
    documentBuilderFactory.setAttribute(JAXP_SCHEMA_SOURCE,url.toString());
  }
 catch (  IllegalArgumentException e) {
  }
catch (  Exception e) {
    XMLPlatformException.xmlPlatformErrorResolvingXMLSchema(url,e);
  }
}

Fixed version (ground truth):
public void setXMLSchema(Schema schema){
  this.documentBuilderFactory.setSchema(schema);
}
Program: 68310
Project: 68310
Buggy source:
public PrivilegedGetMethod(Class clazz,String methodName,Class[] methodParameterTypes,boolean shouldSetAccessible){
  this.clazz=clazz;
  this.methodName=methodName;
  this.methodParameterTypes=methodParameterTypes;
}

Fixed version (ground truth):
public PrivilegedGetMethod(Class clazz,String methodName,Class[] methodParameterTypes,boolean shouldSetAccessible,boolean publicOnly){
  this.clazz=clazz;
  this.methodName=methodName;
  this.methodParameterTypes=methodParameterTypes;
  this.publicOnly=publicOnly;
}
Program: 68311
Project: 68311
Buggy source:
public Method run() throws NoSuchMethodException {
  return PrivilegedAccessHelper.getMethod(clazz,methodName,methodParameterTypes,shouldSetAccessible);
}

Fixed version (ground truth):
public Method run() throws NoSuchMethodException {
  if (publicOnly) {
    return PrivilegedAccessHelper.getPublicMethod(clazz,methodName,methodParameterTypes,shouldSetAccessible);
  }
  return PrivilegedAccessHelper.getMethod(clazz,methodName,methodParameterTypes,shouldSetAccessible);
}
Program: 68312
Project: 68312
Buggy source:
/** 
 * INTERNAL: Indicates if a null value has been set or not.
 * @param object
 * @return boolean (isSet status)
 */
private boolean isSet(Object object){
  Boolean isSet;
  try {
    Class objectClass=object.getClass();
    PrivilegedGetMethod privilegedGetMethod=new PrivilegedGetMethod(objectClass,getIsSetMethodName(),getIsSetParameterTypes(),false);
    Method isSetMethod=privilegedGetMethod.run();
    PrivilegedMethodInvoker privilegedMethodInvoker=new PrivilegedMethodInvoker(isSetMethod,object,isSetParameters);
    isSet=(Boolean)privilegedMethodInvoker.run();
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
  return isSet.booleanValue();
}

Fixed version (ground truth):
/** 
 * INTERNAL: Indicates if a null value has been set or not.
 * @param object
 * @return boolean (isSet status)
 */
private boolean isSet(Object object){
  Boolean isSet;
  try {
    Class objectClass=object.getClass();
    PrivilegedGetMethod privilegedGetMethod=new PrivilegedGetMethod(objectClass,getIsSetMethodName(),getIsSetParameterTypes(),false,true);
    Method isSetMethod=privilegedGetMethod.run();
    PrivilegedMethodInvoker privilegedMethodInvoker=new PrivilegedMethodInvoker(isSetMethod,object,isSetParameters);
    isSet=(Boolean)privilegedMethodInvoker.run();
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
  return isSet.booleanValue();
}
Program: 68313
Project: 68313
Buggy source:
public void testDeepCopyAfterSetNullComplexChildWithBidirectionalChild_generatingLinkedDisjointTrees(){
  root.set("String_Node_Str",null);
  SDODataObject copyOfRoot=(SDODataObject)((SDOCopyHelper)copyHelper).copy(root,getChangeSummary());
  assertTrue(root.isSet("String_Node_Str"));
  assertNotNull(copyOfRoot);
  assertFalse(equalityHelper.equal(root,copyOfRoot));
}

Fixed version (ground truth):
public void testDeepCopyAfterSetNullComplexChildWithBidirectionalChild_generatingLinkedDisjointTrees(){
  root.set("String_Node_Str",null);
  SDODataObject copyOfRoot=(SDODataObject)((SDOCopyHelper)copyHelper).copy(root,getChangeSummary());
  assertFalse(root.isSet("String_Node_Str"));
  assertNotNull(copyOfRoot);
  assertFalse(equalityHelper.equal(root,copyOfRoot));
}
Program: 68314
Project: 68314
Buggy source:
public void testDeepEqualWithSetNullComplexChild(){
  root.set("String_Node_Str",null);
  SDODataObject copyOfRoot=(SDODataObject)copyHelper.copy(root);
  assertTrue(root.isSet("String_Node_Str"));
  assertNotNull(copyOfRoot);
  assertTrue(equalityHelper.equal(root,copyOfRoot));
}

Fixed version (ground truth):
public void testDeepEqualWithSetNullComplexChild(){
  root.set("String_Node_Str",null);
  SDODataObject copyOfRoot=(SDODataObject)copyHelper.copy(root);
  assertFalse(root.isSet("String_Node_Str"));
  assertNotNull(copyOfRoot);
  assertTrue(equalityHelper.equal(root,copyOfRoot));
}
Program: 68315
Project: 68315
Buggy source:
public void testPOJOValueStoreSetNullPreviouslySet(){
  SDODataObject anEmployee=setupDataObjectWithPOJOValueStore(true,true);
  SDODataObject anAddress=null;
  anEmployee.set(TEST_EMPLOYEE_ADDRESS_FIELD_NAME,anAddress);
  boolean addressSet=anEmployee.isSet(TEST_EMPLOYEE_ADDRESS_FIELD_NAME);
  assertTrue(addressSet);
}

Fixed version (ground truth):
public void testPOJOValueStoreSetNullPreviouslySet(){
  SDODataObject anEmployee=setupDataObjectWithPOJOValueStore(true,true);
  SDODataObject anAddress=null;
  anEmployee.set(TEST_EMPLOYEE_ADDRESS_FIELD_NAME,anAddress);
  boolean addressSet=anEmployee.isSet(TEST_EMPLOYEE_ADDRESS_FIELD_NAME);
  assertFalse(addressSet);
}