@Override
  public CommonProblemDescriptor @Nullable [] checkElement(final @NotNull RefEntity refEntity,
                                                           final @NotNull AnalysisScope scope,
                                                           final @NotNull InspectionManager manager,
                                                           final @NotNull GlobalInspectionContext globalContext,
                                                           final @NotNull ProblemDescriptionsProcessor processor) {
    if (!(refEntity instanceof RefMethod refMethod)) return null;
    if (refMethod.isSyntheticJSP()) return null;
    if (refMethod.isExternalOverride()) return null;
    if (!(refMethod.isStatic() || refMethod.isConstructor()) && !refMethod.getSuperMethods().isEmpty()) return null;
    RefClass aClass = refMethod.getOwnerClass();
    if (aClass != null && ((refMethod.isAbstract() || aClass.isInterface()) && refMethod.getDerivedReferences().isEmpty())) {
      return null;
    }
    List<RefParameter> unusedParameters = getUnusedParameters(refMethod);
    if (unusedParameters.isEmpty()) return null;
    UMethod uMethod = refMethod.getUastElement();
    if (uMethod == null) return null;
    PsiElement element = uMethod.getJavaPsi();
    if (refMethod.isAppMain()) {
      if (!element.getLanguage().isKindOf("kotlin")) return null;
    }
    else if (refMethod.isEntry()) return null;
    if (EntryPointsManager.getInstance(manager.getProject()).isEntryPoint(element)) return null;

    List<ProblemDescriptor> result = new ArrayList<>();
    for (RefParameter refParameter : unusedParameters) {
      UParameter parameter = refParameter.getUastElement();
      PsiElement anchor = UElementKt.getSourcePsiElement(parameter.getUastAnchor());
      if (anchor != null) {
        final List<LocalQuickFix> fixes = new ArrayList<>(2);
        fixes.add(new AcceptSuggested(refParameter.getName()));
        PsiElement parent = anchor.getParent();
        if (parent instanceof PsiVariable) {
          fixes.add(LocalQuickFix.from(RenameToIgnoredFix.createRenameToIgnoreFix((PsiVariable)parent, true)));
        }
        String message;
        if (refMethod.isAbstract()) {
          message = JavaBundle.message("inspection.unused.parameter.composer");
        }
        else if (refMethod.getDerivedMethods().isEmpty()) {
          message = JavaBundle.message("inspection.unused.parameter.problem.descriptor");
        }
        else {
          message = JavaBundle.message("inspection.unused.parameter.composer1");
        }
        result.add(manager.createProblemDescriptor(anchor,
                                                   message,
                                                   fixes.toArray(LocalQuickFix.EMPTY_ARRAY),
                                                   ProblemHighlightType.GENERIC_ERROR_OR_WARNING, false));
      }
    }
    return result.toArray(CommonProblemDescriptor.EMPTY_ARRAY);
  }
@Override
  public CommonProblemDescriptor @Nullable [] checkElement(final @NotNull RefEntity refEntity,
                                                           final @NotNull AnalysisScope scope,
                                                           final @NotNull InspectionManager manager,
                                                           final @NotNull GlobalInspectionContext globalContext,
                                                           final @NotNull ProblemDescriptionsProcessor processor)