private static @NotNull List<LineMarkerInfo<?>> mergeLineMarkers(@NotNull List<LineMarkerInfo<?>> markers, @NotNull Document document, int passId) {
    Int2ObjectMap<List<MergeableLineMarkerInfo<?>>> sameLineMarkers = new Int2ObjectLinkedOpenHashMap<>();
    List<LineMarkerInfo<?>> result = new ArrayList<>(markers.size());

    for (LineMarkerInfo<?> marker : markers) {
      if (marker instanceof MergeableLineMarkerInfo<?> mergeable) {
        int line = document.getLineNumber(marker.startOffset);
        List<MergeableLineMarkerInfo<?>> infos = sameLineMarkers.computeIfAbsent(line, __ -> new ArrayList<>());
        infos.add(mergeable);
      }
      else {
        result.add(marker);
      }
    }

    if (sameLineMarkers.isEmpty()) {
      return markers;
    }

    for (List<MergeableLineMarkerInfo<?>> value : sameLineMarkers.values()) {
      result.addAll(MergeableLineMarkerInfo.merge(value, passId));
    }
    return result;
  }
private static @NotNull List<LineMarkerInfo<?>> mergeLineMarkers(@NotNull List<LineMarkerInfo<?>> markers, @NotNull Document document, int passId)