boolean (@NotNull PsiField field) { // JLS 12.5. Creation of New Class Instances final PsiClass aClass = field.getContainingClass(); if (aClass == null) { return false; } final boolean isStatic = field.hasModifierProperty(PsiModifier.STATIC); final PsiClassInitializer[] initializers = aClass.getInitializers(); for (PsiClassInitializer classInitializer : initializers) { if (classInitializer.hasModifierProperty(PsiModifier.STATIC) == isStatic && classInitializer.getTextOffset() < field.getTextOffset() && VariableAccessUtils.variableIsAssigned(field, classInitializer)) { return true; } } return false; }