docs: String[] halfMatch(String text1, String text2) {
          if (options.getTimeout() <= 0) {
              // Don't risk returning a non-optimal diff if we have unlimited time.
              return null;
          }
          String longtext = text1.length() > text2.length() ? text1 : text2;
          String shorttext = text1.length() > text2.length() ? text2 : text1;
          if (longtext.length() < 4 || shorttext.length() * 2 < longtext.length()) {
              return null;  // Pointless.
          }
  
          // First check if the second quarter is the seed for a half-match.
          String[] hm1 = halfMatchI(longtext, shorttext,
                                         (longtext.length() + 3) / 4);
          // Check again based on the third quarter.
          String[] hm2 = halfMatchI(longtext, shorttext,
                                         (longtext.length() + 1) / 2);
          String[] hm;
          if (hm1 == null && hm2 == null) {
              return null;
          } else if (hm2 == null) {
              hm = hm1;
          } else if (hm1 == null) {
              hm = hm2;
          } else {
              // Both matched.  Select the longest.
              hm = hm1[4].length() > hm2[4].length() ? hm1 : hm2;
          }
  
          // A half-match was found, sort out the return data.
          if (text1.length() > text2.length()) {
              return hm;
              //return new String[]{hm[0], hm[1], hm[2], hm[3], hm[4]};
          } else {
              return new String[]{hm[2], hm[3], hm[0], hm[1], hm[4]};
          }
      }