Your mother probably taught you to write unit test cases for all your code? She probably insisted that you should write a new test case for every reported bug? You probably wondered why, but still followed her advice like any dutiful child?
Now, the answer is here. With the help of Search Based Software Engineering (SBSE) and Genetic Programming (GP) some researchers have shown how you can use all your hard earned test cases to auto-fix your bugs.