Mining Type Constructs Using Patterns in AI-Generated Code

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Lee, Imgyeong, Hassan, Tayyib Ul, Hindle, Abram
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866911615995084800
author Lee, Imgyeong
Hassan, Tayyib Ul
Hindle, Abram
author_facet Lee, Imgyeong
Hassan, Tayyib Ul
Hindle, Abram
contents Artificial Intelligence (AI) increasingly automates various parts of the software development tasks. Although AI has enhanced the productivity of development tasks, it remains unstudied whether AI essentially outperforms humans in type-related programming tasks, such as employing type constructs properly for type safety, during its tasks. Moreover, there is no systematic study that evaluates whether AI agents overuse or misuse the type constructs under the complicated type systems to the same extent as humans. In this study, we present the first empirical analysis to answer these questions in the domain of TypeScript projects. Our findings show that, in contrast to humans, AI agents are 9x more prone to use the 'any' keyword. In addition, we observed that AI agents use advanced type constructs, including those that ignore type checks, more often compared to humans. Surprisingly, even with all these issues, Agentic pull requests (PRs) have 1.8x higher acceptance rates compared to humans for TypeScript. We encourage software developers to carefully confirm the type safety of their codebases whenever they coordinate with AI agents in the development process.
format Preprint
id arxiv_https___arxiv_org_abs_2602_17955
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Mining Type Constructs Using Patterns in AI-Generated Code
Lee, Imgyeong
Hassan, Tayyib Ul
Hindle, Abram
Software Engineering
Artificial Intelligence (AI) increasingly automates various parts of the software development tasks. Although AI has enhanced the productivity of development tasks, it remains unstudied whether AI essentially outperforms humans in type-related programming tasks, such as employing type constructs properly for type safety, during its tasks. Moreover, there is no systematic study that evaluates whether AI agents overuse or misuse the type constructs under the complicated type systems to the same extent as humans. In this study, we present the first empirical analysis to answer these questions in the domain of TypeScript projects. Our findings show that, in contrast to humans, AI agents are 9x more prone to use the 'any' keyword. In addition, we observed that AI agents use advanced type constructs, including those that ignore type checks, more often compared to humans. Surprisingly, even with all these issues, Agentic pull requests (PRs) have 1.8x higher acceptance rates compared to humans for TypeScript. We encourage software developers to carefully confirm the type safety of their codebases whenever they coordinate with AI agents in the development process.
title Mining Type Constructs Using Patterns in AI-Generated Code
topic Software Engineering
url https://arxiv.org/abs/2602.17955