nus-yam/ex-repair huggingface dataset:
Program: 64315
Project: 64315
Buggy source:
protected Response namedQuerySingleResult(String persistenceUnit,String name,HttpHeaders hh,UriInfo ui,URI baseURI){
  PersistenceContext app=getPersistenceFactory().get(persistenceUnit,baseURI,null);
  if (app == null) {
    JPARSLogger.fine("String_Node_Str",new Object[]{persistenceUnit});
    return Response.status(Status.NOT_FOUND).build();
  }
  Query query=app.buildQuery(getMatrixParameters(ui,persistenceUnit),name,getMatrixParameters(ui,name),getQueryParameters(ui));
  DatabaseQuery dbQuery=((EJBQueryImpl<?>)query).getDatabaseQuery();
  if (dbQuery instanceof ReportQuery) {
    List<ReportItem> reportItems=((ReportQuery)dbQuery).getItems();
    Object[] queryResults=(Object[])query.getSingleResult();
    SingleResultQueryList list=populateReportQueryResponse(queryResults,reportItems);
    if (list != null) {
      return Response.ok(new StreamingOutputMarshaller(app,list,hh.getAcceptableMediaTypes())).build();
    }
 else {
      return Response.status(Status.INTERNAL_SERVER_ERROR).build();
    }
  }
  Object queryResults=query.getSingleResult();
  return Response.ok(new StreamingOutputMarshaller(app,queryResults,hh.getAcceptableMediaTypes())).build();
}

Fixed version (ground truth):
protected Response namedQuerySingleResult(String persistenceUnit,String name,HttpHeaders hh,UriInfo ui,URI baseURI){
  PersistenceContext app=getPersistenceFactory().get(persistenceUnit,baseURI,null);
  if (app == null) {
    JPARSLogger.fine("String_Node_Str",new Object[]{persistenceUnit});
    return Response.status(Status.NOT_FOUND).build();
  }
  Query query=app.buildQuery(getMatrixParameters(ui,persistenceUnit),name,getMatrixParameters(ui,name),getQueryParameters(ui));
  DatabaseQuery dbQuery=((EJBQueryImpl<?>)query).getDatabaseQuery();
  if (dbQuery instanceof ReportQuery) {
    List<ReportItem> reportItems=((ReportQuery)dbQuery).getItems();
    Object queryResults=query.getSingleResult();
    SingleResultQueryList list=populateReportQueryResponse(queryResults,reportItems);
    if (list != null) {
      return Response.ok(new StreamingOutputMarshaller(app,list,hh.getAcceptableMediaTypes())).build();
    }
 else {
      return Response.status(Status.INTERNAL_SERVER_ERROR).build();
    }
  }
  Object queryResults=query.getSingleResult();
  return Response.ok(new StreamingOutputMarshaller(app,queryResults,hh.getAcceptableMediaTypes())).build();
}
Program: 64316
Project: 64316
Buggy source:
/** 
 * Wrap the type in a type wrapper to handle XML conversion.
 */
public static DatabaseTypeWrapper wrapType(DatabaseType databaseType){
  if (databaseType.isComplexDatabaseType()) {
    ComplexDatabaseType complexType=(ComplexDatabaseType)databaseType;
    if (complexType.isJDBCType()) {
      if (complexType.isCollection()) {
        return new OracleArrayTypeWrapper(databaseType);
      }
      return new OracleObjectTypeWrapper(databaseType);
    }
    if (complexType.isRecord()) {
      return new PLSQLRecordWrapper(databaseType);
    }
    if (complexType.isCollection()) {
      return new PLSQLCollectionWrapper(databaseType);
    }
    if (complexType.isCursor()) {
      return new PLSQLCursorWrapper(databaseType);
    }
  }
 else   if (databaseType.isJDBCType()) {
    return new JDBCTypeWrapper(databaseType);
  }
 else   if (isXMLType(databaseType.getTypeName())) {
    return new XMLTypeWrapper(databaseType);
  }
 else {
    return new SimplePLSQLTypeWrapper(databaseType);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Wrap the type in a type wrapper to handle XML conversion.
 */
public static DatabaseTypeWrapper wrapType(DatabaseType databaseType){
  if (databaseType.isComplexDatabaseType()) {
    ComplexDatabaseType complexType=(ComplexDatabaseType)databaseType;
    if (complexType.isJDBCType()) {
      if (complexType.isCollection()) {
        return new OracleArrayTypeWrapper(databaseType);
      }
      return new OracleObjectTypeWrapper(databaseType);
    }
    if (complexType.isRecord()) {
      return new PLSQLRecordWrapper(databaseType);
    }
    if (complexType.isCollection()) {
      return new PLSQLCollectionWrapper(databaseType);
    }
    if (complexType.isCursor()) {
      return new PLSQLCursorWrapper(databaseType);
    }
  }
 else   if (databaseType.isJDBCType()) {
    return new JDBCTypeWrapper(databaseType);
  }
 else {
    return new SimplePLSQLTypeWrapper(databaseType);
  }
  return null;
}
Program: 64320
Project: 64320
Buggy source:
public int compile(String classpath,Object[] javaFiles){
  String[] args=new String[javaFiles.length + 3];
  args[0]="String_Node_Str";
  args[1]="String_Node_Str";
  args[2]=classpath;
  System.arraycopy(javaFiles,0,args,3,javaFiles.length);
  int exitVal=-1;
  try {
    Process proc=Runtime.getRuntime().exec(args);
    InputStream stderr=proc.getErrorStream();
    InputStreamReader isr=new InputStreamReader(stderr);
    BufferedReader br=new BufferedReader(isr);
    String line=br.readLine();
    if (line != null) {
      System.out.println("String_Node_Str");
      while (line != null) {
        System.out.println(line);
        if ((line=br.readLine()) == null) {
          System.out.println("String_Node_Str");
        }
      }
    }
    exitVal=proc.waitFor();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return exitVal;
}

Fixed version (ground truth):
public int compile(String classpath,Object[] javaFiles){
  String[] args=new String[javaFiles.length + 7];
  args[0]="String_Node_Str";
  args[1]="String_Node_Str";
  args[2]=classpath;
  args[3]="String_Node_Str";
  args[4]="String_Node_Str";
  args[5]="String_Node_Str";
  args[6]="String_Node_Str";
  System.arraycopy(javaFiles,0,args,7,javaFiles.length);
  int exitVal=-1;
  try {
    Process proc=Runtime.getRuntime().exec(args);
    InputStream stderr=proc.getErrorStream();
    InputStreamReader isr=new InputStreamReader(stderr);
    BufferedReader br=new BufferedReader(isr);
    String line=br.readLine();
    if (line != null) {
      System.out.println("String_Node_Str");
      while (line != null) {
        System.out.println(line);
        if ((line=br.readLine()) == null) {
          System.out.println("String_Node_Str");
        }
      }
    }
    exitVal=proc.waitFor();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return exitVal;
}
Program: 64321
Project: 64321
Buggy source:
public List addExtraNamespacesToNamespaceResolver(Descriptor desc,XMLRecord marshalRecord,CoreAbstractSession session,boolean allowOverride,boolean ignoreEqualResolvers);

Fixed version (ground truth):
public List addExtraNamespacesToNamespaceResolver(Descriptor desc,AbstractMarshalRecord marshalRecord,CoreAbstractSession session,boolean allowOverride,boolean ignoreEqualResolvers);
Program: 64322
Project: 64322
Buggy source:
public TreeObjectBuilder(ClassDescriptor descriptor){
  super(descriptor);
  xPathObjectBuilder=new XPathObjectBuilder((Descriptor)descriptor);
}

Fixed version (ground truth):
public TreeObjectBuilder(ClassDescriptor descriptor){
  super(descriptor);
  xPathObjectBuilder=new XPathObjectBuilder(descriptor);
}
Program: 64323
Project: 64323
Buggy source:
@Override public List addExtraNamespacesToNamespaceResolver(Descriptor desc,XMLRecord marshalRecord,CoreAbstractSession session,boolean allowOverride,boolean ignoreEqualResolvers){
  return xPathObjectBuilder.addExtraNamespacesToNamespaceResolver(desc,marshalRecord,session,allowOverride,ignoreEqualResolvers);
}

Fixed version (ground truth):
@Override public List addExtraNamespacesToNamespaceResolver(Descriptor desc,AbstractMarshalRecord marshalRecord,CoreAbstractSession session,boolean allowOverride,boolean ignoreEqualResolvers){
  return xPathObjectBuilder.addExtraNamespacesToNamespaceResolver(desc,marshalRecord,session,allowOverride,ignoreEqualResolvers);
}
Program: 64324
Project: 64324
Buggy source:
/** 
 * Name of the NamespaceResolver to be used during unmarshal Ignored unmarshalling XML.  
 * @since 2.4    
 */
public abstract NamespaceResolver getNamespaceResolver();

Fixed version (ground truth):
/** 
 * Name of the NamespaceResolver to be used during unmarshal Ignored unmarshalling XML.  
 */
public abstract NamespaceResolver getNamespaceResolver();
Program: 64325
Project: 64325
Buggy source:
/** 
 * Get the MediaType for this xmlUnmarshaller. See org.eclipse.persistence.oxm.MediaType for the media types supported by EclipseLink MOXy If not set the default is MediaType.APPLICATION_XML
 * @since 2.4
 * @return MediaType
 */
public abstract MEDIA_TYPE getMediaType();

Fixed version (ground truth):
/** 
 * Get the MediaType for this xmlUnmarshaller. See org.eclipse.persistence.oxm.MediaType for the media types supported by EclipseLink MOXy If not set the default is MediaType.APPLICATION_XML
 * @return MediaType
 */
public abstract MEDIA_TYPE getMediaType();
Program: 64326
Project: 64326
Buggy source:
/** 
 * Return this Unmarshaller's custom IDResolver.
 * @see IDResolver
 * @since 2.3.3
 * @return the custom IDResolver, or null if one has not been specified.
 */
public abstract ID_RESOLVER getIDResolver();

Fixed version (ground truth):
/** 
 * Return this Unmarshaller's custom IDResolver.
 * @see IDResolver
 * @return the custom IDResolver, or null if one has not been specified.
 */
public abstract ID_RESOLVER getIDResolver();
Program: 64327
Project: 64327
Buggy source:
/** 
 * Determine if the @XMLRootElement should be marshalled when present.   Ignored unmarshalling XML.   
 * @return
 * @since 2.4
 */
public abstract boolean isIncludeRoot();

Fixed version (ground truth):
/** 
 * Determine if the @XMLRootElement should be marshalled when present.   Ignored unmarshalling XML.   
 * @return
 */
public abstract boolean isIncludeRoot();
Program: 64328
Project: 64328
Buggy source:
/** 
 * Get the namespace separator used during unmarshal operations. If mediaType is application/json '.' is the default Ignored unmarshalling XML.   
 * @since 2.4
 */
public abstract char getNamespaceSeparator();

Fixed version (ground truth):
/** 
 * Get the namespace separator used during unmarshal operations. If mediaType is application/json '.' is the default Ignored unmarshalling XML.   
 */
public abstract char getNamespaceSeparator();
Program: 64329
Project: 64329
Buggy source:
/** 
 * Value that will be used to prefix attributes.   Ignored unmarshalling XML.   
 * @return
 * @since 2.4
 */
public abstract String getAttributePrefix();

Fixed version (ground truth):
/** 
 * Value that will be used to prefix attributes.   Ignored unmarshalling XML.   
 * @return
 */
public abstract String getAttributePrefix();
Program: 64330
Project: 64330
Buggy source:
/** 
 * Name of the property to marshal/unmarshal as a wrapper on the text() mappings    Ignored unmarshalling XML.  
 * @since 2.4    
 */
public abstract String getValueWrapper();

Fixed version (ground truth):
/** 
 * Name of the property to marshal/unmarshal as a wrapper on the text() mappings    Ignored unmarshalling XML.  
 */
public abstract String getValueWrapper();
Program: 64332
Project: 64332
Buggy source:
public QName buildQNameFromString(String stringValue,XMLRecord record){
  int index=stringValue.lastIndexOf(Constants.COLON);
  if (index > -1) {
    String prefix=stringValue.substring(0,index);
    String localName=stringValue.substring(index + 1);
    String namespaceURI=record.resolveNamespacePrefix(prefix);
    return new QName(namespaceURI,localName,prefix);
  }
 else {
    String namespaceURI=record.resolveNamespacePrefix(Constants.EMPTY_STRING);
    if (namespaceURI == null) {
      namespaceURI=record.resolveNamespacePrefix(null);
    }
    return new QName(namespaceURI,stringValue);
  }
}

Fixed version (ground truth):
public QName buildQNameFromString(String stringValue,AbstractUnmarshalRecord record){
  int index=stringValue.lastIndexOf(Constants.COLON);
  if (index > -1) {
    String prefix=stringValue.substring(0,index);
    String localName=stringValue.substring(index + 1);
    String namespaceURI=record.resolveNamespacePrefix(prefix);
    return new QName(namespaceURI,localName,prefix);
  }
 else {
    String namespaceURI=record.resolveNamespacePrefix(Constants.EMPTY_STRING);
    if (namespaceURI == null) {
      namespaceURI=record.resolveNamespacePrefix(null);
    }
    return new QName(namespaceURI,stringValue);
  }
}
Program: 64333
Project: 64333
Buggy source:
protected List<Namespace> addExtraNamespacesToNamespaceResolver(Descriptor desc,org.eclipse.persistence.internal.oxm.record.XMLRecord marshalRecord,CoreAbstractSession session,boolean allowOverride,boolean ignoreEqualResolvers){
  return marshalRecord.addExtraNamespacesToNamespaceResolver(desc,session,allowOverride,ignoreEqualResolvers);
}

Fixed version (ground truth):
protected List<Namespace> addExtraNamespacesToNamespaceResolver(Descriptor desc,AbstractMarshalRecord marshalRecord,CoreAbstractSession session,boolean allowOverride,boolean ignoreEqualResolvers){
  return marshalRecord.addExtraNamespacesToNamespaceResolver(desc,session,allowOverride,ignoreEqualResolvers);
}
Program: 64337
Project: 64337
Buggy source:
/** 
 * Default constructor, creates a new NamespaceResolver.
 */
public NamespaceResolver(){
  super();
}

Fixed version (ground truth):
/** 
 * Copy Constructor
 * @since EclipseLink 2.5.0
 */
public NamespaceResolver(NamespaceResolver namespaceResolver){
  this.defaultNamespaceURI=namespaceResolver.defaultNamespaceURI;
  Map<String,String> namespaceResolverPrefixesToNamespaces=namespaceResolver.prefixesToNamespaces;
  if (namespaceResolverPrefixesToNamespaces != null) {
    this.prefixesToNamespaces=new HashMap<String,String>(namespaceResolverPrefixesToNamespaces.size());
    this.prefixesToNamespaces.putAll(namespaceResolver.prefixesToNamespaces);
  }
  this.prefixCounter=namespaceResolver.prefixCounter;
  this.dom=namespaceResolver.dom;
}
Program: 64338
Project: 64338
Buggy source:
public boolean marshalAttributes(MarshalRecord marshalRecord,Object object,CoreAbstractSession session){
  lazyInitialize();
  boolean hasValue=false;
  NamespaceResolver namespaceResolver=((Descriptor)descriptor).getNamespaceResolver();
  List<XPathNode> attributeChildren=rootXPathNode.getAttributeChildren();
  if (null != attributeChildren) {
    ObjectMarshalContext objectMarshalContext=ObjectMarshalContext.getInstance();
    for (int x=0, attributeChildrenSize=attributeChildren.size(); x < attributeChildrenSize; x++) {
      hasValue=attributeChildren.get(x).marshal(marshalRecord,object,session,namespaceResolver,null,objectMarshalContext,null) || hasValue;
    }
  }
  if (rootXPathNode.getAnyAttributeNode() != null) {
    hasValue=rootXPathNode.getAnyAttributeNode().marshal(marshalRecord,object,session,namespaceResolver,null,ObjectMarshalContext.getInstance(),null) || hasValue;
  }
  List<XPathNode> selfChildren=rootXPathNode.getSelfChildren();
  if (null != selfChildren) {
    for (    XPathNode selfXPathNode : selfChildren) {
      NodeValue marshalNodeValue=selfXPathNode.getMarshalNodeValue();
      if (marshalNodeValue instanceof MappingNodeValue) {
        Mapping selfMapping=((MappingNodeValue)marshalNodeValue).getMapping();
        Object value=selfMapping.getAttributeValueFromObject(object);
        Descriptor referenceDescriptor=(Descriptor)selfMapping.getReferenceDescriptor();
        Descriptor valueDescriptor;
        if (value != null && (referenceDescriptor == null || referenceDescriptor.hasInheritance())) {
          valueDescriptor=(Descriptor)session.getDescriptor(value.getClass());
        }
 else {
          valueDescriptor=referenceDescriptor;
        }
        if (null != valueDescriptor) {
          ((XMLObjectBuilder)valueDescriptor.getObjectBuilder()).addXsiTypeAndClassIndicatorIfRequired(marshalRecord,valueDescriptor,referenceDescriptor,(Field)selfMapping.getField(),false);
        }
      }
      selfXPathNode.marshalSelfAttributes(marshalRecord,object,session,namespaceResolver,marshalRecord.getMarshaller());
    }
  }
  return hasValue;
}

Fixed version (ground truth):
public boolean marshalAttributes(MarshalRecord marshalRecord,Object object,CoreAbstractSession session){
  return xPathObjectBuilder.marshalAttributes(marshalRecord,object,session);
}
Program: 64339
Project: 64339
Buggy source:
public TreeObjectBuilder(ClassDescriptor descriptor){
  super(descriptor);
}

Fixed version (ground truth):
public TreeObjectBuilder(ClassDescriptor descriptor){
  super(descriptor);
  xPathObjectBuilder=new XPathObjectBuilder((Descriptor)descriptor);
}
Program: 64340
Project: 64340
Buggy source:
public List getContainerValues(){
  return this.containerValues;
}

Fixed version (ground truth):
public List getContainerValues(){
  return xPathObjectBuilder.getContainerValues();
}
Program: 64341
Project: 64341
Buggy source:
public XPathNode getRootXPathNode(){
  lazyInitialize();
  return this.rootXPathNode;
}

Fixed version (ground truth):
public XPathNode getRootXPathNode(){
  return xPathObjectBuilder.getRootXPathNode();
}
Program: 64342
Project: 64342
Buggy source:
@Override public List addExtraNamespacesToNamespaceResolver(Descriptor desc,XMLRecord marshalRecord,CoreAbstractSession session,boolean allowOverride,boolean ignoreEqualResolvers){
  if (rootXPathNode.getNonAttributeChildren() == null) {
    return null;
  }
 else {
    return super.addExtraNamespacesToNamespaceResolver(desc,marshalRecord,session,allowOverride,ignoreEqualResolvers);
  }
}

Fixed version (ground truth):
@Override public List addExtraNamespacesToNamespaceResolver(Descriptor desc,XMLRecord marshalRecord,CoreAbstractSession session,boolean allowOverride,boolean ignoreEqualResolvers){
  return xPathObjectBuilder.addExtraNamespacesToNamespaceResolver(desc,marshalRecord,session,allowOverride,ignoreEqualResolvers);
}
Program: 64343
Project: 64343
Buggy source:
public List getTransformationMappings(){
  return this.transformationMappings;
}

Fixed version (ground truth):
public List getTransformationMappings(){
  return xPathObjectBuilder.getTransformationMappings();
}
Program: 64345
Project: 64345
Buggy source:
public List getDefaultEmptyContainerValues(){
  return this.defaultEmptyContainerValues;
}

Fixed version (ground truth):
public List getDefaultEmptyContainerValues(){
  return xPathObjectBuilder.getDefaultEmptyContainerValues();
}
Program: 64346
Project: 64346
Buggy source:
public List getNullCapableValues(){
  return this.nullCapableValues;
}

Fixed version (ground truth):
public List getNullCapableValues(){
  return xPathObjectBuilder.getNullCapableValues();
}
Program: 64347
Project: 64347
Buggy source:
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session){
  super.initialize(session);
  Descriptor xmlDescriptor=(Descriptor)getDescriptor();
  if (xmlDescriptor.hasInheritance()) {
    CoreInheritancePolicy inheritancePolicy=xmlDescriptor.getInheritancePolicy();
    if (!inheritancePolicy.hasClassExtractor()) {
      Field classIndicatorField=new XMLField(inheritancePolicy.getClassIndicatorFieldName());
      classIndicatorField.setNamespaceResolver(xmlDescriptor.getNamespaceResolver());
    }
  }
  if (!xmlDescriptor.isLazilyInitialized()) {
    lazyInitialize();
  }
}

Fixed version (ground truth):
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session){
  super.initialize(session);
  Descriptor xmlDescriptor=(Descriptor)getDescriptor();
  if (xmlDescriptor.hasInheritance()) {
    CoreInheritancePolicy inheritancePolicy=xmlDescriptor.getInheritancePolicy();
    if (!inheritancePolicy.hasClassExtractor()) {
      Field classIndicatorField=new XMLField(inheritancePolicy.getClassIndicatorFieldName());
      classIndicatorField.setNamespaceResolver(xmlDescriptor.getNamespaceResolver());
    }
  }
  if (!xmlDescriptor.isLazilyInitialized()) {
    xPathObjectBuilder.lazyInitialize();
  }
}
Program: 64353
Project: 64353
Buggy source:
private void initCycleRecoverableClasses(){
  try {
    this.cycleRecoverableClass=PrivilegedAccessHelper.getClassForName(CYCLE_RECOVERABLE);
    this.cycleRecoverableContextClass=PrivilegedAccessHelper.getClassForName(CYCLE_RECOVERABLE_CONTEXT);
  }
 catch (  Exception e) {
    throw XMLMarshalException.marshalException(e);
  }
}

Fixed version (ground truth):
private void initCycleRecoverableClasses(){
  try {
    this.cycleRecoverableClass=PrivilegedAccessHelper.getClassForName(CYCLE_RECOVERABLE);
    this.cycleRecoverableContextClass=PrivilegedAccessHelper.getClassForName(CYCLE_RECOVERABLE_CONTEXT);
  }
 catch (  Exception e) {
  }
}
Program: 64358
Project: 64358
Buggy source:
/** 
 * Validates the string expression of the given <code><b>LIKE</b></code> expression. The test to perform is: <ul> <li>If the string expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.</li> <li>If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.</li> </ul>
 * @param expression The {@link LengthExpression} to validate by validating its string expression
 * @return A number indicating the validation result. {@link #isValid(int,int)} can be used todetermine the validation status of an expression based on its position
 */
protected int validateLikeExpression(LikeExpression expression){
  int result=0;
  if (expression.hasStringExpression()) {
    Expression stringExpression=expression.getStringExpression();
    StateFieldPathExpression pathExpression=getStateFieldPathExpression(stringExpression);
    if (pathExpression != null) {
      boolean valid=validateStateFieldPathExpression(pathExpression,PathType.BASIC_FIELD_ONLY);
      updateStatus(result,0,valid);
    }
 else {
      stringExpression.accept(this);
    }
  }
  expression.getPatternValue().accept(this);
  expression.getEscapeCharacter().accept(this);
  return result;
}

Fixed version (ground truth):
/** 
 * Validates the string expression of the given <code><b>LIKE</b></code> expression. The test to perform is: <ul> <li>If the string expression is a path expression, validation makes sure it is a basic mapping, an association field is not allowed.</li> <li>If the encapsulated expression is not a path expression, validation will be redirected to that expression but the returned status will not be changed.</li> </ul>
 * @param expression The {@link LengthExpression} to validate by validating its string expression
 * @return A number indicating the validation result. {@link #isValid(int,int)} can be used todetermine the validation status of an expression based on its position
 */
protected int validateLikeExpression(LikeExpression expression){
  int result=0;
  if (expression.hasStringExpression()) {
    Expression stringExpression=expression.getStringExpression();
    StateFieldPathExpression pathExpression=getStateFieldPathExpression(stringExpression);
    if (pathExpression != null) {
      boolean valid=validateStateFieldPathExpression(pathExpression,validPathExpressionTypeForStringExpression());
      updateStatus(result,0,valid);
    }
 else {
      stringExpression.accept(this);
    }
  }
  expression.getPatternValue().accept(this);
  expression.getEscapeCharacter().accept(this);
  return result;
}
Program: 64363
Project: 64363
Buggy source:
@Override public boolean generateSchema(String persistenceUnitName,Map map){
  return false;
}

Fixed version (ground truth):
public boolean generateSchema(String persistenceUnitName,Map map){
  return false;
}
Program: 64369
Project: 64369
Buggy source:
@Override public Object getCurrentObject(CoreAbstractSession session,Mapping selfRecordMapping){
  if (session == null && docPresPolicy == null) {
    return null;
  }
  if (docPresPolicy == null) {
    XMLLogin login=(XMLLogin)session.getDatasourceLogin();
    docPresPolicy=login.getDocumentPreservationPolicy();
  }
  return docPresPolicy.getObjectForNode(currentNode,selfRecordMapping);
}

Fixed version (ground truth):
@Override public Object getCurrentObject(CoreAbstractSession session,Mapping selfRecordMapping){
  if (session == null && docPresPolicy == null) {
    return null;
  }
  if (docPresPolicy == null) {
    Login login=(Login)session.getDatasourceLogin();
    docPresPolicy=login.getDocumentPreservationPolicy();
  }
  return docPresPolicy.getObjectForNode(currentNode,selfRecordMapping);
}
Program: 64370
Project: 64370
Buggy source:
public DocumentPreservationPolicy getDocumentPreservationPolicy(){
  return this.documentPreservationPolicy;
}

Fixed version (ground truth):
@Override public DocumentPreservationPolicy getDocumentPreservationPolicy(){
  return this.documentPreservationPolicy;
}
Program: 64371
Project: 64371
Buggy source:
public void setDocumentPreservationPolicy(DocumentPreservationPolicy policy){
  this.documentPreservationPolicy=policy;
}

Fixed version (ground truth):
@Override public void setDocumentPreservationPolicy(DocumentPreservationPolicy policy){
  this.documentPreservationPolicy=policy;
}
Program: 64374
Project: 64374
Buggy source:
/** 
 * Get the MediaType for this xmlMarshaller. See org.eclipse.persistence.oxm.MediaType for the media types supported by EclipseLink MOXy If not set the default is MediaType.APPLICATION_XML
 * @return MediaType
 */
public abstract MediaType getMediaType();

Fixed version (ground truth):
/** 
 * Get the MediaType for this xmlMarshaller. See org.eclipse.persistence.oxm.MediaType for the media types supported by EclipseLink MOXy If not set the default is MediaType.APPLICATION_XML
 * @return MediaType
 */
public abstract MEDIA_TYPE getMediaType();
Program: 64375
Project: 64375
Buggy source:
/** 
 * Get the MediaType for this xmlUnmarshaller. See org.eclipse.persistence.oxm.MediaType for the media types supported by EclipseLink MOXy If not set the default is MediaType.APPLICATION_XML
 * @since 2.4
 * @return MediaType
 */
public abstract MediaType getMediaType();

Fixed version (ground truth):
/** 
 * Get the MediaType for this xmlUnmarshaller. See org.eclipse.persistence.oxm.MediaType for the media types supported by EclipseLink MOXy If not set the default is MediaType.APPLICATION_XML
 * @since 2.4
 * @return MediaType
 */
public abstract MEDIA_TYPE getMediaType();
Program: 64379
Project: 64379
Buggy source:
public Object unmarshal(XMLReader xmlReader,InputSource inputSource,Class clazz){
  if (xmlUnmarshaller.getMediaType() != MediaType.APPLICATION_XML) {
    throw XMLMarshalException.unsupportedMediaTypeForPlatform();
  }
  try {
    SAXDocumentBuilder saxDocumentBuilder=new SAXDocumentBuilder();
    xmlReader.setContentHandler(saxDocumentBuilder);
    xmlReader.parse(inputSource);
    return xmlToObject(new DOMRecord(saxDocumentBuilder.getDocument()),clazz);
  }
 catch (  IOException e) {
    throw XMLMarshalException.unmarshalException(e);
  }
catch (  SAXException e) {
    throw XMLMarshalException.unmarshalException(e);
  }
 finally {
    xmlUnmarshaller.getStringBuffer().reset();
  }
}

Fixed version (ground truth):
public Object unmarshal(XMLReader xmlReader,InputSource inputSource,Class clazz){
  if (!xmlUnmarshaller.getMediaType().isApplicationXML()) {
    throw XMLMarshalException.unsupportedMediaTypeForPlatform();
  }
  try {
    SAXDocumentBuilder saxDocumentBuilder=new SAXDocumentBuilder();
    xmlReader.setContentHandler(saxDocumentBuilder);
    xmlReader.parse(inputSource);
    return xmlToObject(new DOMRecord(saxDocumentBuilder.getDocument()),clazz);
  }
 catch (  IOException e) {
    throw XMLMarshalException.unmarshalException(e);
  }
catch (  SAXException e) {
    throw XMLMarshalException.unmarshalException(e);
  }
 finally {
    xmlUnmarshaller.getStringBuffer().reset();
  }
}
Program: 64380
Project: 64380
Buggy source:
private MediaType getMediaType(BufferedReader br){
  int READ_AHEAD_LIMIT=25;
  try {
    br.mark(READ_AHEAD_LIMIT);
    try {
      char c=0;
      for (int i=0; c != -1 && i < READ_AHEAD_LIMIT; i++) {
        c=(char)br.read();
        if (c == '[' || c == '{') {
          return MediaType.APPLICATION_JSON;
        }
 else         if (c == '<') {
          return MediaType.APPLICATION_XML;
        }
      }
    }
  finally {
      br.reset();
    }
  }
 catch (  IOException ioException) {
    throw XMLMarshalException.unmarshalException(ioException);
  }
  return xmlUnmarshaller.getMediaType();
}

Fixed version (ground truth):
private MediaType getMediaType(BufferedReader br){
  int READ_AHEAD_LIMIT=25;
  try {
    br.mark(READ_AHEAD_LIMIT);
    try {
      char c=0;
      for (int i=0; c != -1 && i < READ_AHEAD_LIMIT; i++) {
        c=(char)br.read();
        if (c == '[' || c == '{') {
          return Constants.APPLICATION_JSON;
        }
 else         if (c == '<') {
          return Constants.APPLICATION_XML;
        }
      }
    }
  finally {
      br.reset();
    }
  }
 catch (  IOException ioException) {
    throw XMLMarshalException.unmarshalException(ioException);
  }
  return xmlUnmarshaller.getMediaType();
}
Program: 64381
Project: 64381
Buggy source:
private XMLReader getNewXMLReader(Class clazz,MediaType mediaType){
  if (mediaType == MediaType.APPLICATION_JSON) {
    return new JSONReader(xmlUnmarshaller.getAttributePrefix(),xmlUnmarshaller.getNamespaceResolver(),xmlUnmarshaller.getNamespaceResolver() != null,xmlUnmarshaller.isIncludeRoot(),xmlUnmarshaller.getNamespaceSeparator(),xmlUnmarshaller.getErrorHandler(),xmlUnmarshaller.getValueWrapper(),clazz);
  }
  try {
    XMLReader xmlReader=new XMLReader(getSAXParser().getXMLReader());
    if (null != errorHandler) {
      xmlReader.setErrorHandler(errorHandler);
    }
    if (null != entityResolver) {
      xmlReader.setEntityResolver(entityResolver);
    }
    setValidationMode(xmlReader,getValidationMode());
    if (null != getSchema()) {
      xmlReader.setFeature(VALIDATING,xmlReader.getFeature(VALIDATING));
    }
    return xmlReader;
  }
 catch (  Exception e) {
    throw XMLMarshalException.errorInstantiatingSchemaPlatform(e);
  }
}

Fixed version (ground truth):
private XMLReader getNewXMLReader(Class clazz,MediaType mediaType){
  if (mediaType.isApplicationJSON()) {
    return new JSONReader(xmlUnmarshaller.getAttributePrefix(),xmlUnmarshaller.getNamespaceResolver(),xmlUnmarshaller.getNamespaceResolver() != null,xmlUnmarshaller.isIncludeRoot(),xmlUnmarshaller.getNamespaceSeparator(),xmlUnmarshaller.getErrorHandler(),xmlUnmarshaller.getValueWrapper(),clazz);
  }
  try {
    XMLReader xmlReader=new XMLReader(getSAXParser().getXMLReader());
    if (null != errorHandler) {
      xmlReader.setErrorHandler(errorHandler);
    }
    if (null != entityResolver) {
      xmlReader.setEntityResolver(entityResolver);
    }
    setValidationMode(xmlReader,getValidationMode());
    if (null != getSchema()) {
      xmlReader.setFeature(VALIDATING,xmlReader.getFeature(VALIDATING));
    }
    return xmlReader;
  }
 catch (  Exception e) {
    throw XMLMarshalException.errorInstantiatingSchemaPlatform(e);
  }
}
Program: 64382
Project: 64382
Buggy source:
/** 
 * INTERNAL:
 * @return The MediaType associated with this reader  
 */
public MediaType getMediaType(){
  return MediaType.APPLICATION_XML;
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 * @return The MediaType associated with this reader  
 */
public MediaType getMediaType(){
  return Constants.APPLICATION_XML;
}
Program: 64383
Project: 64383
Buggy source:
/** 
 * INTERNAL: The MediaType associated with this reader     
 * @return
 */
@Override public MediaType getMediaType(){
  return MediaType.APPLICATION_JSON;
}

Fixed version (ground truth):
/** 
 * INTERNAL: The MediaType associated with this reader     
 * @return
 */
@Override public MediaType getMediaType(){
  return Constants.APPLICATION_JSON;
}
Program: 64384
Project: 64384
Buggy source:
private void marshalSimpleValue(XPathFragment xmlRootFragment,MarshalRecord marshalRecord,Object originalValue,Object object,Object value,CoreAbstractSession session,NamespaceResolver namespaceResolver){
  QName qname=null;
  if (xmlRootFragment != null) {
    qname=((XMLRoot)originalValue).getSchemaType();
    Namespace generatedNamespace=setupFragment((XMLRoot)originalValue,xmlRootFragment,marshalRecord);
    getXPathNode().startElement(marshalRecord,xmlRootFragment,object,session,namespaceResolver,null,null);
    if (generatedNamespace != null) {
      marshalRecord.namespaceDeclaration(generatedNamespace.getPrefix(),generatedNamespace.getNamespaceURI());
    }
    updateNamespaces(qname,marshalRecord,null);
  }
  marshalRecord.characters(qname,value,null,false);
  if (xmlRootFragment != null) {
    marshalRecord.endElement(xmlRootFragment,namespaceResolver);
  }
}

Fixed version (ground truth):
private void marshalSimpleValue(XPathFragment xmlRootFragment,MarshalRecord marshalRecord,Object originalValue,Object object,Object value,CoreAbstractSession session,NamespaceResolver namespaceResolver){
  QName qname=null;
  if (xmlRootFragment != null) {
    qname=((Root)originalValue).getSchemaType();
    Namespace generatedNamespace=setupFragment((Root)originalValue,xmlRootFragment,marshalRecord);
    getXPathNode().startElement(marshalRecord,xmlRootFragment,object,session,namespaceResolver,null,null);
    if (generatedNamespace != null) {
      marshalRecord.namespaceDeclaration(generatedNamespace.getPrefix(),generatedNamespace.getNamespaceURI());
    }
    updateNamespaces(qname,marshalRecord,null);
  }
  marshalRecord.characters(qname,value,null,false);
  if (xmlRootFragment != null) {
    marshalRecord.endElement(xmlRootFragment,namespaceResolver);
  }
}
Program: 64386
Project: 64386
Buggy source:
protected void setOrAddAttributeValue(UnmarshalRecord unmarshalRecord,Object value,XPathFragment xPathFragment,Object collection){
  if (!xmlAnyCollectionMapping.usesXMLRoot() || xPathFragment.getLocalName() == null || (xmlAnyCollectionMapping.isMixedContent() && unmarshalRecord.getTextWrapperFragment() != null && unmarshalRecord.getTextWrapperFragment().equals(xPathFragment))) {
    unmarshalRecord.addAttributeValue(this,value);
  }
 else {
    XMLRoot xmlRoot=new XMLRoot();
    xmlRoot.setNamespaceURI(xPathFragment.getNamespaceURI());
    xmlRoot.setSchemaType(unmarshalRecord.getTypeQName());
    xmlRoot.setLocalName(xPathFragment.getLocalName());
    xmlRoot.setObject(value);
    unmarshalRecord.addAttributeValue(this,xmlRoot);
  }
}

Fixed version (ground truth):
protected void setOrAddAttributeValue(UnmarshalRecord unmarshalRecord,Object value,XPathFragment xPathFragment,Object collection){
  if (!xmlAnyCollectionMapping.usesXMLRoot() || xPathFragment.getLocalName() == null || (xmlAnyCollectionMapping.isMixedContent() && unmarshalRecord.getTextWrapperFragment() != null && unmarshalRecord.getTextWrapperFragment().equals(xPathFragment))) {
    unmarshalRecord.addAttributeValue(this,value);
  }
 else {
    Root xmlRoot=new XMLRoot();
    xmlRoot.setNamespaceURI(xPathFragment.getNamespaceURI());
    xmlRoot.setSchemaType(unmarshalRecord.getTypeQName());
    xmlRoot.setLocalName(xPathFragment.getLocalName());
    xmlRoot.setObject(value);
    unmarshalRecord.addAttributeValue(this,xmlRoot);
  }
}
Program: 64388
Project: 64388
Buggy source:
private Namespace setupFragment(XMLRoot originalValue,XPathFragment xmlRootFragment,MarshalRecord marshalRecord){
  Namespace generatedNamespace=null;
  String xpath=originalValue.getLocalName();
  if (originalValue.getNamespaceURI() != null) {
    xmlRootFragment.setNamespaceURI((originalValue).getNamespaceURI());
    String prefix=marshalRecord.getNamespaceResolver().resolveNamespaceURI((originalValue).getNamespaceURI());
    if (prefix == null || prefix.length() == 0) {
      prefix=marshalRecord.getNamespaceResolver().generatePrefix();
      generatedNamespace=new Namespace(prefix,xmlRootFragment.getNamespaceURI());
    }
    xpath=prefix + Constants.COLON + xpath;
  }
  xmlRootFragment.setXPath(xpath);
  return generatedNamespace;
}

Fixed version (ground truth):
private Namespace setupFragment(Root originalValue,XPathFragment xmlRootFragment,MarshalRecord marshalRecord){
  Namespace generatedNamespace=null;
  String xpath=originalValue.getLocalName();
  if (originalValue.getNamespaceURI() != null) {
    xmlRootFragment.setNamespaceURI((originalValue).getNamespaceURI());
    String prefix=marshalRecord.getNamespaceResolver().resolveNamespaceURI((originalValue).getNamespaceURI());
    if (prefix == null || prefix.length() == 0) {
      prefix=marshalRecord.getNamespaceResolver().generatePrefix();
      generatedNamespace=new Namespace(prefix,xmlRootFragment.getNamespaceURI());
    }
    xpath=prefix + Constants.COLON + xpath;
  }
  xmlRootFragment.setXPath(xpath);
  return generatedNamespace;
}
Program: 64389
Project: 64389
Buggy source:
private void marshalSimpleValue(XPathFragment xmlRootFragment,MarshalRecord marshalRecord,Object originalValue,Object object,Object value,CoreAbstractSession session,NamespaceResolver namespaceResolver){
  QName qname=null;
  if (xmlRootFragment != null) {
    qname=((XMLRoot)originalValue).getSchemaType();
    Namespace generatedNamespace=setupFragment(((XMLRoot)originalValue),xmlRootFragment,marshalRecord);
    getXPathNode().startElement(marshalRecord,xmlRootFragment,object,session,namespaceResolver,null,null);
    if (generatedNamespace != null) {
      marshalRecord.namespaceDeclaration(generatedNamespace.getPrefix(),generatedNamespace.getNamespaceURI());
    }
    updateNamespaces(qname,marshalRecord,null);
  }
  if (value instanceof org.w3c.dom.Node) {
    marshalRecord.node((org.w3c.dom.Node)value,marshalRecord.getNamespaceResolver());
  }
 else {
    marshalRecord.characters(qname,value,null,false);
  }
  if (xmlRootFragment != null) {
    marshalRecord.endElement(xmlRootFragment,namespaceResolver);
  }
}

Fixed version (ground truth):
private void marshalSimpleValue(XPathFragment xmlRootFragment,MarshalRecord marshalRecord,Object originalValue,Object object,Object value,CoreAbstractSession session,NamespaceResolver namespaceResolver){
  QName qname=null;
  if (xmlRootFragment != null) {
    qname=((Root)originalValue).getSchemaType();
    Namespace generatedNamespace=setupFragment(((Root)originalValue),xmlRootFragment,marshalRecord);
    getXPathNode().startElement(marshalRecord,xmlRootFragment,object,session,namespaceResolver,null,null);
    if (generatedNamespace != null) {
      marshalRecord.namespaceDeclaration(generatedNamespace.getPrefix(),generatedNamespace.getNamespaceURI());
    }
    updateNamespaces(qname,marshalRecord,null);
  }
  if (value instanceof org.w3c.dom.Node) {
    marshalRecord.node((org.w3c.dom.Node)value,marshalRecord.getNamespaceResolver());
  }
 else {
    marshalRecord.characters(qname,value,null,false);
  }
  if (xmlRootFragment != null) {
    marshalRecord.endElement(xmlRootFragment,namespaceResolver);
  }
}
Program: 64390
Project: 64390
Buggy source:
protected void setOrAddAttributeValue(UnmarshalRecord unmarshalRecord,Object value,XPathFragment xPathFragment,Object collection){
  if (!xmlAnyObjectMapping.usesXMLRoot()) {
    unmarshalRecord.setAttributeValue(value,xmlAnyObjectMapping);
  }
 else {
    XMLRoot xmlRoot=new XMLRoot();
    xmlRoot.setNamespaceURI(xPathFragment.getNamespaceURI());
    xmlRoot.setSchemaType(unmarshalRecord.getTypeQName());
    xmlRoot.setLocalName(xPathFragment.getLocalName());
    xmlRoot.setObject(value);
    unmarshalRecord.setAttributeValue(xmlRoot,xmlAnyObjectMapping);
  }
}

Fixed version (ground truth):
protected void setOrAddAttributeValue(UnmarshalRecord unmarshalRecord,Object value,XPathFragment xPathFragment,Object collection){
  if (!xmlAnyObjectMapping.usesXMLRoot()) {
    unmarshalRecord.setAttributeValue(value,xmlAnyObjectMapping);
  }
 else {
    Root xmlRoot=new XMLRoot();
    xmlRoot.setNamespaceURI(xPathFragment.getNamespaceURI());
    xmlRoot.setSchemaType(unmarshalRecord.getTypeQName());
    xmlRoot.setLocalName(xPathFragment.getLocalName());
    xmlRoot.setObject(value);
    unmarshalRecord.setAttributeValue(xmlRoot,xmlAnyObjectMapping);
  }
}
Program: 64392
Project: 64392
Buggy source:
private Namespace setupFragment(XMLRoot originalValue,XPathFragment xmlRootFragment,MarshalRecord marshalRecord){
  Namespace generatedNamespace=null;
  String xpath=originalValue.getLocalName();
  if (originalValue.getNamespaceURI() != null) {
    xmlRootFragment.setNamespaceURI((originalValue).getNamespaceURI());
    String prefix=marshalRecord.getNamespaceResolver().resolveNamespaceURI((originalValue).getNamespaceURI());
    if (prefix == null || prefix.length() == 0) {
      prefix=marshalRecord.getNamespaceResolver().generatePrefix("String_Node_Str");
      generatedNamespace=new Namespace(prefix,xmlRootFragment.getNamespaceURI());
    }
    xpath=prefix + Constants.COLON + xpath;
  }
  xmlRootFragment.setXPath(xpath);
  return generatedNamespace;
}

Fixed version (ground truth):
private Namespace setupFragment(Root originalValue,XPathFragment xmlRootFragment,MarshalRecord marshalRecord){
  Namespace generatedNamespace=null;
  String xpath=originalValue.getLocalName();
  if (originalValue.getNamespaceURI() != null) {
    xmlRootFragment.setNamespaceURI((originalValue).getNamespaceURI());
    String prefix=marshalRecord.getNamespaceResolver().resolveNamespaceURI((originalValue).getNamespaceURI());
    if (prefix == null || prefix.length() == 0) {
      prefix=marshalRecord.getNamespaceResolver().generatePrefix("String_Node_Str");
      generatedNamespace=new Namespace(prefix,xmlRootFragment.getNamespaceURI());
    }
    xpath=prefix + Constants.COLON + xpath;
  }
  xmlRootFragment.setXPath(xpath);
  return generatedNamespace;
}
Program: 64394
Project: 64394
Buggy source:
/** 
 * This test verifies that the SQL generated for a criteria query with joins and an on clause matches  the SQL generated for the equivalent JPQL query, to ensure that excess table joins are not occurring that do not affect the results.  
 */
public void testOnClauseCompareSQL(){
  EntityManager em=createEntityManager();
  JpaEntityManager jpaEM=JpaHelper.getEntityManager((EntityManager)em.getDelegate());
  EJBQueryImpl query=(EJBQueryImpl)jpaEM.createQuery("String_Node_Str" + "String_Node_Str");
  String baseSQL=query.getDatabaseQuery().getTranslatedSQLString(this.getDatabaseSession(),new org.eclipse.persistence.sessions.DatabaseRecord());
  CriteriaBuilder qb=jpaEM.getCriteriaBuilder();
  CriteriaQuery<Employee> cq=qb.createQuery(Employee.class);
  Root<Employee> root=cq.from(Employee.class);
  Join address=root.join("String_Node_Str",JoinType.LEFT).join("String_Node_Str",JoinType.LEFT);
  address.on(qb.equal(address.get("String_Node_Str"),"String_Node_Str"));
  cq.where(qb.isNotNull(address.get("String_Node_Str")));
  EJBQueryImpl testQuery=(EJBQueryImpl)jpaEM.createQuery(cq);
  String testSQL=testQuery.getDatabaseQuery().getTranslatedSQLString(this.getDatabaseSession(),new org.eclipse.persistence.sessions.DatabaseRecord());
  closeEntityManager(em);
  if (!testSQL.equals(baseSQL)) {
    fail("String_Node_Str" + testSQL + "String_Node_Str"+ baseSQL+ "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * This test verifies that the SQL generated for a criteria query with joins and an on clause matches the SQL generated for the equivalent JPQL query, to ensure that excess table joins are not occurring that do not affect the results.
 */
public void testOnClauseCompareSQL(){
  EntityManager em=createEntityManager();
  JpaEntityManager jpaEM=JpaHelper.getEntityManager((EntityManager)em.getDelegate());
  EJBQueryImpl query=(EJBQueryImpl)jpaEM.createQuery("String_Node_Str" + "String_Node_Str");
  String baseSQL=query.getDatabaseQuery().getTranslatedSQLString(this.getDatabaseSession(),new org.eclipse.persistence.sessions.DatabaseRecord());
  CriteriaBuilder qb=jpaEM.getCriteriaBuilder();
  CriteriaQuery<Employee> cq=qb.createQuery(Employee.class);
  Root<Employee> root=cq.from(Employee.class);
  Join address=root.join("String_Node_Str",JoinType.LEFT).join("String_Node_Str",JoinType.LEFT);
  address.on(qb.equal(address.get("String_Node_Str"),"String_Node_Str"));
  cq.where(qb.isNotNull(address.get("String_Node_Str")));
  EJBQueryImpl testQuery=(EJBQueryImpl)jpaEM.createQuery(cq);
  String testSQL=testQuery.getDatabaseQuery().getTranslatedSQLString(this.getDatabaseSession(),new org.eclipse.persistence.sessions.DatabaseRecord());
  closeEntityManager(em);
  if (!testSQL.equals(baseSQL)) {
    fail("String_Node_Str" + testSQL + "String_Node_Str"+ baseSQL+ "String_Node_Str");
  }
}
Program: 64395
Project: 64395
Buggy source:
public void testComplexConditionCaseInCriteriaUpdate(){
  if ((JUnitTestCase.getServerSession()).getPlatform().isSymfoware()) {
    getServerSession().logMessage("String_Node_Str" + "String_Node_Str");
    return;
  }
  EntityManager em=createEntityManager();
  List<Employee> results=null;
  CriteriaBuilder qb=em.getCriteriaBuilder();
  CriteriaUpdate<Employee> cq=qb.createCriteriaUpdate(Employee.class);
  Root<Employee> root=cq.from(Employee.class);
  Case caseExp=qb.selectCase();
  caseExp.when(qb.equal(root.get("String_Node_Str"),"String_Node_Str"),"String_Node_Str");
  caseExp.when(qb.equal(root.get("String_Node_Str"),"String_Node_Str"),"String_Node_Str");
  caseExp.otherwise("String_Node_Str");
  cq.set(root.get("String_Node_Str"),caseExp);
  beginTransaction(em);
  try {
    clearCache();
    em.createQuery(cq).executeUpdate();
    String verificationString="String_Node_Str";
    results=em.createQuery(verificationString).getResultList();
  }
  finally {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    em.close();
  }
  assertTrue("String_Node_Str",results.size() == 2);
  for (  Employee e : results) {
    assertTrue("String_Node_Str" + e.getFirstName(),e.getLastName().equals("String_Node_Str"));
  }
}

Fixed version (ground truth):
public void testComplexConditionCaseInCriteriaUpdate(){
  if ((JUnitTestCase.getServerSession()).getPlatform().isSymfoware()) {
    getServerSession().logMessage("String_Node_Str" + "String_Node_Str");
    return;
  }
  EntityManager em=createEntityManager();
  List<Employee> results=null;
  CriteriaBuilder qb=em.getCriteriaBuilder();
  CriteriaUpdate<Employee> cq=qb.createCriteriaUpdate(Employee.class);
  Root<Employee> root=cq.from(Employee.class);
  Case caseExp=qb.selectCase();
  caseExp.when(qb.equal(root.get("String_Node_Str"),"String_Node_Str"),"String_Node_Str");
  caseExp.when(qb.equal(root.get("String_Node_Str"),"String_Node_Str"),"String_Node_Str");
  caseExp.otherwise("String_Node_Str");
  cq.set(root.<String>get("String_Node_Str"),caseExp);
  beginTransaction(em);
  try {
    clearCache();
    em.createQuery(cq).executeUpdate();
    String verificationString="String_Node_Str";
    results=em.createQuery(verificationString).getResultList();
  }
  finally {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    em.close();
  }
  assertTrue("String_Node_Str",results.size() == 2);
  for (  Employee e : results) {
    assertTrue("String_Node_Str" + e.getFirstName(),e.getLastName().equals("String_Node_Str"));
  }
}
Program: 64396
Project: 64396
Buggy source:
public XMLRecord buildRow(XMLRecord record,Object object,CoreAbstractSession session,MARSHALLER marshaller,XPathFragment rootFragment,WriteType writeType);

Fixed version (ground truth):
public XMLRecord buildRow(XMLRecord record,Object object,CoreAbstractSession session,MARSHALLER marshaller,XPathFragment rootFragment);
Program: 64397
Project: 64397
Buggy source:
public void addTransformationMapping(AbstractTransformationMapping transformationMapping){
  if (null == this.transformationMappings) {
    this.transformationMappings=new ArrayList();
  }
  transformationMappings.add(transformationMapping);
}

Fixed version (ground truth):
public void addTransformationMapping(TransformationMapping transformationMapping){
  if (null == this.transformationMappings) {
    this.transformationMappings=new ArrayList();
  }
  transformationMappings.add(transformationMapping);
}
Program: 64401
Project: 64401
Buggy source:
public void setDirectMapping(AbstractDirectMapping directMapping){
  this.directMapping=directMapping;
}

Fixed version (ground truth):
public void setDirectMapping(DirectMapping directMapping){
  this.directMapping=directMapping;
}