Recommending automated extract method refactorings
Danilo Silva, Ricardo Terra, Marco Túlio Valente · International Conference on Program Comprehension · 2014
Extract Method is a key refactoring for improving program comprehension. However, recent empirical research shows that refactoring tools designed to automate Extract Methods are often underused. To tackle this issue, we propose a novel approach to identify and rank Extract Method refactoring opportunities that are directly automated by IDE-based refactoring tools. Our approach aims to recommend new methods that hide structural dependencies that are rarely used by the remaining statements in the original method. We conducted an exploratory study to experiment and define the best strategies to compute the dependencies and the similarity measures used by the proposed approach. We also evaluated our approach in a sample of 81 extract method opportunities generated for JUnit and JHotDraw, achieving a precision of 48% (JUnit) and 38% (JHotDraw).
Cited by 72 works. doi:10.1145/2597008.2597141
Authors
References
- Cluster Analysis
- Refactoring: Improving the Design of Existing Code
- Refactoring object-oriented frameworks
- Mining version histories to guide software changes
- Mining metrics to predict component failures
- Detection strategies: metrics-based rules for detecting design flaws
- How We Refactor, and How We Know It
- Recommendation Systems for Software Engineering
- Identification of Move Method Refactoring Opportunities
- Approximate Structural Context Matching: An Approach to Recommend Relevant Examples