160 likes | 177 Views
Why do we refactor? Technical Debt Items Versus Size: A Forensic Investigation of What Matters. Ehsan Zabardast & Javier Gonzalez Huerta. Motivation:. The decisions behind refactoring the code: Preparing the system for future changes? Dealing with forms of technical debt?
E N D
Why do we refactor? Technical Debt Items Versus Size: A Forensic Investigation of What Matters Ehsan Zabardast & Javier Gonzalez Huerta
Motivation: • The decisions behind refactoring the code: • Preparing the system for future changes? • Dealing with forms of technical debt? • Maintaining the code? • Code understandability? • … We started by investigating Technical Debt and File Size
Study Design: Setup: empirical study 3 open source, java-based projects quantitative analysis on the repositories of selected projects commit level analysis
Research Question: Do refactorings happen on larger files or the files which contain Technical Debt Items?
Results: • Number of TD Items does NOT Matter (p-value >.05 for all system) • Refactored or not-refactored, the files have similar number of TD Items • Refactoring does not happen just to remove the TD Items • The developers do not touch the files with more TD items • File Size Matters (p-value <.05 for all system) • To reduce the file size • Increasing maintainability • The more code you have the more problems appear
Conclusions: • There are multiple reasons behind a decision for refactoring • We have investigated two of these • File size – Bigger files tend to get refactored • Technical Debt Items – The TD items in refactored files are not significantly different with non-refactored files
What’s Comes Next: • Investigating the effectiveness of refactorings • Refactorings are effective for removing TD items • Identifying the TD reducing/inducing refactoring operations • TD items Survivability, i.e. how they die. • The impact of refactoring on maintainability • By investigating the relationship between change entropy and refactoring operations • Investigating the Developers’ Experience and Expertise on the project • Investigating asset management through developers’ perspective and experience, i.e., what matters.
What’s Comes Next: • Investigating the effectiveness of refactorings • Refactorings are effective for removing TD items • Identifying the TD reducing/inducing refactoring operations • TD items Survivability, i.e. how they die. • The impact of refactoring on maintainability • By investigating the relationship between change entropy and refactoring operations • Investigating the Developers’ Experience and Expertise on the project • Investigating asset management through developers’ perspective and experience, i.e., what matters.