Across this forum and external sources, I'm seeing two different formulas for "unordered sampling with replacement" and "stars and bars" combinatorics.
The first is $n+r-1 \choose r$, as suggested by https://math.stackexchange.com/a/923139/1510127, https://math.stackexchange.com/a/1894014/1510127, https://www.probabilitycourse.com/chapter2/2_1_4_unordered_with_replacement.php (though it later contradicts itself in a solution to a practice problem), and, more notably, Casella and Berger's Statistical Inference 2nd Edition, page 16. Casella and Berger, page 16
The second is $n+r-1 \choose r-1$, as suggested by Unordered Sampling With Replacement Intuition and, more notably, the official wikipedia article on stars and bars combinatorics.
Is there some nuance I'm missing out on? Are people using "unordered sampling with replacement" to refer to two different things?
**EDIT: thanks for the responses, everybody. What resolved my confusion was noting that in $n+r-1 \choose r$, $r$ refers to the size of a selection/sample, explicitly, thus framing the problem as a selection problem. Thus, an object being selected counts as a star. The sample space from which the selection is made is thus $n$, and this is the number of bins, 1 less of which is the number of bars.
OTOH, in $n+r-1 \choose r-1$, r refers to the number of bins, which you must then subtract 1 from to get the number of walls. Both use stars and bars, but, as alluded to below, the setup is different.**