                              n))]
                    [i (.substring a i) (.substring b i)]))
   (common-suffix [^String a ^String b]
-                 (let [a-length (.length a)
-                       b-length (.length b)
-                       n (Math/min a-length b-length)
-                       i (loop [i 1]
+                 (let [a-length (int (.length a))
+                       b-length (int (.length b))
+                       n (int (Math/min a-length b-length))
+                       i (loop [i (int 1)]
                            (if (<= i n)
                              (if (not= (.charAt a (- a-length i))
                                        (.charAt b (- b-length i)))

    (if (or (< long-count 4)
            (< (* short-count 2) long-count))
      nil
      (let [hm-second-q (half-match* long short (/ (+ long-count 3) 4))
            hm-third-q (half-match* long short (/ (+ long-count 1) 2))
            half-match (cond (and hm-second-q hm-third-q)
                             (if (> (count (first hm-second-q))
                                    (count (first hm-third-q)))


  java.lang.String
  (common-prefix [^String a ^String b]
                 (let [n (int (Math/min (.length a) (.length b)))
                       i (loop [i (int 0)]
                           (if (< i n)
                             (if (not= (.charAt a i) (.charAt b i))
                               i
