[Paper Review] GitHub Copilot AI pair programmer: Asset or Liability?
The paper empirically evaluates GitHub Copilot as an AI pair programmer by testing its ability to solve fundamental algorithmic problems and by comparing its solutions with human programmers on Python tasks.
Automatic program synthesis is a long-lasting dream in software engineering. Recently, a promising Deep Learning (DL) based solution, called Copilot, has been proposed by OpenAI and Microsoft as an industrial product. Although some studies evaluate the correctness of Copilot solutions and report its issues, more empirical evaluations are necessary to understand how developers can benefit from it effectively. In this paper, we study the capabilities of Copilot in two different programming tasks: (i) generating (and reproducing) correct and efficient solutions for fundamental algorithmic problems, and (ii) comparing Copilot's proposed solutions with those of human programmers on a set of programming tasks. For the former, we assess the performance and functionality of Copilot in solving selected fundamental problems in computer science, like sorting and implementing data structures. In the latter, a dataset of programming problems with human-provided solutions is used. The results show that Copilot is capable of providing solutions for almost all fundamental algorithmic problems, however, some solutions are buggy and non-reproducible. Moreover, Copilot has some difficulties in combining multiple methods to generate a solution. Comparing Copilot to humans, our results show that the correct ratio of humans' solutions is greater than Copilot's suggestions, while the buggy solutions generated by Copilot require less effort to be repaired.
Motivation & Objective
- Assess if Copilot can generate correct and efficient solutions for fundamental algorithmic problems.
- Compare Copilot’s generated solutions with human solutions on a dataset of Python programming tasks.
- Evaluate metrics such as correctness, efficiency, reproducibility, and similarity of Copilot's outputs.
Proposed method
- Test Copilot on fundamental algorithmic problems spanning sorting, data structures, graphs, and greedy algorithms using prompts derived from a standard algorithm design book.
- Evaluate multiple Copilot responses per prompt across two trials separated by 30 days to assess consistency.
- Manually assess correctness by comparing against ground-truth algorithms and unit tests, and check for algorithmic fidelity.
- Measure code optimality by checking if at least one correct solution uses an optimal algorithm.
- Assess code reproducibility and similarity using AST-based similarity across attempts and trials.
- Compare Copilot’s performance to human solutions using a dataset of Python programming tasks from a course, including correct and buggy submissions, and repair tools.
Experimental results
Research questions
- RQ1RQ1: Can Copilot suggest correct and efficient solutions for fundamental algorithmic problems?
- RQ2RQ2: Are Copilot’s solutions competitive with human solutions for solving programming problems?
Key findings
- Copilot can generate solutions for most fundamental problems, but some solutions are buggy and non-reproducible.
- Copilot has difficulty combining multiple methods to form a complete solution.
- Compared to humans, Copilot’s correct solution rate is lower, and its solutions are less diverse.
- Buggy Copilot solutions can be repaired more easily, but may be harder for novices to filter.
- If used by expert developers, Copilot can be asset-like with solution quality comparable to humans; if used by novices, it may become a liability due to buggy or non-optimal code.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.