void (@NotNull PsiMethodCallExpression expression) { final PsiMethodCallExpression other = getExpression(PsiMethodCallExpression.class, expression); if (other == null) return; final PsiReferenceExpression ref1 = expression.getMethodExpression(); final PsiReferenceExpression ref2 = other.getMethodExpression(); final PsiElement patternMethodName = ref1.getReferenceNameElement(); final MatchContext context = myMatchingVisitor.getMatchContext(); final boolean isTypedVar = context.getPattern().isTypedVar(patternMethodName); if (!isTypedVar && !myMatchingVisitor.setResult(myMatchingVisitor.matchText(patternMethodName, ref2.getReferenceNameElement()))) { return; } final PsiExpression patternQualifier = ref1.getQualifierExpression(); final PsiExpression matchedQualifier = ref2.getQualifierExpression(); if (!myMatchingVisitor.setResult(patternQualifier instanceof PsiThisExpression && matchedQualifier == null || myMatchingVisitor.matchOptionally(patternQualifier, matchedQualifier))) return; if (patternQualifier != null && matchedQualifier == null) { if (!myMatchingVisitor.setResult(matchImplicitQualifier(patternQualifier, other, context))) return; } if (!myMatchingVisitor.setResult(myMatchingVisitor.matchSons(expression.getArgumentList(), other.getArgumentList()))) return; if (!myMatchingVisitor.setResult(matchTypeParameters(expression, other))) return; if (isTypedVar) { myMatchingVisitor.setResult(myMatchingVisitor.handleTypedElement(patternMethodName, ref2.getReferenceNameElement())); } }