arXiv:2606.13298cs.SEcs.AI2026-06中稿 · presentation at th…

研究AI编程对代码架构的影响,发现看似改善实则因代码量增加导致的假象。

Mining Architectural Quality Under Agentic AI Adoption: A Causal Study of Java Repositories

  • 通过对比有无AI使用痕迹的Java项目,分析架构异味密度变化
  • 代码量增12.8%但异味总数未变,异味密度下降6.7%是规模效应
  • 提醒研究者关注原始数量而非密度,避免被误导

AI编程工具已被多数开发者采用,其代理式使用(俗称“vibe coding”)日益流行,但对其对软件架构影响的因果证据仍匮乏。现有研究多关注代码级指标(如复杂度、静态警告),尚不清楚这些退化是否传导至架构层面。本研究挖掘151个开源Java仓库,其中74个通过配置文件和提交尾部信息识别出存在可观测的代理式AI使用痕迹,77个为倾向匹配对照组,覆盖每仓库13个月时间窗口,共获得1,811个每月的Arcan快照。采用交错差分法与Borusyak插补估计器,首次将此前用于代码级指标的因果设计应用于架构层面。结果显示,异味总数基本不变(+1.1%,p=0.82),而代码行数增长12.8%(p=0.003),因此异味密度下降6.7%(p=0.004)实为分母扩大所致,并非架构质量提升。按类型拆解的估计结果及稳健性检验(野生聚类自助法、Lee边界、过时观测敏感性)均支持该结论;预趋势平稳(Wald p=0.90),符合平行趋势假设。当处理效应影响系统规模时,密度归一化结果可能误导,需依赖原始计数与显式分解。完整复现包(含151个仓库的月度面板)已公开。

原文摘要 · Abstract (English)

AI coding tools are now used by a majority of developers, and agentic use of these tools has popularized the practice colloquially called "vibe coding". Yet causal evidence on their effect on software architecture is scarce. Prior causal work has measured code-level outcomes (complexity, static analysis warnings); whether such degradation propagates to architecture-level outcomes remains unknown. We mine 151 open-source Java repositories, 74 with detectable agentic AI adoption (identified via configuration files and Co-Authored-By commit trailers) and 77 propensity-matched controls, across a 13-month per-repository window yielding 1,811 monthly Arcan snapshots. We estimate the causal effect of adoption on architectural smell density (ASD) with a staggered difference-in-differences design and the Borusyak imputation estimator, applying a causal design recently used for code-level metrics to the architecture level. Total smell counts are essentially unchanged (+1.1%, p = 0.82) while lines of code grow +12.8% (p = 0.003); the resulting 6.7% ASD decline (p = 0.004) is therefore a denominator effect rather than an architectural improvement. Per-type estimates and robustness checks (wild cluster bootstrap, Lee bounds, stale-observation sensitivity) corroborate the pattern; pre-trends are flat (Wald p = 0.90), consistent with parallel trends. Density-normalized outcomes can mislead when treatment affects system size: raw counts and explicit decomposition are required for causal mining studies of AI tool adoption. The complete replication package, including the curated 151-repository monthly panel, is publicly available.

软件架构因果推断AI编程代码质量

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。