Refactorings are program transformations which should preserve the program behavior. Consequently, we expect that during phases when there are mostly refactorings in the change history of a system, only few new bugs are introduced. For our case study we analyzed the version histories of several open source systems and reconstructed the refactorings performed. Furthermore, we obtained bug reports from various sources depending on the system. Based on this data we identify phases when the above hypothesis holds and those when it doesn’t. Categories and Subject Descriptors D.2.5 [Software Engineering]: Testing and Debugging; D.2.8 [Software Engineering]: Metrics General Terms Algorithms, Management, Measurement Keywords Refactoring, software evolution, reverse engineering, and reengineering