code: public static Result failure(String input, boolean canStopMatching) {
          return new SimpleResult(false, input, null, null, canStopMatching);
      }
docs: Creates an instance of an unsuccessful match.
  @param input the input string.
  @param canStopMatching indicates whether matching operation can be stopped.
  @return the result object.