Returns true if the information in this link should take
precedence over the information in the other link.
483646
public boolean overrides(Link other) {
    if (other.getStatus() == LinkStatus.ASSERTED &&
        status != LinkStatus.ASSERTED)
      return false;
    else if (status == LinkStatus.ASSERTED &&
             other.getStatus() != LinkStatus.ASSERTED)
      return true;

    // the two links are from equivalent sources of information, so we
    // believe the most recent

    return timestamp > other.getTimestamp();
  }
815490
private boolean isSafeReplacement(Node node, Node replacement) {
    // No checks are needed for simple names.
    if (node.isName()) {
      return true;
    }
    checkArgument(node.isGetProp());

    while (node.isGetProp()) {
      node = node.getFirstChild();
    }
    return !(node.isName() && isNameAssignedTo(node.getString(), replacement));

  }
756723
public boolean eq(IntIntSortedVector other) {
        // This is slow, but correct.
        IntIntSortedVector v1 = IntIntSortedVector.getWithNoZeroValues(this);
        IntIntSortedVector v2 = IntIntSortedVector.getWithNoZeroValues(other);
                
        if (v2.size() != v1.size()) {
            return false;
        }

        for (IntIntEntry ve : v1) {
            if (!Primitives.equals(ve.get(), v2.get(ve.index()))) {
                return false;
            }
        }
        for (IntIntEntry ve : v2) {
            if (!Primitives.equals(ve.get(), v1.get(ve.index()))) {
                return false;
            }
        }
        return true;
    }
900368
def link(self, thing1, thing2):
		
		thing1 = thing1.strip().lower()
		thing2 = thing2.strip().lower()
		if thing1 == thing2:
			raise SameName("Attempted to link two of the same name")
		self.change(thing1, 0)
		self.change(thing2, 0)
		return self._link(thing1, thing2)
1298238
def is_equal(self, other):
        
        if not (hasattr(other, 'get_domain') or hasattr(other, 'upper') or hasattr(other, 'lower')):
            other = self.coerce(other)
        if self.is_domain_equal(other)  \
            and len(self.upper.symmetric_difference(other.upper)) == 0 \
            and len(self.lower.symmetric_difference(other.lower)) == 0:
            return True
        return False
502207
def _precedence_parens(self, node, child, is_left=True):
        """"""
        if self._should_wrap(node, child, is_left):
            return "(%s)" % child.accept(self)

        return child.accept(self)
1115866
function hasPrecedence(op1, op2) {
    (0, _invariant2['default'])(PRECEDENCE[op1] && PRECEDENCE[op2], 'Missing precedence number for\n            ' + 
    JSON.stringify(op1) + ' or ' + JSON.stringify(op2) + '.\n            See ' + 
    JSON.stringify(PRECEDENCE));

    return PRECEDENCE[op1] < PRECEDENCE[op2];}
371560
def link2_(a, b)
      if a.nil?
        @first = b
      else
        a.instance_variable_set(:@next, b) unless a.nil?
      end
      if b.nil?
        @last = a
      else
        b.instance_variable_set(:@prev, a) unless b.nil?
      end
    end
410432
def exclude_match(exclude, link_value):
    
    if hasattr(exclude, "search") and exclude.search(link_value):
        return True

    if exclude == link_value:
        return True

    return False
999687
public boolean hasCommonOrder() {
        Order lastOrder = null;
        for (OrderEntry oe : list) {
            if (lastOrder==null) lastOrder=oe.order;
            else if (lastOrder!=oe.order) return false;
        }
        return true;
    }
24283
function moveSequenceBefore(slotNext, slotFirst, slotLast) {
                    slotFirst.prev.next = slotLast.next;
                    slotLast.next.prev = slotFirst.prev;

                    slotFirst.prev = slotNext.prev;
                    slotLast.next = slotNext;

                    slotFirst.prev.next = slotFirst;
                    slotNext.prev = slotLast;

                    return true;
                }
1295502
public boolean containsSameLinksAs(Iterable<Link> links) {

		Links other = Links.of(links);

		return this.links.size() != other.links.size() ? false : this.links.containsAll(other.links);
	}
654039
function (a, b) {
        var pending;
        if (this._neverCompared(a, b)) {
            pending = this._pending;
            pending.push(a);
            pending.push(b);
        }
    }
234436
public boolean nextSibling() {
        if (mNode == null) {
            return false;
        }
        AccessibilityNodeInfoCompat parent = mNode.getParent();
        if (parent == null) {
            return false;
        }
        try {
            int childCount = parent.getChildCount();
            int childNumber = getChildNumber(parent);
            if (childNumber < 0) {
                return false;
            }
            for (int i = childNumber + 1; i < childCount; ++i) {
                AccessibilityNodeInfoCompat newNode =
                        parent.getChild(i);
                if (newNode == null) {
                    return false;
                }
                if (AccessibilityNodeInfoUtils.isVisibleOrLegacy(newNode)) {
                    reset(newNode);
                    return true;
                }
                newNode.recycle();
            }
        } finally {
            parent.recycle();
        }
        return false;
    }
1130234
private boolean shouldDividerTitleBeShown() {
        SharedPreferences sharedPreferences =
                PreferenceManager.getDefaultSharedPreferences(getActivity());
        String key = getString(R.string.show_divider_title_preference_key);
        boolean defaultValue =
                getResources().getBoolean(R.bool.show_divider_title_preference_default_value);
        return sharedPreferences.getBoolean(key, defaultValue);
    }
449795
public boolean isSameAs( PlanNode other ) {
        if (other == null) return false;
        if (this.getType() != other.getType()) return false;
        if (!ObjectUtil.isEqualWithNulls(this.nodeProperties, other.nodeProperties)) return false;
        if (!this.getSelectors().equals(other.getSelectors())) return false;
        if (this.getChildCount() != other.getChildCount()) return false;
        Iterator<PlanNode> thisChildren = this.getChildren().iterator();
        Iterator<PlanNode> thatChildren = other.getChildren().iterator();
        while (thisChildren.hasNext() && thatChildren.hasNext()) {
            if (!thisChildren.next().isSameAs(thatChildren.next())) return false;
        }
        return true;
    }
779535
private Node<E> _link(Node<E> node1, Node<E> node2) {
	// maybe there is no real unification here
	if(node1 == node2) return node2;
	// from now on, we know that we unify really disjoint trees
	if(node1.rank > node2.rank) {
	    node2.parent = node1;
	    node1.nbElems += node2.nbElems; 
	    return node1;
	}
	else {
	    node1.parent = node2;
	    if (node1.rank == node2.rank) {
		node2.rank++;
	    }
	    node2.nbElems += node1.nbElems;
	    return node2;
	}
    }