Match (@NotNull PsiDeclarationStatement statement1, @NotNull PsiDeclarationStatement statement2) { final PsiElement[] elements1 = statement1.getDeclaredElements(); final PsiElement[] elements2 = statement2.getDeclaredElements(); if (elements1.length != elements2.length) { return EXACT_MISMATCH; } for (int i = 0; i < elements1.length; i++) { final PsiElement element1 = elements1[i]; final PsiElement element2 = elements2[i]; if (!(element1 instanceof PsiLocalVariable) || !(element2 instanceof PsiLocalVariable) || !localVariablesAreEquivalent((PsiLocalVariable)element1, (PsiLocalVariable)element2).isExactMatch()) { return EXACT_MISMATCH; } } return EXACT_MATCH; }