class StmtRWSet extends RWSet {

  protected Object field;
  protected PointsToSet base;
  protected boolean callsNative = false;

  @Override
  public String toString() {
    return "[Field: " + field + base + "]\n";
  }

  @Override
  public int size() {
    Set globals = getGlobals();
    Set fields = getFields();
    if (globals == null) {
      return (fields == null) ? 0 : fields.size();
    } else if (fields == null) {
      return globals.size();
    } else {
      return globals.size() + fields.size();
    }
  }

  @Override
  public boolean getCallsNative() {
    return callsNative;
  }

  @Override
  public boolean setCallsNative() {
    boolean ret = !callsNative;
    callsNative = true;
    return ret;
  }

  /** Returns an iterator over any globals read/written. */
  @Override
  public Set<Object> getGlobals() {
    return (base == null) ? Collections.singleton(field) : Collections.emptySet();
  }

  /** Returns an iterator over any fields read/written. */
  @Override
  public Set<Object> getFields() {
    return (base != null) ? Collections.singleton(field) : Collections.emptySet();
  }

  /** Returns a set of base objects whose field f is read/written. */
  @Override
  public PointsToSet getBaseForField(Object f) {
    return field.equals(f) ? base : null;
  }

  @Override
  public boolean hasNonEmptyIntersection(RWSet other) {
    if (field == null) {
      return false;
    }
    if (other instanceof StmtRWSet) {
      StmtRWSet o = (StmtRWSet) other;
      if (!this.field.equals(o.field)) {
        return false;
      } else if (this.base == null) {
        return o.base == null;
      } else {
        return Union.hasNonEmptyIntersection(this.base, o.base);
      }
    } else if (other instanceof MethodRWSet) {
      if (this.base == null) {
        return other.getGlobals().contains(this.field);
      } else {
        return Union.hasNonEmptyIntersection(this.base, other.getBaseForField(this.field));
      }
    } else {
      return other.hasNonEmptyIntersection(this);
    }
  }

  /** Adds the RWSet other into this set. */
  @Override
  public boolean union(RWSet other) {
    throw new RuntimeException("Can't do that");
  }

  @Override
  public boolean addGlobal(SootField global) {
    if (field != null || base != null) {
      throw new RuntimeException("Can't do that");
    }
    field = global;
    return true;
  }

  @Override
  public boolean addFieldRef(PointsToSet otherBase, Object field) {
    if (this.field != null || base != null) {
      throw new RuntimeException("Can't do that");
    }
    this.field = field;
    base = otherBase;
    return true;
  }

  @Override
  public boolean isEquivTo(RWSet other) {<FILL_FUNCTION_BODY>}
}

    if (!(other instanceof StmtRWSet)) {
      return false;
    }
    StmtRWSet o = (StmtRWSet) other;
    if ((this.callsNative != o.callsNative) || !this.field.equals(o.field)) {
      return false;
    }
    if (this.base instanceof FullObjectSet && o.base instanceof FullObjectSet) {
      return true;
    }
    return this.base == o.base;
  
<methods>public non-sealed void <init>() ,public abstract boolean addFieldRef(soot.PointsToSet, java.lang.Object) ,public abstract boolean addGlobal(soot.SootField) ,public abstract soot.PointsToSet getBaseForField(java.lang.Object) ,public abstract boolean getCallsNative() ,public abstract Set<?> getFields() ,public abstract Set<?> getGlobals() ,public abstract boolean hasNonEmptyIntersection(soot.jimple.toolkits.pointer.RWSet) ,public abstract boolean isEquivTo(soot.jimple.toolkits.pointer.RWSet) ,public abstract boolean setCallsNative() ,public abstract int size() ,public abstract boolean union(soot.jimple.toolkits.pointer.RWSet) <variables>