nus-yam/ex-repair huggingface dataset:
Program: 67322
Project: 67322
Buggy source:
protected void addTypeAttribute(XMLDescriptor descriptor,MarshalRecord marshalRecord,String schemaContext){
  String typeValue=schemaContext.substring(1);
  String xsiPrefix=null;
  if (descriptor.getNamespaceResolver() != null) {
    xsiPrefix=descriptor.getNamespaceResolver().resolveNamespaceURI(XMLConstants.SCHEMA_INSTANCE_URL);
  }
 else {
    xsiPrefix=XMLConstants.SCHEMA_INSTANCE_PREFIX;
    marshalRecord.attribute(XMLConstants.XMLNS_URL,XMLConstants.XMLNS_URL,XMLConstants.XMLNS + "String_Node_Str" + xsiPrefix,XMLConstants.SCHEMA_INSTANCE_URL);
  }
  if (xsiPrefix == null) {
    xsiPrefix=descriptor.getNamespaceResolver().generatePrefix(XMLConstants.SCHEMA_INSTANCE_PREFIX);
    marshalRecord.attribute(XMLConstants.XMLNS_URL,XMLConstants.XMLNS_URL,XMLConstants.XMLNS + "String_Node_Str" + xsiPrefix,XMLConstants.SCHEMA_INSTANCE_URL);
  }
  marshalRecord.attribute(XMLConstants.SCHEMA_INSTANCE_URL,XMLConstants.SCHEMA_TYPE_ATTRIBUTE,xsiPrefix + "String_Node_Str" + XMLConstants.SCHEMA_TYPE_ATTRIBUTE,typeValue);
}

Fixed version (ground truth):
protected void addTypeAttribute(XMLDescriptor descriptor,MarshalRecord marshalRecord,String schemaContext){
  String typeValue=schemaContext.substring(1);
  String xsiPrefix=null;
  if (descriptor.getNamespaceResolver() != null) {
    xsiPrefix=descriptor.getNamespaceResolver().resolveNamespaceURI(XMLConstants.SCHEMA_INSTANCE_URL);
  }
 else {
    xsiPrefix=XMLConstants.SCHEMA_INSTANCE_PREFIX;
    marshalRecord.attribute(XMLConstants.XMLNS_URL,xsiPrefix,XMLConstants.XMLNS + "String_Node_Str" + xsiPrefix,XMLConstants.SCHEMA_INSTANCE_URL);
  }
  if (xsiPrefix == null) {
    xsiPrefix=descriptor.getNamespaceResolver().generatePrefix(XMLConstants.SCHEMA_INSTANCE_PREFIX);
    marshalRecord.attribute(XMLConstants.XMLNS_URL,xsiPrefix,XMLConstants.XMLNS + "String_Node_Str" + xsiPrefix,XMLConstants.SCHEMA_INSTANCE_URL);
  }
  marshalRecord.attribute(XMLConstants.SCHEMA_INSTANCE_URL,XMLConstants.SCHEMA_TYPE_ATTRIBUTE,xsiPrefix + "String_Node_Str" + XMLConstants.SCHEMA_TYPE_ATTRIBUTE,typeValue);
}
Program: 67323
Project: 67323
Buggy source:
/** 
 * Filter out all Expression tests that trigger some fatal error when executed In-Memory.
 */
public boolean shouldTestPassInMemory(ReadAllExpressionTest test){
  String name=test.getName();
  if ((name.indexOf("String_Node_Str") > -1) || (name.indexOf("String_Node_Str") > -1) || (name.indexOf("String_Node_Str") > -1)|| (name.equals("String_Node_Str"))|| (name.equals("String_Node_Str"))|| (name.equals("String_Node_Str"))|| (name.equals("String_Node_Str"))|| (name.equals("String_Node_Str"))|| (name.equals("String_Node_Str"))) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Filter out all Expression tests that trigger some fatal error when executed In-Memory.
 */
public boolean shouldTestPassInMemory(ReadAllExpressionTest test){
  String name=test.getName();
  if ((name.indexOf("String_Node_Str") > -1) || (name.indexOf("String_Node_Str") > -1) || (name.indexOf("String_Node_Str") > -1)|| (name.indexOf("String_Node_Str") > -1)|| (name.equals("String_Node_Str"))|| (name.equals("String_Node_Str"))|| (name.equals("String_Node_Str"))|| (name.equals("String_Node_Str"))|| (name.equals("String_Node_Str"))|| (name.equals("String_Node_Str"))) {
    return false;
  }
  return true;
}
Program: 67326
Project: 67326
Buggy source:
protected void verify(){
  if (m_queryKeyExpressionsBeforeWrite.size() != m_queryKeyExpressionsAfterWrite.size()) {
    throw new TestErrorException("String_Node_Str");
  }
  for (int i=0; i < m_queryKeyExpressionsBeforeWrite.size(); i++) {
    String key1=((FunctionExpression)m_queryKeyExpressionsBeforeWrite.elementAt(i)).getBaseExpression().getName();
    String key2=((FunctionExpression)m_queryKeyExpressionsAfterWrite.elementAt(i)).getBaseExpression().getName();
    if (!key1.equals(key2)) {
      throw new TestErrorException("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
protected void verify(){
  if (m_queryKeyExpressionsBeforeWrite.size() != m_queryKeyExpressionsAfterWrite.size()) {
    throw new TestErrorException("String_Node_Str");
  }
  for (int i=0; i < m_queryKeyExpressionsBeforeWrite.size(); i++) {
    String key1=((FunctionExpression)m_queryKeyExpressionsBeforeWrite.get(i)).getBaseExpression().getName();
    String key2=((FunctionExpression)m_queryKeyExpressionsAfterWrite.get(i)).getBaseExpression().getName();
    if (!key1.equals(key2)) {
      throw new TestErrorException("String_Node_Str");
    }
  }
}
Program: 67328
Project: 67328
Buggy source:
/** 
 * INTERNAL: Return the number of version difference between the two states of the object.
 */
public int getVersionDifference(Object currentValue,Object domainObject,Vector primaryKeys,AbstractSession session){
  return 1;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Return the number of version difference between the two states of the object.
 */
public int getVersionDifference(Object currentValue,Object domainObject,Vector primaryKeys,AbstractSession session){
  return 0;
}
Program: 67329
Project: 67329
Buggy source:
/** 
 * PUBLIC: Return the number of versions different between these objects.
 * @param currentValue the new lock value
 * @param domainObject the object containing the version to be compared to
 * @param primaryKeys a vector containing the primary keys of the domainObject
 * @param session the session to be used with the comparison
 */
public int getVersionDifference(Object currentValue,Object domainObject,Vector primaryKeys,AbstractSession session){
  Number writeLockFieldValue;
  Number newWriteLockFieldValue=(Number)currentValue;
  if (newWriteLockFieldValue == null) {
    return 0;
  }
  if (isStoredInCache()) {
    writeLockFieldValue=(Number)session.getIdentityMapAccessorInstance().getWriteLockValue(primaryKeys,domainObject.getClass(),getDescriptor());
  }
 else {
    writeLockFieldValue=(Number)lockValueFromObject(domainObject);
  }
  if (writeLockFieldValue == null) {
    writeLockFieldValue=new Long(0);
  }
  return (int)(newWriteLockFieldValue.longValue() - writeLockFieldValue.longValue());
}

Fixed version (ground truth):
/** 
 * PUBLIC: Return the number of versions different between these objects.
 * @param currentValue the new lock value
 * @param domainObject the object containing the version to be compared to
 * @param primaryKeys a vector containing the primary keys of the domainObject
 * @param session the session to be used with the comparison
 */
public int getVersionDifference(Object currentValue,Object domainObject,Vector primaryKeys,AbstractSession session){
  Number writeLockFieldValue;
  Number newWriteLockFieldValue=(Number)currentValue;
  if (newWriteLockFieldValue == null) {
    newWriteLockFieldValue=new Long(0);
  }
  if (isStoredInCache()) {
    writeLockFieldValue=(Number)session.getIdentityMapAccessorInstance().getWriteLockValue(primaryKeys,domainObject.getClass(),getDescriptor());
  }
 else {
    writeLockFieldValue=(Number)lockValueFromObject(domainObject);
  }
  if (writeLockFieldValue == null) {
    writeLockFieldValue=new Long(0);
  }
  return (int)(newWriteLockFieldValue.longValue() - writeLockFieldValue.longValue());
}
Program: 67330
Project: 67330
Buggy source:
/** 
 * This method will append the order clause to the end of the select statement.
 */
public void appendOrderClauseToWriter(ExpressionSQLPrinter printer) throws IOException {
  if (!hasOrderByExpressions()) {
    return;
  }
  printer.getWriter().write("String_Node_Str");
  for (Enumeration expressionsEnum=getOrderByExpressions().elements(); expressionsEnum.hasMoreElements(); ) {
    Expression expression=(Expression)expressionsEnum.nextElement();
    expression.printSQL(printer);
    if (expressionsEnum.hasMoreElements()) {
      printer.getWriter().write("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * This method will append the order clause to the end of the select statement.
 */
public void appendOrderClauseToWriter(ExpressionSQLPrinter printer) throws IOException {
  if (!hasOrderByExpressions()) {
    return;
  }
  printer.getWriter().write("String_Node_Str");
  for (Iterator expressionsEnum=getOrderByExpressions().iterator(); expressionsEnum.hasNext(); ) {
    Expression expression=(Expression)expressionsEnum.next();
    expression.printSQL(printer);
    if (expressionsEnum.hasNext()) {
      printer.getWriter().write("String_Node_Str");
    }
  }
}
Program: 67331
Project: 67331
Buggy source:
public void setOrderByExpressions(Vector orderByExpressions){
  this.orderByExpressions=orderByExpressions;
}

Fixed version (ground truth):
public void setOrderByExpressions(List<Expression> orderByExpressions){
  this.orderByExpressions=orderByExpressions;
}
Program: 67332
Project: 67332
Buggy source:
/** 
 * Set the non select fields. The fields are used only on joining.
 */
public void setNonSelectFields(Vector nonSelectFields){
  this.nonSelectFields=nonSelectFields;
}

Fixed version (ground truth):
/** 
 * Set the non select fields. The fields are used only on joining.
 */
public void setNonSelectFields(List nonSelectFields){
  this.nonSelectFields=nonSelectFields;
}
Program: 67333
Project: 67333
Buggy source:
/** 
 * When distinct is used with order by the ordered fields must be in the select clause.
 */
protected void addOrderByExpressionToSelectForDistinct(){
  for (Enumeration orderExpressionsEnum=getOrderByExpressions().elements(); orderExpressionsEnum.hasMoreElements(); ) {
    Expression orderExpression=(Expression)orderExpressionsEnum.nextElement();
    Expression fieldExpression=null;
    if (orderExpression.isFunctionExpression() && (orderExpression.getOperator().isOrderOperator())) {
      fieldExpression=((FunctionExpression)orderExpression).getBaseExpression();
    }
 else {
      fieldExpression=orderExpression;
    }
    if ((fieldExpression.selectIfOrderedBy()) && !fieldsContainField(getFields(),fieldExpression)) {
      addField(fieldExpression);
    }
  }
}

Fixed version (ground truth):
/** 
 * When distinct is used with order by the ordered fields must be in the select clause.
 */
protected void addOrderByExpressionToSelectForDistinct(){
  for (  Expression orderExpression : getOrderByExpressions()) {
    Expression fieldExpression=null;
    if (orderExpression.isFunctionExpression() && (orderExpression.getOperator().isOrderOperator())) {
      fieldExpression=((FunctionExpression)orderExpression).getBaseExpression();
    }
 else {
      fieldExpression=orderExpression;
    }
    if ((fieldExpression.selectIfOrderedBy()) && !fieldsContainField(getFields(),fieldExpression)) {
      addField(fieldExpression);
    }
  }
}
Program: 67334
Project: 67334
Buggy source:
/** 
 * Return the fields we don't want to select but want to join on.
 */
public Vector getNonSelectFields(){
  return nonSelectFields;
}

Fixed version (ground truth):
/** 
 * Return the fields we don't want to select but want to join on.
 */
public List<Object> getNonSelectFields(){
  return nonSelectFields;
}
Program: 67336
Project: 67336
Buggy source:
/** 
 * INTERNAL: Return the order expressions for the query.
 */
public Vector getOrderByExpressions(){
  if (orderByExpressions == null) {
    orderByExpressions=org.eclipse.persistence.internal.helper.NonSynchronizedVector.newInstance(3);
  }
  return orderByExpressions;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Return the order expressions for the query.
 */
public List<Expression> getOrderByExpressions(){
  if (orderByExpressions == null) {
    orderByExpressions=org.eclipse.persistence.internal.helper.NonSynchronizedVector.newInstance(3);
  }
  return orderByExpressions;
}
Program: 67337
Project: 67337
Buggy source:
@Override public Object clone(){
  NonSynchronizedProperties properties=(NonSynchronizedProperties)super.clone();
  properties.values=new HashMap(this.values);
  return properties;
}

Fixed version (ground truth):
@Override public Object clone(){
  NonSynchronizedProperties properties=new NonSynchronizedProperties(size());
  properties.putAll(this);
  return properties;
}
Program: 67338
Project: 67338
Buggy source:
/** 
 * This method return the clones of the list of expressions.
 * @param originalExpressions
 * @param clonedExpressions
 * @return Vector
 */
private Vector cloneExpressions(Vector originalExpressions,Map clonedExpressions){
  if (originalExpressions == null || originalExpressions.size() == 0) {
    return originalExpressions;
  }
  Vector newExpressions=new Vector(originalExpressions.size());
  Iterator i=originalExpressions.iterator();
  while (i.hasNext()) {
    Expression e=(Expression)i.next();
    newExpressions.add(e.copiedVersionFrom(clonedExpressions));
  }
  return newExpressions;
}

Fixed version (ground truth):
/** 
 * This method return the clones of the list of expressions.
 */
private List<Expression> cloneExpressions(List<Expression> originalExpressions,Map<Expression,Expression> clonedExpressions){
  if ((originalExpressions == null) || (originalExpressions.size() == 0)) {
    return originalExpressions;
  }
  List<Expression> newExpressions=new ArrayList<Expression>(originalExpressions.size());
  for (  Expression expression : originalExpressions) {
    newExpressions.add(expression.copiedVersionFrom(clonedExpressions));
  }
  return newExpressions;
}
Program: 67342
Project: 67342
Buggy source:
protected void updateNamespaces(QName qname,MarshalRecord marshalRecord){
  if (qname != null && !qname.equals(XMLConstants.STRING_QNAME)) {
    String prefix=marshalRecord.getNamespaceResolver().resolveNamespaceURI(qname.getNamespaceURI());
    if ((prefix == null) || prefix.equals("String_Node_Str")) {
      prefix=marshalRecord.getNamespaceResolver().generatePrefix();
      marshalRecord.attribute(XMLConstants.XMLNS_URL,XMLConstants.XMLNS_URL,XMLConstants.XMLNS + "String_Node_Str" + prefix,qname.getNamespaceURI());
    }
    String typeValue=prefix + "String_Node_Str" + qname.getLocalPart();
    addTypeAttribute(marshalRecord,typeValue);
  }
}

Fixed version (ground truth):
protected void updateNamespaces(QName qname,MarshalRecord marshalRecord,XMLField xmlField){
  if (qname != null) {
    if (xmlField != null) {
      if (xmlField.isTypedTextField()) {
        if (xmlField.getSchemaType() == null) {
          if (qname.equals(XMLConstants.STRING_QNAME)) {
            return;
          }
        }
 else {
          if (xmlField.isSchemaType(qname)) {
            return;
          }
        }
      }
 else {
        return;
      }
    }
    String prefix=marshalRecord.getNamespaceResolver().resolveNamespaceURI(qname.getNamespaceURI());
    if ((prefix == null) || prefix.equals("String_Node_Str")) {
      if (XMLConstants.SCHEMA_URL.equals(qname.getNamespaceURI())) {
        prefix=marshalRecord.getNamespaceResolver().generatePrefix(XMLConstants.SCHEMA_PREFIX);
      }
 else {
        prefix=marshalRecord.getNamespaceResolver().generatePrefix();
      }
      marshalRecord.attribute(XMLConstants.XMLNS_URL,XMLConstants.XMLNS_URL,XMLConstants.XMLNS + "String_Node_Str" + prefix,qname.getNamespaceURI());
    }
    String typeValue=prefix + "String_Node_Str" + qname.getLocalPart();
    addTypeAttribute(marshalRecord,typeValue);
  }
}
Program: 67343
Project: 67343
Buggy source:
public boolean marshal(XPathFragment xPathFragment,MarshalRecord marshalRecord,Object object,AbstractSession session,NamespaceResolver namespaceResolver){
  Object objectValue=directMapping.getAttributeValueFromObject(object);
  Object fieldValue=directMapping.getFieldValue(objectValue,session);
  if ((null == fieldValue) || (null == namespaceResolver)) {
    return false;
  }
  XMLField xmlField=(XMLField)directMapping.getField();
  QName schemaType=getSchemaType(xmlField,fieldValue,session);
  if (null == schemaType || schemaType == XMLConstants.STRING_QNAME) {
    return false;
  }
  XPathFragment groupingFragment=marshalRecord.openStartGroupingElements(namespaceResolver);
  String typeQName=namespaceResolver.resolveNamespaceURI(XMLConstants.SCHEMA_INSTANCE_URL) + "String_Node_Str";
  String schemaTypePrefix=namespaceResolver.resolveNamespaceURI(schemaType.getNamespaceURI());
  marshalRecord.attribute(XMLConstants.SCHEMA_INSTANCE_URL,schemaType.getLocalPart(),typeQName,schemaTypePrefix + ':' + schemaType.getLocalPart());
  marshalRecord.closeStartGroupingElements(groupingFragment);
  return true;
}

Fixed version (ground truth):
public boolean marshal(XPathFragment xPathFragment,MarshalRecord marshalRecord,Object object,AbstractSession session,NamespaceResolver namespaceResolver){
  Object objectValue=directMapping.getAttributeValueFromObject(object);
  Object fieldValue=directMapping.getFieldValue(objectValue,session);
  if ((null == fieldValue) || (null == namespaceResolver)) {
    return false;
  }
  XMLField xmlField=(XMLField)directMapping.getField();
  QName schemaType=getSchemaType(xmlField,fieldValue,session);
  if (null == schemaType) {
    return false;
  }
  if (xmlField.getSchemaType() == null) {
    if (schemaType.equals(XMLConstants.STRING_QNAME)) {
      return false;
    }
  }
 else {
    if (xmlField.isSchemaType(schemaType)) {
      return false;
    }
  }
  XPathFragment groupingFragment=marshalRecord.openStartGroupingElements(namespaceResolver);
  String typeQName=namespaceResolver.resolveNamespaceURI(XMLConstants.SCHEMA_INSTANCE_URL) + "String_Node_Str";
  String schemaTypePrefix=namespaceResolver.resolveNamespaceURI(schemaType.getNamespaceURI());
  if (schemaTypePrefix == null) {
    if (XMLConstants.SCHEMA_URL.equals(schemaType.getNamespaceURI())) {
      schemaTypePrefix=namespaceResolver.generatePrefix(XMLConstants.SCHEMA_PREFIX);
    }
 else {
      schemaTypePrefix=namespaceResolver.generatePrefix();
    }
    marshalRecord.attribute(XMLConstants.XMLNS_URL,XMLConstants.XMLNS_URL,XMLConstants.XMLNS + "String_Node_Str" + schemaTypePrefix,schemaType.getNamespaceURI());
  }
  marshalRecord.attribute(XMLConstants.SCHEMA_INSTANCE_URL,schemaType.getLocalPart(),typeQName,schemaTypePrefix + ':' + schemaType.getLocalPart());
  marshalRecord.closeStartGroupingElements(groupingFragment);
  return true;
}
Program: 67344
Project: 67344
Buggy source:
private void marshalSimpleValue(XPathFragment xmlRootFragment,MarshalRecord marshalRecord,Object originalValue,Object object,Object value,AbstractSession session,NamespaceResolver namespaceResolver){
  if (xmlRootFragment != null) {
    QName qname=((XMLRoot)originalValue).getSchemaType();
    value=getValueToWrite(qname,value,(XMLConversionManager)session.getDatasourcePlatform().getConversionManager(),namespaceResolver);
    Namespace generatedNamespace=setupFragment((XMLRoot)originalValue,xmlRootFragment,marshalRecord);
    getXPathNode().startElement(marshalRecord,xmlRootFragment,object,session,namespaceResolver,null,null);
    if (generatedNamespace != null) {
      marshalRecord.attribute(XMLConstants.XMLNS_URL,XMLConstants.XMLNS_URL,XMLConstants.XMLNS + "String_Node_Str" + generatedNamespace.getPrefix(),generatedNamespace.getNamespaceURI());
    }
    updateNamespaces(qname,marshalRecord);
  }
  marshalRecord.characters((String)value);
  if (xmlRootFragment != null) {
    marshalRecord.endElement(xmlRootFragment,namespaceResolver);
  }
}

Fixed version (ground truth):
private void marshalSimpleValue(XPathFragment xmlRootFragment,MarshalRecord marshalRecord,Object originalValue,Object object,Object value,AbstractSession session,NamespaceResolver namespaceResolver){
  if (xmlRootFragment != null) {
    QName qname=((XMLRoot)originalValue).getSchemaType();
    value=getValueToWrite(qname,value,(XMLConversionManager)session.getDatasourcePlatform().getConversionManager(),namespaceResolver);
    Namespace generatedNamespace=setupFragment((XMLRoot)originalValue,xmlRootFragment,marshalRecord);
    getXPathNode().startElement(marshalRecord,xmlRootFragment,object,session,namespaceResolver,null,null);
    if (generatedNamespace != null) {
      marshalRecord.attribute(XMLConstants.XMLNS_URL,XMLConstants.XMLNS_URL,XMLConstants.XMLNS + "String_Node_Str" + generatedNamespace.getPrefix(),generatedNamespace.getNamespaceURI());
    }
    updateNamespaces(qname,marshalRecord,null);
  }
  marshalRecord.characters((String)value);
  if (xmlRootFragment != null) {
    marshalRecord.endElement(xmlRootFragment,namespaceResolver);
  }
}
Program: 67345
Project: 67345
Buggy source:
private void marshalSimpleValue(XPathFragment xmlRootFragment,MarshalRecord marshalRecord,Object originalValue,Object object,Object value,AbstractSession session,NamespaceResolver namespaceResolver){
  if (xmlRootFragment != null) {
    QName qname=((XMLRoot)originalValue).getSchemaType();
    value=getValueToWrite(qname,value,(XMLConversionManager)session.getDatasourcePlatform().getConversionManager(),namespaceResolver);
    Namespace generatedNamespace=setupFragment(((XMLRoot)originalValue),xmlRootFragment,marshalRecord);
    getXPathNode().startElement(marshalRecord,xmlRootFragment,object,session,namespaceResolver,null,null);
    if (generatedNamespace != null) {
      marshalRecord.attribute(XMLConstants.XMLNS_URL,XMLConstants.XMLNS_URL,XMLConstants.XMLNS + "String_Node_Str" + generatedNamespace.getPrefix(),generatedNamespace.getNamespaceURI());
    }
    updateNamespaces(qname,marshalRecord);
  }
  if (value instanceof String) {
    marshalRecord.characters((String)value);
  }
 else {
    marshalRecord.node((org.w3c.dom.Node)value,marshalRecord.getNamespaceResolver());
  }
  if (xmlRootFragment != null) {
    marshalRecord.endElement(xmlRootFragment,namespaceResolver);
  }
}

Fixed version (ground truth):
private void marshalSimpleValue(XPathFragment xmlRootFragment,MarshalRecord marshalRecord,Object originalValue,Object object,Object value,AbstractSession session,NamespaceResolver namespaceResolver){
  if (xmlRootFragment != null) {
    QName qname=((XMLRoot)originalValue).getSchemaType();
    value=getValueToWrite(qname,value,(XMLConversionManager)session.getDatasourcePlatform().getConversionManager(),namespaceResolver);
    Namespace generatedNamespace=setupFragment(((XMLRoot)originalValue),xmlRootFragment,marshalRecord);
    getXPathNode().startElement(marshalRecord,xmlRootFragment,object,session,namespaceResolver,null,null);
    if (generatedNamespace != null) {
      marshalRecord.attribute(XMLConstants.XMLNS_URL,XMLConstants.XMLNS_URL,XMLConstants.XMLNS + "String_Node_Str" + generatedNamespace.getPrefix(),generatedNamespace.getNamespaceURI());
    }
    updateNamespaces(qname,marshalRecord,null);
  }
  if (value instanceof String) {
    marshalRecord.characters((String)value);
  }
 else {
    marshalRecord.node((org.w3c.dom.Node)value,marshalRecord.getNamespaceResolver());
  }
  if (xmlRootFragment != null) {
    marshalRecord.endElement(xmlRootFragment,namespaceResolver);
  }
}
Program: 67355
Project: 67355
Buggy source:
public void testObjectToXMLStreamWriter() throws Exception {
  if (XML_OUTPUT_FACTORY != null) {
    StringWriter writer=new StringWriter();
    XMLOutputFactory factory=XMLOutputFactory.newInstance();
    factory.setProperty(factory.IS_REPAIRING_NAMESPACES,new Boolean(false));
    XMLStreamWriter streamWriter=factory.createXMLStreamWriter(writer);
    Object objectToWrite=getWriteControlObject();
    XMLDescriptor desc=null;
    if (objectToWrite instanceof XMLRoot) {
      desc=(XMLDescriptor)xmlContext.getSession(0).getProject().getDescriptor(((XMLRoot)objectToWrite).getObject().getClass());
    }
 else {
      desc=(XMLDescriptor)xmlContext.getSession(0).getProject().getDescriptor(objectToWrite.getClass());
    }
    int sizeBefore=getNamespaceResolverSize(desc);
    StAXResult result=new StAXResult(streamWriter);
    xmlMarshaller.marshal(objectToWrite,result);
    streamWriter.flush();
    int sizeAfter=getNamespaceResolverSize(desc);
    assertEquals(sizeBefore,sizeAfter);
    StringReader reader=new StringReader(writer.toString());
    InputSource inputSource=new InputSource(reader);
    Document testDocument=parser.parse(inputSource);
    writer.close();
    reader.close();
    objectToXMLDocumentTest(testDocument);
  }
}

Fixed version (ground truth):
public void testObjectToXMLStreamWriter() throws Exception {
  if (XML_OUTPUT_FACTORY != null && staxResultClass != null) {
    StringWriter writer=new StringWriter();
    XMLOutputFactory factory=XMLOutputFactory.newInstance();
    factory.setProperty(factory.IS_REPAIRING_NAMESPACES,new Boolean(false));
    XMLStreamWriter streamWriter=factory.createXMLStreamWriter(writer);
    Object objectToWrite=getWriteControlObject();
    XMLDescriptor desc=null;
    if (objectToWrite instanceof XMLRoot) {
      desc=(XMLDescriptor)xmlContext.getSession(0).getProject().getDescriptor(((XMLRoot)objectToWrite).getObject().getClass());
    }
 else {
      desc=(XMLDescriptor)xmlContext.getSession(0).getProject().getDescriptor(objectToWrite.getClass());
    }
    int sizeBefore=getNamespaceResolverSize(desc);
    Result result=(Result)PrivilegedAccessHelper.invokeConstructor(staxResultConstructor,new Object[]{streamWriter});
    xmlMarshaller.marshal(objectToWrite,result);
    streamWriter.flush();
    int sizeAfter=getNamespaceResolverSize(desc);
    assertEquals(sizeBefore,sizeAfter);
    StringReader reader=new StringReader(writer.toString());
    InputSource inputSource=new InputSource(reader);
    Document testDocument=parser.parse(inputSource);
    writer.close();
    reader.close();
    objectToXMLDocumentTest(testDocument);
  }
}
Program: 67357
Project: 67357
Buggy source:
public XMLComparer(){
  super();
}

Fixed version (ground truth):
public XMLComparer(){
  super();
  ignoreOrder=false;
}
Program: 67358
Project: 67358
Buggy source:
private boolean isNodeListEqual(NodeList control,NodeList test){
  int numberOfControlNodes=control.getLength();
  if (numberOfControlNodes != test.getLength()) {
    return false;
  }
  for (int x=0; x < numberOfControlNodes; x++) {
    if (!isNodeEqual(control.item(x),test.item(x))) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean isNodeListEqual(NodeList control,NodeList test){
  int numberOfControlNodes=control.getLength();
  if (numberOfControlNodes != test.getLength()) {
    return false;
  }
  if (ignoreOrder) {
    for (int x=0; x < numberOfControlNodes; x++) {
      if (!isNodeInNodeList(control.item(x),test)) {
        return false;
      }
    }
    for (int x=0; x < numberOfControlNodes; x++) {
      if (!isNodeInNodeList(test.item(x),control)) {
        return false;
      }
    }
  }
 else {
    for (int x=0; x < numberOfControlNodes; x++) {
      if (!isNodeEqual(control.item(x),test.item(x))) {
        return false;
      }
    }
  }
  return true;
}
Program: 67360
Project: 67360
Buggy source:
/** 
 * INTERNAL: Return true if the caching has been specified as ENABLE_SELECTIVE in the persistence.xml. 
 */
public boolean isCacheEnableSelective(){
  return m_persistenceUnitInfo.getCaching() != null && m_persistenceUnitInfo.getCaching().name().equals("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * INTERNAL: Return true if the caching has been specified as ENABLE_SELECTIVE in the persistence.xml. 
 */
public boolean isCacheEnableSelective(){
  return getCaching() != null && getCaching().equals("String_Node_Str");
}
Program: 67361
Project: 67361
Buggy source:
/** 
 * INTERNAL: Return true if the caching has been specified as ALL in the persistence.xml.
 */
public boolean isCacheAll(){
  return m_persistenceUnitInfo.getCaching() != null && m_persistenceUnitInfo.getCaching().name().equals("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * INTERNAL: Return true if the caching has been specified as ALL in the persistence.xml.
 */
public boolean isCacheAll(){
  return getCaching() != null && getCaching().equals("String_Node_Str");
}
Program: 67362
Project: 67362
Buggy source:
/** 
 * INTERNAL: Return true if the caching has been specified as NONE in the  persistence.xml.  
 */
public boolean isCacheNone(){
  return m_persistenceUnitInfo.getCaching() != null && m_persistenceUnitInfo.getCaching().name().equals("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * INTERNAL: Return true if the caching has been specified as NONE in the  persistence.xml.  
 */
public boolean isCacheNone(){
  return getCaching() != null && getCaching().equals("String_Node_Str");
}
Program: 67363
Project: 67363
Buggy source:
/** 
 * INTERNAL: Return true if the caching has been specified as DISABLE_SELECTIVE in the persistence.xml. DISABLE_SELECTIVE is the default therefore this will  also return true if no caching setting was set.
 */
public boolean isCacheDisableSelective(){
  return m_persistenceUnitInfo.getCaching() == null || m_persistenceUnitInfo.getCaching().name().equals("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * INTERNAL: Return true if the caching has been specified as DISABLE_SELECTIVE in the persistence.xml. DISABLE_SELECTIVE is the default therefore this will  also return true if no caching setting was set.
 */
public boolean isCacheDisableSelective(){
  return getCaching() == null || getCaching().equals("String_Node_Str");
}
Program: 67364
Project: 67364
Buggy source:
public void testFindWithProperties(){
  if (!isJPA10()) {
    Employee employee=new Employee();
    employee.setFirstName("String_Node_Str");
    HashMap queryhints=new HashMap();
    EntityManager em=createEntityManager();
    try {
      beginTransaction(em);
      em.persist(employee);
      commitTransaction(em);
      beginTransaction(em);
      int empId=employee.getId();
      Employee e1=em.find(Employee.class,empId);
      e1.setFirstName("String_Node_Str");
      queryhints.put(QueryHints.REFRESH,"String_Node_Str");
      Employee e2=em.find(Employee.class,empId,queryhints);
      assertFalse(e2.getFirstName().equals("String_Node_Str"));
      commitTransaction(em);
    }
 catch (    IllegalArgumentException iae) {
      return;
    }
catch (    Exception e) {
      fail("String_Node_Str" + e.getClass());
    }
 finally {
      closeEntityManager(em);
    }
  }
}

Fixed version (ground truth):
public void testFindWithProperties(){
  if (!isJPA10()) {
    Employee employee=new Employee();
    employee.setFirstName("String_Node_Str");
    HashMap queryhints=new HashMap();
    EntityManager em=createEntityManager();
    try {
      beginTransaction(em);
      em.persist(employee);
      commitTransaction(em);
      beginTransaction(em);
      int empId=employee.getId();
      Employee e1=em.find(Employee.class,empId);
      e1.setFirstName("String_Node_Str");
      queryhints.put(QueryHints.REFRESH,"String_Node_Str");
      Employee e2=(Employee)em.find(Employee.class,empId,queryhints);
      assertFalse(e2.getFirstName().equals("String_Node_Str"));
      commitTransaction(em);
    }
 catch (    IllegalArgumentException iae) {
      return;
    }
catch (    Exception e) {
      fail("String_Node_Str" + e.getClass());
    }
 finally {
      closeEntityManager(em);
    }
  }
}
Program: 67365
Project: 67365
Buggy source:
public void testPESSIMISTIC_WRITE_TIMEOUTLock(){
  ServerSession session=JUnitTestCase.getServerSession();
  Assert.assertFalse("String_Node_Str",session.getPlatform().isSybase());
  if (!isOnServer() && isSelectForUpateSupported() && !session.getPlatform().isMySQL()) {
    EntityManager em=createEntityManager();
    List result=em.createQuery("String_Node_Str").getResultList();
    Employee employee=(Employee)result.get(0);
    Exception lockTimeOutException=null;
    try {
      beginTransaction(em);
      employee=em.find(Employee.class,employee.getId(),LockModeType.PESSIMISTIC_WRITE);
      EntityManager em2=createEntityManager();
      try {
        beginTransaction(em2);
        HashMap properties=new HashMap();
        properties.put(QueryHints.PESSIMISTIC_LOCK_TIMEOUT,5);
        Employee employee2=em2.find(Employee.class,employee.getId(),LockModeType.PESSIMISTIC_WRITE,properties);
        employee2.setFirstName("String_Node_Str");
        commitTransaction(em2);
      }
 catch (      PersistenceException ex) {
        if (ex instanceof javax.persistence.LockTimeoutException) {
          lockTimeOutException=ex;
        }
 else {
          throw ex;
        }
      }
 finally {
        closeEntityManager(em2);
      }
      commitTransaction(em);
    }
 catch (    RuntimeException ex) {
      if (isTransactionActive(em)) {
        rollbackTransaction(em);
      }
      throw ex;
    }
 finally {
      closeEntityManager(em);
    }
    assertFalse("String_Node_Str",lockTimeOutException == null);
  }
}

Fixed version (ground truth):
public void testPESSIMISTIC_WRITE_TIMEOUTLock(){
  ServerSession session=JUnitTestCase.getServerSession();
  Assert.assertFalse("String_Node_Str",session.getPlatform().isSybase());
  if (!isOnServer() && isSelectForUpateSupported() && !session.getPlatform().isMySQL()) {
    EntityManager em=createEntityManager();
    List result=em.createQuery("String_Node_Str").getResultList();
    Employee employee=(Employee)result.get(0);
    Exception lockTimeOutException=null;
    try {
      beginTransaction(em);
      employee=em.find(Employee.class,employee.getId(),LockModeType.PESSIMISTIC_WRITE);
      EntityManager em2=createEntityManager();
      try {
        beginTransaction(em2);
        HashMap properties=new HashMap();
        properties.put(QueryHints.PESSIMISTIC_LOCK_TIMEOUT,5);
        Employee employee2=(Employee)em2.find(Employee.class,employee.getId(),LockModeType.PESSIMISTIC_WRITE,properties);
        employee2.setFirstName("String_Node_Str");
        commitTransaction(em2);
      }
 catch (      PersistenceException ex) {
        if (ex instanceof javax.persistence.LockTimeoutException) {
          lockTimeOutException=ex;
        }
 else {
          throw ex;
        }
      }
 finally {
        closeEntityManager(em2);
      }
      commitTransaction(em);
    }
 catch (    RuntimeException ex) {
      if (isTransactionActive(em)) {
        rollbackTransaction(em);
      }
      throw ex;
    }
 finally {
      closeEntityManager(em);
    }
    assertFalse("String_Node_Str",lockTimeOutException == null);
  }
}
Program: 67366
Project: 67366
Buggy source:
public void testPESSIMISTIC_READ_TIMEOUTLock(){
  ServerSession session=JUnitTestCase.getServerSession();
  Assert.assertFalse("String_Node_Str",session.getPlatform().isSybase());
  if (!isOnServer() && isSelectForUpateSupported() && !session.getPlatform().isMySQL()) {
    EntityManager em=createEntityManager();
    List result=em.createQuery("String_Node_Str").getResultList();
    Employee employee=(Employee)result.get(0);
    Exception lockTimeOutException=null;
    try {
      beginTransaction(em);
      employee=em.find(Employee.class,employee.getId(),LockModeType.PESSIMISTIC_READ);
      EntityManager em2=createEntityManager();
      try {
        beginTransaction(em2);
        HashMap properties=new HashMap();
        properties.put(QueryHints.PESSIMISTIC_LOCK_TIMEOUT,5);
        Employee employee2=em2.find(Employee.class,employee.getId(),LockModeType.PESSIMISTIC_READ,properties);
        employee2.setFirstName("String_Node_Str");
        commitTransaction(em2);
      }
 catch (      PersistenceException ex) {
        if (ex instanceof javax.persistence.LockTimeoutException) {
          lockTimeOutException=ex;
        }
 else {
          throw ex;
        }
      }
 finally {
        closeEntityManager(em2);
      }
      commitTransaction(em);
    }
 catch (    RuntimeException ex) {
      if (isTransactionActive(em)) {
        rollbackTransaction(em);
      }
      throw ex;
    }
 finally {
      closeEntityManager(em);
    }
    assertFalse("String_Node_Str",lockTimeOutException == null);
  }
}

Fixed version (ground truth):
public void testPESSIMISTIC_READ_TIMEOUTLock(){
  ServerSession session=JUnitTestCase.getServerSession();
  Assert.assertFalse("String_Node_Str",session.getPlatform().isSybase());
  if (!isOnServer() && isSelectForUpateSupported() && !session.getPlatform().isMySQL()) {
    EntityManager em=createEntityManager();
    List result=em.createQuery("String_Node_Str").getResultList();
    Employee employee=(Employee)result.get(0);
    Exception lockTimeOutException=null;
    try {
      beginTransaction(em);
      employee=em.find(Employee.class,employee.getId(),LockModeType.PESSIMISTIC_READ);
      EntityManager em2=createEntityManager();
      try {
        beginTransaction(em2);
        HashMap properties=new HashMap();
        properties.put(QueryHints.PESSIMISTIC_LOCK_TIMEOUT,5);
        Employee employee2=(Employee)em2.find(Employee.class,employee.getId(),LockModeType.PESSIMISTIC_READ,properties);
        employee2.setFirstName("String_Node_Str");
        commitTransaction(em2);
      }
 catch (      PersistenceException ex) {
        if (ex instanceof javax.persistence.LockTimeoutException) {
          lockTimeOutException=ex;
        }
 else {
          throw ex;
        }
      }
 finally {
        closeEntityManager(em2);
      }
      commitTransaction(em);
    }
 catch (    RuntimeException ex) {
      if (isTransactionActive(em)) {
        rollbackTransaction(em);
      }
      throw ex;
    }
 finally {
      closeEntityManager(em);
    }
    assertFalse("String_Node_Str",lockTimeOutException == null);
  }
}
Program: 67367
Project: 67367
Buggy source:
public void complexIndexOfInSelectClauseTest(){
  EntityManager em=createEntityManager();
  em.getTransaction().begin();
  ExpertBeerConsumer consumer=new ExpertBeerConsumer();
  consumer.getDesignations().add("String_Node_Str");
  consumer.getDesignations().add("String_Node_Str");
  em.persist(consumer);
  em.flush();
  List expectedResult=new ArrayList();
  expectedResult.add(new Integer(0));
  expectedResult.add(new Integer(1));
  clearCache();
  String ejbqlString="String_Node_Str";
  List result=em.createQuery(ejbqlString).getResultList();
  em.getTransaction().rollback();
  Assert.assertTrue("String_Node_Str",comparer.compareObjects(result,expectedResult));
}

Fixed version (ground truth):
public void complexIndexOfInSelectClauseTest(){
  EntityManager em=createEntityManager();
  beginTransaction(em);
  ExpertBeerConsumer consumer=new ExpertBeerConsumer();
  consumer.getDesignations().add("String_Node_Str");
  consumer.getDesignations().add("String_Node_Str");
  em.persist(consumer);
  em.flush();
  List expectedResult=new ArrayList();
  expectedResult.add(new Integer(0));
  expectedResult.add(new Integer(1));
  clearCache();
  String ejbqlString="String_Node_Str";
  List result=em.createQuery(ejbqlString).getResultList();
  rollbackTransaction(em);
  Assert.assertTrue("String_Node_Str",comparer.compareObjects(result,expectedResult));
}
Program: 67368
Project: 67368
Buggy source:
public void complexConstructorMapTest(){
  if (isOnServer()) {
    return;
  }
  JpaEntityManager em=(JpaEntityManager)createEntityManager();
  em.getTransaction().begin();
  BeerConsumer consumer=new BeerConsumer();
  consumer.setName("String_Node_Str");
  em.persist(consumer);
  Blue blue=new Blue();
  blue.setAlcoholContent(5.0f);
  blue.setUniqueKey(BigInteger.ONE);
  consumer.addBlueBeerToConsume(blue);
  em.persist(blue);
  em.flush();
  String jpqlString="String_Node_Str";
  Query query=em.createQuery(jpqlString);
  EmployeeDetail result=(EmployeeDetail)query.getSingleResult();
  EmployeeDetail expectedResult=new EmployeeDetail("String_Node_Str","String_Node_Str",BigInteger.ONE);
  em.getTransaction().rollback();
  Assert.assertTrue("String_Node_Str",result.equals(expectedResult));
}

Fixed version (ground truth):
public void complexConstructorMapTest(){
  if (isOnServer()) {
    return;
  }
  JpaEntityManager em=(JpaEntityManager)createEntityManager();
  beginTransaction(em);
  BeerConsumer consumer=new BeerConsumer();
  consumer.setName("String_Node_Str");
  em.persist(consumer);
  Blue blue=new Blue();
  blue.setAlcoholContent(5.0f);
  blue.setUniqueKey(BigInteger.ONE);
  consumer.addBlueBeerToConsume(blue);
  em.persist(blue);
  em.flush();
  String jpqlString="String_Node_Str";
  Query query=em.createQuery(jpqlString);
  EmployeeDetail result=(EmployeeDetail)query.getSingleResult();
  EmployeeDetail expectedResult=new EmployeeDetail("String_Node_Str","String_Node_Str",BigInteger.ONE);
  rollbackTransaction(em);
  Assert.assertTrue("String_Node_Str",result.equals(expectedResult));
}
Program: 67369
Project: 67369
Buggy source:
public void complexIndexOfInWhereClauseTest(){
  EntityManager em=createEntityManager();
  em.getTransaction().begin();
  ExpertBeerConsumer consumer=new ExpertBeerConsumer();
  consumer.getDesignations().add("String_Node_Str");
  consumer.getDesignations().add("String_Node_Str");
  em.persist(consumer);
  em.flush();
  String expectedResult="String_Node_Str";
  clearCache();
  String ejbqlString="String_Node_Str";
  String result=(String)em.createQuery(ejbqlString).getSingleResult();
  em.getTransaction().rollback();
  Assert.assertTrue("String_Node_Str",result.equals(expectedResult));
}

Fixed version (ground truth):
public void complexIndexOfInWhereClauseTest(){
  EntityManager em=createEntityManager();
  beginTransaction(em);
  ExpertBeerConsumer consumer=new ExpertBeerConsumer();
  consumer.getDesignations().add("String_Node_Str");
  consumer.getDesignations().add("String_Node_Str");
  em.persist(consumer);
  em.flush();
  String expectedResult="String_Node_Str";
  clearCache();
  String ejbqlString="String_Node_Str";
  String result=(String)em.createQuery(ejbqlString).getSingleResult();
  rollbackTransaction(em);
  Assert.assertTrue("String_Node_Str",result.equals(expectedResult));
}
Program: 67370
Project: 67370
Buggy source:
public void complexMemberOfElementCollectionTest(){
  EntityManager em=createEntityManager();
  em.getTransaction().begin();
  Buyer buyer=new Buyer();
  buyer.setName("String_Node_Str");
  buyer.setDescription("String_Node_Str");
  buyer.addRoyalBankCreditLine(10);
  em.persist(buyer);
  em.flush();
  List expectedResult=new ArrayList();
  expectedResult.add(buyer);
  String ejbqlString="String_Node_Str";
  List result=em.createQuery(ejbqlString).getResultList();
  em.getTransaction().rollback();
  Assert.assertTrue("String_Node_Str",comparer.compareObjects(result,expectedResult));
}

Fixed version (ground truth):
public void complexMemberOfElementCollectionTest(){
  EntityManager em=createEntityManager();
  beginTransaction(em);
  Buyer buyer=new Buyer();
  buyer.setName("String_Node_Str");
  buyer.setDescription("String_Node_Str");
  buyer.addRoyalBankCreditLine(10);
  em.persist(buyer);
  em.flush();
  List expectedResult=new ArrayList();
  expectedResult.add(buyer);
  String ejbqlString="String_Node_Str";
  List result=em.createQuery(ejbqlString).getResultList();
  rollbackTransaction(em);
  Assert.assertTrue("String_Node_Str",comparer.compareObjects(result,expectedResult));
}
Program: 67371
Project: 67371
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 {
  BigInteger bigInteger=null;
  try {
    if (sourceObject instanceof BigInteger) {
      bigInteger=(BigInteger)sourceObject;
    }
 else     if (sourceObject instanceof String) {
      bigInteger=new BigInteger((String)sourceObject);
    }
 else     if (sourceObject instanceof BigDecimal) {
      bigInteger=((BigDecimal)sourceObject).toBigInteger();
    }
 else     if (sourceObject instanceof Number) {
      bigInteger=new BigInteger(new Long(((Number)sourceObject).longValue()).toString());
    }
 else     if (sourceObject instanceof Byte[]) {
      Byte[] objectBytes=(Byte[])sourceObject;
      byte[] bytes=new byte[objectBytes.length];
      for (int index=0; index < objectBytes.length; index++) {
        bytes[index]=objectBytes[index].byteValue();
      }
      bigInteger=new BigInteger(bytes);
    }
 else     if (sourceObject instanceof byte[]) {
      bigInteger=new BigInteger((byte[])sourceObject);
    }
 else {
      throw ConversionException.couldNotBeConverted(sourceObject,ClassConstants.BIGINTEGER);
    }
  }
 catch (  NumberFormatException exception) {
    throw ConversionException.couldNotBeConverted(sourceObject,ClassConstants.BIGINTEGER,exception);
  }
  return bigInteger;
}

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 {
  BigInteger bigInteger=null;
  try {
    if (sourceObject instanceof BigInteger) {
      bigInteger=(BigInteger)sourceObject;
    }
 else     if (sourceObject instanceof String) {
      bigInteger=new BigInteger((String)sourceObject);
    }
 else     if (sourceObject instanceof BigDecimal) {
      bigInteger=((BigDecimal)sourceObject).toBigInteger();
    }
 else     if (sourceObject instanceof Number) {
      bigInteger=new BigInteger(String.valueOf(((Number)sourceObject).longValue()));
    }
 else     if (sourceObject instanceof Byte[]) {
      Byte[] objectBytes=(Byte[])sourceObject;
      byte[] bytes=new byte[objectBytes.length];
      for (int index=0; index < objectBytes.length; index++) {
        bytes[index]=objectBytes[index].byteValue();
      }
      bigInteger=new BigInteger(bytes);
    }
 else     if (sourceObject instanceof byte[]) {
      bigInteger=new BigInteger((byte[])sourceObject);
    }
 else {
      throw ConversionException.couldNotBeConverted(sourceObject,ClassConstants.BIGINTEGER);
    }
  }
 catch (  NumberFormatException exception) {
    throw ConversionException.couldNotBeConverted(sourceObject,ClassConstants.BIGINTEGER,exception);
  }
  return bigInteger;
}
Program: 67372
Project: 67372
Buggy source:
public List<InputStream> getControlSchemaFiles(){
  InputStream instream=ClassLoader.getSystemResourceAsStream("String_Node_Str");
  List<InputStream> controlSchema=new ArrayList<InputStream>();
  controlSchema.add(instream);
  return controlSchema;
}

Fixed version (ground truth):
public Map<String,InputStream> getControlSchemaFiles(){
  InputStream instream=ClassLoader.getSystemResourceAsStream("String_Node_Str");
  Map<String,InputStream> controlSchema=new HashMap<String,InputStream>();
  controlSchema.put("String_Node_Str",instream);
  return controlSchema;
}
Program: 67373
Project: 67373
Buggy source:
public List<InputStream> getControlSchemaFiles(){
  InputStream instream=ClassLoader.getSystemResourceAsStream("String_Node_Str");
  List<InputStream> controlSchema=new ArrayList<InputStream>();
  controlSchema.add(instream);
  return controlSchema;
}

Fixed version (ground truth):
public Map<String,InputStream> getControlSchemaFiles(){
  InputStream instream=ClassLoader.getSystemResourceAsStream("String_Node_Str");
  Map<String,InputStream> controlSchema=new HashMap<String,InputStream>();
  controlSchema.put("String_Node_Str",instream);
  return controlSchema;
}
Program: 67374
Project: 67374
Buggy source:
public List<InputStream> getControlSchemaFiles(){
  InputStream instream=ClassLoader.getSystemResourceAsStream("String_Node_Str");
  List<InputStream> controlSchema=new ArrayList<InputStream>();
  controlSchema.add(instream);
  return controlSchema;
}

Fixed version (ground truth):
public Map<String,InputStream> getControlSchemaFiles(){
  InputStream instream=ClassLoader.getSystemResourceAsStream("String_Node_Str");
  Map<String,InputStream> controlSchema=new HashMap<String,InputStream>();
  controlSchema.put("String_Node_Str",instream);
  return controlSchema;
}
Program: 67375
Project: 67375
Buggy source:
public List<InputStream> getControlSchemaFiles(){
  InputStream instream=ClassLoader.getSystemResourceAsStream("String_Node_Str");
  List<InputStream> controlSchema=new ArrayList<InputStream>();
  controlSchema.add(instream);
  return controlSchema;
}

Fixed version (ground truth):
public Map<String,InputStream> getControlSchemaFiles(){
  InputStream instream=ClassLoader.getSystemResourceAsStream("String_Node_Str");
  Map<String,InputStream> controlSchema=new HashMap<String,InputStream>();
  controlSchema.put("String_Node_Str",instream);
  return controlSchema;
}
Program: 67376
Project: 67376
Buggy source:
public List<InputStream> getControlSchemaFiles(){
  InputStream instream=ClassLoader.getSystemResourceAsStream("String_Node_Str");
  List<InputStream> controlSchema=new ArrayList<InputStream>();
  controlSchema.add(instream);
  return controlSchema;
}

Fixed version (ground truth):
public Map<String,InputStream> getControlSchemaFiles(){
  InputStream instream=ClassLoader.getSystemResourceAsStream("String_Node_Str");
  Map<String,InputStream> controlSchema=new HashMap<String,InputStream>();
  controlSchema.put("String_Node_Str",instream);
  return controlSchema;
}