Recently, we had this strange problem with a particular smart client application at work. It happened when the user clicked the OK button on a specific form. Like all difficult bugs, it was impossible for us to replicate. We put a bunch of diagnostic scaffolding into the deployed executable; this provided a number of clues. We knew that the submitted data had duplicates, somehow, and this was throwing duplicate record exceptions in the API. After a week of head scratching and asking ourselves how this could possibly happen, a fellow developer had an simple idea: what if we double-click on the OK button? Sure enough, that second click was somehow getting through to the UI and causing the OK button code to execute twice.
This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2004/10/double-click-must-die.html