protected static QuickFixAction @NotNull [] getCommonFixes(@NotNull InspectionToolPresentation presentation,
                                                             CommonProblemDescriptor @NotNull [] descriptors) {
    Map<String, QuickFixAction> result = null;
    for (CommonProblemDescriptor d : descriptors) {
      QuickFix<?>[] fixes = d.getFixes();
      if (fixes == null || fixes.length == 0) continue;
      // Add LocalQuickFixWrapper-s for the first descriptor fixes
      if (result == null) {
        result = new LinkedHashMap<>();
        for (QuickFix<?> fix : fixes) {
          if (fix == null) continue;
          result.put(fix.getFamilyName(), new LocalQuickFixWrapper(fix, presentation.getToolWrapper()));
        }
      }
      // Remove non-shared fixes
      else {
        for (String familyName : new ArrayList<>(result.keySet())) {
          boolean isFound = false;
          for (QuickFix<?> fix : fixes) {
            if (fix == null) continue;
            if (familyName.equals(fix.getFamilyName())) {
              // Fixes of different classes with the same family name are joined in LocalQuickFixesWrapper
              isFound = true;
              final QuickFixAction quickFixAction = result.get(fix.getFamilyName());
              if (quickFixAction instanceof LocalQuickFixesWrapper) {
                ((LocalQuickFixesWrapper)quickFixAction).addFixAction(fix, presentation.getToolWrapper());
              } else {
                assert quickFixAction instanceof LocalQuickFixWrapper;
                result.remove(fix.getFamilyName());

                @NlsActions.ActionText String fixActionText;
                try {
                  fixActionText = fix.getFamilyName();
                }
                catch (AbstractMethodError e) {
                  fixActionText = LangBundle.message("action.name.not.available.text");
                }
                final var commonWrapper = new LocalQuickFixesWrapper(fixActionText,
                                                                     List.of(((LocalQuickFixWrapper)quickFixAction).getFix(), fix),
                                                                     presentation.getToolWrapper());
                result.put(fix.getFamilyName(), commonWrapper);
              }
              break;
            }
          }
          if (!isFound) {
            result.remove(familyName);
            if (result.isEmpty()) {
              return QuickFixAction.EMPTY;
            }
          }
        }
      }
    }
    return result == null || result.isEmpty() ? QuickFixAction.EMPTY : result.values().toArray(QuickFixAction.EMPTY);
  }
protected static QuickFixAction @NotNull [] getCommonFixes(@NotNull InspectionToolPresentation presentation,
                                                             CommonProblemDescriptor @NotNull [] descriptors)