How can I find the code that produces a certain error message (e.g. "Sorry, can not load CMS user account.")
This particular phrase appears to be in these files:

./CRM/Utils/System/Drupal.php
./CRM/Utils/System/Drupal6.php


Here are two ways you can search for specific phrases within the codebase:

1) GREP

Using this command from the base civicrm directory:

&gt;  grep -R "Sorry, can not load CMS user account." ./

2) GITHUB

And if you don't have a command line handy, you can do the same on the CiviCRM GitHub page with the "Search this repository" function at the top (using the quotation marks to search for the exact phrase):