Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
110 tokens/sec
GPT-4o
56 tokens/sec
Gemini 2.5 Pro Pro
44 tokens/sec
o3 Pro
6 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

On the Robustness of Code Generation Techniques: An Empirical Study on GitHub Copilot (2302.00438v1)

Published 1 Feb 2023 in cs.SE

Abstract: 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%.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (7)
  1. Antonio Mastropaolo (25 papers)
  2. Luca Pascarella (21 papers)
  3. Emanuela Guglielmi (6 papers)
  4. Matteo Ciniselli (11 papers)
  5. Simone Scalabrino (18 papers)
  6. Rocco Oliveto (20 papers)
  7. Gabriele Bavota (60 papers)
Citations (76)

Summary

We haven't generated a summary for this paper yet.