nus-yam/ex-repair huggingface dataset:
Program: 68407
Project: 68407
Buggy source:
public void setup(){
  getDatabaseSession().getLogin().cacheAllStatements();
  getDatabaseSession().getIdentityMapAccessor().initializeAllIdentityMaps();
  UnitOfWork uow=getDatabaseSession().acquireUnitOfWork();
  employeesCreated=new ArrayList(10);
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(190),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(191),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(192),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(193),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(194),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(195),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(196),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(197),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(198),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(199),"String_Node_Str"));
  uow.registerAllObjects(employeesCreated);
  uow.commit();
}

Fixed version (ground truth):
public void setup(){
  TYPE_SCROLL_INSENSITIVE_isSupported=true;
  CONCUR_UPDATABLE_isSupported=true;
  if (getSession().getPlatform().isSQLServer()) {
    TYPE_SCROLL_INSENSITIVE_isSupported=false;
    CONCUR_UPDATABLE_isSupported=false;
  }
  getDatabaseSession().getLogin().cacheAllStatements();
  getDatabaseSession().getIdentityMapAccessor().initializeAllIdentityMaps();
  UnitOfWork uow=getDatabaseSession().acquireUnitOfWork();
  employeesCreated=new ArrayList(10);
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(190),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(191),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(192),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(193),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(194),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(195),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(196),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(197),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(198),"String_Node_Str"));
  employeesCreated.add(new QueryOptionEmployee(new BigDecimal(199),"String_Node_Str"));
  uow.registerAllObjects(employeesCreated);
  uow.commit();
}
Program: 68409
Project: 68409
Buggy source:
protected void reloadInternal(XSObject schemaObject){
  super.reloadInternal(schemaObject);
  if (schemaObject != null) {
    this.minOccurs=((XSParticleDecl)schemaObject).getMinOccurs();
    this.maxOccurs=((XSParticleDecl)schemaObject).getMaxOccurs();
  }
 else {
    this.minOccurs=0;
    this.maxOccurs=0;
  }
}

Fixed version (ground truth):
protected void reloadInternal(XSObject schemaObject){
  super.reloadInternal(schemaObject);
  if (schemaObject != null) {
    this.minOccurs=((XSParticleDecl)schemaObject).getMinOccurs();
    this.maxOccurs=((XSParticleDecl)schemaObject).getMaxOccurs();
    if (((XSParticleDecl)schemaObject).getMaxOccursUnbounded()) {
      this.maxOccurs=MWXmlSchema.INFINITY;
    }
  }
 else {
    this.minOccurs=0;
    this.maxOccurs=0;
  }
}
Program: 68410
Project: 68410
Buggy source:
protected void reloadInternal(XSObject xsObject){
  XSElementDecl elemenDecl=null;
  if (xsObject instanceof XSParticleDecl) {
    elemenDecl=(XSElementDecl)((XSParticleDecl)xsObject).getTerm();
    super.reloadInternal(elemenDecl);
  }
 else {
    elemenDecl=(XSElementDecl)xsObject;
    super.reloadInternal(xsObject);
  }
  this.reloadType(elemenDecl);
  this.reloadNillable(elemenDecl);
  if (elemenDecl.getConstraintType() != XSConstants.VC_NONE) {
    if (elemenDecl.getConstraintType() == XSConstants.VC_DEFAULT) {
      this.defaultValue=elemenDecl.getConstraintValue();
    }
 else     if (elemenDecl.getConstraintType() == XSConstants.VC_FIXED) {
      this.fixedValue=elemenDecl.getConstraintValue();
    }
  }
  this.abstractFlag=elemenDecl.getAbstract();
  if (xsObject instanceof XSParticleDecl) {
    this.minOccurs=((XSParticleDecl)xsObject).getMinOccurs();
    this.maxOccurs=((XSParticleDecl)xsObject).getMaxOccurs();
  }
  this.reloadSubstitutionGroup(elemenDecl);
  this.reloadIdentityConstraints(elemenDecl);
}

Fixed version (ground truth):
protected void reloadInternal(XSObject xsObject){
  XSElementDecl elemenDecl=null;
  if (xsObject instanceof XSParticleDecl) {
    elemenDecl=(XSElementDecl)((XSParticleDecl)xsObject).getTerm();
    super.reloadInternal(elemenDecl);
  }
 else {
    elemenDecl=(XSElementDecl)xsObject;
    super.reloadInternal(xsObject);
  }
  this.reloadType(elemenDecl);
  this.reloadNillable(elemenDecl);
  if (elemenDecl.getConstraintType() != XSConstants.VC_NONE) {
    if (elemenDecl.getConstraintType() == XSConstants.VC_DEFAULT) {
      this.defaultValue=elemenDecl.getConstraintValue();
    }
 else     if (elemenDecl.getConstraintType() == XSConstants.VC_FIXED) {
      this.fixedValue=elemenDecl.getConstraintValue();
    }
  }
  this.abstractFlag=elemenDecl.getAbstract();
  if (xsObject instanceof XSParticleDecl) {
    this.minOccurs=((XSParticleDecl)xsObject).getMinOccurs();
    this.maxOccurs=((XSParticleDecl)xsObject).getMaxOccurs();
    if (((XSParticleDecl)xsObject).getMaxOccursUnbounded()) {
      this.maxOccurs=MWXmlSchema.INFINITY;
    }
  }
  this.reloadSubstitutionGroup(elemenDecl);
  this.reloadIdentityConstraints(elemenDecl);
}
Program: 68411
Project: 68411
Buggy source:
@Override protected void reloadInternal(XSObject schemaObject){
  super.reloadInternal(schemaObject);
  if (schemaObject instanceof XSParticleDecl) {
    this.minOccurs=((XSParticleDecl)schemaObject).getMinOccurs();
    this.maxOccurs=((XSParticleDecl)schemaObject).getMaxOccurs();
  }
}

Fixed version (ground truth):
@Override protected void reloadInternal(XSObject schemaObject){
  super.reloadInternal(schemaObject);
  if (schemaObject instanceof XSParticleDecl) {
    this.minOccurs=((XSParticleDecl)schemaObject).getMinOccurs();
    this.maxOccurs=((XSParticleDecl)schemaObject).getMaxOccurs();
    if (((XSParticleDecl)schemaObject).getMaxOccursUnbounded()) {
      this.maxOccurs=MWXmlSchema.INFINITY;
    }
  }
}
Program: 68412
Project: 68412
Buggy source:
protected String getValueFromComponent(){
  int maxOccurs=((MWParticle)this.component).getMaxOccurs();
  return (maxOccurs == -1) ? "String_Node_Str" : String.valueOf(maxOccurs);
}

Fixed version (ground truth):
protected String getValueFromComponent(){
  int maxOccurs=((MWParticle)this.component).getMaxOccurs();
  return (maxOccurs == MWXmlSchema.INFINITY) ? "String_Node_Str" : String.valueOf(maxOccurs);
}
Program: 68413
Project: 68413
Buggy source:
SchemaComponentDetail buildMaxOccursDetail(){
  return new SchemaComponentDetail(this.getComponent()){
    protected String getName(){
      return "String_Node_Str";
    }
    protected String getValueFromComponent(){
      int maxOccurs=((MWParticle)this.component).getMaxOccurs();
      return (maxOccurs == -1) ? "String_Node_Str" : String.valueOf(maxOccurs);
    }
  }
;
}

Fixed version (ground truth):
SchemaComponentDetail buildMaxOccursDetail(){
  return new SchemaComponentDetail(this.getComponent()){
    protected String getName(){
      return "String_Node_Str";
    }
    protected String getValueFromComponent(){
      int maxOccurs=((MWParticle)this.component).getMaxOccurs();
      return (maxOccurs == MWXmlSchema.INFINITY) ? "String_Node_Str" : String.valueOf(maxOccurs);
    }
  }
;
}
Program: 68414
Project: 68414
Buggy source:
public void reset(){
  getAbstractSession().rollbackTransaction();
  getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
}

Fixed version (ground truth):
public void reset(){
  if (getAbstractSession().isInTransaction()) {
    getAbstractSession().rollbackTransaction();
  }
  getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
  if (listener != null) {
    getAbstractSession().getParent().getEventManager().removeListener(listener);
    listener=null;
  }
}
Program: 68415
Project: 68415
Buggy source:
public void setup(){
  getAbstractSession().beginTransaction();
}

Fixed version (ground truth):
public void setup(){
  if (getSession().getPlatform().isSybase() && getSession().isClientSession()) {
    if (SybaseTransactionIsolationListener.isDatabaseVersionSupported((ServerSession)getAbstractSession().getParent())) {
      listener=new SybaseTransactionIsolationListener();
      getAbstractSession().getParent().getEventManager().addListener(listener);
    }
 else {
      throw new TestWarningException("String_Node_Str" + SybaseTransactionIsolationListener.requiredVersion + "String_Node_Str");
    }
  }
  getAbstractSession().beginTransaction();
}
Program: 68416
Project: 68416
Buggy source:
protected void setup(){
  super.setup();
  this.firstUnitOfWork=getSession().acquireUnitOfWork();
  this.firstUnitOfWorkWorkingCopy=this.firstUnitOfWork.registerObject(this.objectToBeWritten);
  changeFirstUnitOfWorkWorkingCopy();
  if (!compareObjects(this.originalObject,this.objectToBeWritten)) {
    throw new TestErrorException("String_Node_Str");
  }
  this.secondUnitOfWork=getSession().acquireUnitOfWork();
  this.secondUnitOfWorkWorkingCopy=this.secondUnitOfWork.registerObject(this.objectToBeWritten);
  changeSecondUnitOfWorkWorkingCopy();
  if (!getAbstractSession().compareObjectsDontMatch(this.firstUnitOfWorkWorkingCopy,this.secondUnitOfWorkWorkingCopy)) {
    throw new TestErrorException("String_Node_Str");
  }
}

Fixed version (ground truth):
protected void setup(){
  if (getSession().getPlatform().isSybase() && getSession().isClientSession()) {
    if (SybaseTransactionIsolationListener.isDatabaseVersionSupported((ServerSession)getAbstractSession().getParent())) {
      listener=new SybaseTransactionIsolationListener();
      getAbstractSession().getParent().getEventManager().addListener(listener);
    }
 else {
      throw new TestWarningException("String_Node_Str" + SybaseTransactionIsolationListener.requiredVersion + "String_Node_Str");
    }
  }
  super.setup();
  this.firstUnitOfWork=getSession().acquireUnitOfWork();
  this.firstUnitOfWorkWorkingCopy=this.firstUnitOfWork.registerObject(this.objectToBeWritten);
  changeFirstUnitOfWorkWorkingCopy();
  if (!compareObjects(this.originalObject,this.objectToBeWritten)) {
    throw new TestErrorException("String_Node_Str");
  }
  this.secondUnitOfWork=getSession().acquireUnitOfWork();
  this.secondUnitOfWorkWorkingCopy=this.secondUnitOfWork.registerObject(this.objectToBeWritten);
  changeSecondUnitOfWorkWorkingCopy();
  if (!getAbstractSession().compareObjectsDontMatch(this.firstUnitOfWorkWorkingCopy,this.secondUnitOfWorkWorkingCopy)) {
    throw new TestErrorException("String_Node_Str");
  }
}
Program: 68417
Project: 68417
Buggy source:
public void setup(){
  super.setup();
  existenceCheck=getSession().getDescriptor(Employee.class).getQueryManager().getExistenceCheck();
  if (getSession() instanceof org.eclipse.persistence.sessions.remote.RemoteSession) {
    throw new TestWarningException("String_Node_Str");
  }
}

Fixed version (ground truth):
public void setup(){
  if (getSession().getPlatform().isSybase() && getSession().isClientSession()) {
    if (SybaseTransactionIsolationListener.isDatabaseVersionSupported((ServerSession)getAbstractSession().getParent())) {
      listener=new SybaseTransactionIsolationListener();
      getAbstractSession().getParent().getEventManager().addListener(listener);
    }
 else {
      existenceCheck=getSession().getDescriptor(Employee.class).getQueryManager().getExistenceCheck();
      throw new TestWarningException("String_Node_Str" + SybaseTransactionIsolationListener.requiredVersion + "String_Node_Str");
    }
  }
  super.setup();
  existenceCheck=getSession().getDescriptor(Employee.class).getQueryManager().getExistenceCheck();
  if (getSession() instanceof org.eclipse.persistence.sessions.remote.RemoteSession) {
    throw new TestWarningException("String_Node_Str");
  }
}
Program: 68418
Project: 68418
Buggy source:
public void reset(){
  super.reset();
  getSession().getDescriptor(Employee.class).setExistenceChecking(this.existenceCheck);
}

Fixed version (ground truth):
public void reset(){
  super.reset();
  getSession().getDescriptor(Employee.class).setExistenceChecking(this.existenceCheck);
  if (listener != null) {
    getAbstractSession().getParent().getEventManager().removeListener(listener);
    listener=null;
  }
}
Program: 68419
Project: 68419
Buggy source:
public void setup(){
  getAbstractSession().beginTransaction();
  uow1=getSession().acquireUnitOfWork();
  uow2=getSession().acquireUnitOfWork();
  Expression exp=new ExpressionBuilder().get("String_Node_Str").equal("String_Node_Str");
  dbEmployee1=(Employee)uow1.readObject(Employee.class,exp);
  dbEmployee2=(Employee)uow2.readObject(Employee.class,exp);
  dbEmployee1.getAddress().setCity("String_Node_Str");
}

Fixed version (ground truth):
public void setup(){
  if (getSession().getPlatform().isSybase() && getSession().isClientSession()) {
    if (SybaseTransactionIsolationListener.isDatabaseVersionSupported((ServerSession)getAbstractSession().getParent())) {
      listener=new SybaseTransactionIsolationListener();
      getAbstractSession().getParent().getEventManager().addListener(listener);
    }
 else {
      throw new TestWarningException("String_Node_Str" + SybaseTransactionIsolationListener.requiredVersion + "String_Node_Str");
    }
  }
  getAbstractSession().beginTransaction();
  uow1=getSession().acquireUnitOfWork();
  uow2=getSession().acquireUnitOfWork();
  Expression exp=new ExpressionBuilder().get("String_Node_Str").equal("String_Node_Str");
  dbEmployee1=(Employee)uow1.readObject(Employee.class,exp);
  dbEmployee2=(Employee)uow2.readObject(Employee.class,exp);
  dbEmployee1.getAddress().setCity("String_Node_Str");
}
Program: 68420
Project: 68420
Buggy source:
public void reset(){
  getAbstractSession().rollbackTransaction();
  getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
}

Fixed version (ground truth):
public void reset(){
  if (getAbstractSession().isInTransaction()) {
    getAbstractSession().rollbackTransaction();
  }
  getSession().getIdentityMapAccessor().initializeAllIdentityMaps();
  if (listener != null) {
    getAbstractSession().getParent().getEventManager().removeListener(listener);
    listener=null;
  }
}
Program: 68421
Project: 68421
Buggy source:
public MWElementDeclaration nestedElement(String namespaceUrl,String elementName){
  for (Iterator stream=this.particles(); stream.hasNext(); ) {
    MWParticle particle=(MWParticle)stream.next();
    MWElementDeclaration element;
    if (particle instanceof MWElementDeclaration) {
      element=(MWElementDeclaration)particle;
      if (StringTools.stringsAreEqual(namespaceUrl,element.getNamespaceUrl()) && elementName.equals(element.getName())) {
        return element;
      }
    }
 else {
      element=particle.nestedElement(namespaceUrl,elementName);
      if (element != null) {
        return element;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public MWElementDeclaration nestedElement(String namespaceUrl,String elementName){
  for (Iterator stream=this.particles(); stream.hasNext(); ) {
    MWParticle particle=(MWParticle)stream.next();
    MWElementDeclaration element;
    if (particle instanceof MWElementDeclaration) {
      element=(MWElementDeclaration)particle;
      if (elementName.equals(element.getName())) {
        return element;
      }
    }
 else {
      element=particle.nestedElement(namespaceUrl,elementName);
      if (element != null) {
        return element;
      }
    }
  }
  return null;
}
Program: 68422
Project: 68422
Buggy source:
public NamespaceResolver runtimeNamespaceResolver(){
  NamespaceResolver namespaceResolver=new NamespaceResolver();
  for (Iterator stream=this.namespaces(); stream.hasNext(); ) {
    MWNamespace namespace=(MWNamespace)stream.next();
    if (namespace.isDeclared() && !"String_Node_Str".equals(namespace.getNamespacePrefix())) {
      namespaceResolver.put(namespace.getNamespacePrefix(),namespace.getNamespaceUrl());
    }
  }
  return namespaceResolver;
}

Fixed version (ground truth):
public NamespaceResolver runtimeNamespaceResolver(){
  NamespaceResolver namespaceResolver=new NamespaceResolver();
  for (Iterator stream=this.namespaces(); stream.hasNext(); ) {
    MWNamespace namespace=(MWNamespace)stream.next();
    if (namespace.isDeclared() && !"String_Node_Str".equals(namespace.getNamespacePrefix())) {
      namespaceResolver.put(namespace.getNamespacePrefix(),namespace.getNamespaceUrl());
    }
  }
  if (this.shouldUseDefaultNamespace() && !"String_Node_Str".equals(this.getDefaultNamespaceUrl())) {
    namespaceResolver.setDefaultNamespaceURI(this.getDefaultNamespaceUrl());
  }
  return namespaceResolver;
}
Program: 68423
Project: 68423
Buggy source:
private void checkRequiredNamespacePrefix(List currentProblems){
  for (Iterator stream=this.namespaces(); stream.hasNext(); ) {
    MWNamespace namespace=(MWNamespace)stream.next();
    if (!"String_Node_Str".equals(namespace.getNamespaceUrl()) && "String_Node_Str".equals(namespace.getNamespacePrefix())) {
      currentProblems.add(this.buildProblem(ProblemConstants.SCHEMA_NAMESPACE_PREFIX_NOT_SPECIFIED,namespace.getNamespaceUrlForDisplay()));
    }
  }
}

Fixed version (ground truth):
private void checkRequiredNamespacePrefix(List currentProblems){
  for (Iterator stream=this.namespaces(); stream.hasNext(); ) {
    MWNamespace namespace=(MWNamespace)stream.next();
    if (!"String_Node_Str".equals(namespace.getNamespaceUrl()) && "String_Node_Str".equals(namespace.getNamespacePrefix()) && !namespace.getNamespaceUrl().equals(this.defaultNamespaceUrl)) {
      currentProblems.add(this.buildProblem(ProblemConstants.SCHEMA_NAMESPACE_PREFIX_NOT_SPECIFIED,namespace.getNamespaceUrlForDisplay()));
    }
  }
}
Program: 68424
Project: 68424
Buggy source:
public void setTargetNamespaceUrl(String newTargetNamespaceUrl){
  this.targetNamespaceUrl=newTargetNamespaceUrl;
}

Fixed version (ground truth):
public void setTargetNamespaceUrl(String newTargetNamespaceUrl){
  this.targetNamespaceUrl=newTargetNamespaceUrl;
  if ("String_Node_Str".equals(this.defaultNamespaceUrl)) {
    this.defaultNamespaceUrl=this.targetNamespaceUrl;
  }
}
Program: 68425
Project: 68425
Buggy source:
private String namespacePrefix(){
  if (this.namespace != null && !"String_Node_Str".equals(this.namespace.getNamespacePrefix())) {
    return this.namespace.getNamespacePrefix() + "String_Node_Str";
  }
 else {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
private String namespacePrefix(){
  if (this.namespace != null && !"String_Node_Str".equals(this.namespace.getNamespacePrefix()) && !this.namespace.getSchema().getDefaultNamespaceUrl().equals(this.namespace.getNamespaceUrl())) {
    return this.namespace.getNamespacePrefix() + "String_Node_Str";
  }
 else {
    return "String_Node_Str";
  }
}
Program: 68427
Project: 68427
Buggy source:
protected Object getValueFromSubject(){
  ResourceSpecification schemaSource=((MWXmlSchema)this.subject).getSchemaSource();
  if (schemaSource == null) {
    return null;
  }
  String key=schemaSource.getSourceKey() + "String_Node_Str";
  return SchemaDocumentInfoPanel.this.resourceRepository().getString(key,schemaSource.getLocation());
}

Fixed version (ground truth):
protected Object getValueFromSubject(){
  return ((MWXmlSchema)this.subject).getDefaultNamespaceUrl();
}
Program: 68428
Project: 68428
Buggy source:
/** 
 * Given the source schema and namespace and schemaLocation values from an import or include return the referenced Schema.
 * @param sourceXSD The Source object of the source schema
 * @param namespace The namespace portion of the import/include
 * @param schemaLocation The schemaLocation portion of the import/include
 * @return Source for the referenced Schema or null if processing the referencedschema should be skipped
 */
public Source resolveSchema(Source sourceXSD,String namespace,String schemaLocation){
  try {
    URL schemaUrl=null;
    if (getBaseSchemaLocation() != null) {
      schemaUrl=new URI(getBaseSchemaLocation()).resolve(schemaLocation).toURL();
    }
 else {
      schemaUrl=new URL(schemaLocation);
    }
    return new StreamSource(schemaUrl.toExternalForm());
  }
 catch (  Exception e) {
    AbstractSessionLog.getLog().log(AbstractSessionLog.WARNING,"String_Node_Str",new Object[]{e.getClass().getName(),namespace,schemaLocation});
    AbstractSessionLog.getLog().logThrowable(AbstractSessionLog.FINEST,e);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Given the source schema and namespace and schemaLocation values from an import or include return the referenced Schema.
 * @param sourceXSD The Source object of the source schema
 * @param namespace The namespace portion of the import/include
 * @param schemaLocation The schemaLocation portion of the import/include
 * @return Source for the referenced Schema or null if processing the referencedschema should be skipped
 */
public Source resolveSchema(Source sourceXSD,String namespace,String schemaLocation){
  try {
    URL schemaUrl=null;
    String baseLoc=getBaseSchemaLocation();
    if (baseLoc == null) {
      schemaUrl=new URI(schemaLocation).toURL();
    }
 else {
      URI schemaUri=new URI(schemaLocation);
      if (schemaUri.isAbsolute()) {
        schemaUrl=schemaUri.toURL();
      }
 else {
        URI baseUri=new URI(baseLoc);
        if (baseUri.isOpaque() && baseUri.getScheme().equals("String_Node_Str")) {
          schemaUrl=new URI(baseLoc.substring(0,baseLoc.lastIndexOf("String_Node_Str") + 1) + schemaLocation).toURL();
        }
 else {
          schemaUrl=new URI(baseLoc).resolve(schemaUri).toURL();
        }
      }
    }
    return new StreamSource(schemaUrl.toExternalForm());
  }
 catch (  Exception e) {
    AbstractSessionLog.getLog().log(AbstractSessionLog.WARNING,"String_Node_Str",new Object[]{e.getClass().getName(),namespace,schemaLocation});
    AbstractSessionLog.getLog().logThrowable(AbstractSessionLog.FINEST,e);
  }
  return null;
}
Program: 68430
Project: 68430
Buggy source:
public void endElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord,Object collection){
  Object objectValue=unmarshalRecord.getChildRecord().getCurrentObject();
  if (xmlCompositeCollectionMapping.hasConverter()) {
    Converter converter=xmlCompositeCollectionMapping.getConverter();
    if (converter instanceof XMLConverter) {
      objectValue=((XMLConverter)converter).convertDataValueToObjectValue(objectValue,unmarshalRecord.getSession(),unmarshalRecord.getUnmarshaller());
    }
 else {
      objectValue=converter.convertObjectValueToDataValue(objectValue,unmarshalRecord.getSession());
    }
  }
  unmarshalRecord.addAttributeValue(this,objectValue,collection);
  unmarshalRecord.setChildRecord(null);
}

Fixed version (ground truth):
public void endElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord,Object collection){
  if (null == unmarshalRecord.getChildRecord()) {
    return;
  }
  Object objectValue=unmarshalRecord.getChildRecord().getCurrentObject();
  if (xmlCompositeCollectionMapping.hasConverter()) {
    Converter converter=xmlCompositeCollectionMapping.getConverter();
    if (converter instanceof XMLConverter) {
      objectValue=((XMLConverter)converter).convertDataValueToObjectValue(objectValue,unmarshalRecord.getSession(),unmarshalRecord.getUnmarshaller());
    }
 else {
      objectValue=converter.convertObjectValueToDataValue(objectValue,unmarshalRecord.getSession());
    }
  }
  unmarshalRecord.addAttributeValue(this,objectValue,collection);
  unmarshalRecord.setChildRecord(null);
}
Program: 68431
Project: 68431
Buggy source:
public boolean startElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord,Attributes atts){
  try {
    XMLDescriptor xmlDescriptor=(XMLDescriptor)xmlCompositeCollectionMapping.getReferenceDescriptor();
    if (xmlDescriptor == null) {
      xmlDescriptor=findReferenceDescriptor(unmarshalRecord,atts,xmlCompositeCollectionMapping);
    }
    XMLField xmlFld=(XMLField)this.xmlCompositeCollectionMapping.getField();
    if (xmlFld.hasLastXPathFragment()) {
      unmarshalRecord.setLeafElementType(xmlFld.getLastXPathFragment().getLeafElementType());
    }
    processChild(xPathFragment,unmarshalRecord,atts,xmlDescriptor);
  }
 catch (  SAXException e) {
    throw XMLMarshalException.unmarshalException(e);
  }
  return true;
}

Fixed version (ground truth):
public boolean startElement(XPathFragment xPathFragment,UnmarshalRecord unmarshalRecord,Attributes atts){
  try {
    XMLDescriptor xmlDescriptor=(XMLDescriptor)xmlCompositeCollectionMapping.getReferenceDescriptor();
    if (xmlDescriptor == null) {
      xmlDescriptor=findReferenceDescriptor(unmarshalRecord,atts,xmlCompositeCollectionMapping);
    }
    if (xmlCompositeCollectionMapping.getNullPolicy().valueIsNull(atts)) {
      getContainerPolicy().addInto(null,unmarshalRecord.getContainerInstance(this),unmarshalRecord.getSession());
    }
 else {
      XMLField xmlFld=(XMLField)this.xmlCompositeCollectionMapping.getField();
      if (xmlFld.hasLastXPathFragment()) {
        unmarshalRecord.setLeafElementType(xmlFld.getLastXPathFragment().getLeafElementType());
      }
      processChild(xPathFragment,unmarshalRecord,atts,xmlDescriptor);
    }
  }
 catch (  SAXException e) {
    throw XMLMarshalException.unmarshalException(e);
  }
  return true;
}
Program: 68432
Project: 68432
Buggy source:
public int getIndex(String uri,String localName){
  Attr item;
  for (int i=0; i < attrs.size(); i++) {
    item=attrs.get(i);
    if (item.getNamespaceURI().equals(uri) && item.getLocalName().equals(localName)) {
      return i;
    }
  }
  return -1;
}

Fixed version (ground truth):
public int getIndex(String uri,String localName){
  Attr item;
  for (int i=0; i < attrs.size(); i++) {
    item=attrs.get(i);
    try {
      if (item.getNamespaceURI().equals(uri) && item.getLocalName().equals(localName)) {
        return i;
      }
    }
 catch (    Exception x) {
    }
  }
  return -1;
}
Program: 68433
Project: 68433
Buggy source:
public XMLCompositeCollectionMapping(){
  super();
}

Fixed version (ground truth):
public XMLCompositeCollectionMapping(){
  super();
  nullPolicy=new NullPolicy();
}
Program: 68434
Project: 68434
Buggy source:
TargetDatabaseProp(){
  super(PersistenceUnitProperties.TARGET_DATABASE,TargetDatabase.DEFAULT);
  this.shouldReturnOriginalValueIfValueToApplyNotFound=true;
  String pcg="String_Node_Str";
  valueArray=new Object[][]{{TargetDatabase.Auto,pcg + "String_Node_Str"},{TargetDatabase.Oracle,pcg + "String_Node_Str"},{TargetDatabase.Oracle8,pcg + "String_Node_Str"},{TargetDatabase.Oracle9,pcg + "String_Node_Str"},{TargetDatabase.Oracle10,pcg + "String_Node_Str"},{TargetDatabase.Oracle11,pcg + "String_Node_Str"},{TargetDatabase.Attunity,pcg + "String_Node_Str"},{TargetDatabase.Cloudscape,pcg + "String_Node_Str"},{TargetDatabase.Database,pcg + "String_Node_Str"},{TargetDatabase.DB2Mainframe,pcg + "String_Node_Str"},{TargetDatabase.DB2,pcg + "String_Node_Str"},{TargetDatabase.DBase,pcg + "String_Node_Str"},{TargetDatabase.Derby,pcg + "String_Node_Str"},{TargetDatabase.HSQL,pcg + "String_Node_Str"},{TargetDatabase.Informix,pcg + "String_Node_Str"},{TargetDatabase.JavaDB,pcg + "String_Node_Str"},{TargetDatabase.MySQL,pcg + "String_Node_Str"},{TargetDatabase.MySQL4,pcg + "String_Node_Str"},{TargetDatabase.PointBase,pcg + "String_Node_Str"},{TargetDatabase.PostgreSQL,pcg + "String_Node_Str"},{TargetDatabase.SQLAnyWhere,pcg + "String_Node_Str"},{TargetDatabase.SQLServer,pcg + "String_Node_Str"},{TargetDatabase.Sybase,pcg + "String_Node_Str"},{TargetDatabase.TimesTen,pcg + "String_Node_Str"}};
}

Fixed version (ground truth):
TargetDatabaseProp(){
  super(PersistenceUnitProperties.TARGET_DATABASE,TargetDatabase.DEFAULT);
  this.shouldReturnOriginalValueIfValueToApplyNotFound=true;
  String pcg="String_Node_Str";
  valueArray=new Object[][]{{TargetDatabase.Auto,pcg + "String_Node_Str"},{TargetDatabase.Oracle,pcg + "String_Node_Str"},{TargetDatabase.Oracle8,pcg + "String_Node_Str"},{TargetDatabase.Oracle9,pcg + "String_Node_Str"},{TargetDatabase.Oracle10,pcg + "String_Node_Str"},{TargetDatabase.Oracle11,pcg + "String_Node_Str"},{TargetDatabase.Attunity,pcg + "String_Node_Str"},{TargetDatabase.Cloudscape,pcg + "String_Node_Str"},{TargetDatabase.Database,pcg + "String_Node_Str"},{TargetDatabase.DB2Mainframe,pcg + "String_Node_Str"},{TargetDatabase.DB2,pcg + "String_Node_Str"},{TargetDatabase.DBase,pcg + "String_Node_Str"},{TargetDatabase.Derby,pcg + "String_Node_Str"},{TargetDatabase.HSQL,pcg + "String_Node_Str"},{TargetDatabase.Informix,pcg + "String_Node_Str"},{TargetDatabase.JavaDB,pcg + "String_Node_Str"},{TargetDatabase.MySQL,pcg + "String_Node_Str"},{TargetDatabase.MySQL4,pcg + "String_Node_Str"},{TargetDatabase.PointBase,pcg + "String_Node_Str"},{TargetDatabase.PostgreSQL,pcg + "String_Node_Str"},{TargetDatabase.SQLAnywhere,pcg + "String_Node_Str"},{TargetDatabase.SQLServer,pcg + "String_Node_Str"},{TargetDatabase.Sybase,pcg + "String_Node_Str"},{TargetDatabase.TimesTen,pcg + "String_Node_Str"}};
}
Program: 68435
Project: 68435
Buggy source:
public Object convertDataValueToObjectValue(Object fieldValue,Session session){
  Object result=platformList.get(fieldValue);
  if (result != null) {
    fieldValue=result;
  }
  Object attributeValue=null;
  if (fieldValue != null) {
    Class attributeClass=(Class)((AbstractSession)session).getDatasourcePlatform().convertObject(fieldValue,ClassConstants.CLASS);
    try {
      if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
        try {
          attributeValue=AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(attributeClass));
        }
 catch (        PrivilegedActionException exception) {
          throw ConversionException.couldNotBeConverted(fieldValue,attributeClass,exception.getException());
        }
      }
 else {
        attributeValue=PrivilegedAccessHelper.newInstanceFromClass(attributeClass);
      }
    }
 catch (    Exception exception) {
      throw ConversionException.couldNotBeConverted(fieldValue,attributeClass,exception);
    }
  }
  return attributeValue;
}

Fixed version (ground truth):
public Object convertDataValueToObjectValue(Object fieldValue,Session session){
  if (fieldValue == null) {
    return null;
  }
  if (((String)fieldValue).startsWith(oldPrefix)) {
    fieldValue=((String)fieldValue).replaceFirst(oldPrefix,newPrefix);
  }
  Object result=platformList.get(fieldValue);
  if (result != null) {
    fieldValue=result;
  }
  Object attributeValue;
  Class attributeClass=(Class)((AbstractSession)session).getDatasourcePlatform().convertObject(fieldValue,ClassConstants.CLASS);
  try {
    if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()) {
      try {
        attributeValue=AccessController.doPrivileged(new PrivilegedNewInstanceFromClass(attributeClass));
      }
 catch (      PrivilegedActionException exception) {
        throw ConversionException.couldNotBeConverted(fieldValue,attributeClass,exception.getException());
      }
    }
 else {
      attributeValue=PrivilegedAccessHelper.newInstanceFromClass(attributeClass);
    }
  }
 catch (  Exception exception) {
    throw ConversionException.couldNotBeConverted(fieldValue,attributeClass,exception);
  }
  return attributeValue;
}
Program: 68436
Project: 68436
Buggy source:
public void initialize(DatabaseMapping mapping,Session session){
  this.platformList=new HashMap();
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.mapping=mapping;
  if (this.mapping.isDirectToFieldMapping()) {
    AbstractDirectMapping directMapping=(AbstractDirectMapping)this.mapping;
    if (directMapping.getFieldClassification() == null) {
      directMapping.setFieldClassification(ClassConstants.STRING);
    }
  }
}

Fixed version (ground truth):
public void initialize(DatabaseMapping mapping,Session session){
  this.platformList=new HashMap();
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.mapping=mapping;
  if (this.mapping.isDirectToFieldMapping()) {
    AbstractDirectMapping directMapping=(AbstractDirectMapping)this.mapping;
    if (directMapping.getFieldClassification() == null) {
      directMapping.setFieldClassification(ClassConstants.STRING);
    }
  }
}
Program: 68438
Project: 68438
Buggy source:
public Object convertDataValueToObjectValue(Object dataValue,Session session){
  Object result=platformList.get(dataValue);
  if (result == null) {
    return dataValue;
  }
 else {
    return result;
  }
}

Fixed version (ground truth):
public Object convertDataValueToObjectValue(Object dataValue,Session session){
  if (dataValue == null) {
    return null;
  }
  if (((String)dataValue).startsWith(oldPrefix)) {
    dataValue=((String)dataValue).replaceFirst(oldPrefix,newPrefix);
  }
  Object result=platformList.get(dataValue);
  if (result == null) {
    return dataValue;
  }
 else {
    return result;
  }
}
Program: 68439
Project: 68439
Buggy source:
public void initialize(DatabaseMapping mapping,Session session){
  this.platformList=new HashMap();
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void initialize(DatabaseMapping mapping,Session session){
  this.platformList=new HashMap();
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
  this.platformList.put("String_Node_Str","String_Node_Str");
}
Program: 68441
Project: 68441
Buggy source:
private void removeAllJavaFiles(File folder){
  File[] contents=folder.listFiles();
  for (int index=0; contents != null && index < contents.length; index++) {
    File file=contents[index];
    if (file.isDirectory()) {
      removeAllJavaFiles(file);
    }
 else {
      if (file.getName().endsWith("String_Node_Str") || file.getName().endsWith("String_Node_Str")) {
        file.delete();
      }
    }
  }
}

Fixed version (ground truth):
private void removeAllJavaFiles(File folder){
  File[] contents=folder.listFiles();
  for (int index=0; contents != null && index < contents.length; index++) {
    File file=contents[index];
    if (file.isDirectory()) {
      removeAllJavaFiles(file);
    }
 else {
      if (file.getName().endsWith("String_Node_Str")) {
        file.delete();
      }
    }
  }
}
Program: 68442
Project: 68442
Buggy source:
/** 
 * Returns a map of the old and new Database Platform classes.
 */
private Map oldPlatformClasses(){
  Map oldClasses=new Hashtable();
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  return oldClasses;
}

Fixed version (ground truth):
/** 
 * Returns a map of the old and new Database Platform classes.
 */
private Map oldPlatformClasses(){
  Map oldClasses=new Hashtable();
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  oldClasses.put("String_Node_Str","String_Node_Str");
  return oldClasses;
}
Program: 68444
Project: 68444
Buggy source:
public void test(){
  this.server=new ServerSession((DatabaseLogin)getSession().getLogin().clone(),2,5);
  copyDescriptors(getSession());
  this.server.addDescriptor(buildNonIsolatedDescriptor());
  this.server.dontLogMessages();
  try {
    this.server.login();
  }
 catch (  IntegrityException ex) {
    Vector exceptions=ex.getIntegrityChecker().getCaughtExceptions();
    for (int index=0; index < exceptions.size(); ++index) {
      if (((EclipseLinkException)exceptions.get(index)).getErrorCode() == DescriptorException.ISOLATED_DESCRIPTOR_REFERENCED_BY_SHARED_DESCRIPTOR) {
        return;
      }
    }
  }
  throw new TestErrorException("String_Node_Str");
}

Fixed version (ground truth):
public void test(){
  this.server=new ServerSession((DatabaseLogin)getSession().getLogin().clone(),2,5);
  copyDescriptors(getSession());
  this.server.addDescriptor(buildNonIsolatedDescriptor());
  this.server.dontLogMessages();
  try {
    this.server.login();
  }
 catch (  IntegrityException ex) {
    Vector exceptions=ex.getIntegrityChecker().getCaughtExceptions();
    for (int index=0; index < exceptions.size(); ++index) {
      if (((EclipseLinkException)exceptions.get(index)).getErrorCode() == DescriptorException.ISOLATED_DESCRIPTOR_REFERENCED_BY_SHARED_DESCRIPTOR) {
        return;
      }
    }
  }
 finally {
    if (this.server.isConnected()) {
      this.server.logout();
    }
    this.server=null;
  }
  throw new TestErrorException("String_Node_Str");
}
Program: 68446
Project: 68446
Buggy source:
public void verify(){
  if (!(new SessionManager().getSession(new XMLSessionConfigLoader(getSessionXmlFileName()),getSessionName(),this.getClass().getClassLoader()).getSessionLog() instanceof org.eclipse.persistence.logging.JavaLog)) {
    throw new TestErrorException("String_Node_Str");
  }
}

Fixed version (ground truth):
public void verify(){
  if (!(new SessionManager().getSession(new XMLSessionConfigLoader(getSessionXmlFileName()),getSessionName(),this.getClass().getClassLoader(),false,false).getSessionLog() instanceof org.eclipse.persistence.logging.JavaLog)) {
    throw new TestErrorException("String_Node_Str");
  }
}
Program: 68447
Project: 68447
Buggy source:
public void test(){
  ServerSession server=null;
  try {
    server=new ServerSession(getSession().getLogin());
    server.setLogLevel(getSession().getLogLevel());
    server.setLog(getSession().getLog());
    server.addConnectionPool("String_Node_Str",getSession().getLogin(),3,5);
    server.login();
    server.useReadConnectionPool(3,3);
  }
 catch (  EclipseLinkException exception) {
    caughtException=exception;
  }
 finally {
  }
}

Fixed version (ground truth):
public void test(){
  ServerSession server=null;
  try {
    server=new ServerSession(getSession().getLogin());
    server.setLogLevel(getSession().getLogLevel());
    server.setLog(getSession().getLog());
    server.addConnectionPool("String_Node_Str",getSession().getLogin(),3,5);
    server.login();
    server.useReadConnectionPool(3,3);
  }
 catch (  EclipseLinkException exception) {
    caughtException=exception;
  }
 finally {
    server.logout();
  }
}
Program: 68448
Project: 68448
Buggy source:
public void test(){
  DatabaseSession session=(DatabaseSession)getSession();
  try {
    Project project=new ConstructorProject();
    project.setLogin(getSession().getLogin());
    org.eclipse.persistence.sessions.DatabaseSession testSession=project.createDatabaseSession();
    testSession.dontLogMessages();
    testSession.login();
    testSession.logout();
  }
 catch (  org.eclipse.persistence.exceptions.EclipseLinkException exception) {
    caughtException=exception;
  }
catch (  Exception e) {
    throw new org.eclipse.persistence.testing.framework.TestWarningException("String_Node_Str");
  }
}

Fixed version (ground truth):
public void test(){
  org.eclipse.persistence.sessions.DatabaseSession testSession=null;
  try {
    Project project=new ConstructorProject();
    project.setLogin(getSession().getLogin());
    testSession=project.createDatabaseSession();
    testSession.dontLogMessages();
    testSession.login();
  }
 catch (  org.eclipse.persistence.exceptions.EclipseLinkException exception) {
    caughtException=exception;
  }
catch (  Exception e) {
    throw new org.eclipse.persistence.testing.framework.TestWarningException("String_Node_Str");
  }
 finally {
    if (testSession != null) {
      if (testSession.isConnected()) {
        testSession.logout();
      }
    }
  }
}
Program: 68449
Project: 68449
Buggy source:
public void test(){
  EmployeeSystem employeeSystem=new EmployeeSystem();
  DatabaseLogin databaseLogin=(DatabaseLogin)getSession().getLogin().clone();
  employeeSystem.project.setLogin(databaseLogin);
  DatabaseSession newSession=employeeSystem.project.createDatabaseSession();
  newSession.login();
  try {
    newSession.login();
  }
 catch (  org.eclipse.persistence.exceptions.EclipseLinkException e) {
    this.caughtException=e;
  }
}

Fixed version (ground truth):
public void test(){
  EmployeeSystem employeeSystem=new EmployeeSystem();
  DatabaseLogin databaseLogin=(DatabaseLogin)getSession().getLogin().clone();
  employeeSystem.project.setLogin(databaseLogin);
  DatabaseSession newSession=employeeSystem.project.createDatabaseSession();
  newSession.login();
  try {
    newSession.login();
  }
 catch (  org.eclipse.persistence.exceptions.EclipseLinkException e) {
    this.caughtException=e;
  }
 finally {
    newSession.logout();
  }
}
Program: 68450
Project: 68450
Buggy source:
public void test(){
  EmployeeSystem employeeSystem=new EmployeeSystem();
  DatabaseLogin databaseLogin=(DatabaseLogin)getSession().getLogin().clone();
  employeeSystem.project.setLogin(databaseLogin);
  DatabaseSession newSession=employeeSystem.project.createDatabaseSession();
  newSession.login();
  try {
    newSession.logout();
    newSession.login();
  }
 catch (  org.eclipse.persistence.exceptions.EclipseLinkException e) {
    this.caughtException=e;
  }
}

Fixed version (ground truth):
public void test(){
  EmployeeSystem employeeSystem=new EmployeeSystem();
  DatabaseLogin databaseLogin=(DatabaseLogin)getSession().getLogin().clone();
  employeeSystem.project.setLogin(databaseLogin);
  DatabaseSession newSession=employeeSystem.project.createDatabaseSession();
  newSession.login();
  try {
    newSession.logout();
    newSession.login();
  }
 catch (  org.eclipse.persistence.exceptions.EclipseLinkException e) {
    this.caughtException=e;
  }
 finally {
    if (newSession.isConnected()) {
      newSession.logout();
    }
  }
}
Program: 68452
Project: 68452
Buggy source:
public static XMLDescriptor buildDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(ReferencedElementDeclaration.class);
  descriptor.getInheritancePolicy().setParentClass(SchemaComponentReference.class);
  return descriptor;
}

Fixed version (ground truth):
public static XMLDescriptor buildDescriptor(){
  XMLDescriptor descriptor=new XMLDescriptor();
  descriptor.setJavaClass(ReferencedElementDeclaration.class);
  descriptor.getInheritancePolicy().setParentClass(SchemaComponentReference.class);
  ((XMLDirectMapping)descriptor.addDirectMapping("String_Node_Str","String_Node_Str")).setNullValue(new Integer(1));
  ((XMLDirectMapping)descriptor.addDirectMapping("String_Node_Str","String_Node_Str")).setNullValue(new Integer(1));
  return descriptor;
}