Match (@NotNull PsiMethodCallExpression methodCallExpression1, @NotNull PsiMethodCallExpression methodCallExpression2) { final PsiReferenceExpression methodExpression1 = methodCallExpression1.getMethodExpression(); final PsiReferenceExpression methodExpression2 = methodCallExpression2.getMethodExpression(); Match match = expressionsMatch(methodExpression1, methodExpression2); if (match.isExactMismatch()) { return EXACT_MISMATCH; } final PsiExpression[] args1 = methodCallExpression1.getArgumentList().getExpressions(); final PsiExpression[] args2 = methodCallExpression2.getArgumentList().getExpressions(); match = match.combine(labelElementsAreEquivalent(args1, args2, false)); if (args1.length != 0 && match.isPartialMatch()) { final PsiElement leftDiff = match.getLeftDiff(); final PsiExpression lastArg = args1[args1.length - 1]; if (Comparing.equal(leftDiff, lastArg)) { final PsiType type1 = lastArg.getType(); final PsiType type2 = args2[args2.length - 1].getType(); if (type2 instanceof PsiArrayType && !(type1 instanceof PsiArrayType)) { return EXACT_MISMATCH; } if (type1 instanceof PsiArrayType && !(type2 instanceof PsiArrayType)) { return EXACT_MISMATCH; } } } return match; }