boolean (@NotNull PsiElement element, @NotNull PsiExpression target) { final PsiSynchronizedStatement synchronizedStatement = PsiTreeUtil.getParentOfType(element, PsiSynchronizedStatement.class); if (synchronizedStatement == null) { return false; } final PsiExpression lockExpression = PsiUtil.skipParenthesizedExprDown(synchronizedStatement.getLockExpression()); final EquivalenceChecker checker = EquivalenceChecker.getCanonicalPsiEquivalence(); return checker.expressionsAreEquivalent(lockExpression, target) || isSynchronizedOn(synchronizedStatement, target); }