@Override
  public ProblemDescriptor @Nullable [] checkMethod(@NotNull PsiMethod method, @NotNull InspectionManager manager, boolean isOnTheFly) {
    if (!PsiTypes.booleanType().equals(method.getReturnType()) || MethodUtils.hasSuper(method) || RefUtil.isImplicitRead(method)) return null;

    int[] usageCount = {0};
    if (!UnusedSymbolUtil.processUsages(manager.getProject(), method.getContainingFile(), method, null, u -> {
      PsiElement element = u.getElement();
      if (!(element instanceof PsiReferenceExpression)) return false;
      PsiMethodCallExpression methodCallExpression = ObjectUtils.tryCast(element.getParent(), PsiMethodCallExpression.class);
      if (methodCallExpression == null) return false;
      final PsiMethod containingMethod = PsiTreeUtil.getParentOfType(methodCallExpression, PsiMethod.class, true, PsiMember.class);
      boolean isInverted = BooleanMethodIsAlwaysInvertedInspection.isInvertedMethodCall(methodCallExpression, containingMethod);
      if (isInverted) {
        usageCount[0]++;
        return true;
      } else {
        return false;
      }
    })) {
      return null;
    }
    if (usageCount[0] < 2) return null;
    final PsiIdentifier identifier = method.getNameIdentifier();
    if (identifier == null) return null;
    return new ProblemDescriptor[] { myGlobalTool.createProblemDescriptor(manager, identifier, isOnTheFly) };
  }
@Override
  public ProblemDescriptor @Nullable [] checkMethod(@NotNull PsiMethod method, @NotNull InspectionManager manager, boolean isOnTheFly)