PsiStatement (PsiIfStatement ifStatement) { PsiStatement branch = ControlFlowUtils.stripBraces(ifStatement.getElseBranch()); if (branch != null) return branch; PsiStatement thenBranch = ControlFlowUtils.stripBraces(ifStatement.getThenBranch()); if (!(thenBranch instanceof PsiReturnStatement)) return null; PsiElement next = PsiTreeUtil.skipWhitespacesAndCommentsForward(ifStatement); return tryCast(next, PsiStatement.class); }