State Machine Testing Problem

The Bug

Since the number of states to be checked can be assumed to be small, it makes sense to use a sequential search to find the transition for a given letter out of a given state.  This is done by comparing the state names and their transition characters.  The bug in this program is that it compares only the first letters of the state names rather than the entire names.  Thus, if two states start with the same first character, the transitions for one of them will be confused with the other.  A machine with two states that start with the same letter would be necessary to demonstrate the bug.