Is t an unchecked subtype of s?
19683
public boolean isSubtypeUnchecked(Type t, Type s, Warner warn) {
        boolean result = isSubtypeUncheckedInternal(t, s, true, warn);
        if (result) {
            checkUnsafeVarargsConversion(t, s, warn);
        }
        return result;
    }
909230
public boolean isAssignable(Type t, Type s, Warner warn) {
        if (t.hasTag(ERROR))
            return true;
        if (t.getTag().isSubRangeOf(INT) && t.constValue() != null) {
            int value = ((Number)t.constValue()).intValue();
            switch (s.getTag()) {
            case BYTE:
            case CHAR:
            case SHORT:
            case INT:
                if (s.getTag().checkRange(value))
                    return true;
                break;
            case CLASS:
                switch (unboxedType(s).getTag()) {
                case BYTE:
                case CHAR:
                case SHORT:
                    return isAssignable(t, unboxedType(s), warn);
                }
                break;
            }
        }
        return isConvertible(t, s, warn);
    }
721820
public boolean isSubtypes(List<Type> ts, List<Type> ss) {
        while (ts.tail != null && ss.tail != null
               /*inlined: ts.nonEmpty() && ss.nonEmpty()*/ &&
               isSubtype(ts.head, ss.head)) {
            ts = ts.tail;
            ss = ss.tail;
        }
        return ts.tail == null && ss.tail == null;
        /*inlined: ts.isEmpty() && ss.isEmpty();*/
    }
214162
private static boolean hasUnsafeChars(String s) {
        for (int i = 0; i < s.length(); ++i) {
            char c = s.charAt(i);
            if (Character.isLetter(c) || c == '.')
                continue;
            else
                return true;
        }
        return false;
    }
129877
public static boolean isSubtype(ReferenceType t, ReferenceType possibleSupertype) throws ClassNotFoundException {
        return Global.getAnalysisCache().getDatabase(Subtypes2.class).isSubtype(t, possibleSupertype);
    }
325128
def is_type(x, types, full=False):
    
    types = types if isinstance(types, tuple) else (types,)
    ins = isinstance(x, types)
    sub = False
    try:
        sub = issubclass(x, types)
    except Exception:
        pass
    res = ins or sub
    return res if not full else (res, ins)
1010143
def checktype(self, val, kind, **kargs):
        """"""
        if not isinstance(val, kind):
            raise TypeError('Expected {}; got {}'.format(
                            self.str_kind(kind), self.str_valtype(val)))
1110349
private static int SA_IS(BaseArray T, int[] SA, int fs, int n, int k, boolean isbwt) {
        BaseArray C, B, RA;
        int i, j, c, m, p, q, plen, qlen, name, pidx = 0;
        int c0, c1;
        boolean diff;

    /* stage 1: reduce the problem by at least 1/2
       sort all the S-substrings */
        if (k <= fs) {
            C = new IntArray(SA, n);
            B = (k <= (fs - k)) ? new IntArray(SA, n + k) : C;
        } else {
            B = C = new IntArray(new int[k], 0);
        }
        getCounts(T, C, n, k);
        getBuckets(C, B, k, true); /* find ends of buckets */
        for (i = 0; i < n; ++i) {
            SA[i] = 0;
        }
        for (i = n - 2, c = 0, c1 = T.get(n - 1); 0 <= i; --i, c1 = c0) {
            if ((c0 = T.get(i)) < (c1 + c)) {
                c = 1;
            } else if (c != 0) {
                SA[B.update(c1, -1)] = i + 1;
                c = 0;
            }
        }
        induceSA(T, SA, C, B, n, k);
        C = null;
        B = null;

    /* compact all the sorted substrings into the first m items of SA
       2*m must be not larger than n (proveable) */
        for (i = 0, m = 0; i < n; ++i) {
            p = SA[i];
            if ((0 < p) && (T.get(p - 1) > (c0 = T.get(p)))) {
                for (j = p + 1; (j < n) && (c0 == (c1 = T.get(j))); ++j) {
                }
                if ((j < n) && (c0 < c1)) {
                    SA[m++] = p;
                }
            }
        }
        j = m + (n >> 1);
        for (i = m; i < j; ++i) {
            SA[i] = 0;
        } /* init the name array buffer */
    /* store the length of all substrings */
        for (i = n - 2, j = n, c = 0, c1 = T.get(n - 1); 0 <= i; --i, c1 = c0) {
            if ((c0 = T.get(i)) < (c1 + c)) {
                c = 1;
            } else if (c != 0) {
                SA[m + ((i + 1) >> 1)] = j - i - 1;
                j = i + 1;
                c = 0;
            }
        }
    /* find the lexicographic names of all substrings */
        for (i = 0, name = 0, q = n, qlen = 0; i < m; ++i) {
            p = SA[i];
            plen = SA[m + (p >> 1)];
            diff = true;
            if (plen == qlen) {
                for (j = 0; (j < plen) && (T.get(p + j) == T.get(q + j)); ++j) {
                }
                if (j == plen) {
                    diff = false;
                }
            }
            if (diff) {
                ++name;
                q = p;
                qlen = plen;
            }
            SA[m + (p >> 1)] = name;
        }

    /* stage 2: solve the reduced problem
       recurse if names are not yet unique */
        if (name < m) {
            RA = new IntArray(SA, n + fs - m);
            for (i = m + (n >> 1) - 1, j = n + fs - 1; m <= i; --i) {
                if (SA[i] != 0) {
                    SA[j--] = SA[i] - 1;
                }
            }
            SA_IS(RA, SA, fs + n - m * 2, m, name, false);
            RA = null;
            for (i = n - 2, j = m * 2 - 1, c = 0, c1 = T.get(n - 1); 0 <= i; --i, c1 = c0) {
                if ((c0 = T.get(i)) < (c1 + c)) {
                    c = 1;
                } else if (c != 0) {
                    SA[j--] = i + 1;
                    c = 0;
                } /* get p1 */
            }
            for (i = 0; i < m; ++i) {
                SA[i] = SA[SA[i] + m];
            } /* get index */
        }

    /* stage 3: induce the result for the original problem */
        if (k <= fs) {
            C = new IntArray(SA, n);
            B = (k <= (fs - k)) ? new IntArray(SA, n + k) : C;
        } else {
            B = C = new IntArray(new int[k], 0);
        }
    /* put all left-most S characters into their buckets */
        getCounts(T, C, n, k);
        getBuckets(C, B, k, true); /* find ends of buckets */
        for (i = m; i < n; ++i) {
            SA[i] = 0;
        } /* init SA[m..n-1] */
        for (i = m - 1; 0 <= i; --i) {
            j = SA[i];
            SA[i] = 0;
            SA[B.update(T.get(j), -1)] = j;
        }
        if (!isbwt) {
            induceSA(T, SA, C, B, n, k);
        } else {
            pidx = computeBWT(T, SA, C, B, n, k);
        }
        C = null;
        B = null;
        return pidx;
    }
724733
def is_type_sub_type_of(
    schema: GraphQLSchema, maybe_subtype: GraphQLType, super_type: GraphQLType
) -> bool:
    
    # Equivalent type is a valid subtype
    if maybe_subtype is super_type:
        return True

    # If super_type is non-null, maybe_subtype must also be non-null.
    if is_non_null_type(super_type):
        if is_non_null_type(maybe_subtype):
            return is_type_sub_type_of(
                schema,
                cast(GraphQLNonNull, maybe_subtype).of_type,
                cast(GraphQLNonNull, super_type).of_type,
            )
        return False
    elif is_non_null_type(maybe_subtype):
        # If super_type is nullable, maybe_subtype may be non-null or nullable.
        return is_type_sub_type_of(
            schema, cast(GraphQLNonNull, maybe_subtype).of_type, super_type
        )

    # If superType type is a list, maybeSubType type must also be a list.
    if is_list_type(super_type):
        if is_list_type(maybe_subtype):
            return is_type_sub_type_of(
                schema,
                cast(GraphQLList, maybe_subtype).of_type,
                cast(GraphQLList, super_type).of_type,
            )
        return False
    elif is_list_type(maybe_subtype):
        # If super_type is not a list, maybe_subtype must also be not a list.
        return False

    # If super_type type is an abstract type, maybe_subtype type may be a currently
    # possible object type.
    # noinspection PyTypeChecker
    if (
        is_abstract_type(super_type)
        and is_object_type(maybe_subtype)
        and schema.is_possible_type(
            cast(GraphQLAbstractType, super_type),
            cast(GraphQLObjectType, maybe_subtype),
        )
    ):
        return True

    # Otherwise, the child type is not a valid subtype of the parent type.
    return False
1229353
public boolean containedBy(Type t, Type s) {
        switch (t.getTag()) {
        case UNDETVAR:
            if (s.hasTag(WILDCARD)) {
                UndetVar undetvar = (UndetVar)t;
                WildcardType wt = (WildcardType)s;
                switch(wt.kind) {
                    case UNBOUND:
                        break;
                    case EXTENDS: {
                        Type bound = wildUpperBound(s);
                        undetvar.addBound(InferenceBound.UPPER, bound, this);
                        break;
                    }
                    case SUPER: {
                        Type bound = wildLowerBound(s);
                        undetvar.addBound(InferenceBound.LOWER, bound, this);
                        break;
                    }
                }
                return true;
            } else {
                return isSameType(t, s);
            }
        case ERROR:
            return true;
        default:
            return containsType(s, t);
        }
    }
1271006
def same_type(t1, t2):
    
    if isinstance(t1, string_type) and isinstance(t2, string_type):
        return True

    return type(t1) == type(t2)
955627
function isConsistent(t) {
    return t.type === UNARY   ? isConsistent (t.types.$1) :
           t.type === BINARY  ? isConsistent (t.types.$1) &&
                                isConsistent (t.types.$2) :
           /* else */           t.type !== INCONSISTENT;
  }
1167847
def make_type_consistent(s1, s2):
    """"""
    if isinstance(s1, str) and isinstance(s2, str):
        return s1, s2

    elif isinstance(s1, unicode) and isinstance(s2, unicode):
        return s1, s2

    else:
        return unicode(s1), unicode(s2)
776571
private boolean isSupported(Class<?> t)
   {
      if (Boolean.class.equals(t) || boolean.class.equals(t) ||
          Byte.class.equals(t) || byte.class.equals(t) ||
          Short.class.equals(t) || short.class.equals(t) ||
          Integer.class.equals(t) || int.class.equals(t) ||
          Long.class.equals(t) || long.class.equals(t) ||
          Float.class.equals(t) || float.class.equals(t) ||
          Double.class.equals(t) || double.class.equals(t) ||
          Character.class.equals(t) || char.class.equals(t) ||
          String.class.equals(t))
         return true;

      return false;
   }
963091
public static boolean isSameType(@Nonnull TypeMirror t1, @Nonnull TypeMirror t2) {
        String t1Name = toUniqueString(t1);
        String t2Name = toUniqueString(t2);

        return t1Name.equals(t2Name);
    }
1325684
private boolean checkType(int tagid, int tagType, int n) {
    if (TiffTags.hasTag(tagid) && !TiffTags.getTag(tagid).getName().equals("IPTC")) {
      boolean found = false;
      String stagType = TiffTags.getTagTypeName(tagType);
      if (stagType != null) {
        if (stagType.equals("SUBIFD"))
          stagType = "IFD";
        if (stagType.equals("UNDEFINED"))
          stagType = "BYTE";
        for (String vType : TiffTags.getTag(tagid).getType()) {
          String vType2 = vType;
          if (vType2.equals("UNDEFINED"))
            vType2 = "BYTE";
          if (vType2.equals(stagType)) {
            found = true;
          }
        }
      }
      if (!found) {
        validation.addError("Incorrect type for tag " + TiffTags.getTag(tagid).getName(),
            "IFD" + n, stagType);
        return false;
      }
      return true;
    }
    return false;
  }
842147
private boolean isValidTreeType(Tree t) {
    if (t instanceof LambdaExpressionTree) {
      return true;
    }
    if (t instanceof ClassTree) {
      NestingKind nestingKind = ASTHelpers.getSymbol((ClassTree) t).getNestingKind();
      return nestingKind.equals(NestingKind.ANONYMOUS) || nestingKind.equals(NestingKind.LOCAL);
    }
    return false;
  }