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

干净的新代码能降低技术债务密度吗?

Can Clean New Code reduce Technical Debt Density?

George Digkas, Alexander Chatzigeorgiou, Apostolos Ampatzoglou, Paris Avgeriou

摘要:

虽然随着软件系统的发展,技术债务的绝对数量会增加,但在某些情况下,技术债务的密度(技术债务除以代码行)会降低。这可以通过重构的应用或开发具有有限技术债务的新工件来解释。本文通过考察新法规中的技术债务数额与技术债务在制度中的演变之间的关系,探讨了第二种解释。为此,我们将新代码与现有代码的技术债务密度进行比较,并调查三种主要类型的代码更改(添加,删除和修改)中的哪一种主要负责技术债务密度的演变。此外,我们研究是否有代码质量的做法和新代码的“清洁”之间的关系。为了获得所需的数据,我们对Apache软件基金会的27个开源软件项目进行了大规模的案例研究,分析了66,661个类和56,890个提交。结果表明,编写“干净”(或至少“干净”)的新代码可以是降低技术债务密度的有效策略,从而防止软件随着时间的推移而衰退。研究结果还表明,采用明确的质量改进政策的项目,例如通过在董事会会议上讨论代码质量,与更干净的新代码提交频率较高有关。因此,我们倡导建立监控新代码的技术债务密度的过程,以控制软件系统中技术债务的积累。

英文摘要:

While technical debt grows in absolute numbers as software systems evolve over time, the density of technical debt (technical debt divided by lines of code) is reduced in some cases. This can be explained by either the application of refactorings or the development of new artifacts with limited Technical Debt. In this paper we explore the second explanation, by investigating the relation between the amount of Technical Debt in new code and the evolution of Technical Debt in the system. To this end, we compare the Technical Debt Density of new code with existing code, and we investigate which of the three major types of code changes (additions, deletions and modifications) is primarily responsible for changes in the evolution of Technical Debt density. Furthermore, we study whether there is a relation between code quality practices and the 'cleanness' of new code. To obtain the required data, we have performed a large-scale case study on twenty-seven open-source software projects by the Apache Software Foundation, analyzing 66,661 classes and 56,890 commits. The results suggest that writing "clean" (or at least "cleaner") new code can be an efficient strategy for reducing Technical Debt Density, and thus preventing software decay over time. The findings also suggest that projects adopting an explicit policy for quality improvement, e.g. through discussions on code quality in board meetings, are associated with a higher frequency of cleaner new code commits. Therefore, we champion the establishment of processes that monitor the density of Technical Debt of new code to control the accumulation of Technical Debt in a software system.

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

↑