Understanding and effectively managing Technical Debt (TD) remains a vital challenge in software engineering. While many studies on code-level TD have been published, few illustrate the business impact of low-quality source code. In this study, we combine two publicly available datasets to study the association between code quality on the one hand, and defect count and implementation time on the other hand. We introduce a value-creation model, derived from regression analyses, to explore relative changes from a baseline. Our results show that the associations vary across different intervals of code quality. Furthermore, the value model suggests strong non-linearities at the extremes of the code quality spectrum. Most importantly, the model suggests amplified returns on investment in the upper end. We discuss the findings within the context of the "broken windows" theory and recommend organizations to diligently prevent the introduction of code smells in files with high churn. Finally, we argue that the value-creation model can be used to initiate discussions regarding the return on investment in refactoring efforts.
翻译:理解并有效管理技术债务(Technical Debt, TD)仍是软件工程中的关键挑战。尽管已有大量关于代码级技术债务的研究发表,但鲜有研究阐明低质量源代码对业务的影响。本研究通过整合两个公开数据集,探讨代码质量与缺陷数量、实现时间之间的关联。我们构建了一个基于回归分析的价值创造模型,用以探索相对于基线的相对变化。结果表明,这种关联因代码质量区间的不同而存在差异。此外,该价值模型揭示了代码质量谱系两端存在的强非线性特征。最重要的是,该模型暗示在代码质量高端区间存在放大的投资回报。我们结合“破窗理论”对研究结果进行了讨论,建议组织在变更频繁的文件中严格防范代码坏味的引入。最后,我们认为该价值创造模型可用于启动关于重构工作投资回报的讨论。