boolean ( PsiForStatement forStatement, PsiMethod method) { final PsiStatement initialization = forStatement.getInitialization(); if (statementDefinitelyRecurses(initialization, method)) { return true; } final PsiExpression condition = forStatement.getCondition(); if (expressionDefinitelyRecurses(condition, method)) { return true; } final Object value = ExpressionUtils.computeConstantExpression(condition); if (value == Boolean.TRUE) { final PsiStatement body = forStatement.getBody(); return statementDefinitelyRecurses(body, method); } return false; }