On Developers' Self-Declaration of AI-Generated Code: An Analysis of Practices
Not on the map. Why?
Abstract (arXiv)
AI code generation tools have gained significant popularity among developers, who use them to assist in software development due to their capability to generate code. Existing studies mainly explored the quality, e.g., correctness and security, of AI-generated code, while in real-world software development, the prerequisite is to distinguish AI-generated code from human-written code, which emphasizes the need to explicitly declare AI-generated code by developers. To this end, this study intends to understand the ways developers use to self-declare AI-generated code and explore the reasons why developers choose to self-declare or not. We conducted a mixed-methods study consisting of two phases. In the first phase, we mined GitHub repositories and collected 613 instances of AI-generated code snippets. In the second phase, we conducted a follow-up practitioners' survey, which received 111 valid responses. Our research revealed the practices followed by developers to self-declare AI-generated code. Most practitioners (76.6%) always or sometimes self-declare AI-generated code. In contrast, other practitioners (23.4%) noted that they never self-declare AI-generated code. The reasons for self-declaring AI-generated code include the need to track and monitor the code for future review and debugging, and ethical considerations. The reasons for not self-declaring AI-generated code include extensive modifications to AI-generated code and the developers' perception that self-declaration is an unnecessary activity. We finally provided guidelines for practitioners to self-declare AI-generated code, addressing ethical and code quality concerns.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 26 of its 63 references that are in the map. First posted on arXiv 23 Apr 2025.
Builds on
26 of 63 references.
References · 26
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 431
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
- 2023The Impact of AI on Developer Productivity: Evidence from GitHub Copilotcited by 274
- 2022Grounded Copilot: How Programmers Interact with Code-Generating Modelscited by 218
- 2022GitHub Copilot AI pair programmer: Asset or Liability?cited by 152
- 2023From ChatGPT to ThreatGPT: Impact of Generative AI in Cybersecurity and Privacycited by 143
- 2023An Empirical Study of the Non-determinism of ChatGPT in Code Generationcited by 137
- 2023Refining ChatGPT-Generated Code: Characterizing and Mitigating Code Quality Issuescited by 79
- 2023Is ChatGPT the Ultimate Programming Assistant -- How far is it?cited by 76
14 more
- 2023Evaluating the Code Quality of AI-Assisted Code Generation Tools: An Empirical Study on GitHub Copilot, Amazon CodeWhisperer, and ChatGPTcited by 71
- 2024Bugs in Large Language Models Generated Code: An Empirical Studycited by 60
- 2023No Need to Lift a Finger Anymore? Assessing the Quality of Code Generation by ChatGPTcited by 47
- 2023Assessing the Security of GitHub Copilot Generated Code -- A Targeted Replication Studycited by 26
- 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representationscited by 17
- 2024Distinguishing LLM-generated from Human-written Code by Contrastive Learningcited by 16
- 2024Rocks Coding, Not Development--A Human-Centric, Experimental Evaluation of LLM-Supported SE Taskscited by 13
- 2024Whodunit: Classifying Code as Human Authored or GPT-4 Generated -- A case study on CodeChef problemscited by 13
- 2023Exploring the Problems, their Causes and Solutions of AI Pair Programming: A Study on GitHub and Stack Overflowcited by 11
- 2024Can ChatGPT Support Developers? An Empirical Evaluation of Large Language Models for Code Generationcited by 11
- 2022Automatically Recommend Code Updates: Are We There Yet?cited by 7
- 2023Discriminating Human-authored from ChatGPT-Generated Code Via Discernable Feature Analysiscited by 7
- 2024Is This You, LLM? Recognizing AI-written Programs with Multilingual Code Stylometrycited by 6
- 2024Tadashi: Enabling AI-Based Automated Code Generation With Guaranteed Correctnesscited by 1
Built on by
Citing papers per year: 2026: 1.
1 paper.