Deceiving bugs

You see that a certain piece of code you just added doesn't work as expected. You change some lines, delete some, add some new ones, compile and run again... the behavior is changed, but still not what you desired. You use a debugger and dirty print statements to restrict the cause of the unwanted behavior to certain locations in the code... and spend the rest of the day making all kind of ...