Lune

ICSE2023顶会

On the Robustness of Code Generation Techniques: An Empirical Study on GitHub Copilot

Antonio Mastropaolo, Luca Pascarella, Emanuela Guglielmi, Matteo Ciniselli, Simone Scalabrino, Rocco Oliveto, Gabriele Bavota

摘要

Software engineering research has always being concerned with the improvement of code completion approaches, which suggest the next tokens a developer will likely type while coding. The release of GitHub Copilot constitutes a big step forward, also because of its unprecedented ability to automatically generate even entire functions from their natural language description. While the usefulness of Copilot is evident, it is still unclear to what extent it is robust. Specifically, we do not know the extent to which semantic-preserving changes in the natural language description provided to the model have an effect on the generated code function. In this paper we present an empirical study in which we aim at understanding whether different but semantically equivalent natural language descriptions result in the same recommended function. A negative answer would pose questions on the robustness of deep learning (DL)-based code generators since it would imply that developers using different wordings to describe the same code would obtain different recommendations. We asked Copilot to automatically generate 892 Java methods starting from their original Javadoc description. Then, we generated different semantically equivalent descriptions for each method both manually and automatically, and we analyzed the extent to which predictions generated by Copilot changed. Our results show that modifying the description results in different code recommendations in ∼46% of cases. Also, differences in the semantically equivalent descriptions might impact the correctness of the generated code (±28%).

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 19 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Code Prediction by Feeding Trees to Transformers 引用了 Structural Language Models of Code
  • Your Code Secret Belongs to Me: Neural Code Completion Tools Can Memorize Hard-Coded Credentials 引用了 From Misuse to Mastery: Enhancing Code Generation with Knowledge-Driven AI Chaining
  • Multi-task Learning based Pre-trained Language Model for Code Completion 引用了 Code Prediction by Feeding Trees to Transformers
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper19

  1. VerilogCoder: Autonomous Verilog Coding Agents with Graph-based Planning and Abstract Syntax Tree (AST)-based Waveform Tracing ToolChia-Tung Ho, Haoxing Ren, Brucek KhailanyAAAI 2025 · 108 次引用
  2. Beyond Code Generation: An Observational Study of ChatGPT Usage in Software Engineering PracticeRanim Khojah, Mazen Mohamad, Philipp Leitner, Francisco Gomes de Oliveira NetoFSE 2024 · 56 次引用
  3. On the Evaluation of Large Language Models in Unit Test GenerationLin Yang, Chen Yang, Shutao Gao, Weijing Wang 等ASE 2024 · 42 次引用
  4. From Misuse to Mastery: Enhancing Code Generation with Knowledge-Driven AI ChainingXiaoxue Ren, Xinyuan Ye, Dehai Zhao, Zhenchang Xing 等ASE 2023 · 28 次引用
  5. Your Code Secret Belongs to Me: Neural Code Completion Tools Can Memorize Hard-Coded CredentialsYizhan Huang, Yichen Li, Weibin Wu, Jianping Zhang 等FSE 2024 · 22 次引用

它引用的 Paper7

  1. PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive SummarizationJingqing Zhang, Yao Zhao, Mohammad Saleh, Peter J. LiuICML 2020 · 2,453 次引用
  2. DLFix: context-based code transformation learning for automated program repairYi Li, Shaohua Wang, Tien N. NguyenICSE 2020 · 201 次引用
  3. Code Prediction by Feeding Trees to TransformersSeohyun Kim, Jinman Zhao, Yuchi Tian, Satish ChandraICSE 2021 · 179 次引用
  4. Multi-task Learning based Pre-trained Language Model for Code CompletionFang Liu, Ge Li, Yunfei Zhao, Zhi JinASE 2020 · 162 次引用
  5. Structural Language Models of CodeUri Alon, Roy Sadaka, Omer Levy, Eran YahavICML 2020 · 115 次引用

相关 Paper

  1. A User-centered Security Evaluation of CopilotOwura Asare, Meiyappan Nagappan, N. AsokanICSE 2024 · 11 次引用
  2. Source Code Recommender Systems: The Practitioners' PerspectiveMatteo Ciniselli, Luca Pascarella, Emad Aghajani, Simone Scalabrino 等ICSE 2023 · 6 次引用
  3. Natural Language-Focused Software Engineering via Code-Documentation EquivalenceAryaz Eghbali, Zhongxin Liu, Michael PradelFSE 2026
  4. MATCH: Task-Driven Code Evaluation through Contrastive LearningMarah Ghoummaid, Vladimir Tchuiev, Ofek Glick, Michal Moshkovitz 等EMNLP Findings 2025
  5. An Empirical Study of Knowledge Transfer in AI Pair ProgrammingAlisa Welter, Niklas Schneider, Tobias Dick, Kallistos Weis 等ASE 2025
黄昏的海面,两侧是细线勾勒的悬崖