Enterprise Software Modernization: Rebuild vs. Refactor