Returns True if a and b are members of the same set.
517205
def joined(self, a, b):
        
        mapping = self._mapping
        try:
            return mapping[a] is mapping[b]
        except KeyError:
            return False
151093
public static boolean areEqual(byte[] a, byte[] b) {
        int aLength = a.length;
        if (aLength != b.length) {
            return false;
        }

        for (int i = 0; i < aLength; i++) {
            if (a[i] != b[i]) {
                return false;
            }
        }
        return true;
    }
1106268
def sameState (s1, s2):
    
    if (len(s1[1]) != len(s2[1])) or (s1[2] != s2[2]):
        return False
    for arcIndex in range(0, len(s1[1])):
        arc1 = s1[1][arcIndex]
        arc2 = s2[1][arcIndex]
        if arc1[:-1] != arc2[:-1]:
            return False
    return True
33980
def equal_set(self, a, b):
        ""
        if len(a) != len(b):
            return 0
        if a == b:
            return 1
        return self.subset(a, b) and self.subset(b, a)
1085004
def code_almost_equal(a, b):
    
    split_a = split_and_strip_non_empty_lines(a)
    split_b = split_and_strip_non_empty_lines(b)

    if len(split_a) != len(split_b):
        return False

    for (index, _) in enumerate(split_a):
        if ''.join(split_a[index].split()) != ''.join(split_b[index].split()):
            return False

    return True
386882
public static boolean areEqual(Object a, Object b) {

        if (a == b) {
            return true;
        }

        if (a == null || b == null) {
            return false;
        }

        // TODO refactor the instance-ofs below

        if (a instanceof Number && b instanceof Number) {

            double delta = ((Number) a).doubleValue() - ((Number) b).doubleValue();

            // To account for floating point rounding errors, return true if
            // the difference between double a and double b is very small.
            return Math.abs(delta) < 0.00000000001;
        }

        if (AtomNode.isEmpty(a) && (b instanceof CharSequence)) {
            return ((CharSequence)b).length() == 0;
        }

        if (AtomNode.isEmpty(b) && (a instanceof CharSequence)) {
            return ((CharSequence)a).length() == 0;
        }

        if (AtomNode.isEmpty(a) && (b instanceof Collection)) {
            return ((Collection)b).size() == 0;
        }

        if (AtomNode.isEmpty(b) && (a instanceof Collection)) {
            return ((Collection)a).size() == 0;
        }

        if (AtomNode.isEmpty(a) && (b.getClass().isArray())) {
            return ((Object[])b).length == 0;
        }

        if (AtomNode.isEmpty(b) && (a.getClass().isArray())) {
            return ((Object[])a).length == 0;
        }

        return a.equals(b);
    }
1131479
def difference (b, a):
    
    a = set(a)
    result = []
    for item in b:
        if item not in a:
            result.append(item)
    return result
507579
def equal (a, b):
    
    assert is_iterable(a)
    assert is_iterable(b)
    return contains (a, b) and contains (b, a)
482079
public static boolean overlap(@Nullable String[] as, @Nullable String[] bs)
  {
    if (as == null || bs == null) {
      // They only have overlap if both are null.
      return as == null && bs == null;
    }
    if (as.length == 0 && bs.length == 0) {
      return true;
    }

    for (String a : as) {
      for (String b : bs) {
        if (Objects.equals(a, b)) {
          return true;
        }
      }
    }

    return false;
  }
199826
def has_same_bins(self, other: "HistogramBase") -> bool:
        """"""
        if self.shape != other.shape:
            return False
        elif self.ndim == 1:
            return np.allclose(self.bins, other.bins)
        elif self.ndim > 1:
            for i in range(self.ndim):
                if not np.allclose(self.bins[i], other.bins[i]):
                    return False
            return True
583758
public static boolean same(Localizable a, Localizable b)
    {
        return Double.compare(a.getX(), b.getX()) == 0 && Double.compare(a.getY(), b.getY()) == 0;
    }
50860
public static boolean sameList(final Object[] a, final Object[] b) {
    if (a == null || b == null || a.length != b.length) {
      return false;
    }
    for (int i = 0; i < a.length; i++) {
      if (!a[i].equals(b[i])) {
        return false;
      }
    }
    return true;
  }
1238186
def isMemberOf(self, schemas):
        
        if type(schemas) not in (tuple, list, set):
            schemas = (schemas,)

        for schema in schemas:
            if schema.hasColumn(self):
                return True
        return False
608767
public static boolean almostEqual(float a, float b, float absoluteDiff, float relativeDiff) {
        float diff = Math.abs(a - b);
        if (diff <= absoluteDiff) {
            return true;
        }

        a = Math.abs(a);
        b = Math.abs(b);
        float largest = (a > b) ? a : b;

        if (diff <= largest * relativeDiff) {
            return true;
        }

        return false;
    }
929671
def _is_pair(item):
    
    return (isinstance(item, (list, tuple, set)) and
            len(item) == 2 and
            not isinstance(item[0], (list, tuple, set)) and
            not isinstance(item[1], (list, tuple, set)))
739336
function containsObj (a, b) {
  return Object.keys(a).reduce((r, k) => {
    return r && R.equals(a[k], b[k]);
  }, true);
}
1374386
function isEquivalentMemberExp(a, b) {
    return _.isEqualWith(a, b, (left, right, key) => {
        if (_.includes(['loc', 'range', 'computed', 'start', 'end', 'parent'], key)) {
            return true
        }
        if (isComputed(left) || isComputed(right)) {
            return false
        }
        if (key === 'property') {
            const leftValue = left.name || left.value
            const rightValue = right.name || right.value
            return leftValue === rightValue
        }
    })
}