code: public static Token findTokenByEndPosition(JCas jCas, int end)
      {
          for (Token token : JCasUtil.select(getInitialView(jCas), Token.class)) {
              if (token.getEnd() == end) {
                  return token;
              }
          }
  
          return null;
      }
docs: Returns token ending at the given position
  
  @param jCas jCas
  @param end  end
  @return Token or null