@Override
  public CommonProblemDescriptor @Nullable [] checkElement(@NotNull RefEntity refEntity,
                                                           @NotNull AnalysisScope scope,
                                                           @NotNull InspectionManager manager,
                                                           @NotNull GlobalInspectionContext globalContext,
                                                           @NotNull ProblemDescriptionsProcessor processor) {
    if (!(refEntity instanceof RefMethod refMethod)) {
      return null;
    }

    if (!isBodyEmpty(refMethod)) return null;
    if (refMethod.isConstructor()) return null;
    if (refMethod.isSyntheticJSP()) return null;

    for (RefMethod refSuper : refMethod.getSuperMethods()) {
      if (checkElement(refSuper, scope, manager, globalContext, processor) != null) return null;
    }

    String message = null;
    boolean needToDeleteHierarchy = false;
    RefMethod refSuper = findSuperWithBody(refMethod);
    if (refMethod.isOnlyCallsSuper() && !refMethod.isFinal()) {
      final RefJavaUtil refUtil = RefJavaUtil.getInstance();
      if (refSuper != null && Comparing.strEqual(refMethod.getAccessModifier(), refSuper.getAccessModifier())){
        if (Comparing.strEqual(refSuper.getAccessModifier(), PsiModifier.PROTECTED) //protected modificator gives access to method in another package
            && !Comparing.strEqual(refUtil.getPackageName(refSuper), refUtil.getPackageName(refMethod))) return null;
        PsiModifierListOwner javaPsi = getAsJavaPsi(refMethod);
        if (javaPsi != null) {
          final PsiModifierList list = javaPsi.getModifierList();
          if (list != null) {
            final PsiModifierListOwner supMethod = getAsJavaPsi(refSuper);
            if (supMethod != null) {
              final PsiModifierList superModifiedList = supMethod.getModifierList();
              LOG.assertTrue(superModifiedList != null);
              if (list.hasModifierProperty(PsiModifier.SYNCHRONIZED) && !superModifiedList.hasModifierProperty(PsiModifier.SYNCHRONIZED)) {
                return null;
              }
            }
          }
        }
      }
      if (refSuper == null || refUtil.compareAccess(refMethod.getAccessModifier(), refSuper.getAccessModifier()) <= 0) {
        message = JvmAnalysisBundle.message("inspection.empty.method.problem.descriptor");
      }
    }
    else if (refMethod.hasBody() && hasEmptySuperImplementation(refMethod)) {
      message = JvmAnalysisBundle.message("inspection.empty.method.problem.descriptor1");
    }
    else if (refSuper == null && areAllImplementationsEmpty(refMethod)) {
      if (refMethod.hasBody()) {
        if (refMethod.getDerivedMethods().isEmpty()) {
          if (refMethod.getSuperMethods().isEmpty()) {
            message = JvmAnalysisBundle.message("inspection.empty.method.problem.descriptor2");
          }
        }
        else {
          needToDeleteHierarchy = true;
          message = JvmAnalysisBundle.message("inspection.empty.method.problem.descriptor3");
        }
      }
      else {
        if (!refMethod.getDerivedReferences().isEmpty()) {
          needToDeleteHierarchy = true;
          message = JvmAnalysisBundle.message("inspection.empty.method.problem.descriptor4");
        }
      }
    }

    if (message != null) {
      final ArrayList<LocalQuickFix> fixes = new ArrayList<>();
      fixes.add(getFix(processor, needToDeleteHierarchy));
      if (globalContext instanceof GlobalInspectionContextBase globalInspectionContextBase &&
          globalInspectionContextBase.getCurrentProfile().getSingleTool() == null) {
        PsiElement psi = refMethod.getPsiElement();
        if (psi instanceof PsiModifierListOwner owner) {
          SpecialAnnotationsUtilBase.processUnknownAnnotations(owner, qualifiedName -> {
            fixes.add(new AddToInspectionOptionListFix<>(
              this, 
              QuickFixBundle.message("fix.add.special.annotation.text", qualifiedName),
              qualifiedName, insp -> insp.EXCLUDE_ANNOS));
            return true;
          });
        }
      }

      PsiElement anchor = UDeclarationKt.getAnchorPsi(refMethod.getUastElement());
      if (anchor != null) {
        final ProblemDescriptor descriptor = manager.createProblemDescriptor(anchor, message, false,
                                                                             fixes.toArray(LocalQuickFix.EMPTY_ARRAY),
                                                                             ProblemHighlightType.GENERIC_ERROR_OR_WARNING);
        return new ProblemDescriptor[]{descriptor};
      }
    }

    return null;
  }
@Override
  public CommonProblemDescriptor @Nullable [] checkElement(@NotNull RefEntity refEntity,
                                                           @NotNull AnalysisScope scope,
                                                           @NotNull InspectionManager manager,
                                                           @NotNull GlobalInspectionContext globalContext,
                                                           @NotNull ProblemDescriptionsProcessor processor)