善者、恶者与巨兽:在源代码方法诞生之初预测高度变更倾向方法
The Good, the Bad, and the Monstrous: Predicting Highly Change-Prone Source Code Methods at Their Inception
AI总结:
本文通过分析49个Java项目的774,051个方法,证实高度变更倾向方法符合帕累托80/20原则,并提出机器学习模型可在方法诞生之初有效识别它们,为降低软件维护成本提供支持。
摘要:
软件维护的成本往往超过最初的开发费用,这使其成为软件行业的一个重大关切。减轻未来维护负担的一项关键策略是尽早预测和识别变更倾向高的代码组件,从而能够及时进行优化。尽管先前的研究主要集中在预测变更倾向高的文件和类——这种方法不太受从业者青睐——本文将重点转向预测高度变更倾向的方法,以符合从业者和研究人员的偏好。我们分析了来自49个知名开源Java项目的774,051个源代码方法。我们的研究结果表明,大约80%的变更集中在仅20%的方法中,体现了帕累托80/20原则。此外,这一方法子集还导致了这些项目中所识别出的大部分缺陷。在确立这些方法对于降低软件维护成本的关键作用之后,我们的研究表明,机器学习模型能够从这些方法诞生之初就有效地识别出它们。另外,我们进行了彻底的人工分析,以揭示较难预测的方法之间的常见模式(或概念)。这些见解可以帮助未来的研究开发新的特征并提高预测准确性。
英文摘要:
The cost of software maintenance often surpasses the initial development expenses, making it a significant concern for the software industry. A key strategy for alleviating future maintenance burdens is the early prediction and identification of change-prone code components, which allows for timely optimizations. While prior research has largely concentrated on predicting change-prone files and classes, an approach less favored by practitioners, this paper shifts focus to predicting highly change-prone methods, aligning with the preferences of both practitioners and researchers. We analyzed 774,051 source code methods from 49 prominent open-source Java projects. Our findings reveal that approximately 80% of changes are concentrated in just 20% of the methods, demonstrating the Pareto 80/20 principle. Moreover, this subset of methods is responsible for the majority of the identified bugs in these projects. After establishing their critical role in mitigating software maintenance costs, our study shows that machine learning models can effectively identify these highly change-prone methods from their inception. Additionally, we conducted a thorough manual analysis to uncover common patterns (or concepts) among the more difficult-to-predict methods. These insights can help future research develop new features and enhance prediction accuracy.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。