private static @Nullable String generateHeuristicDoubledFinalConsonantPastParticiple(String verb) {
    int length = verb.length();
    if (length < 3) return null;
    char c1 = toLowerCase(verb.charAt(length - 1));
    if (c1 != 'x' && c1 != 'y' && c1 != 'w') {
      char c2 = toLowerCase(verb.charAt(length - 2));
      if (!isVowel(c1) && isVowel(c2)) {
        char c3 = toLowerCase(verb.charAt(length - 3));
        if (!isVowel(c3) || c3 == 'y') {
          if (length == 3 || length == 4 && !isVowel(toLowerCase(verb.charAt(0))) ||
              length == 5 && !isVowel(toLowerCase(verb.charAt(0))) && !isVowel(toLowerCase(verb.charAt(1)))) {
            return verb + c1 + "ed";
          }
        }
        else if (length > 3 && c3 == 'u' && toLowerCase(verb.charAt(length - 4)) == 'q') {
          return verb + c1 + "ed";
        }
      }
    }
    return null;
  }
private static @Nullable String generateHeuristicDoubledFinalConsonantPastParticiple(String verb)