Refactoring
Quick search appeared:
- This is UTexas research
- Another one from King Fahd University
- Summary in InfoQ of TDD Research and Quality (Refactoring is, of course, an indispensable component of TDD.)
Questions about software development practice in general are very difficult to study objectively, because how often do you launch the same project from the same requirements with the same technical tools and two teams of exactly identical knowledge and talent, but with different processes? However, studies do start, usually comparing large projects in similar areas and using measures such as defect rates and various code metrics as proxies for more complex things like "performance".
There's more, but you have to start.
Change: . I would like to add a nice ArneRie argument made in another answer: Refactoring working code that you don't plan on changing costs, not keeping it. Much of the value of refactoring is that it reduces the cost of change (by encouraging modularity and single responsibility, eliminating duplication of logic, etc.). It follows, however, that you lose this value if you have no intention of changing the code. Refactoring efforts should focus on changing the code.
source to share
It is always difficult to gauge the time and effort that has been saved (because, well, you haven't invested that time and that effort), but I will always say that "best practices" are better "for a reason: they save you time and efforts".
And yes, this is a very empirical definition.
source to share