论文标题
清洁新代码可以降低技术债务密度吗?
Can Clean New Code reduce Technical Debt Density?
论文作者
论文摘要
尽管随着软件系统的发展,技术债务的绝对数量会随着时间的推移而增长,但在某些情况下,技术债务的密度(技术债务除以代码划分)会降低。这可以通过重构的应用或具有有限技术债务的新工件的开发来解释。在本文中,我们通过调查新法规中技术债务数量与系统中技术债务的发展之间的关系来探讨第二个解释。为此,我们将新代码的技术债务密度与现有代码进行了比较,并研究了三种主要代码更改中的哪种(添加,删除和修改)主要是导致技术债务密度演变的变化。此外,我们研究代码质量实践与新代码的“清洁”之间是否存在关系。为了获得所需的数据,我们已经对Apache Software Foundation对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.