boolean (PsiExpression call) { if (!(call instanceof PsiMethodCallExpression callExpression)) { return false; } if (!KNOWN_ARGUMENT_SIDE_EFFECTS.test(callExpression)) { return false; } PsiMethod method = PsiTreeUtil.getParentOfType(call, PsiMethod.class); if (method == null) { return false; } PsiExpressionList list = callExpression.getArgumentList(); for (PsiExpression argument : list.getExpressions()) { if (TypeConversionUtil.isPrimitiveAndNotNullOrWrapper(argument.getType())) { continue; } if (argument instanceof PsiReferenceExpression referenceExpression && referenceExpression.resolve() instanceof PsiVariable variable) { List<PsiReferenceExpression> references = VariableAccessUtils.getVariableReferences(variable, method); if (ContainerUtil.exists(references, ref -> ref.getTextOffset() > argument.getTextOffset())) { return true; } } } return false; }