I agree with Matt that there's no fixed standard about which romanization scheme to use. My guess is that it depends on the project, author, term and the author's swing of mood at the moment, just as in any other context of Japanese romanization.
[Personal point-of-view] If I were to use a Japanese variable name, I'd use Hepburn-style romanization, because it feels more phonetically consistent. However, when typing hiragana/kanji text through an IME, I mostly use Nihon-shiki to save keystrokes.
Now be warned, my point-of-view can be biased, especially the first part, according to my work-partner. Let me share his story here.
I first asked him why his code is entirely in English, although he's not very fluent in it. He answered:
That's because at the first company I worked for, about ten or more years ago, the predominant attitude toward Japanese naming in source code was "embarrassing." (はずかしい)
To be precise, there were two groups of programmers in the game industry then:
(1) Those who habitually used Japanese. (2) Those who thought it embarrassing. I don't know but there seemed to be a trend going against using Japanese among the younger programmers around that time.
Me: Were there any fixed way to romanize those Japanese variables? Like
Yeah, they used
tu [Nihon-shiki] exclusively. I think that's all they knew, what they learned at school. [*]
Me: But what about
fuga, as in
piyo? (Common metasyntactic variable names among Japanese programmers.) Shouldn't it be
huga, if you want to be consistent?
Ah, these came from an entirely different class of programmers, those who'd been in the field for ages, near-bilingual, programming-language-lovers. They know English, they're very careful about spelling. We [game programmers] didn't know or care about these meta-vars. We'd just use
a if we needed a placeholder.
So to recap, any of the following can affect the choice of romanization scheme: perceived phonetical consistency, keystroke efficiency, local culture, school curriculum, or convention. (Again be warned that this nice-looking summary is the result of a survey with a sample count of only 2.)
[*] Kunrei-shiki, a variant of Nihon-shiki, in fact, is the one taught in elementary schools. ref: wikipedia