arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.12600cs.SE
收藏

提取方法重构的意图背后:一项系统性文献综述

Behind the Intent of Extract Method Refactoring: A Systematic Literature Review

Eman Abdullah AlOmar, Mohamed Wiem Mkaouer, Ali Ouni

AI总结:

本文通过系统性文献综述梳理83项提取方法重构研究,构建分类框架,发现该领域多聚焦代码克隆、工具常结合人工决策且基准难以标准化,为后续研究指明方向。

摘要:

代码重构被广泛认为是提升源代码可理解性与可维护性的核心软件工程实践。提取方法(Extract Method)重构被誉为重构界的“瑞士军刀”,开发人员常通过应用它来改善代码质量。近年来,多项研究尝试为提取方法重构提供推荐支持,从而实现对软件项目中重构实践的可落地数据驱动洞见的收集、分析与揭示。本文旨在梳理现有提取方法重构研究的知识体系,探究其局限性与未来研究的潜在改进方向,帮助研究人员与从业者了解该领域的最新进展,发掘新的研究机遇。我们采用系统性文献综述(SLR)的形式梳理提取方法重构相关的知识体系。在汇总得到1367篇初始论文池后,我们开展了系统性筛选,最终的研究池包含83项主要研究。我们设定了三组研究问题,并基于方法论、适用性、自动化程度等多项标准,系统构建并完善了一套分类框架。研究结果整理形成了包含83种提取方法的方法目录,表明学界已提出多种相关技术。我们的研究发现:(i)38.6%的提取方法重构研究主要聚焦于解决代码克隆问题;(ii)多款提取方法工具在应用方法提取的决策过程中纳入了开发人员的参与;(iii)现有基准(benchmark)具有异质性,所含信息类型并不一致,这使得为基准测试目的对其进行标准化存在难度。

英文摘要:

Code refactoring is widely recognized as an essential software engineering practice to improve the understandability and maintainability of the source code. The Extract Method refactoring is considered as "Swiss army knife" of refactorings, as developers often apply it to improve their code quality. In recent years, several studies attempted to recommend Extract Method refactorings allowing the collection, analysis, and revelation of actionable data-driven insights about refactoring practices within software projects. In this paper, we aim at reviewing the current body of knowledge on existing Extract Method refactoring research and explore their limitations and potential improvement opportunities for future research efforts. Hence, researchers and practitioners begin to be aware of the state-of-the-art and identify new research opportunities in this context. We review the body of knowledge related to Extract Method refactoring in the form of a systematic literature review (SLR). After compiling an initial pool of 1,367 papers, we conducted a systematic selection and our final pool included 83 primary studies. We define three sets of research questions and systematically develop and refine a classification schema based on several criteria including their methodology, applicability, and degree of automation. The results construct a catalog of 83 Extract Method approaches indicating that several techniques have been proposed in the literature. Our results show that: (i) 38.6% of Extract Method refactoring studies primarily focus on addressing code clones; (ii) Several of the Extract Method tools incorporate the developer's involvement in the decision-making process when applying the method extraction, and (iii) the existing benchmarks are heterogeneous and do not contain the same type of information, making standardizing them for the purpose of benchmarking difficult.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑