private int findFirstLineWithTag() {
    for (int i = 0; i < myOriginalDocString.getLineCount(); i++) {
      final Substring line = myOriginalDocString.getLine(i);
      if (line.trimLeft().startsWith(myTagPrefix)) {
        return i;
      }
    }
    return -1;
  }
private int findFirstLineWithTag()