The bug was found due to observed behavior, not due to a code review.
Link to Original Source
In an interview with ZDNet, Ballmer said his biggest regret as CEO was in how Windows Vista was developed.
The aftermath of Vista is precisely when he should have resigned. CEOs of other tech companies have resigned for lesser debacles.