void (@NotNull PsiMethodCallExpression expression) { super.visitMethodCallExpression(expression); final PsiExpressionList argumentList = expression.getArgumentList(); if (argumentList.isEmpty()) { return; } final PsiReferenceExpression methodExpression = expression.getMethodExpression(); final boolean constructorCall = JavaPsiConstructorUtil.isConstructorCall(expression); final boolean superCall = PsiUtil.isJavaToken(methodExpression.getReferenceNameElement(), JavaTokenType.SUPER_KEYWORD); final PsiMethod method = PsiTreeUtil.getParentOfType(expression, PsiMethod.class, true); if (method == null || !constructorCall && !method.getName().equals(methodExpression.getReferenceName())) { return; } final PsiMethod targetMethod = expression.resolveMethod(); if (targetMethod == null) { return; } final PsiParameterList parameterList = targetMethod.getParameterList(); if (!superCall && parameterList.getParametersCount() <= method.getParameterList().getParametersCount()) { return; } final PsiClass containingClass = targetMethod.getContainingClass(); final PsiClass aClass = method.getContainingClass(); if (containingClass == null || aClass == null || containingClass != aClass && !aClass.isInheritor(containingClass, true)) { return; } if (m_ignoreOverridesOfLibraryMethods && targetMethod instanceof PsiCompiledElement) { return; } final PsiParameter[] parameters = parameterList.getParameters(); final PsiExpression[] arguments = argumentList.getExpressions(); for (int i = 0, length = Math.min(arguments.length, parameters.length); i < length; i++) { final PsiExpression argument = PsiUtil.skipParenthesizedExprDown(arguments[i]); if (!(argument instanceof PsiReferenceExpression referenceExpression)) { continue; } if (referenceExpression.getQualifierExpression() != null) { continue; } final PsiElement target = referenceExpression.resolve(); if (!(target instanceof PsiParameter targetParameter) || !(targetParameter.getDeclarationScope() instanceof PsiMethod)) { continue; } final PsiParameter parameter = parameters[i]; final String parameterName = parameter.getName(); if (m_ignoreSingleCharacterNames && parameterName.length() == 1) { continue; } if (targetParameter.getName().equals(parameterName) || !targetParameter.getType().equals(parameter.getType())) { continue; } int type = constructorCall ? superCall ? SUPER_CONSTRUCTOR : OVERLOADED_CONSTRUCTOR : OVERLOADED_METHOD; registerVariableError(targetParameter, parameterName, type); } }