I've found that many codebases in large companies degrade over time, only adding new features and never improving the design of thecodebase. Gradually there codebases degrade to what is considered "that legacy system no one wants to work on".
Though, I do know that one can refactor a code base: "improving design without changing its behavior” (Michael C. Feathers, 2005, p. 5)
My question is: what conditions are sufficient for successful refactoring? What differentiates a codebase that can be refactored, from one that cannot be feasibly refactored?