Context: The term technical debt (TD) describes the aggregation of sub-optimal solutions that serve to impede the evolution and maintenance of a system. Some claim that the broken windows theory (BWT), a concept borrowed from criminology, also applies to software development projects. The theory states that the presence of indications of previous crime (such as a broken window) will increase the likelihood of further criminal activity; TD could be considered the broken windows of software systems. Objective: To empirically investigate the causal relationship between the TD density of a system and the propensity of developers to introduce new TD during the extension of that system. Method: The study used a mixed-methods research strategy consisting of a controlled experiment with an accompanying survey and follow-up interviews. The experiment had a total of 29 developers of varying experience levels completing system extension tasks in already existing systems with high or low TD density. Results: The analysis revealed significant effects of TD level on the subjects' tendency to re-implement (rather than reuse) functionality, choose non-descriptive variable names, and introduce other code smells identified by the software tool SonarQube, all with at least 95% credible intervals. Conclusions: Three separate significant results along with a validating qualitative result combine to form substantial evidence of the BWT's existence in software engineering contexts. This study finds that existing TD can have a major impact on developers propensity to introduce new TD of various types during development.
翻译:背景:技术债务(Technical Debt, TD)这一术语描述了阻碍系统演进与维护的次优解决方案的累积。有观点认为,源自犯罪学的破窗理论(Broken Windows Theory, BWT)同样适用于软件开发项目。该理论指出,先前犯罪迹象(如破窗)的存在会增加进一步犯罪活动的可能性;而技术债务可被视为软件系统中的“破窗”。目标:通过实证研究探究系统技术债务密度与开发者在系统扩展过程中引入新技术债务倾向之间的因果关系。方法:本研究采用混合方法研究策略,包含一个受控实验、配套问卷调查及后续访谈。实验共招募了29名不同经验水平的开发者,在现有系统(具有高或低技术债务密度)中完成系统扩展任务。结果:分析显示,技术债务水平对受试者倾向于重新实现(而非复用)功能、选择非描述性变量名以及引入由软件工具SonarQube识别的其他代码异味均具有显著影响,所有结果的可信区间均达到95%以上。结论:三项独立的显著结果与一项验证性定性结果相结合,共同构成了破窗理论在软件工程语境中存在的实质性证据。本研究发现,现有技术债务可能对开发者在开发过程中引入各类新技术债务的倾向产生重大影响。