AI News HubLIVE
In-site rewrite2 min read

A Large-Scale Empirical Study of AI-Generated Code in Real-World Repositories

A large-scale study finds that in real-world software repositories, AI-assisted code differs only slightly from human-written code on code-level metrics, while revealing new patterns in commit size, stability, and code duplication.

SourceHacker News AIAuthor: softwaredoug

-->

[Submitted on 28 Mar 2026 (v1), last revised 1 Jul 2026 (this version, v3)]

Title:A Large-Scale Comprehensive Measurement of AI-Generated Code in Real-World Repositories

View a PDF of the paper titled A Large-Scale Comprehensive Measurement of AI-Generated Code in Real-World Repositories, by Tianhao Mao and 4 other authors

View PDF HTML (experimental)

Abstract:Large language models (LLMs) are rapidly transforming software engineering by enabling developers to generate code ranging from small snippets to entire projects. As AI-assisted code becomes increasingly integrated into real-world systems, understanding its characteristics and impact is critical. Existing study on AI-generated code is usually limited in the lab setting with synthetic benchmarks and small-scale coding tasks and covers limited metrics. AI-assisted code's manifestation in real-world codebases and its differences between human-written one remain unclear. To close this gap, we perform a first large-scale measurement study of AI-assisted code, in comparison with the human-written, in real-world repositories. We study a comprehensive set of metrics including both code-level aspects (e.g., structural and graph-level complexity, coding style, security quality, etc.) and commit-level characteristics (e.g., commit size, frequency, post-commit stability, etc.). Our results provide new findings and insights: some contrast previous observations in the lab setting (e.g., we conclude that real-world AI-Human differences on code-level metrics are rather small instead of more pronounced), some extend prior results with finer-grained observations (e.g., the variance of security quality across different programming languages), yet more are presented for the first time on aspects not covered before (e.g., code duplication rate, commit size and stability, etc.). Based on these comprehensive real-world results, we also discuss the practical implications of AI-assisted programming.

Subjects:

Software Engineering (cs.SE)

Cite as: arXiv:2603.27130 [cs.SE]

(or arXiv:2603.27130v3 [cs.SE] for this version)

https://doi.org/10.48550/arXiv.2603.27130

arXiv-issued DOI via DataCite

Submission history

From: Tianhao Mao [view email] [v1] Sat, 28 Mar 2026 04:40:44 UTC (601 KB)

[v2] Fri, 3 Apr 2026 07:17:25 UTC (601 KB)

[v3] Wed, 1 Jul 2026 21:11:33 UTC (935 KB)

Full-text links:

Access Paper:

View a PDF of the paper titled A Large-Scale Comprehensive Measurement of AI-Generated Code in Real-World Repositories, by Tianhao Mao and 4 other authors

View PDF

HTML (experimental)

TeX Source

view license

Current browse context:

cs.SE

new | recent | 2026-03

Change to browse by:

cs

References & Citations

NASA ADS

Google Scholar

Semantic Scholar

Loading...

Data provided by:

Bibliographic Tools

Bibliographic and Citation Tools

Bibliographic Explorer Toggle

Bibliographic Explorer (What is the Explorer?)

Connected Papers Toggle

Connected Papers (What is Connected Papers?)

Litmaps Toggle

Litmaps (What is Litmaps?)

scite.ai Toggle

scite Smart Citations (What are Smart Citations?)

Code, Data, Media

Code, Data and Media Associated with this Article

alphaXiv Toggle

alphaXiv (What is alphaXiv?)

Links to Code Toggle

CatalyzeX Code Finder for Papers (What is CatalyzeX?)

DagsHub Toggle

DagsHub (What is DagsHub?)

GotitPub Toggle

Gotit.pub (What is GotitPub?)

Huggingface Toggle

Hugging Face (What is Huggingface?)

ScienceCast Toggle

ScienceCast (What is ScienceCast?)

Demos

Demos

Replicate Toggle

Replicate (What is Replicate?)

Spaces Toggle

Hugging Face Spaces (What is Spaces?)

Spaces Toggle

TXYZ.AI (What is TXYZ.AI?)

Related Papers

Recommenders and Search Tools

Link to Influence Flower

Influence Flower (What are Influence Flowers?)

Core recommender toggle

CORE Recommender (What is CORE?)

Author

Venue

Institution

Topic

About arXivLabs

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)