@Nullable
  private static @InspectionMessage String getConstraintProblem(PsiMethod method,
                                                                StandardMethodContract contract,
                                                                ValueConstraint constraint, PsiParameter parameter) {
    PsiType type = parameter.getType();
    switch (constraint) {
      case NULL_VALUE -> {
        if (type instanceof PsiPrimitiveType) {
          return JavaAnalysisBundle.message("inspection.contract.checker.primitive.parameter.nullability",
                                            parameter.getName(), type.getPresentableText(), constraint);
        }
        NullabilityAnnotationInfo info = NullableNotNullManager.getInstance(method.getProject()).findEffectiveNullabilityInfo(parameter);
        if (info != null && info.getNullability() == Nullability.NOT_NULL) {
          if (info.isInferred() && contract.getReturnValue().isFail()) {
            // null -> fail is ok if not-null was inferred
            return null;
          }
          return JavaAnalysisBundle.message(info.isInferred()
                                            ? "inspection.contract.checker.inferred.notnull.parameter.null"
                                            : "inspection.contract.checker.notnull.parameter.null",
                                            parameter.getName(), constraint);
        }
        return null;
      }
      case NOT_NULL_VALUE -> {
        if (type instanceof PsiPrimitiveType) {
          return JavaAnalysisBundle.message("inspection.contract.checker.primitive.parameter.nullability",
                                            parameter.getName(), type.getPresentableText(), constraint);
        }
        NullabilityAnnotationInfo info = NullableNotNullManager.getInstance(method.getProject()).findEffectiveNullabilityInfo(parameter);
        if (info != null && info.getNullability() == Nullability.NOT_NULL) {
          return JavaAnalysisBundle.message(info.isInferred()
                                            ? "inspection.contract.checker.inferred.notnull.parameter.notnull"
                                            : "inspection.contract.checker.notnull.parameter.notnull",
                                            parameter.getName(), constraint);
        }
        return null;
      }
      case TRUE_VALUE, FALSE_VALUE -> {
        if (!PsiTypes.booleanType().equals(type) && !type.equalsToText(CommonClassNames.JAVA_LANG_BOOLEAN)) {
          return JavaAnalysisBundle.message("inspection.contract.checker.boolean.condition.for.nonboolean.parameter",
                                            parameter.getName(), type.getPresentableText());
        }
        return null;
      }
      default -> {
        return null;
      }
    }
  }
@Nullable
  private static @InspectionMessage String getConstraintProblem(PsiMethod method,
                                                                StandardMethodContract contract,
                                                                ValueConstraint constraint, PsiParameter parameter)