Software reengineering
Analysing and restructuring an existing system, often in a new form or technology, to make it easier to maintain and extend.
Covers restructuring a whole system, often moving it to a new language, platform or architecture. Behaviour-preserving improvement of existing code is Refactoring.