Behavioral Analysis of AI Code Generation Agents: Edit, Rewrite, and Repetition. Abazar, M., Farahmand, R., Ginde, G., Tan, B., & De Carli, L. In 23rd International Mining Software Repositories Conference, 2026.
Behavioral Analysis of AI Code Generation Agents: Edit, Rewrite, and Repetition [link]Paper  abstract   bibtex   
Artificial intelligence code generation agents have become transformative tools in modern software development, yet their behavioral patterns remain poorly understood. This paper presents a study analyzing pull request patches from the AIDev dataset to characterize the behavioral signatures of five code generation agents (Claude Code, Copilot, Cursor, Devin, and OpenAI Codex) across the top five programming languages (TypeScript, Python, Go, Java, and C#) in the dataset. We investigate two key research questions: “Do agents edit or rewrite existing code?”, and “How repetitive is each agent’s generated code?” Using token-level similarity metrics (Jaccard, TF-IDF, and fuzzy matching) and repetition analysis (n-gram distributions and Shannon entropy), we characterize edit-rewrite behavior by whether new code closely resembles or substantially differs from existing code. Our results show that Claude Code tends toward lower-similarity changes and higher token diversity, Devin tends toward higher-similarity changes indicative of more incremental modification, and OpenAI Codex exhibits mixed patterns across similarity measures. These behavioral patterns provide insights into how different AI agents approach code generation tasks.
@inproceedings{abazar_behavioral_2026,
	title = {Behavioral {Analysis} of {AI} {Code} {Generation} {Agents}: {Edit}, {Rewrite}, and {Repetition}},
	url = {https://2026.msrconf.org/details/msr-2026-mining-challenge/45/Behavioral-Analysis-of-AI-Code-Generation-Agents-Edit-Rewrite-and-Repetition},
	abstract = {Artificial intelligence code generation agents have become transformative tools in modern software development, yet their behavioral patterns remain poorly understood. This paper presents a study analyzing pull request patches from the AIDev dataset to characterize the behavioral signatures of five code generation agents (Claude Code, Copilot, Cursor, Devin, and OpenAI Codex) across the top five programming languages (TypeScript, Python, Go, Java, and C\#) in the dataset. We investigate two key research questions: “Do agents edit or rewrite existing code?”, and “How repetitive is each agent’s generated code?” Using token-level similarity metrics (Jaccard, TF-IDF, and fuzzy matching) and repetition analysis (n-gram distributions and Shannon entropy), we characterize edit-rewrite behavior by whether new code closely resembles or substantially differs from existing code. Our results show that Claude Code tends toward lower-similarity changes and higher token diversity, Devin tends toward higher-similarity changes indicative of more incremental modification, and OpenAI Codex exhibits mixed patterns across similarity measures. These behavioral patterns provide insights into how different AI agents approach code generation tasks.},
	language = {en},
	booktitle = {23rd {International} {Mining} {Software} {Repositories} {Conference}},
	author = {Abazar, Mahdieh and Farahmand, Reyhaneh and Ginde, Gouri and Tan, Benjamin and De Carli, Lorenzo},
	year = {2026},
}

Downloads: 0