private LevelAndCount @NotNull [] compute() {
      Object2IntMap<HighlightDisplayLevel> counter=new Object2IntOpenHashMap<>();
      visitProblemSeverities(counter);
      LevelAndCount[] arr = new LevelAndCount[counter.size()];
      int i = 0;
      for (Object2IntMap.Entry<HighlightDisplayLevel> entry : counter.object2IntEntrySet()) {
        arr[i++] = new LevelAndCount(entry.getKey(), entry.getIntValue());
      }
      Comparator<LevelAndCount> comparator =
        Comparator.<LevelAndCount, HighlightSeverity>comparing(levelAndCount -> levelAndCount.getLevel().getSeverity()).reversed();
      Arrays.sort(arr, comparator);
      return doesNeedInternProblemLevels() ? LEVEL_AND_COUNT_INTERNER.intern(arr) : arr;
    }
private LevelAndCount @NotNull [] compute()