void (int index, @NotNull TextSection section) { synchronized (mySections) { mySections.add(index, section); for (Iterator<TextSection> iterator = mySections.iterator(); iterator.hasNext();) { TextSection textSection = iterator.next(); if (textSection == null) { LOG.error("index: " + index + " size: " + mySections.size()); iterator.remove(); } } } }