FUTURE DOM: Test node identity, in lieu of Node==Node

@param other

@return true if the given node has the same handle as this node.
338477
public final boolean sameNodeAs(Node other)
  {

    if (!(other instanceof DTMNodeProxy))
      return false;

    DTMNodeProxy that = (DTMNodeProxy) other;

    return this.dtm == that.dtm && this.node == that.node;
  }
74461
protected boolean compareNodeBasics(Node control, Node test,
                                        DifferenceListener listener) throws DifferenceFoundException {
        controlTracker.visited(control);
        testTracker.visited(test);

        Short controlType = new Short(control.getNodeType());
        Short testType = new Short(test.getNodeType());

        boolean textAndCDATA = comparingTextAndCDATA(control.getNodeType(),
                                                     test.getNodeType());
        if (!textAndCDATA) {
            compare(controlType, testType, control, test, listener,
                    NODE_TYPE);
        }
        compare(control.getNamespaceURI(), test.getNamespaceURI(),
                control, test, listener, NAMESPACE_URI);
        compare(control.getPrefix(), test.getPrefix(),
                control, test, listener, NAMESPACE_PREFIX);
            
        return textAndCDATA || controlType.equals(testType);
    }
1232686
public static boolean isNodeTheSame(Node node1, Node node2)
  {
    if (node1 instanceof DTMNodeProxy && node2 instanceof DTMNodeProxy)
      return ((DTMNodeProxy)node1).equals((DTMNodeProxy)node2);
    else
      return (node1 == node2);
  }
961926
@Override
    boolean equivalentXml(Object target) {
        boolean result = false;

        if (target instanceof XML) {
            //    TODO    This is a horrifyingly inefficient way to do this so we should make it better.  It may also not work.
            return this.node.toXmlString(getProcessor()).equals( ((XML)target).node.toXmlString(getProcessor()) );
        } else if (target instanceof XMLList) {
            //    TODO    Is this right?  Check the spec ...
            XMLList otherList = (XMLList) target;

            if (otherList.length() == 1) {
                result = equivalentXml(otherList.getXML());
            }
        } else if (hasSimpleContent()) {
            String otherStr = ScriptRuntime.toString(target);

            result = toString().equals(otherStr);
        }

        return result;
    }
1220101
public static boolean equalsEntities(
      Iterable<Entity> entityIterable, Iterable<Entity> otherEntityIterable) {
    List<Entity> attrs = newArrayList(entityIterable);
    List<Entity> otherAttrs = newArrayList(otherEntityIterable);

    if (attrs.size() != otherAttrs.size()) return false;
    for (int i = 0; i < attrs.size(); ++i) {
      if (!equals(attrs.get(i), otherAttrs.get(i))) return false;
    }
    return true;
  }
687726
public boolean lessThanOrEqual(XObject obj2)
          throws javax.xml.transform.TransformerException
  {

    // In order to handle the 'all' semantics of 
    // nodeset comparisons, we always call the 
    // nodeset function.  Because the arguments 
    // are backwards, we call the opposite comparison
    // function.
    if (obj2.getType() == XObject.CLASS_NODESET)
      return obj2.greaterThanOrEqual(this);

    return this.num() <= obj2.num();
  }
461178
def matches(self, other):
        
        if not isinstance(other, Failure):
            return False
        if self.exc_info is None or other.exc_info is None:
            return self._matches(other)
        else:
            return self == other
273685
public boolean isUnifiableWith(SyntacticCategory other) {
    Map<Integer, String> myAssignedVariables = Maps.newHashMap();
    Map<Integer, String> otherAssignedVariables = Maps.newHashMap();
    Map<Integer, Integer> variableRelabeling = Maps.newHashMap();

    // System.err.println("unifying: " + this + " " + other);
    return isUnifiableWith(other, myAssignedVariables, otherAssignedVariables, variableRelabeling); 
  }
1134646
public boolean isSameType(AuthenticationMethod other) {
		if (other == null)
			return false;
		return other.getClass().equals(this.getClass());
	}
369389
public boolean equalsExact(Adresse other) {
        return this.ort.equalsExact(other.ort) && (this.strasse.equals(other.strasse)) &&
                this.hausnummer.equalsIgnoreCase(other.hausnummer);
    }
1065297
public void toEqual(T other) {
		if (this.value == null && other == null) {
			return;
		}
		expectNotNull(this.value, "Expected null to be equal '%s'", other);
		expectNotNull(other, "Expected '%s' to be equal null", this.value);
		expectTrue(this.value.equals(other), "Expected '%s' to be equal '%s'", this.value, other);
	}
280307
public boolean equalTo(CFMLEngine other, final boolean checkReferenceEqualityOnly) {
	while (other instanceof CFMLEngineWrapper)
	    other = ((CFMLEngineWrapper) other).engine;
	if (checkReferenceEqualityOnly) return engine == other;
	return engine.equals(other);
    }
1018397
public boolean isMatch(Endpoint other) {
        assert isMarker() : "isMatch can only be used on marker end-points";

        // Same structure as compareTo, except that nulls 'match' IDs (not <)
        int ans = 0;

        // A null edgeLabel implies that all endpoints of that vertex must be
        // matched
        if (edgeLabel == null) {
            return true;
        }

        if (other.getEdgeLabel() == null) {
            // This is not a match because the existing Endpoint no label, but
            // the marker does
            return false;
        }

        ans = edgeLabel.compareTo(other.getEdgeLabel());
        if (ans != 0) {
            return false;
        }

        // A null edgeId implies the 'first' edge for the given vertex for the
        // given edgeLabel
        if (edgeId == null) {
            return true;
        }

        return (edgeId.compareTo(other.getEdgeId()) == 0);
    }
395958
public function compareTo($other)
    {
        if ($other === null) {
            return false;
        }
        if (!($other instanceof VariableNode)) {
            return false;
        }

        return $this->getName() == $other->getName();
    }
1050788
public static boolean iincInsnEqual(IincInsnNode node1, IincInsnNode node2)
	{
		return node1.var == node2.var && node1.incr == node2.incr;
	}
209469
public boolean equalsExact(Ort other) {
        return Objects.equals(this.plz, other.plz) && this.name.equals(other.name);
    }
392144
public boolean touches(IndexRange other) {
        checkArgNotNull(other, "other");
        return other.end == start || end == other.start;
    }