Finally one I can answer. You are looking for thread_view (most of the way down in the code). Do the CtrlF keycombo for a text search of log_in_or_sign_up_to_reply.
Keep in mind that a lot of the text is contained in phrases. First search phrases for some of the text in the phrase to find the phrase . Copy the phrase and then search templates for that phrase.
1) search phrases for "you must log in"
2) results in log_in_or_sign-up_to_post and log_in_or_sign_up-to_reply
3) search templates for log_in_or_sign_up-to_reply
4) this takes you to thread_view
5) CtrlF for log_in_or_sign_up_to_reply highlights the text
If you want to change the text, you have to change it in the phrase, or better still make a custom phrase and put that phrase name into the template so that your custom phrase gets called.
Thanks must go to Yorick since he explained it to me. Try it a few times and you'll get the hang of it. I always wondered why search templates seemed hit and miss, but you need to search templates for the exact thing to have success.