private MappedRange @NotNull [] insert(MappedRange @NotNull [] array,
                                           MappedRange @NotNull [] insertArray,
                                           int startIndex,
                                           int insertLength) {
      MappedRange[] newArray = LayeredLexerEditorHighlighter.reallocateArray(array, mySegmentCount + insertLength);
      if (startIndex < mySegmentCount) {
        System.arraycopy(newArray, startIndex, newArray, startIndex + insertLength, mySegmentCount - startIndex);
      }
      System.arraycopy(insertArray, 0, newArray, startIndex, insertLength);
      return newArray;
    }
private MappedRange @NotNull [] insert(MappedRange @NotNull [] array,
                                           MappedRange @NotNull [] insertArray,
                                           int startIndex,
                                           int insertLength)