Beyond Bug Fixes: An Empirical Investigation of Post-Merge Code Quality Issues in Agent-Generated Pull Requests
Shamse Tasnim Cynthia, Al Muttakin, Banani Roy

TL;DR
This study investigates the post-merge code quality of AI-generated bug-fix pull requests in Python projects, revealing that larger PRs tend to have more issues and emphasizing the importance of systematic quality checks.
Contribution
It provides the first large-scale empirical analysis of post-merge code quality issues in agent-generated PRs, highlighting the impact of PR size and the prevalence of code smells and severe bugs.
Findings
Issue counts correlate with PR size after normalization.
Code smells are the most common issues, especially at critical levels.
Merge success does not guarantee high post-merge code quality.
Abstract
The increasing adoption of AI coding agents has increased the number of agent-generated pull requests (PRs) merged with little or no human intervention. Although such PRs promise productivity gains, their post-merge code quality remains underexplored, as prior work has largely relied on benchmarks and controlled tasks rather than large-scale post-merge analyses. To address this gap, we analyze 1,210 merged agent-generated bug-fix PRs from Python repositories in the AIDev dataset. Using SonarQube, we perform a differential analysis between base and merged commits to identify code quality issues newly introduced by PR changes. We examine issue frequency, density, severity, and rule-level prevalence across five agents. Our results show that apparent differences in raw issue counts across agents largely disappear after normalizing by code churn, indicating that higher issue counts are…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Ethics and Social Impacts of AI · Scientific Computing and Data Management
