PatchFile.Entry stores the left side file (or 'old name') as null when
the filename is unchanged. In most cases it is null since renaming a
file is rather uncommon compared to simply modifying a file.
The CommentSender attempts to get the comment context from the entry,
and when a comment was added on the left side, it resulted in an empty
string being used.
The test in CommentsIT was not exposing this bug because it creates a
change with a new file, and thus there isn't actually a left side to
add comments to because there wasn't a previous version of it. So when
the CommentSender tried to get the left side, it ended up with an
IndexOutOfBoundsException and defaulted to an empty string for the
context.
This could also be observed in the debug logs while running the tests:
"Failed to get line number 2 of file on side 0"
Fix it so that when the old name is null, the new name is used instead.
Update the tests to use explicit ranges, and modify the expected output
to include the context on the left hand side.
Bug: Issue 11106
Change-Id: Ia917c48975b10db230b35600bebad04faabe093c