boolean (PsiIfStatement ifStatement, PsiField field) { if (ifStatement.getElseBranch() != null) { return false; } final PsiStatement thenBranch = ifStatement.getThenBranch(); if (thenBranch == null) { return false; } final PsiStatement statement = ControlFlowUtils.stripBraces(thenBranch); if (!(statement instanceof PsiExpressionStatement expressionStatement)) { return false; } return isSimpleAssignment(expressionStatement, field); }