Given hindsight, it's always easier to ask for more tests or code comments. I guess the rule of thumb is that if the code is there, it most probably is there for a reason.<p>When something like this happens, it's always a series of oversights.<p>1. Someone forgot to add comments or test cases while writing the code (or perhaps he wrote it but people are not running the test cases before commits).<p>2. Someone else thought that the code is dead and deleted it (and skipped the test cases if there were some covering that particular scenario).<p>3. Either the person deleting the code didn't wait for the code review or code reviewers missed that as well. (If code reviews are non-existent, it's a disaster waiting to happen).<p>So in the hindsight, write comments, write test cases, run test cases and do code reviews carefully.