nus-yam/ex-repair huggingface dataset:
Program: 64402
Project: 64402
Buggy source:
private QName getSchemaType(Field xmlField,Object value,CoreAbstractSession session){
  QName schemaType=null;
  if (xmlField.isTypedTextField()) {
    schemaType=xmlField.getXMLType(value.getClass());
  }
 else   if (xmlField.isUnionField()) {
    return getSchemaTypeForUnion((XMLUnionField)xmlField,value,session);
  }
 else   if (xmlField.getSchemaType() != null) {
    schemaType=xmlField.getSchemaType();
  }
  return schemaType;
}

Fixed version (ground truth):
private QName getSchemaType(Field xmlField,Object value,CoreAbstractSession session){
  QName schemaType=null;
  if (xmlField.isTypedTextField()) {
    schemaType=xmlField.getXMLType(value.getClass());
  }
 else   if (xmlField.isUnionField()) {
    return getSchemaTypeForUnion((UnionField)xmlField,value,session);
  }
 else   if (xmlField.getSchemaType() != null) {
    schemaType=xmlField.getSchemaType();
  }
  return schemaType;
}
Program: 64403
Project: 64403
Buggy source:
private QName getSchemaTypeForUnion(XMLUnionField xmlField,Object value,CoreAbstractSession session){
  ArrayList schemaTypes=xmlField.getSchemaTypes();
  QName schemaType=null;
  QName nextQName;
  Class javaClass;
  for (int i=0; i < schemaTypes.size(); i++) {
    nextQName=(QName)(xmlField).getSchemaTypes().get(i);
    try {
      if (nextQName != null) {
        javaClass=xmlField.getJavaClass(nextQName);
        value=((XMLConversionManager)session.getDatasourcePlatform().getConversionManager()).convertObject(value,javaClass,nextQName);
        schemaType=nextQName;
        break;
      }
    }
 catch (    ConversionException ce) {
      if (i == (schemaTypes.size() - 1)) {
        schemaType=nextQName;
      }
    }
  }
  return schemaType;
}

Fixed version (ground truth):
private QName getSchemaTypeForUnion(UnionField xmlField,Object value,CoreAbstractSession session){
  List schemaTypes=xmlField.getSchemaTypes();
  QName schemaType=null;
  QName nextQName;
  Class javaClass;
  for (int i=0; i < schemaTypes.size(); i++) {
    nextQName=(QName)xmlField.getSchemaTypes().get(i);
    try {
      if (nextQName != null) {
        javaClass=xmlField.getJavaClass(nextQName);
        value=((XMLConversionManager)session.getDatasourcePlatform().getConversionManager()).convertObject(value,javaClass,nextQName);
        schemaType=nextQName;
        break;
      }
    }
 catch (    ConversionException ce) {
      if (i == (schemaTypes.size() - 1)) {
        schemaType=nextQName;
      }
    }
  }
  return schemaType;
}
Program: 64404
Project: 64404
Buggy source:
public AbstractDirectMapping getDirectMapping(){
  return directMapping;
}

Fixed version (ground truth):
public DirectMapping getDirectMapping(){
  return directMapping;
}
Program: 64407
Project: 64407
Buggy source:
public void setNullValue(Object object,CoreSession session){
  Object value=xmlBinaryDataMapping.getObjectValue(null,(Session)session);
  xmlBinaryDataMapping.setAttributeValueInObject(object,value);
}

Fixed version (ground truth):
public void setNullValue(Object object,CoreSession session){
  Object value=xmlBinaryDataMapping.getObjectValue(null,session);
  xmlBinaryDataMapping.setAttributeValueInObject(object,value);
}
Program: 64413
Project: 64413
Buggy source:
/** 
 * Return this Unmarshaller's custom IDResolver.
 * @see IDResolver
 * @since 2.3.3
 * @return the custom IDResolver, or null if one has not been specified.
 */
public abstract IDResolver getIDResolver();

Fixed version (ground truth):
/** 
 * Return this Unmarshaller's custom IDResolver.
 * @see IDResolver
 * @since 2.3.3
 * @return the custom IDResolver, or null if one has not been specified.
 */
public abstract ID_RESOLVER getIDResolver();
Program: 64414
Project: 64414
Buggy source:
public abstract XMLUnmarshallerHandler getUnmarshallerHandler();

Fixed version (ground truth):
public abstract UNMARSHALLER_HANDLER getUnmarshallerHandler();
Program: 64415
Project: 64415
Buggy source:
public void resolveReferences(ABSTRACT_SESSION session,IDResolver idResolver);

Fixed version (ground truth):
public void resolveReferences(ABSTRACT_SESSION session,ID_RESOLVER idResolver);
Program: 64416
Project: 64416
Buggy source:
/** 
 * INTERNAL: Private function to process or create an entry in the NamespaceResolver for the xsi prefix.
 * @param namespaceResolver
 * @return xsi prefix
 */
protected String processNamespaceResolverForXSIPrefix(NamespaceResolver namespaceResolver,MarshalRecord marshalRecord){
  String xsiPrefix;
  if (null == namespaceResolver) {
    xsiPrefix=Constants.SCHEMA_INSTANCE_PREFIX;
    namespaceResolver=new org.eclipse.persistence.oxm.NamespaceResolver();
    namespaceResolver.put(xsiPrefix,javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
    marshalRecord.namespaceDeclaration(xsiPrefix,javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
  }
 else {
    xsiPrefix=namespaceResolver.resolveNamespaceURI(javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
    if (null == xsiPrefix) {
      xsiPrefix=namespaceResolver.generatePrefix(Constants.SCHEMA_INSTANCE_PREFIX);
      marshalRecord.namespaceDeclaration(xsiPrefix,javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
    }
  }
  return xsiPrefix;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Private function to process or create an entry in the NamespaceResolver for the xsi prefix.
 * @param namespaceResolver
 * @return xsi prefix
 */
protected String processNamespaceResolverForXSIPrefix(NamespaceResolver namespaceResolver,MarshalRecord marshalRecord){
  String xsiPrefix;
  if (null == namespaceResolver) {
    xsiPrefix=Constants.SCHEMA_INSTANCE_PREFIX;
    marshalRecord.namespaceDeclaration(xsiPrefix,javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
  }
 else {
    xsiPrefix=namespaceResolver.resolveNamespaceURI(javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
    if (null == xsiPrefix) {
      xsiPrefix=namespaceResolver.generatePrefix(Constants.SCHEMA_INSTANCE_PREFIX);
      marshalRecord.namespaceDeclaration(xsiPrefix,javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
    }
  }
  return xsiPrefix;
}
Program: 64418
Project: 64418
Buggy source:
public NamespaceResolver getNamespaceResolver(){
  NamespaceResolver namespaceResolver=null;
  if (isXmlDescriptor()) {
    namespaceResolver=((Descriptor)getDescriptor()).getNamespaceResolver();
  }
 else   if (getDescriptor() instanceof org.eclipse.persistence.eis.EISDescriptor) {
    namespaceResolver=((org.eclipse.persistence.eis.EISDescriptor)getDescriptor()).getNamespaceResolver();
  }
  return namespaceResolver;
}

Fixed version (ground truth):
public NamespaceResolver getNamespaceResolver(){
  NamespaceResolver namespaceResolver=null;
  if (isXmlDescriptor()) {
    namespaceResolver=((XMLDescriptor)getDescriptor()).getNamespaceResolver();
  }
 else   if (getDescriptor() instanceof org.eclipse.persistence.eis.EISDescriptor) {
    namespaceResolver=((org.eclipse.persistence.eis.EISDescriptor)getDescriptor()).getNamespaceResolver();
  }
  return namespaceResolver;
}
Program: 64420
Project: 64420
Buggy source:
private NamespaceResolver getNamespaceResolverForField(Field field){
  NamespaceResolver nr=field.getNamespaceResolver();
  if (nr == null) {
    field.setNamespaceResolver(new NamespaceResolver());
  }
  return field.getNamespaceResolver();
}

Fixed version (ground truth):
private NamespaceResolver getNamespaceResolverForField(Field field){
  NamespaceResolver nr=(org.eclipse.persistence.oxm.NamespaceResolver)field.getNamespaceResolver();
  if (nr == null) {
    field.setNamespaceResolver(new NamespaceResolver());
  }
  return (org.eclipse.persistence.oxm.NamespaceResolver)field.getNamespaceResolver();
}
Program: 64421
Project: 64421
Buggy source:
/** 
 * Set the NamespaceResolver to associate with this descriptor
 * @param newNamespaceResolver the NamespaceResolver to associate with this descriptor
 * @see org.eclipse.persistence.oxm.NamespaceResolver
 */
public void setNamespaceResolver(NamespaceResolver newNamespaceResolver);

Fixed version (ground truth):
/** 
 * Set the NamespaceResolver to associate with this descriptor
 * @param newNamespaceResolver the NamespaceResolver to associate with this descriptor
 * @see org.eclipse.persistence.oxm.NamespaceResolver
 */
public void setNamespaceResolver(NAMESPACE_RESOLVER newNamespaceResolver);
Program: 64422
Project: 64422
Buggy source:
/** 
 * Set the NamespaceResolver associated with this XMLField
 * @param newNamespaceResolver The namespaceResolver to be associated with this XMLField
 * @see org.eclipse.persistence.oxm.NamespaceResolver
 */
public void setNamespaceResolver(NamespaceResolver newNamespaceResolver);

Fixed version (ground truth):
/** 
 * Set the NamespaceResolver associated with this XMLField
 * @param newNamespaceResolver The namespaceResolver to be associated with this XMLField
 * @see org.eclipse.persistence.oxm.NamespaceResolver
 */
public void setNamespaceResolver(NAMESPACE_RESOLVER newNamespaceResolver);
Program: 64423
Project: 64423
Buggy source:
/** 
 * INTERNAL: Private function to process or create an entry in the NamespaceResolver for the xsi prefix.
 * @param namespaceResolver
 * @return xsi prefix
 */
protected String processNamespaceResolverForXSIPrefix(NamespaceResolver namespaceResolver,MarshalRecord marshalRecord){
  String xsiPrefix;
  if (null == namespaceResolver) {
    xsiPrefix=XMLConstants.SCHEMA_INSTANCE_PREFIX;
    namespaceResolver=new NamespaceResolver();
    namespaceResolver.put(xsiPrefix,XMLConstants.SCHEMA_INSTANCE_URL);
    marshalRecord.namespaceDeclaration(xsiPrefix,XMLConstants.SCHEMA_INSTANCE_URL);
  }
 else {
    xsiPrefix=namespaceResolver.resolveNamespaceURI(XMLConstants.SCHEMA_INSTANCE_URL);
    if (null == xsiPrefix) {
      xsiPrefix=namespaceResolver.generatePrefix(XMLConstants.SCHEMA_INSTANCE_PREFIX);
      marshalRecord.namespaceDeclaration(xsiPrefix,XMLConstants.SCHEMA_INSTANCE_URL);
    }
  }
  return xsiPrefix;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Private function to process or create an entry in the NamespaceResolver for the xsi prefix.
 * @param namespaceResolver
 * @return xsi prefix
 */
protected String processNamespaceResolverForXSIPrefix(NamespaceResolver namespaceResolver,MarshalRecord marshalRecord){
  String xsiPrefix;
  if (null == namespaceResolver) {
    xsiPrefix=XMLConstants.SCHEMA_INSTANCE_PREFIX;
    namespaceResolver=new org.eclipse.persistence.oxm.NamespaceResolver();
    namespaceResolver.put(xsiPrefix,XMLConstants.SCHEMA_INSTANCE_URL);
    marshalRecord.namespaceDeclaration(xsiPrefix,XMLConstants.SCHEMA_INSTANCE_URL);
  }
 else {
    xsiPrefix=namespaceResolver.resolveNamespaceURI(XMLConstants.SCHEMA_INSTANCE_URL);
    if (null == xsiPrefix) {
      xsiPrefix=namespaceResolver.generatePrefix(XMLConstants.SCHEMA_INSTANCE_PREFIX);
      marshalRecord.namespaceDeclaration(xsiPrefix,XMLConstants.SCHEMA_INSTANCE_URL);
    }
  }
  return xsiPrefix;
}
Program: 64424
Project: 64424
Buggy source:
public QName getSchemaContextAsQName(NamespaceResolver nsResolver){
  if (schemaContext == null) {
    return null;
  }
  if (schemaContextAsQName == null) {
    int idx=schemaContext.lastIndexOf("String_Node_Str");
    String type=schemaContext.substring(idx + 1);
    idx=type.indexOf(XMLConstants.COLON);
    if (idx != -1) {
      String prefix=type.substring(0,idx);
      String localPart=type.substring(idx + 1);
      String uri=nsResolver.resolveNamespacePrefix(prefix);
      schemaContextAsQName=new QName(uri,localPart);
    }
 else {
      if (nsResolver != null && nsResolver.getDefaultNamespaceURI() != null) {
        schemaContextAsQName=new QName(nsResolver.getDefaultNamespaceURI(),type);
      }
 else {
        schemaContextAsQName=new QName(type);
      }
    }
  }
  return schemaContextAsQName;
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 * @param nsResolver
 * @return
 */
public QName getSchemaContextAsQName(NamespaceResolver nsResolver){
  if (schemaContext == null) {
    return null;
  }
  if (schemaContextAsQName == null) {
    int idx=schemaContext.lastIndexOf("String_Node_Str");
    String type=schemaContext.substring(idx + 1);
    idx=type.indexOf(XMLConstants.COLON);
    if (idx != -1) {
      String prefix=type.substring(0,idx);
      String localPart=type.substring(idx + 1);
      String uri=nsResolver.resolveNamespacePrefix(prefix);
      schemaContextAsQName=new QName(uri,localPart);
    }
 else {
      if (nsResolver != null && nsResolver.getDefaultNamespaceURI() != null) {
        schemaContextAsQName=new QName(nsResolver.getDefaultNamespaceURI(),type);
      }
 else {
        schemaContextAsQName=new QName(type);
      }
    }
  }
  return schemaContextAsQName;
}
Program: 64425
Project: 64425
Buggy source:
private void updateResolverForFields(Collection fields,NamespaceResolver nr){
  Iterator fieldIter=fields.iterator();
  while (fieldIter.hasNext()) {
    Field field=(XMLField)fieldIter.next();
    XPathFragment currentFragment=field.getXPathFragment();
    while (currentFragment != null) {
      String uri=currentFragment.getNamespaceURI();
      if (uri != null && nr.resolveNamespaceURI(uri) == null && !uri.equals(nr.getDefaultNamespaceURI())) {
        String prefix=currentFragment.getPrefix();
        if (prefix == null) {
          prefix=nr.generatePrefix();
        }
        nr.put(prefix,uri);
      }
      currentFragment=currentFragment.getNextFragment();
    }
  }
}

Fixed version (ground truth):
private void updateResolverForFields(Collection fields,org.eclipse.persistence.internal.oxm.NamespaceResolver nr){
  Iterator fieldIter=fields.iterator();
  while (fieldIter.hasNext()) {
    Field field=(XMLField)fieldIter.next();
    XPathFragment currentFragment=field.getXPathFragment();
    while (currentFragment != null) {
      String uri=currentFragment.getNamespaceURI();
      if (uri != null && nr.resolveNamespaceURI(uri) == null && !uri.equals(nr.getDefaultNamespaceURI())) {
        String prefix=currentFragment.getPrefix();
        if (prefix == null) {
          prefix=nr.generatePrefix();
        }
        nr.put(prefix,uri);
      }
      currentFragment=currentFragment.getNextFragment();
    }
  }
}
Program: 64426
Project: 64426
Buggy source:
private void processRefClasses(List processed,Set refClasses,NamespaceResolver nr){
  if (refClasses != null) {
    Iterator iter=refClasses.iterator();
    while (iter.hasNext()) {
      Class nextClass=(Class)iter.next();
      Descriptor desc=(Descriptor)xmlContext.getSession(0).getProject().getDescriptor(nextClass);
      processXMLDescriptor(processed,desc,nr);
    }
  }
}

Fixed version (ground truth):
private void processRefClasses(List processed,Set refClasses,org.eclipse.persistence.internal.oxm.NamespaceResolver nr){
  if (refClasses != null) {
    Iterator iter=refClasses.iterator();
    while (iter.hasNext()) {
      Class nextClass=(Class)iter.next();
      Descriptor desc=(Descriptor)xmlContext.getSession(0).getProject().getDescriptor(nextClass);
      processXMLDescriptor(processed,desc,nr);
    }
  }
}
Program: 64427
Project: 64427
Buggy source:
private void processXMLDescriptor(List<Descriptor> processed,Descriptor desc,NamespaceResolver nr){
  if (desc == null || processed.contains(desc)) {
    return;
  }
  processed.add(desc);
  Vector mappings=desc.getMappings();
  for (int i=0; i < mappings.size(); i++) {
    DatabaseMapping nextMapping=(DatabaseMapping)mappings.get(i);
    Vector fields=nextMapping.getFields();
    updateResolverForFields(fields,nr);
    Descriptor refDesc=(Descriptor)((DatabaseMapping)nextMapping).getReferenceDescriptor();
    if (refDesc != null && !processed.contains(refDesc)) {
      processXMLDescriptor(processed,refDesc,nr);
    }
    if (nextMapping instanceof ChoiceObjectMapping) {
      Set refClasses=((ChoiceObjectMapping)nextMapping).getClassToFieldMappings().keySet();
      processRefClasses(processed,refClasses,nr);
    }
 else     if (nextMapping instanceof ChoiceCollectionMapping) {
      Set refClasses=((ChoiceCollectionMapping)nextMapping).getClassToFieldMappings().keySet();
      processRefClasses(processed,refClasses,nr);
    }
  }
}

Fixed version (ground truth):
private void processXMLDescriptor(List<Descriptor> processed,Descriptor desc,org.eclipse.persistence.internal.oxm.NamespaceResolver nr){
  if (desc == null || processed.contains(desc)) {
    return;
  }
  processed.add(desc);
  Vector mappings=desc.getMappings();
  for (int i=0; i < mappings.size(); i++) {
    DatabaseMapping nextMapping=(DatabaseMapping)mappings.get(i);
    Vector fields=nextMapping.getFields();
    updateResolverForFields(fields,nr);
    Descriptor refDesc=(Descriptor)((DatabaseMapping)nextMapping).getReferenceDescriptor();
    if (refDesc != null && !processed.contains(refDesc)) {
      processXMLDescriptor(processed,refDesc,nr);
    }
    if (nextMapping instanceof ChoiceObjectMapping) {
      Set refClasses=((ChoiceObjectMapping)nextMapping).getClassToFieldMappings().keySet();
      processRefClasses(processed,refClasses,nr);
    }
 else     if (nextMapping instanceof ChoiceCollectionMapping) {
      Set refClasses=((ChoiceCollectionMapping)nextMapping).getClassToFieldMappings().keySet();
      processRefClasses(processed,refClasses,nr);
    }
  }
}
Program: 64428
Project: 64428
Buggy source:
public String getPrefixForNamespace(String URI,org.eclipse.persistence.oxm.NamespaceResolver namespaceResolver,String suggestedPrefix,boolean addPrefixToNR){
  String defaultNS=namespaceResolver.getDefaultNamespaceURI();
  if (defaultNS != null && URI.equals(defaultNS)) {
    return null;
  }
  Enumeration keys=namespaceResolver.getPrefixes();
  while (keys.hasMoreElements()) {
    String next=(String)keys.nextElement();
    String nextUri=namespaceResolver.resolveNamespacePrefix(next);
    if (nextUri.equals(URI)) {
      return next;
    }
  }
  if (XMLConstants.XML_NAMESPACE_URL.equals(URI)) {
    return XMLConstants.XML_NAMESPACE_PREFIX;
  }
  String prefix=globalNamespaceResolver.resolveNamespaceURI(URI);
  if (prefix == null) {
    if (URI.equals(globalNamespaceResolver.getDefaultNamespaceURI())) {
      namespaceResolver.setDefaultNamespaceURI(URI);
      return null;
    }
 else     if (suggestedPrefix != null) {
      prefix=globalNamespaceResolver.generatePrefix(suggestedPrefix);
    }
 else {
      prefix=globalNamespaceResolver.generatePrefix();
    }
  }
  String nrUri=namespaceResolver.resolveNamespacePrefix(prefix);
  while (null != nrUri && !URI.equals(nrUri)) {
    prefix=globalNamespaceResolver.generatePrefix();
    nrUri=namespaceResolver.resolveNamespacePrefix(prefix);
  }
  if (addPrefixToNR) {
    namespaceResolver.put(prefix,URI);
  }
  globalNamespaceResolver.put(prefix,URI);
  return prefix;
}

Fixed version (ground truth):
public String getPrefixForNamespace(String URI,NamespaceResolver namespaceResolver,String suggestedPrefix,boolean addPrefixToNR){
  String defaultNS=namespaceResolver.getDefaultNamespaceURI();
  if (defaultNS != null && URI.equals(defaultNS)) {
    return null;
  }
  Enumeration keys=namespaceResolver.getPrefixes();
  while (keys.hasMoreElements()) {
    String next=(String)keys.nextElement();
    String nextUri=namespaceResolver.resolveNamespacePrefix(next);
    if (nextUri.equals(URI)) {
      return next;
    }
  }
  if (XMLConstants.XML_NAMESPACE_URL.equals(URI)) {
    return XMLConstants.XML_NAMESPACE_PREFIX;
  }
  String prefix=globalNamespaceResolver.resolveNamespaceURI(URI);
  if (prefix == null) {
    if (URI.equals(globalNamespaceResolver.getDefaultNamespaceURI())) {
      namespaceResolver.setDefaultNamespaceURI(URI);
      return null;
    }
 else     if (suggestedPrefix != null) {
      prefix=globalNamespaceResolver.generatePrefix(suggestedPrefix);
    }
 else {
      prefix=globalNamespaceResolver.generatePrefix();
    }
  }
  String nrUri=namespaceResolver.resolveNamespacePrefix(prefix);
  while (null != nrUri && !URI.equals(nrUri)) {
    prefix=globalNamespaceResolver.generatePrefix();
    nrUri=namespaceResolver.resolveNamespacePrefix(prefix);
  }
  if (addPrefixToNR) {
    namespaceResolver.put(prefix,URI);
  }
  globalNamespaceResolver.put(prefix,URI);
  return prefix;
}
Program: 64430
Project: 64430
Buggy source:
public MappingsGenerator(Helper helper){
  this.helper=helper;
  jotArrayList=helper.getJavaClass(ArrayList.class);
  jotHashSet=helper.getJavaClass(HashSet.class);
  jotHashMap=helper.getJavaClass(HashMap.class);
  jotLinkedList=helper.getJavaClass(LinkedList.class);
  jotTreeSet=helper.getJavaClass(TreeSet.class);
  qNamesToGeneratedClasses=new HashMap<QName,Class>();
  qNamesToDeclaredClasses=new HashMap<QName,Class>();
  classToGeneratedClasses=new HashMap<String,Class>();
  globalNamespaceResolver=new NamespaceResolver();
  isDefaultNamespaceAllowed=true;
}

Fixed version (ground truth):
public MappingsGenerator(Helper helper){
  this.helper=helper;
  jotArrayList=helper.getJavaClass(ArrayList.class);
  jotHashSet=helper.getJavaClass(HashSet.class);
  jotHashMap=helper.getJavaClass(HashMap.class);
  jotLinkedList=helper.getJavaClass(LinkedList.class);
  jotTreeSet=helper.getJavaClass(TreeSet.class);
  qNamesToGeneratedClasses=new HashMap<QName,Class>();
  qNamesToDeclaredClasses=new HashMap<QName,Class>();
  classToGeneratedClasses=new HashMap<String,Class>();
  globalNamespaceResolver=new org.eclipse.persistence.oxm.NamespaceResolver();
  isDefaultNamespaceAllowed=true;
}
Program: 64434
Project: 64434
Buggy source:
private void initialize(){
  XMLPlatform xmlPlatform=XMLPlatformFactory.getInstance().getXMLPlatform();
  transformer=xmlPlatform.newXMLTransformer();
  setEncoding(XMLConstants.DEFAULT_XML_ENCODING);
  setFormattedOutput(true);
  marshalProperties=new Properties();
  includeRoot=true;
  marshalEmptyCollections=true;
  indentString="String_Node_Str";
}

Fixed version (ground truth):
private void initialize(){
  XMLPlatform xmlPlatform=XMLPlatformFactory.getInstance().getXMLPlatform();
  transformer=xmlPlatform.newXMLTransformer();
  setEncoding(XMLConstants.DEFAULT_XML_ENCODING);
  setFormattedOutput(true);
  marshalProperties=new Properties();
  includeRoot=true;
  marshalEmptyCollections=true;
  reduceWildcardArrays=false;
  indentString="String_Node_Str";
}
Program: 64436
Project: 64436
Buggy source:
/** 
 * NamespacePrefixMapper that can be used during marshal (instead of those set in the project meta data)
 */
public abstract NamespacePrefixMapper getNamespacePrefixMapper();

Fixed version (ground truth):
/** 
 * NamespacePrefixMapper that can be used during marshal (instead of those set in the project meta data)
 */
public abstract NAMESPACE_PREFIX_MAPPER getNamespacePrefixMapper();
Program: 64438
Project: 64438
Buggy source:
public void initialize(XMLContext context){
}

Fixed version (ground truth):
/** 
 * INTERNAL
 */
public void initialize(Context context){
}
Program: 64439
Project: 64439
Buggy source:
/** 
 * Return the XMLMapping associated with this reference.
 * @return
 */
public XMLMapping getMapping(){
  return mapping;
}

Fixed version (ground truth):
/** 
 * Return the XMLMapping associated with this reference.
 * @return
 */
public Mapping getMapping(){
  return mapping;
}
Program: 64440
Project: 64440
Buggy source:
/** 
 * Constructor typically used in the single case.
 */
public Reference(XMLMapping mapping,Object source,Class target,Object primaryKey){
  this.mapping=mapping;
  sourceObject=source;
  targetClass=target;
  this.primaryKey=primaryKey;
}

Fixed version (ground truth):
/** 
 * Constructor typically used in the single case.
 */
public Reference(Mapping mapping,Object source,Class target,Object primaryKey){
  this.mapping=mapping;
  sourceObject=source;
  targetClass=target;
  this.primaryKey=primaryKey;
}
Program: 64441
Project: 64441
Buggy source:
public XMLMapping getMapping(){
  return mapping;
}

Fixed version (ground truth):
public Mapping getMapping(){
  return mapping;
}
Program: 64442
Project: 64442
Buggy source:
public ReferenceKey(Object sourceObject,XMLMapping mapping){
  this.sourceObject=sourceObject;
  this.mapping=mapping;
}

Fixed version (ground truth):
public ReferenceKey(Object sourceObject,Mapping mapping){
  this.sourceObject=sourceObject;
  this.mapping=mapping;
}
Program: 64443
Project: 64443
Buggy source:
public void setMapping(XMLMapping mapping){
  this.mapping=mapping;
}

Fixed version (ground truth):
public void setMapping(Mapping mapping){
  this.mapping=mapping;
}
Program: 64445
Project: 64445
Buggy source:
public void setFieldToNodeValues(Map<Field,NodeValue> fieldToNodeValues){
  this.fieldToNodeValues=fieldToNodeValues;
  this.classToNodeValues=new HashMap<Class,NodeValue>();
  for (  Field nextField : fieldToNodeValues.keySet()) {
    Class associatedClass=((Map<Field,Class>)this.xmlChoiceCollectionMapping.getFieldToClassMappings()).get(nextField);
    this.classToNodeValues.put(associatedClass,fieldToNodeValues.get(nextField));
  }
  Collection classes=this.classToNodeValues.keySet();
  for (  Class nextClass : ((Map<Class,XMLMapping>)this.xmlChoiceCollectionMapping.getChoiceElementMappingsByClass()).keySet()) {
    if (!(classes.contains(nextClass))) {
      Field field=(Field)xmlChoiceCollectionMapping.getClassToFieldMappings().get(nextClass);
      NodeValue nodeValue=new XMLChoiceCollectionMappingUnmarshalNodeValue(xmlChoiceCollectionMapping,xmlField,(XMLMapping)xmlChoiceCollectionMapping.getChoiceElementMappingsByClass().get(nextClass));
      this.classToNodeValues.put(nextClass,nodeValue);
      NodeValue nodeValueForField=fieldToNodeValues.get(field);
      nodeValue.setXPathNode(nodeValueForField.getXPathNode());
    }
  }
}

Fixed version (ground truth):
public void setFieldToNodeValues(Map<Field,NodeValue> fieldToNodeValues){
  this.fieldToNodeValues=fieldToNodeValues;
  this.classToNodeValues=new HashMap<Class,NodeValue>();
  for (  Field nextField : fieldToNodeValues.keySet()) {
    Class associatedClass=((Map<Field,Class>)this.xmlChoiceCollectionMapping.getFieldToClassMappings()).get(nextField);
    this.classToNodeValues.put(associatedClass,fieldToNodeValues.get(nextField));
  }
  Collection classes=this.classToNodeValues.keySet();
  for (  Class nextClass : ((Map<Class,Mapping>)this.xmlChoiceCollectionMapping.getChoiceElementMappingsByClass()).keySet()) {
    if (!(classes.contains(nextClass))) {
      Field field=(Field)xmlChoiceCollectionMapping.getClassToFieldMappings().get(nextClass);
      NodeValue nodeValue=new XMLChoiceCollectionMappingUnmarshalNodeValue(xmlChoiceCollectionMapping,xmlField,(Mapping)xmlChoiceCollectionMapping.getChoiceElementMappingsByClass().get(nextClass));
      this.classToNodeValues.put(nextClass,nodeValue);
      NodeValue nodeValueForField=fieldToNodeValues.get(field);
      nodeValue.setXPathNode(nodeValueForField.getXPathNode());
    }
  }
}
Program: 64446
Project: 64446
Buggy source:
private void initializeNodeValue(){
  XMLMapping xmlMapping=(XMLMapping)xmlChoiceCollectionMapping.getChoiceElementMappings().get(xmlField);
  if (xmlMapping instanceof BinaryDataCollectionMapping) {
    choiceElementNodeValue=new XMLBinaryDataCollectionMappingNodeValue((BinaryDataCollectionMapping)xmlMapping);
  }
 else   if (xmlMapping instanceof DirectCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeDirectCollectionMappingNodeValue((DirectCollectionMapping)xmlMapping);
  }
 else   if (xmlMapping instanceof CompositeCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeCollectionMappingNodeValue((CompositeCollectionMapping)xmlMapping);
  }
 else {
    CollectionReferenceMapping refMapping=((CollectionReferenceMapping)xmlMapping);
    if (refMapping.usesSingleNode() || refMapping.getFields().size() == 1) {
      choiceElementNodeValue=new XMLCollectionReferenceMappingNodeValue(refMapping,xmlField);
    }
 else {
      choiceElementNodeValue=new XMLCollectionReferenceMappingMarshalNodeValue((CollectionReferenceMapping)xmlMapping);
    }
  }
}

Fixed version (ground truth):
private void initializeNodeValue(){
  Mapping xmlMapping=(Mapping)xmlChoiceCollectionMapping.getChoiceElementMappings().get(xmlField);
  if (xmlMapping instanceof BinaryDataCollectionMapping) {
    choiceElementNodeValue=new XMLBinaryDataCollectionMappingNodeValue((BinaryDataCollectionMapping)xmlMapping);
  }
 else   if (xmlMapping instanceof DirectCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeDirectCollectionMappingNodeValue((DirectCollectionMapping)xmlMapping);
  }
 else   if (xmlMapping instanceof CompositeCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeCollectionMappingNodeValue((CompositeCollectionMapping)xmlMapping);
  }
 else {
    CollectionReferenceMapping refMapping=((CollectionReferenceMapping)xmlMapping);
    if (refMapping.usesSingleNode() || refMapping.getFields().size() == 1) {
      choiceElementNodeValue=new XMLCollectionReferenceMappingNodeValue(refMapping,xmlField);
    }
 else {
      choiceElementNodeValue=new XMLCollectionReferenceMappingMarshalNodeValue((CollectionReferenceMapping)xmlMapping);
    }
  }
}
Program: 64447
Project: 64447
Buggy source:
public XMLChoiceCollectionMappingUnmarshalNodeValue(ChoiceCollectionMapping mapping,Field xmlField,XMLMapping nestedMapping){
  this.xmlChoiceCollectionMapping=mapping;
  this.xmlField=xmlField;
  this.nestedMapping=nestedMapping;
  initializeNodeValue();
}

Fixed version (ground truth):
public XMLChoiceCollectionMappingUnmarshalNodeValue(ChoiceCollectionMapping mapping,Field xmlField,Mapping nestedMapping){
  this.xmlChoiceCollectionMapping=mapping;
  this.xmlField=xmlField;
  this.nestedMapping=nestedMapping;
  initializeNodeValue();
}
Program: 64448
Project: 64448
Buggy source:
private void initializeNodeValue(){
  XMLMapping xmlMapping=this.nestedMapping;
  if (xmlMapping instanceof BinaryDataCollectionMapping) {
    choiceElementNodeValue=new XMLBinaryDataCollectionMappingNodeValue((BinaryDataCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else   if (xmlMapping instanceof DirectCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeDirectCollectionMappingNodeValue((DirectCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else   if (xmlMapping instanceof CompositeCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeCollectionMappingNodeValue((CompositeCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else {
    choiceElementNodeValue=new XMLCollectionReferenceMappingNodeValue((CollectionReferenceMapping)xmlMapping,xmlField);
    choiceElementMarshalNodeValue=new XMLCollectionReferenceMappingMarshalNodeValue((CollectionReferenceMapping)xmlMapping);
  }
}

Fixed version (ground truth):
private void initializeNodeValue(){
  Mapping xmlMapping=this.nestedMapping;
  if (xmlMapping instanceof BinaryDataCollectionMapping) {
    choiceElementNodeValue=new XMLBinaryDataCollectionMappingNodeValue((BinaryDataCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else   if (xmlMapping instanceof DirectCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeDirectCollectionMappingNodeValue((DirectCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else   if (xmlMapping instanceof CompositeCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeCollectionMappingNodeValue((CompositeCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else {
    choiceElementNodeValue=new XMLCollectionReferenceMappingNodeValue((CollectionReferenceMapping)xmlMapping,xmlField);
    choiceElementMarshalNodeValue=new XMLCollectionReferenceMappingMarshalNodeValue((CollectionReferenceMapping)xmlMapping);
  }
}
Program: 64449
Project: 64449
Buggy source:
private NodeValue getNodeValueForMapping(XMLMapping xmlMapping){
  if (xmlMapping instanceof BinaryDataMapping) {
    return new XMLBinaryDataMappingNodeValue((BinaryDataMapping)xmlMapping);
  }
 else   if (xmlMapping instanceof XMLDirectMapping) {
    return new XMLDirectMappingNodeValue((XMLDirectMapping)xmlMapping);
  }
 else   if (xmlMapping instanceof XMLObjectReferenceMapping) {
    return new XMLObjectReferenceMappingNodeValue((XMLObjectReferenceMapping)xmlMapping,xmlField);
  }
 else {
    return new XMLCompositeObjectMappingNodeValue((XMLCompositeObjectMapping)xmlMapping);
  }
}

Fixed version (ground truth):
private NodeValue getNodeValueForMapping(Mapping xmlMapping){
  if (xmlMapping instanceof BinaryDataMapping) {
    return new XMLBinaryDataMappingNodeValue((BinaryDataMapping)xmlMapping);
  }
 else   if (xmlMapping instanceof DirectMapping) {
    return new XMLDirectMappingNodeValue((DirectMapping)xmlMapping);
  }
 else   if (xmlMapping instanceof ObjectReferenceMapping) {
    return new XMLObjectReferenceMappingNodeValue((ObjectReferenceMapping)xmlMapping,xmlField);
  }
 else {
    return new XMLCompositeObjectMappingNodeValue((CompositeObjectMapping)xmlMapping);
  }
}
Program: 64450
Project: 64450
Buggy source:
public void initializeNodeValue(){
  XMLMapping xmlMapping=(XMLMapping)xmlChoiceMapping.getChoiceElementMappings().get(xmlField);
  choiceElementNodeValue=getNodeValueForMapping(xmlMapping);
  for (  Entry<Class,XMLMapping> entry : ((Map<Class,XMLMapping>)xmlChoiceMapping.getChoiceElementMappingsByClass()).entrySet()) {
    Field field=(Field)xmlChoiceMapping.getClassToFieldMappings().get(entry.getKey());
    if (field != null && field.equals(this.xmlField)) {
      XMLMapping mappingForClass=entry.getValue();
      if (mappingForClass != xmlMapping) {
        if (this.choiceElementNodeValues == null) {
          choiceElementNodeValues=new HashMap<Class,NodeValue>();
        }
        choiceElementNodeValues.put(entry.getKey(),getNodeValueForMapping(mappingForClass));
      }
    }
  }
}

Fixed version (ground truth):
public void initializeNodeValue(){
  Mapping xmlMapping=(Mapping)xmlChoiceMapping.getChoiceElementMappings().get(xmlField);
  choiceElementNodeValue=getNodeValueForMapping(xmlMapping);
  for (  Entry<Class,Mapping> entry : ((Map<Class,Mapping>)xmlChoiceMapping.getChoiceElementMappingsByClass()).entrySet()) {
    Field field=(Field)xmlChoiceMapping.getClassToFieldMappings().get(entry.getKey());
    if (field != null && field.equals(this.xmlField)) {
      Mapping mappingForClass=entry.getValue();
      if (mappingForClass != xmlMapping) {
        if (this.choiceElementNodeValues == null) {
          choiceElementNodeValues=new HashMap<Class,NodeValue>();
        }
        choiceElementNodeValues.put(entry.getKey(),getNodeValueForMapping(mappingForClass));
      }
    }
  }
}
Program: 64452
Project: 64452
Buggy source:
/** 
 * @return The TopLink OXM mapping associated with this setting
 */
public XMLMapping getMapping();

Fixed version (ground truth):
/** 
 * @return The TopLink OXM mapping associated with this setting
 */
public Mapping getMapping();
Program: 64453
Project: 64453
Buggy source:
@Override public Object getObjectForNode(Node node,XMLMapping selfRecordMapping){
  XMLBinderCacheEntry entry=(XMLBinderCacheEntry)nodesToObjects.get(node);
  if (entry != null) {
    if (selfRecordMapping != null) {
      return entry.getSelfMappingObject(selfRecordMapping);
    }
 else {
      return entry.getRootObject();
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public Object getObjectForNode(Node node,Mapping selfRecordMapping){
  XMLBinderCacheEntry entry=(XMLBinderCacheEntry)nodesToObjects.get(node);
  if (entry != null) {
    if (selfRecordMapping != null) {
      return entry.getSelfMappingObject(selfRecordMapping);
    }
 else {
      return entry.getRootObject();
    }
  }
  return null;
}
Program: 64454
Project: 64454
Buggy source:
@Override public void addObjectToCache(Object obj,Node node,XMLMapping selfRecordMapping){
  objectsToNodes.put(obj,node);
  if (selfRecordMapping != null) {
    XMLBinderCacheEntry entry=(XMLBinderCacheEntry)nodesToObjects.get(node);
    if (entry != null) {
      entry.addSelfMappingObject(selfRecordMapping,obj);
    }
  }
 else {
    XMLBinderCacheEntry entry=new XMLBinderCacheEntry(obj);
    nodesToObjects.put(node,entry);
  }
}

Fixed version (ground truth):
@Override public void addObjectToCache(Object obj,Node node,Mapping selfRecordMapping){
  objectsToNodes.put(obj,node);
  if (selfRecordMapping != null) {
    XMLBinderCacheEntry entry=(XMLBinderCacheEntry)nodesToObjects.get(node);
    if (entry != null) {
      entry.addSelfMappingObject(selfRecordMapping,obj);
    }
  }
 else {
    XMLBinderCacheEntry entry=new XMLBinderCacheEntry(obj);
    nodesToObjects.put(node,entry);
  }
}
Program: 64456
Project: 64456
Buggy source:
@Override protected List addExtraNamespacesToNamespaceResolver(Descriptor desc,XMLRecord marshalRecord,CoreAbstractSession session,boolean allowOverride,boolean ignoreEqualResolvers){
  if (rootXPathNode.getNonAttributeChildren() == null) {
    return null;
  }
 else {
    return super.addExtraNamespacesToNamespaceResolver(desc,marshalRecord,session,allowOverride,ignoreEqualResolvers);
  }
}

Fixed version (ground truth):
@Override public List addExtraNamespacesToNamespaceResolver(Descriptor desc,XMLRecord marshalRecord,CoreAbstractSession session,boolean allowOverride,boolean ignoreEqualResolvers){
  if (rootXPathNode.getNonAttributeChildren() == null) {
    return null;
  }
 else {
    return super.addExtraNamespacesToNamespaceResolver(desc,marshalRecord,session,allowOverride,ignoreEqualResolvers);
  }
}
Program: 64462
Project: 64462
Buggy source:
/** 
 * Marshal any 'self' mapped attributes.
 * @param xPathFragment
 * @param marshalRecord
 * @param object
 * @param session
 * @param namespaceResolver
 * @param marshaller
 * @return
 */
public boolean marshalSelfAttributes(XPathFragment xPathFragment,MarshalRecord marshalRecord,Object object,CoreAbstractSession session,NamespaceResolver namespaceResolver,XMLMarshaller marshaller){
  Object objectValue=xmlCompositeObjectMapping.getAttributeValueFromObject(object);
  objectValue=xmlCompositeObjectMapping.convertObjectValueToDataValue(objectValue,session,marshaller);
  Descriptor descriptor=(Descriptor)session.getDescriptor(objectValue);
  if (descriptor != null) {
    TreeObjectBuilder objectBuilder=(TreeObjectBuilder)descriptor.getObjectBuilder();
    return objectBuilder.marshalAttributes(marshalRecord,objectValue,session);
  }
 else {
    UnmarshalKeepAsElementPolicy keepAsElementPolicy=getMapping().getKeepAsElementPolicy();
    if (null != keepAsElementPolicy && (keepAsElementPolicy.isKeepAllAsElement() || keepAsElementPolicy.isKeepUnknownAsElement())) {
      if (objectValue instanceof Node) {
        Node rootNode=(Node)objectValue;
        NamedNodeMap attributes=rootNode.getAttributes();
        for (int i=0; i < attributes.getLength(); i++) {
          Attr next=(Attr)attributes.item(i);
          if (!(XMLConstants.XMLNS_URL.equals(next.getNamespaceURI()))) {
            marshalRecord.node(next,namespaceResolver);
          }
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Marshal any 'self' mapped attributes.
 * @param xPathFragment
 * @param marshalRecord
 * @param object
 * @param session
 * @param namespaceResolver
 * @param marshaller
 * @return
 */
public boolean marshalSelfAttributes(XPathFragment xPathFragment,MarshalRecord marshalRecord,Object object,CoreAbstractSession session,NamespaceResolver namespaceResolver,XMLMarshaller marshaller){
  Object objectValue=xmlCompositeObjectMapping.getAttributeValueFromObject(object);
  objectValue=xmlCompositeObjectMapping.convertObjectValueToDataValue(objectValue,session,marshaller);
  Descriptor descriptor=(Descriptor)session.getDescriptor(objectValue);
  if (descriptor != null) {
    ObjectBuilder objectBuilder=(ObjectBuilder)descriptor.getObjectBuilder();
    return objectBuilder.marshalAttributes(marshalRecord,objectValue,session);
  }
 else {
    UnmarshalKeepAsElementPolicy keepAsElementPolicy=getMapping().getKeepAsElementPolicy();
    if (null != keepAsElementPolicy && (keepAsElementPolicy.isKeepAllAsElement() || keepAsElementPolicy.isKeepUnknownAsElement())) {
      if (objectValue instanceof Node) {
        Node rootNode=(Node)objectValue;
        NamedNodeMap attributes=rootNode.getAttributes();
        for (int i=0; i < attributes.getLength(); i++) {
          Attr next=(Attr)attributes.item(i);
          if (!(XMLConstants.XMLNS_URL.equals(next.getNamespaceURI()))) {
            marshalRecord.node(next,namespaceResolver);
          }
        }
      }
    }
  }
  return false;
}
Program: 64465
Project: 64465
Buggy source:
public boolean startElement(MarshalRecord marshalRecord,XPathFragment anXPathFragment,Object object,CoreAbstractSession session,NamespaceResolver namespaceResolver,TreeObjectBuilder compositeObjectBuilder,Object compositeObject){
  if (null == anXPathFragment) {
    return false;
  }
  marshalRecord.openStartElement(anXPathFragment,namespaceResolver);
  boolean hasValue=false;
  marshalRecord.predicateAttribute(anXPathFragment,namespaceResolver);
  if (null != attributeChildren) {
    for (int x=0, size=attributeChildren.size(); x < size; x++) {
      XPathNode attributeNode=attributeChildren.get(x);
      hasValue=attributeNode.marshal(marshalRecord,object,session,namespaceResolver,null,ObjectMarshalContext.getInstance(),null) || hasValue;
    }
  }
  if (anyAttributeNode != null) {
    hasValue=anyAttributeNode.marshal(marshalRecord,object,session,namespaceResolver,null,ObjectMarshalContext.getInstance(),null) || hasValue;
  }
  if (null != compositeObjectBuilder) {
    hasValue=compositeObjectBuilder.marshalAttributes(marshalRecord,compositeObject,session) || hasValue;
  }
  marshalRecord.closeStartElement();
  return hasValue;
}

Fixed version (ground truth):
public boolean startElement(MarshalRecord marshalRecord,XPathFragment anXPathFragment,Object object,CoreAbstractSession session,NamespaceResolver namespaceResolver,ObjectBuilder compositeObjectBuilder,Object compositeObject){
  if (null == anXPathFragment) {
    return false;
  }
  marshalRecord.openStartElement(anXPathFragment,namespaceResolver);
  boolean hasValue=false;
  marshalRecord.predicateAttribute(anXPathFragment,namespaceResolver);
  if (null != attributeChildren) {
    for (int x=0, size=attributeChildren.size(); x < size; x++) {
      XPathNode attributeNode=attributeChildren.get(x);
      hasValue=attributeNode.marshal(marshalRecord,object,session,namespaceResolver,null,ObjectMarshalContext.getInstance(),null) || hasValue;
    }
  }
  if (anyAttributeNode != null) {
    hasValue=anyAttributeNode.marshal(marshalRecord,object,session,namespaceResolver,null,ObjectMarshalContext.getInstance(),null) || hasValue;
  }
  if (null != compositeObjectBuilder) {
    hasValue=compositeObjectBuilder.marshalAttributes(marshalRecord,compositeObject,session) || hasValue;
  }
  marshalRecord.closeStartElement();
  return hasValue;
}
Program: 64466
Project: 64466
Buggy source:
public MimeTypePolicy getMimeTypePolicy();

Fixed version (ground truth):
public MIME_TYPE_POLICY getMimeTypePolicy();
Program: 64467
Project: 64467
Buggy source:
/** 
 * Allow implementer to set the MimeTypePolicy class FixedMimeTypePolicy or AttributeMimeTypePolicy (dynamic)
 * @param aPolicy MimeTypePolicy
 */
public void setMimeTypePolicy(MimeTypePolicy mimeTypePolicy);

Fixed version (ground truth):
/** 
 * Allow implementer to set the MimeTypePolicy class FixedMimeTypePolicy or AttributeMimeTypePolicy (dynamic)
 * @param aPolicy MimeTypePolicy
 */
public void setMimeTypePolicy(MIME_TYPE_POLICY mimeTypePolicy);
Program: 64468
Project: 64468
Buggy source:
public BinaryDataUnmarshalRecord(TreeObjectBuilder treeObjectBuilder,UnmarshalRecord parentRecord,XMLBinaryDataMappingNodeValue xmlBinaryDataMappingNodeValue,BinaryDataMapping xmlBinaryDataMapping){
  super(treeObjectBuilder);
  this.parentRecord=parentRecord;
  this.xmlBinaryDataMappingNodeValue=xmlBinaryDataMappingNodeValue;
  this.xmlBinaryDataMapping=xmlBinaryDataMapping;
  handler=new BinaryMappingContentHandler(parentRecord,xmlBinaryDataMappingNodeValue,xmlBinaryDataMapping);
  activeContentHandler=handler;
}

Fixed version (ground truth):
public BinaryDataUnmarshalRecord(ObjectBuilder treeObjectBuilder,UnmarshalRecord parentRecord,XMLBinaryDataMappingNodeValue xmlBinaryDataMappingNodeValue,BinaryDataMapping xmlBinaryDataMapping){
  super((TreeObjectBuilder)treeObjectBuilder);
  this.parentRecord=parentRecord;
  this.xmlBinaryDataMappingNodeValue=xmlBinaryDataMappingNodeValue;
  this.xmlBinaryDataMapping=xmlBinaryDataMapping;
  handler=new BinaryMappingContentHandler(parentRecord,xmlBinaryDataMappingNodeValue,xmlBinaryDataMapping);
  activeContentHandler=handler;
}
Program: 64469
Project: 64469
Buggy source:
public UnmarshalRecord getChildUnmarshalRecord(TreeObjectBuilder targetObjectBuilder);

Fixed version (ground truth):
public UnmarshalRecord getChildUnmarshalRecord(TREE_OBJECT_BUILDER targetObjectBuilder);
Program: 64470
Project: 64470
Buggy source:
public UnmarshalRecord initialize(TreeObjectBuilder treeObjectBuilder);

Fixed version (ground truth):
public UnmarshalRecord initialize(TREE_OBJECT_BUILDER treeObjectBuilder);
Program: 64474
Project: 64474
Buggy source:
public boolean startElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord,Attributes atts){
  try {
    Descriptor workingDescriptor=findReferenceDescriptor(xPathFragment,unmarshalRecord,atts,xmlAnyObjectMapping,xmlAnyObjectMapping.getKeepAsElementPolicy());
    UnmarshalKeepAsElementPolicy policy=xmlAnyObjectMapping.getKeepAsElementPolicy();
    if (((workingDescriptor == null) && (policy == UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT)) || (policy == UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT)) {
      setupHandlerForKeepAsElementPolicy(unmarshalRecord,xPathFragment,atts);
    }
 else     if (workingDescriptor != null) {
      processChild(xPathFragment,unmarshalRecord,atts,workingDescriptor,xmlAnyObjectMapping);
    }
 else {
      AnyMappingContentHandler handler=new AnyMappingContentHandler(unmarshalRecord,xmlAnyObjectMapping.usesXMLRoot());
      String qnameString=xPathFragment.getLocalName();
      if (xPathFragment.getPrefix() != null) {
        qnameString=xPathFragment.getPrefix() + XMLConstants.COLON + qnameString;
      }
      handler.startElement(xPathFragment.getNamespaceURI(),xPathFragment.getLocalName(),qnameString,atts);
      XMLReader xmlReader=unmarshalRecord.getXMLReader();
      xmlReader.setContentHandler(handler);
      xmlReader.setLexicalHandler(handler);
      return true;
    }
  }
 catch (  SAXException e) {
    throw XMLMarshalException.unmarshalException(e);
  }
  return true;
}

Fixed version (ground truth):
public boolean startElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord,Attributes atts){
  try {
    Descriptor workingDescriptor=findReferenceDescriptor(xPathFragment,unmarshalRecord,atts,xmlAnyObjectMapping,xmlAnyObjectMapping.getKeepAsElementPolicy());
    UnmarshalKeepAsElementPolicy policy=xmlAnyObjectMapping.getKeepAsElementPolicy();
    if (null != policy && ((workingDescriptor == null && policy.isKeepUnknownAsElement()) || policy.isKeepAllAsElement())) {
      setupHandlerForKeepAsElementPolicy(unmarshalRecord,xPathFragment,atts);
    }
 else     if (workingDescriptor != null) {
      processChild(xPathFragment,unmarshalRecord,atts,workingDescriptor,xmlAnyObjectMapping);
    }
 else {
      AnyMappingContentHandler handler=new AnyMappingContentHandler(unmarshalRecord,xmlAnyObjectMapping.usesXMLRoot());
      String qnameString=xPathFragment.getLocalName();
      if (xPathFragment.getPrefix() != null) {
        qnameString=xPathFragment.getPrefix() + XMLConstants.COLON + qnameString;
      }
      handler.startElement(xPathFragment.getNamespaceURI(),xPathFragment.getLocalName(),qnameString,atts);
      XMLReader xmlReader=unmarshalRecord.getXMLReader();
      xmlReader.setContentHandler(handler);
      xmlReader.setLexicalHandler(handler);
      return true;
    }
  }
 catch (  SAXException e) {
    throw XMLMarshalException.unmarshalException(e);
  }
  return true;
}