nus-yam/ex-repair huggingface dataset:
Program: 68206
Project: 68206
Buggy source:
protected IndexedAttributeList buildAttributeList(Element elem) throws SAXException {
  IndexedAttributeList attributes=new IndexedAttributeList();
  NamedNodeMap attrs=elem.getAttributes();
  for (int i=0; i < attrs.getLength(); i++) {
    Attr next=(Attr)attrs.item(i);
    String attrPrefix=next.getPrefix();
    if (attrPrefix != null && attrPrefix.equals(XMLConstants.XMLNS)) {
      getContentHandler().startPrefixMapping(next.getLocalName(),next.getValue());
      handleXMLNSPrefixedAttribute(elem,next);
    }
 else     if (attrPrefix == null) {
      String name=next.getLocalName();
      if (name == null) {
        name=next.getNodeName();
      }
      if (name != null && name.equals("String_Node_Str")) {
        getContentHandler().startPrefixMapping("String_Node_Str",next.getValue());
      }
    }
    attributes.addAttribute(next);
  }
  return attributes;
}

Fixed version (ground truth):
protected IndexedAttributeList buildAttributeList(Element elem) throws SAXException {
  IndexedAttributeList attributes=new IndexedAttributeList();
  NamedNodeMap attrs=elem.getAttributes();
  int length=attrs.getLength();
  for (int i=0; i < length; i++) {
    Attr next=(Attr)attrs.item(i);
    String attrPrefix=next.getPrefix();
    if (attrPrefix != null && attrPrefix.equals(XMLConstants.XMLNS)) {
      getContentHandler().startPrefixMapping(next.getLocalName(),next.getValue());
      handleXMLNSPrefixedAttribute(elem,next);
    }
 else     if (attrPrefix == null) {
      String name=next.getLocalName();
      if (name == null) {
        name=next.getNodeName();
      }
      if (name != null && name.equals("String_Node_Str")) {
        getContentHandler().startPrefixMapping("String_Node_Str",next.getValue());
      }
    }
    attributes.addAttribute(next);
  }
  return attributes;
}
Program: 68207
Project: 68207
Buggy source:
protected void endPrefixMappings(Element elem) throws SAXException {
  NamedNodeMap attrs=elem.getAttributes();
  for (int i=0; i < attrs.getLength(); i++) {
    Attr next=(Attr)attrs.item(i);
    String attrPrefix=next.getPrefix();
    if (attrPrefix != null && attrPrefix.equals(XMLConstants.XMLNS)) {
      getContentHandler().endPrefixMapping(next.getLocalName());
    }
 else     if (attrPrefix == null) {
      String name=next.getLocalName();
      if (name == null) {
        name=next.getNodeName();
      }
      if (name != null) {
        getContentHandler().endPrefixMapping("String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
protected void endPrefixMappings(Element elem) throws SAXException {
  NamedNodeMap attrs=elem.getAttributes();
  int numOfAtts=attrs.getLength();
  for (int i=0; i < numOfAtts; i++) {
    Attr next=(Attr)attrs.item(i);
    String attrPrefix=next.getPrefix();
    if (attrPrefix != null && attrPrefix.equals(XMLConstants.XMLNS)) {
      getContentHandler().endPrefixMapping(next.getLocalName());
    }
 else     if (attrPrefix == null) {
      String name=next.getLocalName();
      if (name == null) {
        name=next.getNodeName();
      }
      if (name != null) {
        getContentHandler().endPrefixMapping("String_Node_Str");
      }
    }
  }
}
Program: 68208
Project: 68208
Buggy source:
public NodeListElementEnumerator(NodeList list){
  this.index=0;
  this.list=list;
  while ((index < list.getLength()) && (list.item(index).getNodeType() != Node.ELEMENT_NODE)) {
    ++this.index;
  }
}

Fixed version (ground truth):
public NodeListElementEnumerator(NodeList list){
  this.index=0;
  this.list=list;
  int length=list.getLength();
  while ((index < length) && (list.item(index).getNodeType() != Node.ELEMENT_NODE)) {
    ++this.index;
  }
}
Program: 68209
Project: 68209
Buggy source:
public Node nextNode(){
  Node result=list.item(index);
  ++index;
  while ((index < list.getLength()) && (list.item(index).getNodeType() != Node.ELEMENT_NODE)) {
    ++this.index;
  }
  return result;
}

Fixed version (ground truth):
public Node nextNode(){
  Node result=list.item(index);
  ++index;
  int length=list.getLength();
  while ((index < length) && (list.item(index).getNodeType() != Node.ELEMENT_NODE)) {
    ++this.index;
  }
  return result;
}
Program: 68210
Project: 68210
Buggy source:
private Object buildObjectValuesFromDOMRecord(DOMRecord record,AbstractSession session,ObjectBuildingQuery query){
  DirectMapContainerPolicy cp=(DirectMapContainerPolicy)getContainerPolicy();
  Object container=cp.containerInstance();
  org.w3c.dom.Element root=(Element)record.getDOM();
  NamedNodeMap attributes=root.getAttributes();
  Attr next;
  String localName;
  for (int i=0; i < attributes.getLength(); i++) {
    next=(Attr)attributes.item(i);
    localName=next.getLocalName();
    if (null == localName) {
      localName=next.getName();
    }
    QName key=new QName(next.getNamespaceURI(),localName);
    String value=next.getValue();
    cp.addInto(key,value,container,session);
  }
  return container;
}

Fixed version (ground truth):
private Object buildObjectValuesFromDOMRecord(DOMRecord record,AbstractSession session,ObjectBuildingQuery query){
  DirectMapContainerPolicy cp=(DirectMapContainerPolicy)getContainerPolicy();
  Object container=cp.containerInstance();
  org.w3c.dom.Element root=(Element)record.getDOM();
  NamedNodeMap attributes=root.getAttributes();
  Attr next;
  String localName;
  int numberOfAtts=attributes.getLength();
  for (int i=0; i < numberOfAtts; i++) {
    next=(Attr)attributes.item(i);
    localName=next.getLocalName();
    if (null == localName) {
      localName=next.getName();
    }
    QName key=new QName(next.getNamespaceURI(),localName);
    String value=next.getValue();
    cp.addInto(key,value,container,session);
  }
  return container;
}
Program: 68211
Project: 68211
Buggy source:
private ArrayList getUnmappedChildNodes(NodeList nodes){
  ArrayList unmappedNodes=new ArrayList();
  for (int i=0; i < nodes.getLength(); i++) {
    Node next=nodes.item(i);
    if (isUnmappedContent(next)) {
      unmappedNodes.add(next);
    }
  }
  return unmappedNodes;
}

Fixed version (ground truth):
private ArrayList getUnmappedChildNodes(NodeList nodes){
  ArrayList unmappedNodes=new ArrayList();
  int length=nodes.getLength();
  for (int i=0; i < length; i++) {
    Node next=nodes.item(i);
    if (isUnmappedContent(next)) {
      unmappedNodes.add(next);
    }
  }
  return unmappedNodes;
}
Program: 68213
Project: 68213
Buggy source:
private ArrayList getUnmappedChildNodes(NodeList nodes){
  ArrayList unmappedNodes=new ArrayList();
  for (int i=0; i < nodes.getLength(); i++) {
    Node next=nodes.item(i);
    if (isUnmappedContent(next)) {
      unmappedNodes.add(next);
    }
  }
  return unmappedNodes;
}

Fixed version (ground truth):
private ArrayList getUnmappedChildNodes(NodeList nodes){
  ArrayList unmappedNodes=new ArrayList();
  int length=nodes.getLength();
  for (int i=0; i < length; i++) {
    Node next=nodes.item(i);
    if (isUnmappedContent(next)) {
      unmappedNodes.add(next);
    }
  }
  return unmappedNodes;
}
Program: 68214
Project: 68214
Buggy source:
public Node getNodeToReplace(Node parent){
  NodeList children=parent.getChildNodes();
  for (int i=0; i < children.getLength(); i++) {
    Node next=children.item(i);
    if ((next.getNodeType() == Node.ELEMENT_NODE) || (next.getNodeType() == Node.TEXT_NODE) || (next.getNodeType() == Node.CDATA_SECTION_NODE)) {
      if (isUnmappedContent(next)) {
        return next;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public Node getNodeToReplace(Node parent){
  Node next=parent.getFirstChild();
  while (next != null) {
    if ((next.getNodeType() == Node.ELEMENT_NODE) || (next.getNodeType() == Node.TEXT_NODE) || (next.getNodeType() == Node.CDATA_SECTION_NODE)) {
      if (isUnmappedContent(next)) {
        return next;
      }
    }
    next=next.getNextSibling();
  }
  return null;
}
Program: 68215
Project: 68215
Buggy source:
/** 
 * PUBLIC: Return the collection of element values from the DOM. todo: needs to do gets with the keys to have correct values, need to check attributes / innerclass
 */
public Collection values(){
  Vector values=new Vector(getDOM().getChildNodes().getLength());
  for (int index=0; index < getDOM().getChildNodes().getLength(); index++) {
    values.add(getDOM().getChildNodes().item(index));
  }
  return values;
}

Fixed version (ground truth):
/** 
 * PUBLIC: Return the collection of element values from the DOM. todo: needs to do gets with the keys to have correct values, need to check attributes / innerclass
 */
public Collection values(){
  int length=getDOM().getChildNodes().getLength();
  Vector values=new Vector(length);
  for (int index=0; index < length; index++) {
    values.add(getDOM().getChildNodes().item(index));
  }
  return values;
}
Program: 68216
Project: 68216
Buggy source:
/** 
 * PUBLIC: Return the set of element names from the DOM. todo: need to check attributes, should be prefix or nodename? / innerclass
 */
public Set keySet(){
  HashSet keys=new HashSet(getDOM().getChildNodes().getLength());
  for (int index=0; index < getDOM().getChildNodes().getLength(); index++) {
    keys.add(getDOM().getChildNodes().item(index).getNodeName());
  }
  return keys;
}

Fixed version (ground truth):
/** 
 * PUBLIC: Return the set of element names from the DOM. todo: need to check attributes, should be prefix or nodename? / innerclass
 */
public Set keySet(){
  int length=getDOM().getChildNodes().getLength();
  HashSet keys=new HashSet(length);
  for (int index=0; index < length; index++) {
    keys.add(getDOM().getChildNodes().item(index).getNodeName());
  }
  return keys;
}
Program: 68217
Project: 68217
Buggy source:
/** 
 * INTERNAL: This should not be used, but added some support for it as is called from some places such as sdk call used in the descriptor to define operation not supported, may also be called from TopLink in some places.
 */
public Vector getValues(){
  Vector values=new Vector(getDOM().getChildNodes().getLength());
  for (int index=0; index < getDOM().getChildNodes().getLength(); index++) {
    values.add(getDOM().getChildNodes().item(index));
  }
  return values;
}

Fixed version (ground truth):
/** 
 * INTERNAL: This should not be used, but added some support for it as is called from some places such as sdk call used in the descriptor to define operation not supported, may also be called from TopLink in some places.
 */
public Vector getValues(){
  int length=getDOM().getChildNodes().getLength();
  Node nextNode=null;
  if (length > 0) {
    nextNode=getDOM().getFirstChild();
  }
  Vector values=new Vector(length);
  while (nextNode != null) {
    values.add(nextNode);
    nextNode=nextNode.getNextSibling();
  }
  return values;
}
Program: 68218
Project: 68218
Buggy source:
/** 
 * INTERNAL: This should not be used, but added some support for it as is called from some places such as sdk call used in the descriptor to define operation not supported, may also be called from toplin in some places.
 */
public Vector getFields(){
  Vector fields=new Vector(getDOM().getChildNodes().getLength());
  for (int index=0; index < getDOM().getChildNodes().getLength(); index++) {
    fields.add(new DatabaseField(getDOM().getChildNodes().item(index).getNodeName()));
  }
  return fields;
}

Fixed version (ground truth):
/** 
 * INTERNAL: This should not be used, but added some support for it as is called from some places such as sdk call used in the descriptor to define operation not supported, may also be called from toplin in some places.
 */
public Vector getFields(){
  int length=getDOM().getChildNodes().getLength();
  Node nextNode=null;
  if (length > 0) {
    nextNode=getDOM().getChildNodes().item(0);
  }
  Vector fields=new Vector(length);
  while (nextNode != null) {
    fields.add(new DatabaseField(nextNode.getNodeName()));
    nextNode=nextNode.getNextSibling();
  }
  return fields;
}
Program: 68222
Project: 68222
Buggy source:
/** 
 * Add a variable of type ValueHolderInterface to the class.  When this method has been run, the class will contain a variable declaration similar to the following: private ValueHolderInterface _persistence_variableName_vh;
 */
public void addValueHolder(AttributeDetails attributeDetails){
  String attribute=attributeDetails.getAttributeName();
  RuntimeVisibleAnnotations annotations=null;
  if (attributeDetails.getGetterMethodName() == null || attributeDetails.getGetterMethodName().equals("String_Node_Str")) {
    annotations=getTransientAnnotation();
  }
  cv.visitField(ACC_PROTECTED,"String_Node_Str" + attribute + "String_Node_Str",VHI_SIGNATURE,null,annotations);
}

Fixed version (ground truth):
/** 
 * Add a variable of type ValueHolderInterface to the class.  When this method has been run, the class will contain a variable declaration similar to the following: private ValueHolderInterface _persistence_variableName_vh;
 */
public void addValueHolder(AttributeDetails attributeDetails){
  String attribute=attributeDetails.getAttributeName();
  RuntimeVisibleAnnotations annotations=null;
  if (attributeDetails.getGetterMethodName() == null || attributeDetails.getGetterMethodName().equals("String_Node_Str") || attributeDetails.weaveTransientFieldValueHolders()) {
    annotations=getTransientAnnotation();
  }
  cv.visitField(ACC_PROTECTED,"String_Node_Str" + attribute + "String_Node_Str",VHI_SIGNATURE,null,annotations);
}
Program: 68224
Project: 68224
Buggy source:
/** 
 * INTERNAL: A subclass that supports cascade version optimistic locking should  implement this method to properly prepare the locking policy for their  mapping type. Guy
 */
public void prepareCascadeLockingPolicy(){
  return;
}

Fixed version (ground truth):
/** 
 * INTERNAL: A subclass that supports cascade version optimistic locking should  implement this method to properly prepare the locking policy for their  mapping type.
 */
public void prepareCascadeLockingPolicy(){
  return;
}
Program: 68225
Project: 68225
Buggy source:
protected ForeignReferenceMapping(){
  this.isPrivateOwned=false;
  this.hasCustomSelectionQuery=false;
  this.usesBatchReading=false;
  this.useBasicIndirection();
  this.cascadePersist=false;
  this.cascadeMerge=false;
  this.cascadeRefresh=false;
  this.cascadeRemove=false;
}

Fixed version (ground truth):
protected ForeignReferenceMapping(){
  this.isPrivateOwned=false;
  this.hasCustomSelectionQuery=false;
  this.usesBatchReading=false;
  this.useBasicIndirection();
  this.cascadePersist=false;
  this.cascadeMerge=false;
  this.cascadeRefresh=false;
  this.cascadeRemove=false;
  this.requiresTransientWeavedFields=true;
}
Program: 68226
Project: 68226
Buggy source:
/** 
 * INTERNAL: We currently limit this merging to the ClassAccessor level.
 */
@Override public void merge(ORMetadata metadata){
  MetadataAccessor accessor=(MetadataAccessor)metadata;
  m_converters=mergeORObjectLists(m_converters,accessor.getConverters());
  m_objectTypeConverters=mergeORObjectLists(m_objectTypeConverters,accessor.getObjectTypeConverters());
  m_structConverters=mergeORObjectLists(m_structConverters,accessor.getStructConverters());
  m_typeConverters=mergeORObjectLists(m_typeConverters,accessor.getTypeConverters());
  m_properties=mergeORObjectLists(m_properties,accessor.getProperties());
}

Fixed version (ground truth):
/** 
 * INTERNAL: We currently limit this merging to the ClassAccessor level.
 */
@Override public void merge(ORMetadata metadata){
  MetadataAccessor accessor=(MetadataAccessor)metadata;
  m_access=(Enum)mergeSimpleObjects(m_access,accessor.getAccess(),accessor.getAccessibleObject(),"String_Node_Str");
  m_converters=mergeORObjectLists(m_converters,accessor.getConverters());
  m_objectTypeConverters=mergeORObjectLists(m_objectTypeConverters,accessor.getObjectTypeConverters());
  m_structConverters=mergeORObjectLists(m_structConverters,accessor.getStructConverters());
  m_typeConverters=mergeORObjectLists(m_typeConverters,accessor.getTypeConverters());
  m_properties=mergeORObjectLists(m_properties,accessor.getProperties());
}
Program: 68227
Project: 68227
Buggy source:
/** 
 * INTERNAL:
 */
public MetadataAccessor(Annotation annotation,MetadataAccessibleObject accessibleObject,MetadataDescriptor descriptor,MetadataProject project){
  super(annotation,accessibleObject);
  m_project=project;
  m_descriptor=descriptor;
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 */
public MetadataAccessor(Annotation annotation,MetadataAccessibleObject accessibleObject,MetadataDescriptor descriptor,MetadataProject project){
  super(annotation,accessibleObject);
  m_project=project;
  m_descriptor=descriptor;
  Annotation access=getAnnotation(Access.class);
  if (access != null) {
    setAccess((Enum)MetadataHelper.invokeMethod("String_Node_Str",access));
  }
}
Program: 68229
Project: 68229
Buggy source:
/** 
 * INTERNAL: Generic class level merging details for entities, mapped superclasses and embeddables.
 */
@Override public void merge(ORMetadata metadata){
  super.merge(metadata);
  ClassAccessor accessor=(ClassAccessor)metadata;
  m_access=(Enum)mergeSimpleObjects(m_access,accessor.getAccess(),accessor.getAccessibleObject(),"String_Node_Str");
  m_customizerClass=(Class)mergeSimpleObjects(m_customizerClass,accessor.getCustomizerClass(),accessor.getAccessibleObject(),"String_Node_Str");
  m_description=(String)mergeSimpleObjects(m_description,accessor.getDescription(),accessor.getAccessibleObject(),"String_Node_Str");
  m_metadataComplete=(Boolean)mergeSimpleObjects(m_metadataComplete,accessor.getMetadataComplete(),accessor.getAccessibleObject(),"String_Node_Str");
  m_excludeDefaultMappings=(Boolean)mergeSimpleObjects(m_excludeDefaultMappings,accessor.getExcludeDefaultMappings(),accessor.getAccessibleObject(),"String_Node_Str");
  m_cloneCopyPolicy=(CloneCopyPolicyMetadata)mergeORObjects(m_cloneCopyPolicy,accessor.getCloneCopyPolicy());
  m_customCopyPolicy=(CustomCopyPolicyMetadata)mergeORObjects(m_customCopyPolicy,accessor.getCustomCopyPolicy());
  m_instantiationCopyPolicy=(InstantiationCopyPolicyMetadata)mergeORObjects(m_instantiationCopyPolicy,accessor.getInstantiationCopyPolicy());
  m_changeTracking=(ChangeTrackingMetadata)mergeORObjects(m_changeTracking,accessor.getChangeTracking());
  if (m_attributes == null) {
    m_attributes=accessor.getAttributes();
  }
 else {
    m_attributes.merge(accessor.getAttributes());
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Generic class level merging details for entities, mapped superclasses and embeddables.
 */
@Override public void merge(ORMetadata metadata){
  super.merge(metadata);
  ClassAccessor accessor=(ClassAccessor)metadata;
  m_customizerClass=(Class)mergeSimpleObjects(m_customizerClass,accessor.getCustomizerClass(),accessor.getAccessibleObject(),"String_Node_Str");
  m_description=(String)mergeSimpleObjects(m_description,accessor.getDescription(),accessor.getAccessibleObject(),"String_Node_Str");
  m_metadataComplete=(Boolean)mergeSimpleObjects(m_metadataComplete,accessor.getMetadataComplete(),accessor.getAccessibleObject(),"String_Node_Str");
  m_excludeDefaultMappings=(Boolean)mergeSimpleObjects(m_excludeDefaultMappings,accessor.getExcludeDefaultMappings(),accessor.getAccessibleObject(),"String_Node_Str");
  m_cloneCopyPolicy=(CloneCopyPolicyMetadata)mergeORObjects(m_cloneCopyPolicy,accessor.getCloneCopyPolicy());
  m_customCopyPolicy=(CustomCopyPolicyMetadata)mergeORObjects(m_customCopyPolicy,accessor.getCustomCopyPolicy());
  m_instantiationCopyPolicy=(InstantiationCopyPolicyMetadata)mergeORObjects(m_instantiationCopyPolicy,accessor.getInstantiationCopyPolicy());
  m_changeTracking=(ChangeTrackingMetadata)mergeORObjects(m_changeTracking,accessor.getChangeTracking());
  if (m_attributes == null) {
    m_attributes=accessor.getAttributes();
  }
 else {
    m_attributes.merge(accessor.getAttributes());
  }
}
Program: 68230
Project: 68230
Buggy source:
/** 
 * INTERNAL: Returns true if this class uses uses property access. It will first check for an explicit access type specification, otherwise will use the default access as specified on the descriptor for this accessor  since we may be processing a mapped superclass.
 */
public boolean usesPropertyAccess(){
  return getAccessType().name().equals(AccessType.PROPERTY.name());
}

Fixed version (ground truth):
/** 
 * INTERNAL: Returns true if this class uses uses property access. It will first check for an explicit access type specification, otherwise will use the default access as specified on the descriptor for this accessor  since we may be processing a mapped superclass.
 */
public boolean usesPropertyAccess(){
  return getAccess().name().equals(AccessType.PROPERTY.name());
}
Program: 68231
Project: 68231
Buggy source:
/** 
 * INTERNAL: Create mappings from the fields directly. If the mustBeExplicit flag is true, then we are processing the inverse of an explicit access setting and for a field to be processed it must have a Access(FIELD)  setting.
 */
protected void processAccessorFields(boolean processingInverse){
  for (  Field field : MetadataHelper.getFields(getJavaClass())) {
    MetadataField metadataField=new MetadataField(field,getLogger());
    if (metadataField.isAnnotationPresent(Transient.class)) {
      if (metadataField.hasMoreThanOneDeclaredAnnotation(getDescriptor())) {
        throw ValidationException.mappingAnnotationsAppliedToTransientAttribute(field);
      }
    }
 else {
      if (metadataField.isValidPersistenceField(processingInverse,getDescriptor())) {
        if (!getDescriptor().hasAccessorFor(metadataField.getAttributeName()) || (getDescriptor().hasAccessorFor(metadataField.getAttributeName()) && processingInverse)) {
          getDescriptor().addAccessor(buildAccessor(metadataField));
        }
      }
    }
  }
  if (hasExplicitAccessType() && !processingInverse) {
    processAccessorMethods(true);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Create mappings from the fields directly. If the mustBeExplicit flag is true, then we are processing the inverse of an explicit access setting and for a field to be processed it must have a Access(FIELD)  setting.
 */
protected void processAccessorFields(boolean processingInverse){
  for (  Field field : MetadataHelper.getFields(getJavaClass())) {
    MetadataField metadataField=new MetadataField(field,getLogger());
    if (metadataField.isAnnotationPresent(Transient.class)) {
      if (metadataField.hasMoreThanOneDeclaredAnnotation(getDescriptor())) {
        throw ValidationException.mappingAnnotationsAppliedToTransientAttribute(field);
      }
    }
 else {
      if (metadataField.isValidPersistenceField(processingInverse,getDescriptor())) {
        if (!getDescriptor().hasAccessorFor(metadataField.getAttributeName()) || (getDescriptor().hasAccessorFor(metadataField.getAttributeName()) && processingInverse)) {
          getDescriptor().addAccessor(buildAccessor(metadataField));
        }
      }
    }
  }
  if (hasAccess() && !processingInverse) {
    processAccessorMethods(true);
  }
}
Program: 68232
Project: 68232
Buggy source:
/** 
 * INTERNAL: Create mappings via the class properties. If the mustBeExplicit flag is true, then we are processing the inverse of an explicit access setting and for a field to be processed it must have a Access(PROPERTY)  setting.
 */
protected void processAccessorMethods(boolean processingInverse){
  for (  Method method : MetadataHelper.getDeclaredMethods(getJavaClass())) {
    MetadataMethod metadataMethod=new MetadataMethod(method,getLogger());
    if (metadataMethod.isAnnotationPresent(Transient.class)) {
      if (metadataMethod.hasMoreThanOneDeclaredAnnotation(getDescriptor())) {
        throw ValidationException.mappingAnnotationsAppliedToTransientAttribute(method);
      }
    }
 else {
      if (metadataMethod.isValidPersistenceMethod(processingInverse,getDescriptor())) {
        if (!getDescriptor().hasAccessorFor(metadataMethod.getAttributeName()) || (getDescriptor().hasAccessorFor(metadataMethod.getAttributeName()) && processingInverse)) {
          getDescriptor().addAccessor(buildAccessor(metadataMethod));
        }
      }
    }
  }
  if (hasExplicitAccessType() && !processingInverse) {
    processAccessorFields(true);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Create mappings via the class properties. If the mustBeExplicit flag is true, then we are processing the inverse of an explicit access setting and for a field to be processed it must have a Access(PROPERTY)  setting.
 */
protected void processAccessorMethods(boolean processingInverse){
  for (  Method method : MetadataHelper.getDeclaredMethods(getJavaClass())) {
    MetadataMethod metadataMethod=new MetadataMethod(method,getLogger());
    if (metadataMethod.isAnnotationPresent(Transient.class)) {
      if (metadataMethod.hasMoreThanOneDeclaredAnnotation(getDescriptor())) {
        throw ValidationException.mappingAnnotationsAppliedToTransientAttribute(method);
      }
    }
 else {
      if (metadataMethod.isValidPersistenceMethod(processingInverse,getDescriptor())) {
        if (!getDescriptor().hasAccessorFor(metadataMethod.getAttributeName()) || (getDescriptor().hasAccessorFor(metadataMethod.getAttributeName()) && processingInverse)) {
          getDescriptor().addAccessor(buildAccessor(metadataMethod));
        }
      }
    }
  }
  if (hasAccess() && !processingInverse) {
    processAccessorFields(true);
  }
}
Program: 68233
Project: 68233
Buggy source:
/** 
 * INTERNAL: Used for OX mapping.
 */
public Enum getAccess(){
  return m_access;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Return the access type of this accessor. Assumes all access processing has been performed before calling this method.
 */
@Override public Enum getAccess(){
  if (hasAccess()) {
    return super.getAccess();
  }
 else {
    return getDescriptor().getDefaultAccess();
  }
}
Program: 68234
Project: 68234
Buggy source:
/** 
 * INTERNAL: Process the access type of this embeddable.
 */
public void processAccessType(){
  Enum owningClassAccessorsAccessType=getOwningDescriptor().getClassAccessor().getAccessType();
  getDescriptor().setDefaultAccess(owningClassAccessorsAccessType);
  if (getExplicitAccessType() == null) {
    getLogger().logConfigMessage(MetadataLogger.ACCESS_TYPE,owningClassAccessorsAccessType.name(),getJavaClass());
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Process the access type of this embeddable.
 */
public void processAccessType(){
  Enum owningClassAccessorsAccess=getOwningDescriptor().getClassAccessor().getAccess();
  getDescriptor().setDefaultAccess(owningClassAccessorsAccess);
  if (getAccess() == null) {
    getLogger().logConfigMessage(MetadataLogger.ACCESS_TYPE,owningClassAccessorsAccess.name(),getJavaClass());
  }
}
Program: 68235
Project: 68235
Buggy source:
/** 
 * Sets usesExternalConnectionPooling and the config model.
 */
void setExternalConnectionPooling(boolean value){
  this.loginConfig().setExternalConnectionPooling(value);
}

Fixed version (ground truth):
/** 
 * Sets usesExternalConnectionPooling and the config model.
 */
public void setExternalConnectionPooling(boolean value){
  boolean old=this.loginConfig().getExternalConnectionPooling();
  this.loginConfig().setExternalConnectionPooling(value);
  this.firePropertyChanged(EXTERNAL_CONNECTION_POOLING_PROPERTY,old,value);
}
Program: 68236
Project: 68236
Buggy source:
/** 
 * Sets this config model property.
 */
void setUsesExternalTransactionController(boolean value){
  boolean old=this.loginConfig().getExternalTransactionController();
  this.loginConfig().setExternalTransactionController(value);
  this.firePropertyChanged(EXTERNAL_TRANSACTION_CONTROLLER_PROPERTY,old,value);
}

Fixed version (ground truth):
/** 
 * Sets this config model property.
 */
public void setUsesExternalTransactionController(boolean value){
  boolean old=this.loginConfig().getExternalTransactionController();
  this.loginConfig().setExternalTransactionController(value);
  this.firePropertyChanged(EXTERNAL_TRANSACTION_CONTROLLER_PROPERTY,old,value);
}
Program: 68237
Project: 68237
Buggy source:
/** 
 * Returns usesExternalConnectionPooling.
 */
boolean usesExternalConnectionPooling(){
  return this.loginConfig().getExternalConnectionPooling();
}

Fixed version (ground truth):
/** 
 * Returns usesExternalConnectionPooling.
 */
public boolean usesExternalConnectionPooling(){
  return this.loginConfig().getExternalConnectionPooling();
}
Program: 68238
Project: 68238
Buggy source:
/** 
 * Sets this config model property.
 */
void setUsesExternalTransactionController(boolean value){
}

Fixed version (ground truth):
/** 
 * Sets this config model property.
 */
public void setUsesExternalTransactionController(boolean value){
}
Program: 68240
Project: 68240
Buggy source:
protected Object getValueFromSubject(){
  LoginAdapter login=(LoginAdapter)subject;
  DatabaseSessionAdapter session=(DatabaseSessionAdapter)login.getParent();
  return Boolean.valueOf(session.usesExternalConnectionPooling());
}

Fixed version (ground truth):
protected Object getValueFromSubject(){
  ReadConnectionPoolAdapter pool=(ReadConnectionPoolAdapter)subject;
  return Boolean.valueOf(pool.usesNonTransactionalReadLogin());
}
Program: 68241
Project: 68241
Buggy source:
/** 
 * Creates the <code>PropertyValueModel</code> responsible to handle the Exclusive Connections.
 * @return A new <code>PropertyValueModel</code>
 */
private PropertyValueModel buildExclusiveConnectionsHolder(){
  return new PropertyAspectAdapter(getSelectionHolder(),ReadConnectionPoolAdapter.EXCLUSIVE_PROPERTY){
    protected Object getValueFromSubject(){
      ReadConnectionPoolAdapter pool=(ReadConnectionPoolAdapter)subject;
      return Boolean.valueOf(pool.isExclusive());
    }
    protected void setValueOnSubject(    Object value){
      ReadConnectionPoolAdapter pool=(ReadConnectionPoolAdapter)subject;
      pool.setExclusive(Boolean.TRUE.equals(value));
    }
  }
;
}

Fixed version (ground truth):
private PropertyValueModel buildExclusiveConnectionsHolder(){
  return new PropertyAspectAdapter(getSelectionHolder(),ReadConnectionPoolAdapter.EXCLUSIVE_PROPERTY){
    @Override protected Object getValueFromSubject(){
      ReadConnectionPoolAdapter pool=(ReadConnectionPoolAdapter)subject;
      return pool.isExclusive();
    }
    @Override protected void setValueOnSubject(    Object value){
      ReadConnectionPoolAdapter pool=(ReadConnectionPoolAdapter)subject;
      pool.setExclusive((Boolean)value);
    }
  }
;
}
Program: 68242
Project: 68242
Buggy source:
protected Object transform(Object value){
  return Boolean.valueOf(Boolean.FALSE.equals(value));
}

Fixed version (ground truth):
public Object transform(Object value){
  if ((value != null) && (Boolean)value) {
    return loginPane;
  }
  return null;
}
Program: 68243
Project: 68243
Buggy source:
/** 
 * Creates the <code>ButtonModel</code> responsible to handle enabled state of Exclusive Connections check box.
 * @return A new <code>ButtonModel</code>
 */
private ButtonModel buildExclusiveConnectionsCheckBoxAdapter(){
  return new CheckBoxModelAdapter(buildExclusiveConnectionsHolder());
}

Fixed version (ground truth):
private ButtonModel buildExclusiveConnectionsCheckBoxAdapter(){
  return new CheckBoxModelAdapter(buildExclusiveConnectionsHolder());
}
Program: 68244
Project: 68244
Buggy source:
/** 
 * Creates the <code>PropertyValueModel</code> responsible to retrieve the boolean flag used by the <code>ComponentEnabler</code> in order to keep the enable state of the components in sync with the underlying model's property.
 * @return A new <code>PropertyValueModel</code>
 */
private PropertyValueModel buildEnableStateHolder(){
  PropertyAspectAdapter sessionHolder=new PropertyAspectAdapter(getSelectionHolder(),"String_Node_Str"){
    protected Object getValueFromSubject(){
      ConnectionPoolAdapter pool=(ConnectionPoolAdapter)subject;
      return pool.getParent().getParent();
    }
  }
;
  PropertyAspectAdapter loginHolder=new PropertyAspectAdapter(sessionHolder,ServerSessionAdapter.LOGIN_CONFIG_PROPERTY){
    protected Object getValueFromSubject(){
      ServerSessionAdapter session=(ServerSessionAdapter)subject;
      return session.getLogin();
    }
  }
;
  PropertyAspectAdapter booleanHolder=new PropertyAspectAdapter(loginHolder,DatabaseSessionAdapter.EXTERNAL_CONNECTION_POOLING_PROPERTY){
    protected Object getValueFromSubject(){
      LoginAdapter login=(LoginAdapter)subject;
      DatabaseSessionAdapter session=(DatabaseSessionAdapter)login.getParent();
      return Boolean.valueOf(session.usesExternalConnectionPooling());
    }
  }
;
  return new TransformationPropertyValueModel(booleanHolder){
    protected Object transform(    Object value){
      return Boolean.valueOf(Boolean.FALSE.equals(value));
    }
  }
;
}

Fixed version (ground truth):
private PropertyValueModel buildEnableStateHolder(){
  ValueModel sessionHolder=new PropertyAspectAdapter(getSelectionHolder(),"String_Node_Str"){
    @Override protected Object getValueFromSubject(){
      ConnectionPoolAdapter pool=(ConnectionPoolAdapter)subject;
      return pool.getParent().getParent();
    }
  }
;
  ValueModel loginHolder=new PropertyAspectAdapter(sessionHolder,ServerSessionAdapter.LOGIN_CONFIG_PROPERTY){
    @Override protected Object getValueFromSubject(){
      ServerSessionAdapter session=(ServerSessionAdapter)subject;
      return session.getLogin();
    }
  }
;
  PropertyAspectAdapter booleanHolder=new PropertyAspectAdapter(loginHolder,DatabaseSessionAdapter.EXTERNAL_CONNECTION_POOLING_PROPERTY){
    @Override protected Object getValueFromSubject(){
      LoginAdapter login=(LoginAdapter)subject;
      DatabaseSessionAdapter session=(DatabaseSessionAdapter)login.getParent();
      return session.usesExternalConnectionPooling();
    }
  }
;
  return new TransformationPropertyValueModel(booleanHolder){
    @Override protected Object transform(    Object value){
      return Boolean.valueOf(Boolean.FALSE.equals(value));
    }
  }
;
}
Program: 68245
Project: 68245
Buggy source:
/** 
 * Creates the selection holder that will hold the user object to be edited by this page.
 * @return The <code>PropertyValueModel</code> containing the {@link DatabaseLoginAdapter}to be edited by the   {@link AbstractRdbmsLoginPane}
 */
protected final PropertyValueModel buildLoginHolder(){
  String[] propertyNames={ConnectionPoolAdapter.LOGIN_CONFIG_PROPERTY,ReadConnectionPoolAdapter.USE_NON_TRANSACTIONAL_READ_LOGIN_PROPERTY};
  return new PropertyAspectAdapter(getSelectionHolder(),propertyNames){
    protected Object getValueFromSubject(){
      ReadConnectionPoolAdapter pool=(ReadConnectionPoolAdapter)subject;
      if (pool.usesNonTransactionalReadLogin())       return pool.getLogin();
      return null;
    }
  }
;
}

Fixed version (ground truth):
protected final PropertyValueModel buildLoginHolder(){
  String[] propertyNames={ConnectionPoolAdapter.LOGIN_CONFIG_PROPERTY,ReadConnectionPoolAdapter.USE_NON_TRANSACTIONAL_READ_LOGIN_PROPERTY};
  return new PropertyAspectAdapter(getSelectionHolder(),propertyNames){
    protected Object getValueFromSubject(){
      ReadConnectionPoolAdapter pool=(ReadConnectionPoolAdapter)subject;
      return pool.usesNonTransactionalReadLogin() ? pool.getLogin() : null;
    }
  }
;
}
Program: 68246
Project: 68246
Buggy source:
protected void setValueOnSubject(Object value){
  ReadConnectionPoolAdapter pool=(ReadConnectionPoolAdapter)subject;
  pool.setExclusive(Boolean.TRUE.equals(value));
}

Fixed version (ground truth):
protected void setValueOnSubject(Object value){
  ReadConnectionPoolAdapter pool=(ReadConnectionPoolAdapter)subject;
  pool.setUseNonTransactionalReadLogin(Boolean.TRUE.equals(value));
}
Program: 68247
Project: 68247
Buggy source:
/** 
 * INTERNAL: This method returns the application ClassLoader. The parent application ClassLoader is returned when running in a J2EE client  either in a web or ejb container to match a weak reference to a particular  HelperContext.
 */
protected ClassLoader getContextClassLoader(){
  ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
  String classLoaderName=classLoader.getClass().getName();
  if (classLoaderName.startsWith("String_Node_Str")) {
    if ((classLoader.getParent() != null) && ((classLoader.toString().indexOf(SDOConstants.CLASSLOADER_WEB_FRAGMENT) != -1) || (classLoader.toString().indexOf(SDOConstants.CLASSLOADER_EJB_FRAGMENT) != -1))) {
      classLoader=classLoader.getParent();
    }
  }
 else   if (classLoaderName.startsWith("String_Node_Str")) {
    final int systemLoaderOffest=3;
    ClassLoader systemLoader=ClassLoader.getSystemClassLoader();
    ClassLoader currentLoader=classLoader;
    ArrayList<ClassLoader> loaders=new ArrayList<ClassLoader>();
    loaders.add(currentLoader);
    while (currentLoader.getParent() != null) {
      currentLoader=currentLoader.getParent();
      loaders.add(currentLoader);
      if (currentLoader.getParent() == systemLoader) {
        if (loaders.size() >= systemLoaderOffest) {
          classLoader=loaders.get(loaders.size() - systemLoaderOffest);
          break;
        }
      }
    }
  }
  return classLoader;
}

Fixed version (ground truth):
/** 
 * INTERNAL: This method returns the application ClassLoader. The parent application ClassLoader is returned when running in a J2EE client  either in a web or ejb container to match a weak reference to a particular  HelperContext.
 */
protected ClassLoader getContextClassLoader(){
  ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
  String classLoaderName=classLoader.getClass().getName();
  if (classLoaderName.startsWith("String_Node_Str")) {
    if ((classLoader.getParent() != null) && ((classLoader.toString().indexOf(SDOConstants.CLASSLOADER_WEB_FRAGMENT) != -1) || (classLoader.toString().indexOf(SDOConstants.CLASSLOADER_EJB_FRAGMENT) != -1))) {
      classLoader=classLoader.getParent();
    }
  }
 else   if (classLoaderName.startsWith("String_Node_Str")) {
    final int systemLoaderOffest=4;
    ClassLoader systemLoader=ClassLoader.getSystemClassLoader();
    ClassLoader currentLoader=classLoader;
    ArrayList<ClassLoader> loaders=new ArrayList<ClassLoader>();
    loaders.add(currentLoader);
    while (currentLoader.getParent() != null) {
      currentLoader=currentLoader.getParent();
      loaders.add(currentLoader);
      if (currentLoader.getParent() == systemLoader) {
        if (loaders.size() >= systemLoaderOffest) {
          classLoader=loaders.get(loaders.size() - systemLoaderOffest);
          break;
        }
      }
    }
  }
  return classLoader;
}
Program: 68248
Project: 68248
Buggy source:
public void testGetOldSequenceNotLoggingNull(){
  purchaseOrderObject.unset("String_Node_Str");
  cs.endLogging();
  address1Object.unset(address1Object.getInstanceProperty("String_Node_Str"));
  Sequence oldAddressSeq=cs.getOldSequence(address1Object);
  assertNull(oldAddressSeq);
}

Fixed version (ground truth):
public void testGetOldSequenceNotLoggingNull(){
  purchaseOrderObject.unset("String_Node_Str");
  cs.endLogging();
  address1Object.unset(address1Object.getInstanceProperty("String_Node_Str"));
  Sequence oldAddressSeq=cs.getOldSequence(address1Object);
  assertNotNull(oldAddressSeq);
}
Program: 68249
Project: 68249
Buggy source:
public void testGetOldSequenceNotLogging(){
  cs.endLogging();
  address1Object.set("String_Node_Str","String_Node_Str");
  List oldValues=cs.getOldValues(address1Object);
  assertEquals(0,oldValues.size());
  address1Object.unset(address1Object.getInstanceProperty("String_Node_Str"));
  Sequence oldAddressSeq=cs.getOldSequence(address1Object);
  assertNull(oldAddressSeq);
}

Fixed version (ground truth):
public void testGetOldSequenceNotLogging(){
  cs.endLogging();
  address1Object.set("String_Node_Str","String_Node_Str");
  List oldValues=cs.getOldValues(address1Object);
  assertEquals(0,oldValues.size());
  address1Object.unset(address1Object.getInstanceProperty("String_Node_Str"));
  Sequence oldAddressSeq=cs.getOldSequence(address1Object);
  assertNotNull(oldAddressSeq);
}
Program: 68252
Project: 68252
Buggy source:
public String stringFromDate(java.util.Date sourceDate,QName schemaType){
  if (XMLConstants.DATE_QNAME.equals(schemaType)) {
    return dateFormatter.get().format(sourceDate);
  }
 else   if (XMLConstants.TIME_QNAME.equals(schemaType)) {
    String string=timeFormatter.get().format(sourceDate);
    int ms=(int)(sourceDate.getTime() % 1000);
    if (0 == ms) {
      string+="String_Node_Str";
    }
 else {
      string+=('.' + Helper.buildZeroPrefixAndTruncTrailZeros(ms,3));
    }
    return appendTimeZone(string);
  }
 else   if (XMLConstants.G_DAY_QNAME.equals(schemaType)) {
    return gDayFormatter.get().format(sourceDate);
  }
 else   if (XMLConstants.G_MONTH_QNAME.equals(schemaType)) {
    return gMonthFormatter.get().format(sourceDate);
  }
 else   if (XMLConstants.G_MONTH_DAY_QNAME.equals(schemaType)) {
    return gMonthDayFormatter.get().format(sourceDate);
  }
 else   if (XMLConstants.G_YEAR_QNAME.equals(schemaType)) {
    return gYearFormatter.get().format(sourceDate);
  }
 else   if (XMLConstants.G_YEAR_MONTH_QNAME.equals(schemaType)) {
    return gYearMonthFormatter.get().format(sourceDate);
  }
 else   if (XMLConstants.DURATION_QNAME.equals(schemaType)) {
    throw new IllegalArgumentException();
  }
 else {
    return stringFromDate(sourceDate);
  }
}

Fixed version (ground truth):
/** 
 * This method returns a string representing a given java.util.Date based on a given schema type QName.   BC dates (sourceDate.getTime() < YEAR_ONE_AD_TIME) are handled  as follows: '2007 BC' --> '-2006 AD'.
 * @param sourceDate
 * @param schemaType
 * @return
 */
public String stringFromDate(java.util.Date sourceDate,QName schemaType){
  boolean bc=sourceDate.getTime() < YEAR_ONE_AD_TIME;
  if (bc) {
    sourceDate=handleBCDate(sourceDate);
  }
  if (XMLConstants.DATE_QNAME.equals(schemaType)) {
    return bc ? '-' + dateFormatter.get().format(sourceDate) : dateFormatter.get().format(sourceDate);
  }
  if (XMLConstants.TIME_QNAME.equals(schemaType)) {
    String string=timeFormatter.get().format(sourceDate);
    string=appendMillis(string,sourceDate.getTime());
    return appendTimeZone(string);
  }
  if (XMLConstants.G_DAY_QNAME.equals(schemaType)) {
    return gDayFormatter.get().format(sourceDate);
  }
  if (XMLConstants.G_MONTH_QNAME.equals(schemaType)) {
    return gMonthFormatter.get().format(sourceDate);
  }
  if (XMLConstants.G_MONTH_DAY_QNAME.equals(schemaType)) {
    return gMonthDayFormatter.get().format(sourceDate);
  }
  if (XMLConstants.G_YEAR_QNAME.equals(schemaType)) {
    return bc ? '-' + gYearFormatter.get().format(sourceDate) : gYearFormatter.get().format(sourceDate);
  }
  if (XMLConstants.G_YEAR_MONTH_QNAME.equals(schemaType)) {
    return bc ? '-' + gYearMonthFormatter.get().format(sourceDate) : gYearMonthFormatter.get().format(sourceDate);
  }
  if (XMLConstants.DURATION_QNAME.equals(schemaType)) {
    throw new IllegalArgumentException();
  }
  String string=dateTimeFormatter.get().format(sourceDate);
  string=appendMillis(string,sourceDate.getTime());
  return bc ? '-' + appendTimeZone(string) : appendTimeZone(string);
}
Program: 68253
Project: 68253
Buggy source:
private String stringFromCalendar(Calendar sourceCalendar){
  if (!(sourceCalendar.isSet(Calendar.HOUR) || sourceCalendar.isSet(Calendar.MINUTE) || sourceCalendar.isSet(Calendar.SECOND)|| sourceCalendar.isSet(Calendar.MILLISECOND))) {
    return dateFormatter.get().format(sourceCalendar.getTime());
  }
 else   if (!(sourceCalendar.isSet(Calendar.YEAR) || sourceCalendar.isSet(Calendar.MONTH) || sourceCalendar.isSet(Calendar.DATE))) {
    String string=timeFormatter.get().format(sourceCalendar.getTime());
    int ms=(int)(sourceCalendar.getTimeInMillis() % 1000);
    if (0 == ms) {
      string+="String_Node_Str";
    }
 else {
      string+=('.' + Helper.buildZeroPrefixAndTruncTrailZeros(ms,3));
    }
    return appendTimeZone(string);
  }
 else {
    return stringFromDate(sourceCalendar.getTime());
  }
}

Fixed version (ground truth):
private String stringFromCalendar(Calendar sourceCalendar){
  if (!(sourceCalendar.isSet(Calendar.HOUR) || sourceCalendar.isSet(Calendar.MINUTE) || sourceCalendar.isSet(Calendar.SECOND)|| sourceCalendar.isSet(Calendar.MILLISECOND))) {
    return dateFormatter.get().format(sourceCalendar.getTime());
  }
 else   if (!(sourceCalendar.isSet(Calendar.YEAR) || sourceCalendar.isSet(Calendar.MONTH) || sourceCalendar.isSet(Calendar.DATE))) {
    String string=timeFormatter.get().format(sourceCalendar.getTime());
    string=appendMillis(string,sourceCalendar.getTimeInMillis());
    return appendTimeZone(string);
  }
 else {
    return stringFromDate(sourceCalendar.getTime());
  }
}
Program: 68254
Project: 68254
Buggy source:
protected Object getControlObject(){
  ArrayList responsibilities=new ArrayList();
  responsibilities.add(CONTROL_RESPONSIBILITY1);
  responsibilities.add(CONTROL_RESPONSIBILITY2);
  responsibilities.add(CONTROL_RESPONSIBILITY3);
  Employee employee=new Employee();
  employee.firstName=CONTROL_FIRST_NAME;
  employee.lastName=CONTROL_LAST_NAME;
  Calendar cal=Calendar.getInstance();
  cal.clear();
  cal.set(2005,04,24,16,06,53);
  employee.birthday=cal;
  employee.id=CONTROL_ID;
  employee.responsibilities=responsibilities;
  return employee;
}

Fixed version (ground truth):
protected Object getControlObject(){
  ArrayList responsibilities=new ArrayList();
  responsibilities.add(CONTROL_RESPONSIBILITY1);
  responsibilities.add(CONTROL_RESPONSIBILITY2);
  responsibilities.add(CONTROL_RESPONSIBILITY3);
  Employee employee=new Employee();
  employee.firstName=CONTROL_FIRST_NAME;
  employee.lastName=CONTROL_LAST_NAME;
  Calendar cal=Calendar.getInstance();
  cal.clear();
  cal.set(2005,04,24,16,06,53);
  employee.birthday=cal;
  employee.id=CONTROL_ID;
  employee.responsibilities=responsibilities;
  employee.setBlah("String_Node_Str");
  return employee;
}
Program: 68258
Project: 68258
Buggy source:
public ElementDeclaration(QName name,String javaTypeName){
  this.elementName=name;
  this.javaTypeName=javaTypeName;
  this.substitutableElements=new ArrayList<ElementDeclaration>();
}

Fixed version (ground truth):
public ElementDeclaration(QName name,JavaClass javaType,String javaTypeName){
  this.elementName=name;
  this.javaTypeName=javaTypeName;
  this.javaType=javaType;
  this.substitutableElements=new ArrayList<ElementDeclaration>();
}
Program: 68260
Project: 68260
Buggy source:
private Object setValue(Setting setting,Object value){
  if (null == setting.getMapping()) {
    if (setting.getName() != null && setting.getName().equals(TEXT_XPATH)) {
      dataObject._setModified(true);
      Object oldValue=setting.getValue();
      setting.setValue(value,false);
      return oldValue;
    }
    List<Setting> children=setting.getChildren();
    if (null != children && children.size() > 0) {
      return setValue(children.get(0),value);
    }
    return null;
  }
  Property property=getProperty(setting);
  Object oldValue=setting.getValue();
  if (property.isMany()) {
    List listValue=dataObject.getList(property);
    int valueIndex=listValue.indexOf(oldValue);
    listValue.remove(valueIndex);
    listValue.add(valueIndex,value);
    setting.setValue(value,false);
  }
 else {
    if (dataObject.isSet(property)) {
      updateSettingWithoutModifyingDataObject(property,dataObject.get(property),value);
      setting.setValue(value);
    }
 else {
      addSettingWithoutModifyingDataObject(property,value);
    }
    dataObject.setPropertyInternal((SDOProperty)property,value,false);
  }
  return oldValue;
}

Fixed version (ground truth):
private Object setValue(Setting setting,Object value){
  if (null == setting.getMapping()) {
    if (setting.getName() != null && setting.getName().equals(TEXT_XPATH)) {
      dataObject._setModified(true);
      Object oldValue=setting.getValue();
      setting.setValue(value,false);
      return oldValue;
    }
    List<Setting> children=setting.getChildren();
    if (null != children && children.size() > 0) {
      return setValue(children.get(0),value);
    }
    return null;
  }
  Property property=getProperty(setting);
  Object oldValue=setting.getValue();
  if (property.isMany()) {
    List listValue=dataObject.getList(property);
    int valueIndex=listValue.indexOf(oldValue);
    ((ListWrapper)listValue).remove(oldValue,property.isContainment(),false);
    ((ListWrapper)listValue).add(valueIndex,value,false);
    setting.setValue(value,false);
  }
 else {
    if (dataObject.isSet(property)) {
      updateSettingWithoutModifyingDataObject(property,dataObject.get(property),value);
      setting.setValue(value);
    }
 else {
      addSettingWithoutModifyingDataObject(property,value);
    }
    dataObject.setPropertyInternal((SDOProperty)property,value,false);
  }
  return oldValue;
}