{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,8]],"date-time":"2026-10-08T11:48:15Z","timestamp":1791460095938,"version":"4.3.4"},"reference-count":49,"publisher":"Association for Computing Machinery (ACM)","issue":"7","funder":[{"DOI":"10.13039\/501100001809","name":"National Natural Science Foundation of China","doi-asserted-by":"crossref","award":["Grant No. 62172311"],"award-info":[{"award-number":["Grant No. 62172311"]}],"id":[{"id":"10.13039\/501100001809","id-type":"DOI","asserted-by":"crossref"}]},{"name":"Major Science and Technology Project of Hubei Province","award":["Grant No. 2024BAA008"],"award-info":[{"award-number":["Grant No. 2024BAA008"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Softw. Eng. Methodol."],"published-print":{"date-parts":[[2026,7,31]]},"abstract":"<jats:p>\n                    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-method 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\u2019 survey, which received 111 valid responses. Our research revealed the practices followed by developers to self-declare AI-generated code. Most practitioners (76.6%)\n                    <jats:italic toggle=\"yes\">always<\/jats:italic>\n                    or\n                    <jats:italic toggle=\"yes\">sometimes<\/jats:italic>\n                    self-declare AI-generated code. In contrast, other practitioners (23.4%) noted that they\n                    <jats:italic toggle=\"yes\">never<\/jats:italic>\n                    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\u2019 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.\n                  <\/jats:p>","DOI":"10.1145\/3771937","type":"journal-article","created":{"date-parts":[[2025,10,16]],"date-time":"2025-10-16T14:45:01Z","timestamp":1760625901000},"page":"1-37","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":5,"title":["On Developers\u2019 Self-Declaration of AI-Generated Code: An Analysis of Practices"],"prefix":"10.1145","volume":"35","author":[{"ORCID":"https:\/\/orcid.org\/0009-0001-0243-0720","authenticated-orcid":false,"given":"Syed Mohammad","family":"Kashif","sequence":"first","affiliation":[{"name":"School of Computer Science, Wuhan University, Wuhan, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-2056-5346","authenticated-orcid":false,"given":"Peng","family":"Liang","sequence":"additional","affiliation":[{"name":"School of Computer Science, Wuhan University, Wuhan, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9454-1366","authenticated-orcid":false,"given":"Amjed","family":"Tahir","sequence":"additional","affiliation":[{"name":"School of Mathematical and Computational Sciences, Massey University, Palmerston North, New Zealand"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2026,7,11]]},"reference":[{"key":"e_1_3_3_2_2","unstructured":"GitHub Docs. 2022. GitHub REST API. Retrieved May 10 2024 from https:\/\/docs.github.com\/en\/rest\/search\/search?apiVersion=2022-11-28"},{"key":"e_1_3_3_3_2","doi-asserted-by":"crossref","unstructured":"Samuel Greengard. 2023. AI Rewrites Coding. Retrieved September 12 2024 from https:\/\/cacm.acm.org\/news\/ai-rewrites-coding\/","DOI":"10.1145\/3583083"},{"key":"e_1_3_3_4_2","unstructured":"Gergely Orosz and Elin Nilsson. 2024. AI Tooling for Software Engineers. Retrieved September 12 2024 from https:\/\/newsletter.pragmaticengineer.com\/p\/ai-tooling-2024"},{"key":"e_1_3_3_5_2","unstructured":"CodeWhisperer. 2024. Amazon CodeWhisperer. Retrieved May 10 2024 from https:\/\/docs.aws.amazon.com\/codewhisperer\/latest\/userguide\/what-is-cwspr.html"},{"key":"e_1_3_3_6_2","unstructured":"OpenAI. 2024. ChatGPT. Retrieved August 10 2024 from https:\/\/openai.com\/index\/chatgpt\/"},{"key":"e_1_3_3_7_2","unstructured":"Google DeepMind. 2024. Gemini. Retrieved August 10 2024 from https:\/\/gemini.google.com\/"},{"key":"e_1_3_3_8_2","unstructured":"GitHub. 2024. GitHub Copilot. Retrieved August 10 2024 from https:\/\/github.com\/copilot\/"},{"key":"e_1_3_3_9_2","unstructured":"Stack Overflow. 2024. Stack Overflow Developer Survey. Retrieved October 23 2024 from https:\/\/survey.stackoverflow.co\/2024\/ai#2-ai-in-the-development-workflow"},{"key":"e_1_3_3_10_2","unstructured":"GitHub. 2024. State of the Octoverse 2024. Retrieved November 28 2024 from https:\/\/github.blog\/news-insights\/octoverse\/octoverse-2024\/"},{"key":"e_1_3_3_11_2","unstructured":"GitHub. 2024. Top 10 Languages on GitHub. Retrieved May 10 2024 from https:\/\/madnight.github.io\/githut\/#\/pull_requests\/2024\/1"},{"key":"e_1_3_3_12_2","unstructured":"GitHub Docs. 2025. GitHub GraphQL API. Retrieved August 12 2025 from https:\/\/docs.github.com\/en\/graphql"},{"key":"e_1_3_3_13_2","unstructured":"Stack Overflow. 2025. Stack Overflow Developer Survey. Retrieved August 27 2025 from https:\/\/survey.stackoverflow.co\/2025\/"},{"key":"e_1_3_3_14_2","first-page":"201","volume-title":"Proceedings of the 25th International Conference on Agile Software Development (XP)","author":"Abrahamsson Pekka","year":"2024","unstructured":"Pekka Abrahamsson, Tatu Anttila, Jyri Hakala, Juulia Ketola, Anna Knappe, Daniel Lahtinen, V\u00e4in\u00f6 Liukko, Timo Poranen, Topi-Matti Ritala, and Manu Set\u00e4l\u00e4. 2024. ChatGPT as a fullstack web developer\u2014Early results. In Proceedings of the 25th International Conference on Agile Software Development (XP), 201\u2013209."},{"key":"e_1_3_3_15_2","doi-asserted-by":"crossref","unstructured":"Shraddha Barke Michael B. James and Nadia Polikarpova. 2023. Grounded Copilot: How programmers interact with code-generating models. Proceedings of the ACM on Programming Languages 7 OOPSLA1 (2023) 85\u2013111.","DOI":"10.1145\/3586030"},{"key":"e_1_3_3_16_2","doi-asserted-by":"publisher","DOI":"10.1191\/1478088706qp063oa"},{"key":"e_1_3_3_17_2","unstructured":"Tuan-Dung Bui Thanh Trong Vu Thu-Trang Nguyen Son Nguyen and Hieu Dinh Vo. 2025. Correctness assessment of code generated by large language models using internal representations. arXiv:2501.12934. Retrieved from https:\/\/arxiv.org\/abs\/2501.12934"},{"key":"e_1_3_3_18_2","doi-asserted-by":"publisher","DOI":"10.1177\/0049124113500475"},{"key":"e_1_3_3_19_2","unstructured":"Mark Chen Jerry Tworek Heewoo Jun Qiming Yuan Henrique Ponde De Oliveira Pinto Jared Kaplan Harri Edwards Yuri Burda Nicholas Joseph Greg Brockman et al. 2021. Evaluating large language models trained on code. arXiv:2107.03374. Retrieved from https:\/\/arxiv.org\/abs\/2107.03374"},{"key":"e_1_3_3_20_2","doi-asserted-by":"publisher","DOI":"10.1177\/001316446002000104"},{"key":"e_1_3_3_21_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2023.111734"},{"key":"e_1_3_3_22_2","first-page":"30","article-title":"Generative AI for software practitioners","volume":"40","author":"Ebert C.","year":"2023","unstructured":"C. Ebert and P. Louridas. 2023. Generative AI for software practitioners. IEEE Access 40 (2023), 30\u201338.","journal-title":"IEEE Access"},{"key":"e_1_3_3_23_2","doi-asserted-by":"publisher","DOI":"10.1145\/3716848"},{"key":"e_1_3_3_24_2","doi-asserted-by":"publisher","DOI":"10.1109\/ACCESS.2023.3300381"},{"key":"e_1_3_3_25_2","doi-asserted-by":"publisher","DOI":"10.1109\/SANER64311.2025.00044"},{"key":"e_1_3_3_26_2","doi-asserted-by":"publisher","DOI":"10.1145\/3695988"},{"key":"e_1_3_3_27_2","doi-asserted-by":"publisher","DOI":"10.1145\/3643991.3644926"},{"key":"e_1_3_3_28_2","doi-asserted-by":"publisher","DOI":"10.1145\/3643991.3645074"},{"key":"e_1_3_3_29_2","doi-asserted-by":"crossref","unstructured":"Syed Mohammad Kashif Peng Liang and Amjed Tahir. 2025. Dataset for the paper: On developers\u2019 self-declaration of AI-generated code: An analysis of practices. Retrieved from https:\/\/github.com\/Kashifraz\/SDAGC","DOI":"10.1145\/3771937"},{"key":"e_1_3_3_30_2","doi-asserted-by":"publisher","DOI":"10.1109\/ISSREW60843.2023.00059"},{"key":"e_1_3_3_31_2","doi-asserted-by":"publisher","DOI":"10.1145\/3597503.3608128"},{"key":"e_1_3_3_32_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-981-99-8073-4_46"},{"key":"e_1_3_3_33_2","doi-asserted-by":"publisher","DOI":"10.1145\/3643674"},{"key":"e_1_3_3_34_2","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2024.3392499"},{"key":"e_1_3_3_35_2","first-page":"435","volume-title":"Proceedings of the 31st IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)","author":"Majdinasab Vahid","year":"2024","unstructured":"Vahid Majdinasab, Michael Joshua Bishop, Shawn Rasheed, Arghavan Moradidakhel, Amjed Tahir, and Foutse Khomh. 2024. Assessing the security of GitHub Copilot\u2019s generated code\u2014A targeted replication study. In Proceedings of the 31st IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER), 435\u2013444."},{"key":"e_1_3_3_36_2","doi-asserted-by":"crossref","unstructured":"Nora McDonald Sarita Schoenebeck and Andrea Forte. 2019. Reliability and inter-rater reliability in qualitative research: Norms and guidelines for CSCW and HCI practice. Proceedings of the ACM on Human-Computer Interaction 3 CSCW (2019) 1\u201323.","DOI":"10.1145\/3359174"},{"key":"e_1_3_3_37_2","doi-asserted-by":"publisher","DOI":"10.1109\/SANER-C62648.2024.00018"},{"issue":"2","key":"e_1_3_3_38_2","first-page":"28","article-title":"An empirical study of the non-determinism of ChatGPT in code generation","volume":"34","author":"Ouyang Shuyin","year":"2024","unstructured":"Shuyin Ouyang, Jie M. Zhang, Mark Harman, and Meng Wang. 2024. An empirical study of the non-determinism of ChatGPT in code generation. ACM Transactions on Software Engineering and Methodology 34, 2, Article 42 (2024), 28 pages.","journal-title":"ACM Transactions on Software Engineering and Methodology"},{"key":"e_1_3_3_39_2","first-page":"754","volume-title":"Proceedings of the 43rd IEEE Symposium on Security and Privacy (SP)","author":"Pearce Hammond","year":"2022","unstructured":"Hammond Pearce, Baleegh Ahmad, Benjamin Tan, Brendan Dolan-Gavitt, and Ramesh Karri. 2022. Asleep at the keyboard? Assessing the security of GitHub Copilot\u2019s code contributions. In Proceedings of the 43rd IEEE Symposium on Security and Privacy (SP). IEEE, 754\u2013768."},{"key":"e_1_3_3_40_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSME.2014.31"},{"key":"e_1_3_3_41_2","doi-asserted-by":"crossref","unstructured":"Trevor Stalnaker Nathan Wintersgill Oscar Chaparro Laura A. Heymann Massimiliano Di Penta Daniel M. German and Denys Poshyvanyk. 2024. Developer perspectives on licensing and copyright issues arising from generative AI for coding. arXiv:2411.10877. Retrieved from https:\/\/arxiv.org\/abs\/2411.10877","DOI":"10.2139\/ssrn.5353252"},{"key":"e_1_3_3_42_2","doi-asserted-by":"publisher","DOI":"10.1007\/s10664-025-10614-4"},{"key":"e_1_3_3_43_2","unstructured":"Haoye Tian Weiqi Lu Tsz On Li Xunzhu Tang Shing-Chi Cheung Jacques Klein and Tegawend\u00e9 F. Bissyand\u00e9. 2023. Is ChatGPT the ultimate programming assistant\u2014How far is it? arXiv:2304.11938. Retrieved from https:\/\/arxiv.org\/abs\/2304.11938"},{"key":"e_1_3_3_44_2","unstructured":"Emil Vatai Aleksandr Drozd Ivan R. Ivanov Yinghao Ren and Mohamed Wahib. 2024. Tadashi: Enabling AI-based automated code generation with guaranteed correctness. arXiv:2410.03210. Retrieved from https:\/\/arxiv.org\/abs\/2410.03210"},{"key":"e_1_3_3_45_2","doi-asserted-by":"crossref","unstructured":"Wei Wang Huilong Ning Gaowei Zhang Libo Liu and Yi Wang. 2024. Rocks coding not development\u2014A human-centric experimental evaluation of LLM-supported SE tasks. arXiv:2402.05650. Retrieved from https:\/\/arxiv.org\/abs\/2402.05650","DOI":"10.1145\/3643758"},{"key":"e_1_3_3_46_2","doi-asserted-by":"publisher","DOI":"10.1145\/3705300"},{"key":"e_1_3_3_47_2","doi-asserted-by":"publisher","DOI":"10.1145\/3555367"},{"key":"e_1_3_3_48_2","unstructured":"Burak Yeti\u015ftiren I\u015f\u0131k \u00d6zsoy Miray Ayerdem and Eray T\u00fcz\u00fcn. 2023. Evaluating the code quality of AI-assisted code generation tools: An empirical study on GitHub Copilot Amazon CodeWhisperer and ChatGPT. arXiv:2304.10778. Retrieved from https:\/\/arxiv.org\/abs\/2304.10778"},{"key":"e_1_3_3_49_2","unstructured":"Xiao Yu Lei Liu Xing Hu Jacky Wai Keung Jin Liu and Xin Xia. 2024. Where are large language models for code generation on GitHub? arXiv:2406.19544. Retrieved from https:\/\/arxiv.org\/abs\/2406.19544"},{"key":"e_1_3_3_50_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2024.112204"}],"container-title":["ACM Transactions on Software Engineering and Methodology"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3771937","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,7,11]],"date-time":"2026-07-11T15:04:11Z","timestamp":1783782251000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3771937"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,7,11]]},"references-count":49,"journal-issue":{"issue":"7","published-print":{"date-parts":[[2026,7,31]]}},"alternative-id":["10.1145\/3771937"],"URL":"https:\/\/doi.org\/10.1145\/3771937","relation":{},"ISSN":["1049-331X","1557-7392"],"issn-type":[{"value":"1049-331X","type":"print"},{"value":"1557-7392","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,7,11]]},"assertion":[{"value":"2025-04-23","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-10-08","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2026-07-11","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}