tests if s[i:i + k] equals t[j:j + k]
429792
def matches(s, t, i, j, k):
    """"""
    for d in range(k):
        if s[i + d] != t[j + d]:
            return False
    return True
1157084
@SuppressWarnings("unchecked")
    protected boolean join(int i, int j) {
        if (((Comparable<? super K>) array[j]).compareTo(array[i]) < 0) {
            K tmp = array[i];
            array[i] = array[j];
            array[j] = tmp;
            reverse.flip(j);
            return false;
        }
        return true;
    }
530129
@Override
  protected boolean equalElements(KTypeVTypeHashMap<?, ?> other) {
    if (other.size() != size()) {
      return false;
    }

    Iterator<? extends KTypeVTypeCursor<?, ?>> i = other.iterator();
    while (i.hasNext()) {
      KTypeVTypeCursor<?, ?> c = i.next();
      KType key = Intrinsics.<KType> cast(c.key);
      if (!containsKey(key) ||
          !equals(get(key), c.value)) {   // Compare values using the same function as keys.
        return false;
      }
    }

    return true;
  }
318222
private void ins(int k)
	{

		//if(last > 0)    last = sapp[-1] += k;
		//else            last = *sapp++ = (k);
		if(last > 0)    last = sapp[sappPos-1]   +=  k;
		else            last = sapp[(sappPos++)]  = (k);
	}
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;
    }
219792
public boolean compareAndPut(V testValue, K key, V value)
  {
    V result = compareAndPut(testValue, key, value, true);

    return testValue == result;
  }
870502
def _equals(v1_indices, v1_values, v2_indices, v2_values):
        
        v1_size = len(v1_values)
        v2_size = len(v2_values)
        k1 = 0
        k2 = 0
        all_equal = True
        while all_equal:
            while k1 < v1_size and v1_values[k1] == 0:
                k1 += 1
            while k2 < v2_size and v2_values[k2] == 0:
                k2 += 1

            if k1 >= v1_size or k2 >= v2_size:
                return k1 >= v1_size and k2 >= v2_size

            all_equal = v1_indices[k1] == v2_indices[k2] and v1_values[k1] == v2_values[k2]
            k1 += 1
            k2 += 1
        return all_equal
275718
def ismatch(self, s):
        
        if self._ismatchfun(s) and self._compiled_pattern.match(s):
            return True
        return False
1364818
private static boolean contentEquals(String s, char[] chars, int start, int length) {
		if (s.length() != length) {
			return false;
		}
		for (int i = 0; i < length; i++) {
			if (chars[start + i] != s.charAt(i)) {
				return false;
			}
		}
		return true;
	}
14832
def is_equal(self, other):
        
        if not isinstance(other, DictCell):
            return False
        for (this, that) in itertools.izip_longest(self, other):
            if this[0] != that[0]:
                # compare key names
                return False
            if not this[1].is_equal(that[1]):
                # compare cells
                return False
        return True
639264
private final boolean doublec(int j) {
		if (j < k0 + 1)
			return false;
		if (b[j] != b[j - 1])
			return false;
		return cons(j);
	}
190126
function sameValues(a, b) {
  var
    i = a.length,
    j = b.length,
    k = i === j
  ;
  if (k) {
    while (i--) {
      if (a[i] !== b[i]) {
        return !k;
      }
    }
  }
  return k;
}
1156218
function (s, r) {
        var i, l
        for (i = 0, l = this.length; i < l; i++) {
          if (nw.match(this[i], s, r)) {
            return true
          }
        }
        return false
      }
1111533
function equals(x, y) {
  var i;
  var k=x.length<y.length ? x.length : y.length;
  for (i=0; i<k; i++)
    if (x[i]!=y[i])
      return 0;
  if (x.length>y.length) {
    for (;i<x.length; i++)
      if (x[i])
        return 0;
  } else {
    for (;i<y.length; i++)
      if (y[i])
        return 0;
  }
  return 1;
}
8059
private int compare(Object k1, Object k2) {
        return (mComparator==null ? ((Comparable)k1).compareTo(k2)
                : mComparator.compare(k1, k2));
    }
1059892
public static <T> boolean isIn(T t, T... ts) {
        if (isNotNull(t) && isNotNull(ts)) {
            for (Object object : ts) {
                if (t.equals(object)) {
                    return true;
                }
            }
        }
        return false;
    }
739336
function containsObj (a, b) {
  return Object.keys(a).reduce((r, k) => {
    return r && R.equals(a[k], b[k]);
  }, true);
}