CoChat

An empirical evaluation of GitHub copilot's code suggestions

Nguyen, Nhan, Nadi, Sarah · 2022 · Proceedings of the 19th International Conference on Mining Software Repositories

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

Crossref · 10.1145/3524842.3528470

Cites

18 of 18 references verified0 citation errors · 0 not checkable

Statistics

Recomputing p-values needs the paper’s full text.

Verification

Claims the paper makes

This paper’s full text isn’t openly available, so its claims and self-check weren’t run. The registry and citation checks still apply.

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?

2 more claims about this paper

Create a free account to see every claim other papers make about this one.

See all claims — free account

Citations

Cites

Cited by

See all 324

Metadata

Authors
Nguyen, N., & Nadi, S.
Affiliations
University of Alberta (CA)
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.