code: public static void copyParagraphAnnotations(JCas source, JCas target)
              throws IllegalArgumentException
      {
          if (!source.getDocumentText().equals(target.getDocumentText())) {
              throw new IllegalArgumentException(
                      "source.documentText and target.documentText are not equal");
          }
  
          Collection<Paragraph> targetParagraphs = JCasUtil.select(target, Paragraph.class);
          if (!targetParagraphs.isEmpty()) {
              throw new IllegalArgumentException("target already contains paragraph annotations");
          }
  
          for (Paragraph paragraph : JCasUtil.select(source, Paragraph.class)) {
              Paragraph paragraphCopy = new Paragraph(target);
              paragraphCopy.setBegin(paragraph.getBegin());
              paragraphCopy.setEnd(paragraph.getEnd());
              paragraphCopy.addToIndexes();
          }
      }
docs: Creates paragraph annotations in {@code target} by copying paragraphs from the {@code source}.
  
  @param source source jcas
  @param target target jcas
  @throws IllegalArgumentException if source text and target text are different or if target
  already contains paragraph annotations