Tweak traverseUpstream documentation and code style

Change-Id: I5438cb8bba8eca9395764e555f96dcdd4919ea21
Merge "Tweak traverseUpstream documentation and code style"