On the Robustness of Code Generation Techniques: An Empirical Study on GitHub Copilot
Open accessThe 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.
Integrity signals
Registry
Cites
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.
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
BLEU: a method for automatic evaluation of machine translation
Papineni, K., Roukos, S., Ward, T., & Zhu, W.-J. (2001) · Proceedings of the 40th Annual Meeting on Association for Computational Linguistics - ACL '02 · doi:10.3115/1073083.1073135 · Cited by 21,344
Evaluating Large Language Models Trained on Code
Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinto, H. P. D. O., Kaplan, J., Edwards, H., Burda, Y., Joseph, N., Brockman, G., et al. (2021) · arXiv · doi:10.48550/arxiv.2107.03374 · Cited by 1,436
PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization
Zhang, J., Zhao, Y., Saleh, M., & Liu, P. J. (2019) · arXiv · doi:10.48550/arxiv.1912.08777 · Cited by 1,206 · cited 2×
“We validated two state-of-the-art approaches in this scenario: PEGASUS [66], a DL-based paraphrasing tool, and Translation Pivoting (TP), a heuristic-based approach.”
Vaithilingam, P., Zhang, T., & Glassman, E. L. (2022) · CHI Conference on Human Factors in Computing Systems Extended Abstracts · doi:10.1145/3491101.3519665 · Cited by 660
IntelliCode compose: code generation using transformer
Svyatkovskiy, A., Deng, S. K., Fu, S., & Sundaresan, N. (2020) · Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3368089.3417058 · Cited by 474 · cited 1×
“…targeted the relatively simpler problem of code completion, that has been tackled exploiting historical information [50], coding patterns mined from software repositories [21], [42], [56], [10], [41], [45], [19] and, more recently, Deep Learning (DL) models [62], [27], [29], [8], [53], [15].”
On the naturalness of software
Hindle, A., Barr, E. T., Su, Z., Gabel, M., & Devanbu, P. (2012) · 2012 34th International Conference on Software Engineering (ICSE) · doi:10.1109/icse.2012.6227135 · Cited by 425
An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation
Tufano, M., Watson, C., Bavota, G., Penta, M. D., White, M., & Poshyvanyk, D. (2019) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3340544 · Cited by 370
Self-citationAn empirical evaluation of GitHub copilot's code suggestions
Nguyen, N., & Nadi, S. (2022) · Proceedings of the 19th International Conference on Mining Software Repositories · doi:10.1145/3524842.3528470 · Cited by 313 · cited 2×
“Nguyen and Nadi [43] used LeetCode questions as input to Copilot to evaluate the solutions provided for several programming languages in terms of correctness — by running the test cases available in LeetCode — and understandability — by computing their Cyclomatic Complexity and Cognitive Complexity…”
Are deep neural networks the best choice for modeling source code?
Hellendoorn, V. J., & Devanbu, P. (2017) · Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering · doi:10.1145/3106237.3106290 · Cited by 292
Tu, Z., Su, Z., & Devanbu, P. (2014) · Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering · doi:10.1145/2635868.2635875 · Cited by 238 · cited 1×
“…targeted the relatively simpler problem of code completion, that has been tackled exploiting historical information [50], coding patterns mined from software repositories [21], [42], [56], [10], [41], [45], [19] and, more recently, Deep Learning (DL) models [62], [27], [29], [8], [53], [15].”
Research works printed but not linked: 48
- 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
- tufano, 2020, Generating accurate assert statements for unit test cases using pretrained transformers, CoRR, abs 2009 5634
- 10.1145/1595696.1595728 · DOI · Paper page
- 10.1109/TSE.2021.3128234 · DOI · Paper page
- sobania, 2021, Choose your programming copilot: A comparison of the program synthesis performance of github copilot and genetic programming, ArXiv Preprint
- 10.1007/s10664-013-9256-x · doi:10.1007/s10664-013-9256-x
- 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
- 10.1109/ICSME.2014.110 · DOI
- 10.1145/2025113.2025163 · doi:10.1145/2025113.2025163
- 10.1109/MSR52588.2021.00074 · DOI
- ciniselli, 0, An empirical study on the usage of bert models for code completion, Proceedings of the 8th Working Conference on Mining Software Repositories
- 10.1007/978-3-642-45135-5 · DOI · Paper page
- 10.1016/j.jss.2016.07.026 · DOI
- pearce, 2021, An empirical cybersecurity evaluation of github copilot's code contributions, ArXiv Preprint
- 10.1109/ICSE.2012.6227205 · DOI · Paper page
- 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
- 10.1145/2950290.2983931 · DOI · Paper page
- alon, 2019, Structural language models of code, ArXiv, arxiv-1910
- allamanis, 0, Learning natural coding conventions, Proceedings of the 2nd ACM SIGSOFT Symposium on Foundations of Software Engineering, 281
- 10.1007/978-3-319-58524-6_17 · DOI
- 0, JUnit
- 0, Parser in Java
- 0, Replication Package
- 0, PEGASUS fine-tuned for paraphrasing
- 10.1109/TSE.2016.2591536 · DOI
- 10.1145/3180155.3180195 · DOI · Paper page
- 10.1145/3377811.3380345 · DOI · Paper page
- 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
- levenshtein, 1966, Binary codes capable of correcting deletions, insertions, and reversals, Soviet Physics Doklady, 10, 707
- 10.1109/ICSE.2012.6227211 · DOI · Paper page
- 10.1109/ICSME52107.2021.00024 · doi:10.1109/icsme52107.2021.00024
- 10.1145/3368089.3417926 · DOI · Paper page
- 0, Jacoco
- 0, GitHub Copilot
- moreno, 2015, How can I use this method?, Proceedings of the International Conference on Software Engineering ICSE'94, 880
- 10.1145/2522920.2522930 · DOI
- hu, 2018, Deep code comment generation
- 10.1145/3196321.3196334 · DOI · Paper page
- 10.1145/3196398.3196474 · DOI
- 10.1109/ICSE-Companion55297.2022.9793778 · doi:10.1109/icse-companion55297.2022.9793778 · Paper page
- xie, 2006, MAPO Mining API Usages From Open Source Repositories
- 10.1109/TSE.2016.2576454 · DOI · Paper page
- howard, 2021, Github copilot Copyright fair use creativity transfor-mativity and algorithms
- 10.1109/ASE.2009.39 · DOI
- karampatsis, 2019, Maybe deep neural networks are the best choice for modeling source code, CoRR, abs 1903 5734
- 10.1145/3377811.3380429 · DOI · Paper page
- 10.1109/MSR.2015.38 · DOI · Paper page
- 10.1109/ICSE43902.2021.00025 · DOI
Cited by
Large Language Models for Software Engineering: A Systematic Literature Review
Hou, X., Zhao, Y., Liu, Y., Yang, Z., Wang, K., Li, L., Luo, X., Lo, D., Grundy, J., & Wang, H. (2024) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3695988 · Cited by 1,029
An Empirical Study of the Non-Determinism of ChatGPT in Code Generation
Ouyang, S., Zhang, J. M., Harman, M., & Wang, M. (2025) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3697010 · Cited by 258
“We choose the Longest Common Subsequence and Levenshtein Edit Distance as evaluation tools [34, 35, 46, 66].”
Navigating the Complexity of Generative AI Adoption in Software Engineering
Russo, D. (2024) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3652154 · Cited by 217
“investigated the robustness of Copilot in relation to semantic-preserving changes in the natural language description [51].”
BackgroundCode Review Automation: Strengths and Weaknesses of the State of the Art
Tufano, R., Dabić, O., Mastropaolo, A., Ciniselli, M., & Bavota, G. (2024) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2023.3348172 · Cited by 48
Self-citationUnveiling ChatGPT’s usage in open source projects: A mining-based study
Tufano, R., Mastropaolo, A., Pepe, F., Dabic, O., Di Penta, M., & Bavota, G. (2024) · Proceedings of the 21st International Conference on Mining Software Repositories · doi:10.1145/3643991.3644918 · Cited by 38
“These investigations include studies on the impact of the recommender on developers [71, 93, 109, 118], robustness assessment [82, 113, 115], empirical evaluation of correctness [88, 115], and scrutiny of security aspects [47, 92, 97].”
BackgroundMethodSelf-citation
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.