static int getWordHash(@NotNull CharSequence line, int start, int end, boolean caseSensitive) {
    if (useStrongerHash()) {
      // use stronger hash
      return caseSensitive ? StringUtil.stringHashCode(line, start, end) : StringUtil.stringHashCodeInsensitive(line, start, end);
    }
    else {
      // use more compact hash
      if (start == end) return 0;
      char firstChar = line.charAt(start);
      char lastChar = line.charAt(end - 1);
      if (!caseSensitive) {
        firstChar = StringUtil.toLowerCase(firstChar);
        lastChar = StringUtil.toLowerCase(lastChar);
      }
      return (firstChar << 8) + (lastChar << 4) + end - start;
    }
  }
static int getWordHash(@NotNull CharSequence line, int start, int end, boolean caseSensitive)