Rick Schaut of Microsoft's Mac Word team describes the long and tortuous process of squashing a bug in Microsoft Word. It took almost ten years to do.
This was no trivial bug either. In certain circumstances, if you were editing a Word document for a while (maybe an hour, maybe a few hours), making saves as you went, you could run into a "Disk is full" error, and be unable to save again. (The canonical workaround among Word users, as I recall, is to Select All and then copy and paste the entire contents of the document into a blank one.)
Anyway, it's a fascinating turn through how the bug was finally tracked down and eliminated for the now-shipping Word 2004 for Mac. (It originally appeared along with multiple undos in Word 6, in 1995.)
By the way, the problem still exists in the shipping versions of Word 2001 and Word X for Mac. The solution now—if you're making many edits to a document with headers and footers that have auto-updating fields in them (such as page numbers)—is to work in Normal View instead of Page Layout View.
It does not bode well for my pet-peeve Word list-numbering bug.