Mutability (@NotNull PsiMethodImpl method, @NotNull MethodData data) { PsiType type = method.getReturnType(); if (type == null || ClassUtils.isImmutable(type, false)) return Mutability.UNKNOWN; MethodReturnInferenceResult result = data.getMethodReturn(); if (result == null) return Mutability.UNKNOWN; try { Mutability mutability = RecursionManager.doPreventingRecursion( method, true, () -> result.getMutability(method, data.methodBody(method))); return mutability == null ? Mutability.UNKNOWN : mutability; } catch (CannotRestoreExpressionException e) { throw ContractInferenceIndexKt.handleInconsistency(method, data, e); } }