PsiReferenceExpression (PsiExpression expression) { expression = PsiUtil.skipParenthesizedExprDown(expression); if (!(expression instanceof PsiReferenceExpression reference)) { return null; } final PsiElement referent = reference.resolve(); if (!(referent instanceof PsiField field)) { return null; } if (!field.hasModifierProperty(PsiModifier.VOLATILE)) { return null; } if (SynchronizationUtil.isInSynchronizedContext(reference)) { return null; } return (PsiReferenceExpression)expression; }