void (@NotNull PsiIfStatement statement) { super.visitIfStatement(statement); final PsiExpression outerCondition = statement.getCondition(); if (outerCondition == null || SideEffectChecker.mayHaveSideEffects(outerCondition)) { return; } final PsiIfStatement innerIf = IntroduceHolderFix.getDoubleCheckedLockingInnerIf(statement); if (innerIf == null) { return; } final PsiExpression innerCondition = innerIf.getCondition(); if (!EquivalenceChecker.getCanonicalPsiEquivalence().expressionsAreEquivalent(innerCondition, outerCondition)) { return; } final PsiField field = findCheckedField(innerCondition); if (field == null || field.hasModifierProperty(PsiModifier.FINAL)) { return; } if (field.hasModifierProperty(PsiModifier.VOLATILE) && PsiUtil.isLanguageLevel5OrHigher(statement)) { return; } registerStatementError(statement, field, innerIf, statement); }