@Override
  @NotNull
  public PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly) {
    return new JavaElementVisitor() {
      @Override
      public void visitMethodCallExpression(@NotNull PsiMethodCallExpression call) {
        if (!STREAM_COUNT.test(call)) return;
        PsiMethodCallExpression qualifierCall = MethodCallUtils.getQualifierMethodCall(call);
        if (!MAPPING_CALL.test(qualifierCall)) return;
        PsiReferenceExpression ref = qualifierCall.getMethodExpression();
        PsiElement anchor = Objects.requireNonNull(ref.getReferenceNameElement());
        String name = Objects.requireNonNull(ref.getReferenceName());
        holder.registerProblem(anchor, JavaBundle.message("inspection.mapping.before.count.message", name),
                               new RedundantStreamOptionalCallInspection.RemoveCallFix(name));
      }
    };
  }
@Override
  @NotNull
  public PsiElementVisitor buildVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly)