boolean (PsiReference reference) { final PsiElement element = reference.getElement(); if (PsiTreeUtil.getParentOfType(element, PsiSynchronizedStatement.class) != null) { return false; } final PsiMethod method = PsiTreeUtil.getParentOfType(element, PsiMethod.class); if (method == null) { return true; } if (method.hasModifierProperty(PsiModifier.SYNCHRONIZED)) { return false; } if (!method.hasModifierProperty(PsiModifier.PRIVATE)) { return true; } if (methodsAlwaysSynchronized.contains(method)) { return false; } return methodsNotAlwaysSynchronized.contains(method); }