arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2506.12014cs.CLcs.AIcs.LGcs.SE
收藏

code_transformed: 大型语言模型对代码的影响

code_transformed: The Influence of Large Language Models on Code

Huazhong University of Science and Technology(华中科技大学);École normale supérieure - Université PSL(巴黎高等师范学院-巴黎大学);Laboratoire LATTICE(LATTICE实验室);International School for Advanced Studies (SISSA)(国际先进研究学院(SISSA))

Yuliang Xu, Siming Huang, Mingmeng Geng, Yao Wan, Xuanhua Shi, Dongping Chen

AI总结:

本文研究了大型语言模型对代码风格的影响,通过分析GitHub仓库中的代码,发现命名规范、复杂性等指标的变化,揭示LLMs对现实编程实践的深远影响。

摘要:

代码仍然是人类与机器之间最基础的交互方式之一。随着大型语言模型(LLMs)的快速发展,代码生成能力已经开始显著改变编程实践。这一发展引发了一个核心问题:LLMs是否改变了代码风格,这种转变如何体现?本文提出了一项开创性的研究,探讨LLMs对代码风格的影响,重点研究命名规范、复杂性、可维护性和相似性。通过分析超过20,000个GitHub仓库中的代码,这些仓库链接到2020年至2025年间发表在arXiv上的论文,我们识别出代码风格演变中的可测量趋势,这些趋势与LLM生成的代码特征相符。例如,Python代码中snake_case函数名的比例从2023年第一季度的40.7%增加到2025年第三季度的49.8%。此外,我们还研究了LLMs如何解决算法问题,通过分析其推理过程。我们的实验结果可能为首次提供大规模实证证据,表明LLMs影响现实世界的编程风格。我们发布了所有实验数据集和源代码:https://github.com/ignorancex/LLM_code

英文摘要:

Coding remains one of the most fundamental modes of interaction between humans and machines. With the rapid advancement of Large Language Models (LLMs), code generation capabilities have begun to significantly reshape programming practices. This development prompts a central question: Have LLMs transformed code style, and how can such transformation be characterized? In this paper, we present a pioneering study that investigates the impact of LLMs on code style, with a focus on naming conventions, complexity, maintainability, and similarity. By analyzing code from over 20,000 GitHub repositories linked to arXiv papers published between 2020 and 2025, we identify measurable trends in the evolution of coding style that align with characteristics of LLM-generated code. For instance, the proportion of snake_case function names in Python code increased from 40.7% in Q1 2023 to 49.8% in Q3 2025. Furthermore, we investigate how LLMs approach algorithmic problems by examining their reasoning processes. Our experimental results may provide the first large-scale empirical evidence that LLMs affect real-world programming style. We release all the experimental dataset and source code at: https://github.com/ignorancex/LLM_code

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑