Bobby Shaftoe is a central character in the World War II part of Cryptonomicon, and it seems quite likely to me that Neal Stephenson chose the name because of the nursery rhyme. He is a Marine who, after Guadalcanal, is assigned to Detachment 2702 to help prevent the German and Japanese intelligence from finding out their codes have been broken. He is the father of the character of Doug Shaftoe, with Glory Altamira. He was addicted to morphine for a large part of the book, until Enoch Root cured him. He tries to tell almost everyone he meets about a large green lizard he says he saw eat a Japanese soldier at Guadalcanal, and has frequent nightmares about.

Quote, said to General MacArthur:
"I've killed more Nips than seismic activity. I'm trained to jump out of airplanes. I speak a little Nip, I can survive in the jungle. I know Manila like the back of my hand. My wife and child are there. And I'm kinda at loose ends. Sir!"