Loading...
Please wait, while we are loading the content...
Similar Documents
Recommending Automated Extract Method Refactoring
| Content Provider | Semantic Scholar |
|---|---|
| Author | Ferreira, Danilo Otávio Laurenti Silva, Ea |
| Copyright Year | 2014 |
| Abstract | Extract Method is a key refactoring for improving software maintainability. In fact, small methods with meaningful names improve source code readability and also favor reuse. For such reasons, Extract Method is one of the most popular and versatile refactorings. However, recent empirical research shows that refactoring tools designed to automate this refactoring are often underused and, more important, they do not support developers in the identification of potential code fragments for extraction. To address this issue, we propose an approach to identify Extract Method refactoring opportunities that are directly automated by IDE-based refactoring tools. The proposed approach relies on a heuristic to rank the identified refactoring opportunities based on the design principle of separation of concerns. Specifically, we assume that the structural dependencies established by a Extract Method candidate should be very different from the ones established by the remaining statements in the original method. In a first study using synthesized Extract Method opportunities introduced by inlining method invocations, shows that our approach is more effective (w.r.t. recall and precision) than a state-of-the-art tool. In a second study, with 13 open-source systems our approach achieved an overall recall of 59.1%. Moreover, when we tolerate suggestions that are slight variations of known Extract Method instances (e.g., including/excluding a single statement), recall rises to 66.6%. |
| File Format | PDF HTM / HTML |
| Alternate Webpage(s) | https://homepages.dcc.ufmg.br/~mtov/diss/2014-danilo.pdf |
| Language | English |
| Access Restriction | Open |
| Content Type | Text |
| Resource Type | Article |