Faculty of Computer Science and Information Technology, Universiti Tun Hussein Onn Malaysia, Parit Raja, Johor, Malaysia.
School of Computing, Universiti Utara Malaysia, Sintok, Malaysia.
PLoS One. 2023 Nov 2;18(11):e0293742. doi: 10.1371/journal.pone.0293742. eCollection 2023.
Refactoring, a widely adopted technique, has proven effective in facilitating and reducing maintenance activities and costs. Nonetheless, the effects of applying refactoring techniques on software quality exhibit inconsistencies and contradictions, leading to conflicting evidence on their overall benefit. Consequently, software developers face challenges in leveraging these techniques to improve software quality. Moreover, the absence of a categorization model hampers developers' ability to decide the most suitable refactoring techniques for improving software quality, considering specific design goals. Thus, this study aims to propose a novel refactoring categorization model that categorizes techniques based on their measurable impacts on internal quality attributes. Initially, the most common refactoring techniques used by software practitioners were identified. Subsequently, an experimental study was conducted using five case studies to measure the impacts of refactoring techniques on internal quality attributes. A subsequent multi-case analysis was conducted to analyze these effects across the case studies. The proposed model was developed based on the experimental study results and the subsequent multi-case analysis. The model categorizes refactoring techniques into green, yellow, and red categories. The proposed model, by acting as a guideline, assists developers in understanding the effects of each refactoring technique on quality attributes, allowing them to select appropriate techniques to improve specific quality attributes. Compared to existing studies, the proposed model emerges superior by offering a more granular categorization (green, yellow, and red categories), and its range is wide (including ten refactoring techniques and eleven internal quality attributes). Such granularity not only equips developers with an in-depth understanding of each technique's impact but also fosters informed decision-making. In addition, the proposed model outperforms current studies and offers a more nuanced understanding, explicitly highlighting areas of strength and concern for each refactoring technique. This enhancement aids developers in better grasping the implications of each refactoring technique on quality attributes. As a result, the model simplifies the decision-making process for developers, saving time and effort that would otherwise be spent weighing the benefits and drawbacks of various refactoring techniques. Furthermore, it has the potential to help reduce maintenance activities and associated costs.
重构是一种被广泛采用的技术,已被证明可以有效地促进和减少维护活动和成本。然而,应用重构技术对软件质量的影响并不一致,存在矛盾,导致对其整体效益的证据相互冲突。因此,软件开发人员在利用这些技术来提高软件质量方面面临挑战。此外,由于缺乏分类模型,开发人员无法根据特定的设计目标,决定最适合提高软件质量的重构技术。因此,本研究旨在提出一种新的重构分类模型,该模型根据重构技术对内部质量属性的可衡量影响对技术进行分类。首先,确定了软件从业者最常用的重构技术。随后,使用五个案例研究进行了实验研究,以衡量重构技术对内部质量属性的影响。随后进行了多案例分析,以分析这些影响在案例研究中的情况。该模型是基于实验研究结果和随后的多案例分析开发的。该模型将重构技术分为绿色、黄色和红色三类。该模型通过充当指南,帮助开发人员了解每个重构技术对质量属性的影响,从而允许他们选择适当的技术来改进特定的质量属性。与现有研究相比,该模型具有优越性,提供了更细粒度的分类(绿色、黄色和红色三类),范围更广(包括十种重构技术和十一种内部质量属性)。这种粒度不仅使开发人员深入了解每个技术的影响,还有助于做出明智的决策。此外,该模型优于当前研究,提供了更细致的理解,明确突出了每种重构技术的优势和关注点。这种增强有助于开发人员更好地理解每个重构技术对质量属性的影响。因此,该模型简化了开发人员的决策过程,节省了在权衡各种重构技术的优缺点时所花费的时间和精力。此外,它还有助于减少维护活动和相关成本。