CoChat

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

Open access
Mastropaolo, Antonio, Pascarella, Luca, Guglielmi, Emanuela, Ciniselli, Matteo, Scalabrino, Simone, Oliveto, Rocco, Bavota, Gabriele · 2023 · 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)
Cited by 138

The DOI matches its Crossref record; 20 of the 20 references it cites were found in a registry or an index.

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%).

Overview

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1109/icse48619.2023.00181

Cites

20 of 20 references verified0 citation errors · 0 not checkable

Statistics

Verification

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Citations

Cites

Show all 20 references

Research works printed but not linked: 48

  1. campbell, 2018, Cognitive Complexity — An Overview and Evaluation, Proceedings of the 2018 International Conference on Technical Debt - TechDebt '18, 57, 10.1145/3194164.3194186 · DOI
  2. tufano, 2020, Generating accurate assert statements for unit test cases using pretrained transformers, CoRR, abs 2009 5634
  3. 10.1145/1595696.1595728 · DOI · Paper page
  4. 10.1109/TSE.2021.3128234 · DOI · Paper page
  5. sobania, 2021, Choose your programming copilot: A comparison of the program synthesis performance of github copilot and genetic programming, ArXiv Preprint
  6. 10.1007/s10664-013-9256-x · doi:10.1007/s10664-013-9256-x
  7. tsantalis, 2018, Ten years of jdeodor-ant: Lessons learned from the hunt for smells, 25th International Conference on Software Analysis Evolution and Reengineering SANER 2018, 4
  8. 10.1109/ICSME.2014.110 · DOI
  9. 10.1145/2025113.2025163 · doi:10.1145/2025113.2025163
  10. 10.1109/MSR52588.2021.00074 · DOI
  11. ciniselli, 0, An empirical study on the usage of bert models for code completion, Proceedings of the 8th Working Conference on Mining Software Repositories
  12. 10.1007/978-3-642-45135-5 · DOI · Paper page
  13. 10.1016/j.jss.2016.07.026 · DOI
  14. pearce, 2021, An empirical cybersecurity evaluation of github copilot's code contributions, ArXiv Preprint
  15. 10.1109/ICSE.2012.6227205 · DOI · Paper page
  16. nguyen, 2016, A Large-Scale Study on Repetitiveness, Containment, and Composability of Routines in Open-Source Projects, 2016 IEEE/ACM 13th Conference on Mining Software Repositories (MSR), 362
  17. 10.1145/2950290.2983931 · DOI · Paper page
  18. alon, 2019, Structural language models of code, ArXiv, arxiv-1910
  19. allamanis, 0, Learning natural coding conventions, Proceedings of the 2nd ACM SIGSOFT Symposium on Foundations of Software Engineering, 281
  20. 10.1007/978-3-319-58524-6_17 · DOI
  21. 0, JUnit
  22. 0, Parser in Java
  23. 0, Replication Package
  24. 0, PEGASUS fine-tuned for paraphrasing
  25. 10.1109/TSE.2016.2591536 · DOI
  26. 10.1145/3180155.3180195 · DOI · Paper page
  27. 10.1145/3377811.3380345 · DOI · Paper page
  28. m?r?soiu, 0, An empirical investigation of code completion usage by professional software developers, Proceedings of the 26th Annual Workshop of the Psychology of Programming Interest Group
  29. levenshtein, 1966, Binary codes capable of correcting deletions, insertions, and reversals, Soviet Physics Doklady, 10, 707
  30. 10.1109/ICSE.2012.6227211 · DOI · Paper page
  31. 10.1109/ICSME52107.2021.00024 · doi:10.1109/icsme52107.2021.00024
  32. 10.1145/3368089.3417926 · DOI · Paper page
  33. 0, Jacoco
  34. 0, GitHub Copilot
  35. moreno, 2015, How can I use this method?, Proceedings of the International Conference on Software Engineering ICSE'94, 880
  36. 10.1145/2522920.2522930 · DOI
  37. hu, 2018, Deep code comment generation
  38. 10.1145/3196321.3196334 · DOI · Paper page
  39. 10.1145/3196398.3196474 · DOI
  40. 10.1109/ICSE-Companion55297.2022.9793778 · doi:10.1109/icse-companion55297.2022.9793778 · Paper page
  41. xie, 2006, MAPO Mining API Usages From Open Source Repositories
  42. 10.1109/TSE.2016.2576454 · DOI · Paper page
  43. howard, 2021, Github copilot Copyright fair use creativity transfor-mativity and algorithms
  44. 10.1109/ASE.2009.39 · DOI
  45. karampatsis, 2019, Maybe deep neural networks are the best choice for modeling source code, CoRR, abs 1903 5734
  46. 10.1145/3377811.3380429 · DOI · Paper page
  47. 10.1109/MSR.2015.38 · DOI · Paper page
  48. 10.1109/ICSE43902.2021.00025 · DOI

Cited by

See all 138

Metadata

Authors
Mastropaolo, A., Pascarella, L., Guglielmi, E., Ciniselli, M., Scalabrino, S., Oliveto, R., & Bavota, G.
Venue
2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)
Publisher
IEEE
Published
2023-05
Pages
2149-2160
OpenAlex
W4384345639
Cited by
138
References
20
FWCI
36.78
Type
conference paper
Language
en
Open access
green
Funders
European Research Council (ERC) (851720)

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

How to cite

Cite CoChat for the checks on this page, and the paper for its own findings.

This page
CoChat. (2026). Citation check: On the Robustness of Code Generation Techniques: An Empirical Study on GitHub Copilot. https://app.cochat.ai/papers/10.1109/icse48619.2023.00181
The paper
Mastropaolo, A., Pascarella, L., Guglielmi, E., Ciniselli, M., Scalabrino, S., Oliveto, R., & Bavota, G. (2023). On the Robustness of Code Generation Techniques: An Empirical Study on GitHub Copilot. 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE). https://doi.org/10.1109/icse48619.2023.00181

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.