I wonder how many defects there are in 1,000 lines of code for electronic voting machines? Perhaps open source would be of benefit there...
Voting machines security is much larger than the firmware running on it. What I seen as a good measure is to vote on the screen, get a printout,and then deposit that printout into a scanner. This way you have a paper trail and easy count.
In my experience commercial code is almost entirely developed by non-US programmers whereas Open-source code is heavily US programmers.