void (@NotNull PsiStatement statement) { super.visitStatement(statement); final PsiMethod containingMethod = PsiTreeUtil.getParentOfType(statement, PsiMethod.class, true, PsiClass.class, PsiLambdaExpression.class); if (containingMethod == null) { return; } final PsiMethodCallExpression tailCall = getTailCall(statement, containingMethod); if (tailCall == null) { return; } final PsiReferenceExpression methodExpression = tailCall.getMethodExpression(); final PsiExpression qualifier = PsiUtil.skipParenthesizedExprDown(methodExpression.getQualifierExpression()); if (qualifier != null && !(qualifier instanceof PsiThisExpression) && MethodUtils.isOverridden(containingMethod)) { return; } registerMethodCallError(tailCall, containingMethod); }