code: public static void updateEnd(final Annotation annotation, final int end)
      {
          annotation.removeFromIndexes();
          annotation.setEnd(end);
          annotation.addToIndexes();
      }
docs: Sets the end value of the annotation, updating indexes appropriately
  
  @param annotation the annotation
  @param end        the new end value