void (@NotNull PsiReferenceExpression ref) { super.visitReferenceExpression(ref); final PsiExpression qualifier = ref.getQualifierExpression(); if (qualifier != null && !(qualifier instanceof PsiThisExpression)) { return; } final PsiElement element = ref.resolve(); if (!(element instanceof PsiField)) { return; } if (m_inInitializer) { return; } if (m_inSynchronizedContextCount > 0) { m_synchronizedAccesses.add((PsiField)element); } else if (ref.getParent() instanceof PsiSynchronizedStatement) { //covers the very specific case of a field reference being directly // used as a lock m_synchronizedAccesses.add((PsiField)element); } else { m_unsynchronizedAccesses.add((PsiField)element); } }