22nd International Conference on Program Comprehension (ICPC 2014), June 2–3, 2014, Hyderabad, India

Desktop Layout

Recommending Automated Extract Method Refactorings
Danilo Silva, Ricardo Terra, and Marco Tulio Valente
(Federal University of Minas Gerais, Brazil; Federal University of Lavras, Brazil)
Publisher's Version
Supplementary Material
Abstract: 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).


Time stamp: 2019-06-19T15:38:06+02:00