Read the API Documentation of StringBuffer, it includes an
indexOf method that takes a "start at this index" parameter. If you start after the previously found occurrence, you'll find the next one.
(If you modify the string at that location, you know how you've modified it and how that may effect the indexing. (i.e. inserted "rabid" before "dog" - adjust the index appropriately, start searching again there))