code: public List<Mistake> checkText(String text) {
      List<Mistake> mistakes = null;
      try {
        mistakes = analyseAndCheckText(text).mistakes;
      } catch (IndexOutOfBoundsException e) {
        LOGGER.fatal("Failed to process text: " + text, e);
        throw new RuntimeException(e);
      }
      return mistakes;
  
    }
docs: /*
  (non-Javadoc)
  
  @see
  br.usp.pcs.lta.cogroo.grammarchecker.CogrooI#checkText(java.lang.String)