Quality Histories of Past Extract Method Refactorings

COMPUTATIONAL SCIENCE AND ITS APPLICATIONS, ICCSA 2021, PT VII(2021)

引用 0|浏览2
暂无评分
摘要
Modern programming environments offer the Extract Method refactoring as a way to improve software quality by moving a source code fragment into a new method. This refactoring comes with an immediate positive feedback by shortening the refactored method. It can also increase code re-usage and encourage developers to remove code clones. The impact of refactorings on the software quality has been the topic of many research efforts. However, these refactorings are usually studied in groups. Therefore the metrics evaluated and the observation are not tailored to a specific refactoring, thus hiding a valuable insight on how practitioners use a refactoring in particular. In this paper, we conduct an assessment of the quality impact resulting from the Extract Method refactoring. Our results statistically confirm the tendency of the Extract Method to improve complexity and slightly worsen cohesion, respectively in 46% and 70% of the refactoring. In addition, we observe that the Extract Method favors re-use and reduces occurrences of code clones in 56% of the extracted methods. However, our results also show that some specific cases are contrary to the previously mentioned trends and that it is therefore necessary to study refactorings at a low granularity.
更多
查看译文
关键词
Refactoring, Software quality, Software maintenance
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要