I remember one time while I was snooping through the codes of the ODK Aggregate, I noticed that there were Java classes written specifically for making the field names become SNAKE_CASED.
I can't remember the exact file though but it is somewhere here in the source-code.