boolean ( PsiIfStatement ifStatement, PsiMethod method) { final PsiExpression test = ifStatement.getCondition(); if (expressionDefinitelyRecurses(test, method)) { return false; } final PsiStatement thenBranch = ifStatement.getThenBranch(); if (statementMayReturnBeforeRecursing(thenBranch, method)) { return true; } final PsiStatement elseBranch = ifStatement.getElseBranch(); return elseBranch != null && statementMayReturnBeforeRecursing(elseBranch, method); }