arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2607.01810cs.SEcs.AI
收藏

解耦代码复杂度与新参与者参与度:AI编码代理在开源软件中采纳的因果研究

Decoupling Code Complexity from Newcomer Participation: A Causal Study of AI Coding Agent Adoption in OSS

School of Computer Science, Peking University(北京大学计算机学院);Key Laboratory of High Confidence Software Technologies, Ministry of Education, China(教育部高可信软件技术重点实验室)

Weiwei Xu, Xuanning Cui, Hengzhi Ye, Minghui Zhou

AI总结:

通过因果推断方法,研究AI编码代理(如Cursor和Claude Code)在开源项目中的采纳是否会导致新参与者减少,发现采纳后新参与者流入未显著下降,代码复杂度虽有增加但未影响新人参与。

摘要:

开源项目依赖于新参与者的稳定流入。一个日益增长的担忧是,AI编码代理(如Cursor和Claude Code等从自然语言指令编写代码的工具)会通过吸收初学者起步的简单任务并使代码更难阅读而将他们排挤出去。我们对此担忧给出了因果回答。利用GitHub代码搜索,我们识别出1,888个采纳了代理的项目,以配置文件首次提交为信号。我们采用双重差分法对比匹配的非采纳控制组,将主要分析限制在603个具有真实采纳前期的采纳者。我们没有发现排挤效应的证据:在各种估计量下,采纳后新参与者流入没有显著下降(点估计从小幅增加到最保守趋势规范下的轻微且不显著的下降),入职和留存率不变,一个稀疏的相关性初学者任务度量(good-first-issue标签,我们无法检验平行趋势)也没有下降。所担忧的机制是真实的但被解耦了:采纳提高了每个函数的代码复杂度(Python认知度量约增加11%,为先前估计的四分之一;所有语言圈复杂度增加3-4%),但在复杂度上升的固定单元子集中(Python认知度量和所有语言圈复杂度),新参与者参与度并未下降。这些结果表明,在成熟的开源项目中,采纳AI编码代理会使代码适度复杂化,但不会排挤项目所依赖的人类新参与者:所担忧的AI辅助与人类参与之间的权衡并未出现。

英文摘要:

Open-source projects depend on a steady inflow of newcomers. A growing concern is that AI coding agents (tools such as Cursor and Claude Code that write code from natural-language instructions) will crowd them out, by absorbing the simple tasks that beginners start with and by making code harder to read. We give this concern a causal answer. Using GitHub code search we identify 1,888 projects that adopted an agent, signaled by their first commit of a configuration file. We apply difference-in-differences against matched non-adopting controls, restricting the main analysis to the 603 adopters with a genuine pre-adoption period. We find no evidence of crowding-out: across estimators newcomer inflow shows no significant decline after adoption (point estimates run from a small increase to, under the most conservative trend specification, a slight and insignificant dip), onboarding and retention are unchanged, and a sparse, correlational beginner-task measure (good-first-issue labels, which we cannot test for parallel trends) shows no decline. The feared mechanism is real but decoupled: adoption raises per-function code complexity (about +11% on a cognitive metric for Python, a quarter of the prior estimate, and +3 to 4% in cyclomatic terms across all languages), yet in fixed-unit subsets where complexity rose (Python on the cognitive metric, and all languages on the cyclomatic metric), newcomer participation does not decline. These results suggest that, in established open-source projects, adopting an AI coding agent makes code modestly more complex but does not crowd out the human newcomers that a project depends on: the feared trade-off between AI assistance and human participation does not materialize.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑