void (PsiIfStatement statement, Set<? super PsiExpression> conditions, int depth) { if (depth > LIMIT_DEPTH || !myAnalyzedStatements.add(statement)) return; final PsiExpression condition = statement.getCondition(); collectConditionsForExpression(condition, conditions, JavaTokenType.OROR); final PsiStatement branch = ControlFlowUtils.stripBraces(statement.getElseBranch()); if (branch instanceof PsiIfStatement) { collectConditionsForIfStatement((PsiIfStatement)branch, conditions, depth + 1); } if (branch == null) { final PsiStatement thenBranch = statement.getThenBranch(); if (ControlFlowUtils.statementMayCompleteNormally(thenBranch)) return; PsiElement next = PsiTreeUtil.skipWhitespacesAndCommentsForward(statement); if (next instanceof PsiIfStatement) { collectConditionsForIfStatement((PsiIfStatement)next, conditions, depth + 1); } } }