The quote below is taken from the MOOC I am following on BerkeleyX which is called CS.169.2x Software as a Service, part 2 (Refactoring and Legacy):
"... or we could do it the more principled way which is cover and modify, which means, let good test coverage be your security blanket. If you've got a good test suit, then when you make changes that breaks something, your test switch had tip you off to that fact, because you'll have regression test and plays. You'll know if you broke something." -- Armando Fox
Of the many software companies who were interviewed, more than eighty percent state that the most important skill lacking in modern day software engineers is the ability to deal successfully with legacy code.