mlsanityData to 7 Oct 2026

An Exploratory Study on LLM-Generated Code and Comments in Code Repositories

arXiv 2607.01867 ↗First posted 2 Jul 2026cs.SE cs.AIcited by 2

Not on the map. Why?

Abstract (arXiv)

The use of LLMs in software development has become increasingly widespread on tasks such as code generation and summarization. Reports from large technology companies showed that around 20% to 30% of their code are generated by LLMs. However, there remains skepticism about the practical usage of LLM-generated code and comments, such as concerns on more time for debugging the generated code and the unnaturalness of the generated comments. In this paper, we study the code and comments detected as likely to be generated by LLMs and their characteristics, the differences between company- and community-maintained repositories, and how likely bugs are associated with LLM-generated code. We conduct extensive experiments on active company- and community-maintained repositories from 2021 to 2025 using various tools and techniques that detect code and comments generated by LLMs. Based on our detector-based proxy analysis, the results suggest that code detected as likely to be generated by LLMs decreased over time and appeared frequently in test cases, while that of comments remains relatively stable. Proxy results further suggest that code detected as likely to be generated by LLMs shows substantial intra-repository code clones, whereas comments exhibit a relatively low proportion of grammatically correct sentences. In addition, the company-maintained repositories show a higher percentage of code and comments detected as likely to be generated by LLMs, and only a small percentage of the human-labelled bugs are detected as being likely associated with LLM-generated code.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 44 of its 70 references that are in the map. First posted on arXiv 2 Jul 2026.

Builds on

44 of 70 references.

References · 44

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2023A Survey of Large Language Modelscited by 2,537
  3. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  4. 2023DetectGPT: Zero-Shot Machine-Generated Text Detection using Probability Curvaturecited by 705
  5. 2023A Watermark for Large Language Modelscited by 667
  6. 2024A Survey on Large Language Models for Code Generationcited by 646
  7. 2019Defending Against Neural Fake Newscited by 553
  8. 2019Release Strategies and the Social Impacts of Language Modelscited by 505
  9. 2019GLTR: Statistical Detection and Visualization of Generated Textcited by 490
  10. 2023How Close is ChatGPT to Human Experts? Comparison Corpus, Evaluation, and Detectioncited by 472
  11. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
  12. 2023Fast-DetectGPT: Efficient Zero-Shot Detection of Machine-Generated Text via Conditional Probability Curvaturecited by 278
32 more
  1. 2023The Impact of AI on Developer Productivity: Evidence from GitHub Copilotcited by 264
  2. 2019Automatic Detection of Generated Text is Easiest when Humans are Fooledcited by 260
  3. 2023Provable Robust Watermarking for AI-Generated Textcited by 259
  4. 2024Spotting LLMs With Binoculars: Zero-Shot Detection of Machine-Generated Textcited by 255
  5. 2022Grounded Copilot: How Programmers Interact with Code-Generating Modelscited by 216
  6. 2023DetectLLM: Leveraging Log Rank Information for Zero-Shot Detection of Machine-Generated Textcited by 207
  7. 2024Monitoring AI-Modified Content at Scale: A Case Study on the Impact of ChatGPT on AI Conference Peer Reviewscited by 160
  8. 2022GitHub Copilot AI pair programmer: Asset or Liability?cited by 150
  9. 2022Few-shot training LLMs for project-specific code-summarizationcited by 128
  10. 2020TweepFake: about Detecting Deepfake Tweetscited by 117
  11. 2023InferFix: End-to-End Program Repair with LLMscited by 113
  12. 2023Execution-based Code Generation using Deep Reinforcement Learningcited by 95
  13. 2023On the Possibilities of AI-Generated Text Detectioncited by 88
  14. 2023Refining ChatGPT-Generated Code: Characterizing and Mitigating Code Quality Issuescited by 78
  15. 2023A Large-Scale Survey on the Usability of AI Programming Assistants: Successes and Challengescited by 75
  16. 2022Automated Repair of Programs from Large Language Modelscited by 71
  17. 2024Bugs in Large Language Models Generated Code: An Empirical Studycited by 59
  18. 2024Using AI-Based Coding Assistants in Practice: State of Affairs, Perceptions, and Ways Forwardcited by 44
  19. 2025People who frequently use ChatGPT for writing tasks are accurate and robust detectors of AI-generated textcited by 39
  20. 2024DetectRL: Benchmarking LLM-Generated Text Detection in Real-World Scenarioscited by 37
  21. 2024Source Code Summarization in the Era of Large Language Modelscited by 30
  22. 2024Between Lines of Code: Unraveling the Distinct Patterns of Machine and Human Programmerscited by 27
  23. 2021An Empirical Study on the Usage of Transformer Models for Code Completioncited by 22
  24. 2024Examining the Use and Impact of an AI Code Assistant on Developer Productivity and Experience in the Enterprisecited by 17
  25. 2023Practices and Challenges of Using GitHub Copilot: An Empirical Studycited by 13
  26. 2023GPTCloneBench: A comprehensive benchmark of semantic clones and cross-language clones using GPT-3 model and SemanticCloneBenchcited by 11
  27. 2023New Evaluation Metrics Capture Quality Degradation due to LLM Watermarkingcited by 10
  28. 2023Is this Snippet Written by ChatGPT? An Empirical Study with a CodeBERT-Based Classifiercited by 6
  29. 2023Study of software developers' experience using the Github Copilot Tool in the software development processcited by 3
  30. 2023PreciseBugCollector: Extensible, Executable and Precise Bug-fix Collectioncited by 3
  31. 2024Surveys Considered Harmful? Reflecting on the Use of Surveys in AI Research, Development, and Governancecited by 3
  32. 2025A Qualitative Investigation into LLM-Generated Multilingual Code Comments and Automatic Evaluation Metricscited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 2.

2 papers.