An empirical evaluation of GitHub copilot's code suggestions
The DOI matches its Crossref record; 18 of the 18 references it cites were found in a registry or an index.
Abstract
GitHub and OpenAI recently launched Copilot, an "AI pair programmer" that utilizes the power of Natural Language Processing, Static Analysis, Code Synthesis, and Artificial Intelligence. Given a natural language description of the target functionality, Copilot can generate corresponding code in several programming languages. In this paper, we perform an empirical study to evaluate the correctness and understandability of Copilot's suggested code. We use 33 LeetCode questions to create queries for Copilot in four different programming languages. We evaluate the correctness of the corresponding 132 Copilot solutions by running LeetCode's provided tests, and evaluate understandability using SonarQube's cyclomatic complexity and cognitive complexity metrics. We find that Copilot's Java suggestions have the highest correctness score (57%) while JavaScript is the lowest (27%). Overall, Copilot's suggestions have low complexity with no notable differences between the programming languages. We also find some potential Copilot shortcomings, such as generating code that can be further simplified and code that relies on undefined helper methods.
Overview
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
In the citing paper
“Subsequently, the quality of the code generated by LLMs also cannot be guaranteed [23], [24], [25], [26].”
From No Need to Lift a Finger Anymore? Assessing the Quality of Code Generation by ChatGPT (2024) · cites this paper as [24]
In the citing paper
“Research has shown that such tools may produce insecure or suboptimal code, requiring users to review and revise outputs carefully to avoid compounding mistakes (Groothuijsen et al., 2024;Laux, 2024;Nguyen & Nadi, 2022).”
From Integrating Generative AI into Programming Education: Student Perceptions and the Challenge of Correcting AI Errors (2025) · cites this paper as Nguyen & Nadi, 2022
In the citing paper
“Nguyen et al. [37] evaluated the performance of Copilot on 33 programming tasks.”
From Refining ChatGPT-Generated Code: Characterizing and Mitigating Code Quality Issues (2024) · cites this paper as [37]
In the citing paper
“Moreover, Nguyen et al. [37] focus on analyzing the correctness of AI-generated code while Fan et al. [15] target to benchmark automated program repair tools on ixing mistakes.”
From Refining ChatGPT-Generated Code: Characterizing and Mitigating Code Quality Issues (2024) · cites this paper as [37]
In the citing paper
“However, these studies focus on CodeX and GitHub Copilot on a few programming tasks, leading to a lack of diversity.”
From Refining ChatGPT-Generated Code: Characterizing and Mitigating Code Quality Issues (2024) · cites this paper as [37]
2 more claims about this paper
Create a free account to see every claim other papers make about this one.
Citations
Cites
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
code2vec: Learning distributed representations of code
Alon, U., Zilberstein, M., Levy, O., & Yahav, E. (2019) · Proceedings of the ACM on Programming Languages · doi:10.1145/3290353 · Cited by 962
Gu, X., Zhang, H., & Kim, S. (2018) · Proceedings of the 40th International Conference on Software Engineering · doi:10.1145/3180155.3180167 · Cited by 547
Asleep at the Keyboard? Assessing the Security of GitHub Copilot’s Code Contributions
Pearce, H., Ahmad, B., Tan, B., Dolan-Gavitt, B., & Karri, R. (2022) · 2022 IEEE Symposium on Security and Privacy (SP) · doi:10.1109/sp46214.2022.9833571 · Cited by 476
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 · cited 2×
“The median cognitive complexity and cyclomatic complexity of Copilot solutions is 6 and 5, respectively, with no statistically significant differences between languages.”
Recommendation Systems for Software Engineering
Robillard, M., Walker, R., & Zimmermann, T. (2010) · IEEE Software · doi:10.1109/ms.2009.161 · Cited by 388
Program Synthesis with Large Language Models
Austin, J., Odena, A., Nye, M., Bosma, M., Michalewski, H., Dohan, D., Jiang, E., Cai, C., Terry, M., Le, Q., et al. (2021) · arXiv · doi:10.48550/arxiv.2108.07732 · Cited by 388
When deep learning met code search
Cambronero, J., Li, H., Kim, S., Sen, K., & Chandra, S. (2019) · Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3338906.3340458 · Cited by 214
Cognitive complexity: an overview and evaluation
Campbell, G. A. (2018) · IEEE/ACM International Conference on Technical Debt (TechDebt) · doi:10.1145/3194164.3194186 · Cited by 182
A Survey of Machine Learning for Big Code and Naturalness
Allamanis, M., Barr, E. T., Devanbu, P., & Sutton, C. (2019) · ACM Computing Surveys · doi:10.1145/3212695 · Cited by 150 · cited 1×
“There has been lots of research dedicated to improving developer productivity through code synthesis, code search, or other types of code recommender systems [2, 4, 20, 25].”
Background
Cited by
Items 301–325 of 325
Cognitive Load as a Lens for Understanding AI-Augmented Workflows in Agile Teams
Palla, D., Krejcar, O., Selamat, A., & Trillo, J. R. (2026) · IEEE Conference on Artificial Intelligence (CAI) · doi:10.1109/cai68641.2026.11536406
“For example, developers must learn to interact with new AI-driven interfaces, validate the outputs of opaque algorithms, and manage the constant stream of information and recommendations these tools generate [6].”
Architectural Constraints Alignment in AI-Assisted, Platform-Based Service Development
Irion, J., Leugers, M., Hartwig, P., Kling, S., Annayev, T., Schwind, A., Borges, M. C., & Werner, S. (2026) · Lecture notes in business information processing · doi:10.1007/978-3-032-28160-9_14
Leveraging Causal Graphs to Improve LLM-Based Causal Reasoning: an Empirical Study
Lopiano, G., Campagner, A., Pasqualini, M., & Ciucci, D. (2026) · Communications in computer and information science · doi:10.1007/978-3-032-28997-1_34
Exploring the Security Landscape of AI Generated Code: A Comprehensive Study
Azad, R. U., Omit, S. B. S., Khan, M. T. R., Mondal, P., & Jahan, S. (2026) · IEEE International Conference on Quantum Photonics, Artificial Intelligence & Networking (QPAIN) · doi:10.1109/qpain69676.2026.11546237
“Several prominent large language model (LLM)-based code generation tools have gained widespread adoption, including Codex developed by OpenAI, AlphaCode by DeepMind, and CodeWhisperer from Amazon [3].”
Chen, X. S. (2026) · International Symposium on Computer Technology and Information Science (ISCTIS) · doi:10.1109/isctis70043.2026.11572537
“…is compared against both practical and research-oriented baselines include manual testing, zero-shot LLM prompting, Copilot-assisted testing [4][5] , and traditional automated testing tools [9][10] to provide a comprehensive evaluation: Manual: Test scripts written by professional QA…”
Model-Driven Automation of Cyber-Physical Systems via AADL and LLMs
Wahab, A., & Azim, A. (2026) · doi:10.1145/3803846.3807460 · Cited by 2
Wang, Y., Rizi, M. B., Khashei, F., & Rubin, J. (2026) · Proceedings of the ACM on software engineering. · doi:10.1145/3797092 · Cited by 2
“Similar to our findings, prior work also reported that code generated by GenAI tools has various issues related to correctness [41, 47, 49, 50, 53, 54, 73], security [23, 26, 35, 50, 56, 69], performance [23, 46, 53], complexity [50, 54], and maintainability [23, 49].”
The transformative potential of AI in software engineering: a case study on LeetCode and ChatGPT
Merkel, M., & Dörpinghaus, J. (2026) · Empirical Software Engineering · doi:10.1007/s10664-026-10912-5 · Cited by 7
“In terms of code understandability, the results differed across the various programming languages, leading to a divergence from the findings of Nguyen and Nadi (2022) in their study with GitHub Copilot.”
InfluentialAI in Software Engineering: Overview, Tools, Limitations, Risks, and Strengths
Andrews, S. K. (2026) · Advances in computational intelligence and robotics book series · doi:10.4018/979-8-2600-2811-7.ch005
When Generative AI Writes Test Cases: Scenario-Driven Evaluation of Generated TestsPreprint
Ardıç, B., Yildirim, I. I., Brandt, C., & Zaidman, A. (2026) · Research Square · doi:10.21203/rs.3.rs-9238547/v1
Transpiling with LLMs for Energy Efficiency
Fernandes, J. P., Chasmawala, A., Zlenko, B., & Kassab, M. (2026) · IEEE/ACM International Workshop on Green and Sustainable Software (GREENS) · doi:10.1145/3786148.3788627
A Spec-Driven Workflow for AI-Assisted Domain-Driven Development: Insights from Practice
Santos, J. D. B. (2026) · International Workshop on Large Language Models for Code (LLM4Code) · doi:10.1145/3786181.3788721
Brandebusemeyer, C., Schimmer, T., & Arnrich, B. (2026) · IEEE/ACM International Conference on Software Engineering: Software Engineering in Practice (ICSE-SEIP) · doi:10.1145/3786583.3786870 · Cited by 6
“The focus of research has so far been on evaluating the capabilities and limitations of GenAI regarding output quality [32, 34, 46, 47] and productivity gains [1, 8, 37, 49].”
Boominathan, S. A., Chintakunta, S. S., Guimarães, E. T., Satyamurthy, K., & do Nascimento, N. M. (2026) · Empirical Software Engineering · doi:10.1007/s10664-026-10927-y
“Nguyen and Nadi (2022) assessed GitHub Copilot on 33 LeetCode problems, evaluating correctness and code understandability.”
Does the Agent Matter? Predicting Merge Outcomes of AI-Authored Code
Selvanayagam, N. (2026) · SIGSOFT FSE Companion · doi:10.1145/3803437.3804439 · Cited by 1
When AI Agents Touch CI/CD Configurations: Frequency and Success
Ghaleb, T. A. (2026) · International Conference on Mining Software Repositories (MSR) · doi:10.1145/3793302.3793581 · Cited by 8
Avaliação Empírica do Impacto da IA Generativa na Eficiência de Depuração de Algoritmos
Vale, B. M. S., & Viana, O. T. (2026) · Anais do Workshop sobre Educação em Computação (WEI) · doi:10.5753/wei.2026.22736 · Cited by 1
How (and How Not) Do Code Complexity Measures Predict Cognitive Load?
Thorgeirsson, S., & Vahrenhold, J. (2026) · ACM Conference on International Computing Education Research (ICER) · doi:10.1145/3765964.3811665
Tadimalla, S. Y., & Maher, M. L. (2026) · ASEE Annual Conference & Exposition · doi:10.18260/1-2--60777
Anderson, A. (2026) · IEEE International Conference on Software Services Engineering (SSE) · doi:10.1109/sse72781.2026.00048
“Several institutions have introduced AI-specific modules — prompt engineering workshops, pair-programming exercises, automated code review [10, 11] — but these treat AI as a tool to be wielded, improving the student's interaction with the model.”
Abdelsalam, Y., Peitek, N., Maurer, A.-M., Toneva, M., & Apel, S. (2026) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1145/3744916.3773219 · Cited by 8
Jain, S., Purohit, P. K., Somani, V., Suwalka, A. K., Singh, N., & Kumar, A. (2026) · International Conference Computational Vision and Bio Inspired Computing · doi:10.1109/iccvbic71195.2026.11688826
Вениаминович, Г. П., & Bessmertny, I. (2026) · Scientific and technical journal of information technologies mechanics and optics · doi:10.17586/2226-1494-2026-26-5-1018-1025
A Semantic and Lexical Analysis of LLM-Generated Responses in Comparison with Stack Overflow Answers
CELEPKOLU, K. C., Ortakcı, Y., & Karaoğlan, K. M. (2026) · Sakarya University Journal of Computer and Information Sciences · doi:10.35377/saucis...1865546
LLM-Based Test-Driven Interactive Code Generation: User Study and Empirical Evaluation
Fakhoury, S., Naik, A., Sakkas, G., Chakraborty, S., & Lahiri, S. K. (2024) · arXiv · doi:10.48550/arxiv.2404.10100
“Several recent works [35], [36], [37] identify clear opportunities for improving the accuracy of LLM code generation techniques.”
Background
Metadata
- Authors
- Nguyen, N., & Nadi, S.
- Affiliations
- University of Alberta (CA)
- ORCID
- Nadi, Sarah
- Venue
- Proceedings of the 19th International Conference on Mining Software Repositories
- Publisher
- ACM
- Published
- 2022-05-23
- Pages
- 1-5
- OpenAlex
- W4312438588
- Cited by
- 313
- References
- 14
- Citations by year
- 2026: 47 · 2025: 100 · 2024: 99 · 2023: 65 · 2022: 1
- FWCI
- 59.24
- Type
- conference paper
- Language
- en
- Open access
- closed
- Locations
- International Conference on Mining Software Repositories (MSR) (publishedVersion)
- Funders
- Canada Research Chairs Program
- Topics
- Physical Sciences › Computer Science › Information Systems › Software Engineering Research
- Physical Sciences › Computer Science › Information Systems › Software Engineering Techniques and Practices
- Physical Sciences › Computer Science › Computer Science Applications › Teaching and Learning Programming
- Keywords
- GitHub Copilot, AI-assisted programming, code generation, program correctness, code understandability, cyclomatic complexity, cognitive complexity, LeetCode, programming languages, JavaScript, Java
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
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.