code: public static String inspect(Annotation a) {
  
          final int begin = 40, after = 50;
          try {
              JCas jCas = a.getCAS().getJCas();
  
              String text = jCas.getDocumentText();
  
              StringBuilder sb = new StringBuilder();
              if (a.getBegin() - begin < 0) {
                  for (int i = 0; i < (begin - a.getBegin()); i++) {
                      sb.append(' ');
                  }
                  sb.append(text.substring(0, a.getBegin()));
              } else {
                  sb.append(text.substring(a.getBegin() - begin, a.getBegin()));
              }
              sb.append('{');
              sb.append(a.getCoveredText());
              sb.append('}');
  
              if (a.getEnd() < text.length()) {
                  sb.append(text.substring(a.getEnd(),
                          Math.min(a.getEnd() + after, text.length())));
              }
  
              sb.append("[pmid:" + getHeaderIntDocId(jCas) + ", " + a.getBegin()
                      + ":" + a.getEnd() + "]");
  
              return sb.toString();
  
          } catch (Throwable e) {
              e.printStackTrace();
              return "";
          }
      }
docs: Util to print an annotation for inspection.Prints some text before and
  after this annotation, and add '{', '}' around the annotation text.
  
  @return