private static boolean isWordEnd(int offset, CharSequence sequence) {
    if (offset == sequence.length()) {
      return true;
    }

    return !Character.isJavaIdentifierPart(sequence.charAt(offset - 1)) || !Character.isJavaIdentifierPart(sequence.charAt(offset));
  }
private static boolean isWordEnd(int offset, CharSequence sequence)