一句话:对 Google 1252 个 C++/Java 项目的大规模实证研究,揭示架构复杂性与缺陷修复、开发者情绪间的统计关联。
软件系统越复杂越难维护虽符合直觉,但哪些复杂性指标与维护工作量相关、如何客观度量维护负担仍不明确。本文对 Google 1252 个 C++/Java 项目开展大规模实证研究,收集三类指标:架构复杂性(传播代价、解耦水平、结构反模式)、维护活动(变更数、代码行数、用于新增功能与缺陷修复的活跃编码时间)以及来自 7200 份问卷的开发者情绪。统计分析发现:架构越复杂(传播代价越高、反模式越多),越多代码行用于缺陷修复而非新增功能;在功能上提交更多变更、编写更多代码或投入更多时间的开发者,反而更少感到受技术债和复杂性阻碍。这是首个建立架构复杂性、维护活动与开发者情绪之间统计关联的大规模研究,表明可客观持续地监控架构复杂性与维护难度,并通过降低复杂性和反模式提升功能交付效率。
Intuitively, the more complex a software system is, the harder it is to maintain. Statistically, it is not clear which complexity metrics correlate with maintenance effort; in fact, it is not even clear how to objectively measure maintenance burden, so that developers' sentiment and intuition can be supported by numbers. Without effective complexity and maintenance metrics, it remains difficult to objectively monitor maintenance, control complexity, or justify refactoring. In this paper, we report a largescale study of 1252 projects written in C++ and Java from Google LLC. We collected three categories of metrics: (1) architectural complexity, measured using propagation cost (PC), decoupling level (DL), and structural anti-patterns; (2) maintenance activity, measured using the number of changes, lines of code (LOC) written, and active coding time (ACT) spent on feature-addition vs. bug-fixing, and (3) developer sentiment on complexity and productivity, collected from 7200 survey responses. We statistically analyzed the correlations among these metrics and obtained significant evidence of the following findings: 1) the more complex the architecture is (higher propagation cost, more instances of anti-patterns), the more LOC is spent on bug-fixing, rather than adding new features; 2) developers who commit more changes for features, spend more lines of code on features, or spend more time on features also feel that they are less hindered by technical debt and complexity. To the best of our knowledge, this is the first large-scale empirical study establishing the statistical correlation among architectural complexity, maintenance activity, and developer sentiment. The implication is that, instead of solely relying upon developer sentiment and intuition to detect degraded structure or increased burden to evolve, it is possible to objectively and continuously measure and monitor architectural complexity and maintenance difficulty, increasing feature delivery efficiency by reducing architectural complexity and anti-patterns.
DOI 原文 ·
@inproceedings{paperbot8785,
title = {Understanding Architectural Complexity, Maintenance Burden, and Developer Sentiment -A Large-Scale Study},
author = {Yuanfang Cai and Lanting He and Jun Qian and Yony Kochinski and Nan Zhang and Ciera Jaspan and Antonio Bianco},
booktitle = {ICSE},
year = {2025},
doi = {10.1109/icse55347.2025.00168}
}