nus-yam/ex-repair huggingface dataset:
Program: 66199
Project: 66199
Buggy source:
/** 
 * INTERNAL: Build a valid Short instance from a String or another Number instance.
 * @caught exception    The Short(String) constructor throws aNumberFormatException if the String does not contain a parsable short.
 */
protected Short convertObjectToShort(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String && ((String)sourceObject).length() > 0 && ((String)sourceObject).charAt(0) == PLUS) {
    return super.convertObjectToShort(((String)sourceObject).substring(1));
  }
  return super.convertObjectToShort(sourceObject);
}

Fixed version (ground truth):
/** 
 * INTERNAL: Build a valid Short instance from a String or another Number instance.
 * @caught exception    The Short(String) constructor throws aNumberFormatException if the String does not contain a parsable short.
 */
protected Short convertObjectToShort(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String) {
    String sourceString=(String)sourceObject;
    if (sourceString.length() == 0) {
      return 0;
    }
 else     if (sourceString.charAt(0) == PLUS) {
      return super.convertObjectToShort(sourceString.substring(1));
    }
  }
  return super.convertObjectToShort(sourceObject);
}
Program: 66200
Project: 66200
Buggy source:
/** 
 * Convert the object to an instance of Double.
 * @param sourceObject Object of type String or Number.
 * @caught exception    The Double(String) constructor throws aNumberFormatException if the String does not contain a parsable double.
 */
protected Double convertObjectToDouble(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String) {
    if (XMLConstants.POSITIVE_INFINITY.equals(sourceObject)) {
      return Double.valueOf(Double.POSITIVE_INFINITY);
    }
 else     if (XMLConstants.NEGATIVE_INFINITY.equals(sourceObject)) {
      return Double.valueOf(Double.NEGATIVE_INFINITY);
    }
 else {
      return super.convertObjectToDouble(sourceObject);
    }
  }
 else {
    return super.convertObjectToDouble(sourceObject);
  }
}

Fixed version (ground truth):
/** 
 * Convert the object to an instance of Double.
 * @param sourceObject Object of type String or Number.
 * @caught exception    The Double(String) constructor throws aNumberFormatException if the String does not contain a parsable double.
 */
protected Double convertObjectToDouble(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String) {
    if (((String)sourceObject).length() == 0) {
      return 0d;
    }
 else     if (XMLConstants.POSITIVE_INFINITY.equals(sourceObject)) {
      return Double.valueOf(Double.POSITIVE_INFINITY);
    }
 else     if (XMLConstants.NEGATIVE_INFINITY.equals(sourceObject)) {
      return Double.valueOf(Double.NEGATIVE_INFINITY);
    }
 else {
      return super.convertObjectToDouble(sourceObject);
    }
  }
 else {
    return super.convertObjectToDouble(sourceObject);
  }
}
Program: 66201
Project: 66201
Buggy source:
/** 
 * Build a valid instance of BigDecimal from the given sourceObject
 * @param sourceObject    Valid instance of String, BigInteger, any Number
 */
protected BigDecimal convertObjectToBigDecimal(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String && ((String)sourceObject).length() > 0 && ((String)sourceObject).charAt(0) == PLUS) {
    return super.convertObjectToBigDecimal(((String)sourceObject).substring(1));
  }
  return super.convertObjectToBigDecimal(sourceObject);
}

Fixed version (ground truth):
/** 
 * Build a valid instance of BigDecimal from the given sourceObject
 * @param sourceObject    Valid instance of String, BigInteger, any Number
 */
protected BigDecimal convertObjectToBigDecimal(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String) {
    String sourceString=(String)sourceObject;
    if (sourceString.length() == 0) {
      return BigDecimal.ZERO;
    }
 else     if (sourceString.charAt(0) == PLUS) {
      return super.convertObjectToBigDecimal(sourceString.substring(1));
    }
  }
  return super.convertObjectToBigDecimal(sourceObject);
}
Program: 66202
Project: 66202
Buggy source:
/** 
 * Build a valid Float instance from a String or another Number instance.
 * @caught exception    The Float(String) constructor throws aNumberFormatException if the String does not contain a parsable Float.
 */
protected Float convertObjectToFloat(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String) {
    if (XMLConstants.POSITIVE_INFINITY.equals(sourceObject)) {
      return new Float(Float.POSITIVE_INFINITY);
    }
 else     if (XMLConstants.NEGATIVE_INFINITY.equals(sourceObject)) {
      return new Float(Float.NEGATIVE_INFINITY);
    }
    return super.convertObjectToFloat(sourceObject);
  }
 else {
    return super.convertObjectToFloat(sourceObject);
  }
}

Fixed version (ground truth):
/** 
 * Build a valid Float instance from a String or another Number instance.
 * @caught exception    The Float(String) constructor throws aNumberFormatException if the String does not contain a parsable Float.
 */
protected Float convertObjectToFloat(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String) {
    if (((String)sourceObject).length() == 0) {
      return 0f;
    }
 else     if (XMLConstants.POSITIVE_INFINITY.equals(sourceObject)) {
      return new Float(Float.POSITIVE_INFINITY);
    }
 else     if (XMLConstants.NEGATIVE_INFINITY.equals(sourceObject)) {
      return new Float(Float.NEGATIVE_INFINITY);
    }
  }
  return super.convertObjectToFloat(sourceObject);
}
Program: 66203
Project: 66203
Buggy source:
/** 
 * Build a valid instance of Byte from the provided sourceObject
 * @param sourceObject    Valid instance of String or any Number
 * @caught exception        The Byte(String) constructor throws aNumberFormatException if the String does not contain a parsable byte.
 */
protected Byte convertObjectToByte(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String && ((String)sourceObject).length() > 0 && ((String)sourceObject).charAt(0) == PLUS) {
    return super.convertObjectToByte(((String)sourceObject).substring(1));
  }
  return super.convertObjectToByte(sourceObject);
}

Fixed version (ground truth):
/** 
 * Build a valid instance of Byte from the provided sourceObject
 * @param sourceObject    Valid instance of String or any Number
 * @caught exception        The Byte(String) constructor throws aNumberFormatException if the String does not contain a parsable byte.
 */
protected Byte convertObjectToByte(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String) {
    String sourceString=(String)sourceObject;
    if (sourceString.length() == 0) {
      return 0;
    }
 else     if (sourceString.charAt(0) == PLUS) {
      return super.convertObjectToByte(sourceString.substring(1));
    }
  }
  return super.convertObjectToByte(sourceObject);
}
Program: 66204
Project: 66204
Buggy source:
/** 
 * Build a valid Long instance from a String or another Number instance.
 * @caught exception    The Long(String) constructor throws aNumberFormatException if the String does not contain a parsable long.
 */
protected Long convertObjectToLong(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String && ((String)sourceObject).length() > 0 && ((String)sourceObject).charAt(0) == PLUS) {
    return super.convertObjectToLong(((String)sourceObject).substring(1));
  }
  return super.convertObjectToLong(sourceObject);
}

Fixed version (ground truth):
/** 
 * Build a valid Long instance from a String or another Number instance.
 * @caught exception    The Long(String) constructor throws aNumberFormatException if the String does not contain a parsable long.
 */
protected Long convertObjectToLong(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String) {
    String sourceString=(String)sourceObject;
    if (sourceString.length() == 0) {
      return 0l;
    }
 else     if (sourceString.charAt(0) == PLUS) {
      return super.convertObjectToLong(sourceString.substring(1));
    }
  }
  return super.convertObjectToLong(sourceObject);
}
Program: 66205
Project: 66205
Buggy source:
/** 
 * Build a valid instance of BigInteger from the provided sourceObject.
 * @param sourceObject    Valid instance of String, BigDecimal, or any Number
 */
protected BigInteger convertObjectToBigInteger(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String && ((String)sourceObject).length() > 0 && ((String)sourceObject).charAt(0) == PLUS) {
    return super.convertObjectToBigInteger(((String)sourceObject).substring(1));
  }
  return super.convertObjectToBigInteger(sourceObject);
}

Fixed version (ground truth):
/** 
 * Build a valid instance of BigInteger from the provided sourceObject.
 * @param sourceObject    Valid instance of String, BigDecimal, or any Number
 */
protected BigInteger convertObjectToBigInteger(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String) {
    String sourceString=(String)sourceObject;
    if (sourceString.length() == 0) {
      return BigInteger.ZERO;
    }
 else     if (sourceString.charAt(0) == PLUS) {
      return super.convertObjectToBigInteger(sourceString.substring(1));
    }
  }
  return super.convertObjectToBigInteger(sourceObject);
}
Program: 66206
Project: 66206
Buggy source:
/** 
 * INTERNAL: Build a valid BigDecimal instance from a String or another Number instance.  BigDecimal is the most general type so is must be returned when an object is converted to a number.
 * @caught exception    The BigDecimal(String) constructor throws aNumberFormatException if the String does not contain a parsable BigDecimal.
 */
protected BigDecimal convertObjectToNumber(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String && ((String)sourceObject).length() > 0 && ((String)sourceObject).charAt(0) == PLUS) {
    return super.convertObjectToNumber(((String)sourceObject).substring(1));
  }
  return super.convertObjectToNumber(sourceObject);
}

Fixed version (ground truth):
/** 
 * INTERNAL: Build a valid BigDecimal instance from a String or another Number instance.  BigDecimal is the most general type so is must be returned when an object is converted to a number.
 * @caught exception    The BigDecimal(String) constructor throws aNumberFormatException if the String does not contain a parsable BigDecimal.
 */
protected BigDecimal convertObjectToNumber(Object sourceObject) throws ConversionException {
  if (sourceObject instanceof String) {
    String sourceString=(String)sourceObject;
    if (sourceString.length() == 0) {
      return BigDecimal.ZERO;
    }
 else     if (sourceString.charAt(0) == PLUS) {
      return super.convertObjectToNumber(sourceString.substring(1));
    }
  }
  return super.convertObjectToNumber(sourceObject);
}
Program: 66208
Project: 66208
Buggy source:
/** 
 * Retrieve the reference for a given mapping instance.
 * @param mapping
 */
public Reference getReference(XMLObjectReferenceMapping mapping,Object sourceObject){
  for (int x=0; x < references.size(); x++) {
    Reference reference=(Reference)references.get(x);
    if (reference.getMapping() == mapping && reference.getSourceObject() == sourceObject) {
      return reference;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Return a reference for the given mapping and source object, that doesn't already contain an entry for the provided field. 
 * @return
 */
public Reference getReference(XMLObjectReferenceMapping mapping,Object sourceObject,XMLField xmlField){
  XMLField targetField=(XMLField)mapping.getSourceToTargetKeyFieldAssociations().get(xmlField);
  String tgtXpath=null;
  if (!(mapping.getReferenceClass() == null || mapping.getReferenceClass() == Object.class)) {
    if (targetField != null) {
      tgtXpath=targetField.getXPath();
    }
  }
  for (int x=0; x < references.size(); x++) {
    Reference reference=(Reference)references.get(x);
    if (reference.getMapping() == mapping && reference.getSourceObject() == sourceObject) {
      if (reference.getPrimaryKeyMap().get(tgtXpath) == null) {
        return reference;
      }
    }
  }
  return null;
}
Program: 66209
Project: 66209
Buggy source:
/** 
 * The default constructor initializes the list of References.
 */
public ReferenceResolver(){
  references=new ArrayList();
}

Fixed version (ground truth):
/** 
 * The default constructor initializes the list of References.
 */
public ReferenceResolver(){
  references=new ArrayList();
  referencedContainers=new HashMap<ReferenceKey,Object>();
  lookupKey=new ReferenceKey(null,null);
}
Program: 66211
Project: 66211
Buggy source:
private void initializeNodeValue(){
  XMLMapping xmlMapping=xmlChoiceCollectionMapping.getChoiceElementMappings().get(xmlField);
  if (xmlMapping instanceof XMLCompositeDirectCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeDirectCollectionMappingNodeValue((XMLCompositeDirectCollectionMapping)xmlMapping);
  }
 else {
    choiceElementNodeValue=new XMLCompositeCollectionMappingNodeValue((XMLCompositeCollectionMapping)xmlMapping);
  }
}

Fixed version (ground truth):
private void initializeNodeValue(){
  XMLMapping xmlMapping=xmlChoiceCollectionMapping.getChoiceElementMappings().get(xmlField);
  if (xmlMapping instanceof XMLCompositeDirectCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeDirectCollectionMappingNodeValue((XMLCompositeDirectCollectionMapping)xmlMapping);
  }
 else   if (xmlMapping instanceof XMLCompositeCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeCollectionMappingNodeValue((XMLCompositeCollectionMapping)xmlMapping);
  }
 else {
    XMLCollectionReferenceMapping refMapping=((XMLCollectionReferenceMapping)xmlMapping);
    if (refMapping.usesSingleNode() || refMapping.getFields().size() == 1) {
      choiceElementNodeValue=new XMLCollectionReferenceMappingNodeValue(refMapping,xmlField);
    }
 else {
      choiceElementNodeValue=new XMLCollectionReferenceMappingMarshalNodeValue((XMLCollectionReferenceMapping)xmlMapping);
    }
  }
}
Program: 66212
Project: 66212
Buggy source:
private void initializeNodeValue(){
  XMLMapping xmlMapping=xmlChoiceCollectionMapping.getChoiceElementMappings().get(xmlField);
  if (xmlMapping instanceof XMLCompositeDirectCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeDirectCollectionMappingNodeValue((XMLCompositeDirectCollectionMapping)xmlMapping);
  }
 else {
    choiceElementNodeValue=new XMLCompositeCollectionMappingNodeValue((XMLCompositeCollectionMapping)xmlMapping);
  }
}

Fixed version (ground truth):
private void initializeNodeValue(){
  XMLMapping xmlMapping=xmlChoiceCollectionMapping.getChoiceElementMappings().get(xmlField);
  if (xmlMapping instanceof XMLCompositeDirectCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeDirectCollectionMappingNodeValue((XMLCompositeDirectCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else   if (xmlMapping instanceof XMLCompositeCollectionMapping) {
    choiceElementNodeValue=new XMLCompositeCollectionMappingNodeValue((XMLCompositeCollectionMapping)xmlMapping);
    choiceElementMarshalNodeValue=choiceElementNodeValue;
  }
 else {
    choiceElementNodeValue=new XMLCollectionReferenceMappingNodeValue((XMLCollectionReferenceMapping)xmlMapping,xmlField);
    choiceElementMarshalNodeValue=new XMLCollectionReferenceMappingMarshalNodeValue((XMLCollectionReferenceMapping)xmlMapping);
  }
}
Program: 66213
Project: 66213
Buggy source:
public boolean marshalSingleValue(XPathFragment xPathFragment,MarshalRecord marshalRecord,Object object,Object value,AbstractSession session,NamespaceResolver namespaceResolver,MarshalContext marshalContext){
  if (value instanceof XMLRoot) {
    XMLRoot root=(XMLRoot)value;
    XPathFragment fragment=this.xmlField.getXPathFragment();
    while (fragment != null && !fragment.nameIsText) {
      if (fragment.getNextFragment() == null || fragment.getHasText()) {
        if (fragment.getLocalName().equals(root.getLocalName())) {
          String fragUri=fragment.getNamespaceURI();
          String namespaceUri=root.getNamespaceURI();
          if ((namespaceUri == null && fragUri == null) || (namespaceUri != null && fragUri != null && namespaceUri.equals(fragUri))) {
            return this.choiceElementNodeValue.marshalSingleValue(xPathFragment,marshalRecord,object,value,session,namespaceResolver,marshalContext);
          }
        }
      }
      fragment=fragment.getNextFragment();
    }
  }
 else {
    if (value != null && xmlChoiceMapping.getClassToFieldMappings().get(value.getClass()) == this.xmlField) {
      return this.choiceElementNodeValue.marshalSingleValue(xPathFragment,marshalRecord,object,value,session,namespaceResolver,marshalContext);
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean marshalSingleValue(XPathFragment xPathFragment,MarshalRecord marshalRecord,Object object,Object value,AbstractSession session,NamespaceResolver namespaceResolver,MarshalContext marshalContext){
  if (value instanceof XMLRoot) {
    XMLRoot root=(XMLRoot)value;
    XPathFragment fragment=this.xmlField.getXPathFragment();
    while (fragment != null && !fragment.nameIsText) {
      if (fragment.getNextFragment() == null || fragment.getHasText()) {
        if (fragment.getLocalName().equals(root.getLocalName())) {
          String fragUri=fragment.getNamespaceURI();
          String namespaceUri=root.getNamespaceURI();
          if ((namespaceUri == null && fragUri == null) || (namespaceUri != null && fragUri != null && namespaceUri.equals(fragUri))) {
            return this.choiceElementNodeValue.marshalSingleValue(xPathFragment,marshalRecord,object,value,session,namespaceResolver,marshalContext);
          }
        }
      }
      fragment=fragment.getNextFragment();
    }
  }
 else {
    if (value != null && xmlChoiceMapping.getClassToFieldMappings().get(value.getClass()) == this.xmlField) {
      return this.choiceElementNodeValue.marshalSingleValue(xPathFragment,marshalRecord,object,value,session,namespaceResolver,marshalContext);
    }
 else     if (value != null) {
      List<XMLField> sourceFields=xmlChoiceMapping.getClassToSourceFieldsMappings().get(value.getClass());
      if (sourceFields != null && sourceFields.contains(this.xmlField)) {
        return this.choiceElementNodeValue.marshalSingleValue(xPathFragment,marshalRecord,object,value,session,namespaceResolver,marshalContext);
      }
    }
  }
  return false;
}
Program: 66214
Project: 66214
Buggy source:
public void initializeNodeValue(){
  XMLMapping xmlMapping=xmlChoiceMapping.getChoiceElementMappings().get(xmlField);
  if (xmlMapping instanceof XMLDirectMapping) {
    choiceElementNodeValue=new XMLDirectMappingNodeValue((XMLDirectMapping)xmlMapping);
  }
 else {
    choiceElementNodeValue=new XMLCompositeObjectMappingNodeValue((XMLCompositeObjectMapping)xmlMapping);
  }
}

Fixed version (ground truth):
public void initializeNodeValue(){
  XMLMapping xmlMapping=xmlChoiceMapping.getChoiceElementMappings().get(xmlField);
  if (xmlMapping instanceof XMLDirectMapping) {
    choiceElementNodeValue=new XMLDirectMappingNodeValue((XMLDirectMapping)xmlMapping);
  }
 else   if (xmlMapping instanceof XMLObjectReferenceMapping) {
    choiceElementNodeValue=new XMLObjectReferenceMappingNodeValue((XMLObjectReferenceMapping)xmlMapping,xmlField);
  }
 else {
    choiceElementNodeValue=new XMLCompositeObjectMappingNodeValue((XMLCompositeObjectMapping)xmlMapping);
  }
}
Program: 66217
Project: 66217
Buggy source:
public Class loadClass(String className) throws ClassNotFoundException {
  Class javaClass=null;
  try {
    javaClass=nestedClassLoader.loadClass(className);
  }
 catch (  ClassNotFoundException e) {
    javaClass=(Class)generatedClasses.get(className);
    if (javaClass != null) {
      return javaClass;
    }
    throw e;
  }
catch (  NoClassDefFoundError error) {
    javaClass=(Class)generatedClasses.get(className);
    if (javaClass == null) {
      throw error;
    }
  }
  return javaClass;
}

Fixed version (ground truth):
public Class loadClass(String className) throws ClassNotFoundException {
  Class javaClass=null;
  try {
    javaClass=getParent().loadClass(className);
  }
 catch (  ClassNotFoundException e) {
    javaClass=(Class)generatedClasses.get(className);
    if (javaClass != null) {
      return javaClass;
    }
    throw e;
  }
catch (  NoClassDefFoundError error) {
    javaClass=(Class)generatedClasses.get(className);
    if (javaClass == null) {
      throw error;
    }
  }
  return javaClass;
}
Program: 66218
Project: 66218
Buggy source:
public JaxbClassLoader(ClassLoader nestedClassLoader,TypeMappingInfo[] types){
  this.nestedClassLoader=nestedClassLoader;
  this.generatedClasses=new HashMap();
  if (types != null) {
    for (int i=0; i < types.length; i++) {
      TypeMappingInfo tmi=types[i];
      Type nextType=tmi.getType();
      if (nextType == null) {
        throw org.eclipse.persistence.exceptions.JAXBException.nullTypeOnTypeMappingInfo(tmi.getXmlTagName());
      }
      if (nextType instanceof Class) {
        generatedClasses.put(((Class)nextType).getName(),nextType);
      }
    }
  }
}

Fixed version (ground truth):
public JaxbClassLoader(ClassLoader nestedClassLoader,TypeMappingInfo[] types){
  super(nestedClassLoader);
  this.generatedClasses=new HashMap();
  if (types != null) {
    for (int i=0; i < types.length; i++) {
      TypeMappingInfo tmi=types[i];
      Type nextType=tmi.getType();
      if (nextType == null) {
        throw org.eclipse.persistence.exceptions.JAXBException.nullTypeOnTypeMappingInfo(tmi.getXmlTagName());
      }
      if (nextType instanceof Class) {
        generatedClasses.put(((Class)nextType).getName(),nextType);
      }
    }
  }
}
Program: 66219
Project: 66219
Buggy source:
private Class generateMapEntryClassAndDescriptor(Property property,NamespaceResolver nr){
  JavaClass keyType=property.getKeyType();
  JavaClass valueType=property.getValueType();
  if (keyType == null) {
    keyType=helper.getJavaClass("String_Node_Str");
  }
  if (valueType == null) {
    valueType=helper.getJavaClass("String_Node_Str");
  }
  String mapEntryClassName=WRAPPER_CLASS + wrapperCounter++;
  MapEntryGeneratedKey mapKey=new MapEntryGeneratedKey(keyType.getQualifiedName(),valueType.getQualifiedName());
  Class generatedClass=getGeneratedMapEntryClasses().get(mapKey);
  if (generatedClass == null) {
    generatedClass=generateMapEntryClass(mapEntryClassName,keyType.getQualifiedName(),valueType.getQualifiedName());
    getGeneratedMapEntryClasses().put(mapKey,generatedClass);
    XMLDescriptor desc=new XMLDescriptor();
    desc.setJavaClass(generatedClass);
    desc.addMapping(generateMappingForType(keyType,Property.DEFAULT_KEY_NAME));
    desc.addMapping(generateMappingForType(valueType,Property.DEFAULT_VALUE_NAME));
    NamespaceResolver newNr=new NamespaceResolver();
    String prefix=getPrefixForNamespace(XMLConstants.SCHEMA_INSTANCE_URL,nr,XMLConstants.SCHEMA_INSTANCE_PREFIX,false);
    if (prefix != null) {
      newNr.put(prefix,XMLConstants.SCHEMA_INSTANCE_URL);
    }
    desc.setNamespaceResolver(newNr);
    project.addDescriptor(desc);
  }
  return generatedClass;
}

Fixed version (ground truth):
private Class generateMapEntryClassAndDescriptor(Property property,NamespaceResolver nr){
  JavaClass keyType=property.getKeyType();
  JavaClass valueType=property.getValueType();
  if (keyType == null) {
    keyType=helper.getJavaClass("String_Node_Str");
  }
  if (valueType == null) {
    valueType=helper.getJavaClass("String_Node_Str");
  }
  String mapEntryClassName=((JaxbClassLoader)helper.getClassLoader()).nextAvailableGeneratedClassName();
  MapEntryGeneratedKey mapKey=new MapEntryGeneratedKey(keyType.getQualifiedName(),valueType.getQualifiedName());
  Class generatedClass=getGeneratedMapEntryClasses().get(mapKey);
  if (generatedClass == null) {
    generatedClass=generateMapEntryClass(mapEntryClassName,keyType.getQualifiedName(),valueType.getQualifiedName());
    getGeneratedMapEntryClasses().put(mapKey,generatedClass);
    XMLDescriptor desc=new XMLDescriptor();
    desc.setJavaClass(generatedClass);
    desc.addMapping(generateMappingForType(keyType,Property.DEFAULT_KEY_NAME));
    desc.addMapping(generateMappingForType(valueType,Property.DEFAULT_VALUE_NAME));
    NamespaceResolver newNr=new NamespaceResolver();
    String prefix=getPrefixForNamespace(XMLConstants.SCHEMA_INSTANCE_URL,nr,XMLConstants.SCHEMA_INSTANCE_PREFIX,false);
    if (prefix != null) {
      newNr.put(prefix,XMLConstants.SCHEMA_INSTANCE_URL);
    }
    desc.setNamespaceResolver(newNr);
    project.addDescriptor(desc);
  }
  return generatedClass;
}
Program: 66222
Project: 66222
Buggy source:
/** 
 * INTERNAL: Process the indirection (aka fetch type)
 */
protected void processIndirection(ObjectReferenceMapping mapping){
  boolean usesIndirection=usesIndirection();
  if (usesIndirection && (!getProject().isWeavingEnabled()) && (!ClassConstants.PersistenceWeavedLazy_Class.isAssignableFrom(getJavaClass(getDescriptor().getJavaClass())))) {
    usesIndirection=false;
  }
  if (usesIndirection && usesPropertyAccess()) {
    mapping.setIndirectionPolicy(new WeavedObjectBasicIndirectionPolicy(getGetMethodName(),getSetMethodName(),true));
  }
 else   if (usesIndirection && usesFieldAccess()) {
    mapping.setIndirectionPolicy(new WeavedObjectBasicIndirectionPolicy(Helper.getWeavedGetMethodName(mapping.getAttributeName()),Helper.getWeavedSetMethodName(mapping.getAttributeName()),false));
  }
 else {
    mapping.setUsesIndirection(usesIndirection);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Process the indirection (aka fetch type)
 */
protected void processIndirection(ObjectReferenceMapping mapping){
  boolean usesIndirection=usesIndirection();
  if (usesIndirection && (!getProject().isWeavingEnabled()) && (!getDescriptor().getJavaClass().extendsInterface(ClassConstants.PersistenceWeavedLazy_Class))) {
    usesIndirection=false;
  }
  if (usesIndirection && usesPropertyAccess()) {
    mapping.setIndirectionPolicy(new WeavedObjectBasicIndirectionPolicy(getGetMethodName(),getSetMethodName(),true));
  }
 else   if (usesIndirection && usesFieldAccess()) {
    mapping.setIndirectionPolicy(new WeavedObjectBasicIndirectionPolicy(Helper.getWeavedGetMethodName(mapping.getAttributeName()),Helper.getWeavedSetMethodName(mapping.getAttributeName()),false));
  }
 else {
    mapping.setUsesIndirection(usesIndirection);
  }
}
Program: 66223
Project: 66223
Buggy source:
public XMLEventReaderReader(){
  this.namespaces=new HashMap<Integer,List<Namespace>>();
}

Fixed version (ground truth):
public XMLEventReaderReader(XMLUnmarshaller xmlUnmarshaller){
  super(xmlUnmarshaller);
  this.namespaces=new HashMap<Integer,List<Namespace>>();
}
Program: 66224
Project: 66224
Buggy source:
@Override public void setContentHandler(ContentHandler contentHandler){
  this.contentHandler=contentHandler;
}

Fixed version (ground truth):
@Override public void setContentHandler(ContentHandler contentHandler){
  if (null == validatorHandler) {
    this.contentHandler=contentHandler;
  }
 else {
    validatorHandler.setContentHandler(contentHandler);
    this.contentHandler=validatorHandler;
  }
}
Program: 66225
Project: 66225
Buggy source:
@Override public void setErrorHandler(ErrorHandler errorHandler){
  this.errorHandler=errorHandler;
}

Fixed version (ground truth):
@Override public void setErrorHandler(ErrorHandler errorHandler){
  this.errorHandler=errorHandler;
  if (null != validatorHandler) {
    validatorHandler.setErrorHandler(errorHandler);
  }
}
Program: 66226
Project: 66226
Buggy source:
public XMLStreamReaderReader(){
  unmarshalNamespaceContext=new UnmarshalNamespaceContext();
  indexedAttributeList=new IndexedAttributeList();
}

Fixed version (ground truth):
public XMLStreamReaderReader(XMLUnmarshaller xmlUnmarshaller){
  super(xmlUnmarshaller);
  unmarshalNamespaceContext=new UnmarshalNamespaceContext();
  indexedAttributeList=new IndexedAttributeList();
}
Program: 66227
Project: 66227
Buggy source:
public XMLBinder(XMLContext context){
  marshaller=context.createMarshaller();
  unmarshaller=context.createUnmarshaller();
  saxUnmarshaller=new SAXUnmarshaller(unmarshaller,null);
  this.context=context;
  documentPreservationPolicy=new XMLBinderPolicy();
  reader=new DOMReader();
}

Fixed version (ground truth):
public XMLBinder(XMLContext context){
  marshaller=context.createMarshaller();
  unmarshaller=context.createUnmarshaller();
  saxUnmarshaller=new SAXUnmarshaller(unmarshaller,null);
  this.context=context;
  documentPreservationPolicy=new XMLBinderPolicy();
  reader=new DOMReader(unmarshaller);
}
Program: 66229
Project: 66229
Buggy source:
public URL getURL(){
  if (null == loader) {
    return Thread.currentThread().getContextClassLoader().getResource(this.getResource());
  }
  return loader.getResource(this.getResource());
}

Fixed version (ground truth):
public URL getURL(){
  try {
    if (null == loader) {
      return Thread.currentThread().getContextClassLoader().getResource(this.getResource());
    }
    return loader.getResource(this.getResource());
  }
 catch (  Exception e) {
    throw XMLMarshalException.errorResolvingXMLSchema(e);
  }
}
Program: 66233
Project: 66233
Buggy source:
/** 
 * Convert the specified value to an   {@link Type#getInstanceClass() instance} of the specified property's {@link Property#getType() type}. The specified value must be a List if the property is  {@link Property#isMany() many valued}. In this case, all the values in the List are converted.
 * @param property the target {@link Type#isDataType() data type} property.
 * @param value the value or List of values to convert
 * @return a converted value or list of converted values
 * @throws IllegalArgumentException if the value could not be converted
 * @see #convert(Type,Object)
 */
public Object convert(Property property,Object value){
  if (null == property) {
    throw new IllegalArgumentException(SDOException.conversionError(null));
  }
  Type convertType=property.getType();
  if (property.isMany()) {
    if (value == null) {
      return null;
    }
 else     if (!(value instanceof List)) {
      throw new IllegalArgumentException(SDOException.conversionError(null));
    }
 else {
      List theList=(List)value;
      Object nextItem=null;
      for (int i=0; i < theList.size(); i++) {
        nextItem=theList.get(i);
        theList.set(i,convert(convertType,nextItem));
      }
      return theList;
    }
  }
 else {
    return convert(convertType,value);
  }
}

Fixed version (ground truth):
/** 
 * Convert the specified value to an   {@link Type#getInstanceClass() instance} of the specified property's {@link Property#getType() type}. The specified value must be a List if the property is  {@link Property#isMany() many valued}. In this case, all the values in the List are converted.
 * @param property the target {@link Type#isDataType() data type} property.
 * @param value the value or List of values to convert
 * @return a converted value or list of converted values
 * @throws IllegalArgumentException if the value could not be converted
 * @see #convert(Type,Object)
 */
public Object convert(Property property,Object value){
  if (null == property) {
    throw new IllegalArgumentException(SDOException.conversionError(null));
  }
  try {
    Type convertType=property.getType();
    if (property.isMany()) {
      if (value == null) {
        return null;
      }
 else       if (!(value instanceof List)) {
        throw new IllegalArgumentException(SDOException.conversionError(null));
      }
 else {
        List theList=(List)value;
        Object nextItem=null;
        for (int i=0; i < theList.size(); i++) {
          nextItem=theList.get(i);
          theList.set(i,convert(convertType,nextItem));
        }
        return theList;
      }
    }
 else {
      return convert(convertType,value);
    }
  }
 catch (  ConversionException e) {
    throw SDOException.invalidPropertyValue(property.getName(),property.getType().getURI() + '#' + property.getType().getName(),value.getClass().getName(),value.toString(),e);
  }
}
Program: 66235
Project: 66235
Buggy source:
/** 
 * ADVANCED: Remove the HelperContext for the application associated with a given key, if it exists in the map.
 */
private static void resetHelperContext(String key){
  helperContexts.remove(key);
  ClassLoader appLoader=appNameToClassLoaderMap.get(key);
  if (appLoader != null) {
    helperContexts.remove(appLoader);
  }
  appNameToClassLoaderMap.remove(key);
}

Fixed version (ground truth):
/** 
 * ADVANCED: Remove the HelperContext for the application associated with a given key, if it exists in the map.
 */
private static void resetHelperContext(String key){
  helperContexts.remove(key);
  ClassLoader appLoader=appNameToClassLoaderMap.get(key);
  if (appLoader != null) {
    helperContexts.remove(appLoader);
  }
  appNameToClassLoaderMap.remove(key);
  aliasMap.remove(key);
}
Program: 66236
Project: 66236
Buggy source:
/** 
 * Replaces the provided helper context in the map of identifiers to helper contexts for this application. ctx.getIdentifier() will be used to obtain identifier 
 */
public static void putHelperContext(HelperContext ctx){
  String identifier=((SDOHelperContext)ctx).getIdentifier();
  if (GLOBAL_HELPER_IDENTIFIER.equals(identifier)) {
    return;
  }
  getContextMap().put(identifier,ctx);
}

Fixed version (ground truth):
/** 
 * Replaces the provided  helper context in the map of identifiers to  helper contexts for this application. ctx.getIdentifier()  will be  used to obtain the identifier value. If identifier is a key in the  the alias Map, i.e. was previously set as alias, the corresponding  entry will be removed from the alias Map.
 * @param ctx the HelperContext to be added to the context Map forthe current application
 */
public static void putHelperContext(HelperContext ctx){
  String identifier=((SDOHelperContext)ctx).getIdentifier();
  if (GLOBAL_HELPER_IDENTIFIER.equals(identifier)) {
    return;
  }
  getContextMap().put(identifier,ctx);
  getAliasMap().remove(identifier);
}
Program: 66238
Project: 66238
Buggy source:
/** 
 * Return true if a HelperContext corresponding to this identifier or alias already exists, else false.  If identifer is an alias, the corresponding  value in the alias Map will be used as the identifier for the lookup.
 * @param identifier the alias or identifier used to lookup a helper context
 * @return true if an entry exists in the helper context map for identifier (or the associated identifier value if identifier is an alias), false otherwise. 
 */
public static boolean hasHelperContext(String identifier){
  String id=identifier;
  Object appKey=getMapKey();
  ConcurrentMap<String,String> aliasEntries=getAliasMap();
  if (aliasEntries.containsKey(identifier)) {
    id=aliasEntries.get(identifier);
  }
  WeakHashMap<String,WeakReference<HelperContext>> userSetMap=userSetHelperContexts.get(appKey);
  if (userSetMap != null && userSetMap.containsKey(id)) {
    return true;
  }
  ConcurrentHashMap<String,HelperContext> contextMap=helperContexts.get(appKey);
  return (contextMap != null && contextMap.containsKey(id));
}

Fixed version (ground truth):
/** 
 * Return true if a HelperContext corresponding to this identifier or alias already exists, else false.  If identifer is an alias, the corresponding  value in the alias Map will be used as the identifier for the lookup.
 * @param identifier the alias or identifier used to lookup a helper context
 * @return true if an entry exists in the helper context map for identifier (or the associated identifier value if identifier is an alias), false otherwise. 
 */
public static boolean hasHelperContext(String identifier){
  String id=identifier;
  Object appKey=getMapKey();
  ConcurrentMap<String,String> aliasEntries=getAliasMap(appKey);
  if (aliasEntries.containsKey(identifier)) {
    id=aliasEntries.get(identifier);
  }
  WeakHashMap<String,WeakReference<HelperContext>> userSetMap=userSetHelperContexts.get(appKey);
  if (userSetMap != null && userSetMap.containsKey(id)) {
    return true;
  }
  ConcurrentHashMap<String,HelperContext> contextMap=helperContexts.get(appKey);
  return (contextMap != null && contextMap.containsKey(id));
}
Program: 66240
Project: 66240
Buggy source:
protected void _addCurrentDateTest(){
  ExpressionBuilder builder=new ExpressionBuilder();
  Expression expression=builder.get("String_Node_Str").get("String_Node_Str").lessThan(builder.currentDate());
  ReadAllExpressionTest test=new ReadAllExpressionTest(Employee.class,12);
  test.setExpression(expression);
  test.setName("String_Node_Str");
  test.setDescription("String_Node_Str");
  test.addUnsupportedPlatform(DB2Platform.class);
  test.addUnsupportedPlatform(TimesTenPlatform.class);
  test.addUnsupportedPlatform(SymfowarePlatform.class);
  addTest(test);
}

Fixed version (ground truth):
protected void _addCurrentDateTest(){
  ExpressionBuilder builder=new ExpressionBuilder();
  Expression expression=builder.get("String_Node_Str").get("String_Node_Str").lessThan(builder.currentDateDate());
  ReadAllExpressionTest test=new ReadAllExpressionTest(Employee.class,12);
  test.setExpression(expression);
  test.setName("String_Node_Str");
  test.setDescription("String_Node_Str");
  test.addUnsupportedPlatform(DB2Platform.class);
  test.addUnsupportedPlatform(TimesTenPlatform.class);
  test.addUnsupportedPlatform(SymfowarePlatform.class);
  addTest(test);
}
Program: 66241
Project: 66241
Buggy source:
@Test public void testSimpleCascadeToDetached1() throws SQLException {
  final JPAEnvironment env=getEnvironment();
  final EntityManager em=env.getEntityManager();
  try {
    CascadingNode child=new CascadingNode(21,null);
    env.beginTransaction(em);
    em.persist(child);
    env.commitTransactionAndClear(em);
    env.beginTransaction(em);
    CascadingNode parent=new CascadingNode(22,null);
    em.persist(parent);
    parent.addChild(child);
    verify(em.contains(parent),"String_Node_Str");
    verify(!em.contains(child),"String_Node_Str");
    boolean exceptionThrown=false;
    try {
      env.commitTransactionAndClear(em);
    }
 catch (    RuntimeException e) {
      if (!checkForIllegalStateException(e) && !checkForSQLException(e)) {
        throw e;
      }
      exceptionThrown=true;
    }
    verify(exceptionThrown,"String_Node_Str");
    verifyAbsenceFromDatabase(parent.getId());
    verifyExistenceOnDatabase(child.getId());
  }
  finally {
    closeEntityManager(em);
  }
}

Fixed version (ground truth):
@Test public void testSimpleCascadeToDetached1() throws SQLException {
  final JPAEnvironment env=getEnvironment();
  final EntityManager em=env.getEntityManager();
  try {
    CascadingNode child=new CascadingNode(21,null);
    env.beginTransaction(em);
    em.persist(child);
    env.commitTransactionAndClear(em);
    env.beginTransaction(em);
    CascadingNode parent=new CascadingNode(22,null);
    em.persist(parent);
    parent.addChild(child);
    verify(em.contains(parent),"String_Node_Str");
    verify(!em.contains(child),"String_Node_Str");
    boolean exceptionThrown=false;
    try {
      env.commitTransactionAndClear(em);
    }
 catch (    RuntimeException e) {
      if (!checkForIllegalStateException(e) && !checkForSQLException(e)) {
        throw e;
      }
      exceptionThrown=true;
    }
    verify(exceptionThrown,"String_Node_Str");
  }
  finally {
    closeEntityManager(em);
  }
}
Program: 66245
Project: 66245
Buggy source:
/** 
 * PUBLIC: Cause:    
 */
public static JAXBException noKeyOrIDPropertyOnJoinTarget(String className,String propertyName,String referencedClassName){
  Object[] args={className,propertyName,referencedClassName};
  JAXBException validationException=new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class,NO_ID_OR_KEY_ON_JOIN_TARGET,args));
  validationException.setErrorCode(NO_ID_OR_KEY_ON_JOIN_TARGET);
  return validationException;
}

Fixed version (ground truth):
/** 
 * PUBLIC: Cause:  The target class has no ID or Key properties set.
 */
public static JAXBException noKeyOrIDPropertyOnJoinTarget(String className,String propertyName,String referencedClassName){
  Object[] args={className,propertyName,referencedClassName};
  JAXBException validationException=new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class,NO_ID_OR_KEY_ON_JOIN_TARGET,args));
  validationException.setErrorCode(NO_ID_OR_KEY_ON_JOIN_TARGET);
  return validationException;
}
Program: 66246
Project: 66246
Buggy source:
/** 
 * PUBLIC: Cause:    
 */
public static JAXBException invalidReferencedXmlPathOnJoin(String className,String propertyName,String referencedClassName,String referencedXmlPath){
  Object[] args={className,propertyName,referencedClassName,referencedXmlPath};
  JAXBException validationException=new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class,INVALID_REF_XML_PATH,args));
  validationException.setErrorCode(INVALID_REF_XML_PATH);
  return validationException;
}

Fixed version (ground truth):
/** 
 * PUBLIC: Cause: No ID or Key property exists on the target class with an XPath == referencedXmlPath. 
 */
public static JAXBException invalidReferencedXmlPathOnJoin(String className,String propertyName,String referencedClassName,String referencedXmlPath){
  Object[] args={className,propertyName,referencedClassName,referencedXmlPath};
  JAXBException validationException=new JAXBException(ExceptionMessageGenerator.buildMessage(JAXBException.class,INVALID_REF_XML_PATH,args));
  validationException.setErrorCode(INVALID_REF_XML_PATH);
  return validationException;
}
Program: 66248
Project: 66248
Buggy source:
/** 
 * Process a given set of JavaClass instances. @XmlIDREFs will be validated, and call back methods  will be handled as required. This method is typically called after init, preBuildTypeInfo, and  postBuildTypeInfo have been called.
 * @param classes
 */
public void processJavaClasses(JavaClass[] classes){
  ArrayList<JavaClass> classesToProcess=new ArrayList<JavaClass>();
  for (  JavaClass javaClass : classes) {
    classesToProcess.add(javaClass);
  }
  checkForCallbackMethods();
}

Fixed version (ground truth):
/** 
 * This method was initially designed to handle processing one or more JavaClass instances.  Over time its functionality has been broken apart and handled in different methods. Its sole purpose now is to check for callback methods. 
 * @param classes this paramater can and should be null as it is not used
 */
public void processJavaClasses(JavaClass[] classes){
  checkForCallbackMethods();
}
Program: 66249
Project: 66249
Buggy source:
/** 
 * Generate TypeInfo instances for a given array of JavaClasses.
 * @param classes
 */
void processClassesAndProperties(JavaClass[] classes,TypeMappingInfo[] typeMappingInfos){
  init(classes,typeMappingInfos);
  preBuildTypeInfo(classes);
  classes=postBuildTypeInfo(classes);
  processJavaClasses(classes);
  finalizeProperties();
  createElementsForTypeMappingInfo();
}

Fixed version (ground truth):
/** 
 * Generate TypeInfo instances for a given array of JavaClasses.
 * @param classes
 */
void processClassesAndProperties(JavaClass[] classes,TypeMappingInfo[] typeMappingInfos){
  init(classes,typeMappingInfos);
  preBuildTypeInfo(classes);
  classes=postBuildTypeInfo(classes);
  processJavaClasses(null);
  finalizeProperties();
  createElementsForTypeMappingInfo();
}
Program: 66251
Project: 66251
Buggy source:
public void testTypePreservation() throws Exception {
  fail("String_Node_Str");
  ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
  InputStream iStream=classLoader.getResourceAsStream(DATATYPES);
  if (iStream == null) {
    fail("String_Node_Str" + DATATYPES + "String_Node_Str");
  }
  HashMap<String,Source> metadataSourceMap=new HashMap<String,Source>();
  metadataSourceMap.put("String_Node_Str",new StreamSource(iStream));
  Map<String,Map<String,Source>> properties=new HashMap<String,Map<String,Source>>();
  properties.put(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY,metadataSourceMap);
  jaxbContext=DynamicJAXBContextFactory.createContextFromOXM(classLoader,properties);
  DynamicEntity person=jaxbContext.newDynamicEntity(PERSON);
  assertNotNull("String_Node_Str",person);
  person.set("String_Node_Str",456);
  person.set("String_Node_Str","String_Node_Str");
  person.set("String_Node_Str",45000.00);
  Document marshalDoc=DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  jaxbContext.createMarshaller().marshal(person,marshalDoc);
  DynamicEntity readPerson=(DynamicEntity)jaxbContext.createUnmarshaller().unmarshal(marshalDoc);
  assertEquals("String_Node_Str",Integer.class,readPerson.get("String_Node_Str").getClass());
  assertEquals("String_Node_Str",Double.class,readPerson.get("String_Node_Str").getClass());
}

Fixed version (ground truth):
public void testTypePreservation() throws Exception {
  fail("String_Node_Str");
  ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
  InputStream iStream=classLoader.getResourceAsStream(DATATYPES);
  if (iStream == null) {
    fail("String_Node_Str" + DATATYPES + "String_Node_Str");
  }
  HashMap<String,Source> metadataSourceMap=new HashMap<String,Source>();
  metadataSourceMap.put("String_Node_Str",new StreamSource(iStream));
  Map<String,Map<String,Source>> properties=new HashMap<String,Map<String,Source>>();
  properties.put(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY,metadataSourceMap);
  jaxbContext=DynamicJAXBContextFactory.createContextFromOXM(classLoader,properties);
  DynamicEntity person=jaxbContext.newDynamicEntity(PERSON);
  assertNotNull("String_Node_Str",person);
  person.set("String_Node_Str",456);
  person.set("String_Node_Str","String_Node_Str");
  person.set("String_Node_Str",45000.00);
  Document marshalDoc=DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  jaxbContext.createMarshaller().marshal(person,marshalDoc);
  DynamicEntity readPerson=(DynamicEntity)jaxbContext.createUnmarshaller().unmarshal(marshalDoc);
  assertEquals("String_Node_Str",Integer.class,readPerson.<Object>get("String_Node_Str").getClass());
  assertEquals("String_Node_Str",Double.class,readPerson.<Object>get("String_Node_Str").getClass());
}
Program: 66252
Project: 66252
Buggy source:
public void testTypePreservation() throws Exception {
  InputStream inputStream=ClassLoader.getSystemResourceAsStream(XMLSCHEMA_DEFAULTS);
  jaxbContext=DynamicJAXBContextFactory.createContextFromXSD(inputStream,null,null,null);
  DynamicEntity person=jaxbContext.newDynamicEntity(PERSON);
  assertNotNull("String_Node_Str",person);
  person.set("String_Node_Str",456);
  person.set("String_Node_Str","String_Node_Str");
  person.set("String_Node_Str",45000.00);
  Document marshalDoc=DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  jaxbContext.createMarshaller().marshal(person,marshalDoc);
  DynamicEntity readPerson=(DynamicEntity)jaxbContext.createUnmarshaller().unmarshal(marshalDoc);
  assertEquals("String_Node_Str",Double.class,readPerson.get("String_Node_Str").getClass());
  assertEquals("String_Node_Str",Integer.class,readPerson.get("String_Node_Str").getClass());
}

Fixed version (ground truth):
public void testTypePreservation() throws Exception {
  InputStream inputStream=ClassLoader.getSystemResourceAsStream(XMLSCHEMA_DEFAULTS);
  jaxbContext=DynamicJAXBContextFactory.createContextFromXSD(inputStream,null,null,null);
  DynamicEntity person=jaxbContext.newDynamicEntity(PERSON);
  assertNotNull("String_Node_Str",person);
  person.set("String_Node_Str",456);
  person.set("String_Node_Str","String_Node_Str");
  person.set("String_Node_Str",45000.00);
  Document marshalDoc=DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  jaxbContext.createMarshaller().marshal(person,marshalDoc);
  DynamicEntity readPerson=(DynamicEntity)jaxbContext.createUnmarshaller().unmarshal(marshalDoc);
  assertEquals("String_Node_Str",Double.class,readPerson.<Object>get("String_Node_Str").getClass());
  assertEquals("String_Node_Str",Integer.class,readPerson.<Object>get("String_Node_Str").getClass());
}
Program: 66253
Project: 66253
Buggy source:
/** 
 * INTERNAL: Supports Batch Writing with Optimistic Locking.
 */
public boolean canBatchWriteWithOptimisticLocking(){
  return true;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Supports Batch Writing with Optimistic Locking.
 */
@Override public boolean canBatchWriteWithOptimisticLocking(DatabaseCall call){
  return true;
}