boolean (PsiExpression expr1, PsiExpression expr2) { if (expr1 == null && expr2 == null) return true; if (!(expr1 instanceof PsiReferenceExpression ref1) || !(expr2 instanceof PsiReferenceExpression ref2)) return false; return Objects.equals(ref1.getReferenceName(), ref2.getReferenceName()) && sameReference(ref1.getQualifierExpression(), ref2.getQualifierExpression()); }