boolean (@NotNull PsiForStatement forStatement, @NotNull PsiVariable variable, int stamp, @NotNull Set<MethodSignature> checkedMethods) { final PsiStatement initialization = forStatement.getInitialization(); if (statementAssignsVariable(initialization, variable, stamp, checkedMethods)) { return true; } final PsiExpression condition = forStatement.getCondition(); if (expressionAssignsVariable(condition, variable, stamp, checkedMethods)) { return true; } if (BoolUtils.isTrue(condition)) { final PsiStatement body = forStatement.getBody(); if (statementAssignsVariable(body, variable, stamp, checkedMethods)) { return true; } final PsiStatement update = forStatement.getUpdate(); if (statementAssignsVariable(update, variable, stamp, checkedMethods)) { return true; } } return false; }