当前位置: X-MOL 学术IEEE Trans. Softw. Eng. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Behind the Intent of Extract Method Refactoring: A Systematic Literature Review
IEEE Transactions on Software Engineering ( IF 7.4 ) Pub Date : 2024-01-04 , DOI: 10.1109/tse.2023.3345800
Eman Abdullah AlOmar 1 , Mohamed Wiem Mkaouer 2 , Ali Ouni 3
Affiliation  

Background: 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, e.g., decompose long code fragments, reduce code complexity, eliminate duplicated code, etc. 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. Aim: 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. That is, Extract Method is considered one of the most widely-used refactorings, but difficult to apply in practice as it involves low-level code changes such as statements, variables, parameters, return types, etc. Hence, researchers and practitioners begin to be aware of the state-of-the-art and identify new research opportunities in this context. Method: 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. Results: 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. Conclusions: Our study serves as an “index” to the body of knowledge in this area for researchers and practitioners in determining the Extract Method refactoring approach that is most appropriate for their needs. Our findings also empower the community with information to guide the future development of refactoring tools.

中文翻译:

Extract 方法重构的意图背后:系统文献综述

背景:代码重构被广泛认为是提高源代码的可理解性和可维护性的基本软件工程实践。这Extract Method 重构被认为是重构中的“瑞士军刀”,开发人员经常使用它来提高代码质量,例如,分解长代码片段、降低代码复杂度、消除重复代码等。近年来,一些研究尝试推荐Extract Method 重构允许收集、分析和揭示有关软件项目中重构实践的可操作数据驱动的见解。目的:在本文中,我们旨在回顾现有 Extract Method 重构研究的当前知识体系,并探讨其局限性和未来研究工作的潜在改进机会。那是,Extract Method被认为是最广泛使用的重构之一,但在实践中很难应用,因为它涉及低级代码更改,例如语句、变量、参数、返回类型等。因此,研究人员和实践者开始意识到最先进的技术并在这方面确定新的研究机会。方法:我们回顾相关知识体系以系统文献综述 (SLR) 的形式重构 Extract Method。在编制了 1,367 篇论文的初始库后,我们进行了系统筛选,最终库中包含了 83 项初步研究。我们定义了三组研究问题,并根据方法论、适用性和自动化程度等几个标准系统地开发和完善分类模式。结果:结果构建了 83 个目录提取方法方法表明文献中已经提出了几种技术。我们的结果表明: (i) 38.6%Extract Method 重构研究主要集中于解决代码克隆问题; (ii) 其中几个提取方法工具在应用方法提取时纳入了开发人员对决策过程的参与,并且 (iii) 现有的基准是异构的并且不包含相同类型的信息,使得为了基准测试的目的而对其进行标准化变得困难。结论:我们的研究可作为该领域知识体系的“索引”,供研究人员和从业者确定最适合他们需求的 Extract Method 重构方法。我们的研究结果还为社区提供了指导重构工具未来开发的信息。
更新日期:2024-01-04
down
wechat
bug