Integer (@NotNull PsiExpressionList expressionList, @NotNull PsiReferenceExpression reference) { PsiElement grandParent = expressionList.getParent(); if (!(grandParent instanceof PsiCallExpression callExpression)) return null; PsiExpression[] arguments = expressionList.getExpressions(); int argumentsIndex = ArrayUtil.indexOf(arguments, reference); if (argumentsIndex == -1) return null; PsiMethod method = callExpression.resolveMethod(); if (method == null) return null; if (!changedCallResolvesToSameMethod(callExpression, arguments[argumentsIndex], method)) return null; PsiParameter[] parameters = method.getParameterList().getParameters(); int parameterIndex = parameters.length < argumentsIndex + 1 ? parameters.length - 1 : argumentsIndex; if (parameterIndex < 0) return null; PsiParameter parameter = parameters[parameterIndex]; PsiType type = parameter.getType(); return type instanceof PsiPrimitiveType ? -1 : 1; }