Solutions
> "...a hidden piece of code to be activated, ..."
> Why is the software not open-source, in that case?
Two problems with this. Just because the manufacturer opens the source doesn't actually mean the machine is running this source.
Secondly, the manufacturer claims the machines would not be reprogramable, so there may not be a way for a third party to verify the code on the machines.
I still agree they should demand open source, at least people will catch genuine coding errors. Better than security by obscurity.
I've long thought that all these issues could be solved the "NASA" way - tons of redundancy. Why not get 3 different vendor implementations to count the ballots?
All the votes would be counted by machine A, then go to B for recount, then C for another. Then look for statistical discrepancies and investigate those. You'll quickly find out which systems have bias - deliberate or accidental.
If the ballots are stamped with serial number before going into machines, then it would be possible to track exactly which ballots were disputed.
Heck, it would be possible to have one scanning machine, that is incapable of anything but scanning. All these images go into a feed bound for each vendor's scanning software. This would bring down the cost of duplicating the scanning hardware between vendors.
Why is this so hard to solve? Most of us have to solve much more difficult problems on a daily basis.