The error message should be clearer

aka, which string was found multiple times? start or end?
should also probably use opencode lingo for cohesiveness (and because it works well):
Found multiple matches for oldString. Provide more surrounding lines in oldString to identify the correct match.