Mining Type Constructs Using Patterns in AI-Generated Code

Imgyeong Lee, Tayyib Ul Hassan, Abram Hindle

2026/01/19

Mining Type Constructs Using Patterns in AI-Generated Code

Authors

Imgyeong Lee, Tayyib Ul Hassan, Abram Hindle

Venue

Abstract

Artificial intelligence code generation agents have become transformative tools in modern software development, yet how they handle complex type systems remains poorly understood. In this study, we present an empirical analysis of type constructs and patterns in AI-generated code within TypeScript projects. Our findings show that AI agents are significantly more prone to using the ‘any’ keyword and advanced type constructs compared to human developers, yet agentic pull requests maintain higher acceptance rates. These findings highlight the necessity of confirming type safety when collaborating with AI tools.

Bibtex

@inproceedings{leeMSR2026-types,
 abstract = {Artificial intelligence code generation agents have become transformative tools in modern software development, yet how they handle complex type systems remains poorly understood. In this study, we present an empirical analysis of type constructs and patterns in AI-generated code within TypeScript projects. Our findings show that AI agents are significantly more prone to using the 'any' keyword and advanced type constructs compared to human developers, yet agentic pull requests maintain higher acceptance rates. These findings highlight the necessity of confirming type safety when collaborating with AI tools.},
 accepted = {2026-01-19},
 author = {Imgyeong Lee and Tayyib Ul Hassan and Abram Hindle},
 authors = {Imgyeong Lee, Tayyib Ul Hassan, Abram Hindle},
 booktitle = {IEEE/ACM 23rd International Conference on Mining Software Repositories (MSR): Mining Challenge},
 code = {leeMSR2026-types},
 date = {2026-04-13},
 doi = {10.48550/arXiv.2602.17955},
 funding = {NSERC Discovery},
 location = {Rio de Janeiro, Brazil},
 pagerange = {1--5},
 pages = {1--5},
 rate = {62/130},
 role = {Co-Author},
 title = {Mining Type Constructs Using Patterns in AI-Generated Code},
 type = {inproceedings},
 url = {http://softwareprocess.ca/pubs/leeMSR2026-types.pdf},
 venue = {IEEE/ACM 23rd International Conference on Mining Software Repositories (MSR): Mining Challenge},
 year = {2026}
}