nus-yam/ex-repair huggingface dataset:
Program: 66407
Project: 66407
Buggy source:
protected ClassDescriptor buildXMLAnyObjectMappingDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(XMLAnyObjectMapping.class);
  descriptor.getInheritancePolicy().setParentClass(DatabaseMapping.class);
  XMLCompositeObjectMapping fieldMapping=new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("String_Node_Str");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setGetMethodName("String_Node_Str");
  fieldMapping.setSetMethodName("String_Node_Str");
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(fieldMapping);
  return descriptor;
}

Fixed version (ground truth):
protected ClassDescriptor buildXMLAnyObjectMappingDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(XMLAnyObjectMapping.class);
  descriptor.getInheritancePolicy().setParentClass(DatabaseMapping.class);
  XMLCompositeObjectMapping fieldMapping=new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("String_Node_Str");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setGetMethodName("String_Node_Str");
  fieldMapping.setSetMethodName("String_Node_Str");
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  ((XMLField)fieldMapping.getField()).setLeafElementType(fieldQname);
  descriptor.addMapping(fieldMapping);
  return descriptor;
}
Program: 66408
Project: 66408
Buggy source:
protected ClassDescriptor buildParameterExpressionDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(ParameterExpression.class);
  descriptor.setDefaultRootElement("String_Node_Str");
  descriptor.getInheritancePolicy().setParentClass(Expression.class);
  XMLCompositeObjectMapping parameterMapping=new XMLCompositeObjectMapping();
  parameterMapping.setAttributeName("String_Node_Str");
  parameterMapping.setReferenceClass(DatabaseField.class);
  parameterMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(parameterMapping);
  XMLCompositeObjectMapping baseMapping=new XMLCompositeObjectMapping();
  baseMapping.setAttributeName("String_Node_Str");
  baseMapping.setReferenceClass(Expression.class);
  baseMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(baseMapping);
  return descriptor;
}

Fixed version (ground truth):
protected ClassDescriptor buildParameterExpressionDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(ParameterExpression.class);
  descriptor.setDefaultRootElement("String_Node_Str");
  descriptor.getInheritancePolicy().setParentClass(Expression.class);
  XMLCompositeObjectMapping parameterMapping=new XMLCompositeObjectMapping();
  parameterMapping.setAttributeName("String_Node_Str");
  parameterMapping.setReferenceClass(DatabaseField.class);
  parameterMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  ((XMLField)parameterMapping.getField()).setLeafElementType(fieldQname);
  descriptor.addMapping(parameterMapping);
  XMLCompositeObjectMapping baseMapping=new XMLCompositeObjectMapping();
  baseMapping.setAttributeName("String_Node_Str");
  baseMapping.setReferenceClass(Expression.class);
  baseMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(baseMapping);
  return descriptor;
}
Program: 66409
Project: 66409
Buggy source:
protected ClassDescriptor buildQueryKeyReferenceDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(QueryKeyReference.class);
  descriptor.setDefaultRootElement("String_Node_Str");
  XMLCompositeObjectMapping keyMapping=new XMLCompositeObjectMapping();
  keyMapping.setAttributeName("String_Node_Str");
  keyMapping.setGetMethodName("String_Node_Str");
  keyMapping.setSetMethodName("String_Node_Str");
  keyMapping.setReferenceClass(DatabaseField.class);
  keyMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(keyMapping);
  XMLDirectMapping valueMapping=new XMLDirectMapping();
  valueMapping.setAttributeName("String_Node_Str");
  valueMapping.setGetMethodName("String_Node_Str");
  valueMapping.setSetMethodName("String_Node_Str");
  valueMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(valueMapping);
  return descriptor;
}

Fixed version (ground truth):
protected ClassDescriptor buildQueryKeyReferenceDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(QueryKeyReference.class);
  descriptor.setDefaultRootElement("String_Node_Str");
  XMLCompositeObjectMapping keyMapping=new XMLCompositeObjectMapping();
  keyMapping.setAttributeName("String_Node_Str");
  keyMapping.setGetMethodName("String_Node_Str");
  keyMapping.setSetMethodName("String_Node_Str");
  keyMapping.setReferenceClass(DatabaseField.class);
  keyMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  ((XMLField)keyMapping.getField()).setLeafElementType(fieldQname);
  descriptor.addMapping(keyMapping);
  XMLDirectMapping valueMapping=new XMLDirectMapping();
  valueMapping.setAttributeName("String_Node_Str");
  valueMapping.setGetMethodName("String_Node_Str");
  valueMapping.setSetMethodName("String_Node_Str");
  valueMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(valueMapping);
  return descriptor;
}
Program: 66410
Project: 66410
Buggy source:
protected ClassDescriptor buildDatabaseFieldDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(DatabaseField.class);
  descriptor.setDefaultRootElement("String_Node_Str");
  descriptor.getInheritancePolicy().setClassIndicatorField(new XMLField("String_Node_Str"));
  descriptor.getInheritancePolicy().addClassIndicator(DatabaseField.class,getSecondaryNamespaceXPath() + "String_Node_Str");
  descriptor.getInheritancePolicy().addClassIndicator(XMLField.class,getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.getInheritancePolicy().addClassIndicator(XMLUnionField.class,getPrimaryNamespaceXPath() + "String_Node_Str");
  XMLDirectMapping tableMapping=new XMLDirectMapping();
  tableMapping.setAttributeName("String_Node_Str");
  tableMapping.setGetMethodName("String_Node_Str");
  tableMapping.setSetMethodName("String_Node_Str");
  tableMapping.setXPath("String_Node_Str");
  tableMapping.setNullValue("String_Node_Str");
  descriptor.addMapping(tableMapping);
  XMLDirectMapping nameMapping=new XMLDirectMapping();
  nameMapping.setAttributeName("String_Node_Str");
  nameMapping.setGetMethodName("String_Node_Str");
  nameMapping.setSetMethodName("String_Node_Str");
  nameMapping.setXPath("String_Node_Str");
  nameMapping.getNullPolicy().setNullRepresentedByEmptyNode(false);
  descriptor.addMapping(nameMapping);
  return descriptor;
}

Fixed version (ground truth):
protected ClassDescriptor buildDatabaseFieldDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(DatabaseField.class);
  descriptor.setDefaultRootElement("String_Node_Str");
  descriptor.getInheritancePolicy().setClassIndicatorField(new XMLField("String_Node_Str"));
  descriptor.getInheritancePolicy().addClassIndicator(DatabaseField.class,getSecondaryNamespaceXPath() + "String_Node_Str");
  descriptor.getInheritancePolicy().addClassIndicator(XMLField.class,getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.getInheritancePolicy().addClassIndicator(XMLUnionField.class,getPrimaryNamespaceXPath() + "String_Node_Str");
  XMLSchemaReference reference=new XMLSchemaClassPathReference();
  reference.setSchemaContext("String_Node_Str" + getSecondaryNamespaceXPath() + "String_Node_Str");
  descriptor.setSchemaReference(reference);
  XMLDirectMapping tableMapping=new XMLDirectMapping();
  tableMapping.setAttributeName("String_Node_Str");
  tableMapping.setGetMethodName("String_Node_Str");
  tableMapping.setSetMethodName("String_Node_Str");
  tableMapping.setXPath("String_Node_Str");
  tableMapping.setNullValue("String_Node_Str");
  descriptor.addMapping(tableMapping);
  XMLDirectMapping nameMapping=new XMLDirectMapping();
  nameMapping.setAttributeName("String_Node_Str");
  nameMapping.setGetMethodName("String_Node_Str");
  nameMapping.setSetMethodName("String_Node_Str");
  nameMapping.setXPath("String_Node_Str");
  nameMapping.getNullPolicy().setNullRepresentedByEmptyNode(false);
  descriptor.addMapping(nameMapping);
  return descriptor;
}
Program: 66411
Project: 66411
Buggy source:
protected ClassDescriptor buildReferenceMappingDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(ReferenceMapping.class);
  descriptor.getInheritancePolicy().setParentClass(ObjectReferenceMapping.class);
  XMLCompositeObjectMapping fieldMapping=new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("String_Node_Str");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setGetMethodName("String_Node_Str");
  fieldMapping.setSetMethodName("String_Node_Str");
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(fieldMapping);
  return descriptor;
}

Fixed version (ground truth):
protected ClassDescriptor buildReferenceMappingDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(ReferenceMapping.class);
  descriptor.getInheritancePolicy().setParentClass(ObjectReferenceMapping.class);
  XMLCompositeObjectMapping fieldMapping=new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("String_Node_Str");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setGetMethodName("String_Node_Str");
  fieldMapping.setSetMethodName("String_Node_Str");
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  ((XMLField)fieldMapping.getField()).setLeafElementType(fieldQname);
  descriptor.addMapping(fieldMapping);
  return descriptor;
}
Program: 66412
Project: 66412
Buggy source:
protected ClassDescriptor buildXMLAnyCollectionMappingDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(XMLAnyCollectionMapping.class);
  descriptor.getInheritancePolicy().setParentClass(DatabaseMapping.class);
  XMLCompositeObjectMapping fieldMapping=new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("String_Node_Str");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setGetMethodName("String_Node_Str");
  fieldMapping.setSetMethodName("String_Node_Str");
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(fieldMapping);
  XMLCompositeObjectMapping containerPolicyMapping=new XMLCompositeObjectMapping();
  containerPolicyMapping.setAttributeName("String_Node_Str");
  containerPolicyMapping.setGetMethodName("String_Node_Str");
  containerPolicyMapping.setSetMethodName("String_Node_Str");
  containerPolicyMapping.setReferenceClass(ContainerPolicy.class);
  containerPolicyMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(containerPolicyMapping);
  return descriptor;
}

Fixed version (ground truth):
protected ClassDescriptor buildXMLAnyCollectionMappingDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(XMLAnyCollectionMapping.class);
  descriptor.getInheritancePolicy().setParentClass(DatabaseMapping.class);
  XMLCompositeObjectMapping fieldMapping=new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("String_Node_Str");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setGetMethodName("String_Node_Str");
  fieldMapping.setSetMethodName("String_Node_Str");
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  ((XMLField)fieldMapping.getField()).setLeafElementType(fieldQname);
  descriptor.addMapping(fieldMapping);
  XMLCompositeObjectMapping containerPolicyMapping=new XMLCompositeObjectMapping();
  containerPolicyMapping.setAttributeName("String_Node_Str");
  containerPolicyMapping.setGetMethodName("String_Node_Str");
  containerPolicyMapping.setSetMethodName("String_Node_Str");
  containerPolicyMapping.setReferenceClass(ContainerPolicy.class);
  containerPolicyMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(containerPolicyMapping);
  return descriptor;
}
Program: 66414
Project: 66414
Buggy source:
protected ClassDescriptor buildXMLAnyAttributeMappingDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(XMLAnyAttributeMapping.class);
  descriptor.getInheritancePolicy().setParentClass(DatabaseMapping.class);
  XMLCompositeObjectMapping fieldMapping=new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("String_Node_Str");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setGetMethodName("String_Node_Str");
  fieldMapping.setSetMethodName("String_Node_Str");
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(fieldMapping);
  XMLCompositeObjectMapping containerPolicyMapping=new XMLCompositeObjectMapping();
  containerPolicyMapping.setAttributeName("String_Node_Str");
  containerPolicyMapping.setGetMethodName("String_Node_Str");
  containerPolicyMapping.setSetMethodName("String_Node_Str");
  containerPolicyMapping.setReferenceClass(ContainerPolicy.class);
  containerPolicyMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(containerPolicyMapping);
  return descriptor;
}

Fixed version (ground truth):
protected ClassDescriptor buildXMLAnyAttributeMappingDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(XMLAnyAttributeMapping.class);
  descriptor.getInheritancePolicy().setParentClass(DatabaseMapping.class);
  XMLCompositeObjectMapping fieldMapping=new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("String_Node_Str");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setGetMethodName("String_Node_Str");
  fieldMapping.setSetMethodName("String_Node_Str");
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  ((XMLField)fieldMapping.getField()).setLeafElementType(fieldQname);
  descriptor.addMapping(fieldMapping);
  XMLCompositeObjectMapping containerPolicyMapping=new XMLCompositeObjectMapping();
  containerPolicyMapping.setAttributeName("String_Node_Str");
  containerPolicyMapping.setGetMethodName("String_Node_Str");
  containerPolicyMapping.setSetMethodName("String_Node_Str");
  containerPolicyMapping.setReferenceClass(ContainerPolicy.class);
  containerPolicyMapping.setXPath(getPrimaryNamespaceXPath() + "String_Node_Str");
  descriptor.addMapping(containerPolicyMapping);
  return descriptor;
}
Program: 66415
Project: 66415
Buggy source:
/** 
 * Initialize the logger: - add a handler that writes log entries to a file - register a hook to clean up the lock file on system exit
 */
private void configureLoggerForLaunch(){
  FileHandler fileHandler;
  try {
    fileHandler=new FileHandler(System.getProperty("String_Node_Str") + "String_Node_Str",50000,1,true);
  }
 catch (  IOException ex) {
    throw new RuntimeException(ex);
  }
  FileHandlerCleanup.register(fileHandler);
  fileHandler.setFormatter(new SimpleFormatter());
  this.logger.addHandler(fileHandler);
}

Fixed version (ground truth):
/** 
 * Initialize the logger: - add a handler that writes log entries to a file - register a hook to clean up the lock file on system exit
 */
private void configureLoggerForLaunch(){
  FileHandler fileHandler;
  try {
    fileHandler=new FileHandler(System.getProperty("String_Node_Str") + "String_Node_Str",50000,1,true);
  }
 catch (  IOException ex) {
    throw new RuntimeException(ex);
  }
  String version=System.getProperty("String_Node_Str");
  if (version.startsWith("String_Node_Str")) {
    FileHandlerCleanup.register(fileHandler);
  }
  fileHandler.setFormatter(new SimpleFormatter());
  this.logger.addHandler(fileHandler);
}
Program: 66417
Project: 66417
Buggy source:
/** 
 * Inherited suite method for generating all test cases.
 * @return
 */
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(new TestSuite(PurchaseOrderComplexDefineTestCases.class));
  suite.addTest(new TestSuite(PurchaseOrderDefineTestCases.class));
  suite.addTest(new TestSuite(PurchaseOrderWithAnnotationsDefineTestCases.class));
  suite.addTest(new TestSuite(DefineWithImportsTestCases.class));
  suite.addTest(new TestSuite(DefineWithIncludesTestCases.class));
  suite.addTest(new TestSuite(DefineWithImportsExceptionTestCases.class));
  suite.addTest(new TestSuite(CyclicImportsDefineTestCases.class));
  suite.addTest(new TestSuite(DefineWithBuiltInSchemaLocationTestCases.class));
  suite.addTest(new TestSuite(ClashingNamespacesTestCases.class));
  suite.addTestSuite(MultipleDefineSameTypeTestCases.class);
  suite.addTestSuite(AttributeGroupTestCases.class);
  suite.addTestSuite(CyclicElementRefTestCases.class);
  suite.addTestSuite(CyclicElementRefErrorTestCases.class);
  suite.addTestSuite(DefineWithNestedNamespacesTestCases.class);
  suite.addTestSuite(DefineWithImportsNoSchemaLocationTestCases.class);
  suite.addTestSuite(ComplexImportsAndIncludesTestCases.class);
  suite.addTestSuite(DefineFailsDontRegisterTypesTestCases.class);
  return suite;
}

Fixed version (ground truth):
/** 
 * Inherited suite method for generating all test cases.
 * @return
 */
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(new TestSuite(PurchaseOrderComplexDefineTestCases.class));
  suite.addTest(new TestSuite(PurchaseOrderDefineTestCases.class));
  suite.addTest(new TestSuite(PurchaseOrderWithAnnotationsDefineTestCases.class));
  suite.addTest(new TestSuite(DefineWithImportsTestCases.class));
  suite.addTest(new TestSuite(DefineWithIncludesTestCases.class));
  suite.addTest(new TestSuite(DefineWithImportsExceptionTestCases.class));
  suite.addTest(new TestSuite(CyclicImportsDefineTestCases.class));
  suite.addTest(new TestSuite(DefineWithBuiltInSchemaLocationTestCases.class));
  suite.addTest(new TestSuite(ClashingNamespacesTestCases.class));
  suite.addTestSuite(MultipleDefineSameTypeTestCases.class);
  suite.addTestSuite(AttributeGroupTestCases.class);
  suite.addTestSuite(CyclicElementRefTestCases.class);
  suite.addTestSuite(CyclicElementRefErrorTestCases.class);
  suite.addTestSuite(DefineWithNestedNamespacesTestCases.class);
  suite.addTestSuite(DefineWithImportsNoSchemaLocationTestCases.class);
  suite.addTestSuite(ComplexImportsAndIncludesTestCases.class);
  suite.addTestSuite(DefineFailsDontRegisterTypesTestCases.class);
  suite.addTestSuite(SchemaResolverSystemIdTestCases.class);
  return suite;
}
Program: 66419
Project: 66419
Buggy source:
/** 
 * Allow the SchemaResolver implementation to attempt to return the referenced Schema based on  given source schema, namespace and schemaLocation values from an import or include.  If the resolver fails, this method will attemt to resolve the schema 
 * @param sourceXSD The Source object of the source schema
 * @param namespace The namespace portion of the import/include
 * @param schemaLocation The schemaLocation portion of the import/include
 * @return Source for the referenced Schema or null if processing the referencedschema should be skipped
 */
public Source resolveSchema(Source sourceXSD,String namespace,String schemaLocation){
  addSchemaToList(sourceXSD.getSystemId());
  Source schemaSource=schemaResolver.resolveSchema(sourceXSD,namespace,schemaLocation);
  if (schemaSource != null) {
    String sysId=schemaSource.getSystemId();
    if (shouldProcessSchema(sysId)) {
      return schemaSource;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 */
public Source resolveSchema(String systemId){
  if (!addSchemaToList(systemId)) {
    return null;
  }
  try {
    InputSource source=schemaResolver.resolveEntity(null,systemId);
    if (source != null) {
      return new StreamSource(source.getCharacterStream());
    }
  }
 catch (  Exception ex) {
    throw SDOException.errorResolvingSchema(ex);
  }
  return null;
}
Program: 66421
Project: 66421
Buggy source:
public static TestSuite getDeleteObjectTestSuite(){
  TestSuite suite=new TestSuite();
  suite.setName("String_Node_Str");
  suite.setDescription("String_Node_Str");
  PopulationManager manager=PopulationManager.getDefaultManager();
  suite.addTest(new DeleteObjectTest(manager.getObject(Employee.class,"String_Node_Str")));
  suite.addTest(new DeleteObjectTest(manager.getObject(Employee.class,"String_Node_Str")));
  suite.addTest(new DeleteObjectTest(manager.getObject(Employee.class,"String_Node_Str")));
  suite.addTest(new DeleteObjectTest(manager.getObject(Computer.class,"String_Node_Str")));
  suite.addTest(new DeleteObjectTest(manager.getObject(Shipment.class,"String_Node_Str")));
  suite.addTest(new MTMPrivateOwnedWithValueholderDeleteObjectTest());
  return suite;
}

Fixed version (ground truth):
public static TestSuite getDeleteObjectTestSuite(){
  TestSuite suite=new TestSuite();
  suite.setName("String_Node_Str");
  suite.setDescription("String_Node_Str");
  PopulationManager manager=PopulationManager.getDefaultManager();
  suite.addTest(new DeleteObjectTest(manager.getObject(Employee.class,"String_Node_Str")));
  suite.addTest(new DeleteObjectTest(manager.getObject(Employee.class,"String_Node_Str")));
  suite.addTest(new DeleteObjectTest(manager.getObject(Employee.class,"String_Node_Str")));
  suite.addTest(new DeleteObjectTest(manager.getObject(Computer.class,"String_Node_Str")));
  suite.addTest(new DeleteObjectTest(manager.getObject(Shipment.class,"String_Node_Str")));
  suite.addTest(new MTMPrivateOwnedWithValueholderDeleteObjectTest());
  suite.addTest(new DirectCollectionMappingDeleteNullValueTest());
  return suite;
}
Program: 66425
Project: 66425
Buggy source:
/** 
 * INTERNAL: The mapping clones itself to create deep copy.
 */
@Override public Object clone(){
  DirectCollectionMapping clone=(DirectCollectionMapping)super.clone();
  clone.setSourceKeyFields(cloneFields(getSourceKeyFields()));
  clone.setReferenceKeyFields(cloneFields(getReferenceKeyFields()));
  if (this.changeSetDeleteQuery != null) {
    clone.changeSetDeleteQuery=(ModifyQuery)this.changeSetDeleteQuery.clone();
  }
  if (this.deleteAtIndexQuery != null) {
    clone.deleteAtIndexQuery=(ModifyQuery)this.deleteAtIndexQuery.clone();
  }
  if (this.updateAtIndexQuery != null) {
    clone.updateAtIndexQuery=(ModifyQuery)this.updateAtIndexQuery.clone();
  }
  return clone;
}

Fixed version (ground truth):
/** 
 * INTERNAL: The mapping clones itself to create deep copy.
 */
@Override public Object clone(){
  DirectCollectionMapping clone=(DirectCollectionMapping)super.clone();
  clone.setSourceKeyFields(cloneFields(getSourceKeyFields()));
  clone.setReferenceKeyFields(cloneFields(getReferenceKeyFields()));
  if (this.changeSetDeleteQuery != null) {
    clone.changeSetDeleteQuery=(ModifyQuery)this.changeSetDeleteQuery.clone();
  }
  if (this.changeSetDeleteNullQuery != null) {
    clone.changeSetDeleteNullQuery=(ModifyQuery)this.changeSetDeleteNullQuery.clone();
  }
  if (this.deleteAtIndexQuery != null) {
    clone.deleteAtIndexQuery=(ModifyQuery)this.deleteAtIndexQuery.clone();
  }
  if (this.updateAtIndexQuery != null) {
    clone.updateAtIndexQuery=(ModifyQuery)this.updateAtIndexQuery.clone();
  }
  return clone;
}
Program: 66429
Project: 66429
Buggy source:
public boolean marshalSingleValue(XPathFragment xPathFragment,MarshalRecord marshalRecord,Object object,Object targetObject,AbstractSession session,NamespaceResolver namespaceResolver,MarshalContext marshalContext){
  Object fieldValue=xmlObjectReferenceMapping.buildFieldValue(targetObject,xmlField,session);
  if (fieldValue == null) {
    if (null != targetObject) {
      XMLField fkField=(XMLField)xmlObjectReferenceMapping.getSourceToTargetKeyFieldAssociations().get(xmlField);
      fieldValue=marshalRecord.getMarshaller().getXMLContext().getValueByXPath(targetObject,fkField.getXPath(),fkField.getNamespaceResolver(),Object.class);
    }
    if (null == fieldValue) {
      return false;
    }
  }
  QName schemaType=getSchemaType(xmlField,fieldValue,session);
  String stringValue=getValueToWrite(schemaType,fieldValue,(XMLConversionManager)session.getDatasourcePlatform().getConversionManager(),namespaceResolver);
  XPathFragment groupingFragment=marshalRecord.openStartGroupingElements(namespaceResolver);
  if (xPathFragment.isAttribute()) {
    marshalRecord.attribute(xPathFragment,namespaceResolver,stringValue);
    marshalRecord.closeStartGroupingElements(groupingFragment);
  }
 else {
    marshalRecord.closeStartGroupingElements(groupingFragment);
    marshalRecord.characters(stringValue);
  }
  return true;
}

Fixed version (ground truth):
public boolean marshalSingleValue(XPathFragment xPathFragment,MarshalRecord marshalRecord,Object object,Object targetObject,AbstractSession session,NamespaceResolver namespaceResolver,MarshalContext marshalContext){
  Object fieldValue=xmlObjectReferenceMapping.buildFieldValue(targetObject,xmlField,session);
  if (fieldValue == null) {
    if (null != targetObject) {
      XMLField fkField=(XMLField)xmlObjectReferenceMapping.getSourceToTargetKeyFieldAssociations().get(xmlField);
      if (null == fkField) {
        XMLDescriptor targetDescriptor=(XMLDescriptor)session.getDescriptor(targetObject);
        fieldValue=marshalRecord.getMarshaller().getXMLContext().getValueByXPath(targetObject,targetDescriptor.getPrimaryKeyFields().get(0).getName(),targetDescriptor.getNamespaceResolver(),Object.class);
      }
 else {
        fieldValue=marshalRecord.getMarshaller().getXMLContext().getValueByXPath(targetObject,fkField.getXPath(),fkField.getNamespaceResolver(),Object.class);
      }
    }
    if (null == fieldValue) {
      return false;
    }
  }
  QName schemaType=getSchemaType(xmlField,fieldValue,session);
  String stringValue=getValueToWrite(schemaType,fieldValue,(XMLConversionManager)session.getDatasourcePlatform().getConversionManager(),namespaceResolver);
  XPathFragment groupingFragment=marshalRecord.openStartGroupingElements(namespaceResolver);
  if (xPathFragment.isAttribute()) {
    marshalRecord.attribute(xPathFragment,namespaceResolver,stringValue);
    marshalRecord.closeStartGroupingElements(groupingFragment);
  }
 else {
    marshalRecord.closeStartGroupingElements(groupingFragment);
    marshalRecord.characters(stringValue);
  }
  return true;
}
Program: 66433
Project: 66433
Buggy source:
public void updateAttributeWithObjectTest(){
  EntityManager em=createEntityManager("String_Node_Str");
  ServerSession session=(ServerSession)JpaHelper.getServerSession(em.getEntityManagerFactory());
  ClassDescriptor descriptor=session.getDescriptor(Employee.class);
  UpdateListener listener=new UpdateListener();
  descriptor.getEventManager().addListener(listener);
  beginTransaction(em);
  Employee emp=new Employee();
  emp.setFirstName("String_Node_Str");
  EmploymentPeriod period=new EmploymentPeriod();
  period.setStartDate(Date.valueOf("String_Node_Str"));
  period.setEndDate(Date.valueOf("String_Node_Str"));
  emp.setPeriod(period);
  em.persist(emp);
  em.flush();
  em.clear();
  emp=em.find(Employee.class,emp.getId());
  emp.setFirstName("String_Node_Str");
  em.flush();
  em.refresh(emp);
  assertTrue("String_Node_Str",emp.getPeriod().getStartDate().equals(Date.valueOf("String_Node_Str")) && emp.getPeriod().getEndDate().equals(Date.valueOf("String_Node_Str")));
  em.getTransaction().rollback();
  descriptor.getEventManager().removeListener(listener);
}

Fixed version (ground truth):
public void updateAttributeWithObjectTest(){
  EntityManagerFactory factory=getEntityManagerFactory("String_Node_Str");
  EntityManager em=factory.createEntityManager();
  ServerSession session=(ServerSession)JpaHelper.getServerSession(factory);
  ClassDescriptor descriptor=session.getDescriptor(Employee.class);
  UpdateListener listener=new UpdateListener();
  descriptor.getEventManager().addListener(listener);
  beginTransaction(em);
  Employee emp=new Employee();
  emp.setFirstName("String_Node_Str");
  EmploymentPeriod period=new EmploymentPeriod();
  period.setStartDate(Date.valueOf("String_Node_Str"));
  period.setEndDate(Date.valueOf("String_Node_Str"));
  emp.setPeriod(period);
  em.persist(emp);
  em.flush();
  em.clear();
  emp=em.find(Employee.class,emp.getId());
  emp.setFirstName("String_Node_Str");
  em.flush();
  em.refresh(emp);
  assertTrue("String_Node_Str",emp.getPeriod().getStartDate().equals(Date.valueOf("String_Node_Str")) && emp.getPeriod().getEndDate().equals(Date.valueOf("String_Node_Str")));
  em.getTransaction().rollback();
  descriptor.getEventManager().removeListener(listener);
}
Program: 66434
Project: 66434
Buggy source:
public void updateAttributeWithObjectTest(){
  EntityManagerFactory factory=getEntityManagerFactory("String_Node_Str");
  EntityManager em=factory.createEntityManager();
  ServerSession session=(ServerSession)JpaHelper.getServerSession(factory);
  ClassDescriptor descriptor=session.getDescriptor(Employee.class);
  UpdateListener listener=new UpdateListener();
  descriptor.getEventManager().addListener(listener);
  beginTransaction(em);
  Employee emp=new Employee();
  emp.setFirstName("String_Node_Str");
  EmploymentPeriod period=new EmploymentPeriod();
  period.setStartDate(Date.valueOf("String_Node_Str"));
  period.setEndDate(Date.valueOf("String_Node_Str"));
  emp.setPeriod(period);
  em.persist(emp);
  em.flush();
  em.clear();
  emp=em.find(Employee.class,emp.getId());
  emp.setFirstName("String_Node_Str");
  em.flush();
  em.refresh(emp);
  assertTrue("String_Node_Str",emp.getPeriod().getStartDate().equals(Date.valueOf("String_Node_Str")) && emp.getPeriod().getEndDate().equals(Date.valueOf("String_Node_Str")));
  rollbackTransaction(em);
  descriptor.getEventManager().removeListener(listener);
}

Fixed version (ground truth):
public void updateAttributeWithObjectTest(){
  EntityManagerFactory factory=getEntityManagerFactory("String_Node_Str");
  EntityManager em=factory.createEntityManager();
  ServerSession session=JUnitTestCase.getServerSession("String_Node_Str");
  ClassDescriptor descriptor=session.getDescriptor(Employee.class);
  UpdateListener listener=new UpdateListener();
  descriptor.getEventManager().addListener(listener);
  beginTransaction(em);
  Employee emp=new Employee();
  emp.setFirstName("String_Node_Str");
  EmploymentPeriod period=new EmploymentPeriod();
  period.setStartDate(Date.valueOf("String_Node_Str"));
  period.setEndDate(Date.valueOf("String_Node_Str"));
  emp.setPeriod(period);
  em.persist(emp);
  em.flush();
  em.clear();
  emp=em.find(Employee.class,emp.getId());
  emp.setFirstName("String_Node_Str");
  em.flush();
  em.refresh(emp);
  assertTrue("String_Node_Str",emp.getPeriod().getStartDate().equals(Date.valueOf("String_Node_Str")) && emp.getPeriod().getEndDate().equals(Date.valueOf("String_Node_Str")));
  rollbackTransaction(em);
  descriptor.getEventManager().removeListener(listener);
}
Program: 66435
Project: 66435
Buggy source:
/** 
 * @return Returns the wrapperByteArray2Blob.
 */
@Basic @Column(name="String_Node_Str") @Lob @Mutable public Byte[] getWrapperByteArray2Blob(){
  return _wrapperByteArray2Blob;
}

Fixed version (ground truth):
/** 
 * @return Returns the wrapperByteArray2Blob.
 */
@Basic @Column(name="String_Node_Str",length=65535) @Lob @Mutable public Byte[] getWrapperByteArray2Blob(){
  return _wrapperByteArray2Blob;
}
Program: 66436
Project: 66436
Buggy source:
/** 
 * @return Returns the serializable.
 */
@Basic @Column(name="String_Node_Str") @Lob public Serializable getSerializable(){
  return _serializable;
}

Fixed version (ground truth):
/** 
 * @return Returns the serializable.
 */
@Basic @Column(name="String_Node_Str",length=65535) @Lob public Serializable getSerializable(){
  return _serializable;
}
Program: 66437
Project: 66437
Buggy source:
/** 
 * @return Returns the primitiveByteArray2Blob.
 */
@Basic @Column(name="String_Node_Str") @Lob @Mutable public byte[] getPrimitiveByteArray2Blob(){
  return _primitiveByteArray2Blob;
}

Fixed version (ground truth):
/** 
 * @return Returns the primitiveByteArray2Blob.
 */
@Basic @Column(name="String_Node_Str",length=65535) @Lob @Mutable public byte[] getPrimitiveByteArray2Blob(){
  return _primitiveByteArray2Blob;
}
Program: 66438
Project: 66438
Buggy source:
/** 
 * INTERNAL: This method should only be called when using name access and presumably for dynamic persistence. No method validation is done and either the access methods specified or the default get and set methods for name access will be used.
 */
protected MetadataMethod getAccessibleNameMethod(MappingAccessor accessor){
  AccessMethodsMetadata accessMethods=accessor.getAccessMethods();
  MetadataMethod getMethod=new MetadataMethod(getMetadataFactory(),getJavaClass());
  MetadataMethod setMethod=new MetadataMethod(getMetadataFactory(),getJavaClass());
  getMethod.setSetMethod(setMethod);
  getMethod.setAttributeName(accessor.getName());
  if (accessMethods != null) {
    getMethod.setName(accessMethods.getGetMethodName());
    setMethod.setName(accessMethods.getSetMethodName());
  }
 else {
    getMethod.setName(MetadataMethod.DEFAULT_NAME_ACCESS_GET_METHOD);
    setMethod.setName(MetadataMethod.DEFAULT_NAME_ACCESS_SET_METHOD);
  }
  if (accessor.getRawClass() == null) {
    throw ValidationException.noAttributeTypeSpecification(accessor.getAttributeName(),getJavaClassName(),getLocation());
  }
  return getMethod;
}

Fixed version (ground truth):
/** 
 * INTERNAL: This method should only be called when using name access and presumably for dynamic persistence. No method validation is done and either the access methods specified or the default get and set methods for name access will be used.
 */
protected MetadataMethod getAccessibleNameMethod(MappingAccessor accessor){
  AccessMethodsMetadata accessMethods=accessor.getAccessMethods();
  MetadataMethod getMethod=new MetadataMethod(getMetadataFactory(),getJavaClass());
  MetadataMethod setMethod=new MetadataMethod(getMetadataFactory(),getJavaClass());
  getMethod.setSetMethod(setMethod);
  getMethod.setAttributeName(accessor.getName());
  if (accessMethods != null) {
    getMethod.setName(accessMethods.getGetMethodName());
    setMethod.setName(accessMethods.getSetMethodName());
  }
 else {
    getMethod.setName(MetadataMethod.DEFAULT_VIRTUAL_ACCESS_GET_METHOD);
    setMethod.setName(MetadataMethod.DEFAULT_VIRTUAL_ACCESS_SET_METHOD);
  }
  if (accessor.getRawClass() == null) {
    throw ValidationException.noAttributeTypeSpecification(accessor.getAttributeName(),getJavaClassName(),getLocation());
  }
  return getMethod;
}
Program: 66439
Project: 66439
Buggy source:
/** 
 * INTERNAL: Add the accessors from this class accessors java class to the descriptor tied to this class accessor. This method is called for every class accessor and is also called from parent class accessors to each of its subclasses of a TABLE_PER_CLASS inheritance strategy. Add accessors is called in the preProcess stage and must not be called until its owning class accessor has processed its access type.
 */
public void addAccessors(){
  if (m_attributes != null) {
    for (    MappingAccessor accessor : m_attributes.getAccessors()) {
      MetadataAccessibleObject accessibleObject=null;
      accessor.initXMLMappingAccessor(this);
      if (accessor.usesVirtualAccess()) {
        accessibleObject=getAccessibleNameMethod(accessor);
      }
 else       if (accessor.usesPropertyAccess()) {
        accessibleObject=getAccessibleMethod(accessor);
      }
 else {
        accessibleObject=getAccessibleField(accessor);
      }
      if (accessibleObject != null) {
        accessor.initXMLObject(accessibleObject,getEntityMappings());
        accessor.initAccess();
        addAccessor(accessor);
      }
    }
  }
  if (!usesNameAccess()) {
    if (usesPropertyAccess()) {
      addAccessorMethods(false);
    }
 else {
      addAccessorFields(false);
    }
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Add the accessors from this class accessors java class to the descriptor tied to this class accessor. This method is called for every class accessor and is also called from parent class accessors to each of its subclasses of a TABLE_PER_CLASS inheritance strategy. Add accessors is called in the preProcess stage and must not be called until its owning class accessor has processed its access type.
 */
public void addAccessors(){
  if (m_attributes != null) {
    for (    MappingAccessor accessor : m_attributes.getAccessors()) {
      MetadataAccessibleObject accessibleObject=null;
      accessor.initXMLMappingAccessor(this);
      if (accessor.usesVirtualAccess()) {
        accessibleObject=getAccessibleNameMethod(accessor);
      }
 else       if (accessor.usesPropertyAccess()) {
        accessibleObject=getAccessibleMethod(accessor);
      }
 else {
        accessibleObject=getAccessibleField(accessor);
      }
      if (accessibleObject != null) {
        accessor.initXMLObject(accessibleObject,getEntityMappings());
        accessor.initAccess();
        addAccessor(accessor);
      }
    }
  }
  if (!usesVirtualAccess()) {
    if (usesPropertyAccess()) {
      addAccessorMethods(false);
    }
 else {
      addAccessorFields(false);
    }
  }
}
Program: 66440
Project: 66440
Buggy source:
/** 
 * INTERNAL: Returns true if this mapping or class uses virtual access. In an  inheritance hierarchy, the subclasses inherit their access type from  the parent (unless there is an explicit access setting).
 */
public boolean usesVirtualAccess(){
  if (hasAccess()) {
    return getAccess().equals(MetadataConstants.VIRTUAL);
  }
 else {
    return m_classAccessor.usesNameAccess();
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Returns true if this mapping or class uses virtual access. In an  inheritance hierarchy, the subclasses inherit their access type from  the parent (unless there is an explicit access setting).
 */
public boolean usesVirtualAccess(){
  if (hasAccess()) {
    return getAccess().equals(MetadataConstants.VIRTUAL);
  }
 else {
    return m_classAccessor.usesVirtualAccess();
  }
}
Program: 66441
Project: 66441
Buggy source:
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);
}

Fixed version (ground truth):
public static void main(String[] args) throws Throwable {
  Listener listener=new Listener();
  int compileSuccess=-1;
  try {
    for (int x=0; x < args.length; x++) {
      if ("String_Node_Str".equals(args[x])) {
        String[] args2=new String[args.length - 1];
        System.arraycopy(args,0,args2,0,x);
        System.arraycopy(args,x + 1,args2,x,args.length - x - 1);
        args=args2;
        break;
      }
    }
    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;
      }
    }
    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: 66442
Project: 66442
Buggy source:
/** 
 * Validates a given instance doc against the generated schema.
 * @param src
 * @param schemaIndex index in output resolver's list of generated schemas
 * @param outputResolver contains one or more schemas to validate against
 */
protected void validateBindingsFileAgainstSchema(InputStream src){
  String result=null;
  SchemaFactory sFact=SchemaFactory.newInstance(XMLConstants.SCHEMA_URL);
  Schema theSchema;
  try {
    theSchema=sFact.newSchema(bindingsFileXSDSource);
    Validator validator=theSchema.newValidator();
    StreamSource ss=new StreamSource(src);
    validator.validate(ss);
  }
 catch (  Exception e) {
    e.printStackTrace();
    if (e.getMessage() == null) {
      result="String_Node_Str";
    }
    result=e.getMessage();
  }
  assertTrue("String_Node_Str" + result,result == null);
}

Fixed version (ground truth):
/** 
 * Validates a given instance doc against the generated schema.
 * @param src
 * @param schemaIndex index in output resolver's list of generated schemas
 * @param outputResolver contains one or more schemas to validate against
 */
protected void validateBindingsFileAgainstSchema(InputStream src){
  String result=null;
  SchemaFactory sFact=SchemaFactory.newInstance(XMLConstants.SCHEMA_URL);
  Schema theSchema;
  try {
    InputStream bindingsFileXSDInputStream=getClass().getClassLoader().getResourceAsStream("String_Node_Str");
    if (bindingsFileXSDInputStream == null) {
      bindingsFileXSDInputStream=getClass().getClassLoader().getResourceAsStream("String_Node_Str");
    }
    if (bindingsFileXSDInputStream == null) {
      fail("String_Node_Str");
    }
    Source bindingsFileXSDSource=new StreamSource(bindingsFileXSDInputStream);
    theSchema=sFact.newSchema(bindingsFileXSDSource);
    Validator validator=theSchema.newValidator();
    StreamSource ss=new StreamSource(src);
    validator.validate(ss);
  }
 catch (  Exception e) {
    e.printStackTrace();
    if (e.getMessage() == null) {
      result="String_Node_Str";
    }
    result=e.getMessage();
  }
  assertTrue("String_Node_Str" + result,result == null);
}
Program: 66443
Project: 66443
Buggy source:
public void setUp() throws Exception {
  DocumentBuilderFactory builderFactory=DocumentBuilderFactory.newInstance();
  builderFactory.setNamespaceAware(true);
  builderFactory.setIgnoringElementContentWhitespace(true);
  parser=builderFactory.newDocumentBuilder();
  xmlComparer=new XMLComparer();
  InputStream bindingsFileXSDInputStream=getClass().getClassLoader().getResourceAsStream("String_Node_Str");
  if (bindingsFileXSDInputStream == null) {
    bindingsFileXSDInputStream=getClass().getClassLoader().getResourceAsStream("String_Node_Str");
  }
  if (bindingsFileXSDInputStream == null) {
    fail("String_Node_Str");
  }
  bindingsFileXSDSource=new StreamSource(bindingsFileXSDInputStream);
}

Fixed version (ground truth):
public void setUp() throws Exception {
  DocumentBuilderFactory builderFactory=DocumentBuilderFactory.newInstance();
  builderFactory.setNamespaceAware(true);
  builderFactory.setIgnoringElementContentWhitespace(true);
  parser=builderFactory.newDocumentBuilder();
  xmlComparer=new XMLComparer();
}
Program: 66444
Project: 66444
Buggy source:
/** 
 * Tests XmlDirectMapping configuration via eclipselink-oxm.xml. Here an unmarshal operation is performed. Utilizes xml-value. xml-attribute and xml-element are tested above. Positive test.
 */
public void testDirectMappingXmlValueUnmarshal(){
  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 e1) {
    e1.printStackTrace();
    fail("String_Node_Str");
  }
  String src=PATH + "String_Node_Str";
  InputStream iDocStream=loader.getResourceAsStream(src);
  if (iDocStream == null) {
    fail("String_Node_Str" + src + "String_Node_Str");
  }
  Price ctrlPrice=getControlPriceObject();
  Unmarshaller unmarshaller=jCtx.createUnmarshaller();
  try {
    Price priceObj=(Price)unmarshaller.unmarshal(iDocStream);
    assertNotNull("String_Node_Str",priceObj);
    assertTrue("String_Node_Str",ctrlPrice.equals(priceObj));
    assertTrue("String_Node_Str",priceObj.wasSetCalled);
  }
 catch (  JAXBException e) {
    e.printStackTrace();
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Tests XmlDirectMapping configuration via eclipselink-oxm.xml. Here an unmarshal operation is performed. Utilizes xml-value. xml-attribute and xml-element are tested above. Positive test.
 */
public void testDirectMappingXmlValueUnmarshal(){
  JAXBContext jCtx=null;
  try {
    jCtx=createContext(new Class[]{Price.class},CONTEXT_PATH,PATH + "String_Node_Str");
  }
 catch (  JAXBException e1) {
    e1.printStackTrace();
    fail("String_Node_Str");
  }
  String src=PATH + "String_Node_Str";
  InputStream iDocStream=loader.getResourceAsStream(src);
  if (iDocStream == null) {
    fail("String_Node_Str" + src + "String_Node_Str");
  }
  Price ctrlPrice=getControlPriceObject();
  Unmarshaller unmarshaller=jCtx.createUnmarshaller();
  try {
    Price priceObj=(Price)unmarshaller.unmarshal(iDocStream);
    assertNotNull("String_Node_Str",priceObj);
    assertTrue("String_Node_Str",ctrlPrice.equals(priceObj));
    assertTrue("String_Node_Str",priceObj.wasSetCalled);
  }
 catch (  JAXBException e) {
    e.printStackTrace();
    fail("String_Node_Str");
  }
}
Program: 66445
Project: 66445
Buggy source:
public void testTeamSchemaGen(){
  try {
    super.setUp();
    String metadataFile=PATH + "String_Node_Str";
    MySchemaOutputResolver oResolver=new MySchemaOutputResolver();
    oResolver=generateSchemaWithFileName(new Class[]{Team.class},CONTEXT_PATH,metadataFile,3);
    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 testTeamSchemaGen(){
  try {
    String metadataFile=PATH + "String_Node_Str";
    MySchemaOutputResolver oResolver=new MySchemaOutputResolver();
    oResolver=generateSchemaWithFileName(new Class[]{Team.class},CONTEXT_PATH,metadataFile,3);
    String controlSchema=PATH + "String_Node_Str";
    compareSchemas(oResolver.schemaFiles.get(EMPTY_NAMESPACE),new File(controlSchema));
  }
 catch (  Exception e) {
    fail("String_Node_Str" + e.getMessage());
  }
}