When Diomidis Spinellis built CScout, a refactoring C code browser capable of mapping the complexity introduced by the C preprocessor back into a project's original source code files, he discovered a bug that, ironically, required a serious refactoring of CScout. Learn from his experiences in his article.