If union has both items, is the first one redundant?

    For example, if first is 'str' and the other is 'Text', return True.

    If items are equal, return False.
17242
def is_redundant_union_item(first, other):
    # type: (AbstractType, AbstractType) -> bool
    
    if isinstance(first, ClassType) and isinstance(other, ClassType):
        if first.name == 'str' and other.name == 'Text':
            return True
        elif first.name == 'bool' and other.name == 'int':
            return True
        elif first.name == 'int' and other.name == 'float':
            return True
        elif (first.name in ('List', 'Dict', 'Set') and
                  other.name == first.name):
            if not first.args and other.args:
                return True
            elif len(first.args) == len(other.args) and first.args:
                result = all(first_arg == other_arg or other_arg == AnyType()
                             for first_arg, other_arg
                             in zip(first.args, other.args))
                return result

    return False
47412
public static boolean areStringEquals(String string1, String string2) {
		/* string1	string2	outcome
		 * null		null	true
		 * null		x		false
		 * x		null	false
		 * x		y		false
		 * x		x		true
		 */
		// XXX both null must be unequal? If yes, boolean must be too?
		if (string1 == null && string2 == null) {
			return false;
		} else if (string1 != null && !string1.equals(string2)) {
			return false;
		} else if (string2 != null && !string2.equals(string1)) {
			return false;
		}
		return true;
	}
184958
private static boolean isEqual(String string1, String string2) {
        return (string1 == null && string2 == null) || (string1 != null && string1.equals(string2));
    }
637138
def contains_any(self, other):
        
        return self.value == other.value or self.value & other.value
1041780
def union(other)
      raise Erlang::ImproperListError if improper?
      other = Erlang.from(other)
      raise ArgumentError, "other must be of Erlang::List type" if not Erlang.is_list(other)
      raise Erlang::ImproperListError if other.improper?
      items = ::Set.new
      return _uniq(items).append(other._uniq(items))
    end
849254
function union(list1, list2, duplicate=false) {
    if ( arguments.length < 2 ) {
      // Manually currying
      let args1 = arguments;

      return (...args2) => union(...args1, ...args2);
    } else if (arguments.length === 2 && (! Array.isArray(list2))) {
      // curring union(_, list, duplicate) cases
      // Manually currying
      let args = arguments;
      return (list) => union(list, ...args);
    }

    if(duplicate) {
      return differenceWithDup([],list1.concat(list2));
    }
    return difference([],list1.concat(list2));
  }
1374704
def union(self):
        
        usegs = reduce(operator.or_, self.values())
        usegs.name = ' | '.join(self.keys())
        return usegs
328154
static boolean essentiallyEqualsTo(RedisNodeDescription o1, RedisNodeDescription o2) {

        if (o2 == null) {
            return false;
        }

        if (o1.getRole() != o2.getRole()) {
            return false;
        }

        if (!o1.getUri().equals(o2.getUri())) {
            return false;
        }

        return true;
    }
1258870
def is_equal(self, other):
        
        other = StringCell.coerce(other)
        empties = [None,'']
        if self.value in empties and other.value in empties:
            return True
        return self.value == other.value
614557
def is_equal(self, other):
        
        other = self.coerce(other)
        return len(self.get_values().symmetric_difference(other.get_values())) == 0
916882
def match(self, item):
        
        if 0 and getattr(item, self._name):
            print "%r %r %r %r %r %r" % (self._cmp(float(getattr(item, self._name)), self._value),
                  self._name, self._condition, item.name, getattr(item, self._name), self._value)
        val = getattr(item, self._name) or 0
        if self.not_null and self._value and not val:
            return False
        else:
            return self._cmp(float(val), self._value)
418140
def composite_join(separator, items):
        
        output = Composite()
        first_item = True
        for item in items:
            # skip empty items
            if not item:
                continue
            # skip separator on first item
            if first_item:
                first_item = False
            else:
                output.append(separator)
            output.append(item)
        return output
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)))
908653
def verify_not_equal(self, first, second, msg=""):
        
        try:
            self.assert_not_equal(first, second, msg)
        except AssertionError, e:
            if msg:
                m = "%s:\n%s" % (msg, str(e))
            else:
                m = str(e)
            self.verification_erorrs.append(m)
1021113
def is_in(val, items):
    
    if isinstance(items, basestring):
        items = items.split('|')
    return val in items
638302
function(item1, item2, query) {
            if (typeof item1 === 'object' && typeof item2 === 'object') {
                query = query || {};
                for (var prop in query) {
                    if (item1[prop] !== item2[prop])
                        return false;
                }
                return true;
            }
            return item1 === item2;
        }
222487
def equate_initial(name1, name2):
    
    if len(name1) == 0 or len(name2) == 0:
        return False

    if len(name1) == 1 or len(name2) == 1:
        return name1[0] == name2[0]

    return name1 == name2